Class Player
java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.entity.Entity
net.minecraft.world.entity.LivingEntity
net.minecraft.world.entity.player.Player
- All Implemented Interfaces:
CommandSource
,SyncedDataHolder
,Attackable
,EntityAccess
,Nameable
,ScoreHolder
,IAttachmentHolder
,IEntityExtension
,ILivingEntityExtension
,IPlayerExtension
,INBTSerializable<CompoundTag>
- Direct Known Subclasses:
AbstractClientPlayer
,ServerPlayer
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.entity.LivingEntity
LivingEntity.Fallsounds
Nested classes/interfaces inherited from class net.minecraft.world.entity.Entity
Entity.MoveFunction, Entity.MovementEmission, Entity.RemovalReason
Nested classes/interfaces inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
AttachmentHolder.AsField
-
Field Summary
Modifier and TypeFieldDescriptionprivate final Abilities
float
private final ItemCooldowns
static final int
static final float
private static final EntityDataAccessor
<Float> protected static final EntityDataAccessor
<Byte> protected static final EntityDataAccessor
<Byte> private static final EntityDataAccessor
<Integer> protected static final EntityDataAccessor
<CompoundTag> protected static final EntityDataAccessor
<CompoundTag> static final float
static final float
static final float
static final HumanoidArm
static final int
static final Vec3
protected final float
private Component
protected int
static final int
protected PlayerEnderChestContainer
int
float
protected FoodData
private Pose
private final com.mojang.authlib.GameProfile
static final int
protected float
boolean
(package private) final Inventory
final InventoryMenu
protected int
private ItemStack
private int
private static final org.slf4j.Logger
static final int
float
static final String
private static final Map
<Pose, EntityDimensions> private final Collection
<MutableComponent> private boolean
static final int
private int
static final EntityDimensions
private final Collection
<MutableComponent> static final float
static final float
int
private long
int
static final int
protected boolean
double
double
double
double
double
double
Fields inherited from class net.minecraft.world.entity.LivingEntity
animStep, animStepO, appliedScale, ARMOR_SLOT_OFFSET, ARMOR_SLOTS, attackAnim, attackStrengthTicker, autoSpinAttackTicks, BASE_JUMP_POWER, BODY_ARMOR_OFFSET, brain, DATA_LIVING_ENTITY_FLAGS, dead, DEATH_DURATION, deathScore, deathTime, DEFAULT_BABY_SCALE, DEFAULT_BASE_GRAVITY, EQUIPMENT_SLOT_OFFSET, EXTRA_RENDER_CULLING_SIZE_WITH_BIG_HAT, fallFlyTicks, HAND_SLOTS, hurtDuration, hurtTime, invulnerableDuration, jumping, lastHurt, lastHurtByPlayer, lastHurtByPlayerTime, lerpHeadSteps, lerpSteps, lerpX, lerpXRot, lerpY, lerpYHeadRot, lerpYRot, lerpZ, LIVING_ENTITY_FLAG_IS_USING, LIVING_ENTITY_FLAG_OFF_HAND, LIVING_ENTITY_FLAG_SPIN_ATTACK, MIN_MOVEMENT_DISTANCE, noActionTime, oAttackAnim, oRun, PLAYER_HURT_EXPERIENCE_TIME, removeArrowTime, removeStingerTime, rotA, rotOffs, run, SLEEPING_DIMENSIONS, SWING_DURATION, swinging, swingingArm, swingTime, timeOffs, USE_ITEM_INTERVAL, useItem, useItemRemaining, walkAnimation, xxa, yBodyRot, yBodyRotO, yHeadRot, yHeadRotO, yya, zza
Fields inherited from class net.minecraft.world.entity.Entity
BASE_SAFE_FALL_DISTANCE, BASE_TICKS_REQUIRED_TO_FREEZE, blocksBuilding, BOARDING_COOLDOWN, boardingCooldown, CONTENTS_SLOT_INDEX, DATA_POSE, DATA_SHARED_FLAGS_ID, DEFAULT_BB_HEIGHT, DEFAULT_BB_WIDTH, DELTA_AFFECTED_BY_BLOCKS_BELOW_0_2, DELTA_AFFECTED_BY_BLOCKS_BELOW_0_5, DELTA_AFFECTED_BY_BLOCKS_BELOW_1_0, ENTITY_COUNTER, entityData, fallDistance, firstTick, FLAG_FALL_FLYING, FLAG_GLOWING, FLAG_ONFIRE, fluidHeight, flyDist, forgeFluidTypeHeight, FREEZE_HURT_FREQUENCY, hasImpulse, horizontalCollision, hurtMarked, ID_TAG, invulnerableTime, isInPowderSnow, isInsidePortal, mainSupportingBlockPos, MAX_ENTITY_TAG_COUNT, minorHorizontalCollision, moveDist, noCulling, noPhysics, PASSENGERS_TAG, portalEntrancePos, portalTime, random, stringUUID, stuckSpeedMultiplier, tickCount, TOTAL_AIR_SUPPLY, uuid, UUID_TAG, verticalCollision, verticalCollisionBelow, walkDist, walkDistO, wasEyeInWater, wasInPowderSnow, wasOnFire, wasTouchingWater, xo, xOld, xRotO, yo, yOld, yRotO, zo, zOld
Fields inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
ATTACHMENTS_NBT_KEY
Fields inherited from interface net.minecraft.commands.CommandSource
NULL
Fields inherited from interface net.minecraft.world.scores.ScoreHolder
WILDCARD, WILDCARD_NAME
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
actuallyHurt
(DamageSource p_36312_, float p_36313_) void
addAdditionalSaveData
(CompoundTag p_36265_) boolean
void
aiStep()
void
animateHurt
(float p_265280_) void
int
awardRecipes
(Collection<RecipeHolder<?>> p_36213_) void
awardRecipesByKey
(List<ResourceLocation> p_312922_) void
awardStat
(ResourceLocation p_36221_) void
awardStat
(ResourceLocation p_36223_, int p_36224_) void
void
boolean
blockActionRestricted
(Level p_36188_, BlockPos p_36189_, GameType p_36190_) double
protected void
blockUsingShield
(LivingEntity p_36295_) boolean
boolean
boolean
canEat
(boolean p_36392_) private boolean
canFallAtLeast
(double p_341664_, double p_341597_, float p_341613_) boolean
canHarmPlayer
(Player p_36169_) boolean
canInteractWithBlock
(BlockPos p_319804_, double p_320349_) boolean
canInteractWithEntity
(Entity p_320327_, double p_320632_) boolean
canInteractWithEntity
(AABB p_320959_, double p_319981_) protected boolean
canPlayerFitWithinBlocksAndEntitiesWhen
(Pose p_294172_) boolean
boolean
canTakeItem
(ItemStack p_36315_) boolean
boolean
canUseSlot
(EquipmentSlot p_326160_) boolean
causeFallDamage
(float p_150093_, float p_150094_, DamageSource p_150095_) void
causeFoodExhaustion
(float p_36400_) void
static AttributeSupplier.Builder
protected ItemCooldowns
void
private MutableComponent
decorateDisplayNameComponent
(MutableComponent p_36219_) protected void
defineSynchedData
(SynchedEntityData.Builder p_326117_) protected void
void
die
(DamageSource p_36152_) void
void
displayClientMessage
(Component p_36216_, boolean p_36217_) protected void
doAutoAttackOnTouch
(LivingEntity p_36355_) protected void
protected boolean
doesEmitEquipEvent
(EquipmentSlot p_219741_) protected void
protected void
double
findRespawnPositionAndUseSpawnBlock
(ServerLevel p_36131_, BlockPos p_36132_, float p_36133_, boolean p_36134_, boolean p_36135_) protected boolean
float
float
getAttackStrengthScale
(float p_36404_) protected float
float
protected SoundEvent
getDefaultDimensions
(Pose p_36166_) float
getDestroySpeed
(BlockState p_36282_) Deprecated.float
getDigSpeed
(BlockState p_36282_, BlockPos pos) int
com.google.common.collect.ImmutableList
<Pose> int
int
protected int
protected float
com.mojang.authlib.GameProfile
float
protected SoundEvent
getHurtSound
(DamageSource p_36310_) getItemBySlot
(EquipmentSlot p_36257_) float
getLuck()
protected float
protected Entity.MovementEmission
getName()
int
getProjectile
(ItemStack p_36349_) getRopeHoldPosition
(float p_36374_) int
getScore()
int
getSlot
(int p_150112_) float
getSpeed()
protected SoundEvent
protected SoundEvent
protected SoundEvent
int
void
giveExperienceLevels
(int p_36276_) void
giveExperiencePoints
(int p_36291_) void
handleEntityEvent
(byte p_36120_) boolean
boolean
hasCorrectToolForDrops
(BlockState p_36299_) Deprecated.boolean
hasCorrectToolForDrops
(BlockState state, Level level, BlockPos pos) boolean
boolean
hurt
(DamageSource p_36154_, float p_36155_) protected void
hurtArmor
(DamageSource p_36251_, float p_36252_) protected void
hurtCurrentlyUsedShield
(float p_36383_) protected void
hurtHelmet
(DamageSource p_150103_, float p_150104_) void
increaseScore
(int p_36402_) interactOn
(Entity p_36158_, InteractionHand p_36159_) protected void
internalSetAbsorptionAmount
(float p_296426_) private boolean
isAboveGround
(float p_341626_) boolean
protected boolean
boolean
abstract boolean
boolean
isHurt()
protected boolean
boolean
isInvulnerableTo
(DamageSource p_36249_) boolean
boolean
isModelPartShown
(PlayerModelPart p_36171_) boolean
boolean
boolean
boolean
boolean
abstract boolean
protected boolean
boolean
boolean
void
boolean
killedEntity
(ServerLevel p_219735_, LivingEntity p_219736_) void
void
makeStuckInBlock
(BlockState p_36196_, Vec3 p_36197_) protected Vec3
maybeBackOffFromEdge
(Vec3 p_36201_, MoverType p_36202_) boolean
mayBuild()
boolean
mayUseItemAt
(BlockPos p_36205_, Direction p_36206_, ItemStack p_36207_) private void
void
onEnchantmentPerformed
(ItemStack p_36172_, int p_36173_) protected boolean
void
void
openCommandBlock
(CommandBlockEntity p_36191_) void
openHorseInventory
(AbstractHorse p_36167_, Container p_36168_) void
openItemGui
(ItemStack p_36174_, InteractionHand p_36175_) void
openJigsawBlock
(JigsawBlockEntity p_36192_) openMenu
(MenuProvider p_36150_) void
openMinecartCommandBlock
(BaseCommandBlock p_36182_) void
openStructureBlock
(StructureBlockEntity p_36194_) void
openTextEdit
(SignBlockEntity p_36193_, boolean p_277837_) void
playNotifySound
(SoundEvent p_36140_, SoundSource p_36141_, float p_36142_, float p_36143_) private void
playShoulderEntityAmbientSound
(CompoundTag p_36368_) void
playSound
(SoundEvent p_36137_, float p_36138_, float p_36139_) protected void
playStepSound
(BlockPos p_282121_, BlockState p_282194_) void
readAdditionalSaveData
(CompoundTag p_36215_) void
Force the displayed name to refresh, by firingPlayerEvent.NameFormat
, using the real player name as event parameter.void
remove
(Entity.RemovalReason p_150097_) protected void
void
void
void
int
resetRecipes
(Collection<RecipeHolder<?>> p_36263_) void
void
respawn()
private void
respawnEntityOnShoulder
(CompoundTag p_36371_) void
rideTick()
void
sendMerchantOffers
(int p_36121_, MerchantOffers p_36122_, int p_36123_, int p_36124_, boolean p_36125_, boolean p_36126_) protected void
boolean
setEntityOnShoulder
(CompoundTag p_36361_) void
setForcedPose
(Pose pose) Force a pose for the player.void
setItemSlot
(EquipmentSlot p_36161_, ItemStack p_36162_) void
setLastDeathLocation
(Optional<GlobalPos> p_219750_) void
setMainArm
(HumanoidArm p_36164_) void
setReducedDebugInfo
(boolean p_36394_) void
setRemainingFireTicks
(int p_36353_) void
setScore
(int p_36398_) protected void
setShoulderEntityLeft
(CompoundTag p_36363_) protected void
setShoulderEntityRight
(CompoundTag p_36365_) boolean
protected boolean
shouldRemoveSoulSpeed
(BlockState p_36262_) boolean
void
startAutoSpinAttack
(int p_204080_) void
com.mojang.datafixers.util.Either
<Player.BedSleepingProblem, Unit> startSleepInBed
(BlockPos p_36203_) void
void
stopSleepInBed
(boolean p_36226_, boolean p_36227_) void
void
void
tick()
private void
void
void
triggerRecipeCrafted
(RecipeHolder<?> p_301080_, List<ItemStack> p_283609_) boolean
private void
protected boolean
protected void
void
void
updateTutorialInventoryAction
(ItemStack p_150098_, ItemStack p_150099_, ClickAction p_150100_) protected boolean
Methods inherited from class net.minecraft.world.entity.LivingEntity
addEffect, addEffect, areAllEffectsAmbient, attackable, baseTick, blockedByShield, brainProvider, broadcastBreakEvent, calculateEntityAnimation, calculateFallDamage, canAttack, canAttack, canAttackType, canBeAffected, canBeSeenByAnyone, canBreatheUnderwater, canChangeDimensions, canDisableShield, canFreeze, canSpawnSoulSpeedParticle, canStandOnFluid, checkAutoSpinAttack, checkFallDamage, clearSleepingPos, completeUsingItem, createLivingAttributes, createWitherRose, decreaseAirSupply, doHurtEquipment, doHurtTarget, doPush, dropAllDeathLoot, dropCustomDeathLoot, dropExperience, dropFromLootTable, equipmentHasChanged, forceAddEffect, getActiveEffects, getActiveEffectsMap, getAgeScale, getAllSlots, getArmorAndBodyArmorSlots, getArmorCoverPercentage, getArmorValue, getArrowCount, getAttackAnim, getAttribute, getAttributeBaseValue, getAttributes, getAttributeValue, getBedOrientation, getBoundingBoxForCulling, getBrain, getCombatTracker, getComfortableFallDistance, getDamageAfterArmorAbsorb, getDamageAfterMagicAbsorb, getDefaultGravity, getDimensions, getDrinkingSound, getEatingSound, getEffect, getEquipmentSlotForItem, getFallFlyingTicks, getFluidFallingAdjustedMovement, getHealth, getHitbox, getItemInHand, getJumpBoostPower, getJumpPower, getJumpPower, getKillCredit, getLastAttacker, getLastClimbablePos, getLastDamageSource, getLastHurtByMob, getLastHurtByMobTimestamp, getLastHurtMob, getLastHurtMobTimestamp, getLocalBoundsForPose, getLootTable, getLootTableSeed, getMainHandItem, getMaxAbsorption, getMaxFallDistance, getMaxHealth, getNoActionTime, getOffhandItem, getPassengerRidingPosition, getRandom, getRelativePortalPosition, getRiddenInput, getRiddenSpeed, getScale, getSleepingPos, getSlotForHand, getSoundVolume, getStingerCount, getSwimAmount, getTicksUsingItem, getUsedItemHand, getUseItem, getUseItemRemainingTicks, getViewYRot, getVisibilityPercent, getVisualRotationYInDegrees, getVoicePitch, getWaterSlowDown, getYHeadRot, goDownInWater, handleDamageEvent, handleRelativeFrictionAndCalculateMovement, hasEffect, hasItemInSlot, hasLineOfSight, heal, igniteForTicks, increaseAirSupply, indicateDamage, isAffectedByPotions, isAlive, isAutoSpinAttack, isBaby, isBlocking, isCurrentlyGlowing, isDamageSourceBlocked, isDeadOrDying, isFallFlying, isHolding, isHolding, isInvertedHealAndHarm, isInWall, isPickable, isPushable, isSensitiveToWater, isSleeping, isSuppressingSlidingDownLadder, isUsingItem, isVisuallySwimming, jumpInLiquid, kill, knockback, lerpHeadRotationStep, lerpHeadTo, lerpTargetX, lerpTargetXRot, lerpTargetY, lerpTargetYRot, lerpTargetZ, lerpTo, lookAt, makeBrain, makeSound, maxUpStep, onBelowWorld, onChangedBlock, onClimbable, onEffectAdded, onEffectRemoved, onEffectUpdated, onEnterCombat, onEquipItem, onItemPickup, onLeaveCombat, onSyncedDataUpdated, playBlockFallSound, playHurtSound, push, pushEntities, randomTeleport, recreateFromPacket, releaseUsingItem, removeAllEffects, removeEffect, removeEffectNoUpdate, removeEffectParticles, removeEffectsCuredBy, removeFrost, removeSoulSpeed, resetForwardDirectionOfRelativePortalPosition, sanitizeScale, sendEffectToPassengers, setAbsorptionAmount, setArrowCount, setDiscardFriction, setHealth, setItemInHand, setJumping, setLastHurtByMob, setLastHurtByPlayer, setLastHurtMob, setLivingEntityFlag, setNoActionTime, setRecordPlayingNearby, setSleepingPos, setSpeed, setSprinting, setStingerCount, setYBodyRot, setYHeadRot, shouldDiscardFriction, shouldDropExperience, shouldDropLoot, shouldRiderFaceForward, skipDropExperience, spawnSoulSpeedParticle, startSleeping, startUsingItem, stopRiding, stopUsingItem, swing, swing, take, tickDeath, tickEffects, tickHeadTurn, tickRidden, triggerItemUseEffects, tryAddFrost, tryAddSoulSpeed, updateEffectVisibility, updateInvisibilityStatus, updateSwingTime, updateUsingItem, updateWalkAnimation, verifyEquippedItem, wasExperienceConsumed, wouldNotSuffocateAtTargetPose
Methods inherited from class net.minecraft.world.entity.Entity
absMoveTo, absMoveTo, acceptsFailure, acceptsSuccess, addDeltaMovement, addPassenger, addTag, applyGravity, awardKillScore, blockPosition, broadcastToPlayer, calculateUpVector, calculateViewVector, canAddPassenger, canBeCollidedWith, canCollideWith, canControlVehicle, canRide, canSpawnSprintParticle, canTrample, captureDrops, captureDrops, changeDimension, changeDimension, checkBelowWorld, checkDespawn, checkInsideBlocks, checkSlowFallDistance, checkSupportingBlock, chunkPosition, clearFire, closerThan, closerThan, collideBoundingBox, copyPosition, couldAcceptPassenger, countPlayerPassengers, createCommandSourceStack, createHoverEvent, damageSources, dampensVibrations, deflection, discard, dismountsUnderwater, dismountTo, displayFireAnimation, distanceTo, distanceToSqr, distanceToSqr, distanceToSqr, doEnchantDamageEffects, ejectPassengers, equals, extinguishFire, fillCrashReportCategory, findDimensionEntryPoint, fireImmune, fixupDimensions, gameEvent, gameEvent, getAddEntityPacket, getAirSupply, getAttachments, getBbHeight, getBbWidth, getBlockExplosionResistance, getBlockJumpFactor, getBlockPosBelowThatAffectsMyMovement, getBlockStateOn, getBlockStateOnLegacy, getBlockX, getBlockY, getBlockZ, getBoundingBox, getCapability, getCapability, getCollisionHorizontalEscapeVector, getCommandSenderWorld, getControlledVehicle, getControllingPassenger, getCustomName, getDefaultPassengerAttachmentPoint, getDeltaMovement, getDirection, getDismountLocationForPassenger, getEncodeId, getEntityData, getExitPortal, getEyeHeight, getEyeHeight, getEyeHeightAccess, getEyeInFluidType, getEyePosition, getEyePosition, getEyeY, getFirstPassenger, getFluidHeight, getFluidJumpThreshold, getFluidTypeHeight, getForward, getGravity, getHandHoldingItemAngle, getId, getInBlockState, getIndirectPassengers, getLeashOffset, getLeashOffset, getLightLevelDependentMagicValue, getLightProbePosition, getLookAngle, getMaxAirSupply, getMaxHeightFluidType, getMotionDirection, getNearestViewDirection, getOnPos, getOnPos, getOnPosLegacy, getPassengerAttachmentPoint, getPassengerClosestTo, getPassengers, getPassengersAndSelf, getPercentFrozen, getPermissionLevel, getPersistentData, getPickRadius, getPickResult, getPistonPushReaction, getPortalCooldown, getPose, getPosition, getPositionCodec, getPrimaryStepSoundBlockPos, getRandomX, getRandomY, getRandomZ, getRemainingFireTicks, getRemovalReason, getRootVehicle, getRotationVector, getSelfAndPassengers, getServer, getSharedFlag, getStringUUID, getTags, getTeam, getTeamColor, getTicksFrozen, getTicksRequiredToFreeze, getType, getTypeName, getUpVector, getUUID, getVehicle, getVehicleAttachmentPoint, getViewScale, getViewVector, getViewXRot, getX, getX, getXRot, getY, getY, getYRot, getZ, getZ, handleInsidePortal, handleNetherPortal, hasControllingPassenger, hasCustomName, hasExactlyOnePlayerPassenger, hasGlowingTag, hashCode, hasIndirectPassenger, hasPassenger, hasPassenger, hasPermissions, hasPose, igniteForSeconds, ignoreExplosion, interact, interactAt, is, isAddedToWorld, isAlliedTo, isAlliedTo, isAttackable, isColliding, isControlledByLocalInstance, isCrouching, isCustomNameVisible, isDescending, isDiscrete, isEffectiveAi, isEyeInFluid, isFlapping, isFree, isFreezing, isFullyFrozen, isHorizontalCollisionMinor, isIgnoringBlockTriggers, isInFluidType, isInFluidType, isInLava, isInLiquid, isInvisible, isInvisibleTo, isInvulnerable, isInWater, isInWaterOrBubble, isInWaterOrRain, isInWaterRainOrBubble, isNoGravity, isOnFire, isOnPortalCooldown, isOnRails, isPassenger, isPassengerOfSameVehicle, isRemoved, isShiftKeyDown, isSilent, isSprinting, isSteppingCarefully, isSupportedBy, isSuppressingBounce, isUnderWater, isVehicle, isVisuallyCrawling, lavaHurt, lerpMotion, lerpPositionAndRotationStep, level, limitPistonMovement, load, makeBoundingBox, markHurt, mayInteract, mirror, move, moveRelative, moveTo, moveTo, moveTo, moveTo, moveTowardsClosestSpace, newDoubleList, newFloatList, nextStep, onAboveBubbleCol, onAddedToWorld, onClientRemoval, onExplosionHit, onFlap, onGround, onInsideBlock, onInsideBubbleColumn, onlyOpCanSetNbt, onPassengerTurned, onRemovedFromWorld, onSyncedDataUpdated, pick, playCombinationStepSounds, playEntityOnFireExtinguishedSound, playerTouch, playMuffledStepSound, playSound, playSwimSound, position, positionRider, positionRider, processFlappingMovement, processPortalCooldown, push, reapplyPosition, refreshDimensions, registryAccess, removeAfterChangingDimensions, removePassenger, removeTag, repositionEntityAfterLoad, resetFallDistance, restoreFrom, revive, rotate, save, saveAsPassenger, saveWithoutId, sendSystemMessage, setAirSupply, setBoundingBox, setCustomName, setCustomNameVisible, setData, setDeltaMovement, setDeltaMovement, setFluidTypeHeight, setGlowingTag, setId, setInvisible, setInvulnerable, setIsInPowderSnow, setLevel, setLevelCallback, setNoGravity, setOldPosAndRot, setOnGround, setOnGroundWithKnownMovement, setPortalCooldown, setPortalCooldown, setPos, setPos, setPose, setPosRaw, setRemoved, setRot, setSharedFlag, setSharedFlagOnFire, setShiftKeyDown, setSilent, setSwimming, setTicksFrozen, setUUID, setViewScale, setXRot, setYRot, shouldBlockExplode, shouldInformAdmins, shouldRender, shouldRenderAtSqrDistance, showVehicleHealth, skipAttackInteraction, spawnAtLocation, spawnAtLocation, spawnAtLocation, spawnAtLocation, spawnSprintParticle, startRiding, startRiding, startSeenByPlayer, stopSeenByPlayer, syncPacketPositionCodec, teleportRelative, teleportTo, teleportTo, teleportToWithTicket, thunderHit, toString, touchingUnloadedChunk, trackingPosition, tryCheckInsideBlocks, turn, unRide, unsetRemoved, updateDynamicGameEventListener, updateFluidHeightAndDoFluidPushing, updateFluidHeightAndDoFluidPushing, updateInWaterStateAndDoFluidPushing, waterSwimSound
Methods inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
deserializeAttachments, getData, getExistingData, hasAttachments, hasData, removeData, serializeAttachments
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.commands.CommandSource
alwaysAccepts
Methods inherited from interface net.neoforged.neoforge.attachment.IAttachmentHolder
getData, getExistingData, hasData, removeData, setData
Methods inherited from interface net.neoforged.neoforge.common.extensions.IEntityExtension
canBeRiddenUnderFluidType, canFluidExtinguish, canHydrateInFluidType, canRiderInteract, canStartSwimming, canTrample, captureDrops, captureDrops, copyAttachmentsFrom, deserializeNBT, getClassification, getEyeInFluidType, getFluidFallDistanceModifier, getFluidMotionScale, getFluidTypeHeight, getMaxHeightFluidType, getParts, getPersistentData, getPickedResult, getSoundFromFluidType, hasCustomOutlineRendering, isAddedToWorld, isEyeInFluidType, isInFluidType, isInFluidType, isInFluidType, isInFluidType, isInFluidType, isMultipartEntity, isPushedByFluid, onAddedToWorld, onRemovedFromWorld, revive, sendPairingData, serializeNBT, shouldRiderSit
Methods inherited from interface net.neoforged.neoforge.common.extensions.ILivingEntityExtension
canDrownInFluidType, canSwimInFluidType, jumpInFluid, moveInFluid, self, sinkInFluid
Methods inherited from interface net.neoforged.neoforge.common.extensions.IPlayerExtension
isCloseEnough, mayFly, openMenu, openMenu
Methods inherited from interface net.minecraft.world.scores.ScoreHolder
getFeedbackDisplayName
-
Field Details
-
PERSISTED_NBT_TAG
- See Also:
-
LOGGER
private static final org.slf4j.Logger LOGGER -
DEFAULT_MAIN_HAND
-
DEFAULT_MODEL_CUSTOMIZATION
public static final int DEFAULT_MODEL_CUSTOMIZATION- See Also:
-
MAX_HEALTH
public static final int MAX_HEALTH- See Also:
-
SLEEP_DURATION
public static final int SLEEP_DURATION- See Also:
-
WAKE_UP_DURATION
public static final int WAKE_UP_DURATION- See Also:
-
ENDER_SLOT_OFFSET
public static final int ENDER_SLOT_OFFSET- See Also:
-
HELD_ITEM_SLOT
public static final int HELD_ITEM_SLOT- See Also:
-
CRAFTING_SLOT_OFFSET
public static final int CRAFTING_SLOT_OFFSET- See Also:
-
DEFAULT_BLOCK_INTERACTION_RANGE
public static final float DEFAULT_BLOCK_INTERACTION_RANGE- See Also:
-
DEFAULT_ENTITY_INTERACTION_RANGE
public static final float DEFAULT_ENTITY_INTERACTION_RANGE- See Also:
-
CROUCH_BB_HEIGHT
public static final float CROUCH_BB_HEIGHT- See Also:
-
SWIMMING_BB_WIDTH
public static final float SWIMMING_BB_WIDTH- See Also:
-
SWIMMING_BB_HEIGHT
public static final float SWIMMING_BB_HEIGHT- See Also:
-
DEFAULT_EYE_HEIGHT
public static final float DEFAULT_EYE_HEIGHT- See Also:
-
DEFAULT_VEHICLE_ATTACHMENT
-
STANDING_DIMENSIONS
-
POSES
-
DATA_PLAYER_ABSORPTION_ID
-
DATA_SCORE_ID
-
DATA_PLAYER_MODE_CUSTOMISATION
-
DATA_PLAYER_MAIN_HAND
-
DATA_SHOULDER_LEFT
-
DATA_SHOULDER_RIGHT
-
timeEntitySatOnShoulder
private long timeEntitySatOnShoulder -
inventory
-
enderChestInventory
-
inventoryMenu
-
containerMenu
-
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
-
experienceLevel
public int experienceLevel -
totalExperience
public int totalExperience -
experienceProgress
public float experienceProgress -
enchantmentSeed
protected int enchantmentSeed -
defaultFlySpeed
protected final float defaultFlySpeed- See Also:
-
lastLevelUpTime
private int lastLevelUpTime -
gameProfile
private final com.mojang.authlib.GameProfile gameProfile -
reducedDebugInfo
private boolean reducedDebugInfo -
lastItemInMainHand
-
cooldowns
-
lastDeathLocation
-
fishing
-
hurtDir
protected float hurtDir -
currentImpulseImpactPos
-
currentExplosionCause
-
ignoreFallDamageFromCurrentImpulse
public boolean ignoreFallDamageFromCurrentImpulse -
prefixes
-
suffixes
-
forcedPose
-
displayname
-
-
Constructor Details
-
Player
-
-
Method Details
-
blockActionRestricted
-
createAttributes
-
defineSynchedData
- Overrides:
defineSynchedData
in classLivingEntity
-
tick
public void tick()- Overrides:
tick
in classLivingEntity
-
getMaxHeadRotationRelativeToBody
protected float getMaxHeadRotationRelativeToBody()- Overrides:
getMaxHeadRotationRelativeToBody
in classLivingEntity
-
isSecondaryUseActive
public boolean isSecondaryUseActive() -
wantsToStopRiding
protected boolean wantsToStopRiding() -
isStayingOnGroundSurface
protected boolean isStayingOnGroundSurface() -
updateIsUnderwater
protected boolean updateIsUnderwater() -
turtleHelmetTick
private void turtleHelmetTick() -
createItemCooldowns
-
moveCloak
private void moveCloak() -
updatePlayerPose
protected void updatePlayerPose() -
canPlayerFitWithinBlocksAndEntitiesWhen
-
getPortalWaitTime
public int getPortalWaitTime()- Overrides:
getPortalWaitTime
in classEntity
-
getSwimSound
- Overrides:
getSwimSound
in classEntity
-
getSwimSplashSound
- Overrides:
getSwimSplashSound
in classEntity
-
getSwimHighSpeedSplashSound
- Overrides:
getSwimHighSpeedSplashSound
in classEntity
-
getDimensionChangingDelay
public int getDimensionChangingDelay()- Overrides:
getDimensionChangingDelay
in classEntity
-
playSound
-
playNotifySound
public void playNotifySound(SoundEvent p_36140_, SoundSource p_36141_, float p_36142_, float p_36143_) -
getSoundSource
- Overrides:
getSoundSource
in classEntity
-
getFireImmuneTicks
protected int getFireImmuneTicks()- Overrides:
getFireImmuneTicks
in classEntity
-
handleEntityEvent
public void handleEntityEvent(byte p_36120_) - Overrides:
handleEntityEvent
in classLivingEntity
-
closeContainer
public void closeContainer() -
doCloseContainer
protected void doCloseContainer() -
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
-
touch
-
getScore
public int getScore() -
setScore
public void setScore(int p_36398_) -
increaseScore
public void increaseScore(int p_36402_) -
startAutoSpinAttack
public void startAutoSpinAttack(int p_204080_) -
die
- Overrides:
die
in classLivingEntity
-
dropEquipment
protected void dropEquipment()- Overrides:
dropEquipment
in classLivingEntity
-
destroyVanishingCursedItems
protected void destroyVanishingCursedItems() -
getHurtSound
- Overrides:
getHurtSound
in classLivingEntity
-
getDeathSound
- Overrides:
getDeathSound
in classLivingEntity
-
drop
-
drop
-
getDestroySpeed
Deprecated. -
getDigSpeed
-
hasCorrectToolForDrops
Deprecated. -
hasCorrectToolForDrops
-
readAdditionalSaveData
- Overrides:
readAdditionalSaveData
in classLivingEntity
-
addAdditionalSaveData
- Overrides:
addAdditionalSaveData
in classLivingEntity
-
isInvulnerableTo
- Overrides:
isInvulnerableTo
in classEntity
-
hurt
- Overrides:
hurt
in classLivingEntity
-
blockUsingShield
- Overrides:
blockUsingShield
in classLivingEntity
-
canBeSeenAsEnemy
public boolean canBeSeenAsEnemy()- Overrides:
canBeSeenAsEnemy
in classLivingEntity
-
canHarmPlayer
-
hurtArmor
- Overrides:
hurtArmor
in classLivingEntity
-
hurtHelmet
- Overrides:
hurtHelmet
in classLivingEntity
-
hurtCurrentlyUsedShield
protected void hurtCurrentlyUsedShield(float p_36383_) - Overrides:
hurtCurrentlyUsedShield
in classLivingEntity
-
actuallyHurt
- Overrides:
actuallyHurt
in classLivingEntity
-
onSoulSpeedBlock
protected boolean onSoulSpeedBlock()- Overrides:
onSoulSpeedBlock
in classLivingEntity
-
isTextFilteringEnabled
public boolean isTextFilteringEnabled() -
openTextEdit
-
openMinecartCommandBlock
-
openCommandBlock
-
openStructureBlock
-
openJigsawBlock
-
openHorseInventory
-
openMenu
-
sendMerchantOffers
public void sendMerchantOffers(int p_36121_, MerchantOffers p_36122_, int p_36123_, int p_36124_, boolean p_36125_, boolean p_36126_) -
openItemGui
-
interactOn
-
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
- Overrides:
maybeBackOffFromEdge
in classEntity
-
isAboveGround
private boolean isAboveGround(float p_341626_) -
canFallAtLeast
private boolean canFallAtLeast(double p_341664_, double p_341597_, float p_341613_) -
attack
-
doAutoAttackOnTouch
- Overrides:
doAutoAttackOnTouch
in classLivingEntity
-
disableShield
public void disableShield() -
crit
-
magicCrit
-
sweepAttack
public void sweepAttack() -
respawn
public void respawn() -
remove
- Overrides:
remove
in classLivingEntity
-
isLocalPlayer
public boolean isLocalPlayer() -
getGameProfile
public com.mojang.authlib.GameProfile getGameProfile() -
getInventory
-
getAbilities
-
hasInfiniteMaterials
public boolean hasInfiniteMaterials()- Overrides:
hasInfiniteMaterials
in classLivingEntity
-
updateTutorialInventoryAction
public void updateTutorialInventoryAction(ItemStack p_150098_, ItemStack p_150099_, ClickAction p_150100_) -
hasContainerOpen
public boolean hasContainerOpen() -
startSleepInBed
public com.mojang.datafixers.util.Either<Player.BedSleepingProblem,Unit> startSleepInBed(BlockPos p_36203_) -
stopSleepInBed
public void stopSleepInBed(boolean p_36226_, boolean p_36227_) -
stopSleeping
public void stopSleeping()- Overrides:
stopSleeping
in classLivingEntity
-
findRespawnPositionAndUseSpawnBlock
public static Optional<Vec3> findRespawnPositionAndUseSpawnBlock(ServerLevel p_36131_, BlockPos p_36132_, float p_36133_, boolean p_36134_, boolean p_36135_) -
isSleepingLongEnough
public boolean isSleepingLongEnough() -
getSleepTimer
public int getSleepTimer() -
displayClientMessage
-
awardStat
-
awardStat
-
awardStat
-
awardStat
-
resetStat
-
awardRecipes
-
triggerRecipeCrafted
-
awardRecipesByKey
-
resetRecipes
-
jumpFromGround
public void jumpFromGround()- Overrides:
jumpFromGround
in classLivingEntity
-
travel
- Overrides:
travel
in classLivingEntity
-
updateSwimming
public void updateSwimming()- Overrides:
updateSwimming
in classEntity
-
freeAt
-
getSpeed
public float getSpeed()- Overrides:
getSpeed
in classLivingEntity
-
causeFallDamage
- Overrides:
causeFallDamage
in classLivingEntity
-
tryToStartFallFlying
public boolean tryToStartFallFlying() -
startFallFlying
public void startFallFlying() -
stopFallFlying
public void stopFallFlying() -
doWaterSplashEffect
protected void doWaterSplashEffect()- Overrides:
doWaterSplashEffect
in classEntity
-
playStepSound
- Overrides:
playStepSound
in classEntity
-
getFallSounds
- Overrides:
getFallSounds
in classLivingEntity
-
killedEntity
- Overrides:
killedEntity
in classEntity
-
makeStuckInBlock
- Overrides:
makeStuckInBlock
in classEntity
-
giveExperiencePoints
public void giveExperiencePoints(int p_36291_) -
getEnchantmentSeed
public int getEnchantmentSeed() -
onEnchantmentPerformed
-
giveExperienceLevels
public void giveExperienceLevels(int p_36276_) -
getXpNeededForNextLevel
public int getXpNeededForNextLevel() -
causeFoodExhaustion
public void causeFoodExhaustion(float p_36400_) -
getWardenSpawnTracker
-
getFoodData
-
canEat
public boolean canEat(boolean p_36392_) -
isHurt
public boolean isHurt() -
mayBuild
public boolean mayBuild() -
mayUseItemAt
-
getExperienceReward
public int getExperienceReward()- Overrides:
getExperienceReward
in classLivingEntity
-
isAlwaysExperienceDropper
protected boolean isAlwaysExperienceDropper()- Overrides:
isAlwaysExperienceDropper
in classLivingEntity
-
shouldShowName
public boolean shouldShowName()- Overrides:
shouldShowName
in classLivingEntity
-
getMovementEmission
- Overrides:
getMovementEmission
in classEntity
-
onUpdateAbilities
public void onUpdateAbilities() -
getName
-
getEnderChestInventory
-
getItemBySlot
- Specified by:
getItemBySlot
in classLivingEntity
-
doesEmitEquipEvent
- Overrides:
doesEmitEquipEvent
in classLivingEntity
-
setItemSlot
- Specified by:
setItemSlot
in classLivingEntity
-
addItem
-
getHandSlots
- Overrides:
getHandSlots
in classLivingEntity
-
getArmorSlots
- Specified by:
getArmorSlots
in classLivingEntity
-
canUseSlot
- Overrides:
canUseSlot
in classLivingEntity
-
setEntityOnShoulder
-
removeEntitiesOnShoulder
protected void removeEntitiesOnShoulder() -
respawnEntityOnShoulder
-
isSpectator
public abstract boolean isSpectator()- Overrides:
isSpectator
in classEntity
-
canBeHitByProjectile
public boolean canBeHitByProjectile()- Overrides:
canBeHitByProjectile
in classEntity
-
isSwimming
public boolean isSwimming()- Overrides:
isSwimming
in classEntity
-
isCreative
public abstract boolean isCreative() -
isPushedByFluid
public boolean isPushedByFluid()- Overrides:
isPushedByFluid
in classEntity
-
getScoreboard
-
getDisplayName
- Specified by:
getDisplayName
in interfaceNameable
- Specified by:
getDisplayName
in interfaceScoreHolder
- Overrides:
getDisplayName
in classEntity
-
decorateDisplayNameComponent
-
getScoreboardName
- Specified by:
getScoreboardName
in interfaceScoreHolder
- Overrides:
getScoreboardName
in classEntity
-
internalSetAbsorptionAmount
protected void internalSetAbsorptionAmount(float p_296426_) - Overrides:
internalSetAbsorptionAmount
in classLivingEntity
-
getAbsorptionAmount
public float getAbsorptionAmount()- Overrides:
getAbsorptionAmount
in classLivingEntity
-
isModelPartShown
-
getSlot
- Overrides:
getSlot
in classLivingEntity
-
isReducedDebugInfo
public boolean isReducedDebugInfo() -
setReducedDebugInfo
public void setReducedDebugInfo(boolean p_36394_) -
setRemainingFireTicks
public void setRemainingFireTicks(int p_36353_) - Overrides:
setRemainingFireTicks
in classEntity
-
getMainArm
- Specified by:
getMainArm
in classLivingEntity
-
setMainArm
-
getShoulderEntityLeft
-
setShoulderEntityLeft
-
getShoulderEntityRight
-
setShoulderEntityRight
-
getCurrentItemAttackStrengthDelay
public float getCurrentItemAttackStrengthDelay() -
getAttackStrengthScale
public float getAttackStrengthScale(float p_36404_) -
resetAttackStrengthTicker
public void resetAttackStrengthTicker() -
getCooldowns
-
getBlockSpeedFactor
protected float getBlockSpeedFactor()- Overrides:
getBlockSpeedFactor
in classLivingEntity
-
getLuck
public float getLuck() -
canUseGameMasterBlocks
public boolean canUseGameMasterBlocks() -
canTakeItem
- Overrides:
canTakeItem
in classLivingEntity
-
getDefaultDimensions
- Overrides:
getDefaultDimensions
in classLivingEntity
-
getDismountPoses
- Overrides:
getDismountPoses
in classLivingEntity
-
getProjectile
- Overrides:
getProjectile
in classLivingEntity
-
eat
- Overrides:
eat
in classLivingEntity
-
shouldRemoveSoulSpeed
- Overrides:
shouldRemoveSoulSpeed
in classLivingEntity
-
getRopeHoldPosition
- Overrides:
getRopeHoldPosition
in classEntity
-
isAlwaysTicking
public boolean isAlwaysTicking()- Specified by:
isAlwaysTicking
in interfaceEntityAccess
- Overrides:
isAlwaysTicking
in classEntity
-
isScoping
public boolean isScoping() -
shouldBeSaved
public boolean shouldBeSaved()- Specified by:
shouldBeSaved
in interfaceEntityAccess
- Overrides:
shouldBeSaved
in classEntity
-
getLastDeathLocation
-
setLastDeathLocation
-
getHurtDir
public float getHurtDir()- Overrides:
getHurtDir
in classLivingEntity
-
animateHurt
public void animateHurt(float p_265280_) - Overrides:
animateHurt
in classLivingEntity
-
canSprint
public boolean canSprint() -
getFlyingSpeed
protected float getFlyingSpeed()- Overrides:
getFlyingSpeed
in classLivingEntity
-
blockInteractionRange
public double blockInteractionRange() -
entityInteractionRange
public double entityInteractionRange() -
canInteractWithEntity
-
canInteractWithEntity
-
canInteractWithBlock
-
resetCurrentImpulseContext
public void resetCurrentImpulseContext() -
getPrefixes
-
getSuffixes
-
refreshDisplayName
public void refreshDisplayName()Force the displayed name to refresh, by firingPlayerEvent.NameFormat
, using the real player name as event parameter. -
setForcedPose
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
- Returns:
- The forced pose if set, null otherwise
-