Update #25 - Fixed world difficulty glitch

This commit is contained in:
lax1dude
2024-03-06 18:42:24 -08:00
parent 8ab65942c5
commit b8ce123807
7 changed files with 52 additions and 10 deletions

View File

@ -257,7 +257,11 @@ public class EaglerIntegratedServerWorker {
case IPCPacket0ASetWorldDifficulty.ID: {
IPCPacket0ASetWorldDifficulty pkt = (IPCPacket0ASetWorldDifficulty)ipc;
if(!isServerStopped()) {
currentProcess.setDifficultyForAllWorlds(EnumDifficulty.getDifficultyEnum(pkt.difficulty));
if(pkt.difficulty == (byte)-1) {
currentProcess.setDifficultyLockedForAllWorlds(true);
}else {
currentProcess.setDifficultyForAllWorlds(EnumDifficulty.getDifficultyEnum(pkt.difficulty));
}
}else {
logger.warn("Client tried to set difficulty while server was stopped");
}