This class was added by a mod with mod-id crafttweaker. So you need to have this mod installed if you want to use this feature.

Importing the class

Link to 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.

ZenScript
Copy
crafttweaker.api.entity.player.MCPlayerEntity

increases exhaustion level by supplied amount

ZenScript
Copy
myMCPlayerEntity.addExhaustion(exhaustion as float);
ParameterTypeDescription
Parameter
exhaustion
Type
float
Description
No description provided

addExperienceLevel

Link to addexperiencelevel

Add experience levels to this player.

ZenScript
Copy
myMCPlayerEntity.addExperienceLevel(levels as int);
ParameterTypeDescription
Parameter
levels
Type
int
Description
No description provided

addItemStackToInventory

Link to additemstacktoinventory

Returns boolean

ZenScript
Copy
myMCPlayerEntity.addItemStackToInventory(p_191521_1_ as crafttweaker.api.item.IItemStack);
ParameterTypeDescription
Parameter
p_191521_1_
Type
crafttweaker.api.item.IItemStack
Description
No description provided

Adds a value to a movement statistic field - like run, walk, swin or climb.

ZenScript
Copy
myMCPlayerEntity.addMovementStat(p_71000_1_ as double, p_71000_3_ as double, p_71000_5_ as double);
ParameterTypeDescription
Parameter
p_71000_1_
Type
double
Description
No description provided
Parameter
p_71000_3_
Type
double
Description
No description provided
Parameter
p_71000_5_
Type
double
Description
No description provided

Returns boolean

ZenScript
Copy
myMCPlayerEntity.addPotionEffect(effectInstanceIn as crafttweaker.api.potion.MCPotionEffectInstance);
ParameterTypeDescription
Parameter
effectInstanceIn
Type
crafttweaker.api.potion.MCPotionEffectInstance
Description
No description provided

Add to player's score

ZenScript
Copy
myMCPlayerEntity.addScore(scoreIn as int);
ParameterTypeDescription
Parameter
scoreIn
Type
int
Description
No description provided

Returns boolean

ZenScript
Copy
myMCPlayerEntity.addTag(tag as String);
ParameterTypeDescription
Parameter
tag
Type
String
Description
No description provided

Adds to the current velocity of the entity, and sets to true.

ZenScript
Copy
myMCPlayerEntity.addVelocity(x as double, y as double, z as double);
ParameterTypeDescription
Parameter
x
Type
double
Description
No description provided
Parameter
y
Type
double
Description
No description provided
Parameter
z
Type
double
Description
No description provided

Returns boolean

ZenScript
Copy
myMCPlayerEntity.allowLogging();

Returns boolean

ZenScript
Copy
myMCPlayerEntity.attackable();

Returns boolean

ZenScript
Copy
myMCPlayerEntity.attemptTeleport(p_213373_1_ as double, p_213373_3_ as double, p_213373_5_ as double, p_213373_7_ as boolean);
ParameterTypeDescription
Parameter
p_213373_1_
Type
double
Description
No description provided
Parameter
p_213373_3_
Type
double
Description
No description provided
Parameter
p_213373_5_
Type
double
Description
No description provided
Parameter
p_213373_7_
Type
boolean
Description
No description provided

Gets called every tick from main Entity class

ZenScript
Copy
myMCPlayerEntity.baseTick();

Returns boolean

ZenScript
Copy
myMCPlayerEntity.canAttackPlayer(other as crafttweaker.api.entity.player.MCPlayerEntity);
ParameterTypeDescription
Parameter
other
Type
crafttweaker.api.entity.player.MCPlayerEntity
Description
No description provided

canBeAttackedWithItem

Link to canbeattackedwithitem

Returns true if it's possible to attack this entity with an item.

Returns boolean

ZenScript
Copy
myMCPlayerEntity.canBeAttackedWithItem();

canBeCollidedWith

Link to canbecollidedwith

Returns true if other Entities should be prevented from moving through this Entity.

Returns boolean

ZenScript
Copy
myMCPlayerEntity.canBeCollidedWith();

canBeHitWithPotion

Link to canbehitwithpotion

Returns false if the entity is an armor stand. Returns true for all other entity living bases.

Returns boolean

ZenScript
Copy
myMCPlayerEntity.canBeHitWithPotion();

Returns true if this entity should push and be pushed by other entities when colliding.

Returns boolean

ZenScript
Copy
myMCPlayerEntity.canBePushed();

canBeRiddenInWater

