Inserting a non-printable item into a printer crashes the game.
VoidLeech opened this issue ยท 3 comments
Minecraft Version
1.20.1
Describe the Bug
Reported in the Create discord:
https://discord.com/channels/620934202875183104/689866656914210897/1235653717240578110
Attempting to insert a non-printable item, using automatic item transport, into a printer crashes the game.
Crashes with:
- chutes
- funnels
- hoppers
- (that seems to be it for vanilla+create, but I imagine that other mods that add item-transport features break as well)
Reproduction Steps
- Place printer
- Place chute on top of printer
- Insert a non-printable item into the chute (say, an experience nugget, or a stripped oak log)
- Crash
Expected Result
No crash
Screenshots and Videos
No response
Crash Report or Log
Other Mods
Reproducible with just Create and CEI.
Mod Version
1.2.9.c
Forge Version
47.2.0
I believe it's a bug of Create itself. The Chute does not check inserting avaliability before insertion.
I'll do a temporary fix.
Neither does the hopper (as mentioned before), here's a log:
https://mclo.gs/RRbnydj
I think this solution will just work, but the real issue is probably in
There is a null check for entry, but no early return, so you set printEntry to null regardless, which is then directly used in
tooExpensive = Printing.isTooExpensive(...)
matchPrintEntry should probably return a bool, or Printing.isTooExpensive should check for null