use of net.mcft.copy.betterstorage.item.ItemBucketSlime in project BetterStorage by copygirl.
the class CommonProxy method onEntityInteract.
@SubscribeEvent
public void onEntityInteract(EntityInteractEvent event) {
if (event.entity.worldObj.isRemote || event.isCanceled())
return;
EntityPlayer player = event.entityPlayer;
Entity target = event.target;
ItemStack holding = player.getCurrentEquippedItem();
if ((target.getClass() == EntityChicken.class) && (holding != null) && (holding.getItem() == Items.name_tag)) {
EntityChicken chicken = (EntityChicken) target;
if (!chicken.isDead && !chicken.isChild() && "Cluckington".equals(holding.getDisplayName()))
EntityCluckington.spawn(chicken);
}
if ((BetterStorageItems.slimeBucket != null) && (target instanceof EntityLiving) && (holding != null) && (holding.getItem() == Items.bucket)) {
ItemBucketSlime.pickUpSlime(player, (EntityLiving) target);
if (player.getCurrentEquippedItem().getItem() instanceof ItemBucketSlime)
preventSlimeBucketUse = true;
}
}
Aggregations