Jump to content

Bandar

Members
  • Posts

    1
  • Joined

  • Last visited

Bandar's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Hi guys I've tried to stopping the Enderman from attacking me so i used the LivingSpawnEvent it's kind a hard to stop the attack but i stopped him from SCREAMING and RUNNING. this my code: if (!(event.getEntity() instanceof EndermanEntity)) return; EndermanEntity enderman = (EndermanEntity) event.getEntity(); try { Field field; field = enderman.getClass().getDeclaredField("SCREAMING"); field.setAccessible(true); DataParameter<Boolean> screaming = (DataParameter<Boolean>) field.get(enderman); enderman.getDataManager().set(screaming, false); Field field1; field1 = enderman.getClass().getDeclaredField("field_226535_bx_"); field1.setAccessible(true); DataParameter<Boolean> field_226535_bx_ = (DataParameter<Boolean>) field1.get(enderman); enderman.getDataManager().set(field_226535_bx_, false); } catch (NoSuchFieldException | IllegalAccessException ignored) { } Any suggestions?
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.