Skip to main content

Charge storage

saturn:charges

Stores the maximum charges, the recharge interval and the charges currently remaining.

DataStorage is the codec for runtime state, not a standalone data pack registry. Ability types declare the state they need; the host creates, ticks and persists it, and calls markDirty after changes.

JSON fields​

FieldTypeRequiredDefaultDescription
typeResource IDyes—saturn:charges
maximumNumber provideryes—Maximum value or upper bound.
recharge_ticksNumber provideryes—Ticks required to restore one charge.
last_changeIntegerno0Game tick of the last charge change.
remainingNumbernoomittedRemaining amount range or runtime remaining value.

JSON example​

{
"type": "saturn:charges",
"maximum": 1,
"recharge_ticks": 1
}

This is a value to embed in the corresponding field, not a standalone loadable data pack file. The example: references in the examples must be replaced with defined entries.

Java entry point​

com.iafenvoy.saturn.data.storage.builtin.ChargesDataStorage. This page is based on the Codec in the current 26.1.2 source.