LivingEntity
Link to livingentity
导入类
Link to 导入类
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.
ZenScript Copyimport crafttweaker.api.entity.LivingEntity;
Extending Entity
Link to extending-entity
LivingEntity extends Entity. That means all methods available in Entity are also available in LivingEntity
使用方式
Link to 使用方式
Name: addEffect
Return Type: boolean
ZenScript CopyLivingEntity.addEffect(effectInstance as MobEffectInstance) as boolean
参数 | 类型 |
---|---|
参数 effectInstance | 类型 MobEffectInstance |
Name: addEffect
Return Type: boolean
ZenScript CopyLivingEntity.addEffect(effectInstance as MobEffectInstance, entity as Entity?) as boolean
参数 | 类型 |
---|---|
参数 effectInstance | 类型 MobEffectInstance |
参数 entity | 类型 Entity? |
Name: attackable
Return Type: boolean
ZenScript Copy// LivingEntity.attackable() as boolean
myLivingEntity.attackable();
Name: canAttack
Return Type: boolean
ZenScript CopyLivingEntity.canAttack(target as LivingEntity) as boolean
参数 | 类型 |
---|---|
参数 target | 类型 LivingEntity |
Name: canBeAffected
Return Type: boolean
ZenScript CopyLivingEntity.canBeAffected(effectInstance as MobEffectInstance) as boolean
参数 | 类型 |
---|---|
参数 effectInstance | 类型 MobEffectInstance |
Name: canBeSeenAsEnemy
Return Type: boolean
ZenScript Copy// LivingEntity.canBeSeenAsEnemy() as boolean
myLivingEntity.canBeSeenAsEnemy();
Name: canBeSeenByAnyone
Return Type: boolean
ZenScript Copy// LivingEntity.canBeSeenByAnyone() as boolean
myLivingEntity.canBeSeenByAnyone();
Name: canBreatheUnderwater
Return Type: boolean
ZenScript Copy// LivingEntity.canBreatheUnderwater() as boolean
myLivingEntity.canBreatheUnderwater();
Name: canSpawnSoulSpeedParticle
Return Type: boolean
ZenScript Copy// LivingEntity.canSpawnSoulSpeedParticle() as boolean
myLivingEntity.canSpawnSoulSpeedParticle();
Name: canStandOnFluid
Return Type: boolean
ZenScript CopyLivingEntity.canStandOnFluid(fluid as Fluid) as boolean
参数 | 类型 |
---|---|
参数 fluid | 类型 Fluid |
Name: canTakeItem
Return Type: boolean
ZenScript CopyLivingEntity.canTakeItem(stack as ItemStack) as boolean
参数 | 类型 |
---|---|
参数 堆叠 | 类型 物品应用 |
Name: clearSleepingPos
ZenScript Copy// LivingEntity.clearSleepingPos()
myLivingEntity.clearSleepingPos();
Name: doHurtTarget
Return Type: boolean
ZenScript CopyLivingEntity.doHurtTarget(entity as Entity) as boolean
参数 | 类型 |
---|---|
参数 entity | 类型 Entity |
Name: forceAddEffect
ZenScript CopyLivingEntity.forceAddEffect(effectInstance as MobEffectInstance, entity as Entity?)
参数 | 类型 |
---|---|
参数 effectInstance | 类型 MobEffectInstance |
参数 entity | 类型 Entity? |
Name: getAbsorptionAmount
Return Type: float
ZenScript Copy// LivingEntity.getAbsorptionAmount() as float
myLivingEntity.getAbsorptionAmount();
Name: getActiveEffects
Return Type: Collection<MobEffectInstance>
ZenScript Copy// LivingEntity.getActiveEffects() as Collection<MobEffectInstance>
myLivingEntity.getActiveEffects();
Name: getActiveEffectsMap
Return Type: MobEffectInstance[MobEffect]
ZenScript Copy// LivingEntity.getActiveEffectsMap() as MobEffectInstance[MobEffect]
myLivingEntity.getActiveEffectsMap();
Name: getArmorCoverPercentage
Return Type: float
ZenScript Copy// LivingEntity.getArmorCoverPercentage() as float
myLivingEntity.getArmorCoverPercentage();
Name: getArmorValue
Return Type: int
ZenScript Copy// LivingEntity.getArmorValue() as int
myLivingEntity.getArmorValue();
Name: getArrowCount
Return Type: int
ZenScript Copy// LivingEntity.getArrowCount() as int
myLivingEntity.getArrowCount();
Name: getAttribute
Return Type: AttributeInstance?
ZenScript CopyLivingEntity.getAttribute(attribute as Attribute) as AttributeInstance?
参数 | 类型 |
---|---|
参数 attribute | 类型 Attribute |
Name: getAttributeBaseValue
Return Type: double
ZenScript CopyLivingEntity.getAttributeBaseValue(attribute as Attribute) as double
参数 | 类型 |
---|---|
参数 attribute | 类型 Attribute |
Name: getAttributeValue
Return Type: double
ZenScript CopyLivingEntity.getAttributeValue(attribute as Attribute) as double
参数 | 类型 |
---|---|
参数 attribute | 类型 Attribute |
Name: getBedOrientation
Return Type: Direction?
ZenScript Copy// LivingEntity.getBedOrientation() as Direction?
myLivingEntity.getBedOrientation();
Name: getEffect
Return Type: MobEffectInstance?
ZenScript CopyLivingEntity.getEffect(effect as MobEffect) as MobEffectInstance?
参数 | 类型 |
---|---|
参数 effect | 类型 MobEffect |
Name: getFallFlyingTicks
Return Type: int
ZenScript Copy// LivingEntity.getFallFlyingTicks() as int
myLivingEntity.getFallFlyingTicks();
Name: getHealth
Return Type: float
ZenScript Copy// LivingEntity.getHealth() as float
myLivingEntity.getHealth();
Name: getItemBySlot
Return Type: ItemStack
ZenScript CopyLivingEntity.getItemBySlot(slot as EquipmentSlot) as ItemStack
参数 | 类型 |
---|---|
参数 slot | 类型 EquipmentSlot |
Name: getItemInHand
Return Type: ItemStack
ZenScript CopyLivingEntity.getItemInHand(hand as InteractionHand) as ItemStack
参数 | 类型 |
---|---|
参数 hand | 类型 InteractionHand |
Name: getJumpBoostPower
Return Type: double
ZenScript Copy// LivingEntity.getJumpBoostPower() as double
myLivingEntity.getJumpBoostPower();
Name: getKillCredit
Return Type: LivingEntity?
ZenScript Copy// LivingEntity.getKillCredit() as LivingEntity?
myLivingEntity.getKillCredit();
Name: getLastClimbablePos
Return Type: BlockPos?
ZenScript Copy// LivingEntity.getLastClimbablePos() as BlockPos?
myLivingEntity.getLastClimbablePos();
Name: getLastDamageSource
Return Type: DamageSource?
ZenScript Copy// LivingEntity.getLastDamageSource() as DamageSource?
myLivingEntity.getLastDamageSource();
Name: getLastHurtByMob
Return Type: LivingEntity?
ZenScript Copy// LivingEntity.getLastHurtByMob() as LivingEntity?
myLivingEntity.getLastHurtByMob();
Name: getLastHurtByMobTimestamp
Return Type: int
ZenScript Copy// LivingEntity.getLastHurtByMobTimestamp() as int
myLivingEntity.getLastHurtByMobTimestamp();
Name: getLastHurtMob
Return Type: LivingEntity
ZenScript Copy// LivingEntity.getLastHurtMob() as LivingEntity
myLivingEntity.getLastHurtMob();
Name: getLastHurtMobTimestamp
Return Type: int
ZenScript Copy// LivingEntity.getLastHurtMobTimestamp() as int
myLivingEntity.getLastHurtMobTimestamp();
Name: getLootTable
Return Type: ResourceLocation
ZenScript Copy// LivingEntity.getLootTable() as ResourceLocation
myLivingEntity.getLootTable();
Name: getMainArm
Return Type: HumanoidArm
ZenScript Copy// LivingEntity.getMainArm() as HumanoidArm
myLivingEntity.getMainArm();
Name: getMainHandItem
Return Type: ItemStack
ZenScript Copy// LivingEntity.getMainHandItem() as ItemStack
myLivingEntity.getMainHandItem();
Name: getMaxHealth
Return Type: float
ZenScript Copy// LivingEntity.getMaxHealth() as float
myLivingEntity.getMaxHealth();
Name: getMobType
Return Type: MobType
ZenScript Copy// LivingEntity.getMobType() as MobType
myLivingEntity.getMobType();
Name: getNoActionTime
Return Type: int
ZenScript Copy// LivingEntity.getNoActionTime() as int
myLivingEntity.getNoActionTime();
Name: getOffhandItem
Return Type: ItemStack
ZenScript Copy// LivingEntity.getOffhandItem() as ItemStack
myLivingEntity.getOffhandItem();
Name: getRandom
Return Type: Random
ZenScript Copy// LivingEntity.getRandom() as Random
myLivingEntity.getRandom();
Name: getScale
Return Type: float
ZenScript Copy// LivingEntity.getScale() as float
myLivingEntity.getScale();
Name: getSleepingPos
Return Type: BlockPos?
ZenScript Copy// LivingEntity.getSleepingPos() as BlockPos?
myLivingEntity.getSleepingPos();
Name: getSpeed
Return Type: float
ZenScript Copy// LivingEntity.getSpeed() as float
myLivingEntity.getSpeed();
Name: getStingerCount
Return Type: int
ZenScript Copy// LivingEntity.getStingerCount() as int
myLivingEntity.getStingerCount();
Name: getSwimAmount
Return Type: float
ZenScript CopyLivingEntity.getSwimAmount(partialTicks as float) as float
参数 | 类型 |
---|---|
参数 partialTicks | 类型 float |
Name: getTicksUsingItem
Return Type: int
ZenScript Copy// LivingEntity.getTicksUsingItem() as int
myLivingEntity.getTicksUsingItem();
Name: getUseItem
Return Type: ItemStack
ZenScript Copy// LivingEntity.getUseItem() as ItemStack
myLivingEntity.getUseItem();
Name: getUseItemRemainingTicks
Return Type: int
ZenScript Copy// LivingEntity.getUseItemRemainingTicks() as int
myLivingEntity.getUseItemRemainingTicks();
Name: getUsedItemHand
Return Type: InteractionHand
ZenScript Copy// LivingEntity.getUsedItemHand() as InteractionHand
myLivingEntity.getUsedItemHand();
Name: getVisibilityPercent
Return Type: double
ZenScript CopyLivingEntity.getVisibilityPercent(lookingEntity as Entity?) as double
参数 | 类型 |
---|---|
参数 lookingEntity | 类型 Entity? |
Name: getVoicePitch
Return Type: float
ZenScript Copy// LivingEntity.getVoicePitch() as float
myLivingEntity.getVoicePitch();
Name: hasEffect
Return Type: boolean
ZenScript CopyLivingEntity.hasEffect(effect as MobEffect) as boolean
参数 | 类型 |
---|---|
参数 effect | 类型 MobEffect |
Name: hasItemInSlot
Return Type: boolean
ZenScript CopyLivingEntity.hasItemInSlot(slot as EquipmentSlot) as boolean
参数 | 类型 |
---|---|
参数 slot | 类型 EquipmentSlot |
Name: hasLineOfSight
Return Type: boolean
ZenScript CopyLivingEntity.hasLineOfSight(entity as Entity) as boolean
参数 | 类型 |
---|---|
参数 entity | 类型 Entity |
Name: heal
ZenScript CopyLivingEntity.heal(amount as float)
参数 | 类型 |
---|---|
参数 amount | 类型 float |
Name: isAffectedByPotions
Return Type: boolean
ZenScript Copy// LivingEntity.isAffectedByPotions() as boolean
myLivingEntity.isAffectedByPotions();
Name: isAutoSpinAttack
Return Type: boolean
ZenScript Copy// LivingEntity.isAutoSpinAttack() as boolean
myLivingEntity.isAutoSpinAttack();
Name: isBaby
Return Type: boolean
ZenScript Copy// LivingEntity.isBaby() as boolean
myLivingEntity.isBaby();
Name: isBlocking
Return Type: boolean
ZenScript Copy// LivingEntity.isBlocking() as boolean
myLivingEntity.isBlocking();
Name: isCurrentlyGlowing
Return Type: boolean
ZenScript Copy// LivingEntity.isCurrentlyGlowing() as boolean
myLivingEntity.isCurrentlyGlowing();
Name: isDamageSourceBlocked
Return Type: boolean
ZenScript CopyLivingEntity.isDamageSourceBlocked(source as DamageSource) as boolean
参数 | 类型 |
---|---|
参数 来源 | 类型 DamageSource |
Name: isDeadOrDying
Return Type: boolean
ZenScript Copy// LivingEntity.isDeadOrDying() as boolean
myLivingEntity.isDeadOrDying();
Name: isFallFlying
Return Type: boolean
ZenScript Copy// LivingEntity.isFallFlying() as boolean
myLivingEntity.isFallFlying();
Name: isHolding
Return Type: boolean
ZenScript CopyLivingEntity.isHolding(item as ItemDefinition) as boolean
参数 | 类型 |
---|---|
参数 item | 类型 ItemDefinition |
Name: isHolding
Return Type: boolean
ZenScript CopyLivingEntity.isHolding(predicate as Predicate<ItemStack>) as boolean
参数 | 类型 |
---|---|
参数 predicate | 类型 Predicate<ItemStack> |
Name: isInvertedHealAndHarm
Return Type: boolean
ZenScript Copy// LivingEntity.isInvertedHealAndHarm() as boolean
myLivingEntity.isInvertedHealAndHarm();
Name: isSensitiveToWater
Return Type: boolean
ZenScript Copy// LivingEntity.isSensitiveToWater() as boolean
myLivingEntity.isSensitiveToWater();
Name: isSleeping
Return Type: boolean
ZenScript Copy// LivingEntity.isSleeping() as boolean
myLivingEntity.isSleeping();
Name: isSuppressingSlidingDownLadder
Return Type: boolean
ZenScript Copy// LivingEntity.isSuppressingSlidingDownLadder() as boolean
myLivingEntity.isSuppressingSlidingDownLadder();
Name: isUsingItem
Return Type: boolean
ZenScript Copy// LivingEntity.isUsingItem() as boolean
myLivingEntity.isUsingItem();
Name: isVisuallySwimming
Return Type: boolean
ZenScript Copy// LivingEntity.isVisuallySwimming() as boolean
myLivingEntity.isVisuallySwimming();
Name: knockback
ZenScript CopyLivingEntity.knockback(x as double, y as double, z as double)
参数 | 类型 |
---|---|
参数 x | 类型 double |
参数 y | 类型 double |
参数 z | 类型 double |
Name: releaseUsingItem
ZenScript Copy// LivingEntity.releaseUsingItem()
myLivingEntity.releaseUsingItem();
Name: removeAllEffects
Return Type: boolean
ZenScript Copy// LivingEntity.removeAllEffects() as boolean
myLivingEntity.removeAllEffects();
Name: removeEffect
Return Type: boolean
ZenScript CopyLivingEntity.removeEffect(effect as MobEffect) as boolean
参数 | 类型 |
---|---|
参数 effect | 类型 MobEffect |
Name: removeEffectNoUpdate
Return Type: MobEffectInstance?
ZenScript CopyLivingEntity.removeEffectNoUpdate(effect as MobEffect?) as MobEffectInstance?
参数 | 类型 |
---|---|
参数 effect | 类型 MobEffect? |
Name: setAbsorptionAmount
ZenScript CopyLivingEntity.setAbsorptionAmount(absorption as float)
参数 | 类型 |
---|---|
参数 absorption | 类型 float |
Name: setArrowCount
ZenScript CopyLivingEntity.setArrowCount(count as int)
参数 | 类型 |
---|---|
参数 count | 类型 int |
Name: setDiscardFriction
ZenScript CopyLivingEntity.setDiscardFriction(discardFriction as boolean)
参数 | 类型 |
---|---|
参数 discardFriction | 类型 布尔值 |
Name: setHealth
ZenScript CopyLivingEntity.setHealth(health as float)
参数 | 类型 |
---|---|
参数 health | 类型 float |
Name: setItemInHand
ZenScript CopyLivingEntity.setItemInHand(hand as InteractionHand, stack as ItemStack)
参数 | 类型 |
---|---|
参数 hand | 类型 InteractionHand |
参数 堆叠 | 类型 物品应用 |
Name: setJumping
ZenScript CopyLivingEntity.setJumping(jumping as boolean)
参数 | 类型 |
---|---|
参数 jumping | 类型 布尔值 |
Name: setLastHurtByMob
ZenScript CopyLivingEntity.setLastHurtByMob(entity as LivingEntity?)
参数 | 类型 |
---|---|
参数 entity | 类型 LivingEntity? |
Name: setLastHurtByPlayer
ZenScript CopyLivingEntity.setLastHurtByPlayer(player as Player?)
参数 | 类型 |
---|---|
参数 player | 类型 Player? |
Name: setLastHurtMob
ZenScript CopyLivingEntity.setLastHurtMob(entity as Entity)
参数 | 类型 |
---|---|
参数 entity | 类型 Entity |
Name: setNoActionTime
ZenScript CopyLivingEntity.setNoActionTime(idleTime as int)
参数 | 类型 |
---|---|
参数 idleTime | 类型 int |
Name: setSpeed
ZenScript CopyLivingEntity.setSpeed(speed as float)
参数 | 类型 |
---|---|
参数 speed | 类型 float |
Name: setStingerCount
ZenScript CopyLivingEntity.setStingerCount(count as int)
参数 | 类型 |
---|---|
参数 count | 类型 int |
Name: shouldDiscardFriction
Return Type: boolean
ZenScript Copy// LivingEntity.shouldDiscardFriction() as boolean
myLivingEntity.shouldDiscardFriction();
Name: startUsingItem
ZenScript CopyLivingEntity.startUsingItem(param0 as InteractionHand)
参数 | 类型 |
---|---|
参数 param0 | 类型 InteractionHand |
Name: stopSleeping
ZenScript Copy// LivingEntity.stopSleeping()
myLivingEntity.stopSleeping();
Name: stopUsingItem
ZenScript Copy// LivingEntity.stopUsingItem()
myLivingEntity.stopUsingItem();
Name: swing
ZenScript CopyLivingEntity.swing(hand as InteractionHand, updateSelf as boolean)
参数 | 类型 |
---|---|
参数 hand | 类型 InteractionHand |
参数 updateSelf | 类型 布尔值 |
名称 | 类型 | 可获得 | 可设置 |
---|---|---|---|
名称 absorptionAmount | 类型 float | 可获得 true | 可设置 false |
名称 activeEFfectsMap | 类型 MobEffectInstance[MobEffect] | 可获得 true | 可设置 false |
名称 activeEffects | 类型 Collection<MobEffectInstance> | 可获得 true | 可设置 false |
名称 armorCoverPercentage | 类型 float | 可获得 true | 可设置 false |
名称 armorValue | 类型 int | 可获得 true | 可设置 false |
名称 arrowCount | 类型 int | 可获得 true | 可设置 false |
名称 attackable #可攻击的 | 类型 布尔值 | 可获得 true | 可设置 false |
名称 bedOrientation | 类型 Direction? | 可获得 true | 可设置 false |
名称 canBeSeenAsEnemy | 类型 布尔值 | 可获得 true | 可设置 false |
名称 canBeSeenByAnyone | 类型 布尔值 | 可获得 true | 可设置 false |
名称 canBreatheUnderwater #可以水下呼吸 | 类型 布尔值 | 可获得 true | 可设置 false |
名称 fallFlyingTicks | 类型 int | 可获得 true | 可设置 false |
名称 health | 类型 float | 可获得 true | 可设置 false |
名称 isAffectedByPotions | 类型 布尔值 | 可获得 true | 可设置 false |
名称 isAutoSpinAttack | 类型 布尔值 | 可获得 true | 可设置 false |
名称 isBaby | 类型 布尔值 | 可获得 true | 可设置 false |
名称 isBlocking | 类型 布尔值 | 可获得 true | 可设置 false |
名称 isCurrentlyGlowing | 类型 布尔值 | 可获得 true | 可设置 false |
名称 isDeadOrDying | 类型 布尔值 | 可获得 true | 可设置 false |
名称 isFallFlying | 类型 布尔值 | 可获得 true | 可设置 false |
名称 isInvertedHealAndHarm | 类型 布尔值 | 可获得 true | 可设置 false |
名称 isSensitiveToWater | 类型 布尔值 | 可获得 true | 可设置 false |
名称 isSleeping | 类型 布尔值 | 可获得 true | 可设置 false |
名称 isSuppressingSlidingDownLadder | 类型 布尔值 | 可获得 true | 可设置 false |
名称 isUsingItem | 类型 布尔值 | 可获得 true | 可设置 false |
名称 isVisuallySwimming | 类型 布尔值 | 可获得 true | 可设置 false |
名称 jumpBoostPower | 类型 double | 可获得 true | 可设置 false |
名称 killCredit | 类型 LivingEntity? | 可获得 true | 可设置 false |
名称 lastClimbablePos | 类型 BlockPos? | 可获得 true | 可设置 false |
名称 lastDamageSource | 类型 DamageSource? | 可获得 true | 可设置 false |
名称 lastHurtByMob | 类型 LivingEntity? | 可获得 true | 可设置 false |
名称 lastHurtByMobTimestamp | 类型 int | 可获得 true | 可设置 false |
名称 lastHurtMob | 类型 LivingEntity | 可获得 true | 可设置 false |
名称 lastHurtMobTimestamp | 类型 int | 可获得 true | 可设置 false |
名称 lootTable | 类型 资源位置 | 可获得 true | 可设置 false |
名称 mainArm | 类型 HumanoidArm | 可获得 true | 可设置 false |
名称 mainHandItem | 类型 物品应用 | 可获得 true | 可设置 false |
名称 maxHealth | 类型 float | 可获得 true | 可设置 false |
名称 mobType | 类型 MobType | 可获得 true | 可设置 false |
名称 noActionTime | 类型 int | 可获得 true | 可设置 false |
名称 offHandItem | 类型 物品应用 | 可获得 true | 可设置 false |
名称 random | 类型 Random | 可获得 true | 可设置 false |
名称 scale | 类型 float | 可获得 true | 可设置 false |
名称 shouldDiscardFriction | 类型 布尔值 | 可获得 true | 可设置 false |
名称 sleepingPos | 类型 BlockPos? | 可获得 true | 可设置 false |
名称 speed | 类型 float | 可获得 true | 可设置 false |
名称 stingerCount | 类型 int | 可获得 true | 可设置 false |
名称 ticksUsingItem | 类型 int | 可获得 true | 可设置 false |
名称 useItem | 类型 物品应用 | 可获得 true | 可设置 false |
名称 useItemRemainingTicks | 类型 int | 可获得 true | 可设置 false |
名称 usedItemHand | 类型 InteractionHand | 可获得 true | 可设置 false |
名称 voicePitch | 类型 float | 可获得 true | 可设置 false |