Ritual (Arcane World)
Description
Converts up to 5 input itemstacks into a wide number of possible effects, including spawning entities, opening a portal to a dungeon dimension to fight a mob, awarding an output itemstack, running commands, and even entirely customized effects.
Identifier
Refer to this via any of the following:
mods.arcaneworld.ritual/* Used as page default */
mods.arcaneworld.Ritual
Adding Recipes
Recipe Builder
Just like other recipe types, the Ritual also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
mods.arcaneworld.ritual.recipeBuilder()
ResourceLocation
. Sets the Resource Location of the recipe.groovyname(String) name(ResourceLocation)
String
. Sets the translation key used to localize the name of the ritual. Requires not null.groovytranslationKey(String)
IngredientList<IIngredient>
. Sets the item inputs of the recipe. Requires greater than or equal to 1 and less than or equal to 5.groovyinput(IIngredient) input(IIngredient...) input(Collection<IIngredient>)
ItemStackList
. Sets the item outputs of the recipe. Requires exactly 1.groovyoutput(ItemStack) output(ItemStack...) output(Collection<ItemStack>)
int
. Sets the amount of time that is passed when the Time Ritual is activated. Requires greater than or equal to 1. (Default0
).groovytime(int)
Class<? extends Entity>
. Sets the entity spawned when the Arena or Summon Rituals are activated. Requires not null.groovyentity(EntityEntry) entity(Class<? extends Entity>)
List<String>
. Sets the commands that will be run when the Command Ritual is activated. Requires not null.groovycommand(String) command(String...) command(List<String>)
Closure<Void>
. Sets the effect that will happen when the Custom Ritual is run, with the Closure taking 4 parameters,World world
,BlockPos blockPos
,EntityPlayer player
, andItemStack... itemStacks
. Requires not null.groovyonActivate(Closure<Void>)
RitualWrapper.RitualType
. Sets the mode of the ritual, different modes will require different values. (DefaultRitualType.CUSTOM
).groovyritualTime() ritualArena() ritualCustom() ritualSummon() ritualCommand() ritualDungeon() ritualWeather() ritualCreateItem() ritualDragonBreath() ritualType(RitualWrapper.RitualType)
RitualWeather.WeatherType
. Sets the type of weather the world will change to when the Weather Ritual is activated. Requires not null.groovyweatherRain() weatherClear() weatherThunder() weatherType(RitualWeather.WeatherType)
First validates the builder, returning
null
and outputting errors to the log file if the validation failed, then registers the builder and returns the registered object. (returnsnull
orparty.lemons.arcaneworld.crafting.ritual.Ritual
).groovyregister()
Example
mods.arcaneworld.ritual.recipeBuilder()
.ritualCreateItem()
.input(item('minecraft:stone') * 5, item('minecraft:diamond'), item('minecraft:clay'))
.output(item('minecraft:clay'))
.translationKey('groovyscript.demo_output')
.name('groovyscript:custom_name')
.register()
mods.arcaneworld.ritual.recipeBuilderArena()
ResourceLocation
. Sets the Resource Location of the recipe.groovyname(String) name(ResourceLocation)
String
. Sets the translation key used to localize the name of the ritual. Requires not null.groovytranslationKey(String)
IngredientList<IIngredient>
. Sets the item inputs of the recipe. Requires greater than or equal to 1 and less than or equal to 5.groovyinput(IIngredient) input(IIngredient...) input(Collection<IIngredient>)
Class<? extends Entity>
. Sets the entity spawned when the Arena or Summon Rituals are activated. Requires not null.groovyentity(EntityEntry) entity(Class<? extends Entity>)
RitualWrapper.RitualType
. Sets the mode of the ritual, different modes will require different values. (DefaultRitualType.ARENA
).groovyritualTime() ritualArena() ritualCustom() ritualSummon() ritualCommand() ritualDungeon() ritualWeather() ritualCreateItem() ritualDragonBreath() ritualType(RitualWrapper.RitualType)
First validates the builder, returning
null
and outputting errors to the log file if the validation failed, then registers the builder and returns the registered object. (returnsnull
orparty.lemons.arcaneworld.crafting.ritual.Ritual
).groovyregister()
Example
mods.arcaneworld.ritual.recipeBuilderArena()
.input(item('minecraft:stone'), item('minecraft:stone'), item('minecraft:clay'))
.translationKey('groovyscript.demo_arena')
.entity(entity('minecraft:chicken'))
.register()
mods.arcaneworld.ritual.recipeBuilderCommand()
ResourceLocation
. Sets the Resource Location of the recipe.groovyname(String) name(ResourceLocation)
String
. Sets the translation key used to localize the name of the ritual. Requires not null.groovytranslationKey(String)
IngredientList<IIngredient>
. Sets the item inputs of the recipe. Requires greater than or equal to 1 and less than or equal to 5.groovyinput(IIngredient) input(IIngredient...) input(Collection<IIngredient>)
List<String>
. Sets the commands that will be run when the Command Ritual is activated. Requires not null.groovycommand(String) command(String...) command(List<String>)
RitualWrapper.RitualType
. Sets the mode of the ritual, different modes will require different values. (DefaultRitualType.COMMAND
).groovyritualTime() ritualArena() ritualCustom() ritualSummon() ritualCommand() ritualDungeon() ritualWeather() ritualCreateItem() ritualDragonBreath() ritualType(RitualWrapper.RitualType)
First validates the builder, returning
null
and outputting errors to the log file if the validation failed, then registers the builder and returns the registered object. (returnsnull
orparty.lemons.arcaneworld.crafting.ritual.Ritual
).groovyregister()
Example
mods.arcaneworld.ritual.recipeBuilderCommand()
.input(item('minecraft:diamond'), item('minecraft:diamond'), item('minecraft:clay'))
.translationKey('groovyscript.demo_command')
.command('say hi',
'give @p minecraft:coal 5')
.register()
mods.arcaneworld.ritual.recipeBuilderCreateItem()
ResourceLocation
. Sets the Resource Location of the recipe.groovyname(String) name(ResourceLocation)
String
. Sets the translation key used to localize the name of the ritual. Requires not null.groovytranslationKey(String)
IngredientList<IIngredient>
. Sets the item inputs of the recipe. Requires greater than or equal to 1 and less than or equal to 5.groovyinput(IIngredient) input(IIngredient...) input(Collection<IIngredient>)
ItemStackList
. Sets the item outputs of the recipe. Requires exactly 1.groovyoutput(ItemStack) output(ItemStack...) output(Collection<ItemStack>)
RitualWrapper.RitualType
. Sets the mode of the ritual, different modes will require different values. (DefaultRitualType.CREATE_ITEM
).groovyritualTime() ritualArena() ritualCustom() ritualSummon() ritualCommand() ritualDungeon() ritualWeather() ritualCreateItem() ritualDragonBreath() ritualType(RitualWrapper.RitualType)
First validates the builder, returning
null
and outputting errors to the log file if the validation failed, then registers the builder and returns the registered object. (returnsnull
orparty.lemons.arcaneworld.crafting.ritual.Ritual
).groovyregister()
Example
mods.arcaneworld.ritual.recipeBuilderCreateItem()
.input(item('minecraft:diamond'), item('minecraft:diamond'), item('minecraft:diamond'))
.translationKey('groovyscript.demo_create_item')
.output(item('minecraft:diamond'))
.register()
mods.arcaneworld.ritual.recipeBuilderCustom()
ResourceLocation
. Sets the Resource Location of the recipe.groovyname(String) name(ResourceLocation)
String
. Sets the translation key used to localize the name of the ritual. Requires not null.groovytranslationKey(String)
IngredientList<IIngredient>
. Sets the item inputs of the recipe. Requires greater than or equal to 1 and less than or equal to 5.groovyinput(IIngredient) input(IIngredient...) input(Collection<IIngredient>)
Closure<Void>
. Sets the effect that will happen when the Custom Ritual is run, with the Closure taking 4 parameters,World world
,BlockPos blockPos
,EntityPlayer player
, andItemStack... itemStacks
. Requires not null.groovyonActivate(Closure<Void>)
RitualWrapper.RitualType
. Sets the mode of the ritual, different modes will require different values. (DefaultRitualType.CUSTOM
).groovyritualTime() ritualArena() ritualCustom() ritualSummon() ritualCommand() ritualDungeon() ritualWeather() ritualCreateItem() ritualDragonBreath() ritualType(RitualWrapper.RitualType)
First validates the builder, returning
null
and outputting errors to the log file if the validation failed, then registers the builder and returns the registered object. (returnsnull
orparty.lemons.arcaneworld.crafting.ritual.Ritual
).groovyregister()
Example
mods.arcaneworld.ritual.recipeBuilderCustom()
.input(item('minecraft:diamond'), item('minecraft:diamond'), item('minecraft:clay'), item('minecraft:clay'))
.translationKey('groovyscript.demo_custom')
.onActivate({ World world, BlockPos blockPos, EntityPlayer player, ItemStack... itemStacks -> { log.info blockPos } })
.register()
mods.arcaneworld.ritual.recipeBuilderDragonBreath()
ResourceLocation
. Sets the Resource Location of the recipe.groovyname(String) name(ResourceLocation)
String
. Sets the translation key used to localize the name of the ritual. Requires not null.groovytranslationKey(String)
IngredientList<IIngredient>
. Sets the item inputs of the recipe. Requires greater than or equal to 1 and less than or equal to 5.groovyinput(IIngredient) input(IIngredient...) input(Collection<IIngredient>)
RitualWrapper.RitualType
. Sets the mode of the ritual, different modes will require different values. (DefaultRitualType.DRAGON_BREATH
).groovyritualTime() ritualArena() ritualCustom() ritualSummon() ritualCommand() ritualDungeon() ritualWeather() ritualCreateItem() ritualDragonBreath() ritualType(RitualWrapper.RitualType)
First validates the builder, returning
null
and outputting errors to the log file if the validation failed, then registers the builder and returns the registered object. (returnsnull
orparty.lemons.arcaneworld.crafting.ritual.Ritual
).groovyregister()
Example
mods.arcaneworld.ritual.recipeBuilderDragonBreath()
.input(item('minecraft:clay'), item('minecraft:clay'), item('minecraft:clay'), item('minecraft:clay'), item('minecraft:clay'))
.translationKey('groovyscript.demo_dragon_breath')
.register()
mods.arcaneworld.ritual.recipeBuilderDungeon()
ResourceLocation
. Sets the Resource Location of the recipe.groovyname(String) name(ResourceLocation)
String
. Sets the translation key used to localize the name of the ritual. Requires not null.groovytranslationKey(String)
IngredientList<IIngredient>
. Sets the item inputs of the recipe. Requires greater than or equal to 1 and less than or equal to 5.groovyinput(IIngredient) input(IIngredient...) input(Collection<IIngredient>)
RitualWrapper.RitualType
. Sets the mode of the ritual, different modes will require different values. (DefaultRitualType.DUNGEON
).groovyritualTime() ritualArena() ritualCustom() ritualSummon() ritualCommand() ritualDungeon() ritualWeather() ritualCreateItem() ritualDragonBreath() ritualType(RitualWrapper.RitualType)
First validates the builder, returning
null
and outputting errors to the log file if the validation failed, then registers the builder and returns the registered object. (returnsnull
orparty.lemons.arcaneworld.crafting.ritual.Ritual
).groovyregister()
Example
mods.arcaneworld.ritual.recipeBuilderDungeon()
.input(item('minecraft:diamond'), item('minecraft:clay'), item('minecraft:clay'))
.translationKey('groovyscript.demo_dungeon')
.register()
mods.arcaneworld.ritual.recipeBuilderSummon()
ResourceLocation
. Sets the Resource Location of the recipe.groovyname(String) name(ResourceLocation)
String
. Sets the translation key used to localize the name of the ritual. Requires not null.groovytranslationKey(String)
IngredientList<IIngredient>
. Sets the item inputs of the recipe. Requires greater than or equal to 1 and less than or equal to 5.groovyinput(IIngredient) input(IIngredient...) input(Collection<IIngredient>)
Class<? extends Entity>
. Sets the entity spawned when the Arena or Summon Rituals are activated. Requires not null.groovyentity(EntityEntry) entity(Class<? extends Entity>)
RitualWrapper.RitualType
. Sets the mode of the ritual, different modes will require different values. (DefaultRitualType.SUMMON
).groovyritualTime() ritualArena() ritualCustom() ritualSummon() ritualCommand() ritualDungeon() ritualWeather() ritualCreateItem() ritualDragonBreath() ritualType(RitualWrapper.RitualType)
First validates the builder, returning
null
and outputting errors to the log file if the validation failed, then registers the builder and returns the registered object. (returnsnull
orparty.lemons.arcaneworld.crafting.ritual.Ritual
).groovyregister()
Example
mods.arcaneworld.ritual.recipeBuilderSummon()
.input(item('minecraft:stone'), item('minecraft:clay'), item('minecraft:clay'))
.translationKey('groovyscript.demo_summon')
.entity(entity('minecraft:chicken'))
.register()
mods.arcaneworld.ritual.recipeBuilderTime()
ResourceLocation
. Sets the Resource Location of the recipe.groovyname(String) name(ResourceLocation)
String
. Sets the translation key used to localize the name of the ritual. Requires not null.groovytranslationKey(String)
IngredientList<IIngredient>
. Sets the item inputs of the recipe. Requires greater than or equal to 1 and less than or equal to 5.groovyinput(IIngredient) input(IIngredient...) input(Collection<IIngredient>)
int
. Sets the amount of time that is passed when the Time Ritual is activated. Requires greater than or equal to 1. (Default0
).groovytime(int)
RitualWrapper.RitualType
. Sets the mode of the ritual, different modes will require different values. (DefaultRitualType.TIME
).groovyritualTime() ritualArena() ritualCustom() ritualSummon() ritualCommand() ritualDungeon() ritualWeather() ritualCreateItem() ritualDragonBreath() ritualType(RitualWrapper.RitualType)
First validates the builder, returning
null
and outputting errors to the log file if the validation failed, then registers the builder and returns the registered object. (returnsnull
orparty.lemons.arcaneworld.crafting.ritual.Ritual
).groovyregister()
Example
mods.arcaneworld.ritual.recipeBuilderTime()
.input(item('minecraft:diamond'), item('minecraft:clay'), item('minecraft:clay'), item('minecraft:clay'))
.translationKey('groovyscript.demo_time')
.time(5000)
.register()
mods.arcaneworld.ritual.recipeBuilderWeather()
ResourceLocation
. Sets the Resource Location of the recipe.groovyname(String) name(ResourceLocation)
String
. Sets the translation key used to localize the name of the ritual. Requires not null.groovytranslationKey(String)
IngredientList<IIngredient>
. Sets the item inputs of the recipe. Requires greater than or equal to 1 and less than or equal to 5.groovyinput(IIngredient) input(IIngredient...) input(Collection<IIngredient>)
RitualWrapper.RitualType
. Sets the mode of the ritual, different modes will require different values. (DefaultRitualType.WEATHER
).groovyritualTime() ritualArena() ritualCustom() ritualSummon() ritualCommand() ritualDungeon() ritualWeather() ritualCreateItem() ritualDragonBreath() ritualType(RitualWrapper.RitualType)
RitualWeather.WeatherType
. Sets the type of weather the world will change to when the Weather Ritual is activated. Requires not null.groovyweatherRain() weatherClear() weatherThunder() weatherType(RitualWeather.WeatherType)
First validates the builder, returning
null
and outputting errors to the log file if the validation failed, then registers the builder and returns the registered object. (returnsnull
orparty.lemons.arcaneworld.crafting.ritual.Ritual
).groovyregister()
Example
mods.arcaneworld.ritual.recipeBuilderWeather()
.input(item('minecraft:diamond'), item('minecraft:gold_ingot'), item('minecraft:clay'))
.translationKey('groovyscript.demo_weather_clear')
.weatherClear()
.register()
mods.arcaneworld.ritual.recipeBuilderWeather()
.input(item('minecraft:gold_ingot'), item('minecraft:diamond'), item('minecraft:clay'))
.translationKey('groovyscript.demo_weather_rain')
.weatherRain()
.register()
mods.arcaneworld.ritual.recipeBuilderWeather()
.input(item('minecraft:diamond'), item('minecraft:diamond'), item('minecraft:gold_ingot'))
.translationKey('groovyscript.demo_weather_thunder')
.weatherThunder()
.register()
Removing Recipes
Removes all recipes that match the given input:
groovymods.arcaneworld.ritual.removeByInput(IIngredient)
Removes all recipes that match the given output:
groovymods.arcaneworld.ritual.removeByOutput(IIngredient)
Removes all registered recipes:
groovymods.arcaneworld.ritual.removeAll()
Example
mods.arcaneworld.ritual.removeByInput(item('minecraft:gold_nugget'))
mods.arcaneworld.ritual.removeByOutput(item('arcaneworld:biome_crystal'))
mods.arcaneworld.ritual.removeAll()
Getting the value of recipes
Iterates through every entry in the registry, with the ability to call remove on any element to remove it:
groovymods.arcaneworld.ritual.streamRecipes()