-
-
Method Summary
boolean
canSpawn(net.minecraft.world.level.Level level,
double x,
double y,
double z)
boolean
canTakeFlight(net.minecraft.world.level.Level level,
double x,
double y,
double z)
Copies this individual and all of its properties EXCEPT FOR ITS MATE.
List<net.minecraft.world.item.ItemStack>
List<net.minecraft.world.item.ItemStack>
net.minecraft.network.chat.Component
List<net.minecraft.world.item.ItemStack>
default boolean
boolean
Methods inherited from interface forestry.api.genetics.IIndividual
analyze, cast, copyWithGenome, createStack, getGenome, getMate, getMateOptional, hasGlint, isAnalyzed, isSecret, saveToStack, setMate
-
Method Details
-
canSpawn
boolean canSpawn(net.minecraft.world.level.Level level,
double x,
double y,
double z)
- Returns:
- true if the butterfly can naturally spawn at the given location at this time. (Used to auto-spawn butterflies from tree leaves.)
-
canTakeFlight
boolean canTakeFlight(net.minecraft.world.level.Level level,
double x,
double y,
double z)
- Returns:
- true if the butterfly can take flight at the given location at this time. (Used to auto-spawn butterflies from dropped items.)
-
isAcceptedEnvironment
default boolean isAcceptedEnvironment(net.minecraft.world.level.Level level,
double x,
double y,
double z)
-
isAcceptedEnvironment
boolean isAcceptedEnvironment(net.minecraft.world.level.Level world,
net.minecraft.core.BlockPos pos)
-
spawnCaterpillar
- Returns:
- create a caterpillar with the two genome's from the nursery.
-
getLootDrop
List<net.minecraft.world.item.ItemStack> getLootDrop(IEntityButterfly entity,
boolean playerKill,
int lootLevel)
- Parameters:
playerKill - Whether or not the butterfly was killed by a player.
lootLevel - Loot level according to the weapon used to kill the butterfly.
- Returns:
- Items to drop on death of the given entity.
-
getCaterpillarDrop
List<net.minecraft.world.item.ItemStack> getCaterpillarDrop(IButterflyNursery nursery,
boolean playerKill,
int lootLevel)
- Parameters:
playerKill - Whether or not the nursery was broken by a player.
lootLevel - Fortune level.
- Returns:
- Items to drop on breaking of the nursery.
-
getCocoonDrop
List<net.minecraft.world.item.ItemStack> getCocoonDrop(boolean includeButterfly,
IButterflyCocoon cocoon)
- Parameters:
includeButterfly - Whether the butterfly should drop from the cocoon. Used by worldgen cocoons.
- Returns:
- Items to drop on breaking of the cocoon.
-
copy
Copies this individual and all of its properties EXCEPT FOR ITS MATE.
Override this method in subclasses to make sure all information is copied.
- Specified by:
copy in interface IIndividual
- Specified by:
copy in interface IIndividualLiving
- Returns:
- An exact copy of this individual with NO MATE and NOT ANALYZED.
-
getType
- Specified by:
getType in interface IIndividual
- Returns:
- The species type of this individual.
-
-
-
getDisplayName
net.minecraft.network.chat.Component getDisplayName()