예제 #1
0
 public override void OnBlockClicked(net.minecraft.src.World world, int i, int j,
                                     int k, net.minecraft.src.EntityPlayer entityplayer)
 {
     if (entityplayer.GetCurrentEquippedItem() != null && entityplayer.GetCurrentEquippedItem
             ().itemID == net.minecraft.src.Item.FLINT_AND_STEEL.ID)
     {
         world.SetBlockMetadata(i, j, k, 1);
     }
     base.OnBlockClicked(world, i, j, k, entityplayer);
 }
예제 #2
0
 public override void HarvestBlock(net.minecraft.src.World world, net.minecraft.src.EntityPlayer
                                   entityplayer, int i, int j, int k, int l)
 {
     if (!world.singleplayerWorld && entityplayer.GetCurrentEquippedItem() != null &&
         entityplayer.GetCurrentEquippedItem().itemID == net.minecraft.src.Item.SHEARS
         .ID)
     {
         entityplayer.AddStat(net.minecraft.src.StatList.StatMinedBlocks[ID], 1);
         DropBlockAsItem_do(world, i, j, k, new net.minecraft.src.ItemStack(net.minecraft.src.Block
                                                                            .LEAVES.ID, 1, l & 3));
     }
     else
     {
         base.HarvestBlock(world, entityplayer, i, j, k, l);
     }
 }