Interface ITree

All Superinterfaces:
IIndividual, IProductProducer, ISpecialtyProducer

public interface ITree extends IIndividual, IProductProducer, ISpecialtyProducer
  • Method Details

    • doEffect

      IEffectData[] doEffect(IEffectData[] storedData, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos)
    • doFX

      IEffectData[] doFX(IEffectData[] storedData, net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos)
      Unimplemented. Will eventually be used to display client-only effects.
      Parameters:
      storedData - The effect data used to store information about effect state.
      level - The world to display the effect in.
      pos - The position of the leaves block where the effect should be displayed.
      Returns:
      storedData
    • getSaplings

      List<ITree> getSaplings(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, @Nullable com.mojang.authlib.GameProfile playerProfile, float modifier)
    • produceStacks

      List<net.minecraft.world.item.ItemStack> produceStacks(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, int ripeningTime)
    • canStay

      boolean canStay(net.minecraft.world.level.BlockGetter level, net.minecraft.core.BlockPos pos)
      Returns:
      Boolean indicating whether a sapling can stay planted at the given position.
    • hasFruitLeaves

      boolean hasFruitLeaves()
      Returns:
      true this tree's fruits grow in its leaves, like the Apple Oak.
    • getRequiredMaturity

      int getRequiredMaturity()
      Returns:
      Integer denoting the maturity (block ticks) required for a sapling to attempt to grow into a tree.
    • getResilience

      int getResilience()
      Returns:
      Integer denoting how resilient leaf blocks are against adverse influences (i.e. caterpillars).
    • getTreeGenerator

      net.minecraft.world.level.levelgen.feature.Feature<net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration> getTreeGenerator(net.minecraft.world.level.WorldGenLevel level, net.minecraft.core.BlockPos pos, boolean wasBonemealed)
    • copy

      ITree copy()
      Description copied from interface: IIndividual
      Copies this individual and all of its properties EXCEPT FOR ITS MATE. Override this method in subclasses to make sure all information is copied.
      Specified by:
      copy in interface IIndividual
      Returns:
      An exact copy of this individual with NO MATE and NOT ANALYZED.
    • getType

      ITreeSpeciesType getType()
      Specified by:
      getType in interface IIndividual
      Returns:
      The species type of this individual.
    • getSpecies

      ITreeSpecies getSpecies()
      Specified by:
      getSpecies in interface IIndividual
      Returns:
      The active species of this individual. Prefer this method over getting it from IIndividual.getGenome().
    • getInactiveSpecies

      ITreeSpecies getInactiveSpecies()
      Specified by:
      getInactiveSpecies in interface IIndividual
      Returns:
      The inactive species of the individual. Prefer this method over getting it from IIndividual.getGenome().