/* * Copyright (c) Forge Development LLC and contributors * SPDX-License-Identifier: LGPL-2.1-only */ package net.minecraftforge.event; import net.minecraft.resources.ResourceKey; import net.minecraft.world.flag.FeatureFlagSet; import net.minecraft.world.item.CreativeModeTab; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.ItemLike; import net.minecraftforge.common.util.MutableHashedLinkedMap; import net.minecraftforge.eventbus.api.Cancelable; import net.minecraftforge.eventbus.api.Event; import net.minecraftforge.fml.LogicalSide; import net.minecraftforge.fml.event.IModBusEvent; import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; import org.jetbrains.annotations.ApiStatus; import java.util.function.Supplier; /** * 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 {@linkplain Cancelable cancellable}, and does not {@linkplain HasResult have a result}. *
* This event is fired on the {@linkplain FMLJavaModLoadingContext#getModEventBus() mod-specific event bus},
* only on the {@linkplain LogicalSide#CLIENT logical client}.
*/
public final class BuildCreativeModeTabContentsEvent extends Event implements IModBusEvent, CreativeModeTab.Output {
private final CreativeModeTab tab;
private final CreativeModeTab.ItemDisplayParameters parameters;
private final MutableHashedLinkedMap