Amadron (PneumaticCraft: Repressurized)
Description
Uses an Amadron Tablet and linked inventories in world to trade via drones.
Warning
Amadron recipes added or removed via GroovyScript will be saved to a config file in config/pneumaticcraft/
, meaning changes made may persist unexpectedly through restarts.
Identifier
Refer to this via any of the following:
mods.pneumaticcraft.amadron/* Used as page default */
mods.pneumaticcraft.Amadron
Adding Recipes
Recipe Builder
Just like other recipe types, the Amadron also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
mods.pneumaticcraft.amadron.recipeBuilder()
IngredientList<IIngredient>
. Sets the item inputs of the recipe. Requires greater than or equal to 0 and less than or equal to 1.groovyinput(IIngredient) input(IIngredient...) input(Collection<IIngredient>)
FluidStackList
. Sets the fluid inputs of the recipe. Requires greater than or equal to 0 and less than or equal to 1.groovyfluidInput(FluidStack) fluidInput(FluidStack...) fluidInput(Collection<FluidStack>)
ItemStackList
. Sets the item outputs of the recipe. Requires greater than or equal to 0 and less than or equal to 1.groovyoutput(ItemStack) output(ItemStack...) output(Collection<ItemStack>)
FluidStackList
. Sets the fluid outputs of the recipe. Requires greater than or equal to 0 and less than or equal to 1.groovyfluidOutput(FluidStack) fluidOutput(FluidStack...) fluidOutput(Collection<FluidStack>)
boolean
. Sets if the Amadron recipe is periodic. (Defaultfalse
).groovyperiodic() periodic(boolean)
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
orme.desht.pneumaticcraft.common.recipes.AmadronOffer
).groovyregister()
Example
mods.pneumaticcraft.amadron.recipeBuilder()
.input(item('minecraft:clay') * 3)
.output(item('minecraft:gold_ingot'))
.register()
mods.pneumaticcraft.amadron.recipeBuilder()
.fluidInput(fluid('water') * 50)
.output(item('minecraft:clay') * 3)
.register()
mods.pneumaticcraft.amadron.recipeBuilder()
.fluidInput(fluid('water') * 50)
.fluidOutput(fluid('lava') * 10)
.periodic()
.register()
Removing Recipes
Removes all recipes that match the given input:
groovymods.pneumaticcraft.amadron.removeByInput(IIngredient)
Removes all recipes that match the given output:
groovymods.pneumaticcraft.amadron.removeByOutput(IIngredient)
Removes all registered recipes:
groovymods.pneumaticcraft.amadron.removeAll()
Removes all periodic recipes:
groovymods.pneumaticcraft.amadron.removeAllPeriodic()
Removes all static recipes:
groovymods.pneumaticcraft.amadron.removeAllStatic()
Example
mods.pneumaticcraft.amadron.removeByInput(item('minecraft:rotten_flesh'))
mods.pneumaticcraft.amadron.removeByOutput(item('minecraft:emerald'))
mods.pneumaticcraft.amadron.removeAll()
mods.pneumaticcraft.amadron.removeAllPeriodic()
mods.pneumaticcraft.amadron.removeAllStatic()
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.pneumaticcraft.amadron.streamRecipes()