FORGOTTEN TOWNS

FORGOTTEN TOWNS / MOD DOKÜMANTASYONU

Wiki'yi değiştirme ↗

Java API referansı (Javadoc)

MOD API 15

Wiki'ye göz atın

Güncel Mod API belgeleri.

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

Sıfırla

528 eşleşen girişler

settlementTradeCore.productionRules()YöntemReturns legacy production assumptions retained for compiled-pack compatibility; recorded packing output does not use these assumptions.

SettlementTradeCore · Ticaret ve harita

İmza

public TradeProductionRules productionRules()

Returns legacy production assumptions retained for compiled-pack compatibility; recorded packing output does not use these assumptions.

Örnek çağrı

settlementTradeCore.productionRules();

SettlementTradeCore settlementTradeCore is an instance of this supported API type.

Returns
legacy production assumptions retained for compiled-pack compatibility; recorded packing output does not use these assumptions
settlementTradeCore.toString()YöntemReturns a string representation of this record class.

SettlementTradeCore · 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ı

settlementTradeCore.toString();

SettlementTradeCore settlementTradeCore is an instance of this supported API type.

Specified by
toString in class Record
Returns
a string representation of this object
SettlementTradingTürPure rules for an opt-in settlement trade network.

SettlementTrading · Ticaret ve harita

İmza

public interface SettlementTrading

Pure rules for an opt-in settlement trade network. The engine owns inventory conservation, durable receipts, the shared calendar and UI; the mod owns export selection, prices, grants and travel rules. Export allowances cannot exceed the host's recorded completed packing output. Callbacks receive detached values and must not retain mutable external state.

SettlementTrading.MarketTürAn authored market, with its own finite purse and seasonal production.

SettlementTrading.Market · Ticaret ve harita

İmza

public static record SettlementTrading.Market(String id, String nameKey, String biome, Map<String,Integer> exports, String sourceStage, int initialGold) extends Record

An authored market, with its own finite purse and seasonal production.

Record Components
id - unique market identity matching lower-case namespace:name syntax with letters, digits, and underscores
Record Components
nameKey - localized display-name key beginning with mods.
Record Components
biome - uppercase biome identifier controlling travel
Record Components
exports - recurring production per season; host validation/packing conversion follows estimate tables
Record Components
sourceStage - campaign stage whose saved town supplies reservations and its purse; empty for an independent market
Record Components
initialGold - one-time opening purse in 0..100000
new SettlementTrading.MarketOluşturucuDetaches authored goods.

SettlementTrading.Market · Ticaret ve harita

İmza

public Market(String id, String nameKey, String biome, Map<String,Integer> exports, String sourceStage, int initialGold)

Detaches authored goods.

Örnek çağrı

new SettlementTrading.Market(id, nameKey, biome, exports, sourceStage, initialGold);

Use the public API type shown; import forgottentowns.mod.api.*.

Parameters
id - stable market identity
Parameters
nameKey - localized market label
Parameters
biome - market biome
Parameters
exports - seasonal goods
Parameters
sourceStage - corresponding campaign stage, or empty
Parameters
initialGold - starting purse
Throws
NullPointerException - if exports, a resource key, or a quantity is null
market.biome()YöntemReturns uppercase biome identifier controlling travel.

SettlementTrading.Market · Ticaret ve harita

İmza

public String biome()

Returns uppercase biome identifier controlling travel.

Örnek çağrı

market.biome();

SettlementTrading.Market market is an instance of this supported API type.

Returns
uppercase biome identifier controlling travel
market.equals(o)YöntemIndicates whether some other object is "equal to" this one.

SettlementTrading.Market · 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ı

market.equals(o);

SettlementTrading.Market market 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.
market.exports()YöntemReturns recurring production per season; host validation/packing conversion follows estimate tables.

SettlementTrading.Market · Ticaret ve harita

İmza

public Map<String,Integer> exports()

Returns recurring production per season; host validation/packing conversion follows estimate tables.

Örnek çağrı

market.exports();

SettlementTrading.Market market is an instance of this supported API type.

Returns
recurring production per season; host validation/packing conversion follows estimate tables
market.hashCode()YöntemReturns a hash code value for this object.

SettlementTrading.Market · 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ı

market.hashCode();

SettlementTrading.Market market is an instance of this supported API type.

Specified by
hashCode in class Record
Returns
a hash code value for this object
market.id()YöntemReturns unique market identity matching lower-case namespace:name syntax with letters, digits, and underscores.

SettlementTrading.Market · Ticaret ve harita

İmza

public String id()

Returns unique market identity matching lower-case namespace:name syntax with letters, digits, and underscores.

Örnek çağrı

market.id();

SettlementTrading.Market market is an instance of this supported API type.

Returns
unique market identity matching lower-case namespace:name syntax with letters, digits, and underscores
market.initialGold()YöntemReturns one-time opening purse in 0..100000.

SettlementTrading.Market · Ticaret ve harita

İmza

public int initialGold()

Returns one-time opening purse in 0..100000.

Örnek çağrı

market.initialGold();

SettlementTrading.Market market is an instance of this supported API type.

Returns
one-time opening purse in 0..100000
market.nameKey()YöntemReturns localized display-name key beginning with mods..

SettlementTrading.Market · Ticaret ve harita

İmza

public String nameKey()

Returns localized display-name key beginning with mods..

Örnek çağrı

market.nameKey();

SettlementTrading.Market market is an instance of this supported API type.

Returns
localized display-name key beginning with mods.
market.sourceStage()YöntemReturns campaign stage whose saved town supplies reservations and its purse; empty for an independent market.

