-
-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Per Slot Text Toggle #1043
Per Slot Text Toggle #1043
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks fine. I am wondering if all that ConfigInformation
is needed instead of just an id but should be fine.
Also cc @Emirlol if he wants to look at the api. The system is that SlotTextAdder
gets config information from each slot text adder instance, than calls SlotTextManager
with the config information to get whether it's enabled.
Looks pretty good. 2 things though:
|
d676b9b
to
d30413b
Compare
Added constructor to SimpleSlotTextAdder |
public SlotTextMode slotTextMode = SlotTextMode.ENABLED; | ||
|
||
@SerialEntry | ||
public Map<String, Boolean> textEnabled = new Object2BooleanOpenHashMap<>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The type should be Object2BooleanOpenHashMap
otherwise map accesses are being boxed, you will also need to use the getBoolean
method when reading the options
eda21a6
to
118d9c1
Compare
Moved Slot Text config to UI & Visuals and allowed configuring each adder individually
Adders just need to override a method that returns a ConfigInformation record.
Also I wanted to add a data fixer to move things but couldn't manage to do that :(