From 67a45757309f6aa05851350da316d755222949c7 Mon Sep 17 00:00:00 2001 From: PixelGameWizard <30537551+pixelgamewizard@users.noreply.github.com> Date: Mon, 22 Jan 2024 20:00:34 -0500 Subject: [PATCH] Clarify purpose of NeoForge.EVENT_BUS.register in ExampleMod class (#32) --- src/main/java/com/example/examplemod/ExampleMod.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/example/examplemod/ExampleMod.java b/src/main/java/com/example/examplemod/ExampleMod.java index 4f50275..86686e8 100644 --- a/src/main/java/com/example/examplemod/ExampleMod.java +++ b/src/main/java/com/example/examplemod/ExampleMod.java @@ -76,7 +76,9 @@ public class ExampleMod // Register the Deferred Register to the mod event bus so tabs get registered CREATIVE_MODE_TABS.register(modEventBus); - // Register ourselves for server and other game events we are interested in + // Register ourselves for server and other game events we are interested in. + // Note that this is necessary if and only if we want *this* class (ExampleMod) to respond directly to events. + // Do not add this line if there are no @SubscribeEvent-annotated functions in this class, like onServerStarting() below. NeoForge.EVENT_BUS.register(this); // Register the item to a creative tab