JavaScript is disabled on your browser.
Method Summary
All Methods Instance Methods Abstract Methods
net.minecraft.data.DataProvider
Creates a data provider that generates tree species JSON.
getBreedingTracker (net.minecraft.world.level.LevelAccessor level,
com.mojang.authlib.GameProfile profile)
Gets the player's breeding tracker for this species type.
getFruit (net.minecraft.resources.ResourceLocation id)
getTree (net.minecraft.world.level.block.entity.BlockEntity tileEntity)
getTree (net.minecraft.world.level.Level level,
net.minecraft.core.BlockPos pos)
Tries to get genetic information of a species from a mundane/vanilla item, like Oak Sapling to Apple Oak Sapling.
Tries to get genetic information of a species from a mundane/vanilla block, like from Oak Leaves to Apple Oak Leaves.
boolean
plantSapling (net.minecraft.world.level.Level level,
ITree tree,
com.mojang.authlib.GameProfile owner,
net.minecraft.core.BlockPos pos)
void
Register a leaf random tick handler.
boolean
setFruitBlock (net.minecraft.world.level.LevelAccessor level,
IGenome genome,
IFruit fruit,
float yield,
net.minecraft.core.BlockPos pos)
Methods inherited from interface forestry.api.core.genetics.ISpeciesType
cast , createBreedingTracker , createBreedingTracker , createDefaultStack , createRandomIndividual , createStack , createStack , getAllSpecies , getAllSpeciesIds , getBreedingTrackerFile , getDefaultSpecies , getDefaultStage , getDisplayName , getIndividualCodec , getKaryotype , getLifeStage , getLifeStages , getMutations , getRandomSpecies , getResearchBounty , getResearchSuitability , getSpecies , getSpeciesCount , getSpeciesSafe , getTranslationKey , getTypeForMutation , handleSpeciesRegistration , id , initializeBreedingTracker , isMember , isMember , onSpeciesRegistered
Method Details
getBreedingTracker
IArboristTracker getBreedingTracker (net.minecraft.world.level.LevelAccessor level,
@Nullable
com.mojang.authlib.GameProfile profile)
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.
getFruit
IFruit getFruit (net.minecraft.resources.ResourceLocation id)
Returns:
The fruit registered with the given ID. Backs the fruits reference chromosome.
getFruitSafe
@Nullable
IFruit getFruitSafe (net.minecraft.resources.ResourceLocation id)
Returns:
The fruit registered with the given ID, or null if none is registered (graceful fallback variant).
getTreeEffect
ITreeEffect getTreeEffect (net.minecraft.resources.ResourceLocation id)
Returns:
The tree effect registered with the given ID. Backs the tree_effect reference chromosome.
registerLeafTickHandler
Register a leaf random tick handler. Used for butterfly spawner.
getTree
@Nullable
ITree getTree (net.minecraft.world.level.Level level,
net.minecraft.core.BlockPos pos)
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.
createSpeciesProvider
Creates a data provider that generates tree species JSON.
Parameters:
output - The pack output to generate into
registries - The registries used to encode the species
species - The action that registers the species to generate
Returns:
The data provider to add to the data generator