Record Class Datapack
java.lang.Object
java.lang.Record
fr.fidorial.world.structure.Datapack
- Record Components:
id- the identifier of the pack, e.g.fidorial:my_packsource- the folder or zip the pack was read fromdescriptionJson- the raw JSON description found inpack.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 thedescriptionJsonrecord 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, String descriptionJson, int templates, int structures, int structureSets) Creates an instance of aDatapackrecord class.- Parameters:
id- the value for theidrecord componentsource- the value for thesourcerecord componentdescriptionJson- the value for thedescriptionJsonrecord 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
-
descriptionJson
Returns the value of thedescriptionJsonrecord component.- Returns:
- the value of the
descriptionJsonrecord 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
-