Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class MoltenGauntletHitEvent
- {
- public static boolean hasItem;
- @SubscribeEvent
- public static void attackWithGauntlet(LivingAttackEvent event) {
- if (!(event.getEntity() instanceof PlayerEntity)) {
- if (hasItem)
- {
- event.getEntity().setFire(3);
- }
- }
- }
- @SubscribeEvent
- public static void checkAccessory(LivingEvent.LivingUpdateEvent event) {
- if (event.getEntity() instanceof PlayerEntity) {
- PlayerEntity playerIn = (PlayerEntity) event.getEntity();
- World worldIn = playerIn.getEntityWorld();
- if (playerIn.inventory.hasItemStack(new ItemStack(ItemInit.MOLTEN_GAUNTLET.get())))
- hasItem = true;
- else
- hasItem = false;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement