Skip to content

Commit

Permalink
fix #307
Browse files Browse the repository at this point in the history
  • Loading branch information
Mari023 committed Oct 1, 2024
1 parent 605d93e commit 4ca630f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
- fix #305 properly and remove the workaround
- fix #307
13 changes: 13 additions & 0 deletions src/main/java/de/mari_023/ae2wtlib/AE2wtlibClient.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package de.mari_023.ae2wtlib;

import net.minecraft.client.Minecraft;

import de.mari_023.ae2wtlib.wct.CraftingTerminalHandler;

public class AE2wtlibClient {
public static void clientTick() {
if (Minecraft.getInstance().player == null)
return;
CraftingTerminalHandler.getCraftingTerminalHandler(Minecraft.getInstance().player).checkTerminal();
}
}
6 changes: 1 addition & 5 deletions src/main/java/de/mari_023/ae2wtlib/AE2wtlibForge.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package de.mari_023.ae2wtlib;

import net.minecraft.client.Minecraft;
import net.minecraft.core.registries.Registries;
import net.minecraft.network.RegistryFriendlyByteBuf;
import net.minecraft.network.codec.StreamCodec;
Expand Down Expand Up @@ -33,7 +32,6 @@
import de.mari_023.ae2wtlib.api.AE2wtlibAPI;
import de.mari_023.ae2wtlib.api.terminal.ItemWT;
import de.mari_023.ae2wtlib.networking.*;
import de.mari_023.ae2wtlib.wct.CraftingTerminalHandler;

@Mod(AE2wtlibAPI.MOD_NAME)
@EventBusSubscriber
Expand Down Expand Up @@ -148,8 +146,6 @@ public static void handle(ArrowLooseEvent event) {

@SubscribeEvent
public static void handle(ClientTickEvent.Post event) {
if (Minecraft.getInstance().player == null)
return;
CraftingTerminalHandler.getCraftingTerminalHandler(Minecraft.getInstance().player).checkTerminal();
AE2wtlibClient.clientTick();
}
}

0 comments on commit 4ca630f

Please sign in to comment.