tutorial:cooking_recipe_type
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
tutorial:cooking_recipe_type [2020/12/18 17:15] – ↷ Page moved from cooking_recipe_type to tutorial:cooking_recipe_type legorel | tutorial:cooking_recipe_type [2022/02/07 12:40] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 3: | Line 3: | ||
====== Creating a custom cooking recipe type ====== | ====== Creating a custom cooking recipe type ====== | ||
- | Creating a cooking recipe type is just like creating a custom recipe type with extra steps. Vanilla minecraft | + | Creating a cooking recipe type is just like creating a custom recipe type with extra steps. |
- | If it is your first time creating a container block you should go check this tutorial before: | + | Vanilla minecraft abstracts classes for furnaces and cooking recipe |
+ | If it is your first time creating a container block, you should go check this tutorial before: | ||
The final result of this tutorial can be found here: https:// | The final result of this tutorial can be found here: https:// | ||
===== Adding the Block and BlockEntity===== | ===== Adding the Block and BlockEntity===== | ||
- | First we need or furnace, for this our class will extends '' | + | First we need our furnace, for this our class will extends '' |
<code java TestFurnace.java> | <code java TestFurnace.java> | ||
Line 124: | Line 125: | ||
===== Creating the recipe serializer ===== | ===== Creating the recipe serializer ===== | ||
- | This is where it get different from a normal recipe type, you can make your own serializer if your furnace works differently from vanilla one or just register a new '' | + | This is where it gets different from a normal recipe type, you can make your own serializer if your furnace works differently from vanilla one or just register a new '' |
<code java CookingRecipeExample.java> | <code java CookingRecipeExample.java> | ||
Line 133: | Line 134: | ||
static { | static { | ||
[...] | [...] | ||
- | TEST_RECIPE_SERIALIZER = Registry.register(Registry.RECIPE_SERIALIZER, | + | TEST_RECIPE_SERIALIZER = Registry.register(Registry.RECIPE_SERIALIZER, |
- | | + | |
} | } | ||
} | } | ||
</ | </ | ||
- | There is just one problem, '' | + | There is just one problem, '' |
Line 235: | Line 235: | ||
===== Adding a recipe ===== | ===== Adding a recipe ===== | ||
Now it is the time to test our recipe type, before continuing you should make sure that every class we created is imported in the classes where they are used. | Now it is the time to test our recipe type, before continuing you should make sure that every class we created is imported in the classes where they are used. | ||
- | To create our recipe we can follow the official way: https:// | + | To create our recipe we simply |
Recipe path: .../ | Recipe path: .../ | ||
Line 254: | Line 254: | ||
===== Next step ===== | ===== Next step ===== | ||
- | We have our recipe type, our furnace, but no textures for our block. You can learn how to add visuals to your block here : https:// | + | We have our recipe type, our furnace, but no textures for our block. You can learn how to add visuals to your block here : [[tutorial: |
- | But don't forget that we extended '' | + | But don't forget that we extended '' |
Just in case, i'll put the furnace blockstates file as an example: | Just in case, i'll put the furnace blockstates file as an example: |
tutorial/cooking_recipe_type.txt · Last modified: 2022/02/07 12:40 by 127.0.0.1