Link to canberiddeninwater

Returns boolean

ZenScript
Copy
myMCPlayerEntity.canBeRiddenInWater();

canBreatheUnderwater

Link to canbreatheunderwater

Returns boolean

ZenScript
Copy
myMCPlayerEntity.canBreatheUnderwater();

Returns boolean

ZenScript
Copy
myMCPlayerEntity.canEat(ignoreHunger as boolean);
ParameterTypeDescription
Parameter
ignoreHunger
Type
boolean
Description
No description provided

Returns boolean

ZenScript
Copy
myMCPlayerEntity.canHarvestBlock(state as crafttweaker.api.block.MCBlockState);
ParameterTypeDescription
Parameter
state
Type
crafttweaker.api.block.MCBlockState
Description
No description provided

canPassengerSteer

Link to canpassengersteer

Returns boolean

ZenScript
Copy
myMCPlayerEntity.canPassengerSteer();

Returns whether this player can modify the block at a certain location with the given stack.

The position being queried is {@code pos.offset(facing.getOpposite()))}. Returns: Whether this player may modify the queried location in the current world @see ItemStack#canPlaceOn(Block) @see ItemStack#canEditBlocks() @see PlayerCapabilities#allowEdit

Returns boolean

ZenScript
Copy
myMCPlayerEntity.canPlayerEdit(pos as crafttweaker.api.util.BlockPos, facing as crafttweaker.api.util.Direction, stack as crafttweaker.api.item.IItemStack);
ParameterTypeDescription
Parameter
pos
Type
crafttweaker.api.util.BlockPos
Description
No description provided
Parameter
facing
Type
crafttweaker.api.util.Direction
Description
No description provided
Parameter
stack
Type
crafttweaker.api.item.IItemStack
Description
No description provided

Return whether this entity should be rendered as on fire.

Returns boolean

ZenScript
Copy
myMCPlayerEntity.canRenderOnFire();

canRiderInteract

Link to canriderinteract

Returns boolean

ZenScript
Copy
myMCPlayerEntity.canRiderInteract();

Returns boolean

ZenScript
Copy
myMCPlayerEntity.canSwim();

Returns boolean

ZenScript
Copy
myMCPlayerEntity.canTrample(state as crafttweaker.api.block.MCBlockState, pos as crafttweaker.api.util.BlockPos, fallDistance as float);
ParameterTypeDescription
Parameter
state
Type
crafttweaker.api.block.MCBlockState
Description
No description provided
Parameter
pos
Type
crafttweaker.api.util.BlockPos
Description
No description provided
Parameter
fallDistance
Type
float
Description
No description provided

Returns boolean

ZenScript
Copy
myMCPlayerEntity.canUpdate();
ZenScript
Copy
myMCPlayerEntity.canUpdate(value as boolean);
ParameterTypeDescription
Parameter
value
Type
boolean
Description
No description provided

canUseCommandBlock

Link to canusecommandblock

Returns boolean

ZenScript
Copy
myMCPlayerEntity.canUseCommandBlock();

clearActivePotions

Link to clearactivepotions

Returns boolean

ZenScript
Copy
myMCPlayerEntity.clearActivePotions();

clearBedPosition

Link to clearbedposition

ZenScript
Copy
myMCPlayerEntity.clearBedPosition();

set current crafting inventory back to the 2x2 square

ZenScript
Copy
myMCPlayerEntity.closeScreen();

curePotionEffects

Link to curepotioneffects

Returns boolean

ZenScript
Copy
myMCPlayerEntity.curePotionEffects(curativeItem as crafttweaker.api.item.IItemStack);
ParameterTypeDescription
Parameter
curativeItem
Type
crafttweaker.api.item.IItemStack
Description
No description provided
ZenScript
Copy
myMCPlayerEntity.detach();
ZenScript
Copy
myMCPlayerEntity.disableShield(p_190777_1_ as boolean);
ParameterTypeDescription
Parameter
p_190777_1_
Type
boolean
Description
No description provided

doesEntityNotTriggerPressurePlate

Link to doesentitynottriggerpressureplate

Return whether this entity should NOT trigger a pressure plate or a tripwire.

Returns boolean

ZenScript
Copy
myMCPlayerEntity.doesEntityNotTriggerPressurePlate();

Returns boolean

ZenScript
Copy
myMCPlayerEntity.equals(p_equals_1_ as Object);
ParameterTypeDescription
Parameter
p_equals_1_
Type
Object
Description
No description provided

