From 48e1bd08e3a1e5cfc9c2e3b94dcee98bc79df21c Mon Sep 17 00:00:00 2001 From: McHorse Date: Thu, 18 Nov 2021 15:33:29 +0000 Subject: [PATCH] Fix NPC ID is disappearing upon changing NPC state with "/mp npc state" command --- src/main/java/mchorse/mappet/commands/npc/CommandNpcState.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/mchorse/mappet/commands/npc/CommandNpcState.java b/src/main/java/mchorse/mappet/commands/npc/CommandNpcState.java index 492ecf52..bcabbde7 100644 --- a/src/main/java/mchorse/mappet/commands/npc/CommandNpcState.java +++ b/src/main/java/mchorse/mappet/commands/npc/CommandNpcState.java @@ -68,6 +68,7 @@ public void executeCommand(MinecraftServer server, ICommandSender sender, String state.deserializeNBT(original); } + state.id = entity.getId(); entity.setState(state, true); } } \ No newline at end of file