コード例 #1
0
 @Override
 public ItemStack b(ItemStack itemstack, World world, EntityHuman entityhuman) {
   CustomItem item = MaterialData.getCustomItem(itemstack.getData());
   if (item instanceof Food) {
     --itemstack.count;
     entityhuman.getFoodData().eat(((Food) item).getHungerRestored(), 0.6F);
   }
   return itemstack;
 }