Guest User

ModEvents

a guest
Oct 23rd, 2020
18
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @Mod.EventBusSubscriber(modid = Main.MOD_ID) //, bus = Mod.EventBusSubscriber.Bus.MOD
  2. public class ModEvents {
  3.  
  4. @SubscribeEvent
  5. public void attachCapabilitiesEntity(final AttachCapabilitiesEvent<Entity> event) {
  6. if ((event.getObject() instanceof LivingEntity) && !(event.getObject() instanceof PlayerEntity))
  7. event.addCapability(Main.getId("mod_tag"), new ModTagProvider());
  8. Main.LOGGER.info("Logged capability event");
  9. }
  10. }
RAW Paste Data