Skip to content

Fortune (Bewitchment)

Description

Modifies potential Fortunes, with a random one being selected from the list when interacting with a Crystal Ball. Some amount of time will pass before the Fortune occurs, whereupon a customizable effect will happen.

Identifier

Refer to this via any of the following:

groovy
mods.bewitchment.fortune/* Used as page default */
mods.bewitchment.Fortune

Adding Entries

  • Adds the recipe:

    groovy
    mods.bewitchment.fortune.add(Fortune)

Removing Entries

  • Removes the recipe with the given Resource Location:

    groovy
    mods.bewitchment.fortune.remove(ResourceLocation)
  • Removes the recipe with the given String as its Resource Location:

    groovy
    mods.bewitchment.fortune.remove(String)
  • Removes the recipe:

    groovy
    mods.bewitchment.fortune.remove(Fortune)
  • Removes all registered recipes:

    groovy
    mods.bewitchment.fortune.removeAll()
Example
groovy
mods.bewitchment.fortune.remove(resource('bewitchment:cornucopia'))
mods.bewitchment.fortune.removeAll()

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.bewitchment.fortune.streamRecipes()

Contributors

© 2024 CleanroomMC. All Rights Reserved.