public class WorldInfo
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static EnumDifficulty |
DEFAULT_DIFFICULTY |
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"
|
NBTBase |
getAdditionalProperty(java.lang.String additionalProperty) |
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. strongholds) generation is enabled or disabled.
|
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 |
setAdditionalProperties(java.util.Map<java.lang.String,NBTBase> additionalProperties)
Allow access to additional mod specific world based properties
Used by FML to store mod list associated with a world, and maybe an id map
Used by Forge to store the dimensions available to a world
|
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) |
public static final EnumDifficulty DEFAULT_DIFFICULTY
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)
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 setWorldTotalTime(long time)
public void setSpawnZ(int z)
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)
public void setAdditionalProperties(java.util.Map<java.lang.String,NBTBase> additionalProperties)
additionalProperties
- public NBTBase getAdditionalProperty(java.lang.String additionalProperty)