diff --git a/Movecraft/src/main/java/net/countercraft/movecraft/async/rotation/RotationTask.java b/Movecraft/src/main/java/net/countercraft/movecraft/async/rotation/RotationTask.java index 5348666a2..2ee3b11bd 100644 --- a/Movecraft/src/main/java/net/countercraft/movecraft/async/rotation/RotationTask.java +++ b/Movecraft/src/main/java/net/countercraft/movecraft/async/rotation/RotationTask.java @@ -115,13 +115,6 @@ protected void execute() { newHitBox.add(newLocation); Material oldMaterial = originalLocation.toBukkit(w).getBlock().getType(); - //prevent chests collision - if (Tags.CHESTS.contains(oldMaterial) && !checkChests(oldMaterial, newLocation)) { - failed = true; - failMessage = String.format(I18nSupport.getInternationalisedString("Rotation - Craft is obstructed") + " @ %d,%d,%d", newLocation.getX(), newLocation.getY(), newLocation.getZ()); - break; - } - if (!withinWorldBorder(craft.getWorld(), newLocation)) { failMessage = I18nSupport.getInternationalisedString("Rotation - Failed Craft cannot pass world border") + String.format(" @ %d,%d,%d", newLocation.getX(), newLocation.getY(), newLocation.getZ()); failed = true; @@ -320,36 +313,6 @@ public boolean getIsSubCraft() { return isSubCraft; } - private boolean checkChests(Material mBlock, MovecraftLocation newLoc) { - Material testMaterial; - MovecraftLocation aroundNewLoc; - final World world = craft.getWorld(); - - aroundNewLoc = newLoc.translate(1, 0, 0); - testMaterial = world.getBlockAt(aroundNewLoc.getX(), aroundNewLoc.getY(), aroundNewLoc.getZ()).getType(); - if (checkOldHitBox(testMaterial, mBlock, aroundNewLoc)) - return false; - - aroundNewLoc = newLoc.translate(-1, 0, 0); - testMaterial = world.getBlockAt(aroundNewLoc.getX(), aroundNewLoc.getY(), aroundNewLoc.getZ()).getType(); - if (checkOldHitBox(testMaterial, mBlock, aroundNewLoc)) - return false; - - aroundNewLoc = newLoc.translate(0, 0, 1); - testMaterial = world.getBlockAt(aroundNewLoc.getX(), aroundNewLoc.getY(), aroundNewLoc.getZ()).getType(); - - if (checkOldHitBox(testMaterial, mBlock, aroundNewLoc)) - return false; - - aroundNewLoc = newLoc.translate(0, 0, -1); - testMaterial = world.getBlockAt(aroundNewLoc.getX(), aroundNewLoc.getY(), aroundNewLoc.getZ()).getType(); - return !checkOldHitBox(testMaterial, mBlock, aroundNewLoc); - } - - private boolean checkOldHitBox(Material testMaterial, Material mBlock, MovecraftLocation aroundNewLoc) { - return testMaterial.equals(mBlock) && !oldHitBox.contains(aroundNewLoc); - } - public MutableHitBox getNewHitBox() { return newHitBox; } diff --git a/Movecraft/src/main/java/net/countercraft/movecraft/async/translation/TranslationTask.java b/Movecraft/src/main/java/net/countercraft/movecraft/async/translation/TranslationTask.java index 73e03eeac..94cbd1dca 100644 --- a/Movecraft/src/main/java/net/countercraft/movecraft/async/translation/TranslationTask.java +++ b/Movecraft/src/main/java/net/countercraft/movecraft/async/translation/TranslationTask.java @@ -173,14 +173,6 @@ protected void execute() throws InterruptedException, ExecutionException { } final Material testMaterial = newLocation.toBukkit(world).getBlock().getType(); - - if (Tags.CHESTS.contains(testMaterial) && checkChests(testMaterial, newLocation)) { - //prevent chests collision - fail(String.format(I18nSupport.getInternationalisedString("Translation - Failed Craft is obstructed") - + " @ %d,%d,%d,%s", newLocation.getX(), newLocation.getY(), newLocation.getZ(), - newLocation.toBukkit(craft.getWorld()).getBlock().getType())); - return; - } if (!withinWorldBorder(world, newLocation)) { fail(I18nSupport.getInternationalisedString( "Translation - Failed Craft cannot pass world border") diff --git a/api/src/main/java/net/countercraft/movecraft/util/Tags.java b/api/src/main/java/net/countercraft/movecraft/util/Tags.java index b2d2dc5a5..0c2cc5904 100644 --- a/api/src/main/java/net/countercraft/movecraft/util/Tags.java +++ b/api/src/main/java/net/countercraft/movecraft/util/Tags.java @@ -28,7 +28,7 @@ public class Tags { FRAGILE_MATERIALS.add(Material.REDSTONE_WIRE); FRAGILE_MATERIALS.add(Material.LADDER); FRAGILE_MATERIALS.addAll(Tag.DOORS.getValues()); - FRAGILE_MATERIALS.addAll(Tag.CARPETS.getValues()); + FRAGILE_MATERIALS.addAll(Tag.WOOL_CARPETS.getValues()); FRAGILE_MATERIALS.addAll(Tag.RAILS.getValues()); FRAGILE_MATERIALS.addAll(Tag.WOODEN_PRESSURE_PLATES.getValues());