From ef325aeab034eab0ab4d0a40dec0896155ee7e5a Mon Sep 17 00:00:00 2001 From: Sollace Date: Thu, 15 Dec 2022 10:13:08 +0000 Subject: [PATCH] Adjust oats growth rate to be half that of vanilla. Closes #86 --- .../com/minelittlepony/unicopia/block/SegmentedCropBlock.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/minelittlepony/unicopia/block/SegmentedCropBlock.java b/src/main/java/com/minelittlepony/unicopia/block/SegmentedCropBlock.java index c792588b..ebd7f502 100644 --- a/src/main/java/com/minelittlepony/unicopia/block/SegmentedCropBlock.java +++ b/src/main/java/com/minelittlepony/unicopia/block/SegmentedCropBlock.java @@ -16,6 +16,8 @@ import net.minecraft.world.*; public class SegmentedCropBlock extends CropBlock implements SegmentedBlock { + static final float BASE_GROWTH_CHANCE = /*1 in */ 50F /* chance, half the speed of regular crops */; + private final ItemConvertible seeds; @Nullable @@ -114,7 +116,7 @@ public class SegmentedCropBlock extends CropBlock implements SegmentedBlock { int age = getAge(state); if (age < getMaxAge()) { float moisture = CropBlock.getAvailableMoisture(world.getBlockState(base).getBlock(), world, base); - if (random.nextInt((int)(25F / moisture) + 1) == 0) { + if (random.nextInt((int)(BASE_GROWTH_CHANCE / moisture) + 1) == 0) { world.setBlockState(pos, withAge(age + 1), Block.NOTIFY_LISTENERS); propagateGrowth(world, pos, state); }