From ed79698ca2c06355b618a1ecb65a31555c59fba9 Mon Sep 17 00:00:00 2001 From: MehVahdJukaar Date: Sun, 28 Jul 2024 10:39:27 +0200 Subject: [PATCH] hollow log chance config --- .../quark/content/world/gen/FallenLogGenerator.java | 2 +- .../quark/content/world/module/FallenLogsModule.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/violetmoon/quark/content/world/gen/FallenLogGenerator.java b/src/main/java/org/violetmoon/quark/content/world/gen/FallenLogGenerator.java index 607aaf968..8d9f24433 100644 --- a/src/main/java/org/violetmoon/quark/content/world/gen/FallenLogGenerator.java +++ b/src/main/java/org/violetmoon/quark/content/world/gen/FallenLogGenerator.java @@ -154,7 +154,7 @@ private static void placeDecorIfPossible(LevelAccessor level, RandomSource rand, private static Block getLogBlockForPos(LevelAccessor level, BlockPos pos) { Block base = getBaseLogBlockForPos(level, pos); - if (FallenLogsModule.useHollowLogs && HollowLogsModule.staticEnabled) { + if (HollowLogsModule.staticEnabled && level.getRandom().nextFloat() < FallenLogsModule.hollowChance){ Block hollow = HollowLogsModule.logMap.get(base); if (hollow != null) return hollow; diff --git a/src/main/java/org/violetmoon/quark/content/world/module/FallenLogsModule.java b/src/main/java/org/violetmoon/quark/content/world/module/FallenLogsModule.java index 8d65e39e2..3a7045a1c 100644 --- a/src/main/java/org/violetmoon/quark/content/world/module/FallenLogsModule.java +++ b/src/main/java/org/violetmoon/quark/content/world/module/FallenLogsModule.java @@ -30,9 +30,9 @@ public class FallenLogsModule extends ZetaModule { @Config public static DimensionConfig dimensions = new DimensionConfig(false, "minecraft:overworld"); - - @Config(description = "Requires the Hollow Logs module to be enabled too") - public static boolean useHollowLogs = true; + + @Config(description = "Percentage of fallen logs spawning as hollow. Requires Hollow Logs Module to be enabled") + public static double hollowChance = 0.7; @Config public static int rarity = 5;