Class ResourceCategory
java.lang.Object
fr.robie.machineengine.api.resource.ResourceCategory
- All Implemented Interfaces:
net.kyori.adventure.key.Keyed
A family of resources, e.g.
energyplugin:energy or mymod:fluid
(ARCHITECTURE.md ยง9.1). MachineEngine attaches no meaning to categories.
Amounts are longs in base units (D10). scale() is the number
of decimal digits used when displaying them: a scale of 3 shows 1500 base units as 1.500.
Definitions are canonical: compare them by reference.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull ResourceCategory.Builderbuilder(@NotNull net.kyori.adventure.key.Key key) @NotNull net.kyori.adventure.key.Keykey()@NotNull MergePolicyHow two stacks of one type with different components combine in a storage.intscale()Decimal digits used to display amounts.toString()@NotNull Stringunit()Name of the base unit, e.g.
-
Method Details
-
builder
@NotNull public static @NotNull ResourceCategory.Builder builder(@NotNull @NotNull net.kyori.adventure.key.Key key) -
key
@NotNull public @NotNull net.kyori.adventure.key.Key key()- Specified by:
keyin interfacenet.kyori.adventure.key.Keyed
-
unit
Name of the base unit, e.g.mBorFE. Display only. -
scale
public int scale()Decimal digits used to display amounts. -
mergePolicy
How two stacks of one type with different components combine in a storage. -
toString
-