Skip to content

Modifiers (Roots 3)

Description

Controls what spell modifiers are enabled and can be used.

Identifier

The identifier mods.roots.modifiers will be used as the default on this page.

All Identifiers

Any of these can be used to refer to this compat:

groovy
mods.roots.modifiers/* Used as page default */
mods.roots.Modifiers

Adding Entries

  • Enable any disabled modifiers with the given string as a resource location, defaulting to a namespace of roots if not provided:

    groovy
    mods.roots.modifiers.enable(String)
  • Enable the disabled modifier:

    groovy
    mods.roots.modifiers.enable(Modifier)
  • Enable all disabled modifiers for the given spell:

    groovy
    mods.roots.modifiers.enable(SpellBase)
  • Enable any disabled modifiers with the given resource location:

    groovy
    mods.roots.modifiers.enable(ResourceLocation)
  • Enable all disabled modifiers:

    groovy
    mods.roots.modifiers.enableAll()
Example
groovy
mods.roots.modifiers.enable('extended_geas')
mods.roots.modifiers.enable(modifier('roots:weakened_response'))
mods.roots.modifiers.enable(resource('roots:animal_savior'))
mods.roots.modifiers.enableAll()

Removing Entries

  • Disable any enabled modifiers with the given string as a resource location, defaulting to a namespace of roots if not provided:

    groovy
    mods.roots.modifiers.disable(String)
  • Disable the enabled modifier:

    groovy
    mods.roots.modifiers.disable(Modifier)
  • Disable all enabled modifiers for the given spell:

    groovy
    mods.roots.modifiers.disable(SpellBase)
  • Disable any enabled modifiers with the given resource location:

    groovy
    mods.roots.modifiers.disable(ResourceLocation)
  • Disable all enabled modifiers:

    groovy
    mods.roots.modifiers.disableAll()
Example
groovy
mods.roots.modifiers.disable(spell('spell_geas'))
mods.roots.modifiers.disableAll()

Getting the value of entries

  • Iterates through every entry in the registry, with the ability to call remove on any element to remove it:

    groovy
    mods.roots.modifiers.streamRecipes()

Contributors

© 2024 CleanroomMC. All Rights Reserved.