Skip to content

Commit

Permalink
feat: Update Forge to 1.21.4
Browse files Browse the repository at this point in the history
  • Loading branch information
BlayTheNinth committed Dec 15, 2024
1 parent f1129e9 commit 383aa58
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
11 changes: 6 additions & 5 deletions forge/src/main/java/net/blay09/mods/kuma/forge/ForgeKumaAPI.java
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
package net.blay09.mods.kuma.forge;

import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.fml.DistExecutor;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.loading.FMLEnvironment;

@Mod(value = "kuma_api")
public class ForgeKumaAPI {

public ForgeKumaAPI() {
DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> {
ForgeKumaAPIClient.init();
});
public ForgeKumaAPI(IEventBus modEventBus) {
if (FMLEnvironment.dist == Dist.CLIENT) {
ForgeKumaAPIClient.init(modEventBus);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@
import net.minecraftforge.client.event.RegisterKeyMappingsEvent;
import net.minecraftforge.client.event.ScreenEvent;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
import net.minecraftforge.eventbus.api.IEventBus;

public class ForgeKumaAPIClient {
public static void init() {
final var modEventBus = FMLJavaModLoadingContext.get().getModEventBus();
public static void init(IEventBus modEventBus) {
modEventBus.addListener((RegisterKeyMappingsEvent event) -> {
for (final var managedKeyMapping : ManagedKeyMappingRegistry.getKeyMappings()) {
if (managedKeyMapping instanceof VanillaManagedKeyMapping vanillaManagedKeyMapping) {
Expand Down
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ parchment_minecraft=1.21
parchment_version=2024.07.28

# Forge
forge_version = 51.0.0
forge_version_range = [51,)
forge_loader_version_range = [51,)
forge_version = 54.0.6
forge_version_range = [54,)
forge_loader_version_range = [54,)

# NeoForge
neoforge_snapshot_url=
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ plugins {
include("common")
include("fabric")
include("neoforge")
//include("forge")
include("forge")

0 comments on commit 383aa58

Please sign in to comment.