Package forgottentowns.mod.api
Record Class SettlementTrading.World
java.lang.Object
java.lang.Record
forgottentowns.mod.api.SettlementTrading.World
- Record Components:
id- persistent town UUIDname- displayed town namebiome- uppercase biome identifierday- local elapsed day, starting at onedaysPerSeason- native calendar season lengthcampaignStage- empty for sandboxcampaignProfile- empty outside a named campaign profilecompletedStages- stages completed by this profile; empty when the host omits completion detail for visibility, configurable-export, or preview queries
- Enclosing interface:
SettlementTrading
public static record SettlementTrading.World(String id, String name, String biome, int day, int daysPerSeason, String campaignStage, String campaignProfile, Set<String> completedStages)
extends Record
Immutable settlement context.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbiome()Returns the value of thebiomerecord component.Returns the value of thecampaignProfilerecord component.Returns the value of thecampaignStagerecord component.Returns the value of thecompletedStagesrecord component.intday()Returns the value of thedayrecord component.intReturns the value of thedaysPerSeasonrecord 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.name()Returns the value of thenamerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
World
public World(String id, String name, String biome, int day, int daysPerSeason, String campaignStage, String campaignProfile, Set<String> completedStages) Detaches progression values.- Parameters:
id- persistent town UUIDname- displayed town namebiome- uppercase biome identifierday- elapsed local daydaysPerSeason- season lengthcampaignStage- current stagecampaignProfile- profile identifiercompletedStages- completed stage identifiers- Throws:
NullPointerException- if completedStages is null or contains null
-
-
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 '=='. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
biome
Returns the value of thebiomerecord component.- Returns:
- the value of the
biomerecord component
-
day
public int day()Returns the value of thedayrecord component.- Returns:
- the value of the
dayrecord component
-
daysPerSeason
public int daysPerSeason()Returns the value of thedaysPerSeasonrecord component.- Returns:
- the value of the
daysPerSeasonrecord component
-
campaignStage
Returns the value of thecampaignStagerecord component.- Returns:
- the value of the
campaignStagerecord component
-
campaignProfile
Returns the value of thecampaignProfilerecord component.- Returns:
- the value of the
campaignProfilerecord component
-
completedStages
Returns the value of thecompletedStagesrecord component.- Returns:
- the value of the
completedStagesrecord component
-