Removes fire from entity.

ZenScript
Copy
myMCPlayerEntity.extinguish();
ZenScript
Copy
myMCPlayerEntity.fall(distance as float, damageMultiplier as float);
ParameterTypeDescription
Parameter
distance
Type
float
Description
No description provided
Parameter
damageMultiplier
Type
float
Description
No description provided

Returns crafttweaker.api.item.IItemStack

ZenScript
Copy
myMCPlayerEntity.findAmmo(shootable as crafttweaker.api.item.IItemStack);
ParameterTypeDescription
Parameter
shootable
Type
crafttweaker.api.item.IItemStack
Description
No description provided

Returns boolean

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);
ParameterTypeDescription
Parameter
p_213312_1_
Type
double
Description
No description provided
Parameter
p_213312_3_
Type
double
Description
No description provided
Parameter
p_213312_5_
Type
double
Description
No description provided

Returns boolean

ZenScript
Copy
myMCPlayerEntity.func_213314_bj();

Returns float

ZenScript
Copy
myMCPlayerEntity.func_213343_cS();

Returns boolean

ZenScript
Copy
myMCPlayerEntity.func_213365_e(itemstackIn as crafttweaker.api.item.IItemStack);
ParameterTypeDescription
Parameter
itemstackIn
Type
crafttweaker.api.item.IItemStack
Description
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);
ParameterTypeDescription
Parameter
potionIn
Type
crafttweaker.api.potion.MCPotionEffect
Description
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();

Returns int

ZenScript
Copy
myMCPlayerEntity.getAir();

getAlwaysRenderNameTagForRender

Link to getalwaysrendernametagforrender

Returns boolean

ZenScript
Copy
myMCPlayerEntity.getAlwaysRenderNameTagForRender();

getArrowCountInEntity

Link to getarrowcountinentity

Returns 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();

Returns crafttweaker.api.block.MCBlockState

ZenScript
Copy
myMCPlayerEntity.getBlockState();

Gets how bright this entity is.

Returns float

ZenScript
Copy
myMCPlayerEntity.getBrightness();

getBrightnessForRender

Link to getbrightnessforrender

Returns int

ZenScript
Copy
myMCPlayerEntity.getBrightnessForRender();

getCachedUniqueIdString

Link to getcacheduniqueidstring

Returns String

ZenScript
Copy
myMCPlayerEntity.getCachedUniqueIdString();

getClassification

Link to getclassification

Returns crafttweaker.api.entity.MCEntityClassification

ZenScript
Copy
myMCPlayerEntity.getClassification(forSpawnCount as boolean);
ParameterTypeDescription
Parameter
forSpawnCount
Type
boolean
Description
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);
ParameterTypeDescription
Parameter
adjustTicks
Type
float
Description
No description provided

Returns float

ZenScript
Copy
myMCPlayerEntity.getDigSpeed(state as crafttweaker.api.block.MCBlockState);
ParameterTypeDescription
Parameter
state
Type
crafttweaker.api.block.MCBlockState
Description
No description provided

Returns float

ZenScript
Copy
myMCPlayerEntity.getDigSpeed(arg0 as crafttweaker.api.block.MCBlockState, arg1 as crafttweaker.api.util.BlockPos);
ParameterTypeDescription
Parameter
arg0
Type
crafttweaker.api.block.MCBlockState
Description
No description provided
Parameter
arg1
Type
crafttweaker.api.util.BlockPos
Description
No description provided

Returns double

ZenScript
Copy
myMCPlayerEntity.getDistanceSq(x as double, y as double, z as double);
ParameterTypeDescription
Parameter
x
Type
double
Description
No description provided
Parameter
y
Type
double
Description
No description provided
Parameter
z
Type
double
Description
No description provided

Returns int

ZenScript
Copy
myMCPlayerEntity.getEntityId();

Returns String

ZenScript
Copy
myMCPlayerEntity.getEntityString();

Returns float

ZenScript
Copy
myMCPlayerEntity.getEyeHeight();

Returns 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();

Returns int

ZenScript
Copy
myMCPlayerEntity.getIdleTime();

getItemInUseCount

Link to getiteminusecount

Returns int

ZenScript
Copy
myMCPlayerEntity.getItemInUseCount();

getItemInUseMaxCount

Link to getiteminusemaxcount

Returns int

ZenScript
Copy
myMCPlayerEntity.getItemInUseMaxCount();

getLastAttackedEntityTime

