stfwi / engineers-decor

Engineer's Decor
MIT License
35 stars 16 forks source link

[1.16] NullPointerException in Labelled Crates (missing null safety check). #169

Closed Vaelzan closed 3 years ago

Vaelzan commented 3 years ago

Skipping right to the fix... the issue is in this line of code here: https://github.com/stfwi/engineers-decor/blob/3f12390dd55801301428a63feffd87651f3a4fa2/src/main/java/wile/engineersdecor/blocks/EdLabeledCrate.java#L633

There's a missing check to ensure that the slot is not null before calling getHasStack() on it.

Crash report demonstrating the crash: https://pastebin.com/CLx5FpMT

Reproduced with: forge-1.16.5-36.1.0 engineersdecor-1.16.4-1.1.9

stfwi commented 3 years ago

Hi man, thanks for digging into the code directly! Gonna see to prepare and push the fix at the weekend. Cheers!

stfwi commented 3 years ago

Oky, included fix in the current maintenance release. File is on Curse. Ty again for reaching out, cheers,-