Package forestry.api.genetics
Interface IBreedingTracker
- All Known Subinterfaces:
IApiaristTracker,IArboristTracker,ILepidopteristTracker
public interface IBreedingTracker
Keeps track of who bred, discovered, and researched which species in a world.
-
Method Summary
Modifier and TypeMethodDescriptionCollection<net.minecraft.resources.ResourceLocation>intbooleanisDiscovered(IMutation<?> mutation) Queries the tracker for discovered species.booleanisDiscovered(ISpecies<?> species) Queries the tracker for discovered species.booleanisResearched(IMutation<?> mutation) voidreadFromNbt(net.minecraft.nbt.CompoundTag nbt) voidregisterBirth(ISpecies<?> species) Register the birth of a species.voidregisterMutation(IMutation<?> mutation) Register a successful mutation.voidregisterPickup(ISpecies<?> species) Register the pickup of a species.voidregisterSpecies(ISpecies<?> species) Marks a species as discovered.voidresearchMutation(IMutation<?> mutation) Register a successfully researched mutation.voidsyncToPlayer(net.minecraft.world.entity.player.Player player) Synchronizes the ENTIRE breeding tracker to the client side.voidwriteToNbt(net.minecraft.nbt.CompoundTag nbt)
-
Method Details
-
getSpeciesBred
int getSpeciesBred()- Returns:
- Amount of species discovered.
-
registerBirth
Register the birth of a species. Will mark it as discovered. -
registerPickup
Register the pickup of a species. -
registerSpecies
Marks a species as discovered. Should only be called from registerIndividual normally. -
registerMutation
Register a successful mutation. Will mark it as discovered. -
isDiscovered
Queries the tracker for discovered species.- Parameters:
mutation- Mutation to query for.- Returns:
- true if the mutation has been discovered.
-
isDiscovered
Queries the tracker for discovered species.- Parameters:
species- Species to check.- Returns:
- true if the species has been bred.
-
getDiscoveredSpecies
Collection<net.minecraft.resources.ResourceLocation> getDiscoveredSpecies()- Returns:
- A collection that contains the
IAllele.alleleId()s of all discovered species.
-
researchMutation
Register a successfully researched mutation. Mutations are normally researched in the Escritoire. Researched mutations may have bonuses such as occurring at a higher rate. Researched mutations count as discovered. -
isResearched
- Returns:
- true if the mutation has been researched.
-
syncToPlayer
void syncToPlayer(net.minecraft.world.entity.player.Player player) Synchronizes the ENTIRE breeding tracker to the client side. -
readFromNbt
void readFromNbt(net.minecraft.nbt.CompoundTag nbt) -
writeToNbt
void writeToNbt(net.minecraft.nbt.CompoundTag nbt)
-