From 4a70dfb4ce343070d4347a67aa0a17966c8aa7c3 Mon Sep 17 00:00:00 2001 From: 1whohears <1whohears28@gmail.com> Date: Wed, 8 Jun 2022 00:32:58 -0500 Subject: [PATCH] soulStoneInit field bugfix --- src/main/java/noppes/npcs/EventHooks.java | 2 +- src/main/java/noppes/npcs/entity/EntityNPCInterface.java | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/noppes/npcs/EventHooks.java b/src/main/java/noppes/npcs/EventHooks.java index 4da9356f7..339b42582 100644 --- a/src/main/java/noppes/npcs/EventHooks.java +++ b/src/main/java/noppes/npcs/EventHooks.java @@ -118,11 +118,11 @@ public class EventHooks { public static void onNPCInit(EntityNPCInterface npc) { if(npc == null || npc.wrappedNPC == null) return; - noppes.npcs.scripted.event.NpcEvent.InitEvent event = new noppes.npcs.scripted.event.NpcEvent.InitEvent(npc.wrappedNPC); ScriptController.Instance.npcScripts.callScript(EnumScriptType.INIT, event); npc.script.callScript(EnumScriptType.INIT); NpcAPI.EVENT_BUS.post(event); + npc.advanced.soulStoneInit = false; } public static void onNPCUpdate(EntityNPCInterface npc) { diff --git a/src/main/java/noppes/npcs/entity/EntityNPCInterface.java b/src/main/java/noppes/npcs/entity/EntityNPCInterface.java index 71b5871e4..904b11d15 100644 --- a/src/main/java/noppes/npcs/entity/EntityNPCInterface.java +++ b/src/main/java/noppes/npcs/entity/EntityNPCInterface.java @@ -218,7 +218,6 @@ public abstract class EntityNPCInterface extends EntityCreature implements IEnti public void onUpdate(){ super.onUpdate(); if(this.ticksExisted % 10 == 0) { - advanced.soulStoneInit = false; EventHooks.onNPCUpdate(this); } this.timers.update();