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, DataPackConfig initialDataPacks, boolean safeMode)
extends Record
-
Field Summary
Modifier and TypeFieldDescriptionprivate final DataPackConfig
The field for theinitialDataPacks
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, DataPackConfig initialDataPacks, boolean safeMode) Creates an instance of aPackConfig
record class. -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.datafixers.util.Pair<DataPackConfig,
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 theinitialDataPacks
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. -
initialDataPacks
The field for theinitialDataPacks
record component. -
safeMode
private final boolean safeModeThe field for thesafeMode
record component.
-
-
Constructor Details
-
PackConfig
Creates an instance of aPackConfig
record class.- Parameters:
packRepository
- the value for thepackRepository
record componentinitialDataPacks
- the value for theinitialDataPacks
record componentsafeMode
- the value for thesafeMode
record component
-
-
Method Details
-
createResourceManager
public com.mojang.datafixers.util.Pair<DataPackConfig,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
-
initialDataPacks
Returns the value of theinitialDataPacks
record component.- Returns:
- the value of the
initialDataPacks
record component
-
safeMode
public boolean safeMode()Returns the value of thesafeMode
record component.- Returns:
- the value of the
safeMode
record component
-