Class ServerPlayer

All Implemented Interfaces:
SyncedDataHolder, Attackable, EntityAccess, Nameable, ScoreHolder, IAttachmentHolder, IEntityExtension, ILivingEntityExtension, IPlayerExtension, INBTSerializable<CompoundTag>
Direct Known Subclasses:
FakePlayer

public class ServerPlayer extends Player
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • NEUTRAL_MOB_DEATH_NOTIFICATION_RADII_XZ

      private static final int NEUTRAL_MOB_DEATH_NOTIFICATION_RADII_XZ
      See Also:
    • NEUTRAL_MOB_DEATH_NOTIFICATION_RADII_Y

      private static final int NEUTRAL_MOB_DEATH_NOTIFICATION_RADII_Y
      See Also:
    • FLY_STAT_RECORDING_SPEED

      private static final int FLY_STAT_RECORDING_SPEED
      See Also:
    • BLOCK_INTERACTION_DISTANCE_VERIFICATION_BUFFER

      public static final double BLOCK_INTERACTION_DISTANCE_VERIFICATION_BUFFER
      See Also:
    • ENTITY_INTERACTION_DISTANCE_VERIFICATION_BUFFER

      public static final double ENTITY_INTERACTION_DISTANCE_VERIFICATION_BUFFER
      See Also:
    • ENDER_PEARL_TICKET_RADIUS

      public static final int ENDER_PEARL_TICKET_RADIUS
      See Also:
    • ENDER_PEARLS_TAG

      public static final String ENDER_PEARLS_TAG
      See Also:
    • ENDER_PEARL_DIMENSION_TAG

      public static final String ENDER_PEARL_DIMENSION_TAG
      See Also:
    • CREATIVE_BLOCK_INTERACTION_RANGE_MODIFIER

      private static final AttributeModifier CREATIVE_BLOCK_INTERACTION_RANGE_MODIFIER
    • CREATIVE_ENTITY_INTERACTION_RANGE_MODIFIER

      private static final AttributeModifier CREATIVE_ENTITY_INTERACTION_RANGE_MODIFIER
    • connection

      public ServerGamePacketListenerImpl connection
    • server

      public final MinecraftServer server
    • gameMode

      public final ServerPlayerGameMode gameMode
    • advancements

      private final PlayerAdvancements advancements
    • stats

      private final ServerStatsCounter stats
    • lastRecordedHealthAndAbsorption

      private float lastRecordedHealthAndAbsorption
      the total health of the player, includes actual health and absorption health. Updated every tick.
    • lastRecordedFoodLevel

      private int lastRecordedFoodLevel
    • lastRecordedAirLevel

      private int lastRecordedAirLevel
    • lastRecordedArmor

      private int lastRecordedArmor
    • lastRecordedLevel

      private int lastRecordedLevel
    • lastRecordedExperience

      private int lastRecordedExperience
    • lastSentHealth

      private float lastSentHealth
    • lastSentFood

      private int lastSentFood
    • lastFoodSaturationZero

      private boolean lastFoodSaturationZero
    • lastSentExp

      private int lastSentExp
    • chatVisibility

      private ChatVisiblity chatVisibility
    • particleStatus

      private ParticleStatus particleStatus
    • canChatColor

      private boolean canChatColor
    • lastActionTime

      private long lastActionTime
    • camera

      @Nullable private Entity camera
      The entity the player is currently spectating through.
    • isChangingDimension

      private boolean isChangingDimension
    • seenCredits

      public boolean seenCredits
    • recipeBook

      private final ServerRecipeBook recipeBook
    • levitationStartPos

      @Nullable private Vec3 levitationStartPos
    • levitationStartTime

      private int levitationStartTime
    • disconnected

      private boolean disconnected
    • requestedViewDistance

      private int requestedViewDistance
    • language

      private String language
    • startingToFallPosition

      @Nullable private Vec3 startingToFallPosition
    • enteredNetherPosition

      @Nullable private Vec3 enteredNetherPosition
    • enteredLavaOnVehiclePosition

      @Nullable private Vec3 enteredLavaOnVehiclePosition
    • lastSectionPos

      private SectionPos lastSectionPos
      Player section position as last updated by TicketManager, used by ChunkManager
    • chunkTrackingView

      private ChunkTrackingView chunkTrackingView
    • respawnDimension

      private ResourceKey<Level> respawnDimension
    • respawnPosition

      @Nullable private BlockPos respawnPosition
    • respawnForced

      private boolean respawnForced
    • respawnAngle

      private float respawnAngle
    • textFilter

      private final TextFilter textFilter
    • textFilteringEnabled

      private boolean textFilteringEnabled
    • allowsListing

      private boolean allowsListing
    • spawnExtraParticlesOnFall

      private boolean spawnExtraParticlesOnFall
    • wardenSpawnTracker

      private WardenSpawnTracker wardenSpawnTracker
    • raidOmenPosition

      @Nullable private BlockPos raidOmenPosition
    • lastKnownClientMovement

      private Vec3 lastKnownClientMovement
    • lastClientInput

      private Input lastClientInput
    • enderPearls

      private final Set<ThrownEnderpearl> enderPearls
    • containerSynchronizer

      private final ContainerSynchronizer containerSynchronizer
    • containerListener

      private final ContainerListener containerListener
    • chatSession

      @Nullable private RemoteChatSession chatSession
    • object

      @Nullable public final Object object
    • commandSource

      private final CommandSource commandSource
    • containerCounter

      private int containerCounter
    • wonGame

      public boolean wonGame
    • tabListHeader

      private Component tabListHeader
    • tabListFooter

      private Component tabListFooter
    • hasTabListName

      private boolean hasTabListName
    • tabListDisplayName

      private Component tabListDisplayName
  • Constructor Details

  • Method Details

    • adjustSpawnLocation

      public BlockPos adjustSpawnLocation(ServerLevel p_352206_, BlockPos p_352202_)
      Overrides:
      adjustSpawnLocation in class Entity
    • noCollisionNoLiquid

      private boolean noCollisionNoLiquid(ServerLevel pLevel, AABB pCollisionBox)
    • getCoprime

      private int getCoprime(int pSpawnArea)
    • readAdditionalSaveData

      public void readAdditionalSaveData(CompoundTag pCompound)
      (abstract) Protected helper method to read subclass entity data from NBT.
      Overrides:
      readAdditionalSaveData in class Player
    • addAdditionalSaveData

      public void addAdditionalSaveData(CompoundTag pCompound)
      Overrides:
      addAdditionalSaveData in class Player
    • saveParentVehicle

      private void saveParentVehicle(CompoundTag pTag)
    • loadAndSpawnParentVehicle

      public void loadAndSpawnParentVehicle(Optional<CompoundTag> pTag)
    • saveEnderPearls

      private void saveEnderPearls(CompoundTag pTag)
    • loadAndSpawnEnderpearls

      public void loadAndSpawnEnderpearls(Optional<CompoundTag> pTag)
    • setExperiencePoints

      public void setExperiencePoints(int pExperiencePoints)
    • setExperienceLevels

      public void setExperienceLevels(int pLevel)
    • giveExperienceLevels

      public void giveExperienceLevels(int pLevels)
      Add experience levels to this player.
      Overrides:
      giveExperienceLevels in class Player
    • onEnchantmentPerformed

      public void onEnchantmentPerformed(ItemStack pEnchantedItem, int pCost)
      Overrides:
      onEnchantmentPerformed in class Player
    • initMenu

      private void initMenu(AbstractContainerMenu pMenu)
    • initInventoryMenu

      public void initInventoryMenu()
    • onEnterCombat

      public void onEnterCombat()
      Overrides:
      onEnterCombat in class LivingEntity
    • onLeaveCombat

      public void onLeaveCombat()
      Overrides:
      onLeaveCombat in class LivingEntity
    • onInsideBlock

      public void onInsideBlock(BlockState pState)
      Overrides:
      onInsideBlock in class Entity
    • createItemCooldowns

      protected ItemCooldowns createItemCooldowns()
      Overrides:
      createItemCooldowns in class Player
    • tick

      public void tick()
      Overrides:
      tick in class Player
    • updatePlayerAttributes

      private void updatePlayerAttributes()
    • doTick

      public void doTick()
    • synchronizeSpecialItemUpdates

      private void synchronizeSpecialItemUpdates(ItemStack pStack)
    • tickRegeneration

      protected void tickRegeneration()
      Overrides:
      tickRegeneration in class Player
    • resetFallDistance

      public void resetFallDistance()
      Overrides:
      resetFallDistance in class Entity
    • trackStartFallingPosition

      public void trackStartFallingPosition()
    • trackEnteredOrExitedLavaOnVehicle

      public void trackEnteredOrExitedLavaOnVehicle()
    • updateScoreForCriteria

      private void updateScoreForCriteria(ObjectiveCriteria pCriteria, int pPoints)
    • die

      public void die(DamageSource pCause)
      Called when the mob's health reaches 0.
      Overrides:
      die in class Player
    • tellNeutralMobsThatIDied

      private void tellNeutralMobsThatIDied()
    • awardKillScore

      public void awardKillScore(Entity p_9050_, DamageSource p_9052_)
      Overrides:
      awardKillScore in class Entity
    • handleTeamKill

      private void handleTeamKill(ScoreHolder pScoreHolder, ScoreHolder pTeamMember, ObjectiveCriteria[] pCrtieria)
    • hurtServer

      public boolean hurtServer(ServerLevel p_376762_, DamageSource p_376676_, float p_376089_)
      Overrides:
      hurtServer in class Player
    • canHarmPlayer

      public boolean canHarmPlayer(Player pOther)
      Overrides:
      canHarmPlayer in class Player
    • isPvpAllowed

      private boolean isPvpAllowed()
    • findRespawnPositionAndUseSpawnBlock

      public TeleportTransition findRespawnPositionAndUseSpawnBlock(boolean pUseCharge, TeleportTransition.PostTeleportTransition pPostTeleportTransition)
    • findRespawnAndUseSpawnBlock

      private static Optional<ServerPlayer.RespawnPosAngle> findRespawnAndUseSpawnBlock(ServerLevel pLevel, BlockPos pPos, float pAngle, boolean pForced, boolean pUseCharge)
    • showEndCredits

      public void showEndCredits()
    • teleport

      @Nullable public ServerPlayer teleport(TeleportTransition p_379854_)
      Overrides:
      teleport in class Entity
    • forceSetRotation

      public void forceSetRotation(float p_380337_, float p_380190_)
      Overrides:
      forceSetRotation in class Entity
    • triggerDimensionChangeTriggers

      private void triggerDimensionChangeTriggers(ServerLevel pLevel)
    • broadcastToPlayer

      public boolean broadcastToPlayer(ServerPlayer pPlayer)
      Overrides:
      broadcastToPlayer in class Entity
    • take

      public void take(Entity pEntity, int pQuantity)
      Called when the entity picks up an item.
      Overrides:
      take in class LivingEntity
    • startSleepInBed

      public com.mojang.datafixers.util.Either<Player.BedSleepingProblem,Unit> startSleepInBed(BlockPos pAt)
      Overrides:
      startSleepInBed in class Player
    • startSleeping

      public void startSleeping(BlockPos pPos)
      Overrides:
      startSleeping in class LivingEntity
    • bedInRange

      private boolean bedInRange(BlockPos pPos, Direction pDirection)
    • isReachableBedBlock

      private boolean isReachableBedBlock(BlockPos pPos)
    • bedBlocked

      private boolean bedBlocked(BlockPos pPos, Direction pDirection)
    • stopSleepInBed

      public void stopSleepInBed(boolean p_9165_, boolean p_9166_)
      Overrides:
      stopSleepInBed in class Player
    • dismountTo

      public void dismountTo(double p_143389_, double p_143390_, double p_143391_)
      Overrides:
      dismountTo in class Entity
    • isInvulnerableTo

      public boolean isInvulnerableTo(ServerLevel p_376413_, DamageSource p_9182_)
      Overrides:
      isInvulnerableTo in class Player
    • onChangedBlock

      protected void onChangedBlock(ServerLevel p_346052_, BlockPos p_9206_)
      Overrides:
      onChangedBlock in class LivingEntity
    • checkFallDamage

      protected void checkFallDamage(double pY, boolean pOnGround, BlockState pState, BlockPos pPos)
      Overrides:
      checkFallDamage in class LivingEntity
    • onExplosionHit

      public void onExplosionHit(@Nullable Entity p_326351_)
      Overrides:
      onExplosionHit in class Entity
    • pushEntities

      protected void pushEntities()
      Overrides:
      pushEntities in class LivingEntity
    • openTextEdit

      public void openTextEdit(SignBlockEntity p_277909_, boolean p_277495_)
      Overrides:
      openTextEdit in class Player
    • nextContainerCounter

      private void nextContainerCounter()
    • openMenu

      public OptionalInt openMenu(@Nullable MenuProvider p_9033_)
      Overrides:
      openMenu in class Player
    • openMenu

      public OptionalInt openMenu(@Nullable MenuProvider p_9033_, @Nullable Consumer<RegistryFriendlyByteBuf> extraDataWriter)
      Description copied from interface: IPlayerExtension
      Request to open a GUI on the client, from the server

      Refer to IMenuTypeExtension.create(IContainerFactory) for creating a MenuType that can consume the extra data sent to the client by this method.

      The maximum size for #extraDataWriter is 32600 bytes.

      Parameters:
      p_9033_ - A supplier of container properties including the registry name of the container
      extraDataWriter - Consumer to write any additional data the GUI needs. This data is written after
      invalid reference
      IMenuProviderExtension#writeClientSideData(AbstractContainerMenu, RegistryFriendlyByteBuf)
      .
      Returns:
      The window ID of the opened GUI, or empty if the GUI could not be opened
    • sendMerchantOffers

      public void sendMerchantOffers(int pContainerId, MerchantOffers pOffers, int pLevel, int pXp, boolean p_8992_, boolean p_8993_)
      Overrides:
      sendMerchantOffers in class Player
    • openHorseInventory

      public void openHorseInventory(AbstractHorse pHorse, Container pInventory)
      Overrides:
      openHorseInventory in class Player
    • openItemGui

      public void openItemGui(ItemStack pStack, InteractionHand pHand)
      Overrides:
      openItemGui in class Player
    • openCommandBlock

      public void openCommandBlock(CommandBlockEntity pCommandBlock)
      Overrides:
      openCommandBlock in class Player
    • closeContainer

      public void closeContainer()
      Overrides:
      closeContainer in class Player
    • doCloseContainer

      public void doCloseContainer()
      Overrides:
      doCloseContainer in class Player
    • rideTick

      public void rideTick()
      Overrides:
      rideTick in class Player
    • checkMovementStatistics

      public void checkMovementStatistics(double pDx, double pDy, double pDz)
    • checkRidingStatistics

      public void checkRidingStatistics(double pDx, double pDy, double pDz)
    • didNotMove

      private static boolean didNotMove(double pDx, double pDy, double pDz)
    • awardStat

      public void awardStat(Stat<?> pStat, int pAmount)
      Adds a value to a statistic field.
      Overrides:
      awardStat in class Player
    • resetStat

      public void resetStat(Stat<?> pStat)
      Overrides:
      resetStat in class Player
    • awardRecipes

      public int awardRecipes(Collection<RecipeHolder<?>> p_9129_)
      Overrides:
      awardRecipes in class Player
    • triggerRecipeCrafted

      public void triggerRecipeCrafted(RecipeHolder<?> p_301156_, List<ItemStack> p_282336_)
      Overrides:
      triggerRecipeCrafted in class Player
    • awardRecipesByKey

      public void awardRecipesByKey(List<ResourceKey<Recipe<?>>> p_312811_)
      Overrides:
      awardRecipesByKey in class Player
    • resetRecipes

      public int resetRecipes(Collection<RecipeHolder<?>> p_9195_)
      Overrides:
      resetRecipes in class Player
    • jumpFromGround

      public void jumpFromGround()
      Overrides:
      jumpFromGround in class LivingEntity
    • giveExperiencePoints

      public void giveExperiencePoints(int p_9208_)
      Overrides:
      giveExperiencePoints in class Player
    • disconnect

      public void disconnect()
    • hasDisconnected

      public boolean hasDisconnected()
    • resetSentInfo

      public void resetSentInfo()
    • displayClientMessage

      public void displayClientMessage(Component p_9154_, boolean p_9155_)
      Overrides:
      displayClientMessage in class Player
    • completeUsingItem

      protected void completeUsingItem()
      Overrides:
      completeUsingItem in class LivingEntity
    • lookAt

      public void lookAt(EntityAnchorArgument.Anchor pAnchor, Vec3 pTarget)
      Overrides:
      lookAt in class LivingEntity
    • lookAt

      public void lookAt(EntityAnchorArgument.Anchor pFromAnchor, Entity pEntity, EntityAnchorArgument.Anchor pToAnchor)
    • restoreFrom

      public void restoreFrom(ServerPlayer pThat, boolean pKeepEverything)
    • onEffectAdded

      protected void onEffectAdded(MobEffectInstance p_143393_, @Nullable Entity p_143394_)
      Overrides:
      onEffectAdded in class LivingEntity
    • onEffectUpdated

      protected void onEffectUpdated(MobEffectInstance p_143396_, boolean p_143397_, @Nullable Entity p_143398_)
      Overrides:
      onEffectUpdated in class LivingEntity
    • onEffectsRemoved

      protected void onEffectsRemoved(Collection<MobEffectInstance> p_366811_)
      Overrides:
      onEffectsRemoved in class LivingEntity
    • teleportTo

      public void teleportTo(double pX, double pY, double pZ)
      Sets the position of the entity and updates the 'last' variables
      Overrides:
      teleportTo in class Entity
    • teleportRelative

      public void teleportRelative(double p_251611_, double p_248861_, double p_252266_)
      Overrides:
      teleportRelative in class Entity
    • teleportTo

      public boolean teleportTo(ServerLevel p_265564_, double p_265424_, double p_265680_, double p_265312_, Set<Relative> p_265192_, float p_265059_, float p_265266_, boolean p_361029_)
      Overrides:
      teleportTo in class Entity
    • moveTo

      public void moveTo(double pX, double pY, double pZ)
      Overrides:
      moveTo in class Entity
    • crit

      public void crit(Entity pEntityHit)
      Called when the entity is dealt a critical hit.
      Overrides:
      crit in class Player
    • magicCrit

      public void magicCrit(Entity pEntityHit)
      Description copied from class: Player
      Called when the entity hit is dealt extra melee damage due to an enchantment.
      Overrides:
      magicCrit in class Player
    • onUpdateAbilities

      public void onUpdateAbilities()
      Overrides:
      onUpdateAbilities in class Player
    • serverLevel

      public ServerLevel serverLevel()
    • setGameMode

      public boolean setGameMode(GameType pGameMode)
    • isSpectator

      public boolean isSpectator()
      Specified by:
      isSpectator in class Player
    • isCreative

      public boolean isCreative()
      Specified by:
      isCreative in class Player
    • commandSource

      public CommandSource commandSource()
    • createCommandSourceStack

      public CommandSourceStack createCommandSourceStack()
    • sendSystemMessage

      public void sendSystemMessage(Component pMesage)
    • sendSystemMessage

      public void sendSystemMessage(Component pMessage, boolean pOverlay)
    • sendChatMessage

      public void sendChatMessage(OutgoingChatMessage pMessage, boolean pFiltered, ChatType.Bound pBoundType)
    • getIpAddress

      public String getIpAddress()
    • updateOptions

      public void updateOptions(ClientInformation pClientInformation)
    • clientInformation

      public ClientInformation clientInformation()
    • canChatInColor

      public boolean canChatInColor()
    • getChatVisibility

      public ChatVisiblity getChatVisibility()
    • acceptsSystemMessages

      private boolean acceptsSystemMessages(boolean pOverlay)
    • acceptsChatMessages

      private boolean acceptsChatMessages()
    • requestedViewDistance

      public int requestedViewDistance()
    • sendServerStatus

      public void sendServerStatus(ServerStatus pServerStatus)
    • getPermissionLevel

      public int getPermissionLevel()
      Overrides:
      getPermissionLevel in class Player
    • resetLastActionTime

      public void resetLastActionTime()
    • getStats

      public ServerStatsCounter getStats()
    • getRecipeBook

      public ServerRecipeBook getRecipeBook()
    • updateInvisibilityStatus

      protected void updateInvisibilityStatus()
      Overrides:
      updateInvisibilityStatus in class LivingEntity
    • getCamera

      public Entity getCamera()
    • setCamera

      public void setCamera(@Nullable Entity pEntityToSpectate)
    • processPortalCooldown

      protected void processPortalCooldown()
      Overrides:
      processPortalCooldown in class Entity
    • attack

      public void attack(Entity pTargetEntity)
      Attacks for the player the targeted entity with the currently equipped item. The equipped item has hitEntity called on it. Args: targetEntity
      Overrides:
      attack in class Player
    • getLastActionTime

      public long getLastActionTime()
    • getTabListDisplayName

      @Nullable public Component getTabListDisplayName()
    • getTabListOrder

      public int getTabListOrder()
    • swing

      public void swing(InteractionHand pHand)
      Overrides:
      swing in class LivingEntity
    • isChangingDimension

      public boolean isChangingDimension()
    • hasChangedDimension

      public void hasChangedDimension()
    • getAdvancements

      public PlayerAdvancements getAdvancements()
    • getRespawnPosition

      @Nullable public BlockPos getRespawnPosition()
    • getRespawnAngle

      public float getRespawnAngle()
    • getRespawnDimension

      public ResourceKey<Level> getRespawnDimension()
    • isRespawnForced

      public boolean isRespawnForced()
    • copyRespawnPosition

      public void copyRespawnPosition(ServerPlayer pPlayer)
    • setRespawnPosition

      public void setRespawnPosition(ResourceKey<Level> pDimension, @Nullable BlockPos pPosition, float pAngle, boolean pForced, boolean pSendMessage)
    • getLastSectionPos

      public SectionPos getLastSectionPos()
    • setLastSectionPos

      public void setLastSectionPos(SectionPos pSectionPos)
    • getChunkTrackingView

      public ChunkTrackingView getChunkTrackingView()
    • setChunkTrackingView

      public void setChunkTrackingView(ChunkTrackingView pChunkTrackingView)
    • playNotifySound

      public void playNotifySound(SoundEvent p_9019_, SoundSource p_9020_, float p_9021_, float p_9022_)
      Overrides:
      playNotifySound in class Player
    • drop

      public ItemEntity drop(ItemStack pDroppedItem, boolean pDropAround, boolean pTraceItem)
      Description copied from class: Player
      Creates and drops the provided item. Depending on the dropAround, it will drop the item around the player, instead of dropping the item from where the player is pointing at. Likewise, if includeThrowerName is true, the dropped item entity will have the thrower set as the player.
      Overrides:
      drop in class Player
    • createItemStackToDrop

      @Nullable private ItemEntity createItemStackToDrop(ItemStack pDroppedItem, boolean pDropAround, boolean pIncludeThrowerName)
    • getLanguage

      public String getLanguage()
      Returns the language last reported by the player as their local language. Defaults to en_us if the value is unknown.
    • getTabListHeader

      public Component getTabListHeader()
    • setTabListHeader

      public void setTabListHeader(Component header)
      Set the tab list header while preserving the footer.
      Parameters:
      header - the new header, or Component.empty() to clear
    • getTabListFooter

      public Component getTabListFooter()
    • setTabListFooter

      public void setTabListFooter(Component footer)
      Set the tab list footer while preserving the header.
      Parameters:
      footer - the new footer, or Component.empty() to clear
    • setTabListHeaderFooter

      public void setTabListHeaderFooter(Component header, Component footer)
      Set the tab list header and footer at once.
      Parameters:
      header - the new header, or Component.empty() to clear
      footer - the new footer, or Component.empty() to clear
    • refreshTabListName

      public void refreshTabListName()
      Force the name displayed in the tab list to refresh, by firing PlayerEvent.TabListNameFormat.
    • getTextFilter

      public TextFilter getTextFilter()
    • setServerLevel

      public void setServerLevel(ServerLevel pLevel)
    • readPlayerMode

      @Nullable private static GameType readPlayerMode(@Nullable CompoundTag pTag, String pKey)
    • calculateGameModeForNewPlayer

      private GameType calculateGameModeForNewPlayer(@Nullable GameType pGameType)
    • loadGameTypes

      public void loadGameTypes(@Nullable CompoundTag pTag)
    • storeGameTypes

      private void storeGameTypes(CompoundTag pTag)
    • isTextFilteringEnabled

      public boolean isTextFilteringEnabled()
      Overrides:
      isTextFilteringEnabled in class Player
    • shouldFilterMessageTo

      public boolean shouldFilterMessageTo(ServerPlayer pPlayer)
    • mayInteract

      public boolean mayInteract(ServerLevel p_376296_, BlockPos p_143407_)
      Overrides:
      mayInteract in class Entity
    • updateUsingItem

      protected void updateUsingItem(ItemStack p_143402_)
      Overrides:
      updateUsingItem in class LivingEntity
    • drop

      public boolean drop(boolean pDropStack)
      Parameters:
      pDropStack - Whether to drop the entire stack of items. If false, drops a single item.
    • handleExtraItemsCreatedOnUse

      public void handleExtraItemsCreatedOnUse(ItemStack p_376376_)
      Overrides:
      handleExtraItemsCreatedOnUse in class LivingEntity
    • allowsListing

      public boolean allowsListing()
    • getWardenSpawnTracker

      public Optional<WardenSpawnTracker> getWardenSpawnTracker()
      Overrides:
      getWardenSpawnTracker in class Player
    • setSpawnExtraParticlesOnFall

      public void setSpawnExtraParticlesOnFall(boolean pSpawnExtraParticlesOnFall)
    • onItemPickup

      public void onItemPickup(ItemEntity p_215095_)
      Overrides:
      onItemPickup in class LivingEntity
    • setChatSession

      public void setChatSession(RemoteChatSession pChatSession)
    • getChatSession

      @Nullable public RemoteChatSession getChatSession()
    • indicateDamage

      public void indicateDamage(double p_270621_, double p_270478_)
      Overrides:
      indicateDamage in class LivingEntity
    • startRiding

      public boolean startRiding(Entity p_277395_, boolean p_278062_)
      Overrides:
      startRiding in class Entity
    • stopRiding

      public void stopRiding()
      Overrides:
      stopRiding in class LivingEntity
    • createCommonSpawnInfo

      public CommonPlayerSpawnInfo createCommonSpawnInfo(ServerLevel pLevel)
    • setRaidOmenPosition

      public void setRaidOmenPosition(BlockPos pRaidOmenPosition)
    • clearRaidOmenPosition

      public void clearRaidOmenPosition()
    • getRaidOmenPosition

      @Nullable public BlockPos getRaidOmenPosition()
    • getKnownMovement

      public Vec3 getKnownMovement()
      Overrides:
      getKnownMovement in class Entity
    • setKnownMovement

      public void setKnownMovement(Vec3 pKnownMovement)
    • getEnchantedDamage

      protected float getEnchantedDamage(Entity p_346252_, float p_346142_, DamageSource p_345841_)
      Overrides:
      getEnchantedDamage in class Player
    • onEquippedItemBroken

      public void onEquippedItemBroken(Item p_348565_, EquipmentSlot p_348623_)
      Overrides:
      onEquippedItemBroken in class LivingEntity
    • getLastClientInput

      public Input getLastClientInput()
    • setLastClientInput

      public void setLastClientInput(Input pLastClientInput)
    • getLastClientMoveIntent

      public Vec3 getLastClientMoveIntent()
    • registerEnderPearl

      public void registerEnderPearl(ThrownEnderpearl pEnderPearl)
    • deregisterEnderPearl

      public void deregisterEnderPearl(ThrownEnderpearl pEnderPearl)
    • getEnderPearls

      public Set<ThrownEnderpearl> getEnderPearls()
    • registerAndUpdateEnderPearlTicket

      public long registerAndUpdateEnderPearlTicket(ThrownEnderpearl pEnderPearl)
    • placeEnderPearlTicket

      public static long placeEnderPearlTicket(ServerLevel pLevel, ChunkPos pPos)