Skip to content
This repository was archived by the owner on Apr 13, 2025. It is now read-only.

Commit d28af47

Browse files
committed
Add check for max growth age special case
1 parent 65b1288 commit d28af47

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

purpur-server/minecraft-patches/sources/net/minecraft/world/level/block/GrowingPlantHeadBlock.java.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
@Override
66
public BlockState getStateForPlacement(RandomSource random) {
77
- return this.defaultBlockState().setValue(AGE, Integer.valueOf(random.nextInt(25)));
8-
+ return this.defaultBlockState().setValue(AGE, Integer.valueOf(random.nextInt(getMaxGrowthAge()))); // Purpur - kelp, cave, weeping, and twisting configurable max growth age
8+
+ return this.defaultBlockState().setValue(AGE, Integer.valueOf(getMaxGrowthAge() == 0 ? 0 : random.nextInt(getMaxGrowthAge()))); // Purpur - kelp, cave, weeping, and twisting configurable max growth age
99
}
1010

1111
@Override

0 commit comments

Comments
 (0)