Conversation
It didn't do anything useful.
This always exists
|
You break all addons because change public signature of items & blocks |
Which addons? |
it's kind of needed because binnie is known for being trash code. |
|
Also, it seems we don't want to support our fork of binnies outside of NH according to our supported spreadsheet, so it's a non issue |
Nikolay-Sitnikov
left a comment
There was a problem hiding this comment.
If you register items in the constructor, it makes it impossible to extend those items in addons. It also means that if the class is ever instantiated elsewhere, it could crash because the wrong/no mod container will be active.
I recommend either something along the lines of the item enum used in Utilities In Excess or something along those lines.
Why? Binnie itself is extending these items, and it works just fine. |
That shouldn't work. You're registering multiple items for the same ID. If it works, I have no idea how. |
...what? It's using the unlocalized name as part of the ID, it works just fine. I could add a constructor param allowing you to override that name without Java 25 (flexible constructor bodies), but I don't think it's important. From what I can tell, there aren't any addons for Binnie's, except for a private one by mts2000. It doesn't appear to be on his GitHub, and I can't find it on Modrinth or Curse, so I can't test it for compat regardless. I'm not going to attempt support for completely unknown and inaccessible codebases. |
sisyphussy
left a comment
There was a problem hiding this comment.
Looks good to me, though nick requested changes so you'll need to wait for him to look at it again. Since there haven't been any issues made for it in zeta, I don't think there's much that can go wrong here. :cope:
|
I see the cleverness of the design and why it works, although I still think it's not a good design. (Having a constructor call a virtual method that subclasses override is generally a recipe for strange behavior, but it's fine in this case.) It's better than what we have now, so go ahead and merge it. |
By default, Binnie reflects over itself and all the child mods to find and register items. This is pointless and ugly, so I replaced it with explicitly initializing items.