Compare commits

..

6 Commits

Author SHA1 Message Date
Martin Prokoph
43ffd89a61 Merge pull request #271 from Androser420/1.20.4
Fix Toggle Sprint/Sneak.
2024-03-10 17:07:53 +01:00
Androser420
8a9866f92f Update InputHandlers.java 2024-03-10 00:26:57 +01:00
Androser420
b12413cbcd Update ButtonBinding.java 2024-03-10 00:26:01 +01:00
Martin Prokoph
9f62538197 Replace FAQ with wiki link 2024-02-14 23:42:45 +01:00
Martin Prokoph
ba5143403d Add issue template for mod support 2024-02-14 12:52:16 +01:00
Martin Prokoph
454afa92ec Update issue templates 2024-02-14 12:45:48 +01:00
7 changed files with 75 additions and 17 deletions

View File

@@ -1,7 +1,7 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
title: 'Bug: TITLE HERE'
labels: bug
assignees: ''
@@ -21,15 +21,17 @@ Steps to reproduce the behavior:
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
If applicable, add screenshots or videos to help explain your problem.
**Desktop (please complete the following information):**
- OS: [e.g. Linux]
- Minecraft [e.g. 1.14.4]
- Fabric [e.g. fabric 0.7.2+build.174]
- Mods [e.g. aurora_keystrokes v1.0.0, modmenu v1.7.15]
- OS: [e.g. Windows / Linux / MacOS]
- Minecraft [e.g. 1.20.4]
- Modloader [e.g. Fabric Loader 0.15.6]
- Fabric/Quilt Libraries [e.g. Fabric Api 0.96.1+1.20.4]
- Mods [e.g. Puzzle v1.6.1, LilTaterReloaded v1.1.15]
- Version [e.g. 1.0.0]
- Branch [e.g. dev]
- Remove this line if you actually completed it
**Additional context**
Add any other context about the problem here.
In case of a crash, please provide the crash log.

View File

@@ -0,0 +1,40 @@
---
name: Controller support
about: Report a problem related to a specific controller
title: 'Controller Issues: CONTROLLER NAME HERE'
labels: controller
assignees: ''
---
**Describe the current state**
A clear and concise description of current state of support for the controller and the issues.
**To Reproduce**
If needed, specify steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots or videos to help explain your problem.
**Desktop (please complete the following information):**
- Have you checked #263 for your controller? [e.g. Yes/No]
- Connection method [e.g. Wired / Bluetooth]
- OS: [e.g. Windows / Linux / MacOS]
- Minecraft [e.g. 1.20.4]
- Modloader [e.g. Fabric Loader 0.15.6]
- Fabric/Quilt Libraries [e.g. Fabric Api 0.96.1+1.20.4]
- Mods [e.g. Puzzle v1.6.1, LilTaterReloaded v1.1.15]
- Version [e.g. 1.0.0]
- Remove this line if you actually completed it
**Additional context**
Add any other context about the problem here.
In case of a crash, please provide the crash log.

View File

@@ -1,7 +1,7 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
title: 'Feature: TITLE HERE'
labels: enhancement
assignees: ''
@@ -17,4 +17,4 @@ A clear and concise description of what you want to happen.
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.
Add any other context or screenshots/videos about the feature request here.

20
.github/ISSUE_TEMPLATE/mod_support.md vendored Normal file
View File

@@ -0,0 +1,20 @@
---
name: Mod Support
about: Compatibility improvements with a specific mod (not for crashes)
title: 'Mod Support: MOD NAME HERE'
labels: mod compatibility
assignees: ''
---
**Is your compatibility request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I've always wanted to [...]
**Describe the way of compatibility you'd imagine**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative mods or workarounds you've considered.
**Additional context**
Add any other context or screenshots/videos about the compatibility request here.

View File

@@ -64,11 +64,7 @@ After this is done, everything should be built just fine!
## FAQ:
### The controller does not work, and it's name appears in orange, what can I do?
Orange controller names indicate a missing controller mapping.
Download [GamepadTool](https://generalarcade.com/gamepadtool/), create and copy a mapping, go to MidnightControls' Mappings File Editor and paste the string.
Alternatively, you can use [AntiMicroX](https://github.com/AntiMicroX/antimicroX) to create the mappings, in case the Gamepad Tool is not working for you.
If that works, you might as well consider submitting the mapping by opening a PR in this repo: https://github.com/gabomdq/SDL_GameControllerDB
That will make sure other people using the same controller as you don't have to use gamepad-tool anymore.
Create a custom mapping as pointed out in the [wiki](https://midnightdust.eu/wiki/midnightcontrols/)
[Quilt]: https://quiltmc.org

View File

@@ -88,7 +88,7 @@ public class ButtonBinding {
public static final ButtonBinding SNEAK = new Builder("sneak").buttons(GLFW_GAMEPAD_BUTTON_RIGHT_THUMB)
.actions(InputHandlers::handleToggleSneak).onlyInGame().cooldown().register();
public static final ButtonBinding SPRINT = new Builder("sprint").buttons(GLFW_GAMEPAD_BUTTON_LEFT_THUMB)
.actions(InputHandlers::handleToggleSprint).onlyInGame().register();
.actions(InputHandlers::handleToggleSprint).onlyInGame().cooldown().register();
public static final ButtonBinding SWAP_HANDS = new Builder("swap_hands").buttons(GLFW_GAMEPAD_BUTTON_X).onlyInGame().cooldown().register();
public static final ButtonBinding TAB_LEFT = new Builder("tab_back").buttons(GLFW_GAMEPAD_BUTTON_LEFT_BUMPER)
.action(InputHandlers.handleHotbar(false)).filter(Predicates.or(InputHandlers::inInventory, InputHandlers::inAdvancements).or((client, binding) -> client.currentScreen != null)).cooldown().register();

View File

@@ -320,12 +320,12 @@ public class InputHandlers {
boolean sprintToggled = client.options.getSprintToggled().getValue();
if (client.player.getAbilities().flying && sprintToggled)
client.options.getSprintToggled().setValue(false);
else if (MidnightControlsConfig.controllerToggleSneak != sprintToggled)
else if (MidnightControlsConfig.controllerToggleSprint != sprintToggled)
client.options.getSprintToggled().setValue(!sprintToggled);
binding.setPressed(button.pressed);
if (client.player.getAbilities().flying && sprintToggled)
client.options.getSprintToggled().setValue(true);
else if (MidnightControlsConfig.controllerToggleSneak != sprintToggled)
else if (MidnightControlsConfig.controllerToggleSprint != sprintToggled)
client.options.getSprintToggled().setValue(sprintToggled);
});
return true;