Ejemplo n.º 1
0
        bool PlaceBlock(byte old, ushort x, ushort y, ushort z, byte block, byte extBlock)
        {
            if (modeType != 0)
            {
                if (old == modeType)
                {
                    SendBlockchange(x, y, z, old);
                }
                else
                {
                    ChangeBlock(x, y, z, modeType, 0);
                }
                return(true);
            }

            HandlePlace handler = BlockBehaviour.placeHandlers[block];

            if (handler != null)
            {
                if (handler(this, old, x, y, z))
                {
                    return(false);
                }
            }
            else
            {
                return(ChangeBlock(x, y, z, block, extBlock));
            }
            return(true);
        }
Ejemplo n.º 2
0
        ChangeResult PlaceBlock(BlockID old, ushort x, ushort y, ushort z, BlockID block)
        {
            HandlePlace handler = level.placeHandlers[block];

            if (handler != null)
            {
                return(handler(this, block, x, y, z));
            }
            return(ChangeBlock(x, y, z, block));
        }
Ejemplo n.º 3
0
        bool PlaceBlock(ExtBlock old, ushort x, ushort y, ushort z, ExtBlock block)
        {
            HandlePlace handler = level.placeHandlers[block.Index];

            if (handler != null)
            {
                handler(this, block, x, y, z);
                return(true);
            }
            return(ChangeBlock(x, y, z, block) == 2);
        }
Ejemplo n.º 4
0
        bool PlaceBlock(BlockID old, ushort x, ushort y, ushort z, BlockID block)
        {
            HandlePlace handler = level.placeHandlers[block];

            if (handler != null)
            {
                handler(this, block, x, y, z);
                return(true);
            }
            return(ChangeBlock(x, y, z, block) == 2);
        }