Package forestry.api.plugin
Interface IApicultureRegistration
public interface IApicultureRegistration
Entry point for apiculture related registration.
Obtain an instance by overriding
IForestryPlugin.registerApiculture(forestry.api.plugin.IApicultureRegistration).-
Method Summary
Modifier and TypeMethodDescriptiondefault voidaddVillageBee(net.minecraft.resources.ResourceLocation speciesId, boolean rare) Shorthand for adding a village bee that uses the default genome.voidaddVillageBee(net.minecraft.resources.ResourceLocation speciesId, boolean rare, Map<IChromosome<?>, IAllele> alleles) Adds a bee species to the possible bees found in apiaries in the Apiarist villager houses.voidmodifyHive(net.minecraft.resources.ResourceLocation id, Consumer<IHiveBuilder> action) Modifies an already registered hive.voidmodifySpecies(net.minecraft.resources.ResourceLocation id, Consumer<IBeeSpeciesBuilder> action) Modify a species that was already registered.voidregisterActivityType(net.minecraft.resources.ResourceLocation id, IActivityType type) Register an activity type, which defines activity periods for a bee.voidregisterBeeEffect(net.minecraft.resources.ResourceLocation id, IBeeEffect effect) voidregisterFlowerType(net.minecraft.resources.ResourceLocation id, IFlowerType type) Register a flower type, a category of blocks that a bee can work with.registerHive(net.minecraft.resources.ResourceLocation id, IHiveDefinition definition) Register a wild hive for world generation.default IBeeSpeciesBuilderregisterSpecies(net.minecraft.resources.ResourceLocation id, String genus, String species, boolean dominant, Color outline) Deprecated, for removal: This API element is subject to removal in a future version.Use variant that accepts TextColorregisterSpecies(net.minecraft.resources.ResourceLocation id, String genus, String species, boolean dominant, net.minecraft.network.chat.TextColor outline) Register a new bee species.voidregisterSwarmerMaterial(net.minecraft.world.item.Item swarmItem, float swarmChance) Registers an ingredient to be used in the Alveary Swarmer block, which creates swarm hives around the alveary containing ignoble princesses with copies of the queen's genome.
-
Method Details
-
registerSpecies
@Deprecated(forRemoval=true) default IBeeSpeciesBuilder registerSpecies(net.minecraft.resources.ResourceLocation id, String genus, String species, boolean dominant, Color outline) Deprecated, for removal: This API element is subject to removal in a future version.Use variant that accepts TextColor -
registerSpecies
IBeeSpeciesBuilder registerSpecies(net.minecraft.resources.ResourceLocation id, String genus, String species, boolean dominant, net.minecraft.network.chat.TextColor outline) Register a new bee species.- Parameters:
id- The unique ID for this species.genus- The scientific name of the genus containing this species. SeeForestryTaxa.species- The scientific name of this species without the genus. (Ex. mellifera, for Apis mellifera)dominant- Whether this species appears as a dominant allele in a genome.outline- The color used for tinting the bee's outline. IntelliJ should show a nice color preview.- Throws:
IllegalStateException- If a species has already been registered with the given ID.- Since:
- 2.3.3 Now accepts TextColor instead of java.awt.Color
-
modifySpecies
void modifySpecies(net.minecraft.resources.ResourceLocation id, Consumer<IBeeSpeciesBuilder> action) Modify a species that was already registered. You can change all the same things as inregisterSpecies(net.minecraft.resources.ResourceLocation, java.lang.String, java.lang.String, boolean, java.awt.Color)except for the genus and species names.- Parameters:
id- The ID of the species to modify.action- A function that receives the builder of the species to modify.
-
addVillageBee
void addVillageBee(net.minecraft.resources.ResourceLocation speciesId, boolean rare, Map<IChromosome<?>, IAllele> alleles) Adds a bee species to the possible bees found in apiaries in the Apiarist villager houses. There are two pools: the common pool, which is rolled 75% of the time, and the rare pool, which is rolled 25% of the time.- Parameters:
speciesId- The ID of the species to add.rare- If true, this bee goes into the "rare" village bee pool, which is chosen 25% of the time instead of the "common" pool.alleles- Map of non-default alleles. Example is the rare Tolerant Flyer variant of the Forest species.
-
addVillageBee
default void addVillageBee(net.minecraft.resources.ResourceLocation speciesId, boolean rare) Shorthand for adding a village bee that uses the default genome.- Parameters:
speciesId- The ID of the species to add.rare- Whether this species is added to the rare pool or the common pool.
-
registerHive
Register a wild hive for world generation.- Parameters:
id- The unique ID for this hive.definition- The hive definition to register.
-
modifyHive
Modifies an already registered hive.- Parameters:
id- The ID of the hive to modify.action- The modification to apply to the hive builder.
-
registerFlowerType
Register a flower type, a category of blocks that a bee can work with.- Parameters:
id- The unique ID for this flower type.type- The flower type to register.
-
registerBeeEffect
-
registerActivityType
Register an activity type, which defines activity periods for a bee.- Parameters:
id- The unique ID for this activity type.type- The activity type to register.
-
registerSwarmerMaterial
void registerSwarmerMaterial(net.minecraft.world.item.Item swarmItem, float swarmChance) Registers an ingredient to be used in the Alveary Swarmer block, which creates swarm hives around the alveary containing ignoble princesses with copies of the queen's genome.- Parameters:
swarmItem- The item to be used.swarmChance- The chance a swarm hive is created. For Royal Jelly, this is0.01or 1%.
-