Guest User

Untitled

a guest
Feb 23rd, 2021
25
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class MoltenGauntletHitEvent
  2. {
  3. public static boolean hasItem;
  4.  
  5. @SubscribeEvent
  6. public static void attackWithGauntlet(LivingAttackEvent event) {
  7. if (!(event.getEntity() instanceof PlayerEntity)) {
  8.  
  9. if (hasItem)
  10. {
  11. event.getEntity().setFire(3);
  12. }
  13.  
  14. }
  15. }
  16.  
  17. @SubscribeEvent
  18. public static void checkAccessory(LivingEvent.LivingUpdateEvent event) {
  19. if (event.getEntity() instanceof PlayerEntity) {
  20.  
  21. PlayerEntity playerIn = (PlayerEntity) event.getEntity();
  22. World worldIn = playerIn.getEntityWorld();
  23.  
  24. if (playerIn.inventory.hasItemStack(new ItemStack(ItemInit.MOLTEN_GAUNTLET.get())))
  25. hasItem = true;
  26. else
  27. hasItem = false;
  28. }
  29. }
  30.  
  31. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×