Fix bad diff in wandering trader spawn rate patch from .4 update

This commit is contained in:
Nassim Jahnke 2023-03-23 14:35:17 +01:00
parent e8b82590d0
commit 92f872c146
No known key found for this signature in database
GPG key ID: 6BE3B555EBC5982B

View file

@ -11,10 +11,10 @@ in IWorldServerData are removed as they were only used in certain places, with h
values used in other places.
diff --git a/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java b/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java
index 83d0db5a9f03ee3ead10d9f61e5f425330eae0e9..ae9f9112ce9bec82e7571f679017f1723d9eb982 100644
index 83d0db5a9f03ee3ead10d9f61e5f425330eae0e9..5d199fe497bd852827d3d18fb7566a09e70331a3 100644
--- a/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java
+++ b/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java
@@ -40,43 +40,54 @@ public class WanderingTraderSpawner implements CustomSpawner {
@@ -40,43 +40,53 @@ public class WanderingTraderSpawner implements CustomSpawner {
public WanderingTraderSpawner(ServerLevelData properties) {
this.serverLevelData = properties;
@ -73,9 +73,9 @@ index 83d0db5a9f03ee3ead10d9f61e5f425330eae0e9..ae9f9112ce9bec82e7571f679017f172
int i = this.spawnChance;
- this.spawnChance = Mth.clamp(this.spawnChance + 25, 25, 75);
this.serverLevelData.setWanderingTraderSpawnChance(this.spawnChance);
- this.serverLevelData.setWanderingTraderSpawnChance(this.spawnChance);
+ // this.serverLevelData.setWanderingTraderSpawnChance(this.spawnChance); // Paper - We don't need to save this value to disk if it gets set back to a hardcoded value anyways
+ this.spawnChance = Mth.clamp(i + world.paperConfig().entities.spawning.wanderingTrader.spawnChanceFailureIncrement, world.paperConfig().entities.spawning.wanderingTrader.spawnChanceMin, world.paperConfig().entities.spawning.wanderingTrader.spawnChanceMax);
+ //this.serverLevelData.setWanderingTraderSpawnChance(this.spawnChance); // Paper - We don't need to save this value to disk if it gets set back to a hardcoded value anyways
if (this.random.nextInt(100) > i) {
return 0;
} else if (this.spawn(world)) {