Link to getlastattackedentitytime

Returns int

ZenScript
Copy
myMCPlayerEntity.getLastAttackedEntityTime();

Returns float

ZenScript
Copy
myMCPlayerEntity.getLuck();

Returns int

ZenScript
Copy
myMCPlayerEntity.getMaxAir();

getMaxFallHeight

Link to getmaxfallheight

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

Returns 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.

Returns 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);
ParameterTypeDescription
Parameter
partialTicks
Type
float
Description
No description provided

getPortalCooldown

Link to getportalcooldown

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

Returns 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();

Returns int

ZenScript
Copy
myMCPlayerEntity.getRevengeTimer();

getRotationYawHead

Link to getrotationyawhead

Returns float

ZenScript
Copy
myMCPlayerEntity.getRotationYawHead();

Returns 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

Returns String

ZenScript
Copy
myMCPlayerEntity.getScoreboardName();

Returns 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);
ParameterTypeDescription
Parameter
partialTicks
Type
float
Description
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);
ParameterTypeDescription
Parameter
partialTickTime
Type
float
Description
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

Returns int

ZenScript
Copy
myMCPlayerEntity.getTicksElytraFlying();

getTotalArmorValue

Link to gettotalarmorvalue

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

Returns int

ZenScript
Copy
myMCPlayerEntity.getTotalArmorValue();

Returns float

ZenScript
Copy
myMCPlayerEntity.getWidth();

Returns 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);
ParameterTypeDescription
Parameter
partialTicks
Type
float
Description
No description provided

giveExperiencePoints

Link to giveexperiencepoints

ZenScript
Copy
myMCPlayerEntity.giveExperiencePoints(p_195068_1_ as int);
ParameterTypeDescription
Parameter
p_195068_1_
Type
int
Description
No description provided

handleStatusUpdate

Link to handlestatusupdate

ZenScript
Copy
myMCPlayerEntity.handleStatusUpdate(id as byte);
ParameterTypeDescription
Parameter
id
Type
byte
Description
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

Returns boolean

ZenScript
Copy
myMCPlayerEntity.handleWaterMovement();

Returns boolean

ZenScript
Copy
myMCPlayerEntity.hasCustomName();

Returns boolean

ZenScript
Copy
myMCPlayerEntity.hasNoGravity();

hasPermissionLevel

Link to haspermissionlevel

Returns boolean

ZenScript
Copy
myMCPlayerEntity.hasPermissionLevel(p_211513_1_ as int);
ParameterTypeDescription
Parameter
p_211513_1_
Type
int
Description
No description provided

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

Returns boolean

ZenScript
Copy
myMCPlayerEntity.hasReducedDebug();

Returns int

ZenScript
Copy
myMCPlayerEntity.hashCode();

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

ZenScript
Copy
myMCPlayerEntity.heal(healAmount as float);
ParameterTypeDescription
Parameter
healAmount
Type
float
Description
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

Returns boolean

ZenScript
Copy
myMCPlayerEntity.ignoreItemEntityData();

isActiveItemStackBlocking

Link to isactiveitemstackblocking

Returns boolean

ZenScript
Copy
myMCPlayerEntity.isActiveItemStackBlocking();

Returns boolean

ZenScript
Copy
myMCPlayerEntity.isAddedToWorld();

Returns true if the entity has not been .

Returns boolean

ZenScript
Copy
myMCPlayerEntity.isAlive();

Returns boolean

ZenScript
Copy
myMCPlayerEntity.isAllowEdit();

If at least 1 entity is riding this one

Returns boolean

ZenScript
Copy
myMCPlayerEntity.isBeingRidden();

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

Returns boolean

ZenScript
Copy
myMCPlayerEntity.isBurning();

If Animal, checks if the age timer is negative

Returns boolean

ZenScript
Copy
myMCPlayerEntity.isChild();

Returns boolean

ZenScript
Copy
myMCPlayerEntity.isCreative();

isCustomNameVisible

Link to iscustomnamevisible

Returns boolean

ZenScript
Copy
myMCPlayerEntity.isCustomNameVisible();

Returns boolean

ZenScript
Copy
myMCPlayerEntity.isElytraFlying();

isEntityInsideOpaqueBlock

Link to isentityinsideopaqueblock

Checks if this entity is inside of an opaque block

Returns boolean

ZenScript
Copy
myMCPlayerEntity.isEntityInsideOpaqueBlock();

Returns true if this entity is undead.

Returns boolean

