LivingEntity
Importing the class
It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.
import crafttweaker.api.entity.LivingEntity;
Extending Entity
LivingEntity extends Entity. That means all methods available in Entity are also available in LivingEntity
Methods
Return Type: boolean
LivingEntity.addEffect(effectInstance as MobEffectInstance) as boolean
Parameter | Type | Description |
---|---|---|
Parameter effectInstance | Type MobEffectInstance | Description No Description Provided |
Return Type: boolean
LivingEntity.addEffect(effectInstance as MobEffectInstance, entity as Entity) as boolean
Parameter | Type | Description |
---|---|---|
Parameter effectInstance | Type MobEffectInstance | Description No Description Provided |
Parameter entity | Type Entity | Description No Description Provided |
Return Type: boolean
// LivingEntity.attackable() as boolean
myLivingEntity.attackable();
Return Type: boolean
LivingEntity.canAttack(target as LivingEntity) as boolean
Parameter | Type | Description |
---|---|---|
Parameter target | Type LivingEntity | Description No Description Provided |
Return Type: boolean
LivingEntity.canBeAffected(effectInstance as MobEffectInstance) as boolean
Parameter | Type | Description |
---|---|---|
Parameter effectInstance | Type MobEffectInstance | Description No Description Provided |
Return Type: boolean
// LivingEntity.canBeSeenAsEnemy() as boolean
myLivingEntity.canBeSeenAsEnemy();
Return Type: boolean
// LivingEntity.canBeSeenByAnyone() as boolean
myLivingEntity.canBeSeenByAnyone();
Return Type: boolean
// LivingEntity.canBreatheUnderwater() as boolean
myLivingEntity.canBreatheUnderwater();
Return Type: boolean
// LivingEntity.canSpawnSoulSpeedParticle() as boolean
myLivingEntity.canSpawnSoulSpeedParticle();
Return Type: boolean
LivingEntity.canStandOnFluid(fluid as Fluid) as boolean
Parameter | Type | Description |
---|---|---|
Parameter fluid | Type Fluid | Description No Description Provided |
Return Type: boolean
LivingEntity.canTakeItem(stack as ItemStack) as boolean
Parameter | Type | Description |
---|---|---|
Parameter stack | Type ItemStack | Description No Description Provided |
Return Type: void
// LivingEntity.clearSleepingPos() as void
myLivingEntity.clearSleepingPos();
Return Type: void
LivingEntity.die(source as DamageSource) as void
Parameter | Type | Description |
---|---|---|
Parameter source | Type DamageSource | Description No Description Provided |
Return Type: boolean
LivingEntity.doHurtTarget(entity as Entity) as boolean
Parameter | Type | Description |
---|---|---|
Parameter entity | Type Entity | Description No Description Provided |
Return Type: void
LivingEntity.forceAddEffect(effectInstance as MobEffectInstance, entity as Entity) as void
Parameter | Type | Description |
---|---|---|
Parameter effectInstance | Type MobEffectInstance | Description No Description Provided |
Parameter entity | Type Entity | Description No Description Provided |
Return Type: float
// LivingEntity.getAbsorptionAmount() as float
myLivingEntity.getAbsorptionAmount();
Return Type: Collection<MobEffectInstance>
// LivingEntity.getActiveEffects() as Collection<MobEffectInstance>
myLivingEntity.getActiveEffects();
Return Type: MobEffectInstance[MobEffect]
// LivingEntity.getActiveEffectsMap() as MobEffectInstance[MobEffect]
myLivingEntity.getActiveEffectsMap();
Return Type: float
// LivingEntity.getArmorCoverPercentage() as float
myLivingEntity.getArmorCoverPercentage();
Return Type: int
// LivingEntity.getArmorValue() as int
myLivingEntity.getArmorValue();
Return Type: int
// LivingEntity.getArrowCount() as int
myLivingEntity.getArrowCount();
Return Type: AttributeInstance
LivingEntity.getAttribute(attribute as Attribute) as AttributeInstance
Parameter | Type | Description |
---|---|---|
Parameter attribute | Type Attribute | Description No Description Provided |
Return Type: double
LivingEntity.getAttributeBaseValue(attribute as Attribute) as double
Parameter | Type | Description |
---|---|---|
Parameter attribute | Type Attribute | Description No Description Provided |
Return Type: double
LivingEntity.getAttributeValue(attribute as Attribute) as double
Parameter | Type | Description |
---|---|---|
Parameter attribute | Type Attribute | Description No Description Provided |
Return Type: Direction
// LivingEntity.getBedOrientation() as Direction
myLivingEntity.getBedOrientation();
Return Type: MobEffectInstance
LivingEntity.getEffect(effect as MobEffect) as MobEffectInstance
Parameter | Type | Description |
---|---|---|
Parameter effect | Type MobEffect | Description No Description Provided |
Return Type: int
// LivingEntity.getFallFlyingTicks() as int
myLivingEntity.getFallFlyingTicks();
Return Type: float
// LivingEntity.getHealth() as float
myLivingEntity.getHealth();
Return Type: ItemStack
LivingEntity.getItemBySlot(slot as EquipmentSlot) as ItemStack
Parameter | Type | Description |
---|---|---|
Parameter slot | Type EquipmentSlot | Description No Description Provided |
Return Type: ItemStack
LivingEntity.getItemInHand(hand as InteractionHand) as ItemStack
Parameter | Type | Description |
---|---|---|
Parameter hand | Type InteractionHand | Description No Description Provided |
Return Type: double
// LivingEntity.getJumpBoostPower() as double
myLivingEntity.getJumpBoostPower();
Return Type: LivingEntity
// LivingEntity.getKillCredit() as LivingEntity
myLivingEntity.getKillCredit();
Return Type: BlockPos
// LivingEntity.getLastClimbablePos() as BlockPos
myLivingEntity.getLastClimbablePos();
Return Type: DamageSource
// LivingEntity.getLastDamageSource() as DamageSource
myLivingEntity.getLastDamageSource();
Return Type: LivingEntity
// LivingEntity.getLastHurtByMob() as LivingEntity
myLivingEntity.getLastHurtByMob();
Return Type: int
// LivingEntity.getLastHurtByMobTimestamp() as int
myLivingEntity.getLastHurtByMobTimestamp();
Return Type: LivingEntity
// LivingEntity.getLastHurtMob() as LivingEntity
myLivingEntity.getLastHurtMob();
Return Type: int
// LivingEntity.getLastHurtMobTimestamp() as int
myLivingEntity.getLastHurtMobTimestamp();
Return Type: ResourceLocation
// LivingEntity.getLootTable() as ResourceLocation
myLivingEntity.getLootTable();
Return Type: HumanoidArm
// LivingEntity.getMainArm() as HumanoidArm
myLivingEntity.getMainArm();
Return Type: ItemStack
// LivingEntity.getMainHandItem() as ItemStack
myLivingEntity.getMainHandItem();
Return Type: float
// LivingEntity.getMaxHealth() as float
myLivingEntity.getMaxHealth();
Return Type: MobType
// LivingEntity.getMobType() as MobType
myLivingEntity.getMobType();
Return Type: int
// LivingEntity.getNoActionTime() as int
myLivingEntity.getNoActionTime();
Return Type: ItemStack
// LivingEntity.getOffhandItem() as ItemStack
myLivingEntity.getOffhandItem();
Return Type: Random
// LivingEntity.getRandom() as Random
myLivingEntity.getRandom();
Return Type: float
// LivingEntity.getScale() as float
myLivingEntity.getScale();
Return Type: BlockPos
// LivingEntity.getSleepingPos() as BlockPos
myLivingEntity.getSleepingPos();
Return Type: float
// LivingEntity.getSpeed() as float
myLivingEntity.getSpeed();
Return Type: int
// LivingEntity.getStingerCount() as int
myLivingEntity.getStingerCount();
Return Type: float
LivingEntity.getSwimAmount(partialTicks as float) as float
Parameter | Type | Description |
---|---|---|
Parameter partialTicks | Type float | Description No Description Provided |
Return Type: int
// LivingEntity.getTicksUsingItem() as int
myLivingEntity.getTicksUsingItem();
Return Type: ItemStack
// LivingEntity.getUseItem() as ItemStack
myLivingEntity.getUseItem();
Return Type: int
// LivingEntity.getUseItemRemainingTicks() as int
myLivingEntity.getUseItemRemainingTicks();
Return Type: InteractionHand
// LivingEntity.getUsedItemHand() as InteractionHand
myLivingEntity.getUsedItemHand();
Return Type: double
LivingEntity.getVisibilityPercent(lookingEntity as Entity) as double
Parameter | Type | Description |
---|---|---|
Parameter lookingEntity | Type Entity | Description No Description Provided |
Return Type: float
// LivingEntity.getVoicePitch() as float
myLivingEntity.getVoicePitch();
Return Type: boolean
LivingEntity.hasEffect(effect as MobEffect) as boolean
Parameter | Type | Description |
---|---|---|
Parameter effect | Type MobEffect | Description No Description Provided |
Return Type: boolean
LivingEntity.hasItemInSlot(slot as EquipmentSlot) as boolean
Parameter | Type | Description |
---|---|---|
Parameter slot | Type EquipmentSlot | Description No Description Provided |
Return Type: boolean
LivingEntity.hasLineOfSight(entity as Entity) as boolean
Parameter | Type | Description |
---|---|---|
Parameter entity | Type Entity | Description No Description Provided |
Return Type: void
LivingEntity.heal(amount as float) as void
Parameter | Type | Description |
---|---|---|
Parameter amount | Type float | Description No Description Provided |
Return Type: boolean
// LivingEntity.isAffectedByPotions() as boolean
myLivingEntity.isAffectedByPotions();
Return Type: boolean
// LivingEntity.isAutoSpinAttack() as boolean
myLivingEntity.isAutoSpinAttack();
Return Type: boolean
// LivingEntity.isBaby() as boolean
myLivingEntity.isBaby();
Return Type: boolean
// LivingEntity.isBlocking() as boolean
myLivingEntity.isBlocking();
Return Type: boolean
// LivingEntity.isCurrentlyGlowing() as boolean
myLivingEntity.isCurrentlyGlowing();
Return Type: boolean
LivingEntity.isDamageSourceBlocked(source as DamageSource) as boolean
Parameter | Type | Description |
---|---|---|
Parameter source | Type DamageSource | Description No Description Provided |
Return Type: boolean
// LivingEntity.isDeadOrDying() as boolean
myLivingEntity.isDeadOrDying();
Return Type: boolean
// LivingEntity.isFallFlying() as boolean
myLivingEntity.isFallFlying();
Return Type: boolean
LivingEntity.isHolding(item as ItemDefinition) as boolean
Parameter | Type | Description |
---|---|---|
Parameter item | Type ItemDefinition | Description No Description Provided |
Return Type: boolean
LivingEntity.isHolding(predicate as Predicate<ItemStack>) as boolean
Parameter | Type | Description |
---|---|---|
Parameter predicate | Type Predicate<ItemStack> | Description No Description Provided |
Return Type: boolean
// LivingEntity.isInvertedHealAndHarm() as boolean
myLivingEntity.isInvertedHealAndHarm();
Return Type: boolean
// LivingEntity.isSensitiveToWater() as boolean
myLivingEntity.isSensitiveToWater();
Return Type: boolean
// LivingEntity.isSleeping() as boolean
myLivingEntity.isSleeping();
Return Type: boolean
// LivingEntity.isSuppressingSlidingDownLadder() as boolean
myLivingEntity.isSuppressingSlidingDownLadder();
Return Type: boolean
// LivingEntity.isUsingItem() as boolean
myLivingEntity.isUsingItem();
Return Type: boolean
// LivingEntity.isVisuallySwimming() as boolean
myLivingEntity.isVisuallySwimming();
Return Type: void
LivingEntity.knockback(x as double, y as double, z as double) as void
Parameter | Type | Description |
---|---|---|
Parameter x | Type double | Description No Description Provided |
Parameter y | Type double | Description No Description Provided |
Parameter z | Type double | Description No Description Provided |
Return Type: void
// LivingEntity.releaseUsingItem() as void
myLivingEntity.releaseUsingItem();
Return Type: boolean
// LivingEntity.removeAllEffects() as boolean
myLivingEntity.removeAllEffects();
Return Type: boolean
LivingEntity.removeEffect(effect as MobEffect) as boolean
Parameter | Type | Description |
---|---|---|
Parameter effect | Type MobEffect | Description No Description Provided |
Return Type: MobEffectInstance
LivingEntity.removeEffectNoUpdate(effect as MobEffect) as MobEffectInstance
Parameter | Type | Description |
---|---|---|
Parameter effect | Type MobEffect | Description No Description Provided |
Return Type: void
LivingEntity.setAbsorptionAmount(absorption as float) as void
Parameter | Type | Description |
---|---|---|
Parameter absorption | Type float | Description No Description Provided |
Return Type: void
LivingEntity.setArrowCount(count as int) as void
Parameter | Type | Description |
---|---|---|
Parameter count | Type int | Description No Description Provided |
Return Type: void
LivingEntity.setDiscardFriction(discardFriction as boolean) as void
Parameter | Type | Description |
---|---|---|
Parameter discardFriction | Type boolean | Description No Description Provided |
Return Type: void
LivingEntity.setHealth(health as float) as void
Parameter | Type | Description |
---|---|---|
Parameter health | Type float | Description No Description Provided |
Return Type: void
LivingEntity.setItemInHand(hand as InteractionHand, stack as ItemStack) as void
Parameter | Type | Description |
---|---|---|
Parameter hand | Type InteractionHand | Description No Description Provided |
Parameter stack | Type ItemStack | Description No Description Provided |
Return Type: void
LivingEntity.setJumping(jumping as boolean) as void
Parameter | Type | Description |
---|---|---|
Parameter jumping | Type boolean | Description No Description Provided |
Return Type: void
LivingEntity.setLastHurtByMob(entity as LivingEntity) as void
Parameter | Type | Description |
---|---|---|
Parameter entity | Type LivingEntity | Description No Description Provided |
Return Type: void
LivingEntity.setLastHurtByPlayer(player as Player) as void
Parameter | Type | Description |
---|---|---|
Parameter player | Type Player | Description No Description Provided |
Return Type: void
LivingEntity.setLastHurtMob(entity as Entity) as void
Parameter | Type | Description |
---|---|---|
Parameter entity | Type Entity | Description No Description Provided |
Return Type: void
LivingEntity.setNoActionTime(idleTime as int) as void
Parameter | Type | Description |
---|---|---|
Parameter idleTime | Type int | Description No Description Provided |
Return Type: void
LivingEntity.setSleepingPos(pos as BlockPos) as void
Parameter | Type | Description |
---|---|---|
Parameter pos | Type BlockPos | Description No Description Provided |
Return Type: void
LivingEntity.setSpeed(speed as float) as void
Parameter | Type | Description |
---|---|---|
Parameter speed | Type float | Description No Description Provided |
Return Type: void
LivingEntity.setStingerCount(count as int) as void
Parameter | Type | Description |
---|---|---|
Parameter count | Type int | Description No Description Provided |
Return Type: boolean
// LivingEntity.shouldDiscardFriction() as boolean
myLivingEntity.shouldDiscardFriction();
Return Type: void
LivingEntity.startAutoSpinAttack(ticks as int) as void
Parameter | Type | Description |
---|---|---|
Parameter ticks | Type int | Description No Description Provided |
Return Type: void
LivingEntity.startSleeping(pos as BlockPos) as void
Parameter | Type | Description |
---|---|---|
Parameter pos | Type BlockPos | Description No Description Provided |
Return Type: void
LivingEntity.startUsingItem(param0 as InteractionHand) as void
Parameter | Type | Description |
---|---|---|
Parameter param0 | Type InteractionHand | Description No Description Provided |
Return Type: void
// LivingEntity.stopSleeping() as void
myLivingEntity.stopSleeping();
Return Type: void
// LivingEntity.stopUsingItem() as void
myLivingEntity.stopUsingItem();
Return Type: void
LivingEntity.swing(hand as InteractionHand) as void
Parameter | Type | Description |
---|---|---|
Parameter hand | Type InteractionHand | Description No Description Provided |
Return Type: void
LivingEntity.swing(hand as InteractionHand, updateSelf as boolean) as void
Parameter | Type | Description |
---|---|---|
Parameter hand | Type InteractionHand | Description No Description Provided |
Parameter updateSelf | Type boolean | Description No Description Provided |
Return Type: void
LivingEntity.travel(vec as Vec3) as void
Parameter | Type | Description |
---|---|---|
Parameter vec | Type Vec3 | Description No Description Provided |
Properties
Name | Type | Has Getter | Has Setter | Description |
---|---|---|---|---|
Name absorptionAmount | Type float | Has Getter true | Has Setter false | Description No Description Provided |
Name activeEFfectsMap | Type MobEffectInstance[MobEffect] | Has Getter true | Has Setter false | Description No Description Provided |
Name activeEffects | Type Collection<MobEffectInstance> | Has Getter true | Has Setter false | Description No Description Provided |
Name armorCoverPercentage | Type float | Has Getter true | Has Setter false | Description No Description Provided |
Name armorValue | Type int | Has Getter true | Has Setter false | Description No Description Provided |
Name arrowCount | Type int | Has Getter true | Has Setter false | Description No Description Provided |
Name attackable | Type boolean | Has Getter true | Has Setter false | Description No Description Provided |
Name bedOrientation | Type Direction | Has Getter true | Has Setter false | Description No Description Provided |
Name canBeSeenAsEnemy | Type boolean | Has Getter true | Has Setter false | Description No Description Provided |
Name canBeSeenByAnyone | Type boolean | Has Getter true | Has Setter false | Description No Description Provided |
Name canBreatheUnderwater | Type boolean | Has Getter true | Has Setter false | Description No Description Provided |
Name fallFlyingTicks | Type int | Has Getter true | Has Setter false | Description No Description Provided |
Name health | Type float | Has Getter true | Has Setter false | Description No Description Provided |
Name isAffectedByPotions | Type boolean | Has Getter true | Has Setter false | Description No Description Provided |
Name isAutoSpinAttack | Type boolean | Has Getter true | Has Setter false | Description No Description Provided |
Name isBaby | Type boolean | Has Getter true | Has Setter false | Description No Description Provided |
Name isBlocking | Type boolean | Has Getter true | Has Setter false | Description No Description Provided |
Name isCurrentlyGlowing | Type boolean | Has Getter true | Has Setter false | Description No Description Provided |
Name isDeadOrDying | Type boolean | Has Getter true | Has Setter false | Description No Description Provided |
Name isFallFlying | Type boolean | Has Getter true | Has Setter false | Description No Description Provided |
Name isInvertedHealAndHarm | Type boolean | Has Getter true | Has Setter false | Description No Description Provided |
Name isSensitiveToWater | Type boolean | Has Getter true | Has Setter false | Description No Description Provided |
Name isSleeping | Type boolean | Has Getter true | Has Setter false | Description No Description Provided |
Name isSuppressingSlidingDownLadder | Type boolean | Has Getter true | Has Setter false | Description No Description Provided |
Name isUsingItem | Type boolean | Has Getter true | Has Setter false | Description No Description Provided |
Name isVisuallySwimming | Type boolean | Has Getter true | Has Setter false | Description No Description Provided |
Name jumpBoostPower | Type double | Has Getter true | Has Setter false | Description No Description Provided |
Name killCredit | Type LivingEntity | Has Getter true | Has Setter false | Description No Description Provided |
Name lastClimbablePos | Type BlockPos | Has Getter true | Has Setter false | Description No Description Provided |
Name lastDamageSource | Type DamageSource | Has Getter true | Has Setter false | Description No Description Provided |
Name lastHurtByMob | Type LivingEntity | Has Getter true | Has Setter false | Description No Description Provided |
Name lastHurtByMobTimestamp | Type int | Has Getter true | Has Setter false | Description No Description Provided |
Name lastHurtMob | Type LivingEntity | Has Getter true | Has Setter false | Description No Description Provided |
Name lastHurtMobTimestamp | Type int | Has Getter true | Has Setter false | Description No Description Provided |
Name lootTable | Type ResourceLocation | Has Getter true | Has Setter false | Description No Description Provided |
Name mainArm | Type HumanoidArm | Has Getter true | Has Setter false | Description No Description Provided |
Name mainHandItem | Type ItemStack | Has Getter true | Has Setter false | Description No Description Provided |
Name maxHealth | Type float | Has Getter true | Has Setter false | Description No Description Provided |
Name mobType | Type MobType | Has Getter true | Has Setter false | Description No Description Provided |
Name noActionTime | Type int | Has Getter true | Has Setter false | Description No Description Provided |
Name offHandItem | Type ItemStack | Has Getter true | Has Setter false | Description No Description Provided |
Name random | Type Random | Has Getter true | Has Setter false | Description No Description Provided |
Name scale | Type float | Has Getter true | Has Setter false | Description No Description Provided |
Name shouldDiscardFriction | Type boolean | Has Getter true | Has Setter false | Description No Description Provided |
Name sleepingPos | Type BlockPos | Has Getter true | Has Setter false | Description No Description Provided |
Name speed | Type float | Has Getter true | Has Setter false | Description No Description Provided |
Name stingerCount | Type int | Has Getter true | Has Setter false | Description No Description Provided |
Name ticksUsingItem | Type int | Has Getter true | Has Setter false | Description No Description Provided |
Name useItem | Type ItemStack | Has Getter true | Has Setter false | Description No Description Provided |
Name useItemRemainingTicks | Type int | Has Getter true | Has Setter false | Description No Description Provided |
Name usedItemHand | Type InteractionHand | Has Getter true | Has Setter false | Description No Description Provided |
Name voicePitch | Type float | Has Getter true | Has Setter false | Description No Description Provided |