Iron Jetpacks

Iron Jetpacks

50M Downloads

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

andriihorpenko opened this issue ยท 0 comments

commented

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

var recipe = (JetpackUpgradeRecipe) RecipeSerializer.SHAPED_RECIPE.fromJson(recipeId, json);

Branch 1.19
var recipe = RecipeSerializer.SHAPED_RECIPE.fromJson(recipeId, json);

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):

  • Minecraft: 1.20.1
  • Forge: NeoForge 47.1.106
  • Cucumber: 7.0.8
  • Iron Jetpacks: 7.0.5
  • Singleplayer or Multiplayer: Both