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);
|
stage.checkSurvivalBuildStatus(currentSong);
|
||||||
} catch (Stage.NotEnoughInstrumentsException e) {
|
} catch (Stage.NotEnoughInstrumentsException e) {
|
||||||
e.giveInstrumentSummary();
|
e.giveInstrumentSummary();
|
||||||
reset();
|
restoreStateAndReset();
|
||||||
return;
|
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 (stage.nothingToBuild()) { // If there's still nothing to build after checking build status, switch to playing
|
||||||
if (!Config.getConfig().survivalOnly) restoreBuildSlot();
|
|
||||||
building = false;
|
building = false;
|
||||||
|
if (!Config.getConfig().survivalOnly) {
|
||||||
|
setSurvivalIfNeeded();
|
||||||
|
restoreBuildSlot();
|
||||||
|
}
|
||||||
stage.sendMovementPacketToStagePosition();
|
stage.sendMovementPacketToStagePosition();
|
||||||
SongPlayer.addChatMessage("§6Now playing §3" + currentSong.name);
|
SongPlayer.addChatMessage("§6Now playing §3" + currentSong.name);
|
||||||
}
|
}
|
||||||
|
@ -806,7 +809,7 @@ public class SongHandler {
|
||||||
Comparable<?> value = entry.getValue();
|
Comparable<?> value = entry.getValue();
|
||||||
String propertyName = property.getName();
|
String propertyName = property.getName();
|
||||||
String valueName = net.minecraft.util.Util.getValueAsString(property, value);
|
String valueName = net.minecraft.util.Util.getValueAsString(property, value);
|
||||||
if (propertyName == "half" && valueName == "upper") {
|
if (propertyName.equals("half") && valueName.equals("upper")) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -859,6 +862,6 @@ public class SongHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isIdle() {
|
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() {
|
public void movePlayerToStagePosition() {
|
||||||
player.getAbilities().allowFlying = true;
|
|
||||||
player.getAbilities().flying = true;
|
player.getAbilities().flying = true;
|
||||||
player.refreshPositionAndAngles(position.getX() + 0.5, position.getY() + 0.0, position.getZ() + 0.5, player.getYaw(), player.getPitch());
|
player.refreshPositionAndAngles(position.getX() + 0.5, position.getY() + 0.0, position.getZ() + 0.5, player.getYaw(), player.getPitch());
|
||||||
player.setVelocity(Vec3d.ZERO);
|
player.setVelocity(Vec3d.ZERO);
|
||||||
|
|
Loading…
Reference in a new issue