From 2de0795a8ec433718ba1ac8749222ea4da3e6617 Mon Sep 17 00:00:00 2001 From: KAMKEEL <28842281+KAMKEEL@users.noreply.github.com> Date: Tue, 11 Aug 2026 06:07:58 -0400 Subject: [PATCH] Keep the pBurnItem migration on revision 23 Revision 23 never shipped without the burn flag - it released together with it - so no saved NPC carries version 23 from a build that lacked pBurnItem. The migration belongs in the < 23 gate, and bumping ModRev would only force a redundant pass over every NPC. --- .../noppes/npcs/VersionCompatibility.java | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/main/java/noppes/npcs/VersionCompatibility.java b/src/main/java/noppes/npcs/VersionCompatibility.java index 460d240e3..ee81b2012 100644 --- a/src/main/java/noppes/npcs/VersionCompatibility.java +++ b/src/main/java/noppes/npcs/VersionCompatibility.java @@ -14,26 +14,26 @@ import java.util.Collection; import java.util.List; public class VersionCompatibility { - public static int ModRev = 24; + public static int ModRev = 23; 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"); compound.setInteger("AimType", !aimShot ? 0 : 1); } + + // 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. Shipped alongside revision 23, so anything already + // at 23 was written by a build that had the flag. + if (compound.hasKey("pEffect") && !compound.hasKey("pBurnItem")) { + if (EnumPotionType.fromOrdinal(compound.getInteger("pEffect")) == EnumPotionType.Fire) { + compound.setBoolean("pBurnItem", true); + } + } } if (npc.npcVersion < 22) { if (compound.hasKey("CanLeap")) {