ZenScript
Copy
myMCPlayerEntity.isEntityUndead();

Returns boolean

ZenScript
Copy
myMCPlayerEntity.isGlowing();

Returns boolean

ZenScript
Copy
myMCPlayerEntity.isHandActive();

isImmuneToExplosions

Link to isimmunetoexplosions

Returns boolean

ZenScript
Copy
myMCPlayerEntity.isImmuneToExplosions();

Returns boolean

ZenScript
Copy
myMCPlayerEntity.isImmuneToFire();

Returns boolean

ZenScript
Copy
myMCPlayerEntity.isInLava();

isInRangeToRender3d

Link to isinrangetorender3d

Returns boolean

ZenScript
Copy
myMCPlayerEntity.isInRangeToRender3d(x as double, y as double, z as double);
ParameterTypeDescription
Parameter
x
Type
double
Description
No description provided
Parameter
y
Type
double
Description
No description provided
Parameter
z
Type
double
Description
No description provided

isInRangeToRenderDist

Link to isinrangetorenderdist

Checks if the entity is in range to render.

Returns boolean

ZenScript
Copy
myMCPlayerEntity.isInRangeToRenderDist(distance as double);
ParameterTypeDescription
Parameter
distance
Type
double
Description
No description provided

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

Returns boolean

ZenScript
Copy
myMCPlayerEntity.isInWater();

isInWaterOrBubbleColumn

Link to isinwaterorbubblecolumn

Returns boolean

ZenScript
Copy
myMCPlayerEntity.isInWaterOrBubbleColumn();

isInWaterRainOrBubbleColumn

Link to isinwaterrainorbubblecolumn

Returns boolean

ZenScript
Copy
myMCPlayerEntity.isInWaterRainOrBubbleColumn();

Returns boolean

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.

Returns boolean

ZenScript
Copy
myMCPlayerEntity.isInvisibleToPlayer(player as crafttweaker.api.entity.player.MCPlayerEntity);
ParameterTypeDescription
Parameter
player
Type
crafttweaker.api.entity.player.MCPlayerEntity
Description
No description provided

Returns boolean

ZenScript
Copy
myMCPlayerEntity.isInvulnerable();

Returns boolean

ZenScript
Copy
myMCPlayerEntity.isLiving();

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

Returns boolean

ZenScript
Copy
myMCPlayerEntity.isNonBoss();

isOffsetPositionInLiquid

Link to isoffsetpositioninliquid

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

Returns boolean

ZenScript
Copy
myMCPlayerEntity.isOffsetPositionInLiquid(x as double, y as double, z as double);
ParameterTypeDescription
Parameter
x
Type
double
Description
No description provided
Parameter
y
Type
double
Description
No description provided
Parameter
z
Type
double
Description
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)

Returns boolean

ZenScript
Copy
myMCPlayerEntity.isOnLadder();

isOnePlayerRiding

Link to isoneplayerriding

Returns boolean

ZenScript
Copy
myMCPlayerEntity.isOnePlayerRiding();

Returns boolean

ZenScript
Copy
myMCPlayerEntity.isPassenger();

isPlayerFullyAsleep

Link to isplayerfullyasleep

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

Returns boolean

ZenScript
Copy
myMCPlayerEntity.isPlayerFullyAsleep();

Returns boolean

ZenScript
Copy
myMCPlayerEntity.isPotionActive(potionIn as crafttweaker.api.potion.MCPotionEffect);
ParameterTypeDescription
Parameter
potionIn
Type
crafttweaker.api.potion.MCPotionEffect
Description
No description provided

isPotionApplicable

Link to ispotionapplicable

Returns boolean

ZenScript
Copy
myMCPlayerEntity.isPotionApplicable(potioneffectIn as crafttweaker.api.potion.MCPotionEffectInstance);
ParameterTypeDescription
Parameter
potioneffectIn
Type
crafttweaker.api.potion.MCPotionEffectInstance
Description
No description provided

Returns boolean

ZenScript
Copy
myMCPlayerEntity.isPushedByWater();

Returns whether the entity is in a server world

Returns boolean

ZenScript
Copy
myMCPlayerEntity.isServerWorld();

Returns: True if this entity will not play sounds

Returns boolean

ZenScript
Copy
myMCPlayerEntity.isSilent();

Returns whether player is sleeping or not

Returns boolean

ZenScript
Copy
myMCPlayerEntity.isSleeping();

Returns if this entity is sneaking.

Returns boolean

