Skip to content

Commit

Permalink
Fix CB watchdog, fail early if it breaks
Browse files Browse the repository at this point in the history
  • Loading branch information
octylFractal committed Jun 11, 2022
1 parent a7ab49a commit 3433e40
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -963,8 +963,11 @@ private static class MojangWatchdog implements Watchdog {
MojangWatchdog(DedicatedServer server) throws NoSuchFieldException {
this.server = server;
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);
this.tickField = tickField;
}
Expand Down

0 comments on commit 3433e40

Please sign in to comment.