Added fail safes against bonus drop meta not being cleaned up

This commit is contained in:
nossr50
2023-05-29 14:34:47 -07:00
parent 44ab8d93ab
commit e9a020565f
6 changed files with 28 additions and 14 deletions

View File

@@ -35,7 +35,7 @@ public class PistonTrackerTask extends BukkitRunnable {
Block nextBlock = b.getRelative(direction);
if (nextBlock.hasMetadata(MetadataConstants.METADATA_KEY_PISTON_TRACKING)) {
mcMMO.getPlaceStore().setTrue(nextBlock);
BlockUtils.setUnnaturalBlock(nextBlock);
nextBlock.removeMetadata(MetadataConstants.METADATA_KEY_PISTON_TRACKING, mcMMO.p);
}
else if (mcMMO.getPlaceStore().isTrue(nextBlock)) {

View File

@@ -30,6 +30,6 @@ public class StickyPistonTrackerTask extends BukkitRunnable {
// The sticky piston actually pulled the block so move the PlaceStore data
mcMMO.getPlaceStore().setFalse(movedBlock.getRelative(direction));
mcMMO.getPlaceStore().setTrue(movedBlock);
BlockUtils.setUnnaturalBlock(movedBlock);
}
}