Examples of IBlockAccess


Examples of net.minecraft.src.IBlockAccess

    private static boolean check(IBlockAccess blockAccess, int blockID) {
        return active && blockAccess != null && blockID != BLOCK_ID_BED && blockID != BLOCK_ID_GLASS_PANE && Tessellator.instance instanceof SuperTessellator;
    }

    public static boolean setup(RenderBlocks renderBlocks, Block block, int i, int j, int k, int face, int origTexture) {
        IBlockAccess blockAccess = renderBlocks.blockAccess;
        if (!enableStandard || !check(blockAccess, block.blockID) || face < 0 || face > 5) {
            return false;
        } else if (getConnectedTexture(renderBlocks, blockAccess, block, origTexture, i, j, k, face)) {
            return true;
        } else {
View Full Code Here

Examples of net.minecraft.src.IBlockAccess

            return false;
        }
    }

    public static boolean setup(RenderBlocks renderBlocks, Block block, int i, int j, int k, int origTexture) {
        IBlockAccess blockAccess = renderBlocks.blockAccess;
        if (!enableNonStandard || !check(blockAccess, block.blockID)) {
            return false;
        } else if (getConnectedTexture(renderBlocks, blockAccess, block, origTexture, i, j, k, -1)) {
            return true;
        } else {
View Full Code Here

Examples of net.minecraft.src.IBlockAccess

  public static Icon getTile(RenderBlocks renderBlocks, Block block, int i, int j, int k, int face, Icon icon, Tessellator tessellator) {
    lastOverride = null;

    if (checkFace(face) && checkBlock(renderBlocks, block)) {
      IBlockAccess blockAccess = renderBlocks.blockAccess;
      CTMUtils$2 iterator = new CTMUtils$2(block, icon, blockAccess, i, j, k, face);
      lastOverride = iterator.go();

      if (lastOverride != null) {
        icon = iterator.getIcon();
View Full Code Here

Examples of net.minecraft.world.IBlockAccess

    Block srcBlk = te.getSourceBlock();
    if(srcBlk == null) {
      srcBlk = Blocks.glowstone;
    }

    IBlockAccess origBa = rb.blockAccess;
    rb.blockAccess = new PaintedBlockAccessWrapper(origBa);
    rb.renderBlockByRenderType(srcBlk, x, y, z);
    rb.blockAccess = origBa;

    return true;
View Full Code Here

Examples of net.minecraft.world.IBlockAccess

    Block srcBlk = te.getSourceBlock();
    if(srcBlk == null) {
      srcBlk = defaultBlock;
    }

    IBlockAccess origBa = rb.blockAccess;
    try {     
      rb.blockAccess = new PaintedBlockAccessWrapper(origBa);
      if(srcBlk == block) {
        rb.renderStandardBlock(srcBlk, x, y, z);
      } else {
View Full Code Here

Examples of net.minecraft.world.IBlockAccess

       
      } else if(facadeId != null){
        bundle.setFacadeRenderAs(FacadeRenderState.FULL);
        res = false;
       
        IBlockAccess origBa = rb.blockAccess;
        rb.blockAccess = new FacadeAccessWrapper(origBa);
        try {
          rb.renderBlockByRenderType(facadeId, x, y, z);
        } catch(Exception e) {
          //just in case the paint source wont render safely in this way
View Full Code Here

Examples of net.minecraft.world.IBlockAccess

    this.profiler.endSection();
  }

  public void renderBlocks(int renderPass, int minX, int minY, int minZ, int maxX, int maxY, int maxZ) {
    IBlockAccess mcWorld = this.settings.mcWorldCache;
    RenderBlocks renderBlocks = this.settings.renderBlocks;

    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);
                }
              }
View Full Code Here

Examples of net.minecraft.world.IBlockAccess

    this.settings.minecraft.gameSettings.ambientOcclusion = ambientOcclusion;
  }

  public void renderTileEntities(int renderPass) {
    IBlockAccess mcWorld = this.settings.mcWorldCache;
    RendererTileEntity rendererTileEntity = this.settings.rendererTileEntity;

    int x, y, z;
    int mcBlockId = 0;

    GL11.glColor4f(1.0f, 1.0f, 1.0f, this.settings.alpha);

    try {
      for (TileEntity tileEntity : this.tileEntities) {
        x = tileEntity.xCoord;
        y = tileEntity.yCoord;
        z = tileEntity.zCoord;

        if (this.settings.renderingLayer >= 0) {
          if (y != this.settings.renderingLayer) {
            continue;
          }
        }

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

        if (mcBlockId == 0) {
          if (tileEntity instanceof TileEntitySign) {
            rendererTileEntity.renderTileEntitySignAt((TileEntitySign) tileEntity);
          } else if (tileEntity instanceof TileEntityChest) {
View Full Code Here

Examples of net.minecraft.world.IBlockAccess

    }

    @Override
    public void drawBreaking(RenderBlocks renderBlocks)
    {
        IBlockAccess actual = renderBlocks.blockAccess;
        renderBlocks.blockAccess = new PartMetaAccess(this);
        renderBlocks.renderBlockLever(lever, x(), y(), z());
        renderBlocks.blockAccess = actual;
    }
View Full Code Here

Examples of net.minecraft.world.IBlockAccess

        int baseY = (int)Math.floor(player.posY) - blockTrackRange + blockTrackRange * (ticksExisted % updateInterval) / (updateInterval / 2);
        int maxY = (int)Math.floor(player.posY) - blockTrackRange + blockTrackRange * (ticksExisted % updateInterval + 1) / (updateInterval / 2);
        baseY = MathHelper.clamp_int(baseY, 0, 255);
        maxY = MathHelper.clamp_int(maxY, 0, 255);
        int baseZ = (int)Math.floor(player.posZ) - blockTrackRange;
        IBlockAccess chunkCache = new ChunkCache(player.worldObj, baseX, baseY, baseZ, baseX + 2 * blockTrackRange, maxY, baseZ + 2 * blockTrackRange, 0);
        for(int i = baseX; i <= baseX + 2 * blockTrackRange; i++) {
            for(int j = baseY; j < maxY; j++) {
                for(int k = baseZ; k <= baseZ + 2 * blockTrackRange; k++) {
                    if(player.getDistance(i, j, k) > blockTrackRange) continue;
                    TileEntity te = chunkCache.getTileEntity(i, j, k);
                    if(searchHandler != null && te instanceof IInventory) {
                        searchHandler.checkInventoryForItems(te);
                    }
                    List<IBlockTrackEntry> entries = BlockTrackEntryList.instance.getEntriesForCoordinate(chunkCache, i, j, k);
                    if(entries.isEmpty()) continue;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.