Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mechanical Crafter deletes items and crashes the game when a recipe returns air #938

Closed
object-Object opened this issue May 28, 2023 · 1 comment
Labels
type: bug Issue where something isn't working

Comments

@object-Object
Copy link

Describe the Bug

When a valid recipe (ie. one where the inputs match) which returns air is put into the Mechanical Crafter, it deletes the input items and, if a container is connected to the output, the game crashes.

I encountered this bug when using CraftTweaker's recipe functions feature to conditionally allow a recipe to be crafted or not based on the NBT of the inputs, but it would probably be triggered by any recipe added by a mod or datapack which returns air.

Reproduction Steps

  1. Install Create and CraftTweaker.
  2. Add the following script to a file (eg. air.zs) in .minecraft/scripts:
    craftingTable.addShapeless("returns_air", <item:minecraft:air>, [<item:minecraft:dirt>], null);
  3. Start the game and put a dirt block into a single Mechanical Crafter to craft the recipe. Add a chest to the output if you want to see the crash.

Expected Result

The recipe should be treated like any other invalid recipe, ie. the inputs should pop out of the crafter.

Screenshots and Videos

2023-05-28_02-55-26.mp4

Note: the issue also happens with larger/shaped recipes, this was just the most minimal example I could come up with.

Crash Report or Log

https://mclo.gs/rsJiQkq

Operating System

Windows 11

Mod Version

0.5.0i

Minecraft Version

1.19.2

Other Mods

Fabric API 0.76.0+1.19.2
CraftTweaker 10.1.44
Ingredient Extension API 3.0.6

Additional Context

Here's the actual CraftTweaker script where I discovered this issue: merge_phials.zs. Note that unlike the above example, it doesn't always return air; it's conditional based on the inputs.

@IThundxr IThundxr added type: bug Issue where something isn't working and removed 1.19 labels Sep 18, 2024
@IThundxr
Copy link
Member

Appears to have already been fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Issue where something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants