Compare commits
44 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2e861470d8 | ||
|
|
e87ed53485 | ||
|
|
8847c7f499 | ||
|
|
da2773b1e9 | ||
|
|
3650e756c3 | ||
|
|
6b885beede | ||
|
|
abb3d1de3c | ||
|
|
a8cdfeeba9 | ||
|
|
ed4d310565 | ||
|
|
ac73c99506 | ||
|
|
d45eeac6dc | ||
|
|
77ff589544 | ||
|
|
ce5c0b22db | ||
|
|
98af13fd0b | ||
|
|
2387444d3a | ||
|
|
57860490c8 | ||
|
|
f46aa175a4 | ||
|
|
78390ca02f | ||
|
|
31821b4833 | ||
|
|
e34ba6025a | ||
|
|
9891cd2977 | ||
|
|
8566e859e3 | ||
|
|
735b9e8718 | ||
|
|
71ee3d8e0a | ||
|
|
11f102759c | ||
|
|
02dd543027 | ||
|
|
c247e51d00 | ||
|
|
e3052343d3 | ||
|
|
9e879f9230 | ||
|
|
bda436d863 | ||
|
|
98d2cdae63 | ||
|
|
8e0e444d15 | ||
|
|
f586647e07 | ||
|
|
73ab8456e7 | ||
|
|
1a3d7ce225 | ||
|
|
965ab57159 | ||
|
|
c8dba43b90 | ||
|
|
dd8e62c73e | ||
|
|
b24a158b9b | ||
|
|
df7c7bbdad | ||
|
|
3ddae57eab | ||
|
|
a0701f55f6 | ||
|
|
b15766dfdb | ||
|
|
19ed068da9 |
51
README.md
@@ -1,29 +1,29 @@
|
|||||||
|
<div align="center">
|
||||||
|
<img src=https://github.com/TeamMidnightDust/MidnightControls/blob/1.19/src/main/resources/assets/midnightcontrols/icon.png>
|
||||||
|
|
||||||
# MidnightControls
|
# MidnightControls
|
||||||
|
|
||||||
<!-- modrinth_exclude.start -->
|
[](https://www.curseforge.com/minecraft/mc-mods/midnightcontrols)
|
||||||
 <!-- modrinth_exclude.end -->
|
[![Modrinth]](https://modrinth.com/mod/midnightcontrols)
|
||||||
[](https://raw.githubusercontent.com/TeamMidnightDust/MidnightControls/master/LICENSE)
|
[](https://github.com/TeamMidnightDust/MidnightControls/releases)
|
||||||

|

|
||||||
[![Mod loader: Quilt/Fabric]][quilt] <!-- modrinth_exclude.start -->
|
[![Mod loader: Quilt/Fabric]][Quilt]
|
||||||
[](https://github.com/TeamMidnightDust/MidnightControls/releases)
|
[](https://www.oracle.com/java/technologies/downloads/#java17)
|
||||||
[](https://www.curseforge.com/minecraft/mc-mods/midnightcontrols)
|
[](LICENSE)
|
||||||
<!-- 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.
|
Forked from [LambdaControls](https://github.com/LambdAurora/LambdaControls) by the amazing [LambdAurora](https://github.com/LambdAurora), which was sadly discontinued.
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
## What's this mod?
|
## What's this mod?
|
||||||
|
|
||||||
This mod adds better controls, reach-around features, etc.
|
MidnightControls is a mod which provides controller and touchscreen support in Minecraft: Java Edition.<br />It also includes some Bedrock Edition parity and reach-around features!
|
||||||
|
|
||||||
Haven't you dreamed to travel in your modded Minecraft world with your controller? Yes? Then this mod is made for you!
|
## Features:
|
||||||
|
|
||||||
This mod also adds controller support.
|
|
||||||
|
|
||||||
## ✅ Features:
|
|
||||||
|
|
||||||
- Controller support
|
- Controller support
|
||||||
- Touchscreen support (very experimental and buggy).
|
- Touchscreen support
|
||||||
- Keyboard controls to look around.
|
- Keyboard controls to look around.
|
||||||
- Toggleable on screen button indicator (like in Bedrock Edition).
|
- Toggleable on screen button indicator (like in Bedrock Edition).
|
||||||
- Vertical reach-around.
|
- Vertical reach-around.
|
||||||
@@ -47,14 +47,23 @@ This mod also adds controller support.
|
|||||||
|
|
||||||
## Screenshots
|
## Screenshots
|
||||||
|
|
||||||

|

|
||||||

|

|
||||||
|
|
||||||
<!-- modrinth_exclude.start -->
|
|
||||||
## Build
|
## Build
|
||||||
|
|
||||||
Just do `./gradlew build` and everything should build just fine!
|
Clone the repo with:
|
||||||
<!-- modrinth_exclude.end -->
|
```
|
||||||
|
git clone https://github.com/TeamMidnightDust/MidnightControls
|
||||||
|
```
|
||||||
|
Enter the folder created and run:
|
||||||
|
```
|
||||||
|
./gradlew build
|
||||||
|
```
|
||||||
|
After this is done, everything should be built just fine!
|
||||||
|
|
||||||
|
[Quilt]: https://quiltmc.org
|
||||||
|
|
||||||
[quilt]: https://quiltmc.org
|
|
||||||
[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==
|
[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==
|
||||||
|
|
||||||
|
[Modrinth]: https://img.shields.io/modrinth/dt/bXX9h73M?logoColor=white&logo=data:image/svg%2bxml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNTEyIDUxNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTUwMy4xNiAzMjMuNTZDNTE0LjU1IDI4MS40NyA1MTUuMzIgMjM1LjkxIDUwMy4yIDE5MC43NkM0NjYuNTcgNTQuMjI5OSAzMjYuMDQgLTI2LjgwMDEgMTg5LjMzIDkuNzc5OTFDODMuODEwMSAzOC4wMTk5IDExLjM4OTkgMTI4LjA3IDAuNjg5OTQxIDIzMC40N0g0My45OUM1NC4yOSAxNDcuMzMgMTEzLjc0IDc0LjcyOTggMTk5Ljc1IDUxLjcwOThDMzA2LjA1IDIzLjI1OTggNDE1LjEzIDgwLjY2OTkgNDUzLjE3IDE4MS4zOEw0MTEuMDMgMTkyLjY1QzM5MS42NCAxNDUuOCAzNTIuNTcgMTExLjQ1IDMwNi4zIDk2LjgxOThMMjk4LjU2IDE0MC42NkMzMzUuMDkgMTU0LjEzIDM2NC43MiAxODQuNSAzNzUuNTYgMjI0LjkxQzM5MS4zNiAyODMuOCAzNjEuOTQgMzQ0LjE0IDMwOC41NiAzNjkuMTdMMzIwLjA5IDQxMi4xNkMzOTAuMjUgMzgzLjIxIDQzMi40IDMxMC4zIDQyMi40MyAyMzUuMTRMNDY0LjQxIDIyMy45MUM0NjguOTEgMjUyLjYyIDQ2Ny4zNSAyODEuMTYgNDYwLjU1IDMwOC4wN0w1MDMuMTYgMzIzLjU2WiIgZmlsbD0iIzMwYjI3YiIvPgogIDxwYXRoIGQ9Ik0zMjEuOTkgNTA0LjIyQzE4NS4yNyA1NDAuOCA0NC43NTAxIDQ1OS43NyA4LjExMDExIDMyMy4yNEMzLjg0MDExIDMwNy4zMSAxLjE3IDI5MS4zMyAwIDI3NS40Nkg0My4yN0M0NC4zNiAyODcuMzcgNDYuNDY5OSAyOTkuMzUgNDkuNjc5OSAzMTEuMjlDNTMuMDM5OSAzMjMuOCA1Ny40NSAzMzUuNzUgNjIuNzkgMzQ3LjA3TDEwMS4zOCAzMjMuOTJDOTguMTI5OSAzMTYuNDIgOTUuMzkgMzA4LjYgOTMuMjEgMzAwLjQ3QzY5LjE3IDIxMC44NyAxMjIuNDEgMTE4Ljc3IDIxMi4xMyA5NC43NjAxQzIyOS4xMyA5MC4yMTAxIDI0Ni4yMyA4OC40NDAxIDI2Mi45MyA4OS4xNTAxTDI1NS4xOSAxMzNDMjQ0LjczIDEzMy4wNSAyMzQuMTEgMTM0LjQyIDIyMy41MyAxMzcuMjVDMTU3LjMxIDE1NC45OCAxMTguMDEgMjIyLjk1IDEzNS43NSAyODkuMDlDMTM2Ljg1IDI5My4xNiAxMzguMTMgMjk3LjEzIDEzOS41OSAzMDAuOTlMMTg4Ljk0IDI3MS4zOEwxNzQuMDcgMjMxLjk1TDIyMC42NyAxODQuMDhMMjc5LjU3IDE3MS4zOUwyOTYuNjIgMTkyLjM4TDI2OS40NyAyMTkuODhMMjQ1Ljc5IDIyNy4zM0wyMjguODcgMjQ0LjcyTDIzNy4xNiAyNjcuNzlDMjM3LjE2IDI2Ny43OSAyNTMuOTUgMjg1LjYzIDI1My45OCAyODUuNjRMMjc3LjcgMjc5LjMzTDI5NC41OCAyNjAuNzlMMzMxLjQ0IDI0OS4xMkwzNDIuNDIgMjczLjgyTDMwNC4zOSAzMjAuNDVMMjQwLjY2IDM0MC42M0wyMTIuMDggMzA4LjgxTDE2Mi4yNiAzMzguN0MxODcuOCAzNjcuNzggMjI2LjIgMzgzLjkzIDI2Ni4wMSAzODAuNTZMMjc3LjU0IDQyMy41NUMyMTguMTMgNDMxLjQxIDE2MC4xIDQwNi44MiAxMjQuMDUgMzYxLjY0TDg1LjYzOTkgMzg0LjY4QzEzNi4yNSA0NTEuMTcgMjIzLjg0IDQ4NC4xMSAzMDkuNjEgNDYxLjE2QzM3MS4zNSA0NDQuNjQgNDE5LjQgNDAyLjU2IDQ0NS40MiAzNDkuMzhMNDg4LjA2IDM2NC44OEM0NTcuMTcgNDMxLjE2IDM5OC4yMiA0ODMuODIgMzIxLjk5IDUwNC4yMloiIGZpbGw9IiMzMGIyN2IiLz4KPC9zdmc+
|
||||||
|
|||||||
10
build.gradle
@@ -68,8 +68,8 @@ repositories {
|
|||||||
url 'https://maven.gegy.dev'
|
url 'https://maven.gegy.dev'
|
||||||
}
|
}
|
||||||
maven {
|
maven {
|
||||||
name 'CottonMC'
|
name = "CottonMC"
|
||||||
url 'https://server.bbkr.space/artifactory/libs-snapshot'
|
url = "https://server.bbkr.space/artifactory/libs-release"
|
||||||
}
|
}
|
||||||
maven { url "https://maven.terraformersmc.com/releases/" }
|
maven { url "https://maven.terraformersmc.com/releases/" }
|
||||||
maven { url 'https://maven.kosmx.dev' }
|
maven { url 'https://maven.kosmx.dev' }
|
||||||
@@ -109,9 +109,10 @@ dependencies {
|
|||||||
// modImplementation("maven.modrinth:ok-zoomer:${project.ok_zoomer_version}")
|
// modImplementation("maven.modrinth:ok-zoomer:${project.ok_zoomer_version}")
|
||||||
// modImplementation "io.github.ennuil:LibZoomer:${project.libzoomer_version}"
|
// modImplementation "io.github.ennuil:LibZoomer:${project.libzoomer_version}"
|
||||||
|
|
||||||
|
modImplementation "io.github.cottonmc:LibGui:${project.libgui_version}"
|
||||||
modImplementation "org.quiltmc:quilt-json5:1.0.0"
|
modImplementation "org.quiltmc:quilt-json5:1.0.0"
|
||||||
modApi "maven.modrinth:sodium:${project.sodium_version}"
|
modCompileOnly "maven.modrinth:sodium:${project.sodium_version}"
|
||||||
//modImplementation("maven.modrinth:emi:${project.emi_version}")
|
modImplementation("maven.modrinth:emi:${project.emi_version}")
|
||||||
modImplementation "maven.modrinth:emotecraft:${project.emotecraft_version}"
|
modImplementation "maven.modrinth:emotecraft:${project.emotecraft_version}"
|
||||||
modImplementation "io.github.kosmx:bendy-lib:${project.bendylib_version}"
|
modImplementation "io.github.kosmx:bendy-lib:${project.bendylib_version}"
|
||||||
|
|
||||||
@@ -120,6 +121,7 @@ dependencies {
|
|||||||
|
|
||||||
shadow 'com.electronwill.night-config:core:3.6.3'
|
shadow 'com.electronwill.night-config:core:3.6.3'
|
||||||
shadow 'com.electronwill.night-config:toml:3.6.3'
|
shadow 'com.electronwill.night-config:toml:3.6.3'
|
||||||
|
apply plugin: 'java-library'
|
||||||
}
|
}
|
||||||
loom {
|
loom {
|
||||||
accessWidenerPath = file("src/main/resources/midnightcontrols.accesswidener")
|
accessWidenerPath = file("src/main/resources/midnightcontrols.accesswidener")
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ yarn_mappings=1.19+build.1
|
|||||||
loader_version=0.14.7
|
loader_version=0.14.7
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
mod_version = 1.2.2
|
mod_version = 1.5.0
|
||||||
maven_group = eu.midnightdust
|
maven_group = eu.midnightdust
|
||||||
archives_base_name = midnightcontrols
|
archives_base_name = midnightcontrols
|
||||||
modrinth_id=bXX9h73M
|
modrinth_id=bXX9h73M
|
||||||
@@ -22,7 +22,8 @@ midnightlib_version=0.5.2
|
|||||||
modmenu_version=4.0.0
|
modmenu_version=4.0.0
|
||||||
emotecraft_version=2.1.3-SNAPSHOT-build.29-MC1.19-fabric
|
emotecraft_version=2.1.3-SNAPSHOT-build.29-MC1.19-fabric
|
||||||
bendylib_version=2.0.+
|
bendylib_version=2.0.+
|
||||||
emi_version=0.1.1+1.18.2
|
emi_version=0.2.0+1.19
|
||||||
|
libgui_version=6.0.0+1.19
|
||||||
|
|
||||||
# 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 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
|
# ok_zoomer_version=5.0.0-beta.3+1.17.1
|
||||||
|
|||||||
BIN
icon.png
|
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 86 KiB After Width: | Height: | Size: 174 KiB |
|
Before Width: | Height: | Size: 89 KiB After Width: | Height: | Size: 184 KiB |
@@ -16,7 +16,6 @@ import net.fabricmc.fabric.api.networking.v1.ServerPlayNetworking;
|
|||||||
import net.fabricmc.loader.api.FabricLoader;
|
import net.fabricmc.loader.api.FabricLoader;
|
||||||
import net.fabricmc.loader.api.ModContainer;
|
import net.fabricmc.loader.api.ModContainer;
|
||||||
import net.minecraft.network.PacketByteBuf;
|
import net.minecraft.network.PacketByteBuf;
|
||||||
import net.minecraft.text.Text;
|
|
||||||
import net.minecraft.util.Identifier;
|
import net.minecraft.util.Identifier;
|
||||||
import org.apache.logging.log4j.LogManager;
|
import org.apache.logging.log4j.LogManager;
|
||||||
import org.apache.logging.log4j.Logger;
|
import org.apache.logging.log4j.Logger;
|
||||||
|
|||||||
@@ -24,15 +24,15 @@ import java.util.Optional;
|
|||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public enum ControllerType implements Nameable {
|
public enum ControllerType implements Nameable {
|
||||||
DEFAULT(0, Text.of("Default")),
|
DEFAULT(0),
|
||||||
DUALSHOCK(1, Text.of("Dualshock")),
|
DUALSHOCK(1),
|
||||||
DUALSENSE(2, Text.of("Dualsense")),
|
DUALSENSE(2),
|
||||||
SWITCH(3, Text.of("Switch")),
|
SWITCH(3),
|
||||||
XBOX_360(4, Text.of("Xbox 360")),
|
XBOX_360(4),
|
||||||
XBOX(5, Text.of("Xbox")),
|
XBOX(5),
|
||||||
STEAM_DECK(6, Text.of("Steam Deck")),
|
STEAM_DECK(6),
|
||||||
STEAM_CONTROLLER(7, Text.of("Steam Controller")),
|
STEAM_CONTROLLER(7),
|
||||||
OUYA(8, Text.of("Ouya"));
|
OUYA(8);
|
||||||
|
|
||||||
private final int id;
|
private final int id;
|
||||||
private final Text text;
|
private final Text text;
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ import eu.midnightdust.midnightcontrols.client.controller.ButtonCategory;
|
|||||||
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;
|
||||||
import eu.midnightdust.midnightcontrols.client.gui.MidnightControlsHud;
|
import eu.midnightdust.midnightcontrols.client.gui.MidnightControlsHud;
|
||||||
import eu.midnightdust.midnightcontrols.client.gui.RingScreen;
|
|
||||||
import eu.midnightdust.midnightcontrols.client.gui.TouchscreenOverlay;
|
import eu.midnightdust.midnightcontrols.client.gui.TouchscreenOverlay;
|
||||||
import eu.midnightdust.midnightcontrols.client.mixin.KeyBindingRegistryImplAccessor;
|
import eu.midnightdust.midnightcontrols.client.mixin.KeyBindingRegistryImplAccessor;
|
||||||
import eu.midnightdust.midnightcontrols.client.ring.KeyBindingRingAction;
|
import eu.midnightdust.midnightcontrols.client.ring.KeyBindingRingAction;
|
||||||
@@ -120,8 +119,10 @@ public class MidnightControlsClient extends MidnightControls implements ClientMo
|
|||||||
});
|
});
|
||||||
|
|
||||||
HudManager.register(this.hud = new MidnightControlsHud(this));
|
HudManager.register(this.hud = new MidnightControlsHud(this));
|
||||||
FabricLoader.getInstance().getModContainer("midnightcontrols").ifPresent(modContainer ->
|
FabricLoader.getInstance().getModContainer("midnightcontrols").ifPresent(modContainer -> {
|
||||||
ResourceManagerHelper.registerBuiltinResourcePack(new Identifier("midnightcontrols","bedrock"), modContainer, ResourcePackActivationType.NORMAL));
|
ResourceManagerHelper.registerBuiltinResourcePack(new Identifier("midnightcontrols","bedrock"), modContainer, ResourcePackActivationType.NORMAL);
|
||||||
|
ResourceManagerHelper.registerBuiltinResourcePack(new Identifier("midnightcontrols","legacy"), modContainer, ResourcePackActivationType.NORMAL);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -156,7 +157,7 @@ public class MidnightControlsClient extends MidnightControls implements ClientMo
|
|||||||
if (KeyBindingRegistryImplAccessor.getModdedKeyBindings() == null || KeyBindingRegistryImplAccessor.getModdedKeyBindings().isEmpty()) return;
|
if (KeyBindingRegistryImplAccessor.getModdedKeyBindings() == null || KeyBindingRegistryImplAccessor.getModdedKeyBindings().isEmpty()) return;
|
||||||
for (int i = 0; i < KeyBindingRegistryImplAccessor.getModdedKeyBindings().size(); ++i) {
|
for (int i = 0; i < KeyBindingRegistryImplAccessor.getModdedKeyBindings().size(); ++i) {
|
||||||
KeyBinding keyBinding = KeyBindingRegistryImplAccessor.getModdedKeyBindings().get(i);
|
KeyBinding keyBinding = KeyBindingRegistryImplAccessor.getModdedKeyBindings().get(i);
|
||||||
if (!keyBinding.getTranslationKey().contains("midnightcontrols")) {
|
if (!keyBinding.getTranslationKey().contains("midnightcontrols") && !keyBinding.getTranslationKey().contains("ok_zoomer") && !keyBinding.getTranslationKey().contains("okzoomer")) {
|
||||||
category = null;
|
category = null;
|
||||||
InputManager.streamCategories().forEach(buttonCategory -> {
|
InputManager.streamCategories().forEach(buttonCategory -> {
|
||||||
if (buttonCategory.getIdentifier().equals(new org.aperlambda.lambdacommon.Identifier("minecraft", keyBinding.getCategory())))
|
if (buttonCategory.getIdentifier().equals(new org.aperlambda.lambdacommon.Identifier("minecraft", keyBinding.getCategory())))
|
||||||
@@ -191,9 +192,16 @@ public class MidnightControlsClient extends MidnightControls implements ClientMo
|
|||||||
// if (BINDING_RING.wasPressed()) {
|
// if (BINDING_RING.wasPressed()) {
|
||||||
// client.setScreen(new RingScreen());
|
// client.setScreen(new RingScreen());
|
||||||
// }
|
// }
|
||||||
|
if (client.world != null && MidnightControlsConfig.enableHints && !MidnightControlsConfig.autoSwitchMode && MidnightControlsConfig.controlsMode == ControlsMode.DEFAULT && MidnightControlsConfig.getController().isGamepad()) {
|
||||||
|
client.getToastManager().add(SystemToast.create(client, SystemToast.Type.PERIODIC_NOTIFICATION, Text.translatable("midnightcontrols.controller.tutorial.title"),
|
||||||
|
Text.translatable("midnightcontrols.controller.tutorial.description", Text.translatable("options.title"), Text.translatable("controls.title"),
|
||||||
|
Text.translatable("midnightcontrols.menu.title.controller"))));
|
||||||
|
MidnightControlsConfig.enableHints = false;
|
||||||
|
MidnightControlsConfig.save();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public void onRender(MinecraftClient client) {
|
public void onRender(MinecraftClient client) {
|
||||||
this.input.onRender(client.getTickDelta(), client);
|
this.input.onRender(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -9,13 +9,14 @@
|
|||||||
|
|
||||||
package eu.midnightdust.midnightcontrols.client;
|
package eu.midnightdust.midnightcontrols.client;
|
||||||
|
|
||||||
|
import com.google.common.collect.Lists;
|
||||||
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.MidnightControls;
|
|
||||||
import eu.midnightdust.midnightcontrols.MidnightControlsFeature;
|
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;
|
||||||
|
import net.minecraft.client.MinecraftClient;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.lwjgl.glfw.GLFW;
|
import org.lwjgl.glfw.GLFW;
|
||||||
@@ -23,13 +24,13 @@ import org.lwjgl.glfw.GLFW;
|
|||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
import static org.lwjgl.glfw.GLFW.GLFW_GAMEPAD_AXIS_LEFT_X;
|
import static org.lwjgl.glfw.GLFW.*;
|
||||||
import static org.lwjgl.glfw.GLFW.GLFW_GAMEPAD_AXIS_LEFT_Y;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents MidnightControls configuration.
|
* Represents MidnightControls configuration.
|
||||||
*/
|
*/
|
||||||
public class MidnightControlsConfig extends MidnightConfig {
|
public class MidnightControlsConfig extends MidnightConfig {
|
||||||
|
public static boolean isEditing = false;
|
||||||
// General
|
// General
|
||||||
@Entry(name = "midnightcontrols.menu.controls_mode") public static ControlsMode controlsMode = ControlsMode.DEFAULT;
|
@Entry(name = "midnightcontrols.menu.controls_mode") public static ControlsMode controlsMode = ControlsMode.DEFAULT;
|
||||||
@Entry(name = "midnightcontrols.menu.auto_switch_mode") public static boolean autoSwitchMode = true;
|
@Entry(name = "midnightcontrols.menu.auto_switch_mode") public static boolean autoSwitchMode = true;
|
||||||
@@ -51,8 +52,8 @@ public class MidnightControlsConfig extends MidnightConfig {
|
|||||||
@Entry(name = "midnightcontrols.menu.left_dead_zone") public static double leftDeadZone = 0.25;
|
@Entry(name = "midnightcontrols.menu.left_dead_zone") public static double leftDeadZone = 0.25;
|
||||||
@Entry(name = "midnightcontrols.menu.invert_right_y_axis") public static boolean invertRightYAxis = false;
|
@Entry(name = "midnightcontrols.menu.invert_right_y_axis") public static boolean invertRightYAxis = false;
|
||||||
@Entry(name = "midnightcontrols.menu.invert_right_x_axis") public static boolean invertRightXAxis = false;
|
@Entry(name = "midnightcontrols.menu.invert_right_x_axis") public static boolean invertRightXAxis = false;
|
||||||
public static double DEFAULT_MAX_VALUE = 1;
|
@Entry(name = "midnightcontrols.menu.rotation_speed") public static double rotationSpeed = 40.0; //used for x axis, name kept for compatability
|
||||||
@Entry(name = "midnightcontrols.menu.right_dead_zone") public static double rotationSpeed = 40.0;
|
@Entry(name = "midnightcontrols.menu.y_axis_rotation_speed") public static double yAxisRotationSpeed = rotationSpeed;
|
||||||
@Entry(name = "midnightcontrols.menu.mouse_speed") public static double mouseSpeed = 25.0;
|
@Entry(name = "midnightcontrols.menu.mouse_speed") public static double mouseSpeed = 25.0;
|
||||||
@Entry(name = "midnightcontrols.menu.unfocused_input") public static boolean unfocusedInput = false;
|
@Entry(name = "midnightcontrols.menu.unfocused_input") public static boolean unfocusedInput = false;
|
||||||
@Entry(name = "midnightcontrols.menu.virtual_mouse") public static boolean virtualMouse = false;
|
@Entry(name = "midnightcontrols.menu.virtual_mouse") public static boolean virtualMouse = false;
|
||||||
@@ -60,11 +61,18 @@ public class MidnightControlsConfig extends MidnightConfig {
|
|||||||
@Entry(name = "Controller ID") public static Object controllerID = 0;
|
@Entry(name = "Controller ID") public static Object controllerID = 0;
|
||||||
@Entry(name = "2nd Controller ID") public static Object secondControllerID = -1;
|
@Entry(name = "2nd Controller ID") public static Object secondControllerID = -1;
|
||||||
@Entry(name = "midnightcontrols.menu.controller_type") public static ControllerType controllerType = ControllerType.DEFAULT;
|
@Entry(name = "midnightcontrols.menu.controller_type") public static ControllerType controllerType = ControllerType.DEFAULT;
|
||||||
@Entry(name = "Mouse screens") public static List<String> mouseScreens = List.of("me.jellysquid.mods.sodium.client.gui","net.coderbot.iris.gui","net.minecraft.client.gui.screen.advancement", "net.minecraft.client.gui.screen.pack.PackScreen", "net.minecraft.class_5375", "net.minecraft.class_457", "net.minecraft.class_408", "me.flashyreese.mods.reeses_sodium_options.client.gui");
|
@Entry(name = "Mouse screens") public static List<String> mouseScreens = Lists.newArrayList("me.jellysquid.mods.sodium.client.gui",
|
||||||
@Entry(name = "Keybindings") public static Map<String, String> BINDINGS = Map.of();
|
"net.coderbot.iris.gui", "net.minecraft.client.gui.screen.advancement", "net.minecraft.client.gui.screen.pack.PackScreen", "net.minecraft.class_5375",
|
||||||
|
"net.minecraft.class_457", "net.minecraft.class_408", "me.flashyreese.mods.reeses_sodium_options.client.gui", "dev.emi.emi.screen",
|
||||||
|
"hardcorequesting.client.interfaces.GuiQuestBook", "hardcorequesting.client.interfaces.GuiReward", "hardcorequesting.client.interfaces.EditTrackerScreen",
|
||||||
|
"io.github.kosmx.emotes.arch.gui.screen.ingame.FastChosseScreen");
|
||||||
|
@Entry(name = "Keybindings") public static Map<String, String> BINDINGS = new HashMap<>();
|
||||||
|
|
||||||
private static final Pattern BUTTON_BINDING_PATTERN = Pattern.compile("(-?\\d+)\\+?");
|
private static final Pattern BUTTON_BINDING_PATTERN = Pattern.compile("(-?\\d+)\\+?");
|
||||||
@Entry(name = "Max analog values") public static double[] maxAnalogValues = new double[]{DEFAULT_MAX_VALUE, DEFAULT_MAX_VALUE, DEFAULT_MAX_VALUE, DEFAULT_MAX_VALUE};
|
@Entry(name = "Max analog values") public static double[] maxAnalogValues = new double[]{1, 1, 1, 1};
|
||||||
|
@Entry(name = "Trigger button fix") public static boolean triggerFix = true;
|
||||||
|
@Entry(name = "Enable Hints") public static boolean enableHints = true;
|
||||||
|
@Entry(name = "Command Keybinds") public static List<String> commandKeybinds = Lists.newArrayList();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Loads the configuration
|
* Loads the configuration
|
||||||
@@ -92,12 +100,23 @@ public class MidnightControlsConfig extends MidnightConfig {
|
|||||||
*/
|
*/
|
||||||
public static Controller getController() {
|
public static Controller getController() {
|
||||||
var raw = MidnightControlsConfig.controllerID;
|
var raw = MidnightControlsConfig.controllerID;
|
||||||
|
Controller controller = Controller.byId(GLFW.GLFW_JOYSTICK_1);
|
||||||
if (raw instanceof Number) {
|
if (raw instanceof Number) {
|
||||||
return Controller.byId(((Number) raw).intValue());
|
controller = Controller.byId(((Number) raw).intValue());
|
||||||
} else if (raw instanceof String) {
|
} else if (raw instanceof String) {
|
||||||
return Controller.byGuid((String) raw).orElse(Controller.byId(GLFW.GLFW_JOYSTICK_1));
|
controller = Controller.byGuid((String) raw).orElse(Controller.byId(GLFW.GLFW_JOYSTICK_1));
|
||||||
}
|
}
|
||||||
return Controller.byId(GLFW.GLFW_JOYSTICK_1);
|
if ((!controller.isConnected() || !controller.isGamepad()) && MidnightControlsConfig.autoSwitchMode && !isEditing) {
|
||||||
|
for (int i = 0; i < GLFW.GLFW_JOYSTICK_LAST; ++i) {
|
||||||
|
Controller gamepad = Controller.byId(i);
|
||||||
|
if (gamepad.isConnected() && gamepad.isGamepad()) {
|
||||||
|
controller = gamepad;
|
||||||
|
i = GLFW_JOYSTICK_LAST;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (controller.isConnected() && controller.isGamepad() && MidnightControlsConfig.autoSwitchMode && !isEditing) MidnightControlsConfig.controlsMode = ControlsMode.CONTROLLER;
|
||||||
|
return controller;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -155,7 +174,7 @@ public class MidnightControlsConfig extends MidnightConfig {
|
|||||||
|
|
||||||
public static double getAxisMaxValue(int axis) {
|
public static double getAxisMaxValue(int axis) {
|
||||||
if (axis >= MidnightControlsConfig.maxAnalogValues.length)
|
if (axis >= MidnightControlsConfig.maxAnalogValues.length)
|
||||||
return DEFAULT_MAX_VALUE;
|
return 1;
|
||||||
return MidnightControlsConfig.maxAnalogValues[axis];
|
return MidnightControlsConfig.maxAnalogValues[axis];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -272,8 +291,8 @@ public class MidnightControlsConfig extends MidnightConfig {
|
|||||||
leftDeadZone = 0.25;
|
leftDeadZone = 0.25;
|
||||||
invertRightYAxis = false;
|
invertRightYAxis = false;
|
||||||
invertRightXAxis = false;
|
invertRightXAxis = false;
|
||||||
DEFAULT_MAX_VALUE = 1;
|
|
||||||
rotationSpeed = 40.0;
|
rotationSpeed = 40.0;
|
||||||
|
yAxisRotationSpeed = rotationSpeed;
|
||||||
mouseSpeed = 25.0;
|
mouseSpeed = 25.0;
|
||||||
unfocusedInput = false;
|
unfocusedInput = false;
|
||||||
virtualMouse = false;
|
virtualMouse = false;
|
||||||
@@ -281,9 +300,9 @@ public class MidnightControlsConfig extends MidnightConfig {
|
|||||||
controllerID = 0;
|
controllerID = 0;
|
||||||
secondControllerID = -1;
|
secondControllerID = -1;
|
||||||
controllerType = ControllerType.DEFAULT;
|
controllerType = ControllerType.DEFAULT;
|
||||||
mouseScreens = List.of("me.jellysquid.mods.sodium.client.gui","net.coderbot.iris.gui","net.minecraft.client.gui.screen.advancement", "net.minecraft.client.gui.screen.pack.PackScreen", "net.minecraft.class_5375", "net.minecraft.class_457", "net.minecraft.class_408", "me.flashyreese.mods.reeses_sodium_options.client.gui");
|
mouseScreens = Lists.newArrayList("me.jellysquid.mods.sodium.client.gui", "net.coderbot.iris.gui", "net.minecraft.client.gui.screen.advancement", "net.minecraft.client.gui.screen.pack.PackScreen", "net.minecraft.class_5375", "net.minecraft.class_457", "net.minecraft.class_408", "me.flashyreese.mods.reeses_sodium_options.client.gui", "dev.emi.emi.screen");
|
||||||
BINDINGS = Map.of();
|
BINDINGS = new HashMap<>();
|
||||||
maxAnalogValues = new double[]{DEFAULT_MAX_VALUE, DEFAULT_MAX_VALUE, DEFAULT_MAX_VALUE, DEFAULT_MAX_VALUE};
|
maxAnalogValues = new double[]{1, 1, 1, 1};
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -10,9 +10,10 @@
|
|||||||
package eu.midnightdust.midnightcontrols.client;
|
package eu.midnightdust.midnightcontrols.client;
|
||||||
|
|
||||||
import com.google.common.collect.ImmutableSet;
|
import com.google.common.collect.ImmutableSet;
|
||||||
|
import dev.lambdaurora.spruceui.widget.AbstractSpruceWidget;
|
||||||
import dev.lambdaurora.spruceui.widget.container.SpruceEntryListWidget;
|
import dev.lambdaurora.spruceui.widget.container.SpruceEntryListWidget;
|
||||||
import dev.lambdaurora.spruceui.widget.container.SpruceOptionListWidget;
|
|
||||||
import eu.midnightdust.midnightcontrols.MidnightControls;
|
import eu.midnightdust.midnightcontrols.MidnightControls;
|
||||||
|
import eu.midnightdust.midnightcontrols.client.compat.LibGuiCompat;
|
||||||
import eu.midnightdust.midnightcontrols.client.compat.MidnightControlsCompat;
|
import eu.midnightdust.midnightcontrols.client.compat.MidnightControlsCompat;
|
||||||
import eu.midnightdust.midnightcontrols.client.compat.SodiumCompat;
|
import eu.midnightdust.midnightcontrols.client.compat.SodiumCompat;
|
||||||
import eu.midnightdust.midnightcontrols.client.controller.ButtonBinding;
|
import eu.midnightdust.midnightcontrols.client.controller.ButtonBinding;
|
||||||
@@ -20,9 +21,7 @@ import eu.midnightdust.midnightcontrols.client.controller.Controller;
|
|||||||
import eu.midnightdust.midnightcontrols.client.controller.InputManager;
|
import eu.midnightdust.midnightcontrols.client.controller.InputManager;
|
||||||
import eu.midnightdust.midnightcontrols.client.gui.TouchscreenOverlay;
|
import eu.midnightdust.midnightcontrols.client.gui.TouchscreenOverlay;
|
||||||
import eu.midnightdust.midnightcontrols.client.gui.widget.ControllerControlsWidget;
|
import eu.midnightdust.midnightcontrols.client.gui.widget.ControllerControlsWidget;
|
||||||
import eu.midnightdust.midnightcontrols.client.mixin.AdvancementsScreenAccessor;
|
import eu.midnightdust.midnightcontrols.client.mixin.*;
|
||||||
import eu.midnightdust.midnightcontrols.client.mixin.CreativeInventoryScreenAccessor;
|
|
||||||
import eu.midnightdust.midnightcontrols.client.mixin.EntryListWidgetAccessor;
|
|
||||||
import eu.midnightdust.midnightcontrols.client.util.HandledScreenAccessor;
|
import eu.midnightdust.midnightcontrols.client.util.HandledScreenAccessor;
|
||||||
import eu.midnightdust.midnightcontrols.client.util.MouseAccessor;
|
import eu.midnightdust.midnightcontrols.client.util.MouseAccessor;
|
||||||
import dev.lambdaurora.spruceui.navigation.NavigationDirection;
|
import dev.lambdaurora.spruceui.navigation.NavigationDirection;
|
||||||
@@ -31,7 +30,6 @@ import dev.lambdaurora.spruceui.widget.AbstractSprucePressableButtonWidget;
|
|||||||
import dev.lambdaurora.spruceui.widget.SpruceElement;
|
import dev.lambdaurora.spruceui.widget.SpruceElement;
|
||||||
import dev.lambdaurora.spruceui.widget.SpruceLabelWidget;
|
import dev.lambdaurora.spruceui.widget.SpruceLabelWidget;
|
||||||
import dev.lambdaurora.spruceui.widget.container.SpruceParentWidget;
|
import dev.lambdaurora.spruceui.widget.container.SpruceParentWidget;
|
||||||
import net.fabricmc.fabric.impl.item.group.CreativeGuiExtensions;
|
|
||||||
import net.fabricmc.loader.api.FabricLoader;
|
import net.fabricmc.loader.api.FabricLoader;
|
||||||
import net.minecraft.client.MinecraftClient;
|
import net.minecraft.client.MinecraftClient;
|
||||||
import net.minecraft.client.gui.Element;
|
import net.minecraft.client.gui.Element;
|
||||||
@@ -46,13 +44,8 @@ import net.minecraft.client.gui.screen.ingame.MerchantScreen;
|
|||||||
import net.minecraft.client.gui.screen.multiplayer.MultiplayerScreen;
|
import net.minecraft.client.gui.screen.multiplayer.MultiplayerScreen;
|
||||||
import net.minecraft.client.gui.screen.multiplayer.MultiplayerServerListWidget;
|
import net.minecraft.client.gui.screen.multiplayer.MultiplayerServerListWidget;
|
||||||
import net.minecraft.client.gui.screen.world.WorldListWidget;
|
import net.minecraft.client.gui.screen.world.WorldListWidget;
|
||||||
import net.minecraft.client.gui.widget.AlwaysSelectedEntryListWidget;
|
import net.minecraft.client.gui.widget.*;
|
||||||
import net.minecraft.client.gui.widget.EntryListWidget;
|
|
||||||
import net.minecraft.client.gui.widget.PressableWidget;
|
|
||||||
import net.minecraft.client.gui.widget.SliderWidget;
|
|
||||||
import net.minecraft.screen.slot.Slot;
|
import net.minecraft.screen.slot.Slot;
|
||||||
import net.minecraft.screen.slot.SlotActionType;
|
|
||||||
import net.minecraft.text.Text;
|
|
||||||
import net.minecraft.util.math.MathHelper;
|
import net.minecraft.util.math.MathHelper;
|
||||||
import org.aperlambda.lambdacommon.utils.Pair;
|
import org.aperlambda.lambdacommon.utils.Pair;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
@@ -85,6 +78,7 @@ public class MidnightInput {
|
|||||||
private float mouseSpeedX = 0.f;
|
private float mouseSpeedX = 0.f;
|
||||||
private float mouseSpeedY = 0.f;
|
private float mouseSpeedY = 0.f;
|
||||||
public int inventoryInteractionCooldown = 0;
|
public int inventoryInteractionCooldown = 0;
|
||||||
|
public int screenCloseCooldown = 0;
|
||||||
|
|
||||||
private ControllerControlsWidget controlsInput = null;
|
private ControllerControlsWidget controlsInput = null;
|
||||||
|
|
||||||
@@ -125,10 +119,13 @@ public class MidnightInput {
|
|||||||
// Decreases the cooldown for GUI actions.
|
// Decreases the cooldown for GUI actions.
|
||||||
if (this.actionGuiCooldown > 0)
|
if (this.actionGuiCooldown > 0)
|
||||||
--this.actionGuiCooldown;
|
--this.actionGuiCooldown;
|
||||||
|
if (this.screenCloseCooldown > 0)
|
||||||
|
--this.screenCloseCooldown;
|
||||||
|
|
||||||
InputManager.updateStates();
|
InputManager.updateStates();
|
||||||
|
|
||||||
var controller = MidnightControlsConfig.getController();
|
var controller = MidnightControlsConfig.getController();
|
||||||
|
|
||||||
if (controller.isConnected()) {
|
if (controller.isConnected()) {
|
||||||
var state = controller.getState();
|
var state = controller.getState();
|
||||||
this.fetchButtonInput(client, state, false);
|
this.fetchButtonInput(client, state, false);
|
||||||
@@ -141,10 +138,7 @@ public class MidnightInput {
|
|||||||
this.fetchAxeInput(client, state, true);
|
this.fetchAxeInput(client, state, true);
|
||||||
});
|
});
|
||||||
|
|
||||||
boolean allowInput = true;
|
boolean allowInput = this.controlsInput == null || this.controlsInput.focusedBinding == null;
|
||||||
|
|
||||||
if (this.controlsInput != null && this.controlsInput.focusedBinding != null)
|
|
||||||
allowInput = false;
|
|
||||||
|
|
||||||
if (allowInput)
|
if (allowInput)
|
||||||
InputManager.updateBindings(client);
|
InputManager.updateBindings(client);
|
||||||
@@ -181,7 +175,7 @@ public class MidnightInput {
|
|||||||
*
|
*
|
||||||
* @param client the client instance
|
* @param client the client instance
|
||||||
*/
|
*/
|
||||||
public void onRender(float tickDelta, @NotNull MinecraftClient client) {
|
public void onRender(@NotNull MinecraftClient client) {
|
||||||
if (!(client.currentScreen == null || client.currentScreen instanceof TouchscreenOverlay))
|
if (!(client.currentScreen == null || client.currentScreen instanceof TouchscreenOverlay))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -190,11 +184,11 @@ public class MidnightInput {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (this.targetYaw != 0.f || this.targetPitch != 0.f) {
|
if (this.targetYaw != 0.f || this.targetPitch != 0.f) {
|
||||||
float rotationYaw = (float) (player.prevYaw + (this.targetYaw / 0.10) * tickDelta);
|
float rotationYaw = (float) (player.prevYaw + (this.targetYaw / 0.10) * client.getTickDelta());
|
||||||
float rotationPitch = (float) (player.prevPitch + (this.targetPitch / 0.10) * tickDelta);
|
float rotationPitch = (float) (player.prevPitch + (this.targetPitch / 0.10) * client.getTickDelta());
|
||||||
client.player.setYaw(rotationYaw);
|
client.player.setYaw(rotationYaw);
|
||||||
client.player.setPitch(MathHelper.clamp(rotationPitch, -90.f, 90.f));
|
client.player.setPitch(MathHelper.clamp(rotationPitch, -90.f, 90.f));
|
||||||
if (client.player.isRiding()) {
|
if (client.player.isRiding() && client.player.getVehicle() != null) {
|
||||||
client.player.getVehicle().onPassengerLookAround(client.player);
|
client.player.getVehicle().onPassengerLookAround(client.player);
|
||||||
}
|
}
|
||||||
client.getTutorialManager().onUpdateMouse(this.targetPitch, this.targetYaw);
|
client.getTutorialManager().onUpdateMouse(this.targetPitch, this.targetYaw);
|
||||||
@@ -267,7 +261,7 @@ public class MidnightInput {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void handleButton(@NotNull MinecraftClient client, int button, int action, boolean state) {
|
public void handleButton(@NotNull MinecraftClient client, int button, int action, boolean state) {
|
||||||
if (this.controlsInput != null && this.controlsInput.focusedBinding != null) {
|
if (this.controlsInput != null && this.controlsInput.focusedBinding != null) {
|
||||||
if (action == 0 && !this.controlsInput.currentButtons.contains(button)) {
|
if (action == 0 && !this.controlsInput.currentButtons.contains(button)) {
|
||||||
this.controlsInput.currentButtons.add(button);
|
this.controlsInput.currentButtons.add(button);
|
||||||
@@ -307,6 +301,7 @@ public class MidnightInput {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (FabricLoader.getInstance().isModLoaded("libgui")) LibGuiCompat.handlePress(client.currentScreen);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -322,7 +317,7 @@ public class MidnightInput {
|
|||||||
|
|
||||||
if (button == GLFW.GLFW_GAMEPAD_BUTTON_A && client.currentScreen != null && !isScreenInteractive(client.currentScreen)
|
if (button == GLFW.GLFW_GAMEPAD_BUTTON_A && client.currentScreen != null && !isScreenInteractive(client.currentScreen)
|
||||||
&& this.actionGuiCooldown == 0) {
|
&& this.actionGuiCooldown == 0) {
|
||||||
if (client.currentScreen instanceof CreativeInventoryScreen creativeScreen && ((HandledScreenAccessor) creativeScreen).midnightcontrols$getSlotAt(
|
if (client.currentScreen instanceof HandledScreen<?> handledScreen && ((HandledScreenAccessor) handledScreen).midnightcontrols$getSlotAt(
|
||||||
client.mouse.getX() * (double) client.getWindow().getScaledWidth() / (double) client.getWindow().getWidth(),
|
client.mouse.getX() * (double) client.getWindow().getScaledWidth() / (double) client.getWindow().getWidth(),
|
||||||
client.mouse.getY() * (double) client.getWindow().getScaledHeight() / (double) client.getWindow().getHeight()) != null) return;
|
client.mouse.getY() * (double) client.getWindow().getScaledHeight() / (double) client.getWindow().getHeight()) != null) return;
|
||||||
if (!this.ignoreNextARelease) {
|
if (!this.ignoreNextARelease) {
|
||||||
@@ -335,7 +330,7 @@ public class MidnightInput {
|
|||||||
Screen.wrapScreenError(() -> client.currentScreen.mouseReleased(mouseX, mouseY, GLFW.GLFW_MOUSE_BUTTON_1),
|
Screen.wrapScreenError(() -> client.currentScreen.mouseReleased(mouseX, mouseY, GLFW.GLFW_MOUSE_BUTTON_1),
|
||||||
"mouseReleased event handler", client.currentScreen.getClass().getCanonicalName());
|
"mouseReleased event handler", client.currentScreen.getClass().getCanonicalName());
|
||||||
}
|
}
|
||||||
this.actionGuiCooldown = 5;
|
this.screenCloseCooldown = 5;
|
||||||
} else {
|
} else {
|
||||||
this.ignoreNextARelease = false;
|
this.ignoreNextARelease = false;
|
||||||
}
|
}
|
||||||
@@ -371,11 +366,24 @@ public class MidnightInput {
|
|||||||
private void handleAxe(@NotNull MinecraftClient client, int axis, float value, float absValue, int state) {
|
private void handleAxe(@NotNull MinecraftClient client, int axis, float value, float absValue, int state) {
|
||||||
int asButtonState = value > .5f ? 1 : (value < -.5f ? 2 : 0);
|
int asButtonState = value > .5f ? 1 : (value < -.5f ? 2 : 0);
|
||||||
|
|
||||||
|
|
||||||
if (axis == GLFW_GAMEPAD_AXIS_LEFT_TRIGGER || axis == GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER
|
if (axis == GLFW_GAMEPAD_AXIS_LEFT_TRIGGER || axis == GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER
|
||||||
|| axis == ButtonBinding.controller2Button(GLFW.GLFW_GAMEPAD_AXIS_LEFT_TRIGGER)
|
|| axis == ButtonBinding.controller2Button(GLFW.GLFW_GAMEPAD_AXIS_LEFT_TRIGGER)
|
||||||
|| axis == ButtonBinding.controller2Button(GLFW.GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER))
|
|| axis == ButtonBinding.controller2Button(GLFW.GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER)) {
|
||||||
if (asButtonState == 2)
|
if (asButtonState == 2) {
|
||||||
asButtonState = 0;
|
asButtonState = 0;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// Fixes Triggers not working correctly on some controllers
|
||||||
|
if (MidnightControlsConfig.triggerFix) {
|
||||||
|
value = 1.0f;
|
||||||
|
absValue = 1.0f;
|
||||||
|
state = 1;
|
||||||
|
asButtonState = 1;
|
||||||
|
}
|
||||||
|
if (MidnightControlsConfig.debug) System.out.println(axis + " "+ value + " " + absValue + " " + state);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
boolean currentPlusState = asButtonState == 1;
|
boolean currentPlusState = asButtonState == 1;
|
||||||
@@ -463,19 +471,20 @@ public class MidnightInput {
|
|||||||
}
|
}
|
||||||
} else if (client.currentScreen != null) {
|
} else if (client.currentScreen != null) {
|
||||||
if (axis == GLFW_GAMEPAD_AXIS_RIGHT_Y && absValue >= deadZone) {
|
if (axis == GLFW_GAMEPAD_AXIS_RIGHT_Y && absValue >= deadZone) {
|
||||||
|
float finalValue = value;
|
||||||
|
client.currentScreen.children().stream().filter(element -> element instanceof SpruceEntryListWidget)
|
||||||
|
.map(element -> (SpruceEntryListWidget<?>) element)
|
||||||
|
.filter(AbstractSpruceWidget::isFocusedOrHovered)
|
||||||
|
.anyMatch(element -> {
|
||||||
|
MidnightControls.get().log(String.valueOf(finalValue));
|
||||||
|
element.mouseScrolled(0.0, 0.0, -finalValue);
|
||||||
|
return true;
|
||||||
|
});
|
||||||
client.currentScreen.children().stream().filter(element -> element instanceof EntryListWidget)
|
client.currentScreen.children().stream().filter(element -> element instanceof EntryListWidget)
|
||||||
.map(element -> (EntryListWidget<?>) element)
|
.map(element -> (EntryListWidget<?>) element)
|
||||||
.filter(element -> element.getType().isFocused())
|
.filter(element -> element.getType().isFocused())
|
||||||
.anyMatch(element -> {
|
.anyMatch(element -> {
|
||||||
element.mouseScrolled(0.0, 0.0, -value);
|
element.mouseScrolled(0.0, 0.0, -finalValue);
|
||||||
return true;
|
|
||||||
});
|
|
||||||
client.currentScreen.children().stream().filter(element -> element instanceof SpruceEntryListWidget)
|
|
||||||
.map(element -> (SpruceEntryListWidget<?>) element)
|
|
||||||
.filter(element -> element.getType().isFocused())
|
|
||||||
.anyMatch(element -> {
|
|
||||||
MidnightControls.get().log(String.valueOf(value));
|
|
||||||
element.mouseScrolled(0.0, 0.0, -value);
|
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
@@ -549,7 +558,7 @@ public class MidnightInput {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean handleAButton(@NotNull Screen screen, @NotNull Element focused) {
|
public boolean handleAButton(@NotNull Screen screen, @NotNull Element focused) {
|
||||||
if (focused instanceof PressableWidget widget) {
|
if (focused instanceof PressableWidget widget) {
|
||||||
widget.playDownSound(MinecraftClient.getInstance().getSoundManager());
|
widget.playDownSound(MinecraftClient.getInstance().getSoundManager());
|
||||||
widget.onPress();
|
widget.onPress();
|
||||||
@@ -612,7 +621,7 @@ public class MidnightInput {
|
|||||||
this.actionGuiCooldown = 2; // Prevent to press too quickly the focused element, so we have to skip 5 ticks.
|
this.actionGuiCooldown = 2; // Prevent to press too quickly the focused element, so we have to skip 5 ticks.
|
||||||
return false;
|
return false;
|
||||||
} else if (element instanceof AlwaysSelectedEntryListWidget) {
|
} else if (element instanceof AlwaysSelectedEntryListWidget) {
|
||||||
((EntryListWidgetAccessor) element).midnightcontrols$moveSelection(right ? EntryListWidget.MoveDirection.UP : EntryListWidget.MoveDirection.DOWN);
|
((EntryListWidgetAccessor) element).midnightcontrols$moveSelection(right ? EntryListWidget.MoveDirection.DOWN : EntryListWidget.MoveDirection.UP);
|
||||||
return false;
|
return false;
|
||||||
} else if (element instanceof ParentElement entryList) {
|
} else if (element instanceof ParentElement entryList) {
|
||||||
var focused = entryList.getFocused();
|
var focused = entryList.getFocused();
|
||||||
@@ -637,9 +646,9 @@ public class MidnightInput {
|
|||||||
double powValue = Math.pow(value, 2.0);
|
double powValue = Math.pow(value, 2.0);
|
||||||
if (axis == GLFW_GAMEPAD_AXIS_RIGHT_Y) {
|
if (axis == GLFW_GAMEPAD_AXIS_RIGHT_Y) {
|
||||||
if (state == 2) {
|
if (state == 2) {
|
||||||
this.targetPitch = -MidnightControlsConfig.getRightYAxisSign() * (MidnightControlsConfig.rotationSpeed * powValue) * 0.11D;
|
this.targetPitch = -MidnightControlsConfig.getRightYAxisSign() * (MidnightControlsConfig.yAxisRotationSpeed * powValue) * 0.11D;
|
||||||
} else if (state == 1) {
|
} else if (state == 1) {
|
||||||
this.targetPitch = MidnightControlsConfig.getRightYAxisSign() * (MidnightControlsConfig.rotationSpeed * powValue) * 0.11D;
|
this.targetPitch = MidnightControlsConfig.getRightYAxisSign() * (MidnightControlsConfig.yAxisRotationSpeed * powValue) * 0.11D;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (axis == GLFW_GAMEPAD_AXIS_RIGHT_X) {
|
if (axis == GLFW_GAMEPAD_AXIS_RIGHT_X) {
|
||||||
@@ -653,23 +662,91 @@ public class MidnightInput {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private boolean changeFocus(@NotNull Screen screen, NavigationDirection direction) {
|
private boolean changeFocus(@NotNull Screen screen, NavigationDirection direction) {
|
||||||
if (screen instanceof SpruceScreen spruceScreen) {
|
if (!isScreenInteractive(screen) && !screen.getClass().getCanonicalName().contains("me.jellysquid.mods.sodium.client.gui")) return false;
|
||||||
if (spruceScreen.onNavigation(direction, false)) {
|
try {
|
||||||
this.actionGuiCooldown = 5;
|
if (screen instanceof SpruceScreen spruceScreen) {
|
||||||
|
if (spruceScreen.onNavigation(direction, false)) {
|
||||||
|
this.actionGuiCooldown = 5;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
return false;
|
if (FabricLoader.getInstance().isModLoaded("sodium"))
|
||||||
}
|
SodiumCompat.handleInput(screen, direction.isLookingForward());
|
||||||
if (FabricLoader.getInstance().isModLoaded("sodium")) SodiumCompat.handleInput(screen, direction.isLookingForward());
|
// This still needs some work
|
||||||
if (!screen.changeFocus(direction.isLookingForward())) {
|
// ScreenAccessor accessor = (ScreenAccessor) screen;
|
||||||
if (screen.changeFocus(direction.isLookingForward())) {
|
// if (accessor.getSelected() != null && accessor.getSelected() instanceof ClickableWidget selected && accessor.getSelectables() != null) {
|
||||||
|
// //System.out.println(direction);
|
||||||
|
// if (accessor.getSelectables().size() >= 2) {
|
||||||
|
// //System.out.println(direction + " 2");
|
||||||
|
// int xDifference = Integer.MAX_VALUE;
|
||||||
|
// int yDifference = Integer.MAX_VALUE;
|
||||||
|
// ClickableWidget newWidget = null;
|
||||||
|
// for (int i = 0; i < accessor.getSelectables().size(); ++i) {
|
||||||
|
// if (accessor.getSelectables().get(i) instanceof ClickableWidget candidate) {
|
||||||
|
// if (!(candidate.x == selected.x && candidate.y == selected.y)) {
|
||||||
|
// int canXDifference = Math.abs(candidate.x - selected.x);
|
||||||
|
// int canYDifference = Math.abs(candidate.y - selected.y);
|
||||||
|
// if (direction.isHorizontal()) {
|
||||||
|
// if (direction.isLookingForward()) {
|
||||||
|
// if (candidate.x >= selected.x && canYDifference <= yDifference && canXDifference <= xDifference) {
|
||||||
|
// System.out.println(direction + " forward horizontal " + candidate);
|
||||||
|
// newWidget = candidate;
|
||||||
|
// xDifference = canXDifference;
|
||||||
|
// yDifference = canYDifference;
|
||||||
|
// }
|
||||||
|
// } else {
|
||||||
|
// if (candidate.x <= selected.x && canYDifference <= yDifference && canXDifference >= xDifference) {
|
||||||
|
// System.out.println(direction + " backward horizontal " + candidate);
|
||||||
|
// newWidget = candidate;
|
||||||
|
// xDifference = canXDifference;
|
||||||
|
// yDifference = canYDifference;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// } else {
|
||||||
|
// if (direction.isLookingForward()) {
|
||||||
|
// if (candidate.y >= selected.y && canYDifference <= yDifference && canXDifference <= xDifference) {
|
||||||
|
// System.out.println(direction + " forward vertical " + candidate);
|
||||||
|
// newWidget = candidate;
|
||||||
|
// xDifference = canXDifference;
|
||||||
|
// yDifference = canYDifference;
|
||||||
|
// }
|
||||||
|
// } else {
|
||||||
|
// if (candidate.y <= selected.y && canYDifference >= yDifference && canXDifference <= xDifference) {
|
||||||
|
// System.out.println(direction + " backward vertical " + candidate);
|
||||||
|
// newWidget = candidate;
|
||||||
|
// xDifference = canXDifference;
|
||||||
|
// yDifference = canYDifference;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// if (newWidget != null) {
|
||||||
|
// //selected.changeFocus(true);
|
||||||
|
// ((ClickableWidgetAccessor) selected).setFocused(false);
|
||||||
|
// ((ClickableWidgetAccessor) newWidget).setFocused(true);
|
||||||
|
// screen.setFocused(newWidget);
|
||||||
|
// screen.changeFocus(false);
|
||||||
|
// screen.changeFocus(true);
|
||||||
|
// this.actionGuiCooldown = 5;
|
||||||
|
// return true;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
if (!screen.changeFocus(direction.isLookingForward())) {
|
||||||
|
if (screen.changeFocus(direction.isLookingForward())) {
|
||||||
|
this.actionGuiCooldown = 5;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
this.actionGuiCooldown = 5;
|
this.actionGuiCooldown = 5;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return true;
|
} catch (Exception exception) {MidnightControls.get().warn("Unknown exception encountered while trying to change focus: "+exception);}
|
||||||
} else {
|
return false;
|
||||||
this.actionGuiCooldown = 5;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isScreenInteractive(@NotNull Screen screen) {
|
public static boolean isScreenInteractive(@NotNull Screen screen) {
|
||||||
|
|||||||
@@ -0,0 +1,41 @@
|
|||||||
|
package eu.midnightdust.midnightcontrols.client.compat;
|
||||||
|
|
||||||
|
import dev.emi.emi.screen.EmiScreen;
|
||||||
|
import dev.emi.emi.screen.EmiScreenManager;
|
||||||
|
import eu.midnightdust.midnightcontrols.client.MidnightControlsClient;
|
||||||
|
import eu.midnightdust.midnightcontrols.client.controller.ButtonBinding;
|
||||||
|
import eu.midnightdust.midnightcontrols.client.controller.ButtonCategory;
|
||||||
|
import eu.midnightdust.midnightcontrols.client.controller.InputManager;
|
||||||
|
import net.minecraft.client.gui.screen.ingame.HandledScreen;
|
||||||
|
import org.aperlambda.lambdacommon.Identifier;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
import org.lwjgl.glfw.GLFW;
|
||||||
|
|
||||||
|
public class EMICompat implements CompatHandler {
|
||||||
|
public static boolean handleTabs(boolean direction) {
|
||||||
|
if (MidnightControlsClient.get().input.actionGuiCooldown == 0 &&EmiScreenManager.searchLeft != null && EmiScreenManager.searchRight != null) {
|
||||||
|
if (direction) EmiScreenManager.searchRight.onPress();
|
||||||
|
else EmiScreenManager.searchLeft.onPress();
|
||||||
|
MidnightControlsClient.get().input.actionGuiCooldown = 5;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public void handle(@NotNull MidnightControlsClient mod) {
|
||||||
|
ButtonCategory category = new ButtonCategory(new Identifier("midnightcontrols","category.emi"));
|
||||||
|
InputManager.registerCategory(category);
|
||||||
|
new ButtonBinding.Builder("emi_page_left")
|
||||||
|
.buttons(GLFW.GLFW_GAMEPAD_BUTTON_LEFT_BUMPER, ButtonBinding.axisAsButton(GLFW.GLFW_GAMEPAD_AXIS_LEFT_TRIGGER, true))
|
||||||
|
.category(category)
|
||||||
|
.action((client,action,value,buttonState)->handleTabs(false)).cooldown()
|
||||||
|
.filter(((client, buttonBinding) -> client.currentScreen instanceof HandledScreen<?> || client.currentScreen instanceof EmiScreen))
|
||||||
|
.register();
|
||||||
|
new ButtonBinding.Builder("emi_page_right")
|
||||||
|
.buttons(GLFW.GLFW_GAMEPAD_BUTTON_RIGHT_BUMPER, ButtonBinding.axisAsButton(GLFW.GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER, true))
|
||||||
|
.category(category)
|
||||||
|
.action((client,action,value,buttonState)->handleTabs(true)).cooldown()
|
||||||
|
.filter(((client, buttonBinding) -> client.currentScreen instanceof HandledScreen<?> || client.currentScreen instanceof EmiScreen))
|
||||||
|
.register();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
package eu.midnightdust.midnightcontrols.client.compat;
|
||||||
|
|
||||||
|
import io.github.cottonmc.cotton.gui.impl.client.CottonScreenImpl;
|
||||||
|
import io.github.cottonmc.cotton.gui.widget.WButton;
|
||||||
|
import net.minecraft.client.MinecraftClient;
|
||||||
|
import net.minecraft.client.gui.screen.Screen;
|
||||||
|
import net.minecraft.client.sound.PositionedSoundInstance;
|
||||||
|
import net.minecraft.sound.SoundEvents;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
|
@SuppressWarnings("UnstableApiUsage")
|
||||||
|
public class LibGuiCompat {
|
||||||
|
public static boolean handlePress(@NotNull Screen screen) {
|
||||||
|
if (screen instanceof CottonScreenImpl cottonScreen) {
|
||||||
|
if (cottonScreen.getDescription() != null && cottonScreen.getDescription().getFocus() != null) {
|
||||||
|
if (cottonScreen.getDescription().getFocus() instanceof WButton button && button.getOnClick() != null) {
|
||||||
|
button.getOnClick().run();
|
||||||
|
MinecraftClient.getInstance().getSoundManager().play(PositionedSoundInstance.master(SoundEvents.UI_BUTTON_CLICK, 1.0F));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -45,10 +45,10 @@ public class MidnightControlsCompat {
|
|||||||
mod.log("Adding Ok Zoomer compatibility...");
|
mod.log("Adding Ok Zoomer compatibility...");
|
||||||
HANDLERS.add(new OkZoomerCompat());
|
HANDLERS.add(new OkZoomerCompat());
|
||||||
}
|
}
|
||||||
/*if (isReiPresent()) {
|
if (isEMIPresent()) {
|
||||||
mod.log("Adding REI compatiblity...");
|
mod.log("Adding EMI compatibility...");
|
||||||
HANDLERS.add(new ReiCompat());
|
HANDLERS.add(new EMICompat());
|
||||||
}*/
|
}
|
||||||
if (FabricLoader.getInstance().isModLoaded("hardcorequesting") && LambdaReflection.doesClassExist(HQMCompat.GUI_BASE_CLASS_PATH)) {
|
if (FabricLoader.getInstance().isModLoaded("hardcorequesting") && LambdaReflection.doesClassExist(HQMCompat.GUI_BASE_CLASS_PATH)) {
|
||||||
mod.log("Adding HQM compatibility...");
|
mod.log("Adding HQM compatibility...");
|
||||||
HANDLERS.add(new HQMCompat());
|
HANDLERS.add(new HQMCompat());
|
||||||
@@ -159,4 +159,12 @@ public class MidnightControlsCompat {
|
|||||||
public static boolean isReiPresent() {
|
public static boolean isReiPresent() {
|
||||||
return FabricLoader.getInstance().isModLoaded("roughlyenoughitems");
|
return FabricLoader.getInstance().isModLoaded("roughlyenoughitems");
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* Returns whether EMI is present.
|
||||||
|
*
|
||||||
|
* @return true if EMI is present, else false
|
||||||
|
*/
|
||||||
|
public static boolean isEMIPresent() {
|
||||||
|
return FabricLoader.getInstance().isModLoaded("emi");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,10 +30,6 @@ public class MidnightControlsMixinPlugin implements IMixinConfigPlugin {
|
|||||||
private final HashMap<String, Boolean> conditionalMixins = new HashMap<>();
|
private final HashMap<String, Boolean> conditionalMixins = new HashMap<>();
|
||||||
|
|
||||||
public MidnightControlsMixinPlugin() {
|
public MidnightControlsMixinPlugin() {
|
||||||
this.putConditionalMixin("EntryListWidgetAccessor", MidnightControlsCompat.isReiPresent());
|
|
||||||
this.putConditionalMixin("EntryWidgetAccessor", MidnightControlsCompat.isReiPresent());
|
|
||||||
this.putConditionalMixin("RecipeViewingScreenAccessor", MidnightControlsCompat.isReiPresent());
|
|
||||||
this.putConditionalMixin("VillagerRecipeViewingScreenAccessor", MidnightControlsCompat.isReiPresent());
|
|
||||||
this.putConditionalMixin("SodiumOptionsGUIAccessor", FabricLoader.getInstance().isModLoaded("sodium"));
|
this.putConditionalMixin("SodiumOptionsGUIAccessor", FabricLoader.getInstance().isModLoaded("sodium"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,355 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright © 2021 LambdAurora <aurora42lambda@gmail.com>
|
|
||||||
*
|
|
||||||
* This file is part of midnightcontrols.
|
|
||||||
*
|
|
||||||
* Licensed under the MIT license. For more information,
|
|
||||||
* see the LICENSE file.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package eu.midnightdust.midnightcontrols.client.compat;
|
|
||||||
|
|
||||||
import eu.midnightdust.midnightcontrols.client.ButtonState;
|
|
||||||
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.InputHandlers;
|
|
||||||
import eu.midnightdust.midnightcontrols.client.controller.PressAction;
|
|
||||||
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.gui.Element;
|
|
||||||
import net.minecraft.client.gui.Selectable;
|
|
||||||
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.Pair;
|
|
||||||
import org.aperlambda.lambdacommon.utils.LambdaReflection;
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
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.*;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Represents a compatibility handler for REI.
|
|
||||||
*
|
|
||||||
* @author LambdAurora
|
|
||||||
* @version 1.7.0
|
|
||||||
* @since 1.2.0
|
|
||||||
*/
|
|
||||||
public class ReiCompat implements CompatHandler {
|
|
||||||
private static EntryListWidget ENTRY_LIST_WIDGET;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void handle(@NotNull MidnightControlsClient mod) {
|
|
||||||
/*ButtonBinding.builder(new Identifier("rei", "category_back"))
|
|
||||||
.buttons(GLFW_GAMEPAD_BUTTON_LEFT_BUMPER)
|
|
||||||
.filter((client, binding) -> isViewingScreen(client.currentScreen))
|
|
||||||
.action(handleTab(false))
|
|
||||||
.cooldown(true)
|
|
||||||
.register();
|
|
||||||
ButtonBinding.builder(new Identifier("rei", "category_next"))
|
|
||||||
.buttons(GLFW_GAMEPAD_BUTTON_RIGHT_BUMPER)
|
|
||||||
.filter((client, binding) -> isViewingScreen(client.currentScreen))
|
|
||||||
.action(handleTab(true))
|
|
||||||
.cooldown(true)
|
|
||||||
.register();
|
|
||||||
|
|
||||||
ButtonBinding.builder(new Identifier("rei", "page_back"))
|
|
||||||
.buttons(ButtonBinding.axisAsButton(GLFW_GAMEPAD_AXIS_RIGHT_X, false))
|
|
||||||
.filter((client, binding) -> InputHandlers.inInventory(client, binding) || isViewingScreen(client.currentScreen))
|
|
||||||
.action(handlePage(false))
|
|
||||||
.cooldown(true)
|
|
||||||
.register();
|
|
||||||
ButtonBinding.builder(new Identifier("rei", "page_next"))
|
|
||||||
.buttons(ButtonBinding.axisAsButton(GLFW_GAMEPAD_AXIS_RIGHT_X, true))
|
|
||||||
.filter((client, binding) -> InputHandlers.inInventory(client, binding) || isViewingScreen(client.currentScreen))
|
|
||||||
.action(handlePage(true))
|
|
||||||
.cooldown(true)
|
|
||||||
.register();
|
|
||||||
|
|
||||||
ButtonBinding.builder(new Identifier("rei", "recipe_back"))
|
|
||||||
.buttons(GLFW_GAMEPAD_BUTTON_DPAD_UP)
|
|
||||||
.filter((client, binding) -> isViewingScreen(client.currentScreen))
|
|
||||||
.action(handleRecipe(false))
|
|
||||||
.cooldown(true)
|
|
||||||
.register();
|
|
||||||
ButtonBinding.builder(new Identifier("rei", "recipe_next"))
|
|
||||||
.buttons(GLFW_GAMEPAD_BUTTON_DPAD_DOWN)
|
|
||||||
.filter((client, binding) -> isViewingScreen(client.currentScreen))
|
|
||||||
.action(handleRecipe(true))
|
|
||||||
.cooldown(true)
|
|
||||||
.register();
|
|
||||||
|
|
||||||
// For some reasons this is broken.
|
|
||||||
ButtonBinding.builder(new Identifier("rei", "show_usage"))
|
|
||||||
.buttons(GLFW_GAMEPAD_BUTTON_RIGHT_THUMB)
|
|
||||||
.filter((client, binding) -> InputHandlers.inInventory(client, binding) || isViewingScreen(client.currentScreen))
|
|
||||||
.action(handleShowRecipeUsage(true))
|
|
||||||
.cooldown(true)
|
|
||||||
.register();
|
|
||||||
|
|
||||||
ButtonBinding.builder(new Identifier("rei", "show_recipe"))
|
|
||||||
.buttons(GLFW_GAMEPAD_BUTTON_LEFT_THUMB)
|
|
||||||
.filter((client, binding) -> InputHandlers.inInventory(client, binding) || isViewingScreen(client.currentScreen))
|
|
||||||
.action(handleShowRecipeUsage(false))
|
|
||||||
.cooldown(true)
|
|
||||||
.register();
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
/*
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean requireMouseOnScreen(Screen screen) {
|
|
||||||
return isViewingScreen(screen);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public @Nullable CompatHandler.SlotPos getSlotAt(@NotNull Screen screen, int mouseX, int mouseY) {
|
|
||||||
|
|
||||||
ScreenOverlayImpl overlay = ScreenOverlayImpl.getInstance();
|
|
||||||
if (overlay.isInside(mouseX, mouseY)) {
|
|
||||||
EntryListWidget widget = getEntryListWidget();
|
|
||||||
if (widget == null)
|
|
||||||
return null;
|
|
||||||
|
|
||||||
return this.getSlotAt(widget, mouseX, mouseY, false);
|
|
||||||
} else if (isViewingScreen(screen)) {
|
|
||||||
for (Element element : screen.children()) {
|
|
||||||
var slot = this.getSlotAt(element, mouseX, mouseY, true);
|
|
||||||
if (slot != null)
|
|
||||||
return slot;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
private @Nullable CompatHandler.SlotPos getSlotAt(@NotNull Element element, int mouseX, int mouseY, boolean allowEmpty) {
|
|
||||||
if (element instanceof EntryWidget) {
|
|
||||||
EntryWidget entry = (EntryWidget) element;
|
|
||||||
if (entry.containsMouse(mouseX, mouseY)) {
|
|
||||||
if (!allowEmpty && entry.getEntries().isEmpty())
|
|
||||||
return INVALID_SLOT;
|
|
||||||
return new SlotPos(entry.getBounds().getX() + 1, entry.getBounds().getY() + 1);
|
|
||||||
}
|
|
||||||
} else if (element instanceof EntryListWidget) {
|
|
||||||
List<EntryListEntryWidget> entries = ((EntryListWidgetAccessor) element).getEntries();
|
|
||||||
for (EntryListEntryWidget entry : entries) {
|
|
||||||
var slot = this.getSlotAt(entry, mouseX, mouseY, allowEmpty);
|
|
||||||
if (slot != null && slot != INVALID_SLOT)
|
|
||||||
return slot;
|
|
||||||
}
|
|
||||||
} else if (!(element instanceof ButtonWidget) && element instanceof WidgetWithBounds widgetWithBounds) {
|
|
||||||
for (var child : widgetWithBounds.children()) {
|
|
||||||
var slot = this.getSlotAt(child, mouseX, mouseY, allowEmpty);
|
|
||||||
if (slot != null && slot != INVALID_SLOT)
|
|
||||||
return slot;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static boolean isViewingScreen(Screen screen) {
|
|
||||||
return screen instanceof DefaultDisplayViewingScreen || screen instanceof CompositeDisplayViewingScreen;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean handleMenuBack(@NotNull MinecraftClient client, @NotNull Screen screen) {
|
|
||||||
if (!isViewingScreen(screen))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
MinecraftClient.getInstance().setScreen(REIRuntimeImpl.getInstance().getPreviousContainerScreen());
|
|
||||||
REIRuntimeImpl.getInstance().getLastOverlay().init();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static EntryListWidget getEntryListWidget() {
|
|
||||||
if (ENTRY_LIST_WIDGET == null) {
|
|
||||||
ENTRY_LIST_WIDGET = LambdaReflection.getFirstFieldOfType(ContainerScreenOverlay.class, EntryListWidget.class)
|
|
||||||
.map(field -> (EntryListWidget) LambdaReflection.getFieldValue(null, field))
|
|
||||||
.orElse(null);
|
|
||||||
}
|
|
||||||
return ENTRY_LIST_WIDGET;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static @Nullable AbstractEntryStack getCurrentStack(@NotNull MinecraftClient client) {
|
|
||||||
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();
|
|
||||||
|
|
||||||
if (isViewingScreen(client.currentScreen)) {
|
|
||||||
for (Element element : client.currentScreen.children()) {
|
|
||||||
EntryStack stack = getCurrentStack(element, x, y);
|
|
||||||
if (stack != null)
|
|
||||||
return stack;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Optional<ContainerScreenOverlay> overlay = REIRuntimeImpl.getInstance().getOverlay(false,false);
|
|
||||||
if (!overlay.isPresent())
|
|
||||||
return RecipeHelper.getInstance().getScreenFocusedStack(client.currentScreen);
|
|
||||||
EntryListWidget widget = getEntryListWidget();
|
|
||||||
if (widget == null)
|
|
||||||
return ScreenOverlayImpl.getInstance().getInstance().getOverlayMenu()..getScreenFocusedStack(client.currentScreen);
|
|
||||||
|
|
||||||
return getCurrentStack(widget, x, y);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static @Nullable EntryStack getCurrentStack(@NotNull Element element, double mouseX, double mouseY) {
|
|
||||||
if (element instanceof EntryWidget) {
|
|
||||||
EntryWidget entry = (EntryWidget) element;
|
|
||||||
if (entry.containsMouse(mouseX, mouseY))
|
|
||||||
return ((EntryWidgetAccessor) entry).lambdacontrols_getCurrentEntry();
|
|
||||||
} else if (element instanceof EntryListWidget) {
|
|
||||||
List<EntryListEntryWidget> entries = ((EntryListWidgetAccessor) element).getEntries();
|
|
||||||
for (EntryListEntryWidget entry : entries) {
|
|
||||||
if (entry.containsMouse(mouseX, mouseY)) {
|
|
||||||
return ((EntryWidgetAccessor) entry).lambdacontrols_getCurrentEntry();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else if (!(element instanceof ButtonWidget) && element instanceof WidgetWithBounds) {
|
|
||||||
for (Element child : ((WidgetWithBounds) element).children()) {
|
|
||||||
EntryStack stack = getCurrentStack(child, mouseX, mouseY);
|
|
||||||
if (stack != null)
|
|
||||||
return stack;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static PressAction handleShowRecipeUsage(boolean usage) {
|
|
||||||
return (client, button, value, action) -> {
|
|
||||||
if (action.isUnpressed())
|
|
||||||
return false;
|
|
||||||
|
|
||||||
EntryStack stack = RecipeHelper.getInstance().getScreenFocusedStack(client.currentScreen);
|
|
||||||
if (stack == null) {
|
|
||||||
stack = getCurrentStack(client);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (stack != null && !stack.isEmpty()) {
|
|
||||||
stack = stack.copy();
|
|
||||||
if (usage) {
|
|
||||||
return ClientHelper.getInstance().openView(ClientHelper.ViewSearchBuilder.builder().addUsagesFor(stack).setInputNotice(stack).fillPreferredOpenedCategory());
|
|
||||||
} else {
|
|
||||||
return ClientHelper.getInstance().openView(ClientHelper.ViewSearchBuilder.builder().addRecipesFor(stack).setOutputNotice(stack).fillPreferredOpenedCategory());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
private static PressAction handlePage(boolean next) {
|
|
||||||
return (client, button, value, action) -> {
|
|
||||||
if (action == ButtonState.RELEASE)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
Optional<ContainerScreenOverlay> overlay = ScreenHelper.getOptionalOverlay();
|
|
||||||
if (!overlay.isPresent())
|
|
||||||
return false;
|
|
||||||
|
|
||||||
EntryListWidget widget = getEntryListWidget();
|
|
||||||
if (widget == null)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if (next)
|
|
||||||
widget.nextPage();
|
|
||||||
else
|
|
||||||
widget.previousPage();
|
|
||||||
widget.updateEntriesPosition();
|
|
||||||
|
|
||||||
return true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the handler for category tabs buttons.
|
|
||||||
*
|
|
||||||
* @param next True if the action is to switch to the next tab.
|
|
||||||
* @return The handler.
|
|
||||||
*/
|
|
||||||
/*
|
|
||||||
private static PressAction handleTab(boolean next) {
|
|
||||||
return (client, button, value, action) -> {
|
|
||||||
if (action != ButtonState.RELEASE)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if (client.currentScreen instanceof RecipeViewingScreen) {
|
|
||||||
RecipeViewingScreenAccessor screen = (RecipeViewingScreenAccessor) client.currentScreen;
|
|
||||||
if (next)
|
|
||||||
screen.getCategoryNext().onClick();
|
|
||||||
else
|
|
||||||
screen.getCategoryBack().onClick();
|
|
||||||
return true;
|
|
||||||
} else if (client.currentScreen instanceof VillagerRecipeViewingScreen) {
|
|
||||||
VillagerRecipeViewingScreenAccessor screen = (VillagerRecipeViewingScreenAccessor) client.currentScreen;
|
|
||||||
List<RecipeCategory<?>> categories = screen.getCategories();
|
|
||||||
int currentTab = screen.getSelectedCategoryIndex();
|
|
||||||
screen.setSelectedCategoryIndex(getNextIndex(currentTab, categories.size(), next));
|
|
||||||
screen.setSelectedRecipeIndex(0);
|
|
||||||
screen.lambdacontrols_init();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
private static PressAction handleRecipe(boolean next) {
|
|
||||||
return (client, button, value, action) -> {
|
|
||||||
if (action.isUnpressed())
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if (client.currentScreen instanceof RecipeViewingScreen) {
|
|
||||||
RecipeViewingScreenAccessor screen = (RecipeViewingScreenAccessor) client.currentScreen;
|
|
||||||
if (next)
|
|
||||||
screen.getRecipeNext().onClick();
|
|
||||||
else
|
|
||||||
screen.getRecipeBack().onClick();
|
|
||||||
return true;
|
|
||||||
} else if (client.currentScreen instanceof VillagerRecipeViewingScreen) {
|
|
||||||
VillagerRecipeViewingScreenAccessor screen = (VillagerRecipeViewingScreenAccessor) client.currentScreen;
|
|
||||||
List<RecipeCategory<?>> categories = screen.getCategories();
|
|
||||||
int currentTab = screen.getSelectedCategoryIndex();
|
|
||||||
List<RecipeDisplay> recipes = screen.getCategoryMap().get(categories.get(currentTab));
|
|
||||||
|
|
||||||
if (recipes.size() == 0)
|
|
||||||
return true;
|
|
||||||
|
|
||||||
int currentRecipe = screen.getSelectedRecipeIndex();
|
|
||||||
int nextRecipe = getNextIndex(currentRecipe, recipes.size(), next);
|
|
||||||
|
|
||||||
if (nextRecipe == 0) {
|
|
||||||
screen.getScrolling().scrollTo(0.0, true);
|
|
||||||
} else if (nextRecipe == recipes.size() - 1) {
|
|
||||||
screen.getScrolling().scrollTo(screen.getScrolling().getMaxScroll(), true);
|
|
||||||
} else {
|
|
||||||
double scrollAmount = screen.getScrolling().getMaxScroll() / (float) recipes.size();
|
|
||||||
screen.getScrolling().offset(next ? scrollAmount : -scrollAmount, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
screen.setSelectedRecipeIndex(nextRecipe);
|
|
||||||
screen.lambdacontrols_init();
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
private static int getNextIndex(int currentIndex, int size, boolean next) {
|
|
||||||
int nextIndex = currentIndex + (next ? 1 : -1);
|
|
||||||
if (nextIndex < 0)
|
|
||||||
nextIndex = size - 1;
|
|
||||||
else if (nextIndex >= size)
|
|
||||||
nextIndex = 0;
|
|
||||||
return nextIndex;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
@@ -22,8 +22,10 @@ public class SodiumCompat {
|
|||||||
i = (direction ? ((max > i) ? ++i : 0) : (i > 0 ? --i : max));
|
i = (direction ? ((max > i) ? ++i : 0) : (i > 0 ? --i : max));
|
||||||
|
|
||||||
var dimensions = accessor.getControls().get(i).getDimensions();
|
var dimensions = accessor.getControls().get(i).getDimensions();
|
||||||
InputManager.INPUT_MANAGER.targetMouseX = (int) (client.getWindow().getScaleFactor() * dimensions.getCenterX());
|
int x = (int) (client.getWindow().getScaleFactor() * dimensions.getCenterX());
|
||||||
InputManager.INPUT_MANAGER.targetMouseY = (int) (client.getWindow().getScaleFactor() * dimensions.getCenterY());
|
int y = (int) (client.getWindow().getScaleFactor() * dimensions.getCenterY());
|
||||||
|
InputManager.queueMousePosition(x,y);
|
||||||
|
InputManager.INPUT_MANAGER.updateMousePosition(client);
|
||||||
MidnightControlsClient.get().input.actionGuiCooldown = 5;
|
MidnightControlsClient.get().input.actionGuiCooldown = 5;
|
||||||
if (MidnightControlsConfig.debug) MidnightControls.get().log(i+" "+accessor.getControls().size()+" | " + dimensions.getCenterX() + " " + dimensions.getCenterY());
|
if (MidnightControlsConfig.debug) MidnightControls.get().log(i+" "+accessor.getControls().size()+" | " + dimensions.getCenterX() + " " + dimensions.getCenterY());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,30 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright © 2021 LambdAurora <aurora42lambda@gmail.com>
|
|
||||||
*
|
|
||||||
* This file is part of midnightcontrols.
|
|
||||||
*
|
|
||||||
* Licensed under the MIT license. For more information,
|
|
||||||
* see the LICENSE file.
|
|
||||||
*/
|
|
||||||
|
|
||||||
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.
|
|
||||||
*
|
|
||||||
* @author LambdAurora
|
|
||||||
* @version 1.5.0
|
|
||||||
* @since 1.5.0
|
|
||||||
*/
|
|
||||||
@Mixin(value = EntryListWidget.class, remap = false)
|
|
||||||
public interface EntryListWidgetAccessor {
|
|
||||||
@Accessor(value = "children")
|
|
||||||
List<Element> getEntries();
|
|
||||||
}
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright © 2021 LambdAurora <aurora42lambda@gmail.com>
|
|
||||||
*
|
|
||||||
* This file is part of midnightcontrols.
|
|
||||||
*
|
|
||||||
* Licensed under the MIT license. For more information,
|
|
||||||
* see the LICENSE file.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package eu.midnightdust.midnightcontrols.client.compat.mixin;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Represents an accessor to REI's EntryWidget.
|
|
||||||
*
|
|
||||||
* @author LambdAurora
|
|
||||||
* @version 1.5.0
|
|
||||||
* @since 1.5.0
|
|
||||||
*/
|
|
||||||
//@Mixin(value = EntryWidget.class, remap = false)
|
|
||||||
public interface EntryWidgetAccessor {
|
|
||||||
/*@Invoker("getCurrentEntry")
|
|
||||||
EntryStack midnightcontrols_getCurrentEntry();*/
|
|
||||||
}
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright © 2021 LambdAurora <aurora42lambda@gmail.com>
|
|
||||||
*
|
|
||||||
* This file is part of midnightcontrols.
|
|
||||||
*
|
|
||||||
* Licensed under the MIT license. For more information,
|
|
||||||
* see the LICENSE file.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package eu.midnightdust.midnightcontrols.client.compat.mixin;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Represents an accessor to REI's RecipeViewingScreen.
|
|
||||||
*
|
|
||||||
* @author LambdAurora
|
|
||||||
* @version 1.7.0
|
|
||||||
* @since 1.2.0
|
|
||||||
*/
|
|
||||||
//@Mixin(value = DefaultDisplayViewingScreen.class, remap = false)
|
|
||||||
public interface RecipeViewingScreenAccessor {
|
|
||||||
/*@Accessor("categoryBack")
|
|
||||||
Button getCategoryBack();
|
|
||||||
|
|
||||||
@Accessor("categoryNext")
|
|
||||||
Button getCategoryNext();
|
|
||||||
|
|
||||||
@Accessor("recipeBack")
|
|
||||||
Button getRecipeBack();
|
|
||||||
|
|
||||||
@Accessor("recipeNext")
|
|
||||||
Button getRecipeNext();*/
|
|
||||||
}
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
/*
|
|
||||||
* Copyright © 2021 LambdAurora <aurora42lambda@gmail.com>
|
|
||||||
*
|
|
||||||
* This file is part of midnightcontrols.
|
|
||||||
*
|
|
||||||
* Licensed under the MIT license. For more information,
|
|
||||||
* see the LICENSE file.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package eu.midnightdust.midnightcontrols.client.compat.mixin;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Represents an accessor to REI's VillagerRecipeViewingScreen.
|
|
||||||
*
|
|
||||||
* @author LambdAurora
|
|
||||||
* @version 1.7.0
|
|
||||||
* @since 1.2.0
|
|
||||||
*/
|
|
||||||
//@Mixin(CompositeDisplayViewingScreen.class)
|
|
||||||
public interface VillagerRecipeViewingScreenAccessor {
|
|
||||||
/*@Accessor(value = "categoryMap", remap = false)
|
|
||||||
Map<DisplayCategory<?>, List<Display>> getCategoryMap();
|
|
||||||
|
|
||||||
@Accessor(value = "categories", remap = false)
|
|
||||||
List<DisplayCategory<?>> getCategories();
|
|
||||||
|
|
||||||
@Accessor(value = "selectedCategoryIndex", remap = false)
|
|
||||||
int getSelectedCategoryIndex();
|
|
||||||
|
|
||||||
@Accessor(value = "selectedCategoryIndex", remap = false)
|
|
||||||
void setSelectedCategoryIndex(int selectedCategoryIndex);
|
|
||||||
|
|
||||||
@Accessor(value = "selectedRecipeIndex", remap = false)
|
|
||||||
int getSelectedRecipeIndex();
|
|
||||||
|
|
||||||
@Accessor(value = "selectedRecipeIndex", remap = false)
|
|
||||||
void setSelectedRecipeIndex(int selectedRecipeIndex);
|
|
||||||
|
|
||||||
@Accessor(value = "scrolling", remap = false)
|
|
||||||
ScrollingContainer getScrolling();
|
|
||||||
|
|
||||||
@Invoker("init")
|
|
||||||
void midnightcontrols_init();*/
|
|
||||||
}
|
|
||||||
@@ -62,6 +62,9 @@ public class ButtonBinding {
|
|||||||
.action(MovementHandler.HANDLER).onlyInGame().register();
|
.action(MovementHandler.HANDLER).onlyInGame().register();
|
||||||
public static final ButtonBinding SCREENSHOT = new Builder("screenshot").buttons(GLFW_GAMEPAD_BUTTON_DPAD_UP, GLFW_GAMEPAD_BUTTON_A)
|
public static final ButtonBinding SCREENSHOT = new Builder("screenshot").buttons(GLFW_GAMEPAD_BUTTON_DPAD_UP, GLFW_GAMEPAD_BUTTON_A)
|
||||||
.action(InputHandlers::handleScreenshot).cooldown().register();
|
.action(InputHandlers::handleScreenshot).cooldown().register();
|
||||||
|
|
||||||
|
public static final ButtonBinding DEBUG_SCREEN = new Builder("debug_screen").buttons(GLFW_GAMEPAD_BUTTON_DPAD_UP, GLFW_GAMEPAD_BUTTON_B)
|
||||||
|
.action((client,binding,value,action) -> {if (action == ButtonState.PRESS) client.options.debugEnabled = !client.options.debugEnabled; return true;}).cooldown().register();
|
||||||
public static final ButtonBinding SLOT_DOWN = new Builder("slot_down").buttons(GLFW_GAMEPAD_BUTTON_DPAD_DOWN)
|
public static final ButtonBinding SLOT_DOWN = new Builder("slot_down").buttons(GLFW_GAMEPAD_BUTTON_DPAD_DOWN)
|
||||||
.action(InputHandlers.handleInventorySlotPad(1)).onlyInInventory().cooldown().register();
|
.action(InputHandlers.handleInventorySlotPad(1)).onlyInInventory().cooldown().register();
|
||||||
public static final ButtonBinding SLOT_LEFT = new Builder("slot_left").buttons(GLFW_GAMEPAD_BUTTON_DPAD_LEFT)
|
public static final ButtonBinding SLOT_LEFT = new Builder("slot_left").buttons(GLFW_GAMEPAD_BUTTON_DPAD_LEFT)
|
||||||
@@ -89,7 +92,7 @@ public class ButtonBinding {
|
|||||||
.action(InputHandlers.handleActions()).filter(InputHandlers::inInventory).cooldown().register();
|
.action(InputHandlers.handleActions()).filter(InputHandlers::inInventory).cooldown().register();
|
||||||
public static final ButtonBinding QUICK_MOVE = new Builder("quick_move").buttons(GLFW_GAMEPAD_BUTTON_Y)
|
public static final ButtonBinding QUICK_MOVE = new Builder("quick_move").buttons(GLFW_GAMEPAD_BUTTON_Y)
|
||||||
.action(InputHandlers.handleActions()).filter(InputHandlers::inInventory).cooldown().register();
|
.action(InputHandlers.handleActions()).filter(InputHandlers::inInventory).cooldown().register();
|
||||||
public static final ButtonBinding TOGGLE_PERSPECTIVE = new Builder("toggle_perspective").buttons(GLFW_GAMEPAD_BUTTON_DPAD_UP, GLFW_GAMEPAD_BUTTON_Y).cooldown().register();
|
public static final ButtonBinding TOGGLE_PERSPECTIVE = new Builder("toggle_perspective").filter(InputHandlers::inGame).buttons(GLFW_GAMEPAD_BUTTON_DPAD_UP, GLFW_GAMEPAD_BUTTON_Y).cooldown().register();
|
||||||
public static final ButtonBinding USE = new Builder("use").buttons(axisAsButton(GLFW_GAMEPAD_AXIS_LEFT_TRIGGER, true)).register();
|
public static final ButtonBinding USE = new Builder("use").buttons(axisAsButton(GLFW_GAMEPAD_AXIS_LEFT_TRIGGER, true)).register();
|
||||||
|
|
||||||
private int[] button;
|
private int[] button;
|
||||||
@@ -387,18 +390,26 @@ public class ButtonBinding {
|
|||||||
ButtonBinding.HOTBAR_RIGHT,
|
ButtonBinding.HOTBAR_RIGHT,
|
||||||
ButtonBinding.INVENTORY,
|
ButtonBinding.INVENTORY,
|
||||||
ButtonBinding.SWAP_HANDS,
|
ButtonBinding.SWAP_HANDS,
|
||||||
|
ButtonBinding.TAB_LEFT,
|
||||||
|
ButtonBinding.TAB_RIGHT,
|
||||||
ButtonBinding.PAGE_LEFT,
|
ButtonBinding.PAGE_LEFT,
|
||||||
ButtonBinding.PAGE_RIGHT,
|
ButtonBinding.PAGE_RIGHT,
|
||||||
ButtonBinding.TAKE,
|
ButtonBinding.TAKE,
|
||||||
ButtonBinding.TAKE_ALL,
|
ButtonBinding.TAKE_ALL,
|
||||||
ButtonBinding.QUICK_MOVE
|
ButtonBinding.QUICK_MOVE,
|
||||||
|
ButtonBinding.SLOT_UP,
|
||||||
|
ButtonBinding.SLOT_DOWN,
|
||||||
|
ButtonBinding.SLOT_LEFT,
|
||||||
|
ButtonBinding.SLOT_RIGHT
|
||||||
));
|
));
|
||||||
MULTIPLAYER_CATEGORY = InputManager.registerDefaultCategory("key.categories.multiplayer",
|
MULTIPLAYER_CATEGORY = InputManager.registerDefaultCategory("key.categories.multiplayer",
|
||||||
category -> category.registerAllBindings(ButtonBinding.CHAT, ButtonBinding.PLAYER_LIST));
|
category -> category.registerAllBindings(ButtonBinding.CHAT, ButtonBinding.PLAYER_LIST));
|
||||||
MISC_CATEGORY = InputManager.registerDefaultCategory("key.categories.misc", category -> category.registerAllBindings(
|
MISC_CATEGORY = InputManager.registerDefaultCategory("key.categories.misc", category -> category.registerAllBindings(
|
||||||
ButtonBinding.SCREENSHOT,
|
ButtonBinding.SCREENSHOT,
|
||||||
|
ButtonBinding.TOGGLE_PERSPECTIVE,
|
||||||
|
ButtonBinding.PAUSE_GAME,
|
||||||
//SMOOTH_CAMERA,
|
//SMOOTH_CAMERA,
|
||||||
ButtonBinding.TOGGLE_PERSPECTIVE
|
ButtonBinding.DEBUG_SCREEN
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,25 +9,31 @@
|
|||||||
|
|
||||||
package eu.midnightdust.midnightcontrols.client.controller;
|
package eu.midnightdust.midnightcontrols.client.controller;
|
||||||
|
|
||||||
|
import com.google.common.collect.ImmutableSet;
|
||||||
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.MidnightInput;
|
import eu.midnightdust.midnightcontrols.client.MidnightInput;
|
||||||
|
import eu.midnightdust.midnightcontrols.client.compat.EMICompat;
|
||||||
import eu.midnightdust.midnightcontrols.client.compat.MidnightControlsCompat;
|
import eu.midnightdust.midnightcontrols.client.compat.MidnightControlsCompat;
|
||||||
import eu.midnightdust.midnightcontrols.client.compat.SodiumCompat;
|
import eu.midnightdust.midnightcontrols.client.compat.SodiumCompat;
|
||||||
import eu.midnightdust.midnightcontrols.client.mixin.AdvancementsScreenAccessor;
|
import eu.midnightdust.midnightcontrols.client.mixin.AdvancementsScreenAccessor;
|
||||||
import eu.midnightdust.midnightcontrols.client.mixin.CreativeInventoryScreenAccessor;
|
import eu.midnightdust.midnightcontrols.client.mixin.CreativeInventoryScreenAccessor;
|
||||||
import eu.midnightdust.midnightcontrols.client.mixin.RecipeBookWidgetAccessor;
|
import eu.midnightdust.midnightcontrols.client.mixin.RecipeBookWidgetAccessor;
|
||||||
import eu.midnightdust.midnightcontrols.client.util.HandledScreenAccessor;
|
import eu.midnightdust.midnightcontrols.client.util.HandledScreenAccessor;
|
||||||
|
import eu.midnightdust.midnightcontrols.client.util.MouseAccessor;
|
||||||
import net.fabricmc.fabric.impl.item.group.CreativeGuiExtensions;
|
import net.fabricmc.fabric.impl.item.group.CreativeGuiExtensions;
|
||||||
import net.fabricmc.loader.api.FabricLoader;
|
import net.fabricmc.loader.api.FabricLoader;
|
||||||
import net.minecraft.client.MinecraftClient;
|
import net.minecraft.client.MinecraftClient;
|
||||||
import net.minecraft.client.gl.Framebuffer;
|
import net.minecraft.client.gl.Framebuffer;
|
||||||
|
import net.minecraft.client.gui.hud.DebugHud;
|
||||||
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;
|
||||||
import net.minecraft.client.gui.screen.ingame.HandledScreen;
|
import net.minecraft.client.gui.screen.ingame.HandledScreen;
|
||||||
import net.minecraft.client.gui.screen.ingame.InventoryScreen;
|
import net.minecraft.client.gui.screen.ingame.InventoryScreen;
|
||||||
|
import net.minecraft.client.gui.widget.PressableWidget;
|
||||||
import net.minecraft.client.util.ScreenshotRecorder;
|
import net.minecraft.client.util.ScreenshotRecorder;
|
||||||
import net.minecraft.item.ItemGroup;
|
import net.minecraft.item.ItemGroup;
|
||||||
|
import net.minecraft.item.Items;
|
||||||
import net.minecraft.screen.slot.Slot;
|
import net.minecraft.screen.slot.Slot;
|
||||||
import net.minecraft.screen.slot.SlotActionType;
|
import net.minecraft.screen.slot.SlotActionType;
|
||||||
import org.aperlambda.lambdacommon.utils.Pair;
|
import org.aperlambda.lambdacommon.utils.Pair;
|
||||||
@@ -117,9 +123,27 @@ public class InputHandlers {
|
|||||||
var screen = (HandledScreenAccessor) client.currentScreen;
|
var screen = (HandledScreenAccessor) client.currentScreen;
|
||||||
try {
|
try {
|
||||||
if (next) {
|
if (next) {
|
||||||
((CreativeGuiExtensions) screen).fabric_nextPage();
|
return client.currentScreen.children().stream().filter(element -> element instanceof PressableWidget)
|
||||||
|
.map(element -> (PressableWidget) element)
|
||||||
|
.filter(element -> element.getMessage() != null && element.getMessage().getContent() != null)
|
||||||
|
.anyMatch(element -> {
|
||||||
|
if (element.getMessage().getString().equals(">")) {
|
||||||
|
element.onPress();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
((CreativeGuiExtensions) screen).fabric_previousPage();
|
return client.currentScreen.children().stream().filter(element -> element instanceof PressableWidget)
|
||||||
|
.map(element -> (PressableWidget) element)
|
||||||
|
.filter(element -> element.getMessage() != null && element.getMessage().getContent() != null)
|
||||||
|
.anyMatch(element -> {
|
||||||
|
if (element.getMessage().getString().equals("<")) {
|
||||||
|
element.onPress();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
} catch (Exception ignored) {}
|
} catch (Exception ignored) {}
|
||||||
}
|
}
|
||||||
@@ -142,29 +166,34 @@ public class InputHandlers {
|
|||||||
|
|
||||||
int slotId;
|
int slotId;
|
||||||
if (slot == null) {
|
if (slot == null) {
|
||||||
if (client.player.currentScreenHandler.getCursorStack().isEmpty())
|
if (button.getName().equals("take_all")) {
|
||||||
|
((MouseAccessor) client.mouse).setLeftButtonClicked(true);
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
slotId = accessor.midnightcontrols$isClickOutsideBounds(x, y, accessor.getX(), accessor.getY(), GLFW_MOUSE_BUTTON_1) ? -999 : -1;
|
slotId = accessor.midnightcontrols$isClickOutsideBounds(x, y, accessor.getX(), accessor.getY(), GLFW_MOUSE_BUTTON_1) ? -999 : -1;
|
||||||
} else {
|
} else {
|
||||||
slotId = slot.id;
|
slotId = slot.id;
|
||||||
}
|
}
|
||||||
var actionType = SlotActionType.PICKUP;
|
var actionType = SlotActionType.PICKUP;
|
||||||
int clickData = GLFW.GLFW_MOUSE_BUTTON_1;
|
int clickData = GLFW.GLFW_MOUSE_BUTTON_1;
|
||||||
|
|
||||||
MidnightControlsClient.get().input.inventoryInteractionCooldown = 5;
|
MidnightControlsClient.get().input.inventoryInteractionCooldown = 5;
|
||||||
switch (button.getName()) {
|
switch (button.getName()) {
|
||||||
case "take_all":
|
case "take_all": {
|
||||||
if (accessor instanceof CreativeInventoryScreen)
|
if (screen instanceof CreativeInventoryScreen) {
|
||||||
if (((CreativeInventoryScreenAccessor) accessor).midnightcontrols$isCreativeInventorySlot(slot))
|
if (slot != null && (((CreativeInventoryScreenAccessor) accessor).midnightcontrols$isCreativeInventorySlot(slot) || MidnightControlsCompat.streamCompatHandlers().anyMatch(handler -> handler.isCreativeSlot(screen, slot))))
|
||||||
actionType = SlotActionType.CLONE;
|
actionType = SlotActionType.CLONE;
|
||||||
if (slot != null && MidnightControlsCompat.streamCompatHandlers().anyMatch(handler -> handler.isCreativeSlot(screen, slot)))
|
}
|
||||||
actionType = SlotActionType.CLONE;
|
|
||||||
break;
|
break;
|
||||||
case "take":
|
}
|
||||||
|
case "take": {
|
||||||
clickData = GLFW_MOUSE_BUTTON_2;
|
clickData = GLFW_MOUSE_BUTTON_2;
|
||||||
break;
|
break;
|
||||||
case "quick_move":
|
}
|
||||||
|
case "quick_move": {
|
||||||
actionType = SlotActionType.QUICK_MOVE;
|
actionType = SlotActionType.QUICK_MOVE;
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -299,7 +328,7 @@ public class InputHandlers {
|
|||||||
* @return true if the client is in game, else false
|
* @return true if the client is in game, else false
|
||||||
*/
|
*/
|
||||||
public static boolean inGame(@NotNull MinecraftClient client, @NotNull ButtonBinding binding) {
|
public static boolean inGame(@NotNull MinecraftClient client, @NotNull ButtonBinding binding) {
|
||||||
return client.currentScreen == null;
|
return client.currentScreen == null && MidnightControlsClient.get().input.screenCloseCooldown <= 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -51,6 +51,10 @@ public class InputManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void tick(@NotNull MinecraftClient client) {
|
public void tick(@NotNull MinecraftClient client) {
|
||||||
|
if (MidnightControlsConfig.autoSwitchMode && !MidnightControlsConfig.isEditing && MidnightControlsConfig.controlsMode != ControlsMode.TOUCHSCREEN)
|
||||||
|
if (MidnightControlsConfig.getController().isConnected() && MidnightControlsConfig.getController().isGamepad())
|
||||||
|
MidnightControlsConfig.controlsMode = ControlsMode.CONTROLLER;
|
||||||
|
else MidnightControlsConfig.controlsMode = ControlsMode.DEFAULT;
|
||||||
if (MidnightControlsConfig.controlsMode == ControlsMode.CONTROLLER) {
|
if (MidnightControlsConfig.controlsMode == ControlsMode.CONTROLLER) {
|
||||||
this.controllerTick(client);
|
this.controllerTick(client);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,17 @@ import eu.midnightdust.midnightcontrols.client.ButtonState;
|
|||||||
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 net.minecraft.client.MinecraftClient;
|
import net.minecraft.client.MinecraftClient;
|
||||||
|
import net.minecraft.client.input.Input;
|
||||||
import net.minecraft.client.network.ClientPlayerEntity;
|
import net.minecraft.client.network.ClientPlayerEntity;
|
||||||
|
import net.minecraft.client.tutorial.MovementTutorialStepHandler;
|
||||||
|
import net.minecraft.client.util.InputUtil;
|
||||||
|
import net.minecraft.enchantment.EnchantmentHelper;
|
||||||
|
import net.minecraft.enchantment.Enchantments;
|
||||||
|
import net.minecraft.enchantment.SoulSpeedEnchantment;
|
||||||
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
|
import net.minecraft.nbt.NbtList;
|
||||||
|
import net.minecraft.nbt.scanner.SimpleNbtScanner;
|
||||||
|
import net.minecraft.util.math.MathHelper;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -79,18 +89,20 @@ public final class MovementHandler implements PressAction {
|
|||||||
this.pressingBack = direction < 0;
|
this.pressingBack = direction < 0;
|
||||||
this.movementForward = direction * value;
|
this.movementForward = direction * value;
|
||||||
|
|
||||||
// Slowing down if sneaking.
|
// Slowing down if sneaking or crawling.
|
||||||
if (client.player.input.sneaking)
|
if (client.player.shouldSlowDown()) {
|
||||||
this.movementForward *= 0.3D;
|
this.movementForward *= MathHelper.clamp(0.3F + EnchantmentHelper.getSwiftSneakSpeedBoost(client.player), 0.0F, 1.0F);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// Handle sideways movement.
|
// Handle sideways movement.
|
||||||
this.pressingLeft = direction > 0;
|
this.pressingLeft = direction > 0;
|
||||||
this.pressingRight = direction < 0;
|
this.pressingRight = direction < 0;
|
||||||
this.movementSideways = direction * value;
|
this.movementSideways = direction * value;
|
||||||
|
|
||||||
// Slowing down if sneaking.
|
// Slowing down if sneaking or crawling.
|
||||||
if (client.player.input.sneaking)
|
if (client.player.shouldSlowDown()) {
|
||||||
this.movementSideways *= 0.3D;
|
this.movementSideways *= MathHelper.clamp(0.3F + EnchantmentHelper.getSwiftSneakSpeedBoost(client.player), 0.0F, 1.0F);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.shouldOverrideMovement;
|
return this.shouldOverrideMovement;
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ public class MidnightControlsHud extends Hud {
|
|||||||
this.attackButtonWidth = MidnightControlsRenderer.getBindingIconWidth(ButtonBinding.ATTACK);
|
this.attackButtonWidth = MidnightControlsRenderer.getBindingIconWidth(ButtonBinding.ATTACK);
|
||||||
this.useButtonWidth = MidnightControlsRenderer.getBindingIconWidth(ButtonBinding.USE);
|
this.useButtonWidth = MidnightControlsRenderer.getBindingIconWidth(ButtonBinding.USE);
|
||||||
if (client.options.getGuiScale().getValue() >= 4) {
|
if (client.options.getGuiScale().getValue() >= 4) {
|
||||||
scale = 0.75f * (client.options.getGuiScale().getValue() -3);
|
scale = 0.75f;
|
||||||
} else scale = 1f;
|
} else scale = 1f;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -86,12 +86,13 @@ public class MidnightControlsHud extends Hud {
|
|||||||
if (this.client == null) return;
|
if (this.client == null) return;
|
||||||
if (MidnightControlsConfig.controlsMode == ControlsMode.CONTROLLER && this.client.currentScreen == null) {
|
if (MidnightControlsConfig.controlsMode == ControlsMode.CONTROLLER && this.client.currentScreen == null) {
|
||||||
int y = bottom(2);
|
int y = bottom(2);
|
||||||
|
matrices.push();
|
||||||
if (scale != 1f) matrices.scale(scale,scale,scale);
|
if (scale != 1f) matrices.scale(scale,scale,scale);
|
||||||
this.renderFirstIcons(matrices, MidnightControlsConfig.hudSide == HudSide.LEFT ? 2 : (int) ((client.getWindow().getScaledWidth() - 2) * (1 / scale)), y);
|
this.renderFirstIcons(matrices, MidnightControlsConfig.hudSide == HudSide.LEFT ? 2 : (int) ((client.getWindow().getScaledWidth() - 2) * (1 / scale)), y);
|
||||||
this.renderSecondIcons(matrices, MidnightControlsConfig.hudSide == HudSide.RIGHT ? 2 : (int) ((client.getWindow().getScaledWidth() - 2) * (1 / scale)), y);
|
this.renderSecondIcons(matrices, MidnightControlsConfig.hudSide == HudSide.RIGHT ? 2 : (int) ((client.getWindow().getScaledWidth() - 2) * (1 / scale)), y);
|
||||||
this.renderFirstSection(matrices, MidnightControlsConfig.hudSide == HudSide.LEFT ? 2 : (int) ((client.getWindow().getScaledWidth() - 2) * (1 / scale)), y);
|
this.renderFirstSection(matrices, MidnightControlsConfig.hudSide == HudSide.LEFT ? 2 : (int) ((client.getWindow().getScaledWidth() - 2) * (1 / scale)), y);
|
||||||
this.renderSecondSection(matrices, MidnightControlsConfig.hudSide == HudSide.RIGHT ? 2 : (int) ((client.getWindow().getScaledWidth() - 2) * (1 / scale)), y);
|
this.renderSecondSection(matrices, MidnightControlsConfig.hudSide == HudSide.RIGHT ? 2 : (int) ((client.getWindow().getScaledWidth() - 2) * (1 / scale)), y);
|
||||||
if (scale != 1f) matrices.scale(1,1,1);
|
matrices.pop();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.mod.reacharound.isLastReacharoundVertical()) {
|
if (this.mod.reacharound.isLastReacharoundVertical()) {
|
||||||
|
|||||||
@@ -55,6 +55,7 @@ public class MidnightControlsSettingsScreen extends SpruceScreen {
|
|||||||
private final SpruceOption inputModeOption;
|
private final SpruceOption inputModeOption;
|
||||||
private final SpruceOption autoSwitchModeOption;
|
private final SpruceOption autoSwitchModeOption;
|
||||||
private final SpruceOption rotationSpeedOption;
|
private final SpruceOption rotationSpeedOption;
|
||||||
|
private final SpruceOption yAxisRotationSpeedOption;
|
||||||
private final SpruceOption mouseSpeedOption;
|
private final SpruceOption mouseSpeedOption;
|
||||||
private final SpruceOption virtualMouseOption;
|
private final SpruceOption virtualMouseOption;
|
||||||
private final SpruceOption resetOption;
|
private final SpruceOption resetOption;
|
||||||
@@ -153,6 +154,7 @@ public class MidnightControlsSettingsScreen extends SpruceScreen {
|
|||||||
|
|
||||||
public MidnightControlsSettingsScreen(Screen parent, boolean hideControls) {
|
public MidnightControlsSettingsScreen(Screen parent, boolean hideControls) {
|
||||||
super(Text.translatable("midnightcontrols.title.settings"));
|
super(Text.translatable("midnightcontrols.title.settings"));
|
||||||
|
MidnightControlsConfig.isEditing = true;
|
||||||
this.parent = parent;
|
this.parent = parent;
|
||||||
// General options
|
// General options
|
||||||
this.inputModeOption = new SpruceCyclingOption("midnightcontrols.menu.controls_mode",
|
this.inputModeOption = new SpruceCyclingOption("midnightcontrols.menu.controls_mode",
|
||||||
@@ -172,6 +174,10 @@ public class MidnightControlsSettingsScreen extends SpruceScreen {
|
|||||||
() -> MidnightControlsConfig.rotationSpeed,
|
() -> MidnightControlsConfig.rotationSpeed,
|
||||||
value -> MidnightControlsConfig.rotationSpeed = value, option -> option.getDisplayText(Text.literal(String.valueOf(option.get()))),
|
value -> MidnightControlsConfig.rotationSpeed = value, option -> option.getDisplayText(Text.literal(String.valueOf(option.get()))),
|
||||||
Text.translatable("midnightcontrols.tooltip.rotation_speed"));
|
Text.translatable("midnightcontrols.tooltip.rotation_speed"));
|
||||||
|
this.yAxisRotationSpeedOption = new SpruceDoubleOption("midnightcontrols.menu.y_axis_rotation_speed", 0.0, 100.0, .5f,
|
||||||
|
() -> MidnightControlsConfig.yAxisRotationSpeed,
|
||||||
|
value -> MidnightControlsConfig.yAxisRotationSpeed = value, option -> option.getDisplayText(Text.literal(String.valueOf(option.get()))),
|
||||||
|
Text.translatable("midnightcontrols.tooltip.y_axis_rotation_speed"));
|
||||||
this.mouseSpeedOption = new SpruceDoubleOption("midnightcontrols.menu.mouse_speed", 0.0, 150.0, .5f,
|
this.mouseSpeedOption = new SpruceDoubleOption("midnightcontrols.menu.mouse_speed", 0.0, 150.0, .5f,
|
||||||
() -> MidnightControlsConfig.mouseSpeed,
|
() -> MidnightControlsConfig.mouseSpeed,
|
||||||
value -> MidnightControlsConfig.mouseSpeed = value, option -> option.getDisplayText(Text.literal(String.valueOf(option.get()))),
|
value -> MidnightControlsConfig.mouseSpeed = value, option -> option.getDisplayText(Text.literal(String.valueOf(option.get()))),
|
||||||
@@ -243,12 +249,14 @@ public class MidnightControlsSettingsScreen extends SpruceScreen {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void removed() {
|
public void removed() {
|
||||||
|
MidnightControlsConfig.isEditing = false;
|
||||||
MidnightControlsConfig.save();
|
MidnightControlsConfig.save();
|
||||||
super.removed();
|
super.removed();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void close() {
|
public void close() {
|
||||||
|
MidnightControlsConfig.isEditing = false;
|
||||||
MidnightControlsConfig.save();
|
MidnightControlsConfig.save();
|
||||||
super.close();
|
super.close();
|
||||||
}
|
}
|
||||||
@@ -300,6 +308,7 @@ public class MidnightControlsSettingsScreen extends SpruceScreen {
|
|||||||
list.addSingleOptionEntry(this.inputModeOption);
|
list.addSingleOptionEntry(this.inputModeOption);
|
||||||
list.addSingleOptionEntry(this.autoSwitchModeOption);
|
list.addSingleOptionEntry(this.autoSwitchModeOption);
|
||||||
list.addSingleOptionEntry(this.rotationSpeedOption);
|
list.addSingleOptionEntry(this.rotationSpeedOption);
|
||||||
|
list.addSingleOptionEntry(this.yAxisRotationSpeedOption);
|
||||||
list.addSingleOptionEntry(this.mouseSpeedOption);
|
list.addSingleOptionEntry(this.mouseSpeedOption);
|
||||||
list.addSingleOptionEntry(this.virtualMouseOption);
|
list.addSingleOptionEntry(this.virtualMouseOption);
|
||||||
return list;
|
return list;
|
||||||
|
|||||||
@@ -17,4 +17,6 @@ import org.spongepowered.asm.mixin.gen.Accessor;
|
|||||||
public interface ClickableWidgetAccessor {
|
public interface ClickableWidgetAccessor {
|
||||||
@Accessor("height")
|
@Accessor("height")
|
||||||
int getHeight();
|
int getHeight();
|
||||||
|
@Accessor("focused")
|
||||||
|
void setFocused(boolean value);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,14 +9,18 @@
|
|||||||
|
|
||||||
package eu.midnightdust.midnightcontrols.client.mixin;
|
package eu.midnightdust.midnightcontrols.client.mixin;
|
||||||
|
|
||||||
|
import eu.midnightdust.lib.util.screen.TexturedOverlayButtonWidget;
|
||||||
import eu.midnightdust.midnightcontrols.client.gui.MidnightControlsSettingsScreen;
|
import eu.midnightdust.midnightcontrols.client.gui.MidnightControlsSettingsScreen;
|
||||||
|
import net.fabricmc.loader.api.FabricLoader;
|
||||||
import net.minecraft.client.gui.screen.Screen;
|
import net.minecraft.client.gui.screen.Screen;
|
||||||
import net.minecraft.client.gui.screen.option.ControlsOptionsScreen;
|
import net.minecraft.client.gui.screen.option.ControlsOptionsScreen;
|
||||||
import net.minecraft.client.gui.screen.option.GameOptionsScreen;
|
import net.minecraft.client.gui.screen.option.GameOptionsScreen;
|
||||||
import net.minecraft.client.gui.widget.ButtonWidget;
|
import net.minecraft.client.gui.widget.ButtonWidget;
|
||||||
import net.minecraft.client.option.GameOptions;
|
import net.minecraft.client.option.GameOptions;
|
||||||
import net.minecraft.text.Text;
|
import net.minecraft.text.Text;
|
||||||
|
import net.minecraft.util.Identifier;
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.Unique;
|
||||||
import org.spongepowered.asm.mixin.injection.At;
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
import org.spongepowered.asm.mixin.injection.Inject;
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||||
@@ -26,16 +30,27 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
|||||||
*/
|
*/
|
||||||
@Mixin(ControlsOptionsScreen.class)
|
@Mixin(ControlsOptionsScreen.class)
|
||||||
public abstract class ControlsOptionsScreenMixin extends GameOptionsScreen {
|
public abstract class ControlsOptionsScreenMixin extends GameOptionsScreen {
|
||||||
|
@Unique private final boolean showAlternativeButton = FabricLoader.getInstance().isModLoaded("crawl");
|
||||||
public ControlsOptionsScreenMixin(Screen parent, GameOptions gameOptions, Text text) {
|
public ControlsOptionsScreenMixin(Screen parent, GameOptions gameOptions, Text text) {
|
||||||
super(parent, gameOptions, text);
|
super(parent, gameOptions, text);
|
||||||
}
|
}
|
||||||
|
@Inject(method = "init", at = @At(value = "INVOKE", ordinal = 1, shift = At.Shift.AFTER, target = "Lnet/minecraft/client/gui/screen/option/ControlsOptionsScreen;addDrawableChild(Lnet/minecraft/client/gui/Element;)Lnet/minecraft/client/gui/Element;"))
|
||||||
|
private void addAlternativeControllerButton(CallbackInfo ci) {
|
||||||
|
if (showAlternativeButton) {
|
||||||
|
this.addDrawableChild(new TexturedOverlayButtonWidget(this.width / 2 + 158, this.height / 6 - 12, 20, 20,0,0,20, new Identifier("midnightcontrols", "textures/gui/midnightcontrols_button.png"), 32, 64, (button) -> {
|
||||||
|
this.client.setScreen(new MidnightControlsSettingsScreen(this, false));
|
||||||
|
}, Text.translatable("midnightcontrols.menu.title.controller")));
|
||||||
|
}
|
||||||
|
}
|
||||||
@Inject(method = "init", at = @At(value = "INVOKE", ordinal = 4, shift = At.Shift.AFTER, target = "Lnet/minecraft/client/gui/screen/option/ControlsOptionsScreen;addDrawableChild(Lnet/minecraft/client/gui/Element;)Lnet/minecraft/client/gui/Element;"))
|
@Inject(method = "init", at = @At(value = "INVOKE", ordinal = 4, shift = At.Shift.AFTER, target = "Lnet/minecraft/client/gui/screen/option/ControlsOptionsScreen;addDrawableChild(Lnet/minecraft/client/gui/Element;)Lnet/minecraft/client/gui/Element;"))
|
||||||
private void addControllerButton(CallbackInfo ci) {
|
private void addControllerButton(CallbackInfo ci) {
|
||||||
int i = this.width / 2 - 155;
|
if (!showAlternativeButton) {
|
||||||
int j = i + 160;
|
int i = this.width / 2 - 155;
|
||||||
int k = this.height / 6 - 12 + 48;;
|
int j = i + 160;
|
||||||
this.addDrawableChild(new ButtonWidget(j, k, 150, 20, Text.translatable("midnightcontrols.menu.title.controller").append("..."), (button) -> {
|
int k = this.height / 6 - 12 + 48;
|
||||||
this.client.setScreen(new MidnightControlsSettingsScreen(this, false));
|
this.addDrawableChild(new ButtonWidget(j, k, 150, 20, Text.translatable("midnightcontrols.menu.title.controller").append("..."), (button) -> {
|
||||||
}));
|
this.client.setScreen(new MidnightControlsSettingsScreen(this, false));
|
||||||
|
}));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import eu.midnightdust.midnightcontrols.ControlsMode;
|
|||||||
import eu.midnightdust.midnightcontrols.client.MidnightControlsConfig;
|
import eu.midnightdust.midnightcontrols.client.MidnightControlsConfig;
|
||||||
import eu.midnightdust.midnightcontrols.client.MidnightInput;
|
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.gui.MidnightControlsRenderer;
|
import eu.midnightdust.midnightcontrols.client.gui.MidnightControlsRenderer;
|
||||||
import eu.midnightdust.midnightcontrols.client.util.HandledScreenAccessor;
|
import eu.midnightdust.midnightcontrols.client.util.HandledScreenAccessor;
|
||||||
import net.minecraft.client.MinecraftClient;
|
import net.minecraft.client.MinecraftClient;
|
||||||
@@ -20,9 +21,11 @@ import net.minecraft.client.gui.screen.ingame.HandledScreen;
|
|||||||
import net.minecraft.client.util.math.MatrixStack;
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
import net.minecraft.screen.slot.Slot;
|
import net.minecraft.screen.slot.Slot;
|
||||||
import net.minecraft.screen.slot.SlotActionType;
|
import net.minecraft.screen.slot.SlotActionType;
|
||||||
|
import net.minecraft.text.Text;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.lwjgl.glfw.GLFW;
|
import org.lwjgl.glfw.GLFW;
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.Unique;
|
||||||
import org.spongepowered.asm.mixin.gen.Accessor;
|
import org.spongepowered.asm.mixin.gen.Accessor;
|
||||||
import org.spongepowered.asm.mixin.gen.Invoker;
|
import org.spongepowered.asm.mixin.gen.Invoker;
|
||||||
import org.spongepowered.asm.mixin.injection.At;
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
@@ -34,6 +37,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
|||||||
*/
|
*/
|
||||||
@Mixin(HandledScreen.class)
|
@Mixin(HandledScreen.class)
|
||||||
public abstract class HandledScreenMixin implements HandledScreenAccessor {
|
public abstract class HandledScreenMixin implements HandledScreenAccessor {
|
||||||
|
@Unique private static float scale = 1f;
|
||||||
|
|
||||||
@Accessor("x")
|
@Accessor("x")
|
||||||
public abstract int getX();
|
public abstract int getX();
|
||||||
@@ -55,16 +59,29 @@ public abstract class HandledScreenMixin implements HandledScreenAccessor {
|
|||||||
public void onRender(MatrixStack matrices, int mouseX, int mouseY, float delta, CallbackInfo ci) {
|
public void onRender(MatrixStack matrices, int mouseX, int mouseY, float delta, CallbackInfo ci) {
|
||||||
if (MidnightControlsConfig.controlsMode == ControlsMode.CONTROLLER) {
|
if (MidnightControlsConfig.controlsMode == ControlsMode.CONTROLLER) {
|
||||||
var client = MinecraftClient.getInstance();
|
var client = MinecraftClient.getInstance();
|
||||||
int x = 2, y = client.getWindow().getScaledHeight() - 2 - MidnightControlsRenderer.ICON_SIZE;
|
if (client.options.getGuiScale().getValue() >= 4) {
|
||||||
|
scale = 0.75f;
|
||||||
|
} else scale = 1f;
|
||||||
|
matrices.push();
|
||||||
|
if (scale != 1f) matrices.scale(scale,scale,scale);
|
||||||
|
int x = 2, y = (int) (client.getWindow().getScaledHeight() * (1 / scale) - 2 - MidnightControlsRenderer.ICON_SIZE);
|
||||||
|
if (MidnightControlsCompat.isEMIPresent()) {
|
||||||
|
x += 40 * (1 / scale);
|
||||||
|
}
|
||||||
x = MidnightControlsRenderer.drawButtonTip(matrices, x, y, new int[]{GLFW.GLFW_GAMEPAD_BUTTON_A}, "midnightcontrols.action.pickup_all", true, client) + 2;
|
x = MidnightControlsRenderer.drawButtonTip(matrices, x, y, new int[]{GLFW.GLFW_GAMEPAD_BUTTON_A}, "midnightcontrols.action.pickup_all", true, client) + 2;
|
||||||
x = MidnightControlsRenderer.drawButtonTip(matrices, x, y, new int[]{GLFW.GLFW_GAMEPAD_BUTTON_B}, "midnightcontrols.action.exit", true, client) + 2;
|
x = MidnightControlsRenderer.drawButtonTip(matrices, x, y, new int[]{GLFW.GLFW_GAMEPAD_BUTTON_B}, "midnightcontrols.action.exit", true, client) + 2;
|
||||||
if (MidnightControlsCompat.isReiPresent()) {
|
if (MidnightControlsCompat.isReiPresent()) {
|
||||||
x = 2;
|
x = 2;
|
||||||
y -= 24;
|
y -= 24;
|
||||||
}
|
}
|
||||||
x = MidnightControlsRenderer.drawButtonTip(matrices, x, y, new int[]{GLFW.GLFW_GAMEPAD_BUTTON_X}, "midnightcontrols.action.pickup", true, client) + 2;
|
if (MidnightControlsCompat.isEMIPresent()) {
|
||||||
|
x = (int) (client.getWindow().getScaledWidth() * (1 / scale) - 55 - client.textRenderer.getWidth(Text.translatable("midnightcontrols.action.pickup"))
|
||||||
|
* (1 / scale) - client.textRenderer.getWidth(Text.translatable("midnightcontrols.action.quick_move"))
|
||||||
|
- MidnightControlsRenderer.getBindingIconWidth(ButtonBinding.TAKE) - MidnightControlsRenderer.getBindingIconWidth(ButtonBinding.QUICK_MOVE));
|
||||||
|
}
|
||||||
|
x = MidnightControlsRenderer.drawButtonTip(matrices, x, y, new int[]{GLFW.GLFW_GAMEPAD_BUTTON_X}, "midnightcontrols.action.pickup", true, client);
|
||||||
MidnightControlsRenderer.drawButtonTip(matrices, x, y, new int[]{GLFW.GLFW_GAMEPAD_BUTTON_Y}, "midnightcontrols.action.quick_move", true, client);
|
MidnightControlsRenderer.drawButtonTip(matrices, x, y, new int[]{GLFW.GLFW_GAMEPAD_BUTTON_Y}, "midnightcontrols.action.quick_move", true, client);
|
||||||
|
matrices.pop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -109,7 +109,11 @@ public abstract class MinecraftClientMixin {
|
|||||||
}
|
}
|
||||||
this.midnightcontrols$lastPos = this.player.getPos();
|
this.midnightcontrols$lastPos = this.player.getPos();
|
||||||
}
|
}
|
||||||
// Applied three times for smooth camera turning even on low FPS
|
// Applied multiple times for smooth camera turning even on low FPS
|
||||||
|
@Inject(method = "run", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/profiler/Profiler;startTick()V", shift = At.Shift.BEFORE))
|
||||||
|
private void onPrePreRender(CallbackInfo ci) {
|
||||||
|
MidnightControlsClient.get().onRender((MinecraftClient) (Object) (this));
|
||||||
|
}
|
||||||
@Inject(method = "run", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/profiler/Recorder;startTick()V", shift = At.Shift.AFTER))
|
@Inject(method = "run", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/profiler/Recorder;startTick()V", shift = At.Shift.AFTER))
|
||||||
private void onPreRender(CallbackInfo ci) {
|
private void onPreRender(CallbackInfo ci) {
|
||||||
MidnightControlsClient.get().onRender((MinecraftClient) (Object) (this));
|
MidnightControlsClient.get().onRender((MinecraftClient) (Object) (this));
|
||||||
@@ -122,6 +126,10 @@ public abstract class MinecraftClientMixin {
|
|||||||
private void onPostRender(CallbackInfo ci) {
|
private void onPostRender(CallbackInfo ci) {
|
||||||
MidnightControlsClient.get().onRender((MinecraftClient) (Object) (this));
|
MidnightControlsClient.get().onRender((MinecraftClient) (Object) (this));
|
||||||
}
|
}
|
||||||
|
@Inject(method = "run", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/profiler/Profiler;endTick()V", shift = At.Shift.AFTER))
|
||||||
|
private void onPostPostRender(CallbackInfo ci) {
|
||||||
|
MidnightControlsClient.get().onRender((MinecraftClient) (Object) (this));
|
||||||
|
}
|
||||||
|
|
||||||
@Inject(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/GameRenderer;render(FJZ)V", shift = At.Shift.AFTER))
|
@Inject(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/GameRenderer;render(FJZ)V", shift = At.Shift.AFTER))
|
||||||
private void renderVirtualCursor(boolean fullRender, CallbackInfo ci) {
|
private void renderVirtualCursor(boolean fullRender, CallbackInfo ci) {
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ import org.lwjgl.glfw.GLFW;
|
|||||||
import org.spongepowered.asm.mixin.Final;
|
import org.spongepowered.asm.mixin.Final;
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
import org.spongepowered.asm.mixin.Shadow;
|
import org.spongepowered.asm.mixin.Shadow;
|
||||||
|
import org.spongepowered.asm.mixin.gen.Accessor;
|
||||||
import org.spongepowered.asm.mixin.gen.Invoker;
|
import org.spongepowered.asm.mixin.gen.Invoker;
|
||||||
import org.spongepowered.asm.mixin.injection.At;
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
import org.spongepowered.asm.mixin.injection.Inject;
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
@@ -35,6 +36,9 @@ public abstract class MouseMixin implements MouseAccessor {
|
|||||||
@Final
|
@Final
|
||||||
private MinecraftClient client;
|
private MinecraftClient client;
|
||||||
|
|
||||||
|
@Accessor
|
||||||
|
public abstract void setLeftButtonClicked(boolean value);
|
||||||
|
|
||||||
@Invoker("onCursorPos")
|
@Invoker("onCursorPos")
|
||||||
public abstract void midnightcontrols$onCursorPos(long window, double x, double y);
|
public abstract void midnightcontrols$onCursorPos(long window, double x, double y);
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package eu.midnightdust.midnightcontrols.client.mixin;
|
||||||
|
|
||||||
|
import net.minecraft.client.gui.Selectable;
|
||||||
|
import net.minecraft.client.gui.screen.Screen;
|
||||||
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.gen.Accessor;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Mixin(Screen.class)
|
||||||
|
public interface ScreenAccessor {
|
||||||
|
@Accessor
|
||||||
|
List<Selectable> getSelectables();
|
||||||
|
@Accessor @Nullable
|
||||||
|
Selectable getSelected();
|
||||||
|
}
|
||||||
@@ -14,4 +14,5 @@ package eu.midnightdust.midnightcontrols.client.util;
|
|||||||
*/
|
*/
|
||||||
public interface MouseAccessor {
|
public interface MouseAccessor {
|
||||||
void midnightcontrols$onCursorPos(long window, double x, double y);
|
void midnightcontrols$onCursorPos(long window, double x, double y);
|
||||||
|
void setLeftButtonClicked(boolean value);
|
||||||
}
|
}
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 2.7 KiB |
@@ -68,6 +68,8 @@
|
|||||||
"midnightcontrols.axis.right_x-": "Rechts X-",
|
"midnightcontrols.axis.right_x-": "Rechts X-",
|
||||||
"midnightcontrols.axis.right_y-": "Rechts Y-",
|
"midnightcontrols.axis.right_y-": "Rechts Y-",
|
||||||
"midnightcontrols.button.unknown": "Unbekannt (%d)",
|
"midnightcontrols.button.unknown": "Unbekannt (%d)",
|
||||||
|
"midnightcontrols.controller.tutorial.title": "Spiele Minecraft mit Controller!",
|
||||||
|
"midnightcontrols.controller.tutorial.description": "Gehe zu %s -> %s -> %s",
|
||||||
"midnightcontrols.controller.connected": "Controller %d verbunden.",
|
"midnightcontrols.controller.connected": "Controller %d verbunden.",
|
||||||
"midnightcontrols.controller.disconnected": "Controller %d getrennt.",
|
"midnightcontrols.controller.disconnected": "Controller %d getrennt.",
|
||||||
"midnightcontrols.controller.mappings.1": "Um die Controller-Mappings anzupassen, benutze %s",
|
"midnightcontrols.controller.mappings.1": "Um die Controller-Mappings anzupassen, benutze %s",
|
||||||
@@ -83,7 +85,7 @@
|
|||||||
"midnightcontrols.controller_type.ouya": "OUYA",
|
"midnightcontrols.controller_type.ouya": "OUYA",
|
||||||
"midnightcontrols.controls_mode.default": "Tastatur/Maus",
|
"midnightcontrols.controls_mode.default": "Tastatur/Maus",
|
||||||
"midnightcontrols.controls_mode.controller": "Controller",
|
"midnightcontrols.controls_mode.controller": "Controller",
|
||||||
"midnightcontrols.controls_mode.touchscreen": "Touchscreen",
|
"midnightcontrols.controls_mode.touchscreen": "Touchscreen (In Arbeit)",
|
||||||
"midnightcontrols.hud_side.left": "links",
|
"midnightcontrols.hud_side.left": "links",
|
||||||
"midnightcontrols.hud_side.right": "rechts",
|
"midnightcontrols.hud_side.right": "rechts",
|
||||||
"midnightcontrols.menu.analog_movement": "Analoge Bewegung",
|
"midnightcontrols.menu.analog_movement": "Analoge Bewegung",
|
||||||
@@ -112,7 +114,8 @@
|
|||||||
"midnightcontrols.menu.reacharound.vertical": "Vertikales Umgreifen",
|
"midnightcontrols.menu.reacharound.vertical": "Vertikales Umgreifen",
|
||||||
"midnightcontrols.menu.reload_controller_mappings": "Controller-Mappings neuladen",
|
"midnightcontrols.menu.reload_controller_mappings": "Controller-Mappings neuladen",
|
||||||
"midnightcontrols.menu.right_dead_zone": "Rechte tote Zone",
|
"midnightcontrols.menu.right_dead_zone": "Rechte tote Zone",
|
||||||
"midnightcontrols.menu.rotation_speed": "Rotationsgeschwindigkeit",
|
"midnightcontrols.menu.rotation_speed": "Rotationsgeschwindigkeit (X-Achse)",
|
||||||
|
"midnightcontrols.menu.y_axis_rotation_speed": "Rotationsgeschwindigkeit (Y-Achse)",
|
||||||
"midnightcontrols.menu.separator.controller": "Controller",
|
"midnightcontrols.menu.separator.controller": "Controller",
|
||||||
"midnightcontrols.menu.separator.general": "Generell",
|
"midnightcontrols.menu.separator.general": "Generell",
|
||||||
"midnightcontrols.menu.title": "MidnightControls - Einstellungen",
|
"midnightcontrols.menu.title": "MidnightControls - Einstellungen",
|
||||||
@@ -148,7 +151,8 @@
|
|||||||
"midnightcontrols.tooltip.reacharound.vertical": "Aktiviert vertikales 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.reload_controller_mappings": "Lädt die Controller-Mappings neu.",
|
||||||
"midnightcontrols.tooltip.right_dead_zone": "Die tote Zone für den rechten Analogstick.",
|
"midnightcontrols.tooltip.right_dead_zone": "Die tote Zone für den rechten Analogstick.",
|
||||||
"midnightcontrols.tooltip.rotation_speed": "Die Kamerarotationsgeschwindigkeit im Controllermodus.",
|
"midnightcontrols.tooltip.rotation_speed": "Die Kamerarotationsgeschwindigkeit im Controllermodus. (X-Achse)",
|
||||||
|
"midnightcontrols.tooltip.y_axis_rotation_speed": "Die Kamerarotationsgeschwindigkeit im Controllermodus. (Y-Achse)",
|
||||||
"midnightcontrols.tooltip.unfocused_input": "Erlaube Controllereingabe auch wenn das Fenster nicht fokussiert ist.",
|
"midnightcontrols.tooltip.unfocused_input": "Erlaube Controllereingabe auch wenn das Fenster nicht fokussiert ist.",
|
||||||
"midnightcontrols.tooltip.virtual_mouse": "Aktiviere die virtuelle Maus.",
|
"midnightcontrols.tooltip.virtual_mouse": "Aktiviere die virtuelle Maus.",
|
||||||
"midnightcontrols.virtual_mouse.skin.default_light": "Standard Hell",
|
"midnightcontrols.virtual_mouse.skin.default_light": "Standard Hell",
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
"midnightcontrols.action.attack": "Attack",
|
"midnightcontrols.action.attack": "Attack",
|
||||||
"midnightcontrols.action.back": "Back",
|
"midnightcontrols.action.back": "Back",
|
||||||
"midnightcontrols.action.chat": "Open Chat",
|
"midnightcontrols.action.chat": "Open Chat",
|
||||||
|
"midnightcontrols.action.debug_screen": "Open Debug HUD (F3)",
|
||||||
"midnightcontrols.action.drop_item": "Drop Item",
|
"midnightcontrols.action.drop_item": "Drop Item",
|
||||||
"midnightcontrols.action.exit": "Exit",
|
"midnightcontrols.action.exit": "Exit",
|
||||||
"midnightcontrols.action.forward": "Forward",
|
"midnightcontrols.action.forward": "Forward",
|
||||||
@@ -26,6 +27,10 @@
|
|||||||
"midnightcontrols.action.quick_move": "Quick move",
|
"midnightcontrols.action.quick_move": "Quick move",
|
||||||
"midnightcontrols.action.right": "Right",
|
"midnightcontrols.action.right": "Right",
|
||||||
"midnightcontrols.action.screenshot": "Take Screenshot",
|
"midnightcontrols.action.screenshot": "Take Screenshot",
|
||||||
|
"midnightcontrols.action.slot_up": "Move Slot up",
|
||||||
|
"midnightcontrols.action.slot_down": "Move Slot down",
|
||||||
|
"midnightcontrols.action.slot_left": "Move Slot left",
|
||||||
|
"midnightcontrols.action.slot_right": "Move Slot right",
|
||||||
"midnightcontrols.action.sneak": "Sneak",
|
"midnightcontrols.action.sneak": "Sneak",
|
||||||
"midnightcontrols.action.sprint": "Sprint",
|
"midnightcontrols.action.sprint": "Sprint",
|
||||||
"midnightcontrols.action.swap_hands": "Swap Hands",
|
"midnightcontrols.action.swap_hands": "Swap Hands",
|
||||||
@@ -33,6 +38,8 @@
|
|||||||
"midnightcontrols.action.toggle_smooth_camera": "Toggle Cinematic Camera",
|
"midnightcontrols.action.toggle_smooth_camera": "Toggle Cinematic Camera",
|
||||||
"midnightcontrols.action.page_back": "Previous Page",
|
"midnightcontrols.action.page_back": "Previous Page",
|
||||||
"midnightcontrols.action.page_next": "Next Page",
|
"midnightcontrols.action.page_next": "Next Page",
|
||||||
|
"midnightcontrols.action.tab_back": "Previous Tab",
|
||||||
|
"midnightcontrols.action.tab_next": "Next Tab",
|
||||||
"midnightcontrols.action.take": "Take Item",
|
"midnightcontrols.action.take": "Take Item",
|
||||||
"midnightcontrols.action.take_all": "Take Stack",
|
"midnightcontrols.action.take_all": "Take Stack",
|
||||||
"midnightcontrols.action.use": "Use",
|
"midnightcontrols.action.use": "Use",
|
||||||
@@ -40,8 +47,9 @@
|
|||||||
"midnightcontrols.action.zoom_in": "Increase Zoom",
|
"midnightcontrols.action.zoom_in": "Increase Zoom",
|
||||||
"midnightcontrols.action.zoom_out": "Decrease Zoom",
|
"midnightcontrols.action.zoom_out": "Decrease Zoom",
|
||||||
"midnightcontrols.action.zoom_reset": "Reset Zoom",
|
"midnightcontrols.action.zoom_reset": "Reset Zoom",
|
||||||
"midnightcontrols.action.key.emotecraft.fastchoose": "Fast Choose Emote",
|
"midnightcontrols.action.emi_page_left": "Previous Page",
|
||||||
"midnightcontrols.action.key.emotecraft.stop": "Stop Emote",
|
"midnightcontrols.action.emi_page_right": "Next Page",
|
||||||
|
"midnightcontrols.category.emi": "EMI",
|
||||||
"midnightcontrols.button.a": "A",
|
"midnightcontrols.button.a": "A",
|
||||||
"midnightcontrols.button.b": "B",
|
"midnightcontrols.button.b": "B",
|
||||||
"midnightcontrols.button.x": "X",
|
"midnightcontrols.button.x": "X",
|
||||||
@@ -72,6 +80,8 @@
|
|||||||
"midnightcontrols.axis.right_x-": "Right X-",
|
"midnightcontrols.axis.right_x-": "Right X-",
|
||||||
"midnightcontrols.axis.right_y-": "Right Y-",
|
"midnightcontrols.axis.right_y-": "Right Y-",
|
||||||
"midnightcontrols.button.unknown": "Unknown (%d)",
|
"midnightcontrols.button.unknown": "Unknown (%d)",
|
||||||
|
"midnightcontrols.controller.tutorial.title": "Play the game with a Controller!",
|
||||||
|
"midnightcontrols.controller.tutorial.description": "Go to %s -> %s -> %s",
|
||||||
"midnightcontrols.controller.connected": "Controller %d connected.",
|
"midnightcontrols.controller.connected": "Controller %d connected.",
|
||||||
"midnightcontrols.controller.disconnected": "Controller %d disconnected.",
|
"midnightcontrols.controller.disconnected": "Controller %d disconnected.",
|
||||||
"midnightcontrols.controller.mappings.1": "To configure the controller mappings, please use %s",
|
"midnightcontrols.controller.mappings.1": "To configure the controller mappings, please use %s",
|
||||||
@@ -79,15 +89,18 @@
|
|||||||
"midnightcontrols.controller.mappings.error": "Error while loading mappings.",
|
"midnightcontrols.controller.mappings.error": "Error while loading mappings.",
|
||||||
"midnightcontrols.controller.mappings.error.write": "Error while writing mappings to file.",
|
"midnightcontrols.controller.mappings.error.write": "Error while writing mappings to file.",
|
||||||
"midnightcontrols.controller.mappings.updated": "Updated mappings!",
|
"midnightcontrols.controller.mappings.updated": "Updated mappings!",
|
||||||
"midnightcontrols.controller_type.default": "default",
|
"midnightcontrols.controller_type.default": "Default",
|
||||||
"midnightcontrols.controller_type.dualshock": "DualShock",
|
"midnightcontrols.controller_type.dualshock": "DualShock",
|
||||||
|
"midnightcontrols.controller_type.dualsense": "DualSense",
|
||||||
"midnightcontrols.controller_type.switch": "Switch",
|
"midnightcontrols.controller_type.switch": "Switch",
|
||||||
"midnightcontrols.controller_type.xbox": "Xbox",
|
"midnightcontrols.controller_type.xbox": "Xbox",
|
||||||
"midnightcontrols.controller_type.steam": "Steam",
|
"midnightcontrols.controller_type.xbox_360": "Xbox 360",
|
||||||
|
"midnightcontrols.controller_type.steam_controller": "Steam Controller",
|
||||||
|
"midnightcontrols.controller_type.steam_deck": "Steam Deck",
|
||||||
"midnightcontrols.controller_type.ouya": "OUYA",
|
"midnightcontrols.controller_type.ouya": "OUYA",
|
||||||
"midnightcontrols.controls_mode.default": "Keyboard/Mouse",
|
"midnightcontrols.controls_mode.default": "Keyboard/Mouse",
|
||||||
"midnightcontrols.controls_mode.controller": "Controller",
|
"midnightcontrols.controls_mode.controller": "Controller",
|
||||||
"midnightcontrols.controls_mode.touchscreen": "Touchscreen",
|
"midnightcontrols.controls_mode.touchscreen": "Touchscreen (WIP)",
|
||||||
"midnightcontrols.hud_side.left": "left",
|
"midnightcontrols.hud_side.left": "left",
|
||||||
"midnightcontrols.hud_side.right": "right",
|
"midnightcontrols.hud_side.right": "right",
|
||||||
"midnightcontrols.menu.analog_movement": "Analog Movement",
|
"midnightcontrols.menu.analog_movement": "Analog Movement",
|
||||||
@@ -116,7 +129,8 @@
|
|||||||
"midnightcontrols.menu.reacharound.vertical": "Vertical Reacharound",
|
"midnightcontrols.menu.reacharound.vertical": "Vertical Reacharound",
|
||||||
"midnightcontrols.menu.reload_controller_mappings": "Reload Controller Mappings",
|
"midnightcontrols.menu.reload_controller_mappings": "Reload Controller Mappings",
|
||||||
"midnightcontrols.menu.right_dead_zone": "Right Dead Zone",
|
"midnightcontrols.menu.right_dead_zone": "Right Dead Zone",
|
||||||
"midnightcontrols.menu.rotation_speed": "Rotation Speed",
|
"midnightcontrols.menu.rotation_speed": "X Axis Rotation Speed",
|
||||||
|
"midnightcontrols.menu.y_axis_rotation_speed": "Y Axis Rotation Speed",
|
||||||
"midnightcontrols.menu.separator.controller": "Controller",
|
"midnightcontrols.menu.separator.controller": "Controller",
|
||||||
"midnightcontrols.menu.separator.general": "General",
|
"midnightcontrols.menu.separator.general": "General",
|
||||||
"midnightcontrols.menu.title": "MidnightControls - Settings",
|
"midnightcontrols.menu.title": "MidnightControls - Settings",
|
||||||
@@ -137,6 +151,7 @@
|
|||||||
"midnightcontrols.tooltip.controller2": "Second controller to use, which allows Joy-Cons support for example.",
|
"midnightcontrols.tooltip.controller2": "Second controller to use, which allows Joy-Cons support for example.",
|
||||||
"midnightcontrols.tooltip.controller_type": "The controller type to display the correct buttons.",
|
"midnightcontrols.tooltip.controller_type": "The controller type to display the correct buttons.",
|
||||||
"midnightcontrols.tooltip.controls_mode": "The controls mode.",
|
"midnightcontrols.tooltip.controls_mode": "The controls mode.",
|
||||||
|
"midnightcontrols.tooltip.double_tap_to_sprint": "Toggles whether the Walk Forwards key makes the player sprint when quickly double-tapped",
|
||||||
"midnightcontrols.tooltip.fast_block_placing": "While flying in creative mode, enables fast block placing depending on your speed. §cOn some servers this might be considered as cheating.",
|
"midnightcontrols.tooltip.fast_block_placing": "While flying in creative mode, enables fast block placing depending on your speed. §cOn some servers this might be considered as cheating.",
|
||||||
"midnightcontrols.tooltip.fly_drifting": "While flying, enables Vanilla drifting/inertia.",
|
"midnightcontrols.tooltip.fly_drifting": "While flying, enables Vanilla drifting/inertia.",
|
||||||
"midnightcontrols.tooltip.fly_drifting_vertical": "While flying, enables Vanilla vertical drifting/intertia.",
|
"midnightcontrols.tooltip.fly_drifting_vertical": "While flying, enables Vanilla vertical drifting/intertia.",
|
||||||
@@ -152,7 +167,8 @@
|
|||||||
"midnightcontrols.tooltip.reacharound.vertical": "Enables vertical reacharound, §cmight be considered cheating on some servers§r.",
|
"midnightcontrols.tooltip.reacharound.vertical": "Enables vertical reacharound, §cmight be considered cheating on some servers§r.",
|
||||||
"midnightcontrols.tooltip.reload_controller_mappings": "Reloads the controller mappings file.",
|
"midnightcontrols.tooltip.reload_controller_mappings": "Reloads the controller mappings file.",
|
||||||
"midnightcontrols.tooltip.right_dead_zone": "The dead zone for the controller's right analogue stick.",
|
"midnightcontrols.tooltip.right_dead_zone": "The dead zone for the controller's right analogue stick.",
|
||||||
"midnightcontrols.tooltip.rotation_speed": "The camera rotation speed in controller mode.",
|
"midnightcontrols.tooltip.rotation_speed": "The camera X Axis rotation speed in controller mode.",
|
||||||
|
"midnightcontrols.tooltip.y_axis_rotation_speed": "The camera Y Axis rotation speed in controller mode.",
|
||||||
"midnightcontrols.tooltip.unfocused_input": "Allow controller input when the window is not focused.",
|
"midnightcontrols.tooltip.unfocused_input": "Allow controller input when the window is not focused.",
|
||||||
"midnightcontrols.tooltip.virtual_mouse": "Enable the virtual mouse which is handful in the case of a splitscreen.",
|
"midnightcontrols.tooltip.virtual_mouse": "Enable the virtual mouse which is handful in the case of a splitscreen.",
|
||||||
"midnightcontrols.virtual_mouse.skin.default_light": "Default Light",
|
"midnightcontrols.virtual_mouse.skin.default_light": "Default Light",
|
||||||
@@ -160,4 +176,4 @@
|
|||||||
"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."
|
"modmenu.descriptionTranslation.midnightcontrols": "Adds controller support and enhanced controls overall.\nForked from LambdaControls, which sadly got discontinued."
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -104,7 +104,8 @@
|
|||||||
"midnightcontrols.menu.reacharound.vertical": "Alcance vertical",
|
"midnightcontrols.menu.reacharound.vertical": "Alcance vertical",
|
||||||
"midnightcontrols.menu.reload_controller_mappings": "Recargar asignaciones de controlador",
|
"midnightcontrols.menu.reload_controller_mappings": "Recargar asignaciones de controlador",
|
||||||
"midnightcontrols.menu.right_dead_zone": "Zona muerta derecha",
|
"midnightcontrols.menu.right_dead_zone": "Zona muerta derecha",
|
||||||
"midnightcontrols.menu.rotation_speed": "Velocidad de rotación",
|
"midnightcontrols.menu.rotation_speed": "Velocidad de rotación (eje X)",
|
||||||
|
"midnightcontrols.menu.y_axis_rotation_speed": "Velocidad de rotación (eje Y)",
|
||||||
"midnightcontrols.menu.separator.controller": "Controlador",
|
"midnightcontrols.menu.separator.controller": "Controlador",
|
||||||
"midnightcontrols.menu.separator.general": "General",
|
"midnightcontrols.menu.separator.general": "General",
|
||||||
"midnightcontrols.menu.title": "midnightcontrols - Configuraciones",
|
"midnightcontrols.menu.title": "midnightcontrols - Configuraciones",
|
||||||
@@ -140,7 +141,8 @@
|
|||||||
"midnightcontrols.tooltip.reacharound.vertical": "Habilita el alcance vertical, §cpodría considerarse trampa en algunos servidores§r.",
|
"midnightcontrols.tooltip.reacharound.vertical": "Habilita el alcance vertical, §cpodría considerarse trampa en algunos servidores§r.",
|
||||||
"midnightcontrols.tooltip.reload_controller_mappings": "Vuelve a cargar el archivo de asignaciones del controlador.",
|
"midnightcontrols.tooltip.reload_controller_mappings": "Vuelve a cargar el archivo de asignaciones del controlador.",
|
||||||
"midnightcontrols.tooltip.right_dead_zone": "La zona muerta de la palanca analógica derecha del controlador.",
|
"midnightcontrols.tooltip.right_dead_zone": "La zona muerta de la palanca analógica derecha del controlador.",
|
||||||
"midnightcontrols.tooltip.rotation_speed": "La velocidad de rotación de la cámara en modo controlador.",
|
"midnightcontrols.tooltip.rotation_speed": "La velocidad de rotación de la cámara en modo controlador. (eje X)",
|
||||||
|
"midnightcontrols.tooltip.y_axis_rotation_speed": "La velocidad de rotación de la cámara en modo controlador. (eje Y)",
|
||||||
"midnightcontrols.tooltip.unfocused_input": "Habilita entrada del controlador cuando la ventana no está enfocada.",
|
"midnightcontrols.tooltip.unfocused_input": "Habilita entrada del controlador cuando la ventana no está enfocada.",
|
||||||
"midnightcontrols.tooltip.virtual_mouse": "Habilite el ratón virtual que es útil en el caso de una pantalla dividida.",
|
"midnightcontrols.tooltip.virtual_mouse": "Habilite el ratón virtual que es útil en el caso de una pantalla dividida.",
|
||||||
"midnightcontrols.virtual_mouse.skin.default_light": "Ligera por defecto",
|
"midnightcontrols.virtual_mouse.skin.default_light": "Ligera por defecto",
|
||||||
|
|||||||
130
src/main/resources/assets/midnightcontrols/lang/et_ee.json
Normal file
@@ -0,0 +1,130 @@
|
|||||||
|
{
|
||||||
|
"midnightcontrols.midnightconfig.title": "MidnightControls täpsem seadistus",
|
||||||
|
"key.midnightcontrols.look_down": "Vaata alla",
|
||||||
|
"key.midnightcontrols.look_left": "Vaata vasakule",
|
||||||
|
"key.midnightcontrols.look_right": "Vaata paremale",
|
||||||
|
"key.midnightcontrols.look_up": "Vaata üles",
|
||||||
|
"key.midnightcontrols.ring": "Kuva juhtnupuringi",
|
||||||
|
"midnightcontrols.action.attack": "Ründa",
|
||||||
|
"midnightcontrols.action.back": "Tagasi",
|
||||||
|
"midnightcontrols.action.chat": "Ava vestlus",
|
||||||
|
"midnightcontrols.action.drop_item": "Viska ese",
|
||||||
|
"midnightcontrols.action.exit": "Välju",
|
||||||
|
"midnightcontrols.action.forward": "Edasi",
|
||||||
|
"midnightcontrols.action.hit": "Löö",
|
||||||
|
"midnightcontrols.action.hotbar_left": "Plokiriba vasakule",
|
||||||
|
"midnightcontrols.action.hotbar_right": "Plokiriba paremale",
|
||||||
|
"midnightcontrols.action.inventory": "Seljakott",
|
||||||
|
"midnightcontrols.action.jump": "Hüppa",
|
||||||
|
"midnightcontrols.action.left": "Vasakule",
|
||||||
|
"midnightcontrols.action.pause_game": "Mäng pausile",
|
||||||
|
"midnightcontrols.action.pick_block": "Vali plokk",
|
||||||
|
"midnightcontrols.action.pickup": "Korja üles",
|
||||||
|
"midnightcontrols.action.pickup_all": "Korja kõik üles",
|
||||||
|
"midnightcontrols.action.place": "Aseta",
|
||||||
|
"midnightcontrols.action.player_list": "Mängijate loend",
|
||||||
|
"midnightcontrols.action.quick_move": "Kiirliigutus",
|
||||||
|
"midnightcontrols.action.right": "Paremale",
|
||||||
|
"midnightcontrols.action.screenshot": "Loo kuvatõmmis",
|
||||||
|
"midnightcontrols.action.sneak": "Hiili",
|
||||||
|
"midnightcontrols.action.sprint": "Jookse",
|
||||||
|
"midnightcontrols.action.swap_hands": "Vaheta käsi",
|
||||||
|
"midnightcontrols.action.toggle_perspective": "Lülita perspektiivi",
|
||||||
|
"midnightcontrols.action.toggle_smooth_camera": "Lülita kinemaatilist kaamerat",
|
||||||
|
"midnightcontrols.action.page_back": "Eelmine leht",
|
||||||
|
"midnightcontrols.action.page_next": "Järgmine leht",
|
||||||
|
"midnightcontrols.action.take": "Võta ese",
|
||||||
|
"midnightcontrols.action.take_all": "Võta kuhi",
|
||||||
|
"midnightcontrols.action.use": "Kasuta",
|
||||||
|
"midnightcontrols.action.zoom": "Suumi",
|
||||||
|
"midnightcontrols.action.zoom_in": "Suurenda suumi",
|
||||||
|
"midnightcontrols.action.zoom_out": "Vähenda suumi",
|
||||||
|
"midnightcontrols.action.zoom_reset": "Lähtesta suum",
|
||||||
|
"midnightcontrols.action.key.emotecraft.fastchoose": "Vali kiirelt liigutus",
|
||||||
|
"midnightcontrols.action.key.emotecraft.stop": "Peata liigutus",
|
||||||
|
|
||||||
|
"midnightcontrols.button.left_bumper": "Vasak külgnupp",
|
||||||
|
"midnightcontrols.button.right_bumper": "Parem külgnupp",
|
||||||
|
|
||||||
|
"midnightcontrols.button.left_thumb": "Vasak pöidlanupp",
|
||||||
|
"midnightcontrols.button.right_thumb": "Parem pöidlanupp",
|
||||||
|
"midnightcontrols.button.dpad_up": "DPAD üles",
|
||||||
|
"midnightcontrols.button.dpad_right": "DPAD paremale",
|
||||||
|
"midnightcontrols.button.dpad_down": "DPAD alla",
|
||||||
|
"midnightcontrols.button.dpad_left": "DPAD vasakule",
|
||||||
|
|
||||||
|
"midnightcontrols.axis.left_x+": "Vasak X+",
|
||||||
|
"midnightcontrols.axis.left_y+": "Vasak Y+",
|
||||||
|
"midnightcontrols.axis.right_x+": "Parem X+",
|
||||||
|
"midnightcontrols.axis.right_y+": "Parem Y+",
|
||||||
|
"midnightcontrols.axis.left_trigger": "Vasak käiviti",
|
||||||
|
"midnightcontrols.axis.right_trigger": "Parem käiviti",
|
||||||
|
"midnightcontrols.axis.left_x-": "Vasak X-",
|
||||||
|
"midnightcontrols.axis.left_y-": "Vasak Y-",
|
||||||
|
"midnightcontrols.axis.right_x-": "Parem X-",
|
||||||
|
"midnightcontrols.axis.right_y-": "Parem Y-",
|
||||||
|
"midnightcontrols.button.unknown": "Teadmata (%d)",
|
||||||
|
"midnightcontrols.controller.connected": "Mängupult %d ühendatud.",
|
||||||
|
"midnightcontrols.controller.disconnected": "Mängupult %d lahti ühendatud.",
|
||||||
|
"midnightcontrols.controller.mappings.1": "Mängupuldi vastenduste seadistamiseks palun kasuta %s",
|
||||||
|
"midnightcontrols.controller.mappings.3": "ning aseta vastendus vastenduste failiredaktorisse.",
|
||||||
|
"midnightcontrols.controller.mappings.error": "Vastenduste laadimisel esines viga.",
|
||||||
|
"midnightcontrols.controller.mappings.error.write": "Vastenduste faili kirjutamisel esines viga.",
|
||||||
|
"midnightcontrols.controller.mappings.updated": "Vastendused uuendatud!",
|
||||||
|
"midnightcontrols.controller_type.default": "vaikimisi",
|
||||||
|
|
||||||
|
"midnightcontrols.controls_mode.default": "klaviatuur/hiir",
|
||||||
|
"midnightcontrols.controls_mode.controller": "mängupult",
|
||||||
|
"midnightcontrols.controls_mode.touchscreen": "puuteekraan",
|
||||||
|
"midnightcontrols.hud_side.left": "vasak",
|
||||||
|
"midnightcontrols.hud_side.right": "parem",
|
||||||
|
"midnightcontrols.menu.analog_movement": "Analoogliikumine",
|
||||||
|
"midnightcontrols.menu.auto_switch_mode": "Vaheta režiimi automaatselt",
|
||||||
|
"midnightcontrols.menu.controller": "Mängupult",
|
||||||
|
"midnightcontrols.menu.controller2": "Teine mängupult",
|
||||||
|
"midnightcontrols.menu.controller_type": "Mängupuldi tüüp",
|
||||||
|
"midnightcontrols.menu.controls_mode": "Režiim",
|
||||||
|
"midnightcontrols.menu.double_tap_to_sprint": "Jooksmiseks topeltkoputa",
|
||||||
|
"midnightcontrols.menu.fast_block_placing": "Kiire plokiasetus",
|
||||||
|
"midnightcontrols.menu.fly_drifting": "Lennutriivimine",
|
||||||
|
"midnightcontrols.menu.fly_drifting_vertical": "Vertikaalne lennutriivimine",
|
||||||
|
"midnightcontrols.menu.hud_enable": "Nähtav liides",
|
||||||
|
"midnightcontrols.menu.hud_side": "Liidese pool",
|
||||||
|
"midnightcontrols.menu.invert_right_x_axis": "Pööratud parem X",
|
||||||
|
"midnightcontrols.menu.invert_right_y_axis": "Pööratud parem Y",
|
||||||
|
"midnightcontrols.menu.keyboard_controls": "Klaviatuuri juhtnupud...",
|
||||||
|
"midnightcontrols.menu.left_dead_zone": "Vasak surnud tsoon",
|
||||||
|
"midnightcontrols.menu.mappings.open_input_str": "Ava vastenduste failiredaktor",
|
||||||
|
"midnightcontrols.menu.max_left_x_value": "Vasaku X-telje maks. väärtus",
|
||||||
|
"midnightcontrols.menu.max_left_y_value": "Vasaku Y-telje maks. väärtus",
|
||||||
|
"midnightcontrols.menu.max_right_x_value": "Parema X-telje maks. väärtus",
|
||||||
|
"midnightcontrols.menu.max_right_y_value": "Parema Y-telje maks. väärtus",
|
||||||
|
"midnightcontrols.menu.mouse_speed": "Hiire kiirus",
|
||||||
|
"midnightcontrols.menu.reacharound.horizontal": "Ploki etteasetus",
|
||||||
|
"midnightcontrols.menu.reacharound.vertical": "Vertikaalne ümberasetus",
|
||||||
|
"midnightcontrols.menu.reload_controller_mappings": "Laadi mängupuldi vastendused uuesti",
|
||||||
|
"midnightcontrols.menu.right_dead_zone": "Parem surnud tsoon",
|
||||||
|
"midnightcontrols.menu.rotation_speed": "X-telje pöördekiirus",
|
||||||
|
"midnightcontrols.menu.y_axis_rotation_speed": "Y-telje pöördekiirus",
|
||||||
|
"midnightcontrols.menu.separator.controller": "Mängupult",
|
||||||
|
"midnightcontrols.menu.separator.general": "Üldine",
|
||||||
|
"midnightcontrols.menu.title": "MidnightControls - seaded",
|
||||||
|
"midnightcontrols.menu.title.controller": "Mängupuldi valikud",
|
||||||
|
"midnightcontrols.menu.title.controller_controls": "Mängupuldi juhtnupud",
|
||||||
|
"midnightcontrols.menu.title.gameplay": "Mängukogemuse valikud",
|
||||||
|
"midnightcontrols.menu.title.general": "Üldised valikud",
|
||||||
|
"midnightcontrols.menu.title.hud": "Liidese valikud",
|
||||||
|
"midnightcontrols.menu.title.mappings.string": "Vastenduste failiredaktor",
|
||||||
|
"midnightcontrols.menu.title.visual": "Välimuse valikud",
|
||||||
|
"midnightcontrols.menu.unfocused_input": "Fookustamata sisend",
|
||||||
|
"midnightcontrols.menu.virtual_mouse": "Virtuaalne hiir",
|
||||||
|
"midnightcontrols.menu.virtual_mouse.skin": "Virtuaalse hiire välimus",
|
||||||
|
"midnightcontrols.narrator.unbound": "Määramata %s",
|
||||||
|
"midnightcontrols.not_bound": "määramata",
|
||||||
|
|
||||||
|
"midnightcontrols.virtual_mouse.skin.default_light": "vaikimisi hele",
|
||||||
|
"midnightcontrols.virtual_mouse.skin.default_dark": "vaikimisi tume",
|
||||||
|
"midnightcontrols.virtual_mouse.skin.second_light": "teine hele",
|
||||||
|
"midnightcontrols.virtual_mouse.skin.second_dark": "teine tume",
|
||||||
|
"modmenu.descriptionTranslation.midnightcontrols": "Lisab mängupuldi toe ning täiendab juhtnuppe üldiselt.\nFork loodud LambdaControls-ist, mille toetamine kahjuks lõpetati."
|
||||||
|
}
|
||||||
@@ -104,7 +104,8 @@
|
|||||||
"midnightcontrols.menu.reacharound.vertical": "Placement vertical",
|
"midnightcontrols.menu.reacharound.vertical": "Placement vertical",
|
||||||
"midnightcontrols.menu.reload_controller_mappings": "Recharger les manettes",
|
"midnightcontrols.menu.reload_controller_mappings": "Recharger les manettes",
|
||||||
"midnightcontrols.menu.right_dead_zone": "Zone morte axe droit",
|
"midnightcontrols.menu.right_dead_zone": "Zone morte axe droit",
|
||||||
"midnightcontrols.menu.rotation_speed": "Vitesse de rotation",
|
"midnightcontrols.menu.rotation_speed": "Vitesse de rotation (X)",
|
||||||
|
"midnightcontrols.menu.y_axis_rotation_speed": "Vitesse de rotation (Y)",
|
||||||
"midnightcontrols.menu.separator.general": "Général",
|
"midnightcontrols.menu.separator.general": "Général",
|
||||||
"midnightcontrols.menu.separator.controller": "Manette",
|
"midnightcontrols.menu.separator.controller": "Manette",
|
||||||
"midnightcontrols.menu.title": "midnightcontrols - Paramètres",
|
"midnightcontrols.menu.title": "midnightcontrols - Paramètres",
|
||||||
@@ -140,7 +141,8 @@
|
|||||||
"midnightcontrols.tooltip.reacharound.vertical": "Active le placement vertical de blocs, c'est-à-dire de blocs en dessous du bloc sur lequel vous êtes placé, §cpeut être considérer comme de la triche sur certains serveurs§r.",
|
"midnightcontrols.tooltip.reacharound.vertical": "Active le placement vertical de blocs, c'est-à-dire de blocs en dessous du bloc sur lequel vous êtes placé, §cpeut être considérer comme de la triche sur certains serveurs§r.",
|
||||||
"midnightcontrols.tooltip.reload_controller_mappings": "Recharge le fichier de configuration des manettes.",
|
"midnightcontrols.tooltip.reload_controller_mappings": "Recharge le fichier de configuration des manettes.",
|
||||||
"midnightcontrols.tooltip.right_dead_zone": "Zone morte de l'axe droit de la manette.",
|
"midnightcontrols.tooltip.right_dead_zone": "Zone morte de l'axe droit de la manette.",
|
||||||
"midnightcontrols.tooltip.rotation_speed": "Change la vitesse de rotation de la caméra.",
|
"midnightcontrols.tooltip.rotation_speed": "Change la vitesse de rotation de la caméra. (X)",
|
||||||
|
"midnightcontrols.tooltip.y_axis_rotation_speed": "Change la vitesse de rotation de la caméra. (Y)",
|
||||||
"midnightcontrols.tooltip.unfocused_input": "Autorise les entrées manette quand la fenêtre n'est pas sélectionnée.",
|
"midnightcontrols.tooltip.unfocused_input": "Autorise les entrées manette quand la fenêtre n'est pas sélectionnée.",
|
||||||
"midnightcontrols.tooltip.virtual_mouse": "Active la souris virtuelle qui est pratique dans le cas d'un écran partagé.",
|
"midnightcontrols.tooltip.virtual_mouse": "Active la souris virtuelle qui est pratique dans le cas d'un écran partagé.",
|
||||||
"midnightcontrols.virtual_mouse.skin.default_light": "défaut clair",
|
"midnightcontrols.virtual_mouse.skin.default_light": "défaut clair",
|
||||||
|
|||||||
@@ -104,7 +104,8 @@
|
|||||||
"midnightcontrols.menu.reacharound.vertical": "Placement vertical",
|
"midnightcontrols.menu.reacharound.vertical": "Placement vertical",
|
||||||
"midnightcontrols.menu.reload_controller_mappings": "Recharger les manettes",
|
"midnightcontrols.menu.reload_controller_mappings": "Recharger les manettes",
|
||||||
"midnightcontrols.menu.right_dead_zone": "Zone morte axe droit",
|
"midnightcontrols.menu.right_dead_zone": "Zone morte axe droit",
|
||||||
"midnightcontrols.menu.rotation_speed": "Vitesse de rotation",
|
"midnightcontrols.menu.rotation_speed": "Vitesse de rotation (X)",
|
||||||
|
"midnightcontrols.menu.y_axis_rotation_speed": "Vitesse de rotation (Y)",
|
||||||
"midnightcontrols.menu.separator.general": "Général",
|
"midnightcontrols.menu.separator.general": "Général",
|
||||||
"midnightcontrols.menu.separator.controller": "Manette",
|
"midnightcontrols.menu.separator.controller": "Manette",
|
||||||
"midnightcontrols.menu.title": "midnightcontrols - Paramètres",
|
"midnightcontrols.menu.title": "midnightcontrols - Paramètres",
|
||||||
@@ -140,7 +141,8 @@
|
|||||||
"midnightcontrols.tooltip.reacharound.vertical": "Active le placement vertical de blocs, c'est-à-dire de blocs en dessous du bloc sur lequel vous êtes placé, §cpeut être considérer comme de la triche sur certains serveurs§r.",
|
"midnightcontrols.tooltip.reacharound.vertical": "Active le placement vertical de blocs, c'est-à-dire de blocs en dessous du bloc sur lequel vous êtes placé, §cpeut être considérer comme de la triche sur certains serveurs§r.",
|
||||||
"midnightcontrols.tooltip.reload_controller_mappings": "Recharge le fichier de configuration des manettes.",
|
"midnightcontrols.tooltip.reload_controller_mappings": "Recharge le fichier de configuration des manettes.",
|
||||||
"midnightcontrols.tooltip.right_dead_zone": "Zone morte de l'axe droit de la manette.",
|
"midnightcontrols.tooltip.right_dead_zone": "Zone morte de l'axe droit de la manette.",
|
||||||
"midnightcontrols.tooltip.rotation_speed": "Change la vitesse de rotation de la caméra.",
|
"midnightcontrols.tooltip.rotation_speed": "Change la vitesse de rotation de la caméra. (X)",
|
||||||
|
"midnightcontrols.tooltip.y_axis_rotation_speed": "Change la vitesse de rotation de la caméra. (Y)",
|
||||||
"midnightcontrols.tooltip.unfocused_input": "Autorise les entrées manette quand la fenêtre n'est pas sélectionnée.",
|
"midnightcontrols.tooltip.unfocused_input": "Autorise les entrées manette quand la fenêtre n'est pas sélectionnée.",
|
||||||
"midnightcontrols.tooltip.virtual_mouse": "Active la souris virtuelle qui est pratique dans le cas d'un écran partagé.",
|
"midnightcontrols.tooltip.virtual_mouse": "Active la souris virtuelle qui est pratique dans le cas d'un écran partagé.",
|
||||||
"midnightcontrols.virtual_mouse.skin.default_light": "défaut clair",
|
"midnightcontrols.virtual_mouse.skin.default_light": "défaut clair",
|
||||||
|
|||||||
158
src/main/resources/assets/midnightcontrols/lang/ko_kr.json
Normal file
@@ -0,0 +1,158 @@
|
|||||||
|
{
|
||||||
|
"midnightcontrols.midnightconfig.title": "MidnightControls 고급 설정",
|
||||||
|
"key.midnightcontrols.look_down": "아래쪽 보기",
|
||||||
|
"key.midnightcontrols.look_left": "왼쪽 보기",
|
||||||
|
"key.midnightcontrols.look_right": "오른쪽 보기",
|
||||||
|
"key.midnightcontrols.look_up": "위쪽 보기",
|
||||||
|
"key.midnightcontrols.ring": "컨트롤 링 표시",
|
||||||
|
"midnightcontrols.action.attack": "공격",
|
||||||
|
"midnightcontrols.action.back": "뒤로",
|
||||||
|
"midnightcontrols.action.chat": "채팅 열기",
|
||||||
|
"midnightcontrols.action.drop_item": "아이템 버리기",
|
||||||
|
"midnightcontrols.action.exit": "종료",
|
||||||
|
"midnightcontrols.action.forward": "앞으로",
|
||||||
|
"midnightcontrols.action.hit": "때리기",
|
||||||
|
"midnightcontrols.action.hotbar_left": "단축 바 왼쪽",
|
||||||
|
"midnightcontrols.action.hotbar_right": "단축 바 오른쪽",
|
||||||
|
"midnightcontrols.action.inventory": "보관함",
|
||||||
|
"midnightcontrols.action.jump": "점프",
|
||||||
|
"midnightcontrols.action.left": "왼쪽",
|
||||||
|
"midnightcontrols.action.pause_game": "게임 일시 중지",
|
||||||
|
"midnightcontrols.action.pick_block": "블록 집기",
|
||||||
|
"midnightcontrols.action.pickup": "집기",
|
||||||
|
"midnightcontrols.action.pickup_all": "모두 집기",
|
||||||
|
"midnightcontrols.action.place": "놓기",
|
||||||
|
"midnightcontrols.action.player_list": "플레이어 목록",
|
||||||
|
"midnightcontrols.action.quick_move": "빠른 이동",
|
||||||
|
"midnightcontrols.action.right": "오른쪽",
|
||||||
|
"midnightcontrols.action.screenshot": "스크린샷 찍기",
|
||||||
|
"midnightcontrols.action.sneak": "은신",
|
||||||
|
"midnightcontrols.action.sprint": "달리기",
|
||||||
|
"midnightcontrols.action.swap_hands": "손 전환",
|
||||||
|
"midnightcontrols.action.toggle_perspective": "시점 토글",
|
||||||
|
"midnightcontrols.action.toggle_smooth_camera": "시네마틱 카메라 토글",
|
||||||
|
"midnightcontrols.action.use": "사용",
|
||||||
|
"midnightcontrols.action.zoom": "확대/축소",
|
||||||
|
"midnightcontrols.action.zoom_in": "확대",
|
||||||
|
"midnightcontrols.action.zoom_out": "축소",
|
||||||
|
"midnightcontrols.action.zoom_reset": "확대/축소 초기화",
|
||||||
|
"midnightcontrols.action.key.emotecraft.fastchoose": "이모트 빠른 선택",
|
||||||
|
"midnightcontrols.action.key.emotecraft.stop": "이모트 중지",
|
||||||
|
"midnightcontrols.button.a": "A",
|
||||||
|
"midnightcontrols.button.b": "B",
|
||||||
|
"midnightcontrols.button.x": "X",
|
||||||
|
"midnightcontrols.button.y": "Y",
|
||||||
|
"midnightcontrols.button.left_bumper": "왼쪽 범퍼",
|
||||||
|
"midnightcontrols.button.right_bumper": "오른쪽 범퍼",
|
||||||
|
"midnightcontrols.button.back": "뒤로",
|
||||||
|
"midnightcontrols.button.start": "시작",
|
||||||
|
"midnightcontrols.button.guide": "가이드",
|
||||||
|
"midnightcontrols.button.left_thumb": "왼쪽 엄지",
|
||||||
|
"midnightcontrols.button.right_thumb": "오른쪽 엄지",
|
||||||
|
"midnightcontrols.button.dpad_up": "DPAD 위",
|
||||||
|
"midnightcontrols.button.dpad_right": "DPAD 오른쪽",
|
||||||
|
"midnightcontrols.button.dpad_down": "DPAD 아래",
|
||||||
|
"midnightcontrols.button.dpad_left": "DPAD 왼쪽",
|
||||||
|
"midnightcontrols.button.l4": "L4",
|
||||||
|
"midnightcontrols.button.l5": "L5",
|
||||||
|
"midnightcontrols.button.r4": "R4",
|
||||||
|
"midnightcontrols.button.r5": "L5",
|
||||||
|
"midnightcontrols.axis.left_x+": "왼쪽 X+",
|
||||||
|
"midnightcontrols.axis.left_y+": "왼쪽 Y+",
|
||||||
|
"midnightcontrols.axis.right_x+": "오른쪽 X+",
|
||||||
|
"midnightcontrols.axis.right_y+": "오른쪽 Y+",
|
||||||
|
"midnightcontrols.axis.left_trigger": "왼쪽 트리거",
|
||||||
|
"midnightcontrols.axis.right_trigger": "오른쪽 트리거",
|
||||||
|
"midnightcontrols.axis.left_x-": "왼쪽 X-",
|
||||||
|
"midnightcontrols.axis.left_y-": "왼쪽 Y-",
|
||||||
|
"midnightcontrols.axis.right_x-": "오른쪽 X-",
|
||||||
|
"midnightcontrols.axis.right_y-": "오른쪽 Y-",
|
||||||
|
"midnightcontrols.button.unknown": "알 수 없음 (%d)",
|
||||||
|
"midnightcontrols.controller.connected": "컨트롤러 %d 연결됨.",
|
||||||
|
"midnightcontrols.controller.disconnected": "컨트롤러 %d 연결 끊김.",
|
||||||
|
"midnightcontrols.controller.mappings.1": "컨트롤러 매핑을 설정하려면, %s을 사용하세요",
|
||||||
|
"midnightcontrols.controller.mappings.3": "그리고 매핑 파일 편집기에 매핑을 붙여 넣으세요.",
|
||||||
|
"midnightcontrols.controller.mappings.error": "매핑을 불러오던 중 오류.",
|
||||||
|
"midnightcontrols.controller.mappings.error.write": "파일에 매핑 작성 중 오류.",
|
||||||
|
"midnightcontrols.controller.mappings.updated": "매핑 업데이트됨!",
|
||||||
|
"midnightcontrols.controller_type.default": "기본",
|
||||||
|
"midnightcontrols.controller_type.dualshock": "듀얼쇼크",
|
||||||
|
"midnightcontrols.controller_type.switch": "스위치",
|
||||||
|
"midnightcontrols.controller_type.xbox": "엑스박스",
|
||||||
|
"midnightcontrols.controller_type.steam": "스팀",
|
||||||
|
"midnightcontrols.controller_type.ouya": "우야",
|
||||||
|
"midnightcontrols.controls_mode.default": "키보드/마우스",
|
||||||
|
"midnightcontrols.controls_mode.controller": "컨트롤러",
|
||||||
|
"midnightcontrols.controls_mode.touchscreen": "터치스크린",
|
||||||
|
"midnightcontrols.hud_side.left": "왼쪽",
|
||||||
|
"midnightcontrols.hud_side.right": "오른쪽",
|
||||||
|
"midnightcontrols.menu.analog_movement": "아날로그 움직임",
|
||||||
|
"midnightcontrols.menu.auto_switch_mode": "자동 전환 모드",
|
||||||
|
"midnightcontrols.menu.controller": "컨트롤러",
|
||||||
|
"midnightcontrols.menu.controller2": "보조 컨트롤러",
|
||||||
|
"midnightcontrols.menu.controller_type": "컨트롤러 종류",
|
||||||
|
"midnightcontrols.menu.controls_mode": "모드",
|
||||||
|
"midnightcontrols.menu.fast_block_placing": "빠른 블록 배치",
|
||||||
|
"midnightcontrols.menu.fly_drifting": "비행 관성",
|
||||||
|
"midnightcontrols.menu.fly_drifting_vertical": "비행 수직 관성",
|
||||||
|
"midnightcontrols.menu.hud_enable": "HUD 사용",
|
||||||
|
"midnightcontrols.menu.hud_side": "HUD 측면",
|
||||||
|
"midnightcontrols.menu.invert_right_x_axis": "오른쪽 X 반전",
|
||||||
|
"midnightcontrols.menu.invert_right_y_axis": "오른쪽 Y 반전",
|
||||||
|
"midnightcontrols.menu.keyboard_controls": "키보드 컨트롤...",
|
||||||
|
"midnightcontrols.menu.left_dead_zone": "왼쪽 데드 존",
|
||||||
|
"midnightcontrols.menu.mappings.open_input_str": "매핑 파일 편집기 열기",
|
||||||
|
"midnightcontrols.menu.max_left_x_value": "왼쪽 X 축 최댓값",
|
||||||
|
"midnightcontrols.menu.max_left_y_value": "왼쪽 Y 축 최댓값",
|
||||||
|
"midnightcontrols.menu.max_right_x_value": "오른쪽 X 축 최댓값",
|
||||||
|
"midnightcontrols.menu.max_right_y_value": "오른쪽 Y 축 최댓값",
|
||||||
|
"midnightcontrols.menu.mouse_speed": "마우스 속도",
|
||||||
|
"midnightcontrols.menu.reacharound.horizontal": "블록 전면 배치",
|
||||||
|
"midnightcontrols.menu.reacharound.vertical": "블록 수직 배치",
|
||||||
|
"midnightcontrols.menu.reload_controller_mappings": "컨트롤러 매핑 다시 불러오기",
|
||||||
|
"midnightcontrols.menu.right_dead_zone": "오른쪽 데드 존",
|
||||||
|
"midnightcontrols.menu.rotation_speed": "회전 속도",
|
||||||
|
"midnightcontrols.menu.separator.controller": "컨트롤러",
|
||||||
|
"midnightcontrols.menu.separator.general": "일반",
|
||||||
|
"midnightcontrols.menu.title": "MidnightControls - 설정",
|
||||||
|
"midnightcontrols.menu.title.controller": "컨트롤러 옵션",
|
||||||
|
"midnightcontrols.menu.title.controller_controls": "컨트롤러 제어",
|
||||||
|
"midnightcontrols.menu.title.gameplay": "게임플레이 옵션",
|
||||||
|
"midnightcontrols.menu.title.general": "일반 옵션",
|
||||||
|
"midnightcontrols.menu.title.hud": "HUD 옵션",
|
||||||
|
"midnightcontrols.menu.title.mappings.string": "매핑 파일 편집기",
|
||||||
|
"midnightcontrols.menu.title.visual": "외형 옵션",
|
||||||
|
"midnightcontrols.menu.unfocused_input": "언포커스 인풋",
|
||||||
|
"midnightcontrols.menu.virtual_mouse": "가상 마우스",
|
||||||
|
"midnightcontrols.menu.virtual_mouse.skin": "가상 마우스 스킨",
|
||||||
|
"midnightcontrols.narrator.unbound": "%s 해제됨",
|
||||||
|
"midnightcontrols.not_bound": "바인딩되지 않음",
|
||||||
|
"midnightcontrols.tooltip.analog_movement": "가능한 경우 아날로그 움직임을 사용합니다.",
|
||||||
|
"midnightcontrols.tooltip.auto_switch_mode": "컨트롤러가 연결되면 자동으로 컨트롤 모드가 컨트롤러로 전환됩니다.",
|
||||||
|
"midnightcontrols.tooltip.controller2": "보조 컨트롤러를 사용하려면 Joy-Cons 지원을 허용하세요.",
|
||||||
|
"midnightcontrols.tooltip.controller_type": "올바른 버튼을 표시할 컨트롤러 종류입니다.",
|
||||||
|
"midnightcontrols.tooltip.controls_mode": "컨트롤 모드.",
|
||||||
|
"midnightcontrols.tooltip.fast_block_placing": "크리에이티브 모드에서 비행하는 동안 사용자 속도에 따른 빠른 블록 배치를 사용합니다. §c일부 서버에선 치팅 행위로 취급될 수 있습니다.",
|
||||||
|
"midnightcontrols.tooltip.fly_drifting": "비행하는 동안 바닐라처럼 관성을 적용합니다.",
|
||||||
|
"midnightcontrols.tooltip.fly_drifting_vertical": "비행하는 동안 바닐라처럼 수직 관성을 적용합니다.",
|
||||||
|
"midnightcontrols.tooltip.hud_enable": "화면 컨트롤러 버튼 표시기 토글",
|
||||||
|
"midnightcontrols.tooltip.hud_side": "HUD 위치.",
|
||||||
|
"midnightcontrols.tooltip.left_dead_zone": "컨트롤러 왼쪽 아날로그 스틱 데드 존.",
|
||||||
|
"midnightcontrols.tooltip.max_left_x_value": "모드가 인식하는 왼쪽 X 축 최댓값을 변경합니다. 사용자의 축이 전체 범위를 사용하지 않고 느리게 보일 경우 유용합니다.",
|
||||||
|
"midnightcontrols.tooltip.max_left_y_value": "모드가 인식하는 왼쪽 Y 축 최댓값을 변경합니다. 사용자의 축이 전체 범위를 사용하지 않고 느리게 보일 경우 유용합니다.",
|
||||||
|
"midnightcontrols.tooltip.max_right_x_value": "모드가 인식하는 오른쪽 X 축 최댓값을 변경합니다. 사용자의 축이 전체 범위를 사용하지 않고 느리게 보일 경우 유용합니다.",
|
||||||
|
"midnightcontrols.tooltip.max_right_y_value": "모드가 인식하는 오른쪽 Y 축 최댓값을 변경합니다. 사용자의 축이 전체 범위를 사용하지 않고 느리게 보일 경우 유용합니다.",
|
||||||
|
"midnightcontrols.tooltip.mouse_speed": "컨트롤러의 에뮬레이트된 마우스 속도.",
|
||||||
|
"midnightcontrols.tooltip.reacharound.horizontal": "블록 전면 배치를 사용합니다. §c일부 서버에선 치팅 행위로 취급될 수 있습니다§r.",
|
||||||
|
"midnightcontrols.tooltip.reacharound.vertical": "블록 수직 배치를 사용합니다. 블록 아래에 다른 블록을 배치할 수 있습니다. §c일부 서버에선 치팅 행위로 취급될 수 있습니다§r.",
|
||||||
|
"midnightcontrols.tooltip.reload_controller_mappings": "컨트롤러 매핑 파일을 다시 불러옵니다.",
|
||||||
|
"midnightcontrols.tooltip.right_dead_zone": "컨트롤러 오른쪽 아날로그 스틱 데드 존",
|
||||||
|
"midnightcontrols.tooltip.rotation_speed": "컨트롤러 모드에서 적용되는 카메라 회전 속도.",
|
||||||
|
"midnightcontrols.tooltip.unfocused_input": "창이 활성화된 상태가 아니여도 컨트롤러 입력 허용.",
|
||||||
|
"midnightcontrols.tooltip.virtual_mouse": "분할 화면에선 도움 되는 가상 마우스를 사용합니다.",
|
||||||
|
"midnightcontrols.virtual_mouse.skin.default_light": "기본 라이트",
|
||||||
|
"midnightcontrols.virtual_mouse.skin.default_dark": "기본 다크",
|
||||||
|
"midnightcontrols.virtual_mouse.skin.second_light": "두 번째 라이트",
|
||||||
|
"midnightcontrols.virtual_mouse.skin.second_dark": "두 번째 다크",
|
||||||
|
"modmenu.descriptionTranslation.midnightcontrols": "컨트롤러 제어 및 전반적인 향상된 제어 기능을 추가합니다.\n안타깝게도 업데이트가 끊긴 LambdaControls의 Fork 버전입니다."
|
||||||
|
}
|
||||||
177
src/main/resources/assets/midnightcontrols/lang/ru_ru.json
Normal file
@@ -0,0 +1,177 @@
|
|||||||
|
{
|
||||||
|
"midnightcontrols.midnightconfig.title": "Расширенная Конфигурация MidnightControls",
|
||||||
|
"key.midnightcontrols.look_down": "Смотреть Вниз",
|
||||||
|
"key.midnightcontrols.look_left": "Смотреть Налево",
|
||||||
|
"key.midnightcontrols.look_right": "Смотреть Направо",
|
||||||
|
"key.midnightcontrols.look_up": "Смотрeть Вверх",
|
||||||
|
"key.midnightcontrols.ring": "Показать Кольцо Управления",
|
||||||
|
"midnightcontrols.action.attack": "Атаковать",
|
||||||
|
"midnightcontrols.action.back": "Назад",
|
||||||
|
"midnightcontrols.action.chat": "Открыть Чат",
|
||||||
|
"midnightcontrols.action.debug_screen": "Открыть Отладку (F3)",
|
||||||
|
"midnightcontrols.action.drop_item": "Выбросить Предмет",
|
||||||
|
"midnightcontrols.action.exit": "Выйти",
|
||||||
|
"midnightcontrols.action.forward": "Вперед",
|
||||||
|
"midnightcontrols.action.hit": "Ударить",
|
||||||
|
"midnightcontrols.action.hotbar_left": "Панель Быстрого Доступа Налево",
|
||||||
|
"midnightcontrols.action.hotbar_right": "Панель Быстрого Доступа Направо",
|
||||||
|
"midnightcontrols.action.inventory": "Инвентарь",
|
||||||
|
"midnightcontrols.action.jump": "Прыжок",
|
||||||
|
"midnightcontrols.action.left": "Налево",
|
||||||
|
"midnightcontrols.action.pause_game": "Приостановить игру",
|
||||||
|
"midnightcontrols.action.pick_block": "Выбор Блока",
|
||||||
|
"midnightcontrols.action.pickup": "Взять Половину",
|
||||||
|
"midnightcontrols.action.pickup_all": "Взять Всё",
|
||||||
|
"midnightcontrols.action.place": "Поставить",
|
||||||
|
"midnightcontrols.action.player_list": "Лист Игроков",
|
||||||
|
"midnightcontrols.action.quick_move": "Переложить",
|
||||||
|
"midnightcontrols.action.right": "Направо",
|
||||||
|
"midnightcontrols.action.screenshot": "Сделать Скриншот",
|
||||||
|
"midnightcontrols.action.slot_up": "Двинуть На Слот Вверх",
|
||||||
|
"midnightcontrols.action.slot_down": "Двинуть На Слот Вниз",
|
||||||
|
"midnightcontrols.action.slot_left": "Двинуть На Слот Влево",
|
||||||
|
"midnightcontrols.action.slot_right": "Двинуть На Слот Вправо",
|
||||||
|
"midnightcontrols.action.sneak": "Красться",
|
||||||
|
"midnightcontrols.action.sprint": "Бег",
|
||||||
|
"midnightcontrols.action.swap_hands": "Поменять Руку",
|
||||||
|
"midnightcontrols.action.toggle_perspective": "Переключить Перспективу",
|
||||||
|
"midnightcontrols.action.toggle_smooth_camera": "Переключить Кинематографическую Камеру",
|
||||||
|
"midnightcontrols.action.page_back": "Предыдущая Страница",
|
||||||
|
"midnightcontrols.action.page_next": "Следующая Страница",
|
||||||
|
"midnightcontrols.action.tab_back": "Предыдущая Секция",
|
||||||
|
"midnightcontrols.action.tab_next": "Следующая Секция",
|
||||||
|
"midnightcontrols.action.take": "Взять Предмет",
|
||||||
|
"midnightcontrols.action.take_all": "Взять Стак",
|
||||||
|
"midnightcontrols.action.use": "Использовать",
|
||||||
|
"midnightcontrols.action.zoom": "Приблизить",
|
||||||
|
"midnightcontrols.action.zoom_in": "Увеличить Масштаб",
|
||||||
|
"midnightcontrols.action.zoom_out": "Уменьшить Масштаб",
|
||||||
|
"midnightcontrols.action.zoom_reset": "Сбросить Масштаб",
|
||||||
|
"midnightcontrols.action.emi_page_left": "Предыдущая Страница",
|
||||||
|
"midnightcontrols.action.emi_page_right": "Следующая Страница",
|
||||||
|
"midnightcontrols.category.emi": "ЕМИ",
|
||||||
|
"midnightcontrols.button.a": "A",
|
||||||
|
"midnightcontrols.button.b": "B",
|
||||||
|
"midnightcontrols.button.x": "X",
|
||||||
|
"midnightcontrols.button.y": "Y",
|
||||||
|
"midnightcontrols.button.left_bumper": "Левый Бампер",
|
||||||
|
"midnightcontrols.button.right_bumper": "Правый Бампер",
|
||||||
|
"midnightcontrols.button.back": "Назад",
|
||||||
|
"midnightcontrols.button.start": "Старт",
|
||||||
|
"midnightcontrols.button.guide": "Гайд Кнопка",
|
||||||
|
"midnightcontrols.button.left_thumb": "Левый Стик",
|
||||||
|
"midnightcontrols.button.right_thumb": "Правый Стик",
|
||||||
|
"midnightcontrols.button.dpad_up": "Крестовина Вверх",
|
||||||
|
"midnightcontrols.button.dpad_right": "Крестовина Вправо",
|
||||||
|
"midnightcontrols.button.dpad_down": "Крестовина Вниз",
|
||||||
|
"midnightcontrols.button.dpad_left": "Крестовина Влево",
|
||||||
|
"midnightcontrols.button.l4": "L4",
|
||||||
|
"midnightcontrols.button.l5": "L5",
|
||||||
|
"midnightcontrols.button.r4": "R4",
|
||||||
|
"midnightcontrols.button.r5": "L5",
|
||||||
|
"midnightcontrols.axis.left_x+": "Левый Стик X+",
|
||||||
|
"midnightcontrols.axis.left_y+": "Левый Стик Y+",
|
||||||
|
"midnightcontrols.axis.right_x+": "Правый Стик X+",
|
||||||
|
"midnightcontrols.axis.right_y+": "Правый Стик Y+",
|
||||||
|
"midnightcontrols.axis.left_trigger": "Левый Триггер",
|
||||||
|
"midnightcontrols.axis.right_trigger": "Правый Триггер",
|
||||||
|
"midnightcontrols.axis.left_x-": "Левый Стик X-",
|
||||||
|
"midnightcontrols.axis.left_y-": "Левый Стик Y-",
|
||||||
|
"midnightcontrols.axis.right_x-": "Правый Стик X-",
|
||||||
|
"midnightcontrols.axis.right_y-": "Правый Стик Y-",
|
||||||
|
"midnightcontrols.button.unknown": "Неизвестный (%d)",
|
||||||
|
"midnightcontrols.controller.connected": "Контроллер %d Был Присоединен.",
|
||||||
|
"midnightcontrols.controller.disconnected": "Контроллер %d Был Отключён.",
|
||||||
|
"midnightcontrols.controller.mappings.1": "Чтобы настроить раскладку контроллера, используйте %s",
|
||||||
|
"midnightcontrols.controller.mappings.3": "и вставте ваш итог в редактор файлов раскладок.",
|
||||||
|
"midnightcontrols.controller.mappings.error": "Ошибка при загрузке раскладки.",
|
||||||
|
"midnightcontrols.controller.mappings.error.write": "Ошибка при записи раскладки в файл.",
|
||||||
|
"midnightcontrols.controller.mappings.updated": "Раскладка обновлена!",
|
||||||
|
"midnightcontrols.controller_type.default": "По стандарту",
|
||||||
|
"midnightcontrols.controller_type.dualshock": "DualShock",
|
||||||
|
"midnightcontrols.controller_type.dualsense": "DualSense",
|
||||||
|
"midnightcontrols.controller_type.switch": "Switch",
|
||||||
|
"midnightcontrols.controller_type.xbox": "Xbox",
|
||||||
|
"midnightcontrols.controller_type.xbox_360": "Xbox 360",
|
||||||
|
"midnightcontrols.controller_type.steam_controller": "Steam Controller",
|
||||||
|
"midnightcontrols.controller_type.steam_deck": "Steam Deck",
|
||||||
|
"midnightcontrols.controller_type.ouya": "OUYA",
|
||||||
|
"midnightcontrols.controls_mode.default": "Клавиатура/Мышь",
|
||||||
|
"midnightcontrols.controls_mode.controller": "Контроллер",
|
||||||
|
"midnightcontrols.controls_mode.touchscreen": "Сенсорный Экран (Разраб.)",
|
||||||
|
"midnightcontrols.hud_side.left": "Больше Налево",
|
||||||
|
"midnightcontrols.hud_side.right": "Больше Направо",
|
||||||
|
"midnightcontrols.menu.analog_movement": "Аналоговое Движение",
|
||||||
|
"midnightcontrols.menu.auto_switch_mode": "Автоматическое Переключение",
|
||||||
|
"midnightcontrols.menu.controller": "Контроллер",
|
||||||
|
"midnightcontrols.menu.controller2": "Дополнительный Контроллер",
|
||||||
|
"midnightcontrols.menu.controller_type": "Тип контроллера",
|
||||||
|
"midnightcontrols.menu.controls_mode": "Тип",
|
||||||
|
"midnightcontrols.menu.double_tap_to_sprint": "Дважды Отвести Левый Стик, Чтобы Начать Бежать",
|
||||||
|
"midnightcontrols.menu.fast_block_placing": "Быстрая Поставка Блоков",
|
||||||
|
"midnightcontrols.menu.fly_drifting": "Инерция При Полёте",
|
||||||
|
"midnightcontrols.menu.fly_drifting_vertical": "Вертикальная Инерция При Полёте",
|
||||||
|
"midnightcontrols.menu.hud_enable": "Включить Иконоки Контроллера",
|
||||||
|
"midnightcontrols.menu.hud_side": "Расположение Интерфейса",
|
||||||
|
"midnightcontrols.menu.invert_right_x_axis": "Инвертировать Правый X",
|
||||||
|
"midnightcontrols.menu.invert_right_y_axis": "Инвертировать Правый Y",
|
||||||
|
"midnightcontrols.menu.keyboard_controls": "Клавиатурная Настройка...",
|
||||||
|
"midnightcontrols.menu.left_dead_zone": "Мертвая Зона Левого Стика",
|
||||||
|
"midnightcontrols.menu.mappings.open_input_str": "Открыть Редактор Файлов Раскладок",
|
||||||
|
"midnightcontrols.menu.max_left_x_value": "Максимальное Значение Ось Левого X",
|
||||||
|
"midnightcontrols.menu.max_left_y_value": "Максимальное Значение Ось Левого Y",
|
||||||
|
"midnightcontrols.menu.max_right_x_value": "Максимальное Значение Ось Правого X",
|
||||||
|
"midnightcontrols.menu.max_right_y_value": "Максимальное Значение Ось Правого Y",
|
||||||
|
"midnightcontrols.menu.mouse_speed": "Скорость Курсора",
|
||||||
|
"midnightcontrols.menu.reacharound.horizontal": "Размещение Переднего Блока",
|
||||||
|
"midnightcontrols.menu.reacharound.vertical": "Вертикальный Охват",
|
||||||
|
"midnightcontrols.menu.reload_controller_mappings": "Перезагрузить Раскладку Контроллера",
|
||||||
|
"midnightcontrols.menu.right_dead_zone": "Мертвая Зона Правого Стика",
|
||||||
|
"midnightcontrols.menu.rotation_speed": "Скорость Вращения По Оси X",
|
||||||
|
"midnightcontrols.menu.y_axis_rotation_speed": "Скорость Вращения По Оси Y",
|
||||||
|
"midnightcontrols.menu.separator.controller": "Контроллер",
|
||||||
|
"midnightcontrols.menu.separator.general": "Общие",
|
||||||
|
"midnightcontrols.menu.title": "MidnightControls - Настройки",
|
||||||
|
"midnightcontrols.menu.title.controller": "Настройки Контроллера",
|
||||||
|
"midnightcontrols.menu.title.controller_controls": "Управление Контроллером",
|
||||||
|
"midnightcontrols.menu.title.gameplay": "Во Время Игры Настройки",
|
||||||
|
"midnightcontrols.menu.title.general": "Общие Настройки",
|
||||||
|
"midnightcontrols.menu.title.hud": "Настройка Интерфейса",
|
||||||
|
"midnightcontrols.menu.title.mappings.string": "Редактор Файлов Раскладок",
|
||||||
|
"midnightcontrols.menu.title.visual": "Настройка Внешнего Вида",
|
||||||
|
"midnightcontrols.menu.unfocused_input": "Несфокусированный Ввод",
|
||||||
|
"midnightcontrols.menu.virtual_mouse": "Виртуальныя Мышка",
|
||||||
|
"midnightcontrols.menu.virtual_mouse.skin": "Дизайн Виртуальной Мышки",
|
||||||
|
"midnightcontrols.narrator.unbound": "Освобождённый %s",
|
||||||
|
"midnightcontrols.not_bound": "Не Назначанно",
|
||||||
|
"midnightcontrols.tooltip.analog_movement": "Включает аналоговое движение, когда это возможно.",
|
||||||
|
"midnightcontrols.tooltip.auto_switch_mode": "Автоматическое переключение на новый, только подключенный контроллер.",
|
||||||
|
"midnightcontrols.tooltip.controller2": "Дополнительный контроллер, например для Джой-конов.",
|
||||||
|
"midnightcontrols.tooltip.controller_type": "Тип контроллера, чтобы правильно сопоставить иконки кнопок.",
|
||||||
|
"midnightcontrols.tooltip.controls_mode": "Тип контроля над игрой.",
|
||||||
|
"midnightcontrols.tooltip.double_tap_to_sprint": "При двойном перемещением на левый стик, персонаж начинает бежать.",
|
||||||
|
"midnightcontrols.tooltip.fast_block_placing": "Во время полета в творческом режиме позволяет быстро размещать блоки в зависимости от вашей скорости. §cНа некоторых серверах это может расцениваться как читерство.§r",
|
||||||
|
"midnightcontrols.tooltip.fly_drifting": "Во время полета включает ванильную инерцию.",
|
||||||
|
"midnightcontrols.tooltip.fly_drifting_vertical": "Во время полета включает ванильную вертикальную инерцию.",
|
||||||
|
"midnightcontrols.tooltip.hud_enable": "Переключает видение иконок кнопок контроллера на экране.",
|
||||||
|
"midnightcontrols.tooltip.hud_side": "Расположение интерфейса в определённую сторону.",
|
||||||
|
"midnightcontrols.tooltip.left_dead_zone": "Мертвая зона для левого аналогового стика контроллера.",
|
||||||
|
"midnightcontrols.tooltip.max_left_x_value": "Изменяет то, что мод в итоге считает максимальным значением для левой оси X. Полезно, если ваша ось не использует весь диапазон и кажется медленной.",
|
||||||
|
"midnightcontrols.tooltip.max_left_y_value": "Изменяет то, что мод в итоге считает максимальным значением для левой оси Y. Полезно, если ваша ось не использует весь диапазон и кажется медленной.",
|
||||||
|
"midnightcontrols.tooltip.max_right_x_value": "Изменяет то, что мод в итоге считает максимальным значением для правой оси X. Полезно, если ваша ось не использует весь диапазон и кажется медленной.",
|
||||||
|
"midnightcontrols.tooltip.max_right_y_value": "Изменяет то, что мод в итоге считает максимальным значением для правой оси Y. Полезно, если ваша ось не использует весь диапазон и кажется медленной.",
|
||||||
|
"midnightcontrols.tooltip.mouse_speed": "Скорость мыши, эмулируемая контроллером.",
|
||||||
|
"midnightcontrols.tooltip.reacharound.horizontal": "Позволяет размещать передний блок перед собой. §cМожет рассматриваться как читерство на некоторых серверах§r.",
|
||||||
|
"midnightcontrols.tooltip.reacharound.vertical": "Обеспечивает вертикальный охват. §cМожет рассматриваться как мошенничество на некоторых серверах§r.",
|
||||||
|
"midnightcontrols.tooltip.reload_controller_mappings": "Перезагружает файл раскладки контроллеров.",
|
||||||
|
"midnightcontrols.tooltip.right_dead_zone": "Мертвая зона для правого аналогового стика контроллера.",
|
||||||
|
"midnightcontrols.tooltip.rotation_speed": "Скорость вращения камеры по оси X в режиме контроллера.",
|
||||||
|
"midnightcontrols.tooltip.y_axis_rotation_speed": "Скорость вращения камеры по оси Y в режиме контроллера.",
|
||||||
|
"midnightcontrols.tooltip.unfocused_input": "Разрешить ввод с контроллера, даже если игра на сфокусирована.",
|
||||||
|
"midnightcontrols.tooltip.virtual_mouse": "Включить виртуальную мышь, очень полезно при игре двоём на одном компьютере.",
|
||||||
|
"midnightcontrols.virtual_mouse.skin.default_light": "Обычный Светлый",
|
||||||
|
"midnightcontrols.virtual_mouse.skin.default_dark": "Обычный Тёмный",
|
||||||
|
"midnightcontrols.virtual_mouse.skin.second_light": "Дополнительный Светлый",
|
||||||
|
"midnightcontrols.virtual_mouse.skin.second_dark": "Дополнительный Тёмный",
|
||||||
|
"modmenu.descriptionTranslation.midnightcontrols": "Добавление поддержки контроллера и улучшенние элементов управления в целом.\nРазветвлен от LambdaControls, поддержка которого, к сожалению, прекращена.."
|
||||||
|
}
|
||||||
@@ -98,7 +98,8 @@
|
|||||||
"midnightcontrols.menu.reacharound.horizontal": "Alt Öne Blok Koyma",
|
"midnightcontrols.menu.reacharound.horizontal": "Alt Öne Blok Koyma",
|
||||||
"midnightcontrols.menu.reacharound.vertical": "En Alta Blok Koyma",
|
"midnightcontrols.menu.reacharound.vertical": "En Alta Blok Koyma",
|
||||||
"midnightcontrols.menu.reload_controller_mappings": "Oyun Kolu Eşleştirmelerini Yenile",
|
"midnightcontrols.menu.reload_controller_mappings": "Oyun Kolu Eşleştirmelerini Yenile",
|
||||||
"midnightcontrols.menu.rotation_speed": "Dönme Hızı",
|
"midnightcontrols.menu.rotation_speed": "Dönme Hızı (X)",
|
||||||
|
"midnightcontrols.menu.y_axis_rotation_speed": "Dönme Hızı (Y)",
|
||||||
"midnightcontrols.menu.title": "midnightcontrols - Ayarlar",
|
"midnightcontrols.menu.title": "midnightcontrols - Ayarlar",
|
||||||
"midnightcontrols.menu.title.controller": "Oyun Kolu Seçenekleri",
|
"midnightcontrols.menu.title.controller": "Oyun Kolu Seçenekleri",
|
||||||
"midnightcontrols.menu.title.controller_controls": "Oyun Kolu Kontrolleri",
|
"midnightcontrols.menu.title.controller_controls": "Oyun Kolu Kontrolleri",
|
||||||
@@ -124,7 +125,8 @@
|
|||||||
"midnightcontrols.tooltip.reacharound.horizontal": "Hızlı blok koymayı etkinleştirir. §cBazı sunucular bunun hile olduğunu düşünebilir.§r.",
|
"midnightcontrols.tooltip.reacharound.horizontal": "Hızlı blok koymayı etkinleştirir. §cBazı sunucular bunun hile olduğunu düşünebilir.§r.",
|
||||||
"midnightcontrols.tooltip.reacharound.vertical": "En alta blok koymayı etkinleştirir. §cBazı sunucular bunun hile olduğunu düşünebilir.§r.",
|
"midnightcontrols.tooltip.reacharound.vertical": "En alta blok koymayı etkinleştirir. §cBazı sunucular bunun hile olduğunu düşünebilir.§r.",
|
||||||
"midnightcontrols.tooltip.reload_controller_mappings": "Oyun kolu için eşleştirme dosyasını yeniler.",
|
"midnightcontrols.tooltip.reload_controller_mappings": "Oyun kolu için eşleştirme dosyasını yeniler.",
|
||||||
"midnightcontrols.tooltip.rotation_speed": "Oyun kolu modunda olan kamera dönme hızı",
|
"midnightcontrols.tooltip.rotation_speed": "Oyun kolu modunda olan kamera dönme hızı (X)",
|
||||||
|
"midnightcontrols.tooltip.y_axis_rotation_speed": "Oyun kolu modunda olan kamera dönme hızı (Y)",
|
||||||
"midnightcontrols.tooltip.unfocused_input": "Oyun penceresinde değilken oyun kolu girişine izine verir.",
|
"midnightcontrols.tooltip.unfocused_input": "Oyun penceresinde değilken oyun kolu girişine izine verir.",
|
||||||
"midnightcontrols.tooltip.virtual_mouse": "Sanal fareyi etkinleştirir. Çift ekran oynanılacağı zaman işe yarar.",
|
"midnightcontrols.tooltip.virtual_mouse": "Sanal fareyi etkinleştirir. Çift ekran oynanılacağı zaman işe yarar.",
|
||||||
"midnightcontrols.virtual_mouse.skin.default_light": "Varsayılan Aydınlık Tema",
|
"midnightcontrols.virtual_mouse.skin.default_light": "Varsayılan Aydınlık Tema",
|
||||||
|
|||||||
@@ -104,7 +104,8 @@
|
|||||||
"midnightcontrols.menu.reacharound.vertical": "垂直方向方块放置辅助",
|
"midnightcontrols.menu.reacharound.vertical": "垂直方向方块放置辅助",
|
||||||
"midnightcontrols.menu.reload_controller_mappings": "重新加载手柄按键映射",
|
"midnightcontrols.menu.reload_controller_mappings": "重新加载手柄按键映射",
|
||||||
"midnightcontrols.menu.right_dead_zone": "右摇杆死区",
|
"midnightcontrols.menu.right_dead_zone": "右摇杆死区",
|
||||||
"midnightcontrols.menu.rotation_speed": "镜头旋转速度",
|
"midnightcontrols.menu.rotation_speed": "镜头旋转速度 (X)",
|
||||||
|
"midnightcontrols.menu.y_axis_rotation_speed": "镜头旋转速度 (Y)",
|
||||||
"midnightcontrols.menu.separator.controller": "手柄",
|
"midnightcontrols.menu.separator.controller": "手柄",
|
||||||
"midnightcontrols.menu.separator.general": "通用",
|
"midnightcontrols.menu.separator.general": "通用",
|
||||||
"midnightcontrols.menu.title": "midnightcontrols — 设置",
|
"midnightcontrols.menu.title": "midnightcontrols — 设置",
|
||||||
@@ -140,7 +141,8 @@
|
|||||||
"midnightcontrols.tooltip.reacharound.vertical": "启用垂直方向方块放置辅助,可在脚下方块的下方放置方块。\n§c在部分服务器可能会被认定为作弊。",
|
"midnightcontrols.tooltip.reacharound.vertical": "启用垂直方向方块放置辅助,可在脚下方块的下方放置方块。\n§c在部分服务器可能会被认定为作弊。",
|
||||||
"midnightcontrols.tooltip.reload_controller_mappings": "重新加载手柄的按键映射文件。",
|
"midnightcontrols.tooltip.reload_controller_mappings": "重新加载手柄的按键映射文件。",
|
||||||
"midnightcontrols.tooltip.right_dead_zone": "右摇杆配置的死区。\n死区决定摇杆要偏离中心位置多远才能让摇杆的输入有效。",
|
"midnightcontrols.tooltip.right_dead_zone": "右摇杆配置的死区。\n死区决定摇杆要偏离中心位置多远才能让摇杆的输入有效。",
|
||||||
"midnightcontrols.tooltip.rotation_speed": "手柄操作模式下的镜头旋转速度。",
|
"midnightcontrols.tooltip.rotation_speed": "手柄操作模式下的镜头旋转速度。(X)",
|
||||||
|
"midnightcontrols.tooltip.y_axis_rotation_speed": "手柄操作模式下的镜头旋转速度。(Y)",
|
||||||
"midnightcontrols.tooltip.unfocused_input": "即使游戏窗口处于非活动状态,也允许手柄进行按键输入。",
|
"midnightcontrols.tooltip.unfocused_input": "即使游戏窗口处于非活动状态,也允许手柄进行按键输入。",
|
||||||
"midnightcontrols.tooltip.virtual_mouse": "启用虚拟鼠标,在分屏的情况下很有用。",
|
"midnightcontrols.tooltip.virtual_mouse": "启用虚拟鼠标,在分屏的情况下很有用。",
|
||||||
"midnightcontrols.virtual_mouse.skin.default_light": "默认样式(白色)",
|
"midnightcontrols.virtual_mouse.skin.default_light": "默认样式(白色)",
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 416 B |
|
Before Width: | Height: | Size: 334 B After Width: | Height: | Size: 327 B |
|
After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 3.1 KiB |
@@ -12,6 +12,9 @@
|
|||||||
"akemin-dayo",
|
"akemin-dayo",
|
||||||
"DioEgizio",
|
"DioEgizio",
|
||||||
"Ivanoks",
|
"Ivanoks",
|
||||||
|
"KiskaUWU",
|
||||||
|
"RaptaG",
|
||||||
|
"Madis0",
|
||||||
"FlashyReese",
|
"FlashyReese",
|
||||||
"Hambaka",
|
"Hambaka",
|
||||||
"joaoh1",
|
"joaoh1",
|
||||||
@@ -53,7 +56,7 @@
|
|||||||
"modmenu": ">=1.12.2"
|
"modmenu": ">=1.12.2"
|
||||||
},
|
},
|
||||||
"suggests": {
|
"suggests": {
|
||||||
"quilt_loader": "*"
|
"kontrolo": "*"
|
||||||
},
|
},
|
||||||
"breaks": {
|
"breaks": {
|
||||||
"lambdacontrols": "*",
|
"lambdacontrols": "*",
|
||||||
|
|||||||
@@ -17,7 +17,8 @@
|
|||||||
"MouseMixin",
|
"MouseMixin",
|
||||||
"RecipeBookWidgetAccessor",
|
"RecipeBookWidgetAccessor",
|
||||||
"WorldRendererMixin",
|
"WorldRendererMixin",
|
||||||
"KeyBindingRegistryImplAccessor"
|
"KeyBindingRegistryImplAccessor",
|
||||||
|
"ScreenAccessor"
|
||||||
],
|
],
|
||||||
"injectors": {
|
"injectors": {
|
||||||
"defaultRequire": 1
|
"defaultRequire": 1
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 9.7 KiB After Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 1.8 KiB |
4
src/main/resources/resourcepacks/legacy/CREDITS
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
Some of the textures in this Resourcepack are directly taken from the Console Edition assets and are therefore © Mojang Studios.
|
||||||
|
Credits go to Ivanoks for redrawing the Console Generic, Dualshock, DualSense, Switch, Xbox 360 and XBox One controller icons in 15x15,
|
||||||
|
Motschen for creating the assets for the other controllers
|
||||||
|
and LambdAurora for the original assets, part of which are also included.
|
||||||
|
After Width: | Height: | Size: 2.5 KiB |
|
After Width: | Height: | Size: 7.8 KiB |
6
src/main/resources/resourcepacks/legacy/pack.mcmeta
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"pack": {
|
||||||
|
"pack_format": 9,
|
||||||
|
"description": "Makes the controller buttons look like from Console Edition"
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
src/main/resources/resourcepacks/legacy/pack.png
Normal file
|
After Width: | Height: | Size: 14 KiB |