Skip to content

Commit

Permalink
Disable old fix
Browse files Browse the repository at this point in the history
  • Loading branch information
drfiveminusmint committed Sep 11, 2024
1 parent 09ae415 commit ce5640b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,13 @@ protected void execute() {
newHitBox.add(newLocation);

//Prevent piston bug
if (originalLocation.toBukkit(getCraft().getWorld()).getBlock().getType().equals(Material.MOVING_PISTON)) {
failed = true;
failMessage = (String.format(I18nSupport.getInternationalisedString("Translation - Failed Craft is obstructed")
+ " @ %d,%d,%d,%s", originalLocation.getX(), originalLocation.getY(), originalLocation.getZ(),
originalLocation.toBukkit(craft.getWorld()).getBlock().getType()));
break;
}
//if (originalLocation.toBukkit(getCraft().getWorld()).getBlock().getType().equals(Material.MOVING_PISTON)) {
// failed = true;
// failMessage = (String.format(I18nSupport.getInternationalisedString("Translation - Failed Craft is obstructed")
// + " @ %d,%d,%d,%s", originalLocation.getX(), originalLocation.getY(), originalLocation.getZ(),
// originalLocation.toBukkit(craft.getWorld()).getBlock().getType()));
// break;
//}

Material oldMaterial = originalLocation.toBukkit(w).getBlock().getType();
//prevent chests collision
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,10 @@ protected void execute() throws InterruptedException, ExecutionException {
continue;
}
//Prevent piston bug
if (oldLocation.toBukkit(world).getBlock().getType().equals(Material.MOVING_PISTON))
fail(String.format(I18nSupport.getInternationalisedString("Translation - Failed Craft is obstructed")
+ " @ %d,%d,%d,%s", oldLocation.getX(), oldLocation.getY(), oldLocation.getZ(),
oldLocation.toBukkit(craft.getWorld()).getBlock().getType()));
//if (oldLocation.toBukkit(world).getBlock().getType().equals(Material.MOVING_PISTON))
// fail(String.format(I18nSupport.getInternationalisedString("Translation - Failed Craft is obstructed")
// + " @ %d,%d,%d,%s", oldLocation.getX(), oldLocation.getY(), oldLocation.getZ(),
// oldLocation.toBukkit(craft.getWorld()).getBlock().getType()));

final Material testMaterial = newLocation.toBukkit(world).getBlock().getType();

Expand Down

0 comments on commit ce5640b

Please sign in to comment.