Straw (Industrial Foregoing)
Description
Converts an fluid block in-world into various effects for the player when consumed via a straw.
Identifier
Refer to this via any of the following:
mods.industrialforegoing.straw/* Used as page default */
mods.industrialforegoing.StrawAdding Recipes
Adds a Straw recipe in the format
fluidInput,effect:groovymods.industrialforegoing.straw.add(FluidStack, Collection<PotionEffect>)Adds a Straw recipe in the format
name,fluidInput,effect:groovymods.industrialforegoing.straw.add(String, FluidStack, Collection<PotionEffect>)Adds the recipe:
groovymods.industrialforegoing.straw.add(StrawHandler)
Recipe Builder
Just like other recipe types, the Straw also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
Recipe Builder
Create the Recipe Builder.
groovymods.industrialforegoing.straw.recipeBuilder()
ResourceLocation. Sets the Resource Location of the recipe.groovyname(String) name(ResourceLocation)FluidStackList. Sets the fluid inputs of the recipe. Requires exactly 1.groovyfluidInput(FluidStack) fluidInput(FluidStack...) fluidInput(Collection<FluidStack>)Collection<PotionEffect>. Sets what potion effects are given upon consuming the fluid. Requires greater than or equal to 1.groovyeffect(PotionEffect) effect(PotionEffect...) effect(Collection<PotionEffect>)
First validates the builder, returning
nulland outputting errors to the log file if the validation failed, then registers the builder and returns the registered object. (returnsnullorcom.buuz135.industrial.api.straw.StrawHandler).groovyregister()
Example
mods.industrialforegoing.straw.recipeBuilder()
.fluidInput(fluid('if.pink_slime'))
.effect(new PotionEffect(potion('minecraft:strength'), 1800, 3))
.register()Removing Recipes
Removes the recipe with the given Resource Location:
groovymods.industrialforegoing.straw.remove(ResourceLocation)Removes the recipe with the given String as its Resource Location:
groovymods.industrialforegoing.straw.remove(String)Removes the recipe:
groovymods.industrialforegoing.straw.remove(StrawHandler)Removes all registered recipes:
groovymods.industrialforegoing.straw.removeAll()
Example
mods.industrialforegoing.straw.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.industrialforegoing.straw.streamRecipes()
