Record Class Datapack
java.lang.Object
java.lang.Record
fr.fidorial.world.structure.Datapack
- Record Components:
id- the identifier of the pack, e.g.fidorialorfile/my_packsource- the folder, zip or server jar the pack was read fromdescription- the description of itspack.mcmetatemplates- the number of structure templates (.nbt) it providesstructures- the number of worldgen structures it providesstructureSets- the number of structure sets it provides
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.source()Returns the value of thesourcerecord component.intReturns the value of thestructuresrecord component.intReturns the value of thestructureSetsrecord component.intReturns the value of thetemplatesrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Datapack
public Datapack(String id, Path source, Component description, int templates, int structures, int structureSets) Creates an instance of aDatapackrecord class.- Parameters:
id- the value for theidrecord componentsource- the value for thesourcerecord componentdescription- the value for thedescriptionrecord componenttemplates- the value for thetemplatesrecord componentstructures- the value for thestructuresrecord componentstructureSets- the value for thestructureSetsrecord component
-
-
Method Details
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
id
-
source
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
templates
-
structures
public int structures()Returns the value of thestructuresrecord component.- Returns:
- the value of the
structuresrecord component
-
structureSets
public int structureSets()Returns the value of thestructureSetsrecord component.- Returns:
- the value of the
structureSetsrecord component
-