Class ExpandLivingEntity

java.lang.Object
com.blamejared.crafttweaker.natives.entity.ExpandLivingEntity

@ZenRegister public class ExpandLivingEntity extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    addEffect(net.minecraft.world.entity.LivingEntity internal, net.minecraft.world.effect.MobEffectInstance effectInstance)
    Adds an effect to this entity.
    static boolean
    addEffect(net.minecraft.world.entity.LivingEntity internal, net.minecraft.world.effect.MobEffectInstance effectInstance, net.minecraft.world.entity.Entity entity)
    Adds an effect to this entity.
    static boolean
    attackable(net.minecraft.world.entity.LivingEntity internal)
    Checks if the entity is attackable.
    static boolean
    canAttack(net.minecraft.world.entity.LivingEntity internal, net.minecraft.world.entity.LivingEntity target)
    Checks if this entity can attack a target.
    static boolean
    canBeAffected(net.minecraft.world.entity.LivingEntity internal, net.minecraft.world.effect.MobEffectInstance effectInstance)
    Checks if this entity can be affected by a specific effect.
    static boolean
    canBeSeenAsEnemy(net.minecraft.world.entity.LivingEntity internal)
    Checks if this entity can be seen as an enemy.
    static boolean
    canBeSeenByAnyone(net.minecraft.world.entity.LivingEntity internal)
    Checks if this entity can be seen by anyone.
    static boolean
    canBreatheUnderwater(net.minecraft.world.entity.LivingEntity internal)
    Checks if this entity can breathe underwater.
    static boolean
    canStandOnFluid(net.minecraft.world.entity.LivingEntity internal, net.minecraft.world.level.material.Fluid fluid)
    Checks if the entity can stand on a specific fluid.
    static boolean
    canTakeItem(net.minecraft.world.entity.LivingEntity internal, net.minecraft.world.item.ItemStack stack)
    Checks if the item can be worn as armor.
    static void
    clearSleepingPos(net.minecraft.world.entity.LivingEntity internal)
    Clears the position that the entity is sleeping at.
    static void
    die(net.minecraft.world.entity.LivingEntity internal, net.minecraft.world.damagesource.DamageSource source)
    Kills this entity.
    static boolean
    doHurtTarget(net.minecraft.world.entity.LivingEntity internal, net.minecraft.world.entity.Entity entity)
     
    static net.minecraft.world.item.ItemStack
    eat(net.minecraft.world.entity.LivingEntity internal, net.minecraft.world.level.Level level, net.minecraft.world.item.ItemStack stack)
    Eats an item.
    static void
    forceAddEffect(net.minecraft.world.entity.LivingEntity internal, net.minecraft.world.effect.MobEffectInstance effectInstance, net.minecraft.world.entity.Entity entity)
    Forces this entity to have a specific effect, this does not force effects that can't affect this entity.
    static float
    getAbsorptionAmount(net.minecraft.world.entity.LivingEntity internal)
    Gets the absorption amount for this entity.
    static Collection<net.minecraft.world.effect.MobEffectInstance>
    getActiveEffects(net.minecraft.world.entity.LivingEntity internal)
    Gets the active effects.
    static Map<net.minecraft.world.effect.MobEffect,net.minecraft.world.effect.MobEffectInstance>
    getActiveEffectsMap(net.minecraft.world.entity.LivingEntity internal)
    Gets a map of active effects.
    static Iterable<net.minecraft.world.item.ItemStack>
    getAllSlots(net.minecraft.world.entity.LivingEntity internal)
    Gets all slots.
    static float
    getArmorCoverPercentage(net.minecraft.world.entity.LivingEntity internal)
    Gets the armor cover percentage for this entity.
    static Iterable<net.minecraft.world.item.ItemStack>
    getArmorSlots(net.minecraft.world.entity.LivingEntity internal)
    Gets this entity's armor items.
    static int
    getArmorValue(net.minecraft.world.entity.LivingEntity internal)
    Gets the armor value for this entity.
    static int
    getArrowCount(net.minecraft.world.entity.LivingEntity internal)
    Gets how many arrows are currently in this entity.
    static net.minecraft.world.entity.ai.attributes.AttributeInstance
    getAttribute(net.minecraft.world.entity.LivingEntity internal, net.minecraft.world.entity.ai.attributes.Attribute attribute)
    Gets the attribute for this entity.
    static double
    getAttributeBaseValue(net.minecraft.world.entity.LivingEntity internal, net.minecraft.world.entity.ai.attributes.Attribute attribute)
    Gets the base attribute value for this entity.
    static double
    getAttributeValue(net.minecraft.world.entity.LivingEntity internal, net.minecraft.world.entity.ai.attributes.Attribute attribute)
    Gets the attribute value for this entity.
    static net.minecraft.core.Direction
    getBedOrientation(net.minecraft.world.entity.LivingEntity internal)
    Gets the orientation of the bed that the entity is sleeping on.
    static net.minecraft.world.effect.MobEffectInstance
    getEffect(net.minecraft.world.entity.LivingEntity internal, net.minecraft.world.effect.MobEffect effect)
    Gets the MobEffectInstance for the given effect on this entity.
    static int
    getFallFlyingTicks(net.minecraft.world.entity.LivingEntity internal)
    Gets the ticks that the entity has been flying with an elytra.
    static Iterable<net.minecraft.world.item.ItemStack>
    getHandSlots(net.minecraft.world.entity.LivingEntity internal)
    Gets this entity's held items.
    static float
    getHealth(net.minecraft.world.entity.LivingEntity internal)
    Gets the health of this entity.
    static net.minecraft.world.item.ItemStack
    getItemBySlot(net.minecraft.world.entity.LivingEntity internal, net.minecraft.world.entity.EquipmentSlot slot)
    Gets the item in a specific slot.
    static net.minecraft.world.item.ItemStack
    getItemInHand(net.minecraft.world.entity.LivingEntity internal, net.minecraft.world.InteractionHand hand)
    Gets the item in the entity's hand.
    static double
    getJumpBoostPower(net.minecraft.world.entity.LivingEntity internal)
    Gets the jump boost power for this entity.
    static net.minecraft.world.entity.LivingEntity
    getKillCredit(net.minecraft.world.entity.LivingEntity internal)
    Gets the kill credit for this entity.
    static net.minecraft.core.BlockPos
    getLastClimbablePos(net.minecraft.world.entity.LivingEntity internal)
    Gets the last climbable position for this entity.
    static net.minecraft.world.damagesource.DamageSource
    getLastDamageSource(net.minecraft.world.entity.LivingEntity internal)
    Gets the last damage source for this entity.
    static net.minecraft.world.entity.LivingEntity
    getLastHurtByMob(net.minecraft.world.entity.LivingEntity internal)
    Gets the last entity that hurt this entity.
    static int
    getLastHurtByMobTimestamp(net.minecraft.world.entity.LivingEntity internal)
    Gets the timestamp when this entity was last hurt by a mob.
    static net.minecraft.world.entity.LivingEntity
    getLastHurtMob(net.minecraft.world.entity.LivingEntity internal)
    Gets the last entity that this entity hurt.
    static int
    getLastHurtMobTimestamp(net.minecraft.world.entity.LivingEntity internal)
    Gets the timestamp when this entity last hurt a mob.
    static net.minecraft.resources.ResourceLocation
    getLootTable(net.minecraft.world.entity.LivingEntity internal)
    Gets the loot table for this entity.
    static long
    getLootTableSeed(net.minecraft.world.entity.LivingEntity internal)
    Gets the seed used when generating loot from this entity.
    static net.minecraft.world.entity.HumanoidArm
    getMainArm(net.minecraft.world.entity.LivingEntity internal)
    Gets the main arm for this entity.
    static net.minecraft.world.item.ItemStack
    getMainHandItem(net.minecraft.world.entity.LivingEntity internal)
    Gets the main hand item for this entity.
    static float
    getMaxHealth(net.minecraft.world.entity.LivingEntity internal)
    Gets the maximum health for this entity.
    static int
    getNoActionTime(net.minecraft.world.entity.LivingEntity internal)
    Gets the time since this entity last performed an action.
    static net.minecraft.world.item.ItemStack
    getOffhandItem(net.minecraft.world.entity.LivingEntity internal)
    Gets the offhand item for this entity.
    static net.minecraft.util.RandomSource
    getRandom(net.minecraft.world.entity.LivingEntity internal)
    Gets this entity's random source.
    static float
    getScale(net.minecraft.world.entity.LivingEntity internal)
    Gets this entity's scale.
    static net.minecraft.core.BlockPos
    getSleepingPos(net.minecraft.world.entity.LivingEntity internal)
    Gets the position that the entity is sleeping at.
    static float
    getSpeed(net.minecraft.world.entity.LivingEntity internal)
    Gets the movement speed of this entity.
    static int
    getStingerCount(net.minecraft.world.entity.LivingEntity internal)
    Gets how many stingers are currently in this entity.
    static float
    getSwimAmount(net.minecraft.world.entity.LivingEntity internal, float partialTicks)
    Gets the swim amount.
    static int
    getTicksUsingItem(net.minecraft.world.entity.LivingEntity internal)
    Gets how long the entity has been using an item.
    static net.minecraft.world.InteractionHand
    getUsedItemHand(net.minecraft.world.entity.LivingEntity internal)
    Gets the hand that the entity is using an item with.
    static net.minecraft.world.item.ItemStack
    getUseItem(net.minecraft.world.entity.LivingEntity internal)
    Gets the item that the entity is using.
    static int
    getUseItemRemainingTicks(net.minecraft.world.entity.LivingEntity internal)
    Gets the remaining ticks left of the use duration of the item that is being used.
    static double
    getVisibilityPercent(net.minecraft.world.entity.LivingEntity internal, net.minecraft.world.entity.Entity lookingEntity)
    Gets the visibility percent for this entity.
    static float
    getVoicePitch(net.minecraft.world.entity.LivingEntity internal)
    Gets the voice pitch for this entity.
    static boolean
    hasEffect(net.minecraft.world.entity.LivingEntity internal, net.minecraft.world.effect.MobEffect effect)
    Checks if this entity has a specific effect.
    static boolean
    hasItemInSlot(net.minecraft.world.entity.LivingEntity internal, net.minecraft.world.entity.EquipmentSlot slot)
    Checks if the entity has an item in a specific slot.
    static boolean
    hasLineOfSight(net.minecraft.world.entity.LivingEntity internal, net.minecraft.world.entity.Entity entity)
    Checks if this entity has a line of sight to a specific entity.
    static void
    heal(net.minecraft.world.entity.LivingEntity internal, float amount)
    Heals this entity.
    static boolean
    isAffectedByPotions(net.minecraft.world.entity.LivingEntity internal)
    Checks if the entity is affected by potions, entities such as armor stands are not affected by potions.
    static boolean
    isAutoSpinAttack(net.minecraft.world.entity.LivingEntity internal)
    Checks if this entity is performing an auto spin attack.
    static boolean
    isBaby(net.minecraft.world.entity.LivingEntity internal)
    Checks if this entity is a baby.
    static boolean
    isBlocking(net.minecraft.world.entity.LivingEntity internal)
    Checks if the entity is blocking.
    static boolean
    isCurrentlyGlowing(net.minecraft.world.entity.LivingEntity internal)
    Checks if the entity is currently glowing.
    static boolean
    isDamageSourceBlocked(net.minecraft.world.entity.LivingEntity internal, net.minecraft.world.damagesource.DamageSource source)
    Determines whether the entity can block the damage source based on the damage source's location, whether the damage source is blockable, and whether the entity is blocking.
    static boolean
    isDeadOrDying(net.minecraft.world.entity.LivingEntity internal)
    Checks if this entity is dead or dying.
    static boolean
    isFallFlying(net.minecraft.world.entity.LivingEntity internal)
    Checks if the entity is flying with an elytra.
    static boolean
    isHolding(net.minecraft.world.entity.LivingEntity internal, Predicate<net.minecraft.world.item.ItemStack> predicate)
    Checks if the entity is holding an item in their hand.
    static boolean
    isHolding(net.minecraft.world.entity.LivingEntity internal, net.minecraft.world.item.Item item)
    Checks if the entity is holding an item in their hand.
    static boolean
    isInvertedHealAndHarm(net.minecraft.world.entity.LivingEntity internal)
    Checks if this entity is inverted for heal and harm.
    static boolean
    isSensitiveToWater(net.minecraft.world.entity.LivingEntity internal)
    Checks if this entity is sensitive to water, meaning that it will take damage from being in water.
    static boolean
    isSleeping(net.minecraft.world.entity.LivingEntity internal)
    Checks if the entity is sleeping.
    static boolean
    isSuppressingSlidingDownLadder(net.minecraft.world.entity.LivingEntity internal)
    Checks if the entity is suppressing sliding down a ladder, such as sneaking while on a ladder.
    static boolean
    isUsingItem(net.minecraft.world.entity.LivingEntity internal)
    Checks if this entity is using an item.
    static boolean
    isVisuallySwimming(net.minecraft.world.entity.LivingEntity internal)
    Checks if the entity is visually swimming.
    static void
    knockback(net.minecraft.world.entity.LivingEntity internal, double x, double y, double z)
    Knocks back this entity.
    static void
    releaseUsingItem(net.minecraft.world.entity.LivingEntity internal)
    Releases the item that the entity is using.
    static boolean
    removeAllEffects(net.minecraft.world.entity.LivingEntity internal)
    Removes all effects from this entity.
    static boolean
    removeEffect(net.minecraft.world.entity.LivingEntity internal, net.minecraft.world.effect.MobEffect effect)
    Removes an effect from this entity.
    static net.minecraft.world.effect.MobEffectInstance
    removeEffectNoUpdate(net.minecraft.world.entity.LivingEntity internal, net.minecraft.world.effect.MobEffect effect)
    Removes an effect from this entity without causing an update.
    static void
    setAbsorptionAmount(net.minecraft.world.entity.LivingEntity internal, float absorption)
    Sets the absorption amount for this entity.
    static void
    setArrowCount(net.minecraft.world.entity.LivingEntity internal, int count)
    Sets how many arrows are currently in this entity.
    static void
    setDiscardFriction(net.minecraft.world.entity.LivingEntity internal, boolean discardFriction)
    Sets if this entity should discard friction.
    static void
    setHealth(net.minecraft.world.entity.LivingEntity internal, float health)
    Sets the health of this entity.
    static void
    setItemInHand(net.minecraft.world.entity.LivingEntity internal, net.minecraft.world.InteractionHand hand, net.minecraft.world.item.ItemStack stack)
    Sets the item in the entity's hand.
    static void
    setItemSlot(net.minecraft.world.entity.LivingEntity internal, net.minecraft.world.entity.EquipmentSlot slot, net.minecraft.world.item.ItemStack stack)
    Sets the item in a specific equipment slot.
    static void
    setJumping(net.minecraft.world.entity.LivingEntity internal, boolean jumping)
    Sets whether this entity is jumping.
    static void
    setLastHurtByMob(net.minecraft.world.entity.LivingEntity internal, net.minecraft.world.entity.LivingEntity entity)
    Sets the last entity that hurt this entity.
    static void
    setLastHurtByPlayer(net.minecraft.world.entity.LivingEntity internal, net.minecraft.world.entity.player.Player player)
    Sets the last entity that hurt this entity.
    static void
    setLastHurtMob(net.minecraft.world.entity.LivingEntity internal, net.minecraft.world.entity.Entity entity)
    Sets the last entity that this entity hurt.
    static void
    setNoActionTime(net.minecraft.world.entity.LivingEntity internal, int idleTime)
    Sets the time since this entity last performed an action.
    static void
    setSleepingPos(net.minecraft.world.entity.LivingEntity internal, net.minecraft.core.BlockPos pos)
    Sets the position that the entity is sleeping at.
    static void
    setSpeed(net.minecraft.world.entity.LivingEntity internal, float speed)
    Sets the movement speed of this entity.
    static void
    setStingerCount(net.minecraft.world.entity.LivingEntity internal, int count)
    Sets how many stingers are currently in this entity.
    static boolean
    shouldDiscardFriction(net.minecraft.world.entity.LivingEntity internal)
    Checks if this entity should discard friction.
    static void
    startSleeping(net.minecraft.world.entity.LivingEntity internal, net.minecraft.core.BlockPos pos)
    Starts the entity to sleep at a specific position.
    static void
    startUsingItem(net.minecraft.world.entity.LivingEntity internal, net.minecraft.world.InteractionHand hand)
    Starts using an item.
    static void
    stopSleeping(net.minecraft.world.entity.LivingEntity internal)
    Stops the entity from sleeping.
    static void
    stopUsingItem(net.minecraft.world.entity.LivingEntity internal)
    Stops using an item.
    static void
    swing(net.minecraft.world.entity.LivingEntity internal, net.minecraft.world.InteractionHand hand)
    Swings the entity's main hand.
    static void
    swing(net.minecraft.world.entity.LivingEntity internal, net.minecraft.world.InteractionHand hand, boolean updateSelf)
    Swings the entity's main hand.
    static void
    travel(net.minecraft.world.entity.LivingEntity internal, net.minecraft.world.phys.Vec3 vec)
    Moves this entity towards the given location.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ExpandLivingEntity

      public ExpandLivingEntity()
  • Method Details

    • getHandSlots

      public static Iterable<net.minecraft.world.item.ItemStack> getHandSlots(net.minecraft.world.entity.LivingEntity internal)
      Gets this entity's held items.
      Returns:
      An iterable of item stacks representing the held items.
    • getArmorSlots

      public static Iterable<net.minecraft.world.item.ItemStack> getArmorSlots(net.minecraft.world.entity.LivingEntity internal)
      Gets this entity's armor items.
      Returns:
      An iterable of item stacks representing the armor items.
    • getAllSlots

      public static Iterable<net.minecraft.world.item.ItemStack> getAllSlots(net.minecraft.world.entity.LivingEntity internal)
      Gets all slots.
      Returns:
      An iterable of item stacks representing all slots.
    • setItemSlot

      public static void setItemSlot(net.minecraft.world.entity.LivingEntity internal, net.minecraft.world.entity.EquipmentSlot slot, net.minecraft.world.item.ItemStack stack)
      Sets the item in a specific equipment slot.
      Parameters:
      slot - The equipment slot to set the item in.
      stack - The item stack to set in the slot.
    • canBreatheUnderwater

      public static boolean canBreatheUnderwater(net.minecraft.world.entity.LivingEntity internal)
      Checks if this entity can breathe underwater.
      Returns:
      True if the entity can breathe underwater, false otherwise.
    • getSwimAmount

      public static float getSwimAmount(net.minecraft.world.entity.LivingEntity internal, float partialTicks)
      Gets the swim amount.
      Parameters:
      partialTicks - The partial ticks to get the swim amount for.
      Returns:
      The swim amount.
    • isBaby

      public static boolean isBaby(net.minecraft.world.entity.LivingEntity internal)
      Checks if this entity is a baby.
      Returns:
      True if the entity is a baby, false otherwise.
    • getScale

      public static float getScale(net.minecraft.world.entity.LivingEntity internal)
      Gets this entity's scale.
      Returns:
      The scale of the entity.
    • getRandom

      public static net.minecraft.util.RandomSource getRandom(net.minecraft.world.entity.LivingEntity internal)
      Gets this entity's random source.
      Returns:
      The random source for the entity.
    • getLastHurtByMob

      public static net.minecraft.world.entity.LivingEntity getLastHurtByMob(net.minecraft.world.entity.LivingEntity internal)
      Gets the last entity that hurt this entity.
      Returns:
      The last entity that hurt this entity.
    • getLastHurtByMobTimestamp

      public static int getLastHurtByMobTimestamp(net.minecraft.world.entity.LivingEntity internal)
      Gets the timestamp when this entity was last hurt by a mob.
      Returns:
      The timestamp when this entity was last hurt by a mob.
    • setLastHurtByPlayer

      public static void setLastHurtByPlayer(net.minecraft.world.entity.LivingEntity internal, net.minecraft.world.entity.player.Player player)
      Sets the last entity that hurt this entity.
      Parameters:
      player - The player that hurt this entity.
    • setLastHurtByMob

      public static void setLastHurtByMob(net.minecraft.world.entity.LivingEntity internal, net.minecraft.world.entity.LivingEntity entity)
      Sets the last entity that hurt this entity.
      Parameters:
      entity - The entity that hurt this entity.
    • getLastHurtMob

      public static net.minecraft.world.entity.LivingEntity getLastHurtMob(net.minecraft.world.entity.LivingEntity internal)
      Gets the last entity that this entity hurt.
      Returns:
      The last entity that this entity hurt.
    • getLastHurtMobTimestamp

      public static int getLastHurtMobTimestamp(net.minecraft.world.entity.LivingEntity internal)
      Gets the timestamp when this entity last hurt a mob.
      Returns:
      The timestamp when this entity last hurt a mob.
    • setLastHurtMob

      public static void setLastHurtMob(net.minecraft.world.entity.LivingEntity internal, net.minecraft.world.entity.Entity entity)
      Sets the last entity that this entity hurt.
      Parameters:
      entity - The entity that this entity hurt.
    • getNoActionTime

      public static int getNoActionTime(net.minecraft.world.entity.LivingEntity internal)
      Gets the time since this entity last performed an action.
      Returns:
      The time since this entity last performed an action.
    • setNoActionTime

      public static void setNoActionTime(net.minecraft.world.entity.LivingEntity internal, int idleTime)
      Sets the time since this entity last performed an action.
      Parameters:
      idleTime - The time since this entity last performed an action.
    • shouldDiscardFriction

      public static boolean shouldDiscardFriction(net.minecraft.world.entity.LivingEntity internal)
      Checks if this entity should discard friction.
      Returns:
      True if this entity should discard friction, false otherwise.
    • setDiscardFriction

      public static void setDiscardFriction(net.minecraft.world.entity.LivingEntity internal, boolean discardFriction)
      Sets if this entity should discard friction.
      Parameters:
      discardFriction - True if this entity should discard friction, false otherwise.
    • getVisibilityPercent

      public static double getVisibilityPercent(net.minecraft.world.entity.LivingEntity internal, net.minecraft.world.entity.Entity lookingEntity)
      Gets the visibility percent for this entity.
      Parameters:
      lookingEntity - The entity that is looking at this entity.
      Returns:
      The visibility percent.
    • canAttack

      public static boolean canAttack(net.minecraft.world.entity.LivingEntity internal, net.minecraft.world.entity.LivingEntity target)
      Checks if this entity can attack a target.
      Parameters:
      target - The target to check if this entity can attack.
      Returns:
      True if this entity can attack the target, false otherwise.
    • canBeSeenAsEnemy

      public static boolean canBeSeenAsEnemy(net.minecraft.world.entity.LivingEntity internal)
      Checks if this entity can be seen as an enemy. Some things this checks are if this entity is a player and it is in creative mode, or if this entity is an axolotl if it is playing dead.
      Returns:
      True if this entity can be seen as an enemy, false otherwise.
    • canBeSeenByAnyone

      public static boolean canBeSeenByAnyone(net.minecraft.world.entity.LivingEntity internal)
      Checks if this entity can be seen by anyone.
      Returns:
      True if this entity can be seen by anyone, false otherwise.
    • removeAllEffects

      public static boolean removeAllEffects(net.minecraft.world.entity.LivingEntity internal)
      Removes all effects from this entity.
      Returns:
      True if all effects were removed, false otherwise.
    • getActiveEffects

      public static Collection<net.minecraft.world.effect.MobEffectInstance> getActiveEffects(net.minecraft.world.entity.LivingEntity internal)
      Gets the active effects.
      Returns:
      The active effects.
    • getActiveEffectsMap

      public static Map<net.minecraft.world.effect.MobEffect,net.minecraft.world.effect.MobEffectInstance> getActiveEffectsMap(net.minecraft.world.entity.LivingEntity internal)
      Gets a map of active effects.
      Returns:
      The active effects map.
    • hasEffect

      public static boolean hasEffect(net.minecraft.world.entity.LivingEntity internal, net.minecraft.world.effect.MobEffect effect)
      Checks if this entity has a specific effect.
      Parameters:
      effect - The effect to check if this entity has.
      Returns:
      True if this entity has the effect, false otherwise.
    • getEffect

      public static net.minecraft.world.effect.MobEffectInstance getEffect(net.minecraft.world.entity.LivingEntity internal, net.minecraft.world.effect.MobEffect effect)
      Gets the MobEffectInstance for the given effect on this entity.
      Parameters:
      effect - The effect to get.
      Returns:
      The effect instance.
    • addEffect

      public static boolean addEffect(net.minecraft.world.entity.LivingEntity internal, net.minecraft.world.effect.MobEffectInstance effectInstance)
      Adds an effect to this entity.
      Parameters:
      effectInstance - The effect to add.
      Returns:
      True if the effect was added, false otherwise.
    • addEffect

      public static boolean addEffect(net.minecraft.world.entity.LivingEntity internal, net.minecraft.world.effect.MobEffectInstance effectInstance, net.minecraft.world.entity.Entity entity)
      Adds an effect to this entity.
      Parameters:
      effectInstance - The effect to add.
      entity - The entity that is the source of the effect.
      Returns:
      True if the effect was added, false otherwise.
    • canBeAffected

      public static boolean canBeAffected(net.minecraft.world.entity.LivingEntity internal, net.minecraft.world.effect.MobEffectInstance effectInstance)
      Checks if this entity can be affected by a specific effect.
      Parameters:
      effectInstance - The effect to check if this entity can be affected by.
      Returns:
      True if this entity can be affected by the effect, false otherwise.
    • forceAddEffect

      public static void forceAddEffect(net.minecraft.world.entity.LivingEntity internal, net.minecraft.world.effect.MobEffectInstance effectInstance, net.minecraft.world.entity.Entity entity)
      Forces this entity to have a specific effect, this does not force effects that can't affect this entity.
      Parameters:
      effectInstance - The effect to force this entity to have.
      entity - The entity that is the source of the effect.
    • isInvertedHealAndHarm

      public static boolean isInvertedHealAndHarm(net.minecraft.world.entity.LivingEntity internal)
      Checks if this entity is inverted for heal and harm. This usually happens for undead mobs where potions of healing with harm them.
      Returns:
      True if this entity is inverted for heal and harm, false otherwise.
    • removeEffectNoUpdate

      public static net.minecraft.world.effect.MobEffectInstance removeEffectNoUpdate(net.minecraft.world.entity.LivingEntity internal, net.minecraft.world.effect.MobEffect effect)
      Removes an effect from this entity without causing an update.
      Parameters:
      effect - The effect to remove.
      Returns:
      The removed effect.
    • removeEffect

      public static boolean removeEffect(net.minecraft.world.entity.LivingEntity internal, net.minecraft.world.effect.MobEffect effect)
      Removes an effect from this entity.
      Parameters:
      effect - The effect to remove.
      Returns:
      True if the effect was removed, false otherwise.
    • heal

      public static void heal(net.minecraft.world.entity.LivingEntity internal, float amount)
      Heals this entity.
      Parameters:
      amount - The amount to heal.
    • getHealth

      public static float getHealth(net.minecraft.world.entity.LivingEntity internal)
      Gets the health of this entity.
      Returns:
      The health of this entity.
    • setHealth

      public static void setHealth(net.minecraft.world.entity.LivingEntity internal, float health)
      Sets the health of this entity.
      Parameters:
      health - The health to set.
    • isDeadOrDying

      public static boolean isDeadOrDying(net.minecraft.world.entity.LivingEntity internal)
      Checks if this entity is dead or dying.
      Returns:
      True if this entity is dead or dying, false otherwise.
    • getLastDamageSource

      public static net.minecraft.world.damagesource.DamageSource getLastDamageSource(net.minecraft.world.entity.LivingEntity internal)
      Gets the last damage source for this entity.
      Returns:
      The last damage source.
    • isDamageSourceBlocked

      public static boolean isDamageSourceBlocked(net.minecraft.world.entity.LivingEntity internal, net.minecraft.world.damagesource.DamageSource source)
      Determines whether the entity can block the damage source based on the damage source's location, whether the damage source is blockable, and whether the entity is blocking.
      Parameters:
      source - The damage source to check.
      Returns:
      True if the entity can block the damage source, false otherwise.
    • die

      public static void die(net.minecraft.world.entity.LivingEntity internal, net.minecraft.world.damagesource.DamageSource source)
      Kills this entity.
      Parameters:
      source - The damage source that killed this entity.
    • getLootTable

      public static net.minecraft.resources.ResourceLocation getLootTable(net.minecraft.world.entity.LivingEntity internal)
      Gets the loot table for this entity.
      Returns:
      The loot table.
    • getLootTableSeed

      public static long getLootTableSeed(net.minecraft.world.entity.LivingEntity internal)
      Gets the seed used when generating loot from this entity.
      Returns:
      The seed used to generate loot.
    • knockback

      public static void knockback(net.minecraft.world.entity.LivingEntity internal, double x, double y, double z)
      Knocks back this entity.
      Parameters:
      x - The x coordinate to knock back to.
      y - The y coordinate to knock back to.
      z - The z coordinate to knock back to.
    • getLastClimbablePos

      public static net.minecraft.core.BlockPos getLastClimbablePos(net.minecraft.world.entity.LivingEntity internal)
      Gets the last climbable position for this entity.
      Returns:
      The last climbable position.
    • getArmorValue

      public static int getArmorValue(net.minecraft.world.entity.LivingEntity internal)
      Gets the armor value for this entity.
      Returns:
      The armor value.
    • getKillCredit

      public static net.minecraft.world.entity.LivingEntity getKillCredit(net.minecraft.world.entity.LivingEntity internal)
      Gets the kill credit for this entity. If this entity was last hit by a player, then it will be that player, otherwise it will be the last mob that hit this entity.
      Returns:
      The kill credit.
    • getMaxHealth

      public static float getMaxHealth(net.minecraft.world.entity.LivingEntity internal)
      Gets the maximum health for this entity.
      Returns:
      The maximum health.
    • getArrowCount

      public static int getArrowCount(net.minecraft.world.entity.LivingEntity internal)
      Gets how many arrows are currently in this entity.
      Returns:
      The arrow count.
    • setArrowCount

      public static void setArrowCount(net.minecraft.world.entity.LivingEntity internal, int count)
      Sets how many arrows are currently in this entity.
      Parameters:
      count - The number of arrows to set.
    • getStingerCount

      public static int getStingerCount(net.minecraft.world.entity.LivingEntity internal)
      Gets how many stingers are currently in this entity.
      Returns:
      The stinger count.
    • setStingerCount

      public static void setStingerCount(net.minecraft.world.entity.LivingEntity internal, int count)
      Sets how many stingers are currently in this entity.
      Parameters:
      count - The number of stingers to set.
    • swing

      public static void swing(net.minecraft.world.entity.LivingEntity internal, net.minecraft.world.InteractionHand hand)
      Swings the entity's main hand.
      Parameters:
      hand - The hand to swing.
    • swing

      public static void swing(net.minecraft.world.entity.LivingEntity internal, net.minecraft.world.InteractionHand hand, boolean updateSelf)
      Swings the entity's main hand.
      Parameters:
      hand - The hand to swing.
      updateSelf - Whether to update the entity's self.
    • getAttribute

      public static net.minecraft.world.entity.ai.attributes.AttributeInstance getAttribute(net.minecraft.world.entity.LivingEntity internal, net.minecraft.world.entity.ai.attributes.Attribute attribute)
      Gets the attribute for this entity.
      Parameters:
      attribute - The attribute to get.
      Returns:
      The attribute.
    • getAttributeValue

      public static double getAttributeValue(net.minecraft.world.entity.LivingEntity internal, net.minecraft.world.entity.ai.attributes.Attribute attribute)
      Gets the attribute value for this entity.
      Parameters:
      attribute - The attribute to get the value of.
      Returns:
      The attribute value.
    • getAttributeBaseValue

      public static double getAttributeBaseValue(net.minecraft.world.entity.LivingEntity internal, net.minecraft.world.entity.ai.attributes.Attribute attribute)
      Gets the base attribute value for this entity.
      Parameters:
      attribute - The attribute to get the base value of.
      Returns:
      The base attribute value.
    • getMainHandItem

      public static net.minecraft.world.item.ItemStack getMainHandItem(net.minecraft.world.entity.LivingEntity internal)
      Gets the main hand item for this entity.
      Returns:
      The main hand item.
    • getOffhandItem

      public static net.minecraft.world.item.ItemStack getOffhandItem(net.minecraft.world.entity.LivingEntity internal)
      Gets the offhand item for this entity.
      Returns:
      The offhand item.
    • isHolding

      public static boolean isHolding(net.minecraft.world.entity.LivingEntity internal, net.minecraft.world.item.Item item)
      Checks if the entity is holding an item in their hand.
      Parameters:
      item - The item to check.
      Returns:
      True if the entity is holding the item, false otherwise.
    • isHolding

      public static boolean isHolding(net.minecraft.world.entity.LivingEntity internal, Predicate<net.minecraft.world.item.ItemStack> predicate)
      Checks if the entity is holding an item in their hand.
      Parameters:
      predicate - The predicate to check.
      Returns:
      True if the entity is holding the item, false otherwise.
    • getItemInHand

      public static net.minecraft.world.item.ItemStack getItemInHand(net.minecraft.world.entity.LivingEntity internal, net.minecraft.world.InteractionHand hand)
      Gets the item in the entity's hand.
      Parameters:
      hand - The hand to get the item from.
      Returns:
      The item in the hand.
    • setItemInHand

      public static void setItemInHand(net.minecraft.world.entity.LivingEntity internal, net.minecraft.world.InteractionHand hand, net.minecraft.world.item.ItemStack stack)
      Sets the item in the entity's hand.
      Parameters:
      hand - The hand to set the item in.
      stack - The item to set.
    • hasItemInSlot

      public static boolean hasItemInSlot(net.minecraft.world.entity.LivingEntity internal, net.minecraft.world.entity.EquipmentSlot slot)
      Checks if the entity has an item in a specific slot.
      Parameters:
      slot - The slot to check.
      Returns:
      True if the entity has an item in the slot, false otherwise.
    • getItemBySlot

      public static net.minecraft.world.item.ItemStack getItemBySlot(net.minecraft.world.entity.LivingEntity internal, net.minecraft.world.entity.EquipmentSlot slot)
      Gets the item in a specific slot.
      Parameters:
      slot - The slot to get the item from.
      Returns:
      The item in the slot.
    • getArmorCoverPercentage

      public static float getArmorCoverPercentage(net.minecraft.world.entity.LivingEntity internal)
      Gets the armor cover percentage for this entity. This is a value from 0 to 1 that represents the percentage of the entity's body that is covered by armor.
      Returns:
      The armor cover percentage.
    • getVoicePitch

      public static float getVoicePitch(net.minecraft.world.entity.LivingEntity internal)
      Gets the voice pitch for this entity.
      Returns:
      The voice pitch.
    • getJumpBoostPower

      public static double getJumpBoostPower(net.minecraft.world.entity.LivingEntity internal)
      Gets the jump boost power for this entity.
      Returns:
      The jump boost power.
    • canStandOnFluid

      public static boolean canStandOnFluid(net.minecraft.world.entity.LivingEntity internal, net.minecraft.world.level.material.Fluid fluid)
      Checks if the entity can stand on a specific fluid.
      Parameters:
      fluid - The fluid to check.
      Returns:
      True if the entity can stand on the fluid, false otherwise.
    • travel

      public static void travel(net.minecraft.world.entity.LivingEntity internal, net.minecraft.world.phys.Vec3 vec)
      Moves this entity towards the given location.
      Parameters:
      vec - The direction to move in.
    • getSpeed

      public static float getSpeed(net.minecraft.world.entity.LivingEntity internal)
      Gets the movement speed of this entity.
      Returns:
      The movement speed of the entity.
    • setSpeed

      public static void setSpeed(net.minecraft.world.entity.LivingEntity internal, float speed)
      Sets the movement speed of this entity.
      Parameters:
      speed - The movement speed to set.
    • doHurtTarget

      public static boolean doHurtTarget(net.minecraft.world.entity.LivingEntity internal, net.minecraft.world.entity.Entity entity)
    • isSensitiveToWater

      public static boolean isSensitiveToWater(net.minecraft.world.entity.LivingEntity internal)
      Checks if this entity is sensitive to water, meaning that it will take damage from being in water.
      Returns:
      True if the entity is sensitive to water, false otherwise.
    • isAutoSpinAttack

      public static boolean isAutoSpinAttack(net.minecraft.world.entity.LivingEntity internal)
      Checks if this entity is performing an auto spin attack.
      Returns:
      True if the entity is performing an auto spin attack, false otherwise.
    • setJumping

      public static void setJumping(net.minecraft.world.entity.LivingEntity internal, boolean jumping)
      Sets whether this entity is jumping.
      Parameters:
      jumping - True if the entity should jump, false otherwise.
    • hasLineOfSight

      public static boolean hasLineOfSight(net.minecraft.world.entity.LivingEntity internal, net.minecraft.world.entity.Entity entity)
      Checks if this entity has a line of sight to a specific entity.
      Parameters:
      entity - The entity to check the line of sight to.
      Returns:
      True if the entity has a line of sight to the entity, false otherwise.
    • getAbsorptionAmount

      public static float getAbsorptionAmount(net.minecraft.world.entity.LivingEntity internal)
      Gets the absorption amount for this entity.
      Returns:
      The absorption amount.
    • setAbsorptionAmount

      public static void setAbsorptionAmount(net.minecraft.world.entity.LivingEntity internal, float absorption)
      Sets the absorption amount for this entity.
      Parameters:
      absorption - The absorption amount to set.
    • getMainArm

      public static net.minecraft.world.entity.HumanoidArm getMainArm(net.minecraft.world.entity.LivingEntity internal)
      Gets the main arm for this entity.
      Returns:
      The main arm.
    • isUsingItem

      public static boolean isUsingItem(net.minecraft.world.entity.LivingEntity internal)
      Checks if this entity is using an item.
      Returns:
      True if the entity is using an item, false otherwise.
    • getUsedItemHand

      public static net.minecraft.world.InteractionHand getUsedItemHand(net.minecraft.world.entity.LivingEntity internal)
      Gets the hand that the entity is using an item with.
      Returns:
      The hand that the entity is using an item with.
    • startUsingItem

      public static void startUsingItem(net.minecraft.world.entity.LivingEntity internal, net.minecraft.world.InteractionHand hand)
      Starts using an item.
      Parameters:
      hand - The hand to use the item with.
    • getUseItem

      public static net.minecraft.world.item.ItemStack getUseItem(net.minecraft.world.entity.LivingEntity internal)
      Gets the item that the entity is using.
      Returns:
      The item that the entity is using.
    • getUseItemRemainingTicks

      public static int getUseItemRemainingTicks(net.minecraft.world.entity.LivingEntity internal)
      Gets the remaining ticks left of the use duration of the item that is being used.
      Returns:
      The remaining ticks for the item that the entity is using.
    • getTicksUsingItem

      public static int getTicksUsingItem(net.minecraft.world.entity.LivingEntity internal)
      Gets how long the entity has been using an item.
      Returns:
      The ticks that the entity has been using an item.
    • releaseUsingItem

      public static void releaseUsingItem(net.minecraft.world.entity.LivingEntity internal)
      Releases the item that the entity is using.
    • stopUsingItem

      public static void stopUsingItem(net.minecraft.world.entity.LivingEntity internal)
      Stops using an item.
    • isBlocking

      public static boolean isBlocking(net.minecraft.world.entity.LivingEntity internal)
      Checks if the entity is blocking.
      Returns:
      True if the entity is blocking, false otherwise.
    • isSuppressingSlidingDownLadder

      public static boolean isSuppressingSlidingDownLadder(net.minecraft.world.entity.LivingEntity internal)
      Checks if the entity is suppressing sliding down a ladder, such as sneaking while on a ladder.
      Returns:
      True if the entity is suppressing sliding down a ladder, false otherwise.
    • isFallFlying

      public static boolean isFallFlying(net.minecraft.world.entity.LivingEntity internal)
      Checks if the entity is flying with an elytra.
      Returns:
      True if the entity is flying with an elytra, false otherwise.
    • isVisuallySwimming

      public static boolean isVisuallySwimming(net.minecraft.world.entity.LivingEntity internal)
      Checks if the entity is visually swimming.
      Returns:
      True if the entity is visually swimming, false otherwise.
    • getFallFlyingTicks

      public static int getFallFlyingTicks(net.minecraft.world.entity.LivingEntity internal)
      Gets the ticks that the entity has been flying with an elytra.
      Returns:
      The ticks that the entity has been flying with an elytra.
    • isAffectedByPotions

      public static boolean isAffectedByPotions(net.minecraft.world.entity.LivingEntity internal)
      Checks if the entity is affected by potions, entities such as armor stands are not affected by potions.
      Returns:
      True if the entity is affected by potions, false otherwise.
    • attackable

      public static boolean attackable(net.minecraft.world.entity.LivingEntity internal)
      Checks if the entity is attackable.
      Returns:
      True if the entity is attackable, false otherwise.
    • canTakeItem

      public static boolean canTakeItem(net.minecraft.world.entity.LivingEntity internal, net.minecraft.world.item.ItemStack stack)
      Checks if the item can be worn as armor.
      Parameters:
      stack - The item to check.
      Returns:
      True if the item can be worn as armor, false otherwise.
    • getSleepingPos

      public static net.minecraft.core.BlockPos getSleepingPos(net.minecraft.world.entity.LivingEntity internal)
      Gets the position that the entity is sleeping at.
      Returns:
      The position that the entity is sleeping at.
    • setSleepingPos

      public static void setSleepingPos(net.minecraft.world.entity.LivingEntity internal, net.minecraft.core.BlockPos pos)
      Sets the position that the entity is sleeping at.
      Parameters:
      pos - The position to set the entity to sleep at.
    • clearSleepingPos

      public static void clearSleepingPos(net.minecraft.world.entity.LivingEntity internal)
      Clears the position that the entity is sleeping at.
    • isSleeping

      public static boolean isSleeping(net.minecraft.world.entity.LivingEntity internal)
      Checks if the entity is sleeping.
      Returns:
      True if the entity is sleeping, false otherwise.
    • startSleeping

      public static void startSleeping(net.minecraft.world.entity.LivingEntity internal, net.minecraft.core.BlockPos pos)
      Starts the entity to sleep at a specific position.
      Parameters:
      pos - The position to set the entity to sleep at.
    • stopSleeping

      public static void stopSleeping(net.minecraft.world.entity.LivingEntity internal)
      Stops the entity from sleeping.
    • getBedOrientation

      public static net.minecraft.core.Direction getBedOrientation(net.minecraft.world.entity.LivingEntity internal)
      Gets the orientation of the bed that the entity is sleeping on.
      Returns:
      The orientation of the bed that the entity is sleeping on.
    • eat

      public static net.minecraft.world.item.ItemStack eat(net.minecraft.world.entity.LivingEntity internal, net.minecraft.world.level.Level level, net.minecraft.world.item.ItemStack stack)
      Eats an item.
      Parameters:
      level - The level that the entity is in.
      stack - The item to eat.
      Returns:
      The item that the entity ate.
    • isCurrentlyGlowing

      public static boolean isCurrentlyGlowing(net.minecraft.world.entity.LivingEntity internal)
      Checks if the entity is currently glowing.
      Returns:
      True if the entity is currently glowing, false otherwise.