public class LevelProperties extends Object implements ServerWorldProperties, SaveProperties
| Modifier and Type | Field and Description |
|---|---|
private int |
clearWeatherTime |
private CompoundTag |
customBossEvents |
private com.mojang.datafixers.DataFixer |
dataFixer |
private int |
dataVersion |
private boolean |
difficultyLocked |
private CompoundTag |
dragonFight |
private GeneratorOptions |
generatorOptions |
private boolean |
initialized |
private LevelInfo |
levelInfo |
private com.mojang.serialization.Lifecycle |
lifecycle |
private static Logger |
LOGGER |
private boolean |
modded |
private CompoundTag |
playerData |
private boolean |
playerDataLoaded |
private boolean |
raining |
private int |
rainTime |
private Timer<MinecraftServer> |
scheduledEvents |
private Set<String> |
serverBrands |
private float |
spawnAngle |
private int |
spawnX |
private int |
spawnY |
private int |
spawnZ |
private boolean |
thundering |
private int |
thunderTime |
private long |
time |
private long |
timeOfDay |
private int |
version |
private UUID |
wanderingTraderId |
private int |
wanderingTraderSpawnChance |
private int |
wanderingTraderSpawnDelay |
private WorldBorder.Properties |
worldBorder |
| Modifier | Constructor and Description |
|---|---|
private |
LevelProperties(com.mojang.datafixers.DataFixer dataFixer,
int dataVersion,
CompoundTag playerData,
boolean modded,
int spawnX,
int spawnY,
int spawnZ,
float spawnAngle,
long time,
long timeOfDay,
int version,
int clearWeatherTime,
int rainTime,
boolean raining,
int thunderTime,
boolean thundering,
boolean initialized,
boolean difficultyLocked,
WorldBorder.Properties worldBorder,
int wanderingTraderSpawnDelay,
int wanderingTraderSpawnChance,
UUID wanderingTraderId,
LinkedHashSet<String> serverBrands,
Timer<MinecraftServer> scheduledEvents,
CompoundTag customBossEvents,
CompoundTag dragonFight,
LevelInfo levelInfo,
GeneratorOptions generatorOptions,
com.mojang.serialization.Lifecycle lifecycle) |
|
LevelProperties(LevelInfo levelInfo,
GeneratorOptions generatorOptions,
com.mojang.serialization.Lifecycle lifecycle) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetFormatNameprivate static final Logger LOGGER
private LevelInfo levelInfo
private final GeneratorOptions generatorOptions
private final com.mojang.serialization.Lifecycle lifecycle
private int spawnX
private int spawnY
private int spawnZ
private float spawnAngle
private long time
private long timeOfDay
@Nullable private final com.mojang.datafixers.DataFixer dataFixer
private final int dataVersion
private boolean playerDataLoaded
@Nullable private CompoundTag playerData
private final int version
private int clearWeatherTime
private boolean raining
private int rainTime
private boolean thundering
private int thunderTime
private boolean initialized
private boolean difficultyLocked
private WorldBorder.Properties worldBorder
private CompoundTag dragonFight
@Nullable private CompoundTag customBossEvents
private int wanderingTraderSpawnDelay
private int wanderingTraderSpawnChance
private boolean modded
private final Timer<MinecraftServer> scheduledEvents
private LevelProperties(@Nullable com.mojang.datafixers.DataFixer dataFixer, int dataVersion, @Nullable CompoundTag playerData, boolean modded, int spawnX, int spawnY, int spawnZ, float spawnAngle, long time, long timeOfDay, int version, int clearWeatherTime, int rainTime, boolean raining, int thunderTime, boolean thundering, boolean initialized, boolean difficultyLocked, WorldBorder.Properties worldBorder, int wanderingTraderSpawnDelay, int wanderingTraderSpawnChance, @Nullable UUID wanderingTraderId, LinkedHashSet<String> serverBrands, Timer<MinecraftServer> scheduledEvents, @Nullable CompoundTag customBossEvents, CompoundTag dragonFight, LevelInfo levelInfo, GeneratorOptions generatorOptions, com.mojang.serialization.Lifecycle lifecycle)
public LevelProperties(LevelInfo levelInfo, GeneratorOptions generatorOptions, com.mojang.serialization.Lifecycle lifecycle)
public static LevelProperties readProperties(com.mojang.serialization.Dynamic<Tag> dynamic, com.mojang.datafixers.DataFixer dataFixer, int dataVersion, @Nullable CompoundTag playerData, LevelInfo levelInfo, SaveVersionInfo saveVersionInfo, GeneratorOptions generatorOptions, com.mojang.serialization.Lifecycle lifecycle)
public CompoundTag cloneWorldTag(DynamicRegistryManager dynamicRegistryManager, @Nullable CompoundTag compoundTag)
cloneWorldTag in interface SavePropertiesprivate void updateProperties(DynamicRegistryManager dynamicRegistryManager, CompoundTag compoundTag, @Nullable CompoundTag compoundTag2)
public int getSpawnX()
getSpawnX in interface WorldPropertiespublic int getSpawnY()
getSpawnY in interface WorldPropertiespublic int getSpawnZ()
getSpawnZ in interface WorldPropertiespublic float getSpawnAngle()
getSpawnAngle in interface WorldPropertiespublic long getTime()
getTime in interface WorldPropertiespublic long getTimeOfDay()
getTimeOfDay in interface WorldPropertiesprivate void loadPlayerData()
public CompoundTag getPlayerData()
getPlayerData in interface SavePropertiespublic void setSpawnX(int spawnX)
setSpawnX in interface MutableWorldPropertiespublic void setSpawnY(int spawnY)
setSpawnY in interface MutableWorldPropertiespublic void setSpawnZ(int spawnZ)
setSpawnZ in interface MutableWorldPropertiespublic void setSpawnAngle(float angle)
setSpawnAngle in interface MutableWorldPropertiespublic void setTime(long time)
setTime in interface ServerWorldPropertiespublic void setTimeOfDay(long timeOfDay)
setTimeOfDay in interface ServerWorldPropertiespublic void setSpawnPos(BlockPos pos, float angle)
setSpawnPos in interface MutableWorldPropertiespublic String getLevelName()
getLevelName in interface ServerWorldPropertiesgetLevelName in interface SavePropertiespublic int getVersion()
getVersion in interface SavePropertiespublic int getClearWeatherTime()
getClearWeatherTime in interface ServerWorldPropertiespublic void setClearWeatherTime(int clearWeatherTime)
setClearWeatherTime in interface ServerWorldPropertiespublic boolean isThundering()
isThundering in interface WorldPropertiespublic void setThundering(boolean thundering)
setThundering in interface ServerWorldPropertiespublic int getThunderTime()
getThunderTime in interface ServerWorldPropertiespublic void setThunderTime(int thunderTime)
setThunderTime in interface ServerWorldPropertiespublic boolean isRaining()
isRaining in interface WorldPropertiespublic void setRaining(boolean raining)
setRaining in interface WorldPropertiespublic int getRainTime()
getRainTime in interface ServerWorldPropertiespublic void setRainTime(int rainTime)
setRainTime in interface ServerWorldPropertiespublic GameMode getGameMode()
getGameMode in interface ServerWorldPropertiesgetGameMode in interface SavePropertiespublic void setGameMode(GameMode gameMode)
setGameMode in interface ServerWorldPropertiessetGameMode in interface SavePropertiespublic boolean isHardcore()
isHardcore in interface SavePropertiesisHardcore in interface WorldPropertiespublic boolean areCommandsAllowed()
areCommandsAllowed in interface ServerWorldPropertiesareCommandsAllowed in interface SavePropertiespublic boolean isInitialized()
isInitialized in interface ServerWorldPropertiespublic void setInitialized(boolean initialized)
setInitialized in interface ServerWorldPropertiespublic GameRules getGameRules()
getGameRules in interface SavePropertiesgetGameRules in interface WorldPropertiespublic WorldBorder.Properties getWorldBorder()
getWorldBorder in interface ServerWorldPropertiespublic void setWorldBorder(WorldBorder.Properties properties)
setWorldBorder in interface ServerWorldPropertiespublic Difficulty getDifficulty()
getDifficulty in interface SavePropertiesgetDifficulty in interface WorldPropertiespublic void setDifficulty(Difficulty difficulty)
setDifficulty in interface SavePropertiespublic boolean isDifficultyLocked()
isDifficultyLocked in interface SavePropertiesisDifficultyLocked in interface WorldPropertiespublic void setDifficultyLocked(boolean locked)
setDifficultyLocked in interface SavePropertiespublic Timer<MinecraftServer> getScheduledEvents()
getScheduledEvents in interface ServerWorldPropertiespublic void populateCrashReport(CrashReportSection reportSection)
populateCrashReport in interface ServerWorldPropertiespopulateCrashReport in interface SavePropertiespopulateCrashReport in interface WorldPropertiespublic GeneratorOptions getGeneratorOptions()
getGeneratorOptions in interface SaveProperties@Environment(value=CLIENT) public com.mojang.serialization.Lifecycle getLifecycle()
getLifecycle in interface SavePropertiespublic CompoundTag getDragonFight()
getDragonFight in interface SavePropertiespublic void setDragonFight(CompoundTag tag)
setDragonFight in interface SavePropertiespublic DataPackSettings getDataPackSettings()
getDataPackSettings in interface SavePropertiespublic void updateLevelInfo(DataPackSettings dataPackSettings)
updateLevelInfo in interface SaveProperties@Nullable public CompoundTag getCustomBossEvents()
getCustomBossEvents in interface SavePropertiespublic void setCustomBossEvents(@Nullable CompoundTag tag)
setCustomBossEvents in interface SavePropertiespublic int getWanderingTraderSpawnDelay()
getWanderingTraderSpawnDelay in interface ServerWorldPropertiespublic void setWanderingTraderSpawnDelay(int wanderingTraderSpawnDelay)
setWanderingTraderSpawnDelay in interface ServerWorldPropertiespublic int getWanderingTraderSpawnChance()
getWanderingTraderSpawnChance in interface ServerWorldPropertiespublic void setWanderingTraderSpawnChance(int wanderingTraderSpawnChance)
setWanderingTraderSpawnChance in interface ServerWorldPropertiespublic void setWanderingTraderId(UUID uuid)
setWanderingTraderId in interface ServerWorldPropertiespublic void addServerBrand(String brand, boolean modded)
addServerBrand in interface SavePropertiespublic boolean isModded()
isModded in interface SavePropertiespublic Set<String> getServerBrands()
getServerBrands in interface SavePropertiespublic ServerWorldProperties getMainWorldProperties()
getMainWorldProperties in interface SaveProperties@Environment(value=CLIENT) public LevelInfo getLevelInfo()
getLevelInfo in interface SaveProperties