Record Class PackOptions
java.lang.Object
java.lang.Record
net.darkhax.openloader.common.impl.unused.PackOptions
public record PackOptions(boolean enabled, boolean required, net.minecraft.server.packs.repository.Pack.Position position, Optional<net.minecraft.network.chat.Component> name, Optional<net.minecraft.network.chat.Component> description, boolean includeSourceName, boolean fixedPosition)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<PackOptions> static final PackOptionsstatic final com.mojang.serialization.Codec<net.minecraft.server.packs.repository.Pack.Position> -
Constructor Summary
ConstructorsConstructorDescriptionPackOptions(boolean enabled, boolean required, net.minecraft.server.packs.repository.Pack.Position position, Optional<net.minecraft.network.chat.Component> name, Optional<net.minecraft.network.chat.Component> description, boolean includeSourceName, boolean fixedPosition) Creates an instance of aPackOptionsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionOptional<net.minecraft.network.chat.Component> Returns the value of thedescriptionrecord component.booleanenabled()Returns the value of theenabledrecord component.final booleanIndicates whether some other object is "equal to" this one.booleanReturns the value of thefixedPositionrecord component.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theincludeSourceNamerecord component.Optional<net.minecraft.network.chat.Component> name()Returns the value of thenamerecord component.net.minecraft.server.packs.repository.Pack.Positionposition()Returns the value of thepositionrecord component.static PackOptionsreadOptions(File packCandidate) booleanrequired()Returns the value of therequiredrecord component.net.minecraft.server.packs.PackSelectionConfigfinal StringtoString()Returns a string representation of this record class.
-
Field Details
-
DEFAULT_OPTIONS
-
POSITION
public static final com.mojang.serialization.Codec<net.minecraft.server.packs.repository.Pack.Position> POSITION -
CODEC
-
-
Constructor Details
-
PackOptions
public PackOptions(boolean enabled, boolean required, net.minecraft.server.packs.repository.Pack.Position position, Optional<net.minecraft.network.chat.Component> name, Optional<net.minecraft.network.chat.Component> description, boolean includeSourceName, boolean fixedPosition) Creates an instance of aPackOptionsrecord class.- Parameters:
enabled- the value for theenabledrecord componentrequired- the value for therequiredrecord componentposition- the value for thepositionrecord componentname- the value for thenamerecord componentdescription- the value for thedescriptionrecord componentincludeSourceName- the value for theincludeSourceNamerecord componentfixedPosition- the value for thefixedPositionrecord component
-
-
Method Details
-
selectionConfig
public net.minecraft.server.packs.PackSelectionConfig selectionConfig() -
readOptions
-
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 '=='. -
enabled
public boolean enabled()Returns the value of theenabledrecord component.- Returns:
- the value of the
enabledrecord component
-
required
public boolean required()Returns the value of therequiredrecord component.- Returns:
- the value of the
requiredrecord component
-
position
public net.minecraft.server.packs.repository.Pack.Position position()Returns the value of thepositionrecord component.- Returns:
- the value of the
positionrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
includeSourceName
public boolean includeSourceName()Returns the value of theincludeSourceNamerecord component.- Returns:
- the value of the
includeSourceNamerecord component
-
fixedPosition
public boolean fixedPosition()Returns the value of thefixedPositionrecord component.- Returns:
- the value of the
fixedPositionrecord component
-