Skip to content

Commit

Permalink
Simplify Cave Generation tweak config values
Browse files Browse the repository at this point in the history
  • Loading branch information
ACGaming committed Oct 28, 2024
1 parent 3b50435 commit 23a0cc8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2283,23 +2283,23 @@ public static class CaveGenCategory
@Config.Comment("Sets custom values for the vanilla cave generation")
public boolean utCaveGenToggle = false;

@Config.Name("[2] Random Iterations")
@Config.Name("[2] Cave Size")
@Config.Comment
({
"Bound for the random chance to recursively generate rooms and tunnels",
"Size of cave systems",
"40 for pre-1.7 generation",
"15 for vanilla default"
})
public int utCaveGenIterations = 15;
public int utCaveGenSize = 15;

@Config.Name("[3] Random Iteration Breaks")
@Config.Name("[3] Cave Rarity")
@Config.Comment
({
"Bound for the random chance to stop recursively generate rooms and tunnels",
"Chance for generating cave systems",
"15 for pre-1.7 generation",
"7 for vanilla default"
})
public int utCaveGenIterationBreaks = 7;
public int utCaveGenRarity = 7;
}

public static class ChunkGenLimitCategory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
public abstract class UTCaveGenMixin
{
@ModifyArg(method = "recursiveGenerate", at = @At(value = "INVOKE", target = "Ljava/util/Random;nextInt(I)I", ordinal = 2))
public int utCaveGenIterations(int bound)
public int utCaveGenSize(int bound)
{
return UTConfigTweaks.WORLD.CAVE_GEN.utCaveGenIterations;
return UTConfigTweaks.WORLD.CAVE_GEN.utCaveGenSize;
}

@ModifyArg(method = "recursiveGenerate", at = @At(value = "INVOKE", target = "Ljava/util/Random;nextInt(I)I", ordinal = 3))
public int utCaveGenIterationBreaks(int bound)
public int utCaveGenRarity(int bound)
{
return UTConfigTweaks.WORLD.CAVE_GEN.utCaveGenIterationBreaks;
return UTConfigTweaks.WORLD.CAVE_GEN.utCaveGenRarity;
}
}

0 comments on commit 23a0cc8

Please sign in to comment.