Correctly ignore blocks replaced, fixes #2253

This commit is contained in:
PikaMug 2024-07-19 22:46:24 -04:00
parent f1b45fd584
commit f63ad2f575

View File

@ -107,7 +107,7 @@ public class BukkitBlockListener implements Listener {
if (progress < 0) { if (progress < 0) {
break; break;
} }
final ItemStack is = currentStage.getBlocksToBreak().get(i); final ItemStack is = currentStage.getBlocksToPlace().get(i);
if (event.getBlock().getType().equals(is.getType()) && is.getAmount() > 0) { if (event.getBlock().getType().equals(is.getType()) && is.getAmount() > 0) {
ItemStack goal = new ItemStack(is.getType(), 64); ItemStack goal = new ItemStack(is.getType(), 64);
for (final ItemStack stack : currentStage.getBlocksToPlace()) { for (final ItemStack stack : currentStage.getBlocksToPlace()) {
@ -140,7 +140,7 @@ public class BukkitBlockListener implements Listener {
if (progress < 0) { if (progress < 0) {
break; break;
} }
final ItemStack is = currentStage.getBlocksToBreak().get(i); final ItemStack is = currentStage.getBlocksToPlace().get(i);
if (event.getBlock().getType().equals(is.getType()) && is.getAmount() > 0) { if (event.getBlock().getType().equals(is.getType()) && is.getAmount() > 0) {
ItemStack goal = new ItemStack(is.getType(), 64); ItemStack goal = new ItemStack(is.getType(), 64);
for (final ItemStack stack : ((BukkitStage) quester.getCurrentStage(cq)).getBlocksToPlace()) { for (final ItemStack stack : ((BukkitStage) quester.getCurrentStage(cq)).getBlocksToPlace()) {