From b167755cc00bfd2c20189a4a3408443dadf15f37 Mon Sep 17 00:00:00 2001 From: "Luis C.M" <42545778+c0508383@users.noreply.github.com> Date: Sat, 31 Dec 2022 18:47:13 -0600 Subject: [PATCH 1/3] Fixed a small puppet offset client update bug. --- .../java/noppes/npcs/scripted/roles/ScriptJobPuppet.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/noppes/npcs/scripted/roles/ScriptJobPuppet.java b/src/main/java/noppes/npcs/scripted/roles/ScriptJobPuppet.java index 29774bd7f..8b79e5abb 100644 --- a/src/main/java/noppes/npcs/scripted/roles/ScriptJobPuppet.java +++ b/src/main/java/noppes/npcs/scripted/roles/ScriptJobPuppet.java @@ -256,7 +256,7 @@ public class ScriptJobPuppet extends ScriptJobInterface implements IJobPuppet { } public void setOffsetX(int part, int offset) { - if(getRotationZ(part) != offset) + if(getOffsetX(part) != offset) npc.script.clientNeedsUpdate = true; if(part == 0) @@ -274,7 +274,7 @@ public class ScriptJobPuppet extends ScriptJobInterface implements IJobPuppet { } public void setOffsetY(int part, int offset) { - if(getRotationZ(part) != offset) + if(getOffsetY(part) != offset) npc.script.clientNeedsUpdate = true; if(part == 0) @@ -292,7 +292,7 @@ public class ScriptJobPuppet extends ScriptJobInterface implements IJobPuppet { } public void setOffsetZ(int part, int offset) { - if(getRotationZ(part) != offset) + if(getOffsetZ(part) != offset) npc.script.clientNeedsUpdate = true; if(part == 0) From 7b3dd8e7bdebbf850fa48be9ae457061cba9871d Mon Sep 17 00:00:00 2001 From: "Luis C.M" <42545778+c0508383@users.noreply.github.com> Date: Sun, 1 Jan 2023 23:54:39 -0600 Subject: [PATCH 2/3] Removed unused IPlayerModelData interface. --- src/api | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api b/src/api index ceaffeb04..988ce6fd2 160000 --- a/src/api +++ b/src/api @@ -1 +1 @@ -Subproject commit ceaffeb0446746999a2789250becf61a278b2882 +Subproject commit 988ce6fd215b602b00d18cd88300fe92bd3275ca From d2611385de9ac320eb86ea83ae5f8a5ce05e06d0 Mon Sep 17 00:00:00 2001 From: "Luis C.M" <42545778+c0508383@users.noreply.github.com> Date: Sun, 1 Jan 2023 23:54:39 -0600 Subject: [PATCH 3/3] ITimers: -Added timerIds() function, listing all active timer IDs --- src/api | 2 +- src/main/java/noppes/npcs/entity/data/DataTimers.java | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/api b/src/api index ceaffeb04..3686b6028 160000 --- a/src/api +++ b/src/api @@ -1 +1 @@ -Subproject commit ceaffeb0446746999a2789250becf61a278b2882 +Subproject commit 3686b6028f309a284e2f9b5a3209331bd51ee471 diff --git a/src/main/java/noppes/npcs/entity/data/DataTimers.java b/src/main/java/noppes/npcs/entity/data/DataTimers.java index 1596f15aa..9bcb37275 100644 --- a/src/main/java/noppes/npcs/entity/data/DataTimers.java +++ b/src/main/java/noppes/npcs/entity/data/DataTimers.java @@ -25,6 +25,15 @@ public class DataTimers implements ITimers { this.parent = parent; } + public int[] timerIds() { + Integer[] ids = timers.keySet().toArray(new Integer[0]); + int[] intIds = new int[ids.length]; + for (int i = 0; i < ids.length; i++) { + intIds[i] = ids[i]; + } + return intIds; + } + public void start(int id, int ticks, boolean repeat) { if(this.timers.containsKey(id)) { throw new CustomNPCsException("There is already a timer with id: " + id);