Package net.minecraft.world

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


   
    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

                {
                    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

        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

        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

    }

    public static void forceChunk(Ticket ticket, World world, int x, int y, int z, String playerName)
    {
        ChunkLoadingCallback.addToList(world, x, y, z, playerName);
        ChunkCoordIntPair chunkPos = new ChunkCoordIntPair(x >> 4, z >> 4);
        ForgeChunkManager.forceChunk(ticket, chunkPos);
        //
        // TileEntity tile = world.getTileEntity(x, y, z);
        //
        // if (tile instanceof IChunkLoader)
View Full Code Here

                        Block block = this.worldObj.getBlock(coords.posX, coords.posY, coords.posZ);

                        if (block != GCBlocks.landingPadFull)
                        {
                            this.connectedPads.remove(i);
                            ForgeChunkManager.unforceChunk(this.chunkLoadTicket, new ChunkCoordIntPair(coords.posX >> 4, coords.posZ >> 4));
                        }
                    }
                }
            }
        }
View Full Code Here

                {
                    ArrayList<EntityPlayerMP> copy = new ArrayList<EntityPlayerMP>(playersRequestingMapData);
                    for (EntityPlayerMP playerMP : copy)
                    {
                        GCPlayerStats stats = GCPlayerStats.get(playerMP);
                        ChunkCoordIntPair chunkCoordIntPair = new ChunkCoordIntPair((int)Math.floor(stats.coordsTeleportedFromX) >> 4, (int)Math.floor(stats.coordsTeleportedFromZ) >> 4);
                        BufferedImage image = new BufferedImage(400, 400, BufferedImage.TYPE_INT_RGB);

                        for (int x0 = -12; x0 <= 12; x0++)
                        {
                            for (int z0 = -12; z0 <= 12; z0++)
View Full Code Here

                pendingcoords = (Set<?>)pendingAnvilChunksCoordinates.get(acl);
            }
            Object synclock = syncLockObject.get(acl);

            NBTTagCompound rslt = null;
            ChunkCoordIntPair coord = new ChunkCoordIntPair(x, z);

            synchronized (synclock) {
                if (pendingAnvilChunksMCPC != null) {
                    Object rec = pendingsavesmcpc.get(coord);
                    if(rec != null) {
                        if (chunkCoord == null) {
                            Field[] f = rec.getClass().getDeclaredFields();
                            for(Field ff : f) {
                                if((chunkCoord == null) && (ff.getType().equals(ChunkCoordIntPair.class))) {
                                    chunkCoord = ff;
                                }
                                else if((nbtTag == null) && (ff.getType().equals(NBTTagCompound.class))) {
                                    nbtTag = ff;
                                }
                            }
                        }
                        rslt = (NBTTagCompound)nbtTag.get(rec);
                    }
                }
                else {
                    if (pendingcoords.contains(coord)) {
                        for (int i = 0; i < chunkstoremove.size(); i++) {
                            Object o = chunkstoremove.get(i);
                            if (chunkCoord == null) {
                                Field[] f = o.getClass().getDeclaredFields();
                                for(Field ff : f) {
                                    if((chunkCoord == null) && (ff.getType().equals(ChunkCoordIntPair.class))) {
                                        chunkCoord = ff;
                                    }
                                    else if((nbtTag == null) && (ff.getType().equals(NBTTagCompound.class))) {
                                        nbtTag = ff;
                                    }
                                }
                            }
                            ChunkCoordIntPair occ = (ChunkCoordIntPair)chunkCoord.get(o);

                            if (occ.equals(coord)) {
                                rslt = (NBTTagCompound)nbtTag.get(o);
                                break;
                            }
                        }
                    }
View Full Code Here

                wbr.ticket = t;
            else
                wbr.ticket = ForgeChunkManager.requestTicket(DynmapMod.instance, w, ForgeChunkManager.Type.NORMAL);
            if(wbr.ticket != null) {
                ChunkCoordinates cc = w.getSpawnPoint();
                ChunkCoordIntPair ccip = new ChunkCoordIntPair(cc.posX >> 4, cc.posZ >> 4);
                ForgeChunkManager.forceChunk(wbr.ticket, ccip);
                busy_worlds.put(w.provider.dimensionId, wbr)// Add to busy list
            }
        }
        wbr.last_ts = System.nanoTime();
View Full Code Here

TOP

Related Classes of net.minecraft.world.ChunkCoordIntPair

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.