Package net.minecraftforge.event
Class CreativeModeTabEvent.BuildContents
java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.event.CreativeModeTabEvent
net.minecraftforge.event.CreativeModeTabEvent.BuildContents
- All Implemented Interfaces:
CreativeModeTab.Output
,IModBusEvent
- Enclosing class:
- CreativeModeTabEvent
public static final class CreativeModeTabEvent.BuildContents
extends CreativeModeTabEvent
implements CreativeModeTab.Output
Fired when the contents of a specific creative mode tab are being populated.
This event may be fired multiple times if the operator status of the local player or enabled feature flags changes.
This event is not cancellable, and does not have a result.
This event is fired on the mod-specific event bus, only on the logical client.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraftforge.event.CreativeModeTabEvent
CreativeModeTabEvent.BuildContents, CreativeModeTabEvent.Register, CreativeModeTabEvent.Registrar
Nested classes/interfaces inherited from class net.minecraftforge.eventbus.api.Event
net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
-
Field Summary
Modifier and TypeFieldDescriptionprivate final MutableHashedLinkedMap<ItemStack,
CreativeModeTab.TabVisibility> private final FeatureFlagSet
private final boolean
private final CreativeModeTab
-
Constructor Summary
ConstructorDescriptionBuildContents
(CreativeModeTab tab, FeatureFlagSet flags, boolean hasPermissions, MutableHashedLinkedMap<ItemStack, CreativeModeTab.TabVisibility> entries) -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
accept
(Supplier<? extends ItemLike> item, CreativeModeTab.TabVisibility visibility) void
accept
(ItemStack stack, CreativeModeTab.TabVisibility visibility) getFlags()
getTab()
Returns the creative mode tab currently populating its contents.boolean
Methods inherited from class net.minecraftforge.eventbus.api.Event
getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult
-
Field Details
-
tab
-
flags
-
hasPermissions
private final boolean hasPermissions -
entries
-
-
Constructor Details
-
BuildContents
@Internal public BuildContents(CreativeModeTab tab, FeatureFlagSet flags, boolean hasPermissions, MutableHashedLinkedMap<ItemStack, CreativeModeTab.TabVisibility> entries)
-
-
Method Details
-
getTab
Returns the creative mode tab currently populating its contents.- Returns:
- the creative mode tab currently populating its contents
-
getFlags
-
hasPermissions
public boolean hasPermissions() -
getEntries
-
accept
- Specified by:
accept
in interfaceCreativeModeTab.Output
-
accept
-
accept
-