![Stockpile](https://media.forgecdn.net/avatars/thumbnails/164/904/256/256/636689357071663390.png)
Crash when placing Stockpile barrel next to a UC Conveyor
falkreon opened this issue ยท 2 comments
Sorry to put this on your plate, I know you're busy, but we got a crash log that points here.
The Crash
https://paste.ee/p/Jt3Q9
Forwarding this issue from CottonMC/UnitedConveyors#2 after careful study of the crashlogs and circumstances.
Steps to Reproduce
Place a barrel in front of a United Conveyors conveyor. The crash happens immediately.
Why it Happens
The front face of a United Conveyors conveyor is an EmptyItemExtractable.SUPPLIER
. This exists to tell inspectors, "This face of the block pushes items out of it, but can't be extracted from, and may not have an internal inventory at all." It will always return ItemStack.EMPTY
on an extraction attempt.
FixedMassItemInv.attemptAnyExtraction
appears to test this empty ItemStack against a ConstantItemFilter, which crashes the game per LBA's rules for that filter.
Next Steps
I'm closing the issue over at my end, but I'll also fire a note off to AlexIIL who writes LBA to see if the existing/builtin AttemptExtraction methods might fall prey to this, and find out whether the crash-on-empty-stack-test is strictly necessary.
Thanks for the detailed issue! Stockpile's LBA implementation is sketchy at best but for the time being I should be able to short-circuit if there's an empty stack. I wasn't aware of this restriction on IItemFilter so hopefully adding in this case will resolve the issue.