MineMaarten / PneumaticCraft

PneumaticCraft source
Other
84 stars 50 forks source link

Crash with BetterStorage Crate and Pneumatic Helmet #809

Closed belathus closed 8 years ago

belathus commented 8 years ago

I got the following crash: http://pastebin.com/qbWjmMwu

It does not appear to be the same as #513.

I am running version 1.12.4, which is a month old at this point.

copygirl commented 8 years ago

I will just jump in here to explain what's going on: "Tile entity inventories are server-side only, as such it doesn't make sense to check them on the client." That's what I usually tell mod developers encountering this. Does PneumaticCraft sync the inventories so the helmet can show / check what's inside?

Either way, crates simply throw an error whenever something accesses the IInventory stuff on the client, due to that being a mistake 99% of the time. With the way they're handled internally, the contents exposed via the IInventory aren't useful at all in this case, anyway.

My suggestion would be to either blacklist crates, or use the ICrateStorage interface if you do want to show / check what's inside. Connected crates share an inventory though so the latter option might require some addition work.

MineMaarten commented 8 years ago

"Does PneumaticCraft sync the inventories so the helmet can show / check what's inside?" Yes

I guess I'll try..catch it like I do in other parts of the helmet and add it to the blacklist dynamically when it throws exceptions.