Exemplo n.º 1
0
 public override void RenderNorthSide()
 {
     Visible = true;
     if (_zrNeed)
     {
         Renderer.GenFace(X, Y + _zrLevel, Z,
                          0, _level - _zrLevel, 0,
                          1, 0, 0,
                          2, Block, 5, _level - _zrLevel);
         LightingHelper.SetLightNorth(WorldX, WorldY, WorldZ - 1, Block.Biomed);
     }
 }
Exemplo n.º 2
0
 public override void RenderNorthSide()
 {
     if (Renderer.IsRenderNeed(Block, BlockId, GetNeighbor(0, 0, -1)))
     {
         Visible = true;
         Renderer.GenFace(X, Y, Z,
                          0, 1, 0,
                          1, 0, 0,
                          2, Block, 5);
         LightingHelper.SetLightNorth(WorldX, WorldY, WorldZ - 1, Block.Biomed);
     }
 }
Exemplo n.º 3
0
        public override void RenderNorthSide()
        {
            Visible = true;
            switch ((int)Block.RenderParam)
            {
            case 0:
                Renderer.GenFace(X, Y + 0.1875f, Z,
                                 0, 0.375f, 0,
                                 1, 0, 0,
                                 0, Block, 0, 2.666667f, 0.09375f, 1 + 22.0f / 128, 1 + 20.0f / 32);
                LightingHelper.SetLightNorth(WorldX, WorldY, WorldZ - 1, Block.Biomed, false);

                Renderer.GenFace(X, Y, Z,
                                 0, 0.1875f, 0,
                                 0.1875f, 0, 0,
                                 2, Block, 0, 1, 0.046875f, 1.4140625f, 3f - 0.1875f * 3);
                LightingHelper.SetLightNorth(WorldX, WorldY, WorldZ - 1, Block.Biomed, false);

                Renderer.GenFace(X, Y, Z + 1 - 0.1875f,
                                 0, 0.1875f, 0,
                                 0.1875f, 0, 0,
                                 2, Block, 0, 1, 0.046875f, 1.4140625f + 3.0f / 128, 2.8125f);
                LightingHelper.SetLightNorth(WorldX, WorldY, WorldZ - 1, Block.Biomed, false);
                break;

            case 1:
                Renderer.GenFace(X, Y + 0.1875f, Z,
                                 0, 0.375f, 0,
                                 1, 0, 0,
                                 1, Block, 0, 2.666667f, 0.09375f, 1, 1 + 20.0f / 32);
                LightingHelper.SetLightNorth(WorldX, WorldY, WorldZ - 1, Block.Biomed, false);

                Renderer.GenFace(X + 1 - 0.1875f, Y, Z + 1 - 0.1875f,
                                 0, 0.1875f, 0,
                                 0.1875f, 0, 0,
                                 2, Block, 0, 1, 0.046875f, 1.4140625f + 6.0f / 128, 3f - 0.1875f * 3);
                LightingHelper.SetLightNorth(WorldX, WorldY, WorldZ - 1, Block.Biomed, false);

                Renderer.GenFace(X + 1 - 0.1875f, Y, Z,
                                 0, 0.1875f, 0,
                                 0.1875f, 0, 0,
                                 2, Block, 0, 1, 0.046875f, 1.4140625f - 3.0f / 128, 2.8125f);
                LightingHelper.SetLightNorth(WorldX, WorldY, WorldZ - 1, Block.Biomed, false);
                break;

            case 2:
                Renderer.GenFace(X + 1, Y + 0.1875f, Z,
                                 0, 0.375f, 0,
                                 -1, 0, 0,
                                 -3, Block, 0, 0.375f, 0.25f, 1.171875f, 2.125f);
                LightingHelper.SetLightNorth(WorldX, WorldY, WorldZ - 1, Block.Biomed, false);

                Renderer.GenFace(X, Y, Z,
                                 0, 0.1875f, 0,
                                 0.1875f, 0, 0,
                                 2, Block, 0, 1, 0.046875f, 1.4140625f, 2.8125f);
                LightingHelper.SetLightNorth(WorldX, WorldY, WorldZ - 1, Block.Biomed, false);

                Renderer.GenFace(X + 1 - 0.1875f, Y, Z,
                                 0, 0.1875f, 0,
                                 0.1875f, 0, 0,
                                 2, Block, 0, 1, 0.046875f, 1.5f - 0.109375f, 3f - 0.1875f * 3);
                LightingHelper.SetLightNorth(WorldX, WorldY, WorldZ - 1, Block.Biomed, false);
                break;

            case 3:
                Renderer.GenFace(X + 0.8125f, Y, Z + 1 - 0.1875f,
                                 0, 0.1875f, 0,
                                 0.1875f, 0, 0,
                                 2, Block, 0, 1, 0.046875f, 1.4140625f + 0.046875f, 2.8125f);
                LightingHelper.SetLightNorth(WorldX, WorldY, WorldZ - 1, Block.Biomed, false);

                Renderer.GenFace(X, Y, Z + 1 - 0.1875f,
                                 0, 0.1875f, 0,
                                 0.1875f, 0, 0,
                                 2, Block, 0, 1, 0.046875f, 1.5f - 0.109375f + 0.046875f, 3f - 0.1875f * 3);
                LightingHelper.SetLightNorth(WorldX, WorldY, WorldZ - 1, Block.Biomed, false);
                break;

            case 4:
                Renderer.GenFace(X, Y + 0.1875f, Z,
                                 1, 0, 0,
                                 0, 0.375f, 0,
                                 -2, Block, 0, 2.666667f, 0.09375f, 1, 1 + 42.0f / 32);
                LightingHelper.SetLightNorth(WorldX, WorldY, WorldZ - 1, Block.Biomed, false);

                Renderer.GenFace(X + 1 - 0.1875f, Y, Z + 1 - 0.1875f,
                                 0, 0.1875f, 0,
                                 0.1875f, 0, 0,
                                 2, Block, 0, 1, 0.046875f, 1.4140625f + 6.0f / 128, 3f - 0.1875f * 2);
                LightingHelper.SetLightNorth(WorldX, WorldY, WorldZ - 1, Block.Biomed, false);

                Renderer.GenFace(X + 1 - 0.1875f, Y, Z,
                                 0, 0.1875f, 0,
                                 0.1875f, 0, 0,
                                 2, Block, 0, 1, 0.046875f, 1.4140625f - 3.0f / 128, 3f - 0.1875f * 4);
                LightingHelper.SetLightNorth(WorldX, WorldY, WorldZ - 1, Block.Biomed, false);
                break;

            case 5:
                Renderer.GenFace(X, Y + 0.1875f, Z,
                                 1, 0, 0,
                                 0, 0.375f, 0,
                                 -3, Block, 0, 2.666667f, 0.09375f, 1 + 22.0f / 128, 1 + 42.0f / 32);
                LightingHelper.SetLightNorth(WorldX, WorldY, WorldZ - 1, Block.Biomed, false);

                Renderer.GenFace(X, Y, Z,
                                 0, 0.1875f, 0,
                                 0.1875f, 0, 0,
                                 2, Block, 0, 1, 0.046875f, 1.4140625f, 3f - 0.1875f * 2);
                LightingHelper.SetLightNorth(WorldX, WorldY, WorldZ - 1, Block.Biomed, false);

                Renderer.GenFace(X, Y, Z + 1 - 0.1875f,
                                 0, 0.1875f, 0,
                                 0.1875f, 0, 0,
                                 2, Block, 0, 1, 0.046875f, 1.4140625f + 3.0f / 128, 3f - 0.1875f * 4);
                LightingHelper.SetLightNorth(WorldX, WorldY, WorldZ - 1, Block.Biomed, false);
                break;

            case 6:
                Renderer.GenFace(X + 0.8125f, Y, Z + 1 - 0.1875f,
                                 0, 0.1875f, 0,
                                 0.1875f, 0, 0,
                                 2, Block, 0, 1, 0.046875f, 1.4140625f + 0.046875f, 3f - 0.1875f * 4);
                LightingHelper.SetLightNorth(WorldX, WorldY, WorldZ - 1, Block.Biomed, false);

                Renderer.GenFace(X, Y, Z + 1 - 0.1875f,
                                 0, 0.1875f, 0,
                                 0.1875f, 0, 0,
                                 2, Block, 0, 1, 0.046875f, 1.5f - 0.109375f + 0.046875f, 3f - 0.1875f * 2);
                LightingHelper.SetLightNorth(WorldX, WorldY, WorldZ - 1, Block.Biomed, false);
                break;

            case 7:
                Renderer.GenFace(X + 1, Y + 0.1875f, Z,
                                 0, 0.375f, 0,
                                 -1, 0, 0,
                                 -3, Block, 0, 0.375f, 0.25f, 1.171875f - 0.125f, 2.125f + 0.6875f);
                LightingHelper.SetLightNorth(WorldX, WorldY, WorldZ - 1, Block.Biomed, false);

                Renderer.GenFace(X, Y, Z,
                                 0, 0.1875f, 0,
                                 0.1875f, 0, 0,
                                 2, Block, 0, 1, 0.046875f, 1.5f - 0.0859375f, 3f - 0.1875f * 4);
                LightingHelper.SetLightNorth(WorldX, WorldY, WorldZ - 1, Block.Biomed, false);

                Renderer.GenFace(X + 1 - 0.1875f, Y, Z,
                                 0, 0.1875f, 0,
                                 0.1875f, 0, 0,
                                 2, Block, 0, 1, 0.046875f, 1.5f - 0.109375f, 3f - 0.1875f * 2);
                LightingHelper.SetLightNorth(WorldX, WorldY, WorldZ - 1, Block.Biomed, false);
                break;
            }
        }