fix a bunch of compile issues

This commit is contained in:
Jake Potrebic
2024-12-14 20:15:49 -08:00
parent 7ac9b00916
commit 0262d9a165
19 changed files with 29 additions and 37 deletions

View File

@@ -331,7 +331,7 @@
+ }
+ worlddata.checkName(name); // CraftBukkit - Migration did not rewrite the level.dat; This forces 1.8 to take the last loaded world as respawn (in this case the end)
+ if (this.options.has("forceUpgrade")) {
+ net.minecraft.server.Main.forceUpgrade(worldSession, DataFixers.getDataFixer(), this.options.has("eraseCache"), () -> {
+ net.minecraft.server.Main.forceUpgrade(worldSession, net.minecraft.util.datafix.DataFixers.getDataFixer(), this.options.has("eraseCache"), () -> {
+ return true;
+ }, iregistrycustom_dimension, this.options.has("recreateRegionFiles"));
+ }
@@ -1061,7 +1061,7 @@
- this.getPlayerList().getPlayers().forEach(this::sendDifficultyUpdate);
+ // Paper start - per level difficulty
+ public void setDifficulty(ServerLevel level, Difficulty difficulty, boolean forceUpdate) {
+ net.minecraft.world.level.storage.PrimaryLevelData worldData = level.serverLevelData;
+ net.minecraft.world.level.storage.PrimaryLevelData worldData = (net.minecraft.world.level.storage.PrimaryLevelData) level.serverLevelData;
+ if (forceUpdate || !worldData.isDifficultyLocked()) {
+ worldData.setDifficulty(worldData.isHardcore() ? Difficulty.HARD : difficulty);
+ level.setSpawnSettings(worldData.getDifficulty() != Difficulty.PEACEFUL && ((net.minecraft.server.dedicated.DedicatedServer) this).settings.getProperties().spawnMonsters);