类 Player
java.lang.Object
net.minecraftforge.common.capabilities.CapabilityProvider<Entity>
net.minecraft.world.entity.Entity
net.minecraft.world.entity.LivingEntity
net.minecraft.world.entity.player.Player
- 所有已实现的接口:
CommandSource
,Attackable
,EntityAccess
,Nameable
,ICapabilityProvider
,ICapabilityProviderImpl<Entity>
,ICapabilitySerializable<CompoundTag>
,IForgeEntity
,IForgeLivingEntity
,IForgePlayer
,INBTSerializable<CompoundTag>
- 直接已知子类:
AbstractClientPlayer
,ServerPlayer
-
嵌套类概要
嵌套类从类继承的嵌套类/接口 net.minecraft.world.entity.LivingEntity
LivingEntity.Fallsounds
从类继承的嵌套类/接口 net.minecraft.world.entity.Entity
Entity.MoveFunction, Entity.MovementEmission, Entity.RemovalReason
从类继承的嵌套类/接口 net.minecraftforge.common.capabilities.CapabilityProvider
CapabilityProvider.AsField<B extends ICapabilityProviderImpl<B>>
-
字段概要
字段修饰符和类型字段说明private final Abilities
float
private final ItemCooldowns
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
protected final float
private Component
protected int
static final int
protected PlayerEnderChestContainer
int
float
private static final int
protected FoodData
private Pose
private final com.mojang.authlib.GameProfile
protected float
private final Inventory
final InventoryMenu
protected int
private ItemStack
private int
private static final org.slf4j.Logger
static final int
static final int
float
static final String
private final LazyOptional<IItemHandler>
private final LazyOptional<IItemHandler>
private final LazyOptional<IItemHandler>
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
从类继承的字段 net.minecraft.world.entity.LivingEntity
animStep, animStepO, ARMOR_SLOT_OFFSET, ARMOR_SLOTS, attackAnim, attackStrengthTicker, autoSpinAttackTicks, brain, DATA_LIVING_ENTITY_FLAGS, dead, DEATH_DURATION, deathScore, deathTime, 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, lerpYRot, lerpZ, LIVING_ENTITY_FLAG_IS_USING, LIVING_ENTITY_FLAG_OFF_HAND, LIVING_ENTITY_FLAG_SPIN_ATTACK, lyHeadRot, 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
从类继承的字段 net.minecraft.world.entity.Entity
BASE_TICKS_REQUIRED_TO_FREEZE, blocksBuilding, BOARDING_COOLDOWN, boardingCooldown, BREATHING_DISTANCE_BELOW_EYES, 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
从接口继承的字段 net.minecraft.commands.CommandSource
NULL
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明protected void
actuallyHurt
(DamageSource pDamageSrc, float pDamageAmount) void
addAdditionalSaveData
(CompoundTag pCompound) boolean
private void
addParticlesAroundSelf
(ParticleOptions pParticleOption) void
aiStep()
void
animateHurt
(float pYaw) void
int
awardRecipes
(Collection<Recipe<?>> pRecipes) void
awardRecipesByKey
(ResourceLocation[] pRecipesKeys) void
awardStat
(ResourceLocation pStatKey) void
awardStat
(ResourceLocation pStat, int pIncrement) void
void
boolean
blockActionRestricted
(Level pLevel, BlockPos pPos, GameType pGameMode) protected void
blockUsingShield
(LivingEntity pEntity) boolean
boolean
boolean
canEat
(boolean pCanAlwaysEat) boolean
canHarmPlayer
(Player pOther) boolean
boolean
canTakeItem
(ItemStack pItemstack) boolean
boolean
causeFallDamage
(float pFallDistance, float pMultiplier, DamageSource pSource) void
causeFoodExhaustion
(float pExhaustion) void
checkMovementStatistics
(double pDistanceX, double pDistanceY, double pDistanceZ) private void
checkRidingStatistics
(double pDistanceX, double pDistanceY, double pDistanceZ) void
static AttributeSupplier.Builder
protected ItemCooldowns
void
private MutableComponent
decorateDisplayNameComponent
(MutableComponent pDisplayName) protected void
protected void
void
die
(DamageSource pCause) void
disableShield
(boolean pBecauseOfAxe) void
displayClientMessage
(Component pChatComponent, boolean pActionBar) protected void
doAutoAttackOnTouch
(LivingEntity pTarget) protected void
protected boolean
doesEmitEquipEvent
(EquipmentSlot pSlot) protected void
protected void
findRespawnPositionAndUseSpawnBlock
(ServerLevel pServerLevel, BlockPos pSpawnBlockPos, float pPlayerOrientation, boolean pIsRespawnForced, boolean pRespawnAfterWinningTheGame) protected boolean
float
float
getAttackStrengthScale
(float pAdjustTicks) protected float
<T> LazyOptional<T>
getCapability
(Capability<T> capability, Direction facing) Retrieves the Optional handler for the capability requested on the specific side.float
protected SoundEvent
float
getDestroySpeed
(BlockState pState) 已过时。float
getDigSpeed
(BlockState pState, BlockPos pos) int
getDimensions
(Pose pPose) com.google.common.collect.ImmutableList<Pose>
int
int
protected int
protected float
com.mojang.authlib.GameProfile
float
protected SoundEvent
getHurtSound
(DamageSource pDamageSource) getItemBySlot
(EquipmentSlot pSlot) float
getLuck()
protected Entity.MovementEmission
double
getName()
int
getProjectile
(ItemStack pShootable) getRopeHoldPosition
(float pPartialTicks) int
getScore()
int
getSlot
(int pSlot) float
getSpeed()
float
getStandingEyeHeight
(Pose pPose, EntityDimensions pSize) protected SoundEvent
protected SoundEvent
protected SoundEvent
int
void
giveExperienceLevels
(int pLevels) void
giveExperiencePoints
(int pXpPoints) void
handleEntityEvent
(byte pId) boolean
boolean
hasCorrectToolForDrops
(BlockState pState) boolean
hurt
(DamageSource pSource, float pAmount) protected void
hurtArmor
(DamageSource pDamageSource, float pDamage) protected void
hurtCurrentlyUsedShield
(float pDamage) protected void
hurtHelmet
(DamageSource pDamageSource, float pDamageAmount) void
increaseScore
(int pScore) interactOn
(Entity pEntityToInteractOn, InteractionHand pHand) private boolean
boolean
protected boolean
boolean
abstract boolean
boolean
isHurt()
protected boolean
boolean
isInvulnerableTo
(DamageSource pSource) boolean
boolean
isModelPartShown
(PlayerModelPart pPart) boolean
boolean
boolean
boolean
boolean
abstract boolean
protected boolean
boolean
boolean
void
boolean
killedEntity
(ServerLevel pLevel, LivingEntity pEntity) void
void
makeStuckInBlock
(BlockState pState, Vec3 pMotionMultiplier) protected Vec3
maybeBackOffFromEdge
(Vec3 pVec, MoverType pMover) boolean
mayBuild()
boolean
mayUseItemAt
(BlockPos pPos, Direction pFacing, ItemStack pStack) private void
void
onEnchantmentPerformed
(ItemStack pEnchantedItem, int pLevelCost) protected boolean
void
void
openCommandBlock
(CommandBlockEntity pCommandBlockEntity) void
openHorseInventory
(AbstractHorse pHorse, Container pInventory) void
openItemGui
(ItemStack pStack, InteractionHand pHand) void
openJigsawBlock
(JigsawBlockEntity pJigsawBlockEntity) openMenu
(MenuProvider pMenu) void
openMinecartCommandBlock
(BaseCommandBlock pCommandEntity) void
openStructureBlock
(StructureBlockEntity pStructureEntity) void
openTextEdit
(SignBlockEntity pSignEntity, boolean pIsFrontText) void
playNotifySound
(SoundEvent pSound, SoundSource pSource, float pVolume, float pPitch) private void
playShoulderEntityAmbientSound
(CompoundTag pEntityCompound) void
playSound
(SoundEvent pSound, float pVolume, float pPitch) protected void
playStepSound
(BlockPos pPos, BlockState pState) void
readAdditionalSaveData
(CompoundTag pCompound) void
Force the displayed name to refresh, by firingPlayerEvent.NameFormat
, using the real player name as event parameter.void
remove
(Entity.RemovalReason pReason) protected void
void
void
int
resetRecipes
(Collection<Recipe<?>> pRecipes) void
void
respawn()
private void
respawnEntityOnShoulder
(CompoundTag pEntityCompound) void
rideTick()
void
sendMerchantOffers
(int pContainerId, MerchantOffers pOffers, int pVillagerLevel, int pVillagerXp, boolean pShowProgress, boolean pCanRestock) protected void
void
setAbsorptionAmount
(float pAmount) boolean
setEntityOnShoulder
(CompoundTag pEntityCompound) void
setForcedPose
(Pose pose) Force a pose for the player.void
setItemSlot
(EquipmentSlot pSlot, ItemStack pStack) void
setLastDeathLocation
(Optional<GlobalPos> pLastDeathLocation) void
setMainArm
(HumanoidArm pHand) void
setReducedDebugInfo
(boolean pReducedDebugInfo) void
setRemainingFireTicks
(int pTicks) void
setScore
(int pScore) protected void
setShoulderEntityLeft
(CompoundTag pEntityCompound) protected void
setShoulderEntityRight
(CompoundTag pEntityCompound) boolean
protected boolean
shouldRemoveSoulSpeed
(BlockState pState) boolean
void
startAutoSpinAttack
(int pAttackTicks) void
com.mojang.datafixers.util.Either<Player.BedSleepingProblem,
Unit> startSleepInBed
(BlockPos pBedPos) void
void
stopSleepInBed
(boolean pWakeImmediately, boolean pUpdateLevelForSleepingPlayers) void
void
void
tick()
private void
void
void
triggerRecipeCrafted
(Recipe<?> pRecipe, List<ItemStack> pItems) boolean
private void
protected boolean
protected void
void
void
updateTutorialInventoryAction
(ItemStack pCarried, ItemStack pClicked, ClickAction pAction) protected boolean
从类继承的方法 net.minecraft.world.entity.LivingEntity
addEffect, addEffect, areAllEffectsAmbient, attackable, baseTick, blockedByShield, brainProvider, broadcastBreakEvent, broadcastBreakEvent, calculateEntityAnimation, calculateFallDamage, canAttack, canAttack, canAttackType, canBeAffected, canBeSeenByAnyone, canBreatheUnderwater, canChangeDimensions, canDisableShield, canFreeze, canSpawnSoulSpeedParticle, canStandOnFluid, checkAutoSpinAttack, checkFallDamage, clearSleepingPos, completeUsingItem, createLivingAttributes, createWitherRose, curePotionEffects, decreaseAirSupply, doHurtTarget, doPush, dropAllDeathLoot, dropCustomDeathLoot, dropExperience, dropFromLootTable, equipmentHasChanged, forceAddEffect, getActiveEffects, getActiveEffectsMap, getArmorCoverPercentage, getArmorValue, getArrowCount, getAttackAnim, getAttribute, getAttributeBaseValue, getAttributeBaseValue, getAttributes, getAttributeValue, getAttributeValue, getBedOrientation, getBoundingBoxForCulling, getBrain, getCombatTracker, getDamageAfterArmorAbsorb, getDamageAfterMagicAbsorb, getDrinkingSound, getEatingSound, getEffect, getEquipmentSlotForItem, getEyeHeight, getFallFlyingTicks, getFluidFallingAdjustedMovement, getHealth, getItemInHand, getJumpBoostPower, getJumpPower, getKillCredit, getLastAttacker, getLastClimbablePos, getLastDamageSource, getLastHurtByMob, getLastHurtByMobTimestamp, getLastHurtMob, getLastHurtMobTimestamp, getLocalBoundsForPose, getLootTable, getLootTableSeed, getMainHandItem, getMaxHealth, getMeleeAttackReferencePosition, getMobType, getNoActionTime, getOffhandItem, getRandom, getRelativePortalPosition, getRiddenInput, getRiddenSpeed, getScale, getSleepingPos, getSoundVolume, getStingerCount, getSwimAmount, getTicksUsingItem, getUsedItemHand, getUseItem, getUseItemRemainingTicks, getViewYRot, getVisibilityPercent, getVisualRotationYInDegrees, getVoicePitch, getWaterSlowDown, getYHeadRot, goDownInWater, handleDamageEvent, handleRelativeFrictionAndCalculateMovement, hasEffect, hasItemInSlot, hasLineOfSight, heal, increaseAirSupply, indicateDamage, invalidateCaps, isAffectedByPotions, isAlive, isAutoSpinAttack, isBaby, isBlocking, isCurrentlyGlowing, isDamageSourceBlocked, isDeadOrDying, isFallFlying, isHolding, isHolding, isInvertedHealAndHarm, isInWall, isPickable, isPushable, isSensitiveToWater, isSleeping, isSuppressingSlidingDownLadder, isUsingItem, isVisuallySwimming, jumpInLiquid, kill, knockback, lerpHeadTo, lerpTo, lookAt, makeBrain, maxUpStep, onBelowWorld, onChangedBlock, onClimbable, onEffectAdded, onEffectRemoved, onEffectUpdated, onEnterCombat, onEquipItem, onItemPickup, onLeaveCombat, onSyncedDataUpdated, playBlockFallSound, playHurtSound, push, pushEntities, randomTeleport, recreateFromPacket, releaseUsingItem, removeAllEffects, removeEffect, removeEffectNoUpdate, removeEffectParticles, removeFrost, removeSoulSpeed, resetForwardDirectionOfRelativePortalPosition, reviveCaps, sendEffectToPassengers, 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
从类继承的方法 net.minecraft.world.entity.Entity
absMoveTo, absMoveTo, acceptsFailure, acceptsSuccess, addDeltaMovement, addPassenger, addTag, awardKillScore, blockPosition, broadcastToPlayer, calculateUpVector, calculateViewVector, canAddPassenger, canBeCollidedWith, canCollideWith, canEnterPose, canRide, canSpawnSprintParticle, canTrample, canUpdate, canUpdate, captureDrops, captureDrops, changeDimension, changeDimension, checkBelowWorld, checkDespawn, checkInsideBlocks, checkSlowFallDistance, checkSupportingBlock, chunkPosition, clearFire, closerThan, closerThan, collideBoundingBox, copyPosition, couldAcceptPassenger, createCommandSourceStack, createHoverEvent, damageSources, dampensVibrations, discard, dismountsUnderwater, dismountTo, displayFireAnimation, distanceTo, distanceToSqr, distanceToSqr, distanceToSqr, doEnchantDamageEffects, ejectPassengers, equals, extinguishFire, fillCrashReportCategory, findDimensionEntryPoint, fireImmune, fixupDimensions, gameEvent, gameEvent, getAddEntityPacket, getAirSupply, getAllSlots, getBbHeight, getBbWidth, getBlockExplosionResistance, getBlockJumpFactor, getBlockPosBelowThatAffectsMyMovement, getBlockStateOn, getBlockStateOnLegacy, getBlockX, getBlockY, getBlockZ, getBoundingBox, getBoundingBoxForPose, getCollisionHorizontalEscapeVector, getCommandSenderWorld, getControlledVehicle, getControllingPassenger, getCustomName, getDeltaMovement, getDirection, getDismountLocationForPassenger, getEncodeId, getEntityData, getExitPortal, getEyeHeight, getEyeHeight, getEyeHeightAccess, getEyeInFluidType, getEyePosition, getEyePosition, getEyeY, getFeetBlockState, getFirstPassenger, getFluidHeight, getFluidJumpThreshold, getFluidTypeHeight, getForward, getHandHoldingItemAngle, getId, getIndirectPassengers, getLeashOffset, getLeashOffset, getLightLevelDependentMagicValue, getLightProbePosition, getLookAngle, getMaxAirSupply, getMaxFallDistance, getMaxHeightFluidType, getMotionDirection, getNameTagOffsetY, getOnPos, getOnPos, getOnPosLegacy, getPassengers, getPassengersAndSelf, getPassengersRidingOffset, 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, getViewScale, getViewVector, getViewXRot, getX, getX, getXRot, getY, getY, getYRot, getZ, getZ, handleInsidePortal, handleNetherPortal, hasControllingPassenger, hasCustomName, hasExactlyOnePlayerPassenger, hasGlowingTag, hashCode, hasIndirectPassenger, hasPassenger, hasPassenger, hasPermissions, hasPose, 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, 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, level, limitPistonMovement, load, makeBoundingBox, markHurt, mayInteract, mirror, move, moveRelative, moveTo, moveTo, moveTo, moveTo, moveTowardsClosestSpace, newDoubleList, newFloatList, nextStep, onAboveBubbleCol, onAddedToWorld, onClientRemoval, onFlap, onGround, onInsideBlock, onInsideBubbleColumn, onlyOpCanSetNbt, onPassengerTurned, onRemovedFromWorld, onSyncedDataUpdated, pick, playCombinationStepSounds, playEntityOnFireExtinguishedSound, playerTouch, playMuffledStepSound, playSound, playSwimSound, position, positionRider, positionRider, processFlappingMovement, processPortalCooldown, push, reapplyPosition, refreshDimensions, removeAfterChangingDimensions, removePassenger, removeTag, repositionEntityAfterLoad, resetFallDistance, restoreFrom, revive, rotate, save, saveAsPassenger, saveWithoutId, sendSystemMessage, setAirSupply, setBoundingBox, setCustomName, setCustomNameVisible, setDeltaMovement, setDeltaMovement, setFluidTypeHeight, setGlowingTag, setId, setInvisible, setInvulnerable, setIsInPowderSnow, setLevel, setLevelCallback, setMaxUpStep, setNoGravity, setOldPosAndRot, setOnGround, setOnGroundWithKnownMovement, setPortalCooldown, setPortalCooldown, setPos, setPos, setPose, setPosRaw, setRemoved, setRot, setSecondsOnFire, 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
从类继承的方法 net.minecraftforge.common.capabilities.CapabilityProvider
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, serializeCaps
从接口继承的方法 net.minecraft.commands.CommandSource
alwaysAccepts
从接口继承的方法 net.minecraftforge.common.capabilities.ICapabilityProvider
getCapability
从接口继承的方法 net.minecraftforge.common.extensions.IForgeEntity
canBeRiddenUnderFluidType, canFluidExtinguish, canHydrateInFluidType, canRiderInteract, canStartSwimming, canTrample, canUpdate, canUpdate, captureDrops, captureDrops, deserializeNBT, getClassification, getEyeInFluidType, getFluidFallDistanceModifier, getFluidMotionScale, getFluidTypeHeight, getMaxHeightFluidType, getParts, getPersistentData, getPickedResult, getSoundFromFluidType, getStepHeight, hasCustomOutlineRendering, isAddedToWorld, isEyeInFluidType, isInFluidType, isInFluidType, isInFluidType, isInFluidType, isInFluidType, isMultipartEntity, isPushedByFluid, onAddedToWorld, onRemovedFromWorld, revive, serializeNBT, shouldRiderSit
从接口继承的方法 net.minecraftforge.common.extensions.IForgeLivingEntity
canDrownInFluidType, canSwimInFluidType, jumpInFluid, moveInFluid, self, sinkInFluid
从接口继承的方法 net.minecraftforge.common.extensions.IForgePlayer
canReach, canReach, canReach, getBlockReach, getEntityReach, isCloseEnough
-
字段详细资料
-
PERSISTED_NBT_TAG
- 另请参阅:
-
LOGGER
private static final org.slf4j.Logger LOGGER -
MAX_NAME_LENGTH
public static final int MAX_NAME_LENGTH- 另请参阅:
-
MAX_HEALTH
public static final int MAX_HEALTH- 另请参阅:
-
SLEEP_DURATION
public static final int SLEEP_DURATION- 另请参阅:
-
WAKE_UP_DURATION
public static final int WAKE_UP_DURATION- 另请参阅:
-
ENDER_SLOT_OFFSET
public static final int ENDER_SLOT_OFFSET- 另请参阅:
-
CROUCH_BB_HEIGHT
public static final float CROUCH_BB_HEIGHT- 另请参阅:
-
SWIMMING_BB_WIDTH
public static final float SWIMMING_BB_WIDTH- 另请参阅:
-
SWIMMING_BB_HEIGHT
public static final float SWIMMING_BB_HEIGHT- 另请参阅:
-
DEFAULT_EYE_HEIGHT
public static final float DEFAULT_EYE_HEIGHT- 另请参阅:
-
STANDING_DIMENSIONS
-
POSES
-
FLY_ACHIEVEMENT_SPEED
private static final int FLY_ACHIEVEMENT_SPEED- 另请参阅:
-
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- 另请参阅:
-
lastLevelUpTime
private int lastLevelUpTime -
gameProfile
private final com.mojang.authlib.GameProfile gameProfile -
reducedDebugInfo
private boolean reducedDebugInfo -
lastItemInMainHand
-
cooldowns
-
lastDeathLocation
-
fishing
-
hurtDir
protected float hurtDir -
prefixes
-
suffixes
-
forcedPose
-
displayname
-
playerMainHandler
-
playerEquipmentHandler
-
playerJoinedHandler
-
-
构造器详细资料
-
Player
-
-
方法详细资料
-
blockActionRestricted
-
createAttributes
-
defineSynchedData
protected void defineSynchedData()- 覆盖:
defineSynchedData
在类中LivingEntity
-
tick
public void tick()- 覆盖:
tick
在类中LivingEntity
-
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() -
getPortalWaitTime
public int getPortalWaitTime()- 覆盖:
getPortalWaitTime
在类中Entity
-
getSwimSound
- 覆盖:
getSwimSound
在类中Entity
-
getSwimSplashSound
- 覆盖:
getSwimSplashSound
在类中Entity
-
getSwimHighSpeedSplashSound
- 覆盖:
getSwimHighSpeedSplashSound
在类中Entity
-
getDimensionChangingDelay
public int getDimensionChangingDelay()- 覆盖:
getDimensionChangingDelay
在类中Entity
-
playSound
-
playNotifySound
-
getSoundSource
- 覆盖:
getSoundSource
在类中Entity
-
getFireImmuneTicks
protected int getFireImmuneTicks()- 覆盖:
getFireImmuneTicks
在类中Entity
-
handleEntityEvent
public void handleEntityEvent(byte pId) - 覆盖:
handleEntityEvent
在类中LivingEntity
-
addParticlesAroundSelf
-
closeContainer
public void closeContainer() -
doCloseContainer
protected void doCloseContainer() -
rideTick
public void rideTick()- 覆盖:
rideTick
在类中LivingEntity
-
serverAiStep
protected void serverAiStep()- 覆盖:
serverAiStep
在类中LivingEntity
-
aiStep
public void aiStep()- 覆盖:
aiStep
在类中LivingEntity
-
playShoulderEntityAmbientSound
-
touch
-
getScore
public int getScore() -
setScore
public void setScore(int pScore) -
increaseScore
public void increaseScore(int pScore) -
startAutoSpinAttack
public void startAutoSpinAttack(int pAttackTicks) -
die
- 覆盖:
die
在类中LivingEntity
-
dropEquipment
protected void dropEquipment()- 覆盖:
dropEquipment
在类中LivingEntity
-
destroyVanishingCursedItems
protected void destroyVanishingCursedItems() -
getHurtSound
- 覆盖:
getHurtSound
在类中LivingEntity
-
getDeathSound
- 覆盖:
getDeathSound
在类中LivingEntity
-
drop
-
drop
@Nullable public ItemEntity drop(ItemStack pDroppedItem, boolean pDropAround, boolean pIncludeThrowerName) -
getDestroySpeed
已过时。 -
getDigSpeed
-
hasCorrectToolForDrops
-
readAdditionalSaveData
- 覆盖:
readAdditionalSaveData
在类中LivingEntity
-
addAdditionalSaveData
- 覆盖:
addAdditionalSaveData
在类中LivingEntity
-
isInvulnerableTo
- 覆盖:
isInvulnerableTo
在类中Entity
-
hurt
- 覆盖:
hurt
在类中LivingEntity
-
blockUsingShield
- 覆盖:
blockUsingShield
在类中LivingEntity
-
canBeSeenAsEnemy
public boolean canBeSeenAsEnemy()- 覆盖:
canBeSeenAsEnemy
在类中LivingEntity
-
canHarmPlayer
-
hurtArmor
- 覆盖:
hurtArmor
在类中LivingEntity
-
hurtHelmet
- 覆盖:
hurtHelmet
在类中LivingEntity
-
hurtCurrentlyUsedShield
protected void hurtCurrentlyUsedShield(float pDamage) - 覆盖:
hurtCurrentlyUsedShield
在类中LivingEntity
-
actuallyHurt
- 覆盖:
actuallyHurt
在类中LivingEntity
-
onSoulSpeedBlock
protected boolean onSoulSpeedBlock()- 覆盖:
onSoulSpeedBlock
在类中LivingEntity
-
isTextFilteringEnabled
public boolean isTextFilteringEnabled() -
openTextEdit
-
openMinecartCommandBlock
-
openCommandBlock
-
openStructureBlock
-
openJigsawBlock
-
openHorseInventory
-
openMenu
-
sendMerchantOffers
public void sendMerchantOffers(int pContainerId, MerchantOffers pOffers, int pVillagerLevel, int pVillagerXp, boolean pShowProgress, boolean pCanRestock) -
openItemGui
-
interactOn
-
getMyRidingOffset
public double getMyRidingOffset()- 覆盖:
getMyRidingOffset
在类中Entity
-
removeVehicle
public void removeVehicle()- 覆盖:
removeVehicle
在类中Entity
-
isImmobile
protected boolean isImmobile()- 覆盖:
isImmobile
在类中LivingEntity
-
isAffectedByFluids
public boolean isAffectedByFluids()- 覆盖:
isAffectedByFluids
在类中LivingEntity
-
maybeBackOffFromEdge
- 覆盖:
maybeBackOffFromEdge
在类中Entity
-
isAboveGround
private boolean isAboveGround() -
attack
-
doAutoAttackOnTouch
- 覆盖:
doAutoAttackOnTouch
在类中LivingEntity
-
disableShield
public void disableShield(boolean pBecauseOfAxe) -
crit
-
magicCrit
-
sweepAttack
public void sweepAttack() -
respawn
public void respawn() -
remove
- 覆盖:
remove
在类中LivingEntity
-
isLocalPlayer
public boolean isLocalPlayer() -
getGameProfile
public com.mojang.authlib.GameProfile getGameProfile() -
getInventory
-
getAbilities
-
updateTutorialInventoryAction
public void updateTutorialInventoryAction(ItemStack pCarried, ItemStack pClicked, ClickAction pAction) -
hasContainerOpen
public boolean hasContainerOpen() -
startSleepInBed
public com.mojang.datafixers.util.Either<Player.BedSleepingProblem,Unit> startSleepInBed(BlockPos pBedPos) -
stopSleepInBed
public void stopSleepInBed(boolean pWakeImmediately, boolean pUpdateLevelForSleepingPlayers) -
stopSleeping
public void stopSleeping()- 覆盖:
stopSleeping
在类中LivingEntity
-
findRespawnPositionAndUseSpawnBlock
public static Optional<Vec3> findRespawnPositionAndUseSpawnBlock(ServerLevel pServerLevel, BlockPos pSpawnBlockPos, float pPlayerOrientation, boolean pIsRespawnForced, boolean pRespawnAfterWinningTheGame) -
isSleepingLongEnough
public boolean isSleepingLongEnough() -
getSleepTimer
public int getSleepTimer() -
displayClientMessage
-
awardStat
-
awardStat
-
awardStat
-
awardStat
-
resetStat
-
awardRecipes
-
triggerRecipeCrafted
-
awardRecipesByKey
-
resetRecipes
-
jumpFromGround
public void jumpFromGround()- 覆盖:
jumpFromGround
在类中LivingEntity
-
travel
- 覆盖:
travel
在类中LivingEntity
-
updateSwimming
public void updateSwimming()- 覆盖:
updateSwimming
在类中Entity
-
freeAt
-
getSpeed
public float getSpeed()- 覆盖:
getSpeed
在类中LivingEntity
-
checkMovementStatistics
public void checkMovementStatistics(double pDistanceX, double pDistanceY, double pDistanceZ) -
checkRidingStatistics
private void checkRidingStatistics(double pDistanceX, double pDistanceY, double pDistanceZ) -
causeFallDamage
- 覆盖:
causeFallDamage
在类中LivingEntity
-
tryToStartFallFlying
public boolean tryToStartFallFlying() -
startFallFlying
public void startFallFlying() -
stopFallFlying
public void stopFallFlying() -
doWaterSplashEffect
protected void doWaterSplashEffect()- 覆盖:
doWaterSplashEffect
在类中Entity
-
playStepSound
- 覆盖:
playStepSound
在类中Entity
-
getFallSounds
- 覆盖:
getFallSounds
在类中LivingEntity
-
killedEntity
- 覆盖:
killedEntity
在类中Entity
-
makeStuckInBlock
- 覆盖:
makeStuckInBlock
在类中Entity
-
giveExperiencePoints
public void giveExperiencePoints(int pXpPoints) -
getEnchantmentSeed
public int getEnchantmentSeed() -
onEnchantmentPerformed
-
giveExperienceLevels
public void giveExperienceLevels(int pLevels) -
getXpNeededForNextLevel
public int getXpNeededForNextLevel() -
causeFoodExhaustion
public void causeFoodExhaustion(float pExhaustion) -
getWardenSpawnTracker
-
getFoodData
-
canEat
public boolean canEat(boolean pCanAlwaysEat) -
isHurt
public boolean isHurt() -
mayBuild
public boolean mayBuild() -
mayUseItemAt
-
getExperienceReward
public int getExperienceReward()- 覆盖:
getExperienceReward
在类中LivingEntity
-
isAlwaysExperienceDropper
protected boolean isAlwaysExperienceDropper() -
shouldShowName
public boolean shouldShowName()- 覆盖:
shouldShowName
在类中LivingEntity
-
getMovementEmission
- 覆盖:
getMovementEmission
在类中Entity
-
onUpdateAbilities
public void onUpdateAbilities() -
getName
-
getEnderChestInventory
-
getItemBySlot
- 指定者:
getItemBySlot
在类中LivingEntity
-
doesEmitEquipEvent
- 覆盖:
doesEmitEquipEvent
在类中LivingEntity
-
setItemSlot
- 指定者:
setItemSlot
在类中LivingEntity
-
addItem
-
getHandSlots
- 覆盖:
getHandSlots
在类中Entity
-
getArmorSlots
- 指定者:
getArmorSlots
在类中LivingEntity
-
setEntityOnShoulder
-
removeEntitiesOnShoulder
protected void removeEntitiesOnShoulder() -
respawnEntityOnShoulder
-
isSpectator
public abstract boolean isSpectator()- 覆盖:
isSpectator
在类中Entity
-
canBeHitByProjectile
public boolean canBeHitByProjectile()- 覆盖:
canBeHitByProjectile
在类中Entity
-
isSwimming
public boolean isSwimming()- 覆盖:
isSwimming
在类中Entity
-
isCreative
public abstract boolean isCreative() -
isPushedByFluid
public boolean isPushedByFluid()- 覆盖:
isPushedByFluid
在类中Entity
-
getScoreboard
-
getDisplayName
- 指定者:
getDisplayName
在接口中Nameable
- 覆盖:
getDisplayName
在类中Entity
-
decorateDisplayNameComponent
-
getScoreboardName
- 覆盖:
getScoreboardName
在类中Entity
-
getStandingEyeHeight
- 覆盖:
getStandingEyeHeight
在类中LivingEntity
-
setAbsorptionAmount
public void setAbsorptionAmount(float pAmount) - 覆盖:
setAbsorptionAmount
在类中LivingEntity
-
getAbsorptionAmount
public float getAbsorptionAmount()- 覆盖:
getAbsorptionAmount
在类中LivingEntity
-
isModelPartShown
-
getSlot
- 覆盖:
getSlot
在类中LivingEntity
-
isReducedDebugInfo
public boolean isReducedDebugInfo() -
setReducedDebugInfo
public void setReducedDebugInfo(boolean pReducedDebugInfo) -
setRemainingFireTicks
public void setRemainingFireTicks(int pTicks) - 覆盖:
setRemainingFireTicks
在类中Entity
-
getMainArm
- 指定者:
getMainArm
在类中LivingEntity
-
setMainArm
-
getShoulderEntityLeft
-
setShoulderEntityLeft
-
getShoulderEntityRight
-
setShoulderEntityRight
-
getCurrentItemAttackStrengthDelay
public float getCurrentItemAttackStrengthDelay() -
getAttackStrengthScale
public float getAttackStrengthScale(float pAdjustTicks) -
resetAttackStrengthTicker
public void resetAttackStrengthTicker() -
getCooldowns
-
getBlockSpeedFactor
protected float getBlockSpeedFactor()- 覆盖:
getBlockSpeedFactor
在类中LivingEntity
-
getLuck
public float getLuck() -
canUseGameMasterBlocks
public boolean canUseGameMasterBlocks() -
canTakeItem
- 覆盖:
canTakeItem
在类中LivingEntity
-
getDimensions
- 覆盖:
getDimensions
在类中LivingEntity
-
getDismountPoses
- 覆盖:
getDismountPoses
在类中LivingEntity
-
getProjectile
- 覆盖:
getProjectile
在类中LivingEntity
-
eat
- 覆盖:
eat
在类中LivingEntity
-
shouldRemoveSoulSpeed
- 覆盖:
shouldRemoveSoulSpeed
在类中LivingEntity
-
getRopeHoldPosition
- 覆盖:
getRopeHoldPosition
在类中Entity
-
isAlwaysTicking
public boolean isAlwaysTicking()- 指定者:
isAlwaysTicking
在接口中EntityAccess
- 覆盖:
isAlwaysTicking
在类中Entity
-
isScoping
public boolean isScoping() -
shouldBeSaved
public boolean shouldBeSaved()- 指定者:
shouldBeSaved
在接口中EntityAccess
- 覆盖:
shouldBeSaved
在类中Entity
-
getLastDeathLocation
-
setLastDeathLocation
-
getHurtDir
public float getHurtDir()- 覆盖:
getHurtDir
在类中LivingEntity
-
animateHurt
public void animateHurt(float pYaw) - 覆盖:
animateHurt
在类中LivingEntity
-
canSprint
public boolean canSprint() -
getFlyingSpeed
protected float getFlyingSpeed()- 覆盖:
getFlyingSpeed
在类中LivingEntity
-
getPrefixes
-
getSuffixes
-
refreshDisplayName
public void refreshDisplayName()Force the displayed name to refresh, by firingPlayerEvent.NameFormat
, using the real player name as event parameter. -
getCapability
从接口复制的说明: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.- 指定者:
getCapability
在接口中ICapabilityProvider
- 覆盖:
getCapability
在类中LivingEntity
- 参数:
capability
- The capability to checkfacing
- The Side to check from, CAN BE NULL. Null is defined to represent 'internal' or 'self'- 返回:
- The requested an optional holding the requested capability.
-
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
- 返回:
- The forced pose if set, null otherwise
-