Skip to content

Commit

Permalink
Update RotationTask.java
Browse files Browse the repository at this point in the history
  • Loading branch information
TylerS1066 committed Jul 28, 2024
1 parent 964c3b7 commit 84b4dd6
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -179,19 +179,15 @@ protected void execute() {
parentCraft.getFluidLocations().addAll(newFluidList);
}

// Rotates the craft's tracked locations, then all parent craft's.
// Rotates the craft's tracked locations, and all parent craft's.
Craft temp = craft;
while (true) {
do {
for (Set<TrackedLocation> locations : craft.getTrackedLocations().values()) {
for (TrackedLocation location : locations) {
location.rotate(rotation, originPoint);
}
}
if (!(temp instanceof SubCraft))
break;

temp = ((SubCraft) temp).getParent();
}
} while (temp instanceof SubCraft && (temp = ((SubCraft) temp).getParent()) != null);

updates.add(new CraftRotateCommand(getCraft(),originPoint, rotation));
//rotate entities in the craft
Expand Down

0 comments on commit 84b4dd6

Please sign in to comment.