ZenScript
Copy
myMCPlayerEntity.isSneaking();

Returns boolean

ZenScript
Copy
myMCPlayerEntity.isSpawnForced();

Returns true if the player is in spectator mode.

Returns boolean

ZenScript
Copy
myMCPlayerEntity.isSpectator();

Returns boolean

ZenScript
Copy
myMCPlayerEntity.isSpinAttacking();

Get if the Entity is sprinting.

Returns boolean

ZenScript
Copy
myMCPlayerEntity.isSprinting();

Returns boolean

ZenScript
Copy
myMCPlayerEntity.isSwimming();

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

Returns boolean

ZenScript
Copy
myMCPlayerEntity.isUser();

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

Returns boolean

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);
ParameterTypeDescription
Parameter
pos
Type
crafttweaker.api.util.BlockPos
Description
No description provided
Parameter
rotationYawIn
Type
float
Description
No description provided
Parameter
rotationPitchIn
Type
float
Description
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);
ParameterTypeDescription
Parameter
entityIn
Type
crafttweaker.api.entity.player.MCPlayerEntity
Description
No description provided
ZenScript
Copy
myMCPlayerEntity.onEnchant(enchantedItem as crafttweaker.api.item.IItemStack, cost as int);
ParameterTypeDescription
Parameter
enchantedItem
Type
crafttweaker.api.item.IItemStack
Description
No description provided
Parameter
cost
Type
int
Description
No description provided

onEnterBubbleColumn

Link to onenterbubblecolumn

ZenScript
Copy
myMCPlayerEntity.onEnterBubbleColumn(downwards as boolean);
ParameterTypeDescription
Parameter
downwards
Type
boolean
Description
No description provided

onEnterBubbleColumnWithAirAbove

Link to onenterbubblecolumnwithairabove

ZenScript
Copy
myMCPlayerEntity.onEnterBubbleColumnWithAirAbove(downwards as boolean);
ParameterTypeDescription
Parameter
downwards
Type
boolean
Description
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();
ZenScript
Copy
myMCPlayerEntity.remove();
ZenScript
Copy
myMCPlayerEntity.remove(keepData as boolean);
ParameterTypeDescription
Parameter
keepData
Type
boolean
Description
No description provided

removeActivePotionEffect

Link to removeactivepotioneffect

Returns crafttweaker.api.potion.MCPotionEffectInstance

ZenScript
Copy
myMCPlayerEntity.removeActivePotionEffect(arg0 as crafttweaker.api.potion.MCPotionEffect);
ParameterTypeDescription
Parameter
arg0
Type
crafttweaker.api.potion.MCPotionEffect
Description
No description provided

removePassengers

Link to removepassengers

Dismounts all entities riding this entity from this entity.

ZenScript
Copy
myMCPlayerEntity.removePassengers();

removePotionEffect

Link to removepotioneffect

Returns boolean

ZenScript
Copy
myMCPlayerEntity.removePotionEffect(effectIn as crafttweaker.api.potion.MCPotionEffect);
ParameterTypeDescription
Parameter
effectIn
Type
crafttweaker.api.potion.MCPotionEffect
Description
No description provided

Returns boolean

ZenScript
Copy
myMCPlayerEntity.removeTag(tag as String);
ParameterTypeDescription
Parameter
tag
Type
String
Description
No description provided

replaceItemInInventory

Link to replaceitemininventory

Returns boolean

ZenScript
Copy
myMCPlayerEntity.replaceItemInInventory(inventorySlot as int, itemStackIn as crafttweaker.api.item.IItemStack);
ParameterTypeDescription
Parameter
inventorySlot
Type
int
Description
No description provided
Parameter
itemStackIn
Type
crafttweaker.api.item.IItemStack
Description
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);
ParameterTypeDescription
Parameter
yaw
Type
double
Description
No description provided
Parameter
pitch
Type
double
Description
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);
ParameterTypeDescription
Parameter
speedIn
Type
float
Description
No description provided

setAbsorptionAmount

Link to setabsorptionamount

ZenScript
Copy
myMCPlayerEntity.setAbsorptionAmount(amount as float);
ParameterTypeDescription
Parameter
amount
Type
float
Description
No description provided
ZenScript
Copy
myMCPlayerEntity.setAir(air as int);
ParameterTypeDescription
Parameter
air
Type
int
Description
No description provided

setArrowCountInEntity

Link to setarrowcountinentity

