Package net.minecraft.world.level
Class LevelInfo
java.lang.Object
net.minecraft.world.level.LevelInfo
public final class LevelInfo extends Object
-
Field Summary
Fields Modifier and Type Field Description private boolean
allowCommands
private DataPackSettings
dataPackSettings
private Difficulty
difficulty
private GameMode
gameMode
private GameRules
gameRules
private boolean
hardcore
private String
name
-
Constructor Summary
Constructors Constructor Description LevelInfo(String name, GameMode gameMode, boolean hardcore, Difficulty difficulty, boolean allowCommands, GameRules gameRules, DataPackSettings dataPackSettings)
-
Method Summary
Modifier and Type Method Description boolean
areCommandsAllowed()
static LevelInfo
fromDynamic(com.mojang.serialization.Dynamic<?> dynamic, DataPackSettings dataPackSettings)
DataPackSettings
getDataPackSettings()
Difficulty
getDifficulty()
GameMode
getGameMode()
GameRules
getGameRules()
String
getLevelName()
boolean
isHardcore()
LevelInfo
withCopiedGameRules()
LevelInfo
withDataPackSettings(DataPackSettings dataPackSettings)
LevelInfo
withDifficulty(Difficulty difficulty)
LevelInfo
withGameMode(GameMode mode)
-
Field Details
-
name
-
gameMode
-
hardcore
private final boolean hardcore -
difficulty
-
allowCommands
private final boolean allowCommands -
gameRules
-
dataPackSettings
-
-
Constructor Details
-
LevelInfo
public LevelInfo(String name, GameMode gameMode, boolean hardcore, Difficulty difficulty, boolean allowCommands, GameRules gameRules, DataPackSettings dataPackSettings)
-
-
Method Details
-
fromDynamic
public static LevelInfo fromDynamic(com.mojang.serialization.Dynamic<?> dynamic, DataPackSettings dataPackSettings) -
getLevelName
-
getGameMode
-
isHardcore
public boolean isHardcore() -
getDifficulty
-
areCommandsAllowed
public boolean areCommandsAllowed() -
getGameRules
-
getDataPackSettings
-
withGameMode
-
withDifficulty
-
withDataPackSettings
-
withCopiedGameRules
-