Package net.minecraft.client.network
Class ClientPlayerEntity
java.lang.Object
net.minecraft.entity.Entity
net.minecraft.entity.LivingEntity
net.minecraft.entity.player.PlayerEntity
net.minecraft.client.network.AbstractClientPlayerEntity
net.minecraft.client.network.ClientPlayerEntity
- All Implemented Interfaces:
class_5568
,CommandOutput
,Nameable
@Environment(CLIENT) public class ClientPlayerEntity extends AbstractClientPlayerEntity
Represents the client's own player entity.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.entity.player.PlayerEntity
PlayerEntity.SleepFailureReason
Nested classes/interfaces inherited from class net.minecraft.entity.Entity
Entity.PositionUpdater, Entity.RemovalReason
-
Field Summary
Fields inherited from class net.minecraft.client.network.AbstractClientPlayerEntity
clientWorld, elytraPitch, elytraRoll, elytraYaw
Fields inherited from class net.minecraft.entity.player.PlayerEntity
abilityResyncCountdown, capeX, capeY, capeZ, currentScreenHandler, enchantmentTableSeed, enderChestInventory, experienceLevel, experiencePickUpDelay, experienceProgress, field_7509, fishHook, hungerManager, isSubmergedInWater, LEFT_SHOULDER_ENTITY, MAIN_ARM, PLAYER_MODEL_PARTS, playerScreenHandler, prevCapeX, prevCapeY, prevCapeZ, prevStrideDistance, RIGHT_SHOULDER_ENTITY, STANDING_DIMENSIONS, strideDistance, totalExperience
Fields inherited from class net.minecraft.entity.LivingEntity
activeItemStack, attackingPlayer, bodyTrackingIncrements, bodyYaw, brain, dead, deathTime, defaultMaxHealth, despawnCounter, field_6215, flyingSpeed, forwardSpeed, handSwinging, handSwingProgress, handSwingTicks, headTrackingIncrements, headYaw, hurtTime, itemUseTimeLeft, jumping, knockbackVelocity, lastAttackedTicks, lastDamageTaken, lastHandSwingProgress, lastLimbDistance, limbAngle, limbDistance, LIVING_FLAGS, lookDirection, maxHurtTime, playerHitTimer, preferredHand, prevBodyYaw, prevHeadYaw, prevLookDirection, prevStepBobbingAmount, randomLargeSeed, randomSmallSeed, riptideTicks, roll, scoreAmount, serverHeadYaw, serverPitch, serverX, serverY, serverYaw, serverZ, sidewaysSpeed, SLEEPING_DIMENSIONS, stepBobbingAmount, stuckArrowTimer, stuckStingerTimer, upwardSpeed
Fields inherited from class net.minecraft.entity.Entity
age, dataTracker, distanceTraveled, fallDistance, field_25599, firstUpdate, FLAGS, fluidHeight, glowing, horizontalCollision, horizontalSpeed, ignoreCameraFrustum, inanimate, inNetherPortal, inPowderSnow, lastNetherPortalPosition, lastRenderX, lastRenderY, lastRenderZ, LOGGER, movementMultiplier, netherPortalTime, noClip, onGround, pitch, POSE, prevHorizontalSpeed, prevPitch, prevX, prevY, prevYaw, prevZ, pushSpeedReduction, random, ridingCooldown, stepHeight, submergedInWater, timeUntilRegen, touchingWater, uuid, uuidString, velocityDirty, velocityModified, verticalCollision, world, yaw
Fields inherited from interface net.minecraft.server.command.CommandOutput
DUMMY
-
Constructor Summary
Constructors Constructor Description ClientPlayerEntity(MinecraftClient client, ClientWorld world, ClientPlayNetworkHandler networkHandler, StatHandler stats, ClientRecipeBook recipeBook, boolean lastSneaking, boolean lastSprinting)
-
Method Summary
Modifier and Type Method Description void
addCritParticles(Entity target)
void
addEnchantedHitParticles(Entity target)
protected void
applyDamage(DamageSource source, float amount)
protected void
autoJump(float dx, float dz)
boolean
canMoveVoluntarily()
void
clearActiveItem()
void
closeHandledScreen()
void
closeScreen()
boolean
damage(DamageSource source, float amount)
void
dismountVehicle()
Dismounts the vehicle if present.boolean
dropSelectedItem(boolean dropEntireStack)
Hand
getActiveHand()
float
getMoodPercentage()
Returns the percentage for the biome mood sound for the debug HUD to display.protected int
getPermissionLevel()
float
getPitch(float tickDelta)
ClientRecipeBook
getRecipeBook()
String
getServerBrand()
StatHandler
getStatHandler()
float
getUnderwaterVisibility()
Returns the color multiplier of vision in water, so that visibility in water is reduced when the player just entered water.float
getYaw(float tickDelta)
void
handleStatus(byte status)
boolean
hasJumpingMount()
private boolean
hasMovementInput()
Returns whether the player has movement input.void
heal(float amount)
boolean
isAutoJumpEnabled()
protected boolean
isCamera()
boolean
isHoldingOntoLadder()
boolean
isInSneakingPose()
Returns whether the entity is in a crouching pose.boolean
isMainPlayer()
boolean
isRiding()
boolean
isSneaking()
boolean
isSubmergedInWater()
Returns whether this entity's hitbox is fully submerged in water.boolean
isUsingItem()
private boolean
isWalking()
Vec3d
method_30951(float float2)
float
method_3151()
void
move(MovementType type, Vec3d movement)
void
onRecipeDisplayed(Recipe<?> recipe)
void
onTrackedDataSet(TrackedData<?> data)
void
openCommandBlockMinecartScreen(CommandBlockExecutor commandBlockExecutor)
void
openCommandBlockScreen(CommandBlockBlockEntity commandBlock)
void
openEditBookScreen(ItemStack book, Hand hand)
void
openEditSignScreen(SignBlockEntity sign)
void
openJigsawScreen(JigsawBlockEntity jigsaw)
void
openRidingInventory()
void
openStructureBlockScreen(StructureBlockBlockEntity structureBlock)
void
playSound(SoundEvent sound, float volume, float pitch)
void
playSound(SoundEvent event, SoundCategory category, float volume, float pitch)
private void
pushOutOfBlocks(double x, double double2)
StatusEffectInstance
removeStatusEffectInternal(StatusEffect type)
Removes a status effect from this entity without calling any listener.void
requestRespawn()
void
sendAbilitiesUpdate()
void
sendChatMessage(String message)
void
sendMessage(Text message, boolean actionBar)
private void
sendMovementPackets()
void
sendSystemMessage(Text message, UUID senderUuid)
void
setClientPermissionLevel(int clientPermissionLevel)
void
setCurrentHand(Hand hand)
void
setExperience(float progress, int total, int level)
void
setServerBrand(String serverBrand)
void
setShowsDeathScreen(boolean shouldShow)
void
setSprinting(boolean sprinting)
private boolean
shouldAutoJump()
boolean
shouldDisplaySoulSpeedEffects()
boolean
shouldSlowDown()
boolean
shouldSpawnSprintingParticles()
boolean
showsDeathScreen()
boolean
startRiding(Entity entity, boolean force)
protected void
startRidingJump()
void
swingHand(Hand hand)
void
tick()
void
tickMovement()
void
tickNewAi()
void
tickRiding()
void
updateHealth(float health)
private void
updateNausea()
protected boolean
updateWaterSubmersionState()
private boolean
wouldCollideAt(BlockPos pos)
Methods inherited from class net.minecraft.client.network.AbstractClientPlayerEntity
canRenderCapeTexture, canRenderElytraTexture, getCapeTexture, getElytraTexture, getModel, getPlayerListEntry, getSkinId, getSkinTexture, getSpeed, hasSkinTexture, isCreative, isSpectator, loadSkin
Methods inherited from class net.minecraft.entity.player.PlayerEntity
addExhaustion, addExperience, addExperienceLevels, addScore, addShoulderEntity, adjustMovementForSneaking, afterSpawn, applyEnchantmentCosts, attack, attackLivingEntity, canClimb, canConsume, canEquip, canFly, canFoodHeal, canHarvest, canModifyBlocks, canPlaceOn, checkFallFlying, clipAtLedge, createCooldownManager, createPlayerAttributes, damageArmor, damageShield, disableShield, doesNotSuffocate, dropInventory, dropItem, dropItem, dropShoulderEntities, eatFood, equipStack, findRespawnPosition, getAbilities, getAbsorptionAmount, getActiveEyeHeight, getArmorItems, getArrowType, getAttackCooldownProgress, getAttackCooldownProgressPerTick, getBlockBreakingSpeed, getBurningDuration, getCurrentExperience, getDeathSound, getDefaultNetherPortalCooldown, getDimensions, getDisplayName, getEnchantmentTableSeed, getEnderChestInventory, getEntityName, getEquippedStack, getFallSound, getGameProfile, getHeightOffset, getHighSpeedSplashSound, getHungerManager, getHurtSound, getInventory, getItemCooldownManager, getItemsHand, getLuck, getMainArm, getMaxNetherPortalTime, getMovementSpeed, getName, getNextLevelExperience, getOfflinePlayerUuid, getPoses, getScore, getScoreboard, getShoulderEntityLeft, getShoulderEntityRight, getSleepTimer, getSoundCategory, getSplashSound, getSwimSound, getUuidFromProfile, getVelocityMultiplier, giveItemStack, handleFallDamage, hasReducedDebugInfo, increaseStat, increaseStat, increaseTravelMotionStats, incrementStat, incrementStat, initDataTracker, interact, isBlockBreakingRestricted, isCreativeLevelTwoOp, isImmobile, isInvulnerableTo, isOnSoulSpeedBlock, isPartVisible, isPlayer, isSleepingLongEnough, isSwimming, isUsingSpyglass, jump, lockRecipes, method_29500, method_32318, method_33190, onDeath, onKilledOther, onSwimmingStart, openHandledScreen, openHorseInventory, readCustomDataFromTag, remove, resetLastAttackedTicks, resetStat, sendTradeOffers, setAbsorptionAmount, setFireTicks, setMainArm, setReducedDebugInfo, setScore, setShoulderEntityLeft, setShoulderEntityRight, shouldAlwaysDropXp, shouldCancelInteraction, shouldDamagePlayer, shouldDismount, shouldRenderName, shouldSwimInFluids, slowMovement, spawnSweepAttackParticles, startFallFlying, stopFallFlying, takeShieldHit, travel, trySleep, unlockRecipes, unlockRecipes, updateSize, updateSwimming, vanishCursedItems, wakeUp, wakeUp, writeCustomDataToTag
Methods inherited from class net.minecraft.entity.LivingEntity
addSoulSpeedBoostIfNeeded, addStatusEffect, animateDamage, applyArmorToDamage, applyEnchantmentsToDamage, applyMovementEffects, applyStatusEffect, baseTick, canBeRiddenInWater, canBreatheInWater, canDropLootAndXp, canFreeze, canHaveStatusEffect, canSee, canTarget, canTarget, canWalkOnFluid, clearPotionSwirls, clearSleepingPosition, clearStatusEffects, collides, computeFallDamage, consumeItem, containsOnlyAmbientEffects, createBrainProfile, createLivingAttributes, createSpawnPacket, deserializeBrain, destroy, displaySoulSpeedEffects, drop, dropEquipment, dropLoot, dropXp, endCombat, enterCombat, fall, getActiveItem, getActiveStatusEffects, getArmor, getArmorVisibility, getAttackDistanceScalingFactor, getAttacker, getAttacking, getAttributeBaseValue, getAttributeInstance, getAttributes, getAttributeValue, getBaseMovementSpeedMultiplier, getBlockState, getBoundingBox, getBrain, getClimbingPos, getDamageTracker, getDespawnCounter, getDrinkSound, getEatSound, getEyeHeight, getGroup, getHandSwingProgress, getHeadYaw, getHealth, getItemUseTime, getItemUseTimeLeft, getJumpVelocity, getLastAttackedTime, getLastAttackTime, getLeaningPitch, getLootContextBuilder, getLootTable, getMainHandStack, getMaxHealth, getNextAirOnLand, getNextAirUnderwater, getOffHandStack, getPrimeAdversary, getRandom, getRecentDamageSource, getRoll, getScaleFactor, getSleepingDirection, getSleepingPosition, getSoundPitch, getSoundVolume, getStackInHand, getStatusEffect, getStatusEffects, getStingerCount, getStuckArrowCount, getVisibilityBoundingBox, hasStackEquipped, hasStatusEffect, hurtByWater, isAffectedBySplashPotions, isAlive, isBaby, isBlocking, isClimbing, isDead, isFallFlying, isHolding, isHolding, isInsideWall, isInSwimmingPose, isMobOrPlayer, isPushable, isSleeping, isTarget, isUndead, isUsingRiptide, kill, knockback, knockDownwards, lookAt, markEffectsDirty, method_26317, method_26318, method_29242, method_30633, method_31079, method_32324, method_32325, method_32326, onAttacking, onEquipStack, onKilledBy, onStatusEffectApplied, onStatusEffectRemoved, onStatusEffectUpgraded, playBlockFallSound, playHurtSound, pushAway, pushAwayFrom, removeSoulSpeedBoost, removeStatusEffect, scheduleVelocityUpdate, sendEquipmentBreakStatus, sendPickup, sendToolBreakStatus, setAttacker, setAttacking, setDespawnCounter, setHeadYaw, setHealth, setJumping, setLivingFlag, setMovementSpeed, setNearbySongPlaying, setOnGround, setRiptideTicks, setSleepingPosition, setStackInHand, setStingerCount, setStuckArrowCount, setYaw, shouldDropLoot, sleep, spawnConsumptionEffects, stopRiding, stopUsingItem, swimUpward, swingHand, takeKnockback, teleport, tickCramming, tickHandSwing, tickRiptide, tickStatusEffects, triggerItemPickedUpByEntityCriteria, tryAttack, turnHead, updatePostDeath, updatePotionVisibility, updateTrackedHeadRotation, updateTrackedPositionAndAngles
Methods inherited from class net.minecraft.entity.Entity
addPassenger, addScoreboardTag, addVelocity, adjustMovementForCollisions, adjustMovementForCollisions, adjustMovementForPiston, adjustSingleAxisMovementForCollisions, applyMirror, applyRotation, bypassesLandingEffects, bypassesSteppingEffects, calculateBoundsForPose, calculateDimensions, calculateNextStepSoundDistance, canAddPassenger, canAvoidTraps, canBeSpectated, canExplosionDestroyBlock, canStartRiding, canUsePortals, changeLookDirection, checkBlockCollision, checkDespawn, collidesWith, copyFrom, copyPositionAndRotation, dealDamage, detach, discard, distanceTo, doesNotCollide, doesRenderOnFire, dropItem, dropItem, dropStack, dropStack, emitGameEvent, entityDataRequiresOperator, equals, extinguish, fromTag, getAir, getBlockPos, getBlockX, getBlockY, getBlockZ, getBodyY, getBoundingBox, getBrightnessAtEyes, getCameraPosVec, getChunkPos, getCommandSource, getCustomName, getDataTracker, getDefaultName, getEffectiveExplosionResistance, getEntityId, getEntityWorld, getEyeHeight, getEyeY, getFireTicks, getFirstPassenger, getFlag, getFluidHeight, getFreezingScale, getFrozenTicks, getHeight, getHorizontalFacing, getHoverEvent, getItemsEquipped, getJumpVelocityMultiplier, getLandingBlockState, getLandingPos, getMaxAir, getMinFreezeDamageTicks, getMountedHeightOffset, getMovementDirection, getOppositeRotationVector, getOppositeRotationVector, getParticleX, getParticleZ, getPassengerDismountOffset, getPassengerList, getPassengersDeep, getPickBlockStack, getPistonBehavior, getPos, getPose, getPrimaryPassenger, getRandomBodyY, getRenderDistanceMultiplier, getRootVehicle, getRotationClient, getRotationVec, getRotationVecClient, getRotationVector, getRotationVector, getSafeFallDistance, getSavedEntityId, getScoreboardTags, getScoreboardTeam, getServer, getStandingEyeHeight, getTargetingMargin, getTeamColorValue, getTeleportTarget, getTrackedPosition, getType, getUuid, getUuidAsString, getVehicle, getVelocity, getVelocityAffectingPos, getWidth, getX, getY, getZ, handleAttack, hasCustomName, hashCode, hasNetherPortalCooldown, hasNoGravity, hasPassenger, hasPassengerDeep, hasPassengers, hasPassengerType, hasPermissionLevel, hasPlayerRider, hasVehicle, hasWings, interact, interactAt, isAttackable, isCollidable, isConnectedThroughVehicle, isCustomNameVisible, isDescending, isFireImmune, isFreezing, isGlowing, isImmuneToExplosion, isInLava, isInRange, isInsideWaterOrBubbleColumn, isInvisible, isInvisibleTo, isInvulnerable, isLiving, isLogicalSideForUpdatingMovement, isOnFire, isOnGround, isPartOf, isRemoved, isSilent, isSneaky, isSprinting, isSubmergedIn, isTeammate, isTeamPlayer, isTouchingWater, isTouchingWaterOrRain, isWet, method_29241, method_29919, method_30076, method_30330, method_30632, method_30634, method_30950, method_31166, method_31473, method_31744, method_31746, method_31748, method_32875, method_32877, method_33189, moveToBoundingBoxCenter, moveToWorld, offsetX, offsetZ, onBlockCollision, onBubbleColumnCollision, onBubbleColumnSurfaceCollision, onPassengerLookAround, onPlayerCollision, onSpawnPacket, onStartedTrackingBy, onStoppedTrackingBy, onStruckByLightning, playFlySound, playStepSound, playSwimSound, populateCrashReport, pushOutOfBlocks, raycast, refreshPosition, refreshPositionAfterTeleport, refreshPositionAfterTeleport, refreshPositionAndAngles, refreshPositionAndAngles, removeAllPassengers, removePassenger, removeScoreboardTag, requestTeleport, resetNetherPortalCooldown, resetPosition, saveSelfToTag, saveToTag, setAir, setBoundingBox, setCustomName, setCustomNameVisible, setEntityId, setFlag, setFrozenTicks, setGlowing, setInNetherPortal, setInPowderSnow, setInvisible, setInvulnerable, setNoGravity, setOnFireFor, setOnFireFromLava, setPos, setPose, setRemoved, setRenderDistanceMultiplier, setRotation, setSilent, setSneaking, setSwimming, setUuid, setVelocity, setVelocity, setVelocityClient, shouldBroadcastConsoleToOps, shouldLeaveSwimmingPose, shouldReceiveFeedback, shouldRender, shouldRender, shouldSetPositionOnLoad, shouldTrackOutput, spawnSprintingParticles, squaredDistanceTo, squaredDistanceTo, squaredDistanceTo, squaredHorizontalLength, startRiding, streamPassengersRecursively, teleport, tickNetherPortal, tickNetherPortalCooldown, toListTag, toListTag, toString, toTag, unsetRemoved, updateKilledAdvancementCriterion, updateMovementInFluid, updatePassengerForDismount, updatePassengerPosition, updatePosition, updatePositionAndAngles, updateTrackedPosition, updateTrackedPosition, updateVelocity, updateWaterState, wouldPoseNotCollide
-
Field Details
-
networkHandler
-
statHandler
-
recipeBook
-
tickables
-
clientPermissionLevel
private int clientPermissionLevel -
lastX
private double lastX -
lastBaseY
private double lastBaseY -
lastZ
private double lastZ -
lastYaw
private float lastYaw -
lastPitch
private float lastPitch -
lastOnGround
private boolean lastOnGround -
inSneakingPose
private boolean inSneakingPose -
lastSneaking
private boolean lastSneaking -
lastSprinting
private boolean lastSprinting -
ticksSinceLastPositionPacketSent
private int ticksSinceLastPositionPacketSent -
healthInitialized
private boolean healthInitialized -
serverBrand
-
input
-
client
-
ticksLeftToDoubleTapSprint
protected int ticksLeftToDoubleTapSprint -
ticksSinceSprintingChanged
public int ticksSinceSprintingChanged -
renderYaw
public float renderYaw -
renderPitch
public float renderPitch -
lastRenderYaw
public float lastRenderYaw -
lastRenderPitch
public float lastRenderPitch -
field_3938
private int field_3938 -
field_3922
private float field_3922 -
nextNauseaStrength
public float nextNauseaStrength -
lastNauseaStrength
public float lastNauseaStrength -
usingItem
private boolean usingItem -
activeHand
-
riding
private boolean riding -
autoJumpEnabled
private boolean autoJumpEnabled -
ticksToNextAutojump
private int ticksToNextAutojump -
falling
private boolean falling -
underwaterVisibilityTicks
private int underwaterVisibilityTicks -
showsDeathScreen
private boolean showsDeathScreen
-
-
Constructor Details
-
ClientPlayerEntity
public ClientPlayerEntity(MinecraftClient client, ClientWorld world, ClientPlayNetworkHandler networkHandler, StatHandler stats, ClientRecipeBook recipeBook, boolean lastSneaking, boolean lastSprinting)
-
-
Method Details
-
damage
- Overrides:
damage
in classPlayerEntity
-
heal
public void heal(float amount)- Overrides:
heal
in classLivingEntity
-
startRiding
- Overrides:
startRiding
in classEntity
-
dismountVehicle
public void dismountVehicle()Dismounts the vehicle if present.For players, will not trigger any networking changes. Use
LivingEntity.stopRiding()
instead.- Overrides:
dismountVehicle
in classPlayerEntity
- See Also:
LivingEntity.stopRiding()
-
getPitch
public float getPitch(float tickDelta) -
getYaw
public float getYaw(float tickDelta)- Overrides:
getYaw
in classLivingEntity
-
tick
public void tick()- Overrides:
tick
in classPlayerEntity
-
getMoodPercentage
public float getMoodPercentage()Returns the percentage for the biome mood sound for the debug HUD to display. -
sendMovementPackets
private void sendMovementPackets() -
dropSelectedItem
public boolean dropSelectedItem(boolean dropEntireStack)- Overrides:
dropSelectedItem
in classPlayerEntity
-
sendChatMessage
-
swingHand
- Overrides:
swingHand
in classLivingEntity
-
requestRespawn
public void requestRespawn()- Overrides:
requestRespawn
in classPlayerEntity
-
applyDamage
- Overrides:
applyDamage
in classPlayerEntity
-
closeHandledScreen
public void closeHandledScreen()- Overrides:
closeHandledScreen
in classPlayerEntity
-
closeScreen
public void closeScreen() -
updateHealth
public void updateHealth(float health) -
sendAbilitiesUpdate
public void sendAbilitiesUpdate()- Overrides:
sendAbilitiesUpdate
in classPlayerEntity
-
isMainPlayer
public boolean isMainPlayer()- Overrides:
isMainPlayer
in classPlayerEntity
-
isHoldingOntoLadder
public boolean isHoldingOntoLadder()- Overrides:
isHoldingOntoLadder
in classLivingEntity
- Returns:
true
if this entity should not lose height while in a climbing state- See Also:
LivingEntity
-
shouldSpawnSprintingParticles
public boolean shouldSpawnSprintingParticles()- Overrides:
shouldSpawnSprintingParticles
in classEntity
-
shouldDisplaySoulSpeedEffects
public boolean shouldDisplaySoulSpeedEffects()- Overrides:
shouldDisplaySoulSpeedEffects
in classLivingEntity
-
startRidingJump
protected void startRidingJump() -
openRidingInventory
public void openRidingInventory() -
setServerBrand
-
getServerBrand
-
getStatHandler
-
getRecipeBook
-
onRecipeDisplayed
-
getPermissionLevel
protected int getPermissionLevel()- Overrides:
getPermissionLevel
in classEntity
-
setClientPermissionLevel
public void setClientPermissionLevel(int clientPermissionLevel) -
sendMessage
- Overrides:
sendMessage
in classPlayerEntity
-
pushOutOfBlocks
private void pushOutOfBlocks(double x, double double2) -
wouldCollideAt
-
setSprinting
public void setSprinting(boolean sprinting)- Overrides:
setSprinting
in classLivingEntity
-
setExperience
public void setExperience(float progress, int total, int level) -
sendSystemMessage
- Specified by:
sendSystemMessage
in interfaceCommandOutput
- Overrides:
sendSystemMessage
in classEntity
-
handleStatus
public void handleStatus(byte status)- Overrides:
handleStatus
in classPlayerEntity
-
setShowsDeathScreen
public void setShowsDeathScreen(boolean shouldShow) -
showsDeathScreen
public boolean showsDeathScreen() -
playSound
- Overrides:
playSound
in classPlayerEntity
-
playSound
- Overrides:
playSound
in classPlayerEntity
-
canMoveVoluntarily
public boolean canMoveVoluntarily()- Overrides:
canMoveVoluntarily
in classLivingEntity
-
setCurrentHand
- Overrides:
setCurrentHand
in classLivingEntity
-
isUsingItem
public boolean isUsingItem()- Overrides:
isUsingItem
in classLivingEntity
-
clearActiveItem
public void clearActiveItem()- Overrides:
clearActiveItem
in classLivingEntity
-
getActiveHand
- Overrides:
getActiveHand
in classLivingEntity
-
onTrackedDataSet
- Overrides:
onTrackedDataSet
in classLivingEntity
-
hasJumpingMount
public boolean hasJumpingMount() -
method_3151
public float method_3151() -
openEditSignScreen
- Overrides:
openEditSignScreen
in classPlayerEntity
-
openCommandBlockMinecartScreen
- Overrides:
openCommandBlockMinecartScreen
in classPlayerEntity
-
openCommandBlockScreen
- Overrides:
openCommandBlockScreen
in classPlayerEntity
-
openStructureBlockScreen
- Overrides:
openStructureBlockScreen
in classPlayerEntity
-
openJigsawScreen
- Overrides:
openJigsawScreen
in classPlayerEntity
-
openEditBookScreen
- Overrides:
openEditBookScreen
in classPlayerEntity
-
addCritParticles
- Overrides:
addCritParticles
in classPlayerEntity
-
addEnchantedHitParticles
- Overrides:
addEnchantedHitParticles
in classPlayerEntity
-
isSneaking
public boolean isSneaking()- Overrides:
isSneaking
in classEntity
-
isInSneakingPose
public boolean isInSneakingPose()Returns whether the entity is in a crouching pose.Compared to
isSneaking()
, it only makes the entity appear crouching and does not bring other effects of sneaking, such as no less obvious name label rendering, no dismounting while riding, etc.This is used by vanilla for non-player entities to crouch, such as for foxes and cats.
- Overrides:
isInSneakingPose
in classEntity
-
shouldSlowDown
public boolean shouldSlowDown() -
tickNewAi
public void tickNewAi()- Overrides:
tickNewAi
in classPlayerEntity
-
isCamera
protected boolean isCamera() -
tickMovement
public void tickMovement()- Overrides:
tickMovement
in classPlayerEntity
-
updateNausea
private void updateNausea() -
tickRiding
public void tickRiding()- Overrides:
tickRiding
in classPlayerEntity
-
isRiding
public boolean isRiding() -
removeStatusEffectInternal
Removes a status effect from this entity without calling any listener.This method does not perform any cleanup or synchronization operation. Under most circumstances, calling
LivingEntity.removeStatusEffect(net.minecraft.entity.effect.StatusEffect)
is highly preferable.- Overrides:
removeStatusEffectInternal
in classLivingEntity
-
move
-
isAutoJumpEnabled
public boolean isAutoJumpEnabled() -
autoJump
protected void autoJump(float dx, float dz) -
shouldAutoJump
private boolean shouldAutoJump() -
hasMovementInput
private boolean hasMovementInput()Returns whether the player has movement input.- Returns:
- True if the player has movement input, else false.
-
isWalking
private boolean isWalking() -
getUnderwaterVisibility
public float getUnderwaterVisibility()Returns the color multiplier of vision in water, so that visibility in water is reduced when the player just entered water. -
isSubmergedInWater
public boolean isSubmergedInWater()Returns whether this entity's hitbox is fully submerged in water.- Overrides:
isSubmergedInWater
in classEntity
-
updateWaterSubmersionState
protected boolean updateWaterSubmersionState()- Overrides:
updateWaterSubmersionState
in classPlayerEntity
-
method_30951
- Overrides:
method_30951
in classPlayerEntity
-