mirror of
https://github.com/FabricMC/fabric.git
synced 2025-03-22 21:15:23 -04:00
Dont invoke ItemGroupEvents.MODIFY_ENTRIES_ALL for the OP tab, when the OP tab is disabled (#4045)
This commit is contained in:
parent
9b16164179
commit
3fc0e552c4
1 changed files with 7 additions and 7 deletions
|
@ -71,14 +71,14 @@ abstract class ItemGroupMixin implements FabricItemGroupImpl {
|
|||
var mutableSearchTabStacks = new LinkedList<>(searchTabStacks);
|
||||
var entries = new FabricItemGroupEntries(context, mutableDisplayStacks, mutableSearchTabStacks);
|
||||
|
||||
final Event<ItemGroupEvents.ModifyEntries> modifyEntriesEvent = ItemGroupEventsImpl.getModifyEntriesEvent(registryKey);
|
||||
|
||||
if (modifyEntriesEvent != null) {
|
||||
modifyEntriesEvent.invoker().modifyEntries(entries);
|
||||
}
|
||||
|
||||
// Now trigger the global event
|
||||
// Now trigger the events
|
||||
if (registryKey != ItemGroups.OPERATOR || context.hasPermissions()) {
|
||||
final Event<ItemGroupEvents.ModifyEntries> modifyEntriesEvent = ItemGroupEventsImpl.getModifyEntriesEvent(registryKey);
|
||||
|
||||
if (modifyEntriesEvent != null) {
|
||||
modifyEntriesEvent.invoker().modifyEntries(entries);
|
||||
}
|
||||
|
||||
ItemGroupEvents.MODIFY_ENTRIES_ALL.invoker().modifyEntries(self, entries);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue