soulStoneInit field bugfix

This commit is contained in:
1whohears committed 2022-06-08 00:32:58 -05:00
1 parent 825c42fc52
commit 4a70dfb4ce
2 files changed
+1 -2

No files matched your search

+1 -1
View File
@@ -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) {
@@ -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();