Пример #1
0
 public override net.minecraft.src.ItemStack OnItemRightClick(net.minecraft.src.ItemStack
                                                              itemstack, net.minecraft.src.World world, net.minecraft.src.EntityPlayer entityplayer
                                                              )
 {
     itemstack.stackSize--;
     entityplayer.Heal(healAmount);
     return(itemstack);
 }
Пример #2
0
 private void EatCakeSlice(net.minecraft.src.World world, int i, int j, int k, net.minecraft.src.EntityPlayer
                           entityplayer)
 {
     if (entityplayer.health < 20)
     {
         entityplayer.Heal(3);
         int l = world.GetBlockMetadata(i, j, k) + 1;
         if (l >= 6)
         {
             world.SetBlockWithNotify(i, j, k, 0);
         }
         else
         {
             world.SetBlockMetadataWithNotify(i, j, k, l);
             world.MarkBlockAsNeedsUpdate(i, j, k);
         }
     }
 }