Class PrimaryLevelData
java.lang.Object
net.minecraft.world.level.storage.PrimaryLevelData
- All Implemented Interfaces:
LevelData
,ServerLevelData
,WorldData
,WritableLevelData
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
private boolean
private CompoundTag
private long
private float
private float
private boolean
private EndDragonFight.Data
private long
private boolean
static final String
private final CompoundTag
private static final org.slf4j.Logger
protected static final String
private boolean
private int
private final TimerQueue
<MinecraftServer> private LevelSettings
private float
private BlockPos
private final PrimaryLevelData.SpecialWorldProperty
private boolean
private int
private final int
private UUID
private int
private int
private boolean
protected static final String
private WorldBorder.Settings
private final com.mojang.serialization.Lifecycle
private final WorldOptions
Fields inherited from interface net.minecraft.world.level.storage.WorldData
ANVIL_VERSION_ID, MCREGION_VERSION_ID
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
PrimaryLevelData
(CompoundTag p_277888_, boolean p_278109_, BlockPos p_320000_, float p_277542_, long p_277414_, long p_277635_, int p_277672_, int p_277714_, int p_278088_, boolean p_277943_, int p_278037_, boolean p_277644_, boolean p_277749_, boolean p_278004_, WorldBorder.Settings p_277729_, int p_277595_, int p_277794_, UUID p_277341_, Set<String> p_277989_, Set<String> p_277399_, TimerQueue<MinecraftServer> p_277860_, CompoundTag p_277936_, EndDragonFight.Data p_289764_, LevelSettings p_278064_, WorldOptions p_278072_, PrimaryLevelData.SpecialWorldProperty p_277548_, com.mojang.serialization.Lifecycle p_277915_) PrimaryLevelData
(LevelSettings p_251081_, WorldOptions p_251666_, PrimaryLevelData.SpecialWorldProperty p_252268_, com.mojang.serialization.Lifecycle p_251714_) -
Method Summary
Modifier and TypeMethodDescriptioncreateTag
(RegistryAccess pRegistries, CompoundTag pHostPlayerNBT) void
fillCrashReportCategory
(CrashReportCategory pCrashReportCategory, LevelHeightAccessor pLevel) int
long
float
float
long
int
float
int
int
int
int
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
static <T> PrimaryLevelData
parse
(com.mojang.serialization.Dynamic<T> p_78531_, LevelSettings p_78535_, PrimaryLevelData.SpecialWorldProperty p_250651_, WorldOptions p_251864_, com.mojang.serialization.Lifecycle p_78538_) void
setClearWeatherTime
(int pTime) void
void
setDataConfiguration
(WorldDataConfiguration pDataConfiguration) void
setDayTime
(long pTime) Set current world timevoid
setDayTimeFraction
(float dayTimeFraction) void
setDayTimePerTick
(float dayTimePerTick) void
setDifficulty
(Difficulty pDifficulty) void
setDifficultyLocked
(boolean pLocked) void
setEndDragonFightData
(EndDragonFight.Data pEndDragonFightData) void
setGameTime
(long pTime) void
setGameType
(GameType pType) void
setInitialized
(boolean pInitialized) Sets the initialization status of the World.void
setModdedInfo
(String pName, boolean pIsModded) void
setRaining
(boolean pIsRaining) Sets whether it is raining or not.void
setRainTime
(int pTime) Sets the number of ticks until rain.void
private void
setTagData
(RegistryAccess pRegistry, CompoundTag pNbt, CompoundTag pPlayerNBT) void
setThundering
(boolean pThundering) Sets whether it is thundering or not.void
setThunderTime
(int pTime) Defines the number of ticks until next thunderbolt.void
setWanderingTraderId
(UUID pId) void
setWanderingTraderSpawnChance
(int pChance) void
setWanderingTraderSpawnDelay
(int pDelay) void
setWorldBorder
(WorldBorder.Settings pSerializer) private static ListTag
stringCollectionToTag
(Set<String> pStringCollection) boolean
withConfirmedWarning
(boolean confirmedWarning) com.mojang.serialization.Lifecycle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.world.level.storage.WorldData
enabledFeatures, fillCrashReportCategory, getStorageVersionName
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
LEVEL_NAME
- See Also:
-
PLAYER
- See Also:
-
WORLD_GEN_SETTINGS
- See Also:
-
settings
-
worldOptions
-
specialWorldProperty
-
worldGenSettingsLifecycle
private final com.mojang.serialization.Lifecycle worldGenSettingsLifecycle -
spawnPos
-
spawnAngle
private float spawnAngle -
gameTime
private long gameTime -
dayTime
private long dayTime -
loadedPlayerTag
-
version
private final int version -
clearWeatherTime
private int clearWeatherTime -
raining
private boolean raining -
rainTime
private int rainTime -
thundering
private boolean thundering -
thunderTime
private int thunderTime -
initialized
private boolean initialized -
difficultyLocked
private boolean difficultyLocked -
worldBorder
-
endDragonFightData
-
customBossEvents
-
wanderingTraderSpawnDelay
private int wanderingTraderSpawnDelay -
wanderingTraderSpawnChance
private int wanderingTraderSpawnChance -
wanderingTraderId
-
knownServerBrands
-
wasModded
private boolean wasModded -
removedFeatureFlags
-
scheduledEvents
-
confirmedExperimentalWarning
private boolean confirmedExperimentalWarning -
dayTimeFraction
private float dayTimeFraction -
dayTimePerTick
private float dayTimePerTick
-
-
Constructor Details
-
PrimaryLevelData
private PrimaryLevelData(@Nullable CompoundTag p_277888_, boolean p_278109_, BlockPos p_320000_, float p_277542_, long p_277414_, long p_277635_, int p_277672_, int p_277714_, int p_278088_, boolean p_277943_, int p_278037_, boolean p_277644_, boolean p_277749_, boolean p_278004_, WorldBorder.Settings p_277729_, int p_277595_, int p_277794_, @Nullable UUID p_277341_, Set<String> p_277989_, Set<String> p_277399_, TimerQueue<MinecraftServer> p_277860_, @Nullable CompoundTag p_277936_, EndDragonFight.Data p_289764_, LevelSettings p_278064_, WorldOptions p_278072_, PrimaryLevelData.SpecialWorldProperty p_277548_, com.mojang.serialization.Lifecycle p_277915_) -
PrimaryLevelData
public PrimaryLevelData(LevelSettings p_251081_, WorldOptions p_251666_, PrimaryLevelData.SpecialWorldProperty p_252268_, com.mojang.serialization.Lifecycle p_251714_)
-
-
Method Details
-
parse
public static <T> PrimaryLevelData parse(com.mojang.serialization.Dynamic<T> p_78531_, LevelSettings p_78535_, PrimaryLevelData.SpecialWorldProperty p_250651_, WorldOptions p_251864_, com.mojang.serialization.Lifecycle p_78538_) -
createTag
-
setTagData
private void setTagData(RegistryAccess pRegistry, CompoundTag pNbt, @Nullable CompoundTag pPlayerNBT) -
stringCollectionToTag
-
getSpawnPos
- Specified by:
getSpawnPos
in interfaceLevelData
-
getSpawnAngle
public float getSpawnAngle()- Specified by:
getSpawnAngle
in interfaceLevelData
-
getGameTime
public long getGameTime()- Specified by:
getGameTime
in interfaceLevelData
-
getDayTime
public long getDayTime()- Specified by:
getDayTime
in interfaceLevelData
-
getLoadedPlayerTag
- Specified by:
getLoadedPlayerTag
in interfaceWorldData
-
setGameTime
public void setGameTime(long pTime) - Specified by:
setGameTime
in interfaceServerLevelData
-
setDayTime
public void setDayTime(long pTime) Set current world time- Specified by:
setDayTime
in interfaceServerLevelData
-
setSpawn
- Specified by:
setSpawn
in interfaceWritableLevelData
-
getLevelName
- Specified by:
getLevelName
in interfaceServerLevelData
- Specified by:
getLevelName
in interfaceWorldData
-
getVersion
public int getVersion()- Specified by:
getVersion
in interfaceWorldData
-
getClearWeatherTime
public int getClearWeatherTime()- Specified by:
getClearWeatherTime
in interfaceServerLevelData
-
setClearWeatherTime
public void setClearWeatherTime(int pTime) - Specified by:
setClearWeatherTime
in interfaceServerLevelData
-
isThundering
public boolean isThundering()- Specified by:
isThundering
in interfaceLevelData
-
setThundering
public void setThundering(boolean pThundering) Sets whether it is thundering or not.- Specified by:
setThundering
in interfaceServerLevelData
-
getThunderTime
public int getThunderTime()- Specified by:
getThunderTime
in interfaceServerLevelData
-
setThunderTime
public void setThunderTime(int pTime) Defines the number of ticks until next thunderbolt.- Specified by:
setThunderTime
in interfaceServerLevelData
-
isRaining
public boolean isRaining() -
setRaining
public void setRaining(boolean pIsRaining) Sets whether it is raining or not.- Specified by:
setRaining
in interfaceLevelData
-
getRainTime
public int getRainTime()- Specified by:
getRainTime
in interfaceServerLevelData
-
setRainTime
public void setRainTime(int pTime) Sets the number of ticks until rain.- Specified by:
setRainTime
in interfaceServerLevelData
-
getGameType
- Specified by:
getGameType
in interfaceServerLevelData
- Specified by:
getGameType
in interfaceWorldData
-
setGameType
- Specified by:
setGameType
in interfaceServerLevelData
- Specified by:
setGameType
in interfaceWorldData
-
isHardcore
public boolean isHardcore()- Specified by:
isHardcore
in interfaceLevelData
- Specified by:
isHardcore
in interfaceWorldData
-
isAllowCommands
public boolean isAllowCommands()- Specified by:
isAllowCommands
in interfaceServerLevelData
- Specified by:
isAllowCommands
in interfaceWorldData
-
isInitialized
public boolean isInitialized()- Specified by:
isInitialized
in interfaceServerLevelData
-
setInitialized
public void setInitialized(boolean pInitialized) Sets the initialization status of the World.- Specified by:
setInitialized
in interfaceServerLevelData
-
getGameRules
- Specified by:
getGameRules
in interfaceLevelData
- Specified by:
getGameRules
in interfaceWorldData
-
getWorldBorder
- Specified by:
getWorldBorder
in interfaceServerLevelData
-
setWorldBorder
- Specified by:
setWorldBorder
in interfaceServerLevelData
-
getDifficulty
- Specified by:
getDifficulty
in interfaceLevelData
- Specified by:
getDifficulty
in interfaceWorldData
-
setDifficulty
- Specified by:
setDifficulty
in interfaceWorldData
-
isDifficultyLocked
public boolean isDifficultyLocked()- Specified by:
isDifficultyLocked
in interfaceLevelData
- Specified by:
isDifficultyLocked
in interfaceWorldData
-
setDifficultyLocked
public void setDifficultyLocked(boolean pLocked) - Specified by:
setDifficultyLocked
in interfaceWorldData
-
getScheduledEvents
- Specified by:
getScheduledEvents
in interfaceServerLevelData
-
fillCrashReportCategory
public void fillCrashReportCategory(CrashReportCategory pCrashReportCategory, LevelHeightAccessor pLevel) - Specified by:
fillCrashReportCategory
in interfaceLevelData
- Specified by:
fillCrashReportCategory
in interfaceServerLevelData
-
worldGenOptions
- Specified by:
worldGenOptions
in interfaceWorldData
-
isFlatWorld
public boolean isFlatWorld()- Specified by:
isFlatWorld
in interfaceWorldData
-
isDebugWorld
public boolean isDebugWorld()- Specified by:
isDebugWorld
in interfaceWorldData
-
worldGenSettingsLifecycle
public com.mojang.serialization.Lifecycle worldGenSettingsLifecycle()- Specified by:
worldGenSettingsLifecycle
in interfaceWorldData
-
endDragonFightData
- Specified by:
endDragonFightData
in interfaceWorldData
-
setEndDragonFightData
- Specified by:
setEndDragonFightData
in interfaceWorldData
-
getDataConfiguration
- Specified by:
getDataConfiguration
in interfaceWorldData
-
setDataConfiguration
- Specified by:
setDataConfiguration
in interfaceWorldData
-
getCustomBossEvents
- Specified by:
getCustomBossEvents
in interfaceWorldData
-
setCustomBossEvents
- Specified by:
setCustomBossEvents
in interfaceWorldData
-
getWanderingTraderSpawnDelay
public int getWanderingTraderSpawnDelay()- Specified by:
getWanderingTraderSpawnDelay
in interfaceServerLevelData
-
setWanderingTraderSpawnDelay
public void setWanderingTraderSpawnDelay(int pDelay) - Specified by:
setWanderingTraderSpawnDelay
in interfaceServerLevelData
-
getWanderingTraderSpawnChance
public int getWanderingTraderSpawnChance()- Specified by:
getWanderingTraderSpawnChance
in interfaceServerLevelData
-
setWanderingTraderSpawnChance
public void setWanderingTraderSpawnChance(int pChance) - Specified by:
setWanderingTraderSpawnChance
in interfaceServerLevelData
-
getWanderingTraderId
- Specified by:
getWanderingTraderId
in interfaceServerLevelData
-
setWanderingTraderId
- Specified by:
setWanderingTraderId
in interfaceServerLevelData
-
setModdedInfo
- Specified by:
setModdedInfo
in interfaceWorldData
-
wasModded
public boolean wasModded() -
getKnownServerBrands
- Specified by:
getKnownServerBrands
in interfaceWorldData
-
getRemovedFeatureFlags
- Specified by:
getRemovedFeatureFlags
in interfaceWorldData
-
overworldData
- Specified by:
overworldData
in interfaceWorldData
-
getLevelSettings
- Specified by:
getLevelSettings
in interfaceWorldData
-
hasConfirmedExperimentalWarning
public boolean hasConfirmedExperimentalWarning() -
withConfirmedWarning
-
getDayTimeFraction
public float getDayTimeFraction()- Specified by:
getDayTimeFraction
in interfaceServerLevelData
-
getDayTimePerTick
public float getDayTimePerTick()- Specified by:
getDayTimePerTick
in interfaceServerLevelData
-
setDayTimeFraction
public void setDayTimeFraction(float dayTimeFraction) - Specified by:
setDayTimeFraction
in interfaceServerLevelData
-
setDayTimePerTick
public void setDayTimePerTick(float dayTimePerTick) - Specified by:
setDayTimePerTick
in interfaceServerLevelData
-