mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-27 23:27:59 +01:00
Adjust oats growth rate to be half that of vanilla. Closes #86
This commit is contained in:
parent
1c58ae9539
commit
ef325aeab0
1 changed files with 3 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue