예제 #1
0
        static Block()
        {
            Item.itemsList[WOOL.ID]          = (new ItemCloth(WOOL.ID - 256)).SetItemName("cloth");
            Item.itemsList[LOG.ID]           = (new ItemLog(LOG.ID - 256)).SetItemName("log");
            Item.itemsList[STEP.ID]          = (new ItemSlab(STEP.ID - 256)).SetItemName("stoneSlab");
            Item.itemsList[SAPLING.ID]       = (new ItemSapling(SAPLING.ID - 256)).SetItemName("sapling");
            Item.itemsList[LEAVES.ID]        = (new ItemLeaves(LEAVES.ID - 256)).SetItemName("leaves");
            Item.itemsList[PISTON.ID]        = new ItemPiston(PISTON.ID - 256);
            Item.itemsList[PISTON_STICKY.ID] = new ItemPiston(PISTON_STICKY.ID - 256);

            for (int i = 0; i < 256; i++)
            {
                if (blocksList[i] != null && Item.itemsList[i] == null)
                {
                    Item.itemsList[i] = new ItemBlock(i - 256);
                    blocksList[i].SetFireBurnRates();
                }
            }
            canBlockGrass[0] = true;
            StatList.Func_25088_a();
        }
 /// <summary>
 /// runs registerPacket on the given Packet200Statistic
 /// </summary>
 public override void HandleStatistic(Packet200Statistic par1Packet200Statistic)
 {
     ((EntityClientPlayerMP)Mc.ThePlayer).IncrementStat(StatList.GetOneShotStat(par1Packet200Statistic.StatisticId), par1Packet200Statistic.Amount);
 }