Discussion in 'Spigot Plugin Development' started by Stevie212, Dec 20, 2017.

  1. I have been looking all over and i just cant seem to find a way for IronGolems to swing their arm without targeting a player :v. Is it possible to use the NMS or something to do so?
  2. Code (Java):
    Entity entity = player.getWorld().spawnEntity(player.getLocation(), EntityType.IRON_GOLEM);
    EntityIronGolem golem = (EntityIronGolem) ((CraftEntity) entity).getHandle();
    golem.getWorld().broadcastEntityEffect(golem, (byte) 4);
    I found this on a forum and redid it as it was from 2012. No idea if it would work, maybe play with the byte?
  3. You are right (I haven't actually tested it, but it should still work, since the relevant code still actually sends something to the client). For reference, what each status code does is described here:
  4. go check this site

Share This Page