Accessory (Aether Legacy)
Description
The Aether Accessory system.
Identifier
Refer to this via any of the following:
mods.aether_legacy.accessory/* Used as page default */
mods.aether_legacy.Accessory
mods.aether.accessory
mods.aether.Accessory
Adding Recipes
Adds an Accessory in the format
item
,type
, where type is one of the following: "Ring", "Pendant", "Cape", "Shield", "Glove", or "Misc".:groovymods.aether_legacy.accessory.add(ItemStack, String)
Recipe Builder
Just like other recipe types, the Accessory also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
mods.aether_legacy.accessory.recipeBuilder()
IngredientList<IIngredient>
. Sets the item inputs of the recipe. Requires exactly 1.groovyinput(IIngredient) input(IIngredient...) input(Collection<IIngredient>)
AccessoryType
. Sets the type of accessory the item is, which controls what slot it can go into.groovyaccessoryType(String) accessoryType(AccessoryType)
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
orcom.gildedgames.the_aether.api.accessories.AetherAccessory
).groovyregister()
Example
mods.aether_legacy.accessory.recipeBuilder()
.input(item('minecraft:shield'))
.accessoryType('shield')
.register()
Removing Recipes
Removes all recipes that match the given input:
groovymods.aether_legacy.accessory.removeByInput(IIngredient)
Removes all registered recipes:
groovymods.aether_legacy.accessory.removeAll()
Example
mods.aether_legacy.accessory.removeByInput(item('aether_legacy:iron_pendant'))
mods.aether_legacy.accessory.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.aether_legacy.accessory.streamRecipes()