MCLivingEntity
Link to mclivingentity
导入类
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.MCLivingEntity;
Extending MCEntity
Link to extending-mcentity
MCLivingEntity extends MCEntity. That means all methods available in MCEntity are also available in MCLivingEntity
使用方式
Link to 使用方式
Name: addPotionEffect
Return Type: boolean
ZenScript CopyMCLivingEntity.addPotionEffect(effectInstanceIn as MCPotionEffectInstance) as boolean
参数 | 类型 | 描述 |
---|---|---|
参数 effectInstanceIn #效果实例 | 类型 MCPotionEffectInstance | 描述 No Description Provided |
Name: attackEntityAsMob
Return Type: boolean
ZenScript CopyMCLivingEntity.attackEntityAsMob(entityIn as MCEntity) as boolean
参数 | 类型 | 描述 |
---|---|---|
参数 entityIn | 类型 MCEntity | 描述 No Description Provided |
Name: attackEntityFrom
Return Type: void
ZenScript CopyMCLivingEntity.attackEntityFrom(damageSource as DamageSource, amount as float) as void
参数 | 类型 | 描述 |
---|---|---|
参数 damageSource | 类型 DamageSource | 描述 No Description Provided |
参数 amount | 类型 float | 描述 No Description Provided |
Name: canAttack
Return Type: boolean
ZenScript CopyMCLivingEntity.canAttack(target as MCLivingEntity) as boolean
参数 | 类型 | 描述 |
---|---|---|
参数 target | 类型 MCLivingEntity | 描述 No Description Provided |
Name: canAttack
Return Type: boolean
ZenScript CopyMCLivingEntity.canAttack(typeIn as MCEntityType) as boolean
参数 | 类型 | 描述 |
---|---|---|
参数 typeIn | 类型 MCEntityType #MC实体类型 | 描述 No Description Provided |
Name: canBeRiddenInWater
Return Type: boolean
ZenScript Copy// MCLivingEntity.canBeRiddenInWater() as boolean
myMCLivingEntity.canBeRiddenInWater();
Name: canBreatheUnderwater
Return Type: boolean
ZenScript Copy// MCLivingEntity.canBreatheUnderwater() as boolean
myMCLivingEntity.canBreatheUnderwater();
Name: canEquip
Return Type: boolean
ZenScript CopyMCLivingEntity.canEquip(item as MCItemDefinition) as boolean
参数 | 类型 | 描述 |
---|---|---|
参数 item | 类型 MCItemDefinition | 描述 No Description Provided |
Name: clearActivePotions
Return Type: boolean
ZenScript Copy// MCLivingEntity.clearActivePotions() as boolean
myMCLivingEntity.clearActivePotions();
Name: getAIMoveSpeed
Return Type: float
ZenScript Copy// MCLivingEntity.getAIMoveSpeed() as float
myMCLivingEntity.getAIMoveSpeed();
Name: getActivePotionEffect
Return Type: MCPotionEffectInstance
ZenScript CopyMCLivingEntity.getActivePotionEffect(potionIn as MCPotionEffect) as MCPotionEffectInstance
参数 | 类型 | 描述 |
---|---|---|
参数 potionIn | 类型 MCPotionEffect | 描述 No Description Provided |
Name: getActivePotionEffects
Return Type: Collection<MCPotionEffectInstance>
ZenScript Copy// MCLivingEntity.getActivePotionEffects() as Collection<MCPotionEffectInstance>
myMCLivingEntity.getActivePotionEffects();
Name: getActivePotionMap
Return Type: MCPotionEffectInstance[MCPotionEffect]
ZenScript Copy// MCLivingEntity.getActivePotionMap() as MCPotionEffectInstance[MCPotionEffect]
myMCLivingEntity.getActivePotionMap();
Name: getArmorCoverPercentage
Return Type: float
ZenScript Copy// MCLivingEntity.getArmorCoverPercentage() as float
myMCLivingEntity.getArmorCoverPercentage();
Name: getArmorInventoryList
Return Type: stdlib.Iterable<ItemStack>
ZenScript Copy// MCLivingEntity.getArmorInventoryList() as stdlib.Iterable<ItemStack>
myMCLivingEntity.getArmorInventoryList();
Name: getArrowCountInEntity
Return Type: int
ZenScript Copy// MCLivingEntity.getArrowCountInEntity() as int
myMCLivingEntity.getArrowCountInEntity();
Name: getAttackingEntity
Return Type: MCLivingEntity
ZenScript Copy// MCLivingEntity.getAttackingEntity() as MCLivingEntity
myMCLivingEntity.getAttackingEntity();
Name: getAttribute
Return Type: AttributeInstance?
ZenScript Copy// MCLivingEntity.getAttribute(attribute as Attribute) as AttributeInstance?
myMCLivingEntity.getAttribute(<attribute:minecraft:generic.attack_damage>);
参数 | 类型 | 描述 |
---|---|---|
参数 attribute | 类型 Attribute | 描述 No Description Provided |
Name: getBeeStingCount
Return Type: int
ZenScript Copy// MCLivingEntity.getBeeStingCount() as int
myMCLivingEntity.getBeeStingCount();
Name: getHealth
Return Type: float
ZenScript Copy// MCLivingEntity.getHealth() as float
myMCLivingEntity.getHealth();
Name: getHeldItem
Gets the ItemStack in the specific hand.
Returns: The ItemStack in the specific hand.
Return Type: IItemStack
ZenScript Copy// MCLivingEntity.getHeldItem(hand as MCHand) as IItemStack
myMCLivingEntity.getHeldItem(MCHand.MAIN_HAND);
参数 | 类型 | 描述 |
---|---|---|
参数 hand | 类型 MCHand | 描述 No Description Provided |
Name: getHeldItemMainhand
Return Type: ItemStack
ZenScript Copy// MCLivingEntity.getHeldItemMainhand() as ItemStack
myMCLivingEntity.getHeldItemMainhand();
Name: getHeldItemOffhand
Return Type: ItemStack
ZenScript Copy// MCLivingEntity.getHeldItemOffhand() as ItemStack
myMCLivingEntity.getHeldItemOffhand();
Name: getIdleTime
Return Type: int
ZenScript Copy// MCLivingEntity.getIdleTime() as int
myMCLivingEntity.getIdleTime();
Name: getItemStackFromSlot
Gets the ItemStack in the specific slot.
Returns: The ItemStack in the specific slot.
Return Type: IItemStack
ZenScript CopyMCLivingEntity.getItemStackFromSlot(slot as MCEquipmentSlotType) as IItemStack
参数 | 类型 | 描述 |
---|---|---|
参数 slot | 类型 MCEquipmentSlotType | 描述 No Description Provided |
Name: getLastAttackedEntity
Return Type: MCLivingEntity
ZenScript Copy// MCLivingEntity.getLastAttackedEntity() as MCLivingEntity
myMCLivingEntity.getLastAttackedEntity();
Name: getLastAttackedEntityTime
Return Type: int
ZenScript Copy// MCLivingEntity.getLastAttackedEntityTime() as int
myMCLivingEntity.getLastAttackedEntityTime();
Name: getMaxHealth
Return Type: float
ZenScript Copy// MCLivingEntity.getMaxHealth() as float
myMCLivingEntity.getMaxHealth();
Name: getRevengeTarget
Return Type: MCLivingEntity
ZenScript Copy// MCLivingEntity.getRevengeTarget() as MCLivingEntity
myMCLivingEntity.getRevengeTarget();
Name: getRevengeTimer
Return Type: int
ZenScript Copy// MCLivingEntity.getRevengeTimer() as int
myMCLivingEntity.getRevengeTimer();
Name: getShouldBeDead
Return Type: boolean
ZenScript Copy// MCLivingEntity.getShouldBeDead() as boolean
myMCLivingEntity.getShouldBeDead();
Name: getTotalArmorValue
Return Type: int
ZenScript Copy// MCLivingEntity.getTotalArmorValue() as int
myMCLivingEntity.getTotalArmorValue();
Name: heal
Return Type: void
ZenScript CopyMCLivingEntity.heal(healAmount as float) as void
参数 | 类型 | 描述 |
---|---|---|
参数 healAmount | 类型 float | 描述 No Description Provided |
Name: isAlive
Return Type: boolean
ZenScript Copy// MCLivingEntity.isAlive() as boolean
myMCLivingEntity.isAlive();
Name: isChild
Return Type: boolean
ZenScript Copy// MCLivingEntity.isChild() as boolean
myMCLivingEntity.isChild();
Name: isEntityUndead
Return Type: boolean
ZenScript Copy// MCLivingEntity.isEntityUndead() as boolean
myMCLivingEntity.isEntityUndead();
Name: isOnLadder
Return Type: boolean
ZenScript Copy// MCLivingEntity.isOnLadder() as boolean
myMCLivingEntity.isOnLadder();
Name: isPotionActive
Return Type: boolean
ZenScript CopyMCLivingEntity.isPotionActive(potionIn as MCPotionEffect) as boolean
参数 | 类型 | 描述 |
---|---|---|
参数 potionIn | 类型 MCPotionEffect | 描述 No Description Provided |
Name: isPotionApplicable
Return Type: boolean
ZenScript CopyMCLivingEntity.isPotionApplicable(potioneffectIn as MCPotionEffectInstance) as boolean
参数 | 类型 | 描述 |
---|---|---|
参数 potioneffectIn | 类型 MCPotionEffectInstance | 描述 No Description Provided |
Name: isWaterSensitive
Return Type: boolean
ZenScript Copy// MCLivingEntity.isWaterSensitive() as boolean
myMCLivingEntity.isWaterSensitive();
Name: removeActivePotionEffect
Return Type: MCPotionEffectInstance
ZenScript CopyMCLivingEntity.removeActivePotionEffect(potioneffectin as MCPotionEffect) as MCPotionEffectInstance
参数 | 类型 | 描述 |
---|---|---|
参数 potioneffectin | 类型 MCPotionEffect | 描述 No Description Provided |
Name: removePotionEffect
Return Type: boolean
ZenScript CopyMCLivingEntity.removePotionEffect(effectIn as MCPotionEffect) as boolean
参数 | 类型 | 描述 |
---|---|---|
参数 effectIn | 类型 MCPotionEffect | 描述 No Description Provided |
Name: setAIMoveSpeed
Return Type: void
ZenScript CopyMCLivingEntity.setAIMoveSpeed(speedIn as float) as void
参数 | 类型 | 描述 |
---|---|---|
参数 speedIn | 类型 float | 描述 No Description Provided |
Name: setArrowCountInEntity
Return Type: void
ZenScript CopyMCLivingEntity.setArrowCountInEntity(count as int) as void
参数 | 类型 | 描述 |
---|---|---|
参数 count | 类型 int | 描述 No Description Provided |
Name: setBeeStingCount
Return Type: void
ZenScript CopyMCLivingEntity.setBeeStingCount(p_226300_1_ as int) as void
参数 | 类型 | 描述 |
---|---|---|
参数 p_226300_1_ | 类型 int | 描述 No Description Provided |
Name: setHealth
Return Type: void
ZenScript CopyMCLivingEntity.setHealth(health as float) as void
参数 | 类型 | 描述 |
---|---|---|
参数 health | 类型 float | 描述 No Description Provided |
Name: setHeldItem
Sets a copied given itemStack to the hand
Return Type: void
ZenScript Copy// MCLivingEntity.setHeldItem(hand as MCHand, itemStack as IItemStack) as void
myMCLivingEntity.setHeldItem(MCHand.MAIN_HAND, <item:minecraft:diamond>);
参数 | 类型 | 描述 |
---|---|---|
参数 hand | 类型 MCHand | 描述 No Description Provided |
参数 物品应用 | 类型 IItemstack | 描述 No Description Provided |
Name: setIdleTime
Return Type: void
ZenScript CopyMCLivingEntity.setIdleTime(idleTimeIn as int) as void
参数 | 类型 | 描述 |
---|---|---|
参数 idleTimeIn | 类型 int | 描述 No Description Provided |
Name: setItemStackToSlot
Sets a copied given itemStack to the slot
Return Type: void
ZenScript CopyMCLivingEntity.setItemStackToSlot(slot as MCEquipmentSlotType, itemStack as IItemStack) as void
参数 | 类型 | 描述 |
---|---|---|
参数 slot | 类型 MCEquipmentSlotType | 描述 No Description Provided |
参数 物品应用 | 类型 IItemstack | 描述 No Description Provided |
Name: setLastAttackedEntity
Return Type: void
ZenScript CopyMCLivingEntity.setLastAttackedEntity(entityIn as MCEntity) as void
参数 | 类型 | 描述 |
---|---|---|
参数 entityIn | 类型 MCEntity | 描述 No Description Provided |
Name: setRevengeTarget
Return Type: void
ZenScript CopyMCLivingEntity.setRevengeTarget(livingBase as MCLivingEntity) as void
参数 | 类型 | 描述 |
---|---|---|
参数 livingBase | 类型 MCLivingEntity | 描述 No Description Provided |