Advertisement
Guest User

SpecialEntityItem

a guest
Jan 12th, 2016
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.69 KB | None | 0 0
  1. package com.knifesurge.ToolExpansion.entityItem;
  2.  
  3. import com.knifesurge.ToolExpansion.init.ToolExpansionItems;
  4.  
  5. import net.minecraft.entity.item.EntityItem;
  6. import net.minecraft.item.ItemStack;
  7. import net.minecraft.world.World;
  8.  
  9. public class SpecialEntityItem extends EntityItem{
  10.  
  11.     public SpecialEntityItem(World worldIn, double x, double y, double z, ItemStack stack) {
  12.         super(worldIn, x, y, z, stack);
  13.     }
  14.    
  15.     @Override
  16.     public void onUpdate()
  17.     {
  18.         if(this.inWater)
  19.         {
  20.             this.setDead();
  21.             EntityItem entity = new EntityItem(worldObj, this.posX, this.posY, this.posZ, new ItemStack(ToolExpansionItems.cooled_blaze_rod));
  22.             worldObj.spawnEntityInWorld(entity);
  23.            
  24.         }
  25.     }
  26.  
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement