Package forestry.api.apiculture.genetics
Interface IBeeSpeciesType
- All Superinterfaces:
IBreedingTrackerHandler,ISpeciesType<IBeeSpecies,IBee>
-
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.data.DataProvidercreateEffectProvider(net.minecraft.data.PackOutput output, CompletableFuture<net.minecraft.core.HolderLookup.Provider> registries, Map<net.minecraft.resources.ResourceLocation, IBeeEffect> effects) Creates a data provider that generates bee effect JSON.net.minecraft.data.DataProvidercreateJubilanceProvider(net.minecraft.data.PackOutput output, CompletableFuture<net.minecraft.core.HolderLookup.Provider> registries, Map<net.minecraft.resources.ResourceLocation, IBeeJubilance> jubilances) Creates a data provider that generates bee jubilance JSON.net.minecraft.data.DataProvidercreateSpeciesProvider(net.minecraft.data.PackOutput output, CompletableFuture<net.minecraft.core.HolderLookup.Provider> registries, Consumer<IApicultureRegistration> species) Creates a data provider that generates bee species JSON.getActivityType(net.minecraft.resources.ResourceLocation id) getBeeEffect(net.minecraft.resources.ResourceLocation id) getBreedingTracker(net.minecraft.world.level.LevelAccessor level, com.mojang.authlib.GameProfile profile) Gets the player's breeding tracker for this species type.getJubilance(net.minecraft.resources.ResourceLocation id) getJubilanceSafe(net.minecraft.resources.ResourceLocation id) booleanisDrone(net.minecraft.world.item.ItemStack stack) booleanisMated(net.minecraft.world.item.ItemStack stack) 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
IApiaristTracker getBreedingTracker(net.minecraft.world.level.LevelAccessor level, @Nullable com.mojang.authlib.GameProfile profile) Description copied from interface:ISpeciesTypeGets the player's breeding tracker for this species type.- Specified by:
getBreedingTrackerin interfaceISpeciesType<IBeeSpecies,IBee> - Parameters:
level- The world instance where the breeding tracker is stored.profile- The player whose breeding tracker should be returned.- Returns:
IApiaristTrackerassociated with the passed world.
-
getBeeEffect
- Returns:
- The bee effect registered with the given ID. Backs the
bee_effectreference chromosome.
-
getActivityType
- Returns:
- The activity type registered with the given ID. Backs the
activityreference chromosome.
-
getJubilance
- Returns:
- The bee jubilance registered with the given ID. Backs the
jubilancereference chromosome.
-
getJubilanceSafe
- Returns:
- The bee jubilance registered with the given ID, or
nullif none is registered (graceful fallback variant).
-
isDrone
boolean isDrone(net.minecraft.world.item.ItemStack stack) - Returns:
- true if passed item is a drone. Equal to getLifeStage(ItemStack stack) == EnumBeeType.DRONE
-
isMated
boolean isMated(net.minecraft.world.item.ItemStack stack) - Returns:
- true if passed item is mated (i.e. a queen)
-
getEffectFactory
IBeeEffectFactory getEffectFactory()- Returns:
- The factory for the bee effects that Forestry can load from a datapack
-
getJubilanceFactory
IJubilanceFactory getJubilanceFactory()- Returns:
- The factory for the bee jubilances that Forestry provides
-
createSpeciesProvider
net.minecraft.data.DataProvider createSpeciesProvider(net.minecraft.data.PackOutput output, CompletableFuture<net.minecraft.core.HolderLookup.Provider> registries, Consumer<IApicultureRegistration> species) Creates a data provider that generates bee species JSON.- Parameters:
output- The pack output to generate intoregistries- The registries used to encode the speciesspecies- The action that registers the species to generate- Returns:
- The data provider to add to the data generator
-
createEffectProvider
net.minecraft.data.DataProvider createEffectProvider(net.minecraft.data.PackOutput output, CompletableFuture<net.minecraft.core.HolderLookup.Provider> registries, Map<net.minecraft.resources.ResourceLocation, IBeeEffect> effects) Creates a data provider that generates bee effect JSON. Each effect must overrideIBeeEffect.codec().- Parameters:
output- The pack output to generate intoregistries- The registries used to encode the effectseffects- The effects to generate, by ID- Returns:
- The data provider to add to the data generator
-
createJubilanceProvider
net.minecraft.data.DataProvider createJubilanceProvider(net.minecraft.data.PackOutput output, CompletableFuture<net.minecraft.core.HolderLookup.Provider> registries, Map<net.minecraft.resources.ResourceLocation, IBeeJubilance> jubilances) Creates a data provider that generates bee jubilance JSON. Each jubilance must overrideIBeeJubilance.codec().- Parameters:
output- The pack output to generate intoregistries- The registries used to encode the jubilancesjubilances- The jubilances to generate, by ID- Returns:
- The data provider to add to the data generator
-