Package net.minecraft.src

Examples of net.minecraft.src.Chunk


  public static SpoutcraftChunk getChunkAt(World world, int x, int y, int z) {
    return getChunk(world, x >> 4, z >> 4);
  }

  public static SpoutcraftChunk getChunk(World world, int chunkX, int chunkZ) {
    Chunk chunk = world.getChunkFromChunkCoords(chunkX, chunkZ);
    if (chunk != null) {
      return chunk.spoutChunk;
    }
    return null;
  }
View Full Code Here


        
         int x = arg0.getBlockX();
         int z = arg0.getBlockZ();
        
         if(this.world.getMinecraftWorld().blockExists(x, 0, z)) { // blockExists
            Chunk chunk = this.world.getMinecraftWorld().getChunkFromBlockCoords(x, z); // Chunk, getChunkFromBlockCoords
            if(chunk != null) {
               byte[] biomevals = chunk.getBiomeArray(); // getBiomeArray
               biomevals[((z & 0xF) << 4 | x & 0xF)] = (byte)biomeId;
               // work around for biome data not being updated on client
               com.sijobe.spc.wrapper.Minecraft.getMinecraft().thePlayer.worldObj.getChunkFromBlockCoords(x, z).setBiomeArray(biomevals);
            } else {
               System.err.println("Can't set biome for null chunk.");
View Full Code Here

    }
  }

  private final int getBlockHeight(World world, int x, int z) {
    if (MinimapConfig.getInstance().isCavemap()) {
      Chunk chunk = world.getChunkFromBlockCoords(x, z);
      cmdist.setSeed((x & 0xffff) | ((z & 0xffff) << 16));
      float dist = distance((int) Minecraft.getMinecraft().thePlayer.posX, (int) Minecraft.getMinecraft().thePlayer.posZ, x, z);
      int y = (int) Minecraft.getMinecraft().thePlayer.posY;
      if (dist > 5)
        y -= (cmdist.nextInt((int) (dist)) - ((int) dist / 2));
View Full Code Here

//        long start = System.currentTimeMillis();
        if (MinimapConfig.getInstance().getScanRadius() > 0) {
          int radius = MinimapConfig.getInstance().getScanRadius() << 4;
          for (int cx = (int) (x - radius); cx <= (int) (x + radius); cx += 16) {
            for (int cz = (int) (z - radius); cz <= (int) (z + radius); cz += 16) {
              Chunk chunk = Minecraft.getMinecraft().theWorld.getChunkFromBlockCoords((int) cx, (int) cz);
              org.spoutcraft.client.chunkcache.HeightMapAgent.scanChunk(chunk);
            }
          }
        }
        //long dur = System.currentTimeMillis() - start;
View Full Code Here

    */
    public List getLoadArea() {

        List<ChunkCoordIntPair> loadArea = new LinkedList<ChunkCoordIntPair>();

        Chunk centerChunk = worldObj.getChunkFromBlockCoords(xCoord, zCoord);

        for (int x = -1; x < 2; x++) {
            for (int z = -1; z < 2; z++) {
                ChunkCoordIntPair chunkCoords = new ChunkCoordIntPair(centerChunk.xPosition + x, centerChunk.zPosition + z);
                loadArea.add(chunkCoords);
View Full Code Here

TOP

Related Classes of net.minecraft.src.Chunk

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.