Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add check for max growth age special case
  • Loading branch information
Dreeam-qwq committed Apr 12, 2025
commit d28af472b33dfe2da00ac8746310bb1f27fccc46
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
@Override
public BlockState getStateForPlacement(RandomSource random) {
- return this.defaultBlockState().setValue(AGE, Integer.valueOf(random.nextInt(25)));
+ return this.defaultBlockState().setValue(AGE, Integer.valueOf(random.nextInt(getMaxGrowthAge()))); // Purpur - kelp, cave, weeping, and twisting configurable max growth age
+ return this.defaultBlockState().setValue(AGE, Integer.valueOf(getMaxGrowthAge() == 0 ? 0 : random.nextInt(getMaxGrowthAge()))); // Purpur - kelp, cave, weeping, and twisting configurable max growth age
}

@Override
Expand Down