public class WorldInfo
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private boolean |
allowCommands |
private double |
borderCenterX |
private double |
borderCenterZ |
private double |
borderDamagePerBlock |
private double |
borderSafeZone |
private double |
borderSize |
private double |
borderSizeLerpTarget |
private long |
borderSizeLerpTime |
private int |
borderWarningDistance |
private int |
borderWarningTime |
private int |
cleanWeatherTime |
static EnumDifficulty |
DEFAULT_DIFFICULTY |
private EnumDifficulty |
difficulty |
private boolean |
difficultyLocked |
private int |
dimension |
private java.lang.String |
generatorOptions |
private boolean |
hardcore
Hardcore mode flag
|
private boolean |
initialized |
private long |
lastTimePlayed
The last time the player was in this world.
|
private java.lang.String |
levelName
The name of the save defined at world creation.
|
private boolean |
mapFeaturesEnabled
Whether the map features (e.g.
|
private NBTTagCompound |
playerTag |
private boolean |
raining
True if it's raining, false otherwise.
|
private int |
rainTime
Number of ticks until next rain.
|
private long |
randomSeed
Holds the seed of the currently world.
|
private int |
saveVersion
Introduced in beta 1.3, is the save version for future control.
|
private long |
sizeOnDisk
The size of entire save of current world on the disk, isn't exactly.
|
private int |
spawnX
The spawn zone position X coordinate.
|
private int |
spawnY
The spawn zone position Y coordinate.
|
private int |
spawnZ
The spawn zone position Z coordinate.
|
private WorldType |
terrainType |
private GameRules |
theGameRules |
private WorldSettings.GameType |
theGameType
The Game Type.
|
private boolean |
thundering
Is thunderbolts failing now?
|
private int |
thunderTime
Number of ticks untils next thunderbolt.
|
private long |
totalTime
Total time for this world.
|
private long |
worldTime
The current world time in ticks, ranging from 0 to 23999.
|
Modifier | Constructor and Description |
---|---|
protected |
WorldInfo() |
|
WorldInfo(NBTTagCompound nbt) |
|
WorldInfo(WorldInfo worldInformation) |
|
WorldInfo(WorldSettings settings,
java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
void |
addToCrashReport(CrashReportCategory category)
Adds this WorldInfo instance to the crash report.
|
boolean |
areCommandsAllowed()
Returns true if commands are allowed on this World.
|
NBTTagCompound |
cloneNBTCompound(NBTTagCompound nbt)
Creates a new NBTTagCompound for the world, with the given NBTTag as the "Player"
|
double |
getBorderCenterX()
Returns the border center X position
|
void |
getBorderCenterX(double posX)
Sets the border center X position
|
double |
getBorderCenterZ()
Returns the border center Z position
|
void |
getBorderCenterZ(double posZ)
Sets the border center Z position
|
double |
getBorderDamagePerBlock()
Returns the border damage per block
|
double |
getBorderLerpTarget()
Returns the border lerp target
|
long |
getBorderLerpTime()
Returns the border lerp time
|
double |
getBorderSafeZone()
Returns the border safe zone
|
double |
getBorderSize() |
int |
getBorderWarningDistance()
Returns the border warning distance
|
int |
getBorderWarningTime()
Returns the border warning time
|
int |
getCleanWeatherTime() |
EnumDifficulty |
getDifficulty() |
GameRules |
getGameRulesInstance()
Gets the GameRules class Instance.
|
WorldSettings.GameType |
getGameType()
Gets the GameType.
|
java.lang.String |
getGeneratorOptions() |
long |
getLastTimePlayed()
Return the last time the player was in this world.
|
NBTTagCompound |
getNBTTagCompound()
Gets the NBTTagCompound for the worldInfo
|
NBTTagCompound |
getPlayerNBTTagCompound()
Returns the player's NBTTagCompound to be loaded
|
int |
getRainTime()
Return the number of ticks until rain.
|
int |
getSaveVersion()
Returns the save version of this world
|
long |
getSeed()
Returns the seed of current world.
|
long |
getSizeOnDisk() |
int |
getSpawnX()
Returns the x spawn position
|
int |
getSpawnY()
Return the Y axis spawning point of the player.
|
int |
getSpawnZ()
Returns the z spawn position
|
WorldType |
getTerrainType() |
int |
getThunderTime()
Returns the number of ticks until next thunderbolt.
|
java.lang.String |
getWorldName()
Get current world name
|
long |
getWorldTime()
Get current world time
|
long |
getWorldTotalTime() |
boolean |
isDifficultyLocked() |
boolean |
isHardcoreModeEnabled()
Returns true if hardcore mode is enabled, otherwise false
|
boolean |
isInitialized()
Returns true if the World is initialized.
|
boolean |
isMapFeaturesEnabled()
Get whether the map features (e.g.
|
boolean |
isRaining()
Returns true if it is raining, false otherwise.
|
boolean |
isThundering()
Returns true if it is thundering, false otherwise.
|
void |
populateFromWorldSettings(WorldSettings settings) |
void |
setAllowCommands(boolean allow) |
void |
setBorderDamagePerBlock(double damage)
Sets the border damage per block
|
void |
setBorderLerpTarget(double lerpSize)
Sets the border lerp target
|
void |
setBorderLerpTime(long time)
Sets the border lerp time
|
void |
setBorderSafeZone(double amount)
Sets the border safe zone
|
void |
setBorderSize(double size)
Sets the border size
|
void |
setBorderWarningDistance(int amountOfBlocks)
Sets the border warning distance
|
void |
setBorderWarningTime(int ticks)
Sets the border warning time
|
void |
setCleanWeatherTime(int cleanWeatherTimeIn) |
void |
setDifficulty(EnumDifficulty newDifficulty) |
void |
setDifficultyLocked(boolean locked) |
void |
setGameType(WorldSettings.GameType type)
Sets the GameType.
|
void |
setHardcore(boolean hardcoreIn) |
void |
setMapFeaturesEnabled(boolean enabled) |
void |
setRaining(boolean isRaining)
Sets whether it is raining or not.
|
void |
setRainTime(int time)
Sets the number of ticks until rain.
|
void |
setSaveVersion(int version)
Sets the save version of the world
|
void |
setServerInitialized(boolean initializedIn)
Sets the initialization status of the World.
|
void |
setSpawn(BlockPos spawnPoint) |
void |
setSpawnX(int x)
Set the x spawn position to the passed in value
|
void |
setSpawnY(int y)
Sets the y spawn position
|
void |
setSpawnZ(int z)
Set the z spawn position to the passed in value
|
void |
setTerrainType(WorldType type) |
void |
setThundering(boolean thunderingIn)
Sets whether it is thundering or not.
|
void |
setThunderTime(int time)
Defines the number of ticks until next thunderbolt.
|
void |
setWorldName(java.lang.String worldName) |
void |
setWorldTime(long time)
Set current world time
|
void |
setWorldTotalTime(long time) |
private void |
updateTagCompound(NBTTagCompound nbt,
NBTTagCompound playerNbt) |
public static final EnumDifficulty DEFAULT_DIFFICULTY
private long randomSeed
private WorldType terrainType
private java.lang.String generatorOptions
private int spawnX
private int spawnY
private int spawnZ
private long totalTime
private long worldTime
private long lastTimePlayed
private long sizeOnDisk
private NBTTagCompound playerTag
private int dimension
private java.lang.String levelName
private int saveVersion
private int cleanWeatherTime
private boolean raining
private int rainTime
private boolean thundering
private int thunderTime
private WorldSettings.GameType theGameType
private boolean mapFeaturesEnabled
private boolean hardcore
private boolean allowCommands
private boolean initialized
private EnumDifficulty difficulty
private boolean difficultyLocked
private double borderCenterX
private double borderCenterZ
private double borderSize
private long borderSizeLerpTime
private double borderSizeLerpTarget
private double borderSafeZone
private double borderDamagePerBlock
private int borderWarningDistance
private int borderWarningTime
private GameRules theGameRules
protected WorldInfo()
public WorldInfo(NBTTagCompound nbt)
public WorldInfo(WorldSettings settings, java.lang.String name)
public WorldInfo(WorldInfo worldInformation)
public void populateFromWorldSettings(WorldSettings settings)
public NBTTagCompound getNBTTagCompound()
public NBTTagCompound cloneNBTCompound(NBTTagCompound nbt)
private void updateTagCompound(NBTTagCompound nbt, NBTTagCompound playerNbt)
public long getSeed()
public int getSpawnX()
public int getSpawnY()
public int getSpawnZ()
public long getWorldTotalTime()
public long getWorldTime()
public long getSizeOnDisk()
public NBTTagCompound getPlayerNBTTagCompound()
public void setSpawnX(int x)
public void setSpawnY(int y)
public void setSpawnZ(int z)
public void setWorldTotalTime(long time)
public void setWorldTime(long time)
public void setSpawn(BlockPos spawnPoint)
public java.lang.String getWorldName()
public void setWorldName(java.lang.String worldName)
public int getSaveVersion()
public void setSaveVersion(int version)
public long getLastTimePlayed()
public int getCleanWeatherTime()
public void setCleanWeatherTime(int cleanWeatherTimeIn)
public boolean isThundering()
public void setThundering(boolean thunderingIn)
public int getThunderTime()
public void setThunderTime(int time)
public boolean isRaining()
public void setRaining(boolean isRaining)
public int getRainTime()
public void setRainTime(int time)
public WorldSettings.GameType getGameType()
public boolean isMapFeaturesEnabled()
public void setMapFeaturesEnabled(boolean enabled)
public void setGameType(WorldSettings.GameType type)
public boolean isHardcoreModeEnabled()
public void setHardcore(boolean hardcoreIn)
public WorldType getTerrainType()
public void setTerrainType(WorldType type)
public java.lang.String getGeneratorOptions()
public boolean areCommandsAllowed()
public void setAllowCommands(boolean allow)
public boolean isInitialized()
public void setServerInitialized(boolean initializedIn)
public GameRules getGameRulesInstance()
public double getBorderCenterX()
public double getBorderCenterZ()
public double getBorderSize()
public void setBorderSize(double size)
public long getBorderLerpTime()
public void setBorderLerpTime(long time)
public double getBorderLerpTarget()
public void setBorderLerpTarget(double lerpSize)
public void getBorderCenterZ(double posZ)
public void getBorderCenterX(double posX)
public double getBorderSafeZone()
public void setBorderSafeZone(double amount)
public double getBorderDamagePerBlock()
public void setBorderDamagePerBlock(double damage)
public int getBorderWarningDistance()
public int getBorderWarningTime()
public void setBorderWarningDistance(int amountOfBlocks)
public void setBorderWarningTime(int ticks)
public EnumDifficulty getDifficulty()
public void setDifficulty(EnumDifficulty newDifficulty)
public boolean isDifficultyLocked()
public void setDifficultyLocked(boolean locked)
public void addToCrashReport(CrashReportCategory category)