Class FakePlayer
- All Implemented Interfaces:
Attackable
,DataTracked
,ScoreHolder
,Nameable
,EntityLike
ServerPlayerEntity
that is not a human player.
They are typically used to automatically perform player actions such as placing blocks.
The easiest way to obtain a fake player is with get(ServerWorld)
or get(ServerWorld, GameProfile)
.
It is also possible to create a subclass for more control over the fake player's behavior.
For good inter-mod compatibility, fake players should have the UUID of their owning (human) player.
They should still have a different name to ensure the GameProfile
is different.
For example:
UUID humanPlayerUuid = ...;
String humanPlayerName = ...;
GameProfile fakeProfile = new GameProfile(humanPlayerUuid, "[Block Breaker of " + humanPlayerName + "]");
If a fake player does not belong to a specific player, the default UUID
should be used.
Fake players try to behave like regular ServerPlayerEntity
objects to a reasonable extent.
In some edge cases, or for gameplay considerations, it might be necessary to check whether a ServerPlayerEntity
is a fake player.
This can be done with an instanceof
check: player instanceof FakePlayer
.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.entity.player.PlayerEntity
PlayerEntity.SleepFailureReason
Nested classes/interfaces inherited from class net.minecraft.entity.LivingEntity
LivingEntity.FallSounds
Nested classes/interfaces inherited from class net.minecraft.entity.Entity
Entity.MoveEffect, Entity.PositionUpdater, Entity.RemovalReason
-
Field Summary
Modifier and TypeFieldDescriptionstatic final UUID
Default UUID, for fake players not associated with a specific (human) player.Fields inherited from class net.minecraft.server.network.ServerPlayerEntity
ENDER_PEARLS_DIMENSION_KEY, ENDER_PEARLS_KEY, field_49777, field_54046, field_54047, field_54207, interactionManager, networkHandler, notInAnyWorld, seenCredits, server
Fields inherited from class net.minecraft.entity.player.PlayerEntity
abilityResyncCountdown, capeX, capeY, capeZ, currentExplosionImpactPos, currentScreenHandler, damageTiltYaw, DEFAULT_EYE_HEIGHT, DEFAULT_MAIN_ARM, enchantingTableSeed, enderChestInventory, experienceLevel, experiencePickUpDelay, experienceProgress, explodedBy, field_30644, field_30645, field_30646, field_30647, field_30648, field_30649, field_30650, field_46175, field_47819, field_47820, field_49734, field_49735, field_7509, fishHook, hungerManager, isSubmergedInWater, LEFT_SHOULDER_ENTITY, MAIN_ARM, PLAYER_MODEL_PARTS, playerScreenHandler, prevCapeX, prevCapeY, prevCapeZ, prevStrideDistance, RIGHT_SHOULDER_ENTITY, STANDING_DIMENSIONS, strideDistance, totalExperience, VEHICLE_ATTACHMENT_POS
Fields inherited from class net.minecraft.entity.LivingEntity
activeItemStack, attackingPlayer, ATTRIBUTES_NBT_KEY, BABY_SCALE_FACTOR, bodyTrackingIncrements, bodyYaw, brain, dead, DEATH_TICKS, deathTime, defaultMaxHealth, despawnCounter, elytraFlightController, EQUIPMENT_SLOT_ID, field_30069, field_30070, field_30072, field_30074, field_30075, field_44874, field_47756, field_48827, field_6215, forwardSpeed, glidingTicks, GLOWING_FLAG, GRAVITY, handSwinging, handSwingProgress, handSwingTicks, headTrackingIncrements, headYaw, hurtTime, itemUseTimeLeft, jumping, lastAttackedTicks, lastDamageTaken, lastHandSwingProgress, limbAnimator, LIVING_FLAGS, lookDirection, maxHurtTime, NOT_WEARING_GAZE_DISGUISE_PREDICATE, OFF_HAND_ACTIVE_FLAG, playerHitTimer, preferredHand, prevBodyYaw, prevHeadYaw, prevLookDirection, prevScale, prevStepBobbingAmount, randomLargeSeed, randomSmallSeed, riptideAttackDamage, riptideStack, riptideTicks, scoreAmount, serverHeadYaw, serverPitch, serverX, serverY, serverYaw, serverZ, sidewaysSpeed, SLEEPING_DIMENSIONS, stepBobbingAmount, stuckArrowTimer, stuckStingerTimer, upwardSpeed, USING_ITEM_FLAG, USING_RIPTIDE_FLAG
Fields inherited from class net.minecraft.entity.Entity
age, collidedSoftly, dataTracker, DEFAULT_FRICTION, DEFAULT_MIN_FREEZE_DAMAGE_TICKS, DEFAULT_PORTAL_COOLDOWN, distanceTraveled, fallDistance, field_44870, field_44871, field_44872, field_49073, field_49791, firstUpdate, FLAGS, fluidHeight, FREEZING_DAMAGE_INTERVAL, GLIDING_FLAG_INDEX, GLOWING_FLAG_INDEX, groundCollision, horizontalCollision, ID_KEY, inPowderSnow, intersectionChecked, lastRenderX, lastRenderY, lastRenderZ, MAX_COMMAND_TAGS, MAX_RIDING_COOLDOWN, MIN_RISING_BUBBLE_COLUMN_SPEED, movementMultiplier, noClip, ON_FIRE_FLAG_INDEX, PASSENGERS_KEY, portalManager, POSE, prevPitch, prevX, prevY, prevYaw, prevZ, random, ridingCooldown, speed, submergedInWater, supportingBlockPos, timeUntilRegen, touchingWater, uuid, UUID_KEY, uuidString, velocityDirty, velocityModified, verticalCollision, wasInPowderSnow
Fields inherited from interface net.minecraft.scoreboard.ScoreHolder
WILDCARD, WILDCARD_NAME
-
Constructor Summary
ModifierConstructorDescriptionprotected
FakePlayer
(ServerWorld world, com.mojang.authlib.GameProfile profile) -
Method Summary
Modifier and TypeMethodDescriptionstatic FakePlayer
get
(ServerWorld world) Retrieves a fake player for the specified world, using thedefault UUID
.static FakePlayer
get
(ServerWorld world, com.mojang.authlib.GameProfile profile) Retrieves a fake player for the specified world and game profile.@Nullable Team
void
increaseStat
(Stat<?> stat, int amount) boolean
isInvulnerableTo
(ServerWorld world, DamageSource damageSource) void
openEditSignScreen
(SignBlockEntity sign, boolean front) openHandledScreen
(@Nullable NamedScreenHandlerFactory factory) void
openHorseInventory
(AbstractHorseEntity horse, Inventory inventory) void
void
setClientOptions
(SyncedClientOptions settings) void
boolean
startRiding
(Entity entity, boolean force) void
tick()
Methods inherited from class net.minecraft.server.network.ServerPlayerEntity
addCritParticles, addEnchantedHitParticles, addEnderPearl, addEnderPearlTicket, addExperience, addExperienceLevels, allowsServerListing, applyEnchantmentCosts, applyMovementEffects, areClientChatColorsEnabled, attack, canBeSpectated, canModifyAt, changeGameMode, clearStartRaidPos, closeHandledScreen, consumeItem, copyFrom, createCommonPlayerSpawnInfo, createCooldownManager, damage, detachForDimensionChange, dropItem, dropSelectedItem, endCombat, enterCombat, fall, getAdvancementTracker, getCameraEntity, getChunkFilter, getClientChatVisibility, getClientOptions, getCommandOutput, getCommandSource, getDamageAgainst, getEnderPearls, getInputVelocityForMinecart, getIp, getLastActionTime, getMovement, getPermissionLevel, getPlayerInput, getPlayerListName, getPlayerListOrder, getRecipeBook, getRespawnTarget, getSculkShriekerWarningManager, getServerWorld, getSession, getSpawnAngle, getSpawnPointDimension, getSpawnPointPosition, getStartRaidPos, getStatHandler, getTextStream, getViewDistance, getWatchedSection, getWorldSpawnPos, giveOrDropStack, handleFall, handleThrownEnderPearl, increaseTravelMotionStats, isCreative, isDisconnected, isInTeleportationState, isSpawnForced, isSpectator, jump, lockRecipes, lookAt, lookAtEntity, markHealthDirty, onBlockCollision, onDeath, onDisconnect, onExplodedBy, onHandledScreenClosed, onLanding, onRecipeCrafted, onSpawn, onStatusEffectApplied, onStatusEffectsRemoved, onStatusEffectUpgraded, onTeleportationDone, openCommandBlockScreen, playerTick, playSoundToPlayer, readCustomDataFromNbt, readEnderPearls, readGameModeNbt, readRootVehicle, refreshPositionAfterTeleport, removeEnderPearl, requestTeleport, requestTeleportAndDismount, requestTeleportOffset, rotate, sendAbilitiesUpdate, sendChatMessage, sendEquipmentBreakStatus, sendMessage, sendMessage, sendMessageToClient, sendPickup, sendServerMetadata, sendTradeOffers, setCameraEntity, setChunkFilter, setExperienceLevel, setExperiencePoints, setMovement, setPlayerInput, setServerWorld, setSession, setSpawnExtraParticlesOnFall, setSpawnPoint, setSpawnPointFrom, setStartRaidPos, setWatchedSection, shouldDamagePlayer, shouldFilterMessagesSentTo, shouldFilterText, stopRiding, swingHand, teleport, teleportTo, tickCramming, tickFallStartPos, tickHunger, tickItemStackUsage, tickPortalCooldown, tickRiding, tickVehicleInLavaRiding, tiltScreen, triggerItemPickedUpByEntityCriteria, trySleep, unlockRecipes, unlockRecipes, updateKilledAdvancementCriterion, updateLastActionTime, updatePotionVisibility, useBook, wakeUp, writeCustomDataToNbt
Methods inherited from class net.minecraft.entity.player.PlayerEntity
addExhaustion, addScore, addShoulderEntity, adjustMovementForSneaking, animateDamage, applyDamage, attackLivingEntity, canBeHitByProjectile, canChangeIntoPose, canConsume, canDropItems, canFoodHeal, canGlide, canHarvest, canInteractWithBlockAt, canInteractWithEntity, canInteractWithEntityIn, canModifyBlocks, canPlaceOn, canResetTimeBySleeping, canSprintAsVehicle, canTakeDamage, canUseSlot, checkGliding, clearCurrentExplosion, clipAtLedge, createPlayerAttributes, damageArmor, damageHelmet, damageShield, disableShield, dismountVehicle, doesNotSuffocate, dropCreativeStack, dropInventory, dropItem, dropShoulderEntities, equipStack, getAbilities, getAbsorptionAmount, getArmorItems, getAttackCooldownProgress, getAttackCooldownProgressPerTick, getBaseDimensions, getBlockBreakingSpeed, getBlockInteractionRange, getBurningDuration, getDamageTiltYaw, getDeathSound, getDefaultPortalCooldown, getDisplayName, getEnchantingTableSeed, getEnderChestInventory, getEntityInteractionRange, getEquippedStack, getFallSounds, getGameProfile, getHandItems, getHighSpeedSplashSound, getHungerManager, getHurtSound, getInventory, getItemCooldownManager, getLastDeathPos, getLeashPos, getLuck, getMainArm, getMaxRelativeHeadRotation, getMoveEffect, getMovementSpeed, getName, getNameForScoreboard, getNextLevelExperience, getOffGroundSpeed, getPoses, getProjectileType, getScore, getScoreboard, getShoulderEntityLeft, getShoulderEntityRight, getSleepTimer, getSoundCategory, getSplashSound, getStackReference, getSwimSound, getVelocityMultiplier, getWeaponStack, getXpToDrop, giveItemStack, handleFallDamage, handleStatus, hasPermissionLevel, hasReducedDebugInfo, increaseStat, incrementStat, incrementStat, initDataTracker, interact, isArmorSlot, isBlockBreakingRestricted, isControlledByPlayer, isCreativeLevelTwoOp, isImmobile, isInCreativeMode, isMainPlayer, isPartVisible, isPlayer, isPushedByFluids, isSwimming, isUsingSpyglass, onBubbleColumnCollision, onBubbleColumnSurfaceCollision, onKilledOther, onPickupSlotClick, onSwimmingStart, openCommandBlockMinecartScreen, openJigsawScreen, openStructureBlockScreen, playSound, playStepSound, remove, requestRespawn, resetLastAttackedTicks, setAbsorptionAmountUnclamped, setFireTicks, setIgnoreFallDamageFromCurrentExplosion, setLastDeathPos, setMainArm, setReducedDebugInfo, setScore, setShoulderEntityLeft, setShoulderEntityRight, shouldAlwaysDropXp, shouldCancelInteraction, shouldCloseHandledScreenOnRespawn, shouldDismount, shouldIgnoreFallDamageFromCurrentExplosion, shouldRenderName, shouldRotateWithMinecart, shouldSave, shouldSwimInFluids, slowMovement, spawnSweepAttackParticles, startGliding, stopGliding, takeShieldHit, tickMovement, tickNewAi, travel, tryClearCurrentExplosion, updatePose, updateSwimming, updateWaterSubmersionState, useRiptide, vanishCursedItems, wakeUp
Methods inherited from class net.minecraft.entity.LivingEntity
addDeathParticles, addPowderSnowSlowIfNeeded, addStatusEffect, addStatusEffect, applyArmorToDamage, applyFluidMovingSpeed, areItemsDifferent, baseTick, blockedByShield, canBreatheInWater, canDispenserEquipSlot, canEquip, canEquipFromDispenser, canFreeze, canGlideWith, canHaveStatusEffect, canHit, canPickUpLoot, canSee, canSee, canTarget, canTarget, canUsePortals, canWalkOnFluid, clampScale, clearActiveItem, clearPotionSwirls, clearSleepingPosition, clearStatusEffects, computeFallDamage, containsOnlyAmbientEffects, createBrainProfile, createLivingAttributes, damageEquipment, deserializeBrain, disableExperienceDropping, disablesShield, drop, dropEquipment, dropLoot, dropXp, forEachGeneratedItem, forEachGiftedItem, forEachShearedItem, getActiveHand, getActiveItem, getActiveStatusEffects, getAllArmorItems, getArmor, getArmorVisibility, getAttackDistanceScalingFactor, getAttacker, getAttacking, getAttributeBaseValue, getAttributeInstance, getAttributes, getAttributeValue, getBaseMovementSpeedMultiplier, getBlockingItem, getBodyYaw, getBoundingBox, getBrain, getClimbingPos, getControlledMovementInput, getDamageTracker, getDespawnCounter, getDimensions, getEffectiveGravity, getEquippedItems, getGlidingTicks, getGravity, getHandSwingProgress, getHeadYaw, getHealth, getHitbox, getItemUseTime, getItemUseTimeLeft, getJumpBoostVelocityModifier, getJumpVelocity, getJumpVelocity, getKnockbackAgainst, getLastAttackedTime, getLastAttacker, getLastAttackTime, getLeaningPitch, getLerpTargetPitch, getLerpTargetX, getLerpTargetY, getLerpTargetYaw, getLerpTargetZ, getLocationBasedEnchantmentEffects, getLootTableSeed, getMainHandStack, getMaxAbsorption, getMaxHealth, getNextAirOnLand, getNextAirUnderwater, getOffHandStack, getPassengerRidingPos, getPlayerHitTimer, getPreferredEquipmentSlot, getPrimeAdversary, getRecentDamageSource, getSaddledSpeed, getSafeFallDistance, getSafeFallDistance, getScale, getScaleFactor, getSleepingDirection, getSleepingPosition, getSlotForHand, getSoundPitch, getSoundVolume, getStackInArm, getStackInHand, getStatusEffect, getStatusEffects, getStepHeight, getStingerCount, getStuckArrowCount, getXpToDrop, getYaw, hasInvertedHealingAndHarm, hasLandedInFluid, hasNoDrag, hasStackEquipped, hasStatusEffect, heal, hurtByWater, isAffectedBySplashPotions, isAlive, isBaby, isBlocking, isClimbing, isDead, isEntityLookingAtMe, isExperienceDroppingDisabled, isGliding, isGlowing, isHolding, isHolding, isHoldingOntoLadder, isInsideWall, isInSwimmingPose, isMobOrPlayer, isPartOfGame, isPushable, isSleeping, isUsingItem, isUsingRiptide, kill, knockback, knockDownwards, lerpHeadYaw, lerpYaw, markEffectsDirty, modifyAppliedDamage, onAttacking, onDamaged, onEquipStack, onKilledBy, onRemoval, onSpawnPacket, onTrackedDataSet, playBlockFallSound, playHurtSound, playSound, positionInPortal, positionInPortal, processEquippedStack, pushAway, pushAwayFrom, removePowderSnowSlow, removeStatusEffect, removeStatusEffectInternal, resetLerp, sendEffectToControllingPlayer, setAbsorptionAmount, setAttacker, setAttacking, setBodyYaw, setCurrentHand, setDespawnCounter, setHeadYaw, setHealth, setJumping, setLivingFlag, setMovementSpeed, setNearbySongPlaying, setNoDrag, setOnFireForTicks, setSleepingPosition, setSprinting, setStackInHand, setStatusEffect, setStingerCount, setStuckArrowCount, shouldDropLoot, shouldDropXp, spawnItemParticles, stopUsingItem, swimUpward, swingHand, takeKnockback, teleport, tickControlled, tickGliding, tickHandSwing, tickInVoid, tickRiptide, tickStatusEffects, tryAttack, turnHead, updateAttribute, updateLimbs, updateLimbs, updatePostDeath, updateTrackedHeadRotation, updateTrackedPositionAndAngles, wouldNotSuffocateInPose
Methods inherited from class net.minecraft.entity.Entity
addAirTravelEffects, addCommandTag, addFlapEffects, addPassenger, addPortalChunkTicketAt, addVelocity, addVelocity, addVelocityInternal, adjustMovementForCollisions, adjustMovementForPiston, applyGravity, applyMirror, applyRotation, attemptTickInVoid, bypassesLandingEffects, bypassesSteppingEffects, calculateBoundingBox, calculateDimensions, calculateNextStepSoundDistance, canAddPassenger, canAvoidTraps, canExplosionDestroyBlock, canMoveVoluntarily, canStartRiding, canTeleportBetween, changeLookDirection, checkDespawn, clientDamage, collidesWith, collidesWithStateAtPos, copyFrom, copyPositionAndRotation, couldAcceptPassenger, createSpawnPacket, detach, discard, distanceTo, doesNotCollide, doesRenderOnFire, dropItem, dropItem, dropStack, dropStack, emitGameEvent, emitGameEvent, entityDataRequiresOperator, equals, extinguish, extinguishWithSound, getAir, getAttachments, getBlockPos, getBlockStateAtPos, getBlockX, getBlockY, getBlockZ, getBodyY, getBoundingBox, getBrightnessAtEyes, getCameraPosVec, getChunkPos, getClientCameraPosVec, getCommandSource, getCommandTags, getControllingPassenger, getControllingVehicle, getCustomName, getDamageSources, getDataTracker, getDefaultName, getEffectiveExplosionResistance, getEntityWorld, getEyeHeight, getEyePos, getEyeY, getFacing, getFinalGravity, getFireTicks, getFirstPassenger, getFlag, getFluidHeight, getFreezingScale, getFrozenTicks, getHandPosOffset, getHeight, getHorizontalFacing, getHoverEvent, getId, getJumpVelocityMultiplier, getLandingBlockState, getLandingPos, getLastRenderPos, getLeashOffset, getLeashOffset, getLerpedPitch, getLerpedPos, getLerpedYaw, getLootTableKey, getMaxAir, getMinFreezeDamageTicks, getMovementDirection, getOppositeRotationVector, getOppositeRotationVector, getParticleX, getParticleZ, getPassengerAttachmentPos, getPassengerAttachmentPos, getPassengerDismountOffset, getPassengerList, getPassengersDeep, getPickBlockStack, getPistonBehavior, getPitch, getPitch, getPlayerPassengers, getPortalCooldown, getPos, getPose, getPosWithYOffset, getProjectileDeflection, getRandom, getRandomBodyY, getRegistryManager, getRemovalReason, getRenderDistanceMultiplier, getRootVehicle, getRotationClient, getRotationVec, getRotationVecClient, getRotationVector, getRotationVector, getSavedEntityId, getServer, getStandingEyeHeight, getSteppingBlockState, getSteppingPos, getStepSoundPos, getSwimHeight, getSyncedPos, getTargetingMargin, getTeamColorValue, getTrackedPosition, getType, getUuid, getUuidAsString, getVehicle, getVehicleAttachmentPos, getVelocity, getVelocityAffectingPos, getWidth, getWorld, getX, getY, getYaw, getZ, handleAttack, hasCollidedSoftly, hasControllingPassenger, hasCustomName, hashCode, hasNoGravity, hasPassenger, hasPassenger, hasPassengerDeep, hasPassengers, hasPlayerRider, hasPortalCooldown, hasVehicle, interact, interactAt, isAlwaysInvulnerableTo, isAttackable, isCollidable, isConnectedThroughVehicle, isCrawling, isCustomNameVisible, isDescending, isFireImmune, isFlappingWings, isFrozen, isGlowingLocal, isImmuneToExplosion, isInFluid, isInLava, isInPose, isInRange, isInRange, isInSameTeam, isInsideWaterOrBubbleColumn, isInSneakingPose, isInvisible, isInvisibleTo, isInvulnerable, isLiving, isLocalPlayerOrLogicalSideForUpdatingMovement, isLogicalSideForUpdatingMovement, isOnFire, isOnGround, isOnRail, isPartOf, isRegionUnloaded, isRemoved, isSilent, isSneaking, isSneaky, isSprinting, isSubmergedIn, isSubmergedInWater, isSupportedBy, isTeammate, isTeamPlayer, isTouchingWater, isTouchingWaterOrRain, isWet, lerpPosAndRotation, limitFallDistance, move, movementInputToVelocity, occludeVibrationSignals, offsetX, offsetZ, onDataTrackerUpdate, onPassengerLookAround, onPlayerCollision, onRemove, onRemoved, onStartedTrackingBy, onStoppedTrackingBy, onStruckByLightning, playCombinationStepSounds, playExtinguishSound, playSecondaryStepSound, playSoundIfNotSilent, playSwimSound, playSwimSound, populateCrashReport, pushOutOfBlocks, queueBlockCollisionCheck, raycast, readNbt, recalculateDimensions, refreshPosition, refreshPositionAfterTeleport, refreshPositionAndAngles, refreshPositionAndAngles, refreshPositionAndAngles, reinitDimensions, removeAllPassengers, removeCommandTag, removeFromDimension, removePassenger, resetPortalCooldown, resetPosition, saveNbt, saveSelfNbt, scheduleVelocityUpdate, serverDamage, setAir, setAngles, setBoundingBox, setChangeListener, setCustomName, setCustomNameVisible, setFlag, setFrozenTicks, setGlowing, setId, setInPowderSnow, setInvisible, setInvulnerable, setMovement, setNoGravity, setOnFire, setOnFireFor, setOnFireFromLava, setOnGround, setPitch, setPortalCooldown, setPos, setPose, setPosition, setPosition, setPosition, setPrevPositionAndAngles, setRemoved, setRenderDistanceMultiplier, setRotation, setSilent, setSneaking, setSwimming, setUuid, setVelocity, setVelocity, setVelocityClient, setWorld, setYaw, shouldControlVehicles, shouldDismountUnderwater, shouldEscapePowderSnow, shouldPlayBurnSoundInLava, shouldRender, shouldRender, shouldSetPositionOnLoad, shouldSpawnSprintingParticles, shouldTickBlockCollision, sidedDamage, spawnSprintingParticles, squaredDistanceTo, squaredDistanceTo, squaredDistanceTo, startRiding, streamPassengersAndSelf, streamSelfAndPassengers, tickBlockCollision, tickBlockCollision, tickPortalTeleportation, toNbtList, toNbtList, toString, tryUsePortal, unsetRemoved, updateEventHandler, updateMovementInFluid, updatePassengerForDismount, updatePassengerPosition, updatePassengerPosition, updatePosition, updatePositionAndAngles, updatePrevAngles, updatePrevPosition, updateSupportingBlockPos, updateTrackedPosition, updateVelocity, updateWaterState, writeNbt
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.scoreboard.ScoreHolder
getStyledDisplayName
-
Field Details
-
DEFAULT_UUID
Default UUID, for fake players not associated with a specific (human) player.
-
-
Constructor Details
-
FakePlayer
-
-
Method Details
-
get
Retrieves a fake player for the specified world, using thedefault UUID
. This is suitable when the fake player is not associated with a specific (human) player. Otherwise, the UUID of the owning (human) player should be used (see class javadoc).Instances are reused for the same world parameter.
Caution should be exerted when storing the returned value, as strong references to the fake player will keep the world loaded.
-
get
Retrieves a fake player for the specified world and game profile. See class javadoc for more information on fake player game profiles.Instances are reused for the same parameters.
Caution should be exerted when storing the returned value, as strong references to the fake player will keep the world loaded.
-
tick
public void tick()- Overrides:
tick
in classServerPlayerEntity
-
setClientOptions
- Overrides:
setClientOptions
in classServerPlayerEntity
-
increaseStat
- Overrides:
increaseStat
in classServerPlayerEntity
-
resetStat
- Overrides:
resetStat
in classServerPlayerEntity
-
isInvulnerableTo
- Overrides:
isInvulnerableTo
in classServerPlayerEntity
-
getScoreboardTeam
- Overrides:
getScoreboardTeam
in classEntity
-
sleep
- Overrides:
sleep
in classServerPlayerEntity
-
startRiding
- Overrides:
startRiding
in classServerPlayerEntity
-
openEditSignScreen
- Overrides:
openEditSignScreen
in classServerPlayerEntity
-
openHandledScreen
- Overrides:
openHandledScreen
in classServerPlayerEntity
-
openHorseInventory
- Overrides:
openHorseInventory
in classServerPlayerEntity
-