MCPlayerEntity #MC玩家实体

Link to mcplayerentity-mc玩家实体

这个类由mod-id为crafttweaker的模组添加. 因此,如果要使用此功能,则需要安装此mod。

如果遇到任何问题(例如强制转换数组),则可能需要导入软件包,因此,最好的方式就是导入包支持。

ZenScript
Copy
crafttweaker.api.entity.player.MCPlayerEntity

addExhaustion #增加饥饿值

Link to addexhaustion-增加饥饿值

通过所提供的数值增加饥饿值

ZenScript
Copy
myMCPlayerEntity.addExhaustion(exhaustion as float);
参数类型描述
参数
exhaustion
类型
float
描述
No description provided

addExperienceLevel #提升经验等级

Link to addexperiencelevel-提升经验等级

提升此玩家的经验等级

ZenScript
Copy
myMCPlayerEntity.addExperienceLevel(levels as int);
参数类型描述
参数
levels
类型
int
描述
No description provided

addItemStackToInventory #在背包中添加物品堆叠

Link to additemstacktoinventory-在背包中添加物品堆叠

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.addItemStackToInventory(p_191521_1_ as crafttweaker.api.item.IItemStack);
参数类型描述
参数
p_191521_1_
类型
crafttweaker.api.item.IItemStack
描述
No description provided

addMovementStat #添加移动统计

Link to addmovementstat-添加移动统计

为移动统计添加一个值——如跑步、步行、游泳或攀登。

ZenScript
Copy
myMCPlayerEntity.addMovementStat(p_71000_1_ as double, p_71000_3_ as double, p_71000_5_ as double);
参数类型描述
参数
p_71000_1_
类型
double
描述
No description provided
参数
p_71000_3_
类型
double
描述
No description provided
参数
p_71000_5_
类型
double
描述
No description provided

addPotionEffect #添加药水效果

Link to addpotioneffect-添加药水效果

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.addPotionEffect(effectInstanceIn as crafttweaker.api.potion.MCPotionEffectInstance);
参数类型描述
参数
effectInstanceIn #效果实例
类型
crafttweaker.api.potion.MCPotionEffectInstance
描述
No description provided

addScore #添加分数

Link to addscore-添加分数

添加到玩家分数

ZenScript
Copy
myMCPlayerEntity.addScore(scoreIn as int);
参数类型描述
参数
scoreIn
类型
int
描述
No description provided

addTag #添加tag

Link to addtag-添加tag

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.addTag(tag as String);
参数类型描述
参数
tag #标签
类型
字符串[string]
描述
No description provided

addVelocity #增加速度

Link to addvelocity-增加速度

为实体的当前速度添加一个值,并设置为true

ZenScript
Copy
myMCPlayerEntity.addVelocity(x as double, y as double, z as double);
参数类型描述
参数
x
类型
double
描述
No description provided
参数
y
类型
double
描述
No description provided
参数
z
类型
double
描述
No description provided

allowLogging #允许记录日志

Link to allowlogging-允许记录日志

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.allowLogging();

attackable #可攻击的

Link to attackable-可攻击的

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.attackable();

attemptTeleport #是否尝试传送

Link to attemptteleport-是否尝试传送

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.attemptTeleport(p_213373_1_ as double, p_213373_3_ as double, p_213373_5_ as double, p_213373_7_ as boolean);
参数类型描述
参数
p_213373_1_
类型
double
描述
No description provided
参数
p_213373_3_
类型
double
描述
No description provided
参数
p_213373_5_
类型
double
描述
No description provided
参数
p_213373_7_
类型
布尔值
描述
No description provided

baseTick #基础游戏刻

Link to basetick-基础游戏刻

Gets called every tick from main Entity class #从主要实体类获取所有游戏刻

ZenScript
Copy
myMCPlayerEntity.baseTick();

canAttackPlayer #可以攻击玩家

Link to canattackplayer-可以攻击玩家

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.canAttackPlayer(other as crafttweaker.api.entity.player.MCPlayerEntity);
参数类型描述
参数
other
类型
crafttweaker.api.entity.player.MCPlayerEntity
描述
No description provided

canBeAttackedWithItem #可以被物体攻击

Link to canbeattackedwithitem-可以被物体攻击

如果可能用物品攻击该实体,则返回true

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.canBeAttackedWithItem();

canBeCollidedWith #具有碰撞箱

Link to canbecollidedwith-具有碰撞箱

如果此实体可以阻止其他实体的移动,则反为真

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.canBeCollidedWith();

canBeHitWithPotion #可以被药水瓶击中

Link to canbehitwithpotion-可以被药水瓶击中

如果实体为盔甲架,则返回false 如果是其他实体生物则返回为true

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.canBeHitWithPotion();

canBePushed #可以被推动

Link to canbepushed-可以被推动

如果该实体在与其他实体碰撞时可以被推动,则返回值true

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.canBePushed();

canBeRiddenInWater #可以潜水

Link to canberiddeninwater-可以潜水

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.canBeRiddenInWater();

canBreatheUnderwater #可以水下呼吸

Link to canbreatheunderwater-可以水下呼吸

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.canBreatheUnderwater();

canEat #可以进食

Link to caneat-可以进食

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.canEat(ignoreHunger as boolean);
参数类型描述
参数
ignoreHunger
类型
布尔值
描述
No description provided

canHarvestBlock #可以破坏方块

Link to canharvestblock-可以破坏方块

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.canHarvestBlock(state as crafttweaker.api.block.MCBlockState);
参数类型描述
参数
state
类型
crafttweaker.api.block.MCBlockState
描述
No description provided

canPassengerSteer #可以乘坐

