Package colonies.lunatrius.client.lunatrius.schematica.util

Examples of colonies.lunatrius.client.lunatrius.schematica.util.Vector3i


    this.lineColorBuffer.clear();
    this.lineVertecBuffer.clear();

    this.profiler.startSection("dataPrep");
    if (this.settings.isRenderingSchematic) {
      drawCuboidOutline(Vector3i.ZERO, new Vector3i(this.settings.schematic.width(), this.settings.schematic.height(), this.settings.schematic.length()), 0.75f, 0.0f, 0.75f, 0.25f);
    }

    if (this.settings.isRenderingGuide) {
      Vector3i start = null;
      Vector3i end = null;

      start = this.settings.pointMin.clone().sub(this.settings.offset);
      end = this.settings.pointMax.clone().sub(this.settings.offset).add(1);
      drawCuboidOutline(start, end, 0.0f, 0.75f, 0.0f, 0.25f);
View Full Code Here


    int x, y, z;
    int blockId = 0, mcBlockId = 0;
    int sides = 0;
    Block block = null;
    String lastTexture = "";
    Vector3i tmp;

    boolean ambientOcclusion = this.settings.minecraft.gameSettings.ambientOcclusion;
    this.settings.minecraft.gameSettings.ambientOcclusion = false;

    Tessellator.instance.startDrawingQuads();

    for (y = minY; y < maxY; y++) {
      for (z = minZ; z < maxZ; z++) {
        for (x = minX; x < maxX; x++) {
          try {
            blockId = this.schematic.getBlockId(x, y, z);
            block = Block.blocksList[blockId];

            mcBlockId = mcWorld.getBlockId(x + this.settings.offset.x, y + this.settings.offset.y, z + this.settings.offset.z);

            sides = 0;
            if (block != null) {
              if (block.shouldSideBeRendered(this.schematic, x, y - 1, z, 0)) {
                sides |= 0x01;
              }

              if (block.shouldSideBeRendered(this.schematic, x, y + 1, z, 1)) {
                sides |= 0x02;
              }

              if (block.shouldSideBeRendered(this.schematic, x, y, z - 1, 2)) {
                sides |= 0x04;
              }

              if (block.shouldSideBeRendered(this.schematic, x, y, z + 1, 3)) {
                sides |= 0x08;
              }

              if (block.shouldSideBeRendered(this.schematic, x - 1, y, z, 4)) {
                sides |= 0x10;
              }

              if (block.shouldSideBeRendered(this.schematic, x + 1, y, z, 5)) {
                sides |= 0x20;
              }
            }

            if (mcBlockId != 0) {
              if (this.settings.highlight && renderPass == 2) {
                if (blockId == 0 && this.settings.highlightAir) {
                  tmp = new Vector3i(x, y, z);
                  drawCuboidSurface(tmp, tmp.clone().add(1), 0x3F, 0.75f, 0.0f, 0.75f, 0.25f);
                  drawCuboidOutline(tmp, tmp.clone().add(1), 0x3F, 0.75f, 0.0f, 0.75f, 0.25f);
                } else if (blockId != mcBlockId) {
                  tmp = new Vector3i(x, y, z);
                  drawCuboidSurface(tmp, tmp.clone().add(1), sides, 1.0f, 0.0f, 0.0f, 0.25f);
                  drawCuboidOutline(tmp, tmp.clone().add(1), sides, 1.0f, 0.0f, 0.0f, 0.25f);
                } else if (this.schematic.getBlockMetadata(x, y, z) != mcWorld.getBlockMetadata(x + this.settings.offset.x, y + this.settings.offset.y, z + this.settings.offset.z)) {
                  tmp = new Vector3i(x, y, z);
                  drawCuboidSurface(tmp, tmp.clone().add(1), sides, 0.75f, 0.35f, 0.0f, 0.25f);
                  drawCuboidOutline(tmp, tmp.clone().add(1), sides, 0.75f, 0.35f, 0.0f, 0.25f);
                }
              }
            } else if (mcBlockId == 0 && blockId > 0 && blockId < 0x1000) {
              if (this.settings.highlight && renderPass == 2) {
                tmp = new Vector3i(x, y, z);
                drawCuboidSurface(tmp, tmp.clone().add(1), sides, 0.0f, 0.75f, 1.0f, 0.25f);
                drawCuboidOutline(tmp, tmp.clone().add(1), sides, 0.0f, 0.75f, 1.0f, 0.25f);
              }

              if (block != null) {
                if (!lastTexture.equals(block.getTextureFile())) {
                  ForgeHooksClient.bindTexture(getTextureName(block.getTextureFile()), 0);
View Full Code Here

TOP

Related Classes of colonies.lunatrius.client.lunatrius.schematica.util.Vector3i

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.