Package net.minecraft.entity.player
Class PlayerEntity
- java.lang.Object
-
- net.minecraftforge.common.capabilities.CapabilityProvider<Entity>
-
- net.minecraft.entity.Entity
-
- net.minecraft.entity.LivingEntity
-
- net.minecraft.entity.player.PlayerEntity
-
- All Implemented Interfaces:
ICommandSource
,INameable
,ICapabilityProvider
,ICapabilitySerializable<CompoundNBT>
,IForgeEntity
,INBTSerializable<CompoundNBT>
- Direct Known Subclasses:
AbstractClientPlayerEntity
,ServerPlayerEntity
public abstract class PlayerEntity extends LivingEntity
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PlayerEntity.SleepResult
-
Nested classes/interfaces inherited from class net.minecraft.entity.Entity
Entity.IMoveCallback
-
-
Field Summary
-
Fields inherited from class net.minecraft.entity.LivingEntity
animationPosition, animationSpeed, animationSpeedOld, animStep, animStepO, attackAnim, attackStrengthTicker, autoSpinAttackTicks, brain, DATA_LIVING_ENTITY_FLAGS, dead, deathScore, deathTime, fallFlyTicks, flyingSpeed, hurtDir, hurtDuration, hurtTime, invulnerableDuration, jumping, lastHurt, lastHurtByPlayer, lastHurtByPlayerTime, lerpHeadSteps, lerpSteps, lerpX, lerpXRot, lerpY, lerpYRot, lerpZ, lyHeadRot, noActionTime, oAttackAnim, oRun, removeArrowTime, removeStingerTime, rotA, rotOffs, run, SLEEPING_DIMENSIONS, swinging, swingingArm, swingTime, timeOffs, useItem, useItemRemaining, xxa, yBodyRot, yBodyRotO, yHeadRot, yHeadRotO, yya, zza
-
Fields inherited from class net.minecraft.entity.Entity
blocksBuilding, boardingCooldown, DATA_POSE, DATA_SHARED_FLAGS_ID, ENTITY_COUNTER, entityData, fallDistance, firstTick, fluidHeight, fluidOnEyes, forcedLoading, glowing, hasImpulse, horizontalCollision, hurtMarked, inChunk, invulnerableTime, isInsidePortal, level, LOGGER, maxUpStep, moveDist, noCulling, noPhysics, onGround, portalEntrancePos, portalTime, pushthrough, random, removed, stringUUID, stuckSpeedMultiplier, tickCount, uuid, verticalCollision, walkDist, walkDistO, wasEyeInWater, wasTouchingWater, xChunk, xo, xOld, xRot, xRotO, yChunk, yo, yOld, yRot, yRotO, zChunk, zo, zOld
-
Fields inherited from interface net.minecraft.command.ICommandSource
NULL
-
-
Constructor Summary
Constructors Constructor Description PlayerEntity(World p_i241920_1_, BlockPos p_i241920_2_, float p_i241920_3_, com.mojang.authlib.GameProfile p_i241920_4_)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected void
actuallyHurt(DamageSource p_70665_1_, float p_70665_2_)
void
addAdditionalSaveData(CompoundNBT p_213281_1_)
boolean
addItem(ItemStack p_191521_1_)
private void
addParticlesAroundSelf(IParticleData p_213824_1_)
void
aiStep()
void
attack(Entity p_71059_1_)
int
awardRecipes(java.util.Collection<IRecipe<?>> p_195065_1_)
void
awardRecipesByKey(ResourceLocation[] p_193102_1_)
void
awardStat(Stat<?> p_71029_1_)
void
awardStat(Stat<?> p_71064_1_, int p_71064_2_)
void
awardStat(ResourceLocation p_195066_1_)
void
awardStat(ResourceLocation p_195067_1_, int p_195067_2_)
boolean
blockActionRestricted(World p_223729_1_, BlockPos p_223729_2_, GameType p_223729_3_)
protected void
blockUsingShield(LivingEntity p_190629_1_)
boolean
canEat(boolean p_71043_1_)
boolean
canHarmPlayer(PlayerEntity p_96122_1_)
boolean
canTakeItem(ItemStack p_213365_1_)
boolean
canUseGameMasterBlocks()
boolean
causeFallDamage(float p_225503_1_, float p_225503_2_)
void
causeFoodExhaustion(float p_71020_1_)
void
checkMovementStatistics(double p_71000_1_, double p_71000_3_, double p_71000_5_)
private void
checkRidingStatistics(double p_71015_1_, double p_71015_3_, double p_71015_5_)
void
closeContainer()
static AttributeModifierMap.MutableAttribute
createAttributes()
protected CooldownTracker
createItemCooldowns()
static java.util.UUID
createPlayerUUID(com.mojang.authlib.GameProfile p_146094_0_)
static java.util.UUID
createPlayerUUID(java.lang.String p_175147_0_)
void
crit(Entity p_71009_1_)
private IFormattableTextComponent
decorateDisplayNameComponent(IFormattableTextComponent p_208016_1_)
protected void
defineSynchedData()
protected void
destroyVanishingCursedItems()
void
die(DamageSource p_70645_1_)
void
disableShield(boolean p_190777_1_)
void
displayClientMessage(ITextComponent p_146105_1_, boolean p_146105_2_)
protected void
doAutoAttackOnTouch(LivingEntity p_204804_1_)
protected void
doWaterSplashEffect()
boolean
drop(boolean p_225609_1_)
ItemEntity
drop(ItemStack p_71019_1_, boolean p_71019_2_)
ItemEntity
drop(ItemStack p_146097_1_, boolean p_146097_2_, boolean p_146097_3_)
protected void
dropEquipment()
ItemStack
eat(World p_213357_1_, ItemStack p_213357_2_)
static java.util.Optional<Vector3d>
findRespawnPositionAndUseSpawnBlock(ServerWorld p_242374_0_, BlockPos p_242374_1_, float p_242374_2_, boolean p_242374_3_, boolean p_242374_4_)
protected boolean
freeAt(BlockPos p_207401_1_)
float
getAbsorptionAmount()
java.lang.Iterable<ItemStack>
getArmorSlots()
float
getAttackStrengthScale(float p_184825_1_)
protected float
getBlockSpeedFactor()
<T> LazyOptional<T>
getCapability(Capability<T> capability, Direction facing)
Retrieves the Optional handler for the capability requested on the specific side.CooldownTracker
getCooldowns()
float
getCurrentItemAttackStrengthDelay()
protected SoundEvent
getDeathSound()
float
getDestroySpeed(BlockState p_184813_1_)
Deprecated.float
getDigSpeed(BlockState p_184813_1_, BlockPos pos)
int
getDimensionChangingDelay()
EntitySize
getDimensions(Pose p_213305_1_)
com.google.common.collect.ImmutableList<Pose>
getDismountPoses()
ITextComponent
getDisplayName()
int
getEnchantmentSeed()
EnderChestInventory
getEnderChestInventory()
protected int
getExperienceReward(PlayerEntity p_70693_1_)
protected SoundEvent
getFallDamageSound(int p_184588_1_)
protected int
getFireImmuneTicks()
FoodStats
getFoodData()
Pose
getForcedPose()
com.mojang.authlib.GameProfile
getGameProfile()
java.lang.Iterable<ItemStack>
getHandSlots()
protected SoundEvent
getHurtSound(DamageSource p_184601_1_)
ItemStack
getItemBySlot(EquipmentSlotType p_184582_1_)
float
getLuck()
HandSide
getMainArm()
double
getMyRidingOffset()
ITextComponent
getName()
int
getPortalWaitTime()
java.util.Collection<IFormattableTextComponent>
getPrefixes()
ItemStack
getProjectile(ItemStack p_213356_1_)
Vector3d
getRopeHoldPosition(float p_241843_1_)
int
getScore()
Scoreboard
getScoreboard()
java.lang.String
getScoreboardName()
CompoundNBT
getShoulderEntityLeft()
CompoundNBT
getShoulderEntityRight()
int
getSleepTimer()
SoundCategory
getSoundSource()
float
getSpeed()
float
getStandingEyeHeight(Pose p_213348_1_, EntitySize p_213348_2_)
java.util.Collection<IFormattableTextComponent>
getSuffixes()
protected SoundEvent
getSwimHighSpeedSplashSound()
protected SoundEvent
getSwimSound()
protected SoundEvent
getSwimSplashSound()
int
getXpNeededForNextLevel()
void
giveExperienceLevels(int p_82242_1_)
void
giveExperiencePoints(int p_195068_1_)
void
handleEntityEvent(byte p_70103_1_)
boolean
hasCorrectToolForDrops(BlockState p_234569_1_)
boolean
hurt(DamageSource p_70097_1_, float p_70097_2_)
protected void
hurtArmor(DamageSource p_230294_1_, float p_230294_2_)
protected void
hurtCurrentlyUsedShield(float p_184590_1_)
void
increaseScore(int p_85039_1_)
ActionResultType
interactOn(Entity p_190775_1_, Hand p_190775_2_)
private boolean
isAboveGround()
boolean
isAffectedByFluids()
protected boolean
isAlwaysExperienceDropper()
abstract boolean
isCreative()
boolean
isHurt()
protected boolean
isImmobile()
boolean
isInvulnerableTo(DamageSource p_180431_1_)
boolean
isLocalPlayer()
boolean
isModelPartShown(PlayerModelPart p_175148_1_)
protected boolean
isMovementNoisy()
boolean
isPushedByFluid()
boolean
isReducedDebugInfo()
boolean
isSecondaryUseActive()
boolean
isSleepingLongEnough()
abstract boolean
isSpectator()
protected boolean
isStayingOnGroundSurface()
boolean
isSwimming()
void
jumpFromGround()
void
killed(ServerWorld p_241847_1_, LivingEntity p_241847_2_)
void
magicCrit(Entity p_71047_1_)
void
makeStuckInBlock(BlockState p_213295_1_, Vector3d p_213295_2_)
protected Vector3d
maybeBackOffFromEdge(Vector3d p_225514_1_, MoverType p_225514_2_)
boolean
mayBuild()
boolean
mayUseItemAt(BlockPos p_175151_1_, Direction p_175151_2_, ItemStack p_175151_3_)
private void
moveCloak()
void
onEnchantmentPerformed(ItemStack p_192024_1_, int p_192024_2_)
protected boolean
onSoulSpeedBlock()
void
onUpdateAbilities()
void
openCommandBlock(CommandBlockTileEntity p_184824_1_)
void
openHorseInventory(AbstractHorseEntity p_184826_1_, IInventory p_184826_2_)
void
openItemGui(ItemStack p_184814_1_, Hand p_184814_2_)
void
openJigsawBlock(JigsawTileEntity p_213826_1_)
java.util.OptionalInt
openMenu(INamedContainerProvider p_213829_1_)
void
openMinecartCommandBlock(CommandBlockLogic p_184809_1_)
void
openStructureBlock(StructureBlockTileEntity p_189807_1_)
void
openTextEdit(SignTileEntity p_175141_1_)
void
playNotifySound(SoundEvent p_213823_1_, SoundCategory p_213823_2_, float p_213823_3_, float p_213823_4_)
private void
playShoulderEntityAmbientSound(CompoundNBT p_192028_1_)
void
playSound(SoundEvent p_184185_1_, float p_184185_2_, float p_184185_3_)
void
readAdditionalSaveData(CompoundNBT p_70037_1_)
void
refreshDisplayName()
Force the displayed name to refresh, by firingPlayerEvent.NameFormat
, using the real player name as event parameter.void
remove(boolean keepData)
protected void
removeEntitiesOnShoulder()
void
removeVehicle()
void
resetAttackStrengthTicker()
void
resetPos()
int
resetRecipes(java.util.Collection<IRecipe<?>> p_195069_1_)
void
resetStat(Stat<?> p_175145_1_)
void
respawn()
private void
respawnEntityOnShoulder(CompoundNBT p_192026_1_)
void
rideTick()
void
sendMerchantOffers(int p_213818_1_, MerchantOffers p_213818_2_, int p_213818_3_, int p_213818_4_, boolean p_213818_5_, boolean p_213818_6_)
protected void
serverAiStep()
void
setAbsorptionAmount(float p_110149_1_)
boolean
setEntityOnShoulder(CompoundNBT p_192027_1_)
void
setForcedPose(Pose pose)
Force a pose for the player.void
setGameMode(GameType p_71033_1_)
void
setItemSlot(EquipmentSlotType p_184201_1_, ItemStack p_184201_2_)
void
setMainArm(HandSide p_184819_1_)
void
setReducedDebugInfo(boolean p_175150_1_)
void
setRemainingFireTicks(int p_241209_1_)
void
setScore(int p_85040_1_)
protected void
setShoulderEntityLeft(CompoundNBT p_192029_1_)
protected void
setShoulderEntityRight(CompoundNBT p_192031_1_)
boolean
setSlot(int p_174820_1_, ItemStack p_174820_2_)
protected boolean
shouldRemoveSoulSpeed(BlockState p_230295_1_)
boolean
shouldShowName()
void
startFallFlying()
com.mojang.datafixers.util.Either<PlayerEntity.SleepResult,Unit>
startSleepInBed(BlockPos p_213819_1_)
void
stopFallFlying()
void
stopSleepInBed(boolean p_225652_1_, boolean p_225652_2_)
void
stopSleeping()
void
sweepAttack()
void
tick()
private void
touch(Entity p_71044_1_)
void
travel(Vector3d p_213352_1_)
boolean
tryToStartFallFlying()
private void
turtleHelmetTick()
protected boolean
updateIsUnderwater()
protected void
updatePlayerPose()
void
updateSwimming()
protected boolean
wantsToStopRiding()
-
Methods inherited from class net.minecraft.entity.LivingEntity
addEffect, animateHurt, areAllEffectsAmbient, attackable, baseTick, blockedByShield, brainProvider, broadcastBreakEvent, broadcastBreakEvent, calculateEntityAnimation, calculateFallDamage, canAttack, canAttack, canAttackType, canBeAffected, canBreatheUnderwater, canSee, canSpawnSoulSpeedParticle, canStandOnFluid, checkAutoSpinAttack, checkFallDamage, clearSleepingPos, completeUsingItem, createLivingAttributes, createLootContext, createWitherRose, curePotionEffects, decreaseAirSupply, doHurtTarget, doPush, dropAllDeathLoot, dropCustomDeathLoot, dropExperience, dropFromLootTable, forceAddEffect, getActiveEffects, getActiveEffectsMap, getAddEntityPacket, getArmorCoverPercentage, getArmorValue, getArrowCount, getAttackAnim, getAttribute, getAttributeBaseValue, getAttributes, getAttributeValue, getBedOrientation, getBoundingBoxForCulling, getBrain, getCombatTracker, getDamageAfterArmorAbsorb, getDamageAfterMagicAbsorb, getDrinkingSound, getEatingSound, getEffect, getEyeHeight, getFallFlyingTicks, getFeetBlockState, getFluidFallingAdjustedMovement, getHealth, getItemInHand, getJumpPower, getKillCredit, getLastClimbablePos, getLastDamageSource, getLastHurtByMob, getLastHurtByMobTimestamp, getLastHurtMob, getLastHurtMobTimestamp, getLocalBoundsForPose, getLootTable, getMainHandItem, getMaxHealth, getMobType, getNoActionTime, getOffhandItem, getRandom, getRelativePortalPosition, getScale, getSleepingPos, getSoundVolume, getStingerCount, getSwimAmount, getTicksUsingItem, getUsedItemHand, getUseItem, getUseItemRemainingTicks, getViewYRot, getVisibilityPercent, getVoicePitch, getWaterSlowDown, getYHeadRot, goDownInWater, handleRelativeFrictionAndCalculateMovement, hasEffect, hasItemInSlot, heal, increaseAirSupply, invalidateCaps, isAffectedByPotions, isAlive, isAutoSpinAttack, isBaby, isBlocking, isDeadOrDying, isEffectiveAi, isFallFlying, isHolding, isHolding, isInvertedHealAndHarm, isInWall, isPickable, isPushable, isSensitiveToWater, isSleeping, isSuppressingSlidingDownLadder, isUsingItem, isVisuallySwimming, jumpInLiquid, kill, knockback, lerpHeadTo, lerpTo, lookAt, makeBrain, markHurt, onChangedBlock, onClimbable, onEffectAdded, onEffectRemoved, onEffectUpdated, onEnterCombat, onItemPickup, onLeaveCombat, onSyncedDataUpdated, outOfWorld, playBlockFallSound, playEquipSound, playHurtSound, push, pushEntities, randomTeleport, releaseUsingItem, removeAllEffects, removeEffect, removeEffectNoUpdate, removeEffectParticles, removeSoulSpeed, resetForwardDirectionOfRelativePortalPosition, rideableUnderWater, setArrowCount, setHealth, setItemInHand, setJumping, setLastHurtByMob, setLastHurtByPlayer, setLastHurtMob, setLivingEntityFlag, setNoActionTime, setOnGround, setRecordPlayingNearby, setSleepingPos, setSpeed, setSprinting, setStingerCount, setYBodyRot, setYHeadRot, shouldDropExperience, shouldDropLoot, shouldRiderFaceForward, spawnSoulSpeedParticle, startAutoSpinAttack, startSleeping, startUsingItem, stopRiding, stopUsingItem, swing, swing, take, tickDeath, tickEffects, tickHeadTurn, triggerItemUseEffects, tryAddSoulSpeed, updateEffectVisibility, updateInvisibilityStatus, updateSwingTime
-
Methods inherited from class net.minecraft.entity.Entity
absMoveTo, absMoveTo, acceptsFailure, acceptsSuccess, addPassenger, addTag, awardKillScore, blockPosition, broadcastToPlayer, calculateUpVector, calculateViewVector, canAddPassenger, canBeCollidedWith, canChangeDimensions, canCollideWith, canEnterPose, canRide, canSpawnSprintParticle, canTrample, canUpdate, canUpdate, captureDrops, captureDrops, changeDimension, changeDimension, checkAndResetForcedChunkAdditionFlag, checkAndResetUpdateChunkPos, checkDespawn, checkInsideBlocks, clearFire, closerThan, collideBoundingBox, collideBoundingBoxHeuristically, collideBoundingBoxLegacy, copyPosition, createCommandSourceStack, createHoverEvent, displayFireAnimation, distanceTo, distanceToSqr, distanceToSqr, distanceToSqr, doEnchantDamageEffects, ejectPassengers, equals, fillCrashReportCategory, findDimensionEntryPoint, fireImmune, getAirSupply, getAllSlots, getBbHeight, getBbWidth, getBlockExplosionResistance, getBlockJumpFactor, getBlockPosBelowThatAffectsMyMovement, getBlockStateOn, getBoundingBox, getBoundingBoxForPose, getBrightness, getCollisionHorizontalEscapeVector, getCommandSenderWorld, getControllingPassenger, getCustomName, getDeltaMovement, getDirection, getDismountLocationForPassenger, getEncodeId, getEntityData, getExitPortal, getEyeHeight, getEyeHeight, getEyeHeightAccess, getEyePosition, getEyeY, getFluidHeight, getFluidJumpThreshold, getForward, getHorizontalDistanceSqr, getId, getIndirectPassengers, getLeashOffset, getLightProbePosition, getLookAngle, getMaxAirSupply, getMaxFallDistance, getMotionDirection, getOnPos, getPacketCoordinates, getPassengers, getPassengersRidingOffset, getPermissionLevel, getPersistentData, getPickRadius, getPistonPushReaction, getPose, getPosition, getRandomX, getRandomY, getRandomZ, getRemainingFireTicks, getRootVehicle, getRotationVector, getSelfAndPassengers, getServer, getSharedFlag, getStringUUID, getTags, getTeam, getTeamColor, getType, getTypeName, getUpVector, getUUID, getVehicle, getViewScale, getViewVector, getViewXRot, getX, getX, getY, getY, getZ, getZ, handleInsidePortal, handleNetherPortal, hasCustomName, hashCode, hasIndirectPassenger, hasOnePlayerPassenger, hasPassenger, hasPassenger, hasPermissions, ignoreExplosion, interact, interactAt, is, isAddedToWorld, isAlliedTo, isAlliedTo, isAttackable, isColliding, isControlledByLocalInstance, isCrouching, isCustomNameVisible, isDescending, isDiscrete, isEyeInFluid, isFree, isGlowing, isIgnoringBlockTriggers, isInLava, isInvisible, isInvisibleTo, isInvulnerable, isInWater, isInWaterOrBubble, isInWaterOrRain, isInWaterRainOrBubble, isNoGravity, isOnFire, isOnGround, isOnPortalCooldown, isPassenger, isPassengerOfSameVehicle, isShiftKeyDown, isSilent, isSprinting, isSteppingCarefully, isSuppressingBounce, isUnderWater, isVehicle, isVisuallyCrawling, lavaHurt, lerpMotion, limitPistonMovement, load, makeFlySound, mirror, move, moveRelative, moveTo, moveTo, moveTo, moveTo, moveTowardsClosestSpace, newDoubleList, newFloatList, nextStep, onAboveBubbleCol, onAddedToWorld, onInsideBlock, onInsideBubbleColumn, onlyOpCanSetNbt, onPassengerTurned, onRemovedFromWorld, pick, playerTouch, playFlySound, playStepSound, playSwimSound, position, positionRider, processPortalCooldown, push, reapplyPosition, refreshDimensions, remove, removeAfterChangingDimensions, removePassenger, removeTag, repositionEntityAfterLoad, restoreFrom, revive, rotate, save, saveAsPassenger, saveWithoutId, sendMessage, setAirSupply, setBoundingBox, setCustomName, setCustomNameVisible, setDeltaMovement, setDeltaMovement, setGlowing, setId, setInvisible, setInvulnerable, setLevel, setLocationFromBoundingbox, setNoGravity, setPacketCoordinates, setPacketCoordinates, setPortalCooldown, setPos, setPosAndOldPos, setPose, setPosRaw, setRot, setSecondsOnFire, setSharedFlag, setShiftKeyDown, setSilent, setSwimming, setUUID, setViewScale, shouldBlockExplode, shouldInformAdmins, shouldRender, shouldRenderAtSqrDistance, showVehicleHealth, skipAttackInteraction, spawnAtLocation, spawnAtLocation, spawnAtLocation, spawnAtLocation, spawnSprintParticle, startRiding, startRiding, startSeenByPlayer, stopSeenByPlayer, teleportTo, teleportToWithTicket, thunderHit, toString, turn, unRide, updateFluidHeightAndDoFluidPushing, updateInWaterStateAndDoFluidPushing
-
Methods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, reviveCaps, serializeCaps
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider
getCapability
-
Methods inherited from interface net.minecraftforge.common.extensions.IForgeEntity
canBeRiddenInWater, canRiderInteract, deserializeNBT, getClassification, getDimensionsForge, getEntity, getEyeHeightForge, getParts, getPickedResult, isMultipartEntity, serializeNBT, shouldRiderSit
-
-
-
-
Field Detail
-
PERSISTED_NBT_TAG
public static final java.lang.String PERSISTED_NBT_TAG
- See Also:
- Constant Field Values
-
STANDING_DIMENSIONS
public static final EntitySize STANDING_DIMENSIONS
-
POSES
private static final java.util.Map<Pose,EntitySize> POSES
-
DATA_PLAYER_ABSORPTION_ID
private static final DataParameter<java.lang.Float> DATA_PLAYER_ABSORPTION_ID
-
DATA_SCORE_ID
private static final DataParameter<java.lang.Integer> DATA_SCORE_ID
-
DATA_PLAYER_MODE_CUSTOMISATION
protected static final DataParameter<java.lang.Byte> DATA_PLAYER_MODE_CUSTOMISATION
-
DATA_PLAYER_MAIN_HAND
protected static final DataParameter<java.lang.Byte> DATA_PLAYER_MAIN_HAND
-
DATA_SHOULDER_LEFT
protected static final DataParameter<CompoundNBT> DATA_SHOULDER_LEFT
-
DATA_SHOULDER_RIGHT
protected static final DataParameter<CompoundNBT> DATA_SHOULDER_RIGHT
-
timeEntitySatOnShoulder
private long timeEntitySatOnShoulder
-
inventory
public final PlayerInventory inventory
-
enderChestInventory
protected EnderChestInventory enderChestInventory
-
inventoryMenu
public final PlayerContainer inventoryMenu
-
containerMenu
public Container containerMenu
-
foodData
protected FoodStats foodData
-
jumpTriggerTime
protected int jumpTriggerTime
-
oBob
public float oBob
-
bob
public float bob
-
takeXpDelay
public int takeXpDelay
-
xCloakO
public double xCloakO
-
yCloakO
public double yCloakO
-
zCloakO
public double zCloakO
-
xCloak
public double xCloak
-
yCloak
public double yCloak
-
zCloak
public double zCloak
-
sleepCounter
private int sleepCounter
-
wasUnderwater
protected boolean wasUnderwater
-
abilities
public final PlayerAbilities abilities
-
experienceLevel
public int experienceLevel
-
totalExperience
public int totalExperience
-
experienceProgress
public float experienceProgress
-
enchantmentSeed
protected int enchantmentSeed
-
defaultFlySpeed
protected final float defaultFlySpeed
- See Also:
- Constant Field Values
-
lastLevelUpTime
private int lastLevelUpTime
-
gameProfile
private final com.mojang.authlib.GameProfile gameProfile
-
reducedDebugInfo
private boolean reducedDebugInfo
-
lastItemInMainHand
private ItemStack lastItemInMainHand
-
cooldowns
private final CooldownTracker cooldowns
-
fishing
@Nullable public FishingBobberEntity fishing
-
prefixes
private final java.util.Collection<IFormattableTextComponent> prefixes
-
suffixes
private final java.util.Collection<IFormattableTextComponent> suffixes
-
forcedPose
@Nullable private Pose forcedPose
-
displayname
private ITextComponent displayname
-
playerMainHandler
private final LazyOptional<IItemHandler> playerMainHandler
-
playerEquipmentHandler
private final LazyOptional<IItemHandler> playerEquipmentHandler
-
playerJoinedHandler
private final LazyOptional<IItemHandler> playerJoinedHandler
-
-
Method Detail
-
blockActionRestricted
public boolean blockActionRestricted(World p_223729_1_, BlockPos p_223729_2_, GameType p_223729_3_)
-
createAttributes
public static AttributeModifierMap.MutableAttribute createAttributes()
-
defineSynchedData
protected void defineSynchedData()
- Overrides:
defineSynchedData
in classLivingEntity
-
tick
public void tick()
- Overrides:
tick
in classLivingEntity
-
isSecondaryUseActive
public boolean isSecondaryUseActive()
-
wantsToStopRiding
protected boolean wantsToStopRiding()
-
isStayingOnGroundSurface
protected boolean isStayingOnGroundSurface()
-
updateIsUnderwater
protected boolean updateIsUnderwater()
-
turtleHelmetTick
private void turtleHelmetTick()
-
createItemCooldowns
protected CooldownTracker createItemCooldowns()
-
moveCloak
private void moveCloak()
-
updatePlayerPose
protected void updatePlayerPose()
-
getPortalWaitTime
public int getPortalWaitTime()
- Overrides:
getPortalWaitTime
in classEntity
-
getSwimSound
protected SoundEvent getSwimSound()
- Overrides:
getSwimSound
in classEntity
-
getSwimSplashSound
protected SoundEvent getSwimSplashSound()
- Overrides:
getSwimSplashSound
in classEntity
-
getSwimHighSpeedSplashSound
protected SoundEvent getSwimHighSpeedSplashSound()
- Overrides:
getSwimHighSpeedSplashSound
in classEntity
-
getDimensionChangingDelay
public int getDimensionChangingDelay()
- Overrides:
getDimensionChangingDelay
in classEntity
-
playSound
public void playSound(SoundEvent p_184185_1_, float p_184185_2_, float p_184185_3_)
-
playNotifySound
public void playNotifySound(SoundEvent p_213823_1_, SoundCategory p_213823_2_, float p_213823_3_, float p_213823_4_)
-
getSoundSource
public SoundCategory getSoundSource()
- Overrides:
getSoundSource
in classEntity
-
getFireImmuneTicks
protected int getFireImmuneTicks()
- Overrides:
getFireImmuneTicks
in classEntity
-
handleEntityEvent
public void handleEntityEvent(byte p_70103_1_)
- Overrides:
handleEntityEvent
in classLivingEntity
-
addParticlesAroundSelf
private void addParticlesAroundSelf(IParticleData p_213824_1_)
-
closeContainer
public void closeContainer()
-
rideTick
public void rideTick()
- Overrides:
rideTick
in classLivingEntity
-
serverAiStep
protected void serverAiStep()
- Overrides:
serverAiStep
in classLivingEntity
-
aiStep
public void aiStep()
- Overrides:
aiStep
in classLivingEntity
-
playShoulderEntityAmbientSound
private void playShoulderEntityAmbientSound(@Nullable CompoundNBT p_192028_1_)
-
touch
private void touch(Entity p_71044_1_)
-
getScore
public int getScore()
-
setScore
public void setScore(int p_85040_1_)
-
increaseScore
public void increaseScore(int p_85039_1_)
-
die
public void die(DamageSource p_70645_1_)
- Overrides:
die
in classLivingEntity
-
dropEquipment
protected void dropEquipment()
- Overrides:
dropEquipment
in classLivingEntity
-
destroyVanishingCursedItems
protected void destroyVanishingCursedItems()
-
getHurtSound
protected SoundEvent getHurtSound(DamageSource p_184601_1_)
- Overrides:
getHurtSound
in classLivingEntity
-
getDeathSound
protected SoundEvent getDeathSound()
- Overrides:
getDeathSound
in classLivingEntity
-
drop
public boolean drop(boolean p_225609_1_)
-
drop
@Nullable public ItemEntity drop(ItemStack p_71019_1_, boolean p_71019_2_)
-
drop
@Nullable public ItemEntity drop(ItemStack p_146097_1_, boolean p_146097_2_, boolean p_146097_3_)
-
getDestroySpeed
@Deprecated public float getDestroySpeed(BlockState p_184813_1_)
Deprecated.
-
getDigSpeed
public float getDigSpeed(BlockState p_184813_1_, @Nullable BlockPos pos)
-
hasCorrectToolForDrops
public boolean hasCorrectToolForDrops(BlockState p_234569_1_)
-
readAdditionalSaveData
public void readAdditionalSaveData(CompoundNBT p_70037_1_)
- Overrides:
readAdditionalSaveData
in classLivingEntity
-
addAdditionalSaveData
public void addAdditionalSaveData(CompoundNBT p_213281_1_)
- Overrides:
addAdditionalSaveData
in classLivingEntity
-
isInvulnerableTo
public boolean isInvulnerableTo(DamageSource p_180431_1_)
- Overrides:
isInvulnerableTo
in classEntity
-
hurt
public boolean hurt(DamageSource p_70097_1_, float p_70097_2_)
- Overrides:
hurt
in classLivingEntity
-
blockUsingShield
protected void blockUsingShield(LivingEntity p_190629_1_)
- Overrides:
blockUsingShield
in classLivingEntity
-
canHarmPlayer
public boolean canHarmPlayer(PlayerEntity p_96122_1_)
-
hurtArmor
protected void hurtArmor(DamageSource p_230294_1_, float p_230294_2_)
- Overrides:
hurtArmor
in classLivingEntity
-
hurtCurrentlyUsedShield
protected void hurtCurrentlyUsedShield(float p_184590_1_)
- Overrides:
hurtCurrentlyUsedShield
in classLivingEntity
-
actuallyHurt
protected void actuallyHurt(DamageSource p_70665_1_, float p_70665_2_)
- Overrides:
actuallyHurt
in classLivingEntity
-
onSoulSpeedBlock
protected boolean onSoulSpeedBlock()
- Overrides:
onSoulSpeedBlock
in classLivingEntity
-
openTextEdit
public void openTextEdit(SignTileEntity p_175141_1_)
-
openMinecartCommandBlock
public void openMinecartCommandBlock(CommandBlockLogic p_184809_1_)
-
openCommandBlock
public void openCommandBlock(CommandBlockTileEntity p_184824_1_)
-
openStructureBlock
public void openStructureBlock(StructureBlockTileEntity p_189807_1_)
-
openJigsawBlock
public void openJigsawBlock(JigsawTileEntity p_213826_1_)
-
openHorseInventory
public void openHorseInventory(AbstractHorseEntity p_184826_1_, IInventory p_184826_2_)
-
openMenu
public java.util.OptionalInt openMenu(@Nullable INamedContainerProvider p_213829_1_)
-
sendMerchantOffers
public void sendMerchantOffers(int p_213818_1_, MerchantOffers p_213818_2_, int p_213818_3_, int p_213818_4_, boolean p_213818_5_, boolean p_213818_6_)
-
interactOn
public ActionResultType interactOn(Entity p_190775_1_, Hand p_190775_2_)
-
getMyRidingOffset
public double getMyRidingOffset()
- Overrides:
getMyRidingOffset
in classEntity
-
removeVehicle
public void removeVehicle()
- Overrides:
removeVehicle
in classEntity
-
isImmobile
protected boolean isImmobile()
- Overrides:
isImmobile
in classLivingEntity
-
isAffectedByFluids
public boolean isAffectedByFluids()
- Overrides:
isAffectedByFluids
in classLivingEntity
-
maybeBackOffFromEdge
protected Vector3d maybeBackOffFromEdge(Vector3d p_225514_1_, MoverType p_225514_2_)
- Overrides:
maybeBackOffFromEdge
in classEntity
-
isAboveGround
private boolean isAboveGround()
-
attack
public void attack(Entity p_71059_1_)
-
doAutoAttackOnTouch
protected void doAutoAttackOnTouch(LivingEntity p_204804_1_)
- Overrides:
doAutoAttackOnTouch
in classLivingEntity
-
disableShield
public void disableShield(boolean p_190777_1_)
-
crit
public void crit(Entity p_71009_1_)
-
magicCrit
public void magicCrit(Entity p_71047_1_)
-
sweepAttack
public void sweepAttack()
-
respawn
public void respawn()
-
isLocalPlayer
public boolean isLocalPlayer()
-
getGameProfile
public com.mojang.authlib.GameProfile getGameProfile()
-
startSleepInBed
public com.mojang.datafixers.util.Either<PlayerEntity.SleepResult,Unit> startSleepInBed(BlockPos p_213819_1_)
-
stopSleepInBed
public void stopSleepInBed(boolean p_225652_1_, boolean p_225652_2_)
-
stopSleeping
public void stopSleeping()
- Overrides:
stopSleeping
in classLivingEntity
-
findRespawnPositionAndUseSpawnBlock
public static java.util.Optional<Vector3d> findRespawnPositionAndUseSpawnBlock(ServerWorld p_242374_0_, BlockPos p_242374_1_, float p_242374_2_, boolean p_242374_3_, boolean p_242374_4_)
-
isSleepingLongEnough
public boolean isSleepingLongEnough()
-
getSleepTimer
public int getSleepTimer()
-
displayClientMessage
public void displayClientMessage(ITextComponent p_146105_1_, boolean p_146105_2_)
-
awardStat
public void awardStat(ResourceLocation p_195066_1_)
-
awardStat
public void awardStat(ResourceLocation p_195067_1_, int p_195067_2_)
-
awardStat
public void awardStat(Stat<?> p_71029_1_)
-
awardStat
public void awardStat(Stat<?> p_71064_1_, int p_71064_2_)
-
resetStat
public void resetStat(Stat<?> p_175145_1_)
-
awardRecipes
public int awardRecipes(java.util.Collection<IRecipe<?>> p_195065_1_)
-
awardRecipesByKey
public void awardRecipesByKey(ResourceLocation[] p_193102_1_)
-
resetRecipes
public int resetRecipes(java.util.Collection<IRecipe<?>> p_195069_1_)
-
jumpFromGround
public void jumpFromGround()
- Overrides:
jumpFromGround
in classLivingEntity
-
travel
public void travel(Vector3d p_213352_1_)
- Overrides:
travel
in classLivingEntity
-
updateSwimming
public void updateSwimming()
- Overrides:
updateSwimming
in classEntity
-
freeAt
protected boolean freeAt(BlockPos p_207401_1_)
-
getSpeed
public float getSpeed()
- Overrides:
getSpeed
in classLivingEntity
-
checkMovementStatistics
public void checkMovementStatistics(double p_71000_1_, double p_71000_3_, double p_71000_5_)
-
checkRidingStatistics
private void checkRidingStatistics(double p_71015_1_, double p_71015_3_, double p_71015_5_)
-
causeFallDamage
public boolean causeFallDamage(float p_225503_1_, float p_225503_2_)
- Overrides:
causeFallDamage
in classLivingEntity
-
tryToStartFallFlying
public boolean tryToStartFallFlying()
-
startFallFlying
public void startFallFlying()
-
stopFallFlying
public void stopFallFlying()
-
doWaterSplashEffect
protected void doWaterSplashEffect()
- Overrides:
doWaterSplashEffect
in classEntity
-
getFallDamageSound
protected SoundEvent getFallDamageSound(int p_184588_1_)
- Overrides:
getFallDamageSound
in classLivingEntity
-
killed
public void killed(ServerWorld p_241847_1_, LivingEntity p_241847_2_)
-
makeStuckInBlock
public void makeStuckInBlock(BlockState p_213295_1_, Vector3d p_213295_2_)
- Overrides:
makeStuckInBlock
in classEntity
-
giveExperiencePoints
public void giveExperiencePoints(int p_195068_1_)
-
getEnchantmentSeed
public int getEnchantmentSeed()
-
onEnchantmentPerformed
public void onEnchantmentPerformed(ItemStack p_192024_1_, int p_192024_2_)
-
giveExperienceLevels
public void giveExperienceLevels(int p_82242_1_)
-
getXpNeededForNextLevel
public int getXpNeededForNextLevel()
-
causeFoodExhaustion
public void causeFoodExhaustion(float p_71020_1_)
-
getFoodData
public FoodStats getFoodData()
-
canEat
public boolean canEat(boolean p_71043_1_)
-
isHurt
public boolean isHurt()
-
mayBuild
public boolean mayBuild()
-
mayUseItemAt
public boolean mayUseItemAt(BlockPos p_175151_1_, Direction p_175151_2_, ItemStack p_175151_3_)
-
getExperienceReward
protected int getExperienceReward(PlayerEntity p_70693_1_)
- Overrides:
getExperienceReward
in classLivingEntity
-
isAlwaysExperienceDropper
protected boolean isAlwaysExperienceDropper()
- Overrides:
isAlwaysExperienceDropper
in classLivingEntity
-
shouldShowName
public boolean shouldShowName()
- Overrides:
shouldShowName
in classLivingEntity
-
isMovementNoisy
protected boolean isMovementNoisy()
- Overrides:
isMovementNoisy
in classEntity
-
onUpdateAbilities
public void onUpdateAbilities()
-
setGameMode
public void setGameMode(GameType p_71033_1_)
-
getName
public ITextComponent getName()
-
getEnderChestInventory
public EnderChestInventory getEnderChestInventory()
-
getItemBySlot
public ItemStack getItemBySlot(EquipmentSlotType p_184582_1_)
- Specified by:
getItemBySlot
in classLivingEntity
-
setItemSlot
public void setItemSlot(EquipmentSlotType p_184201_1_, ItemStack p_184201_2_)
- Specified by:
setItemSlot
in classLivingEntity
-
addItem
public boolean addItem(ItemStack p_191521_1_)
-
getHandSlots
public java.lang.Iterable<ItemStack> getHandSlots()
- Overrides:
getHandSlots
in classEntity
-
getArmorSlots
public java.lang.Iterable<ItemStack> getArmorSlots()
- Specified by:
getArmorSlots
in classLivingEntity
-
setEntityOnShoulder
public boolean setEntityOnShoulder(CompoundNBT p_192027_1_)
-
removeEntitiesOnShoulder
protected void removeEntitiesOnShoulder()
-
respawnEntityOnShoulder
private void respawnEntityOnShoulder(CompoundNBT p_192026_1_)
-
isSpectator
public abstract boolean isSpectator()
- Overrides:
isSpectator
in classEntity
-
isSwimming
public boolean isSwimming()
- Overrides:
isSwimming
in classEntity
-
isCreative
public abstract boolean isCreative()
-
isPushedByFluid
public boolean isPushedByFluid()
- Overrides:
isPushedByFluid
in classEntity
-
getScoreboard
public Scoreboard getScoreboard()
-
getDisplayName
public ITextComponent getDisplayName()
- Specified by:
getDisplayName
in interfaceINameable
- Overrides:
getDisplayName
in classEntity
-
decorateDisplayNameComponent
private IFormattableTextComponent decorateDisplayNameComponent(IFormattableTextComponent p_208016_1_)
-
getScoreboardName
public java.lang.String getScoreboardName()
- Overrides:
getScoreboardName
in classEntity
-
getStandingEyeHeight
public float getStandingEyeHeight(Pose p_213348_1_, EntitySize p_213348_2_)
- Overrides:
getStandingEyeHeight
in classLivingEntity
-
setAbsorptionAmount
public void setAbsorptionAmount(float p_110149_1_)
- Overrides:
setAbsorptionAmount
in classLivingEntity
-
getAbsorptionAmount
public float getAbsorptionAmount()
- Overrides:
getAbsorptionAmount
in classLivingEntity
-
createPlayerUUID
public static java.util.UUID createPlayerUUID(com.mojang.authlib.GameProfile p_146094_0_)
-
createPlayerUUID
public static java.util.UUID createPlayerUUID(java.lang.String p_175147_0_)
-
isModelPartShown
public boolean isModelPartShown(PlayerModelPart p_175148_1_)
-
setSlot
public boolean setSlot(int p_174820_1_, ItemStack p_174820_2_)
-
isReducedDebugInfo
public boolean isReducedDebugInfo()
-
setReducedDebugInfo
public void setReducedDebugInfo(boolean p_175150_1_)
-
setRemainingFireTicks
public void setRemainingFireTicks(int p_241209_1_)
- Overrides:
setRemainingFireTicks
in classEntity
-
getMainArm
public HandSide getMainArm()
- Specified by:
getMainArm
in classLivingEntity
-
setMainArm
public void setMainArm(HandSide p_184819_1_)
-
getShoulderEntityLeft
public CompoundNBT getShoulderEntityLeft()
-
setShoulderEntityLeft
protected void setShoulderEntityLeft(CompoundNBT p_192029_1_)
-
getShoulderEntityRight
public CompoundNBT getShoulderEntityRight()
-
setShoulderEntityRight
protected void setShoulderEntityRight(CompoundNBT p_192031_1_)
-
getCurrentItemAttackStrengthDelay
public float getCurrentItemAttackStrengthDelay()
-
getAttackStrengthScale
public float getAttackStrengthScale(float p_184825_1_)
-
resetAttackStrengthTicker
public void resetAttackStrengthTicker()
-
getCooldowns
public CooldownTracker getCooldowns()
-
getBlockSpeedFactor
protected float getBlockSpeedFactor()
- Overrides:
getBlockSpeedFactor
in classLivingEntity
-
getLuck
public float getLuck()
-
canUseGameMasterBlocks
public boolean canUseGameMasterBlocks()
-
canTakeItem
public boolean canTakeItem(ItemStack p_213365_1_)
- Overrides:
canTakeItem
in classLivingEntity
-
getDimensions
public EntitySize getDimensions(Pose p_213305_1_)
- Overrides:
getDimensions
in classLivingEntity
-
getDismountPoses
public com.google.common.collect.ImmutableList<Pose> getDismountPoses()
- Overrides:
getDismountPoses
in classLivingEntity
-
getProjectile
public ItemStack getProjectile(ItemStack p_213356_1_)
- Overrides:
getProjectile
in classLivingEntity
-
eat
public ItemStack eat(World p_213357_1_, ItemStack p_213357_2_)
- Overrides:
eat
in classLivingEntity
-
shouldRemoveSoulSpeed
protected boolean shouldRemoveSoulSpeed(BlockState p_230295_1_)
- Overrides:
shouldRemoveSoulSpeed
in classLivingEntity
-
getRopeHoldPosition
public Vector3d getRopeHoldPosition(float p_241843_1_)
- Overrides:
getRopeHoldPosition
in classEntity
-
getPrefixes
public java.util.Collection<IFormattableTextComponent> getPrefixes()
-
getSuffixes
public java.util.Collection<IFormattableTextComponent> getSuffixes()
-
refreshDisplayName
public void refreshDisplayName()
Force the displayed name to refresh, by firingPlayerEvent.NameFormat
, using the real player name as event parameter.
-
getCapability
public <T> LazyOptional<T> getCapability(Capability<T> capability, @Nullable Direction facing)
Description copied from interface:ICapabilityProvider
Retrieves the Optional handler for the capability requested on the specific side. The return value CAN be the same for multiple faces. Modders are encouraged to cache this value, using the listener capabilities of the Optional to be notified if the requested capability get lost.- Specified by:
getCapability
in interfaceICapabilityProvider
- Overrides:
getCapability
in classLivingEntity
- Returns:
- The requested an optional holding the requested capability.
-
setForcedPose
public void setForcedPose(@Nullable Pose pose)
Force a pose for the player. If set, the vanilla pose determination and clearance check is skipped. Make sure the pose is clear yourself (e.g. in PlayerTick). This has to be set just once, do not set it every tick. Make sure to clear (null) the pose if not required anymore and only use if necessary.
-
getForcedPose
@Nullable public Pose getForcedPose()
- Returns:
- The forced pose if set, null otherwise
-
-