Replace version constants with methods to prevent compiler inlining

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2018-12-30 16:00:31 +11:00
parent adabfc807a
commit 92b2d3a400
4 changed files with 9 additions and 6 deletions

View File

@@ -24,7 +24,7 @@
nbttagcompound2.setBoolean("Snapshot", false);
nbttagcompound.set("Version", nbttagcompound2);
nbttagcompound.setInt("DataVersion", 1631);
+ if (org.bukkit.craftbukkit.util.CraftMagicNumbers.DATA_VERSION != 1631) throw new AssertionError(); // CraftBukkit - sentinel
+ if (org.bukkit.craftbukkit.util.CraftMagicNumbers.INSTANCE.getDataVersion() != 1631) throw new AssertionError(); // CraftBukkit - sentinel
nbttagcompound.setLong("RandomSeed", this.e);
nbttagcompound.setString("generatorName", this.f.b());
nbttagcompound.setInt("generatorVersion", this.f.getVersion());