Package net.minecraft.server
Record Class WorldLoader.PackConfig
java.lang.Object
java.lang.Record
net.minecraft.server.WorldLoader.PackConfig
- Enclosing class:
WorldLoader
public static record WorldLoader.PackConfig(PackRepository packRepository, WorldDataConfiguration initialDataConfig, boolean safeMode, boolean initMode)
extends Record
-
Field Summary
Modifier and TypeFieldDescriptionprivate final WorldDataConfiguration
The field for theinitialDataConfig
record component.private final boolean
The field for theinitMode
record component.private final PackRepository
The field for thepackRepository
record component.private final boolean
The field for thesafeMode
record component. -
Constructor Summary
ConstructorDescriptionPackConfig
(PackRepository packRepository, WorldDataConfiguration initialDataConfig, boolean safeMode, boolean initMode) Creates an instance of aPackConfig
record class. -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.datafixers.util.Pair
<WorldDataConfiguration, CloseableResourceManager> final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of theinitialDataConfig
record component.boolean
initMode()
Returns the value of theinitMode
record component.Returns the value of thepackRepository
record component.boolean
safeMode()
Returns the value of thesafeMode
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
packRepository
The field for thepackRepository
record component. -
initialDataConfig
The field for theinitialDataConfig
record component. -
safeMode
private final boolean safeModeThe field for thesafeMode
record component. -
initMode
private final boolean initModeThe field for theinitMode
record component.
-
-
Constructor Details
-
PackConfig
public PackConfig(PackRepository packRepository, WorldDataConfiguration initialDataConfig, boolean safeMode, boolean initMode) Creates an instance of aPackConfig
record class.- Parameters:
packRepository
- the value for thepackRepository
record componentinitialDataConfig
- the value for theinitialDataConfig
record componentsafeMode
- the value for thesafeMode
record componentinitMode
- the value for theinitMode
record component
-
-
Method Details
-
createResourceManager
public com.mojang.datafixers.util.Pair<WorldDataConfiguration,CloseableResourceManager> createResourceManager() -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
packRepository
Returns the value of thepackRepository
record component.- Returns:
- the value of the
packRepository
record component
-
initialDataConfig
Returns the value of theinitialDataConfig
record component.- Returns:
- the value of the
initialDataConfig
record component
-
safeMode
public boolean safeMode()Returns the value of thesafeMode
record component.- Returns:
- the value of the
safeMode
record component
-
initMode
public boolean initMode()Returns the value of theinitMode
record component.- Returns:
- the value of the
initMode
record component
-