Fabric-Tutorial-1.20.X icon indicating copy to clipboard operation
Fabric-Tutorial-1.20.X copied to clipboard

Issue with ModRecipeProvider class with 1.20.4

Open GrimPlayzs opened this issue 1 year ago • 1 comments

I been following this tutorial with no issues on 1.20.4 until the ModRecipeProvider class where the import net.minecraft.data.server.recipe.RecipeJsonProvider cannot be resolved. Along with the issue where the type ModRecipeProvider must implement the inherited abstract method error. I tried looking up these errors online but no good results. I suspected something must of changed in the APIs following 1.20.4 but can't be sure.

GrimPlayzs avatar Dec 14 '23 18:12 GrimPlayzs

1.20.2 was the push to codecs, and 1.20.3 onwards lack some classes used in the video, most notably RecipeJsonProvider and RecipeCodecs. Codecs stored in RecipeCodecs such as CRAFTING_RESULT were moved to other classes, such as ItemStack.RECIPE_RESULT_CODEC

Edit: Here is my possibly successful implementation, currently can't check as updating from 1.20.1 to 1.20.4 requires fairly large refactors for me.

naomieow avatar Dec 16 '23 21:12 naomieow