Package net.minecraft.server.level
Class PlayerSpawnFinder
java.lang.Object
net.minecraft.server.level.PlayerSpawnFinder
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprivate final intprivate final intprivate final CompletableFuture<Vec3> private final ServerLevelprivate intprivate final intprivate static final EntityDimensionsprivate final intprivate final BlockPos -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivatePlayerSpawnFinder(ServerLevel pLevel, BlockPos pSpawnSuggestion, int pRadius) -
Method Summary
Modifier and TypeMethodDescriptionstatic CompletableFuture<Vec3> findSpawn(ServerLevel pLevel, BlockPos pPos) private static Vec3fixupSpawnHeight(CollisionGetter pCollisionGetter, BlockPos pPos) private static intgetCoprime(int pCandidateCount) protected static BlockPosgetOverworldRespawnPos(ServerLevel pLevel, int pX, int pZ) static BlockPosgetSpawnPosInChunk(ServerLevel pLevel, ChunkPos pChunkPos) private static booleannoCollisionNoLiquid(CollisionGetter pCollisionGetter, BlockPos pPos) private voidscheduleCandidate(int pX, int pZ, int pIndex, Supplier<Optional<Vec3>> pCalculator) private void
-
Field Details
-
PLAYER_DIMENSIONS
-
ABSOLUTE_MAX_ATTEMPTS
private static final int ABSOLUTE_MAX_ATTEMPTS- See Also:
-
level
-
spawnSuggestion
-
radius
private final int radius -
candidateCount
private final int candidateCount -
coprime
private final int coprime -
offset
private final int offset -
nextCandidateIndex
private int nextCandidateIndex -
finishedFuture
-
-
Constructor Details
-
PlayerSpawnFinder
-
-
Method Details
-
findSpawn
-
scheduleNext
private void scheduleNext() -
fixupSpawnHeight
-
noCollisionNoLiquid
-
getCoprime
private static int getCoprime(int pCandidateCount) -
scheduleCandidate
-
getOverworldRespawnPos
-
getSpawnPosInChunk
-