1.21.6 - New EventBus 7

A full rewrite and redesign of the library that offers much better performance, new features and fixes all previous design flaws
See the migration guide here: https://gist.github.com/PaintNinja/ad82c224aecee25efac1ea3e2cf19b91

Co-authored-by: Paint_Ninja <[email protected]>
This commit is contained in:
LexManosandPaint_Ninja committed 2025-06-18 02:53:58 -07:00
1 parent a02f3f9841
commit 5e8942e0a7
642 files changed
+7258 -6187

No files matched your search

@@ -11,8 +11,8 @@ 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.eventbus.api.bus.BusGroup;
import net.minecraftforge.eventbus.api.bus.EventBus;
import net.minecraftforge.fml.LogicalSide;
import net.minecraftforge.fml.event.IModBusEvent;
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
@@ -29,7 +29,11 @@ import java.util.function.Supplier;
* 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 {
public final class BuildCreativeModeTabContentsEvent implements IModBusEvent, CreativeModeTab.Output {
public static EventBus<BuildCreativeModeTabContentsEvent> getBus(BusGroup modBusGroup) {
return IModBusEvent.getBus(modBusGroup, BuildCreativeModeTabContentsEvent.class);
}
private final CreativeModeTab tab;
private final CreativeModeTab.ItemDisplayParameters parameters;
private final MutableHashedLinkedMap<ItemStack, CreativeModeTab.TabVisibility> entries;