From 0328f4156471aa225de208a69191a74f331219bf Mon Sep 17 00:00:00 2001 From: Electroblob77 <35599699+Electroblob77@users.noreply.github.com> Date: Tue, 28 Jan 2020 21:19:37 +0000 Subject: [PATCH] Prevent potion core applying its health fix (whatever that is) when resurrecting, fixes #178 --- src/main/java/electroblob/wizardry/spell/Resurrection.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/electroblob/wizardry/spell/Resurrection.java b/src/main/java/electroblob/wizardry/spell/Resurrection.java index 1809e07b..a28d0fe9 100644 --- a/src/main/java/electroblob/wizardry/spell/Resurrection.java +++ b/src/main/java/electroblob/wizardry/spell/Resurrection.java @@ -25,6 +25,8 @@ public class Resurrection extends Spell { public static final String WAIT_TIME = "wait_time"; + private static final String POTION_CORE_FIX_NBT_KEY = "Potion Core - Health Fix"; + public Resurrection(){ super("resurrection", EnumAction.NONE, false); addProperties(EFFECT_RADIUS, WAIT_TIME); @@ -90,6 +92,8 @@ public class Resurrection extends Spell { player.experience = 0; player.experienceLevel = 0; player.experienceTotal = 0; + // Not sure what potion core is 'fixing' but it breaks my resurrection, so let's unfix it! + player.getEntityData().removeTag(POTION_CORE_FIX_NBT_KEY); if(player.world.isRemote){ ParticleBuilder.spawnHealParticles(player.world, player);