mirror of
https://github.com/LeavesMC/Leaves.git
synced 2025-12-19 14:59:32 +00:00
26 lines
1.3 KiB
Diff
26 lines
1.3 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: MC_XiaoHei <xiaohei.xor7@outlook.com>
|
|
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();
|