-
Notifications
You must be signed in to change notification settings - Fork 624
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
add option to properly hide slot via texturepack #6561
Conversation
public void hideSlot(String semantic) { | ||
if (isClientSide()) { | ||
sendClientAction(HIDE_SLOT, semantic); | ||
} | ||
for (Slot s : getSlots(SlotSemantics.getOrThrow(semantic))) { | ||
if (s instanceof AppEngSlot slot) { | ||
slot.setSlotEnabled(false); | ||
} | ||
} | ||
} | ||
|
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.
I don't like adding new server interactions for resource packs, to be honest.
Why is it necessary to disable it on the server too?
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.
slots have to be disabled on the server to disable the shift click logic.
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.
Looks good to me, I'll ask @shartte to double-check.
currently only works with AppEngSlots that do NOT implement IOptional Slot
(Slots implementing IOptional slot override isSlotEnabled() with their own logic)