Uses of Class
net.minecraft.entity.player.PlayerEntity
Package
Description
This and its subpackages make up the brain system used by some modern Minecraft entities,
such as villagers, piglins, and axolotls.
The basic AI system for Minecraft living entities.
-
Uses of PlayerEntity in net.minecraft.block
Modifier and TypeMethodDescriptionvoid
BeehiveBlock.afterBreak
(World world, PlayerEntity player, BlockPos pos, BlockState state, @Nullable BlockEntity blockEntity, ItemStack stack) Called server-side when the block is broken by the player using correct tool.void
Block.afterBreak
(World world, PlayerEntity player, BlockPos pos, BlockState state, @Nullable BlockEntity blockEntity, ItemStack stack) Called server-side when the block is broken by the player using correct tool.void
IceBlock.afterBreak
(World world, PlayerEntity player, BlockPos pos, BlockState state, @Nullable BlockEntity blockEntity, ItemStack stack) Called server-side when the block is broken by the player using correct tool.void
TallPlantBlock.afterBreak
(World world, PlayerEntity player, BlockPos pos, BlockState state, @Nullable BlockEntity blockEntity, ItemStack stack) Called server-side when the block is broken by the player using correct tool.void
TurtleEggBlock.afterBreak
(World world, PlayerEntity player, BlockPos pos, BlockState state, @Nullable BlockEntity blockEntity, ItemStack stack) Called server-side when the block is broken by the player using correct tool.float
AbstractBlock.AbstractBlockState.calcBlockBreakingDelta
(PlayerEntity player, BlockView world, BlockPos pos) float
AbstractBlock.calcBlockBreakingDelta
(BlockState state, PlayerEntity player, BlockView world, BlockPos pos) Deprecated.float
BambooBlock.calcBlockBreakingDelta
(BlockState state, PlayerEntity player, BlockView world, BlockPos pos) float
BambooSaplingBlock.calcBlockBreakingDelta
(BlockState state, PlayerEntity player, BlockView world, BlockPos pos) static void
AbstractCandleBlock.extinguish
(@Nullable PlayerEntity player, BlockState state, WorldAccess world, BlockPos pos) void
AbstractBlock.AbstractBlockState.onBlockBreakStart
(World world, BlockPos pos, PlayerEntity player) void
AbstractBlock.onBlockBreakStart
(BlockState state, World world, BlockPos pos, PlayerEntity player) void
DragonEggBlock.onBlockBreakStart
(BlockState state, World world, BlockPos pos, PlayerEntity player) Called when a player starts breaking the block (including when instant-mining).void
NoteBlock.onBlockBreakStart
(BlockState state, World world, BlockPos pos, PlayerEntity player) Called when a player starts breaking the block (including when instant-mining).void
RedstoneOreBlock.onBlockBreakStart
(BlockState state, World world, BlockPos pos, PlayerEntity player) Called when a player starts breaking the block (including when instant-mining).void
StairsBlock.onBlockBreakStart
(BlockState state, World world, BlockPos pos, PlayerEntity player) Called when a player starts breaking the block (including when instant-mining).void
AbstractFireBlock.onBreak
(World world, BlockPos pos, BlockState state, PlayerEntity player) Called when a player breaks a block before the block is removed from the world.void
BedBlock.onBreak
(World world, BlockPos pos, BlockState state, PlayerEntity player) Called when a player breaks a block before the block is removed from the world.void
BeehiveBlock.onBreak
(World world, BlockPos pos, BlockState state, PlayerEntity player) Called when a player breaks a block before the block is removed from the world.void
Block.onBreak
(World world, BlockPos pos, BlockState state, PlayerEntity player) Called when a player breaks a block before the block is removed from the world.void
DoorBlock.onBreak
(World world, BlockPos pos, BlockState state, PlayerEntity player) Called when a player breaks a block before the block is removed from the world.void
PistonHeadBlock.onBreak
(World world, BlockPos pos, BlockState state, PlayerEntity player) Called when a player breaks a block before the block is removed from the world.void
ShulkerBoxBlock.onBreak
(World world, BlockPos pos, BlockState state, PlayerEntity player) Called when a player breaks a block before the block is removed from the world.void
TallPlantBlock.onBreak
(World world, BlockPos pos, BlockState state, PlayerEntity player) Called when a player breaks a block before the block is removed from the world.void
TntBlock.onBreak
(World world, BlockPos pos, BlockState state, PlayerEntity player) Called when a player breaks a block before the block is removed from the world.void
TripwireBlock.onBreak
(World world, BlockPos pos, BlockState state, PlayerEntity player) Called when a player breaks a block before the block is removed from the world.protected static void
TallPlantBlock.onBreakInCreative
(World world, BlockPos pos, BlockState state, PlayerEntity player) Destroys a bottom half of a tall double block (such as a plant or a door) without dropping an item when broken in creative.AbstractBlock.AbstractBlockState.onUse
(World world, PlayerEntity player, Hand hand, BlockHitResult hit) AbstractBlock.onUse
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) AbstractButtonBlock.onUse
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.AbstractCauldronBlock.onUse
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.AbstractFurnaceBlock.onUse
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.AbstractSignBlock.onUse
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.AnvilBlock.onUse
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.BarrelBlock.onUse
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.BeaconBlock.onUse
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.BedBlock.onUse
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.BeehiveBlock.onUse
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.BellBlock.onUse
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.BrewingStandBlock.onUse
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.CakeBlock.onUse
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.CampfireBlock.onUse
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.CandleBlock.onUse
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.CandleCakeBlock.onUse
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.CartographyTableBlock.onUse
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.CaveVinesBodyBlock.onUse
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.CaveVinesHeadBlock.onUse
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.ChestBlock.onUse
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.CommandBlock.onUse
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.ComparatorBlock.onUse
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.ComposterBlock.onUse
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.CraftingTableBlock.onUse
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.DaylightDetectorBlock.onUse
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.DispenserBlock.onUse
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.DoorBlock.onUse
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.DragonEggBlock.onUse
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.EnchantingTableBlock.onUse
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.EnderChestBlock.onUse
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.FenceBlock.onUse
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.FenceGateBlock.onUse
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.FletchingTableBlock.onUse
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.FlowerPotBlock.onUse
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.GrindstoneBlock.onUse
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.HopperBlock.onUse
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.JigsawBlock.onUse
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.JukeboxBlock.onUse
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.LecternBlock.onUse
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.LeverBlock.onUse
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.LightBlock.onUse
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.LoomBlock.onUse
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.NoteBlock.onUse
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.PistonExtensionBlock.onUse
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.PumpkinBlock.onUse
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.RedstoneOreBlock.onUse
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.RedstoneWireBlock.onUse
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.RepeaterBlock.onUse
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.RespawnAnchorBlock.onUse
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.ShulkerBoxBlock.onUse
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.SmithingTableBlock.onUse
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.StairsBlock.onUse
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.StonecutterBlock.onUse
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.StructureBlock.onUse
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.SweetBerryBushBlock.onUse
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.TntBlock.onUse
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.TrapdoorBlock.onUse
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) Called when this block is used by a player.protected abstract void
AbstractFurnaceBlock.openScreen
(World world, BlockPos pos, PlayerEntity player) protected void
BlastFurnaceBlock.openScreen
(World world, BlockPos pos, PlayerEntity player) protected void
FurnaceBlock.openScreen
(World world, BlockPos pos, PlayerEntity player) private void
LecternBlock.openScreen
(World world, BlockPos pos, PlayerEntity player) protected void
SmokerBlock.openScreen
(World world, BlockPos pos, PlayerEntity player) protected void
AbstractButtonBlock.playClickSound
(@Nullable PlayerEntity player, WorldAccess world, BlockPos pos, boolean powered) protected void
TrapdoorBlock.playToggleSound
(@Nullable PlayerEntity player, World world, BlockPos pos, boolean open) private static void
LecternBlock.putBook
(@Nullable PlayerEntity player, World world, BlockPos pos, BlockState state, ItemStack stack) static boolean
LecternBlock.putBookIfAbsent
(@Nullable PlayerEntity player, World world, BlockPos pos, BlockState state, ItemStack stack) boolean
BellBlock.ring
(World world, BlockState state, BlockHitResult hitResult, @Nullable PlayerEntity player, boolean bool) protected void
AbstractFireBlock.spawnBreakParticles
(World world, PlayerEntity player, BlockPos pos, BlockState state) protected void
Block.spawnBreakParticles
(World world, PlayerEntity player, BlockPos pos, BlockState state) void
BeehiveBlock.takeHoney
(World world, BlockState state, BlockPos pos, @Nullable PlayerEntity player, BeehiveBlockEntity.BeeState beeState) protected static ActionResult
CakeBlock.tryEat
(WorldAccess world, BlockPos pos, BlockState state, PlayerEntity player) -
Uses of PlayerEntity in net.minecraft.block.cauldron
Modifier and TypeMethodDescriptionstatic ActionResult
CauldronBehavior.emptyCauldron
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, ItemStack stack, ItemStack output, Predicate<BlockState> predicate, SoundEvent soundEvent) static ActionResult
CauldronBehavior.fillCauldron
(World world, BlockPos pos, PlayerEntity player, Hand hand, ItemStack stack, BlockState state, SoundEvent soundEvent) CauldronBehavior.interact
(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, ItemStack stack) -
Uses of PlayerEntity in net.minecraft.block.entity
Modifier and TypeMethodDescriptionvoid
BeehiveBlockEntity.angerBees
(@Nullable PlayerEntity player, BlockState state, BeehiveBlockEntity.BeeState beeState) boolean
AbstractFurnaceBlockEntity.canPlayerUse
(PlayerEntity player) boolean
BrewingStandBlockEntity.canPlayerUse
(PlayerEntity player) boolean
EnderChestBlockEntity.canPlayerUse
(PlayerEntity player) boolean
LootableContainerBlockEntity.canPlayerUse
(PlayerEntity player) void
LootableContainerBlockEntity.checkLootInteraction
(@Nullable PlayerEntity player) boolean
LockableContainerBlockEntity.checkUnlocked
(PlayerEntity player) static boolean
LockableContainerBlockEntity.checkUnlocked
(PlayerEntity player, ContainerLock lock, Text containerName) boolean
LootableContainerBlockEntity.checkUnlocked
(PlayerEntity player) void
ViewerCountManager.closeContainer
(PlayerEntity player, World world, BlockPos pos, BlockState state) BeaconBlockEntity.createMenu
(int syncId, PlayerInventory inv, PlayerEntity player) LecternBlockEntity.createMenu
(int syncId, PlayerInventory inv, PlayerEntity player) LockableContainerBlockEntity.createMenu
(int syncId, PlayerInventory inv, PlayerEntity player) LootableContainerBlockEntity.createMenu
(int syncId, PlayerInventory inv, PlayerEntity player) private ServerCommandSource
LecternBlockEntity.getCommandSource
(@Nullable PlayerEntity player) protected abstract boolean
ViewerCountManager.isPlayerViewing
(PlayerEntity player) Determines whether the given player is currently viewing this container.void
BarrelBlockEntity.onClose
(PlayerEntity player) void
ChestBlockEntity.onClose
(PlayerEntity player) void
EnderChestBlockEntity.onClose
(PlayerEntity player) void
ShulkerBoxBlockEntity.onClose
(PlayerEntity player) void
BarrelBlockEntity.onOpen
(PlayerEntity player) void
ChestBlockEntity.onOpen
(PlayerEntity player) void
EnderChestBlockEntity.onOpen
(PlayerEntity player) void
ShulkerBoxBlockEntity.onOpen
(PlayerEntity player) void
ViewerCountManager.openContainer
(PlayerEntity player, World world, BlockPos pos, BlockState state) boolean
StructureBlockBlockEntity.openScreen
(PlayerEntity player) private ItemStack
LecternBlockEntity.resolveBook
(ItemStack book, @Nullable PlayerEntity player) void
LecternBlockEntity.setBook
(ItemStack book, @Nullable PlayerEntity player) void
AbstractFurnaceBlockEntity.unlockLastRecipe
(PlayerEntity player) -
Uses of PlayerEntity in net.minecraft.client.gui.hud
Modifier and TypeMethodDescription(package private) static InGameHud.HeartType
InGameHud.HeartType.fromPlayerState
(PlayerEntity player) private static @Nullable BlockState
InGameOverlayRenderer.getInWallBlockState
(PlayerEntity player) private void
InGameHud.renderHealthBar
(MatrixStack matrices, PlayerEntity player, int x, int y, int lines, int regeneratingHeartIndex, float maxHealth, int lastHealth, int health, int absorption, boolean blinking) private void
InGameHud.renderHotbarItem
(int x, int y, float tickDelta, PlayerEntity player, ItemStack stack, int seed) -
Uses of PlayerEntity in net.minecraft.client.gui.screen.ingame
Modifier and TypeFieldDescriptionprivate final PlayerEntity
AnvilScreen.player
private final PlayerEntity
BookEditScreen.player
Modifier and TypeMethodDescriptionboolean
CreativeInventoryScreen.CreativeSlot.canTakeItems
(PlayerEntity playerEntity) boolean
CreativeInventoryScreen.LockableSlot.canTakeItems
(PlayerEntity playerEntity) boolean
CreativeInventoryScreen.CreativeScreenHandler.canUse
(PlayerEntity player) void
CreativeInventoryScreen.CreativeSlot.onTakeItem
(PlayerEntity player, ItemStack stack) CreativeInventoryScreen.CreativeScreenHandler.transferSlot
(PlayerEntity player, int index) ModifierConstructorDescriptionBookEditScreen
(PlayerEntity player, ItemStack itemStack, Hand hand) CreativeInventoryScreen
(PlayerEntity player) CreativeScreenHandler
(PlayerEntity player) InventoryScreen
(PlayerEntity player) -
Uses of PlayerEntity in net.minecraft.client.network
Modifier and TypeClassDescriptionclass
class
Represents the client's own player entity.class
Represents a player entity that is present on the client but is not the client's own player.Modifier and TypeMethodDescriptionvoid
ClientPlayerInteractionManager.attackEntity
(PlayerEntity player, Entity target) void
ClientPlayerInteractionManager.clickSlot
(int syncId, int slotId, int button, SlotActionType actionType, PlayerEntity player) void
ClientPlayerInteractionManager.copyAbilities
(PlayerEntity player) private static ItemStack
ClientPlayNetworkHandler.getActiveTotemOfUndying
(PlayerEntity player) ClientPlayerInteractionManager.interactEntity
(PlayerEntity player, Entity entity, Hand hand) ClientPlayerInteractionManager.interactEntityAtLocation
(PlayerEntity player, Entity entity, EntityHitResult hitResult, Hand hand) ClientPlayerInteractionManager.interactItem
(PlayerEntity player, Hand hand) void
ClientPlayerInteractionManager.stopUsingItem
(PlayerEntity player) -
Uses of PlayerEntity in net.minecraft.client.render.entity
Modifier and TypeFieldDescriptionprivate Map<String,
EntityRenderer<? extends PlayerEntity>> EntityRenderDispatcher.modelRenderers
Modifier and TypeMethodDescriptionstatic Map<String,
EntityRenderer<? extends PlayerEntity>> EntityRenderers.reloadPlayerRenderers
(EntityRendererFactory.Context ctx) -
Uses of PlayerEntity in net.minecraft.client.render.entity.feature
Modifier and TypeClassDescriptionclass
PlayerHeldItemFeatureRenderer<T extends PlayerEntity,
M extends EntityModel<T> & ModelWithArms & ModelWithHead> class
ShoulderParrotFeatureRenderer<T extends PlayerEntity>
-
Uses of PlayerEntity in net.minecraft.client.sound
ModifierConstructorDescriptionMinecartInsideSoundInstance
(PlayerEntity player, AbstractMinecartEntity minecart, boolean underwater) -
Uses of PlayerEntity in net.minecraft.client.world
Modifier and TypeMethodDescriptionvoid
ClientWorld.playSound
(@Nullable PlayerEntity except, double x, double y, double z, SoundEvent sound, SoundCategory category, float volume, float pitch, long seed) void
ClientWorld.playSoundFromEntity
(@Nullable PlayerEntity except, Entity entity, SoundEvent sound, SoundCategory category, float volume, float pitch, long seed) void
ClientWorld.syncWorldEvent
(@Nullable PlayerEntity player, int eventId, BlockPos pos, int data) -
Uses of PlayerEntity in net.minecraft.entity
Modifier and TypeFieldDescriptionprotected @Nullable PlayerEntity
LivingEntity.attackingPlayer
private PlayerEntity
ExperienceOrbEntity.target
Modifier and TypeMethodDescriptionEntityType.create
(ServerWorld world, @Nullable NbtCompound itemNbt, @Nullable Text name, @Nullable PlayerEntity player, BlockPos pos, SpawnReason spawnReason, boolean alignPosition, boolean invertY) Entity.interact
(PlayerEntity player, Hand hand) Called when a player interacts with this entity.Entity.interactAt
(PlayerEntity player, Vec3d hitPos, Hand hand) Called when the player interacts with the entity at the specific position.boolean
Entity.isInvisibleTo
(PlayerEntity player) Returns whether the entity is invisible toplayer
.static void
EntityType.loadFromEntityNbt
(World world, @Nullable PlayerEntity player, @Nullable Entity entity, @Nullable NbtCompound itemNbt) void
Entity.onPlayerCollision
(PlayerEntity player) Called when a player collides with the entity.void
ExperienceOrbEntity.onPlayerCollision
(PlayerEntity player) Called when a player collides with the entity.void
ItemEntity.onPlayerCollision
(PlayerEntity player) Called when a player collides with the entity.void
RideableInventory.openInventory
(PlayerEntity player) private int
ExperienceOrbEntity.repairPlayerGears
(PlayerEntity player, int amount) Repairs a player's gears using the experience recursively, until the experience is all used or all gears are repaired.void
LivingEntity.setAttacking
(@Nullable PlayerEntity attacking) EntityType.spawn
(ServerWorld world, @Nullable NbtCompound itemNbt, @Nullable Text name, @Nullable PlayerEntity player, BlockPos pos, SpawnReason spawnReason, boolean alignPosition, boolean invertY) EntityType.spawnFromItemStack
(ServerWorld world, @Nullable ItemStack stack, @Nullable PlayerEntity player, BlockPos pos, SpawnReason spawnReason, boolean alignPosition, boolean invertY) static <T extends LivingEntity & Bucketable>
Optional<ActionResult>Bucketable.tryBucket
(PlayerEntity player, Hand hand, T entity) -
Uses of PlayerEntity in net.minecraft.entity.ai.brain
Modifier and TypeFieldDescriptionstatic final MemoryModuleType<PlayerEntity>
MemoryModuleType.NEAREST_PLAYER_HOLDING_WANTED_ITEM
static final MemoryModuleType<List<PlayerEntity>>
MemoryModuleType.NEAREST_PLAYERS
static final MemoryModuleType<PlayerEntity>
MemoryModuleType.NEAREST_TARGETABLE_PLAYER_NOT_WEARING_GOLD
static final MemoryModuleType<PlayerEntity>
MemoryModuleType.NEAREST_VISIBLE_PLAYER
static final MemoryModuleType<PlayerEntity>
MemoryModuleType.NEAREST_VISIBLE_TARGETABLE_PLAYER
static final MemoryModuleType<PlayerEntity>
MemoryModuleType.TEMPTING_PLAYER
-
Uses of PlayerEntity in net.minecraft.entity.ai.brain.sensor
-
Uses of PlayerEntity in net.minecraft.entity.ai.brain.task
Modifier and TypeMethodDescriptionprivate Optional<PlayerEntity>
GiveGiftsToHeroTask.getNearestPlayerIfHero
(VillagerEntity villager) private Optional<PlayerEntity>
TemptTask.getTemptingPlayer
(PathAwareEntity entity) Modifier and TypeMethodDescriptionprivate boolean
GiveGiftsToHeroTask.isCloseEnough
(VillagerEntity villager, PlayerEntity player) private boolean
GiveGiftsToHeroTask.isHero
(PlayerEntity player) -
Uses of PlayerEntity in net.minecraft.entity.ai.goal
Modifier and TypeFieldDescriptionprivate @Nullable PlayerEntity
WolfBegGoal.begFrom
protected @Nullable PlayerEntity
TemptGoal.closestPlayer
private @Nullable PlayerEntity
ChaseBoatGoal.passenger
-
Uses of PlayerEntity in net.minecraft.entity.boss.dragon.phase
Modifier and TypeMethodDescriptionvoid
AbstractPhase.crystalDestroyed
(EndCrystalEntity crystal, BlockPos pos, DamageSource source, @Nullable PlayerEntity player) void
HoldingPatternPhase.crystalDestroyed
(EndCrystalEntity crystal, BlockPos pos, DamageSource source, @Nullable PlayerEntity player) void
Phase.crystalDestroyed
(EndCrystalEntity crystal, BlockPos pos, DamageSource source, @Nullable PlayerEntity player) private void
HoldingPatternPhase.strafePlayer
(PlayerEntity player) -
Uses of PlayerEntity in net.minecraft.entity.damage
-
Uses of PlayerEntity in net.minecraft.entity.decoration
Modifier and TypeMethodDescriptionprivate boolean
ArmorStandEntity.equip
(PlayerEntity player, EquipmentSlot slot, ItemStack stack, Hand hand) ItemFrameEntity.interact
(PlayerEntity player, Hand hand) Called when a player interacts with this entity.LeashKnotEntity.interact
(PlayerEntity player, Hand hand) Called when a player interacts with this entity.ArmorStandEntity.interactAt
(PlayerEntity player, Vec3d hitPos, Hand hand) Called when the player interacts with the entity at the specific position. -
Uses of PlayerEntity in net.minecraft.entity.mob
Modifier and TypeFieldDescriptionprivate @Nullable PlayerEntity
EndermanEntity.TeleportTowardsPlayerGoal.targetPlayer
Modifier and TypeFieldDescriptionprivate DisableableFollowTargetGoal<PlayerEntity>
WitchEntity.attackPlayerGoal
Modifier and TypeMethodDescriptionstatic Optional<PlayerEntity>
PiglinBrain.getNearestDetectedPlayer
(AbstractPiglinEntity piglin) Modifier and TypeMethodDescriptionboolean
AmbientEntity.canBeLeashedBy
(PlayerEntity player) boolean
HoglinEntity.canBeLeashedBy
(PlayerEntity player) boolean
MobEntity.canBeLeashedBy
(PlayerEntity player) boolean
WaterCreatureEntity.canBeLeashedBy
(PlayerEntity player) boolean
ZoglinEntity.canBeLeashedBy
(PlayerEntity player) private void
MobEntity.disablePlayerShield
(PlayerEntity player, ItemStack mobStack, ItemStack playerStack) private static void
PiglinBrain.dropBarteredItem
(PiglinEntity piglin, PlayerEntity player, List<ItemStack> items) default void
Angerable.forgive
(PlayerEntity player) final ActionResult
MobEntity.interact
(PlayerEntity player, Hand hand) Called when a player interacts with this entity.protected ActionResult
CreeperEntity.interactMob
(PlayerEntity player, Hand hand) HoglinEntity.interactMob
(PlayerEntity player, Hand hand) protected ActionResult
MobEntity.interactMob
(PlayerEntity player, Hand hand) PiglinEntity.interactMob
(PlayerEntity player, Hand hand) SkeletonHorseEntity.interactMob
(PlayerEntity player, Hand hand) ZombieHorseEntity.interactMob
(PlayerEntity player, Hand hand) ZombieVillagerEntity.interactMob
(PlayerEntity player, Hand hand) private ActionResult
MobEntity.interactWithItem
(PlayerEntity player, Hand hand) boolean
HostileEntity.isAngryAt
(PlayerEntity player) boolean
ZombifiedPiglinEntity.isAngryAt
(PlayerEntity player) (package private) boolean
EndermanEntity.isPlayerStaring
(PlayerEntity player) static void
PiglinBrain.onGuardedBlockInteracted
(PlayerEntity player, boolean blockOpen) void
SlimeEntity.onPlayerCollision
(PlayerEntity player) Called when a player collides with the entity.protected void
MobEntity.onPlayerSpawnedChild
(PlayerEntity player, MobEntity child) static ActionResult
PiglinBrain.playerInteract
(PiglinEntity piglin, PlayerEntity player, Hand hand) void
Angerable.setAttacking
(@Nullable PlayerEntity attacking) -
Uses of PlayerEntity in net.minecraft.entity.passive
Modifier and TypeFieldDescriptionprivate @Nullable PlayerEntity
DolphinEntity.SwimWithPlayerGoal.closestPlayer
private @Nullable PlayerEntity
MerchantEntity.customer
private @Nullable PlayerEntity
VillagerEntity.lastCustomer
private @Nullable PlayerEntity
CatEntity.SleepWithOwnerGoal.owner
private @Nullable PlayerEntity
CatEntity.TemptGoal.player
Modifier and TypeFieldDescriptionprivate CatEntity.CatFleeGoal<PlayerEntity>
CatEntity.fleeGoal
private @Nullable OcelotEntity.FleeGoal<PlayerEntity>
OcelotEntity.fleeGoal
Modifier and TypeMethodDescriptionprivate void
VillagerEntity.beginTradeWith
(PlayerEntity customer) boolean
AbstractHorseEntity.bondWithPlayer
(PlayerEntity player) void
AxolotlEntity.buffPlayer
(PlayerEntity player) boolean
AxolotlEntity.canBeLeashedBy
(PlayerEntity player) boolean
DolphinEntity.canBeLeashedBy
(PlayerEntity player) boolean
MerchantEntity.canBeLeashedBy
(PlayerEntity player) boolean
PandaEntity.canBeLeashedBy
(PlayerEntity player) boolean
SquidEntity.canBeLeashedBy
(PlayerEntity player) boolean
TameableEntity.canBeLeashedBy
(PlayerEntity player) boolean
TurtleEntity.canBeLeashedBy
(PlayerEntity player) boolean
WolfEntity.canBeLeashedBy
(PlayerEntity player) private void
TadpoleEntity.decrementItem
(PlayerEntity player, ItemStack stack) private void
AllayEntity.decrementStackUnlessInCreative
(PlayerEntity player, ItemStack stack) protected void
AnimalEntity.eat
(PlayerEntity player, Hand hand, ItemStack stack) protected void
AxolotlEntity.eat
(PlayerEntity player, Hand hand, ItemStack stack) protected void
CatEntity.eat
(PlayerEntity player, Hand hand, ItemStack stack) protected void
FoxEntity.eat
(PlayerEntity player, Hand hand, ItemStack stack) private void
TadpoleEntity.eatSlimeBall
(PlayerEntity player, ItemStack stack) int
VillagerEntity.getReputation
(PlayerEntity player) AbstractHorseEntity.interactHorse
(PlayerEntity player, ItemStack stack) AbstractDonkeyEntity.interactMob
(PlayerEntity player, Hand hand) protected ActionResult
AllayEntity.interactMob
(PlayerEntity player, Hand hand) AnimalEntity.interactMob
(PlayerEntity player, Hand hand) AxolotlEntity.interactMob
(PlayerEntity player, Hand hand) CatEntity.interactMob
(PlayerEntity player, Hand hand) CowEntity.interactMob
(PlayerEntity player, Hand hand) protected ActionResult
DolphinEntity.interactMob
(PlayerEntity player, Hand hand) protected ActionResult
FishEntity.interactMob
(PlayerEntity player, Hand hand) GoatEntity.interactMob
(PlayerEntity player, Hand hand) HorseEntity.interactMob
(PlayerEntity player, Hand hand) protected ActionResult
IronGolemEntity.interactMob
(PlayerEntity player, Hand hand) MooshroomEntity.interactMob
(PlayerEntity player, Hand hand) OcelotEntity.interactMob
(PlayerEntity player, Hand hand) PandaEntity.interactMob
(PlayerEntity player, Hand hand) ParrotEntity.interactMob
(PlayerEntity player, Hand hand) PigEntity.interactMob
(PlayerEntity player, Hand hand) SheepEntity.interactMob
(PlayerEntity player, Hand hand) protected ActionResult
SnowGolemEntity.interactMob
(PlayerEntity player, Hand hand) StriderEntity.interactMob
(PlayerEntity player, Hand hand) TadpoleEntity.interactMob
(PlayerEntity player, Hand hand) VillagerEntity.interactMob
(PlayerEntity player, Hand hand) WanderingTraderEntity.interactMob
(PlayerEntity player, Hand hand) WolfEntity.interactMob
(PlayerEntity player, Hand hand) void
AnimalEntity.lovePlayer
(@Nullable PlayerEntity player) void
PufferfishEntity.onPlayerCollision
(PlayerEntity player) Called when a player collides with the entity.protected void
FoxEntity.onPlayerSpawnedChild
(PlayerEntity player, MobEntity child) void
AbstractHorseEntity.openInventory
(PlayerEntity player) private void
VillagerEntity.prepareOffersFor
(PlayerEntity player) protected void
AbstractHorseEntity.putPlayerOnBack
(PlayerEntity player) protected void
TraderLlamaEntity.putPlayerOnBack
(PlayerEntity player) protected boolean
AbstractHorseEntity.receiveFood
(PlayerEntity player, ItemStack item) protected boolean
LlamaEntity.receiveFood
(PlayerEntity player, ItemStack item) void
MerchantEntity.setCustomer
(@Nullable PlayerEntity customer) void
VillagerEntity.setCustomer
(@Nullable PlayerEntity customer) void
TameableEntity.setOwner
(PlayerEntity player) -
Uses of PlayerEntity in net.minecraft.entity.player
Modifier and TypeMethodDescriptionboolean
PlayerInventory.canPlayerUse
(PlayerEntity player) boolean
PlayerEntity.shouldDamagePlayer
(PlayerEntity player) void
HungerManager.update
(PlayerEntity player) -
Uses of PlayerEntity in net.minecraft.entity.projectile
Modifier and TypeMethodDescriptionvoid
PersistentProjectileEntity.onPlayerCollision
(PlayerEntity player) Called when a player collides with the entity.void
TridentEntity.onPlayerCollision
(PlayerEntity player) Called when a player collides with the entity.private boolean
FishingBobberEntity.removeIfInvalid
(PlayerEntity player) protected boolean
PersistentProjectileEntity.tryPickup
(PlayerEntity player) protected boolean
TridentEntity.tryPickup
(PlayerEntity player) ModifierConstructorDescriptionFishingBobberEntity
(PlayerEntity thrower, World world, int luckOfTheSeaLevel, int lureLevel) -
Uses of PlayerEntity in net.minecraft.entity.vehicle
Modifier and TypeMethodDescriptiondefault boolean
VehicleInventory.canPlayerAccess
(PlayerEntity player) boolean
ChestBoatEntity.canPlayerUse
(PlayerEntity player) boolean
StorageMinecartEntity.canPlayerUse
(PlayerEntity player) ChestBoatEntity.createMenu
(int syncId, PlayerInventory inv, PlayerEntity player) StorageMinecartEntity.createMenu
(int syncId, PlayerInventory inv, PlayerEntity player) default void
VehicleInventory.generateInventoryLoot
(@Nullable PlayerEntity player) void
ChestBoatEntity.generateLoot
(@Nullable PlayerEntity player) BoatEntity.interact
(PlayerEntity player, Hand hand) Called when a player interacts with this entity.ChestBoatEntity.interact
(PlayerEntity player, Hand hand) Called when a player interacts with this entity.CommandBlockMinecartEntity.interact
(PlayerEntity player, Hand hand) Called when a player interacts with this entity.FurnaceMinecartEntity.interact
(PlayerEntity player, Hand hand) Called when a player interacts with this entity.MinecartEntity.interact
(PlayerEntity player, Hand hand) Called when a player interacts with this entity.StorageMinecartEntity.interact
(PlayerEntity player, Hand hand) Called when a player interacts with this entity.default ActionResult
VehicleInventory.open
(BiConsumer<GameEvent, Entity> gameEventEmitter, PlayerEntity player) void
ChestBoatEntity.openInventory
(PlayerEntity player) -
Uses of PlayerEntity in net.minecraft.inventory
Modifier and TypeMethodDescriptionboolean
CraftingInventory.canPlayerUse
(PlayerEntity player) boolean
CraftingResultInventory.canPlayerUse
(PlayerEntity player) boolean
DoubleInventory.canPlayerUse
(PlayerEntity player) boolean
EnderChestInventory.canPlayerUse
(PlayerEntity player) boolean
Inventory.canPlayerUse
(PlayerEntity player) boolean
SimpleInventory.canPlayerUse
(PlayerEntity player) void
DoubleInventory.onClose
(PlayerEntity player) void
EnderChestInventory.onClose
(PlayerEntity player) default void
Inventory.onClose
(PlayerEntity player) void
DoubleInventory.onOpen
(PlayerEntity player) void
EnderChestInventory.onOpen
(PlayerEntity player) default void
Inventory.onOpen
(PlayerEntity player) -
Uses of PlayerEntity in net.minecraft.item
Modifier and TypeMethodDescriptionstatic ActionResult
LeadItem.attachHeldMobsToBlock
(PlayerEntity player, World world, BlockPos pos) boolean
DebugStickItem.canMine
(BlockState state, World world, BlockPos pos, PlayerEntity miner) Returns whether a player can break a block while holding the item.boolean
Item.canMine
(BlockState state, World world, BlockPos pos, PlayerEntity miner) Returns whether a player can break a block while holding the item.boolean
SwordItem.canMine
(BlockState state, World world, BlockPos pos, PlayerEntity miner) Returns whether a player can break a block while holding the item.boolean
TridentItem.canMine
(BlockState state, World world, BlockPos pos, PlayerEntity miner) Returns whether a player can break a block while holding the item.protected boolean
DecorationItem.canPlaceOn
(PlayerEntity player, Direction side, ItemStack stack, BlockPos pos) protected boolean
ItemFrameItem.canPlaceOn
(PlayerEntity player, Direction side, ItemStack stack, BlockPos pos) static TypedActionResult<ItemStack>
ItemUsage.consumeHeldItem
(World world, PlayerEntity player, Hand hand) Consumes the item thatplayer
holds.FilledMapItem.createSyncPacket
(ItemStack stack, World world, PlayerEntity player) Creates a packet that syncs additional item data to the client.NetworkSyncedItem.createSyncPacket
(ItemStack stack, World world, PlayerEntity player) Creates a packet that syncs additional item data to the client.private static boolean
BundleItem.dropAllBundledItems
(ItemStack stack, PlayerEntity player) static ItemStack
ItemUsage.exchangeStack
(ItemStack inputStack, PlayerEntity player, ItemStack outputStack) Returns the stack to put in the player's hand after exchanging stacks.static ItemStack
ItemUsage.exchangeStack
(ItemStack inputStack, PlayerEntity player, ItemStack outputStack, boolean creativeOverride) Returns the stack to put in the player's hand after exchanging stacks.protected ItemStack
GlassBottleItem.fill
(ItemStack stack, PlayerEntity player, ItemStack outputStack) static ItemStack
BucketItem.getEmptiedStack
(ItemStack stack, PlayerEntity player) ItemStack.getTooltip
(@Nullable PlayerEntity player, TooltipContext context) boolean
BundleItem.onClicked
(ItemStack stack, ItemStack otherStack, Slot slot, ClickType clickType, PlayerEntity player, StackReference cursorStackReference) Called when the item atslot
gets clicked by the cursor holdingotherStack
.boolean
Item.onClicked
(ItemStack stack, ItemStack otherStack, Slot slot, ClickType clickType, PlayerEntity player, StackReference cursorStackReference) Called when the item atslot
gets clicked by the cursor holdingotherStack
.boolean
ItemStack.onClicked
(ItemStack stack, Slot slot, ClickType clickType, PlayerEntity player, StackReference cursorStackReference) void
FilledMapItem.onCraft
(ItemStack stack, World world, PlayerEntity player) Called when a player acquires the item by crafting, smelting, smithing, etc.void
Item.onCraft
(ItemStack stack, World world, PlayerEntity player) Called when a player acquires the item by crafting, smelting, smithing, etc.void
ItemStack.onCraft
(World world, PlayerEntity player, int amount) void
void
EntityBucketItem.onEmptied
(@Nullable PlayerEntity player, World world, ItemStack stack, BlockPos pos) default void
FluidModificationItem.onEmptied
(@Nullable PlayerEntity player, World world, ItemStack stack, BlockPos pos) boolean
BundleItem.onStackClicked
(ItemStack stack, Slot slot, ClickType clickType, PlayerEntity player) Called when the item at the cursor is clicked atslot
.boolean
Item.onStackClicked
(ItemStack stack, Slot slot, ClickType clickType, PlayerEntity player) Called when the item at the cursor is clicked atslot
.boolean
ItemStack.onStackClicked
(Slot slot, ClickType clickType, PlayerEntity player) boolean
BucketItem.placeFluid
(@Nullable PlayerEntity player, World world, BlockPos pos, @Nullable BlockHitResult hitResult) boolean
FluidModificationItem.placeFluid
(@Nullable PlayerEntity player, World world, BlockPos pos, @Nullable BlockHitResult hitResult) boolean
PowderSnowBucketItem.placeFluid
(@Nullable PlayerEntity player, World world, BlockPos pos, @Nullable BlockHitResult hitResult) protected void
BucketItem.playEmptyingSound
(@Nullable PlayerEntity player, WorldAccess world, BlockPos pos) protected void
EntityBucketItem.playEmptyingSound
(@Nullable PlayerEntity player, WorldAccess world, BlockPos pos) private static void
GoatHornItem.playSound
(World world, PlayerEntity player, Instrument instrument) void
ItemStack.postHit
(LivingEntity target, PlayerEntity attacker) void
ItemStack.postMine
(World world, BlockState state, BlockPos pos, PlayerEntity miner) protected boolean
BlockItem.postPlacement
(BlockPos pos, World world, @Nullable PlayerEntity player, ItemStack stack, BlockState state) protected boolean
SignItem.postPlacement
(BlockPos pos, World world, @Nullable PlayerEntity player, ItemStack stack, BlockState state) protected static BlockHitResult
Item.raycast
(World world, PlayerEntity player, RaycastContext.FluidHandling fluidHandling) static boolean
WrittenBookItem.resolve
(ItemStack book, @Nullable ServerCommandSource commandSource, @Nullable PlayerEntity player) private static void
DebugStickItem.sendMessage
(PlayerEntity player, Text message) SpawnEggItem.spawnBaby
(PlayerEntity user, MobEntity entity, EntityType<? extends MobEntity> entityType, ServerWorld world, Vec3d pos, ItemStack stack) private static String
WrittenBookItem.textToJson
(@Nullable ServerCommandSource commandSource, @Nullable PlayerEntity player, String text) ArmorItem.use
(World world, PlayerEntity user, Hand hand) Called when the player uses (or starts using) the item.BoatItem.use
(World world, PlayerEntity user, Hand hand) Called when the player uses (or starts using) the item.BowItem.use
(World world, PlayerEntity user, Hand hand) Called when the player uses (or starts using) the item.BucketItem.use
(World world, PlayerEntity user, Hand hand) Called when the player uses (or starts using) the item.BundleItem.use
(World world, PlayerEntity user, Hand hand) Called when the player uses (or starts using) the item.CrossbowItem.use
(World world, PlayerEntity user, Hand hand) Called when the player uses (or starts using) the item.private boolean
DebugStickItem.use
(PlayerEntity player, BlockState state, WorldAccess world, BlockPos pos, boolean update, ItemStack stack) EggItem.use
(World world, PlayerEntity user, Hand hand) Called when the player uses (or starts using) the item.ElytraItem.use
(World world, PlayerEntity user, Hand hand) Called when the player uses (or starts using) the item.EmptyMapItem.use
(World world, PlayerEntity user, Hand hand) Called when the player uses (or starts using) the item.EnderEyeItem.use
(World world, PlayerEntity user, Hand hand) Called when the player uses (or starts using) the item.EnderPearlItem.use
(World world, PlayerEntity user, Hand hand) Called when the player uses (or starts using) the item.ExperienceBottleItem.use
(World world, PlayerEntity user, Hand hand) Called when the player uses (or starts using) the item.FireworkRocketItem.use
(World world, PlayerEntity user, Hand hand) Called when the player uses (or starts using) the item.FishingRodItem.use
(World world, PlayerEntity user, Hand hand) Called when the player uses (or starts using) the item.GlassBottleItem.use
(World world, PlayerEntity user, Hand hand) Called when the player uses (or starts using) the item.GoatHornItem.use
(World world, PlayerEntity user, Hand hand) Called when the player uses (or starts using) the item.HoneyBottleItem.use
(World world, PlayerEntity user, Hand hand) Called when the player uses (or starts using) the item.Item.use
(World world, PlayerEntity user, Hand hand) Called when the player uses (or starts using) the item.ItemStack.use
(World world, PlayerEntity user, Hand hand) KnowledgeBookItem.use
(World world, PlayerEntity user, Hand hand) Called when the player uses (or starts using) the item.LingeringPotionItem.use
(World world, PlayerEntity user, Hand hand) Called when the player uses (or starts using) the item.MilkBucketItem.use
(World world, PlayerEntity user, Hand hand) Called when the player uses (or starts using) the item.OnAStickItem.use
(World world, PlayerEntity user, Hand hand) Called when the player uses (or starts using) the item.PlaceableOnWaterItem.use
(World world, PlayerEntity user, Hand hand) Called when the player uses (or starts using) the item.PotionItem.use
(World world, PlayerEntity user, Hand hand) Called when the player uses (or starts using) the item.ShieldItem.use
(World world, PlayerEntity user, Hand hand) Called when the player uses (or starts using) the item.SnowballItem.use
(World world, PlayerEntity user, Hand hand) Called when the player uses (or starts using) the item.SpawnEggItem.use
(World world, PlayerEntity user, Hand hand) Called when the player uses (or starts using) the item.SplashPotionItem.use
(World world, PlayerEntity user, Hand hand) Called when the player uses (or starts using) the item.SpyglassItem.use
(World world, PlayerEntity user, Hand hand) Called when the player uses (or starts using) the item.ThrowablePotionItem.use
(World world, PlayerEntity user, Hand hand) Called when the player uses (or starts using) the item.TridentItem.use
(World world, PlayerEntity user, Hand hand) Called when the player uses (or starts using) the item.WritableBookItem.use
(World world, PlayerEntity user, Hand hand) Called when the player uses (or starts using) the item.WrittenBookItem.use
(World world, PlayerEntity user, Hand hand) Called when the player uses (or starts using) the item.DyeItem.useOnEntity
(ItemStack stack, PlayerEntity user, LivingEntity entity, Hand hand) Called on both the client and the server when a player uses the item on an entity.Item.useOnEntity
(ItemStack stack, PlayerEntity user, LivingEntity entity, Hand hand) Called on both the client and the server when a player uses the item on an entity.ItemStack.useOnEntity
(PlayerEntity user, LivingEntity entity, Hand hand) NameTagItem.useOnEntity
(ItemStack stack, PlayerEntity user, LivingEntity entity, Hand hand) Called on both the client and the server when a player uses the item on an entity.SaddleItem.useOnEntity
(ItemStack stack, PlayerEntity user, LivingEntity entity, Hand hand) Called on both the client and the server when a player uses the item on an entity.static boolean
BlockItem.writeNbtToBlockEntity
(World world, @Nullable PlayerEntity player, BlockPos pos, ItemStack stack) ModifierConstructorDescriptionItemPlacementContext
(PlayerEntity player, Hand hand, ItemStack stack, BlockHitResult hitResult) protected
ItemPlacementContext
(World world, @Nullable PlayerEntity player, Hand hand, ItemStack stack, BlockHitResult hit) ItemUsageContext
(PlayerEntity player, Hand hand, BlockHitResult hit) protected
ItemUsageContext
(World world, @Nullable PlayerEntity player, Hand hand, ItemStack stack, BlockHitResult hit) -
Uses of PlayerEntity in net.minecraft.item.map
Modifier and TypeFieldDescriptionprivate final Map<PlayerEntity,
MapState.PlayerUpdateTracker> MapState.updateTrackersByPlayer
Modifier and TypeMethodDescriptionMapState.getPlayerMarkerPacket
(int id, PlayerEntity player) MapState.getPlayerSyncData
(PlayerEntity player) void
MapState.update
(PlayerEntity player, ItemStack stack) -
Uses of PlayerEntity in net.minecraft.loot.context
Modifier and TypeFieldDescriptionstatic final LootContextParameter<PlayerEntity>
LootContextParameters.LAST_DAMAGE_PLAYER
-
Uses of PlayerEntity in net.minecraft.network.packet.s2c.play
-
Uses of PlayerEntity in net.minecraft.recipe
Modifier and TypeMethodDescriptiondefault void
RecipeUnlocker.unlockLastRecipe
(PlayerEntity player) -
Uses of PlayerEntity in net.minecraft.screen
Modifier and TypeFieldDescriptionprivate final PlayerEntity
PlayerScreenHandler.owner
private final PlayerEntity
CraftingScreenHandler.player
protected final PlayerEntity
ForgingScreenHandler.player
Modifier and TypeMethodDescriptionprotected boolean
AnvilScreenHandler.canTakeOutput
(PlayerEntity player, boolean present) protected abstract boolean
ForgingScreenHandler.canTakeOutput
(PlayerEntity player, boolean present) protected boolean
SmithingScreenHandler.canTakeOutput
(PlayerEntity player, boolean present) boolean
AbstractFurnaceScreenHandler.canUse
(PlayerEntity player) boolean
BeaconScreenHandler.canUse
(PlayerEntity player) boolean
BrewingStandScreenHandler.canUse
(PlayerEntity player) boolean
CartographyTableScreenHandler.canUse
(PlayerEntity player) boolean
CraftingScreenHandler.canUse
(PlayerEntity player) boolean
EnchantmentScreenHandler.canUse
(PlayerEntity player) boolean
ForgingScreenHandler.canUse
(PlayerEntity player) boolean
Generic3x3ContainerScreenHandler.canUse
(PlayerEntity player) boolean
GenericContainerScreenHandler.canUse
(PlayerEntity player) boolean
GrindstoneScreenHandler.canUse
(PlayerEntity player) boolean
HopperScreenHandler.canUse
(PlayerEntity player) boolean
HorseScreenHandler.canUse
(PlayerEntity player) boolean
LecternScreenHandler.canUse
(PlayerEntity player) boolean
LoomScreenHandler.canUse
(PlayerEntity player) boolean
MerchantScreenHandler.canUse
(PlayerEntity player) boolean
PlayerScreenHandler.canUse
(PlayerEntity player) abstract boolean
ScreenHandler.canUse
(PlayerEntity player) protected static boolean
ScreenHandler.canUse
(ScreenHandlerContext context, PlayerEntity player, Block block) boolean
ShulkerBoxScreenHandler.canUse
(PlayerEntity player) boolean
StonecutterScreenHandler.canUse
(PlayerEntity player) void
BeaconScreenHandler.close
(PlayerEntity player) void
CartographyTableScreenHandler.close
(PlayerEntity player) void
CraftingScreenHandler.close
(PlayerEntity player) void
EnchantmentScreenHandler.close
(PlayerEntity player) void
ForgingScreenHandler.close
(PlayerEntity player) void
Generic3x3ContainerScreenHandler.close
(PlayerEntity player) void
GenericContainerScreenHandler.close
(PlayerEntity player) void
GrindstoneScreenHandler.close
(PlayerEntity player) void
HopperScreenHandler.close
(PlayerEntity player) void
HorseScreenHandler.close
(PlayerEntity player) void
LoomScreenHandler.close
(PlayerEntity player) void
MerchantScreenHandler.close
(PlayerEntity player) void
PlayerScreenHandler.close
(PlayerEntity player) void
ScreenHandler.close
(PlayerEntity player) void
ShulkerBoxScreenHandler.close
(PlayerEntity player) void
StonecutterScreenHandler.close
(PlayerEntity player) ScreenHandlerFactory.createMenu
(int syncId, PlayerInventory inv, PlayerEntity player) SimpleNamedScreenHandlerFactory.createMenu
(int syncId, PlayerInventory inv, PlayerEntity player) protected void
ScreenHandler.dropInventory
(PlayerEntity player, Inventory inventory) private void
ScreenHandler.internalOnSlotClick
(int slotIndex, int button, SlotActionType actionType, PlayerEntity player) The actual logic that handles a slot click.boolean
EnchantmentScreenHandler.onButtonClick
(PlayerEntity player, int id) boolean
LecternScreenHandler.onButtonClick
(PlayerEntity player, int id) boolean
LoomScreenHandler.onButtonClick
(PlayerEntity player, int id) boolean
ScreenHandler.onButtonClick
(PlayerEntity player, int id) boolean
StonecutterScreenHandler.onButtonClick
(PlayerEntity player, int id) void
ScreenHandler.onSlotClick
(int slotIndex, int button, SlotActionType actionType, PlayerEntity player) Performs a slot click.void
BrewingStandScreenHandler.PotionSlot.onTakeItem
(PlayerEntity player, ItemStack stack) protected void
AnvilScreenHandler.onTakeOutput
(PlayerEntity player, ItemStack stack) protected abstract void
ForgingScreenHandler.onTakeOutput
(PlayerEntity player, ItemStack stack) protected void
SmithingScreenHandler.onTakeOutput
(PlayerEntity player, ItemStack stack) static boolean
ScreenHandler.shouldQuickCraftContinue
(int stage, PlayerEntity player) AbstractFurnaceScreenHandler.transferSlot
(PlayerEntity player, int index) BeaconScreenHandler.transferSlot
(PlayerEntity player, int index) BrewingStandScreenHandler.transferSlot
(PlayerEntity player, int index) CartographyTableScreenHandler.transferSlot
(PlayerEntity player, int index) CraftingScreenHandler.transferSlot
(PlayerEntity player, int index) EnchantmentScreenHandler.transferSlot
(PlayerEntity player, int index) ForgingScreenHandler.transferSlot
(PlayerEntity player, int index) Generic3x3ContainerScreenHandler.transferSlot
(PlayerEntity player, int index) GenericContainerScreenHandler.transferSlot
(PlayerEntity player, int index) GrindstoneScreenHandler.transferSlot
(PlayerEntity player, int index) HopperScreenHandler.transferSlot
(PlayerEntity player, int index) HorseScreenHandler.transferSlot
(PlayerEntity player, int index) LecternScreenHandler.transferSlot
(PlayerEntity player, int index) LoomScreenHandler.transferSlot
(PlayerEntity player, int index) MerchantScreenHandler.transferSlot
(PlayerEntity player, int index) PlayerScreenHandler.transferSlot
(PlayerEntity player, int index) abstract ItemStack
ScreenHandler.transferSlot
(PlayerEntity player, int index) ShulkerBoxScreenHandler.transferSlot
(PlayerEntity player, int index) StonecutterScreenHandler.transferSlot
(PlayerEntity player, int index) protected static void
CraftingScreenHandler.updateResult
(ScreenHandler handler, World world, PlayerEntity player, CraftingInventory craftingInventory, CraftingResultInventory resultInventory) ModifierConstructorDescriptionPlayerScreenHandler
(PlayerInventory inventory, boolean onServer, PlayerEntity owner) -
Uses of PlayerEntity in net.minecraft.screen.slot
Modifier and TypeFieldDescriptionprivate final PlayerEntity
CraftingResultSlot.player
private final PlayerEntity
FurnaceOutputSlot.player
private final PlayerEntity
TradeOutputSlot.player
Modifier and TypeMethodDescriptionboolean
Slot.canTakeItems
(PlayerEntity playerEntity) boolean
Slot.canTakePartial
(PlayerEntity player) void
CraftingResultSlot.onTakeItem
(PlayerEntity player, ItemStack stack) void
FurnaceOutputSlot.onTakeItem
(PlayerEntity player, ItemStack stack) void
Slot.onTakeItem
(PlayerEntity player, ItemStack stack) void
TradeOutputSlot.onTakeItem
(PlayerEntity player, ItemStack stack) Slot.takeStackRange
(int min, int max, PlayerEntity player) Slot.tryTakeStackRange
(int min, int max, PlayerEntity player) ModifierConstructorDescriptionCraftingResultSlot
(PlayerEntity player, CraftingInventory input, Inventory inventory, int index, int x, int y) FurnaceOutputSlot
(PlayerEntity player, Inventory inventory, int index, int x, int y) TradeOutputSlot
(PlayerEntity player, Merchant merchant, MerchantInventory merchantInventory, int index, int x, int y) -
Uses of PlayerEntity in net.minecraft.server
Modifier and TypeMethodDescriptionPlayerManager.createStatHandler
(PlayerEntity player) boolean
MinecraftServer.isSpawnProtected
(ServerWorld world, BlockPos pos, PlayerEntity player) void
PlayerManager.sendToAround
(@Nullable PlayerEntity player, double x, double y, double z, double distance, RegistryKey<World> worldKey, Packet<?> packet) void
PlayerManager.sendToOtherTeams
(PlayerEntity source, Text message) void
PlayerManager.sendToTeam
(PlayerEntity source, Text message) -
Uses of PlayerEntity in net.minecraft.server.command
Modifier and TypeMethodDescriptionprivate static int
WardenSpawnTrackerCommand.clearTracker
(ServerCommandSource source, Collection<? extends PlayerEntity> players) private static int
WardenSpawnTrackerCommand.setWarningLevel
(ServerCommandSource source, Collection<? extends PlayerEntity> players, int warningCount) -
Uses of PlayerEntity in net.minecraft.server.dedicated
Modifier and TypeMethodDescriptionboolean
MinecraftDedicatedServer.isSpawnProtected
(ServerWorld world, BlockPos pos, PlayerEntity player) -
Uses of PlayerEntity in net.minecraft.server.network
Modifier and TypeMethodDescriptionboolean
ServerPlayerEntity.shouldDamagePlayer
(PlayerEntity player) -
Uses of PlayerEntity in net.minecraft.server.world
Modifier and TypeMethodDescriptionboolean
ServerWorld.canPlayerModifyAt
(PlayerEntity player, BlockPos pos) Returns whetherplayer
can modify blocks atpos
.void
ServerWorld.playSound
(@Nullable PlayerEntity except, double x, double y, double z, SoundEvent sound, SoundCategory category, float volume, float pitch, long seed) void
ServerWorld.playSoundFromEntity
(@Nullable PlayerEntity except, Entity entity, SoundEvent sound, SoundCategory category, float volume, float pitch, long seed) void
ServerWorld.syncWorldEvent
(@Nullable PlayerEntity player, int eventId, BlockPos pos, int data) -
Uses of PlayerEntity in net.minecraft.stat
Modifier and TypeMethodDescriptionvoid
StatHandler.increaseStat
(PlayerEntity player, Stat<?> stat, int value) void
ServerStatHandler.setStat
(PlayerEntity player, Stat<?> stat, int value) void
StatHandler.setStat
(PlayerEntity player, Stat<?> stat, int value) -
Uses of PlayerEntity in net.minecraft.test
-
Uses of PlayerEntity in net.minecraft.village
Modifier and TypeMethodDescriptionboolean
MerchantInventory.canPlayerUse
(PlayerEntity player) default void
Merchant.sendOffers
(PlayerEntity player, Text test, int levelProgress) void
Merchant.setCustomer
(@Nullable PlayerEntity customer) void
SimpleMerchant.setCustomer
(@Nullable PlayerEntity customer) -
Uses of PlayerEntity in net.minecraft.village.raid
-
Uses of PlayerEntity in net.minecraft.world
Modifier and TypeMethodDescriptionChunkRegion.getClosestPlayer
(double x, double y, double z, double maxDistance, Predicate<Entity> targetPredicate) default @Nullable PlayerEntity
EntityView.getClosestPlayer
(double x, double y, double z, double maxDistance, boolean ignoreCreative) default @Nullable PlayerEntity
EntityView.getClosestPlayer
(double x, double y, double z, double maxDistance, @Nullable Predicate<Entity> targetPredicate) default @Nullable PlayerEntity
EntityView.getClosestPlayer
(TargetPredicate targetPredicate, double x, double y, double z) default @Nullable PlayerEntity
EntityView.getClosestPlayer
(TargetPredicate targetPredicate, LivingEntity entity) default @Nullable PlayerEntity
EntityView.getClosestPlayer
(TargetPredicate targetPredicate, LivingEntity entity, double x, double y, double z) default @Nullable PlayerEntity
EntityView.getClosestPlayer
(Entity entity, double maxDistance) default @Nullable PlayerEntity
EntityView.getPlayerByUuid
(UUID uuid) Modifier and TypeMethodDescriptionChunkRegion.getPlayers()
List<? extends PlayerEntity>
EntityView.getPlayers()
default List<PlayerEntity>
EntityView.getPlayers
(TargetPredicate targetPredicate, LivingEntity entity, Box box) Modifier and TypeMethodDescriptionboolean
World.canPlayerModifyAt
(PlayerEntity player, BlockPos pos) Returns whetherplayer
can modify blocks atpos
.CommandBlockExecutor.interact
(PlayerEntity player) WorldSaveHandler.loadPlayerData
(PlayerEntity player) void
ChunkRegion.playSound
(@Nullable PlayerEntity player, BlockPos pos, SoundEvent sound, SoundCategory category, float volume, float pitch) void
World.playSound
(@Nullable PlayerEntity player, double x, double y, double z, SoundEvent sound, SoundCategory category, float volume, float pitch) abstract void
World.playSound
(@Nullable PlayerEntity except, double x, double y, double z, SoundEvent sound, SoundCategory category, float volume, float pitch, long seed) void
World.playSound
(@Nullable PlayerEntity player, BlockPos pos, SoundEvent sound, SoundCategory category, float volume, float pitch) void
WorldAccess.playSound
(@Nullable PlayerEntity player, BlockPos pos, SoundEvent sound, SoundCategory category, float volume, float pitch) void
World.playSoundFromEntity
(@Nullable PlayerEntity player, Entity entity, SoundEvent sound, SoundCategory category, float volume, float pitch) abstract void
World.playSoundFromEntity
(@Nullable PlayerEntity except, Entity entity, SoundEvent sound, SoundCategory category, float volume, float pitch, long seed) void
WorldSaveHandler.savePlayerData
(PlayerEntity player) void
ChunkRegion.syncWorldEvent
(@Nullable PlayerEntity player, int eventId, BlockPos pos, int data) void
WorldAccess.syncWorldEvent
(@Nullable PlayerEntity player, int eventId, BlockPos pos, int data) -
Uses of PlayerEntity in net.minecraft.world.explosion
AbstractBlock.AbstractBlockState.calcBlockBreakingDelta(net.minecraft.entity.player.PlayerEntity, net.minecraft.world.BlockView, net.minecraft.util.math.BlockPos)
instead.