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
FieldsModifier and TypeFieldDescriptionprivate final DataPackConfigThe field for theinitialDataPacksrecord component.private final PackRepositoryThe field for thepackRepositoryrecord component.private final booleanThe field for thesafeModerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionPackConfig(PackRepository packRepository, DataPackConfig initialDataPacks, boolean safeMode) Creates an instance of aPackConfigrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.datafixers.util.Pair<DataPackConfig,CloseableResourceManager> final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theinitialDataPacksrecord component.Returns the value of thepackRepositoryrecord component.booleansafeMode()Returns the value of thesafeModerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
packRepository
The field for thepackRepositoryrecord component. -
initialDataPacks
The field for theinitialDataPacksrecord component. -
safeMode
private final boolean safeModeThe field for thesafeModerecord component.
-
-
Constructor Details
-
PackConfig
Creates an instance of aPackConfigrecord class.- Parameters:
packRepository- the value for thepackRepositoryrecord componentinitialDataPacks- the value for theinitialDataPacksrecord componentsafeMode- the value for thesafeModerecord 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 thepackRepositoryrecord component.- Returns:
- the value of the
packRepositoryrecord component
-
initialDataPacks
Returns the value of theinitialDataPacksrecord component.- Returns:
- the value of the
initialDataPacksrecord component
-
safeMode
public boolean safeMode()Returns the value of thesafeModerecord component.- Returns:
- the value of the
safeModerecord component
-