ZenScript
Copy
myMCPlayerEntity.setArrowCountInEntity(count as int);
ParameterTypeDescription
Parameter
count
Type
int
Description
No description provided
ZenScript
Copy
myMCPlayerEntity.setBedPosition(p_213369_1_ as crafttweaker.api.util.BlockPos);
ParameterTypeDescription
Parameter
p_213369_1_
Type
crafttweaker.api.util.BlockPos
Description
No description provided

setCustomNameVisible

Link to setcustomnamevisible

ZenScript
Copy
myMCPlayerEntity.setCustomNameVisible(alwaysRenderNameTag as boolean);
ParameterTypeDescription
Parameter
alwaysRenderNameTag
Type
boolean
Description
No description provided
ZenScript
Copy
myMCPlayerEntity.setEntityId(id as int);
ParameterTypeDescription
Parameter
id
Type
int
Description
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);
ParameterTypeDescription
Parameter
seconds
Type
int
Description
No description provided
ZenScript
Copy
myMCPlayerEntity.setFireTimer(p_223308_1_ as int);
ParameterTypeDescription
Parameter
p_223308_1_
Type
int
Description
No description provided
ZenScript
Copy
myMCPlayerEntity.setGlowing(glowingIn as boolean);
ParameterTypeDescription
Parameter
glowingIn
Type
boolean
Description
No description provided
ZenScript
Copy
myMCPlayerEntity.setHeadRotation(yaw as float, pitch as int);
ParameterTypeDescription
Parameter
yaw
Type
float
Description
No description provided
Parameter
pitch
Type
int
Description
No description provided
ZenScript
Copy
myMCPlayerEntity.setHealth(health as float);
ParameterTypeDescription
Parameter
health
Type
float
Description
No description provided
ZenScript
Copy
myMCPlayerEntity.setIdleTime(idleTimeIn as int);
ParameterTypeDescription
Parameter
idleTimeIn
Type
int
Description
No description provided
ZenScript
Copy
myMCPlayerEntity.setInLava();
ZenScript
Copy
myMCPlayerEntity.setInvisible(invisible as boolean);
ParameterTypeDescription
Parameter
invisible
Type
boolean
Description
No description provided

Sets whether this Entity is invulnerable.

ZenScript
Copy
myMCPlayerEntity.setInvulnerable(isInvulnerable as boolean);
ParameterTypeDescription
Parameter
isInvulnerable
Type
boolean
Description
No description provided
ZenScript
Copy
myMCPlayerEntity.setJumping(jumping as boolean);
ParameterTypeDescription
Parameter
jumping
Type
boolean
Description
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);
ParameterTypeDescription
Parameter
x
Type
double
Description
No description provided
Parameter
y
Type
double
Description
No description provided
Parameter
z
Type
double
Description
No description provided
Parameter
yaw
Type
float
Description
No description provided
Parameter
pitch
Type
float
Description
No description provided
ZenScript
Copy
myMCPlayerEntity.setMotion(x as double, y as double, z as double);
ParameterTypeDescription
Parameter
x
Type
double
Description
No description provided
Parameter
y
Type
double
Description
No description provided
Parameter
z
Type
double
Description
No description provided
ZenScript
Copy
myMCPlayerEntity.setNoGravity(noGravity as boolean);
ParameterTypeDescription
Parameter
noGravity
Type
boolean
Description
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);
ParameterTypeDescription
Parameter
pos
Type
crafttweaker.api.util.BlockPos
Description
No description provided
Parameter
isPartying
Type
boolean
Description
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);
ParameterTypeDescription
Parameter
pos
Type
crafttweaker.api.util.BlockPos
Description
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);
ParameterTypeDescription
Parameter
x
Type
double
Description
No description provided
Parameter
y
Type
double
Description
No description provided
Parameter
z
Type
double
Description
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);
ParameterTypeDescription
Parameter
x
Type
double
Description
No description provided
Parameter
y
Type
double
Description
No description provided
Parameter
z
Type
double
Description
No description provided
Parameter
yaw
Type
float
Description
No description provided
Parameter
pitch
Type
float
Description
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);
ParameterTypeDescription
Parameter
x
Type
double
Description
No description provided
Parameter
y
Type
double
Description
No description provided
Parameter
z
Type
double
Description
No description provided
Parameter
yaw
Type
float
Description
No description provided
Parameter
pitch
Type
float
Description
No description provided
Parameter
posRotationIncrements
Type
int
Description
No description provided
Parameter
teleport
Type
boolean
Description
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);
ParameterTypeDescription
Parameter
x
Type
double
Description
No description provided
Parameter
y
Type
double
Description
No description provided
Parameter
z
Type
double
Description
No description provided

