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, wait
getFormatName
private 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 SaveProperties
private void updateProperties(DynamicRegistryManager dynamicRegistryManager, CompoundTag compoundTag, @Nullable CompoundTag compoundTag2)
public int getSpawnX()
getSpawnX
in interface WorldProperties
public int getSpawnY()
getSpawnY
in interface WorldProperties
public int getSpawnZ()
getSpawnZ
in interface WorldProperties
public float getSpawnAngle()
getSpawnAngle
in interface WorldProperties
public long getTime()
getTime
in interface WorldProperties
public long getTimeOfDay()
getTimeOfDay
in interface WorldProperties
private void loadPlayerData()
public CompoundTag getPlayerData()
getPlayerData
in interface SaveProperties
public void setSpawnX(int spawnX)
setSpawnX
in interface MutableWorldProperties
public void setSpawnY(int spawnY)
setSpawnY
in interface MutableWorldProperties
public void setSpawnZ(int spawnZ)
setSpawnZ
in interface MutableWorldProperties
public void setSpawnAngle(float angle)
setSpawnAngle
in interface MutableWorldProperties
public void setTime(long time)
setTime
in interface ServerWorldProperties
public void setTimeOfDay(long timeOfDay)
setTimeOfDay
in interface ServerWorldProperties
public void setSpawnPos(BlockPos pos, float angle)
setSpawnPos
in interface MutableWorldProperties
public String getLevelName()
getLevelName
in interface ServerWorldProperties
getLevelName
in interface SaveProperties
public int getVersion()
getVersion
in interface SaveProperties
public int getClearWeatherTime()
getClearWeatherTime
in interface ServerWorldProperties
public void setClearWeatherTime(int clearWeatherTime)
setClearWeatherTime
in interface ServerWorldProperties
public boolean isThundering()
isThundering
in interface WorldProperties
public void setThundering(boolean thundering)
setThundering
in interface ServerWorldProperties
public int getThunderTime()
getThunderTime
in interface ServerWorldProperties
public void setThunderTime(int thunderTime)
setThunderTime
in interface ServerWorldProperties
public boolean isRaining()
isRaining
in interface WorldProperties
public void setRaining(boolean raining)
setRaining
in interface WorldProperties
public int getRainTime()
getRainTime
in interface ServerWorldProperties
public void setRainTime(int rainTime)
setRainTime
in interface ServerWorldProperties
public GameMode getGameMode()
getGameMode
in interface ServerWorldProperties
getGameMode
in interface SaveProperties
public void setGameMode(GameMode gameMode)
setGameMode
in interface ServerWorldProperties
setGameMode
in interface SaveProperties
public boolean isHardcore()
isHardcore
in interface SaveProperties
isHardcore
in interface WorldProperties
public boolean areCommandsAllowed()
areCommandsAllowed
in interface ServerWorldProperties
areCommandsAllowed
in interface SaveProperties
public boolean isInitialized()
isInitialized
in interface ServerWorldProperties
public void setInitialized(boolean initialized)
setInitialized
in interface ServerWorldProperties
public GameRules getGameRules()
getGameRules
in interface SaveProperties
getGameRules
in interface WorldProperties
public WorldBorder.Properties getWorldBorder()
getWorldBorder
in interface ServerWorldProperties
public void setWorldBorder(WorldBorder.Properties properties)
setWorldBorder
in interface ServerWorldProperties
public Difficulty getDifficulty()
getDifficulty
in interface SaveProperties
getDifficulty
in interface WorldProperties
public void setDifficulty(Difficulty difficulty)
setDifficulty
in interface SaveProperties
public boolean isDifficultyLocked()
isDifficultyLocked
in interface SaveProperties
isDifficultyLocked
in interface WorldProperties
public void setDifficultyLocked(boolean locked)
setDifficultyLocked
in interface SaveProperties
public Timer<MinecraftServer> getScheduledEvents()
getScheduledEvents
in interface ServerWorldProperties
public void populateCrashReport(CrashReportSection reportSection)
populateCrashReport
in interface ServerWorldProperties
populateCrashReport
in interface SaveProperties
populateCrashReport
in interface WorldProperties
public GeneratorOptions getGeneratorOptions()
getGeneratorOptions
in interface SaveProperties
@Environment(value=CLIENT) public com.mojang.serialization.Lifecycle getLifecycle()
getLifecycle
in interface SaveProperties
public CompoundTag getDragonFight()
getDragonFight
in interface SaveProperties
public void setDragonFight(CompoundTag tag)
setDragonFight
in interface SaveProperties
public DataPackSettings getDataPackSettings()
getDataPackSettings
in interface SaveProperties
public void updateLevelInfo(DataPackSettings dataPackSettings)
updateLevelInfo
in interface SaveProperties
@Nullable public CompoundTag getCustomBossEvents()
getCustomBossEvents
in interface SaveProperties
public void setCustomBossEvents(@Nullable CompoundTag tag)
setCustomBossEvents
in interface SaveProperties
public int getWanderingTraderSpawnDelay()
getWanderingTraderSpawnDelay
in interface ServerWorldProperties
public void setWanderingTraderSpawnDelay(int wanderingTraderSpawnDelay)
setWanderingTraderSpawnDelay
in interface ServerWorldProperties
public int getWanderingTraderSpawnChance()
getWanderingTraderSpawnChance
in interface ServerWorldProperties
public void setWanderingTraderSpawnChance(int wanderingTraderSpawnChance)
setWanderingTraderSpawnChance
in interface ServerWorldProperties
public void setWanderingTraderId(UUID uuid)
setWanderingTraderId
in interface ServerWorldProperties
public void addServerBrand(String brand, boolean modded)
addServerBrand
in interface SaveProperties
public boolean isModded()
isModded
in interface SaveProperties
public Set<String> getServerBrands()
getServerBrands
in interface SaveProperties
public ServerWorldProperties getMainWorldProperties()
getMainWorldProperties
in interface SaveProperties
@Environment(value=CLIENT) public LevelInfo getLevelInfo()
getLevelInfo
in interface SaveProperties