Class FakePlayer
java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.entity.Entity
net.minecraft.world.entity.LivingEntity
net.minecraft.world.entity.player.Player
net.minecraft.server.level.ServerPlayer
net.neoforged.neoforge.common.util.FakePlayer
- All Implemented Interfaces:
net.minecraft.core.component.DataComponentGetter
,net.minecraft.network.syncher.SyncedDataHolder
,net.minecraft.world.entity.Attackable
,net.minecraft.world.level.entity.EntityAccess
,net.minecraft.world.level.entity.UniquelyIdentifyable
,net.minecraft.world.Nameable
,net.minecraft.world.scores.ScoreHolder
,IAttachmentHolder
,IEntityExtension
,ILivingEntityExtension
,IPlayerExtension
public class FakePlayer
extends net.minecraft.server.level.ServerPlayer
A basic fake server player implementation that can be used to simulate player actions.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final class
private static class
Nested classes/interfaces inherited from class net.minecraft.server.level.ServerPlayer
net.minecraft.server.level.ServerPlayer.RespawnConfig, net.minecraft.server.level.ServerPlayer.RespawnPosAngle
Nested classes/interfaces inherited from class net.minecraft.world.entity.player.Player
net.minecraft.world.entity.player.Player.BedSleepingProblem
Nested classes/interfaces inherited from class net.minecraft.world.entity.LivingEntity
net.minecraft.world.entity.LivingEntity.Fallsounds
Nested classes/interfaces inherited from class net.minecraft.world.entity.Entity
net.minecraft.world.entity.Entity.MoveFunction, net.minecraft.world.entity.Entity.MovementEmission, net.minecraft.world.entity.Entity.RemovalReason
Nested classes/interfaces inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
AttachmentHolder.AsField
-
Field Summary
Fields inherited from class net.minecraft.server.level.ServerPlayer
BLOCK_INTERACTION_DISTANCE_VERIFICATION_BUFFER, connection, ENDER_PEARL_DIMENSION_TAG, ENDER_PEARL_TICKET_RADIUS, ENDER_PEARLS_TAG, ENTITY_INTERACTION_DISTANCE_VERIFICATION_BUFFER, gameMode, object, seenCredits, server, wonGame
Fields inherited from class net.minecraft.world.entity.player.Player
bob, CLIENT_LOADED_TIMEOUT_TIME, clientLoadedTimeoutTimer, containerMenu, CRAFTING_SLOT_OFFSET, CROUCH_BB_HEIGHT, currentExplosionCause, currentImpulseImpactPos, DATA_PLAYER_MAIN_HAND, DATA_PLAYER_MODE_CUSTOMISATION, DATA_SHOULDER_LEFT, DATA_SHOULDER_RIGHT, DEFAULT_BLOCK_INTERACTION_RANGE, DEFAULT_ENTITY_INTERACTION_RANGE, DEFAULT_EYE_HEIGHT, DEFAULT_MAIN_HAND, DEFAULT_MODEL_CUSTOMIZATION, DEFAULT_VEHICLE_ATTACHMENT, defaultFlySpeed, enchantmentSeed, ENDER_SLOT_OFFSET, enderChestInventory, experienceLevel, experienceProgress, fishing, foodData, HELD_ITEM_SLOT, hurtDir, inventoryMenu, jumpTriggerTime, MAX_HEALTH, oBob, PERSISTED_NBT_TAG, SLEEP_DURATION, STANDING_DIMENSIONS, SWIMMING_BB_HEIGHT, SWIMMING_BB_WIDTH, takeXpDelay, totalExperience, WAKE_UP_DURATION, wasUnderwater, xCloak, xCloakO, yCloak, yCloakO, zCloak, zCloakO
Fields inherited from class net.minecraft.world.entity.LivingEntity
ARMOR_SLOT_OFFSET, attackAnim, attackStrengthTicker, ATTRIBUTES_FIELD, autoSpinAttackDmg, autoSpinAttackItemStack, autoSpinAttackTicks, BASE_JUMP_POWER, BODY_ARMOR_OFFSET, brain, damageContainers, DATA_LIVING_ENTITY_FLAGS, dead, DEATH_DURATION, deathTime, DEFAULT_BABY_SCALE, DEFAULT_BASE_GRAVITY, elytraAnimationState, equipment, EQUIPMENT_SLOT_OFFSET, EXTRA_RENDER_CULLING_SIZE_WITH_BIG_HAT, fallFlyTicks, hurtDuration, hurtTime, INPUT_FRICTION, interpolation, invulnerableDuration, jumping, lastHurt, lastHurtByPlayer, lastHurtByPlayerMemoryTime, lerpHeadSteps, lerpYHeadRot, LIVING_ENTITY_FLAG_IS_USING, LIVING_ENTITY_FLAG_OFF_HAND, LIVING_ENTITY_FLAG_SPIN_ATTACK, MIN_MOVEMENT_DISTANCE, noActionTime, oAttackAnim, PLAYER_HURT_EXPERIENCE_TIME, PLAYER_NOT_WEARING_DISGUISE_ITEM, PLAYER_NOT_WEARING_DISGUISE_ITEM_FOR_TARGET, removeArrowTime, removeStingerTime, SADDLE_OFFSET, SLEEPING_DIMENSIONS, SWING_DURATION, swinging, swingingArm, swingTime, useItem, useItemRemaining, walkAnimation, xxa, yBodyRot, yBodyRotO, yHeadRot, yHeadRotO, yya, zza
Fields inherited from class net.minecraft.world.entity.Entity
BASE_SAFE_FALL_DISTANCE, BASE_TICKS_REQUIRED_TO_FREEZE, blocksBuilding, BOARDING_COOLDOWN, boardingCooldown, CONTENTS_SLOT_INDEX, DATA_POSE, DATA_SHARED_FLAGS_ID, DEFAULT_BB_HEIGHT, DEFAULT_BB_WIDTH, DELTA_AFFECTED_BY_BLOCKS_BELOW_0_2, DELTA_AFFECTED_BY_BLOCKS_BELOW_0_5, DELTA_AFFECTED_BY_BLOCKS_BELOW_1_0, ENTITY_COUNTER, entityData, fallDistance, firstTick, FLAG_FALL_FLYING, FLAG_GLOWING, FLAG_ONFIRE, fluidHeight, flyDist, forgeFluidTypeHeight, FREEZE_HURT_FREQUENCY, hasImpulse, horizontalCollision, hurtMarked, ID_TAG, invulnerableTime, isInPowderSnow, mainSupportingBlockPos, MAX_ENTITY_TAG_COUNT, minorHorizontalCollision, moveDist, noPhysics, PASSENGERS_TAG, portalProcess, random, stringUUID, stuckSpeedMultiplier, tickCount, TOTAL_AIR_SUPPLY, uuid, UUID_TAG, verticalCollision, verticalCollisionBelow, wasEyeInWater, wasInPowderSnow, wasTouchingWater, xo, xOld, xRotO, yo, yOld, yRotO, zo, zOld
Fields inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
ATTACHMENTS_NBT_KEY
Fields inherited from interface net.minecraft.world.scores.ScoreHolder
WILDCARD, WILDCARD_NAME
-
Constructor Summary
ConstructorsConstructorDescriptionFakePlayer
(net.minecraft.server.level.ServerLevel level, com.mojang.authlib.GameProfile name) -
Method Summary
Modifier and TypeMethodDescriptionvoid
awardStat
(net.minecraft.stats.Stat<?> stat, int amount) boolean
canHarmPlayer
(net.minecraft.world.entity.player.Player player) void
die
(net.minecraft.world.damagesource.DamageSource source) void
displayClientMessage
(net.minecraft.network.chat.Component chatComponent, boolean actionBar) @Nullable net.minecraft.server.MinecraftServer
boolean
Returns whether this player is a fake player, such asFakePlayer
.void
openHorseInventory
(net.minecraft.world.entity.animal.horse.AbstractHorse horse, net.minecraft.world.Container container) openMenu
(@Nullable net.minecraft.world.MenuProvider menuProvider, @Nullable Consumer<net.minecraft.network.RegistryFriendlyByteBuf> extraDataWriter) Request to open a GUI on the client, from the serverboolean
startRiding
(net.minecraft.world.entity.Entity entity, boolean force) void
tick()
void
updateOptions
(net.minecraft.server.level.ClientInformation p_301998_) Methods inherited from class net.minecraft.server.level.ServerPlayer
addAdditionalSaveData, adjustSpawnLocation, allowsListing, attack, awardKillScore, awardRecipes, awardRecipesByKey, broadcastToPlayer, canChatInColor, checkFallDamage, checkMovementStatistics, checkRidingStatistics, clearRaidOmenPosition, clientInformation, closeContainer, commandSource, completeUsingItem, copyRespawnPosition, createCommandSourceStack, createCommonSpawnInfo, createItemCooldowns, crit, deregisterEnderPearl, disconnect, doCloseContainer, doTick, drop, drop, findRespawnPositionAndUseSpawnBlock, forceSetRotation, gameMode, getAdvancements, getCamera, getChatSession, getChatVisibility, getChunkTrackingView, getEnchantedDamage, getEnderPearls, getIpAddress, getKnownMovement, getLanguage, getLastActionTime, getLastClientInput, getLastClientMoveIntent, getLastSectionPos, getPermissionLevel, getRaidOmenPosition, getRecipeBook, getRespawnConfig, getStats, getTabListDisplayName, getTabListFooter, getTabListHeader, getTabListOrder, getTextFilter, getWardenSpawnTracker, giveExperienceLevels, giveExperiencePoints, handleExtraItemsCreatedOnUse, hasChangedDimension, hasDisconnected, hurtServer, indicateDamage, initInventoryMenu, isChangingDimension, isInvulnerableTo, isTextFilteringEnabled, jumpFromGround, loadAndSpawnEnderPearls, loadAndSpawnParentVehicle, loadGameTypes, lookAt, lookAt, magicCrit, mayInteract, onChangedBlock, onEffectAdded, onEffectsRemoved, onEffectUpdated, onEnchantmentPerformed, onEnterCombat, onEquippedItemBroken, onExplosionHit, onInsideBlock, onItemPickup, onLeaveCombat, onUpdateAbilities, openCommandBlock, openItemGui, openMenu, openTextEdit, placeEnderPearlTicket, playNotifySound, processPortalCooldown, pushEntities, readAdditionalSaveData, refreshTabListName, registerAndUpdateEnderPearlTicket, registerEnderPearl, removeVehicle, requestedViewDistance, resetFallDistance, resetLastActionTime, resetRecipes, resetSentInfo, resetStat, restoreFrom, rideTick, sendChatMessage, sendMerchantOffers, sendServerStatus, sendSystemMessage, sendSystemMessage, serverLevel, setCamera, setChatSession, setChunkTrackingView, setExperienceLevels, setExperiencePoints, setGameMode, setKnownMovement, setLastClientInput, setLastSectionPos, setRaidOmenPosition, setRespawnPosition, setServerLevel, setSpawnExtraParticlesOnFall, setTabListFooter, setTabListHeader, setTabListHeaderFooter, shouldFilterMessageTo, showEndCredits, snapTo, startSleepInBed, startSleeping, stopSleepInBed, swing, take, teleport, teleportRelative, teleportTo, teleportTo, tickRegeneration, trackEnteredOrExitedLavaOnVehicle, trackStartFallingPosition, triggerRecipeCrafted, updateInvisibilityStatus, updateUsingItem
Methods inherited from class net.minecraft.world.entity.player.Player
actuallyHurt, addItem, aiStep, animateHurt, awardStat, awardStat, awardStat, blockActionRestricted, blockInteractionRange, blockUsingItem, canBeHitByProjectile, canBeSeenAsEnemy, canDropItems, canEat, canGlide, canInteractWithBlock, canInteractWithEntity, canInteractWithEntity, canPlayerFitWithinBlocksAndEntitiesWhen, canSimulateMovement, canSprint, canUseGameMasterBlocks, causeFallDamage, causeFoodExhaustion, createAttributes, createEquipment, debugInfo, defineSynchedData, destroyVanishingCursedItems, doAutoAttackOnTouch, doesEmitEquipEvent, doWaterSplashEffect, drop, dropEquipment, entityInteractionRange, freeAt, getAbilities, getAbsorptionAmount, getAttackStrengthScale, getBaseExperienceReward, getBlockSpeedFactor, getCooldowns, getCurrentItemAttackStrengthDelay, getDeathSound, getDefaultDimensions, getDestroySpeed, getDestroySpeed, getDimensionChangingDelay, getDismountPoses, getDisplayName, getEnchantmentSeed, getEnderChestInventory, getFallSounds, getFireImmuneTicks, getFlyingSpeed, getFoodData, getForcedPose, getGameProfile, getHurtDir, getHurtSound, getInventory, getLastDeathLocation, getLuck, getMainArm, getMaxHeadRotationRelativeToBody, getMovementEmission, getName, getPrefixes, getProjectile, getRopeHoldPosition, getScore, getScoreboard, getScoreboardName, getShoulderEntityLeft, getShoulderEntityRight, getSleepTimer, getSlot, getSoundSource, getSpeed, getSuffixes, getSwimHighSpeedSplashSound, getSwimSound, getSwimSplashSound, getWeaponItem, getXpNeededForNextLevel, handleCreativeModeItemDrop, handleEntityEvent, hasClientLoaded, hasContainerOpen, hasCorrectToolForDrops, hasCorrectToolForDrops, hasInfiniteMaterials, hasPermissions, hurtArmor, hurtHelmet, increaseScore, interactOn, internalSetAbsorptionAmount, isAffectedByFluids, isAlwaysExperienceDropper, isAlwaysTicking, isClientAuthoritative, isCreative, isEffectiveAi, isHurt, isIgnoringFallDamageFromCurrentImpulse, isImmobile, isLocalClientAuthoritative, isLocalPlayer, isModelPartShown, isPushedByFluid, isReducedDebugInfo, isScoping, isSecondaryUseActive, isSleepingLongEnough, isSpectator, isStayingOnGroundSurface, isSwimming, killedEntity, makeStuckInBlock, maybeBackOffFromEdge, mayBuild, mayUseItemAt, onAboveBubbleColumn, onClimbable, onInsideBubbleColumn, openJigsawBlock, openMinecartCommandBlock, openStructureBlock, openTestBlock, openTestInstanceBlock, playSound, playStepSound, preventsBlockDrops, refreshDisplayName, remove, removeEntitiesOnShoulder, resetAttackStrengthTicker, resetCurrentImpulseContext, respawn, setClientLoaded, setEntityOnShoulder, setForcedPose, setIgnoreFallDamageFromCurrentImpulse, setLastDeathLocation, setMainArm, setReducedDebugInfo, setRemainingFireTicks, setScore, setShoulderEntityLeft, setShoulderEntityRight, shouldBeSaved, shouldRotateWithMinecart, shouldShowName, startAutoSpinAttack, startFallFlying, stopSleeping, sweepAttack, tickClientLoadTimeout, travel, tryResetCurrentImpulseContext, tryToStartFallFlying, updateIsUnderwater, updatePlayerPose, updateSwimming, updateTutorialInventoryAction, wantsToStopRiding
Methods inherited from class net.minecraft.world.entity.LivingEntity
activeLocationDependentEnchantments, addEffect, addEffect, applyInput, applyItemBlocking, areAllEffectsAmbient, attackable, baseTick, blockedByItem, brainProvider, calculateEntityAnimation, calculateFallDamage, canAttack, canAttackType, canBeAffected, canBeSeenByAnyone, canBreatheUnderwater, canDispenserEquipIntoSlot, canEquipWithDispenser, canFreeze, canGlideUsing, canPickUpLoot, canStandOnFluid, canUsePortal, canUseSlot, checkAutoSpinAttack, clearSleepingPos, createLivingAttributes, createWitherRose, decreaseAirSupply, doHurtEquipment, doHurtTarget, doPush, dropAllDeathLoot, dropCustomDeathLoot, dropExperience, dropFromGiftLootTable, dropFromLootTable, dropFromLootTable, dropFromShearingLootTable, equipmentHasChanged, forceAddEffect, getActiveEffects, getActiveEffectsMap, getAgeScale, getArmorCoverPercentage, getArmorValue, getArrowCount, getAttackAnim, getAttribute, getAttributeBaseValue, getAttributes, getAttributeValue, getBedOrientation, getBrain, getCombatTracker, getComfortableFallDistance, getCurrentSwingDuration, getDamageAfterArmorAbsorb, getDamageAfterMagicAbsorb, getDefaultGravity, getDimensions, getEffect, getEffectBlendFactor, getEffectiveGravity, getEquipmentSlotForItem, getEquipSound, getExperienceReward, getFallFlyingTicks, getFluidFallingAdjustedMovement, getHealth, getHitbox, getInterpolation, getItemBlockingWith, getItemBySlot, getItemHeldByArm, getItemInHand, getJumpBoostPower, getJumpPower, getJumpPower, getKillCredit, getKnockback, getLastAttacker, getLastClimbablePos, getLastDamageSource, getLastHurtByMob, getLastHurtByMobTimestamp, getLastHurtByPlayer, getLastHurtByPlayerMemoryTime, getLastHurtMob, getLastHurtMobTimestamp, getLocalBoundsForPose, getLootTableSeed, getMainHandItem, getMaxAbsorption, getMaxFallDistance, getMaxHealth, getNoActionTime, getOffhandItem, getPassengerRidingPosition, getPreciseBodyRotation, getRelativePortalPosition, getRiddenInput, getRiddenSpeed, getScale, getSecondsToDisableBlocking, getSleepingPos, getSlotForHand, getSoundVolume, getStingerCount, getSwimAmount, getTicksUsingItem, getUsedItemHand, getUseItem, getUseItemRemainingTicks, getViewYRot, getVisibilityPercent, getVisualRotationYInDegrees, getVoicePitch, getWaterSlowDown, getYHeadRot, goDownInWater, handleDamageEvent, hasEffect, hasItemInSlot, hasLandedInLiquid, hasLineOfSight, hasLineOfSight, heal, igniteForTicks, increaseAirSupply, isAffectedByPotions, isAlive, isAutoSpinAttack, isBaby, isBlocking, isCurrentlyGlowing, isDeadOrDying, isEquippableInSlot, isFallFlying, isHolding, isHolding, isInvertedHealAndHarm, isInWall, isLookingAtMe, isPickable, isPushable, isSensitiveToWater, isSleeping, isSuppressingSlidingDownLadder, isUsingItem, isVisuallySwimming, jumpInLiquid, kill, knockback, lerpHeadRotationStep, lerpHeadTo, makeBrain, makePoofParticles, makeSound, maxUpStep, onAttributeUpdated, onBelowWorld, onEquipItem, onSyncedDataUpdated, playBlockFallSound, playHurtSound, push, randomTeleport, recreateFromPacket, releaseUsingItem, removeAllEffects, removeEffect, removeEffectNoUpdate, removeEffectParticles, removeFrost, resetForwardDirectionOfRelativePortalPosition, resolveMobResponsibleForDamage, resolvePlayerResponsibleForDamage, sanitizeScale, sendEffectToPassengers, serverAiStep, setAbsorptionAmount, setArrowCount, setDiscardFriction, setHealth, setItemInHand, setItemSlot, setJumping, setLastHurtByMob, setLastHurtByPlayer, setLastHurtByPlayer, setLastHurtMob, setLivingEntityFlag, setNoActionTime, setRecordPlayingNearby, setSleepingPos, setSpeed, setSprinting, setStingerCount, setYBodyRot, setYHeadRot, shouldDiscardFriction, shouldDropExperience, shouldDropLoot, skipDropExperience, spawnItemParticles, startUsingItem, stopFallFlying, stopRiding, stopUsingItem, swing, tickDeath, tickEffects, tickHeadTurn, tickRidden, triggerOnDeathMobEffects, tryAddFrost, updateEffectVisibility, updateFallFlying, updateSwingTime, updateWalkAnimation, wasExperienceConsumed, wouldNotSuffocateAtTargetPose
Methods inherited from class net.minecraft.world.entity.Entity
absSnapRotationTo, absSnapTo, absSnapTo, addDeltaMovement, addPassenger, addTag, applyComponentsFromItemStack, applyEffectsFromBlocks, applyEffectsFromBlocks, applyGravity, applyImplicitComponent, applyImplicitComponentIfPresent, applyImplicitComponents, blockPosition, calculateUpVector, calculateViewVector, canAddPassenger, canBeCollidedWith, canCollideWith, canControlVehicle, canRide, canSpawnSprintParticle, canTeleport, canTrample, captureDrops, captureDrops, castComponentValue, checkBelowWorld, checkDespawn, checkSlowFallDistance, checkSupportingBlock, chunkPosition, clearFire, clearFreeze, closerThan, closerThan, collideBoundingBox, considersEntityAsAlly, copyPosition, couldAcceptPassenger, countPlayerPassengers, createCommandSourceStackForNameResolution, createHoverEvent, damageSources, dampensVibrations, deflection, discard, dismountsUnderwater, dismountTo, displayFireAnimation, distanceTo, distanceToSqr, distanceToSqr, distanceToSqr, doCheckFallDamage, ejectPassengers, equals, extinguishFire, fillCrashReportCategory, fireImmune, fixupDimensions, fudgePositionAfterSizeChange, gameEvent, gameEvent, get, getAddEntityPacket, getAirSupply, getAttachments, getBbHeight, getBbWidth, getBlockExplosionResistance, getBlockJumpFactor, getBlockPosBelowThatAffectsMyMovement, getBlockStateOn, getBlockStateOnLegacy, getBlockX, getBlockY, getBlockZ, getBoundingBox, getCapability, getCapability, getCollisionHorizontalEscapeVector, getCommandSenderWorld, getControlledVehicle, getControllingPassenger, getCustomName, getDefaultPassengerAttachmentPoint, getDeltaMovement, getDirection, getDismountLocationForPassenger, getEncodeId, getEntityData, getEyeHeight, getEyeHeight, getEyeInFluidType, getEyePosition, getEyePosition, getEyeY, getFirstPassenger, getFluidHeight, getFluidJumpThreshold, getFluidTypeHeight, getForward, getGravity, getHandHoldingItemAngle, getId, getInBlockState, getIndirectPassengers, getInputVector, getLeashOffset, getLeashOffset, getLightLevelDependentMagicValue, getLightProbePosition, getLookAngle, getLootTable, getMaxAirSupply, getMaxHeightFluidType, getMotionDirection, getNearestViewDirection, getOnPos, getOnPos, getOnPosLegacy, getPassengerAttachmentPoint, getPassengers, getPassengersAndSelf, getPercentFrozen, getPersistentData, getPickRadius, getPickResult, getPistonPushReaction, getPortalCooldown, getPose, getPosition, getPositionCodec, getPrimaryStepSoundBlockPos, getRandom, getRandomX, getRandomY, getRandomZ, getRemainingFireTicks, getRemovalReason, getRootVehicle, getRotationVector, getSelfAndPassengers, getSharedFlag, getStringUUID, getTags, getTeam, getTeamColor, getTicksFrozen, getTicksRequiredToFreeze, getType, getTypeName, getUpVector, getUUID, getVehicle, getVehicleAttachmentPoint, getViewScale, getViewVector, getViewXRot, getX, getX, getXRot, getXRot, getY, getY, getYRot, getYRot, getZ, getZ, handleOnAboveBubbleColumn, handleOnInsideBubbleColumn, handlePortal, hasControllingPassenger, hasCustomName, hasExactlyOnePlayerPassenger, hasGlowingTag, hashCode, hasIndirectPassenger, hasPassenger, hasPassenger, hasPose, hurt, hurtClient, hurtOrSimulate, igniteForSeconds, ignoreExplosion, interact, interactAt, is, isAddedToLevel, isAffectedByBlocks, isAlliedTo, isAlliedTo, isAttackable, isColliding, isCrouching, isCustomNameVisible, isDescending, isDiscrete, isEyeInFluid, isFlapping, isFree, isFreezing, isFullyFrozen, isHorizontalCollisionMinor, isIgnoringBlockTriggers, isInFluidType, isInFluidType, isInLava, isInLiquid, isInterpolating, isInvisible, isInvisibleTo, isInvulnerable, isInvulnerableToBase, isInWater, isInWaterOrRain, isLocalInstanceAuthoritative, isNoGravity, isOnFire, isOnPortalCooldown, isOnRails, isPassenger, isPassengerOfSameVehicle, isRemoved, isShiftKeyDown, isSilent, isSprinting, isSteppingCarefully, isSupportedBy, isSuppressingBounce, isUnderWater, isVehicle, isVisuallyCrawling, lavaHurt, lavaIgnite, lerpMotion, lerpPositionAndRotationStep, level, limitPistonMovement, load, makeBoundingBox, makeBoundingBox, markHurt, mirror, move, moveOrInterpolateTo, moveRelative, moveTowardsClosestSpace, nextStep, oldPosition, onAddedToLevel, onClientRemoval, onFlap, onGround, onPassengerTurned, onRemoval, onRemovedFromLevel, onSyncedDataUpdated, pick, placePortalTicket, playCombinationStepSounds, playEntityOnFireExtinguishedSound, playerTouch, playMuffledStepSound, playSound, playSwimSound, position, positionRider, positionRider, processFlappingMovement, propagateFallToPassengers, push, push, reapplyPosition, refreshDimensions, registryAccess, removeAfterChangingDimensions, removeLatestMovementRecordingBatch, removePassenger, removeTag, repositionEntityAfterLoad, restoreFrom, revive, rotate, save, saveAsPassenger, saveWithoutId, sendBubbleColumnParticles, setAirSupply, setAsInsidePortal, setBoundingBox, setComponent, setCustomName, setCustomNameVisible, setData, setDeltaMovement, setDeltaMovement, setFluidTypeHeight, setGlowingTag, setId, setInvisible, setInvulnerable, setIsInPowderSnow, setLevel, setLevelCallback, setNoGravity, setOldPos, setOldPosAndRot, setOldPosAndRot, setOldRot, setOnGround, setOnGroundWithMovement, setOnGroundWithMovement, setPortalCooldown, setPortalCooldown, setPos, setPos, setPose, setPosRaw, setRemoved, setRot, setSharedFlag, setSharedFlagOnFire, setShiftKeyDown, setSilent, setSwimming, setTicksFrozen, setUUID, setViewScale, setXRot, setYRot, shouldBlockExplode, shouldPlayLavaHurtSound, shouldRender, shouldRenderAtSqrDistance, showVehicleHealth, skipAttackInteraction, snapTo, snapTo, snapTo, snapTo, spawnAtLocation, spawnAtLocation, spawnAtLocation, spawnAtLocation, spawnSprintParticle, startRiding, startSeenByPlayer, stopSeenByPlayer, syncPacketPositionCodec, teleportSetPosition, thunderHit, toString, touchingUnloadedChunk, trackingPosition, turn, unRide, unsetRemoved, updateDynamicGameEventListener, updateFluidHeightAndDoFluidPushing, updateFluidHeightAndDoFluidPushing, updateInWaterStateAndDoFluidPushing, waterSwimSound
Methods inherited from class net.neoforged.neoforge.attachment.AttachmentHolder
deserializeAttachments, getData, getExistingDataOrNull, hasAttachments, hasData, removeData, serializeAttachments
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.core.component.DataComponentGetter
get, getOrDefault, getOrDefault, getTyped, has, has
Methods inherited from interface net.neoforged.neoforge.attachment.IAttachmentHolder
getData, getExistingData, getExistingData, getExistingDataOrNull, hasData, removeData, setData
Methods inherited from interface net.neoforged.neoforge.common.extensions.IEntityExtension
canBeRiddenUnderFluidType, canFluidExtinguish, canHydrateInFluidType, canRiderInteract, canStartSwimming, canTrample, captureDrops, captureDrops, copyAttachmentsFrom, getClassification, getEyeInFluidType, getFluidFallDistanceModifier, getFluidMotionScale, getFluidTypeHeight, getMaxHeightFluidType, getParts, getPersistentData, getSoundFromFluidType, hasCustomOutlineRendering, isAddedToLevel, isEyeInFluidType, isInFluidType, isInFluidType, isInFluidType, isInFluidType, isInFluidType, isMultipartEntity, isPushedByFluid, onAddedToLevel, onRemovedFromLevel, revive, sendPairingData, shouldRiderSit
Methods inherited from interface net.neoforged.neoforge.common.extensions.ILivingEntityExtension
canDrownInFluidType, canSwimInFluidType, jumpInFluid, moveInFluid, onDamageTaken, self, sinkInFluid
Methods inherited from interface net.neoforged.neoforge.common.extensions.IPlayerExtension
isCloseEnough, mayFly, openMenu
Methods inherited from interface net.minecraft.world.scores.ScoreHolder
getFeedbackDisplayName
-
Constructor Details
-
FakePlayer
public FakePlayer(net.minecraft.server.level.ServerLevel level, com.mojang.authlib.GameProfile name)
-
-
Method Details
-
displayClientMessage
public void displayClientMessage(net.minecraft.network.chat.Component chatComponent, boolean actionBar) - Overrides:
displayClientMessage
in classnet.minecraft.server.level.ServerPlayer
-
awardStat
public void awardStat(net.minecraft.stats.Stat<?> stat, int amount) - Overrides:
awardStat
in classnet.minecraft.server.level.ServerPlayer
-
canHarmPlayer
public boolean canHarmPlayer(net.minecraft.world.entity.player.Player player) - Overrides:
canHarmPlayer
in classnet.minecraft.server.level.ServerPlayer
-
die
public void die(net.minecraft.world.damagesource.DamageSource source) - Overrides:
die
in classnet.minecraft.server.level.ServerPlayer
-
tick
public void tick()- Overrides:
tick
in classnet.minecraft.server.level.ServerPlayer
-
updateOptions
public void updateOptions(net.minecraft.server.level.ClientInformation p_301998_) - Overrides:
updateOptions
in classnet.minecraft.server.level.ServerPlayer
-
openMenu
public OptionalInt openMenu(@Nullable @Nullable net.minecraft.world.MenuProvider menuProvider, @Nullable @Nullable Consumer<net.minecraft.network.RegistryFriendlyByteBuf> extraDataWriter) Description copied from interface:IPlayerExtension
Request to open a GUI on the client, from the serverRefer to
IMenuTypeExtension.create(IContainerFactory)
for creating aMenuType
that can consume the extra data sent to the client by this method.The maximum size for #extraDataWriter is 32600 bytes.
- Specified by:
openMenu
in interfaceIPlayerExtension
- Overrides:
openMenu
in classnet.minecraft.server.level.ServerPlayer
- Parameters:
menuProvider
- A supplier of container properties including the registry name of the containerextraDataWriter
- Consumer to write any additional data the GUI needs. This data is written afterIMenuProviderExtension.writeClientSideData(AbstractContainerMenu, RegistryFriendlyByteBuf)
.- Returns:
- The window ID of the opened GUI, or empty if the GUI could not be opened
-
openHorseInventory
public void openHorseInventory(net.minecraft.world.entity.animal.horse.AbstractHorse horse, net.minecraft.world.Container container) - Overrides:
openHorseInventory
in classnet.minecraft.server.level.ServerPlayer
-
startRiding
public boolean startRiding(net.minecraft.world.entity.Entity entity, boolean force) - Overrides:
startRiding
in classnet.minecraft.server.level.ServerPlayer
-
getServer
@Nullable public @Nullable net.minecraft.server.MinecraftServer getServer()- Overrides:
getServer
in classnet.minecraft.world.entity.Entity
-
isFakePlayer
public boolean isFakePlayer()Description copied from interface:IPlayerExtension
Returns whether this player is a fake player, such asFakePlayer
.- Returns:
- whether this player is a fake player, such as
FakePlayer
-