mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-01 12:42:05 -07:00
Replace version constants with methods to prevent compiler inlining
This commit is contained in:
@@ -40,7 +40,7 @@
|
||||
+
|
||||
+ NBTTagCompound savedStack = new NBTTagCompound();
|
||||
+ this.save(savedStack);
|
||||
+ savedStack = (NBTTagCompound) MinecraftServer.getServer().dataConverterManager.update(DataConverterTypes.ITEM_STACK, new Dynamic(DynamicOpsNBT.a, savedStack), -1, CraftMagicNumbers.DATA_VERSION).getValue();
|
||||
+ savedStack = (NBTTagCompound) MinecraftServer.getServer().dataConverterManager.update(DataConverterTypes.ITEM_STACK, new Dynamic(DynamicOpsNBT.a, savedStack), -1, CraftMagicNumbers.INSTANCE.getDataVersion()).getValue();
|
||||
+ this.load(savedStack);
|
||||
+ }
|
||||
+ }
|
||||
|
@@ -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());
|
||||
|
Reference in New Issue
Block a user