Commits

md_5 authored 5be2ddcbd57
Replace version constants with methods to prevent compiler inlining
No tags

nms-patches/ItemStack.patch

Modified
33 33 + public void convertStack() {
34 34 + if (false && MinecraftServer.getServer() != null) { // Skip for now, causes more issues than it solves
35 35 + // Don't convert some things - both the old and new data values are valid
36 36 + // Conversion would make getting then impossible
37 37 + if (this.item == Blocks.PUMPKIN.getItem() || this.item == Blocks.GRASS.getItem() || this.item == Blocks.SNOW.getItem()) {
38 38 + return;
39 39 + }
40 40 +
41 41 + NBTTagCompound savedStack = new NBTTagCompound();
42 42 + this.save(savedStack);
43 -+ savedStack = (NBTTagCompound) MinecraftServer.getServer().dataConverterManager.update(DataConverterTypes.ITEM_STACK, new Dynamic(DynamicOpsNBT.a, savedStack), -1, CraftMagicNumbers.DATA_VERSION).getValue();
43 ++ savedStack = (NBTTagCompound) MinecraftServer.getServer().dataConverterManager.update(DataConverterTypes.ITEM_STACK, new Dynamic(DynamicOpsNBT.a, savedStack), -1, CraftMagicNumbers.INSTANCE.getDataVersion()).getValue();
44 44 + this.load(savedStack);
45 45 + }
46 46 + }
47 47 +
48 48 private void E() {
49 49 + if (this.h && this == ItemStack.a) throw new AssertionError("TRAP"); // CraftBukkit
50 50 this.h = false;
51 51 this.h = this.isEmpty();
52 52 }
53 53

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut