Examples of ChunkCoordIntPair


Examples of net.minecraft.world.ChunkCoordIntPair

        ImmutableSetMultimap<ChunkCoordIntPair, Ticket> newMap = ImmutableSetMultimap.<ChunkCoordIntPair,Ticket>builder().putAll(forcedChunks.get(ticket.world)).put(chunk, ticket).build();
        forcedChunks.put(ticket.world, newMap);
        if (ticket.maxDepth > 0 && ticket.requestedChunks.size() > ticket.maxDepth)
        {
            ChunkCoordIntPair removed = ticket.requestedChunks.iterator().next();
            unforceChunk(ticket,removed);
        }
    }
View Full Code Here

Examples of net.minecraft.world.ChunkCoordIntPair

    if(!MainProxy.isServer()) {
      System.err.println("sendPacketToAllWatchingChunk called clientside !");
      new Exception().printStackTrace();
      return;
    }
    ChunkCoordIntPair chunk = new ChunkCoordIntPair(X >> 4, Z >> 4);
    PlayerCollectionList players = LogisticsEventListener.watcherList.get(chunk);
    if(players != null) {
      for(EntityPlayer player:players.players()) {
        if(MainProxy.getDimensionForWorld(player.worldObj) == dimensionId) {
          sendPacketToPlayer(packet, player);
View Full Code Here

Examples of net.minecraft.world.ChunkCoordIntPair

      }
      return;
    }

    AELog.info( "New Ticket " + ct.toString() );
    ForgeChunkManager.forceChunk( ct, new ChunkCoordIntPair( xCoord >> 4, zCoord >> 4 ) );
  }
View Full Code Here

Examples of net.minecraft.world.ChunkCoordIntPair

        int zStart = Math.min(zChunkA, zChunkB);
        int zEnd = Math.max(zChunkA, zChunkB);

        for (int xx = xStart; xx <= xEnd; xx++) {
            for (int zz = zStart; zz <= zEnd; zz++) {
                chunkList.add(new ChunkCoordIntPair(xx, zz));
                if (chunkList.size() >= max) {
                    return chunkList;
                }
            }
        }
View Full Code Here

Examples of net.minecraft.world.ChunkCoordIntPair

     */
    public Set<ChunkCoordIntPair> getChunksAround(int xChunk, int zChunk, int radius) {
        Set<ChunkCoordIntPair> chunkList = new HashSet<ChunkCoordIntPair>();
        for (int xx = xChunk - radius; xx <= xChunk + radius; xx++) {
            for (int zz = zChunk - radius; zz <= zChunk + radius; zz++) {
                chunkList.add(new ChunkCoordIntPair(xx, zz));
            }
        }
        return chunkList;
    }
View Full Code Here

Examples of net.minecraft.world.ChunkCoordIntPair

        int maxZ = (zWorld + radius) >> 4;

        Set<ChunkCoordIntPair> chunkList = new HashSet<ChunkCoordIntPair>();
        for (int xx = minX; xx <= maxX; xx++) {
            for (int zz = minZ; zz <= maxZ; zz++) {
                chunkList.add(new ChunkCoordIntPair(xx, zz));
            }
        }
        return chunkList;
    }
View Full Code Here

Examples of net.minecraft.world.ChunkCoordIntPair

        for (ChunkCoordIntPair chunk : chunks) {
            ForgeChunkManager.forceChunk(ticket, chunk);
            ForgeChunkManager.reorderChunk(ticket, chunk);
        }

        ChunkCoordIntPair myChunk = new ChunkCoordIntPair(xChunk, zChunk);
        ForgeChunkManager.forceChunk(ticket, myChunk);
        ForgeChunkManager.reorderChunk(ticket, myChunk);
    }
View Full Code Here

Examples of net.minecraft.world.ChunkCoordIntPair

      return;
    }
    chunkTicket.getModData().setInteger("quarryX", xCoord);
    chunkTicket.getModData().setInteger("quarryY", yCoord);
    chunkTicket.getModData().setInteger("quarryZ", zCoord);
    ForgeChunkManager.forceChunk(chunkTicket, new ChunkCoordIntPair(xCoord >> 4, zCoord >> 4));

    IAreaProvider a = null;

    if (!useDefault) {
      a = Utils.getNearbyAreaProvider(worldObj, xCoord, yCoord, zCoord);
View Full Code Here

Examples of net.minecraft.world.ChunkCoordIntPair

      chunkTicket = ticket;
    }

    Set<ChunkCoordIntPair> chunks = Sets.newHashSet();
    isAlive = true;
    ChunkCoordIntPair quarryChunk = new ChunkCoordIntPair(xCoord >> 4, zCoord >> 4);
    chunks.add(quarryChunk);
    ForgeChunkManager.forceChunk(ticket, quarryChunk);

    for (int chunkX = box.xMin >> 4; chunkX <= box.xMax >> 4; chunkX++) {
      for (int chunkZ = box.zMin >> 4; chunkZ <= box.zMax >> 4; chunkZ++) {
        ChunkCoordIntPair chunk = new ChunkCoordIntPair(chunkX, chunkZ);
        ForgeChunkManager.forceChunk(ticket, chunk);
        chunks.add(chunk);
      }
    }
View Full Code Here

Examples of net.minecraft.world.ChunkCoordIntPair

    if (!entityPlayerMP.loadedChunks.isEmpty()) {
      ArrayList<ChunkCoordIntPair> unpopulatedChunks = new ArrayList<ChunkCoordIntPair>();
      ArrayList<Chunk> chunks = new ArrayList<Chunk>(5);
      ArrayList<TileEntity> tileEntities = new ArrayList<TileEntity>();
      synchronized (entityPlayerMP.loadedChunks) {
        ChunkCoordIntPair chunkCoordIntPair;

        while (chunks.size() < 5 && (chunkCoordIntPair = (ChunkCoordIntPair) entityPlayerMP.loadedChunks.remove(0)) != null) {
          int x = chunkCoordIntPair.chunkXPos;
          int z = chunkCoordIntPair.chunkZPos;
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.