Dokumentacja techniczna dostępna jest w języku angielskim. Nazwy kodów i pól są zgodne z bieżącym API Mod.
DOKUMENTACJA MODDOWANIA
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 typy publiczne · 468 członkowie · Content API 15
528 pasujące wpisy
home.area()MetodaReturns usable room floor tiles, including tiles occupied by furniture.
ColonyContext.Home · Obywatele i domy
Podpis
public int area()Returns usable room floor tiles, including tiles occupied by furniture.
Zadzwoń do przykładu
home.area();ColonyContext.Home home = context.view().home(id); check for null before reading its values.
- Returns
- usable room floor tiles, including tiles occupied by furniture
home.bedAssignments()MetodaReturns exclusive bed identity per resident; absent when no individual bed is available.
ColonyContext.Home · Obywatele i domy
Podpis
public Map<Integer,Long> bedAssignments()Returns exclusive bed identity per resident; absent when no individual bed is available.
Zadzwoń do przykładu
home.bedAssignments();ColonyContext.Home home = context.view().home(id); check for null before reading its values.
- Returns
- exclusive bed identity per resident; absent when no individual bed is available
home.beds()MetodaReturns immutable complete beds assigned to this zone.
ColonyContext.Home · Obywatele i domy
Podpis
public List<ColonyContext.Bed> beds()Returns immutable complete beds assigned to this zone.
Zadzwoń do przykładu
home.beds();ColonyContext.Home home = context.view().home(id); check for null before reading its values.
- Returns
- immutable complete beds assigned to this zone
home.equals(o)MetodaIndicates whether some other object is "equal to" this one.
ColonyContext.Home · Obywatele i domy
Podpis
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 '=='.
Zadzwoń do przykładu
home.equals(o);ColonyContext.Home home = context.view().home(id); check for null before reading its values.
- 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.
home.hashCode()MetodaReturns a hash code value for this object.
ColonyContext.Home · Obywatele i domy
Podpis
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.
Zadzwoń do przykładu
home.hashCode();ColonyContext.Home home = context.view().home(id); check for null before reading its values.
- Specified by
- hashCode in class Record
- Returns
- a hash code value for this object
home.id()MetodaReturns stable zone identity.
ColonyContext.Home · Obywatele i domy
Podpis
public long id()Returns stable zone identity.
Zadzwoń do przykładu
home.id();ColonyContext.Home home = context.view().home(id); check for null before reading its values.
- Returns
- stable zone identity
home.kind()MetodaReturns zone definition ID.
ColonyContext.Home · Obywatele i domy
Podpis
public String kind()Returns zone definition ID.
Zadzwoń do przykładu
home.kind();ColonyContext.Home home = context.view().home(id); check for null before reading its values.
- Returns
- zone definition ID
home.residents()MetodaReturns immutable living, non-deserting resident identities.
ColonyContext.Home · Obywatele i domy
Podpis
public List<Integer> residents()Returns immutable living, non-deserting resident identities.
Zadzwoń do przykładu
home.residents();ColonyContext.Home home = context.view().home(id); check for null before reading its values.
- Returns
- immutable living, non-deserting resident identities
home.toString()MetodaReturns a string representation of this record class.
ColonyContext.Home · Obywatele i domy
Podpis
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.
Zadzwoń do przykładu
home.toString();ColonyContext.Home home = context.view().home(id); check for null before reading its values.
- Specified by
- toString in class Record
- Returns
- a string representation of this object
ColonyContext.ModifiersTypMod-owned citizen modifiers, recomputed on load; no effect stores live runtime objects.
ColonyContext.Modifiers · Obywatele i domy
Podpis
public static record ColonyContext.Modifiers(boolean canWork, boolean consumesFood, boolean needsBed, double scale, String visualArchetype, String household, long preferredBed, List<ColonyContext.Status> statuses, boolean permitsProfession, int allAttributesBonus) extends RecordMod-owned citizen modifiers, recomputed on load; no effect stores live runtime objects.
- Record Components
- canWork - whether autonomous work, military duties and promotion remain allowed
- Record Components
- consumesFood - whether ordinary eating is needed; false maintains fed needs automatically
- Record Components
- needsBed - whether an individual bed is required; false also maintains rest automatically
- Record Components
- scale - multiplier for actor rendering, from 0.25 to 2
- Record Components
- visualArchetype - existing visual archetype override, or empty
- Record Components
- household - owning-mod namespaced household identity, or empty
- Record Components
- preferredBed - stable bed ID, or zero for normal ownership assignment
- Record Components
- statuses - localized entries shown on citizen and soldier rosters
- Record Components
- permitsProfession - whether assigned professions and their benefits remain active
- Record Components
- allAttributesBonus - additive bonus to each primary attribute, from 0 to 100
new ColonyContext.ModifiersKonstruktorCreates effects with ordinary professions and no attribute bonus.
ColonyContext.Modifiers · Obywatele i domy
Podpis
public Modifiers(boolean canWork, boolean consumesFood, boolean needsBed, double scale, String visualArchetype, String household, long preferredBed, List<ColonyContext.Status> statuses)Creates effects with ordinary professions and no attribute bonus.
Zadzwoń do przykładu
new ColonyContext.Modifiers(canWork, consumesFood, needsBed, scale, visualArchetype, household, preferredBed, statuses);Use the public API type shown; import forgottentowns.mod.api.*.
- Parameters
- canWork - permit work
- Parameters
- consumesFood - require ordinary eating
- Parameters
- needsBed - require own bed
- Parameters
- scale - visual multiplier
- Parameters
- visualArchetype - visual override
- Parameters
- household - household identity
- Parameters
- preferredBed - bed identity
- Parameters
- statuses - roster statuses
- Throws
- IllegalArgumentException - if scale or bed ID is invalid or too many statuses are supplied
- Throws
- NullPointerException - if a text value, the statuses list, or a status entry is null
new ColonyContext.ModifiersKonstruktorCopies and validates bounded modifiers.
ColonyContext.Modifiers · Obywatele i domy
Podpis
public Modifiers(boolean canWork, boolean consumesFood, boolean needsBed, double scale, String visualArchetype, String household, long preferredBed, List<ColonyContext.Status> statuses, boolean permitsProfession, int allAttributesBonus)Copies and validates bounded modifiers.
Zadzwoń do przykładu
new ColonyContext.Modifiers(canWork, consumesFood, needsBed, scale, visualArchetype, household, preferredBed, statuses, permitsProfession, allAttributesBonus);Use the public API type shown; import forgottentowns.mod.api.*.
- Parameters
- canWork - permit work
- Parameters
- consumesFood - require ordinary eating
- Parameters
- needsBed - require own bed
- Parameters
- scale - visual multiplier
- Parameters
- visualArchetype - visual override
- Parameters
- household - household identity
- Parameters
- preferredBed - bed identity
- Parameters
- statuses - roster statuses
- Parameters
- permitsProfession - permit profession effects
- Parameters
- allAttributesBonus - bonus to each primary attribute
- Throws
- IllegalArgumentException - if scale, bed ID or bonus is invalid or more than eight statuses are supplied
- Throws
- NullPointerException - if a text value, the statuses list, or a status entry is null
ColonyContext.Modifiers.NONEStałaNo restrictions or presentation overrides.
ColonyContext.Modifiers · Obywatele i domy
Podpis
public static final ColonyContext.Modifiers NONENo restrictions or presentation overrides.
Zadzwoń do przykładu
ColonyContext.Modifiers.NONEUse the public API type shown; import forgottentowns.mod.api.*.
modifiers.allAttributesBonus()MetodaReturns additive bonus to each primary attribute, from 0 to 100.
ColonyContext.Modifiers · Obywatele i domy
Podpis
public int allAttributesBonus()Returns additive bonus to each primary attribute, from 0 to 100.
Zadzwoń do przykładu
modifiers.allAttributesBonus();ColonyContext.Modifiers modifiers is an instance of this supported API type.
- Returns
- additive bonus to each primary attribute, from 0 to 100
modifiers.canWork()MetodaReturns whether autonomous work, military duties and promotion remain allowed.
ColonyContext.Modifiers · Obywatele i domy
Podpis
public boolean canWork()Returns whether autonomous work, military duties and promotion remain allowed.
Zadzwoń do przykładu
modifiers.canWork();ColonyContext.Modifiers modifiers is an instance of this supported API type.
- Returns
- whether autonomous work, military duties and promotion remain allowed
modifiers.consumesFood()MetodaReturns whether ordinary eating is needed; false maintains fed needs automatically.
ColonyContext.Modifiers · Obywatele i domy
Podpis
public boolean consumesFood()Returns whether ordinary eating is needed; false maintains fed needs automatically.
Zadzwoń do przykładu
modifiers.consumesFood();ColonyContext.Modifiers modifiers is an instance of this supported API type.
- Returns
- whether ordinary eating is needed; false maintains fed needs automatically
modifiers.equals(o)MetodaIndicates whether some other object is "equal to" this one.
ColonyContext.Modifiers · Obywatele i domy
Podpis
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 '=='.
Zadzwoń do przykładu
modifiers.equals(o);ColonyContext.Modifiers modifiers 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.
modifiers.hashCode()MetodaReturns a hash code value for this object.
ColonyContext.Modifiers · Obywatele i domy
Podpis
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.
Zadzwoń do przykładu
modifiers.hashCode();ColonyContext.Modifiers modifiers is an instance of this supported API type.
- Specified by
- hashCode in class Record
- Returns
- a hash code value for this object
modifiers.household()MetodaReturns owning-mod namespaced household identity, or empty.
ColonyContext.Modifiers · Obywatele i domy
Podpis
public String household()Returns owning-mod namespaced household identity, or empty.
Zadzwoń do przykładu
modifiers.household();ColonyContext.Modifiers modifiers is an instance of this supported API type.
- Returns
- owning-mod namespaced household identity, or empty
modifiers.needsBed()MetodaReturns whether an individual bed is required; false also maintains rest automatically.
ColonyContext.Modifiers · Obywatele i domy
Podpis
public boolean needsBed()Returns whether an individual bed is required; false also maintains rest automatically.
Zadzwoń do przykładu
modifiers.needsBed();ColonyContext.Modifiers modifiers is an instance of this supported API type.
- Returns
- whether an individual bed is required; false also maintains rest automatically
modifiers.permitsProfession()MetodaReturns whether assigned professions and their benefits remain active.
ColonyContext.Modifiers · Obywatele i domy
Podpis
public boolean permitsProfession()Returns whether assigned professions and their benefits remain active.
Zadzwoń do przykładu
modifiers.permitsProfession();ColonyContext.Modifiers modifiers is an instance of this supported API type.
- Returns
- whether assigned professions and their benefits remain active
modifiers.preferredBed()MetodaReturns stable bed ID, or zero for normal ownership assignment.
ColonyContext.Modifiers · Obywatele i domy
Podpis
public long preferredBed()Returns stable bed ID, or zero for normal ownership assignment.
Zadzwoń do przykładu
modifiers.preferredBed();ColonyContext.Modifiers modifiers is an instance of this supported API type.
- Returns
- stable bed ID, or zero for normal ownership assignment
modifiers.scale()MetodaReturns multiplier for actor rendering, from 0.25 to 2.
ColonyContext.Modifiers · Obywatele i domy
Podpis
public double scale()Returns multiplier for actor rendering, from 0.25 to 2.
Zadzwoń do przykładu
modifiers.scale();ColonyContext.Modifiers modifiers is an instance of this supported API type.
- Returns
- multiplier for actor rendering, from 0.25 to 2
modifiers.statuses()MetodaReturns localized entries shown on citizen and soldier rosters.
ColonyContext.Modifiers · Obywatele i domy
Podpis
public List<ColonyContext.Status> statuses()Returns localized entries shown on citizen and soldier rosters.
Zadzwoń do przykładu
modifiers.statuses();ColonyContext.Modifiers modifiers is an instance of this supported API type.
- Returns
- localized entries shown on citizen and soldier rosters
modifiers.toString()MetodaReturns a string representation of this record class.
ColonyContext.Modifiers · Obywatele i domy
Podpis
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.
Zadzwoń do przykładu
modifiers.toString();ColonyContext.Modifiers modifiers is an instance of this supported API type.
- 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
