mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-21 18:37:42 +01:00
Preliminary update to 1.17.1
This commit is contained in:
@@ -6,7 +6,7 @@ Subject: [PATCH] Allow toggling special MobSpawners per world
|
||||
In vanilla, these are all hardcoded on for world type 0 (overworld) and hardcoded off for every other world type. Default config behaviour matches this.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index f3a1eeb389e790d7c482626f5aee872ab298af66..7620030f795604c49596ce972c0b39438341e4df 100644
|
||||
index f3aa58b31c4e3384c3315e53de4e9e4cc6181adc..dd8248b89ee8694a18fffc4d880c92038d725cf7 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -83,6 +83,7 @@ import net.minecraft.world.entity.MobCategory;
|
||||
@@ -27,7 +27,7 @@ index f3a1eeb389e790d7c482626f5aee872ab298af66..7620030f795604c49596ce972c0b3943
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.entity.raid.Raid;
|
||||
import net.minecraft.world.entity.raid.Raids;
|
||||
@@ -133,6 +136,8 @@ import net.minecraft.world.level.gameevent.GameEvent;
|
||||
@@ -132,6 +135,8 @@ import net.minecraft.world.level.gameevent.GameEvent;
|
||||
import net.minecraft.world.level.gameevent.GameEventListenerRegistrar;
|
||||
import net.minecraft.world.level.gameevent.vibrations.VibrationPath;
|
||||
import net.minecraft.world.level.levelgen.Heightmap;
|
||||
@@ -36,7 +36,7 @@ index f3a1eeb389e790d7c482626f5aee872ab298af66..7620030f795604c49596ce972c0b3943
|
||||
import net.minecraft.world.level.levelgen.feature.StructureFeature;
|
||||
import net.minecraft.world.level.levelgen.structure.BoundingBox;
|
||||
import net.minecraft.world.level.levelgen.structure.StructureStart;
|
||||
@@ -511,7 +516,24 @@ public class ServerLevel extends net.minecraft.world.level.Level implements Worl
|
||||
@@ -341,7 +346,24 @@ public class ServerLevel extends net.minecraft.world.level.Level implements Worl
|
||||
this.dragonParts = new Int2ObjectOpenHashMap();
|
||||
this.tickTime = flag1;
|
||||
this.server = minecraftserver;
|
||||
@@ -94,10 +94,10 @@ index f8ede3588bfda9a7d4d5807311a3e9c2651fd0a3..56967cef0f184def046935e20148574f
|
||||
if (NaturalSpawner.isSpawnPositionOk(SpawnPlacements.Type.ON_GROUND, world, blockposition2, EntityType.WANDERING_TRADER)) {
|
||||
blockposition1 = blockposition2;
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
index 7ef7877013068fd76545b30d1afea899ff9298a6..8ae9ca467ea1d8803b8a97a2495b1edb8ef8dc40 100644
|
||||
index ae8fb1abb64b2f2d5a6580ad5e708072576da1a5..db422ed3d1691c48ddcf06cec0cdb9be7ae91d75 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
@@ -72,6 +72,12 @@ public class PurpurWorldConfig {
|
||||
@@ -71,6 +71,12 @@ public class PurpurWorldConfig {
|
||||
return PurpurConfig.config.getBoolean("world-settings." + worldName + "." + path, PurpurConfig.config.getBoolean("world-settings.default." + path));
|
||||
}
|
||||
|
||||
@@ -110,7 +110,7 @@ index 7ef7877013068fd76545b30d1afea899ff9298a6..8ae9ca467ea1d8803b8a97a2495b1edb
|
||||
private double getDouble(String path, double def) {
|
||||
PurpurConfig.config.addDefault("world-settings.default." + path, def);
|
||||
return PurpurConfig.config.getDouble("world-settings." + worldName + "." + path, PurpurConfig.config.getDouble("world-settings.default." + path));
|
||||
@@ -221,6 +227,21 @@ public class PurpurWorldConfig {
|
||||
@@ -220,6 +226,21 @@ public class PurpurWorldConfig {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user