Teknik dokümantasyon İngilizce olarak mevcuttur. Kod ve alan adları mevcut Mod API'sine uygundur.
MOD DOKÜMANTASYONU
Java reference
Search the types, functions and callbacks available to a Java mod. This reference is generated from the SDK Javadocs; each entry links to its full Java documentation.
Find a type or member
60 genel türler · 468 üyeler · Content API 15
528 eşleşen girişler
production.workers()YöntemReturns legacy field, zero for recorded production.
SettlementTrading.Production · Ticaret ve harita
İmza
public int workers()Returns legacy field, zero for recorded production.
Örnek çağrı
production.workers();SettlementTrading.Production production = context.production(); this scans a category, so query at most once per game day and retain the detached result.
- Returns
- legacy field, zero for recorded production
SettlementTrading.SourceTürOne completed packing record, retaining the original route shape for mod compatibility.
SettlementTrading.Source · Ticaret ve harita
İmza
public static record SettlementTrading.Source(String id, String kind, String capacityKey, double cyclesPerSeason, Map<String,Double> outputs, Map<String,Integer> inputs) extends RecordOne completed packing record, retaining the original route shape for mod compatibility.
- Record Components
- id - stable route identity
- Record Components
- kind - packed for completed crate output; older providers may use other source kinds
- Record Components
- capacityKey - shared production-capacity identity
- Record Components
- cyclesPerSeason - actual completed crates in the most recent season-length day window, including today
- Record Components
- outputs - crate identity mapped to one unit per completed packing operation
- Record Components
- inputs - empty for completed output; ingredients have already been consumed
new SettlementTrading.SourceOluşturucuCopies resource maps.
SettlementTrading.Source · Ticaret ve harita
İmza
public Source(String id, String kind, String capacityKey, double cyclesPerSeason, Map<String,Double> outputs, Map<String,Integer> inputs)Copies resource maps.
Örnek çağrı
new SettlementTrading.Source(id, kind, capacityKey, cyclesPerSeason, outputs, inputs);Use the public API type shown; import forgottentowns.mod.api.*.
- Parameters
- id - route identity
- Parameters
- kind - source category
- Parameters
- capacityKey - shared capacity identity
- Parameters
- cyclesPerSeason - available cycles
- Parameters
- outputs - expected per-cycle outputs
- Parameters
- inputs - required per-cycle inputs
- Throws
- NullPointerException - if either map, a map key, or a map value is null
source.capacityKey()YöntemReturns shared production-capacity identity.
SettlementTrading.Source · Ticaret ve harita
İmza
public String capacityKey()Returns shared production-capacity identity.
Örnek çağrı
source.capacityKey();SettlementTrading.Source source is an instance of this supported API type.
- Returns
- shared production-capacity identity
source.cyclesPerSeason()YöntemReturns actual completed crates in the most recent season-length day window, including today.
SettlementTrading.Source · Ticaret ve harita
İmza
public double cyclesPerSeason()Returns actual completed crates in the most recent season-length day window, including today.
Örnek çağrı
source.cyclesPerSeason();SettlementTrading.Source source is an instance of this supported API type.
- Returns
- actual completed crates in the most recent season-length day window, including today
source.equals(o)YöntemIndicates whether some other object is "equal to" this one.
SettlementTrading.Source · Ticaret ve harita
İmza
public final boolean equals(Object o)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 with Objects::equals(Object,Object); primitive components are compared with '=='.
Örnek çağrı
source.equals(o);SettlementTrading.Source source is an instance of this supported API type.
- Specified by
- equals in class Record
- Parameters
- o - the object with which to compare
- Returns
- true if this object is the same as the o argument; false otherwise.
source.hashCode()YöntemReturns a hash code value for this object.
SettlementTrading.Source · Ticaret ve harita
İmza
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.
Örnek çağrı
source.hashCode();SettlementTrading.Source source is an instance of this supported API type.
- Specified by
- hashCode in class Record
- Returns
- a hash code value for this object
source.id()YöntemReturns stable route identity.
SettlementTrading.Source · Ticaret ve harita
İmza
public String id()Returns stable route identity.
Örnek çağrı
source.id();SettlementTrading.Source source is an instance of this supported API type.
- Returns
- stable route identity
source.inputs()YöntemReturns empty for completed output; ingredients have already been consumed.
SettlementTrading.Source · Ticaret ve harita
İmza
public Map<String,Integer> inputs()Returns empty for completed output; ingredients have already been consumed.
Örnek çağrı
source.inputs();SettlementTrading.Source source is an instance of this supported API type.
- Returns
- empty for completed output; ingredients have already been consumed
source.kind()YöntemReturns packed for completed crate output; older providers may use other source kinds.
SettlementTrading.Source · Ticaret ve harita
İmza
public String kind()Returns packed for completed crate output; older providers may use other source kinds.
Örnek çağrı
source.kind();SettlementTrading.Source source is an instance of this supported API type.
- Returns
- packed for completed crate output; older providers may use other source kinds
source.outputs()YöntemReturns crate identity mapped to one unit per completed packing operation.
SettlementTrading.Source · Ticaret ve harita
İmza
public Map<String,Double> outputs()Returns crate identity mapped to one unit per completed packing operation.
Örnek çağrı
source.outputs();SettlementTrading.Source source is an instance of this supported API type.
- Returns
- crate identity mapped to one unit per completed packing operation
source.toString()YöntemReturns a string representation of this record class.
SettlementTrading.Source · Ticaret ve harita
İmza
public final String 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.
Örnek çağrı
source.toString();SettlementTrading.Source source is an instance of this supported API type.
- Specified by
- toString in class Record
- Returns
- a string representation of this object
SettlementTrading.WorldTürImmutable settlement context.
SettlementTrading.World · Ticaret ve harita
İmza
public static record SettlementTrading.World(String id, String name, String biome, int day, int daysPerSeason, String campaignStage, String campaignProfile, Set<String> completedStages) extends RecordImmutable settlement context.
- Record Components
- id - persistent town UUID
- Record Components
- name - displayed town name
- Record Components
- biome - uppercase biome identifier
- Record Components
- day - local elapsed day, starting at one
- Record Components
- daysPerSeason - native calendar season length
- Record Components
- campaignStage - empty for sandbox
- Record Components
- campaignProfile - empty outside a named campaign profile
- Record Components
- completedStages - stages completed by this profile; empty when the host omits completion detail for visibility, configurable-export, or preview queries
new SettlementTrading.WorldOluşturucuDetaches progression values.
SettlementTrading.World · Ticaret ve harita
İmza
public World(String id, String name, String biome, int day, int daysPerSeason, String campaignStage, String campaignProfile, Set<String> completedStages)Detaches progression values.
Örnek çağrı
new SettlementTrading.World(id, name, biome, day, daysPerSeason, campaignStage, campaignProfile, completedStages);Use the public API type shown; import forgottentowns.mod.api.*.
- Parameters
- id - persistent town UUID
- Parameters
- name - displayed town name
- Parameters
- biome - uppercase biome identifier
- Parameters
- day - elapsed local day
- Parameters
- daysPerSeason - season length
- Parameters
- campaignStage - current stage
- Parameters
- campaignProfile - profile identifier
- Parameters
- completedStages - completed stage identifiers
- Throws
- NullPointerException - if completedStages is null or contains null
context.settlement().biome()YöntemReturns uppercase biome identifier.
SettlementTrading.World · Ticaret ve harita
İmza
public String biome()Returns uppercase biome identifier.
Örnek çağrı
context.settlement().biome();A detached settlement snapshot from the active ColonyContext.
- Returns
- uppercase biome identifier
context.settlement().campaignProfile()YöntemReturns empty outside a named campaign profile.
SettlementTrading.World · Ticaret ve harita
İmza
public String campaignProfile()Returns empty outside a named campaign profile.
Örnek çağrı
context.settlement().campaignProfile();A detached settlement snapshot from the active ColonyContext.
- Returns
- empty outside a named campaign profile
context.settlement().campaignStage()YöntemReturns empty for sandbox.
SettlementTrading.World · Ticaret ve harita
İmza
public String campaignStage()Returns empty for sandbox.
Örnek çağrı
context.settlement().campaignStage();A detached settlement snapshot from the active ColonyContext.
- Returns
- empty for sandbox
context.settlement().completedStages()YöntemReturns stages completed by this profile; empty when the host omits completion detail for visibility, configurable-export, or preview queries.
SettlementTrading.World · Ticaret ve harita
İmza
public Set<String> completedStages()Returns stages completed by this profile; empty when the host omits completion detail for visibility, configurable-export, or preview queries.
Örnek çağrı
context.settlement().completedStages();A detached settlement snapshot from the active ColonyContext.
- Returns
- stages completed by this profile; empty when the host omits completion detail for visibility, configurable-export, or preview queries
context.settlement().day()YöntemReturns local elapsed day, starting at one.
SettlementTrading.World · Ticaret ve harita
İmza
public int day()Returns local elapsed day, starting at one.
Örnek çağrı
context.settlement().day();A detached settlement snapshot from the active ColonyContext.
- Returns
- local elapsed day, starting at one
context.settlement().daysPerSeason()YöntemReturns native calendar season length.
SettlementTrading.World · Ticaret ve harita
İmza
public int daysPerSeason()Returns native calendar season length.
Örnek çağrı
context.settlement().daysPerSeason();A detached settlement snapshot from the active ColonyContext.
- Returns
- native calendar season length
context.settlement().equals(o)YöntemIndicates whether some other object is "equal to" this one.
SettlementTrading.World · Ticaret ve harita
İmza
public final boolean equals(Object o)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 with Objects::equals(Object,Object); primitive components are compared with '=='.
Örnek çağrı
context.settlement().equals(o);A detached settlement snapshot from the active ColonyContext.
- Specified by
- equals in class Record
- Parameters
- o - the object with which to compare
- Returns
- true if this object is the same as the o argument; false otherwise.
context.settlement().hashCode()YöntemReturns a hash code value for this object.
SettlementTrading.World · Ticaret ve harita
İmza
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.
Örnek çağrı
context.settlement().hashCode();A detached settlement snapshot from the active ColonyContext.
- Specified by
- hashCode in class Record
- Returns
- a hash code value for this object
context.settlement().id()YöntemReturns persistent town UUID.
SettlementTrading.World · Ticaret ve harita
İmza
public String id()Returns persistent town UUID.
Örnek çağrı
context.settlement().id();A detached settlement snapshot from the active ColonyContext.
- Returns
- persistent town UUID
context.settlement().name()YöntemReturns displayed town name.
SettlementTrading.World · Ticaret ve harita
İmza
public String name()Returns displayed town name.
Örnek çağrı
context.settlement().name();A detached settlement snapshot from the active ColonyContext.
- Returns
- displayed town name
context.settlement().toString()YöntemReturns a string representation of this record class.
SettlementTrading.World · Ticaret ve harita
İmza
public final String 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.
Örnek çağrı
context.settlement().toString();A detached settlement snapshot from the active ColonyContext.
- Specified by
- toString in class Record
- Returns
- a string representation of this object
Read an entry
- Method: a function your mod calls on the supplied service or value.
- Hook: a callback the game calls on your registered implementation.
- Constructor: creates an API value.
- Constant: a fixed value, such as a facing or work queue.
Expand an entry for its signature, parameters, return value, exceptions and call shape. Call shapes show the real parameter names as placeholders; supply values of the declared types. Read the lifetime and ownership rules before retaining an object or issuing a command.
Java setup · Registration and lifecycle · Task guides · Full generated Javadocs
