
Abnormals hanging sign implementation causes incompatibility with mods like amendment
thelegitdolt opened this issue · 4 comments
Amendment does mixins to hanging sign class to make it swing which is very nice, but does not work hanging signs
There isn't much technical detail there, so I don't see this being our responsibility to fix it.
The argument appears to be that even though we inherit vanilla's sign block entities and use its renderers, that's still not enough for their mixin to apply correctly.
We didn't just use vanilla's sign block entity type because that required hacking into the sign block entity's valid blocks. I think Forge/NeoForge added something later to make this no longer required or easier. However, this was a while ago, so I'm not sure why we did it, but there was definitely a technical reason. I would have loved to make the code simpler if I could have at the time.
I also noticed that the Rats mod, which their mixin appears to specifically support, has the sign work the same way ours do, so maybe the cause is something else?
Anyways, even if our signs not specifically using vanilla's block entity type is the cause, that sounds problematic for compatibility. What if a mod did need to override methods inherited from the sign? That doesn't sound stable.
That makes much more sense; thanks for the investigation.
The best solution would be for Amendments to change how they tick their sign extensions. I say that because their current method breaks Vanilla's tick and isn't compatible with any custom sign block entities that have unique tick updates.
The one difference I see between your hanging signs and ones that work with Amendments (Rats, mine via Oblivion, among others) is that Blueprint overrides getTicker in its block classes and the others don't. (Which tbf we probably should be doing because as I read it the normal SignBlockEntity::tick isn't getting called if we don't override, but looking at what that actually does it doesn’t surprise me no one has missed that feature)
And indeed if I override that in my block classes mine no longer work, because that will override the Override mixin Amendments adds to Wall/CeilingHangingSignBlock https://github.com/MehVahdJukaar/amendments/blob/8d4135b67b8573a1c2b04363bb42c014358ec148/common/src/main/java/net/mehvahdjukaar/amendments/mixins/CeilingHangingSignBlockMixin.java#L76-L84