Gamebuster

moltenmetal

Jul 7th, 2017
251
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.50 KB | None | 0 0
  1. @Override
  2. public void onUpdate(ItemStack stack, World world, Entity entity, int itemSlot, boolean isSelected){
  3.     if(!entity.isBurning() || !entity.isImmuneToFire()){ //No need to set the entity on fire if they are already on fire or are immune to fire
  4.         if(entity instanceof EntityLivingBase){
  5.             if (((EntityLivingBase)entity).getHeldItem(EnumHand.MAIN_HAND).getItem() instanceof Tongs || ((EntityLivingBase)entity).getHeldItem(EnumHand.OFF_HAND).getItem() instanceof Tongs){
  6.                 e.setFire(1);
  7.             }
  8.         }
  9.     }
  10. }
Add Comment
Please, Sign In to add comment