Turntable (Better With Mods)
Description
Converts a block into an output block and up to two itemstacks after being powered via rotation power.
Identifier
Refer to this via any of the following:
mods.betterwithmods.turntable/* Used as page default */
mods.betterwithmods.Turntable
Adding Recipes
Add the given recipe to the recipe list:
groovymods.betterwithmods.turntable.add(TurntableRecipe)
Recipe Builder
Just like other recipe types, the Turntable also uses a recipe builder.
Don't know what a builder is? Check the builder info page out.
mods.betterwithmods.turntable.recipeBuilder()
ItemStackList
. Sets the item outputs of the recipe. Requires greater than or equal to 0 and less than or equal to 2.groovyoutput(ItemStack) output(ItemStack...) output(Collection<ItemStack>)
BlockIngredient
. Sets the input block.groovyinput(String) input(IIngredient) input(ItemStack...) input(IIngredient...) input(BlockIngredient) input(List<ItemStack>) input(Collection<IIngredient>)
int
. Sets the number of rotations required to complete the recipe. (Default1
).groovyrotations(int)
IBlockState
. Sets the blockstate that replaces the input block. (DefaultBlocks.AIR.getDefaultState()
).groovyoutputBlock(IBlockState)
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
orbetterwithmods.common.registry.block.recipe.TurntableRecipe
).groovyregister()
Example
mods.betterwithmods.turntable.recipeBuilder()
.input(item('minecraft:gold_block'))
.outputBlock(blockstate('minecraft:clay'))
.output(item('minecraft:gold_ingot') * 5)
.rotations(5)
.register()
mods.betterwithmods.turntable.recipeBuilder()
.input(item('minecraft:clay'))
.output(item('minecraft:gold_ingot'))
.rotations(2)
.register()
Removing Recipes
Removes the given recipe from the recipe list:
groovymods.betterwithmods.turntable.remove(TurntableRecipe)
Removes all recipes that match the given input:
groovymods.betterwithmods.turntable.removeByInput(IIngredient)
Removes all recipes that match the given output:
groovymods.betterwithmods.turntable.removeByOutput(IIngredient)
Removes all registered recipes:
groovymods.betterwithmods.turntable.removeAll()
Example
mods.betterwithmods.turntable.removeByInput(item('betterwithmods:unfired_pottery'))
mods.betterwithmods.turntable.removeByOutput(item('minecraft:clay_ball'))
mods.betterwithmods.turntable.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.turntable.streamRecipes()