chore: Update upstream

3433e40 Fix CB watchdog, fail early if it breaks
This commit is contained in:
Alexander Brandes 2022-06-13 15:09:24 +02:00
parent 99a57f31b2
commit a6b1b411d5
No known key found for this signature in database
GPG Key ID: 158F5701A6AAD00C

View File

@ -963,8 +963,11 @@ public final class PaperweightAdapter implements BukkitImplAdapter<net.minecraft
MojangWatchdog(DedicatedServer server) throws NoSuchFieldException { MojangWatchdog(DedicatedServer server) throws NoSuchFieldException {
this.server = server; this.server = server;
Field tickField = MinecraftServer.class.getDeclaredField( Field tickField = MinecraftServer.class.getDeclaredField(
Refraction.pickName("nextTickTime", "ao") Refraction.pickName("nextTickTime", "ag")
); );
if (tickField.getType() != long.class) {
throw new IllegalStateException("nextTickTime is not a long field, mapping is likely incorrect");
}
tickField.setAccessible(true); tickField.setAccessible(true);
this.tickField = tickField; this.tickField = tickField;
} }