Draylar / fabric-furnaces

A tiered Furnace mod for the Fabric mod loader.
https://minecraft.curseforge.com/projects/fabric-furnaces
MIT License
8 stars 14 forks source link

Build error in BaseFurnaceEntity #27

Closed Pyroglyph closed 3 years ago

Pyroglyph commented 3 years ago

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.

Draylar commented 3 years ago

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.