Skip to content

Commit

Permalink
hollow log chance config
Browse files Browse the repository at this point in the history
  • Loading branch information
MehVahdJukaar committed Jul 28, 2024
1 parent 7687628 commit ed79698
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ed79698

Please sign in to comment.