Package net.minecraft.world.storage
Class WorldInfo
- java.lang.Object
-
- net.minecraft.world.storage.WorldInfo
-
public class WorldInfo extends java.lang.Object
+ This portion of EaglercraftX contains deobfuscated Minecraft 1.8 source code. Minecraft 1.8.8 bytecode is (c) 2015 Mojang AB. "Do not distribute!" Mod Coder Pack v9.18 deobfuscation configs are (c) Copyright by the MCP Team EaglercraftX 1.8 patch files are (c) 2022-2023 LAX1DUDE. All Rights Reserved. WITH THE EXCEPTION OF PATCH FILES, MINIFIED JAVASCRIPT, AND ALL FILES NORMALLY FOUND IN AN UNMODIFIED MINECRAFT RESOURCE PACK, YOU ARE NOT ALLOWED TO SHARE, DISTRIBUTE, OR REPURPOSE ANY FILE USED BY OR PRODUCED BY THE SOFTWARE IN THIS REPOSITORY WITHOUT PRIOR PERMISSION FROM THE PROJECT AUTHOR. NOT FOR COMMERCIAL OR MALICIOUS USE (please read the 'LICENSE' file this repo's root directory for more info)
-
-
Field Summary
Fields Modifier and Type Field Description static EnumDifficulty
DEFAULT_DIFFICULTY
-
Constructor Summary
Constructors Modifier Constructor Description protected
WorldInfo()
WorldInfo(NBTTagCompound nbt)
WorldInfo(WorldInfo worldInformation)
WorldInfo(WorldSettings settings, java.lang.String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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 nbttagcompound)
+ Creates a new NBTTagCompound for the world, with the given NBTTag as the "Player"double
getBorderCenterX()
+ Returns the border center X positionvoid
getBorderCenterX(double posX)
+ Returns the border center X positiondouble
getBorderCenterZ()
+ Returns the border center Z positionvoid
getBorderCenterZ(double posZ)
+ Returns the border center Z positiondouble
getBorderDamagePerBlock()
+ Returns the border damage per blockdouble
getBorderLerpTarget()
+ Returns the border lerp targetlong
getBorderLerpTime()
+ Returns the border lerp timedouble
getBorderSafeZone()
+ Returns the border safe zonedouble
getBorderSize()
int
getBorderWarningDistance()
+ Returns the border warning distanceint
getBorderWarningTime()
+ Returns the border warning timeint
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 worldInfoNBTTagCompound
getPlayerNBTTagCompound()
+ Returns the player's NBTTagCompound to be loadedint
getRainTime()
+ Return the number of ticks until rain.int
getSaveVersion()
+ Returns the save version of this worldlong
getSeed()
+ Returns the seed of current world.long
getSizeOnDisk()
int
getSpawnX()
+ Returns the x spawn positionint
getSpawnY()
+ Return the Y axis spawning point of the player.int
getSpawnZ()
+ Returns the z spawn positionWorldType
getTerrainType()
int
getThunderTime()
+ Returns the number of ticks until next thunderbolt.java.lang.String
getWorldName()
+ Get current world namelong
getWorldTime()
+ Get current world timelong
getWorldTotalTime()
boolean
isDifficultyLocked()
boolean
isHardcoreModeEnabled()
+ Returns true if hardcore mode is enabled, otherwise falseboolean
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 flag)
void
setBorderDamagePerBlock(double damage)
+ Sets the border damage per blockvoid
setBorderLerpTarget(double lerpSize)
+ Sets the border lerp targetvoid
setBorderLerpTime(long time)
+ Sets the border lerp timevoid
setBorderSafeZone(double amount)
+ Sets the border safe zonevoid
setBorderSize(double size)
+ Sets the border sizevoid
setBorderWarningDistance(int amountOfBlocks)
+ Sets the border warning distancevoid
setBorderWarningTime(int ticks)
+ Sets the border warning timevoid
setCleanWeatherTime(int cleanWeatherTimeIn)
void
setDifficulty(EnumDifficulty enumdifficulty)
void
setDifficultyLocked(boolean flag)
void
setGameType(WorldSettings.GameType type)
+ Sets the GameType.void
setHardcore(boolean hardcoreIn)
void
setMapFeaturesEnabled(boolean enabled)
void
setRaining(boolean flag)
+ Sets whether it is raining or not.void
setRainTime(int i)
+ Sets the number of ticks until rain.void
setSaveVersion(int i)
+ Sets the save version of the worldvoid
setServerInitialized(boolean flag)
+ Sets the initialization status of the World.void
setSpawn(BlockPos blockpos)
void
setSpawnX(int i)
+ Set the x spawn position to the passed in valuevoid
setSpawnY(int i)
+ Sets the y spawn positionvoid
setSpawnZ(int i)
+ Set the z spawn position to the passed in valuevoid
setTerrainType(WorldType worldtype)
void
setThundering(boolean flag)
+ Sets whether it is thundering or not.void
setThunderTime(int i)
+ Defines the number of ticks until next thunderbolt.void
setWorldName(java.lang.String s)
void
setWorldTime(long i)
+ Set current world timevoid
setWorldTotalTime(long i)
-
-
-
Field Detail
-
DEFAULT_DIFFICULTY
public static final EnumDifficulty DEFAULT_DIFFICULTY
-
-
Constructor Detail
-
WorldInfo
protected WorldInfo()
-
WorldInfo
public WorldInfo(NBTTagCompound nbt)
-
WorldInfo
public WorldInfo(WorldSettings settings, java.lang.String name)
-
WorldInfo
public WorldInfo(WorldInfo worldInformation)
-
-
Method Detail
-
populateFromWorldSettings
public void populateFromWorldSettings(WorldSettings settings)
-
getNBTTagCompound
public NBTTagCompound getNBTTagCompound()
+ Gets the NBTTagCompound for the worldInfo
-
cloneNBTCompound
public NBTTagCompound cloneNBTCompound(NBTTagCompound nbttagcompound)
+ Creates a new NBTTagCompound for the world, with the given NBTTag as the "Player"
-
getSeed
public long getSeed()
+ Returns the seed of current world.
-
getSpawnX
public int getSpawnX()
+ Returns the x spawn position
-
getSpawnY
public int getSpawnY()
+ Return the Y axis spawning point of the player.
-
getSpawnZ
public int getSpawnZ()
+ Returns the z spawn position
-
getWorldTotalTime
public long getWorldTotalTime()
-
getWorldTime
public long getWorldTime()
+ Get current world time
-
getSizeOnDisk
public long getSizeOnDisk()
-
getPlayerNBTTagCompound
public NBTTagCompound getPlayerNBTTagCompound()
+ Returns the player's NBTTagCompound to be loaded
-
setSpawnX
public void setSpawnX(int i)
+ Set the x spawn position to the passed in value
-
setSpawnY
public void setSpawnY(int i)
+ Sets the y spawn position
-
setSpawnZ
public void setSpawnZ(int i)
+ Set the z spawn position to the passed in value
-
setWorldTotalTime
public void setWorldTotalTime(long i)
-
setWorldTime
public void setWorldTime(long i)
+ Set current world time
-
setSpawn
public void setSpawn(BlockPos blockpos)
-
getWorldName
public java.lang.String getWorldName()
+ Get current world name
-
setWorldName
public void setWorldName(java.lang.String s)
-
getSaveVersion
public int getSaveVersion()
+ Returns the save version of this world
-
setSaveVersion
public void setSaveVersion(int i)
+ Sets the save version of the world
-
getLastTimePlayed
public long getLastTimePlayed()
+ Return the last time the player was in this world.
-
getCleanWeatherTime
public int getCleanWeatherTime()
-
setCleanWeatherTime
public void setCleanWeatherTime(int cleanWeatherTimeIn)
-
isThundering
public boolean isThundering()
+ Returns true if it is thundering, false otherwise.
-
setThundering
public void setThundering(boolean flag)
+ Sets whether it is thundering or not.
-
getThunderTime
public int getThunderTime()
+ Returns the number of ticks until next thunderbolt.
-
setThunderTime
public void setThunderTime(int i)
+ Defines the number of ticks until next thunderbolt.
-
isRaining
public boolean isRaining()
+ Returns true if it is raining, false otherwise.
-
setRaining
public void setRaining(boolean flag)
+ Sets whether it is raining or not.
-
getRainTime
public int getRainTime()
+ Return the number of ticks until rain.
-
setRainTime
public void setRainTime(int i)
+ Sets the number of ticks until rain.
-
getGameType
public WorldSettings.GameType getGameType()
+ Gets the GameType.
-
isMapFeaturesEnabled
public boolean isMapFeaturesEnabled()
+ Get whether the map features (e.g. strongholds) generation is enabled or disabled.
-
setMapFeaturesEnabled
public void setMapFeaturesEnabled(boolean enabled)
-
setGameType
public void setGameType(WorldSettings.GameType type)
+ Sets the GameType.
-
isHardcoreModeEnabled
public boolean isHardcoreModeEnabled()
+ Returns true if hardcore mode is enabled, otherwise false
-
setHardcore
public void setHardcore(boolean hardcoreIn)
-
getTerrainType
public WorldType getTerrainType()
-
setTerrainType
public void setTerrainType(WorldType worldtype)
-
getGeneratorOptions
public java.lang.String getGeneratorOptions()
-
areCommandsAllowed
public boolean areCommandsAllowed()
+ Returns true if commands are allowed on this World.
-
setAllowCommands
public void setAllowCommands(boolean flag)
-
isInitialized
public boolean isInitialized()
+ Returns true if the World is initialized.
-
setServerInitialized
public void setServerInitialized(boolean flag)
+ Sets the initialization status of the World.
-
getGameRulesInstance
public GameRules getGameRulesInstance()
+ Gets the GameRules class Instance.
-
getBorderCenterX
public double getBorderCenterX()
+ Returns the border center X position
-
getBorderCenterZ
public double getBorderCenterZ()
+ Returns the border center Z position
-
getBorderSize
public double getBorderSize()
-
setBorderSize
public void setBorderSize(double size)
+ Sets the border size
-
getBorderLerpTime
public long getBorderLerpTime()
+ Returns the border lerp time
-
setBorderLerpTime
public void setBorderLerpTime(long time)
+ Sets the border lerp time
-
getBorderLerpTarget
public double getBorderLerpTarget()
+ Returns the border lerp target
-
setBorderLerpTarget
public void setBorderLerpTarget(double lerpSize)
+ Sets the border lerp target
-
getBorderCenterZ
public void getBorderCenterZ(double posZ)
+ Returns the border center Z position
-
getBorderCenterX
public void getBorderCenterX(double posX)
+ Returns the border center X position
-
getBorderSafeZone
public double getBorderSafeZone()
+ Returns the border safe zone
-
setBorderSafeZone
public void setBorderSafeZone(double amount)
+ Sets the border safe zone
-
getBorderDamagePerBlock
public double getBorderDamagePerBlock()
+ Returns the border damage per block
-
setBorderDamagePerBlock
public void setBorderDamagePerBlock(double damage)
+ Sets the border damage per block
-
getBorderWarningDistance
public int getBorderWarningDistance()
+ Returns the border warning distance
-
getBorderWarningTime
public int getBorderWarningTime()
+ Returns the border warning time
-
setBorderWarningDistance
public void setBorderWarningDistance(int amountOfBlocks)
+ Sets the border warning distance
-
setBorderWarningTime
public void setBorderWarningTime(int ticks)
+ Sets the border warning time
-
getDifficulty
public EnumDifficulty getDifficulty()
-
setDifficulty
public void setDifficulty(EnumDifficulty enumdifficulty)
-
isDifficultyLocked
public boolean isDifficultyLocked()
-
setDifficultyLocked
public void setDifficultyLocked(boolean flag)
-
addToCrashReport
public void addToCrashReport(CrashReportCategory category)
+ Adds this WorldInfo instance to the crash report.
-
-