mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-13 21:54:08 +00:00
Fix pEffect legacy Compatibility
This commit is contained in:
1 parent
b2c279feeb
commit
07a914272a
1 file changed
+9
@@ -4,6 +4,7 @@ import net.minecraft.nbt.NBTBase;
|
||||
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;
|
||||
@@ -49,6 +50,14 @@ 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 (enumPotionType == EnumPotionType.Fire) {
|
||||
compound.setBoolean("pBurnItem", true);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (npc.npcVersion < 12) {
|
||||
CompatabilityFix(compound, npc.advanced.writeToNBT(new NBTTagCompound()));
|
||||
|
||||
Reference in new issue
Block a user