Mechanized Steam Power

Mechanized Steam Power

18.4k Downloads

crashes dedicated server when placing boiler

Linguardium opened this issue ยท 6 comments

commented

mc 1.16.1
mechanized 1.9.0

Saw the previous issue, was not applicable. It seems the issue is a reference to a client only method in the FluidKeys class

AlexIIL/LibBlockAttributes#22 issue opened here.

commented

I can't replicate this on my end unfortunately and looking at the crash log I don't think it's my fault although I'm very willing to be proven wrong on that. Thanks for reporting, I'll keep an eye on the linked issue.

commented

odd that you cant replicate it on a dedicated server

the FluidKeys static initialization directly calls a client only method meaning if anything tries to reference the fluidkeys code, it should crash dedicated servers (works fine on client, of course).
(enum in fluidkeys generates 2 voidworldviewers, which during initialization reference a client only method)

it seems like FluidKeys is clientonly, though, meaning it is being referenced incorrectly in this mod or there is something wrong with the fluid inventory code in lba.

isclient always returns true here https://github.com/AlexIIL/LibBlockAttributes/blob/a0cea30f86c05f2b0c4e6f98d48d10ef0bcf366f/src/main/java/alexiil/mc/lib/attributes/fluid/volume/FluidKeys.java#L317

edit: it definitely looks to be LBA issue, since creating a simple fluid inventory will eventually initialize the static members of FluidKeys and cause the crash

commented

Thank you for the leg work. I still can't make heads or tails of why it's not crashing on my end or how I would accomplish what I'm after without using FluidKeys. I'll have a another look around in the morning.

commented

I've fixed this in the 0.7.1-pre.4 pre-release of LBA, which is on the BC maven - although I'll release a proper version soon.

commented

Thank you, I'll push out the release version as soon as it's available.

commented

Just to clarify - this is completely an LBA bug, you shouldn't need to do anything to fix this other than wait for me to release an update to LBA. (and FluidKeys is definitely not meant to be a client-side only class - the isClient() { return true; } bit is just to try to make users of that fake world not try to perform any server-like modifications to it).