Examples of ChunkCoord


Examples of cofh.lib.util.position.ChunkCoord

    if (event.phase == Phase.END) {
      ArrayDeque<RetroChunkCoord> chunks = chunksToGen.get(dim);

      if (chunks != null && chunks.size() > 0) {
        RetroChunkCoord r = chunks.pollFirst();
        ChunkCoord c = r.coord;
        CoFHCore.log.info("RetroGening " + c.toString() + ".");
        long worldSeed = world.getSeed();
        Random rand = new Random(worldSeed);
        long xSeed = rand.nextLong() >> 2 + 1L;
        long zSeed = rand.nextLong() >> 2 + 1L;
        rand.setSeed(xSeed * c.chunkX + zSeed * c.chunkZ ^ worldSeed);
        WorldHandler.instance.generateWorld(rand, r, world, false);
        chunksToGen.put(dim, chunks);
      } else if (chunks != null) {
        chunksToGen.remove(dim);
      }
    } else {
      ArrayDeque<ChunkCoord> chunks = chunksToPreGen.get(dim);

      if (chunks != null && chunks.size() > 0) {
        ChunkCoord c = chunks.pollFirst();
        CoFHCore.log.info("PreGening " + c.toString() + ".");
        world.getChunkFromChunkCoords(c.chunkX, c.chunkZ);
      } else if (chunks != null) {
        chunksToPreGen.remove(dim);
      }
    }
View Full Code Here

Examples of cofh.lib.util.position.ChunkCoord

        chunks = new ArrayDeque<ChunkCoord>();
      }

      for (int x = xS; x <= xL; ++x) {
        for (int z = zS; z <= zL; ++z) {
          chunks.addLast(new ChunkCoord(x, z));
        }
      }
      TickHandlerWorld.chunksToPreGen.put(world.provider.dimensionId, chunks);
    }
  }
View Full Code Here

Examples of cofh.lib.util.position.ChunkCoord

    int dim = event.world.provider.dimensionId;

    boolean regen = false;
    NBTTagCompound tag = (NBTTagCompound) event.getData().getTag(TAG_NAME);
    NBTTagList list = null;
    ChunkCoord cCoord = new ChunkCoord(event.getChunk());

    if (tag != null) {
      boolean genFeatures = false;
      boolean bedrock = retroFlatBedrock & genFlatBedrock && !tag.hasKey("Bedrock");
      if (retroGeneration) {
        genFeatures = tag.getLong("Hash") != genHash;
        if (tag.hasKey("List")) {
          list = tag.getTagList("List", Constants.NBT.TAG_STRING);
          genFeatures |= list.tagCount() != features.size();
        }
      }

      if (bedrock) {
        CoFHCore.log.info("Queuing RetroGen for flattening bedrock for the chunk at " + cCoord.toString() + ".");
        regen = true;
      }
      if (genFeatures) {
        CoFHCore.log.info("Queuing RetroGen for features for the chunk at " + cCoord.toString() + ".");
        regen = true;
      }
    } else {
      regen = retroFlatBedrock & genFlatBedrock | retroGeneration;
    }
View Full Code Here

Examples of mantle.world.ChunkCoord

            int dim = world.provider.dimensionId;
            ArrayList chunks = (ArrayList) chunksToGen.get(Integer.valueOf(dim));

            if (chunks != null && chunks.size() > 0)
            {
                ChunkCoord c = (ChunkCoord) chunks.get(0);
                long worldSeed = world.getSeed();
                Random rand = new Random(worldSeed);
                long xSeed = rand.nextLong() >> 2 + 1L;
                long zSeed = rand.nextLong() >> 2 + 1L;
                rand.setSeed(xSeed * c.chunkX + zSeed * c.chunkZ ^ worldSeed);
View Full Code Here

Examples of mantle.world.ChunkCoord

        if (tag != null)
        {
            features = tag.getLong("Features") != genHash && Natura.retrogen;
        }
        ChunkCoord cCoord = new ChunkCoord(event.getChunk());

        if (tag == null && (Natura.retrogen) && !event.getData().getBoolean("Natura.Retrogen"))
        {
            regen = true;
        }
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.