Package net.minecraft.world

Examples of net.minecraft.world.ChunkCoordIntPair


        int z = (int) (entityPlayer.posZ / 16.0D);
        byte var5 = 6;

        for (int var6 = -var5; var6 <= var5; ++var6) {
          for (int var7 = -var5; var7 <= var5; ++var7) {
            activeChunkSet.add(new ChunkCoordIntPair(var6 + x, var7 + z));
          }
        }
      }

      profiler.endSection();
View Full Code Here


    final WorldProvider provider = this.provider;
    int updateLCG = this.updateLCG;
    // We use a random per thread - randoms are threadsafe, however it can result in some contention. See Random.nextInt - compareAndSet.
    // This reduces contention -> slightly increased performance, woo! :P
    while (true) {
      ChunkCoordIntPair chunkCoordIntPair;
      synchronized (chunkCoordIterator) {
        if (!chunkCoordIterator.hasNext()) {
          break;
        }
        try {
View Full Code Here

    int x = MathHelper.floor_double(entity.posX);
    int z = MathHelper.floor_double(entity.posZ);
    boolean periodicUpdate = forcedUpdateCount++ % 32 == 0;
    Boolean isForced_ = entity.isForced;
    if (isForced_ == null || periodicUpdate) {
      entity.isForced = isForced_ = getPersistentChunks().containsKey(new ChunkCoordIntPair(x >> 4, z >> 4));
    }
    boolean isForced = isForced_;
    Boolean canUpdate_ = entity.canUpdate;
    if (canUpdate_ == null || periodicUpdate) {
      byte range = isForced ? (byte) 0 : 48;
View Full Code Here

    chunkCache = CacheBuilder.newBuilder().maximumSize(cacheSize = TickThreading.instance.chunkCacheSize).build();
    regionFileCache = new RegionFileCache(chunkSaveLocation);
  }

  public boolean chunkExists(World world, int i, int j) {
    ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(i, j);

    synchronized (this.syncLockObject) {
      if (pendingSaves.containsKey(chunkcoordintpair)) {
        return true;
      }
View Full Code Here

  @Override
  @Declare
  public NBTTagCompound readChunkNBT(World world, int x, int z, boolean readOnly) {
    NBTTagCompound nbtTagCompound;
    ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(x, z);

    synchronized (this.syncLockObject) {
      AnvilChunkLoaderPending pendingchunktosave = pendingSaves.get(chunkcoordintpair);

      long key = key(x, z);
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.