User Tools

Site Tools


tutorial:cooking_recipe_type

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
tutorial:cooking_recipe_type [2020/12/18 17:20] – Fabric's link are now internal links legoreltutorial:cooking_recipe_type [2021/01/26 12:55] ytg1234
Line 124: Line 124:
 ===== 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 ''CookingRecipeSerializer'' to save some code :+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 ''CookingRecipeSerializer'' to save some code :
  
 <code java CookingRecipeExample.java> <code java CookingRecipeExample.java>
Line 133: Line 133:
     static {     static {
         [...]         [...]
-        TEST_RECIPE_SERIALIZER = Registry.register(Registry.RECIPE_SERIALIZER, new Identifier(MOD_ID, "test_furnace"), new CookingRecipeSerializer(TestRecipe::new, 200)); +        TEST_RECIPE_SERIALIZER = Registry.register(Registry.RECIPE_SERIALIZER, new Identifier(MODID, "test_furnace"), new CookingRecipeSerializer<>(TestRecipe::new, 200));
-        +
     }     }
 } }
tutorial/cooking_recipe_type.txt · Last modified: 2022/02/07 12:40 by 127.0.0.1