Fabric Furnaces

Fabric Furnaces

2M Downloads

Build error in BaseFurnaceEntity

Pyroglyph opened this issue ยท 1 comments

commented

A couple of these errors happen when I try to build the project from source:
The method getFirstMatch(RecipeType<T>, C, World) in the type RecipeManager is not applicable for the arguments (RecipeType<capture#4-of ? extends SmeltingRecipe>, BaseFurnaceEntity, World)
One is one line 211, and the other is on line 319.
I haven't touched any files before attempting to build.
My Java version is OpenJDK 11, if that makes a difference.

I've messed around with it a little and found that casting this.recipe to RecipeType<SmeltingRecipe> causes the build to succeed, and the furnaces seem to work as expected in-game. I'd make PR, but I'm not sure if there are any repercussions of casting it in such a way.

commented

Hmm, might just be a quirk related to your Java version or something. I just pushed a commit where I changed the wildcard to <SmeltingRecipe>, which should fix the issue for you. Guessing the wildcard was a decompilation artifact because the parameter passed into the furnace BE is already RecipeType<SmeltingRecipe>. Feel free to re-open the issue if you still encounter this problem after pulling my latest commit.