NichtStudioCode / InvUI

A spigot library for creating custom inventory-based GUIs.
MIT License
253 stars 20 forks source link

Cannot inherit from BaseItemBuilder #16

Closed D0gmaDev closed 1 year ago

D0gmaDev commented 1 year ago

Hi @NichtStudioCode , I'm trying to make my own ItemBuilder by extending BaseItemBuilder in my project as suggested in the docs, but i can't because the abstract class is package-private : abstract class BaseItemBuilder<T> implements ItemProvider {

the example Builders can't be inherited at all because they're final (which makes sense), except for PotionBuilder (?)

What is the expected behaviour ? Thanks

NichtStudioCode commented 1 year ago

Yeah, that part of the documentation isn't correct anymore, as it was written before I reworked ItemBuilder in 1560a5d688c86eb07223b03f1d888e828f751413. Extending BaseItemBuilder for localization doesn't make sense because then you'd need to implement the potion- or skull-specific methods yourself. I've been meaning to add some sort of translation registry that is queried in BaseItemBuilder#build, but I didn't get around to it yet.

D0gmaDev commented 1 year ago

I see, I'll stick to regular items for the moment

D0gmaDev commented 1 year ago

Hi @NichtStudioCode, I've seen you made some changes regarding itembuilders lately 👍🏻 but I'm not sure to understand them 😄 Is it that you figured out a way to include localization, or it an entierly other goal ? yours, D0gma_

NichtStudioCode commented 1 year ago

Hi @NichtStudioCode, I've seen you made some changes regarding itembuilders lately 👍🏻 but I'm not sure to understand them 😄 Is it that you figured out a way to include localization, or it an entierly other goal ? yours, D0gma_

Just some refactoring, but I am planning to add that in InvUI 1.0

NichtStudioCode commented 1 year ago

A proper localization system has been added in InvUI v1.0!