Package forestry.api.apiculture
Interface IBeeModifier
public interface IBeeModifier
A bee modifier allows modifying certain conditions in a bee hive.
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleanisAlwaysActive(IGenome genome) default booleandefault booleanisSealed()default booleandefault floatmodifyAging(IGenome genome, IGenome mate, float currentAging) Used to speed up or slow down the aging of a queen.default floatmodifyGeneticDecay(IGenome genome, float currentDecay) default floatmodifyMutationChance(IGenome genome, IGenome mate, IMutation<IBeeSpecies> mutation, float currentChance) Used to modify the chance for mutations to happen.default floatmodifyPollination(IGenome genome, float currentPollination) default floatmodifyProductionSpeed(IGenome genome, float currentSpeed) Used to increase or decrease the chances of producing products and specialties.default net.minecraft.core.Vec3imodifyTerritory(IGenome genome, net.minecraft.core.Vec3i currentModifier) Used to modify the territory of a bee, which is the area in which bees can find flowers, affect mobs with their IBeeEffect, and pollinate tree leaves.
-
Method Details
-
modifyTerritory
default net.minecraft.core.Vec3i modifyTerritory(IGenome genome, net.minecraft.core.Vec3i currentModifier) Used to modify the territory of a bee, which is the area in which bees can find flowers, affect mobs with their IBeeEffect, and pollinate tree leaves.- Parameters:
genome- Genome of the bee this modifier is called for.currentModifier- Current modifier. Starts out as the value of the allele- Returns:
- Float used to modify the base territory.
-
modifyMutationChance
default float modifyMutationChance(IGenome genome, IGenome mate, IMutation<IBeeSpecies> mutation, float currentChance) Used to modify the chance for mutations to happen.- Parameters:
genome- Genome of the bee this modifier is called for.mate- Genome of the bee mate this modifier is called for.mutation- The mutation that might occur.currentChance- The current mutation chance. Starts at the base chance of the mutation but may have already been modified by other IBeeModifiers. Between 0f and 100f.- Returns:
- Float used to modify the base mutation chance.
-
modifyAging
Used to speed up or slow down the aging of a queen.- Parameters:
genome- Genome of the bee this modifier is called for.mate- Genome of the mate,nullif there this bee is not mated.currentAging- Current amount to age the bee by. Starts at1but may have already been modified by other IBeeModifiers.- Returns:
- The number of age steps to age. If the number has a decimal part, then that decimal part is the probability
for whether an additional aging step should take place. Default is
1f. To cancel aging, return0. To instantly kill the bee, return a negative value.
-
modifyProductionSpeed
Used to increase or decrease the chances of producing products and specialties.- Parameters:
genome- Genome of the bee this modifier is called for.currentSpeed- Current production speed. Starts at the value of the bee's activeBeeChromosomes.SPEEDallele.- Returns:
- Float determining the production speed of queens.
-
modifyPollination
- Parameters:
genome- Genome of the bee this modifier is called for.currentPollination- Current pollination. Starts out at the value of the bee's activeBeeChromosomes.POLLINATIONallele.- Returns:
- The chance between 0 and 100 (inclusive) for a flower to be placed and for pollen to be collected/transferred.
-
modifyGeneticDecay
- Parameters:
genome- Genome of the bee this modifier is called for.currentDecay- Current decay. Starts out at1fbut may already have been modified by other modifiers.- Returns:
- The new decay chance for a swarmer queen to die off.
-
isSealed
default boolean isSealed()- Returns:
- Whether bees in this housing can fly in the rain without
BeeChromosomes.TOLERATES_RAIN.
-
isAlwaysActive
- Parameters:
genome- Genome of the bee this modifier is called for. Can be used to query the activity type.- Returns:
- Whether the bees in this hive should be active regardless of their activity type.
-
isSunlightSimulated
default boolean isSunlightSimulated()- Returns:
- Whether bees in the hive can work when the sky is obstructed without
BeeChromosomes.CAVE_DWELLING.
-
isHellish
default boolean isHellish()- Returns:
- Whether this hive simulates a
hellishclimate even if not in the Nether.
-