public static class ApricornEvent.GrowthChance extends ApricornEvent
ApricornEvent
subclass event fired sporadically during an apricorn tree's growth.
The growthChance
sent into this event is the chance (between 0 and 1) that
on this random tick the apricorn tree will progress one stage. The default value is 0.25
Cancelling this event will prevent the apricorn tree from progressing a stage on this tick
ApricornEvent.ApricornPlanted, ApricornEvent.ApricornReady, ApricornEvent.ApricornWatered, ApricornEvent.GrowthChance, ApricornEvent.PickApricorn
Modifier and Type | Field and Description |
---|---|
TileEntityApricornTree |
tree
The tile entity representing the apricorn tree
|
apricorn, pos
Constructor and Description |
---|
GrowthChance(EnumApricorns apricorn,
net.minecraft.util.math.BlockPos pos,
TileEntityApricornTree tree,
float growthChance) |
Modifier and Type | Method and Description |
---|---|
float |
getGrowthChance()
Gets the current chance (0-1) that the apricorn tree will progress to the next stage during this random tick
|
void |
setGrowthChance(float growthChance)
Sets the chance (0-1) that the apricorn tree will progress to the next stage during this random tick.
|
public final TileEntityApricornTree tree
public GrowthChance(EnumApricorns apricorn, net.minecraft.util.math.BlockPos pos, TileEntityApricornTree tree, float growthChance)
public float getGrowthChance()
public void setGrowthChance(float growthChance)