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 level, BlockPos spawnSuggestion, int radius) -
Method Summary
Modifier and TypeMethodDescriptionstatic CompletableFuture<Vec3> findSpawn(ServerLevel level, BlockPos spawnSuggestion) private static Vec3fixupSpawnHeight(CollisionGetter level, BlockPos spawnPos) private static intgetCoprime(int possibleOrigins) protected static @Nullable BlockPosgetOverworldRespawnPos(ServerLevel level, int x, int z) static @Nullable BlockPosgetSpawnPosInChunk(ServerLevel level, ChunkPos chunkPos) private static booleannoCollisionNoLiquid(CollisionGetter level, BlockPos pos) private voidscheduleCandidate(int candidateX, int candidateZ, int candidateIndex, Supplier<Optional<Vec3>> candidateChecker) 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 possibleOrigins) -
scheduleCandidate
-
getOverworldRespawnPos
-
getSpawnPosInChunk
-