Interface ITreeSpeciesType

All Superinterfaces:
IBreedingTrackerHandler, ISpeciesType<ITreeSpecies,ITree>

public interface ITreeSpeciesType extends ISpeciesType<ITreeSpecies,ITree>
  • Method Details

    • getBreedingTracker

      IArboristTracker getBreedingTracker(net.minecraft.world.level.LevelAccessor level, @Nullable com.mojang.authlib.GameProfile profile)
      Description copied from interface: ISpeciesType
      Gets the player's breeding tracker for this species type.
      Specified by:
      getBreedingTracker in interface ISpeciesType<ITreeSpecies,ITree>
      Parameters:
      level - The world instance where the breeding tracker is stored.
      profile - The player whose breeding tracker should be returned.
      Returns:
      The breeding tracker for species of this type.
    • registerLeafTickHandler

      void registerLeafTickHandler(ILeafTickHandler handler)
      Register a leaf random tick handler. Used for butterfly spawner.
    • getLeafTickHandlers

      Collection<ILeafTickHandler> getLeafTickHandlers()
    • getTree

      @Nullable ITree getTree(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos)
    • getTree

      ITree getTree(IGenome genome)
    • getTree

      @Nullable ITree getTree(net.minecraft.world.level.block.entity.BlockEntity tileEntity)
    • plantSapling

      boolean plantSapling(net.minecraft.world.level.Level level, ITree tree, com.mojang.authlib.GameProfile owner, net.minecraft.core.BlockPos pos)
    • setFruitBlock

      boolean setFruitBlock(net.minecraft.world.level.LevelAccessor level, IGenome genome, IFruit fruit, float yield, net.minecraft.core.BlockPos pos)
    • getVanillaIndividual

      @Nullable ITree getVanillaIndividual(net.minecraft.world.level.block.state.BlockState state)
      Tries to get genetic information of a species from a mundane/vanilla block, like from Oak Leaves to Apple Oak Leaves. Does not affect the block in the world, just returns an individual.
      Parameters:
      state - A vanilla block, like oak leaves.
      Returns:
      The individual for this vanilla block, or null if none exists for this block.
    • getVanillaIndividual

      @Nullable ITree getVanillaIndividual(net.minecraft.world.item.Item item)
      Tries to get genetic information of a species from a mundane/vanilla item, like Oak Sapling to Apple Oak Sapling. Does not affect the item, just returns a default individual.
      Parameters:
      item - A mundane/vanilla item like Oak Sapling.
      Returns:
      The individual for this vanilla item, or null if none exists for this item.