public class WorldUpdater extends Object
Modifier and Type | Field and Description |
---|---|
private it.unimi.dsi.fastutil.objects.Object2FloatMap<DimensionType> |
dimensionProgress |
private boolean |
eraseCache |
private boolean |
isDone |
private boolean |
keepUpgradingChunks |
private String |
levelName |
private static Logger |
LOGGER |
private PersistentStateManager |
persistentStateManager |
private float |
progress |
private static Pattern |
REGION_FILE_PATTERN |
private int |
skippedChunkCount |
private Text |
status |
private int |
totalChunkCount |
private static ThreadFactory |
UPDATE_THREAD_FACTORY |
private Thread |
updateThread |
private int |
upgradedChunkCount |
private File |
worldDirectory |
private WorldSaveHandler |
worldSaveHandler |
Constructor and Description |
---|
WorldUpdater(LevelStorage.Session session,
LevelProperties properties,
boolean eraseCache) |
Modifier and Type | Method and Description |
---|---|
void |
cancel() |
private List<ChunkPos> |
getChunkPositions(DimensionType dimensionType) |
float |
getProgress() |
float |
getProgress(DimensionType dimensionType) |
int |
getSkippedChunkCount() |
Text |
getStatus() |
int |
getTotalChunkCount() |
int |
getUpgradedChunkCount() |
boolean |
isDone() |
private void |
updateWorld() |
private static final Logger LOGGER
private static final ThreadFactory UPDATE_THREAD_FACTORY
private static final Pattern REGION_FILE_PATTERN
private final String levelName
private final boolean eraseCache
private final WorldSaveHandler worldSaveHandler
private final Thread updateThread
private final File worldDirectory
private volatile boolean keepUpgradingChunks
private volatile boolean isDone
private volatile float progress
private volatile int totalChunkCount
private volatile int upgradedChunkCount
private volatile int skippedChunkCount
private final it.unimi.dsi.fastutil.objects.Object2FloatMap<DimensionType> dimensionProgress
private volatile Text status
private final PersistentStateManager persistentStateManager
public WorldUpdater(LevelStorage.Session session, LevelProperties properties, boolean eraseCache)
public void cancel()
private void updateWorld()
private List<ChunkPos> getChunkPositions(DimensionType dimensionType)
public boolean isDone()
@Environment(value=CLIENT) public float getProgress(DimensionType dimensionType)
@Environment(value=CLIENT) public float getProgress()
public int getTotalChunkCount()
public int getUpgradedChunkCount()
public int getSkippedChunkCount()
public Text getStatus()