Skip to content

Mill Stone (Better With Mods)

Description

Converts input itemstacks into output itemstacks after being ground via rotation power for a given time.

Identifier

Refer to this via any of the following:

groovy
mods.betterwithmods.mill_stone/* Used as page default */
mods.betterwithmods.millstone
mods.betterwithmods.millStone
mods.betterwithmods.MillStone
mods.betterwithmods.mill
mods.betterwithmods.Mill

Adding Recipes

Recipe Builder

Just like other recipe types, the Mill Stone also uses a recipe builder.

Don't know what a builder is? Check the builder info page out.

mods.betterwithmods.mill_stone.recipeBuilder()
  • IngredientList<IIngredient>. Sets the item inputs of the recipe. Requires greater than or equal to 1 and less than or equal to 3.

    groovy
    input(IIngredient)
    input(IIngredient...)
    input(Collection<IIngredient>)
  • ItemStackList. Sets the item outputs of the recipe. Requires greater than or equal to 1 and less than or equal to 3.

    groovy
    output(ItemStack)
    output(ItemStack...)
    output(Collection<ItemStack>)
  • int. Sets the time in ticks the recipe takes to complete. Requires greater than or equal to 1. (Default 1).

    groovy
    time(int)
    ticks(int)
  • int. Sets the priority of the recipe in relation to other valid recipes for the given items. (Default 1).

    groovy
    priority(int)
  • SoundEvent. Sets what sound is played by the mill during the recipe.

    groovy
    soundEvent(SoundEvent)
  • 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. (returns null or betterwithmods.common.registry.bulk.recipes.MillRecipe).

    groovy
    register()
Example
groovy
mods.betterwithmods.mill_stone.recipeBuilder()
    .input(item('minecraft:diamond'))
    .output(item('minecraft:gold_ingot') * 16)
    .register()

mods.betterwithmods.mill_stone.recipeBuilder()
    .input(item('minecraft:diamond_block'))
    .output(item('minecraft:gold_ingot'), item('minecraft:gold_block'), item('minecraft:clay'))
    .register()

Removing Recipes

  • Removes all recipes that match the given input:

    groovy
    mods.betterwithmods.mill_stone.removeByInput(IIngredient)
  • Removes all recipes that match the given output:

    groovy
    mods.betterwithmods.mill_stone.removeByOutput(IIngredient)
  • Removes all registered recipes:

    groovy
    mods.betterwithmods.mill_stone.removeAll()
Example
groovy
mods.betterwithmods.mill_stone.removeByInput(item('minecraft:netherrack'))
mods.betterwithmods.mill_stone.removeByOutput(item('minecraft:blaze_powder'))
mods.betterwithmods.mill_stone.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:

    groovy
    mods.betterwithmods.mill_stone.streamRecipes()

© 2024 CleanroomMC. All Rights Reserved.