Skip to content

Commit

Permalink
fix #323
Browse files Browse the repository at this point in the history
  • Loading branch information
Mari023 committed Jan 9, 2025
1 parent 1361619 commit 1e5ba06
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@

- fix dedicated server crashing (#323)
12 changes: 12 additions & 0 deletions src/main/java/de/mari_023/ae2wtlib/AE2wtlibClient.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,22 @@
package de.mari_023.ae2wtlib;

import de.mari_023.ae2wtlib.api.AE2wtlibAPI;
import net.minecraft.client.Minecraft;

import de.mari_023.ae2wtlib.wct.CraftingTerminalHandler;
import net.neoforged.api.distmarker.Dist;
import net.neoforged.bus.api.IEventBus;
import net.neoforged.fml.ModContainer;
import net.neoforged.fml.common.Mod;
import net.neoforged.neoforge.client.gui.ConfigurationScreen;
import net.neoforged.neoforge.client.gui.IConfigScreenFactory;

@Mod(value = AE2wtlibAPI.MOD_NAME, dist = Dist.CLIENT)
public class AE2wtlibClient {
public AE2wtlibClient(IEventBus modEventBus, ModContainer modContainer) {
modContainer.registerExtensionPoint(IConfigScreenFactory.class, ConfigurationScreen::new);
}

public static void clientTick() {
if (Minecraft.getInstance().player == null)
return;
Expand Down
1 change: 0 additions & 1 deletion src/main/java/de/mari_023/ae2wtlib/AE2wtlibForge.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ public AE2wtlibForge(IEventBus modEventBus, ModContainer modContainer) {
CommonHooks.markComponentClassAsValid(ItemStack.class);// TODO figure out if there is a better way
modContainer.registerConfig(ModConfig.Type.COMMON, AE2wtlibConfig.SPEC,
AE2wtlibAPI.MOD_NAME + ".toml");
modContainer.registerExtensionPoint(IConfigScreenFactory.class, ConfigurationScreen::new);
modEventBus.addListener((RegisterEvent e) -> {
if (e.getRegistryKey().equals(Registries.MENU)) {
AE2wtlib.registerMenus();
Expand Down

0 comments on commit 1e5ba06

Please sign in to comment.