First 1.6.0 changes

Way too many changes & fixes to list here, still got some work to do, but this is coming along great already
This commit is contained in:
Motschen
2022-09-18 20:20:10 +02:00
parent 003f79d405
commit 203fd6cdb6
24 changed files with 463 additions and 212 deletions

View File

@@ -1,5 +1,6 @@
package eu.midnightdust.midnightcontrols.client.compat;
import dev.emi.emi.EmiConfig;
import dev.emi.emi.screen.EmiScreen;
import dev.emi.emi.screen.EmiScreenManager;
import eu.midnightdust.midnightcontrols.client.MidnightControlsClient;
@@ -13,7 +14,7 @@ import org.lwjgl.glfw.GLFW;
public class EMICompat implements CompatHandler {
public static boolean handleTabs(boolean direction) {
if (MidnightControlsClient.get().input.actionGuiCooldown == 0 &&EmiScreenManager.searchLeft != null && EmiScreenManager.searchRight != null) {
if (isEMIEnabled() && MidnightControlsClient.get().input.actionGuiCooldown == 0 && EmiScreenManager.searchLeft != null && EmiScreenManager.searchRight != null) {
if (direction) EmiScreenManager.searchRight.onPress();
else EmiScreenManager.searchLeft.onPress();
MidnightControlsClient.get().input.actionGuiCooldown = 5;
@@ -38,4 +39,7 @@ public class EMICompat implements CompatHandler {
.filter(((client, buttonBinding) -> client.currentScreen instanceof HandledScreen<?> || client.currentScreen instanceof EmiScreen))
.register();
}
public static boolean isEMIEnabled() {
return EmiConfig.enabled;
}
}