MCPlayerEntity
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
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.
Methods
addExhaustion
increases exhaustion level by supplied amount
Parameter | Type | Description |
---|---|---|
Parameter exhaustion | Type float | Description No description provided |
addExperienceLevel
Add experience levels to this player.
Parameter | Type | Description |
---|---|---|
Parameter levels | Type int | Description No description provided |
addItemStackToInventory
Returns boolean
Parameter | Type | Description |
---|---|---|
Parameter p_191521_1_ | Type crafttweaker.api.item.IItemStack | Description No description provided |
addMovementStat
Adds a value to a movement statistic field - like run, walk, swin or climb.
Parameter | Type | Description |
---|---|---|
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 |
addPotionEffect
Returns boolean
Parameter | Type | Description |
---|---|---|
Parameter effectInstanceIn | Type crafttweaker.api.potion.MCPotionEffectInstance | Description No description provided |
addScore
Add to player’s score
Parameter | Type | Description |
---|---|---|
Parameter scoreIn | Type int | Description No description provided |
addTag
Returns boolean
Parameter | Type | Description |
---|---|---|
Parameter tag | Type String | Description No description provided |
addVelocity
Adds to the current velocity of the entity, and sets to true.
Parameter | Type | Description |
---|---|---|
Parameter x | Type double | Description No description provided |
Parameter y | Type double | Description No description provided |
Parameter z | Type double | Description No description provided |
allowLogging
Returns boolean
attackable
Returns boolean
attemptTeleport
Returns boolean
Parameter | Type | Description |
---|---|---|
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 |
baseTick
Gets called every tick from main Entity class
canAttackPlayer
Returns boolean
Parameter | Type | Description |
---|---|---|
Parameter other | Type crafttweaker.api.entity.player.MCPlayerEntity | Description No description provided |
canBeAttackedWithItem
Returns true if it’s possible to attack this entity with an item.
Returns boolean
canBeCollidedWith
Returns true if other Entities should be prevented from moving through this Entity.
Returns boolean
canBeHitWithPotion
Returns false if the entity is an armor stand. Returns true for all other entity living bases.
Returns boolean
canBePushed
Returns true if this entity should push and be pushed by other entities when colliding.
Returns boolean
canBeRiddenInWater
Returns boolean
canBreatheUnderwater
Returns boolean
canEat
Returns boolean
Parameter | Type | Description |
---|---|---|
Parameter ignoreHunger | Type boolean | Description No description provided |
canHarvestBlock
Returns boolean
Parameter | Type | Description |
---|---|---|
Parameter state | Type crafttweaker.api.block.MCBlockState | Description No description provided |
canPassengerSteer
Returns boolean
canPlayerEdit
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
Parameter | Type | Description |
---|---|---|
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 |
canRenderOnFire
Return whether this entity should be rendered as on fire.
Returns boolean
canRiderInteract
Returns boolean
canSwim
Returns boolean
canTrample
Returns boolean
Parameter | Type | Description |
---|---|---|
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 |
canUpdate
Returns boolean
Parameter | Type | Description |
---|---|---|
Parameter value | Type boolean | Description No description provided |
canUseCommandBlock
Returns boolean
clearActivePotions
Returns boolean
clearBedPosition
closeScreen
set current crafting inventory back to the 2x2 square
curePotionEffects
Returns boolean
Parameter | Type | Description |
---|---|---|
Parameter curativeItem | Type crafttweaker.api.item.IItemStack | Description No description provided |
detach
disableShield
Parameter | Type | Description |
---|---|---|
Parameter p_190777_1_ | Type boolean | Description No description provided |
doesEntityNotTriggerPressurePlate
Return whether this entity should NOT trigger a pressure plate or a tripwire.
Returns boolean
equals
Returns boolean
Parameter | Type | Description |
---|---|---|
Parameter p_equals_1_ | Type Object | Description No description provided |
extinguish
Removes fire from entity.
fall
Parameter | Type | Description |
---|---|---|
Parameter distance | Type float | Description No description provided |
Parameter damageMultiplier | Type float | Description No description provided |
findAmmo
Returns crafttweaker.api.item.IItemStack
Parameter | Type | Description |
---|---|---|
Parameter shootable | Type crafttweaker.api.item.IItemStack | Description No description provided |
func_213300_bk
Returns boolean
func_213312_b
Parameter | Type | Description |
---|---|---|
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 |
func_213314_bj
Returns boolean
func_213343_cS
Returns float
func_213365_e
Returns boolean
Parameter | Type | Description |
---|---|---|
Parameter itemstackIn | Type crafttweaker.api.item.IItemStack | Description No description provided |
getAIMoveSpeed
the movespeed used for the new AI system
Returns float
getAbsorptionAmount
Returns the amount of health added by the Absorption effect.
Returns float
getActiveItemStack
Returns crafttweaker.api.item.IItemStack
getActivePotionEffect
returns the PotionEffect for the supplied Potion if it is active, null otherwise.
Returns crafttweaker.api.potion.MCPotionEffectInstance
Parameter | Type | Description |
---|---|---|
Parameter potionIn | Type crafttweaker.api.potion.MCPotionEffect | Description No description provided |
getActivePotionEffects
Returns Collection<crafttweaker.api.potion.MCPotionEffectInstance>
getAdjustedHorizontalFacing
Gets the horizontal facing direction of this Entity, adjusted to take specially-treated entity types into account.
Returns crafttweaker.api.util.Direction
getAir
Returns int
getAlwaysRenderNameTagForRender
Returns boolean
getArrowCountInEntity
Returns int
getBedDirection
gets the Direction for the camera if this entity is sleeping
Returns crafttweaker.api.util.Direction
getBedLocation
Returns crafttweaker.api.util.BlockPos
getBlockState
Returns crafttweaker.api.block.MCBlockState
getBrightness
Gets how bright this entity is.
Returns float
getBrightnessForRender
Returns int
getCachedUniqueIdString
Returns String
getClassification
Returns crafttweaker.api.entity.MCEntityClassification
Parameter | Type | Description |
---|---|---|
Parameter forSpawnCount | Type boolean | Description No description provided |
getCollisionBorderSize
Returns float
getCooldownPeriod
Returns float
getCooledAttackStrength
Returns the percentage of attack power available based on the cooldown (zero to one).
Returns float
Parameter | Type | Description |
---|---|---|
Parameter adjustTicks | Type float | Description No description provided |
getDigSpeed
Returns float
Parameter | Type | Description |
---|---|---|
Parameter state | Type crafttweaker.api.block.MCBlockState | Description No description provided |
Returns float
Parameter | Type | Description |
---|---|---|
Parameter arg0 | Type crafttweaker.api.block.MCBlockState | Description No description provided |
Parameter arg1 | Type crafttweaker.api.util.BlockPos | Description No description provided |
getDistanceSq
Returns double
Parameter | Type | Description |
---|---|---|
Parameter x | Type double | Description No description provided |
Parameter y | Type double | Description No description provided |
Parameter z | Type double | Description No description provided |
getEntityId
Returns int
getEntityString
Returns String
getEyeHeight
Returns float
getFireTimer
Returns int
getHealth
Returns float
getHeight
Returns float
getHeldItemMainhand
Returns crafttweaker.api.item.IItemStack
getHeldItemOffhand
Returns crafttweaker.api.item.IItemStack
getHorizontalFacing
Gets the horizontal facing direction of this Entity.
Returns crafttweaker.api.util.Direction
getIdleTime
Returns int
getItemInUseCount
Returns int
getItemInUseMaxCount
Returns int
getLastAttackedEntityTime
Returns int
getLuck
Returns float
getMaxAir
Returns int
getMaxFallHeight
The maximum height from where the entity is alowed to jump (used in pathfinder)
Returns int
getMaxHealth
Returns float
getMaxInPortalTime
Return the amount of time this entity should stay in a portal before being transported.
Returns int
getMountedYOffset
Returns the Y offset from the entity’s position for any entity riding this one.
Returns double
getPitch
Gets the current pitch of the entity.
Returns float
Parameter | Type | Description |
---|---|---|
Parameter partialTicks | Type float | Description No description provided |
getPortalCooldown
Return the amount of cooldown before this entity can use a portal again.
Returns int
getPosition
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
getRenderScale
Returns float
getRevengeTimer
Returns int
getRotationYawHead
Returns float
getScore
Returns int
getScoreboardName
Returns a String to use as this entity’s name in the scoreboard/entity selector systems
Returns String
getSleepTimer
Returns int
getSubmergedHeight
Returns double
getSwimAnimation
Returns float
Parameter | Type | Description |
---|---|---|
Parameter partialTicks | Type float | Description No description provided |
getSwingProgress
Gets the progression of the swing animation, ranges from 0.0 to 1.0.
Returns float
Parameter | Type | Description |
---|---|---|
Parameter partialTickTime | Type float | Description No description provided |
getTags
Returns Set
getTeleportDirection
Returns crafttweaker.api.util.Direction
getTicksElytraFlying
Returns int
getTotalArmorValue
Returns the current armor value as determined by a call to InventoryPlayer.getTotalArmorValue
Returns int
getWidth
Returns float
getXPSeed
Returns int
getYOffset
Returns the Y Offset of this entity.
Returns double
getYaw
Gets the current yaw of the entity
Returns float
Parameter | Type | Description |
---|---|---|
Parameter partialTicks | Type float | Description No description provided |
giveExperiencePoints
Parameter | Type | Description |
---|---|---|
Parameter p_195068_1_ | Type int | Description No description provided |
handleStatusUpdate
Parameter | Type | Description |
---|---|---|
Parameter id | Type byte | Description No description provided |
handleWaterMovement
Returns if this entity is in water and will end up adding the waters velocity to the entity
Returns boolean
hasCustomName
Returns boolean
hasNoGravity
Returns boolean
hasPermissionLevel
Returns boolean
Parameter | Type | Description |
---|---|---|
Parameter p_211513_1_ | Type int | Description No description provided |
hasReducedDebug
Whether the “reducedDebugInfo” option is active for this player.
Returns boolean
hashCode
Returns int
heal
Heal living entity (param: amount of half-hearts)
Parameter | Type | Description |
---|---|---|
Parameter healAmount | Type float | Description No description provided |
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:true if this entity offers ways for unauthorized
players to use restricted commands
Returns boolean
isActiveItemStackBlocking
Returns boolean
isAddedToWorld
Returns boolean
isAlive
Returns true if the entity has not been .
Returns boolean
isAllowEdit
Returns boolean
isBeingRidden
If at least 1 entity is riding this one
Returns boolean
isBurning
Returns true if the entity is on fire. Used by render to add the fire effect on rendering.
Returns boolean
isChild
If Animal, checks if the age timer is negative
Returns boolean
isCreative
Returns boolean
isCustomNameVisible
Returns boolean
isElytraFlying
Returns boolean
isEntityInsideOpaqueBlock
Checks if this entity is inside of an opaque block
Returns boolean
isEntityUndead
Returns true if this entity is undead.
Returns boolean
isGlowing
Returns boolean
isHandActive
Returns boolean
isImmuneToExplosions
Returns boolean
isImmuneToFire
Returns boolean
isInLava
Returns boolean
isInRangeToRender3d
Returns boolean
Parameter | Type | Description |
---|---|---|
Parameter x | Type double | Description No description provided |
Parameter y | Type double | Description No description provided |
Parameter z | Type double | Description No description provided |
isInRangeToRenderDist
Checks if the entity is in range to render.
Returns boolean
Parameter | Type | Description |
---|---|---|
Parameter distance | Type double | Description No description provided |
isInWater
Checks if this entity is inside water (if inWater field is true as a result of handleWaterMovement() returning true)
Returns boolean
isInWaterOrBubbleColumn
Returns boolean
isInWaterRainOrBubbleColumn
Returns boolean
isInvisible
Returns boolean
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
Parameter | Type | Description |
---|---|---|
Parameter player | Type crafttweaker.api.entity.player.MCPlayerEntity | Description No description provided |
isInvulnerable
Returns boolean
isLiving
Returns boolean
isNonBoss
Returns false if this Entity is a boss, true otherwise.
Returns boolean
isOffsetPositionInLiquid
Checks if the offset position from the entity’s current position is inside of a liquid.
Returns boolean
Parameter | Type | Description |
---|---|---|
Parameter x | Type double | Description No description provided |
Parameter y | Type double | Description No description provided |
Parameter z | Type double | Description No description provided |
isOnLadder
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
isOnePlayerRiding
Returns boolean
isPassenger
Returns boolean
isPlayerFullyAsleep
Returns whether or not the player is asleep and the screen has fully faded.
Returns boolean
isPotionActive
Returns boolean
Parameter | Type | Description |
---|---|---|
Parameter potionIn | Type crafttweaker.api.potion.MCPotionEffect | Description No description provided |
isPotionApplicable
Returns boolean
Parameter | Type | Description |
---|---|---|
Parameter potioneffectIn | Type crafttweaker.api.potion.MCPotionEffectInstance | Description No description provided |
isPushedByWater
Returns boolean
isServerWorld
Returns whether the entity is in a server world
Returns boolean
isSilent
Returns: True if this entity will not play sounds
Returns boolean
isSleeping
Returns whether player is sleeping or not
Returns boolean
isSneaking
Returns if this entity is sneaking.
Returns boolean
isSpawnForced
Returns boolean
isSpectator
Returns true if the player is in spectator mode.
Returns boolean
isSpinAttacking
Returns boolean
isSprinting
Get if the Entity is sprinting.
Returns boolean
isSwimming
Returns boolean
isUser
returns true if this is an EntityPlayerSP, or the logged in player.
Returns boolean
isWet
Checks if this entity is either in water or on an open air block in rain (used in wolves).
Returns boolean
jump
Causes this entity to do an upwards motion (jumping).
livingTick
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.
moveToBlockPosAndAngles
Parameter | Type | Description |
---|---|---|
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 |
onAddedToWorld
onCollideWithPlayer
Called by a player entity when they collide with an entity
Parameter | Type | Description |
---|---|---|
Parameter entityIn | Type crafttweaker.api.entity.player.MCPlayerEntity | Description No description provided |
onEnchant
Parameter | Type | Description |
---|---|---|
Parameter enchantedItem | Type crafttweaker.api.item.IItemStack | Description No description provided |
Parameter cost | Type int | Description No description provided |
onEnterBubbleColumn
Parameter | Type | Description |
---|---|---|
Parameter downwards | Type boolean | Description No description provided |
onEnterBubbleColumnWithAirAbove
Parameter | Type | Description |
---|---|---|
Parameter downwards | Type boolean | Description No description provided |
onKillCommand
Called by the /kill command.
onRemovedFromWorld
performHurtAnimation
Setups the entity to do the hurt animation. Only used by packets in multiplayer.
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)
recalculateSize
remove
Parameter | Type | Description |
---|---|---|
Parameter keepData | Type boolean | Description No description provided |
removeActivePotionEffect
Returns crafttweaker.api.potion.MCPotionEffectInstance
Parameter | Type | Description |
---|---|---|
Parameter arg0 | Type crafttweaker.api.potion.MCPotionEffect | Description No description provided |
removePassengers
Dismounts all entities riding this entity from this entity.
removePotionEffect
Returns boolean
Parameter | Type | Description |
---|---|---|
Parameter effectIn | Type crafttweaker.api.potion.MCPotionEffect | Description No description provided |
removeTag
Returns boolean
Parameter | Type | Description |
---|---|---|
Parameter tag | Type String | Description No description provided |
replaceItemInInventory
Returns boolean
Parameter | Type | Description |
---|---|---|
Parameter inventorySlot | Type int | Description No description provided |
Parameter itemStackIn | Type crafttweaker.api.item.IItemStack | Description No description provided |
resetActiveHand
resetCooldown
resetPositionToBB
Resets the entity’s position to the center (planar) and bottom (vertical) points of its bounding box.
respawnPlayer
revive
rotateTowards
Parameter | Type | Description |
---|---|---|
Parameter yaw | Type double | Description No description provided |
Parameter pitch | Type double | Description No description provided |
sendEndCombat
Sends an END_COMBAT packet to the client
sendEnterCombat
Sends an ENTER_COMBAT packet to the client
sendPlayerAbilities
Sends the player’s abilities to the server (if there is one).
setAIMoveSpeed
set the movespeed used for the new AI system
Parameter | Type | Description |
---|---|---|
Parameter speedIn | Type float | Description No description provided |
setAbsorptionAmount
Parameter | Type | Description |
---|---|---|
Parameter amount | Type float | Description No description provided |
setAir
Parameter | Type | Description |
---|---|---|
Parameter air | Type int | Description No description provided |
setArrowCountInEntity
Parameter | Type | Description |
---|---|---|
Parameter count | Type int | Description No description provided |
setBedPosition
Parameter | Type | Description |
---|---|---|
Parameter p_213369_1_ | Type crafttweaker.api.util.BlockPos | Description No description provided |
setCustomNameVisible
Parameter | Type | Description |
---|---|---|
Parameter alwaysRenderNameTag | Type boolean | Description No description provided |
setEntityId
Parameter | Type | Description |
---|---|---|
Parameter id | Type int | Description No description provided |
setFire
Sets entity to burn for x amount of seconds, cannot lower amount of existing fire.
Parameter | Type | Description |
---|---|---|
Parameter seconds | Type int | Description No description provided |
setFireTimer
Parameter | Type | Description |
---|---|---|
Parameter p_223308_1_ | Type int | Description No description provided |
setGlowing
Parameter | Type | Description |
---|---|---|
Parameter glowingIn | Type boolean | Description No description provided |
setHeadRotation
Parameter | Type | Description |
---|---|---|
Parameter yaw | Type float | Description No description provided |
Parameter pitch | Type int | Description No description provided |
setHealth
Parameter | Type | Description |
---|---|---|
Parameter health | Type float | Description No description provided |
setIdleTime
Parameter | Type | Description |
---|---|---|
Parameter idleTimeIn | Type int | Description No description provided |
setInLava
setInvisible
Parameter | Type | Description |
---|---|---|
Parameter invisible | Type boolean | Description No description provided |
setInvulnerable
Sets whether this Entity is invulnerable.
Parameter | Type | Description |
---|---|---|
Parameter isInvulnerable | Type boolean | Description No description provided |
setJumping
Parameter | Type | Description |
---|---|---|
Parameter jumping | Type boolean | Description No description provided |
setLocationAndAngles
Sets the location and Yaw/Pitch of an entity in the world
Parameter | Type | Description |
---|---|---|
Parameter x | Type double | Description No description provided |
Parameter y | Type double | Description No description provided |
Parameter z | Type double | Description No description provided |
Parameter yaw | Type float | Description No description provided |
Parameter pitch | Type float | Description No description provided |
setMotion
Parameter | Type | Description |
---|---|---|
Parameter x | Type double | Description No description provided |
Parameter y | Type double | Description No description provided |
Parameter z | Type double | Description No description provided |
setNoGravity
Parameter | Type | Description |
---|---|---|
Parameter noGravity | Type boolean | Description No description provided |
setPartying
Called when a record starts or stops playing. Used to make parrots start or stop partying.
Parameter | Type | Description |
---|---|---|
Parameter pos | Type crafttweaker.api.util.BlockPos | Description No description provided |
Parameter isPartying | Type boolean | Description No description provided |
setPortal
Marks the entity as being inside a portal, activating teleportation logic in onEntityUpdate() in the following tick(s).
Parameter | Type | Description |
---|---|---|
Parameter pos | Type crafttweaker.api.util.BlockPos | Description No description provided |
setPosition
Sets the x,y,z of the entity from the given parameters. Also seems to set up a bounding box.
Parameter | Type | Description |
---|---|---|
Parameter x | Type double | Description No description provided |
Parameter y | Type double | Description No description provided |
Parameter z | Type double | Description No description provided |
setPositionAndRotation
Sets position and rotation, clamping and wrapping params to valid values. Used by network code.
Parameter | Type | Description |
---|---|---|
Parameter x | Type double | Description No description provided |
Parameter y | Type double | Description No description provided |
Parameter z | Type double | Description No description provided |
Parameter yaw | Type float | Description No description provided |
Parameter pitch | Type float | Description No description provided |
setPositionAndRotationDirect
Sets a target for the client to interpolate towards over the next few ticks
Parameter | Type | Description |
---|---|---|
Parameter x | Type double | Description No description provided |
Parameter y | Type double | Description No description provided |
Parameter z | Type double | Description No description provided |
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
Sets the position of the entity and updates the ‘last’ variables
Parameter | Type | Description |
---|---|---|
Parameter x | Type double | Description No description provided |
Parameter y | Type double | Description No description provided |
Parameter z | Type double | Description No description provided |
setPositionNonDirty
Returns boolean
setReducedDebug
Parameter | Type | Description |
---|---|---|
Parameter reducedDebug | Type boolean | Description No description provided |
setRenderYawOffset
Set the render yaw offset
Parameter | Type | Description |
---|---|---|
Parameter offset | Type float | Description No description provided |
setRotationYawHead
Sets the head’s yaw rotation of the entity.
Parameter | Type | Description |
---|---|---|
Parameter rotation | Type float | Description No description provided |
setScore
Set player’s score
Parameter | Type | Description |
---|---|---|
Parameter scoreIn | Type int | Description No description provided |
setSilent
When set to true the entity will not play sounds.
Parameter | Type | Description |
---|---|---|
Parameter isSilent | Type boolean | Description No description provided |
setSneaking
Sets the sneaking flag.
Parameter | Type | Description |
---|---|---|
Parameter sneaking | Type boolean | Description No description provided |
setSpawnPoint
Parameter | Type | Description |
---|---|---|
Parameter pos | Type crafttweaker.api.util.BlockPos | Description No description provided |
Parameter forced | Type boolean | Description No description provided |
setSprinting
Set sprinting switch for Entity.
Parameter | Type | Description |
---|---|---|
Parameter sprinting | Type boolean | Description No description provided |
setSwimming
Parameter | Type | Description |
---|---|---|
Parameter p_204711_1_ | Type boolean | Description No description provided |
setVelocity
Updates the entity motion clientside, called by packets from the server
Parameter | Type | Description |
---|---|---|
Parameter x | Type double | Description No description provided |
Parameter y | Type double | Description No description provided |
Parameter z | Type double | Description No description provided |
shouldHeal
Checks if the player’s health is not full and not zero.
Returns boolean
shouldReceiveErrors
Returns boolean
shouldReceiveFeedback
Returns boolean
shouldRenderSneaking
Returns boolean
shouldRiderFaceForward
Returns true if the entity’s rider (EntityPlayer) should face forward when mounted. currently only used in vanilla code by pigs.
Returns boolean
Parameter | Type | Description |
---|---|---|
Parameter player | Type crafttweaker.api.entity.player.MCPlayerEntity | Description The player who is riding the entity. |
shouldRiderSit
Returns boolean
spawnRunningParticles
Attempts to create sprinting particles if the entity is sprinting and not in water.
spawnSweepParticles
startSleeping
Parameter | Type | Description |
---|---|---|
Parameter p_213342_1_ | Type crafttweaker.api.util.BlockPos | Description No description provided |
startSpinAttack
Parameter | Type | Description |
---|---|---|
Parameter p_204803_1_ | Type int | Description No description provided |
stopActiveHand
stopRiding
Dismounts this entity from the entity it is riding.
teleportKeepLoaded
Parameter | Type | Description |
---|---|---|
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 |
tick
Called to update the entity’s position/logic.
toString
Returns String
updateRidden
Handles updating while riding another entity
updateSwimming
wakeUp
wakeUpPlayer
Wake up the player if they’re sleeping.
Parameter | Type | Description |
---|---|---|
Parameter immediately | Type boolean | Description No description provided |
Parameter updateWorldFlag | Type boolean | Description No description provided |
Parameter setSpawn | Type boolean | Description No description provided |
xpBarCap
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