@Override
public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player) {
if (itemStack.hasTagCompound() && itemStack.getTagCompound().hasKey("time", NBT.TAG_LONG)) {
if (world.getTotalWorldTime() >= itemStack.getTagCompound().getLong("time")) {
itemStack.getTagCompound().setLong("time", world.getTotalWorldTime() + (20 * 1));
player.heal(1F);
}
} else {
NBTTagCompound nbt = new NBTTagCompound();
nbt.setLong("time", world.getTotalWorldTime() + (20 * 1));
itemStack.setTagCompound(nbt);
player.heal(1F);
}
return super.onItemRightClick(itemStack, world, player);
}