Skip to content

Modifiers (Roots 3)

Description

Controls what spell modifiers are enabled and can be used.

Identifier

Refer to this via any of the following:

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

Adding Entries

  • Enable the disabled modifier:

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

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

    groovy
    mods.roots.modifiers.enable(SpellBase)
  • 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 all disabled modifiers:

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

Removing Entries

  • Disable the enabled modifier:

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

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

    groovy
    mods.roots.modifiers.disable(SpellBase)
  • 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 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

Changelog

© 2024 CleanroomMC. All Rights Reserved.