Client-side `onAdded` called twice when loading world
Kneelawk opened this issue ยท 1 comments
The Issue
Currently AbstractParts' onAdded method is called twice on the client-side when the world is loaded or when ever a MultipartBlockEntity is loaded from NBT.
This seems to be caused by the PartContainer.readInitialRenderData first explicitly invoking its parts' onAdded methods and then calling its own validate method which re-invokes the parts' onAdded methods.
Potential Fix
The simplest fix seems to be just removing the explicit invocations of onAdded from the readInitialRenderData method and letting validate handle onAdded instead.