Skip to content

Staff Configuration

Lyof429 edited this page Jul 14, 2026 · 20 revisions

< Back to homepage


Staff types determine how a staff pays its cost when fired and may provide additional effects or configuration options. Every staff shares the same properties, effects, and display sections. The selected type may determine additional fields available under these sections.

New staff types can easily defined in java addons by declaring a service for net.lyof.sortilege.item.staff.IStaffEntryReader. Detailed explanations can be found at the bottom of this page


Experience

Type: sortilege:experience

Class: ExperienceStaffItem

Consumes player experience when fired. This is the default staff type used by most built-in staffs.

Cost

Field Type Description
value int (required) Amount of experience consumed per shot.

Health

Type: sortilege:health

Class: HealthStaffItem

Consumes the player's health when fired.

Cost

Field Type Description
value int (required) Amount of health consumed per shot.
free_on_miss boolean (optional, default: false) If true, health is only consumed when a target is successfully hit.
free_on_kill boolean (optional, default: false) If true, health is not consumed when a target is killed.

Hunger

Type: sortilege:hunger

Class: HungerStaffItem

Consumes hunger when fired.

Cost

Field Type Description
value int (required) Hunger consumed per shot.

Ammo

Type: sortilege:ammo

Class: AmmoStaffItem

Consumes items from the player's inventory when fired.

Cost

Field Type Description
item string, representing either an item id or tag id (required) Item consumed when firing the staff.
count int (required) Number of items consumed per shot.

This can be used to create staffs that consume any item as ammunition, allowing them to function more like traditional ranged weapons or reusable spell scrolls.


Botania Mana

Type: botania:mana

Class: BotaniaStaffItem

Consumes Botania mana (from tablets or other containers) to shoot and repair itself.

Cost

Field Type Description
mana int (required) Mana consumed per shot.
mana_per_durability int (optional, defaults to mana) Mana required to repair one point of durability.

Effects

Field Type Description
allow_mana_burst boolean (optional, defaults to true) If true, overrides default shooting behavior when sneaking to fire a mana burst (much like a Mana Blaster).

If allow_mana_burst is true, a Lens can be equipped on the staff by combining them in a crafting inventory. The fired mana burst will have the lens' effects applied.


Type: spell_engine:rune

Class: SpellEngineStaffItem

Technically an Ammo staff, but integrates further with Spell Engine and Spell Power attributes and spell schools. If RPGMana is installed, its mana will also be usable to shoot instead of runes.

Cost

Field Type Description
rune string, representing either an item id or tag id (required) Item consumed when firing the staff.
mana int (optional) Mana consumed per shot, if a rune isn't available.

Effects

Field Type Description
school string, representing a Spell Engine spell school (optional, defaults to spell_engine:arcane) The spell school used for this staff. Affects attributes.

Origins Resource

Type: origins:resource

Class: OriginsStaffItem

Consumes an Origin resource when fired. Also prevents users who do not have said resource to fire, effectively locking the staff behind some origins.

Cost

Field Type Description
value int (required) Amount consumed per shot.
resource string, representigng an origins power id (required) Power defining the resource to be used when firing.

Goety Soul Energy

Type: goety:soul_energy

Class: GoetyStaffItem

Consumes soul energy from held totems when fired.

Cost

Field Type Description
value int (required) Soul Energy consumed per shot.
resource string, representing an origins power id (required) Power defining the resource to be used when firing.

Effects

Field Type Description
spell_type string, one of NONE, NECROMANCY, NETHER, ILL, FROST, GEOMANCY, WIND, STORM, ABYSS, WILD, VOID (optional, defaults to NONE) Spell Type used for the staff. Affects attributes, cost and cooldown. If NONE is used, the staff will dynamically change type based on its elemental enchantments.
Brazier -> NETHER
Blizzard -> FROST
Blast -> GEOMANCY
Blitz -> STORM
Blessing -> NECROMANCY
persists boolean (optional, defaults to false) If true, the staff will persist in a broken state when out of durability, like Goety's dark tools.

Type: ebwizardry:mana

Class: ElectroblobStaffItem

Consumes Wizardry's mana when fired and support most wand upgrades.

Cost

Field Type Description
value int (required) Mana consumed per shot.

Effects

