Interface ITreeGenData

All Known Subinterfaces:
ITreeSpecies

public interface ITreeGenData
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
     
    int
    getGirth(IGenome genome)
     
    net.minecraft.core.BlockPos
    getGrowthPos(IGenome genome, net.minecraft.world.level.LevelAccessor level, net.minecraft.core.BlockPos pos, int expectedGirth, int expectedHeight)
     
    float
     
    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.
    boolean
    setLogBlock(IGenome genome, net.minecraft.world.level.LevelAccessor level, net.minecraft.core.BlockPos pos, net.minecraft.core.Direction facing)
     
    boolean
    trySpawnFruitBlock(net.minecraft.world.level.LevelAccessor level, net.minecraft.util.RandomSource rand, net.minecraft.core.BlockPos pos)
     
  • Method Details

    • getGirth

      int getGirth(IGenome genome)
    • getHeightModifier

      float getHeightModifier(IGenome genome)
    • 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 null if 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 - If true, ALWAYS use a block entity even if a "default" block can be used.
      Returns:
      true if 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

      boolean allowsFruitBlocks(IGenome genome)
    • trySpawnFruitBlock

      boolean trySpawnFruitBlock(net.minecraft.world.level.LevelAccessor level, net.minecraft.util.RandomSource rand, net.minecraft.core.BlockPos pos)
    • getDefaultGenome

      IGenome getDefaultGenome()