BlakeBr0 / IronJetpacks

Adds fully customizable FE powered jetpacks!
https://blakesmods.com/iron-jetpacks
MIT License
13 stars 21 forks source link

`ShapedRecipe` cannot be cast to class `JetpackUpgradeRecipe` exception #96

Closed andriihorpenko closed 2 months ago

andriihorpenko commented 2 months ago

Describe the bug Seems like during porting to 1.19.4 onwards, the ShapedRecipe was accidentally cast to JetpackUpgradeRecipe, while it should not as the instance of JetpackUpgradeRecipe is created right below. This prevents of creating custom jetpack upgrade recipes.

Branch 1.20 https://github.com/BlakeBr0/IronJetpacks/blob/f51e93c9ffca6c564ed45b2376c74da4302b0200/src/main/java/com/blakebr0/ironjetpacks/crafting/recipe/JetpackUpgradeRecipe.java#L57 Branch 1.19 https://github.com/BlakeBr0/IronJetpacks/blob/98fb0d124eda969690bdd8d4369cf41b38dca7be/src/main/java/com/blakebr0/ironjetpacks/crafting/recipe/JetpackUpgradeRecipe.java#L52

To Reproduce Create a shaped recipe with ironjetpacks:crafting_jetpack_upgrade type via datapack or KubeJS.

Expected behavior Don't cast to JetpackUpgradeRecipe as its instance is created right below.

Screenshots / Scripts / Logs https://bytebin.lucko.me/VH2CJmbZWJ

Versions (please complete the following information):