예제 #1
0
        /// <inheritdoc />
        public override BlockMeshData GetMesh(BlockMeshInfo info)
        {
            bool north = (info.Data & 0b00_1000) != 0;
            bool east  = (info.Data & 0b00_0100) != 0;
            bool south = (info.Data & 0b00_0010) != 0;
            bool west  = (info.Data & 0b00_0001) != 0;

            bool useStraightZ = north && south && !east && !west;
            bool useStraightX = !north && !south && east && west;

            if (useStraightZ || useStraightX)
            {
                return(useStraightZ ? straightZ.GetComplexMeshData() : straightX.GetComplexMeshData());
            }

            return(base.GetMesh(info));
        }