本文整理匯總了Java中net.minecraft.world.WorldServer.addWorldInfoToCrashReport方法的典型用法代碼示例。如果您正苦於以下問題:Java WorldServer.addWorldInfoToCrashReport方法的具體用法?Java WorldServer.addWorldInfoToCrashReport怎麽用?Java WorldServer.addWorldInfoToCrashReport使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類net.minecraft.world.WorldServer
的用法示例。
在下文中一共展示了WorldServer.addWorldInfoToCrashReport方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: updateTimeLightAndEntities
import net.minecraft.world.WorldServer; //導入方法依賴的package包/類
public void updateTimeLightAndEntities()
{
this.theProfiler.startSection("jobs");
synchronized (this.futureTaskQueue)
{
while (!this.futureTaskQueue.isEmpty())
{
Util.func_181617_a((FutureTask)this.futureTaskQueue.poll(), logger);
}
}
this.theProfiler.endStartSection("levels");
for (int j = 0; j < this.worldServers.length; ++j)
{
long i = System.nanoTime();
if (j == 0 || this.getAllowNether())
{
WorldServer worldserver = this.worldServers[j];
this.theProfiler.startSection(worldserver.getWorldInfo().getWorldName());
if (this.tickCounter % 20 == 0)
{
this.theProfiler.startSection("timeSync");
this.serverConfigManager.sendPacketToAllPlayersInDimension(new S03PacketTimeUpdate(worldserver.getTotalWorldTime(), worldserver.getWorldTime(), worldserver.getGameRules().getBoolean("doDaylightCycle")), worldserver.provider.getDimensionId());
this.theProfiler.endSection();
}
this.theProfiler.startSection("tick");
try
{
worldserver.tick();
}
catch (Throwable throwable1)
{
CrashReport crashreport = CrashReport.makeCrashReport(throwable1, "Exception ticking world");
worldserver.addWorldInfoToCrashReport(crashreport);
throw new ReportedException(crashreport);
}
try
{
worldserver.updateEntities();
}
catch (Throwable throwable)
{
CrashReport crashreport1 = CrashReport.makeCrashReport(throwable, "Exception ticking world entities");
worldserver.addWorldInfoToCrashReport(crashreport1);
throw new ReportedException(crashreport1);
}
this.theProfiler.endSection();
this.theProfiler.startSection("tracker");
worldserver.getEntityTracker().updateTrackedEntities();
this.theProfiler.endSection();
this.theProfiler.endSection();
}
this.timeOfLastDimensionTick[j][this.tickCounter % 100] = System.nanoTime() - i;
}
this.theProfiler.endStartSection("connection");
this.getNetworkSystem().networkTick();
this.theProfiler.endStartSection("players");
this.serverConfigManager.onTick();
this.theProfiler.endStartSection("tickables");
for (int k = 0; k < this.playersOnline.size(); ++k)
{
((ITickable)this.playersOnline.get(k)).update();
}
this.theProfiler.endSection();
}
示例2: updateTimeLightAndEntities
import net.minecraft.world.WorldServer; //導入方法依賴的package包/類
public void updateTimeLightAndEntities()
{
this.theProfiler.startSection("jobs");
synchronized (this.futureTaskQueue)
{
while (!this.futureTaskQueue.isEmpty())
{
Util.runTask((FutureTask)this.futureTaskQueue.poll(), LOG);
}
}
this.theProfiler.endStartSection("levels");
for (int j = 0; j < this.worldServers.length; ++j)
{
long i = System.nanoTime();
if (j == 0 || this.getAllowNether())
{
WorldServer worldserver = this.worldServers[j];
this.theProfiler.startSection(worldserver.getWorldInfo().getWorldName());
if (this.tickCounter % 20 == 0)
{
this.theProfiler.startSection("timeSync");
this.playerList.sendPacketToAllPlayersInDimension(new SPacketTimeUpdate(worldserver.getTotalWorldTime(), worldserver.getWorldTime(), worldserver.getGameRules().getBoolean("doDaylightCycle")), worldserver.provider.getDimensionType().getId());
this.theProfiler.endSection();
}
this.theProfiler.startSection("tick");
try
{
worldserver.tick();
}
catch (Throwable throwable1)
{
CrashReport crashreport = CrashReport.makeCrashReport(throwable1, "Exception ticking world");
worldserver.addWorldInfoToCrashReport(crashreport);
throw new ReportedException(crashreport);
}
try
{
worldserver.updateEntities();
}
catch (Throwable throwable)
{
CrashReport crashreport1 = CrashReport.makeCrashReport(throwable, "Exception ticking world entities");
worldserver.addWorldInfoToCrashReport(crashreport1);
throw new ReportedException(crashreport1);
}
this.theProfiler.endSection();
this.theProfiler.startSection("tracker");
worldserver.getEntityTracker().updateTrackedEntities();
this.theProfiler.endSection();
this.theProfiler.endSection();
}
this.timeOfLastDimensionTick[j][this.tickCounter % 100] = System.nanoTime() - i;
}
this.theProfiler.endStartSection("connection");
this.getNetworkSystem().networkTick();
this.theProfiler.endStartSection("players");
this.playerList.onTick();
this.theProfiler.endStartSection("tickables");
for (int k = 0; k < this.tickables.size(); ++k)
{
((ITickable)this.tickables.get(k)).update();
}
this.theProfiler.endSection();
}