Field Type Description
upgrades.max int (optional, defaults to 1) Maximal amount of upgrade levels applicable to this staff.
upgrades.range_per_level int (optional, defaults to 4) Extra range per Range Upgrade level.
upgrades.cooldown_per_level float (optional, defaults to 0.1) Extra cooldown reduction proportion per Cooldown Upgrade level.
upgrades.siphon_per_level int (optional, defaults to 5) Extra mana gain on kill per Siphon Upgrade level.
upgrades.condenser_interval int (optional, defaults to 50) Ticks to wait to get back 1 mana per Range Upgrade level.
upgrades.storage_per_level float (optional, defaults to 0.15) Extra storage proportion per Storage Upgrade level.

Affinity Aethum

Type: affinity:aethum

Class: AffinityStaffItem

Consumes Affinity's aethum when fired. Damage also varies slightly depending on world aethum levels.

Cost

Field Type Description
value int (required) Mana consumed per shot.

Effects

Field Type Description
aethum_damage_multiplier float (optional, defaults to 0.25) Strength of world aethum damage modification. Effective multiplier will range from (1-x) to (1+x), so setting this to 0 disables damage variation.

Type: feathers:feathers

Class: FeathersStaffItem

Consumes feathers when fired.

Cost

Field Type Description
value int (required) Half Feathers consumed per shot.

Team Reborn Energy

Type: reborncore:energy

Class: RebornEnergyStaffItem

Consumes RebornCore's energy when fired, and stores energy on itself instead of durability.

Cost

Field Type Description
energy int (required) Energy consumed per shot.
energy_transfer_rate int (optional, defaults to 64) Energy transfered from batteries each tick.

Weathering Experience (Caverns & Chasms)

Type: caverns_and_chasms:weathering_experience

Class: WeatheringExperienceStaffItem

Weathering staffs create multiple linked staff representing each oxidation stage, as well as waxed variants.

The following stage names may be used inside of properties, cost, effects and display to override specific values:

  • unaffected
  • exposed
  • weathered
  • oxidized

Any values that is not overridden will continue using the shared values defined for the staff.


Type: caverns_and_chasms:weathering_feathers

Class: WeatheringFeathersStaffItem

Functions identically to Weathering Experience staffs, but consumes feathers instead of experience. Requires both Caverns & Chasms and Feathers to be loaded.

All stage override rules are identical to the experience variant.


Custom staff types

Feel free to look at the built-in types for examples on this.

  1. Make a java mod. This can either be a new one or added to an existing mod.

  2. Import Sortilege with Gradle

repositories {
  maven {
    name = "Modrinth"
    url "https://api.modrinth.com/maven"
  }
}

dependencies {
  modCompileOnly "maven.modrinth:sollib:fabric-1.20.1-1.1"  // SolLib is required for the @Dependency annotation
  modCompileOnly "maven.modrinth:sortilege:9.0"
}
  1. Create an implementation for IStaffEntryReader and for AStaffItem

I personally put the reader directly into the staff subclass.

public class MyCustomStaffItem extends AStaffItem {
    @Dependency(mod = "mymod:mystafftype")
    public static class Reader implements IStaffEntryReader {
        @Override
        public void register(StaffEntry entry, BiConsumer<String, AStaffItem> registrar) {
            registrar.accept(entry.getID(), new MyCustomStaffItem(entry, new Properties()));
        }
    }

    public MyCustomStaffItem(StaffEntry entry, Properties properties) {
        super(entry, properties);
    }

    @Override
    public boolean hasResource(ItemStack stack, Player player) {
        ...
    }

    @Override
    public void consumeResource(ItemStack stack, Player player) {
        ...
    }
}

You can override IStaffEntryReader's methods to read custom data from the staff properties json.

You will also need to implement AStaffItem's hasResource and consumeResource. Don't forget to use getCost(stack, player, originalcost) to get the actual cost of firing your staff, in case effects applies like the Wisdom enchantment.

  1. Register your service

Create a file at resources/META-INF/services/net.lyof.sortilege.item.staff.IStaffEntryReader, and simply paste your reader's full class name in there:

your.mods.package.path.MyCustomStaffItem$Reader

If you have several staff types, put all the readers in the same file, simply have each on its own line.

Clone this wiki locally