Package forestry.api.arboriculture
Interface ITreeGenData
- All Known Subinterfaces:
ITreeSpecies
public interface ITreeGenData
-
Method Summary
Modifier and TypeMethodDescriptionbooleanallowsFruitBlocks(IGenome genome) intnet.minecraft.core.BlockPosgetGrowthPos(IGenome genome, net.minecraft.world.level.LevelAccessor level, net.minecraft.core.BlockPos pos, int expectedGirth, int expectedHeight) floatgetHeightModifier(IGenome genome) booleansetLeaves(IGenome genome, net.minecraft.world.level.LevelAccessor level, net.minecraft.core.BlockPos pos, net.minecraft.util.RandomSource random, boolean convertBlockEntity) Places a leaf block for this species with genetic data included.booleansetLogBlock(IGenome genome, net.minecraft.world.level.LevelAccessor level, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction facing) booleantrySpawnFruitBlock(net.minecraft.world.level.LevelAccessor level, net.minecraft.util.RandomSource rand, net.minecraft.core.BlockPos pos)
-
Method Details
-
getGirth
-
getHeightModifier
-
getGrowthPos
@Nullable net.minecraft.core.BlockPos getGrowthPos(IGenome genome, net.minecraft.world.level.LevelAccessor level, net.minecraft.core.BlockPos pos, int expectedGirth, int expectedHeight) - Returns:
- Position that this tree can grow, or
nullif it cannot grow. May be different from pos if there are multiple saplings.
-
setLeaves
boolean setLeaves(IGenome genome, net.minecraft.world.level.LevelAccessor level, net.minecraft.core.BlockPos pos, net.minecraft.util.RandomSource random, boolean convertBlockEntity) Places a leaf block for this species with genetic data included.- Parameters:
genome- The genome to use for the leaves.level- The level.pos- The position to set the leaves at.random- Random number generation.convertBlockEntity- Iftrue, ALWAYS use a block entity even if a "default" block can be used.- Returns:
trueif the leaf block was placed.
-
setLogBlock
boolean setLogBlock(IGenome genome, net.minecraft.world.level.LevelAccessor level, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction facing) -
allowsFruitBlocks
-
trySpawnFruitBlock
boolean trySpawnFruitBlock(net.minecraft.world.level.LevelAccessor level, net.minecraft.util.RandomSource rand, net.minecraft.core.BlockPos pos) -
getDefaultGenome
IGenome getDefaultGenome()
-