From 79323c2f9c0ae57de435c465bbabdd79171fc5b3 Mon Sep 17 00:00:00 2001 From: C_Corp2002 Date: Tue, 26 Sep 2023 11:56:03 -0700 Subject: [PATCH 01/13] Begin Adding Craft DataTags & Tracked Locations Craft DataTags: Useful for storing any type of Data in Key-Value format, "aboard" a Craft Object. As long as the Craft Object isn't erased/lost-track-of, the DataTags will remain. TrackedLocations: A MovecraftLocation and/or HitBox-Object that will move "with" the Craft it is bound to, when the Craft Translates or Rotates Example Use-Case: A Better "Movecraft-Cannons" Plugin. Where the Cannon's Locations are automatically Updated/Moved with the Craft upon any successful Movement. --- .../countercraft/movecraft/craft/Craft.java | 88 ++++++++++++++++++- 1 file changed, 86 insertions(+), 2 deletions(-) diff --git a/modules/api/src/main/java/net/countercraft/movecraft/craft/Craft.java b/modules/api/src/main/java/net/countercraft/movecraft/craft/Craft.java index c4b058e4c..cc4ff4046 100644 --- a/modules/api/src/main/java/net/countercraft/movecraft/craft/Craft.java +++ b/modules/api/src/main/java/net/countercraft/movecraft/craft/Craft.java @@ -35,6 +35,7 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +import java.util.Collection; import java.util.Map; import java.util.Set; @@ -45,7 +46,6 @@ public interface Craft { @Deprecated void setProcessing(boolean processing); - /** * Gets a HitBox representing the current locations that this craft controls * @@ -58,7 +58,6 @@ public interface Craft { * Sets the HitBox representing the current locations that this craft controls */ void setHitBox(@NotNull HitBox hitBox); - /** * Gets the CraftType used to determine the Craft's behaviours * @@ -67,6 +66,91 @@ public interface Craft { @NotNull CraftType getType(); + + + /** + * Attaches a Key-Value Pair to a Craft Object. + */ + void setDataTag(@NotNull String key, @Nullable Object data); + + /** + * Gets the Value of and then Removes the Key, if Present (Otherwise Returns Null). + */ + @Nullable + Object removeDataTag(String key); + + /** + * Gets a Tag Value from a Keys. + */ + @Nullable + Object getDataTag(String key); + + /** + * Gets all Tag Values from all Keys. + */ + @NotNull + Collection getAllTagValues(); + + /** + * Checks if the Craft has a certain Key out of all Keys + */ + @NotNull + boolean hasDataKey(String key); + + /** + * Checks if the Craft has a certain Value from all Keys + */ + @NotNull + boolean hasDataValue(Object value); + + /** + * Translates the given HitBox by a MovecraftLocation (Which is Treated as a Vector) + */ + @NotNull + HitBox translateBox(HitBox box, MovecraftLocation vec); + + /** + * Rotates the given HitBox around an Axis by a MovecraftRotation + */ + @NotNull + HitBox rotateBox(HitBox box, MovecraftLocation axis, MovecraftRotation rotation); + + /** + * Checks if an Object (MovecraftLocation / HitBox) is currently being Tracked. + */ + @NotNull + boolean isTracking(@NotNull Object tracked); + + /** + * Replaces/Updates a Key of Tracked MovecraftLocation or HitBox + */ + void setTrackedLocs(@NotNull Collection tracked, @NotNull Object key); + /** + * Adds a Tracked MovecraftLocation or HitBox to a Key + */ + void addTrackedLoc(@NotNull Object tracked, @NotNull Object key); + /** + * Removes a Tracked MovecraftLocation or HitBox from a Key + */ + void removeTrackedLoc(@NotNull Object tracked, @NotNull Object key); + /** + * Gets all Tracked MovecraftLocations (Including from Tracked HitBoxes) from all Keys + */ + Set getAllTrackedLocation(); + + /** + * Gets all Tracked MovecraftLocations (Including from Tracked HitBoxes) or HitBox from a particular key + */ + @Nullable + Set getTrackedLocs(@NotNull Object key); + + /** + * Gets a HitBox representing the current locations that this craft controls + * + * @return the crafts current HitBox + */ + + @Deprecated(forRemoval = true) @NotNull default World getW(){ return this.getWorld(); From c4e487794a7a949faffbf24a8249929d58412fc3 Mon Sep 17 00:00:00 2001 From: C_Corp2002 Date: Tue, 26 Sep 2023 12:16:24 -0700 Subject: [PATCH 02/13] Added Implementation of Craft DataTags & Tracked Locations Added Implementation of Craft DataTags & Tracked Locations Craft DataTags: Useful for storing any type of Data in Key-Value format, "aboard" a Craft Object. As long as the Craft Object isn't erased/lost-track-of, the DataTags will remain. TrackedLocations: A MovecraftLocation and/or HitBox-Object that will move "with" the Craft it is bound to, when the Craft Translates or Rotates Example Use-Case: A Better "Movecraft-Cannons" Plugin. Where the Cannon's Locations are automatically Updated/Moved with the Craft upon any successful Movement. --- .../movecraft/craft/BaseCraft.java | 145 ++++++++++++++++++ 1 file changed, 145 insertions(+) diff --git a/modules/Movecraft/src/main/java/net/countercraft/movecraft/craft/BaseCraft.java b/modules/Movecraft/src/main/java/net/countercraft/movecraft/craft/BaseCraft.java index 90266b0b2..12238c16b 100644 --- a/modules/Movecraft/src/main/java/net/countercraft/movecraft/craft/BaseCraft.java +++ b/modules/Movecraft/src/main/java/net/countercraft/movecraft/craft/BaseCraft.java @@ -78,6 +78,10 @@ public abstract class BaseCraft implements Craft { private String name = ""; @NotNull private MovecraftLocation lastTranslation = new MovecraftLocation(0, 0, 0); + @NotNull + private Map> trackedLocations = new HashMap<>(); + @NotNull + private Map craftTags = new HashMap<>(); public BaseCraft(@NotNull CraftType type, @NotNull World world) { this.type = type; @@ -115,6 +119,147 @@ public CraftType getType() { return type; } + @Override + public void setDataTag(String key, Object data) { + this.craftTags.put(key, data); + } + @Override + @Nullable + public Object removeDataTag(String key) { + Object tag = this.craftTags.getOrDefault(key, null); + this.craftTags.remove(key); + return tag; + } + @Override + @Nullable + public Object getDataTag(String key) { + return this.craftTags.getOrDefault(key, null); + } + @Override + public Collection getAllTagValues() { + return this.craftTags.values(); + } + @Override + public boolean hasDataKey(String key) { + return this.craftTags.containsKey(key); + } + @Override + public boolean hasDataValue(Object value) { + return this.craftTags.containsValue(value); + } + + @Override + public HitBox translateBox(HitBox box, MovecraftLocation vec) { + SetHitBox newBox = new SetHitBox(); + for(MovecraftLocation oldLoc : box) { + MovecraftLocation newLoc = oldLoc.translate(vec.getX(),vec.getY(),vec.getZ()); + newBox.add(newLoc); + } + return newBox; + } + @Override + public HitBox rotateBox(HitBox box, MovecraftLocation axis, MovecraftRotation rotation) { + SetHitBox newBox = new SetHitBox(); + for(MovecraftLocation oldLoc : box){ + MovecraftLocation newLoc = MathUtils.rotateVec(rotation,oldLoc.subtract(axis)).add(axis); + newBox.add(newLoc); + } + return newBox; + } + + @Override + public boolean isTracking(@NotNull Object tracked) { + boolean found = false; + if (tracked instanceof MovecraftLocation || tracked instanceof HitBox) { + for (Object key : this.trackedLocations.keySet()) { + if (this.trackedLocations.get(key).contains(tracked)) { + found = true; + return found; + } + } + } + return found; + } + @Override + public void setTrackedLocs(@NotNull Collection tracked, @NotNull Object key) { + if (this.trackedLocations.containsKey(key)) { + Set mlocs = new HashSet<>(); + mlocs.addAll(this.trackedLocations.get(key)); + for (Object o : tracked) { + if (o instanceof MovecraftLocation || o instanceof HitBox) { + continue; + } else { + return; + } + } + this.trackedLocations.put(key, tracked); + } else { + for (Object o : tracked) { + if (o instanceof MovecraftLocation || o instanceof HitBox) { + continue; + } else { + return; + } + } + this.trackedLocations.put(key, tracked); + } + } + @Override + public void addTrackedLoc(@NotNull Object tracked, @NotNull Object key) { + if (tracked instanceof MovecraftLocation || tracked instanceof HitBox) { + if (this.trackedLocations.containsKey(key)) { + Set mlocs = new HashSet<>(this.trackedLocations.get(key)); + mlocs.add(tracked); + this.trackedLocations.put(key, mlocs); + } else { + Set mlocs = new HashSet<>(); + mlocs.add(tracked); + this.trackedLocations.put(key, mlocs); + } + } + } + @Override + public void removeTrackedLoc(@NotNull Object tracked, @NotNull Object key) { + if (tracked instanceof MovecraftLocation || tracked instanceof HitBox) { + if (this.trackedLocations.containsKey(key)) { + Set mlocs = new HashSet<>(this.trackedLocations.get(key)); + mlocs.remove(tracked); + this.trackedLocations.put(key, mlocs); + } + } + } + @Override + public Set getAllTrackedLocation() { + Set mlocs = new HashSet<>(); + for (Object key : this.trackedLocations.keySet()) { + for (Object o : this.trackedLocations.get(key)) { + if (o instanceof MovecraftLocation) { + mlocs.add(o); + } + if (o instanceof SetHitBox) { + mlocs.add(((SetHitBox)o).asSet()); + } + } + } + return mlocs; + } + @Override + @Nullable + public Set getTrackedLocs(@NotNull Object key) { + if (this.trackedLocations.get(key) == null) + return null; + Set mlocs = new HashSet<>(getHitBox().size()*8); + for (Object o : this.trackedLocations.get(key)) { + if (o instanceof MovecraftLocation || o instanceof HitBox) { + if (o instanceof MovecraftLocation) + mlocs.add((MovecraftLocation)o); + if (o instanceof HitBox) + mlocs.addAll(((HitBox)o).asSet()); + } + } + return mlocs; + } + @NotNull public MovecraftWorld getMovecraftWorld() { return CachedMovecraftWorld.of(w); From 82e38fe25bdf6ab681ecf60f8de47f906a0bcab6 Mon Sep 17 00:00:00 2001 From: C_Corp2002 Date: Tue, 26 Sep 2023 12:18:16 -0700 Subject: [PATCH 03/13] Forgot Nullable Forgot Nullable --- .../main/java/net/countercraft/movecraft/craft/BaseCraft.java | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/Movecraft/src/main/java/net/countercraft/movecraft/craft/BaseCraft.java b/modules/Movecraft/src/main/java/net/countercraft/movecraft/craft/BaseCraft.java index 12238c16b..cbfbd6098 100644 --- a/modules/Movecraft/src/main/java/net/countercraft/movecraft/craft/BaseCraft.java +++ b/modules/Movecraft/src/main/java/net/countercraft/movecraft/craft/BaseCraft.java @@ -30,6 +30,7 @@ import org.bukkit.block.Sign; import org.bukkit.block.data.BlockData; import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; import java.util.Collection; import java.util.EnumSet; From b59de176d6a9318e92b5f359418f835a5204a730 Mon Sep 17 00:00:00 2001 From: C_Corp2002 Date: Tue, 26 Sep 2023 12:20:39 -0700 Subject: [PATCH 04/13] Y I so forgorful --- .../main/java/net/countercraft/movecraft/craft/BaseCraft.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/Movecraft/src/main/java/net/countercraft/movecraft/craft/BaseCraft.java b/modules/Movecraft/src/main/java/net/countercraft/movecraft/craft/BaseCraft.java index cbfbd6098..1ed28405f 100644 --- a/modules/Movecraft/src/main/java/net/countercraft/movecraft/craft/BaseCraft.java +++ b/modules/Movecraft/src/main/java/net/countercraft/movecraft/craft/BaseCraft.java @@ -15,6 +15,10 @@ import net.countercraft.movecraft.processing.WorldManager; import net.countercraft.movecraft.util.Counter; import net.countercraft.movecraft.util.Tags; + +import net.countercraft.movecraft.util.CollectionUtils; +import net.countercraft.movecraft.util.MathUtils; + import net.countercraft.movecraft.util.TimingData; import net.countercraft.movecraft.util.hitboxes.HitBox; import net.countercraft.movecraft.util.hitboxes.MutableHitBox; From 271e3ec22a482fd23fcebaae67087b6f04c2fc94 Mon Sep 17 00:00:00 2001 From: C_Corp2002 Date: Tue, 26 Sep 2023 12:36:24 -0700 Subject: [PATCH 05/13] Actually Rotate Tracked Locations Hi! --- .../mapUpdater/update/CraftRotateCommand.java | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/modules/Movecraft/src/main/java/net/countercraft/movecraft/mapUpdater/update/CraftRotateCommand.java b/modules/Movecraft/src/main/java/net/countercraft/movecraft/mapUpdater/update/CraftRotateCommand.java index 45b6c2cc8..c6b69d285 100644 --- a/modules/Movecraft/src/main/java/net/countercraft/movecraft/mapUpdater/update/CraftRotateCommand.java +++ b/modules/Movecraft/src/main/java/net/countercraft/movecraft/mapUpdater/update/CraftRotateCommand.java @@ -69,6 +69,26 @@ public void doUpdate() { CraftManager.getInstance().release(craft, CraftReleaseEvent.Reason.EMPTY, false); return; } + if (craft.trackedLocations != null) { + for (Object key : craft.trackedLocations.keySet()) { + ArrayList mlocs = new ArrayList<>(craft.getTrackedLocs(key)); + for (Object tracked : mlocs) { + if (tracked != null) { + if (tracked instanceof MovecraftLocation) { + MovecraftLocation newTracked = MathUtils.rotateVec(rotation,((MovecraftLocation)tracked).subtract(originLocation)).add(originLocation); + clone.add(newTracked); + } + if (tracked instanceof HitBox) { + HitBox newBox = (SetHitBox)(craft).rotateBox(((HitBox)tracked), originLocation, rotation); + clone.add(newBox); + } + } + } + if (!clone.isEmpty() || clone != null) { + ((BaseCraft)craft).setTrackedLocs(clone,key); + } + } + } long time = System.nanoTime(); final Set passthroughBlocks = new HashSet<>(craft.getType().getMaterialSetProperty(CraftType.PASSTHROUGH_BLOCKS)); if (craft instanceof SinkingCraft) { From 17f4e199ce44d760e42c75e794815675edd06a38 Mon Sep 17 00:00:00 2001 From: C_Corp2002 Date: Tue, 26 Sep 2023 12:38:56 -0700 Subject: [PATCH 06/13] Actually Trasnslate the Locations Hello! --- .../update/CraftTranslateCommand.java | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/modules/Movecraft/src/main/java/net/countercraft/movecraft/mapUpdater/update/CraftTranslateCommand.java b/modules/Movecraft/src/main/java/net/countercraft/movecraft/mapUpdater/update/CraftTranslateCommand.java index fe03a2a28..9389d4dab 100644 --- a/modules/Movecraft/src/main/java/net/countercraft/movecraft/mapUpdater/update/CraftTranslateCommand.java +++ b/modules/Movecraft/src/main/java/net/countercraft/movecraft/mapUpdater/update/CraftTranslateCommand.java @@ -75,6 +75,26 @@ public void doUpdate() { CraftManager.getInstance().release(craft, CraftReleaseEvent.Reason.EMPTY, false); return; } + if (craft.trackedLocations != null) { + for (Object key : craft.trackedLocations.keySet()) { + ArrayList mlocs = new ArrayList<>(craft.trackedLocations.get(key)); + Set clone = new HashSet<>(); + for (Object tracked : mlocs) { + if (tracked != null) { + if (tracked instanceof MovecraftLocation) { + MovecraftLocation newTracked = ((MovecraftLocation)tracked).translate(displacement.getX(),displacement.getY(),displacement.getZ()); + clone.add(newTracked); + } + if (tracked instanceof HitBox) { + HitBox newBox = (SetHitBox)(craft.translateBox(((SetHitBox)tracked), displacement)); + clone.add(newBox); + } + } + } + if (!clone.isEmpty() || clone != null) { + ((BaseCraft)craft).setTrackedLocs(clone,key); + } + long time = System.nanoTime(); World oldWorld = craft.getWorld(); final Set passthroughBlocks = new HashSet<>( From dd19b1efd5a802b22a881514a43a5c0346f0367d Mon Sep 17 00:00:00 2001 From: C_Corp2002 Date: Tue, 26 Sep 2023 12:45:37 -0700 Subject: [PATCH 07/13] Forgor again Chaos Chaos!!! --- .../src/main/java/net/countercraft/movecraft/craft/Craft.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/api/src/main/java/net/countercraft/movecraft/craft/Craft.java b/modules/api/src/main/java/net/countercraft/movecraft/craft/Craft.java index cc4ff4046..4739c45d0 100644 --- a/modules/api/src/main/java/net/countercraft/movecraft/craft/Craft.java +++ b/modules/api/src/main/java/net/countercraft/movecraft/craft/Craft.java @@ -36,6 +36,7 @@ import org.jetbrains.annotations.Nullable; import java.util.Collection; +import java.util.HashMap; import java.util.Map; import java.util.Set; @@ -67,6 +68,9 @@ public interface Craft { CraftType getType(); + Map> trackedLocations = new HashMap<>(); + + Map craftTags = new HashMap<>(); /** * Attaches a Key-Value Pair to a Craft Object. From 51b2b054a1deb70eecc9aad25433cb44a15dba94 Mon Sep 17 00:00:00 2001 From: C_Corp2002 Date: Tue, 26 Sep 2023 12:47:00 -0700 Subject: [PATCH 08/13] Transfered Craft Tags and Tracked Locations to "Craft" instead of "BaseCraft" --- .../main/java/net/countercraft/movecraft/craft/BaseCraft.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/modules/Movecraft/src/main/java/net/countercraft/movecraft/craft/BaseCraft.java b/modules/Movecraft/src/main/java/net/countercraft/movecraft/craft/BaseCraft.java index 1ed28405f..1abf883ec 100644 --- a/modules/Movecraft/src/main/java/net/countercraft/movecraft/craft/BaseCraft.java +++ b/modules/Movecraft/src/main/java/net/countercraft/movecraft/craft/BaseCraft.java @@ -83,10 +83,6 @@ public abstract class BaseCraft implements Craft { private String name = ""; @NotNull private MovecraftLocation lastTranslation = new MovecraftLocation(0, 0, 0); - @NotNull - private Map> trackedLocations = new HashMap<>(); - @NotNull - private Map craftTags = new HashMap<>(); public BaseCraft(@NotNull CraftType type, @NotNull World world) { this.type = type; From 21e626752b2b4cf3c342009b701d2bcb17198a3c Mon Sep 17 00:00:00 2001 From: C_Corp2002 Date: Tue, 26 Sep 2023 12:49:57 -0700 Subject: [PATCH 09/13] Update CraftTranslateCommand.java "Dammit Bobby!" --- .../movecraft/mapUpdater/update/CraftTranslateCommand.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/Movecraft/src/main/java/net/countercraft/movecraft/mapUpdater/update/CraftTranslateCommand.java b/modules/Movecraft/src/main/java/net/countercraft/movecraft/mapUpdater/update/CraftTranslateCommand.java index 9389d4dab..2a8346e35 100644 --- a/modules/Movecraft/src/main/java/net/countercraft/movecraft/mapUpdater/update/CraftTranslateCommand.java +++ b/modules/Movecraft/src/main/java/net/countercraft/movecraft/mapUpdater/update/CraftTranslateCommand.java @@ -75,6 +75,7 @@ public void doUpdate() { CraftManager.getInstance().release(craft, CraftReleaseEvent.Reason.EMPTY, false); return; } + if (craft.trackedLocations != null) { for (Object key : craft.trackedLocations.keySet()) { ArrayList mlocs = new ArrayList<>(craft.trackedLocations.get(key)); @@ -94,7 +95,8 @@ public void doUpdate() { if (!clone.isEmpty() || clone != null) { ((BaseCraft)craft).setTrackedLocs(clone,key); } - + } + } long time = System.nanoTime(); World oldWorld = craft.getWorld(); final Set passthroughBlocks = new HashSet<>( From 8fe121cd720f5322fa3d5bd90cef130598bbc8d2 Mon Sep 17 00:00:00 2001 From: C_Corp2002 Date: Tue, 26 Sep 2023 12:56:18 -0700 Subject: [PATCH 10/13] Update CraftTranslateCommand.java Made Craft Un-Based --- .../movecraft/mapUpdater/update/CraftTranslateCommand.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/Movecraft/src/main/java/net/countercraft/movecraft/mapUpdater/update/CraftTranslateCommand.java b/modules/Movecraft/src/main/java/net/countercraft/movecraft/mapUpdater/update/CraftTranslateCommand.java index 2a8346e35..3a5def9ba 100644 --- a/modules/Movecraft/src/main/java/net/countercraft/movecraft/mapUpdater/update/CraftTranslateCommand.java +++ b/modules/Movecraft/src/main/java/net/countercraft/movecraft/mapUpdater/update/CraftTranslateCommand.java @@ -93,7 +93,7 @@ public void doUpdate() { } } if (!clone.isEmpty() || clone != null) { - ((BaseCraft)craft).setTrackedLocs(clone,key); + (craft).setTrackedLocs(clone,key); } } } From 72acfa6f43b8e66ab1cc3f8866537429762d6abf Mon Sep 17 00:00:00 2001 From: C_Corp2002 Date: Tue, 26 Sep 2023 12:56:22 -0700 Subject: [PATCH 11/13] Update CraftRotateCommand.java Made Craft Un-Based --- .../movecraft/mapUpdater/update/CraftRotateCommand.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/Movecraft/src/main/java/net/countercraft/movecraft/mapUpdater/update/CraftRotateCommand.java b/modules/Movecraft/src/main/java/net/countercraft/movecraft/mapUpdater/update/CraftRotateCommand.java index c6b69d285..a00e1ec3f 100644 --- a/modules/Movecraft/src/main/java/net/countercraft/movecraft/mapUpdater/update/CraftRotateCommand.java +++ b/modules/Movecraft/src/main/java/net/countercraft/movecraft/mapUpdater/update/CraftRotateCommand.java @@ -85,7 +85,7 @@ public void doUpdate() { } } if (!clone.isEmpty() || clone != null) { - ((BaseCraft)craft).setTrackedLocs(clone,key); + (craft).setTrackedLocs(clone,key); } } } From b3a5bbc502e88fd1fea3fc372d1b298f5c2e6f4b Mon Sep 17 00:00:00 2001 From: C_Corp2002 Date: Tue, 26 Sep 2023 13:00:26 -0700 Subject: [PATCH 12/13] Create MakeItBuild.md A temporary file to prove that it compiles (hopefully) --- modules/MakeItBuild.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 modules/MakeItBuild.md diff --git a/modules/MakeItBuild.md b/modules/MakeItBuild.md new file mode 100644 index 000000000..d1c90db26 --- /dev/null +++ b/modules/MakeItBuild.md @@ -0,0 +1 @@ +Make it Build! From 7915b887b9be6485a52fbc9ebf1bd2a9442db6d9 Mon Sep 17 00:00:00 2001 From: C_Corp2002 Date: Tue, 26 Sep 2023 13:03:40 -0700 Subject: [PATCH 13/13] Well I feel stupid Forgot to add the copy of locations etc --- .../movecraft/mapUpdater/update/CraftRotateCommand.java | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/Movecraft/src/main/java/net/countercraft/movecraft/mapUpdater/update/CraftRotateCommand.java b/modules/Movecraft/src/main/java/net/countercraft/movecraft/mapUpdater/update/CraftRotateCommand.java index a00e1ec3f..8bb0c5d18 100644 --- a/modules/Movecraft/src/main/java/net/countercraft/movecraft/mapUpdater/update/CraftRotateCommand.java +++ b/modules/Movecraft/src/main/java/net/countercraft/movecraft/mapUpdater/update/CraftRotateCommand.java @@ -70,6 +70,7 @@ public void doUpdate() { return; } if (craft.trackedLocations != null) { + ArrayList clone = new ArrayList<>(); for (Object key : craft.trackedLocations.keySet()) { ArrayList mlocs = new ArrayList<>(craft.getTrackedLocs(key)); for (Object tracked : mlocs) {