-
-
Notifications
You must be signed in to change notification settings - Fork 62
Addon Development: Value Types
Value types in Integrated Dynamics indicate types for values, such as integers and booleans.
All value types must implement the IValueType
interface.
Value types are like blocks in Minecraft. They are only created once, and do not keep state by themselves.
The values (generic type V
) they refer to are instantiated multiple times.
The easiest way to get started, is by extending from the abstract ValueTypeBase
class. If you want to use this class, your main mod class MUST extend from ModBase
and you must override getMod
in your value type to refer to your mod instance.
A simple value type example you can take inspiration from is ValueTypeBoolean
.
More examples can be found here.
When extending from ValueTypeBase
, your assets must be structured as follows:
Each aspect must have a variable item overlay model defined at the path assets/<mod-id>/models/valuetype/<valuetype-name>.json
.
In the case of the boolean value type, the file assets/integrateddynamics/models/assets/valuetype/boolean.json
could contain the following:
{
"parent": "item/generated",
"textures": {
"layer0": "integrateddynamics:valuetype/boolean"
}
}
Your language file must contain your part name as valuetype.<mod-id>.<valuetype-name>
.
For example:
"valuetype.integrateddynamics.boolean": "Boolean",
- For Modpack Creators
- For Addon Developers