public class WorldUpdater extends Object
Modifier and Type | Field and Description |
---|---|
private com.mojang.datafixers.DataFixer |
dataFixer |
private it.unimi.dsi.fastutil.objects.Object2FloatMap<RegistryKey<World>> |
dimensionProgress |
private boolean |
done |
private boolean |
eraseCache |
private boolean |
keepUpgradingChunks |
private static Logger |
LOGGER |
private PersistentStateManager |
persistentStateManager |
private float |
progress |
private static Pattern |
REGION_FILE_PATTERN |
private LevelStorage.Session |
session |
private int |
skippedChunkCount |
private Text |
status |
private int |
totalChunkCount |
private static ThreadFactory |
UPDATE_THREAD_FACTORY |
private Thread |
updateThread |
private int |
upgradedChunkCount |
private ImmutableSet<RegistryKey<World>> |
worlds |
Constructor and Description |
---|
WorldUpdater(LevelStorage.Session session,
com.mojang.datafixers.DataFixer dataFixer,
ImmutableSet<RegistryKey<World>> worlds,
boolean eraseCache) |
Modifier and Type | Method and Description |
---|---|
void |
cancel() |
private List<ChunkPos> |
getChunkPositions(RegistryKey<World> registryKey) |
float |
getProgress() |
float |
getProgress(RegistryKey<World> registryKey) |
int |
getSkippedChunkCount() |
Text |
getStatus() |
int |
getTotalChunkCount() |
int |
getUpgradedChunkCount() |
boolean |
isDone() |
ImmutableSet<RegistryKey<World>> |
method_28304() |
private void |
updateWorld() |
private static final Logger LOGGER
private static final ThreadFactory UPDATE_THREAD_FACTORY
private static final Pattern REGION_FILE_PATTERN
private final ImmutableSet<RegistryKey<World>> worlds
private final boolean eraseCache
private final LevelStorage.Session session
private final Thread updateThread
private final com.mojang.datafixers.DataFixer dataFixer
private volatile boolean keepUpgradingChunks
private volatile boolean done
private volatile float progress
private volatile int totalChunkCount
private volatile int upgradedChunkCount
private volatile int skippedChunkCount
private final it.unimi.dsi.fastutil.objects.Object2FloatMap<RegistryKey<World>> dimensionProgress
private volatile Text status
private final PersistentStateManager persistentStateManager
public WorldUpdater(LevelStorage.Session session, com.mojang.datafixers.DataFixer dataFixer, ImmutableSet<RegistryKey<World>> worlds, boolean eraseCache)
public void cancel()
private void updateWorld()
private List<ChunkPos> getChunkPositions(RegistryKey<World> registryKey)
public boolean isDone()
@Environment(value=CLIENT) public ImmutableSet<RegistryKey<World>> method_28304()
@Environment(value=CLIENT) public float getProgress(RegistryKey<World> registryKey)
@Environment(value=CLIENT) public float getProgress()
public int getTotalChunkCount()
public int getUpgradedChunkCount()
public int getSkippedChunkCount()
public Text getStatus()