public class ServerChunkProvider extends AbstractChunkProvider
Modifier and Type | Class and Description |
---|---|
(package private) class |
ServerChunkProvider.ChunkExecutor |
Modifier and Type | Field and Description |
---|---|
ChunkManager |
chunkManager |
private ServerChunkProvider.ChunkExecutor |
executor |
private static int |
field_217238_b |
private static java.util.List<ChunkStatus> |
field_217239_c |
ChunkGenerator<?> |
generator |
private long |
lastGameTime |
private ServerWorldLightManager |
lightManager |
private java.lang.Thread |
mainThread |
private IChunk[] |
recentChunks |
private long[] |
recentPositions |
private ChunkStatus[] |
recentStatuses |
private DimensionSavedDataManager |
savedData |
private boolean |
spawnHostiles |
private boolean |
spawnPassives |
private TicketManager |
ticketManager |
ServerWorld |
world |
Constructor and Description |
---|
ServerChunkProvider(ServerWorld worldIn,
java.io.File worldDirectory,
com.mojang.datafixers.DataFixer dataFixer,
TemplateManager templateManagerIn,
java.util.concurrent.Executor executorIn,
ChunkGenerator<?> chunkGeneratorIn,
int viewDistance,
IChunkStatusListener p_i51537_8_,
java.util.function.Supplier<DimensionSavedDataManager> p_i51537_9_) |
Modifier and Type | Method and Description |
---|---|
boolean |
canTick(BlockPos pos) |
boolean |
chunkExists(int x,
int z) |
void |
close() |
boolean |
driveOneTask() |
void |
forceChunk(ChunkPos pos,
boolean add) |
java.lang.String |
func_217208_a(ChunkPos chunkPosIn) |
private ChunkHolder |
func_217213_a(long chunkPosIn) |
private boolean |
func_217224_a(ChunkHolder chunkHolderIn,
int p_217224_2_) |
int |
func_217229_b() |
java.util.concurrent.CompletableFuture<com.mojang.datafixers.util.Either<IChunk,ChunkHolder.IChunkLoadingError>> |
func_217232_b(int chunkX,
int chunkZ,
ChunkStatus requiredStatus,
boolean load) |
private java.util.concurrent.CompletableFuture<com.mojang.datafixers.util.Either<IChunk,ChunkHolder.IChunkLoadingError>> |
func_217233_c(int chunkX,
int chunkZ,
ChunkStatus requiredStatus,
boolean load) |
private boolean |
func_217235_l() |
boolean |
func_223435_b(Entity p_223435_1_) |
int |
func_225314_f() |
private void |
func_225315_a(long p_225315_1_,
IChunk p_225315_3_,
ChunkStatus p_225315_4_) |
IChunk |
getChunk(int chunkX,
int chunkZ,
ChunkStatus requiredStatus,
boolean load) |
IBlockReader |
getChunkForLight(int chunkX,
int chunkZ) |
ChunkGenerator<?> |
getChunkGenerator() |
Chunk |
getChunkWithoutLoading(int chunkX,
int chunkZ) |
ServerWorldLightManager |
getLightManager() |
int |
getLoadedChunkCount() |
PointOfInterestManager |
getPointOfInterestManager() |
DimensionSavedDataManager |
getSavedData() |
World |
getWorld() |
private void |
invalidateCaches() |
boolean |
isChunkLoaded(ChunkPos pos) |
boolean |
isChunkLoaded(Entity entityIn) |
private boolean |
isChunkLoaded(long pos,
java.util.function.Function<ChunkHolder,java.util.concurrent.CompletableFuture<com.mojang.datafixers.util.Either<Chunk,ChunkHolder.IChunkLoadingError>>> p_222872_3_) |
java.lang.String |
makeString() |
void |
markBlockChanged(BlockPos pos) |
void |
markLightChanged(LightType type,
SectionPos pos) |
<T> void |
registerTicket(TicketType<T> type,
ChunkPos pos,
int distance,
T value) |
<T> void |
releaseTicket(TicketType<T> type,
ChunkPos pos,
int distance,
T value) |
void |
save(boolean flush) |
void |
sendToAllTracking(Entity entityIn,
IPacket<?> packet) |
void |
sendToTrackingAndSelf(Entity entityIn,
IPacket<?> packet) |
void |
setAllowedSpawnTypes(boolean hostile,
boolean peaceful) |
void |
setViewDistance(int viewDistance) |
void |
tick(java.util.function.BooleanSupplier hasTimeLeft) |
private void |
tickChunks() |
void |
track(Entity entityIn) |
void |
untrack(Entity entityIn) |
void |
updatePlayerPosition(ServerPlayerEntity player) |
getChunk
private static final int field_217238_b
private static final java.util.List<ChunkStatus> field_217239_c
private final TicketManager ticketManager
public final ChunkGenerator<?> generator
public final ServerWorld world
private final java.lang.Thread mainThread
private final ServerWorldLightManager lightManager
private final ServerChunkProvider.ChunkExecutor executor
public final ChunkManager chunkManager
private final DimensionSavedDataManager savedData
private long lastGameTime
private boolean spawnHostiles
private boolean spawnPassives
private final long[] recentPositions
private final ChunkStatus[] recentStatuses
private final IChunk[] recentChunks
public ServerChunkProvider(ServerWorld worldIn, java.io.File worldDirectory, com.mojang.datafixers.DataFixer dataFixer, TemplateManager templateManagerIn, java.util.concurrent.Executor executorIn, ChunkGenerator<?> chunkGeneratorIn, int viewDistance, IChunkStatusListener p_i51537_8_, java.util.function.Supplier<DimensionSavedDataManager> p_i51537_9_)
public ServerWorldLightManager getLightManager()
getLightManager
in class AbstractChunkProvider
@Nullable private ChunkHolder func_217213_a(long chunkPosIn)
public int func_217229_b()
private void func_225315_a(long p_225315_1_, IChunk p_225315_3_, ChunkStatus p_225315_4_)
@Nullable public IChunk getChunk(int chunkX, int chunkZ, ChunkStatus requiredStatus, boolean load)
getChunk
in class AbstractChunkProvider
@Nullable public Chunk getChunkWithoutLoading(int chunkX, int chunkZ)
getChunkWithoutLoading
in class AbstractChunkProvider
private void invalidateCaches()
public java.util.concurrent.CompletableFuture<com.mojang.datafixers.util.Either<IChunk,ChunkHolder.IChunkLoadingError>> func_217232_b(int chunkX, int chunkZ, ChunkStatus requiredStatus, boolean load)
private java.util.concurrent.CompletableFuture<com.mojang.datafixers.util.Either<IChunk,ChunkHolder.IChunkLoadingError>> func_217233_c(int chunkX, int chunkZ, ChunkStatus requiredStatus, boolean load)
private boolean func_217224_a(@Nullable ChunkHolder chunkHolderIn, int p_217224_2_)
public boolean chunkExists(int x, int z)
chunkExists
in class AbstractChunkProvider
public IBlockReader getChunkForLight(int chunkX, int chunkZ)
getChunkForLight
in interface IChunkLightProvider
getChunkForLight
in class AbstractChunkProvider
public World getWorld()
public boolean driveOneTask()
private boolean func_217235_l()
public boolean isChunkLoaded(Entity entityIn)
isChunkLoaded
in class AbstractChunkProvider
public boolean isChunkLoaded(ChunkPos pos)
isChunkLoaded
in class AbstractChunkProvider
public boolean canTick(BlockPos pos)
canTick
in class AbstractChunkProvider
public boolean func_223435_b(Entity p_223435_1_)
private boolean isChunkLoaded(long pos, java.util.function.Function<ChunkHolder,java.util.concurrent.CompletableFuture<com.mojang.datafixers.util.Either<Chunk,ChunkHolder.IChunkLoadingError>>> p_222872_3_)
public void save(boolean flush)
public void close() throws java.io.IOException
close
in interface java.lang.AutoCloseable
close
in class AbstractChunkProvider
java.io.IOException
public void tick(java.util.function.BooleanSupplier hasTimeLeft)
tick
in class AbstractChunkProvider
private void tickChunks()
public java.lang.String makeString()
makeString
in class AbstractChunkProvider
public int func_225314_f()
public ChunkGenerator<?> getChunkGenerator()
public int getLoadedChunkCount()
public void markBlockChanged(BlockPos pos)
public void markLightChanged(LightType type, SectionPos pos)
public <T> void registerTicket(TicketType<T> type, ChunkPos pos, int distance, T value)
public <T> void releaseTicket(TicketType<T> type, ChunkPos pos, int distance, T value)
public void forceChunk(ChunkPos pos, boolean add)
forceChunk
in class AbstractChunkProvider
public void updatePlayerPosition(ServerPlayerEntity player)
public void untrack(Entity entityIn)
public void track(Entity entityIn)
public void setViewDistance(int viewDistance)
public void setAllowedSpawnTypes(boolean hostile, boolean peaceful)
setAllowedSpawnTypes
in class AbstractChunkProvider
public java.lang.String func_217208_a(ChunkPos chunkPosIn)
public DimensionSavedDataManager getSavedData()
public PointOfInterestManager getPointOfInterestManager()