Guest User

Untitled

a guest
Feb 24th, 2021
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. public class AttackWithMoltenGauntletEvent
  2. {
  3. public AttackWithMoltenGauntletEvent() { }
  4.  
  5. @SubscribeEvent
  6. public void attackFromGauntlet(LivingHurtEvent event) {
  7. if (event.getSource().getTrueSource() instanceof PlayerEntity) {
  8. PlayerEntity playerIn = (PlayerEntity) event.getSource().getTrueSource();
  9. if (!playerIn.inventory.isEmpty()) {
  10. if (playerIn.inventory.hasItemStack(new ItemStack(ItemInit.MOLTEN_GAUNTLET.get())))
  11. if (event.getEntity() instanceof LivingEntity) {
  12. event.getEntity().setFire(3);
  13. ProjectDawn.LOGGER.info("FIRE! FIRE!!!");
  14. }
  15. }
  16. }
  17. else ProjectDawn.LOGGER.info("Huh.... odd ain't it?");
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment