Package net.minecraft.world

Examples of net.minecraft.world.ChunkCache


    this.isRenderingSchematic = !this.isRenderingSchematic && (this.schematic != null);
  }

  public void reloadChunkCache() {
    if (this.schematic != null) {
      this.mcWorldCache = new ChunkCache(this.minecraft.theWorld, this.offset.x - 1, this.offset.y - 1, this.offset.z - 1, this.offset.x + this.schematic.width() + 1, this.offset.y + this.schematic.height() + 1, this.offset.z + this.schematic.length() + 1);
      refreshSchematic();
    }
  }
View Full Code Here


        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

            minZ = Math.min(minZ, p.chunkPosZ);
            maxX = Math.max(maxX, p.chunkPosX);
            maxY = Math.max(maxY, p.chunkPosY);
            maxZ = Math.max(maxZ, p.chunkPosZ);
        }
        return new ChunkCache(world, minX, minY, minZ, maxX, maxY, maxZ, 0);
    }
View Full Code Here

        int i2 = i1 - k1;
        int j2 = j1 - k1;
        int k2 = l + k1;
        int l2 = i1 + k1;
        int i3 = j1 + k1;
        ChunkCache chunkcache = new ChunkCache(par1Entity.worldObj, l1, i2, j2, k2, l2, i3, 0);
        PathEntity pathentity = new PathFinderDrone(par1Entity, chunkcache, par6, par7, pathThroughLiquid, par9).createEntityPathTo(par1Entity, par2, par3, par4, par5);
        if(pathentity != null) {
            PathPoint finalPoint = pathentity.getFinalPathPoint();
            if(finalPoint == null || finalPoint.xCoord != par2 || finalPoint.yCoord != par3 || finalPoint.zCoord != par4) pathentity = null;
        }
View Full Code Here

TOP

Related Classes of net.minecraft.world.ChunkCache

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.