setPositionNonDirty

Link to setpositionnondirty

Returns boolean

ZenScript
Copy
myMCPlayerEntity.setPositionNonDirty();
ZenScript
Copy
myMCPlayerEntity.setReducedDebug(reducedDebug as boolean);
ParameterTypeDescription
Parameter
reducedDebug
Type
boolean
Description
No description provided

setRenderYawOffset

Link to setrenderyawoffset

Set the render yaw offset

ZenScript
Copy
myMCPlayerEntity.setRenderYawOffset(offset as float);
ParameterTypeDescription
Parameter
offset
Type
float
Description
No description provided

setRotationYawHead

Link to setrotationyawhead

Sets the head's yaw rotation of the entity.

ZenScript
Copy
myMCPlayerEntity.setRotationYawHead(rotation as float);
ParameterTypeDescription
Parameter
rotation
Type
float
Description
No description provided

Set player's score

ZenScript
Copy
myMCPlayerEntity.setScore(scoreIn as int);
ParameterTypeDescription
Parameter
scoreIn
Type
int
Description
No description provided

When set to true the entity will not play sounds.

ZenScript
Copy
myMCPlayerEntity.setSilent(isSilent as boolean);
ParameterTypeDescription
Parameter
isSilent
Type
boolean
Description
No description provided

Sets the sneaking flag.

ZenScript
Copy
myMCPlayerEntity.setSneaking(sneaking as boolean);
ParameterTypeDescription
Parameter
sneaking
Type
boolean
Description
No description provided
ZenScript
Copy
myMCPlayerEntity.setSpawnPoint(pos as crafttweaker.api.util.BlockPos, forced as boolean);
ParameterTypeDescription
Parameter
pos
Type
crafttweaker.api.util.BlockPos
Description
No description provided
Parameter
forced
Type
boolean
Description
No description provided

Set sprinting switch for Entity.

ZenScript
Copy
myMCPlayerEntity.setSprinting(sprinting as boolean);
ParameterTypeDescription
Parameter
sprinting
Type
boolean
Description
No description provided
ZenScript
Copy
myMCPlayerEntity.setSwimming(p_204711_1_ as boolean);
ParameterTypeDescription
Parameter
p_204711_1_
Type
boolean
Description
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);
ParameterTypeDescription
Parameter
x
Type
double
Description
No description provided
Parameter
y
Type
double
Description
No description provided
Parameter
z
Type
double
Description
No description provided

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

Returns boolean

ZenScript
Copy
myMCPlayerEntity.shouldHeal();

shouldReceiveErrors

Link to shouldreceiveerrors

Returns boolean

ZenScript
Copy
myMCPlayerEntity.shouldReceiveErrors();

shouldReceiveFeedback

Link to shouldreceivefeedback

Returns boolean

ZenScript
Copy
myMCPlayerEntity.shouldReceiveFeedback();

shouldRenderSneaking

Link to shouldrendersneaking

Returns boolean

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.

Returns boolean

ZenScript
Copy
myMCPlayerEntity.shouldRiderFaceForward(player as crafttweaker.api.entity.player.MCPlayerEntity);
ParameterTypeDescription
Parameter
player
Type
crafttweaker.api.entity.player.MCPlayerEntity
Description
The player who is riding the entity.

Returns boolean

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);
ParameterTypeDescription
Parameter
p_213342_1_
Type
crafttweaker.api.util.BlockPos
Description
No description provided
ZenScript
Copy
myMCPlayerEntity.startSpinAttack(p_204803_1_ as int);
ParameterTypeDescription
Parameter
p_204803_1_
Type
int
Description
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);
ParameterTypeDescription
Parameter
p_223102_1_
Type
double
Description
No description provided
Parameter
p_223102_3_
Type
double
Description
No description provided
Parameter
p_223102_5_
Type
double
Description
No description provided

Called to update the entity's position/logic.

ZenScript
Copy
myMCPlayerEntity.tick();

Returns 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);
ParameterTypeDescription
Parameter
immediately
Type
boolean
Description
No description provided
Parameter
updateWorldFlag
Type
boolean
Description
No description provided
Parameter
setSpawn
Type
boolean
Description
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.

Returns int

ZenScript
Copy
myMCPlayerEntity.xpBarCap();