LibMultiPart icon indicating copy to clipboard operation
LibMultiPart copied to clipboard

Calling `readNbt` on an existing MultipartBlockEntity never initializes read parts

Open Kneelawk opened this issue 3 years ago • 1 comments

The Issue

When MultipartBlockEntity.readNbt is called, sometimes MultipartBlockEntity.cancelRemoval has already been called. This is the case when a MultipartBlockEntity has been loaded from something like a schematic or a Create contraption.

Potential Solution

A potential solution would be just to invoke parts' onAdded methods in MultipartBlockEntity.readNbt if MultipartBlockEntity.cancelRemoval has already been called.

Kneelawk avatar Nov 01 '22 23:11 Kneelawk

I'll also need to fix this in order to effectively test #54, so I'll probably try and contribute the fix to this to that PR.

Kneelawk avatar Nov 01 '22 23:11 Kneelawk