Example #1
0
        public void UpdateBlock(Player p, ushort x, ushort y, ushort z, byte type, byte extType)
        {
            if (!DoBlockchange(p, x, y, z, type, extType))
            {
                return;
            }
            BlockPos bP = default(BlockPos);

            bP.name  = p.name;
            bP.index = PosToInt(x, y, z);
            bP.SetData(type, extType, type == 0);
            blockCache.Add(bP);

            if (bufferblocks)
            {
                BlockQueue.Addblock(p, bP.index, type, extType);
            }
            else
            {
                Player.GlobalBlockchange(this, x, y, z, type, extType);
            }
        }