Hopper Filters (Better With Mods)
Description
Items placed in the middle slot of the Filtered Hopper to restrict what is capable of passing through.
Identifier
The identifier mods.betterwithmods.hopper_filters will be used as the default on this page.
All Identifiers
Any of these can be used to refer to this compat:
mods.betterwithmods.hopperfilters
mods.betterwithmods.hopperFilters
mods.betterwithmods.HopperFilters
mods.betterwithmods.hopper_filters/* Used as page default */Adding Recipes
Recipe Builder
Just like other recipe types, the Hopper Filters 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.betterwithmods.hopper_filters.recipeBuilder()
IngredientList<IIngredient>. Sets the valid items allowed through the filter. Requires greater than or equal to 0.groovyinput(IIngredient) input(IIngredient...) input(Collection<IIngredient>)IIngredient. Sets the filter itemstack. Requires not null.groovyfilter(IIngredient)
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. (returnsnullorbetterwithmods.api.tile.IHopperFilter).groovyregister()
Example
mods.betterwithmods.hopper_filters.recipeBuilder()
.name('too_weak_to_stop')
.filter(item('minecraft:string'))
.register()
mods.betterwithmods.hopper_filters.recipeBuilder()
.name('groovyscript:clay_only')
.filter(item('minecraft:clay'))
.input(item('minecraft:clay'))
.register()Removing Recipes
Removes the filter with the given name:
groovymods.betterwithmods.hopper_filters.removeByName(String)Removes all filters with the given filter item:
groovymods.betterwithmods.hopper_filters.removeByFilter(IIngredient)Removes all filters with the given items allowed through the filter:
groovymods.betterwithmods.hopper_filters.removeByFiltered(IIngredient)Removes all registered recipes:
groovymods.betterwithmods.hopper_filters.removeAll()
Example
mods.betterwithmods.hopper_filters.removeByName('betterwithmods:ladder')
mods.betterwithmods.hopper_filters.removeByFilter(item('minecraft:trapdoor'))
mods.betterwithmods.hopper_filters.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.betterwithmods.hopper_filters.streamRecipes()
