By default it will take three seconds to cook an item, but that can easily be changed by adding the cooktime and a new length. Our output can still have multiple items if we'd like. We chance the type to cooking and change from using a table for the recipe to a single item.
To make things cookable, or burnable we also use crafts. A negative value will provide extra uses whereas a positive value will remove uses from the resulting tool.
#Minetest furnace mod
Your mod will also have to depend on default, to be loaded after default is loaded, and to have your additional_wear amount override the value set in default. If you want to change that amount you just need to add the following code in your mod. Minetest_game sets it up in the default mod with -.02 additional_wear which gives a slight gain when combining the tools. This is game wide, so we can't change the amount of wear per tool. Tool repair lets us change how much additional_wear is added or removed when we combine two tools in the crafting grid.
I'd suggest using shapeless crafts as infrequently as possible, but feel free to do as you'd like, just don't say you weren't warned.
#Minetest furnace upgrade
Shapeless crafts can be good for upgrading items, for example in default the wooden chest can be upgrade to a locked chest with an steel ingot. Unfortunately there is no tool to automate this process, and it can be hard to find conflicts. If you are going to use shapeless crafts be careful, and check your recipes to make sure you haven't accidentally made something impossible to craft. If we launch our world we'll discover that we can no longer craft the first node, because it's recipe is two dirt blocks side by side. Nothing much has changed, but any craft recipe that that uses two dirt nodes will now be uncraftable.
Cooking and fuels are also both considered to be crafts, and will be covered at the end of this lesson.īasic crafts always look something like this, We can create crafts that take two of the same tools and merge them into one with less damage. If we want we can make recipes that have no shape, so the player can put the items at any location in the grid and get the output, this has some things to watch out for, which I'll cover in more detail later in the lesson. Using Replacements we can require an item in a recipe, but give it back to the player. Crafts can come in many shapes and sizes, by default the largest we can make is a 3x3 grid. In this lesson we'll be talking all about crafting.