diff options
| author | Nexus-Dino <86781290+Nexus-Dino@users.noreply.github.com> | 2022-10-21 21:22:57 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-21 13:22:57 -0700 |
| commit | f66aa6f7276f94f1dda09058971f6cab860e7f78 (patch) | |
| tree | 2b7aa692fca589bcda03544fbacfa3539bdc39db /src/main/java/com/example | |
| parent | 800cd6407e8585ff0fa674847605e284e3b1ec92 (diff) | |
Fix ClientModEvents example not subscribing to client-sided events (#9097)
Diffstat (limited to 'src/main/java/com/example')
| -rw-r--r-- | src/main/java/com/example/examplemod/ExampleMod.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/com/example/examplemod/ExampleMod.java b/src/main/java/com/example/examplemod/ExampleMod.java index 48b8fd6..d19f293 100644 --- a/src/main/java/com/example/examplemod/ExampleMod.java +++ b/src/main/java/com/example/examplemod/ExampleMod.java @@ -9,6 +9,7 @@ import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.material.Material; +import net.minecraftforge.api.distmarker.Dist import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.eventbus.api.IEventBus; import net.minecraftforge.eventbus.api.SubscribeEvent; @@ -75,7 +76,7 @@ public class ExampleMod } // You can use EventBusSubscriber to automatically register all static methods in the class annotated with @SubscribeEvent - @Mod.EventBusSubscriber(modid = MODID, bus = Mod.EventBusSubscriber.Bus.MOD) + @Mod.EventBusSubscriber(modid = MODID, bus = Mod.EventBusSubscriber.Bus.MOD, value = Dist.CLIENT) public static class ClientModEvents { @SubscribeEvent |
