From 1d340f6b4a0dc8a67392060968f1ed51c4f7c3b8 Mon Sep 17 00:00:00 2001 From: mcmonkey4eva Date: Tue, 3 Oct 2017 00:14:13 -0700 Subject: [PATCH] possible fix for schem rotation --- .../denizen/scripts/commands/world/SchematicCommand.java | 5 ++++- .../aufdemrand/denizen/utilities/blocks/CuboidBlockSet.java | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/plugin/src/main/java/net/aufdemrand/denizen/scripts/commands/world/SchematicCommand.java b/plugin/src/main/java/net/aufdemrand/denizen/scripts/commands/world/SchematicCommand.java index d3fb18a88f..f9d0a90108 100644 --- a/plugin/src/main/java/net/aufdemrand/denizen/scripts/commands/world/SchematicCommand.java +++ b/plugin/src/main/java/net/aufdemrand/denizen/scripts/commands/world/SchematicCommand.java @@ -202,9 +202,12 @@ public void execute(final ScriptEntry scriptEntry) throws CommandExecutionExcept } // TODO: Make me waitable! int ang = angle.asInt(); - if (ang < 0) { + while (ang < 0) { ang = 360 + ang; } + while (ang < 360) { + ang -= 360; + } while (ang > 0) { ang -= 90; schematics.get(name.asString().toUpperCase()).rotateOne(); diff --git a/plugin/src/main/java/net/aufdemrand/denizen/utilities/blocks/CuboidBlockSet.java b/plugin/src/main/java/net/aufdemrand/denizen/utilities/blocks/CuboidBlockSet.java index 092bc68d1e..95f770ef48 100644 --- a/plugin/src/main/java/net/aufdemrand/denizen/utilities/blocks/CuboidBlockSet.java +++ b/plugin/src/main/java/net/aufdemrand/denizen/utilities/blocks/CuboidBlockSet.java @@ -136,6 +136,9 @@ public void rotateOne() { } } } + double xw = x_width; + x_width = z_height; + z_height = xw; blocks = bd; }