mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 08:27:43 +01:00
Add check for max growth age special case (#1652)
This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
@Override
|
@Override
|
||||||
public BlockState getStateForPlacement(RandomSource random) {
|
public BlockState getStateForPlacement(RandomSource random) {
|
||||||
- return this.defaultBlockState().setValue(AGE, Integer.valueOf(random.nextInt(25)));
|
- 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
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user