Minor fixes and cleanup
This commit is contained in:
parent
e0c87ffda0
commit
f4075075f2
2 changed files with 7 additions and 5 deletions
|
@ -276,7 +276,7 @@ public class SongHandler {
|
|||
stage.checkSurvivalBuildStatus(currentSong);
|
||||
} catch (Stage.NotEnoughInstrumentsException e) {
|
||||
e.giveInstrumentSummary();
|
||||
reset();
|
||||
restoreStateAndReset();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -285,8 +285,11 @@ public class SongHandler {
|
|||
}
|
||||
|
||||
if (stage.nothingToBuild()) { // If there's still nothing to build after checking build status, switch to playing
|
||||
if (!Config.getConfig().survivalOnly) restoreBuildSlot();
|
||||
building = false;
|
||||
if (!Config.getConfig().survivalOnly) {
|
||||
setSurvivalIfNeeded();
|
||||
restoreBuildSlot();
|
||||
}
|
||||
stage.sendMovementPacketToStagePosition();
|
||||
SongPlayer.addChatMessage("§6Now playing §3" + currentSong.name);
|
||||
}
|
||||
|
@ -806,7 +809,7 @@ public class SongHandler {
|
|||
Comparable<?> value = entry.getValue();
|
||||
String propertyName = property.getName();
|
||||
String valueName = net.minecraft.util.Util.getValueAsString(property, value);
|
||||
if (propertyName == "half" && valueName == "upper") {
|
||||
if (propertyName.equals("half") && valueName.equals("upper")) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -859,6 +862,6 @@ public class SongHandler {
|
|||
}
|
||||
|
||||
public boolean isIdle() {
|
||||
return currentSong == null && currentPlaylist == null && songQueue.isEmpty() && cleaningUp == false;
|
||||
return currentSong == null && currentPlaylist == null && songQueue.isEmpty() && !cleaningUp;
|
||||
}
|
||||
}
|
|
@ -41,7 +41,6 @@ public class Stage {
|
|||
}
|
||||
|
||||
public void movePlayerToStagePosition() {
|
||||
player.getAbilities().allowFlying = true;
|
||||
player.getAbilities().flying = true;
|
||||
player.refreshPositionAndAngles(position.getX() + 0.5, position.getY() + 0.0, position.getZ() + 0.5, player.getYaw(), player.getPitch());
|
||||
player.setVelocity(Vec3d.ZERO);
|
||||
|
|
Loading…
Reference in a new issue