Record Class Registration.PackData
java.lang.Object
java.lang.Record
com.github.voidleech.oblivion.util.Registration.PackData
- Record Components:
name- File name of the pack: save your pack, along with a pack.mcmeta file, in src/main/resources/packs/{resource/data}/namedisplay- How you want your pack's name to be displayed.required- Whether the pack should always be onenabledByDefault- Whether the pack should be on by defaulttype- Whether the pack is a resource or a data pack
- Enclosing class:
- Registration
public static record Registration.PackData(String name, net.minecraft.network.chat.Component display, boolean required, boolean enabledByDefault, net.minecraft.server.packs.PackType type)
extends Record
Metadata necessary for finding or adding an additional resource/data pack.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.network.chat.Componentdisplay()Returns the value of thedisplayrecord component.booleanReturns the value of theenabledByDefaultrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.booleanrequired()Returns the value of therequiredrecord component.final StringtoString()Returns a string representation of this record class.net.minecraft.server.packs.PackTypetype()Returns the value of thetyperecord component.
-
Constructor Details
-
PackData
public PackData(String name, net.minecraft.network.chat.Component display, boolean required, boolean enabledByDefault, net.minecraft.server.packs.PackType type) Creates an instance of aPackDatarecord class.- Parameters:
name- the value for thenamerecord componentdisplay- the value for thedisplayrecord componentrequired- the value for therequiredrecord componentenabledByDefault- the value for theenabledByDefaultrecord componenttype- the value for thetyperecord component
-
-
Method Details
-
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 '=='. -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
display
public net.minecraft.network.chat.Component display()Returns the value of thedisplayrecord component.- Returns:
- the value of the
displayrecord component
-
required
public boolean required()Returns the value of therequiredrecord component.- Returns:
- the value of the
requiredrecord component
-
enabledByDefault
public boolean enabledByDefault()Returns the value of theenabledByDefaultrecord component.- Returns:
- the value of the
enabledByDefaultrecord component
-
type
public net.minecraft.server.packs.PackType type()Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-