From a4efaa6a1e59501629a66e954e7a0d6748132ced Mon Sep 17 00:00:00 2001 From: "Joseph T. McQuigg" Date: Mon, 2 Dec 2024 10:06:41 -0500 Subject: [PATCH] Remove unneeded Explicit use of Consumer in Forge and NeoForge Clients Signed-off-by: Joseph T. McQuigg --- .../forge/client/BiomesWeveGoneClientForge.java | 7 +++---- .../neoforge/client/BiomesWeveGoneClientNeoForge.java | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/Forge/src/main/java/net/potionstudios/biomeswevegone/forge/client/BiomesWeveGoneClientForge.java b/Forge/src/main/java/net/potionstudios/biomeswevegone/forge/client/BiomesWeveGoneClientForge.java index 8af78d7fe..6ae9855f7 100644 --- a/Forge/src/main/java/net/potionstudios/biomeswevegone/forge/client/BiomesWeveGoneClientForge.java +++ b/Forge/src/main/java/net/potionstudios/biomeswevegone/forge/client/BiomesWeveGoneClientForge.java @@ -20,7 +20,6 @@ import net.potionstudios.biomeswevegone.world.level.block.wood.BWGWood; import java.util.Objects; -import java.util.function.Consumer; /** * This class is used to initialize the Forge client side of the mod. @@ -37,10 +36,10 @@ public class BiomesWeveGoneClientForge { */ public static void init(final IEventBus eventBus) { eventBus.addListener((FMLClientSetupEvent event) -> BiomesWeveGoneClient.onInitialize()); - eventBus.addListener((Consumer) event -> BiomesWeveGoneClient.registerEntityRenderers(event::registerEntityRenderer)); - eventBus.addListener((Consumer) event -> BiomesWeveGoneClient.registerBlockEntityRenderers(event::registerBlockEntityRenderer)); + eventBus.addListener((EntityRenderersEvent.RegisterRenderers event) -> BiomesWeveGoneClient.registerEntityRenderers(event::registerEntityRenderer)); + eventBus.addListener((EntityRenderersEvent.RegisterRenderers event) -> BiomesWeveGoneClient.registerBlockEntityRenderers(event::registerBlockEntityRenderer)); eventBus.addListener((RegisterParticleProvidersEvent event) -> BiomesWeveGoneClient.registerParticles((type, spriteProviderFactory) -> event.registerSpriteSet(type, spriteProviderFactory::apply))); - eventBus.addListener((Consumer) event -> BiomesWeveGoneClient.registerLayerDefinitions(event::registerLayerDefinition)); + eventBus.addListener((EntityRenderersEvent.RegisterLayerDefinitions event) -> BiomesWeveGoneClient.registerLayerDefinitions(event::registerLayerDefinition)); eventBus.addListener(BiomesWeveGoneClientForge::registerColorChangingBlocks); eventBus.addListener(BiomesWeveGoneClientForge::registerItemColorHandlers); } diff --git a/NeoForge/src/main/java/net/potionstudios/biomeswevegone/neoforge/client/BiomesWeveGoneClientNeoForge.java b/NeoForge/src/main/java/net/potionstudios/biomeswevegone/neoforge/client/BiomesWeveGoneClientNeoForge.java index 609bf0d67..ae3fd34f4 100644 --- a/NeoForge/src/main/java/net/potionstudios/biomeswevegone/neoforge/client/BiomesWeveGoneClientNeoForge.java +++ b/NeoForge/src/main/java/net/potionstudios/biomeswevegone/neoforge/client/BiomesWeveGoneClientNeoForge.java @@ -25,7 +25,6 @@ import net.potionstudios.biomeswevegone.world.level.block.wood.BWGWood; import java.util.Objects; -import java.util.function.Consumer; /** * This class is used to initialize the Forge client side of the mod. @@ -42,10 +41,10 @@ public class BiomesWeveGoneClientNeoForge { */ public BiomesWeveGoneClientNeoForge(final IEventBus eventBus) { eventBus.addListener((FMLClientSetupEvent event) -> BiomesWeveGoneClient.onInitialize()); - eventBus.addListener((Consumer) event -> BiomesWeveGoneClient.registerEntityRenderers(event::registerEntityRenderer)); - eventBus.addListener((Consumer) event -> BiomesWeveGoneClient.registerBlockEntityRenderers(event::registerBlockEntityRenderer)); + eventBus.addListener((EntityRenderersEvent.RegisterRenderers event) -> BiomesWeveGoneClient.registerEntityRenderers(event::registerEntityRenderer)); + eventBus.addListener((EntityRenderersEvent.RegisterRenderers event) -> BiomesWeveGoneClient.registerBlockEntityRenderers(event::registerBlockEntityRenderer)); eventBus.addListener((RegisterParticleProvidersEvent event) -> BiomesWeveGoneClient.registerParticles((type, spriteProviderFactory) -> event.registerSpriteSet(type, spriteProviderFactory::apply))); - eventBus.addListener((Consumer) event -> BiomesWeveGoneClient.registerLayerDefinitions(event::registerLayerDefinition)); + eventBus.addListener((EntityRenderersEvent.RegisterLayerDefinitions event) -> BiomesWeveGoneClient.registerLayerDefinitions(event::registerLayerDefinition)); eventBus.addListener(BiomesWeveGoneClientNeoForge::registerColorChangingBlocks); eventBus.addListener(BiomesWeveGoneClientNeoForge::registerItemColorHandlers); eventBus.addListener(BiomesWeveGoneClientNeoForge::registerGUILayers);