Link to canpassengersteer-可以乘坐

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.canPassengerSteer();

canPlayerEdit #可以由玩家编辑

Link to canplayeredit-可以由玩家编辑

返回此玩家是否可以在某个地点使用给定的堆栈修改方块。

查询位置是 {@code pos.offset(facing.getOpposite()}。 返回:此玩家是否可以修改当前世界中查询的位置 @see ItemStack#canPlaceOn(Block) @see ItemStack#canEditBlocks() @see PlayerCapabilities#allowededge

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.canPlayerEdit(pos as crafttweaker.api.util.BlockPos, facing as crafttweaker.api.util.Direction, stack as crafttweaker.api.item.IItemStack);
参数类型描述
参数
类型
crafttweaker.api.util.BlockPos
描述
No description provided
参数
方向
类型
crafttweaker.api.util.Direction
描述
No description provided
参数
堆叠
类型
crafttweaker.api.item.IItemStack
描述
No description provided

canRenderOnFire #是否能被渲染为着火

Link to canrenderonfire-是否能被渲染为着火

返回该实体能否被渲染为着火

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.canRenderOnFire();

canRiderInteract #是否可以互动

Link to canriderinteract-是否可以互动

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.canRiderInteract();

canSwim #是否可以游泳

Link to canswim-是否可以游泳

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.canSwim();

canTrample #是否能被踩踏

Link to cantrample-是否能被踩踏

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.canTrample(state as crafttweaker.api.block.MCBlockState, pos as crafttweaker.api.util.BlockPos, fallDistance as float);
参数类型描述
参数
state
类型
crafttweaker.api.block.MCBlockState
描述
No description provided
参数
类型
crafttweaker.api.util.BlockPos
描述
No description provided
参数
下落距离
类型
float
描述
No description provided

canUpdate #是否能被更新

Link to canupdate-是否能被更新

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.canUpdate();
ZenScript
Copy
myMCPlayerEntity.canUpdate(值为布尔型);
参数类型描述
参数
value
类型
布尔值
描述
No description provided

canUseCommandBlock #是否可以使用命令方块

Link to canusecommandblock-是否可以使用命令方块

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.canUseCommandBlock();

clearActivePotions #清除药水效果

Link to clearactivepotions-清除药水效果

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.clearActivePotions();

clearBedPosition #清除床的位置

Link to clearbedposition-清除床的位置

ZenScript
Copy
myMCPlayerEntity.clearBedPosition();

closeScreen #关闭屏幕

Link to closescreen-关闭屏幕

把当前合成栏设置回2x2个格子

ZenScript
Copy
myMCPlayerEntity.closeScreen();

curePotionEffects #清除药水效果

Link to curepotioneffects-清除药水效果

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.curePotionEffects(治疗的效果为 crafttweaker.api.item.IItemStack);
参数类型描述
参数
治疗的效果
类型
crafttweaker.api.item.IItemStack
描述
No description provided

detach #分离

Link to detach-分离

ZenScript
Copy
myMCPlayerEntity.detach();

disableShield #禁用盾

Link to disableshield-禁用盾

ZenScript
Copy
myMCPlayerEntity.disableShield(p_190777_1_ 为布尔值);
参数类型描述
参数
p_190777_1_
类型
布尔值
描述
No description provided

doesEntityNotTriggerPressurePlate #实体是否会触发压力板

Link to doesentitynottriggerpressureplate-实体是否会触发压力板

返回此实体是否会触发压力板或绊线。

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.doesEntityNotTriggerPressurePlate();

equals #等于

Link to equals-等于

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.equals(p_equals_1_ as Object);
参数类型描述
参数
p_equals_1_
类型
Object
描述
No description provided

Removes fire from entity.

ZenScript
Copy
myMCPlayerEntity.extinguish();
ZenScript
Copy
myMCPlayerEntity.fall(distance as float, damageMultiplier as float);
参数类型描述
参数
distance
类型
float
描述
No description provided
参数
damageMultiplier
类型
float
描述
No description provided

Returns crafttweaker.api.item.IItemStack

ZenScript
Copy
myMCPlayerEntity.findAmmo(shootable as crafttweaker.api.item.IItemStack);
参数类型描述
参数
shootable
类型
crafttweaker.api.item.IItemStack
描述
No description provided

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.func_213300_bk();
ZenScript
Copy
myMCPlayerEntity.func_213312_b(p_213312_1_ as double, p_213312_3_ as double, p_213312_5_ as double);
参数类型描述
参数
p_213312_1_
类型
double
描述
No description provided
参数
p_213312_3_
类型
double
描述
No description provided
参数
p_213312_5_
类型
double
描述
No description provided

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.func_213314_bj();

Returns float

ZenScript
Copy
myMCPlayerEntity.func_213343_cS();

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.func_213365_e(itemstackIn as crafttweaker.api.item.IItemStack);

参数类型描述
参数
itemstackIn
类型
crafttweaker.api.item.IItemStack
描述
No description provided

the movespeed used for the new AI system

Returns float

ZenScript
Copy
myMCPlayerEntity.getAIMoveSpeed();

getAbsorptionAmount

Link to getabsorptionamount

Returns the amount of health added by the Absorption effect.

Returns float

ZenScript
Copy
myMCPlayerEntity.getAbsorptionAmount();

getActiveItemStack

Link to getactiveitemstack

Returns crafttweaker.api.item.IItemStack

ZenScript
Copy
myMCPlayerEntity.getActiveItemStack();

getActivePotionEffect

Link to getactivepotioneffect

returns the PotionEffect for the supplied Potion if it is active, null otherwise.

Returns crafttweaker.api.potion.MCPotionEffectInstance

ZenScript
Copy
myMCPlayerEntity.getActivePotionEffect(potionIn as crafttweaker.api.potion.MCPotionEffect);
参数类型描述
参数
potionIn
类型
crafttweaker.api.potion.MCPotionEffect
描述
No description provided

getActivePotionEffects

Link to getactivepotioneffects

Returns Collection<crafttweaker.api.potion.MCPotionEffectInstance>

ZenScript
Copy
myMCPlayerEntity.getActivePotionEffects();

getAdjustedHorizontalFacing

Link to getadjustedhorizontalfacing

Gets the horizontal facing direction of this Entity, adjusted to take specially-treated entity types into account.

Returns crafttweaker.api.util.Direction

ZenScript
Copy
myMCPlayerEntity.getAdjustedHorizontalFacing();

返回为int值

ZenScript
Copy
myMCPlayerEntity.getAir();

getAlwaysRenderNameTagForRender

Link to getalwaysrendernametagforrender

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.getAlwaysRenderNameTagForRender();

getArrowCountInEntity

Link to getarrowcountinentity

返回为int值

ZenScript
Copy
myMCPlayerEntity.getArrowCountInEntity();

gets the Direction for the camera if this entity is sleeping

Returns crafttweaker.api.util.Direction

ZenScript
Copy
myMCPlayerEntity.getBedDirection();

Returns crafttweaker.api.util.BlockPos

ZenScript
Copy
myMCPlayerEntity.getBedLocation();

返回值 crafttweaker.api.block.MCBlockState

ZenScript
Copy
myMCPlayerEntity.getBlockState();

Gets how bright this entity is.

Returns float

ZenScript
Copy
myMCPlayerEntity.getBrightness();

getBrightnessForRender

Link to getbrightnessforrender

返回为int值

ZenScript
Copy
myMCPlayerEntity.getBrightnessForRender();

getCachedUniqueIdString

Link to getcacheduniqueidstring

返回字符串[String]

ZenScript
Copy
myMCPlayerEntity.getCachedUniqueIdString();

getClassification

Link to getclassification

Returns crafttweaker.api.entity.MCEntityClassification

ZenScript
Copy
myMCPlayerEntity.getClassification(forSpawnCount as boolean);
参数类型描述
参数
forSpawnCount
类型
布尔值
描述
No description provided

getCollisionBorderSize

Link to getcollisionbordersize

Returns float

ZenScript
Copy
myMCPlayerEntity.getCollisionBorderSize();

getCooldownPeriod

Link to getcooldownperiod

Returns float

ZenScript
Copy
myMCPlayerEntity.getCooldownPeriod();

getCooledAttackStrength

Link to getcooledattackstrength

Returns the percentage of attack power available based on the cooldown (zero to one).

Returns float

ZenScript
Copy
myMCPlayerEntity.getCooledAttackStrength(adjustTicks as float);
参数类型描述
参数
adjustTicks
类型
float
描述
No description provided

Returns float

ZenScript
Copy
myMCPlayerEntity.getDigSpeed(state as crafttweaker.api.block.MCBlockState);
参数类型描述
参数
state
类型
crafttweaker.api.block.MCBlockState
描述
No description provided

Returns float

ZenScript
Copy
myMCPlayerEntity.getDigSpeed(arg0 as crafttweaker.api.block.MCBlockState, arg1 as crafttweaker.api.util.BlockPos);
参数类型描述
参数
arg0
类型
crafttweaker.api.block.MCBlockState
描述
No description provided
参数
arg1
类型
crafttweaker.api.util.BlockPos
描述
No description provided

Returns double

ZenScript
Copy
myMCPlayerEntity.getDistanceSq(x as double, y as double, z as double);
参数类型描述
参数
x
类型
double
描述
No description provided
参数
y
类型
double
描述
No description provided
参数
z
类型
double
描述
No description provided

返回为int值

ZenScript
Copy
myMCPlayerEntity.getEntityId();

返回字符串[String]

ZenScript
Copy
myMCPlayerEntity.getEntityString();

Returns float

ZenScript
Copy
myMCPlayerEntity.getEyeHeight();

返回为int值

ZenScript
Copy
myMCPlayerEntity.getFireTimer();

Returns float

ZenScript
Copy
myMCPlayerEntity.getHealth();

Returns float

ZenScript
Copy
myMCPlayerEntity.getHeight();

getHeldItemMainhand

Link to gethelditemmainhand

Returns crafttweaker.api.item.IItemStack

ZenScript
Copy
myMCPlayerEntity.getHeldItemMainhand();

getHeldItemOffhand

Link to gethelditemoffhand

Returns crafttweaker.api.item.IItemStack

ZenScript
Copy
myMCPlayerEntity.getHeldItemOffhand();

getHorizontalFacing

Link to gethorizontalfacing

Gets the horizontal facing direction of this Entity.

Returns crafttweaker.api.util.Direction

ZenScript
Copy
myMCPlayerEntity.getHorizontalFacing();

返回为int值

ZenScript
Copy
myMCPlayerEntity.getIdleTime();

getItemInUseCount

Link to getiteminusecount

返回为int值

ZenScript
Copy
myMCPlayerEntity.getItemInUseCount();

getItemInUseMaxCount

Link to getiteminusemaxcount

返回为int值

ZenScript
Copy
myMCPlayerEntity.getItemInUseMaxCount();

getLastAttackedEntityTime

Link to getlastattackedentitytime

返回为int值

ZenScript
Copy
myMCPlayerEntity.getLastAttackedEntityTime();

Returns float

ZenScript
Copy
myMCPlayerEntity.getLuck();

返回为int值

ZenScript
Copy
myMCPlayerEntity.getMaxAir();

getMaxFallHeight

Link to getmaxfallheight

The maximum height from where the entity is alowed to jump (used in pathfinder)

返回为int值

ZenScript
Copy
myMCPlayerEntity.getMaxFallHeight();

Returns float

ZenScript
Copy
myMCPlayerEntity.getMaxHealth();

getMaxInPortalTime

Link to getmaxinportaltime

Return the amount of time this entity should stay in a portal before being transported.

返回为int值

ZenScript
Copy
myMCPlayerEntity.getMaxInPortalTime();

getMountedYOffset

Link to getmountedyoffset

Returns the Y offset from the entity's position for any entity riding this one.

Returns double

ZenScript
Copy
myMCPlayerEntity.getMountedYOffset();

Gets the current pitch of the entity.

Returns float

ZenScript
Copy
myMCPlayerEntity.getPitch(partialTicks as float);
参数类型描述
参数
partialTicks
类型
float
描述
No description provided

getPortalCooldown

Link to getportalcooldown

Return the amount of cooldown before this entity can use a portal again.

返回为int值

ZenScript
Copy
myMCPlayerEntity.getPortalCooldown();

Get the position in the world. {@code null} is not allowed! If you are not an entity in the world, return the coordinates 0, 0, 0

Returns crafttweaker.api.util.BlockPos

ZenScript
Copy
myMCPlayerEntity.getPosition();

Returns float

ZenScript
Copy
myMCPlayerEntity.getRenderScale();

返回为int值

ZenScript
Copy
myMCPlayerEntity.getRevengeTimer();

getRotationYawHead

Link to getrotationyawhead

Returns float

ZenScript
Copy
myMCPlayerEntity.getRotationYawHead();

返回为int值

ZenScript
Copy
myMCPlayerEntity.getScore();

getScoreboardName

Link to getscoreboardname

Returns a String to use as this entity's name in the scoreboard/entity selector systems

返回字符串[String]

ZenScript
Copy
myMCPlayerEntity.getScoreboardName();

返回为int值

ZenScript
Copy
myMCPlayerEntity.getSleepTimer();

getSubmergedHeight

Link to getsubmergedheight

Returns double

ZenScript
Copy
myMCPlayerEntity.getSubmergedHeight();

getSwimAnimation

Link to getswimanimation

Returns float

ZenScript
Copy
myMCPlayerEntity.getSwimAnimation(partialTicks as float);
参数类型描述
参数
partialTicks
类型
float
描述
No description provided

getSwingProgress

Link to getswingprogress

Gets the progression of the swing animation, ranges from 0.0 to 1.0.

Returns float

ZenScript
Copy
myMCPlayerEntity.getSwingProgress(partialTickTime as float);
参数类型描述
参数
partialTickTime
类型
float
描述
No description provided

Returns Set

ZenScript
Copy
myMCPlayerEntity.getTags();

getTeleportDirection

Link to getteleportdirection

Returns crafttweaker.api.util.Direction

ZenScript
Copy
myMCPlayerEntity.getTeleportDirection();

getTicksElytraFlying

Link to gettickselytraflying

返回为int值

ZenScript
Copy
myMCPlayerEntity.getTicksElytraFlying();

getTotalArmorValue

Link to gettotalarmorvalue

Returns the current armor value as determined by a call to InventoryPlayer.getTotalArmorValue

返回为int值

ZenScript
Copy
myMCPlayerEntity.getTotalArmorValue();

Returns float

ZenScript
Copy
myMCPlayerEntity.getWidth();

返回为int值

ZenScript
Copy
myMCPlayerEntity.getXPSeed();

Returns the Y Offset of this entity.

Returns double

ZenScript
Copy
myMCPlayerEntity.getYOffset();

Gets the current yaw of the entity

Returns float

ZenScript
Copy
myMCPlayerEntity.getYaw(partialTicks as float);
参数类型描述
参数
partialTicks
类型
float
描述
No description provided

giveExperiencePoints

Link to giveexperiencepoints

ZenScript
Copy
myMCPlayerEntity.giveExperiencePoints(p_195068_1_ as int);
参数类型描述
参数
p_195068_1_
类型
int
描述
No description provided

handleStatusUpdate

Link to handlestatusupdate

ZenScript
Copy
myMCPlayerEntity.handleStatusUpdate(id as byte);
参数类型描述
参数
id
类型
byte
描述
No description provided

handleWaterMovement

Link to handlewatermovement

Returns if this entity is in water and will end up adding the waters velocity to the entity

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.handleWaterMovement();

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.hasCustomName();

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.hasNoGravity();

hasPermissionLevel

Link to haspermissionlevel

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.hasPermissionLevel(p_211513_1_ as int);
参数类型描述
参数
p_211513_1_
类型
int
描述
No description provided

Whether the "reducedDebugInfo" option is active for this player.

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.hasReducedDebug();

返回为int值

ZenScript
Copy
myMCPlayerEntity.hashCode();

Heal living entity (param: amount of half-hearts)

ZenScript
Copy
myMCPlayerEntity.heal(healAmount as float);
参数类型描述
参数
healAmount
类型
float
描述
No description provided

ignoreItemEntityData

Link to ignoreitementitydata

Checks if players can use this entity to access operator (permission level 2) commands either directly or indirectly, such as give or setblock. A similar method exists for entities at {@link net.minecraft.tileentity.TileEntity#onlyOpsCanSetNbt()}.

For example, {@link net.minecraft.entity.item.EntityMinecartCommandBlock#ignoreItemEntityData() command block minecarts} and {@link net.minecraft.entity.item.EntityMinecartMobSpawner#ignoreItemEntityData() mob spawner minecarts} (spawning command block minecarts or drops) are considered accessible.

Returns:
Copy
true if this entity offers ways for unauthorized  players to use restricted commands

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.ignoreItemEntityData();

isActiveItemStackBlocking

Link to isactiveitemstackblocking

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.isActiveItemStackBlocking();

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.isAddedToWorld();

Returns true if the entity has not been .

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.isAlive();

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.isAllowEdit();

If at least 1 entity is riding this one

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.isBeingRidden();

Returns true if the entity is on fire. Used by render to add the fire effect on rendering.

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.isBurning();

If Animal, checks if the age timer is negative

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.isChild();

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.isCreative();

isCustomNameVisible

Link to iscustomnamevisible

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.isCustomNameVisible();

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.isElytraFlying();

isEntityInsideOpaqueBlock

Link to isentityinsideopaqueblock

Checks if this entity is inside of an opaque block

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.isEntityInsideOpaqueBlock();

Returns true if this entity is undead.

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.isEntityUndead();

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.isGlowing();

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.isHandActive();

isImmuneToExplosions

Link to isimmunetoexplosions

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.isImmuneToExplosions();

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.isImmuneToFire();

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.isInLava();

isInRangeToRender3d

Link to isinrangetorender3d

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.isInRangeToRender3d(x as double, y as double, z as double);
参数类型描述
参数
x
类型
double
描述
No description provided
参数
y
类型
double
描述
No description provided
参数
z
类型
double
描述
No description provided

isInRangeToRenderDist

Link to isinrangetorenderdist

Checks if the entity is in range to render.

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.isInRangeToRenderDist(distance as double);
参数类型描述
参数
distance
类型
double
描述
No description provided

Checks if this entity is inside water (if inWater field is true as a result of handleWaterMovement() returning true)

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.isInWater();

isInWaterOrBubbleColumn

Link to isinwaterorbubblecolumn

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.isInWaterOrBubbleColumn();

isInWaterRainOrBubbleColumn

Link to isinwaterrainorbubblecolumn

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.isInWaterRainOrBubbleColumn();

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.isInvisible();

isInvisibleToPlayer

Link to isinvisibletoplayer

Only used by renderer in EntityLivingBase subclasses. Determines if an entity is visible or not to a specific player, if the entity is normally invisible. For EntityLivingBase subclasses, returning false when invisible will render the entity semi-transparent.

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.isInvisibleToPlayer(player as crafttweaker.api.entity.player.MCPlayerEntity);
参数类型描述
参数
player
类型
crafttweaker.api.entity.player.MCPlayerEntity
描述
No description provided

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.isInvulnerable();

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.isLiving();

Returns false if this Entity is a boss, true otherwise.

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.isNonBoss();

isOffsetPositionInLiquid

Link to isoffsetpositioninliquid

Checks if the offset position from the entity's current position is inside of a liquid.

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.isOffsetPositionInLiquid(x as double, y as double, z as double);
参数类型描述
参数
x
类型
double
描述
No description provided
参数
y
类型
double
描述
No description provided
参数
z
类型
double
描述
No description provided

Returns true if this entity should move as if it were on a ladder (either because it's actually on a ladder, or for AI reasons)

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.isOnLadder();

isOnePlayerRiding

Link to isoneplayerriding

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.isOnePlayerRiding();

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.isPassenger();

isPlayerFullyAsleep

Link to isplayerfullyasleep

Returns whether or not the player is asleep and the screen has fully faded.

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.isPlayerFullyAsleep();

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.isPotionActive(potionIn as crafttweaker.api.potion.MCPotionEffect);
参数类型描述
参数
potionIn
类型
crafttweaker.api.potion.MCPotionEffect
描述
No description provided

isPotionApplicable

Link to ispotionapplicable

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.isPotionApplicable(potioneffectIn as crafttweaker.api.potion.MCPotionEffectInstance);
参数类型描述
参数
potioneffectIn
类型
crafttweaker.api.potion.MCPotionEffectInstance
描述
No description provided

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.isPushedByWater();

Returns whether the entity is in a server world

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.isServerWorld();

Returns: True if this entity will not play sounds

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.isSilent();

Returns whether player is sleeping or not

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.isSleeping();

Returns if this entity is sneaking.

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.isSneaking();

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.isSpawnForced();

Returns true if the player is in spectator mode.

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.isSpectator();

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.isSpinAttacking();

Get if the Entity is sprinting.

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.isSprinting();

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.isSwimming();

returns true if this is an EntityPlayerSP, or the logged in player.

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.isUser();

Checks if this entity is either in water or on an open air block in rain (used in wolves).

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.isWet();

Causes this entity to do an upwards motion (jumping).

ZenScript
Copy
myMCPlayerEntity.jump();

Called frequently so the entity can update its state every tick as required. For example, zombies and skeletons use this to react to sunlight and start to burn.

ZenScript
Copy
myMCPlayerEntity.livingTick();

moveToBlockPosAndAngles

Link to movetoblockposandangles

ZenScript
Copy
myMCPlayerEntity.moveToBlockPosAndAngles(pos as crafttweaker.api.util.BlockPos, rotationYawIn as float, rotationPitchIn as float);
参数类型描述
参数
类型
crafttweaker.api.util.BlockPos
描述
No description provided
参数
rotationYawIn
类型
float
描述
No description provided
参数
rotationPitchIn
类型
float
描述
No description provided
ZenScript
Copy
myMCPlayerEntity.onAddedToWorld();

onCollideWithPlayer

Link to oncollidewithplayer

Called by a player entity when they collide with an entity

ZenScript
Copy
myMCPlayerEntity.onCollideWithPlayer(entityIn as crafttweaker.api.entity.player.MCPlayerEntity);
参数类型描述
参数
entityIn
类型
crafttweaker.api.entity.player.MCPlayerEntity
描述
No description provided
ZenScript
Copy
myMCPlayerEntity.onEnchant(enchantedItem as crafttweaker.api.item.IItemStack, cost as int);
参数类型描述
参数
enchantedItem
类型
crafttweaker.api.item.IItemStack
描述
No description provided
参数
cost
类型
int
描述
No description provided

onEnterBubbleColumn

Link to onenterbubblecolumn

ZenScript
Copy
myMCPlayerEntity.onEnterBubbleColumn(downwards as boolean);
参数类型描述
参数
downwards
类型
布尔值
描述
No description provided

onEnterBubbleColumnWithAirAbove

Link to onenterbubblecolumnwithairabove

ZenScript
Copy
myMCPlayerEntity.onEnterBubbleColumnWithAirAbove(downwards as boolean);
参数类型描述
参数
downwards
类型
布尔值
描述
No description provided

Called by the /kill command.

ZenScript
Copy
myMCPlayerEntity.onKillCommand();

onRemovedFromWorld

Link to onremovedfromworld

ZenScript
Copy
myMCPlayerEntity.onRemovedFromWorld();

performHurtAnimation

Link to performhurtanimation

Setups the entity to do the hurt animation. Only used by packets in multiplayer.

ZenScript
Copy
myMCPlayerEntity.performHurtAnimation();

preparePlayerToSpawn

Link to prepareplayertospawn

Keeps moving the entity up so it isn't colliding with blocks and other requirements for this entity to be spawned (only actually used on players though its also on Entity)

ZenScript
Copy
myMCPlayerEntity.preparePlayerToSpawn();
ZenScript
Copy
myMCPlayerEntity.recalculateSize();

remove #移除

Link to remove-移除

ZenScript
Copy
myMCPlayerEntity.remove();
ZenScript
Copy
myMCPlayerEntity.remove(keepData as boolean);
参数类型描述
参数
keepData
类型
布尔值
描述
No description provided

removeActivePotionEffect

Link to removeactivepotioneffect

Returns crafttweaker.api.potion.MCPotionEffectInstance

ZenScript
Copy
myMCPlayerEntity.removeActivePotionEffect(arg0 as crafttweaker.api.potion.MCPotionEffect);
参数类型描述
参数
arg0
类型
crafttweaker.api.potion.MCPotionEffect
描述
No description provided

removePassengers

Link to removepassengers

Dismounts all entities riding this entity from this entity.

ZenScript
Copy
myMCPlayerEntity.removePassengers();

removePotionEffect

Link to removepotioneffect

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.removePotionEffect(effectIn as crafttweaker.api.potion.MCPotionEffect);
参数类型描述
参数
effectIn
类型
crafttweaker.api.potion.MCPotionEffect
描述
No description provided

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.removeTag(tag as String);
参数类型描述
参数
tag #标签
类型
字符串[string]
描述
No description provided

replaceItemInInventory

Link to replaceitemininventory

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.replaceItemInInventory(inventorySlot as int, itemStackIn as crafttweaker.api.item.IItemStack);
参数类型描述
参数
inventorySlot
类型
int
描述
No description provided
参数
itemStackIn
类型
crafttweaker.api.item.IItemStack
描述
No description provided
ZenScript
Copy
myMCPlayerEntity.resetActiveHand();
ZenScript
Copy
myMCPlayerEntity.resetCooldown();

resetPositionToBB

Link to resetpositiontobb

Resets the entity's position to the center (planar) and bottom (vertical) points of its bounding box.

ZenScript
Copy
myMCPlayerEntity.resetPositionToBB();
ZenScript
Copy
myMCPlayerEntity.respawnPlayer();
ZenScript
Copy
myMCPlayerEntity.revive();
ZenScript
Copy
myMCPlayerEntity.rotateTowards(yaw as double, pitch as double);
参数类型描述
参数
yaw
类型
double
描述
No description provided
参数
pitch
类型
double
描述
No description provided

Sends an END_COMBAT packet to the client

ZenScript
Copy
myMCPlayerEntity.sendEndCombat();

Sends an ENTER_COMBAT packet to the client

ZenScript
Copy
myMCPlayerEntity.sendEnterCombat();

sendPlayerAbilities

Link to sendplayerabilities

Sends the player's abilities to the server (if there is one).

ZenScript
Copy
myMCPlayerEntity.sendPlayerAbilities();

set the movespeed used for the new AI system

ZenScript
Copy
myMCPlayerEntity.setAIMoveSpeed(speedIn as float);
参数类型描述
参数
speedIn
类型
float
描述
No description provided

setAbsorptionAmount

Link to setabsorptionamount

ZenScript
Copy
myMCPlayerEntity.setAbsorptionAmount(amount as float);
参数类型描述
参数
amount
类型
float
描述
No description provided
ZenScript
Copy
myMCPlayerEntity.setAir(air as int);
参数类型描述
参数
air
类型
int
描述
No description provided

setArrowCountInEntity

Link to setarrowcountinentity

ZenScript
Copy
myMCPlayerEntity.setArrowCountInEntity(count as int);
参数类型描述
参数
count
类型
int
描述
No description provided
ZenScript
Copy
myMCPlayerEntity.setBedPosition(p_213369_1_ as crafttweaker.api.util.BlockPos);
参数类型描述
参数
p_213369_1_
类型
crafttweaker.api.util.BlockPos
描述
No description provided

setCustomNameVisible

Link to setcustomnamevisible

ZenScript
Copy
myMCPlayerEntity.setCustomNameVisible(alwaysRenderNameTag as boolean);
参数类型描述
参数
alwaysRenderNameTag
类型
布尔值
描述
No description provided
ZenScript
Copy
myMCPlayerEntity.setEntityId(id as int);
参数类型描述
参数
id
类型
int
描述
No description provided

Sets entity to burn for x amount of seconds, cannot lower amount of existing fire.

ZenScript
Copy
myMCPlayerEntity.setFire(seconds as int);
参数类型描述
参数
seconds
类型
int
描述
No description provided
ZenScript
Copy
myMCPlayerEntity.setFireTimer(p_223308_1_ as int);
参数类型描述
参数
p_223308_1_
类型
int
描述
No description provided
ZenScript
Copy
myMCPlayerEntity.setGlowing(glowingIn as boolean);
参数类型描述
参数
glowingIn
类型
布尔值
描述
No description provided
ZenScript
Copy
myMCPlayerEntity.setHeadRotation(yaw as float, pitch as int);
参数类型描述
参数
yaw
类型
float
描述
No description provided
参数
pitch
类型
int
描述
No description provided
ZenScript
Copy
myMCPlayerEntity.setHealth(health as float);
参数类型描述
参数
health
类型
float
描述
No description provided
ZenScript
Copy
myMCPlayerEntity.setIdleTime(idleTimeIn as int);
参数类型描述
参数
idleTimeIn
类型
int
描述
No description provided
ZenScript
Copy
myMCPlayerEntity.setInLava();
ZenScript
Copy
myMCPlayerEntity.setInvisible(invisible as boolean);
参数类型描述
参数
invisible
类型
布尔值
描述
No description provided

Sets whether this Entity is invulnerable.

ZenScript
Copy
myMCPlayerEntity.setInvulnerable(isInvulnerable as boolean);
参数类型描述
参数
isInvulnerable
类型
布尔值
描述
No description provided
ZenScript
Copy
myMCPlayerEntity.setJumping(jumping as boolean);
参数类型描述
参数
jumping
类型
布尔值
描述
No description provided

setLocationAndAngles

Link to setlocationandangles

Sets the location and Yaw/Pitch of an entity in the world

ZenScript
Copy
myMCPlayerEntity.setLocationAndAngles(x as double, y as double, z as double, yaw as float, pitch as float);
参数类型描述
参数
x
类型
double
描述
No description provided
参数
y
类型
double
描述
No description provided
参数
z
类型
double
描述
No description provided
参数
yaw
类型
float
描述
No description provided
参数
pitch
类型
float
描述
No description provided
ZenScript
Copy
myMCPlayerEntity.setMotion(x as double, y as double, z as double);
参数类型描述
参数
x
类型
double
描述
No description provided
参数
y
类型
double
描述
No description provided
参数
z
类型
double
描述
No description provided
ZenScript
Copy
myMCPlayerEntity.setNoGravity(noGravity as boolean);
参数类型描述
参数
noGravity
类型
布尔值
描述
No description provided

Called when a record starts or stops playing. Used to make parrots start or stop partying.

ZenScript
Copy
myMCPlayerEntity.setPartying(pos as crafttweaker.api.util.BlockPos, isPartying as boolean);
参数类型描述
参数
类型
crafttweaker.api.util.BlockPos
描述
No description provided
参数
isPartying
类型
布尔值
描述
No description provided

Marks the entity as being inside a portal, activating teleportation logic in onEntityUpdate() in the following tick(s).

ZenScript
Copy
myMCPlayerEntity.setPortal(pos as crafttweaker.api.util.BlockPos);
参数类型描述
参数
类型
crafttweaker.api.util.BlockPos
描述
No description provided

Sets the x,y,z of the entity from the given parameters. Also seems to set up a bounding box.

ZenScript
Copy
myMCPlayerEntity.setPosition(x as double, y as double, z as double);
参数类型描述
参数
x
类型
double
描述
No description provided
参数
y
类型
double
描述
No description provided
参数
z
类型
double
描述
No description provided

setPositionAndRotation

Link to setpositionandrotation

Sets position and rotation, clamping and wrapping params to valid values. Used by network code.

ZenScript
Copy
myMCPlayerEntity.setPositionAndRotation(x as double, y as double, z as double, yaw as float, pitch as float);
参数类型描述
参数
x
类型
double
描述
No description provided
参数
y
类型
double
描述
No description provided
参数
z
类型
double
描述
No description provided
参数
yaw
类型
float
描述
No description provided
参数
pitch
类型
float
描述
No description provided

setPositionAndRotationDirect

Link to setpositionandrotationdirect

Sets a target for the client to interpolate towards over the next few ticks

ZenScript
Copy
myMCPlayerEntity.setPositionAndRotationDirect(x as double, y as double, z as double, yaw as float, pitch as float, posRotationIncrements as int, teleport as boolean);
参数类型描述
参数
x
类型
double
描述
No description provided
参数
y
类型
double
描述
No description provided
参数
z
类型
double
描述
No description provided
参数
yaw
类型
float
描述
No description provided
参数
pitch
类型
float
描述
No description provided
参数
posRotationIncrements
类型
int
描述
No description provided
参数
teleport
类型
布尔值
描述
No description provided

setPositionAndUpdate

Link to setpositionandupdate

Sets the position of the entity and updates the 'last' variables

ZenScript
Copy
myMCPlayerEntity.setPositionAndUpdate(x as double, y as double, z as double);
参数类型描述
参数
x
类型
double
描述
No description provided
参数
y
类型
double
描述
No description provided
参数
z
类型
double
描述
No description provided

setPositionNonDirty

Link to setpositionnondirty

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.setPositionNonDirty();
ZenScript
Copy
myMCPlayerEntity.setReducedDebug(reducedDebug as boolean);
参数类型描述
参数
reducedDebug
类型
布尔值
描述
No description provided

setRenderYawOffset

Link to setrenderyawoffset

Set the render yaw offset

ZenScript
Copy
myMCPlayerEntity.setRenderYawOffset(offset as float);
参数类型描述
参数
offset
类型
float
描述
No description provided

setRotationYawHead

Link to setrotationyawhead

Sets the head's yaw rotation of the entity.

ZenScript
Copy
myMCPlayerEntity.setRotationYawHead(rotation as float);
参数类型描述
参数
rotation
类型
float
描述
No description provided

Set player's score

ZenScript
Copy
myMCPlayerEntity.setScore(scoreIn as int);
参数类型描述
参数
scoreIn
类型
int
描述
No description provided

When set to true the entity will not play sounds.

ZenScript
Copy
myMCPlayerEntity.setSilent(isSilent as boolean);
参数类型描述
参数
isSilent
类型
布尔值
描述
No description provided

Sets the sneaking flag.

ZenScript
Copy
myMCPlayerEntity.setSneaking(sneaking as boolean);
参数类型描述
参数
sneaking
类型
布尔值
描述
No description provided
ZenScript
Copy
myMCPlayerEntity.setSpawnPoint(pos as crafttweaker.api.util.BlockPos, forced as boolean);
参数类型描述
参数
类型
crafttweaker.api.util.BlockPos
描述
No description provided
参数
forced
类型
布尔值
描述
No description provided

Set sprinting switch for Entity.

ZenScript
Copy
myMCPlayerEntity.setSprinting(sprinting as boolean);
参数类型描述
参数
sprinting
类型
布尔值
描述
No description provided
ZenScript
Copy
myMCPlayerEntity.setSwimming(p_204711_1_ as boolean);
参数类型描述
参数
p_204711_1_
类型
布尔值
描述
No description provided

Updates the entity motion clientside, called by packets from the server

ZenScript
Copy
myMCPlayerEntity.setVelocity(x as double, y as double, z as double);
参数类型描述
参数
x
类型
double
描述
No description provided
参数
y
类型
double
描述
No description provided
参数
z
类型
double
描述
No description provided

Checks if the player's health is not full and not zero.

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.shouldHeal();

shouldReceiveErrors

Link to shouldreceiveerrors

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.shouldReceiveErrors();

shouldReceiveFeedback

Link to shouldreceivefeedback

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.shouldReceiveFeedback();

shouldRenderSneaking

Link to shouldrendersneaking

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.shouldRenderSneaking();

shouldRiderFaceForward

Link to shouldriderfaceforward

Returns true if the entity's rider (EntityPlayer) should face forward when mounted. currently only used in vanilla code by pigs.

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.shouldRiderFaceForward(player as crafttweaker.api.entity.player.MCPlayerEntity);
参数类型描述
参数
player
类型
crafttweaker.api.entity.player.MCPlayerEntity
描述
The player who is riding the entity.

返回为布尔值

ZenScript
Copy
myMCPlayerEntity.shouldRiderSit();

spawnRunningParticles

Link to spawnrunningparticles

Attempts to create sprinting particles if the entity is sprinting and not in water.

ZenScript
Copy
myMCPlayerEntity.spawnRunningParticles();

spawnSweepParticles

Link to spawnsweepparticles

ZenScript
Copy
myMCPlayerEntity.spawnSweepParticles();
ZenScript
Copy
myMCPlayerEntity.startSleeping(p_213342_1_ as crafttweaker.api.util.BlockPos);
参数类型描述
参数
p_213342_1_
类型
crafttweaker.api.util.BlockPos
描述
No description provided
ZenScript
Copy
myMCPlayerEntity.startSpinAttack(p_204803_1_ as int);
参数类型描述
参数
p_204803_1_
类型
int
描述
No description provided
ZenScript
Copy
myMCPlayerEntity.stopActiveHand();

Dismounts this entity from the entity it is riding.

ZenScript
Copy
myMCPlayerEntity.stopRiding();

teleportKeepLoaded

Link to teleportkeeploaded

ZenScript
Copy
myMCPlayerEntity.teleportKeepLoaded(p_223102_1_ as double, p_223102_3_ as double, p_223102_5_ as double);
参数类型描述
参数
p_223102_1_
类型
double
描述
No description provided
参数
p_223102_3_
类型
double
描述
No description provided
参数
p_223102_5_
类型
double
描述
No description provided

Called to update the entity's position/logic.

ZenScript
Copy
myMCPlayerEntity.tick();

返回字符串[String]

ZenScript
Copy
myMCPlayerEntity.toString();

Handles updating while riding another entity

ZenScript
Copy
myMCPlayerEntity.updateRidden();
ZenScript
Copy
myMCPlayerEntity.updateSwimming();
ZenScript
Copy
myMCPlayerEntity.wakeUp();

Wake up the player if they're sleeping.

ZenScript
Copy
myMCPlayerEntity.wakeUpPlayer(immediately as boolean, updateWorldFlag as boolean, setSpawn as boolean);
参数类型描述
参数
immediately
类型
布尔值
描述
No description provided
参数
updateWorldFlag
类型
布尔值
描述
No description provided
参数
setSpawn
类型
布尔值
描述
No description provided

This method returns the cap amount of experience that the experience bar can hold. With each level, the experience cap on the player's experience bar is raised by 10.

返回为int值

ZenScript
Copy
myMCPlayerEntity.xpBarCap();