28 lines
741 B
Java
28 lines
741 B
Java
/*
|
|
* Decompiled with CFR 0.152.
|
|
*/
|
|
package net.minecraft.world.level.block;
|
|
|
|
import net.minecraft.util.RandomSource;
|
|
import net.minecraft.world.level.block.state.BlockState;
|
|
|
|
public class NetherVines {
|
|
private static final double BONEMEAL_GROW_PROBABILITY_DECREASE_RATE = 0.826;
|
|
public static final double GROW_PER_TICK_PROBABILITY = 0.1;
|
|
|
|
public static boolean isValidGrowthState(BlockState state) {
|
|
return state.isAir();
|
|
}
|
|
|
|
public static int getBlocksToGrowWhenBonemealed(RandomSource random) {
|
|
double growProbabilty = 1.0;
|
|
int count = 0;
|
|
while (random.nextDouble() < growProbabilty) {
|
|
growProbabilty *= 0.826;
|
|
++count;
|
|
}
|
|
return count;
|
|
}
|
|
}
|
|
|