Package nallar.tickthreading.minecraft.tickregion

Examples of nallar.tickthreading.minecraft.tickregion.TickRegion


  public void queueForRemoval(TickRegion tickRegion) {
    removalQueue.add(tickRegion);
  }

  private void processChanges() {
    TickRegion tickRegion;
    while ((tickRegion = removalQueue.poll()) != null) {
      if (tickRegion.isEmpty()) {
        synchronized (tickRegions) {
          if ((tickRegion instanceof EntityTickRegion ? entityCallables.remove(tickRegion.hashCode) : tileEntityCallables.remove(tickRegion.hashCode)) == tickRegion) {
            tickRegions.remove(tickRegion);
            tickRegion.onRemove();
          }
        }
      }
    }
  }
View Full Code Here


      }
      if (!entityTickProfiler.startProfiling(new Runnable() {
        @Override
        public void run() {
          if (location) {
            TickRegion tickRegion = manager.getEntityRegion(hashCode);
            if (tickRegion != null) {
              tickRegion.profilingEnabled = false;
            }
            tickRegion = manager.getTileEntityRegion(hashCode);
            if (tickRegion != null) {
              tickRegion.profilingEnabled = false;
            }
          }
          sendChat(commandSender, entityTickProfiler.writeStringData(new TableFormatter(commandSender)).toString());
        }
      }, location ? ProfilingState.CHUNK : ProfilingState.GLOBAL, time, worlds)) {
        sendChat(commandSender, "Someone else is currently profiling.");
      }
      if (location) {
        manager.profilingEnabled = false;
        TickRegion tickRegion = manager.getEntityRegion(hashCode);
        if (tickRegion != null) {
          tickRegion.profilingEnabled = true;
        }
        tickRegion = manager.getTileEntityRegion(hashCode);
        if (tickRegion != null) {
View Full Code Here

TOP

Related Classes of nallar.tickthreading.minecraft.tickregion.TickRegion

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.