diff --git a/patches/minecraft/net/minecraft/world/WorldType.java.patch b/patches/minecraft/net/minecraft/world/WorldType.java.patch index d52034211b..76d0ee2ff6 100644 --- a/patches/minecraft/net/minecraft/world/WorldType.java.patch +++ b/patches/minecraft/net/minecraft/world/WorldType.java.patch @@ -60,7 +60,7 @@ + { + this(getNextID(), name); + } -+ ++ + /** * Called when 'Create New World' button is pressed before starting game */ @@ -73,7 +73,7 @@ + */ + public int getSpawnFuzz() + { -+ return 20; ++ return net.minecraftforge.common.ForgeModContainer.defaultSpawnFuzz; + } + + /** @@ -98,7 +98,7 @@ + { + return this == field_77138_c; + } -+ ++ + + /** + * Get the height to render the clouds for this world type @@ -111,7 +111,7 @@ + + /** + * Creates the GenLayerBiome used for generating the world -+ * ++ * + * @param worldSeed The world seed + * @param parentLayer The parent layer to feed into any layer you return + * @return A GenLayer that will return ints representing the Biomes to be generated, see GenLayerBiome diff --git a/src/main/java/net/minecraftforge/common/ForgeModContainer.java b/src/main/java/net/minecraftforge/common/ForgeModContainer.java index 7ae194930e..907dc2e26c 100644 --- a/src/main/java/net/minecraftforge/common/ForgeModContainer.java +++ b/src/main/java/net/minecraftforge/common/ForgeModContainer.java @@ -67,6 +67,7 @@ public class ForgeModContainer extends DummyModContainer implements WorldAccessC public static boolean shouldSortRecipies = true; public static boolean disableVersionCheck = false; public static boolean enableStencilBits = true; + public static int defaultSpawnFuzz = 20; private static Configuration config; @@ -223,6 +224,13 @@ public class ForgeModContainer extends DummyModContainer implements WorldAccessC enableStencilBits = prop.getBoolean(true); propOrder.add(prop.getName()); + prop = config.get(Configuration.CATEGORY_GENERAL, "defaultSpawnFuzz", 20, + "The spawn fuzz when a player respawns in the world, this is controlable by WorldType, this config option is for the default overworld.", + 1, Integer.MAX_VALUE); + prop.setLanguageKey("forge.configgui.spawnfuzz").setRequiresWorldRestart(false); + defaultSpawnFuzz = prop.getInt(20); + propOrder.add(prop.getName()); + config.setCategoryPropertyOrder(CATEGORY_GENERAL, propOrder); if (config.hasChanged()) diff --git a/src/main/resources/assets/forge/lang/en_US.lang b/src/main/resources/assets/forge/lang/en_US.lang index 13ea1c4711..25759ef835 100644 --- a/src/main/resources/assets/forge/lang/en_US.lang +++ b/src/main/resources/assets/forge/lang/en_US.lang @@ -41,6 +41,7 @@ forge.configgui.zombieBabyChance=Zombie Baby Chance forge.configgui.zombieBaseSummonChance.tooltip=Base zombie summoning spawn chance. Allows changing the bonus zombie summoning mechanic. forge.configgui.zombieBaseSummonChance=Zombie Summon Chance forge.configgui.stencilbits=Enable GL Stencil Bits +forge.configgui.spawnfuzz=Respawn Fuzz Diameter forge.configgui.modID.tooltip=The mod ID that you want to define override settings for. forge.configgui.modID=Mod ID