FORGOTTEN TOWNS

FORGOTTEN TOWNS / МОДИНГОВАЯ ДОКУМЕНТАЦИЯ

Моддинг вики ↗

Java Ссылка на API (Javadoc)

MOD API 15

Просмотрите вики

Текущая документация API модов.

Техническая документация доступна на английском языке. Имена кода и полей соответствуют текущему Mod API.

МОДИНГОВАЯ ДОКУМЕНТАЦИЯ

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 общедоступные типы · 468 члены · Content API 15

Сброс

528 соответствующие записи

citizenDied.cause()МетодReturns known native cause, never inferred from nearby actors.

ColonyEvent.CitizenDied · Мероприятия и панели

Подпись

public ColonyEvent.DeathCause cause()

Returns known native cause, never inferred from nearby actors.

Пример звонка

citizenDied.cause();

ColonyEvent.CitizenDied citizenDied is an instance of this supported API type.

Returns
known native cause, never inferred from nearby actors
citizenDied.citizen()МетодReturns detached dead actor.

ColonyEvent.CitizenDied · Мероприятия и панели

Подпись

public ColonyEvent.Actor citizen()

Returns detached dead actor.

Пример звонка

citizenDied.citizen();

ColonyEvent.CitizenDied citizenDied is an instance of this supported API type.

Returns
detached dead actor
citizenDied.day()МетодReturns monotonic game day.

ColonyEvent.CitizenDied · Мероприятия и панели

Подпись

public int day()

Returns monotonic game day.

Пример звонка

citizenDied.day();

ColonyEvent.CitizenDied citizenDied is an instance of this supported API type.

Specified by
day in interface ColonyEvent
Returns
monotonic game day
citizenDied.equals(o)МетодIndicates whether some other object is "equal to" this one.

ColonyEvent.CitizenDied · Мероприятия и панели

Подпись

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 '=='.

Пример звонка

citizenDied.equals(o);

ColonyEvent.CitizenDied citizenDied 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.
citizenDied.hashCode()МетодReturns a hash code value for this object.

ColonyEvent.CitizenDied · Мероприятия и панели

Подпись

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.

Пример звонка

citizenDied.hashCode();

ColonyEvent.CitizenDied citizenDied is an instance of this supported API type.

Specified by
hashCode in class Record
Returns
a hash code value for this object
citizenDied.toString()МетодReturns a string representation of this record class.

ColonyEvent.CitizenDied · Мероприятия и панели

Подпись

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.

Пример звонка

citizenDied.toString();

ColonyEvent.CitizenDied citizenDied is an instance of this supported API type.

Specified by
toString in class Record
Returns
a string representation of this object
ColonyEvent.CreatureDiedТипA creature's final death after its automatic revival/transformation checks.

ColonyEvent.CreatureDied · Мероприятия и панели

Подпись

public static record ColonyEvent.CreatureDied(ColonyEvent.Actor creature, int creditedCitizenId, boolean natural, int day) extends Record implements ColonyEvent

A creature's final death after its automatic revival/transformation checks.

Record Components
creature - detached dead actor
Record Components
creditedCitizenId - native kill-credit citizen identity, or zero when unavailable
Record Components
natural - whether native bookkeeping identifies a natural death
Record Components
day - monotonic game day
new ColonyEvent.CreatureDiedКонструкторCreates an instance of a CreatureDied record class.

ColonyEvent.CreatureDied · Мероприятия и панели

Подпись

public CreatureDied(ColonyEvent.Actor creature, int creditedCitizenId, boolean natural, int day)

Creates an instance of a CreatureDied record class.

Пример звонка

new ColonyEvent.CreatureDied(creature, creditedCitizenId, natural, day);

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

Parameters
creature - detached dead actor
Parameters
creditedCitizenId - native kill-credit citizen identity, or zero when unavailable
Parameters
natural - whether native bookkeeping identifies a natural death
Parameters
day - monotonic game day
creatureDied.creature()МетодReturns detached dead actor.

ColonyEvent.CreatureDied · Мероприятия и панели

Подпись

public ColonyEvent.Actor creature()

Returns detached dead actor.

Пример звонка

creatureDied.creature();

ColonyEvent.CreatureDied creatureDied is an instance of this supported API type.

Returns
detached dead actor
creatureDied.creditedCitizenId()МетодReturns native kill-credit citizen identity, or zero when unavailable.

ColonyEvent.CreatureDied · Мероприятия и панели

Подпись

public int creditedCitizenId()

Returns native kill-credit citizen identity, or zero when unavailable.

Пример звонка

creatureDied.creditedCitizenId();

ColonyEvent.CreatureDied creatureDied is an instance of this supported API type.

Returns
native kill-credit citizen identity, or zero when unavailable
creatureDied.day()МетодReturns monotonic game day.

ColonyEvent.CreatureDied · Мероприятия и панели

Подпись

public int day()

Returns monotonic game day.

Пример звонка

creatureDied.day();

ColonyEvent.CreatureDied creatureDied is an instance of this supported API type.

Specified by
day in interface ColonyEvent
Returns
monotonic game day
creatureDied.equals(o)МетодIndicates whether some other object is "equal to" this one.

ColonyEvent.CreatureDied · Мероприятия и панели

Подпись

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 '=='.

Пример звонка

creatureDied.equals(o);

ColonyEvent.CreatureDied creatureDied 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.
creatureDied.hashCode()МетодReturns a hash code value for this object.

ColonyEvent.CreatureDied · Мероприятия и панели

Подпись

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.

Пример звонка

creatureDied.hashCode();

