mirror of
https://github.com/TeamMidnightDust/MidnightControls.git
synced 2025-12-14 07:35:10 +01:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b3f7350de9 |
@@ -110,7 +110,7 @@ dependencies {
|
|||||||
// modImplementation "io.github.ennuil:LibZoomer:${project.libzoomer_version}"
|
// modImplementation "io.github.ennuil:LibZoomer:${project.libzoomer_version}"
|
||||||
|
|
||||||
modImplementation "org.quiltmc:quilt-json5:1.0.0"
|
modImplementation "org.quiltmc:quilt-json5:1.0.0"
|
||||||
modImplementation "maven.modrinth:sodium:${project.sodium_version}"
|
modApi "maven.modrinth:sodium:${project.sodium_version}"
|
||||||
//modImplementation("maven.modrinth:emi:${project.emi_version}")
|
//modImplementation("maven.modrinth:emi:${project.emi_version}")
|
||||||
modImplementation "maven.modrinth:emotecraft:${project.emotecraft_version}"
|
modImplementation "maven.modrinth:emotecraft:${project.emotecraft_version}"
|
||||||
modImplementation "io.github.kosmx:bendy-lib:${project.bendylib_version}"
|
modImplementation "io.github.kosmx:bendy-lib:${project.bendylib_version}"
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ yarn_mappings=1.19+build.1
|
|||||||
loader_version=0.14.7
|
loader_version=0.14.7
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
mod_version = 1.2.0
|
mod_version = 1.2.1
|
||||||
maven_group = eu.midnightdust
|
maven_group = eu.midnightdust
|
||||||
archives_base_name = midnightcontrols
|
archives_base_name = midnightcontrols
|
||||||
modrinth_id=bXX9h73M
|
modrinth_id=bXX9h73M
|
||||||
|
|||||||
@@ -64,8 +64,8 @@ public class MidnightControlsClient extends MidnightControls implements ClientMo
|
|||||||
InputUtil.Type.KEYSYM, GLFW.GLFW_KEY_KP_2, "key.categories.movement");
|
InputUtil.Type.KEYSYM, GLFW.GLFW_KEY_KP_2, "key.categories.movement");
|
||||||
public static final KeyBinding BINDING_LOOK_LEFT = InputManager.makeKeyBinding(new Identifier(MidnightControlsConstants.NAMESPACE, "look_left"),
|
public static final KeyBinding BINDING_LOOK_LEFT = InputManager.makeKeyBinding(new Identifier(MidnightControlsConstants.NAMESPACE, "look_left"),
|
||||||
InputUtil.Type.KEYSYM, GLFW.GLFW_KEY_KP_4, "key.categories.movement");
|
InputUtil.Type.KEYSYM, GLFW.GLFW_KEY_KP_4, "key.categories.movement");
|
||||||
public static final KeyBinding BINDING_RING = InputManager.makeKeyBinding(new Identifier(MidnightControlsConstants.NAMESPACE, "ring"),
|
public static final KeyBinding BINDING_RING = InputManager.makeKeyBinding(new Identifier(MidnightControlsConstants.NAMESPACE, "ring"),
|
||||||
InputUtil.Type.MOUSE, GLFW.GLFW_MOUSE_BUTTON_5, "key.categories.misc");
|
InputUtil.Type.MOUSE, 0, "key.categories.misc");
|
||||||
public static final Identifier CONTROLLER_BUTTONS = new Identifier(MidnightControlsConstants.NAMESPACE, "textures/gui/controller_buttons.png");
|
public static final Identifier CONTROLLER_BUTTONS = new Identifier(MidnightControlsConstants.NAMESPACE, "textures/gui/controller_buttons.png");
|
||||||
public static final Identifier CONTROLLER_EXPANDED = new Identifier(MidnightControlsConstants.NAMESPACE, "textures/gui/controller_expanded.png");
|
public static final Identifier CONTROLLER_EXPANDED = new Identifier(MidnightControlsConstants.NAMESPACE, "textures/gui/controller_expanded.png");
|
||||||
public static final Identifier CONTROLLER_AXIS = new Identifier(MidnightControlsConstants.NAMESPACE, "textures/gui/controller_axis.png");
|
public static final Identifier CONTROLLER_AXIS = new Identifier(MidnightControlsConstants.NAMESPACE, "textures/gui/controller_axis.png");
|
||||||
@@ -188,9 +188,9 @@ public class MidnightControlsClient extends MidnightControls implements ClientMo
|
|||||||
if (MidnightControlsConfig.controlsMode == ControlsMode.CONTROLLER && (client.isWindowFocused() || MidnightControlsConfig.unfocusedInput))
|
if (MidnightControlsConfig.controlsMode == ControlsMode.CONTROLLER && (client.isWindowFocused() || MidnightControlsConfig.unfocusedInput))
|
||||||
this.input.tickController(client);
|
this.input.tickController(client);
|
||||||
|
|
||||||
if (BINDING_RING.wasPressed()) {
|
// if (BINDING_RING.wasPressed()) {
|
||||||
client.setScreen(new RingScreen());
|
// client.setScreen(new RingScreen());
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
public void onRender(MinecraftClient client) {
|
public void onRender(MinecraftClient client) {
|
||||||
this.input.onRender(client.getTickDelta(), client);
|
this.input.onRender(client.getTickDelta(), client);
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package eu.midnightdust.midnightcontrols.client.compat;
|
|||||||
|
|
||||||
import eu.midnightdust.midnightcontrols.MidnightControls;
|
import eu.midnightdust.midnightcontrols.MidnightControls;
|
||||||
import eu.midnightdust.midnightcontrols.client.MidnightControlsClient;
|
import eu.midnightdust.midnightcontrols.client.MidnightControlsClient;
|
||||||
|
import eu.midnightdust.midnightcontrols.client.MidnightControlsConfig;
|
||||||
import eu.midnightdust.midnightcontrols.client.compat.mixin.SodiumOptionsGUIAccessor;
|
import eu.midnightdust.midnightcontrols.client.compat.mixin.SodiumOptionsGUIAccessor;
|
||||||
import eu.midnightdust.midnightcontrols.client.controller.InputManager;
|
import eu.midnightdust.midnightcontrols.client.controller.InputManager;
|
||||||
import me.jellysquid.mods.sodium.client.gui.SodiumOptionsGUI;
|
import me.jellysquid.mods.sodium.client.gui.SodiumOptionsGUI;
|
||||||
@@ -24,7 +25,7 @@ public class SodiumCompat {
|
|||||||
InputManager.INPUT_MANAGER.targetMouseX = (int) (client.getWindow().getScaleFactor() * dimensions.getCenterX());
|
InputManager.INPUT_MANAGER.targetMouseX = (int) (client.getWindow().getScaleFactor() * dimensions.getCenterX());
|
||||||
InputManager.INPUT_MANAGER.targetMouseY = (int) (client.getWindow().getScaleFactor() * dimensions.getCenterY());
|
InputManager.INPUT_MANAGER.targetMouseY = (int) (client.getWindow().getScaleFactor() * dimensions.getCenterY());
|
||||||
MidnightControlsClient.get().input.actionGuiCooldown = 5;
|
MidnightControlsClient.get().input.actionGuiCooldown = 5;
|
||||||
MidnightControls.get().log(i+" "+accessor.getControls().size()+" | " + dimensions.getCenterX() + " " + dimensions.getCenterY());
|
if (MidnightControlsConfig.debug) MidnightControls.get().log(i+" "+accessor.getControls().size()+" | " + dimensions.getCenterX() + " " + dimensions.getCenterY());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public static void handleTabs(Screen screen, boolean direction) {
|
public static void handleTabs(Screen screen, boolean direction) {
|
||||||
@@ -33,7 +34,7 @@ public class SodiumCompat {
|
|||||||
final int max = accessor.getPages().size()-1;
|
final int max = accessor.getPages().size()-1;
|
||||||
int i = accessor.getPages().indexOf(accessor.getCurrentPage());
|
int i = accessor.getPages().indexOf(accessor.getCurrentPage());
|
||||||
i = (direction ? ((max > i) ? ++i : 0) : (i > 0 ? --i : max));
|
i = (direction ? ((max > i) ? ++i : 0) : (i > 0 ? --i : max));
|
||||||
MidnightControls.get().log(""+i);
|
if (MidnightControlsConfig.debug) MidnightControls.get().log(""+i);
|
||||||
optionsGUI.setPage(accessor.getPages().get(i));
|
optionsGUI.setPage(accessor.getPages().get(i));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user