示例#1
0
 public void onTick() {
   tick++;
   Configuration.onTick();
   getHandle().mcProfiler.startSection("httpdownloads");
   FileDownloadThread.getInstance().onTick();
   getHandle().mcProfiler.endStartSection("packet_decompression");
   PacketDecompressionThread.onTick();
   getHandle().mcProfiler.endStartSection("widgets");
   enableSandbox();
   player.getMainScreen().onTick();
   disableSandbox();
   getHandle().mcProfiler.endStartSection("mipmapping");
   MipMapUtils.onTick();
   getHandle().mcProfiler.endStartSection("special_effects");
   if (Minecraft.theMinecraft.theWorld != null) {
     Minecraft.theMinecraft.theWorld.doColorfulStuff();
     inWorldTicks++;
   }
   getHandle().mcProfiler.endStartSection("entity_info");
   if (isSpoutEnabled()) {
     LinkedList<org.spoutcraft.api.entity.Entity> processed =
         new LinkedList<org.spoutcraft.api.entity.Entity>();
     Iterator<Entity> i = Entity.toProcess.iterator();
     while (i.hasNext()) {
       Entity next = i.next();
       if (next.spoutEntity != null) {
         processed.add(next.spoutEntity);
       }
     }
     Entity.toProcess.clear();
     if (processed.size() > 0) {
       getPacketManager().sendSpoutPacket(new PacketEntityInformation(processed));
     }
   }
   getHandle().mcProfiler.endSection();
 }