mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-16 12:43:52 -07:00
Update CraftBukkit to Minecraft 1.4.4.
This commit is contained in:
@@ -26,7 +26,7 @@ import org.bukkit.event.server.RemoteServerCommandEvent;
|
||||
import org.bukkit.event.world.WorldSaveEvent;
|
||||
// CraftBukkit end
|
||||
|
||||
public abstract class MinecraftServer implements Runnable, IMojangStatistics, ICommandListener {
|
||||
public abstract class MinecraftServer implements ICommandListener, Runnable, IMojangStatistics {
|
||||
|
||||
public static Logger log = Logger.getLogger("Minecraft");
|
||||
private static MinecraftServer l = null;
|
||||
@@ -363,12 +363,10 @@ public abstract class MinecraftServer implements Runnable, IMojangStatistics, IC
|
||||
|
||||
log.info("Saving worlds");
|
||||
this.saveChunks(false);
|
||||
/* CraftBukkit start - handled in saveChunks
|
||||
WorldServer[] aworldserver = this.worldServer;
|
||||
int i = aworldserver.length;
|
||||
|
||||
for (int j = 0; j < i; ++j) {
|
||||
WorldServer worldserver = aworldserver[j];
|
||||
/* CraftBukkit start - handled in saveChunks
|
||||
for (int i = 0; i < this.worldServer.length; ++i) {
|
||||
WorldServer worldserver = this.worldServer[i];
|
||||
|
||||
worldserver.saveLevel();
|
||||
}
|
||||
@@ -543,7 +541,9 @@ public abstract class MinecraftServer implements Runnable, IMojangStatistics, IC
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < this.worlds.size(); ++i) {
|
||||
int i;
|
||||
|
||||
for (i = 0; i < this.worlds.size(); ++i) {
|
||||
long j = System.nanoTime();
|
||||
|
||||
// if (i == 0 || this.getAllowNether()) {
|
||||
@@ -556,14 +556,31 @@ public abstract class MinecraftServer implements Runnable, IMojangStatistics, IC
|
||||
/* Drop global time updates
|
||||
if (this.ticks % 20 == 0) {
|
||||
this.methodProfiler.a("timeSync");
|
||||
this.t.a(new Packet4UpdateTime(worldserver.getTime(), worldserver.F()), worldserver.worldProvider.dimension);
|
||||
this.t.a(new Packet4UpdateTime(worldserver.getTime(), worldserver.getDayTime()), worldserver.worldProvider.dimension);
|
||||
this.methodProfiler.b();
|
||||
}
|
||||
// CraftBukkit end */
|
||||
|
||||
this.methodProfiler.a("tick");
|
||||
worldserver.doTick();
|
||||
worldserver.tickEntities();
|
||||
|
||||
CrashReport crashreport;
|
||||
|
||||
try {
|
||||
worldserver.doTick();
|
||||
} catch (Throwable throwable) {
|
||||
crashreport = CrashReport.a(throwable, "Exception ticking world");
|
||||
worldserver.a(crashreport);
|
||||
throw new ReportedException(crashreport);
|
||||
}
|
||||
|
||||
try {
|
||||
worldserver.tickEntities();
|
||||
} catch (Throwable throwable1) {
|
||||
crashreport = CrashReport.a(throwable1, "Exception ticking world entities");
|
||||
worldserver.a(crashreport);
|
||||
throw new ReportedException(crashreport);
|
||||
}
|
||||
|
||||
this.methodProfiler.b();
|
||||
this.methodProfiler.a("tracker");
|
||||
worldserver.getTracker().updatePlayers();
|
||||
@@ -579,12 +596,9 @@ public abstract class MinecraftServer implements Runnable, IMojangStatistics, IC
|
||||
this.methodProfiler.c("players");
|
||||
this.t.tick();
|
||||
this.methodProfiler.c("tickables");
|
||||
Iterator iterator = this.p.iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
IUpdatePlayerListBox iupdateplayerlistbox = (IUpdatePlayerListBox) iterator.next();
|
||||
|
||||
iupdateplayerlistbox.a();
|
||||
for (i = 0; i < this.p.size(); ++i) {
|
||||
((IUpdatePlayerListBox) this.p.get(i)).a();
|
||||
}
|
||||
|
||||
this.methodProfiler.b();
|
||||
@@ -741,7 +755,7 @@ public abstract class MinecraftServer implements Runnable, IMojangStatistics, IC
|
||||
}
|
||||
|
||||
public String getVersion() {
|
||||
return "1.4.2";
|
||||
return "1.4.4";
|
||||
}
|
||||
|
||||
public int y() {
|
||||
@@ -829,22 +843,13 @@ public abstract class MinecraftServer implements Runnable, IMojangStatistics, IC
|
||||
}
|
||||
|
||||
public CrashReport b(CrashReport crashreport) {
|
||||
crashreport.a("Is Modded", (Callable) (new CrashReportModded(this)));
|
||||
crashreport.a("Profiler Position", (Callable) (new CrashReportProfilerPosition(this)));
|
||||
if (this.t != null) {
|
||||
crashreport.a("Player Count", (Callable) (new CrashReportPlayerCount(this)));
|
||||
crashreport.g().a("Profiler Position", (Callable) (new CrashReportProfilerPosition(this)));
|
||||
if (this.worlds != null && this.worlds.size() > 0 && this.worlds.get(0) != null) {
|
||||
crashreport.g().a("Vec3 Pool Size", (Callable) (new CrashReportVec3DPoolSize(this)));
|
||||
}
|
||||
|
||||
// CraftBukkit start
|
||||
if (this.worlds != null) {
|
||||
for (int j = 0; j < this.worlds.size(); ++j) {
|
||||
WorldServer worldserver = this.worlds.get(j);
|
||||
// CraftBukkit end
|
||||
|
||||
if (worldserver != null) {
|
||||
worldserver.a(crashreport);
|
||||
}
|
||||
}
|
||||
if (this.t != null) {
|
||||
crashreport.g().a("Player Count", (Callable) (new CrashReportPlayerCount(this)));
|
||||
}
|
||||
|
||||
return crashreport;
|
||||
@@ -1052,7 +1057,7 @@ public abstract class MinecraftServer implements Runnable, IMojangStatistics, IC
|
||||
mojangstatisticsgenerator.a("world[" + i + "][generator_name]", worlddata.getType().name());
|
||||
mojangstatisticsgenerator.a("world[" + i + "][generator_version]", Integer.valueOf(worlddata.getType().getVersion()));
|
||||
mojangstatisticsgenerator.a("world[" + i + "][height]", Integer.valueOf(this.D));
|
||||
mojangstatisticsgenerator.a("world[" + i + "][chunks_loaded]", Integer.valueOf(worldserver.H().getLoadedChunks()));
|
||||
mojangstatisticsgenerator.a("world[" + i + "][chunks_loaded]", Integer.valueOf(worldserver.I().getLoadedChunks()));
|
||||
++i;
|
||||
// } // CraftBukkit
|
||||
}
|
||||
|
Reference in New Issue
Block a user