Skip to content

Commit

Permalink
Remove Consumer Use in Forge Like Clients
Browse files Browse the repository at this point in the history
  • Loading branch information
JT122406 committed Dec 15, 2024
1 parent 570a2ba commit 1d9cbba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,14 @@
import net.minecraftforge.eventbus.api.IEventBus;
import net.potionstudios.woodwevegot.client.WoodWeveGotClient;

import java.util.function.Consumer;

@OnlyIn(Dist.CLIENT)
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<EntityRenderersEvent.RegisterRenderers>) event -> WoodWeveGotClient.registerBlockEntityRenderers(event::registerBlockEntityRenderer));
public static void init(final IEventBus eventBus) {
eventBus.addListener((EntityRenderersEvent.RegisterRenderers event) -> WoodWeveGotClient.registerBlockEntityRenderers(event::registerBlockEntityRenderer));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,15 @@
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 {

/**
* 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<EntityRenderersEvent.RegisterRenderers>) event -> WoodWeveGotClient.registerBlockEntityRenderers(event::registerBlockEntityRenderer));
public WoodWeveGotClientNeoForge(final IEventBus eventBus) {
eventBus.addListener((EntityRenderersEvent.RegisterRenderers event) -> WoodWeveGotClient.registerBlockEntityRenderers(event::registerBlockEntityRenderer));
eventBus.addListener(WoodWeveGotClientNeoForge::registerClientExtensions);
}

Expand Down

0 comments on commit 1d9cbba

Please sign in to comment.