Skip to content
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

Merged
merged 3 commits into from
Sep 16, 2022

Conversation

Mari023
Copy link
Contributor

@Mari023 Mari023 commented Sep 14, 2022

currently only works with AppEngSlots that do NOT implement IOptional Slot
(Slots implementing IOptional slot override isSlotEnabled() with their own logic)

Comment on lines 328 to 338
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);
}
}
}

Copy link
Member

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?

Copy link
Contributor Author

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.

src/main/java/appeng/menu/AEBaseMenu.java Outdated Show resolved Hide resolved
src/main/java/appeng/menu/SlotSemantics.java Outdated Show resolved Hide resolved
Copy link
Member

@Technici4n Technici4n left a 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.

@shartte shartte merged commit e117827 into AppliedEnergistics:master Sep 16, 2022
@Mari023 Mari023 deleted the hide-slots branch September 16, 2022 16:42
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants