Examples of NextTickListEntry


Examples of com.mojang.minecraft.level.NextTickListEntry

      int var7;
      if(this.tickCount % 5 == 0) {
         var6 = this.tickList.size();

         for(var7 = 0; var7 < var6; ++var7) {
            NextTickListEntry var8;
            if((var8 = (NextTickListEntry)this.tickList.remove(0)).ticks > 0) {
               --var8.ticks;
               this.tickList.add(var8);
            } else {
               byte var9;
View Full Code Here

Examples of com.mojang.minecraft.level.NextTickListEntry

      return false;
   }

   public void addToTickNextTick(int var1, int var2, int var3, int var4) {
      if(!this.networkMode) {
         NextTickListEntry var5 = new NextTickListEntry(var1, var2, var3, var4);
         if(var4 > 0) {
            var3 = Block.blocks[var4].getTickDelay();
            var5.ticks = var3;
         }
View Full Code Here

Examples of net.minecraft.world.NextTickListEntry

        List list = world.getPendingBlockUpdates( c, false );
        if ( list != null )
        {
          for (Object o : list)
          {
            NextTickListEntry entry = (NextTickListEntry) o;
            if ( entry.xCoord >= minX && entry.xCoord <= maxX && entry.yCoord >= minY && entry.yCoord <= maxY && entry.zCoord >= minZ
                && entry.zCoord <= maxZ )
            {
              NextTickListEntry newEntry = new NextTickListEntry( entry.xCoord, entry.yCoord, entry.zCoord, entry.func_151351_a() );
              newEntry.scheduledTime = entry.scheduledTime - k;
              ticks.add( newEntry );
            }
          }
        }
View Full Code Here

Examples of net.minecraft.world.NextTickListEntry

    TreeHashSet<NextTickListEntry> pendingTickListEntries = this.pendingTickListEntries;
    Iterator<NextTickListEntry> nextTickListEntryIterator = pendingTickListEntries.concurrentIterator();
    int[] blockFrequencies = new int[4096];

    while (nextTickListEntryIterator.hasNext()) {
      NextTickListEntry tickListEntry = nextTickListEntryIterator.next();

      int blockId = getBlockIdWithoutLoad(tickListEntry.xCoord, tickListEntry.yCoord, tickListEntry.zCoord);
      blockFrequencies[blockId == -1 ? 0 : blockId]++;
    }
View Full Code Here

Examples of net.minecraft.world.NextTickListEntry

    int maxCZ = minCZ + 16;
    TreeHashSet<NextTickListEntry> pendingTickListEntries = this.pendingTickListEntries;
    Iterator<NextTickListEntry> nextTickListEntryIterator = pendingTickListEntries.concurrentIterator();

    while (nextTickListEntryIterator.hasNext()) {
      NextTickListEntry var10 = nextTickListEntryIterator.next();

      if (var10.xCoord >= minCX && var10.xCoord < maxCX && var10.zCoord >= minCZ && var10.zCoord < maxCZ) {
        if (var3 == null) {
          var3 = new ArrayList<NextTickListEntry>();
        }
View Full Code Here

Examples of net.minecraft.world.NextTickListEntry

    return var3;
  }

  @Override
  public void scheduleBlockUpdateWithPriority(int x, int y, int z, int blockID, int timeOffset, int par6) {
    NextTickListEntry nextTickListEntry = new NextTickListEntry(x, y, z, blockID);
    //boolean isForced = getPersistentChunks().containsKey(new ChunkCoordIntPair(nextTickListEntry.xCoord >> 4, nextTickListEntry.zCoord >> 4));
    //byte range = isForced ? (byte) 0 : 8;
    // Removed in Forge for now.
    // byte range = 0;

    if (blockID > 0 && timeOffset <= 20 && worldGenInProgress.get() == Boolean.TRUE && inImmediateBlockUpdate.get() == Boolean.FALSE) {
      if (Block.blocksList[blockID].func_82506_l()) {
        // Not needed currently due to forge change removal.
        // if (this.checkChunksExist(x - range, y - range, z - range, x + range, y + range, z + range)) {
        if (this.chunkExists(x >> 4, z >> 4)) {
          int realBlockID = this.getBlockIdWithoutLoad(nextTickListEntry.xCoord, nextTickListEntry.yCoord, nextTickListEntry.zCoord);

          if (realBlockID > 0 && realBlockID == nextTickListEntry.blockID) {
            inImmediateBlockUpdate.set(true);
            try {
              Block.blocksList[realBlockID].updateTick(this, nextTickListEntry.xCoord, nextTickListEntry.yCoord, nextTickListEntry.zCoord, this.rand);
            } finally {
              inImmediateBlockUpdate.set(false);
            }
          }
        }

        return;
      }

      timeOffset = 1;
    }

    // if (this.checkChunksExist(x - range, y - range, z - range, x + range, y + range, z + range)) {
    if (this.chunkExists(x >> 4, z >> 4)) {
      if (blockID > 0) {
        nextTickListEntry.setScheduledTime((long) timeOffset + worldInfo.getWorldTotalTime());
        nextTickListEntry.setPriority(par6);
      }

      pendingTickListEntries.add(nextTickListEntry);
    }
  }
View Full Code Here

Examples of net.minecraft.world.NextTickListEntry

    }
  }

  @Override
  public void scheduleBlockUpdateFromLoad(int x, int y, int z, int blockID, int timeOffset, int par6) {
    NextTickListEntry nextTickListEntry = new NextTickListEntry(x, y, z, blockID);
    nextTickListEntry.setPriority(par6);

    if (blockID > 0) {
      nextTickListEntry.setScheduledTime((long) timeOffset + worldInfo.getWorldTotalTime());
    }

    pendingTickListEntries.add(nextTickListEntry);
  }
View Full Code Here

Examples of net.minecraft.world.NextTickListEntry

      runningTickListEntries = new ArrayList<NextTickListEntry>(Math.min(lastTickEntries, max));

      final long worldTime = worldInfo.getWorldTotalTime();

      for (int i = 0; i < max; ++i) {
        NextTickListEntry nextTickListEntry = (NextTickListEntry) pendingTickListEntries.first();

        if (!runAll && nextTickListEntry.scheduledTime > worldTime) {
          break;
        }
View Full Code Here

Examples of net.minecraft.world.NextTickListEntry

    if (list != null) {
      long k = par2World.getTotalWorldTime();
      NBTTagList nbttaglist3 = new NBTTagList();

      for (final Object aList : list) {
        NextTickListEntry nextticklistentry = (NextTickListEntry) aList;
        NBTTagCompound nbttagcompound2 = new NBTTagCompound();
        nbttagcompound2.setInteger("i", nextticklistentry.blockID);
        nbttagcompound2.setInteger("x", nextticklistentry.xCoord);
        nbttagcompound2.setInteger("y", nextticklistentry.yCoord);
        nbttagcompound2.setInteger("z", nextticklistentry.zCoord);
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.