Changed block breaking criteria
This commit is contained in:
parent
420bd9502b
commit
50c661ae64
2 changed files with 10 additions and 2 deletions
|
@ -202,7 +202,7 @@ public class SongHandler {
|
|||
if (stage.hasBreakingModification()) {
|
||||
stage.checkBuildStatus(currentSong);
|
||||
}
|
||||
if (!stage.missingNotes.isEmpty()) {
|
||||
if (!stage.nothingToBuild()) {
|
||||
building = true;
|
||||
setCreativeIfNeeded();
|
||||
stage.movePlayerToStagePosition();
|
||||
|
|
|
@ -153,7 +153,10 @@ public class Stage {
|
|||
|
||||
requiredBreaks = breakLocations
|
||||
.stream()
|
||||
.filter((bp) -> Block.getRawIdFromState(SongPlayer.MC.world.getBlockState(bp)) != 0)
|
||||
.filter((bp) -> {
|
||||
BlockState bs = SongPlayer.MC.world.getBlockState(bp);
|
||||
return !bs.isAir() && !bs.getMaterial().isLiquid();
|
||||
})
|
||||
.sorted((a, b) -> {
|
||||
// First sort by y
|
||||
if (a.getY() < b.getY()) {
|
||||
|
@ -223,6 +226,11 @@ public class Stage {
|
|||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
BlockState aboveBs = SongPlayer.MC.world.getBlockState(entry.getValue().up());
|
||||
if (!aboveBs.isAir() && !aboveBs.getMaterial().isLiquid()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue