From 0467d7146697520830bf052d186ea066d1d8cb02 Mon Sep 17 00:00:00 2001 From: Paint_Ninja Date: Wed, 1 May 2024 22:27:28 +0100 Subject: [PATCH] Remove zombie chance config options (#9950) --- .../world/entity/monster/Zombie.java.patch | 18 ------------------ .../net/minecraftforge/common/ForgeConfig.java | 16 ---------------- 2 files changed, 34 deletions(-) diff --git a/patches/minecraft/net/minecraft/world/entity/monster/Zombie.java.patch b/patches/minecraft/net/minecraft/world/entity/monster/Zombie.java.patch index 80fb4ecea0..f13fb5f27a 100644 --- a/patches/minecraft/net/minecraft/world/entity/monster/Zombie.java.patch +++ b/patches/minecraft/net/minecraft/world/entity/monster/Zombie.java.patch @@ -73,21 +73,3 @@ if (!this.isSilent()) { p_219160_.levelEvent(null, 1026, this.blockPosition(), 0); } -@@ -487,7 +_,7 @@ - } - - public static boolean getSpawnAsBabyOdds(RandomSource p_219163_) { -- return p_219163_.nextFloat() < 0.05F; -+ return p_219163_.nextFloat() < net.minecraftforge.common.ForgeConfig.SERVER.zombieBabyChance.get(); - } - - protected void handleAttributes(float p_34340_) { -@@ -510,7 +_,7 @@ - } - - protected void randomizeReinforcementsChance() { -- this.getAttribute(Attributes.SPAWN_REINFORCEMENTS_CHANCE).setBaseValue(this.random.nextDouble() * 0.1F); -+ this.getAttribute(Attributes.SPAWN_REINFORCEMENTS_CHANCE).setBaseValue(this.random.nextDouble() * net.minecraftforge.common.ForgeConfig.SERVER.zombieBaseSummonChance.get()); - } - - @Override diff --git a/src/main/java/net/minecraftforge/common/ForgeConfig.java b/src/main/java/net/minecraftforge/common/ForgeConfig.java index 9e83c51fbb..11bece2132 100644 --- a/src/main/java/net/minecraftforge/common/ForgeConfig.java +++ b/src/main/java/net/minecraftforge/common/ForgeConfig.java @@ -12,7 +12,6 @@ import org.apache.commons.lang3.tuple.Pair; import org.apache.logging.log4j.LogManager; import net.minecraftforge.common.ForgeConfigSpec.BooleanValue; -import net.minecraftforge.common.ForgeConfigSpec.DoubleValue; import net.minecraftforge.common.ForgeConfigSpec.ConfigValue; public class ForgeConfig { @@ -23,9 +22,6 @@ public class ForgeConfig { public final BooleanValue fullBoundingBoxLadders; - public final DoubleValue zombieBaseSummonChance; - public final DoubleValue zombieBabyChance; - public final ConfigValue permissionHandler; public final BooleanValue advertiseDedicatedServerToLan; @@ -52,18 +48,6 @@ public class ForgeConfig { .worldRestart() .define("fullBoundingBoxLadders", false); - zombieBaseSummonChance = builder - .comment("Base zombie summoning spawn chance. Allows changing the bonus zombie summoning mechanic.") - .translation("forge.configgui.zombieBaseSummonChance") - .worldRestart() - .defineInRange("zombieBaseSummonChance", 0.1D, 0.0D, 1.0D); - - zombieBabyChance = builder - .comment("Chance that a zombie (or subclass) is a baby. Allows changing the zombie spawning mechanic.") - .translation("forge.configgui.zombieBabyChance") - .worldRestart() - .defineInRange("zombieBabyChance", 0.05D, 0.0D, 1.0D); - permissionHandler = builder .comment("The permission handler used by the server. Defaults to forge:default_handler if no such handler with that name is registered.") .translation("forge.configgui.permissionHandler")