-
-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bb803a9
commit c279af4
Showing
2 changed files
with
30 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: MC_XiaoHei <[email protected]> | ||
Date: Mon, 29 Jul 2024 08:20:31 +0800 | ||
Subject: [PATCH] Fix fortress mob spawn | ||
|
||
|
||
diff --git a/src/main/java/net/minecraft/world/level/biome/MobSpawnSettings.java b/src/main/java/net/minecraft/world/level/biome/MobSpawnSettings.java | ||
index cb7465ed9bdebe1b31f02d11725e75ff8b44ca66..f56da8b6741b81b7a51d0d9cb89a2192e059f6eb 100644 | ||
--- a/src/main/java/net/minecraft/world/level/biome/MobSpawnSettings.java | ||
+++ b/src/main/java/net/minecraft/world/level/biome/MobSpawnSettings.java | ||
@@ -176,6 +176,14 @@ public class MobSpawnSettings { | ||
this.maxCount = maxGroupSize; | ||
} | ||
|
||
+ // Leaves start - fix fortress mob spawn | ||
+ @Override | ||
+ public boolean equals(Object obj) { | ||
+ if(!org.leavesmc.leaves.LeavesConfig.fixFortressMobSpawn || !(obj instanceof SpawnerData other)) return super.equals(obj); | ||
+ return this.type == other.type && this.minCount == other.minCount && this.maxCount == other.maxCount; | ||
+ } | ||
+ // Leaves end - fix fortress mob spawn | ||
+ | ||
@Override | ||
public String toString() { | ||
return EntityType.getKey(this.type) + "*(" + this.minCount + "-" + this.maxCount + "):" + this.getWeight(); |