Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/main/java/noppes/npcs/VersionCompatibility.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagInt;
import net.minecraft.nbt.NBTTagList;
import noppes.npcs.constants.EnumPotionType;
import noppes.npcs.controllers.data.Line;
import noppes.npcs.controllers.data.Lines;
import noppes.npcs.entity.EntityNPCInterface;
Expand Down Expand Up @@ -49,6 +50,14 @@ public static void CheckNpcCompatibility(EntityNPCInterface npc, NBTTagCompound
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()));
Expand Down
Loading