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

@@ -7,7 +7,8 @@ package net.minecraftforge.event;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.server.players.PlayerList;
import net.minecraftforge.eventbus.api.Event;
import net.minecraftforge.eventbus.api.bus.EventBus;
import net.minecraftforge.eventbus.api.event.MutableEvent;
import org.jetbrains.annotations.Nullable;
import java.util.List;
@@ -17,7 +18,9 @@ import java.util.List;
* before tags and crafting recipes are sent to the client. Send datapack data
* to clients when this event fires.
*/
public final class OnDatapackSyncEvent extends Event {
public final class OnDatapackSyncEvent extends MutableEvent {
public static final EventBus<OnDatapackSyncEvent> BUS = EventBus.create(OnDatapackSyncEvent.class);
private final PlayerList playerList;
@Nullable