From fab1062ce82308e6da9221ad41b111ed3dc4cfd9 Mon Sep 17 00:00:00 2001 From: KAMKEEL <28842281+KAMKEEL@users.noreply.github.com> Date: Tue, 11 Aug 2026 05:52:30 -0400 Subject: [PATCH] Bump ModRev so the pBurnItem migration can run The migration sat in the npcVersion < 17 block, but ModRev has been 23 since 2023 and CheckNpcCompatibility returns early when the save already matches it - so every NPC affected by the regression was skipped. Moved to a < 24 block and bumped ModRev to 24 so it actually reaches them. --- .../noppes/npcs/VersionCompatibility.java | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/main/java/noppes/npcs/VersionCompatibility.java b/src/main/java/noppes/npcs/VersionCompatibility.java index 12562f15b..460d240e3 100644 --- a/src/main/java/noppes/npcs/VersionCompatibility.java +++ b/src/main/java/noppes/npcs/VersionCompatibility.java @@ -14,11 +14,21 @@ import java.util.Collection; import java.util.List; public class VersionCompatibility { - public static int ModRev = 23; + public static int ModRev = 24; public static void CheckNpcCompatibility(EntityNPCInterface npc, NBTTagCompound compound) { if (npc.npcVersion == ModRev) return; + if (npc.npcVersion < 24) { + // Fire projectiles used to ignite unconditionally. The ignite check now also requires + // pBurnItem, which reads false when the key is absent, so restore it for anything + // saved before the flag existed. + if (compound.hasKey("pEffect") && !compound.hasKey("pBurnItem")) { + if (EnumPotionType.fromOrdinal(compound.getInteger("pEffect")) == EnumPotionType.Fire) { + compound.setBoolean("pBurnItem", true); + } + } + } if (npc.npcVersion < 23) { if (compound.hasKey("AimWhileShooting")) { boolean aimShot = compound.getBoolean("AimWhileShooting"); @@ -50,14 +60,6 @@ public class VersionCompatibility { if (compound.hasKey("DialogDarkenScreen")) { compound.removeTag("DialogDarkenScreen"); } - - if (compound.hasKey("pEffect")) { - int effect = compound.getInteger("pEffect"); - EnumPotionType enumPotionType = EnumPotionType.fromOrdinal(effect); - if (!compound.hasKey("pBurnItem") && enumPotionType == EnumPotionType.Fire) { - compound.setBoolean("pBurnItem", true); - } - } } if (npc.npcVersion < 12) { CompatabilityFix(compound, npc.advanced.writeToNBT(new NBTTagCompound()));