Class ExpandAnimal
java.lang.Object
com.blamejared.crafttweaker.natives.entity.type.animal.ExpandAnimal
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancanFallInLove(net.minecraft.world.entity.animal.Animal internal) Checks if this Animal can fall in love.static booleancanMate(net.minecraft.world.entity.animal.Animal internal, net.minecraft.world.entity.animal.Animal other) Checks if this Animal can mate with the givenAnimal.static voidfinalizeSpawnChildFromBreeding(net.minecraft.world.entity.animal.Animal internal, net.minecraft.server.level.ServerLevel level, net.minecraft.world.entity.animal.Animal otherParent, net.minecraft.world.entity.AgeableMob child) Finalizes the spawning of a child from the breeding of this Animal and the given Animal.static intgetInLoveTime(net.minecraft.world.entity.animal.Animal internal) Gets the time in ticks this Animal has been in love.static net.minecraft.server.level.ServerPlayergetLoveCause(net.minecraft.world.entity.animal.Animal internal) Gets theServerPlayerthat caused this Animal to fall in love.static booleanisFood(net.minecraft.world.entity.animal.Animal internal, net.minecraft.world.item.ItemStack stack) Checks if this Animal can eat theItemStack.static booleanisInLove(net.minecraft.world.entity.animal.Animal internal) Checks if this Animal is in love.static voidresetLove(net.minecraft.world.entity.animal.Animal internal) Resets this Animal's love status.static voidsetInLove(net.minecraft.world.entity.animal.Animal internal, net.minecraft.world.entity.player.Player loveCause) Sets this Animal in love, with the givenPlayeras the cause.static voidsetInLoveTime(net.minecraft.world.entity.animal.Animal internal, int inLove) Sets the time in ticks this Animal has been in love.static voidspawnChildFromBreeding(net.minecraft.world.entity.animal.Animal internal, net.minecraft.server.level.ServerLevel level, net.minecraft.world.entity.animal.Animal otherParent) Spawns a child from the breeding of this Animal and the given Animal.
-
Constructor Details
-
ExpandAnimal
public ExpandAnimal()
-
-
Method Details
-
isFood
public static boolean isFood(net.minecraft.world.entity.animal.Animal internal, net.minecraft.world.item.ItemStack stack) Checks if this Animal can eat theItemStack.- Parameters:
stack- TheItemStackto check.- Returns:
- True if this Animal can eat the
ItemStack, false otherwise.
-
canFallInLove
public static boolean canFallInLove(net.minecraft.world.entity.animal.Animal internal) Checks if this Animal can fall in love.- Returns:
- True if this Animal can fall in love, false otherwise.
-
setInLove
public static void setInLove(net.minecraft.world.entity.animal.Animal internal, net.minecraft.world.entity.player.Player loveCause) Sets this Animal in love, with the givenPlayeras the cause.- Parameters:
loveCause- ThePlayerthat caused this Animal to fall in love.
-
setInLoveTime
public static void setInLoveTime(net.minecraft.world.entity.animal.Animal internal, int inLove) Sets the time in ticks this Animal has been in love.- Parameters:
inLove- The time in ticks this Animal has been in love.
-
getInLoveTime
public static int getInLoveTime(net.minecraft.world.entity.animal.Animal internal) Gets the time in ticks this Animal has been in love.- Returns:
- The time in ticks this Animal has been in love.
-
getLoveCause
public static net.minecraft.server.level.ServerPlayer getLoveCause(net.minecraft.world.entity.animal.Animal internal) Gets theServerPlayerthat caused this Animal to fall in love.- Returns:
- The
ServerPlayerthat caused this Animal to fall in love.
-
isInLove
public static boolean isInLove(net.minecraft.world.entity.animal.Animal internal) Checks if this Animal is in love.- Returns:
- True if this Animal is in love, false otherwise.
-
resetLove
public static void resetLove(net.minecraft.world.entity.animal.Animal internal) Resets this Animal's love status. -
canMate
public static boolean canMate(net.minecraft.world.entity.animal.Animal internal, net.minecraft.world.entity.animal.Animal other) Checks if this Animal can mate with the givenAnimal.- Parameters:
other- TheAnimalto check.- Returns:
- True if this Animal can mate with the given
Animal, false otherwise.
-
spawnChildFromBreeding
public static void spawnChildFromBreeding(net.minecraft.world.entity.animal.Animal internal, net.minecraft.server.level.ServerLevel level, net.minecraft.world.entity.animal.Animal otherParent) Spawns a child from the breeding of this Animal and the given Animal.- Parameters:
level- TheServerLevelto spawn the child in.otherParent- The other Animal to mate with.
-
finalizeSpawnChildFromBreeding
public static void finalizeSpawnChildFromBreeding(net.minecraft.world.entity.animal.Animal internal, net.minecraft.server.level.ServerLevel level, net.minecraft.world.entity.animal.Animal otherParent, net.minecraft.world.entity.AgeableMob child) Finalizes the spawning of a child from the breeding of this Animal and the given Animal.- Parameters:
level- TheServerLevelto spawn the child in.otherParent- The other Animal to mate with.child- TheAgeableMobto finalize the spawning of.
-