SettlementTrading.Market · Ticaret ve harita

İmza

public String sourceStage()

Returns campaign stage whose saved town supplies reservations and its purse; empty for an independent market.

Örnek çağrı

market.sourceStage();

SettlementTrading.Market market is an instance of this supported API type.

Returns
campaign stage whose saved town supplies reservations and its purse; empty for an independent market
market.toString()YöntemReturns a string representation of this record class.

SettlementTrading.Market · 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ı

market.toString();

SettlementTrading.Market market is an instance of this supported API type.

Specified by
toString in class Record
Returns
a string representation of this object
SettlementTrading.ProductionTürDetached completed-production query used by trade policies and colony extensions.

SettlementTrading.Production · Ticaret ve harita

İmza

public static record SettlementTrading.Production(List<SettlementTrading.Source> sources, Map<String,Integer> stock, Set<String> selectedExports, Map<String,Integer> minimumStocks, Set<String> freeInputs, int workers, int daysPerSeason) extends Record

Detached completed-production query used by trade policies and colony extensions.

Record Components
sources - completed crate production during the most recent season-length day window, including today
Record Components
stock - total stored tradable resource quantities across stockpiles; reservations are not subtracted
Record Components
selectedExports - resources explicitly selected for recurring export
Record Components
minimumStocks - legacy field, empty for recorded production
Record Components
freeInputs - legacy field, empty for recorded production
Record Components
workers - legacy field, zero for recorded production
Record Components
daysPerSeason - native season length
new SettlementTrading.ProductionOluşturucuDetaches all collection values.

SettlementTrading.Production · Ticaret ve harita

İmza

public Production(List<SettlementTrading.Source> sources, Map<String,Integer> stock, Set<String> selectedExports, Map<String,Integer> minimumStocks, Set<String> freeInputs, int workers, int daysPerSeason)

Detaches all collection values.

Örnek çağrı

new SettlementTrading.Production(sources, stock, selectedExports, minimumStocks, freeInputs, workers, daysPerSeason);

Use the public API type shown; import forgottentowns.mod.api.*.

Parameters
sources - production routes
Parameters
stock - stored tradable inventory totals, without reservation subtraction
Parameters
selectedExports - chosen resource identifiers
Parameters
minimumStocks - configured minimum-stock output targets
Parameters
freeInputs - naturally available basic inputs
Parameters
workers - eligible workforce
Parameters
daysPerSeason - season length
Throws
NullPointerException - if a collection, collection entry, map key, or map value is null
production.daysPerSeason()YöntemReturns native season length.

SettlementTrading.Production · Ticaret ve harita

İmza

public int daysPerSeason()

Returns native season length.

Örnek çağrı

production.daysPerSeason();

SettlementTrading.Production production = context.production(); this scans a category, so query at most once per game day and retain the detached result.

Returns
native season length
production.equals(o)YöntemIndicates whether some other object is "equal to" this one.

SettlementTrading.Production · 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ı

production.equals(o);

SettlementTrading.Production production = context.production(); this scans a category, so query at most once per game day and retain the detached result.

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.
production.freeInputs()YöntemReturns legacy field, empty for recorded production.

SettlementTrading.Production · Ticaret ve harita

İmza

public Set<String> freeInputs()

Returns legacy field, empty for recorded production.

Örnek çağrı

production.freeInputs();

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, empty for recorded production
production.hashCode()YöntemReturns a hash code value for this object.

SettlementTrading.Production · 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ı

production.hashCode();

SettlementTrading.Production production = context.production(); this scans a category, so query at most once per game day and retain the detached result.

Specified by
hashCode in class Record
Returns
a hash code value for this object
production.minimumStocks()YöntemReturns legacy field, empty for recorded production.

SettlementTrading.Production · Ticaret ve harita

İmza

public Map<String,Integer> minimumStocks()

Returns legacy field, empty for recorded production.

Örnek çağrı

production.minimumStocks();

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, empty for recorded production
production.selectedExports()YöntemReturns resources explicitly selected for recurring export.

SettlementTrading.Production · Ticaret ve harita

İmza

public Set<String> selectedExports()

Returns resources explicitly selected for recurring export.

Örnek çağrı

production.selectedExports();

SettlementTrading.Production production = context.production(); this scans a category, so query at most once per game day and retain the detached result.

Returns
resources explicitly selected for recurring export
production.sources()YöntemReturns completed crate production during the most recent season-length day window, including today.

SettlementTrading.Production · Ticaret ve harita

İmza

public List<SettlementTrading.Source> sources()

Returns completed crate production during the most recent season-length day window, including today.

Örnek çağrı

production.sources();

SettlementTrading.Production production = context.production(); this scans a category, so query at most once per game day and retain the detached result.

Returns
completed crate production during the most recent season-length day window, including today
production.stock()YöntemReturns total stored tradable resource quantities across stockpiles; reservations are not subtracted.

SettlementTrading.Production · Ticaret ve harita

İmza

public Map<String,Integer> stock()

Returns total stored tradable resource quantities across stockpiles; reservations are not subtracted.

Örnek çağrı

production.stock();

SettlementTrading.Production production = context.production(); this scans a category, so query at most once per game day and retain the detached result.

Returns
total stored tradable resource quantities across stockpiles; reservations are not subtracted
production.toString()YöntemReturns a string representation of this record class.

SettlementTrading.Production · 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ı

production.toString();

SettlementTrading.Production production = context.production(); this scans a category, so query at most once per game day and retain the detached result.

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