diff --git a/src/main/java/net/neoforged/neoforge/common/NeoForge.java b/src/main/java/net/neoforged/neoforge/common/NeoForge.java index a8ea91f29e..9242ea437f 100644 --- a/src/main/java/net/neoforged/neoforge/common/NeoForge.java +++ b/src/main/java/net/neoforged/neoforge/common/NeoForge.java @@ -15,7 +15,7 @@ public class NeoForge { * Also known as the "game" bus. */ public static final IEventBus EVENT_BUS = BusBuilder.builder().startShutdown().classChecker(eventType -> { - if (eventType.isAssignableFrom(IModBusEvent.class)) { + if (IModBusEvent.class.isAssignableFrom(eventType)) { throw new IllegalArgumentException("IModBusEvent events are not allowed on the common NeoForge bus! Use a mod bus instead."); } }).build(); diff --git a/tests/src/main/java/net/neoforged/neoforge/oldtest/block/SlipperinessTest.java b/tests/src/main/java/net/neoforged/neoforge/oldtest/block/SlipperinessTest.java index ceab2c4fd9..87e51c2cba 100644 --- a/tests/src/main/java/net/neoforged/neoforge/oldtest/block/SlipperinessTest.java +++ b/tests/src/main/java/net/neoforged/neoforge/oldtest/block/SlipperinessTest.java @@ -22,7 +22,7 @@ import net.neoforged.neoforge.registries.RegisterEvent; @Mod(SlipperinessTest.MOD_ID) -@EventBusSubscriber +@EventBusSubscriber(bus = EventBusSubscriber.Bus.MOD) public class SlipperinessTest { static final String MOD_ID = "slipperiness_test"; static final String BLOCK_ID = "test_block";