From 1d9cbba2e0e34c9879c997e2bb30dc2f283b1d16 Mon Sep 17 00:00:00 2001 From: "Joseph T. McQuigg" Date: Sun, 15 Dec 2024 13:23:46 -0500 Subject: [PATCH] Remove Consumer Use in Forge Like Clients --- .../woodwevegot/forge/client/WoodWeveGotClientForge.java | 6 ++---- .../neoforge/client/WoodWeveGotClientNeoForge.java | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/Forge/src/main/java/net/potionstudios/woodwevegot/forge/client/WoodWeveGotClientForge.java b/Forge/src/main/java/net/potionstudios/woodwevegot/forge/client/WoodWeveGotClientForge.java index 422e655..30e511a 100644 --- a/Forge/src/main/java/net/potionstudios/woodwevegot/forge/client/WoodWeveGotClientForge.java +++ b/Forge/src/main/java/net/potionstudios/woodwevegot/forge/client/WoodWeveGotClientForge.java @@ -6,8 +6,6 @@ import net.minecraftforge.eventbus.api.IEventBus; import net.potionstudios.woodwevegot.client.WoodWeveGotClient; -import java.util.function.Consumer; - @OnlyIn(Dist.CLIENT) public class WoodWeveGotClientForge { @@ -15,7 +13,7 @@ public class WoodWeveGotClientForge { * Initializes the client side of the Forge mod. * @param eventBus The event bus to register the client side of the mod to. */ - public static void init(IEventBus eventBus) { - eventBus.addListener((Consumer) event -> WoodWeveGotClient.registerBlockEntityRenderers(event::registerBlockEntityRenderer)); + public static void init(final IEventBus eventBus) { + eventBus.addListener((EntityRenderersEvent.RegisterRenderers event) -> WoodWeveGotClient.registerBlockEntityRenderers(event::registerBlockEntityRenderer)); } } diff --git a/NeoForge/src/main/java/net/potionstudios/woodwevegot/neoforge/client/WoodWeveGotClientNeoForge.java b/NeoForge/src/main/java/net/potionstudios/woodwevegot/neoforge/client/WoodWeveGotClientNeoForge.java index d295d4e..7196856 100644 --- a/NeoForge/src/main/java/net/potionstudios/woodwevegot/neoforge/client/WoodWeveGotClientNeoForge.java +++ b/NeoForge/src/main/java/net/potionstudios/woodwevegot/neoforge/client/WoodWeveGotClientNeoForge.java @@ -23,8 +23,6 @@ import net.potionstudios.woodwevegot.world.level.block.entity.WWGTrappedChestBlockEntity; import org.jetbrains.annotations.NotNull; -import java.util.function.Consumer; - @Mod(value = WoodWeveGot.MOD_ID, dist = Dist.CLIENT) public class WoodWeveGotClientNeoForge { @@ -32,8 +30,8 @@ public class WoodWeveGotClientNeoForge { * Constructor for the client side of the NeoForge mod. * @param eventBus The event bus to register the client side of the mod to. */ - public WoodWeveGotClientNeoForge(IEventBus eventBus) { - eventBus.addListener((Consumer) event -> WoodWeveGotClient.registerBlockEntityRenderers(event::registerBlockEntityRenderer)); + public WoodWeveGotClientNeoForge(final IEventBus eventBus) { + eventBus.addListener((EntityRenderersEvent.RegisterRenderers event) -> WoodWeveGotClient.registerBlockEntityRenderers(event::registerBlockEntityRenderer)); eventBus.addListener(WoodWeveGotClientNeoForge::registerClientExtensions); }