Creators-of-Create / Create

[Forge Mod] Building Tools and Aesthetic Technology
MIT License
2.71k stars 872 forks source link

Adding Mechanical Pressing recipes for Embers plates/sheets leads to crashes #6529

Closed Shados closed 1 month ago

Shados commented 1 month ago

Describe the Bug

I've been working on a 1.20.1 pack involving both Create and Embers Rekindled. Embers adds several forge:plates-type items. I used some data pack entries like the below to add mechanical presser recipes for these:

{
  "type": "create:pressing",
  "ingredients": [
    {
      "tag": "forge:ingots/dawnstone"
    }
  ],
  "results": [
    {
      "item": "embers:dawnstone_sheet"
    }
  ]
}

However, the resulting recipes have a blank output in JEI: dreamlogic-2024-05-25-22:00:15

And when attempting to actually use the recipe, it results in a crash.

Using other Embers items as outputs for create:pressing recipes works just fine, this appears to only affect the sheet/plate items.

Reproduction Steps

  1. Add data pack with create:pressing recipes with one of Embers plate/sheet items as output.
  2. Look up recipes for the output item in JEI, note that no mechanical presser recipe is shown for it.
  3. Look up 'uses for' recipes for the input item in JEI, note that a mechanical presser recipe shows up with no output item listed.
  4. Set up a mechanical presser and run the input item through it, note that the game crashes.

Expected Result

The recipe should show up for the output item in JEI, and using it should actually work instead of outright crashing.

Screenshots and Videos

No response

Crash Report or Log

https://gist.github.com/Shados/4ebcb5d3ca279a181ae88eda1fe2a8ba

Operating System

Linux (NixOS 24.05)

Mod Version

0.5.1f

Minecraft Version

1.20.1

Forge Version

47.2.32

Other Mods

I reproduced the issue with a minimal set of mods:

Additional Context

No response

VoidLeech commented 1 month ago

The embers plates are called {metal}_plate, not sheet (as in Create). The recipe should probably fail to parse entirely if an item doesn't exist instead of allowing a typo to go through as air. (Suggested in #6526) I'm assuming that's what's allowing the null check on heldItem to be bypassed.

The crash itself seems to be a duplicate of #6053, though with different cause as their recipe actually produced outputs; but also only sometimes (according to the TerraFirmaGreg report).

Shados commented 1 month ago

The embers plates are called {metal}_plate, not sheet (as in Create).

Ah, so they are. This is why I shouldn't be doing pack dev near midnight :facepalm:. And yes, would definitely be nicer if it'd failed to parse instead of generating a malformed recipe.

Attack8 commented 1 month ago

this issue can be closed since it is user error