Skip to content

Commit

Permalink
fix: Fix compile error due to missing load context initializers in Fo…
Browse files Browse the repository at this point in the history
…rge/Fabric client runtimes
  • Loading branch information
BlayTheNinth committed Jan 14, 2024
1 parent 2735230 commit e79a1e5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package net.blay09.mods.balm.fabric.client;

import net.blay09.mods.balm.api.Balm;
import net.blay09.mods.balm.api.BalmRuntimeLoadContext;
import net.blay09.mods.balm.api.EmptyLoadContext;
import net.blay09.mods.balm.api.client.BalmClientRuntime;
import net.blay09.mods.balm.api.client.keymappings.BalmKeyMappings;
import net.blay09.mods.balm.api.client.rendering.BalmModels;
Expand All @@ -19,7 +21,7 @@

import java.lang.reflect.InvocationTargetException;

public class FabricBalmClientRuntime implements BalmClientRuntime {
public class FabricBalmClientRuntime implements BalmClientRuntime<EmptyLoadContext> {

private static final Logger logger = LoggerFactory.getLogger(FabricBalmClientRuntime.class);

Expand Down Expand Up @@ -60,6 +62,11 @@ public BalmModels getModels() {

@Override
public void initialize(String modId, Runnable initializer) {
initialize(modId, EmptyLoadContext.INSTANCE, initializer);
}

@Override
public void initialize(String modId, EmptyLoadContext context, Runnable initializer) {
initializer.run();
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package net.blay09.mods.balm.forge.client;

import net.blay09.mods.balm.api.Balm;
import net.blay09.mods.balm.api.BalmRuntimeLoadContext;
import net.blay09.mods.balm.api.EmptyLoadContext;
import net.blay09.mods.balm.api.client.BalmClientRuntime;
import net.blay09.mods.balm.api.client.keymappings.BalmKeyMappings;
import net.blay09.mods.balm.api.client.rendering.BalmModels;
Expand All @@ -15,7 +17,7 @@
import net.blay09.mods.balm.forge.client.screen.ForgeBalmScreens;
import net.blay09.mods.balm.forge.event.ForgeBalmClientEvents;

public class ForgeBalmClientRuntime implements BalmClientRuntime {
public class ForgeBalmClientRuntime implements BalmClientRuntime<EmptyLoadContext> {

private final BalmRenderers renderers = new ForgeBalmRenderers();
private final BalmTextures textures = new ForgeBalmTextures();
Expand Down Expand Up @@ -54,6 +56,11 @@ public BalmKeyMappings getKeyMappings() {

@Override
public void initialize(String modId, Runnable initializer) {
initialize(modId, EmptyLoadContext.INSTANCE, initializer);
}

@Override
public void initialize(String modId, EmptyLoadContext context, Runnable initializer) {
((ForgeBalmRenderers) renderers).register();
((ForgeBalmScreens) screens).register();
((ForgeBalmModels) models).register();
Expand Down

0 comments on commit e79a1e5

Please sign in to comment.