Exemplo n.º 1
0
        bool IGeometryGeneratorSource.CanBuildSide(BlockData me, BlockData side, Point3 mePos, Point3 sidePos)
        {
            if (Block.Blocks[side.GetGlobalID()] == null)
                return true;

            if (Block.Blocks[side.GetGlobalID()].IsTransparent())
            {
                if (IsStairs(side))
                {
                    bool ud = IsUpsideDown(side.Metadata);
                    bool od = IsUpsideDown(me.Metadata);

                    if (ud != od)
                    {
                        if (GetType(me.Metadata) == GetType(side.Metadata))
                            return true;
                        else
                            return false;
                    }
                    return false;
                }

                return true;
            }

            return true;
        }
Exemplo n.º 2
0
        private bool IsStairs(BlockData data)
        {
            Block block = Block.Blocks[data.GetGlobalID()];
            if (block == null)
                return false;

            return (block is Stairs);

            //return (id == 53 || id == 67 || id == 108 || id == 109 || id == 114 || id == 128 || id == 134 || id == 135 || id == 136 || id == 156);
        }
Exemplo n.º 3
0
        private bool IsFence(BlockData data)
        {
            Block bl = Block.Blocks[data.GetGlobalID()];
            if (bl == null)
                return false;

            return (bl is Fence);
        }