ColonyEvent.CreatureDied creatureDied is an instance of this supported API type.

Specified by
hashCode in class Record
Returns
a hash code value for this object
creatureDied.natural()МетодReturns whether native bookkeeping identifies a natural death.

ColonyEvent.CreatureDied · Мероприятия и панели

Подпись

public boolean natural()

Returns whether native bookkeeping identifies a natural death.

Пример звонка

creatureDied.natural();

ColonyEvent.CreatureDied creatureDied is an instance of this supported API type.

Returns
whether native bookkeeping identifies a natural death
creatureDied.toString()МетодReturns a string representation of this record class.

ColonyEvent.CreatureDied · Мероприятия и панели

Подпись

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.

Пример звонка

creatureDied.toString();

ColonyEvent.CreatureDied creatureDied is an instance of this supported API type.

Specified by
toString in class Record
Returns
a string representation of this object
ColonyEvent.DeathCauseТипCauses the native citizen death bookkeeping can identify reliably.

ColonyEvent.DeathCause · Мероприятия и панели

Подпись

public static enum ColonyEvent.DeathCause extends Enum<ColonyEvent.DeathCause>

Causes the native citizen death bookkeeping can identify reliably.

All Implemented Interfaces
Serializable, Comparable<ColonyEvent.DeathCause>, Constable
ColonyEvent.DeathCause.ATTACKКонстантаA named attacker was recorded, including attributed poison.

ColonyEvent.DeathCause · Мероприятия и панели

Подпись

public static final ColonyEvent.DeathCause ATTACK

A named attacker was recorded, including attributed poison.

Пример звонка

ColonyEvent.DeathCause.ATTACK

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

ColonyEvent.DeathCause.STARVATIONКонстантаHunger was exhausted and no attacker was recorded.

ColonyEvent.DeathCause · Мероприятия и панели

Подпись

public static final ColonyEvent.DeathCause STARVATION

Hunger was exhausted and no attacker was recorded.

Пример звонка

ColonyEvent.DeathCause.STARVATION

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

ColonyEvent.DeathCause.UNKNOWNКонстантаNo reliable cause was available.

ColonyEvent.DeathCause · Мероприятия и панели

Подпись

public static final ColonyEvent.DeathCause UNKNOWN

No reliable cause was available.

Пример звонка

ColonyEvent.DeathCause.UNKNOWN

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

ColonyEvent.DeathCause.valueOf(name)МетодReturns the enum constant of this class with the specified name.

ColonyEvent.DeathCause · Мероприятия и панели

Подпись

public static ColonyEvent.DeathCause valueOf(String name)

Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)

Пример звонка

ColonyEvent.DeathCause.valueOf(name);

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

Parameters
name - the name of the enum constant to be returned.
Returns
the enum constant with the specified name
Throws
IllegalArgumentException - if this enum class has no constant with the specified name
Throws
NullPointerException - if the argument is null
ColonyEvent.DeathCause.values()МетодReturns an array containing the constants of this enum class, in the order they are declared.

ColonyEvent.DeathCause · Мероприятия и панели

Подпись

public static ColonyEvent.DeathCause[] values()

Returns an array containing the constants of this enum class, in the order they are declared.

Пример звонка

ColonyEvent.DeathCause.values();

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

Returns
an array containing the constants of this enum class, in the order they are declared
ColonyEvent.HomeChangedТипOne citizen's net home reassignment during a delivery interval.

ColonyEvent.HomeChanged · Мероприятия и панели

Подпись

public static record ColonyEvent.HomeChanged(int citizenId, long previousHomeId, long homeId, ColonyContext.Position position, int day) extends Record implements ColonyEvent

One citizen's net home reassignment during a delivery interval. Intermediate detach/attach steps are coalesced; unchanged final assignments emit nothing.

Record Components
citizenId - affected citizen identity
Record Components
previousHomeId - former zone identity, or zero when unassigned
Record Components
homeId - new zone identity, or zero when unassigned
Record Components
position - first tile of the new home, or of the former home when unassigned; null for a zone with an empty footprint
Record Components
day - monotonic game day of the last assignment change
new ColonyEvent.HomeChangedКонструкторCreates an instance of a HomeChanged record class.

ColonyEvent.HomeChanged · Мероприятия и панели

Подпись

public HomeChanged(int citizenId, long previousHomeId, long homeId, ColonyContext.Position position, int day)

Creates an instance of a HomeChanged record class.

Пример звонка

new ColonyEvent.HomeChanged(citizenId, previousHomeId, homeId, position, day);

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

Parameters
citizenId - affected citizen identity
Parameters
previousHomeId - former zone identity, or zero when unassigned
Parameters
homeId - new zone identity, or zero when unassigned
Parameters
position - first tile of the new home, or of the former home when unassigned; null for a zone with an empty footprint
Parameters
day - monotonic game day of the last assignment change
homeChanged.citizenId()МетодReturns affected citizen identity.

ColonyEvent.HomeChanged · Мероприятия и панели

Подпись

public int citizenId()

Returns affected citizen identity.

Пример звонка

homeChanged.citizenId();

ColonyEvent.HomeChanged homeChanged is an instance of this supported API type.

Returns
affected citizen identity
homeChanged.day()МетодReturns monotonic game day of the last assignment change.

ColonyEvent.HomeChanged · Мероприятия и панели

Подпись

public int day()

Returns monotonic game day of the last assignment change.

Пример звонка

homeChanged.day();

ColonyEvent.HomeChanged homeChanged is an instance of this supported API type.

Specified by
day in interface ColonyEvent
Returns
monotonic game day of the last assignment change

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