Compare commits
19 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cac23d12a1 | ||
|
|
b982772d31 | ||
|
|
e4ca0db2a2 | ||
|
|
f0cd2a51d1 | ||
|
|
9d37862144 | ||
|
|
c31fb76215 | ||
|
|
b6563af2b1 | ||
|
|
1a0030a680 | ||
|
|
78c858b753 | ||
|
|
24288b3ebd | ||
|
|
0226bfc62f | ||
|
|
28d92a65d4 | ||
|
|
132bdc0cc5 | ||
|
|
bdffef681f | ||
|
|
a49a64ef44 | ||
|
|
0e192b2af4 | ||
|
|
6dd654f2f5 | ||
|
|
eb406a4681 | ||
|
|
d386e3d9a2 |
60
CHANGELOG.md
@@ -1,5 +1,21 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
# MidnightControls
|
||||||
|
|
||||||
|
## 0.1.0
|
||||||
|
First beta!
|
||||||
|
Changes from LambdaControls:
|
||||||
|
|
||||||
|
- Support for Steam Deck and Dualsense
|
||||||
|
- Support for L4, L5, R4, R5 buttons
|
||||||
|
- Updated Libraries
|
||||||
|
- New Logo and Name
|
||||||
|
- Lots of Bugfixes
|
||||||
|
- MidnightConfig backend
|
||||||
|
|
||||||
|
|
||||||
|
# LambdaControls
|
||||||
|
|
||||||
## 1.0.0
|
## 1.0.0
|
||||||
|
|
||||||
:tada: First release! :tada:
|
:tada: First release! :tada:
|
||||||
@@ -14,11 +30,11 @@
|
|||||||
|
|
||||||
### 1.0.1
|
### 1.0.1
|
||||||
|
|
||||||
- Fixed tutorial toast to look around not affected by camera movement done with a controller. ([#2](https://github.com/LambdAurora/midnightcontrols/issues/2))
|
- Fixed tutorial toast to look around not affected by camera movement done with a controller. ([#2](https://github.com/LambdAurora/LambdaControls/issues/2))
|
||||||
|
|
||||||
### 1.0.2 (Unofficial)
|
### 1.0.2 (Unofficial)
|
||||||
|
|
||||||
This update was never pushed but was aiming to fix [#4](https://github.com/LambdAurora/midnightcontrols/issues/4).
|
This update was never pushed but was aiming to fix [#4](https://github.com/LambdAurora/LambdaControls/issues/4).
|
||||||
|
|
||||||
- Fixed the toggle sneak button binding.
|
- Fixed the toggle sneak button binding.
|
||||||
- Fixed broken chat arrow keys.
|
- Fixed broken chat arrow keys.
|
||||||
@@ -26,17 +42,17 @@ This update was never pushed but was aiming to fix [#4](https://github.com/Lambd
|
|||||||
|
|
||||||
## 1.1.0 - Chording update
|
## 1.1.0 - Chording update
|
||||||
|
|
||||||
This update also has a backport 1.14.4 version ([#9](https://github.com/LambdAurora/midnightcontrols/issues/9)).
|
This update also has a backport 1.14.4 version ([#9](https://github.com/LambdAurora/LambdaControls/issues/9)).
|
||||||
|
|
||||||
- Rewrote everything (almost).
|
- Rewrote everything (almost).
|
||||||
- Added [networking](https://github.com/LambdAurora/midnightcontrols/wiki/midnightcontrols-Networking) for some features.
|
- Added [networking](https://github.com/LambdAurora/LambdaControls/wiki/LambdaControls-Networking) for some features.
|
||||||
- Added second controller support (Joycons supported now hopefully).
|
- Added second controller support (Joycons supported now hopefully).
|
||||||
- Added chording.
|
- Added chording.
|
||||||
- Added better developer API
|
- Added better developer API
|
||||||
- Added hover messages ([#5](https://github.com/LambdAurora/midnightcontrols/issues/5)).
|
- Added hover messages ([#5](https://github.com/LambdAurora/LambdaControls/issues/5)).
|
||||||
- Added hotbar button bindings ([#7](https://github.com/LambdAurora/midnightcontrols/issues/7)).
|
- Added hotbar button bindings ([#7](https://github.com/LambdAurora/LambdaControls/issues/7)).
|
||||||
- Added front block placing feature ([#8](https://github.com/LambdAurora/midnightcontrols/issues/8)).
|
- Added front block placing feature ([#8](https://github.com/LambdAurora/LambdaControls/issues/8)).
|
||||||
- Added no creative fly drifting ([#8](https://github.com/LambdAurora/midnightcontrols/issues/8)).
|
- Added no creative fly drifting ([#8](https://github.com/LambdAurora/LambdaControls/issues/8)).
|
||||||
- Added option to enable controller focus.
|
- Added option to enable controller focus.
|
||||||
- Added [OkZoomer](https://github.com/joaoh1/OkZoomer) compatibility.
|
- Added [OkZoomer](https://github.com/joaoh1/OkZoomer) compatibility.
|
||||||
- Added D-pad movements in inventories.
|
- Added D-pad movements in inventories.
|
||||||
@@ -50,10 +66,10 @@ This update also has a backport 1.14.4 version ([#9](https://github.com/LambdAur
|
|||||||
|
|
||||||
## 1.2.0-1.3.0
|
## 1.2.0-1.3.0
|
||||||
|
|
||||||
- Improved rotation algorithm ([#11](https://github.com/LambdAurora/midnightcontrols/issues/11)).
|
- Improved rotation algorithm ([#11](https://github.com/LambdAurora/LambdaControls/issues/11)).
|
||||||
- Added virtual mouse.
|
- Added virtual mouse.
|
||||||
- Added outline on front block placing.
|
- Added outline on front block placing.
|
||||||
- Added fast block placement ([#8](https://github.com/LambdAurora/midnightcontrols/issues/8)).
|
- Added fast block placement ([#8](https://github.com/LambdAurora/LambdaControls/issues/8)).
|
||||||
- Added [REI](https://www.curseforge.com/minecraft/mc-mods/roughly-enough-items) compatibility.
|
- Added [REI](https://www.curseforge.com/minecraft/mc-mods/roughly-enough-items) compatibility.
|
||||||
- Improved HUD.
|
- Improved HUD.
|
||||||
- Added recipe book control.
|
- Added recipe book control.
|
||||||
@@ -62,7 +78,7 @@ This update also has a backport 1.14.4 version ([#9](https://github.com/LambdAur
|
|||||||
|
|
||||||
### 1.3.1
|
### 1.3.1
|
||||||
|
|
||||||
- Fixed broken inventory interactions ([#13](https://github.com/LambdAurora/midnightcontrols/issues/13))
|
- Fixed broken inventory interactions ([#13](https://github.com/LambdAurora/LambdaControls/issues/13))
|
||||||
- Fixed virtual mouse preventing continuous attack (thus making breaking blocks impossible).
|
- Fixed virtual mouse preventing continuous attack (thus making breaking blocks impossible).
|
||||||
- Added support for [ModUpdater](https://gitea.thebrokenrail.com/TheBrokenRail/ModUpdater) hopefully.
|
- Added support for [ModUpdater](https://gitea.thebrokenrail.com/TheBrokenRail/ModUpdater) hopefully.
|
||||||
- Updated [SpruceUI](https://github.com/LambdAurora/SpruceUI) to 1.5.2.
|
- Updated [SpruceUI](https://github.com/LambdAurora/SpruceUI) to 1.5.2.
|
||||||
@@ -76,7 +92,7 @@ This update also has a backport 1.14.4 version ([#9](https://github.com/LambdAur
|
|||||||
|
|
||||||
## 1.4.0
|
## 1.4.0
|
||||||
|
|
||||||
- Added analog movements ([#10](https://github.com/LambdAurora/midnightcontrols/issues/10)).
|
- Added analog movements ([#10](https://github.com/LambdAurora/LambdaControls/issues/10)).
|
||||||
- Improved Ok Zoomer compability.
|
- Improved Ok Zoomer compability.
|
||||||
- Updated [SpruceUI](https://github.com/LambdAurora/SpruceUI) to 1.5.8 to ensure 1.16.2 compability.
|
- Updated [SpruceUI](https://github.com/LambdAurora/SpruceUI) to 1.5.8 to ensure 1.16.2 compability.
|
||||||
- Internal changes:
|
- Internal changes:
|
||||||
@@ -84,7 +100,7 @@ This update also has a backport 1.14.4 version ([#9](https://github.com/LambdAur
|
|||||||
- Replace lot of strings with Texts.
|
- Replace lot of strings with Texts.
|
||||||
- Improved block outline rendering injection.
|
- Improved block outline rendering injection.
|
||||||
- Shadow library jars instead of Jar-in-Jar.
|
- Shadow library jars instead of Jar-in-Jar.
|
||||||
- Fixed crash in inventory ([#16](https://github.com/LambdAurora/midnightcontrols/issues/16))
|
- Fixed crash in inventory ([#16](https://github.com/LambdAurora/LambdaControls/issues/16))
|
||||||
- WIP:
|
- WIP:
|
||||||
- Started to work on action ring.
|
- Started to work on action ring.
|
||||||
- Will allow for better compability with other mods.
|
- Will allow for better compability with other mods.
|
||||||
@@ -97,8 +113,8 @@ This update also has a backport 1.14.4 version ([#9](https://github.com/LambdAur
|
|||||||
## 1.5.0
|
## 1.5.0
|
||||||
|
|
||||||
- Added mappings string editor screen.
|
- Added mappings string editor screen.
|
||||||
- Added Simplified Chinese translations ([#18](https://github.com/LambdAurora/midnightcontrols/pull/18)).
|
- Added Simplified Chinese translations ([#18](https://github.com/LambdAurora/LambdaControls/pull/18)).
|
||||||
- Added Mexican Spanish translations ([#22](https://github.com/LambdAurora/midnightcontrols/pull/22)).
|
- Added Mexican Spanish translations ([#22](https://github.com/LambdAurora/LambdaControls/pull/22)).
|
||||||
- Added Xbox 360 button skin and overhauled Xbox button skin.
|
- Added Xbox 360 button skin and overhauled Xbox button skin.
|
||||||
- Added debug option.
|
- Added debug option.
|
||||||
- Respect toggle setting in Accessibility screen.
|
- Respect toggle setting in Accessibility screen.
|
||||||
@@ -114,17 +130,17 @@ This update also has a backport 1.14.4 version ([#9](https://github.com/LambdAur
|
|||||||
## 1.6.0
|
## 1.6.0
|
||||||
|
|
||||||
- Reworked entirely the settings screen.
|
- Reworked entirely the settings screen.
|
||||||
- Added independent stick dead zones. ([#32](https://github.com/LambdAurora/midnightcontrols/issues/32))
|
- Added independent stick dead zones. ([#32](https://github.com/LambdAurora/LambdaControls/issues/32))
|
||||||
- Added max values range. ([#41](https://github.com/LambdAurora/midnightcontrols/issues/41))
|
- Added max values range. ([#41](https://github.com/LambdAurora/LambdaControls/issues/41))
|
||||||
- Updated [SpruceUI] and fix related crashes due to incompatible versions ([#40](https://github.com/LambdAurora/midnightcontrols/issues/40), [#48](https://github.com/LambdAurora/midnightcontrols/issues/48)).
|
- Updated [SpruceUI] and fix related crashes due to incompatible versions ([#40](https://github.com/LambdAurora/LambdaControls/issues/40), [#48](https://github.com/LambdAurora/LambdaControls/issues/48)).
|
||||||
- Fix boat control issues ([#37](https://github.com/LambdAurora/midnightcontrols/issues/37)).
|
- Fix boat control issues ([#37](https://github.com/LambdAurora/LambdaControls/issues/37)).
|
||||||
- Fix incompatibilities with mods using night-config. Now shadowing properly night-config. ([#33](https://github.com/LambdAurora/midnightcontrols/issues/33), [#39](https://github.com/LambdAurora/midnightcontrols/issues/39))
|
- Fix incompatibilities with mods using night-config. Now shadowing properly night-config. ([#33](https://github.com/LambdAurora/LambdaControls/issues/33), [#39](https://github.com/LambdAurora/LambdaControls/issues/39))
|
||||||
|
|
||||||
## 1.7.0
|
## 1.7.0
|
||||||
|
|
||||||
- Updated to 1.17.
|
- Updated to 1.17.
|
||||||
- Small improvements to the codebase thanks to Java 16.
|
- Small improvements to the codebase thanks to Java 16.
|
||||||
- Fix controller bindings not being saved ([#31](https://github.com/LambdAurora/midnightcontrols/issues/31), [#55](https://github.com/LambdAurora/midnightcontrols/issues/55)).
|
- Fix controller bindings not being saved ([#31](https://github.com/LambdAurora/LambdaControls/issues/31), [#55](https://github.com/LambdAurora/LambdaControls/issues/55)).
|
||||||
- Dropped entirely Touchscreen Input Mode.
|
- Dropped entirely Touchscreen Input Mode.
|
||||||
- Dropped Roughly Enough Items compatibility.
|
- Dropped Roughly Enough Items compatibility.
|
||||||
|
|
||||||
@@ -132,4 +148,4 @@ This update also has a backport 1.14.4 version ([#9](https://github.com/LambdAur
|
|||||||
|
|
||||||
- Fix crash at startup.
|
- Fix crash at startup.
|
||||||
|
|
||||||
[SpruceUI]: https://github.com/LambdAurora/SpruceUI
|
[SpruceUI]: https://github.com/LambdAurora/SpruceUI
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
:tada: First of all, thanks for taking time to contribute! :tada:
|
:tada: First of all, thanks for taking time to contribute! :tada:
|
||||||
|
|
||||||
The following is a set of guidelines for contributing to midnightcontrols.
|
The following is a set of guidelines for contributing to MidnightControls.
|
||||||
Feel free to propose changes to this document in a pull request.
|
Feel free to propose changes to this document in a pull request.
|
||||||
|
|
||||||
**Table of Contents**
|
**Table of Contents**
|
||||||
@@ -18,7 +18,7 @@ Feel free to propose changes to this document in a pull request.
|
|||||||
## Code of Conduct
|
## Code of Conduct
|
||||||
|
|
||||||
This project and everyone participating in it is governed by the [Code of Conduct](https://github.com/LambdAurora/midnightcontrols/blob/master/CODE_OF_CONDUCT.md).
|
This project and everyone participating in it is governed by the [Code of Conduct](https://github.com/LambdAurora/midnightcontrols/blob/master/CODE_OF_CONDUCT.md).
|
||||||
By participating, you are expected to uphold this code. Please report unacceptable behavior at [aurora42lambda@gmail.com](mailto:aurora42lambda@gmail.com).
|
By participating, you are expected to uphold this code. Please report unacceptable behavior at [motschen@midnightdust.eu](mailto:motschen@midnightdust.eu).
|
||||||
|
|
||||||
## What should I know before I get started?
|
## What should I know before I get started?
|
||||||
|
|
||||||
@@ -26,9 +26,9 @@ By participating, you are expected to uphold this code. Please report unacceptab
|
|||||||
|
|
||||||
[Fabric](https://fabricmc.net/) is the mod loader and the software which allows Gradle to setup the workspace.
|
[Fabric](https://fabricmc.net/) is the mod loader and the software which allows Gradle to setup the workspace.
|
||||||
|
|
||||||
### Java 16
|
### Java 17
|
||||||
|
|
||||||
Java is the main language used to make midnightcontrols alive.
|
Java is the main language used to make MidnightControls alive.
|
||||||
Knowing how to code in Java is necessary if you contribute to the code.
|
Knowing how to code in Java is necessary if you contribute to the code.
|
||||||
|
|
||||||
### Minecraft
|
### Minecraft
|
||||||
@@ -60,12 +60,12 @@ Git commits should be signed.
|
|||||||
|
|
||||||
#### How do I submit a bug report?
|
#### How do I submit a bug report?
|
||||||
|
|
||||||
Go in the issues tab in GitHub and read the [bug report guide](https://github.com/LambdAurora/midnightcontrols/blob/1.17/.github/ISSUE_TEMPLATE/bug_report.md)
|
Go in the issues tab in GitHub and read the [bug report guide](https://github.com/TeamMidnightDust/MidnightControls/blob/1.18/.github/ISSUE_TEMPLATE/bug_report.md)
|
||||||
|
|
||||||
### Suggesting enhancements
|
### Suggesting enhancements
|
||||||
|
|
||||||
Enhancement suggestions are tracked as [GitHub issues](https://github.com/LambdAurora/midnightcontrols/issues).
|
Enhancement suggestions are tracked as [GitHub issues](https://github.com/TeamMidnightDust/MidnightControls/issues).
|
||||||
Check out the [feature request](https://github.com/LambdAurora/midnightcontrols/blob/1.17/.github/ISSUE_TEMPLATE/feature_request.md) guide.
|
Check out the [feature request](https://github.com/TeamMidnightDust/MidnightControls/blob/1.17/.github/ISSUE_TEMPLATE/feature_request.md) guide.
|
||||||
|
|
||||||
### Do pull requests
|
### Do pull requests
|
||||||
|
|
||||||
|
|||||||
5
HEADER
@@ -1,6 +1,7 @@
|
|||||||
Copyright © 2021 LambdAurora <aurora42lambda@gmail.com>
|
Copyright © 2021 LambdAurora <aurora42lambda@gmail.com>
|
||||||
|
Copyright © 2022 Motschen <motschen@midnightdust.eu>
|
||||||
|
|
||||||
This file is part of midnightcontrols.
|
This file is part of MidnightControls.
|
||||||
|
|
||||||
Licensed under the MIT license. For more information,
|
Licensed under the MIT license. For more information,
|
||||||
see the LICENSE file.
|
see the LICENSE file.
|
||||||
|
|||||||
3
LICENSE
@@ -1,6 +1,7 @@
|
|||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright © 2021 LambdAurora <aurora42lambda@gmail.com>
|
Copyright © 2021 LambdAurora <aurora42lambda@gmail.com>
|
||||||
|
Copyright © 2022 Motschen <motschen@midnightdust.eu>
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -18,4 +19,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
|
|||||||
19
README.md
@@ -1,15 +1,16 @@
|
|||||||
# midnightcontrols
|
# MidnightControls
|
||||||
|
|
||||||
<!-- modrinth_exclude.start -->
|
<!-- modrinth_exclude.start -->
|
||||||
 <!-- modrinth_exclude.end -->
|
 <!-- modrinth_exclude.end -->
|
||||||
[](https://raw.githubusercontent.com/LambdAurora/midnightcontrols/master/LICENSE)
|
[](https://raw.githubusercontent.com/TeamMidnightDust/MidnightControls/master/LICENSE)
|
||||||

|

|
||||||
[![Mod loader: Fabric]][fabric] <!-- modrinth_exclude.start -->
|
[![Mod loader: Quilt/Fabric]][quilt] <!-- modrinth_exclude.start -->
|
||||||

|
[](https://github.com/TeamMidnightDust/MidnightControls/releases)
|
||||||
[](https://www.curseforge.com/minecraft/mc-mods/midnightcontrols)
|
[](https://www.curseforge.com/minecraft/mc-mods/midnightcontrols)
|
||||||
<!-- modrinth_exclude.end -->
|
<!-- modrinth_exclude.end -->
|
||||||
|
|
||||||
A Fabric Minecraft mod which adds better controls, reach-around and controller support.
|
A Fabric Minecraft mod which adds better controls, reach-around and controller support.
|
||||||
|
Forked from [LambdaControls](https://github.com/LambdAurora/LambdaControls) by the amazing [LambdAurora](https://github.com/LambdAurora), which was sadly discontinued.
|
||||||
|
|
||||||
## What's this mod?
|
## What's this mod?
|
||||||
|
|
||||||
@@ -37,9 +38,11 @@ This mod also adds controller support.
|
|||||||
## 🎮 Supported Controllers:
|
## 🎮 Supported Controllers:
|
||||||
|
|
||||||
- Dualshock controllers
|
- Dualshock controllers
|
||||||
|
- Dualsense controllers
|
||||||
- Xbox controllers
|
- Xbox controllers
|
||||||
- Switch Pro controllers
|
- Switch Pro controllers
|
||||||
- Joycons
|
- Joycons
|
||||||
|
- Steam controller and Steam Deck (WIP)
|
||||||
- And many more!
|
- And many more!
|
||||||
|
|
||||||
## Screenshots
|
## Screenshots
|
||||||
@@ -53,5 +56,5 @@ This mod also adds controller support.
|
|||||||
Just do `./gradlew build` and everything should build just fine!
|
Just do `./gradlew build` and everything should build just fine!
|
||||||
<!-- modrinth_exclude.end -->
|
<!-- modrinth_exclude.end -->
|
||||||
|
|
||||||
[fabric]: https://fabricmc.net
|
[quilt]: https://quiltmc.org
|
||||||
[Mod loader: Fabric]: https://img.shields.io/badge/modloader-Fabric-1976d2?style=flat-square&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAsTAAALEwEAmpwYAAAFHGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDIgNzkuMTYwOTI0LCAyMDE3LzA3LzEzLTAxOjA2OjM5ICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV2ZW50IyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ0MgMjAxOCAoV2luZG93cykiIHhtcDpDcmVhdGVEYXRlPSIyMDE4LTEyLTE2VDE2OjU0OjE3LTA4OjAwIiB4bXA6TW9kaWZ5RGF0ZT0iMjAxOS0wNy0yOFQyMToxNzo0OC0wNzowMCIgeG1wOk1ldGFkYXRhRGF0ZT0iMjAxOS0wNy0yOFQyMToxNzo0OC0wNzowMCIgZGM6Zm9ybWF0PSJpbWFnZS9wbmciIHBob3Rvc2hvcDpDb2xvck1vZGU9IjMiIHBob3Rvc2hvcDpJQ0NQcm9maWxlPSJzUkdCIElFQzYxOTY2LTIuMSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDowZWRiMWMyYy1mZjhjLWU0NDEtOTMxZi00OTVkNGYxNGM3NjAiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MGVkYjFjMmMtZmY4Yy1lNDQxLTkzMWYtNDk1ZDRmMTRjNzYwIiB4bXBNTTpPcmlnaW5hbERvY3VtZW50SUQ9InhtcC5kaWQ6MGVkYjFjMmMtZmY4Yy1lNDQxLTkzMWYtNDk1ZDRmMTRjNzYwIj4gPHhtcE1NOkhpc3Rvcnk+IDxyZGY6U2VxPiA8cmRmOmxpIHN0RXZ0OmFjdGlvbj0iY3JlYXRlZCIgc3RFdnQ6aW5zdGFuY2VJRD0ieG1wLmlpZDowZWRiMWMyYy1mZjhjLWU0NDEtOTMxZi00OTVkNGYxNGM3NjAiIHN0RXZ0OndoZW49IjIwMTgtMTItMTZUMTY6NTQ6MTctMDg6MDAiIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkFkb2JlIFBob3Rvc2hvcCBDQyAyMDE4IChXaW5kb3dzKSIvPiA8L3JkZjpTZXE+IDwveG1wTU06SGlzdG9yeT4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4/HiGMAAAAtUlEQVRYw+XXrQqAMBQF4D2P2eBL+QIG8RnEJFaNBjEum+0+zMQLtwwv+wV3ZzhhMDgfJ0wUSinxZUQWgKos1JP/AbD4OneIDyQPwCFniA+EJ4CaXm4TxAXCC0BNHgLhAdAnx9hC8PwGSRtAFVMQjF7cNTWED8B1cgwW20yfJgAvrssAsZ1cB3g/xckAxr6FmCDU5N6f488BrpCQ4rQBJkiMYh4ACmLzwOQF0CExinkCsvw7vgGikl+OotaKRwAAAABJRU5ErkJggg==
|
[Mod loader: Quilt/Fabric]: https://img.shields.io/badge/modloader-Quilt%2FFabric-blueviolet?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAACXBIWXMAAADGAAAAxgGwdJvFAAAFU0lEQVR4nO1bwW7bOBCdCHtP+wUNxIvhS7yA7kkPOjf9AKPam4/OF2zzB96bblXhH0jPPkS5G1jnIvgib/IFtX/ALoYZemmKtEWRRe3aDzAsURbJGQ6HM4/02Wq1gmNGcNTSnxQA8IdakDK4AOCfJpj3SpiI98r2rAMAbxrWNWFFOMeL1nCJdXQa1gPTbpCbnm34ABIeBThv2hgAfOyVcF+2ZwkAfHGo54kVIRe6NVxiny4d6vpn2g36ugfqFLhwFB6kkUoc67k0XLv0qYKj9wEnBXiqZwEAf/ZKOOuV8BkLWBFesyI8A4C/LOt6AoC39C7HtBvg9Vt65hUnC/BUDzrOf1MGq5S9WkDZnuVle7ZqsBKgw/tO73K0hku8/u64EmhxsoA96MMvxdEroBIKO+CWoshnqqJPYTAGRJ8sql3QO3Op7D19D3z7AV8KeAGArFf+32lWhDwnKNuzuaUCclaE93KBiOU9hMQV+FLAOxz9lPHRR0VkZXs2oBDUNon5ULZnKOgcYwl4FTwna/K+CtRRwIK+dTnCCwkP9I0fkXmh4FcN+6UKqqtHblvtb+18po4TvKaPilsS8qVuYx5havsbJXS1I0ZVAXP1B5jfyzm+hAnN+We1XPluioX03kJtY9oNtG1T+b1aburDxhRAQVMGHw3z9k65F41nktmjUnjjrAj7ZXv27ECIyEKgBd7saBuka7lsPu0GA1MjR0+KVpwgMTlrMkN4YoztlZ/2camTvD0QjcWZF6KxMgcLyKbdAN+HKOb1y6PYH49gEsUwUKw1G48gi2KQZcApkYxH1eldUQBxeKbkRfXEQjDZ21+h2bMiHJDwH2wk1rSX0XWueHZd2yCZ/oVSnilTaA3VAiqjRRahQ0JBjuov3ijfPqAua0kUg67tmyjWCmvsS504wGQRnywjPJ8wtY3xw3827fjMBXziUalL3DcNrIzYRwXcTbvBZ7lgPHoNxKKYky1/+2xsHxXQbw2X/EIoggQHyjC9Yh8VcC6NshDc66jLOHpC5KSAPejDL8U+KuArboTQZgjHeARn+MFnvhvbRyfYaQ2XfNkTVFgUr/mIxlvkJuyjAjCae6BrYQUPW37vhDpT4MnAsCyIgbHBnYbcADJt7/t+deBCiSWsCG8sOv5IgU2FnJh2g+RnBDl1oCpgogqEx1TEURUFokx+tpCYnEzzjg1kh+fq/Ix9OXpG6OjjgI1VIGWcOMhlXh4PPdAz1VTe90rIU8Z/L9JUnALXSK4SjSUzOY+Y1ekyOlzjaamTvf3X8cjunBH1v6OeVtsG1QI66qYEVkoVmyA/O5fYmIHjgSsrskUavAc6q1BLeXXiANMZu0HKwGav7opGv+LticZqHOToLBeZrJRxC97qjOsowCTgZYO9OlNa25haMwgvsFMJPp3gLW1ji8b6dO89fhfYIbzAl23T4adtjyNvD6/mbbs9Xgs1hRcwWoIvCxDb47nQNm5aRDHvoPGcblNYCi+gtQSfU+AdLYfioLXYtHA9eruBhsILVJRwUIGQo/ACG0o4GAV4El5grQSffMA3SqbEnBdb1zeunfYsvAB3jL4UwE92KauA2NnNbLerNKhEqJ6Q+FIAOjpcATAVzjFHoC3qC9OurCW0W9s+6vXpAy4p0hPkSUL3ziNHiY3tqfNdQN4jORgnSEGMLyU8Udbq1QIEdEyRF3hSwlp4vKkwQimrHDuxAR6S4tleFIPzERnhSFXQEtbkD1kbwiMOlhJroISK8IiDpcQsp4NWeMRBc4I1lWAUHnHwpOgOJWwVHvFbsMIGJewUHvFb7QuQYxR/ttgIzbUAgB9KOM3uc+PN7QAAAABJRU5ErkJggg==
|
||||||
|
|||||||
43
build.gradle
@@ -3,11 +3,9 @@ plugins {
|
|||||||
id 'java-library'
|
id 'java-library'
|
||||||
id 'maven-publish'
|
id 'maven-publish'
|
||||||
id 'com.github.johnrengelman.shadow' version '7.0.0'
|
id 'com.github.johnrengelman.shadow' version '7.0.0'
|
||||||
id 'org.cadixdev.licenser' version '0.6.1'
|
|
||||||
id 'com.modrinth.minotaur' version '1.2.+'
|
id 'com.modrinth.minotaur' version '1.2.+'
|
||||||
}
|
}
|
||||||
|
|
||||||
import net.fabricmc.loom.task.RemapJarTask
|
|
||||||
import com.google.gson.GsonBuilder
|
import com.google.gson.GsonBuilder
|
||||||
import com.google.gson.JsonObject
|
import com.google.gson.JsonObject
|
||||||
import com.modrinth.minotaur.TaskModrinthUpload
|
import com.modrinth.minotaur.TaskModrinthUpload
|
||||||
@@ -41,14 +39,6 @@ String getMCVersionString() {
|
|||||||
return version[0] + '.' + version[1]
|
return version[0] + '.' + version[1]
|
||||||
}
|
}
|
||||||
|
|
||||||
String getTerraformersMCMaven() {
|
|
||||||
def terraformersUrl = 'https://maven.terraformersmc.com/'
|
|
||||||
if (pingUrl(terraformersUrl))
|
|
||||||
return terraformersUrl
|
|
||||||
else
|
|
||||||
return 'https://maven.kotlindiscord.com/repository/terraformers/'
|
|
||||||
}
|
|
||||||
|
|
||||||
boolean pingUrl(String address) {
|
boolean pingUrl(String address) {
|
||||||
try {
|
try {
|
||||||
def conn = (HttpURLConnection) new URL(address).openConnection()
|
def conn = (HttpURLConnection) new URL(address).openConnection()
|
||||||
@@ -65,7 +55,6 @@ String parseReadme() {
|
|||||||
|
|
||||||
def readme = (String) file('README.md').text
|
def readme = (String) file('README.md').text
|
||||||
readme = readme.replaceAll(excludeRegex, '')
|
readme = readme.replaceAll(excludeRegex, '')
|
||||||
readme = readme.replaceAll(linkRegex, '')
|
|
||||||
return readme
|
return readme
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -82,18 +71,12 @@ repositories {
|
|||||||
name 'CottonMC'
|
name 'CottonMC'
|
||||||
url 'https://server.bbkr.space/artifactory/libs-snapshot'
|
url 'https://server.bbkr.space/artifactory/libs-snapshot'
|
||||||
}
|
}
|
||||||
maven {
|
maven { url "https://maven.terraformersmc.com/releases/" }
|
||||||
name 'TerraformersMC'
|
|
||||||
url getTerraformersMCMaven()
|
|
||||||
content {
|
|
||||||
includeGroup 'dev.emi'
|
|
||||||
includeGroup 'com.terraformersmc'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
maven { url 'https://maven.kosmx.dev' }
|
maven { url 'https://maven.kosmx.dev' }
|
||||||
maven { url 'https://maven.shedaniel.me/' }
|
maven { url 'https://maven.shedaniel.me/' }
|
||||||
maven { url 'https://jitpack.io' }
|
maven { url 'https://jitpack.io' }
|
||||||
maven { url "https://api.modrinth.com/maven" }
|
maven { url "https://api.modrinth.com/maven" }
|
||||||
|
maven { url 'https://maven.quiltmc.org/repository/release'}
|
||||||
}
|
}
|
||||||
|
|
||||||
configurations {
|
configurations {
|
||||||
@@ -121,10 +104,13 @@ dependencies {
|
|||||||
modImplementation "com.terraformersmc:modmenu:${project.modmenu_version}"
|
modImplementation "com.terraformersmc:modmenu:${project.modmenu_version}"
|
||||||
|
|
||||||
// Compatibility mods
|
// Compatibility mods
|
||||||
modImplementation("com.github.EnnuiL:okzoomer:e6a801b1a3") {
|
|
||||||
exclude group: 'com.terraformersmc'
|
// Ok Zoomer and LibZoomer are temporarily disabled for the time being, as we are currently using Reflection at runtime instead in OkZoomerCompat due to there being two major, completely incompatible API versions.
|
||||||
exclude group: 'dev.lambdaurora'
|
// modImplementation("maven.modrinth:ok-zoomer:${project.ok_zoomer_version}")
|
||||||
}
|
// modImplementation "io.github.ennuil:LibZoomer:${project.libzoomer_version}"
|
||||||
|
|
||||||
|
modImplementation "org.quiltmc:quilt-json5:1.0.0"
|
||||||
|
modImplementation("me.shedaniel:RoughlyEnoughItems-runtime-fabric:${project.rei_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}"
|
||||||
|
|
||||||
@@ -159,17 +145,6 @@ processResources {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
jar {
|
|
||||||
from('LICENSE') {
|
|
||||||
rename { "${it}_${project.archivesBaseName}" }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
license {
|
|
||||||
header file('HEADER')
|
|
||||||
include '**/*.java'
|
|
||||||
}
|
|
||||||
|
|
||||||
task publishModrinth(type: TaskModrinthUpload) {
|
task publishModrinth(type: TaskModrinthUpload) {
|
||||||
dependsOn(build)
|
dependsOn(build)
|
||||||
onlyIf {
|
onlyIf {
|
||||||
|
|||||||
@@ -8,10 +8,10 @@ yarn_mappings=1.18.1+build.22
|
|||||||
loader_version=0.13.3
|
loader_version=0.13.3
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
mod_version = 0.1.0
|
mod_version = 0.3.0
|
||||||
maven_group = eu.midnightdust
|
maven_group = eu.midnightdust
|
||||||
archives_base_name = midnightcontrols
|
archives_base_name = midnightcontrols
|
||||||
modrinth_id=W1D3UXEc
|
modrinth_id=bXX9h73M
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
|
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
|
||||||
@@ -21,3 +21,8 @@ midnightlib_version=0.4.0
|
|||||||
modmenu_version=2.0.2
|
modmenu_version=2.0.2
|
||||||
emotecraft_version=2.1-MC1.18.1-fabric
|
emotecraft_version=2.1-MC1.18.1-fabric
|
||||||
bendylib_version=2.0.+
|
bendylib_version=2.0.+
|
||||||
|
rei_version=7.4.456
|
||||||
|
|
||||||
|
# Ok Zoomer and LibZoomer are temporarily disabled for the time being, as we are currently using Reflection at runtime instead in OkZoomerCompat due to there being two major, completely incompatible API versions.
|
||||||
|
# ok_zoomer_version=5.0.0-beta.3+1.17.1
|
||||||
|
# libzoomer_version=0.3.0+1.17.1
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 57 KiB After Width: | Height: | Size: 86 KiB |
|
Before Width: | Height: | Size: 63 KiB After Width: | Height: | Size: 89 KiB |
@@ -26,10 +26,10 @@ import java.util.Objects;
|
|||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents the midnightcontrols mod.
|
* Represents the MidnightControls mod.
|
||||||
*
|
*
|
||||||
* @author LambdAurora
|
* @author LambdAurora & Motschen
|
||||||
* @version 1.7.0
|
* @version 1.8.0
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public class MidnightControls implements ModInitializer {
|
public class MidnightControls implements ModInitializer {
|
||||||
@@ -40,12 +40,12 @@ public class MidnightControls implements ModInitializer {
|
|||||||
|
|
||||||
public static final TranslatableText NOT_BOUND_TEXT = new TranslatableText("midnightcontrols.not_bound");
|
public static final TranslatableText NOT_BOUND_TEXT = new TranslatableText("midnightcontrols.not_bound");
|
||||||
|
|
||||||
public final Logger logger = LogManager.getLogger("midnightcontrols");
|
public final Logger logger = LogManager.getLogger("MidnightControls");
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onInitialize() {
|
public void onInitialize() {
|
||||||
INSTANCE = this;
|
INSTANCE = this;
|
||||||
this.log("Initializing midnightcontrols...");
|
this.log("Initializing MidnightControls...");
|
||||||
|
|
||||||
ServerPlayNetworking.registerGlobalReceiver(HELLO_CHANNEL, (server, player, handler, buf, responseSender) -> {
|
ServerPlayNetworking.registerGlobalReceiver(HELLO_CHANNEL, (server, player, handler, buf, responseSender) -> {
|
||||||
String version = buf.readString(32);
|
String version = buf.readString(32);
|
||||||
@@ -68,7 +68,7 @@ public class MidnightControls implements ModInitializer {
|
|||||||
* @param info the message to print
|
* @param info the message to print
|
||||||
*/
|
*/
|
||||||
public void log(String info) {
|
public void log(String info) {
|
||||||
this.logger.info("[midnightcontrols] " + info);
|
this.logger.info("[MidnightControls] " + info);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -77,7 +77,7 @@ public class MidnightControls implements ModInitializer {
|
|||||||
* @param warning the warning to print
|
* @param warning the warning to print
|
||||||
*/
|
*/
|
||||||
public void warn(String warning) {
|
public void warn(String warning) {
|
||||||
this.logger.info("[midnightcontrols] " + warning);
|
this.logger.info("[MidnightControls] " + warning);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -119,9 +119,9 @@ public class MidnightControls implements ModInitializer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the midnightcontrols instance.
|
* Gets the MidnightControls instance.
|
||||||
*
|
*
|
||||||
* @return the midnightcontrols instance
|
* @return the MidnightControls instance
|
||||||
*/
|
*/
|
||||||
public static MidnightControls get() {
|
public static MidnightControls get() {
|
||||||
return INSTANCE;
|
return INSTANCE;
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ package eu.midnightdust.midnightcontrols;
|
|||||||
import net.minecraft.util.Identifier;
|
import net.minecraft.util.Identifier;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents the constants used by midnightcontrols.
|
* Represents the constants used by MidnightControls.
|
||||||
*
|
*
|
||||||
* @author LambdAurora
|
* @author LambdAurora
|
||||||
* @version 1.1.0
|
* @version 1.1.0
|
||||||
@@ -23,5 +23,5 @@ public class MidnightControlsConstants {
|
|||||||
public static final String NAMESPACE = "midnightcontrols";
|
public static final String NAMESPACE = "midnightcontrols";
|
||||||
public static final Identifier CONTROLS_MODE_CHANNEL = new Identifier(NAMESPACE, "controls_mode");
|
public static final Identifier CONTROLS_MODE_CHANNEL = new Identifier(NAMESPACE, "controls_mode");
|
||||||
public static final Identifier FEATURE_CHANNEL = new Identifier(NAMESPACE, "feature");
|
public static final Identifier FEATURE_CHANNEL = new Identifier(NAMESPACE, "feature");
|
||||||
public static final Identifier HELLO_CHANNEL = new Identifier(NAMESPACE, "hello");
|
public static final Identifier HELLO_CHANNEL = new Identifier("lambdacontrols", "hello");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -98,6 +98,15 @@ public class MidnightControlsFeature implements Nameable {
|
|||||||
this.enabled = enabled;
|
this.enabled = enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Refreshes the enabled values from the config.
|
||||||
|
*/
|
||||||
|
public static void refreshEnabled() {
|
||||||
|
MidnightControlsFeature.VERTICAL_REACHAROUND.setEnabled(MidnightControlsConfig.verticalReacharound);
|
||||||
|
MidnightControlsFeature.FAST_BLOCK_PLACING.setEnabled(MidnightControlsConfig.fastBlockPlacing);
|
||||||
|
MidnightControlsFeature.HORIZONTAL_REACHAROUND.setEnabled(MidnightControlsConfig.horizontalReacharound);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns whether this feature is available or not.
|
* Returns whether this feature is available or not.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ public class MidnightControlsClient extends MidnightControls implements ClientMo
|
|||||||
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");
|
||||||
public static final Identifier CURSOR_TEXTURE = new Identifier(MidnightControlsConstants.NAMESPACE, "textures/gui/cursor.png");
|
public static final Identifier CURSOR_TEXTURE = new Identifier(MidnightControlsConstants.NAMESPACE, "textures/gui/cursor.png");
|
||||||
public final static File MAPPINGS_FILE = new File("config/gamecontrollerdb.txt");
|
public final static File MAPPINGS_FILE = new File("config/gamecontrollercustommappings.txt");
|
||||||
public final MidnightInput input = new MidnightInput();
|
public final MidnightInput input = new MidnightInput();
|
||||||
public final MidnightRing ring = new MidnightRing(this);
|
public final MidnightRing ring = new MidnightRing(this);
|
||||||
public final MidnightReacharound reacharound = new MidnightReacharound();
|
public final MidnightReacharound reacharound = new MidnightReacharound();
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ package eu.midnightdust.midnightcontrols.client;
|
|||||||
|
|
||||||
import eu.midnightdust.lib.config.MidnightConfig;
|
import eu.midnightdust.lib.config.MidnightConfig;
|
||||||
import eu.midnightdust.midnightcontrols.ControlsMode;
|
import eu.midnightdust.midnightcontrols.ControlsMode;
|
||||||
|
import eu.midnightdust.midnightcontrols.MidnightControlsFeature;
|
||||||
import eu.midnightdust.midnightcontrols.client.controller.ButtonBinding;
|
import eu.midnightdust.midnightcontrols.client.controller.ButtonBinding;
|
||||||
import eu.midnightdust.midnightcontrols.client.controller.Controller;
|
import eu.midnightdust.midnightcontrols.client.controller.Controller;
|
||||||
import eu.midnightdust.midnightcontrols.client.controller.InputManager;
|
import eu.midnightdust.midnightcontrols.client.controller.InputManager;
|
||||||
@@ -30,23 +31,22 @@ import static org.lwjgl.glfw.GLFW.GLFW_GAMEPAD_AXIS_LEFT_Y;
|
|||||||
public class MidnightControlsConfig extends MidnightConfig {
|
public class MidnightControlsConfig extends MidnightConfig {
|
||||||
// General
|
// General
|
||||||
@Entry public static ControlsMode controlsMode = ControlsMode.DEFAULT;
|
@Entry public static ControlsMode controlsMode = ControlsMode.DEFAULT;
|
||||||
@Entry public static boolean autoSwitchMode = false;
|
@Entry public static boolean autoSwitchMode = true;
|
||||||
@Entry public static boolean debug = false;
|
@Entry public static boolean debug = false;
|
||||||
// HUD
|
// HUD
|
||||||
@Entry public static boolean hudEnable = true;
|
@Entry public static boolean hudEnable = true;
|
||||||
@Entry public static HudSide hudSide = HudSide.LEFT;
|
@Entry public static HudSide hudSide = HudSide.LEFT;
|
||||||
// Gameplay
|
// Gameplay
|
||||||
@Entry public static boolean analogMovement = true;
|
@Entry public static boolean analogMovement = true;
|
||||||
@Entry public static boolean fastBlockPlacing = true;
|
@Entry public static boolean fastBlockPlacing = false; // Disabled by default as this behaviour can be considered cheating on multiplayer servers.
|
||||||
@Entry public static boolean flyDrifting = false;
|
@Entry public static boolean flyDrifting = true; // Enabled by default as disabling this behaviour can be considered cheating on multiplayer servers. It can also conflict with some other mods.
|
||||||
@Entry public static boolean verticalFlyDrifting = true;
|
@Entry public static boolean verticalFlyDrifting = true; // Enabled by default as disabling this behaviour can be considered cheating on multiplayer servers.
|
||||||
@Entry public static boolean horizontalReacharound = false;
|
@Entry public static boolean horizontalReacharound = false; // Disabled by default as this behaviour can be considered cheating on multiplayer servers.
|
||||||
@Entry public static boolean verticalReacharound = false;
|
@Entry public static boolean verticalReacharound = false; // Disabled by default as this behaviour can be considered cheating on multiplayer servers.
|
||||||
@Entry public static boolean shouldRenderReacharoundOutline = true;
|
@Entry public static boolean shouldRenderReacharoundOutline = true;
|
||||||
@Entry public static int[] reacharoundOutlineColor = new int[]{255, 255, 255, 102};
|
@Entry public static int[] reacharoundOutlineColor = new int[]{255, 255, 255, 102};
|
||||||
// Controller
|
// Controller
|
||||||
@Entry public static ControllerType controllerType = ControllerType.DEFAULT;
|
@Entry public static ControllerType controllerType = ControllerType.DEFAULT;
|
||||||
//private static final double DEFAULT_DEAD_ZONE = 0.25;
|
|
||||||
@Entry public static double rightDeadZone = 0.25;
|
@Entry public static double rightDeadZone = 0.25;
|
||||||
@Entry public static double leftDeadZone = 0.25;
|
@Entry public static double leftDeadZone = 0.25;
|
||||||
@Entry public static boolean invertRightYAxis = false;
|
@Entry public static boolean invertRightYAxis = false;
|
||||||
@@ -57,18 +57,11 @@ public class MidnightControlsConfig extends MidnightConfig {
|
|||||||
@Entry public static boolean unfocusedInput = false;
|
@Entry public static boolean unfocusedInput = false;
|
||||||
@Entry public static boolean virtualMouse = false;
|
@Entry public static boolean virtualMouse = false;
|
||||||
@Entry public static VirtualMouseSkin virtualMouseSkin = VirtualMouseSkin.DEFAULT_LIGHT;
|
@Entry public static VirtualMouseSkin virtualMouseSkin = VirtualMouseSkin.DEFAULT_LIGHT;
|
||||||
// @Entry public static List<Pages> ringPages = new ArrayList<String>();
|
|
||||||
// @Entry public static double maxAnalog1 = 1;
|
|
||||||
// @Entry public static double maxAnalog2 = 1;
|
|
||||||
// @Entry public static double maxAnalog3 = 1;
|
|
||||||
// @Entry public static double maxAnalog4 = 1;
|
|
||||||
@Entry public static Object controllerID = 0;
|
@Entry public static Object controllerID = 0;
|
||||||
@Entry public static Object secondControllerID = -1;
|
@Entry public static Object secondControllerID = -1;
|
||||||
@Entry public static Map<String, String> BINDINGS = Map.of();
|
@Entry public static Map<String, String> BINDINGS = Map.of();
|
||||||
|
|
||||||
private static final Pattern BUTTON_BINDING_PATTERN = Pattern.compile("(-?\\d+)\\+?");
|
private static final Pattern BUTTON_BINDING_PATTERN = Pattern.compile("(-?\\d+)\\+?");
|
||||||
// Gameplay.
|
|
||||||
// Controller settings
|
|
||||||
@Entry public static double[] maxAnalogValues = new double[]{DEFAULT_MAX_VALUE, DEFAULT_MAX_VALUE, DEFAULT_MAX_VALUE, DEFAULT_MAX_VALUE};
|
@Entry public static double[] maxAnalogValues = new double[]{DEFAULT_MAX_VALUE, DEFAULT_MAX_VALUE, DEFAULT_MAX_VALUE, DEFAULT_MAX_VALUE};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -88,6 +81,7 @@ public class MidnightControlsConfig extends MidnightConfig {
|
|||||||
public static void save() {
|
public static void save() {
|
||||||
MidnightControlsConfig.write("midnightcontrols");
|
MidnightControlsConfig.write("midnightcontrols");
|
||||||
MidnightControlsClient.get().log("Configuration saved.");
|
MidnightControlsClient.get().log("Configuration saved.");
|
||||||
|
MidnightControlsFeature.refreshEnabled();
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Gets the used controller.
|
* Gets the used controller.
|
||||||
@@ -124,7 +118,7 @@ public class MidnightControlsConfig extends MidnightConfig {
|
|||||||
if (raw instanceof Number) {
|
if (raw instanceof Number) {
|
||||||
if (((Number) raw).intValue() == -1)
|
if (((Number) raw).intValue() == -1)
|
||||||
return Optional.empty();
|
return Optional.empty();
|
||||||
return Optional.of(Controller.byId((Integer) raw));
|
return Optional.of(Controller.byId(((Number) raw).intValue()));
|
||||||
} else if (raw instanceof String) {
|
} else if (raw instanceof String) {
|
||||||
return Optional.of(Controller.byGuid((String) raw).orElse(Controller.byId(GLFW.GLFW_JOYSTICK_1)));
|
return Optional.of(Controller.byGuid((String) raw).orElse(Controller.byId(GLFW.GLFW_JOYSTICK_1)));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ import net.minecraft.client.MinecraftClient;
|
|||||||
import net.minecraft.client.gui.Element;
|
import net.minecraft.client.gui.Element;
|
||||||
import net.minecraft.client.gui.ParentElement;
|
import net.minecraft.client.gui.ParentElement;
|
||||||
import net.minecraft.client.gui.screen.Screen;
|
import net.minecraft.client.gui.screen.Screen;
|
||||||
|
import net.minecraft.client.gui.screen.TitleScreen;
|
||||||
import net.minecraft.client.gui.screen.advancement.AdvancementTab;
|
import net.minecraft.client.gui.screen.advancement.AdvancementTab;
|
||||||
import net.minecraft.client.gui.screen.advancement.AdvancementsScreen;
|
import net.minecraft.client.gui.screen.advancement.AdvancementsScreen;
|
||||||
import net.minecraft.client.gui.screen.ingame.CreativeInventoryScreen;
|
import net.minecraft.client.gui.screen.ingame.CreativeInventoryScreen;
|
||||||
@@ -70,7 +71,7 @@ import static org.lwjgl.glfw.GLFW.*;
|
|||||||
public class MidnightInput {
|
public class MidnightInput {
|
||||||
private static final Map<Integer, Integer> BUTTON_COOLDOWNS = new HashMap<>();
|
private static final Map<Integer, Integer> BUTTON_COOLDOWNS = new HashMap<>();
|
||||||
// Cooldowns
|
// Cooldowns
|
||||||
private int actionGuiCooldown = 0;
|
public int actionGuiCooldown = 0;
|
||||||
private boolean ignoreNextARelease = false;
|
private boolean ignoreNextARelease = false;
|
||||||
private double targetYaw = 0.0;
|
private double targetYaw = 0.0;
|
||||||
private double targetPitch = 0.0;
|
private double targetPitch = 0.0;
|
||||||
@@ -312,7 +313,7 @@ public class MidnightInput {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (button == GLFW.GLFW_GAMEPAD_BUTTON_B) {
|
if (button == GLFW.GLFW_GAMEPAD_BUTTON_B) {
|
||||||
if (client.currentScreen != null) {
|
if (client.currentScreen != null && client.currentScreen.getClass() != TitleScreen.class) {
|
||||||
if (!MidnightControlsCompat.handleMenuBack(client, client.currentScreen))
|
if (!MidnightControlsCompat.handleMenuBack(client, client.currentScreen))
|
||||||
if (!this.tryGoBack(client.currentScreen))
|
if (!this.tryGoBack(client.currentScreen))
|
||||||
client.currentScreen.onClose();
|
client.currentScreen.onClose();
|
||||||
|
|||||||
@@ -13,9 +13,7 @@ import eu.midnightdust.midnightcontrols.client.MidnightControlsClient;
|
|||||||
import eu.midnightdust.midnightcontrols.client.controller.ButtonBinding;
|
import eu.midnightdust.midnightcontrols.client.controller.ButtonBinding;
|
||||||
import io.github.kosmx.emotes.arch.gui.screen.ingame.FastChosseScreen;
|
import io.github.kosmx.emotes.arch.gui.screen.ingame.FastChosseScreen;
|
||||||
import io.github.kosmx.emotes.main.network.ClientEmotePlay;
|
import io.github.kosmx.emotes.main.network.ClientEmotePlay;
|
||||||
import net.minecraft.client.gui.screen.Screen;
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.lwjgl.glfw.GLFW;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a compatibility handler for Emotecraft.
|
* Represents a compatibility handler for Emotecraft.
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ import java.util.stream.Stream;
|
|||||||
* @since 1.1.0
|
* @since 1.1.0
|
||||||
*/
|
*/
|
||||||
public class MidnightControlsCompat {
|
public class MidnightControlsCompat {
|
||||||
private static final List<CompatHandler> HANDLERS = new ArrayList<>();
|
public static final List<CompatHandler> HANDLERS = new ArrayList<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initializes compatibility with other mods if needed.
|
* Initializes compatibility with other mods if needed.
|
||||||
@@ -40,7 +40,7 @@ public class MidnightControlsCompat {
|
|||||||
*/
|
*/
|
||||||
public static void init(@NotNull MidnightControlsClient mod) {
|
public static void init(@NotNull MidnightControlsClient mod) {
|
||||||
if (FabricLoader.getInstance().isModLoaded("okzoomer")) {
|
if (FabricLoader.getInstance().isModLoaded("okzoomer")) {
|
||||||
mod.log("Adding okzoomer compatibility...");
|
mod.log("Adding Ok Zoomer compatibility...");
|
||||||
HANDLERS.add(new OkZoomerCompat());
|
HANDLERS.add(new OkZoomerCompat());
|
||||||
}
|
}
|
||||||
/*if (isReiPresent()) {
|
/*if (isReiPresent()) {
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ public class MidnightControlsMixinPlugin implements IMixinConfigPlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void putConditionalMixin(@NotNull String path, boolean condition) {
|
private void putConditionalMixin(@NotNull String path, boolean condition) {
|
||||||
this.conditionalMixins.put("me.lambdaurora.midnightcontrols.client.compat.mixin." + path, condition);
|
this.conditionalMixins.put("eu.midnightdust.midnightcontrols.client.compat.mixin." + path, condition);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright © 2021 LambdAurora <aurora42lambda@gmail.com>
|
* Copyright © 2021-2022 Karen/あけみ <karen@akemi.ai>, LambdAurora <aurora42lambda@gmail.com>
|
||||||
*
|
*
|
||||||
* This file is part of midnightcontrols.
|
* This file is part of MidnightControls.
|
||||||
*
|
*
|
||||||
* Licensed under the MIT license. For more information,
|
* Licensed under the MIT license. For more information,
|
||||||
* see the LICENSE file.
|
* see the LICENSE file.
|
||||||
@@ -11,49 +11,173 @@ package eu.midnightdust.midnightcontrols.client.compat;
|
|||||||
|
|
||||||
import eu.midnightdust.midnightcontrols.client.MidnightControlsClient;
|
import eu.midnightdust.midnightcontrols.client.MidnightControlsClient;
|
||||||
import eu.midnightdust.midnightcontrols.client.controller.ButtonBinding;
|
import eu.midnightdust.midnightcontrols.client.controller.ButtonBinding;
|
||||||
import io.github.ennuil.okzoomer.keybinds.ZoomKeybinds;
|
import net.minecraft.client.option.KeyBinding;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
import org.aperlambda.lambdacommon.utils.LambdaReflection;
|
||||||
import org.lwjgl.glfw.GLFW;
|
import org.lwjgl.glfw.GLFW;
|
||||||
|
|
||||||
|
import java.lang.reflect.Field;
|
||||||
|
import java.lang.reflect.InvocationTargetException;
|
||||||
|
import java.lang.reflect.Method;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a compatibility handler for OkZoomer.
|
* Represents a compatibility handler for Ok Zoomer.
|
||||||
*
|
*
|
||||||
* @author LambdAurora
|
* @author Karen/あけみ, LambdAurora
|
||||||
* @version 1.4.3
|
* @version 1.4.3
|
||||||
* @since 1.1.0
|
* @since 1.1.0
|
||||||
*/
|
*/
|
||||||
public class OkZoomerCompat implements CompatHandler {
|
public class OkZoomerCompat implements CompatHandler {
|
||||||
|
private boolean didAllReflectionCallsSucceed = false;
|
||||||
|
|
||||||
|
private KeyBinding okZoomerZoomKey;
|
||||||
|
private KeyBinding okZoomerIncreaseZoomKey;
|
||||||
|
private KeyBinding okZoomerDecreaseZoomKey;
|
||||||
|
private KeyBinding okZoomerResetZoomKey;
|
||||||
|
|
||||||
|
private Method okZoomerAreExtraKeyBindsEnabledMethod;
|
||||||
|
|
||||||
|
public OkZoomerCompat() {
|
||||||
|
// These strings represent the names of the classes, fields, and methods we use from the Ok Zoomer API
|
||||||
|
String okZoomerZoomKeybindsClassString;
|
||||||
|
|
||||||
|
String okZoomerZoomKeyFieldString;
|
||||||
|
String okZoomerIncreaseZoomKeyFieldString;
|
||||||
|
String okZoomerDecreaseZoomKeyFieldString;
|
||||||
|
String okZoomerResetZoomKeyFieldString;
|
||||||
|
|
||||||
|
String okZoomerAreExtraKeyBindsEnabledMethodNameString;
|
||||||
|
|
||||||
|
// These variables represent the actual objects that we reflect to
|
||||||
|
Class<?> okZoomerZoomKeybindsClass;
|
||||||
|
|
||||||
|
Field okZoomerZoomKeyField;
|
||||||
|
Field okZoomerIncreaseZoomKeyField;
|
||||||
|
Field okZoomerDecreaseZoomKeyField;
|
||||||
|
Field okZoomerResetZoomKeyField;
|
||||||
|
|
||||||
|
// First, we need to determine which version of the Ok Zoomer API we're dealing with here.
|
||||||
|
if (LambdaReflection.doesClassExist("io.github.ennuil.okzoomer.keybinds.ZoomKeybinds")) {
|
||||||
|
// https://github.com/EnnuiL/OkZoomer/blob/5.0.0-beta.3+1.17.1/src/main/java/io/github/ennuil/okzoomer/keybinds/ZoomKeybinds.java
|
||||||
|
MidnightControlsClient.get().log("Ok Zoomer version 5.0.0-beta.3 or below detected!");
|
||||||
|
|
||||||
|
okZoomerZoomKeybindsClassString = "io.github.ennuil.okzoomer.keybinds.ZoomKeybinds";
|
||||||
|
|
||||||
|
okZoomerZoomKeyFieldString = "zoomKey";
|
||||||
|
okZoomerIncreaseZoomKeyFieldString = "increaseZoomKey";
|
||||||
|
okZoomerDecreaseZoomKeyFieldString = "decreaseZoomKey";
|
||||||
|
okZoomerResetZoomKeyFieldString = "resetZoomKey";
|
||||||
|
|
||||||
|
okZoomerAreExtraKeyBindsEnabledMethodNameString = "areExtraKeybindsEnabled";
|
||||||
|
} else if (LambdaReflection.doesClassExist("io.github.ennuil.okzoomer.key_binds.ZoomKeyBinds")) {
|
||||||
|
// https://github.com/EnnuiL/OkZoomer/blob/5.0.0-beta.6+1.18.2/src/main/java/io/github/ennuil/okzoomer/key_binds/ZoomKeyBinds.java
|
||||||
|
MidnightControlsClient.get().log("Ok Zoomer version 5.0.0-beta.4 or above detected!");
|
||||||
|
|
||||||
|
okZoomerZoomKeybindsClassString = "io.github.ennuil.okzoomer.key_binds.ZoomKeyBinds";
|
||||||
|
|
||||||
|
okZoomerZoomKeyFieldString = "ZOOM_KEY";
|
||||||
|
okZoomerIncreaseZoomKeyFieldString = "INCREASE_ZOOM_KEY";
|
||||||
|
okZoomerDecreaseZoomKeyFieldString = "DECREASE_ZOOM_KEY";
|
||||||
|
okZoomerResetZoomKeyFieldString = "RESET_ZOOM_KEY";
|
||||||
|
|
||||||
|
okZoomerAreExtraKeyBindsEnabledMethodNameString = "areExtraKeyBindsEnabled";
|
||||||
|
} else {
|
||||||
|
// If both of the above checks fail, then the version of the Ok Zoomer API that the user is trying to use is too new.
|
||||||
|
MidnightControlsClient.get().warn("The version of Ok Zoomer that you are currently using is too new, and is not yet supported by MidnightControls!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Reflect to the ZoomKeyBinds (>= 5.0.0-beta.4) / ZoomKeybinds (<= 5.0.0-beta.3) class.
|
||||||
|
try {
|
||||||
|
okZoomerZoomKeybindsClass = Class.forName(okZoomerZoomKeybindsClassString);
|
||||||
|
} catch (ClassNotFoundException exception) {
|
||||||
|
// This theoretically should never happen.
|
||||||
|
MidnightControlsClient.get().warn("MidnightControls failed to reflect to the Ok Zoomer keybinds class!");
|
||||||
|
exception.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Reflect to all of the keybind fields.
|
||||||
|
try {
|
||||||
|
okZoomerZoomKeyField = okZoomerZoomKeybindsClass.getField(okZoomerZoomKeyFieldString);
|
||||||
|
okZoomerIncreaseZoomKeyField = okZoomerZoomKeybindsClass.getField(okZoomerIncreaseZoomKeyFieldString);
|
||||||
|
okZoomerDecreaseZoomKeyField = okZoomerZoomKeybindsClass.getField(okZoomerDecreaseZoomKeyFieldString);
|
||||||
|
okZoomerResetZoomKeyField = okZoomerZoomKeybindsClass.getField(okZoomerResetZoomKeyFieldString);
|
||||||
|
} catch (NoSuchFieldException exception) {
|
||||||
|
MidnightControlsClient.get().warn("MidnightControls failed to reflect to the Ok Zoomer keybind fields!");
|
||||||
|
exception.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Initialise KeyBinding objects
|
||||||
|
try {
|
||||||
|
okZoomerZoomKey = (KeyBinding) okZoomerZoomKeyField.get(null);
|
||||||
|
okZoomerIncreaseZoomKey = (KeyBinding) okZoomerIncreaseZoomKeyField.get(null);
|
||||||
|
okZoomerDecreaseZoomKey = (KeyBinding) okZoomerDecreaseZoomKeyField.get(null);
|
||||||
|
okZoomerResetZoomKey = (KeyBinding) okZoomerResetZoomKeyField.get(null);
|
||||||
|
} catch (IllegalAccessException exception) {
|
||||||
|
MidnightControlsClient.get().warn("MidnightControls failed to reflect to the Ok Zoomer keybind objects!");
|
||||||
|
exception.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Reflect to the areExtraKeyBindsEnabled (>= 5.0.0-beta.4) / areExtraKeybindsEnabled (<= 5.0.0-beta.3) method.
|
||||||
|
// TODO: Consider replacing this entirely with getExtraKeyBind (>= 5.0.0-beta.4) / getExtraKeybind (<= 5.0.0-beta.3) in the future.
|
||||||
|
try {
|
||||||
|
okZoomerAreExtraKeyBindsEnabledMethod = okZoomerZoomKeybindsClass.getDeclaredMethod(okZoomerAreExtraKeyBindsEnabledMethodNameString);
|
||||||
|
} catch (NoSuchMethodException exception) {
|
||||||
|
MidnightControlsClient.get().warn("MidnightControls failed to reflect to an Ok Zoomer method (areExtraKeyBindsEnabled / areExtraKeybindsEnabled)!");
|
||||||
|
exception.printStackTrace();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
didAllReflectionCallsSucceed = true;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void handle(@NotNull MidnightControlsClient mod) {
|
public void handle(@NotNull MidnightControlsClient mod) {
|
||||||
new ButtonBinding.Builder("zoom")
|
if (didAllReflectionCallsSucceed) {
|
||||||
.buttons(GLFW.GLFW_GAMEPAD_BUTTON_DPAD_UP, GLFW.GLFW_GAMEPAD_BUTTON_X)
|
new ButtonBinding.Builder("zoom")
|
||||||
.onlyInGame()
|
.buttons(GLFW.GLFW_GAMEPAD_BUTTON_DPAD_UP, GLFW.GLFW_GAMEPAD_BUTTON_X)
|
||||||
.cooldown(true)
|
.onlyInGame()
|
||||||
.category(ButtonBinding.MISC_CATEGORY)
|
.cooldown(true)
|
||||||
.linkKeybind(ZoomKeybinds.zoomKey)
|
.category(ButtonBinding.MISC_CATEGORY)
|
||||||
.register();
|
.linkKeybind(okZoomerZoomKey)
|
||||||
|
.register();
|
||||||
|
|
||||||
if (ZoomKeybinds.areExtraKeybindsEnabled()) {
|
boolean okZoomerAreExtraKeyBindsEnabled = false;
|
||||||
new ButtonBinding.Builder("zoom_in")
|
try {
|
||||||
.buttons(GLFW.GLFW_GAMEPAD_BUTTON_DPAD_UP, ButtonBinding.axisAsButton(GLFW.GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER, true))
|
okZoomerAreExtraKeyBindsEnabled = (boolean) okZoomerAreExtraKeyBindsEnabledMethod.invoke(null);
|
||||||
.onlyInGame()
|
} catch (IllegalAccessException exception) {
|
||||||
.cooldown(true)
|
MidnightControlsClient.get().warn("MidnightControls encountered an IllegalAccessException while attempting to invoke a reflected Ok Zoomer method (areExtraKeyBindsEnabled / areExtraKeybindsEnabled)!");
|
||||||
.category(ButtonBinding.MISC_CATEGORY)
|
exception.printStackTrace();
|
||||||
.linkKeybind(ZoomKeybinds.increaseZoomKey)
|
} catch (InvocationTargetException exception) {
|
||||||
.register();
|
MidnightControlsClient.get().warn("MidnightControls encountered an InvocationTargetException while attempting to invoke a reflected Ok Zoomer method (areExtraKeyBindsEnabled / areExtraKeybindsEnabled)!");
|
||||||
new ButtonBinding.Builder("zoom_out")
|
exception.printStackTrace();
|
||||||
.buttons(GLFW.GLFW_GAMEPAD_BUTTON_DPAD_UP, ButtonBinding.axisAsButton(GLFW.GLFW_GAMEPAD_AXIS_LEFT_TRIGGER, true))
|
}
|
||||||
.onlyInGame()
|
|
||||||
.cooldown(true)
|
if (okZoomerAreExtraKeyBindsEnabled) {
|
||||||
.category(ButtonBinding.MISC_CATEGORY)
|
new ButtonBinding.Builder("zoom_in")
|
||||||
.linkKeybind(ZoomKeybinds.decreaseZoomKey)
|
.buttons(GLFW.GLFW_GAMEPAD_BUTTON_DPAD_UP, ButtonBinding.axisAsButton(GLFW.GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER, true))
|
||||||
.register();
|
.onlyInGame()
|
||||||
new ButtonBinding.Builder("zoom_reset")
|
.cooldown(true)
|
||||||
.onlyInGame()
|
.category(ButtonBinding.MISC_CATEGORY)
|
||||||
.cooldown(true)
|
.linkKeybind(okZoomerIncreaseZoomKey)
|
||||||
.category(ButtonBinding.MISC_CATEGORY)
|
.register();
|
||||||
.linkKeybind(ZoomKeybinds.resetZoomKey)
|
new ButtonBinding.Builder("zoom_out")
|
||||||
.register();
|
.buttons(GLFW.GLFW_GAMEPAD_BUTTON_DPAD_UP, ButtonBinding.axisAsButton(GLFW.GLFW_GAMEPAD_AXIS_LEFT_TRIGGER, true))
|
||||||
|
.onlyInGame()
|
||||||
|
.cooldown(true)
|
||||||
|
.category(ButtonBinding.MISC_CATEGORY)
|
||||||
|
.linkKeybind(okZoomerDecreaseZoomKey)
|
||||||
|
.register();
|
||||||
|
new ButtonBinding.Builder("zoom_reset")
|
||||||
|
.onlyInGame()
|
||||||
|
.cooldown(true)
|
||||||
|
.category(ButtonBinding.MISC_CATEGORY)
|
||||||
|
.linkKeybind(okZoomerResetZoomKey)
|
||||||
|
.register();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,15 +11,39 @@ package eu.midnightdust.midnightcontrols.client.compat;
|
|||||||
|
|
||||||
import eu.midnightdust.midnightcontrols.client.ButtonState;
|
import eu.midnightdust.midnightcontrols.client.ButtonState;
|
||||||
import eu.midnightdust.midnightcontrols.client.MidnightControlsClient;
|
import eu.midnightdust.midnightcontrols.client.MidnightControlsClient;
|
||||||
|
import eu.midnightdust.midnightcontrols.client.compat.mixin.EntryListWidgetAccessor;
|
||||||
|
import eu.midnightdust.midnightcontrols.client.compat.mixin.EntryWidgetAccessor;
|
||||||
import eu.midnightdust.midnightcontrols.client.controller.ButtonBinding;
|
import eu.midnightdust.midnightcontrols.client.controller.ButtonBinding;
|
||||||
import eu.midnightdust.midnightcontrols.client.controller.InputHandlers;
|
import eu.midnightdust.midnightcontrols.client.controller.InputHandlers;
|
||||||
import eu.midnightdust.midnightcontrols.client.controller.PressAction;
|
import eu.midnightdust.midnightcontrols.client.controller.PressAction;
|
||||||
|
import me.shedaniel.rei.RoughlyEnoughItemsCoreClient;
|
||||||
|
import me.shedaniel.rei.impl.client.ClientHelperImpl;
|
||||||
|
import me.shedaniel.rei.impl.client.REIRuntimeImpl;
|
||||||
|
import me.shedaniel.rei.impl.client.gui.ScreenOverlayImpl;
|
||||||
|
import me.shedaniel.rei.impl.client.gui.screen.CompositeDisplayViewingScreen;
|
||||||
|
import me.shedaniel.rei.impl.client.gui.screen.DefaultDisplayViewingScreen;
|
||||||
|
import me.shedaniel.rei.impl.client.gui.widget.EntryListEntryWidget;
|
||||||
|
import me.shedaniel.rei.impl.client.gui.widget.EntryWidget;
|
||||||
|
import me.shedaniel.rei.impl.client.registry.screen.ScreenRegistryImpl;
|
||||||
|
import me.shedaniel.rei.impl.common.entry.AbstractEntryStack;
|
||||||
|
import net.fabricmc.fabric.api.client.screenhandler.v1.ScreenRegistry;
|
||||||
|
import net.fabricmc.fabric.api.screenhandler.v1.ScreenHandlerRegistry;
|
||||||
import net.minecraft.client.MinecraftClient;
|
import net.minecraft.client.MinecraftClient;
|
||||||
|
import net.minecraft.client.gui.Element;
|
||||||
|
import net.minecraft.client.gui.Selectable;
|
||||||
import net.minecraft.client.gui.screen.Screen;
|
import net.minecraft.client.gui.screen.Screen;
|
||||||
|
import net.minecraft.client.gui.widget.ButtonWidget;
|
||||||
|
import net.minecraft.client.gui.widget.EntryListWidget;
|
||||||
import net.minecraft.util.Identifier;
|
import net.minecraft.util.Identifier;
|
||||||
|
import net.minecraft.util.Pair;
|
||||||
|
import org.aperlambda.lambdacommon.utils.LambdaReflection;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
|
import static eu.midnightdust.midnightcontrols.client.compat.CompatHandler.SlotPos.INVALID_SLOT;
|
||||||
import static org.lwjgl.glfw.GLFW.*;
|
import static org.lwjgl.glfw.GLFW.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -30,11 +54,11 @@ import static org.lwjgl.glfw.GLFW.*;
|
|||||||
* @since 1.2.0
|
* @since 1.2.0
|
||||||
*/
|
*/
|
||||||
public class ReiCompat implements CompatHandler {
|
public class ReiCompat implements CompatHandler {
|
||||||
//private static EntryListWidget ENTRY_LIST_WIDGET;
|
private static EntryListWidget ENTRY_LIST_WIDGET;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void handle(@NotNull MidnightControlsClient mod) {
|
public void handle(@NotNull MidnightControlsClient mod) {
|
||||||
ButtonBinding.builder(new Identifier("rei", "category_back"))
|
/*ButtonBinding.builder(new Identifier("rei", "category_back"))
|
||||||
.buttons(GLFW_GAMEPAD_BUTTON_LEFT_BUMPER)
|
.buttons(GLFW_GAMEPAD_BUTTON_LEFT_BUMPER)
|
||||||
.filter((client, binding) -> isViewingScreen(client.currentScreen))
|
.filter((client, binding) -> isViewingScreen(client.currentScreen))
|
||||||
.action(handleTab(false))
|
.action(handleTab(false))
|
||||||
@@ -87,38 +111,40 @@ public class ReiCompat implements CompatHandler {
|
|||||||
.action(handleShowRecipeUsage(false))
|
.action(handleShowRecipeUsage(false))
|
||||||
.cooldown(true)
|
.cooldown(true)
|
||||||
.register();
|
.register();
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean requireMouseOnScreen(Screen screen) {
|
public boolean requireMouseOnScreen(Screen screen) {
|
||||||
return isViewingScreen(screen) /*|| screen instanceof PreRecipeViewingScreen*/;
|
return isViewingScreen(screen);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public @Nullable SlotPos getSlotAt(@NotNull Screen screen, int mouseX, int mouseY) {
|
public @Nullable CompatHandler.SlotPos getSlotAt(@NotNull Screen screen, int mouseX, int mouseY) {
|
||||||
/*var overlay = ScreenHelper.getOptionalOverlay();
|
|
||||||
if (overlay.isPresent() && overlay.get().isInside(mouseX, mouseY)) {
|
ScreenOverlayImpl overlay = ScreenOverlayImpl.getInstance();
|
||||||
var widget = getEntryListWidget();
|
if (overlay.isInside(mouseX, mouseY)) {
|
||||||
|
EntryListWidget widget = getEntryListWidget();
|
||||||
if (widget == null)
|
if (widget == null)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
var slot = this.getSlotAt(widget, mouseX, mouseY, false);
|
return this.getSlotAt(widget, mouseX, mouseY, false);
|
||||||
if (slot != null && slot != INVALID_SLOT)
|
|
||||||
return slot;
|
|
||||||
} else if (isViewingScreen(screen)) {
|
} else if (isViewingScreen(screen)) {
|
||||||
for (var element : screen.children()) {
|
for (Element element : screen.children()) {
|
||||||
var slot = this.getSlotAt(element, mouseX, mouseY, true);
|
var slot = this.getSlotAt(element, mouseX, mouseY, true);
|
||||||
if (slot != null && slot != INVALID_SLOT)
|
if (slot != null)
|
||||||
return slot;
|
return slot;
|
||||||
}
|
}
|
||||||
}*/
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*private @Nullable SlotPos getSlotAt(@NotNull Element element, int mouseX, int mouseY, boolean allowEmpty) {
|
private @Nullable CompatHandler.SlotPos getSlotAt(@NotNull Element element, int mouseX, int mouseY, boolean allowEmpty) {
|
||||||
if (element instanceof EntryWidget entry) {
|
if (element instanceof EntryWidget) {
|
||||||
|
EntryWidget entry = (EntryWidget) element;
|
||||||
if (entry.containsMouse(mouseX, mouseY)) {
|
if (entry.containsMouse(mouseX, mouseY)) {
|
||||||
if (!allowEmpty && entry.entries().isEmpty())
|
if (!allowEmpty && entry.getEntries().isEmpty())
|
||||||
return INVALID_SLOT;
|
return INVALID_SLOT;
|
||||||
return new SlotPos(entry.getBounds().getX() + 1, entry.getBounds().getY() + 1);
|
return new SlotPos(entry.getBounds().getX() + 1, entry.getBounds().getY() + 1);
|
||||||
}
|
}
|
||||||
@@ -137,11 +163,10 @@ public class ReiCompat implements CompatHandler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}*/
|
}
|
||||||
|
|
||||||
private static boolean isViewingScreen(Screen screen) {
|
private static boolean isViewingScreen(Screen screen) {
|
||||||
return true;
|
return screen instanceof DefaultDisplayViewingScreen || screen instanceof CompositeDisplayViewingScreen;
|
||||||
//return screen instanceof DefaultDisplayViewingScreen || screen instanceof CompositeDisplayViewingScreen;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -149,12 +174,12 @@ public class ReiCompat implements CompatHandler {
|
|||||||
if (!isViewingScreen(screen))
|
if (!isViewingScreen(screen))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
/*MinecraftClient.getInstance().openScreen(REIRuntimeImpl.getInstance().getPreviousContainerScreen());
|
MinecraftClient.getInstance().setScreen(REIRuntimeImpl.getInstance().getPreviousContainerScreen());
|
||||||
ScreenHelper.getLastOverlay().init();*/
|
REIRuntimeImpl.getInstance().getLastOverlay().init();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*private static EntryListWidget getEntryListWidget() {
|
private static EntryListWidget getEntryListWidget() {
|
||||||
if (ENTRY_LIST_WIDGET == null) {
|
if (ENTRY_LIST_WIDGET == null) {
|
||||||
ENTRY_LIST_WIDGET = LambdaReflection.getFirstFieldOfType(ContainerScreenOverlay.class, EntryListWidget.class)
|
ENTRY_LIST_WIDGET = LambdaReflection.getFirstFieldOfType(ContainerScreenOverlay.class, EntryListWidget.class)
|
||||||
.map(field -> (EntryListWidget) LambdaReflection.getFieldValue(null, field))
|
.map(field -> (EntryListWidget) LambdaReflection.getFieldValue(null, field))
|
||||||
@@ -163,55 +188,56 @@ public class ReiCompat implements CompatHandler {
|
|||||||
return ENTRY_LIST_WIDGET;
|
return ENTRY_LIST_WIDGET;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static @Nullable EntryStack getCurrentStack(@NotNull MinecraftClient client) {
|
private static @Nullable AbstractEntryStack getCurrentStack(@NotNull MinecraftClient client) {
|
||||||
double x = client.mouse.getX() * (double) client.getWindow().getScaledWidth() / (double) client.getWindow().getWidth();
|
double x = client.mouse.getX() * (double) client.getWindow().getScaledWidth() / (double) client.getWindow().getWidth();
|
||||||
double y = client.mouse.getY() * (double) client.getWindow().getScaledHeight() / (double) client.getWindow().getHeight();
|
double y = client.mouse.getY() * (double) client.getWindow().getScaledHeight() / (double) client.getWindow().getHeight();
|
||||||
|
|
||||||
if (isViewingScreen(client.currentScreen)) {
|
if (isViewingScreen(client.currentScreen)) {
|
||||||
for (var element : client.currentScreen.children()) {
|
for (Element element : client.currentScreen.children()) {
|
||||||
var stack = getCurrentStack(element, x, y);
|
EntryStack stack = getCurrentStack(element, x, y);
|
||||||
if (stack != null)
|
if (stack != null)
|
||||||
return stack;
|
return stack;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var overlay = ScreenHelper.getOptionalOverlay();
|
Optional<ContainerScreenOverlay> overlay = REIRuntimeImpl.getInstance().getOverlay(false,false);
|
||||||
if (!overlay.isPresent())
|
if (!overlay.isPresent())
|
||||||
return RecipeHelper.getInstance().getScreenFocusedStack(client.currentScreen);
|
return RecipeHelper.getInstance().getScreenFocusedStack(client.currentScreen);
|
||||||
var widget = getEntryListWidget();
|
EntryListWidget widget = getEntryListWidget();
|
||||||
if (widget == null)
|
if (widget == null)
|
||||||
return RecipeHelper.getInstance().getScreenFocusedStack(client.currentScreen);
|
return ScreenOverlayImpl.getInstance().getInstance().getOverlayMenu()..getScreenFocusedStack(client.currentScreen);
|
||||||
|
|
||||||
return getCurrentStack(widget, x, y);
|
return getCurrentStack(widget, x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static @Nullable EntryStack getCurrentStack(@NotNull Element element, double mouseX, double mouseY) {
|
private static @Nullable EntryStack getCurrentStack(@NotNull Element element, double mouseX, double mouseY) {
|
||||||
if (element instanceof EntryWidget entry) {
|
if (element instanceof EntryWidget) {
|
||||||
|
EntryWidget entry = (EntryWidget) element;
|
||||||
if (entry.containsMouse(mouseX, mouseY))
|
if (entry.containsMouse(mouseX, mouseY))
|
||||||
return ((EntryWidgetAccessor) entry).midnightcontrols_getCurrentEntry();
|
return ((EntryWidgetAccessor) entry).lambdacontrols_getCurrentEntry();
|
||||||
} else if (element instanceof EntryListWidget) {
|
} else if (element instanceof EntryListWidget) {
|
||||||
var entries = ((EntryListWidgetAccessor) element).getEntries();
|
List<EntryListEntryWidget> entries = ((EntryListWidgetAccessor) element).getEntries();
|
||||||
for (EntryListEntryWidget entry : entries) {
|
for (EntryListEntryWidget entry : entries) {
|
||||||
if (entry.containsMouse(mouseX, mouseY)) {
|
if (entry.containsMouse(mouseX, mouseY)) {
|
||||||
return ((EntryWidgetAccessor) entry).midnightcontrols_getCurrentEntry();
|
return ((EntryWidgetAccessor) entry).lambdacontrols_getCurrentEntry();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (!(element instanceof ButtonWidget) && element instanceof WidgetWithBounds widgetWithBounds) {
|
} else if (!(element instanceof ButtonWidget) && element instanceof WidgetWithBounds) {
|
||||||
for (var child : widgetWithBounds.children()) {
|
for (Element child : ((WidgetWithBounds) element).children()) {
|
||||||
var stack = getCurrentStack(child, mouseX, mouseY);
|
EntryStack stack = getCurrentStack(child, mouseX, mouseY);
|
||||||
if (stack != null)
|
if (stack != null)
|
||||||
return stack;
|
return stack;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}*/
|
}
|
||||||
|
|
||||||
private static PressAction handleShowRecipeUsage(boolean usage) {
|
private static PressAction handleShowRecipeUsage(boolean usage) {
|
||||||
return (client, button, value, action) -> {
|
return (client, button, value, action) -> {
|
||||||
if (action.isUnpressed())
|
if (action.isUnpressed())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
/*EntryStack stack = RecipeHelper.getInstance().getScreenFocusedStack(client.currentScreen);
|
EntryStack stack = RecipeHelper.getInstance().getScreenFocusedStack(client.currentScreen);
|
||||||
if (stack == null) {
|
if (stack == null) {
|
||||||
stack = getCurrentStack(client);
|
stack = getCurrentStack(client);
|
||||||
}
|
}
|
||||||
@@ -223,7 +249,7 @@ public class ReiCompat implements CompatHandler {
|
|||||||
} else {
|
} else {
|
||||||
return ClientHelper.getInstance().openView(ClientHelper.ViewSearchBuilder.builder().addRecipesFor(stack).setOutputNotice(stack).fillPreferredOpenedCategory());
|
return ClientHelper.getInstance().openView(ClientHelper.ViewSearchBuilder.builder().addRecipesFor(stack).setOutputNotice(stack).fillPreferredOpenedCategory());
|
||||||
}
|
}
|
||||||
}*/
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
@@ -234,11 +260,11 @@ public class ReiCompat implements CompatHandler {
|
|||||||
if (action == ButtonState.RELEASE)
|
if (action == ButtonState.RELEASE)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
/*Optional<ContainerScreenOverlay> overlay = ScreenHelper.getOptionalOverlay();
|
Optional<ContainerScreenOverlay> overlay = ScreenHelper.getOptionalOverlay();
|
||||||
if (!overlay.isPresent())
|
if (!overlay.isPresent())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
var widget = getEntryListWidget();
|
EntryListWidget widget = getEntryListWidget();
|
||||||
if (widget == null)
|
if (widget == null)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@@ -246,7 +272,7 @@ public class ReiCompat implements CompatHandler {
|
|||||||
widget.nextPage();
|
widget.nextPage();
|
||||||
else
|
else
|
||||||
widget.previousPage();
|
widget.previousPage();
|
||||||
widget.updateEntriesPosition();*/
|
widget.updateEntriesPosition();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
@@ -258,27 +284,28 @@ public class ReiCompat implements CompatHandler {
|
|||||||
* @param next True if the action is to switch to the next tab.
|
* @param next True if the action is to switch to the next tab.
|
||||||
* @return The handler.
|
* @return The handler.
|
||||||
*/
|
*/
|
||||||
|
/*
|
||||||
private static PressAction handleTab(boolean next) {
|
private static PressAction handleTab(boolean next) {
|
||||||
return (client, button, value, action) -> {
|
return (client, button, value, action) -> {
|
||||||
if (action != ButtonState.RELEASE)
|
if (action != ButtonState.RELEASE)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
/*if (client.currentScreen instanceof DefaultDisplayViewingScreen) {
|
if (client.currentScreen instanceof RecipeViewingScreen) {
|
||||||
RecipeViewingScreenAccessor screen = (RecipeViewingScreenAccessor) client.currentScreen;
|
RecipeViewingScreenAccessor screen = (RecipeViewingScreenAccessor) client.currentScreen;
|
||||||
if (next)
|
if (next)
|
||||||
screen.getCategoryNext().onClick();
|
screen.getCategoryNext().onClick();
|
||||||
else
|
else
|
||||||
screen.getCategoryBack().onClick();
|
screen.getCategoryBack().onClick();
|
||||||
return true;
|
return true;
|
||||||
} else if (client.currentScreen instanceof CompositeDisplayViewingScreen) {
|
} else if (client.currentScreen instanceof VillagerRecipeViewingScreen) {
|
||||||
VillagerRecipeViewingScreenAccessor screen = (VillagerRecipeViewingScreenAccessor) client.currentScreen;
|
VillagerRecipeViewingScreenAccessor screen = (VillagerRecipeViewingScreenAccessor) client.currentScreen;
|
||||||
List<RecipeCategory<?>> categories = screen.getCategories();
|
List<RecipeCategory<?>> categories = screen.getCategories();
|
||||||
int currentTab = screen.getSelectedCategoryIndex();
|
int currentTab = screen.getSelectedCategoryIndex();
|
||||||
screen.setSelectedCategoryIndex(getNextIndex(currentTab, categories.size(), next));
|
screen.setSelectedCategoryIndex(getNextIndex(currentTab, categories.size(), next));
|
||||||
screen.setSelectedRecipeIndex(0);
|
screen.setSelectedRecipeIndex(0);
|
||||||
screen.midnightcontrols_init();
|
screen.lambdacontrols_init();
|
||||||
return true;
|
return true;
|
||||||
}*/
|
}
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -288,13 +315,15 @@ public class ReiCompat implements CompatHandler {
|
|||||||
if (action.isUnpressed())
|
if (action.isUnpressed())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
/*if (client.currentScreen instanceof RecipeViewingScreenAccessor screen) {
|
if (client.currentScreen instanceof RecipeViewingScreen) {
|
||||||
|
RecipeViewingScreenAccessor screen = (RecipeViewingScreenAccessor) client.currentScreen;
|
||||||
if (next)
|
if (next)
|
||||||
screen.getRecipeNext().onClick();
|
screen.getRecipeNext().onClick();
|
||||||
else
|
else
|
||||||
screen.getRecipeBack().onClick();
|
screen.getRecipeBack().onClick();
|
||||||
return true;
|
return true;
|
||||||
} else if (client.currentScreen instanceof VillagerRecipeViewingScreenAccessor screen) {
|
} else if (client.currentScreen instanceof VillagerRecipeViewingScreen) {
|
||||||
|
VillagerRecipeViewingScreenAccessor screen = (VillagerRecipeViewingScreenAccessor) client.currentScreen;
|
||||||
List<RecipeCategory<?>> categories = screen.getCategories();
|
List<RecipeCategory<?>> categories = screen.getCategories();
|
||||||
int currentTab = screen.getSelectedCategoryIndex();
|
int currentTab = screen.getSelectedCategoryIndex();
|
||||||
List<RecipeDisplay> recipes = screen.getCategoryMap().get(categories.get(currentTab));
|
List<RecipeDisplay> recipes = screen.getCategoryMap().get(categories.get(currentTab));
|
||||||
@@ -315,10 +344,10 @@ public class ReiCompat implements CompatHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
screen.setSelectedRecipeIndex(nextRecipe);
|
screen.setSelectedRecipeIndex(nextRecipe);
|
||||||
screen.midnightcontrols_init();
|
screen.lambdacontrols_init();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}*/
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
@@ -332,4 +361,5 @@ public class ReiCompat implements CompatHandler {
|
|||||||
nextIndex = 0;
|
nextIndex = 0;
|
||||||
return nextIndex;
|
return nextIndex;
|
||||||
}
|
}
|
||||||
}
|
*/
|
||||||
|
}
|
||||||
@@ -9,6 +9,13 @@
|
|||||||
|
|
||||||
package eu.midnightdust.midnightcontrols.client.compat.mixin;
|
package eu.midnightdust.midnightcontrols.client.compat.mixin;
|
||||||
|
|
||||||
|
import net.minecraft.client.gui.Element;
|
||||||
|
import net.minecraft.client.gui.widget.EntryListWidget;
|
||||||
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.gen.Accessor;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents an accessor to REI's EntryListWidget.
|
* Represents an accessor to REI's EntryListWidget.
|
||||||
*
|
*
|
||||||
@@ -16,8 +23,8 @@ package eu.midnightdust.midnightcontrols.client.compat.mixin;
|
|||||||
* @version 1.5.0
|
* @version 1.5.0
|
||||||
* @since 1.5.0
|
* @since 1.5.0
|
||||||
*/
|
*/
|
||||||
//@Mixin(value = EntryListWidget.class, remap = false)
|
@Mixin(value = EntryListWidget.class, remap = false)
|
||||||
public interface EntryListWidgetAccessor {
|
public interface EntryListWidgetAccessor {
|
||||||
/*@Accessor(value = "entries")
|
@Accessor(value = "children")
|
||||||
List<EntryListEntryWidget> getEntries();*/
|
List<Element> getEntries();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,8 @@ import org.lwjgl.glfw.GLFWGamepadState;
|
|||||||
import org.lwjgl.system.MemoryStack;
|
import org.lwjgl.system.MemoryStack;
|
||||||
import org.lwjgl.system.MemoryUtil;
|
import org.lwjgl.system.MemoryUtil;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.*;
|
||||||
|
import java.net.URL;
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
@@ -145,9 +146,23 @@ public record Controller(int id) implements Nameable {
|
|||||||
*/
|
*/
|
||||||
public static void updateMappings() {
|
public static void updateMappings() {
|
||||||
try {
|
try {
|
||||||
|
MidnightControlsClient.get().log("Updating controller mappings...");
|
||||||
|
File databaseFile = new File("config/gamecontrollerdatabase.txt");
|
||||||
|
try {
|
||||||
|
BufferedInputStream in = new BufferedInputStream(new URL("https://raw.githubusercontent.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt").openStream());
|
||||||
|
|
||||||
|
BufferedOutputStream out = new BufferedOutputStream(new FileOutputStream(databaseFile));
|
||||||
|
byte[] dataBuffer = new byte[1024];
|
||||||
|
int bytesRead;
|
||||||
|
while ((bytesRead = in.read(dataBuffer, 0, 1024)) != -1) {
|
||||||
|
out.write(dataBuffer, 0, bytesRead);
|
||||||
|
}
|
||||||
|
out.close();
|
||||||
|
} catch (Exception ignored) {/* Just continue when internet connection is not available */}
|
||||||
|
var database = ioResourceToBuffer(databaseFile.getPath(), 1024);
|
||||||
|
GLFW.glfwUpdateGamepadMappings(database);
|
||||||
if (!MidnightControlsClient.MAPPINGS_FILE.exists())
|
if (!MidnightControlsClient.MAPPINGS_FILE.exists())
|
||||||
return;
|
return;
|
||||||
MidnightControlsClient.get().log("Updating controller mappings...");
|
|
||||||
var buffer = ioResourceToBuffer(MidnightControlsClient.MAPPINGS_FILE.getPath(), 1024);
|
var buffer = ioResourceToBuffer(MidnightControlsClient.MAPPINGS_FILE.getPath(), 1024);
|
||||||
GLFW.glfwUpdateGamepadMappings(buffer);
|
GLFW.glfwUpdateGamepadMappings(buffer);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import eu.midnightdust.midnightcontrols.MidnightControlsConstants;
|
|||||||
import eu.midnightdust.midnightcontrols.client.HudSide;
|
import eu.midnightdust.midnightcontrols.client.HudSide;
|
||||||
import eu.midnightdust.midnightcontrols.client.MidnightControlsClient;
|
import eu.midnightdust.midnightcontrols.client.MidnightControlsClient;
|
||||||
import eu.midnightdust.midnightcontrols.client.MidnightControlsConfig;
|
import eu.midnightdust.midnightcontrols.client.MidnightControlsConfig;
|
||||||
|
import eu.midnightdust.midnightcontrols.client.MidnightInput;
|
||||||
import eu.midnightdust.midnightcontrols.client.compat.MidnightControlsCompat;
|
import eu.midnightdust.midnightcontrols.client.compat.MidnightControlsCompat;
|
||||||
import eu.midnightdust.midnightcontrols.client.controller.ButtonBinding;
|
import eu.midnightdust.midnightcontrols.client.controller.ButtonBinding;
|
||||||
import dev.lambdaurora.spruceui.hud.Hud;
|
import dev.lambdaurora.spruceui.hud.Hud;
|
||||||
|
|||||||
@@ -9,6 +9,10 @@
|
|||||||
|
|
||||||
package eu.midnightdust.midnightcontrols.client.gui;
|
package eu.midnightdust.midnightcontrols.client.gui;
|
||||||
|
|
||||||
|
import com.mojang.blaze3d.systems.RenderSystem;
|
||||||
|
import dev.lambdaurora.spruceui.background.Background;
|
||||||
|
import dev.lambdaurora.spruceui.widget.SpruceWidget;
|
||||||
|
import eu.midnightdust.lib.util.MidnightColorUtil;
|
||||||
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.MidnightControlsConfig;
|
||||||
@@ -27,6 +31,7 @@ import net.fabricmc.fabric.api.client.networking.v1.ClientPlayNetworking;
|
|||||||
import net.minecraft.client.MinecraftClient;
|
import net.minecraft.client.MinecraftClient;
|
||||||
import net.minecraft.client.gui.screen.Screen;
|
import net.minecraft.client.gui.screen.Screen;
|
||||||
import net.minecraft.client.gui.widget.ButtonWidget;
|
import net.minecraft.client.gui.widget.ButtonWidget;
|
||||||
|
import net.minecraft.client.render.*;
|
||||||
import net.minecraft.client.resource.language.I18n;
|
import net.minecraft.client.resource.language.I18n;
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
import net.minecraft.text.LiteralText;
|
import net.minecraft.text.LiteralText;
|
||||||
@@ -35,8 +40,11 @@ import net.minecraft.text.Text;
|
|||||||
import net.minecraft.text.TranslatableText;
|
import net.minecraft.text.TranslatableText;
|
||||||
import net.minecraft.util.Formatting;
|
import net.minecraft.util.Formatting;
|
||||||
import net.minecraft.util.Util;
|
import net.minecraft.util.Util;
|
||||||
|
import net.minecraft.util.math.Matrix4f;
|
||||||
import org.lwjgl.glfw.GLFW;
|
import org.lwjgl.glfw.GLFW;
|
||||||
|
|
||||||
|
import java.awt.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents the midnightcontrols settings screen.
|
* Represents the midnightcontrols settings screen.
|
||||||
*/
|
*/
|
||||||
@@ -158,7 +166,7 @@ public class MidnightControlsSettingsScreen extends SpruceScreen {
|
|||||||
ClientPlayNetworking.getSender().sendPacket(MidnightControls.CONTROLS_MODE_CHANNEL, this.mod.makeControlsModeBuffer(next));
|
ClientPlayNetworking.getSender().sendPacket(MidnightControls.CONTROLS_MODE_CHANNEL, this.mod.makeControlsModeBuffer(next));
|
||||||
}
|
}
|
||||||
}, option -> option.getDisplayText(new TranslatableText(MidnightControlsConfig.controlsMode.getTranslationKey())),
|
}, option -> option.getDisplayText(new TranslatableText(MidnightControlsConfig.controlsMode.getTranslationKey())),
|
||||||
new TranslatableText("midnightcontrols.tooltip.controls_mode"));
|
new TranslatableText("midnightcontrols.tooltip.controlsMidnightColorUtil.radialRainbow(1f,1f);_mode"));
|
||||||
this.autoSwitchModeOption = new SpruceToggleBooleanOption("midnightcontrols.menu.auto_switch_mode", () -> MidnightControlsConfig.autoSwitchMode,
|
this.autoSwitchModeOption = new SpruceToggleBooleanOption("midnightcontrols.menu.auto_switch_mode", () -> MidnightControlsConfig.autoSwitchMode,
|
||||||
value -> MidnightControlsConfig.autoSwitchMode = value, new TranslatableText("midnightcontrols.tooltip.auto_switch_mode"));
|
value -> MidnightControlsConfig.autoSwitchMode = value, new TranslatableText("midnightcontrols.tooltip.auto_switch_mode"));
|
||||||
this.rotationSpeedOption = new SpruceDoubleOption("midnightcontrols.menu.rotation_speed", 0.0, 100.0, .5f,
|
this.rotationSpeedOption = new SpruceDoubleOption("midnightcontrols.menu.rotation_speed", 0.0, 100.0, .5f,
|
||||||
@@ -250,6 +258,7 @@ public class MidnightControlsSettingsScreen extends SpruceScreen {
|
|||||||
@Override
|
@Override
|
||||||
protected void init() {
|
protected void init() {
|
||||||
super.init();
|
super.init();
|
||||||
|
Controller.updateMappings();
|
||||||
|
|
||||||
this.buildTabs();
|
this.buildTabs();
|
||||||
|
|
||||||
@@ -262,6 +271,7 @@ public class MidnightControlsSettingsScreen extends SpruceScreen {
|
|||||||
var tabs = new SpruceTabbedWidget(Position.of(0, 24), this.width, this.height - 32 - 24,
|
var tabs = new SpruceTabbedWidget(Position.of(0, 24), this.width, this.height - 32 - 24,
|
||||||
null,
|
null,
|
||||||
Math.max(116, this.width / 8), 0);
|
Math.max(116, this.width / 8), 0);
|
||||||
|
tabs.getList().setBackground(new MidnightControlsBackground());
|
||||||
this.addDrawableChild(tabs);
|
this.addDrawableChild(tabs);
|
||||||
|
|
||||||
tabs.addSeparatorEntry(new TranslatableText("midnightcontrols.menu.separator.general"));
|
tabs.addSeparatorEntry(new TranslatableText("midnightcontrols.menu.separator.general"));
|
||||||
@@ -368,4 +378,35 @@ public class MidnightControlsSettingsScreen extends SpruceScreen {
|
|||||||
public void renderTitle(MatrixStack matrices, int mouseX, int mouseY, float delta) {
|
public void renderTitle(MatrixStack matrices, int mouseX, int mouseY, float delta) {
|
||||||
drawCenteredText(matrices, this.textRenderer, I18n.translate("midnightcontrols.menu.title"), this.width / 2, 8, 16777215);
|
drawCenteredText(matrices, this.textRenderer, I18n.translate("midnightcontrols.menu.title"), this.width / 2, 8, 16777215);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static class MidnightControlsBackground implements Background {
|
||||||
|
@Override
|
||||||
|
public void render(MatrixStack matrixStack, SpruceWidget widget, int vOffset, int mouseX, int mouseY, float delta) {
|
||||||
|
fill(matrixStack, widget.getX(), widget.getY(), widget.getX() + widget.getWidth(), widget.getY() + widget.getHeight(), MidnightColorUtil.hex2Rgb("#000000"));
|
||||||
|
}
|
||||||
|
private void fill(MatrixStack matrixStack, int x2, int y2, int x1, int y1, Color color) {
|
||||||
|
matrixStack.push();
|
||||||
|
|
||||||
|
Matrix4f matrix = matrixStack.peek().getPositionMatrix();
|
||||||
|
float r = (float)(color.getRed()) / 255.0F;
|
||||||
|
float g = (float)(color.getGreen()) / 255.0F;
|
||||||
|
float b = (float)(color.getBlue()) / 255.0F;
|
||||||
|
float t = (float)(160) / 255.0F;
|
||||||
|
BufferBuilder bufferBuilder = Tessellator.getInstance().getBuffer();
|
||||||
|
RenderSystem.enableBlend();
|
||||||
|
RenderSystem.disableTexture();
|
||||||
|
RenderSystem.defaultBlendFunc();
|
||||||
|
RenderSystem.setShader(GameRenderer::getPositionColorShader);
|
||||||
|
bufferBuilder.begin(VertexFormat.DrawMode.QUADS, VertexFormats.POSITION_COLOR);
|
||||||
|
bufferBuilder.vertex(matrix, (float)x1, (float)y2, 0.0F).color(r, g, b, t).next();
|
||||||
|
bufferBuilder.vertex(matrix, (float)x2, (float)y2, 0.0F).color(r, g, b, t).next();
|
||||||
|
bufferBuilder.vertex(matrix, (float)x2, (float)y1, 0.0F).color(r, g, b, t).next();
|
||||||
|
bufferBuilder.vertex(matrix, (float)x1, (float)y1, 0.0F).color(r, g, b, t).next();
|
||||||
|
bufferBuilder.end();
|
||||||
|
BufferRenderer.draw(bufferBuilder);
|
||||||
|
RenderSystem.enableTexture();
|
||||||
|
RenderSystem.disableBlend();
|
||||||
|
matrixStack.pop();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
148
src/main/resources/assets/midnightcontrols/lang/de_de.json
Normal file
@@ -0,0 +1,148 @@
|
|||||||
|
{
|
||||||
|
"midnightcontrols.midnightconfig.title": "MidnightControls Erweiterte Konfiguration",
|
||||||
|
"key.midnightcontrols.look_down": "Nach unten schauen",
|
||||||
|
"key.midnightcontrols.look_left": "Nach links schauen",
|
||||||
|
"key.midnightcontrols.look_right": "Nach rechts schauen",
|
||||||
|
"key.midnightcontrols.look_up": "Nach oben schauen",
|
||||||
|
"key.midnightcontrols.ring": "Zeige Steuerungsring",
|
||||||
|
"midnightcontrols.action.attack": "Angreifen",
|
||||||
|
"midnightcontrols.action.back": "Zurück",
|
||||||
|
"midnightcontrols.action.chat": "Chat öffnen",
|
||||||
|
"midnightcontrols.action.drop_item": "Item droppen",
|
||||||
|
"midnightcontrols.action.exit": "Schließen",
|
||||||
|
"midnightcontrols.action.forward": "Vorwärts",
|
||||||
|
"midnightcontrols.action.hit": "Schlagen",
|
||||||
|
"midnightcontrols.action.hotbar_left": "Hotbar nach links",
|
||||||
|
"midnightcontrols.action.hotbar_right": "Hotbar nach rechts",
|
||||||
|
"midnightcontrols.action.inventory": "Inventar",
|
||||||
|
"midnightcontrols.action.jump": "Springen",
|
||||||
|
"midnightcontrols.action.left": "Links",
|
||||||
|
"midnightcontrols.action.pause_game": "Spiel pausieren",
|
||||||
|
"midnightcontrols.action.pick_block": "Block auswählen",
|
||||||
|
"midnightcontrols.action.pickup": "Aufheben",
|
||||||
|
"midnightcontrols.action.pickup_all": "Alles aufheben",
|
||||||
|
"midnightcontrols.action.place": "Platzieren",
|
||||||
|
"midnightcontrols.action.player_list": "Spielerliste",
|
||||||
|
"midnightcontrols.action.quick_move": "Schnell bewegen",
|
||||||
|
"midnightcontrols.action.right": "Rechts",
|
||||||
|
"midnightcontrols.action.screenshot": "Screenshot aufnehmen",
|
||||||
|
"midnightcontrols.action.sneak": "Schleichen",
|
||||||
|
"midnightcontrols.action.sprint": "Sprinten",
|
||||||
|
"midnightcontrols.action.swap_hands": "Hände wechseln",
|
||||||
|
"midnightcontrols.action.toggle_perspective": "Perspektive wechseln",
|
||||||
|
"midnightcontrols.action.toggle_smooth_camera": "Cinematische Kamera",
|
||||||
|
"midnightcontrols.action.use": "Benutzen",
|
||||||
|
"midnightcontrols.action.zoom": "Zoom",
|
||||||
|
"midnightcontrols.action.zoom_in": "Zoom erhöhen",
|
||||||
|
"midnightcontrols.action.zoom_out": "Zoom verringern",
|
||||||
|
"midnightcontrols.action.zoom_reset": "Zoom zurücksetzen",
|
||||||
|
"midnightcontrols.action.key.emotecraft.fastchoose": "Emote Schnellauswahl",
|
||||||
|
"midnightcontrols.action.key.emotecraft.stop": "Emote stoppen",
|
||||||
|
"midnightcontrols.button.left_bumper": "Linke Schultertaste",
|
||||||
|
"midnightcontrols.button.right_bumper": "Rechte Schultertaste",
|
||||||
|
"midnightcontrols.button.back": "Zurück",
|
||||||
|
"midnightcontrols.button.start": "Start",
|
||||||
|
"midnightcontrols.button.guide": "Guide",
|
||||||
|
"midnightcontrols.button.left_thumb": "Linker Stick",
|
||||||
|
"midnightcontrols.button.right_thumb": "Rechter Stick",
|
||||||
|
"midnightcontrols.button.dpad_up": "Steuerkreuz hoch",
|
||||||
|
"midnightcontrols.button.dpad_right": "Steuerkreuz rechts",
|
||||||
|
"midnightcontrols.button.dpad_down": "Steuerkreuz runter",
|
||||||
|
"midnightcontrols.button.dpad_left": "Steuerkreuz links",
|
||||||
|
"midnightcontrols.button.l4": "L4",
|
||||||
|
"midnightcontrols.button.l5": "L5",
|
||||||
|
"midnightcontrols.button.r4": "R4",
|
||||||
|
"midnightcontrols.button.r5": "L5",
|
||||||
|
"midnightcontrols.axis.left_x+": "Links X+",
|
||||||
|
"midnightcontrols.axis.left_y+": "Links Y+",
|
||||||
|
"midnightcontrols.axis.right_x+": "Rechts X+",
|
||||||
|
"midnightcontrols.axis.right_y+": "Rechts Y+",
|
||||||
|
"midnightcontrols.axis.left_trigger": "Linker Trigger",
|
||||||
|
"midnightcontrols.axis.right_trigger": "Rechter Trigger",
|
||||||
|
"midnightcontrols.axis.left_x-": "Links X-",
|
||||||
|
"midnightcontrols.axis.left_y-": "Links Y-",
|
||||||
|
"midnightcontrols.axis.right_x-": "Rechts X-",
|
||||||
|
"midnightcontrols.axis.right_y-": "Rechts Y-",
|
||||||
|
"midnightcontrols.button.unknown": "Unbekannt (%d)",
|
||||||
|
"midnightcontrols.controller.connected": "Controller %d verbunden.",
|
||||||
|
"midnightcontrols.controller.disconnected": "Controller %d getrennt.",
|
||||||
|
"midnightcontrols.controller.mappings.1": "Um die Controller-Mappings anzupassen, benutze %s",
|
||||||
|
"midnightcontrols.controller.mappings.3": "und füge die Controller-Mappings in den Mapping-Editor ein.",
|
||||||
|
"midnightcontrols.controller.mappings.error": "Fehler beim Laden der Controller-Mappings.",
|
||||||
|
"midnightcontrols.controller.mappings.error.write": "Fehler beim Schreiben der Controller Mappings.",
|
||||||
|
"midnightcontrols.controller.mappings.updated": "Mappings aktualisiert!",
|
||||||
|
"midnightcontrols.controller_type.default": "Standard",
|
||||||
|
"midnightcontrols.controls_mode.default": "Tastatur/Maus",
|
||||||
|
"midnightcontrols.controls_mode.controller": "Controller",
|
||||||
|
"midnightcontrols.controls_mode.touchscreen": "Touchscreen",
|
||||||
|
"midnightcontrols.hud_side.left": "links",
|
||||||
|
"midnightcontrols.hud_side.right": "rechts",
|
||||||
|
"midnightcontrols.menu.analog_movement": "Analoge Bewegung",
|
||||||
|
"midnightcontrols.menu.auto_switch_mode": "Automatischer Wechsel",
|
||||||
|
"midnightcontrols.menu.controller": "Controller",
|
||||||
|
"midnightcontrols.menu.controller2": "Zweiter Controller",
|
||||||
|
"midnightcontrols.menu.controller_type": "Controller-Typ",
|
||||||
|
"midnightcontrols.menu.controls_mode": "Modus",
|
||||||
|
"midnightcontrols.menu.fast_block_placing": "Schnelles Bauen",
|
||||||
|
"midnightcontrols.menu.fly_drifting": "Flug-Drifting",
|
||||||
|
"midnightcontrols.menu.fly_drifting_vertical": "Vertikales Flug-Drifting",
|
||||||
|
"midnightcontrols.menu.hud_enable": "HUD aktivieren",
|
||||||
|
"midnightcontrols.menu.hud_side": "HUD-Seite",
|
||||||
|
"midnightcontrols.menu.invert_right_x_axis": "X rechts umkehren",
|
||||||
|
"midnightcontrols.menu.invert_right_y_axis": "Y rechts umkehren",
|
||||||
|
"midnightcontrols.menu.keyboard_controls": "Tastatureinstellungen...",
|
||||||
|
"midnightcontrols.menu.left_dead_zone": "Linke tote Zone",
|
||||||
|
"midnightcontrols.menu.mappings.open_input_str": "Öffne den Controller-Mapping Editor",
|
||||||
|
"midnightcontrols.menu.max_left_x_value": "Maximalwert Linke X-Achse",
|
||||||
|
"midnightcontrols.menu.max_left_y_value": "Maximalwert Linke Y-Achse",
|
||||||
|
"midnightcontrols.menu.max_right_x_value": "Maximalwert Rechte X-Achse",
|
||||||
|
"midnightcontrols.menu.max_right_y_value": "Maximalwert Rechte Y-Achse",
|
||||||
|
"midnightcontrols.menu.mouse_speed": "Mausgeschwindigkeit",
|
||||||
|
"midnightcontrols.menu.reacharound.horizontal": "Vorderes Blockplatzieren",
|
||||||
|
"midnightcontrols.menu.reacharound.vertical": "Vertikales Umgreifen",
|
||||||
|
"midnightcontrols.menu.reload_controller_mappings": "Controller-Mappings neuladen",
|
||||||
|
"midnightcontrols.menu.right_dead_zone": "Rechte tote Zone",
|
||||||
|
"midnightcontrols.menu.rotation_speed": "Rotationsgeschwindigkeit",
|
||||||
|
"midnightcontrols.menu.separator.controller": "Controller",
|
||||||
|
"midnightcontrols.menu.separator.general": "Generell",
|
||||||
|
"midnightcontrols.menu.title": "MidnightControls - Einstellungen",
|
||||||
|
"midnightcontrols.menu.title.controller": "Controlleroptionen",
|
||||||
|
"midnightcontrols.menu.title.controller_controls": "Controller Steuerung",
|
||||||
|
"midnightcontrols.menu.title.gameplay": "Gameplay Optionen",
|
||||||
|
"midnightcontrols.menu.title.general": "Generelle Optionen",
|
||||||
|
"midnightcontrols.menu.title.hud": "HUD Optionen",
|
||||||
|
"midnightcontrols.menu.title.mappings.string": "Mapping-Datei Editor",
|
||||||
|
"midnightcontrols.menu.title.visual": "Visuelle Optionen",
|
||||||
|
"midnightcontrols.menu.unfocused_input": "Unfokussierte Eingabe",
|
||||||
|
"midnightcontrols.menu.virtual_mouse": "Virtuelle Maus",
|
||||||
|
"midnightcontrols.menu.virtual_mouse.skin": "Aussehen der Virtuellen Maus",
|
||||||
|
"midnightcontrols.narrator.unbound": "%s entbunden",
|
||||||
|
"midnightcontrols.not_bound": "Nicht zugewiesen",
|
||||||
|
"midnightcontrols.tooltip.analog_movement": "Aktiviert analoge Bewegung, wenn möglich.",
|
||||||
|
"midnightcontrols.tooltip.auto_switch_mode": "Ob der Eingabemodus automatisch auf Controller eingestellt werden soll, wenn einer verbunden wird.",
|
||||||
|
"midnightcontrols.tooltip.controller2": "Zweiter Controller, zum Beispiel für Joy-Cons.",
|
||||||
|
"midnightcontrols.tooltip.controller_type": "Der Controllertyp für den die Knöpfe angezeigt werden sollen.",
|
||||||
|
"midnightcontrols.tooltip.controls_mode": "Der Steuerungsmodus.",
|
||||||
|
"midnightcontrols.tooltip.fast_block_placing": "Während des Fliegens im Kreativmodus das schnelle Platzieren von Knöpfen aktivieren. §cWird von manchen Servern als cheaten eingestuft.",
|
||||||
|
"midnightcontrols.tooltip.fly_drifting": "Aktiviert das Flug-Drifting von Vanilla Minecraft.",
|
||||||
|
"midnightcontrols.tooltip.fly_drifting_vertical": "Aktiviert das vertikale Flug-Drifting von Vanilla Minecraft",
|
||||||
|
"midnightcontrols.tooltip.hud_enable": "(De-)Aktiviert die Knopfanzeige im Spiel",
|
||||||
|
"midnightcontrols.tooltip.hud_side": "Die Position der Knopfanzeige.",
|
||||||
|
"midnightcontrols.tooltip.left_dead_zone": "Die tote Zone für den linken Analogstick.",
|
||||||
|
"midnightcontrols.tooltip.max_left_x_value": "Ändert den maximalen Wert der linken X-Achse. Nützlich, wenn deine Achse nicht bis zum Maximum geht.",
|
||||||
|
"midnightcontrols.tooltip.max_left_y_value": "Ändert den maximalen Wert der linken Y-Achse. Nützlich, wenn deine Achse nicht bis zum Maximum geht.",
|
||||||
|
"midnightcontrols.tooltip.max_right_x_value": "Ändert den maximalen Wert der rechten X-Achse. Nützlich, wenn deine Achse nicht bis zum Maximum geht.",
|
||||||
|
"midnightcontrols.tooltip.max_right_y_value": "Ändert den maximalen Wert der rechten Y-Achse. Nützlich, wenn deine Achse nicht bis zum Maximum geht.",
|
||||||
|
"midnightcontrols.tooltip.mouse_speed": "Die emulierte Mausgeschwindigkeit des Controllers.",
|
||||||
|
"midnightcontrols.tooltip.reacharound.horizontal": "Aktiviert vorderes Platzieren von Blöcken, §cwird von manchen Servern als cheaten eingestuft§r.",
|
||||||
|
"midnightcontrols.tooltip.reacharound.vertical": "Aktiviert vertikales Platzieren von Blöcken, §cwird von manchen Servern als cheaten eingestuft§r.",
|
||||||
|
"midnightcontrols.tooltip.reload_controller_mappings": "Lädt die Controller-Mappings neu.",
|
||||||
|
"midnightcontrols.tooltip.right_dead_zone": "Die tote Zone für den rechten Analogstick.",
|
||||||
|
"midnightcontrols.tooltip.rotation_speed": "Die Kamerarotationsgeschwindigkeit im Controllermodus.",
|
||||||
|
"midnightcontrols.tooltip.unfocused_input": "Erlaube Controllereingabe auch wenn das Fenster nicht fokussiert ist.",
|
||||||
|
"midnightcontrols.tooltip.virtual_mouse": "Aktiviere die virtuelle Maus.",
|
||||||
|
"midnightcontrols.virtual_mouse.skin.default_light": "Standard Light",
|
||||||
|
"midnightcontrols.virtual_mouse.skin.default_dark": "Standard Dark",
|
||||||
|
"midnightcontrols.virtual_mouse.skin.second_light": "Alternativ Light",
|
||||||
|
"midnightcontrols.virtual_mouse.skin.second_dark": "Alternativ Dark"
|
||||||
|
}
|
||||||
@@ -153,5 +153,6 @@
|
|||||||
"midnightcontrols.virtual_mouse.skin.default_light": "Default Light",
|
"midnightcontrols.virtual_mouse.skin.default_light": "Default Light",
|
||||||
"midnightcontrols.virtual_mouse.skin.default_dark": "Default Dark",
|
"midnightcontrols.virtual_mouse.skin.default_dark": "Default Dark",
|
||||||
"midnightcontrols.virtual_mouse.skin.second_light": "Second Light",
|
"midnightcontrols.virtual_mouse.skin.second_light": "Second Light",
|
||||||
"midnightcontrols.virtual_mouse.skin.second_dark": "Second Dark"
|
"midnightcontrols.virtual_mouse.skin.second_dark": "Second Dark",
|
||||||
|
"modmenu.descriptionTranslation.midnightcontrols": "Adds controller support and enhanced controls overall.\nForked from LambdaControls, which sadly got discontinued."
|
||||||
}
|
}
|
||||||
@@ -115,7 +115,6 @@
|
|||||||
"midnightcontrols.tooltip.controller2": "Kullanılacak ikinci oyun kolu, örnek olarak Joy-Con desteği de mümkün.",
|
"midnightcontrols.tooltip.controller2": "Kullanılacak ikinci oyun kolu, örnek olarak Joy-Con desteği de mümkün.",
|
||||||
"midnightcontrols.tooltip.controller_type": "Doğru tuşları göstermesi için oyun kolu türü.",
|
"midnightcontrols.tooltip.controller_type": "Doğru tuşları göstermesi için oyun kolu türü.",
|
||||||
"midnightcontrols.tooltip.controls_mode": "Kontrol Modu",
|
"midnightcontrols.tooltip.controls_mode": "Kontrol Modu",
|
||||||
"midnightcontrols.tooltip.dead_zone": "Oyun kolunun analog çubukları için ayarlanan ölü bölge/dead zone",
|
|
||||||
"midnightcontrols.tooltip.fast_block_placing": "Yaratıcı modda uçarken, hızına bağlı olarak hızlı blok koymayı etkinleştirir. §cBazı sunucular bunun hile olduğunu düşünebilir.",
|
"midnightcontrols.tooltip.fast_block_placing": "Yaratıcı modda uçarken, hızına bağlı olarak hızlı blok koymayı etkinleştirir. §cBazı sunucular bunun hile olduğunu düşünebilir.",
|
||||||
"midnightcontrols.tooltip.fly_drifting": "Uçarken, Vanilla'daki gibi ani duruşlarda kayma efektini etkinleştirir.",
|
"midnightcontrols.tooltip.fly_drifting": "Uçarken, Vanilla'daki gibi ani duruşlarda kayma efektini etkinleştirir.",
|
||||||
"midnightcontrols.tooltip.fly_drifting_vertical": "Yukarı/aşağı uçarken, Vanilla'daki gibi ani duruşlarda kayma efektini etkinleştirir.",
|
"midnightcontrols.tooltip.fly_drifting_vertical": "Yukarı/aşağı uçarken, Vanilla'daki gibi ani duruşlarda kayma efektini etkinleştirir.",
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
@@ -3,15 +3,24 @@
|
|||||||
"id": "midnightcontrols",
|
"id": "midnightcontrols",
|
||||||
"name": "MidnightControls",
|
"name": "MidnightControls",
|
||||||
"version": "${version}",
|
"version": "${version}",
|
||||||
"description": "Adds better controls, and controller support.",
|
"description": "Adds controller support and enhanced controls overall.",
|
||||||
"authors": [
|
"authors": [
|
||||||
"LambdAurora",
|
"LambdAurora",
|
||||||
"Motschen"
|
"Motschen"
|
||||||
],
|
],
|
||||||
|
"contributors": [
|
||||||
|
"akemin-dayo",
|
||||||
|
"FlashyReese",
|
||||||
|
"Hambaka",
|
||||||
|
"joaoh1",
|
||||||
|
"DioEgizio",
|
||||||
|
"EnnuiL",
|
||||||
|
"egeesin"
|
||||||
|
],
|
||||||
"contact": {
|
"contact": {
|
||||||
"homepage": "https://modrinth.com/mod/midnightcontrols",
|
"homepage": "https://modrinth.com/mod/midnightcontrols",
|
||||||
"sources": "https://github.com/LambdAurora/midnightcontrols.git",
|
"sources": "https://github.com/TeamMidnightDust/MidnightControls",
|
||||||
"issues": "https://github.com/LambdAurora/midnightcontrols/issues"
|
"issues": "https://github.com/TeamMidnightDust/MidnightControls/issues"
|
||||||
},
|
},
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"icon": "assets/midnightcontrols/icon.png",
|
"icon": "assets/midnightcontrols/icon.png",
|
||||||
@@ -37,17 +46,16 @@
|
|||||||
"fabric": ">=0.36.0",
|
"fabric": ">=0.36.0",
|
||||||
"minecraft": ">=1.17",
|
"minecraft": ">=1.17",
|
||||||
"spruceui": ">=3.2.0",
|
"spruceui": ">=3.2.0",
|
||||||
"java": ">=16"
|
"java": ">=17"
|
||||||
},
|
},
|
||||||
"recommends": {
|
"recommends": {
|
||||||
"modmenu": ">=1.12.2"
|
"modmenu": ">=1.12.2"
|
||||||
},
|
},
|
||||||
"suggests": {
|
"suggests": {
|
||||||
"flamingo": "*"
|
"quilt_loader": "*"
|
||||||
},
|
},
|
||||||
"breaks": {
|
"breaks": {
|
||||||
"lambdacontrols": "*",
|
"lambdacontrols": "*",
|
||||||
"modmenu": "<1.12.2",
|
"modmenu": "<1.12.2"
|
||||||
"optifabric": "*"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"required": true,
|
"required": true,
|
||||||
"package": "dev.lambdaurora.midnightcontrols.client.compat.mixin",
|
"package": "eu.midnightdust.midnightcontrols.client.compat.mixin",
|
||||||
"plugin": "eu.midnightdust.midnightcontrols.client.compat.MidnightControlsMixinPlugin",
|
"plugin": "eu.midnightdust.midnightcontrols.client.compat.MidnightControlsMixinPlugin",
|
||||||
"compatibilityLevel": "JAVA_16",
|
"compatibilityLevel": "JAVA_16",
|
||||||
"client": [
|
"client": [
|
||||||
|
|||||||