Examples of ChunkCoordIntPair


Examples of net.minecraft.server.ChunkCoordIntPair

      if ((j1 != 0) || (k1 != 0)) {
        for (int l1 = i - i1; l1 <= i + i1; l1++) {
          for (int i2 = j - i1; i2 <= j + i1; i2++) {
            if(!PlayerChunkMapRef.shouldUnload.invoke(this, l1, i2, k, l, i1)) {
              chunksToLoad.add(new ChunkCoordIntPair(l1, i2));
            }

            if(!PlayerChunkMapRef.shouldUnload.invoke(this, l1 - j1, i2 - k1, i, j, i1)) {
              Object playerchunk = getPlayerChunk(PlayerChunkMapRef.getChunk.invoke(this, l1 - j1, i2 - k1, false));
View Full Code Here

Examples of net.minecraft.server.ChunkCoordIntPair

   * @return chunk being loaded soon?
   */
  public static boolean isLoadRequested(Player player, int cx, int cz) {
    List<?> chunkQue = EntityPlayerRef.chunkQueue.get(Conversion.toEntityHandle.convert(player));
    for (Object location : chunkQue) {
      ChunkCoordIntPair loc = (ChunkCoordIntPair) location;
      if (loc.x == cx && loc.z == cz) {
        return true;
      }
    }
    return false;
View Full Code Here

Examples of net.minecraft.server.ChunkCoordIntPair

  public static boolean isVec(Object vec3D) {
    return vec3D instanceof Vec3D;
  }

  public static Object newPair(int x, int z) {
    return new ChunkCoordIntPair(x, z);
  }
View Full Code Here

Examples of net.minecraft.server.ChunkCoordIntPair

  public static Object newPair(int x, int z) {
    return new ChunkCoordIntPair(x, z);
  }

  public static IntVector2 getPair(Object chunkCoordIntPair) {
    ChunkCoordIntPair pair = (ChunkCoordIntPair) chunkCoordIntPair;
    return new IntVector2(pair.x, pair.z);
  }
View Full Code Here

Examples of net.minecraft.src.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);
            }
        }

        return loadArea;
View Full Code Here

Examples of net.minecraft.world.ChunkCoordIntPair

                // Split up regen so it takes at most 16 millisec per frame to allow for ~55-60 FPS
                Queue<ChunkCoordIntPair> chunksToGen = chunkRegenMap.get(dimensionId);
                long startTime = System.nanoTime();
                while(System.nanoTime() - startTime < maximumDeltaTimeNanoSecs && !chunksToGen.isEmpty()) {
                    // Regenerate chunk
                    ChunkCoordIntPair nextChunk = chunksToGen.poll();
                    if(nextChunk == null) { break; }

                    Random fmlRandom = new Random(event.world.getSeed());
                    long xSeed = fmlRandom.nextLong() >> 2 + 1L;
                    long zSeed = fmlRandom.nextLong() >> 2 + 1L;
View Full Code Here

Examples of net.minecraft.world.ChunkCoordIntPair

   
    if(!StaticUtils.WorldGen.shouldGenerateInDimension(loadEvent.world.provider.dimensionId)) {
      return;
    }
   
    ChunkCoordIntPair coordPair = loadEvent.getChunk().getChunkCoordIntPair();
    BigReactors.tickHandler.addRegenChunk(loadEvent.world.provider.dimensionId, coordPair);
  }
View Full Code Here

Examples of net.minecraft.world.ChunkCoordIntPair

                {
                    var10 = var13.chunkPosX >> 4;
                    var11 = var13.chunkPosZ >> 4;
                }

                this.structureCoords[i] = new ChunkCoordIntPair(var10, var11);
                randomNumBetween0and2PI += (Math.PI * 2D) * (double) var6 / (double) this.spread;

                if (i == this.spread)
                {
                    var6 += 2 + random.nextInt(5);
View Full Code Here

Examples of net.minecraft.world.ChunkCoordIntPair

        if(loadData.getInteger("MekanismWorldGen") == baseWorldGenVersion && loadData.getInteger("MekanismUserWorldGen") == userWorldGenVersion)
        {
          return;
        }
 
        ChunkCoordIntPair coordPair = event.getChunk().getChunkCoordIntPair();
        worldTickHandler.addRegenChunk(event.world.provider.dimensionId, coordPair);
      }
    }
  }
View Full Code Here

Examples of net.minecraft.world.ChunkCoordIntPair

        Queue<ChunkCoordIntPair> chunksToGen = chunkRegenMap.get(dimensionId);
        long startTime = System.nanoTime();
       
        while(System.nanoTime() - startTime < maximumDeltaTimeNanoSecs && !chunksToGen.isEmpty())
        {
          ChunkCoordIntPair nextChunk = chunksToGen.poll();
         
          if(nextChunk == null)
          {
            break;
          }
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.