mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-25 12:05:53 +01:00
Fix bad diff in wandering trader spawn rate patch from .4 update
This commit is contained in:
parent
e8b82590d0
commit
92f872c146
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user