diff --git a/src/main/java/net/pietru/cookie_utils/commands/npc_command.java b/src/main/java/net/pietru/cookie_utils/commands/npc_command.java index 6339e82..a6c7c46 100644 --- a/src/main/java/net/pietru/cookie_utils/commands/npc_command.java +++ b/src/main/java/net/pietru/cookie_utils/commands/npc_command.java @@ -55,7 +55,7 @@ public class npc_command extends BaseCommand{ try { NpcDef.registered_npc_list.get(Integer.parseInt(arg2)) .change_zone(plr.getZone()) - .change_position(plr.getPosition()) + .change_position(plr.getPosition().cpy()) .send_update(); packet.message = "[Server] Moved npc with ID: %s".formatted(arg2); } catch (Exception ignored) { @@ -65,13 +65,23 @@ public class npc_command extends BaseCommand{ case "myrot": try { NpcDef.registered_npc_list.get(Integer.parseInt(arg2)) - .change_view_dir(plr.getEntity().viewDirection) + .change_view_dir(plr.getEntity().viewDirection.cpy()) .send_update(); packet.message = "[Server] Rotated npc with ID: %s".formatted(arg2); } catch (Exception ignored) { packet.message = "[Server] Failed to parse npc ID: %s".formatted(arg2); } break; + case "myrot_c": + try { + NpcDef.registered_npc_list.get(Integer.parseInt(arg2)) + .change_view_dir(plr.getEntity().viewDirection) + .send_update(); + packet.message = "[Server] Rotating npc with ID: %s".formatted(arg2); + } catch (Exception ignored) { + packet.message = "[Server] Failed to parse npc ID: %s".formatted(arg2); + } + break; case "remove", "del": try { NpcDef.registered_npc_list.get(Integer.parseInt(arg2)).unregister();