mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 07:48:53 +01:00
31 lines
1.2 KiB
Diff
31 lines
1.2 KiB
Diff
--- a/net/minecraft/server/TickListServer.java
|
|
+++ b/net/minecraft/server/TickListServer.java
|
|
@@ -39,11 +39,17 @@
|
|
public void b() {
|
|
int i = this.nextTickList.size();
|
|
|
|
- if (i != this.nextTickListHash.size()) {
|
|
+ if (false) { // CraftBukkit
|
|
throw new IllegalStateException("TickNextTick list out of synch");
|
|
} else {
|
|
if (i > 65536) {
|
|
- i = 65536;
|
|
+ // CraftBukkit start - If the server has too much to process over time, try to alleviate that
|
|
+ if (i > 20 * 65536) {
|
|
+ i = i / 20;
|
|
+ } else {
|
|
+ i = 65536;
|
|
+ }
|
|
+ // CraftBukkit end
|
|
}
|
|
|
|
ChunkProviderServer chunkproviderserver = this.f.getChunkProvider();
|
|
@@ -82,7 +88,7 @@
|
|
throw new ReportedException(crashreport);
|
|
}
|
|
} else {
|
|
- this.a(nextticklistentry.a, nextticklistentry.b(), 0);
|
|
+ this.a(nextticklistentry.a, (T) nextticklistentry.b(), 0); // CraftBukkit - decompile error
|
|
}
|
|
}
|
|
|