Compare commits
33 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3a70ab1961 | ||
|
|
1722c2ccaa | ||
|
|
46dafc3e71 | ||
|
|
99298b2bc4 | ||
|
|
070083ab6e | ||
|
|
4d74892e53 | ||
|
|
2e861470d8 | ||
|
|
e87ed53485 | ||
|
|
8847c7f499 | ||
|
|
da2773b1e9 | ||
|
|
3650e756c3 | ||
|
|
6b885beede | ||
|
|
abb3d1de3c | ||
|
|
a8cdfeeba9 | ||
|
|
ed4d310565 | ||
|
|
ac73c99506 | ||
|
|
d45eeac6dc | ||
|
|
77ff589544 | ||
|
|
ce5c0b22db | ||
|
|
98af13fd0b | ||
|
|
2387444d3a | ||
|
|
57860490c8 | ||
|
|
f46aa175a4 | ||
|
|
78390ca02f | ||
|
|
31821b4833 | ||
|
|
e34ba6025a | ||
|
|
e8cfee7de5 | ||
|
|
06c589e7f8 | ||
|
|
a71dcb9765 | ||
|
|
9891cd2977 | ||
|
|
8566e859e3 | ||
|
|
281b266b18 | ||
|
|
8d4f8822d3 |
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+
|
||||||
|
|||||||
@@ -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,6 +109,7 @@ 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"
|
||||||
modCompileOnly "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}")
|
||||||
@@ -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")
|
||||||
|
|||||||
@@ -3,26 +3,27 @@ org.gradle.jvmargs=-Xmx1G
|
|||||||
|
|
||||||
# Fabric Properties
|
# Fabric Properties
|
||||||
# check these on https://fabricmc.net/use
|
# check these on https://fabricmc.net/use
|
||||||
minecraft_version=1.19
|
minecraft_version=1.18.2
|
||||||
yarn_mappings=1.19+build.1
|
yarn_mappings=1.18.2+build.3
|
||||||
loader_version=0.14.7
|
loader_version=0.14.8
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
mod_version = 1.4.0
|
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
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
|
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric-api/fabric-api
|
||||||
fabric_version=0.55.2+1.19
|
fabric_version=0.57.0+1.18.2
|
||||||
sodium_version=mc1.19-0.4.2
|
sodium_version=mc1.18.2-0.4.1
|
||||||
spruceui_version=4.0.0+1.19
|
spruceui_version=3.3.2+1.17
|
||||||
midnightlib_version=0.5.2
|
midnightlib_version=0.4.4
|
||||||
modmenu_version=4.0.0
|
modmenu_version=2.0.2
|
||||||
emotecraft_version=2.1.3-SNAPSHOT-build.29-MC1.19-fabric
|
emotecraft_version=2.1-MC1.18.1-fabric
|
||||||
bendylib_version=2.0.+
|
bendylib_version=2.0.+
|
||||||
emi_version=0.2.0+1.19
|
libgui_version=5.4.2+1.18.2
|
||||||
|
emi_version=0.2.0+1.18.2
|
||||||
|
|
||||||
# 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;
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
package eu.midnightdust.midnightcontrols.client;
|
package eu.midnightdust.midnightcontrols.client;
|
||||||
|
|
||||||
import net.minecraft.text.Text;
|
import net.minecraft.text.Text;
|
||||||
|
import net.minecraft.text.TranslatableText;
|
||||||
import org.aperlambda.lambdacommon.utils.Nameable;
|
import org.aperlambda.lambdacommon.utils.Nameable;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
@@ -39,7 +40,7 @@ public enum ControllerType implements Nameable {
|
|||||||
|
|
||||||
ControllerType(int id) {
|
ControllerType(int id) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.text = Text.translatable("midnightcontrols.controller_type." + this.getName());
|
this.text = new TranslatableText("midnightcontrols.controller_type." + this.getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
ControllerType(int id, @NotNull Text text) {
|
ControllerType(int id, @NotNull Text text) {
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
package eu.midnightdust.midnightcontrols.client;
|
package eu.midnightdust.midnightcontrols.client;
|
||||||
|
|
||||||
import net.minecraft.text.Text;
|
import net.minecraft.text.Text;
|
||||||
|
import net.minecraft.text.TranslatableText;
|
||||||
import org.aperlambda.lambdacommon.utils.Nameable;
|
import org.aperlambda.lambdacommon.utils.Nameable;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
@@ -30,7 +31,7 @@ public enum HudSide implements Nameable {
|
|||||||
private final Text text;
|
private final Text text;
|
||||||
|
|
||||||
HudSide() {
|
HudSide() {
|
||||||
this.text = Text.translatable(this.getTranslationKey());
|
this.text = new TranslatableText(this.getTranslationKey());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -38,7 +38,9 @@ import net.minecraft.client.network.ClientPlayNetworkHandler;
|
|||||||
import net.minecraft.client.option.KeyBinding;
|
import net.minecraft.client.option.KeyBinding;
|
||||||
import net.minecraft.client.toast.SystemToast;
|
import net.minecraft.client.toast.SystemToast;
|
||||||
import net.minecraft.client.util.InputUtil;
|
import net.minecraft.client.util.InputUtil;
|
||||||
|
import net.minecraft.text.LiteralText;
|
||||||
import net.minecraft.text.Text;
|
import net.minecraft.text.Text;
|
||||||
|
import net.minecraft.text.TranslatableText;
|
||||||
import net.minecraft.util.Identifier;
|
import net.minecraft.util.Identifier;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.lwjgl.glfw.GLFW;
|
import org.lwjgl.glfw.GLFW;
|
||||||
@@ -119,8 +121,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);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -134,10 +138,10 @@ public class MidnightControlsClient extends MidnightControls implements ClientMo
|
|||||||
GLFW.glfwSetJoystickCallback((jid, event) -> {
|
GLFW.glfwSetJoystickCallback((jid, event) -> {
|
||||||
if (event == GLFW.GLFW_CONNECTED) {
|
if (event == GLFW.GLFW_CONNECTED) {
|
||||||
var controller = Controller.byId(jid);
|
var controller = Controller.byId(jid);
|
||||||
client.getToastManager().add(new SystemToast(SystemToast.Type.TUTORIAL_HINT, Text.translatable("midnightcontrols.controller.connected", jid),
|
client.getToastManager().add(new SystemToast(SystemToast.Type.TUTORIAL_HINT, new TranslatableText("midnightcontrols.controller.connected", jid),
|
||||||
Text.literal(controller.getName())));
|
new LiteralText(controller.getName())));
|
||||||
} else if (event == GLFW.GLFW_DISCONNECTED) {
|
} else if (event == GLFW.GLFW_DISCONNECTED) {
|
||||||
client.getToastManager().add(new SystemToast(SystemToast.Type.TUTORIAL_HINT, Text.translatable("midnightcontrols.controller.disconnected", jid),
|
client.getToastManager().add(new SystemToast(SystemToast.Type.TUTORIAL_HINT, new TranslatableText("midnightcontrols.controller.disconnected", jid),
|
||||||
null));
|
null));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -190,9 +194,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, new TranslatableText("midnightcontrols.controller.tutorial.title"),
|
||||||
|
new TranslatableText("midnightcontrols.controller.tutorial.description", new TranslatableText("options.title"), new TranslatableText("controls.title"),
|
||||||
|
new TranslatableText("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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -61,12 +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 = 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", "hardcorequesting.client.interfaces.GuiQuestBook", "hardcorequesting.client.interfaces.GuiReward", "hardcorequesting.client.interfaces.EditTrackerScreen");
|
@Entry(name = "Mouse screens") public static List<String> 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",
|
||||||
|
"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<>();
|
@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[]{1, 1, 1, 1};
|
@Entry(name = "Max analog values") public static double[] maxAnalogValues = new double[]{1, 1, 1, 1};
|
||||||
@Entry public static boolean triggerFix = true;
|
@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
|
||||||
|
|||||||
@@ -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 eu.midnightdust.midnightcontrols.MidnightControls;
|
import eu.midnightdust.midnightcontrols.MidnightControls;
|
||||||
import eu.midnightdust.midnightcontrols.client.compat.EMICompat;
|
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;
|
||||||
@@ -45,10 +44,7 @@ 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.util.math.MathHelper;
|
import net.minecraft.util.math.MathHelper;
|
||||||
import org.aperlambda.lambdacommon.utils.Pair;
|
import org.aperlambda.lambdacommon.utils.Pair;
|
||||||
@@ -82,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;
|
||||||
|
|
||||||
@@ -122,6 +119,8 @@ 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();
|
||||||
|
|
||||||
@@ -176,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;
|
||||||
|
|
||||||
@@ -185,8 +184,8 @@ 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() && client.player.getVehicle() != null) {
|
if (client.player.isRiding() && client.player.getVehicle() != null) {
|
||||||
@@ -302,6 +301,7 @@ public class MidnightInput {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (FabricLoader.getInstance().isModLoaded("libgui")) LibGuiCompat.handlePress(client.currentScreen);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -330,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;
|
||||||
}
|
}
|
||||||
@@ -348,9 +348,9 @@ public class MidnightInput {
|
|||||||
var set = ImmutableSet.of("gui.back", "gui.done", "gui.cancel", "gui.toTitle", "gui.toMenu");
|
var set = ImmutableSet.of("gui.back", "gui.done", "gui.cancel", "gui.toTitle", "gui.toMenu");
|
||||||
return screen.children().stream().filter(element -> element instanceof PressableWidget)
|
return screen.children().stream().filter(element -> element instanceof PressableWidget)
|
||||||
.map(element -> (PressableWidget) element)
|
.map(element -> (PressableWidget) element)
|
||||||
.filter(element -> element.getMessage() != null && element.getMessage().getContent() != null)
|
.filter(element -> element.getMessage() != null)
|
||||||
.anyMatch(element -> {
|
.anyMatch(element -> {
|
||||||
if (set.stream().anyMatch(key -> element.getMessage().getContent().toString().equals(key))) {
|
if (set.stream().anyMatch(key -> element.getMessage().toString().equals(key))) {
|
||||||
element.onPress();
|
element.onPress();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -472,6 +472,14 @@ 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;
|
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())
|
||||||
@@ -479,14 +487,6 @@ public class MidnightInput {
|
|||||||
element.mouseScrolled(0.0, 0.0, -finalValue);
|
element.mouseScrolled(0.0, 0.0, -finalValue);
|
||||||
return true;
|
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(finalValue));
|
|
||||||
element.mouseScrolled(0.0, 0.0, -finalValue);
|
|
||||||
return true;
|
|
||||||
});
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -571,7 +571,7 @@ public class MidnightInput {
|
|||||||
labelWidget.onPress();
|
labelWidget.onPress();
|
||||||
return true;
|
return true;
|
||||||
} else if (focused instanceof WorldListWidget list) {
|
} else if (focused instanceof WorldListWidget list) {
|
||||||
list.getSelectedAsOptional().ifPresent(WorldListWidget.WorldEntry::play);
|
list.getSelectedAsOptional().ifPresent(WorldListWidget.Entry::play);
|
||||||
return true;
|
return true;
|
||||||
} else if (focused instanceof MultiplayerServerListWidget list) {
|
} else if (focused instanceof MultiplayerServerListWidget list) {
|
||||||
var entry = list.getSelectedOrNull();
|
var entry = list.getSelectedOrNull();
|
||||||
@@ -621,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();
|
||||||
@@ -672,6 +672,69 @@ public class MidnightInput {
|
|||||||
}
|
}
|
||||||
if (FabricLoader.getInstance().isModLoaded("sodium"))
|
if (FabricLoader.getInstance().isModLoaded("sodium"))
|
||||||
SodiumCompat.handleInput(screen, direction.isLookingForward());
|
SodiumCompat.handleInput(screen, direction.isLookingForward());
|
||||||
|
// This still needs some work
|
||||||
|
// ScreenAccessor accessor = (ScreenAccessor) screen;
|
||||||
|
// 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())) {
|
||||||
if (screen.changeFocus(direction.isLookingForward())) {
|
if (screen.changeFocus(direction.isLookingForward())) {
|
||||||
this.actionGuiCooldown = 5;
|
this.actionGuiCooldown = 5;
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
package eu.midnightdust.midnightcontrols.client;
|
package eu.midnightdust.midnightcontrols.client;
|
||||||
|
|
||||||
import net.minecraft.text.Text;
|
import net.minecraft.text.Text;
|
||||||
|
import net.minecraft.text.TranslatableText;
|
||||||
import org.aperlambda.lambdacommon.utils.Nameable;
|
import org.aperlambda.lambdacommon.utils.Nameable;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
@@ -33,7 +34,7 @@ public enum VirtualMouseSkin implements Nameable {
|
|||||||
|
|
||||||
VirtualMouseSkin(String name) {
|
VirtualMouseSkin(String name) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.text = Text.translatable(this.getTranslationKey());
|
this.text = new TranslatableText(this.getTranslationKey());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -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;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -15,6 +15,7 @@ import net.minecraft.client.option.GameOptions;
|
|||||||
import net.minecraft.client.option.KeyBinding;
|
import net.minecraft.client.option.KeyBinding;
|
||||||
import net.minecraft.client.resource.language.I18n;
|
import net.minecraft.client.resource.language.I18n;
|
||||||
import net.minecraft.text.Text;
|
import net.minecraft.text.Text;
|
||||||
|
import net.minecraft.text.TranslatableText;
|
||||||
import net.minecraft.util.Identifier;
|
import net.minecraft.util.Identifier;
|
||||||
import org.aperlambda.lambdacommon.utils.function.PairPredicate;
|
import org.aperlambda.lambdacommon.utils.function.PairPredicate;
|
||||||
import org.aperlambda.lambdacommon.utils.function.Predicates;
|
import org.aperlambda.lambdacommon.utils.function.Predicates;
|
||||||
@@ -109,7 +110,7 @@ public class ButtonBinding {
|
|||||||
public ButtonBinding(String key, int[] defaultButton, List<PressAction> actions, PairPredicate<MinecraftClient, ButtonBinding> filter, boolean hasCooldown) {
|
public ButtonBinding(String key, int[] defaultButton, List<PressAction> actions, PairPredicate<MinecraftClient, ButtonBinding> filter, boolean hasCooldown) {
|
||||||
this.setButton(this.defaultButton = defaultButton);
|
this.setButton(this.defaultButton = defaultButton);
|
||||||
this.key = key;
|
this.key = key;
|
||||||
this.text = Text.translatable(this.key);
|
this.text = new TranslatableText(this.key);
|
||||||
this.filter = filter;
|
this.filter = filter;
|
||||||
this.actions.addAll(actions);
|
this.actions.addAll(actions);
|
||||||
this.hasCooldown = hasCooldown;
|
this.hasCooldown = hasCooldown;
|
||||||
@@ -336,37 +337,37 @@ public class ButtonBinding {
|
|||||||
*/
|
*/
|
||||||
public static @NotNull Text getLocalizedButtonName(int button) {
|
public static @NotNull Text getLocalizedButtonName(int button) {
|
||||||
return switch (button % 500) {
|
return switch (button % 500) {
|
||||||
case -1 -> Text.translatable("key.keyboard.unknown");
|
case -1 -> new TranslatableText("key.keyboard.unknown");
|
||||||
case GLFW_GAMEPAD_BUTTON_A -> Text.translatable("midnightcontrols.button.a");
|
case GLFW_GAMEPAD_BUTTON_A -> new TranslatableText("midnightcontrols.button.a");
|
||||||
case GLFW_GAMEPAD_BUTTON_B -> Text.translatable("midnightcontrols.button.b");
|
case GLFW_GAMEPAD_BUTTON_B -> new TranslatableText("midnightcontrols.button.b");
|
||||||
case GLFW_GAMEPAD_BUTTON_X -> Text.translatable("midnightcontrols.button.x");
|
case GLFW_GAMEPAD_BUTTON_X -> new TranslatableText("midnightcontrols.button.x");
|
||||||
case GLFW_GAMEPAD_BUTTON_Y -> Text.translatable("midnightcontrols.button.y");
|
case GLFW_GAMEPAD_BUTTON_Y -> new TranslatableText("midnightcontrols.button.y");
|
||||||
case GLFW_GAMEPAD_BUTTON_LEFT_BUMPER -> Text.translatable("midnightcontrols.button.left_bumper");
|
case GLFW_GAMEPAD_BUTTON_LEFT_BUMPER -> new TranslatableText("midnightcontrols.button.left_bumper");
|
||||||
case GLFW_GAMEPAD_BUTTON_RIGHT_BUMPER -> Text.translatable("midnightcontrols.button.right_bumper");
|
case GLFW_GAMEPAD_BUTTON_RIGHT_BUMPER -> new TranslatableText("midnightcontrols.button.right_bumper");
|
||||||
case GLFW_GAMEPAD_BUTTON_BACK -> Text.translatable("midnightcontrols.button.back");
|
case GLFW_GAMEPAD_BUTTON_BACK -> new TranslatableText("midnightcontrols.button.back");
|
||||||
case GLFW_GAMEPAD_BUTTON_START -> Text.translatable("midnightcontrols.button.start");
|
case GLFW_GAMEPAD_BUTTON_START -> new TranslatableText("midnightcontrols.button.start");
|
||||||
case GLFW_GAMEPAD_BUTTON_GUIDE -> Text.translatable("midnightcontrols.button.guide");
|
case GLFW_GAMEPAD_BUTTON_GUIDE -> new TranslatableText("midnightcontrols.button.guide");
|
||||||
case GLFW_GAMEPAD_BUTTON_LEFT_THUMB -> Text.translatable("midnightcontrols.button.left_thumb");
|
case GLFW_GAMEPAD_BUTTON_LEFT_THUMB -> new TranslatableText("midnightcontrols.button.left_thumb");
|
||||||
case GLFW_GAMEPAD_BUTTON_RIGHT_THUMB -> Text.translatable("midnightcontrols.button.right_thumb");
|
case GLFW_GAMEPAD_BUTTON_RIGHT_THUMB -> new TranslatableText("midnightcontrols.button.right_thumb");
|
||||||
case GLFW_GAMEPAD_BUTTON_DPAD_UP -> Text.translatable("midnightcontrols.button.dpad_up");
|
case GLFW_GAMEPAD_BUTTON_DPAD_UP -> new TranslatableText("midnightcontrols.button.dpad_up");
|
||||||
case GLFW_GAMEPAD_BUTTON_DPAD_RIGHT -> Text.translatable("midnightcontrols.button.dpad_right");
|
case GLFW_GAMEPAD_BUTTON_DPAD_RIGHT -> new TranslatableText("midnightcontrols.button.dpad_right");
|
||||||
case GLFW_GAMEPAD_BUTTON_DPAD_DOWN -> Text.translatable("midnightcontrols.button.dpad_down");
|
case GLFW_GAMEPAD_BUTTON_DPAD_DOWN -> new TranslatableText("midnightcontrols.button.dpad_down");
|
||||||
case GLFW_GAMEPAD_BUTTON_DPAD_LEFT -> Text.translatable("midnightcontrols.button.dpad_left");
|
case GLFW_GAMEPAD_BUTTON_DPAD_LEFT -> new TranslatableText("midnightcontrols.button.dpad_left");
|
||||||
case 100 -> Text.translatable("midnightcontrols.axis.left_x+");
|
case 100 -> new TranslatableText("midnightcontrols.axis.left_x+");
|
||||||
case 101 -> Text.translatable("midnightcontrols.axis.left_y+");
|
case 101 -> new TranslatableText("midnightcontrols.axis.left_y+");
|
||||||
case 102 -> Text.translatable("midnightcontrols.axis.right_x+");
|
case 102 -> new TranslatableText("midnightcontrols.axis.right_x+");
|
||||||
case 103 -> Text.translatable("midnightcontrols.axis.right_y+");
|
case 103 -> new TranslatableText("midnightcontrols.axis.right_y+");
|
||||||
case 104 -> Text.translatable("midnightcontrols.axis.left_trigger");
|
case 104 -> new TranslatableText("midnightcontrols.axis.left_trigger");
|
||||||
case 105 -> Text.translatable("midnightcontrols.axis.right_trigger");
|
case 105 -> new TranslatableText("midnightcontrols.axis.right_trigger");
|
||||||
case 200 -> Text.translatable("midnightcontrols.axis.left_x-");
|
case 200 -> new TranslatableText("midnightcontrols.axis.left_x-");
|
||||||
case 201 -> Text.translatable("midnightcontrols.axis.left_y-");
|
case 201 -> new TranslatableText("midnightcontrols.axis.left_y-");
|
||||||
case 202 -> Text.translatable("midnightcontrols.axis.right_x-");
|
case 202 -> new TranslatableText("midnightcontrols.axis.right_x-");
|
||||||
case 203 -> Text.translatable("midnightcontrols.axis.right_y-");
|
case 203 -> new TranslatableText("midnightcontrols.axis.right_y-");
|
||||||
case 15 -> Text.translatable("midnightcontrols.button.l4");
|
case 15 -> new TranslatableText("midnightcontrols.button.l4");
|
||||||
case 16 -> Text.translatable("midnightcontrols.button.l5");
|
case 16 -> new TranslatableText("midnightcontrols.button.l5");
|
||||||
case 17 -> Text.translatable("midnightcontrols.button.r4");
|
case 17 -> new TranslatableText("midnightcontrols.button.r4");
|
||||||
case 18 -> Text.translatable("midnightcontrols.button.r5");
|
case 18 -> new TranslatableText("midnightcontrols.button.r5");
|
||||||
default -> Text.translatable("midnightcontrols.button.unknown", button);
|
default -> new TranslatableText("midnightcontrols.button.unknown", button);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,9 @@ import eu.midnightdust.midnightcontrols.client.MidnightControlsConfig;
|
|||||||
import net.minecraft.client.MinecraftClient;
|
import net.minecraft.client.MinecraftClient;
|
||||||
import net.minecraft.client.resource.language.I18n;
|
import net.minecraft.client.resource.language.I18n;
|
||||||
import net.minecraft.client.toast.SystemToast;
|
import net.minecraft.client.toast.SystemToast;
|
||||||
|
import net.minecraft.text.LiteralText;
|
||||||
import net.minecraft.text.Text;
|
import net.minecraft.text.Text;
|
||||||
|
import net.minecraft.text.TranslatableText;
|
||||||
import org.aperlambda.lambdacommon.utils.Nameable;
|
import org.aperlambda.lambdacommon.utils.Nameable;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.lwjgl.glfw.GLFW;
|
import org.lwjgl.glfw.GLFW;
|
||||||
@@ -177,7 +179,7 @@ public record Controller(int id) implements Nameable {
|
|||||||
var client = MinecraftClient.getInstance();
|
var client = MinecraftClient.getInstance();
|
||||||
if (client != null) {
|
if (client != null) {
|
||||||
client.getToastManager().add(SystemToast.create(client, SystemToast.Type.TUTORIAL_HINT,
|
client.getToastManager().add(SystemToast.create(client, SystemToast.Type.TUTORIAL_HINT,
|
||||||
Text.translatable("midnightcontrols.controller.mappings.error"), Text.literal(string)));
|
new TranslatableText("midnightcontrols.controller.mappings.error"), new LiteralText(string)));
|
||||||
MidnightControls.get().log(I18n.translate("midnightcontrols.controller.mappings.error")+string);
|
MidnightControls.get().log(I18n.translate("midnightcontrols.controller.mappings.error")+string);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ public class InputHandlers {
|
|||||||
if (next) {
|
if (next) {
|
||||||
return client.currentScreen.children().stream().filter(element -> element instanceof PressableWidget)
|
return client.currentScreen.children().stream().filter(element -> element instanceof PressableWidget)
|
||||||
.map(element -> (PressableWidget) element)
|
.map(element -> (PressableWidget) element)
|
||||||
.filter(element -> element.getMessage() != null && element.getMessage().getContent() != null)
|
.filter(element -> element.getMessage() != null)
|
||||||
.anyMatch(element -> {
|
.anyMatch(element -> {
|
||||||
if (element.getMessage().getString().equals(">")) {
|
if (element.getMessage().getString().equals(">")) {
|
||||||
element.onPress();
|
element.onPress();
|
||||||
@@ -136,7 +136,7 @@ public class InputHandlers {
|
|||||||
} else {
|
} else {
|
||||||
return client.currentScreen.children().stream().filter(element -> element instanceof PressableWidget)
|
return client.currentScreen.children().stream().filter(element -> element instanceof PressableWidget)
|
||||||
.map(element -> (PressableWidget) element)
|
.map(element -> (PressableWidget) element)
|
||||||
.filter(element -> element.getMessage() != null && element.getMessage().getContent() != null)
|
.filter(element -> element.getMessage() != null)
|
||||||
.anyMatch(element -> {
|
.anyMatch(element -> {
|
||||||
if (element.getMessage().getString().equals("<")) {
|
if (element.getMessage().getString().equals("<")) {
|
||||||
element.onPress();
|
element.onPress();
|
||||||
@@ -232,12 +232,12 @@ public class InputHandlers {
|
|||||||
|
|
||||||
public static boolean handleToggleSneak(@NotNull MinecraftClient client, @NotNull ButtonBinding button, float value, @NotNull ButtonState action) {
|
public static boolean handleToggleSneak(@NotNull MinecraftClient client, @NotNull ButtonBinding button, float value, @NotNull ButtonState action) {
|
||||||
button.asKeyBinding().ifPresent(binding -> {
|
button.asKeyBinding().ifPresent(binding -> {
|
||||||
boolean sneakToggled = client.options.getSneakToggled().getValue();
|
boolean sneakToggled = client.options.sneakToggled;
|
||||||
if (client.player.getAbilities().flying && sneakToggled)
|
if (client.player.getAbilities().flying && sneakToggled)
|
||||||
client.options.getSneakToggled().setValue(false);
|
client.options.sneakToggled = false;
|
||||||
binding.setPressed(button.pressed);
|
binding.setPressed(button.pressed);
|
||||||
if (client.player.getAbilities().flying && sneakToggled)
|
if (client.player.getAbilities().flying && sneakToggled)
|
||||||
client.options.getSneakToggled().setValue(true);
|
client.options.sneakToggled = true;
|
||||||
});
|
});
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -328,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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -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, 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, 0.0F, 1.0F);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.shouldOverrideMovement;
|
return this.shouldOverrideMovement;
|
||||||
|
|||||||
@@ -16,7 +16,9 @@ import dev.lambdaurora.spruceui.option.SpruceOption;
|
|||||||
import dev.lambdaurora.spruceui.widget.container.SpruceContainerWidget;
|
import dev.lambdaurora.spruceui.widget.container.SpruceContainerWidget;
|
||||||
import dev.lambdaurora.spruceui.widget.text.SpruceTextAreaWidget;
|
import dev.lambdaurora.spruceui.widget.text.SpruceTextAreaWidget;
|
||||||
import net.minecraft.client.toast.SystemToast;
|
import net.minecraft.client.toast.SystemToast;
|
||||||
|
import net.minecraft.text.LiteralText;
|
||||||
import net.minecraft.text.Text;
|
import net.minecraft.text.Text;
|
||||||
|
import net.minecraft.text.TranslatableText;
|
||||||
|
|
||||||
import java.io.FileWriter;
|
import java.io.FileWriter;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@@ -64,7 +66,7 @@ public class MappingsStringInputWidget extends SpruceContainerWidget {
|
|||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
if (this.client != null)
|
if (this.client != null)
|
||||||
this.client.getToastManager().add(SystemToast.create(this.client, SystemToast.Type.TUTORIAL_HINT,
|
this.client.getToastManager().add(SystemToast.create(this.client, SystemToast.Type.TUTORIAL_HINT,
|
||||||
Text.translatable("midnightcontrols.controller.mappings.error.write"), Text.empty()));
|
new TranslatableText("midnightcontrols.controller.mappings.error.write"), Text.of("")));
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -89,7 +91,7 @@ public class MappingsStringInputWidget extends SpruceContainerWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int textFieldWidth = (int) (this.width * (5.0 / 6.0));
|
int textFieldWidth = (int) (this.width * (5.0 / 6.0));
|
||||||
this.textArea = new SpruceTextAreaWidget(Position.of(this, this.width / 2 - textFieldWidth / 2, 0), textFieldWidth, this.height - 50, Text.literal(mappings));
|
this.textArea = new SpruceTextAreaWidget(Position.of(this, this.width / 2 - textFieldWidth / 2, 0), textFieldWidth, this.height - 50, new LiteralText(mappings));
|
||||||
this.textArea.setText(mappings);
|
this.textArea.setText(mappings);
|
||||||
// Display as many lines as possible
|
// Display as many lines as possible
|
||||||
this.textArea.setDisplayedLines(this.textArea.getInnerHeight() / this.client.textRenderer.fontHeight);
|
this.textArea.setDisplayedLines(this.textArea.getInnerHeight() / this.client.textRenderer.fontHeight);
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ public class MidnightControlsHud extends Hud {
|
|||||||
this.dropItemButtonWidth = MidnightControlsRenderer.getBindingIconWidth(ButtonBinding.DROP_ITEM);
|
this.dropItemButtonWidth = MidnightControlsRenderer.getBindingIconWidth(ButtonBinding.DROP_ITEM);
|
||||||
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.guiScale >= 4) {
|
||||||
scale = 0.75f;
|
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()) {
|
||||||
@@ -114,7 +115,7 @@ public class MidnightControlsHud extends Hud {
|
|||||||
this.drawButton(matrices, currentX, y, ButtonBinding.INVENTORY, true);
|
this.drawButton(matrices, currentX, y, ButtonBinding.INVENTORY, true);
|
||||||
this.drawButton(matrices, currentX += (MidnightControlsConfig.hudSide == HudSide.LEFT ? offset : -offset), y, ButtonBinding.SWAP_HANDS, true);
|
this.drawButton(matrices, currentX += (MidnightControlsConfig.hudSide == HudSide.LEFT ? offset : -offset), y, ButtonBinding.SWAP_HANDS, true);
|
||||||
offset = 2 + this.swapHandsWidth + this.dropItemButtonWidth + 4;
|
offset = 2 + this.swapHandsWidth + this.dropItemButtonWidth + 4;
|
||||||
if (this.client.options.getShowSubtitles().getValue() && MidnightControlsConfig.hudSide == HudSide.RIGHT) {
|
if (this.client.options.showSubtitles && MidnightControlsConfig.hudSide == HudSide.RIGHT) {
|
||||||
currentX += -offset;
|
currentX += -offset;
|
||||||
} else {
|
} else {
|
||||||
currentX = MidnightControlsConfig.hudSide == HudSide.LEFT ? x : x - this.dropItemButtonWidth;
|
currentX = MidnightControlsConfig.hudSide == HudSide.LEFT ? x : x - this.dropItemButtonWidth;
|
||||||
@@ -131,7 +132,7 @@ public class MidnightControlsHud extends Hud {
|
|||||||
currentX -= this.useButtonWidth;
|
currentX -= this.useButtonWidth;
|
||||||
this.drawButton(matrices, currentX, y, ButtonBinding.USE, true);
|
this.drawButton(matrices, currentX, y, ButtonBinding.USE, true);
|
||||||
offset = 2 + this.useWidth + 4;
|
offset = 2 + this.useWidth + 4;
|
||||||
if (this.client.options.getShowSubtitles().getValue() && MidnightControlsConfig.hudSide == HudSide.LEFT) {
|
if (this.client.options.showSubtitles && MidnightControlsConfig.hudSide == HudSide.LEFT) {
|
||||||
currentX -= offset;
|
currentX -= offset;
|
||||||
} else {
|
} else {
|
||||||
currentX = x;
|
currentX = x;
|
||||||
@@ -151,7 +152,7 @@ public class MidnightControlsHud extends Hud {
|
|||||||
currentX += MidnightControlsConfig.hudSide == HudSide.LEFT ? this.inventoryWidth + 4 + this.swapHandsButtonWidth + 2
|
currentX += MidnightControlsConfig.hudSide == HudSide.LEFT ? this.inventoryWidth + 4 + this.swapHandsButtonWidth + 2
|
||||||
: -this.swapHandsWidth - 2 - this.swapHandsButtonWidth - 4;
|
: -this.swapHandsWidth - 2 - this.swapHandsButtonWidth - 4;
|
||||||
this.drawTip(matrices, currentX, y, ButtonBinding.SWAP_HANDS, true);
|
this.drawTip(matrices, currentX, y, ButtonBinding.SWAP_HANDS, true);
|
||||||
if (this.client.options.getShowSubtitles().getValue() && MidnightControlsConfig.hudSide == HudSide.RIGHT) {
|
if (this.client.options.showSubtitles && MidnightControlsConfig.hudSide == HudSide.RIGHT) {
|
||||||
currentX += -this.dropItemWidth - 2 - this.dropItemButtonWidth - 4;
|
currentX += -this.dropItemWidth - 2 - this.dropItemButtonWidth - 4;
|
||||||
} else {
|
} else {
|
||||||
y -= 24;
|
y -= 24;
|
||||||
@@ -168,7 +169,7 @@ public class MidnightControlsHud extends Hud {
|
|||||||
|
|
||||||
this.drawTip(matrices, currentX, y, this.placeAction, true);
|
this.drawTip(matrices, currentX, y, this.placeAction, true);
|
||||||
|
|
||||||
if (this.client.options.getShowSubtitles().getValue() && MidnightControlsConfig.hudSide == HudSide.LEFT) {
|
if (this.client.options.showSubtitles && MidnightControlsConfig.hudSide == HudSide.LEFT) {
|
||||||
currentX -= 4;
|
currentX -= 4;
|
||||||
} else {
|
} else {
|
||||||
currentX = x;
|
currentX = x;
|
||||||
|
|||||||
@@ -34,8 +34,10 @@ import net.minecraft.client.gui.widget.ButtonWidget;
|
|||||||
import net.minecraft.client.render.*;
|
import net.minecraft.client.render.*;
|
||||||
import net.minecraft.client.resource.language.I18n;
|
import net.minecraft.client.resource.language.I18n;
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
|
import net.minecraft.text.LiteralText;
|
||||||
import net.minecraft.text.MutableText;
|
import net.minecraft.text.MutableText;
|
||||||
import net.minecraft.text.Text;
|
import net.minecraft.text.Text;
|
||||||
|
import net.minecraft.text.TranslatableText;
|
||||||
import net.minecraft.util.Formatting;
|
import net.minecraft.util.Formatting;
|
||||||
import net.minecraft.util.Util;
|
import net.minecraft.util.Util;
|
||||||
import net.minecraft.util.math.Matrix4f;
|
import net.minecraft.util.math.Matrix4f;
|
||||||
@@ -47,7 +49,7 @@ import java.awt.*;
|
|||||||
* Represents the midnightcontrols settings screen.
|
* Represents the midnightcontrols settings screen.
|
||||||
*/
|
*/
|
||||||
public class MidnightControlsSettingsScreen extends SpruceScreen {
|
public class MidnightControlsSettingsScreen extends SpruceScreen {
|
||||||
private static final Text SDL2_GAMEPAD_TOOL = Text.literal("SDL2 Gamepad Tool").formatted(Formatting.GREEN);
|
private static final Text SDL2_GAMEPAD_TOOL = new LiteralText("SDL2 Gamepad Tool").formatted(Formatting.GREEN);
|
||||||
public static final String GAMEPAD_TOOL_URL = "https://generalarcade.com/gamepadtool/";
|
public static final String GAMEPAD_TOOL_URL = "https://generalarcade.com/gamepadtool/";
|
||||||
final MidnightControlsClient mod = MidnightControlsClient.get();
|
final MidnightControlsClient mod = MidnightControlsClient.get();
|
||||||
private final Screen parent;
|
private final Screen parent;
|
||||||
@@ -88,11 +90,11 @@ public class MidnightControlsSettingsScreen extends SpruceScreen {
|
|||||||
var controller = MidnightControlsConfig.getController();
|
var controller = MidnightControlsConfig.getController();
|
||||||
var controllerName = controller.getName();
|
var controllerName = controller.getName();
|
||||||
if (!controller.isConnected())
|
if (!controller.isConnected())
|
||||||
return option.getDisplayText(Text.literal(controllerName).formatted(Formatting.RED));
|
return option.getDisplayText(new LiteralText(controllerName).formatted(Formatting.RED));
|
||||||
else if (!controller.isGamepad())
|
else if (!controller.isGamepad())
|
||||||
return option.getDisplayText(Text.literal(controllerName).formatted(Formatting.GOLD));
|
return option.getDisplayText(new LiteralText(controllerName).formatted(Formatting.GOLD));
|
||||||
else
|
else
|
||||||
return option.getDisplayText(Text.literal(controllerName));
|
return option.getDisplayText(new LiteralText(controllerName));
|
||||||
}, null);
|
}, null);
|
||||||
private final SpruceOption secondControllerOption = new SpruceCyclingOption("midnightcontrols.menu.controller2",
|
private final SpruceOption secondControllerOption = new SpruceCyclingOption("midnightcontrols.menu.controller2",
|
||||||
amount -> {
|
amount -> {
|
||||||
@@ -106,13 +108,13 @@ public class MidnightControlsSettingsScreen extends SpruceScreen {
|
|||||||
option -> MidnightControlsConfig.getSecondController().map(controller -> {
|
option -> MidnightControlsConfig.getSecondController().map(controller -> {
|
||||||
var controllerName = controller.getName();
|
var controllerName = controller.getName();
|
||||||
if (!controller.isConnected())
|
if (!controller.isConnected())
|
||||||
return option.getDisplayText(Text.literal(controllerName).formatted(Formatting.RED));
|
return option.getDisplayText(new LiteralText(controllerName).formatted(Formatting.RED));
|
||||||
else if (!controller.isGamepad())
|
else if (!controller.isGamepad())
|
||||||
return option.getDisplayText(Text.literal(controllerName).formatted(Formatting.GOLD));
|
return option.getDisplayText(new LiteralText(controllerName).formatted(Formatting.GOLD));
|
||||||
else
|
else
|
||||||
return option.getDisplayText(Text.literal(controllerName));
|
return option.getDisplayText(new LiteralText(controllerName));
|
||||||
}).orElse(option.getDisplayText(SpruceTexts.OPTIONS_OFF.copyContentOnly().formatted(Formatting.RED))),
|
}).orElse(option.getDisplayText(SpruceTexts.OPTIONS_OFF.copy().formatted(Formatting.RED))),
|
||||||
Text.translatable("midnightcontrols.tooltip.controller2"));
|
new TranslatableText("midnightcontrols.tooltip.controller2"));
|
||||||
private final SpruceOption unfocusedInputOption;
|
private final SpruceOption unfocusedInputOption;
|
||||||
private final SpruceOption invertsRightXAxis;
|
private final SpruceOption invertsRightXAxis;
|
||||||
private final SpruceOption invertsRightYAxis;
|
private final SpruceOption invertsRightYAxis;
|
||||||
@@ -129,13 +131,13 @@ public class MidnightControlsSettingsScreen extends SpruceScreen {
|
|||||||
return new SpruceDoubleOption(key, .25f, 1.f, 0.05f,
|
return new SpruceDoubleOption(key, .25f, 1.f, 0.05f,
|
||||||
() -> MidnightControlsConfig.getAxisMaxValue(axis),
|
() -> MidnightControlsConfig.getAxisMaxValue(axis),
|
||||||
newValue -> MidnightControlsConfig.setAxisMaxValue(axis, newValue),
|
newValue -> MidnightControlsConfig.setAxisMaxValue(axis, newValue),
|
||||||
option -> option.getDisplayText(Text.literal(String.format("%.2f", option.get()))),
|
option -> option.getDisplayText(new LiteralText(String.format("%.2f", option.get()))),
|
||||||
Text.translatable(key.replace("menu", "tooltip"))
|
new TranslatableText(key.replace("menu", "tooltip"))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
private final MutableText controllerMappingsUrlText = Text.literal("(")
|
private final MutableText controllerMappingsUrlText = new LiteralText("(")
|
||||||
.append(Text.literal(GAMEPAD_TOOL_URL).formatted(Formatting.GOLD))
|
.append(new LiteralText(GAMEPAD_TOOL_URL).formatted(Formatting.GOLD))
|
||||||
.append("),");
|
.append("),");
|
||||||
|
|
||||||
private static int searchNextAvailableController(int newId, boolean allowNone) {
|
private static int searchNextAvailableController(int newId, boolean allowNone) {
|
||||||
@@ -153,7 +155,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(new TranslatableText("midnightcontrols.title.settings"));
|
||||||
MidnightControlsConfig.isEditing = true;
|
MidnightControlsConfig.isEditing = true;
|
||||||
this.parent = parent;
|
this.parent = parent;
|
||||||
// General options
|
// General options
|
||||||
@@ -166,22 +168,22 @@ public class MidnightControlsSettingsScreen extends SpruceScreen {
|
|||||||
if (this.client.player != null) {
|
if (this.client.player != null) {
|
||||||
ClientPlayNetworking.getSender().sendPacket(MidnightControls.CONTROLS_MODE_CHANNEL, this.mod.makeControlsModeBuffer(next));
|
ClientPlayNetworking.getSender().sendPacket(MidnightControls.CONTROLS_MODE_CHANNEL, this.mod.makeControlsModeBuffer(next));
|
||||||
}
|
}
|
||||||
}, option -> option.getDisplayText(Text.translatable(MidnightControlsConfig.controlsMode.getTranslationKey())),
|
}, option -> option.getDisplayText(new TranslatableText(MidnightControlsConfig.controlsMode.getTranslationKey())),
|
||||||
Text.translatable("midnightcontrols.tooltip.controls_mode"));
|
new TranslatableText("midnightcontrols.tooltip.controls_mode"));
|
||||||
this.autoSwitchModeOption = new SpruceToggleBooleanOption("midnightcontrols.menu.auto_switch_mode", () -> MidnightControlsConfig.autoSwitchMode,
|
this.autoSwitchModeOption = new SpruceToggleBooleanOption("midnightcontrols.menu.auto_switch_mode", () -> MidnightControlsConfig.autoSwitchMode,
|
||||||
value -> MidnightControlsConfig.autoSwitchMode = value, Text.translatable("midnightcontrols.tooltip.auto_switch_mode"));
|
value -> MidnightControlsConfig.autoSwitchMode = value, new TranslatableText("midnightcontrols.tooltip.auto_switch_mode"));
|
||||||
this.rotationSpeedOption = new SpruceDoubleOption("midnightcontrols.menu.rotation_speed", 0.0, 100.0, .5f,
|
this.rotationSpeedOption = new SpruceDoubleOption("midnightcontrols.menu.rotation_speed", 0.0, 100.0, .5f,
|
||||||
() -> MidnightControlsConfig.rotationSpeed,
|
() -> MidnightControlsConfig.rotationSpeed,
|
||||||
value -> MidnightControlsConfig.rotationSpeed = value, option -> option.getDisplayText(Text.literal(String.valueOf(option.get()))),
|
value -> MidnightControlsConfig.rotationSpeed = value, option -> option.getDisplayText(new LiteralText(String.valueOf(option.get()))),
|
||||||
Text.translatable("midnightcontrols.tooltip.rotation_speed"));
|
new TranslatableText("midnightcontrols.tooltip.rotation_speed"));
|
||||||
this.yAxisRotationSpeedOption = new SpruceDoubleOption("midnightcontrols.menu.y_axis_rotation_speed", 0.0, 100.0, .5f,
|
this.yAxisRotationSpeedOption = new SpruceDoubleOption("midnightcontrols.menu.y_axis_rotation_speed", 0.0, 100.0, .5f,
|
||||||
() -> MidnightControlsConfig.yAxisRotationSpeed,
|
() -> MidnightControlsConfig.yAxisRotationSpeed,
|
||||||
value -> MidnightControlsConfig.yAxisRotationSpeed = value, option -> option.getDisplayText(Text.literal(String.valueOf(option.get()))),
|
value -> MidnightControlsConfig.yAxisRotationSpeed = value, option -> option.getDisplayText(new LiteralText(String.valueOf(option.get()))),
|
||||||
Text.translatable("midnightcontrols.tooltip.y_axis_rotation_speed"));
|
new TranslatableText("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(new LiteralText(String.valueOf(option.get()))),
|
||||||
Text.translatable("midnightcontrols.tooltip.mouse_speed"));
|
new TranslatableText("midnightcontrols.tooltip.mouse_speed"));
|
||||||
this.resetOption = SpruceSimpleActionOption.reset(btn -> {
|
this.resetOption = SpruceSimpleActionOption.reset(btn -> {
|
||||||
// TODO
|
// TODO
|
||||||
MidnightControlsConfig.reset();
|
MidnightControlsConfig.reset();
|
||||||
@@ -191,60 +193,60 @@ public class MidnightControlsSettingsScreen extends SpruceScreen {
|
|||||||
// Gameplay options
|
// Gameplay options
|
||||||
this.analogMovementOption = new SpruceToggleBooleanOption("midnightcontrols.menu.analog_movement",
|
this.analogMovementOption = new SpruceToggleBooleanOption("midnightcontrols.menu.analog_movement",
|
||||||
() -> MidnightControlsConfig.analogMovement, value -> MidnightControlsConfig.analogMovement = value,
|
() -> MidnightControlsConfig.analogMovement, value -> MidnightControlsConfig.analogMovement = value,
|
||||||
Text.translatable("midnightcontrols.tooltip.analog_movement"));
|
new TranslatableText("midnightcontrols.tooltip.analog_movement"));
|
||||||
this.doubleTapToSprintOption = new SpruceToggleBooleanOption("midnightcontrols.menu.double_tap_to_sprint",
|
this.doubleTapToSprintOption = new SpruceToggleBooleanOption("midnightcontrols.menu.double_tap_to_sprint",
|
||||||
() -> MidnightControlsConfig.doubleTapToSprint, value -> MidnightControlsConfig.doubleTapToSprint = value,
|
() -> MidnightControlsConfig.doubleTapToSprint, value -> MidnightControlsConfig.doubleTapToSprint = value,
|
||||||
Text.translatable("midnightcontrols.tooltip.double_tap_to_sprint"));
|
new TranslatableText("midnightcontrols.tooltip.double_tap_to_sprint"));
|
||||||
this.autoJumpOption = new SpruceToggleBooleanOption("options.autoJump",
|
this.autoJumpOption = new SpruceToggleBooleanOption("options.autoJump",
|
||||||
() -> this.client.options.getAutoJump().getValue(),
|
() -> this.client.options.autoJump,
|
||||||
newValue -> this.client.options.getAutoJump().setValue(newValue),
|
newValue -> this.client.options.autoJump = newValue,
|
||||||
null);
|
null);
|
||||||
this.fastBlockPlacingOption = new SpruceToggleBooleanOption("midnightcontrols.menu.fast_block_placing", () -> MidnightControlsConfig.fastBlockPlacing,
|
this.fastBlockPlacingOption = new SpruceToggleBooleanOption("midnightcontrols.menu.fast_block_placing", () -> MidnightControlsConfig.fastBlockPlacing,
|
||||||
value -> MidnightControlsConfig.fastBlockPlacing = value, Text.translatable("midnightcontrols.tooltip.fast_block_placing"));
|
value -> MidnightControlsConfig.fastBlockPlacing = value, new TranslatableText("midnightcontrols.tooltip.fast_block_placing"));
|
||||||
this.frontBlockPlacingOption = new SpruceToggleBooleanOption("midnightcontrols.menu.reacharound.horizontal", () -> MidnightControlsConfig.horizontalReacharound,
|
this.frontBlockPlacingOption = new SpruceToggleBooleanOption("midnightcontrols.menu.reacharound.horizontal", () -> MidnightControlsConfig.horizontalReacharound,
|
||||||
value -> MidnightControlsConfig.horizontalReacharound = value, Text.translatable("midnightcontrols.tooltip.reacharound.horizontal"));
|
value -> MidnightControlsConfig.horizontalReacharound = value, new TranslatableText("midnightcontrols.tooltip.reacharound.horizontal"));
|
||||||
this.verticalReacharoundOption = new SpruceToggleBooleanOption("midnightcontrols.menu.reacharound.vertical", () -> MidnightControlsConfig.verticalReacharound,
|
this.verticalReacharoundOption = new SpruceToggleBooleanOption("midnightcontrols.menu.reacharound.vertical", () -> MidnightControlsConfig.verticalReacharound,
|
||||||
value -> MidnightControlsConfig.verticalReacharound = value, Text.translatable("midnightcontrols.tooltip.reacharound.vertical"));
|
value -> MidnightControlsConfig.verticalReacharound = value, new TranslatableText("midnightcontrols.tooltip.reacharound.vertical"));
|
||||||
this.flyDriftingOption = new SpruceToggleBooleanOption("midnightcontrols.menu.fly_drifting", () -> MidnightControlsConfig.flyDrifting,
|
this.flyDriftingOption = new SpruceToggleBooleanOption("midnightcontrols.menu.fly_drifting", () -> MidnightControlsConfig.flyDrifting,
|
||||||
value -> MidnightControlsConfig.flyDrifting = value, Text.translatable("midnightcontrols.tooltip.fly_drifting"));
|
value -> MidnightControlsConfig.flyDrifting = value, new TranslatableText("midnightcontrols.tooltip.fly_drifting"));
|
||||||
this.flyVerticalDriftingOption = new SpruceToggleBooleanOption("midnightcontrols.menu.fly_drifting_vertical", () -> MidnightControlsConfig.verticalFlyDrifting,
|
this.flyVerticalDriftingOption = new SpruceToggleBooleanOption("midnightcontrols.menu.fly_drifting_vertical", () -> MidnightControlsConfig.verticalFlyDrifting,
|
||||||
value -> MidnightControlsConfig.verticalFlyDrifting = value, Text.translatable("midnightcontrols.tooltip.fly_drifting_vertical"));
|
value -> MidnightControlsConfig.verticalFlyDrifting = value, new TranslatableText("midnightcontrols.tooltip.fly_drifting_vertical"));
|
||||||
// Appearance options
|
// Appearance options
|
||||||
this.controllerTypeOption = new SpruceCyclingOption("midnightcontrols.menu.controller_type",
|
this.controllerTypeOption = new SpruceCyclingOption("midnightcontrols.menu.controller_type",
|
||||||
amount -> MidnightControlsConfig.controllerType = MidnightControlsConfig.controllerType.next(),
|
amount -> MidnightControlsConfig.controllerType = MidnightControlsConfig.controllerType.next(),
|
||||||
option -> option.getDisplayText(MidnightControlsConfig.controllerType.getTranslatedText()),
|
option -> option.getDisplayText(MidnightControlsConfig.controllerType.getTranslatedText()),
|
||||||
Text.translatable("midnightcontrols.tooltip.controller_type"));
|
new TranslatableText("midnightcontrols.tooltip.controller_type"));
|
||||||
this.virtualMouseSkinOption = new SpruceCyclingOption("midnightcontrols.menu.virtual_mouse.skin",
|
this.virtualMouseSkinOption = new SpruceCyclingOption("midnightcontrols.menu.virtual_mouse.skin",
|
||||||
amount -> MidnightControlsConfig.virtualMouseSkin = MidnightControlsConfig.virtualMouseSkin.next(),
|
amount -> MidnightControlsConfig.virtualMouseSkin = MidnightControlsConfig.virtualMouseSkin.next(),
|
||||||
option -> option.getDisplayText(MidnightControlsConfig.virtualMouseSkin.getTranslatedText()),
|
option -> option.getDisplayText(MidnightControlsConfig.virtualMouseSkin.getTranslatedText()),
|
||||||
null);
|
null);
|
||||||
this.hudEnableOption = new SpruceToggleBooleanOption("midnightcontrols.menu.hud_enable", () -> MidnightControlsConfig.hudEnable,
|
this.hudEnableOption = new SpruceToggleBooleanOption("midnightcontrols.menu.hud_enable", () -> MidnightControlsConfig.hudEnable,
|
||||||
this.mod::setHudEnabled, Text.translatable("midnightcontrols.tooltip.hud_enable"));
|
this.mod::setHudEnabled, new TranslatableText("midnightcontrols.tooltip.hud_enable"));
|
||||||
this.hudSideOption = new SpruceCyclingOption("midnightcontrols.menu.hud_side",
|
this.hudSideOption = new SpruceCyclingOption("midnightcontrols.menu.hud_side",
|
||||||
amount -> MidnightControlsConfig.hudSide = MidnightControlsConfig.hudSide.next(),
|
amount -> MidnightControlsConfig.hudSide = MidnightControlsConfig.hudSide.next(),
|
||||||
option -> option.getDisplayText(MidnightControlsConfig.hudSide.getTranslatedText()),
|
option -> option.getDisplayText(MidnightControlsConfig.hudSide.getTranslatedText()),
|
||||||
Text.translatable("midnightcontrols.tooltip.hud_side"));
|
new TranslatableText("midnightcontrols.tooltip.hud_side"));
|
||||||
// Controller options
|
// Controller options
|
||||||
this.rightDeadZoneOption = new SpruceDoubleOption("midnightcontrols.menu.right_dead_zone", 0.05, 1.0, .05f,
|
this.rightDeadZoneOption = new SpruceDoubleOption("midnightcontrols.menu.right_dead_zone", 0.05, 1.0, .05f,
|
||||||
() -> MidnightControlsConfig.rightDeadZone,
|
() -> MidnightControlsConfig.rightDeadZone,
|
||||||
value -> MidnightControlsConfig.rightDeadZone = value, option -> {
|
value -> MidnightControlsConfig.rightDeadZone = value, option -> {
|
||||||
var value = String.valueOf(option.get());
|
var value = String.valueOf(option.get());
|
||||||
return option.getDisplayText(Text.literal(value.substring(0, Math.min(value.length(), 5))));
|
return option.getDisplayText(new LiteralText(value.substring(0, Math.min(value.length(), 5))));
|
||||||
}, Text.translatable("midnightcontrols.tooltip.right_dead_zone"));
|
}, new TranslatableText("midnightcontrols.tooltip.right_dead_zone"));
|
||||||
this.leftDeadZoneOption = new SpruceDoubleOption("midnightcontrols.menu.left_dead_zone", 0.05, 1.0, .05f,
|
this.leftDeadZoneOption = new SpruceDoubleOption("midnightcontrols.menu.left_dead_zone", 0.05, 1.0, .05f,
|
||||||
() -> MidnightControlsConfig.leftDeadZone,
|
() -> MidnightControlsConfig.leftDeadZone,
|
||||||
value -> MidnightControlsConfig.leftDeadZone = value, option -> {
|
value -> MidnightControlsConfig.leftDeadZone = value, option -> {
|
||||||
var value = String.valueOf(option.get());
|
var value = String.valueOf(option.get());
|
||||||
return option.getDisplayText(Text.literal(value.substring(0, Math.min(value.length(), 5))));
|
return option.getDisplayText(new LiteralText(value.substring(0, Math.min(value.length(), 5))));
|
||||||
}, Text.translatable("midnightcontrols.tooltip.left_dead_zone"));
|
}, new TranslatableText("midnightcontrols.tooltip.left_dead_zone"));
|
||||||
this.invertsRightXAxis = new SpruceToggleBooleanOption("midnightcontrols.menu.invert_right_x_axis", () -> MidnightControlsConfig.invertRightXAxis,
|
this.invertsRightXAxis = new SpruceToggleBooleanOption("midnightcontrols.menu.invert_right_x_axis", () -> MidnightControlsConfig.invertRightXAxis,
|
||||||
value -> MidnightControlsConfig.invertRightXAxis = value, null);
|
value -> MidnightControlsConfig.invertRightXAxis = value, null);
|
||||||
this.invertsRightYAxis = new SpruceToggleBooleanOption("midnightcontrols.menu.invert_right_y_axis", () -> MidnightControlsConfig.invertRightYAxis,
|
this.invertsRightYAxis = new SpruceToggleBooleanOption("midnightcontrols.menu.invert_right_y_axis", () -> MidnightControlsConfig.invertRightYAxis,
|
||||||
value -> MidnightControlsConfig.invertRightYAxis = value, null);
|
value -> MidnightControlsConfig.invertRightYAxis = value, null);
|
||||||
this.unfocusedInputOption = new SpruceToggleBooleanOption("midnightcontrols.menu.unfocused_input", () -> MidnightControlsConfig.unfocusedInput,
|
this.unfocusedInputOption = new SpruceToggleBooleanOption("midnightcontrols.menu.unfocused_input", () -> MidnightControlsConfig.unfocusedInput,
|
||||||
value -> MidnightControlsConfig.unfocusedInput = value, Text.translatable("midnightcontrols.tooltip.unfocused_input"));
|
value -> MidnightControlsConfig.unfocusedInput = value, new TranslatableText("midnightcontrols.tooltip.unfocused_input"));
|
||||||
this.virtualMouseOption = new SpruceToggleBooleanOption("midnightcontrols.menu.virtual_mouse", () -> MidnightControlsConfig.virtualMouse,
|
this.virtualMouseOption = new SpruceToggleBooleanOption("midnightcontrols.menu.virtual_mouse", () -> MidnightControlsConfig.virtualMouse,
|
||||||
value -> MidnightControlsConfig.virtualMouse = value, Text.translatable("midnightcontrols.tooltip.virtual_mouse"));
|
value -> MidnightControlsConfig.virtualMouse = value, new TranslatableText("midnightcontrols.tooltip.virtual_mouse"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -283,22 +285,22 @@ public class MidnightControlsSettingsScreen extends SpruceScreen {
|
|||||||
tabs.getList().setBackground(new MidnightControlsBackground());
|
tabs.getList().setBackground(new MidnightControlsBackground());
|
||||||
this.addDrawableChild(tabs);
|
this.addDrawableChild(tabs);
|
||||||
|
|
||||||
tabs.addSeparatorEntry(Text.translatable("midnightcontrols.menu.separator.general"));
|
tabs.addSeparatorEntry(new TranslatableText("midnightcontrols.menu.separator.general"));
|
||||||
tabs.addTabEntry(Text.translatable("midnightcontrols.menu.title.general"), null,
|
tabs.addTabEntry(new TranslatableText("midnightcontrols.menu.title.general"), null,
|
||||||
this::buildGeneralTab);
|
this::buildGeneralTab);
|
||||||
tabs.addTabEntry(Text.translatable("midnightcontrols.menu.title.gameplay"), null,
|
tabs.addTabEntry(new TranslatableText("midnightcontrols.menu.title.gameplay"), null,
|
||||||
this::buildGameplayTab);
|
this::buildGameplayTab);
|
||||||
tabs.addTabEntry(Text.translatable("midnightcontrols.menu.title.visual"), null,
|
tabs.addTabEntry(new TranslatableText("midnightcontrols.menu.title.visual"), null,
|
||||||
this::buildVisualTab);
|
this::buildVisualTab);
|
||||||
|
|
||||||
tabs.addSeparatorEntry(Text.translatable("options.controls"));
|
tabs.addSeparatorEntry(new TranslatableText("options.controls"));
|
||||||
tabs.addTabEntry(Text.translatable("midnightcontrols.menu.title.controller_controls"), null,
|
tabs.addTabEntry(new TranslatableText("midnightcontrols.menu.title.controller_controls"), null,
|
||||||
this::buildControllerControlsTab);
|
this::buildControllerControlsTab);
|
||||||
|
|
||||||
tabs.addSeparatorEntry(Text.translatable("midnightcontrols.menu.separator.controller"));
|
tabs.addSeparatorEntry(new TranslatableText("midnightcontrols.menu.separator.controller"));
|
||||||
tabs.addTabEntry(Text.translatable("midnightcontrols.menu.title.controller"), null,
|
tabs.addTabEntry(new TranslatableText("midnightcontrols.menu.title.controller"), null,
|
||||||
this::buildControllerTab);
|
this::buildControllerTab);
|
||||||
tabs.addTabEntry(Text.translatable("midnightcontrols.menu.title.mappings.string"), null,
|
tabs.addTabEntry(new TranslatableText("midnightcontrols.menu.title.mappings.string"), null,
|
||||||
this::buildMappingsStringEditorTab);
|
this::buildMappingsStringEditorTab);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -347,17 +349,17 @@ public class MidnightControlsSettingsScreen extends SpruceScreen {
|
|||||||
var root = new SpruceContainerWidget(Position.origin(), width, height);
|
var root = new SpruceContainerWidget(Position.origin(), width, height);
|
||||||
|
|
||||||
var aboutMappings1 = new SpruceLabelWidget(Position.of(0, 2),
|
var aboutMappings1 = new SpruceLabelWidget(Position.of(0, 2),
|
||||||
Text.translatable("midnightcontrols.controller.mappings.1", SDL2_GAMEPAD_TOOL),
|
new TranslatableText("midnightcontrols.controller.mappings.1", SDL2_GAMEPAD_TOOL),
|
||||||
width, true);
|
width, true);
|
||||||
|
|
||||||
var gamepadToolUrlLabel = new SpruceLabelWidget(Position.of(0, aboutMappings1.getHeight() + 4),
|
var gamepadToolUrlLabel = new SpruceLabelWidget(Position.of(0, aboutMappings1.getHeight() + 4),
|
||||||
this.controllerMappingsUrlText, width,
|
this.controllerMappingsUrlText, width,
|
||||||
label -> Util.getOperatingSystem().open(GAMEPAD_TOOL_URL), true);
|
label -> Util.getOperatingSystem().open(GAMEPAD_TOOL_URL), true);
|
||||||
gamepadToolUrlLabel.setTooltip(Text.translatable("chat.link.open"));
|
gamepadToolUrlLabel.setTooltip(new TranslatableText("chat.link.open"));
|
||||||
|
|
||||||
var aboutMappings3 = new SpruceLabelWidget(Position.of(0,
|
var aboutMappings3 = new SpruceLabelWidget(Position.of(0,
|
||||||
aboutMappings1.getHeight() + gamepadToolUrlLabel.getHeight() + 6),
|
aboutMappings1.getHeight() + gamepadToolUrlLabel.getHeight() + 6),
|
||||||
Text.translatable("midnightcontrols.controller.mappings.3", Formatting.GREEN.toString(), Formatting.RESET.toString()),
|
new TranslatableText("midnightcontrols.controller.mappings.3", Formatting.GREEN.toString(), Formatting.RESET.toString()),
|
||||||
width, true);
|
width, true);
|
||||||
|
|
||||||
int listHeight = height - 8 - aboutMappings1.getHeight() - aboutMappings3.getHeight() - gamepadToolUrlLabel.getHeight();
|
int listHeight = height - 8 - aboutMappings1.getHeight() - aboutMappings3.getHeight() - gamepadToolUrlLabel.getHeight();
|
||||||
@@ -422,7 +424,8 @@ public class MidnightControlsSettingsScreen extends SpruceScreen {
|
|||||||
bufferBuilder.vertex(matrix, (float)x2, (float)y2, 0.0F).color(r, g, b, t).next();
|
bufferBuilder.vertex(matrix, (float)x2, (float)y2, 0.0F).color(r, g, b, t).next();
|
||||||
bufferBuilder.vertex(matrix, (float)x2, (float)y1, 0.0F).color(r, g, b, t).next();
|
bufferBuilder.vertex(matrix, (float)x2, (float)y1, 0.0F).color(r, g, b, t).next();
|
||||||
bufferBuilder.vertex(matrix, (float)x1, (float)y1, 0.0F).color(r, g, b, t).next();
|
bufferBuilder.vertex(matrix, (float)x1, (float)y1, 0.0F).color(r, g, b, t).next();
|
||||||
BufferRenderer.drawWithShader(bufferBuilder.end());
|
bufferBuilder.end();
|
||||||
|
BufferRenderer.draw(bufferBuilder);
|
||||||
RenderSystem.enableTexture();
|
RenderSystem.enableTexture();
|
||||||
RenderSystem.disableBlend();
|
RenderSystem.disableBlend();
|
||||||
matrixStack.pop();
|
matrixStack.pop();
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import dev.lambdaurora.spruceui.widget.SpruceButtonWidget;
|
|||||||
import net.minecraft.client.MinecraftClient;
|
import net.minecraft.client.MinecraftClient;
|
||||||
import net.minecraft.client.toast.SystemToast;
|
import net.minecraft.client.toast.SystemToast;
|
||||||
import net.minecraft.text.Text;
|
import net.minecraft.text.Text;
|
||||||
|
import net.minecraft.text.TranslatableText;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
@@ -34,7 +35,7 @@ public class ReloadControllerMappingsOption {
|
|||||||
if (client.currentScreen instanceof MidnightControlsSettingsScreen)
|
if (client.currentScreen instanceof MidnightControlsSettingsScreen)
|
||||||
client.currentScreen.init(client, client.getWindow().getScaledWidth(), client.getWindow().getScaledHeight());
|
client.currentScreen.init(client, client.getWindow().getScaledWidth(), client.getWindow().getScaledHeight());
|
||||||
client.getToastManager().add(SystemToast.create(client, SystemToast.Type.TUTORIAL_HINT,
|
client.getToastManager().add(SystemToast.create(client, SystemToast.Type.TUTORIAL_HINT,
|
||||||
Text.translatable("midnightcontrols.controller.mappings.updated"), Text.empty()));
|
new TranslatableText("midnightcontrols.controller.mappings.updated"), Text.of("")));
|
||||||
}, Text.translatable("midnightcontrols.tooltip.reload_controller_mappings"));
|
}, new TranslatableText("midnightcontrols.tooltip.reload_controller_mappings"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import eu.midnightdust.midnightcontrols.client.MidnightControlsClient;
|
|||||||
import eu.midnightdust.midnightcontrols.client.ring.RingPage;
|
import eu.midnightdust.midnightcontrols.client.ring.RingPage;
|
||||||
import net.minecraft.client.gui.screen.Screen;
|
import net.minecraft.client.gui.screen.Screen;
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
|
import net.minecraft.text.LiteralText;
|
||||||
import net.minecraft.text.Text;
|
import net.minecraft.text.Text;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -26,7 +27,7 @@ public class RingScreen extends Screen {
|
|||||||
protected final MidnightControlsClient mod;
|
protected final MidnightControlsClient mod;
|
||||||
|
|
||||||
public RingScreen() {
|
public RingScreen() {
|
||||||
super(Text.literal("midnightcontrols.menu.title.ring"));
|
super(new LiteralText("midnightcontrols.menu.title.ring"));
|
||||||
this.mod = MidnightControlsClient.get();
|
this.mod = MidnightControlsClient.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ import net.minecraft.client.gui.screen.Screen;
|
|||||||
import net.minecraft.client.gui.screen.ingame.InventoryScreen;
|
import net.minecraft.client.gui.screen.ingame.InventoryScreen;
|
||||||
import net.minecraft.client.gui.widget.TexturedButtonWidget;
|
import net.minecraft.client.gui.widget.TexturedButtonWidget;
|
||||||
import net.minecraft.network.packet.c2s.play.PlayerActionC2SPacket;
|
import net.minecraft.network.packet.c2s.play.PlayerActionC2SPacket;
|
||||||
|
import net.minecraft.text.LiteralText;
|
||||||
import net.minecraft.text.Text;
|
import net.minecraft.text.Text;
|
||||||
import net.minecraft.util.Arm;
|
import net.minecraft.util.Arm;
|
||||||
import net.minecraft.util.Identifier;
|
import net.minecraft.util.Identifier;
|
||||||
@@ -51,7 +52,7 @@ public class TouchscreenOverlay extends Screen {
|
|||||||
private SilentTexturedButtonWidget endSneakButton;
|
private SilentTexturedButtonWidget endSneakButton;
|
||||||
|
|
||||||
public TouchscreenOverlay(@NotNull MidnightControlsClient mod) {
|
public TouchscreenOverlay(@NotNull MidnightControlsClient mod) {
|
||||||
super(Text.literal("Touchscreen overlay"));
|
super(new LiteralText("Touchscreen overlay"));
|
||||||
this.mod = mod;
|
this.mod = mod;
|
||||||
this.passEvents = true;
|
this.passEvents = true;
|
||||||
}
|
}
|
||||||
@@ -155,13 +156,13 @@ public class TouchscreenOverlay extends Screen {
|
|||||||
int scaledWidth = this.client.getWindow().getScaledWidth();
|
int scaledWidth = this.client.getWindow().getScaledWidth();
|
||||||
int scaledHeight = this.client.getWindow().getScaledHeight();
|
int scaledHeight = this.client.getWindow().getScaledHeight();
|
||||||
this.addDrawableChild(new TexturedButtonWidget(scaledWidth / 2 - 20, 0, 20, 20, 0, 106, 20, new Identifier("textures/gui/widgets.png"), 256, 256,
|
this.addDrawableChild(new TexturedButtonWidget(scaledWidth / 2 - 20, 0, 20, 20, 0, 106, 20, new Identifier("textures/gui/widgets.png"), 256, 256,
|
||||||
btn -> this.client.setScreen(new ChatScreen("")), Text.empty()));
|
btn -> this.client.setScreen(new ChatScreen("")), Text.of("")));
|
||||||
this.addDrawableChild(new TexturedButtonWidget(scaledWidth / 2, 0, 20, 20, 0, 0, 20, WIDGETS_LOCATION, 256, 256,
|
this.addDrawableChild(new TexturedButtonWidget(scaledWidth / 2, 0, 20, 20, 0, 0, 20, WIDGETS_LOCATION, 256, 256,
|
||||||
btn -> this.pauseGame(false)));
|
btn -> this.pauseGame(false)));
|
||||||
// Inventory buttons.
|
// Inventory buttons.
|
||||||
int inventoryButtonX = scaledWidth / 2;
|
int inventoryButtonX = scaledWidth / 2;
|
||||||
int inventoryButtonY = scaledHeight - 16 - 5;
|
int inventoryButtonY = scaledHeight - 16 - 5;
|
||||||
if (this.client.options.getMainArm().getValue() == Arm.LEFT) {
|
if (this.client.options.mainArm == Arm.LEFT) {
|
||||||
inventoryButtonX = inventoryButtonX - 91 - 24;
|
inventoryButtonX = inventoryButtonX - 91 - 24;
|
||||||
} else {
|
} else {
|
||||||
inventoryButtonX = inventoryButtonX + 91 + 4;
|
inventoryButtonX = inventoryButtonX + 91 + 4;
|
||||||
@@ -187,7 +188,7 @@ public class TouchscreenOverlay extends Screen {
|
|||||||
sneakButtonX = scaledWidth - 10 - 40 - 5;
|
sneakButtonX = scaledWidth - 10 - 40 - 5;
|
||||||
}
|
}
|
||||||
// Swap items hand.
|
// Swap items hand.
|
||||||
this.addDrawableChild(new SilentTexturedButtonWidget(Position.of(swapHandsX, sneakButtonY), 20, 20, Text.empty(),
|
this.addDrawableChild(new SilentTexturedButtonWidget(Position.of(swapHandsX, sneakButtonY), 20, 20, Text.of(""),
|
||||||
button -> {
|
button -> {
|
||||||
if (button.isActive()) {
|
if (button.isActive()) {
|
||||||
if (!this.client.player.isSpectator()) {
|
if (!this.client.player.isSpectator()) {
|
||||||
@@ -196,23 +197,23 @@ public class TouchscreenOverlay extends Screen {
|
|||||||
}
|
}
|
||||||
},0, 160, 20, WIDGETS_LOCATION));
|
},0, 160, 20, WIDGETS_LOCATION));
|
||||||
// Drop
|
// Drop
|
||||||
this.addDrawableChild(new SilentTexturedButtonWidget(Position.of(swapHandsX, sneakButtonY + 5 + 20), 20, 20, Text.empty(), btn ->
|
this.addDrawableChild(new SilentTexturedButtonWidget(Position.of(swapHandsX, sneakButtonY + 5 + 20), 20, 20, Text.of(""), btn ->
|
||||||
((KeyBindingAccessor) this.client.options.dropKey).midnightcontrols$handlePressState(btn.isActive()), 0, 160, 20, WIDGETS_LOCATION));
|
((KeyBindingAccessor) this.client.options.dropKey).midnightcontrols$handlePressState(btn.isActive()), 0, 160, 20, WIDGETS_LOCATION));
|
||||||
// Jump keys
|
// Jump keys
|
||||||
this.addDrawableChild(this.jumpButton = new SilentTexturedButtonWidget(Position.of(jumpButtonX, sneakButtonY), 20, 20, Text.empty(), this::handleJump, 0, 40, 20, WIDGETS_LOCATION));
|
this.addDrawableChild(this.jumpButton = new SilentTexturedButtonWidget(Position.of(jumpButtonX, sneakButtonY), 20, 20, Text.of(""), this::handleJump, 0, 40, 20, WIDGETS_LOCATION));
|
||||||
this.addDrawableChild(this.flyButton = new SilentTexturedButtonWidget(Position.of(jumpButtonX, sneakButtonY), 20, 20, Text.empty(),btn -> {
|
this.addDrawableChild(this.flyButton = new SilentTexturedButtonWidget(Position.of(jumpButtonX, sneakButtonY), 20, 20, Text.of(""),btn -> {
|
||||||
if (this.flyButtonEnableTicks == 0) this.client.player.getAbilities().flying = false;
|
if (this.flyButtonEnableTicks == 0) this.client.player.getAbilities().flying = false;
|
||||||
}, 20, 40, 20, WIDGETS_LOCATION)
|
}, 20, 40, 20, WIDGETS_LOCATION)
|
||||||
);
|
);
|
||||||
this.addDrawableChild(this.flyUpButton = new SilentTexturedButtonWidget(Position.of(jumpButtonX, sneakButtonY - 5 - 20), 20, 20,Text.empty(),
|
this.addDrawableChild(this.flyUpButton = new SilentTexturedButtonWidget(Position.of(jumpButtonX, sneakButtonY - 5 - 20), 20, 20,Text.of(""),
|
||||||
this::handleJump, 40, 40, 20, WIDGETS_LOCATION
|
this::handleJump, 40, 40, 20, WIDGETS_LOCATION
|
||||||
));
|
));
|
||||||
this.addDrawableChild(this.flyDownButton = new SilentTexturedButtonWidget(Position.of(jumpButtonX, sneakButtonY + 20 + 5), 20, 20, Text.empty(),
|
this.addDrawableChild(this.flyDownButton = new SilentTexturedButtonWidget(Position.of(jumpButtonX, sneakButtonY + 20 + 5), 20, 20, Text.of(""),
|
||||||
btn -> ((KeyBindingAccessor) this.client.options.sneakKey).midnightcontrols$handlePressState(btn.isActive()), 60, 40, 20, WIDGETS_LOCATION
|
btn -> ((KeyBindingAccessor) this.client.options.sneakKey).midnightcontrols$handlePressState(btn.isActive()), 60, 40, 20, WIDGETS_LOCATION
|
||||||
));
|
));
|
||||||
this.updateJumpButtons();
|
this.updateJumpButtons();
|
||||||
// Movements keys
|
// Movements keys
|
||||||
this.addDrawableChild((this.startSneakButton = new SilentTexturedButtonWidget(Position.of(sneakButtonX, sneakButtonY), 20, 20, Text.empty(), btn -> {
|
this.addDrawableChild((this.startSneakButton = new SilentTexturedButtonWidget(Position.of(sneakButtonX, sneakButtonY), 20, 20, Text.of(""), btn -> {
|
||||||
if (btn.isActive()) {
|
if (btn.isActive()) {
|
||||||
((KeyBindingAccessor) this.client.options.sneakKey).midnightcontrols$handlePressState(true);
|
((KeyBindingAccessor) this.client.options.sneakKey).midnightcontrols$handlePressState(true);
|
||||||
this.startSneakButton.setVisible(false);
|
this.startSneakButton.setVisible(false);
|
||||||
@@ -220,7 +221,7 @@ public class TouchscreenOverlay extends Screen {
|
|||||||
}
|
}
|
||||||
}, 0, 120, 20, WIDGETS_LOCATION))
|
}, 0, 120, 20, WIDGETS_LOCATION))
|
||||||
);
|
);
|
||||||
this.addDrawableChild((this.endSneakButton = new SilentTexturedButtonWidget(Position.of(sneakButtonX, sneakButtonY), 20, 20, Text.empty(), btn -> {
|
this.addDrawableChild((this.endSneakButton = new SilentTexturedButtonWidget(Position.of(sneakButtonX, sneakButtonY), 20, 20, Text.of(""), btn -> {
|
||||||
if (btn.isActive()) {
|
if (btn.isActive()) {
|
||||||
((KeyBindingAccessor) this.client.options.sneakKey).midnightcontrols$handlePressState(false);
|
((KeyBindingAccessor) this.client.options.sneakKey).midnightcontrols$handlePressState(false);
|
||||||
this.endSneakButton.setVisible(false);
|
this.endSneakButton.setVisible(false);
|
||||||
@@ -228,34 +229,34 @@ public class TouchscreenOverlay extends Screen {
|
|||||||
}
|
}
|
||||||
}, 20, 120, 20, WIDGETS_LOCATION)));
|
}, 20, 120, 20, WIDGETS_LOCATION)));
|
||||||
this.endSneakButton.setVisible(false);
|
this.endSneakButton.setVisible(false);
|
||||||
this.addDrawableChild(this.forwardLeftButton = new SilentTexturedButtonWidget(Position.of(sneakButtonX - 20 - 5, sneakButtonY - 5 - 20), 20, 20, Text.empty(), btn -> {
|
this.addDrawableChild(this.forwardLeftButton = new SilentTexturedButtonWidget(Position.of(sneakButtonX - 20 - 5, sneakButtonY - 5 - 20), 20, 20, Text.of(""), btn -> {
|
||||||
((KeyBindingAccessor) this.client.options.forwardKey).midnightcontrols$handlePressState(btn.isActive());
|
((KeyBindingAccessor) this.client.options.forwardKey).midnightcontrols$handlePressState(btn.isActive());
|
||||||
((KeyBindingAccessor) this.client.options.leftKey).midnightcontrols$handlePressState(btn.isActive());
|
((KeyBindingAccessor) this.client.options.leftKey).midnightcontrols$handlePressState(btn.isActive());
|
||||||
this.updateForwardButtonsState(btn.isActive());
|
this.updateForwardButtonsState(btn.isActive());
|
||||||
}, 80, 80, 20, WIDGETS_LOCATION
|
}, 80, 80, 20, WIDGETS_LOCATION
|
||||||
));
|
));
|
||||||
this.forwardLeftButton.setVisible(false);
|
this.forwardLeftButton.setVisible(false);
|
||||||
this.addDrawableChild(new SilentTexturedButtonWidget(Position.of(sneakButtonX, sneakButtonY - 5 - 20), 20, 20, Text.empty(), btn -> {
|
this.addDrawableChild(new SilentTexturedButtonWidget(Position.of(sneakButtonX, sneakButtonY - 5 - 20), 20, 20, Text.of(""), btn -> {
|
||||||
((KeyBindingAccessor) this.client.options.forwardKey).midnightcontrols$handlePressState(btn.isActive());
|
((KeyBindingAccessor) this.client.options.forwardKey).midnightcontrols$handlePressState(btn.isActive());
|
||||||
this.updateForwardButtonsState(btn.isActive());
|
this.updateForwardButtonsState(btn.isActive());
|
||||||
this.forwardLeftButton.setVisible(true);
|
this.forwardLeftButton.setVisible(true);
|
||||||
this.forwardRightButton.setVisible(true);
|
this.forwardRightButton.setVisible(true);
|
||||||
}, 0, 80, 20, WIDGETS_LOCATION
|
}, 0, 80, 20, WIDGETS_LOCATION
|
||||||
));
|
));
|
||||||
this.addDrawableChild(this.forwardRightButton = new SilentTexturedButtonWidget(Position.of(sneakButtonX + 20 + 5, sneakButtonY - 5 - 20), 20, 20, Text.empty(), btn -> {
|
this.addDrawableChild(this.forwardRightButton = new SilentTexturedButtonWidget(Position.of(sneakButtonX + 20 + 5, sneakButtonY - 5 - 20), 20, 20, Text.of(""), btn -> {
|
||||||
((KeyBindingAccessor) this.client.options.forwardKey).midnightcontrols$handlePressState(btn.isActive());
|
((KeyBindingAccessor) this.client.options.forwardKey).midnightcontrols$handlePressState(btn.isActive());
|
||||||
((KeyBindingAccessor) this.client.options.rightKey).midnightcontrols$handlePressState(btn.isActive());
|
((KeyBindingAccessor) this.client.options.rightKey).midnightcontrols$handlePressState(btn.isActive());
|
||||||
this.updateForwardButtonsState(btn.isActive());
|
this.updateForwardButtonsState(btn.isActive());
|
||||||
}, 100, 80, 20, WIDGETS_LOCATION
|
}, 100, 80, 20, WIDGETS_LOCATION
|
||||||
));
|
));
|
||||||
this.forwardRightButton.setVisible(true);
|
this.forwardRightButton.setVisible(true);
|
||||||
this.addDrawableChild(new SilentTexturedButtonWidget(Position.of(sneakButtonX + 20 + 5, sneakButtonY), 20, 20, Text.empty(),
|
this.addDrawableChild(new SilentTexturedButtonWidget(Position.of(sneakButtonX + 20 + 5, sneakButtonY), 20, 20, Text.of(""),
|
||||||
btn -> ((KeyBindingAccessor) this.client.options.rightKey).midnightcontrols$handlePressState(btn.isActive()), 20, 80, 20, WIDGETS_LOCATION
|
btn -> ((KeyBindingAccessor) this.client.options.rightKey).midnightcontrols$handlePressState(btn.isActive()), 20, 80, 20, WIDGETS_LOCATION
|
||||||
));
|
));
|
||||||
this.addDrawableChild(new SilentTexturedButtonWidget(Position.of(sneakButtonX, sneakButtonY + 20 + 5), 20, 20, Text.empty(),
|
this.addDrawableChild(new SilentTexturedButtonWidget(Position.of(sneakButtonX, sneakButtonY + 20 + 5), 20, 20, Text.of(""),
|
||||||
btn -> ((KeyBindingAccessor) this.client.options.backKey).midnightcontrols$handlePressState(btn.isActive()), 40, 80, 20, WIDGETS_LOCATION
|
btn -> ((KeyBindingAccessor) this.client.options.backKey).midnightcontrols$handlePressState(btn.isActive()), 40, 80, 20, WIDGETS_LOCATION
|
||||||
));
|
));
|
||||||
this.addDrawableChild(new SilentTexturedButtonWidget(Position.of(sneakButtonX - 20 - 5, sneakButtonY), 20, 20, Text.empty(),
|
this.addDrawableChild(new SilentTexturedButtonWidget(Position.of(sneakButtonX - 20 - 5, sneakButtonY), 20, 20, Text.of(""),
|
||||||
btn -> ((KeyBindingAccessor) this.client.options.leftKey).midnightcontrols$handlePressState(btn.isActive()), 60, 80, 20, WIDGETS_LOCATION
|
btn -> ((KeyBindingAccessor) this.client.options.leftKey).midnightcontrols$handlePressState(btn.isActive()), 60, 80, 20, WIDGETS_LOCATION
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import dev.lambdaurora.spruceui.SpruceTexts;
|
|||||||
import dev.lambdaurora.spruceui.widget.AbstractSpruceIconButtonWidget;
|
import dev.lambdaurora.spruceui.widget.AbstractSpruceIconButtonWidget;
|
||||||
import net.minecraft.client.MinecraftClient;
|
import net.minecraft.client.MinecraftClient;
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
|
import net.minecraft.text.LiteralText;
|
||||||
import net.minecraft.text.Text;
|
import net.minecraft.text.Text;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
@@ -34,13 +35,13 @@ public class ControllerButtonWidget extends AbstractSpruceIconButtonWidget {
|
|||||||
public void update() {
|
public void update() {
|
||||||
int length = binding.getButton().length;
|
int length = binding.getButton().length;
|
||||||
this.setMessage(this.binding.isNotBound() ? SpruceTexts.NOT_BOUND.copy() :
|
this.setMessage(this.binding.isNotBound() ? SpruceTexts.NOT_BOUND.copy() :
|
||||||
(length > 0 ? ButtonBinding.getLocalizedButtonName(binding.getButton()[0]) : Text.literal("<>")));
|
(length > 0 ? ButtonBinding.getLocalizedButtonName(binding.getButton()[0]) : new LiteralText("<>")));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Text getMessage() {
|
public Text getMessage() {
|
||||||
if (this.binding.getButton().length > 1)
|
if (this.binding.getButton().length > 1)
|
||||||
return Text.empty();
|
return Text.of("");
|
||||||
return super.getMessage();
|
return super.getMessage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import eu.midnightdust.midnightcontrols.client.gui.MidnightControlsSettingsScree
|
|||||||
import net.minecraft.client.gui.screen.option.ControlsOptionsScreen;
|
import net.minecraft.client.gui.screen.option.ControlsOptionsScreen;
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
import net.minecraft.text.Text;
|
import net.minecraft.text.Text;
|
||||||
|
import net.minecraft.text.TranslatableText;
|
||||||
import org.aperlambda.lambdacommon.utils.function.Predicates;
|
import org.aperlambda.lambdacommon.utils.function.Predicates;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@@ -47,7 +48,7 @@ public class ControllerControlsWidget extends SpruceContainerWidget {
|
|||||||
|
|
||||||
protected void init() {
|
protected void init() {
|
||||||
this.addChild(new SpruceButtonWidget(Position.of(this, this.width / 2 - 155, 18), 310, 20,
|
this.addChild(new SpruceButtonWidget(Position.of(this, this.width / 2 - 155, 18), 310, 20,
|
||||||
Text.translatable("midnightcontrols.menu.keyboard_controls"),
|
new TranslatableText("midnightcontrols.menu.keyboard_controls"),
|
||||||
btn -> this.client.setScreen(new ControlsOptionsScreen(null, this.client.options))));
|
btn -> this.client.setScreen(new ControlsOptionsScreen(null, this.client.options))));
|
||||||
this.bindingsListWidget = new ControlsListWidget(Position.of(this, 0, 43), this.width, this.height - 43 - 35, this);
|
this.bindingsListWidget = new ControlsListWidget(Position.of(this, 0, 43), this.width, this.height - 43 - 35, this);
|
||||||
this.bindingsListWidget.setBackground(new MidnightControlsSettingsScreen.MidnightControlsBackground(130));
|
this.bindingsListWidget.setBackground(new MidnightControlsSettingsScreen.MidnightControlsBackground(130));
|
||||||
@@ -59,7 +60,7 @@ public class ControllerControlsWidget extends SpruceContainerWidget {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void renderWidget(MatrixStack matrices, int mouseX, int mouseY, float delta) {
|
public void renderWidget(MatrixStack matrices, int mouseX, int mouseY, float delta) {
|
||||||
drawCenteredText(matrices, this.client.textRenderer, Text.translatable("midnightcontrols.menu.title.controller_controls"),
|
drawCenteredText(matrices, this.client.textRenderer, new TranslatableText("midnightcontrols.menu.title.controller_controls"),
|
||||||
this.getX() + this.width / 2, this.getY() + 4, 16777215);
|
this.getX() + this.width / 2, this.getY() + 4, 16777215);
|
||||||
this.resetButton.setActive(InputManager.streamBindings().anyMatch(Predicates.not(ButtonBinding::isDefault)));
|
this.resetButton.setActive(InputManager.streamBindings().anyMatch(Predicates.not(ButtonBinding::isDefault)));
|
||||||
super.renderWidget(matrices, mouseX, mouseY, delta);
|
super.renderWidget(matrices, mouseX, mouseY, delta);
|
||||||
|
|||||||
@@ -27,7 +27,9 @@ import net.fabricmc.api.EnvType;
|
|||||||
import net.fabricmc.api.Environment;
|
import net.fabricmc.api.Environment;
|
||||||
import net.minecraft.client.resource.language.I18n;
|
import net.minecraft.client.resource.language.I18n;
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
|
import net.minecraft.text.LiteralText;
|
||||||
import net.minecraft.text.Text;
|
import net.minecraft.text.Text;
|
||||||
|
import net.minecraft.text.TranslatableText;
|
||||||
import net.minecraft.util.Formatting;
|
import net.minecraft.util.Formatting;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
@@ -91,17 +93,17 @@ public class ControlsListWidget extends SpruceEntryListWidget<ControlsListWidget
|
|||||||
MidnightControlsClient.get().input.beginControlsInput(gui);
|
MidnightControlsClient.get().input.beginControlsInput(gui);
|
||||||
}) {
|
}) {
|
||||||
protected Text getNarrationMessage() {
|
protected Text getNarrationMessage() {
|
||||||
return binding.isNotBound() ? Text.translatable("narrator.controls.unbound", bindingName)
|
return binding.isNotBound() ? new TranslatableText("narrator.controls.unbound", bindingName)
|
||||||
: Text.translatable("narrator.controls.bound", bindingName, super.getNarrationMessage());
|
: new TranslatableText("narrator.controls.bound", bindingName, super.getNarrationMessage());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
this.children.add(editButton);
|
this.children.add(editButton);
|
||||||
this.resetButton = new SpruceButtonWidget(Position.of(this,
|
this.resetButton = new SpruceButtonWidget(Position.of(this,
|
||||||
this.editButton.getPosition().getRelativeX() + this.editButton.getWidth() + 2, 0),
|
this.editButton.getPosition().getRelativeX() + this.editButton.getWidth() + 2, 0),
|
||||||
44, 20, Text.translatable("controls.reset"),
|
44, 20, new TranslatableText("controls.reset"),
|
||||||
btn -> MidnightControlsConfig.setButtonBinding(binding, binding.getDefaultButton())) {
|
btn -> MidnightControlsConfig.setButtonBinding(binding, binding.getDefaultButton())) {
|
||||||
protected Text getNarrationMessage() {
|
protected Text getNarrationMessage() {
|
||||||
return Text.translatable("narrator.controls.reset", bindingName);
|
return new TranslatableText("narrator.controls.reset", bindingName);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
this.children.add(this.resetButton);
|
this.children.add(this.resetButton);
|
||||||
@@ -114,7 +116,7 @@ public class ControlsListWidget extends SpruceEntryListWidget<ControlsListWidget
|
|||||||
MidnightControlsClient.get().input.beginControlsInput(null);
|
MidnightControlsClient.get().input.beginControlsInput(null);
|
||||||
}) {
|
}) {
|
||||||
protected Text getNarrationMessage() {
|
protected Text getNarrationMessage() {
|
||||||
return Text.translatable("midnightcontrols.narrator.unbound", bindingName);
|
return new TranslatableText("midnightcontrols.narrator.unbound", bindingName);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
this.children.add(this.unbindButton);
|
this.children.add(this.unbindButton);
|
||||||
@@ -241,9 +243,9 @@ public class ControlsListWidget extends SpruceEntryListWidget<ControlsListWidget
|
|||||||
|
|
||||||
this.editButton.update();
|
this.editButton.update();
|
||||||
if (focused) {
|
if (focused) {
|
||||||
var text = Text.literal("> ").formatted(Formatting.WHITE);
|
var text = new LiteralText("> ").formatted(Formatting.WHITE);
|
||||||
text.append(this.editButton.getMessage().copy().formatted(Formatting.YELLOW));
|
text.append(this.editButton.getMessage().copy().formatted(Formatting.YELLOW));
|
||||||
this.editButton.setMessage(text.append(Text.literal(" <").formatted(Formatting.WHITE)));
|
this.editButton.setMessage(text.append(new LiteralText(" <").formatted(Formatting.WHITE)));
|
||||||
} else if (!this.binding.isNotBound() && InputManager.hasDuplicatedBindings(this.binding)) {
|
} else if (!this.binding.isNotBound() && InputManager.hasDuplicatedBindings(this.binding)) {
|
||||||
var text = this.editButton.getMessage().copy();
|
var text = this.editButton.getMessage().copy();
|
||||||
this.editButton.setMessage(text.formatted(Formatting.RED));
|
this.editButton.setMessage(text.formatted(Formatting.RED));
|
||||||
@@ -262,7 +264,7 @@ public class ControlsListWidget extends SpruceEntryListWidget<ControlsListWidget
|
|||||||
protected CategoryEntry(ControlsListWidget parent, ButtonCategory category) {
|
protected CategoryEntry(ControlsListWidget parent, ButtonCategory category) {
|
||||||
super(parent);
|
super(parent);
|
||||||
this.separatorWidget = new SpruceSeparatorWidget(Position.of(this, 2, 0), this.getWidth() - 4,
|
this.separatorWidget = new SpruceSeparatorWidget(Position.of(this, 2, 0), this.getWidth() - 4,
|
||||||
Text.literal(category.getTranslatedName())) {
|
new LiteralText(category.getTranslatedName())) {
|
||||||
@Override
|
@Override
|
||||||
public int getWidth() {
|
public int getWidth() {
|
||||||
return CategoryEntry.this.getWidth() - 4;
|
return CategoryEntry.this.getWidth() - 4;
|
||||||
|
|||||||
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ package eu.midnightdust.midnightcontrols.client.mixin;
|
|||||||
|
|
||||||
import com.mojang.authlib.GameProfile;
|
import com.mojang.authlib.GameProfile;
|
||||||
import eu.midnightdust.midnightcontrols.MidnightControls;
|
import eu.midnightdust.midnightcontrols.MidnightControls;
|
||||||
import eu.midnightdust.midnightcontrols.client.MidnightControlsClient;
|
|
||||||
import eu.midnightdust.midnightcontrols.client.MidnightControlsConfig;
|
import eu.midnightdust.midnightcontrols.client.MidnightControlsConfig;
|
||||||
import eu.midnightdust.midnightcontrols.client.controller.MovementHandler;
|
import eu.midnightdust.midnightcontrols.client.controller.MovementHandler;
|
||||||
import net.minecraft.client.MinecraftClient;
|
import net.minecraft.client.MinecraftClient;
|
||||||
@@ -20,15 +19,12 @@ import net.minecraft.client.network.AbstractClientPlayerEntity;
|
|||||||
import net.minecraft.client.network.ClientPlayerEntity;
|
import net.minecraft.client.network.ClientPlayerEntity;
|
||||||
import net.minecraft.client.world.ClientWorld;
|
import net.minecraft.client.world.ClientWorld;
|
||||||
import net.minecraft.entity.MovementType;
|
import net.minecraft.entity.MovementType;
|
||||||
import net.minecraft.network.encryption.PlayerPublicKey;
|
|
||||||
import net.minecraft.util.math.Vec3d;
|
import net.minecraft.util.math.Vec3d;
|
||||||
import org.jetbrains.annotations.Nullable;
|
|
||||||
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.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.Redirect;
|
|
||||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -38,8 +34,8 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
|||||||
public abstract class ClientPlayerEntityMixin extends AbstractClientPlayerEntity {
|
public abstract class ClientPlayerEntityMixin extends AbstractClientPlayerEntity {
|
||||||
private boolean midnightcontrols$driftingPrevented = false;
|
private boolean midnightcontrols$driftingPrevented = false;
|
||||||
|
|
||||||
public ClientPlayerEntityMixin(ClientWorld world, GameProfile profile, @Nullable PlayerPublicKey publicKey) {
|
public ClientPlayerEntityMixin(ClientWorld world, GameProfile profile) {
|
||||||
super(world, profile, publicKey);
|
super(world, profile);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Shadow
|
@Shadow
|
||||||
@@ -76,7 +72,7 @@ public abstract class ClientPlayerEntityMixin extends AbstractClientPlayerEntity
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Inject(method = "tickMovement", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/input/Input;tick(ZF)V", shift = At.Shift.AFTER))
|
@Inject(method = "tickMovement", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/input/Input;tick(Z)V", shift = At.Shift.AFTER))
|
||||||
public void onInputUpdate(CallbackInfo ci) {
|
public void onInputUpdate(CallbackInfo ci) {
|
||||||
MovementHandler.HANDLER.applyMovement((ClientPlayerEntity) (Object) this);
|
MovementHandler.HANDLER.applyMovement((ClientPlayerEntity) (Object) this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ 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.text.TranslatableText;
|
||||||
import net.minecraft.util.Identifier;
|
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.Unique;
|
||||||
@@ -39,7 +40,7 @@ public abstract class ControlsOptionsScreenMixin extends GameOptionsScreen {
|
|||||||
if (showAlternativeButton) {
|
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.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));
|
this.client.setScreen(new MidnightControlsSettingsScreen(this, false));
|
||||||
}, Text.translatable("midnightcontrols.menu.title.controller")));
|
}, new TranslatableText("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;"))
|
||||||
@@ -48,7 +49,7 @@ public abstract class ControlsOptionsScreenMixin extends GameOptionsScreen {
|
|||||||
int i = this.width / 2 - 155;
|
int i = this.width / 2 - 155;
|
||||||
int j = i + 160;
|
int j = i + 160;
|
||||||
int k = this.height / 6 - 12 + 48;
|
int k = this.height / 6 - 12 + 48;
|
||||||
this.addDrawableChild(new ButtonWidget(j, k, 150, 20, Text.translatable("midnightcontrols.menu.title.controller").append("..."), (button) -> {
|
this.addDrawableChild(new ButtonWidget(j, k, 150, 20, new TranslatableText("midnightcontrols.menu.title.controller").append("..."), (button) -> {
|
||||||
this.client.setScreen(new MidnightControlsSettingsScreen(this, false));
|
this.client.setScreen(new MidnightControlsSettingsScreen(this, false));
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,8 +10,7 @@
|
|||||||
package eu.midnightdust.midnightcontrols.client.mixin;
|
package eu.midnightdust.midnightcontrols.client.mixin;
|
||||||
|
|
||||||
import net.minecraft.client.option.GameOptions;
|
import net.minecraft.client.option.GameOptions;
|
||||||
import net.minecraft.client.option.SimpleOption;
|
import net.minecraft.client.option.Option;
|
||||||
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.injection.At;
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
@@ -26,11 +25,11 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
|||||||
@Mixin(GameOptions.class)
|
@Mixin(GameOptions.class)
|
||||||
public abstract class GameOptionsMixin {
|
public abstract class GameOptionsMixin {
|
||||||
|
|
||||||
@Shadow public abstract SimpleOption<Boolean> getAutoJump();
|
@Shadow public boolean autoJump;
|
||||||
|
|
||||||
@Inject(method = "load", at = @At("HEAD"))
|
@Inject(method = "load", at = @At("HEAD"))
|
||||||
public void onInit(CallbackInfo ci) {
|
public void onInit(CallbackInfo ci) {
|
||||||
// Set default value of the Auto-Jump option to false.
|
// Set default value of the Auto-Jump option to false.
|
||||||
getAutoJump().setValue(false);
|
autoJump = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ 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 net.minecraft.text.Text;
|
||||||
|
import net.minecraft.text.TranslatableText;
|
||||||
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;
|
||||||
@@ -59,9 +60,10 @@ 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();
|
||||||
if (client.options.getGuiScale().getValue() >= 4) {
|
if (client.options.guiScale >= 4) {
|
||||||
scale = 0.75f;
|
scale = 0.75f;
|
||||||
} else scale = 1f;
|
} else scale = 1f;
|
||||||
|
matrices.push();
|
||||||
if (scale != 1f) matrices.scale(scale,scale,scale);
|
if (scale != 1f) matrices.scale(scale,scale,scale);
|
||||||
int x = 2, y = (int) (client.getWindow().getScaledHeight() * (1 / scale) - 2 - MidnightControlsRenderer.ICON_SIZE);
|
int x = 2, y = (int) (client.getWindow().getScaledHeight() * (1 / scale) - 2 - MidnightControlsRenderer.ICON_SIZE);
|
||||||
if (MidnightControlsCompat.isEMIPresent()) {
|
if (MidnightControlsCompat.isEMIPresent()) {
|
||||||
@@ -74,13 +76,13 @@ public abstract class HandledScreenMixin implements HandledScreenAccessor {
|
|||||||
y -= 24;
|
y -= 24;
|
||||||
}
|
}
|
||||||
if (MidnightControlsCompat.isEMIPresent()) {
|
if (MidnightControlsCompat.isEMIPresent()) {
|
||||||
x = (int) (client.getWindow().getScaledWidth() * (1 / scale) - 55 - client.textRenderer.getWidth(Text.translatable("midnightcontrols.action.pickup"))
|
x = (int) (client.getWindow().getScaledWidth() * (1 / scale) - 55 - client.textRenderer.getWidth(new TranslatableText("midnightcontrols.action.pickup"))
|
||||||
* (1 / scale) - client.textRenderer.getWidth(Text.translatable("midnightcontrols.action.quick_move"))
|
* (1 / scale) - client.textRenderer.getWidth(new TranslatableText("midnightcontrols.action.quick_move"))
|
||||||
- MidnightControlsRenderer.getBindingIconWidth(ButtonBinding.TAKE) - MidnightControlsRenderer.getBindingIconWidth(ButtonBinding.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);
|
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);
|
||||||
if (scale != 1f) matrices.scale(1,1,1);
|
matrices.pop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ public abstract class MinecraftClientMixin {
|
|||||||
@Shadow
|
@Shadow
|
||||||
private int itemUseCooldown;
|
private int itemUseCooldown;
|
||||||
|
|
||||||
|
@Shadow @Nullable public ClientWorld world;
|
||||||
private BlockPos midnightcontrols$lastTargetPos;
|
private BlockPos midnightcontrols$lastTargetPos;
|
||||||
private Vec3d midnightcontrols$lastPos;
|
private Vec3d midnightcontrols$lastPos;
|
||||||
private Direction midnightcontrols$lastTargetSide;
|
private Direction midnightcontrols$lastTargetSide;
|
||||||
@@ -150,7 +151,7 @@ public abstract class MinecraftClientMixin {
|
|||||||
hitResult = mod.reacharound.withSideForReacharound(hitResult, stackInHand);
|
hitResult = mod.reacharound.withSideForReacharound(hitResult, stackInHand);
|
||||||
|
|
||||||
int previousStackCount = stackInHand.getCount();
|
int previousStackCount = stackInHand.getCount();
|
||||||
var result = this.interactionManager.interactBlock(this.player, hand, hitResult);
|
var result = this.interactionManager.interactBlock(this.player, world, hand, hitResult);
|
||||||
if (result.isAccepted()) {
|
if (result.isAccepted()) {
|
||||||
if (result.shouldSwingHand()) {
|
if (result.shouldSwingHand()) {
|
||||||
this.player.swingHand(hand);
|
this.player.swingHand(hand);
|
||||||
|
|||||||
@@ -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();
|
||||||
|
}
|
||||||
@@ -16,6 +16,7 @@ import net.minecraft.client.gui.screen.Screen;
|
|||||||
import net.minecraft.client.option.KeyBinding;
|
import net.minecraft.client.option.KeyBinding;
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
import net.minecraft.text.Text;
|
import net.minecraft.text.Text;
|
||||||
|
import net.minecraft.text.TranslatableText;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
@@ -49,7 +50,7 @@ public class KeyBindingRingAction extends RingAction {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawIcon(@NotNull MatrixStack matrices, @NotNull TextRenderer textRenderer, int x, int y, boolean hovered) {
|
public void drawIcon(@NotNull MatrixStack matrices, @NotNull TextRenderer textRenderer, int x, int y, boolean hovered) {
|
||||||
drawCenteredText(matrices, textRenderer, Text.translatable(this.getName()), x + 25, y + 25 - textRenderer.fontHeight / 2, 0xffffff);
|
drawCenteredText(matrices, textRenderer, new TranslatableText(this.getName()), x + 25, y + 25 - textRenderer.fontHeight / 2, 0xffffff);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static class Factory implements RingAction.Factory {
|
protected static class Factory implements RingAction.Factory {
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import net.minecraft.client.gui.DrawableHelper;
|
|||||||
import net.minecraft.client.gui.screen.Screen;
|
import net.minecraft.client.gui.screen.Screen;
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
import net.minecraft.text.Text;
|
import net.minecraft.text.Text;
|
||||||
|
import net.minecraft.text.TranslatableText;
|
||||||
import org.aperlambda.lambdacommon.utils.Nameable;
|
import org.aperlambda.lambdacommon.utils.Nameable;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
@@ -42,7 +43,7 @@ public abstract class RingAction extends DrawableHelper implements Nameable {
|
|||||||
* @return the text name
|
* @return the text name
|
||||||
*/
|
*/
|
||||||
public Text getTextName() {
|
public Text getTextName() {
|
||||||
return Text.translatable(this.getName());
|
return new TranslatableText(this.getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
package eu.midnightdust.midnightcontrols.client.ring;
|
package eu.midnightdust.midnightcontrols.client.ring;
|
||||||
|
|
||||||
import net.minecraft.text.Text;
|
import net.minecraft.text.Text;
|
||||||
|
import net.minecraft.text.TranslatableText;
|
||||||
import org.aperlambda.lambdacommon.utils.Nameable;
|
import org.aperlambda.lambdacommon.utils.Nameable;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
@@ -30,7 +31,7 @@ public enum RingButtonMode implements Nameable {
|
|||||||
|
|
||||||
RingButtonMode(@NotNull String name) {
|
RingButtonMode(@NotNull String name) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.text = Text.translatable(this.getTranslationKey());
|
this.text = new TranslatableText(this.getTranslationKey());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
|
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",
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
"key.midnightcontrols.look_left": "Look left",
|
"key.midnightcontrols.look_left": "Look left",
|
||||||
"key.midnightcontrols.look_right": "Look right",
|
"key.midnightcontrols.look_right": "Look right",
|
||||||
"key.midnightcontrols.look_up": "Look up",
|
"key.midnightcontrols.look_up": "Look up",
|
||||||
"key.midnightcontrols.ring": "Show controls ring",
|
"key.midnightcontrols.ring": "Show radial menu",
|
||||||
"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",
|
||||||
@@ -80,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",
|
||||||
@@ -88,19 +90,19 @@
|
|||||||
"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 4",
|
||||||
"midnightcontrols.controller_type.dualsense": "DualSense",
|
"midnightcontrols.controller_type.dualsense": "DualSense",
|
||||||
"midnightcontrols.controller_type.switch": "Switch",
|
"midnightcontrols.controller_type.switch": "Switch (Pro) Controller",
|
||||||
"midnightcontrols.controller_type.xbox": "Xbox",
|
"midnightcontrols.controller_type.xbox": "Xbox One/Series Controller",
|
||||||
"midnightcontrols.controller_type.xbox_360": "Xbox 360",
|
"midnightcontrols.controller_type.xbox_360": "Xbox 360 Controller",
|
||||||
"midnightcontrols.controller_type.steam_controller": "Steam Controller",
|
"midnightcontrols.controller_type.steam_controller": "Steam Controller",
|
||||||
"midnightcontrols.controller_type.steam_deck": "Steam Deck",
|
"midnightcontrols.controller_type.steam_deck": "Steam Deck",
|
||||||
"midnightcontrols.controller_type.ouya": "OUYA",
|
"midnightcontrols.controller_type.ouya": "OUYA Controller",
|
||||||
"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 (WIP)",
|
"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",
|
||||||
"midnightcontrols.menu.auto_switch_mode": "Auto Switch Mode",
|
"midnightcontrols.menu.auto_switch_mode": "Auto Switch Mode",
|
||||||
"midnightcontrols.menu.controller": "Controller",
|
"midnightcontrols.menu.controller": "Controller",
|
||||||
@@ -116,7 +118,7 @@
|
|||||||
"midnightcontrols.menu.invert_right_x_axis": "Invert Right X",
|
"midnightcontrols.menu.invert_right_x_axis": "Invert Right X",
|
||||||
"midnightcontrols.menu.invert_right_y_axis": "Invert Right Y",
|
"midnightcontrols.menu.invert_right_y_axis": "Invert Right Y",
|
||||||
"midnightcontrols.menu.keyboard_controls": "Keyboard Controls...",
|
"midnightcontrols.menu.keyboard_controls": "Keyboard Controls...",
|
||||||
"midnightcontrols.menu.left_dead_zone": "Left Dead Zone",
|
"midnightcontrols.menu.left_dead_zone": "Left Stick Dead Zone",
|
||||||
"midnightcontrols.menu.mappings.open_input_str": "Open Mappings File Editor",
|
"midnightcontrols.menu.mappings.open_input_str": "Open Mappings File Editor",
|
||||||
"midnightcontrols.menu.max_left_x_value": "Left X Axis Max Value",
|
"midnightcontrols.menu.max_left_x_value": "Left X Axis Max Value",
|
||||||
"midnightcontrols.menu.max_left_y_value": "Left Y Axis Max Value",
|
"midnightcontrols.menu.max_left_y_value": "Left Y Axis Max Value",
|
||||||
@@ -126,14 +128,14 @@
|
|||||||
"midnightcontrols.menu.reacharound.horizontal": "Front Block Placing",
|
"midnightcontrols.menu.reacharound.horizontal": "Front Block Placing",
|
||||||
"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 Stick Dead Zone",
|
||||||
"midnightcontrols.menu.rotation_speed": "X Axis Rotation Speed",
|
"midnightcontrols.menu.rotation_speed": "X Axis Rotation Speed",
|
||||||
"midnightcontrols.menu.y_axis_rotation_speed": "Y 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",
|
||||||
"midnightcontrols.menu.title.controller": "Controller Options",
|
"midnightcontrols.menu.title.controller": "Controller Options",
|
||||||
"midnightcontrols.menu.title.controller_controls": "Controller Controls",
|
"midnightcontrols.menu.title.controller_controls": "Controls",
|
||||||
"midnightcontrols.menu.title.gameplay": "Gameplay Options",
|
"midnightcontrols.menu.title.gameplay": "Gameplay Options",
|
||||||
"midnightcontrols.menu.title.general": "General Options",
|
"midnightcontrols.menu.title.general": "General Options",
|
||||||
"midnightcontrols.menu.title.hud": "HUD Options",
|
"midnightcontrols.menu.title.hud": "HUD Options",
|
||||||
@@ -144,18 +146,18 @@
|
|||||||
"midnightcontrols.menu.virtual_mouse.skin": "Virtual Mouse Skin",
|
"midnightcontrols.menu.virtual_mouse.skin": "Virtual Mouse Skin",
|
||||||
"midnightcontrols.narrator.unbound": "Unbound %s",
|
"midnightcontrols.narrator.unbound": "Unbound %s",
|
||||||
"midnightcontrols.not_bound": "Not bound",
|
"midnightcontrols.not_bound": "Not bound",
|
||||||
"midnightcontrols.tooltip.analog_movement": "Enables analog movement when possible.",
|
"midnightcontrols.tooltip.analog_movement": "When possible, enables analog movement.",
|
||||||
"midnightcontrols.tooltip.auto_switch_mode": "If the controls mode should be switched to Controller automatically if one is connected.",
|
"midnightcontrols.tooltip.auto_switch_mode": "Whether the controls mode should be switched to Controller automatically if one is connected.",
|
||||||
"midnightcontrols.tooltip.controller2": "Second controller to use, which allows Joy-Cons support for example.",
|
"midnightcontrols.tooltip.controller2": "Second controller to use, which allows (for example) Joy-Cons support.",
|
||||||
"midnightcontrols.tooltip.controller_type": "The controller type to display the correct buttons.",
|
"midnightcontrols.tooltip.controller_type": "The controller type you're using (needed 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.double_tap_to_sprint": "Toggles whether the Walk Forwards key makes the player sprint when double-tapped quickly",
|
||||||
"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.",
|
||||||
"midnightcontrols.tooltip.hud_enable": "Toggles the on-screen controller button indicator.",
|
"midnightcontrols.tooltip.hud_enable": "Toggles the on-screen controller button indicator.",
|
||||||
"midnightcontrols.tooltip.hud_side": "The position of the HUD.",
|
"midnightcontrols.tooltip.hud_side": "The position of the HUD.",
|
||||||
"midnightcontrols.tooltip.left_dead_zone": "The dead zone for the controller's left analogue stick.",
|
"midnightcontrols.tooltip.left_dead_zone": "The dead zone for the controller's left analog stick.",
|
||||||
"midnightcontrols.tooltip.max_left_x_value": "Changes what the mod considers the highest value for the left X axis. Useful if your axis does not use the full range and seems slow.",
|
"midnightcontrols.tooltip.max_left_x_value": "Changes what the mod considers the highest value for the left X axis. Useful if your axis does not use the full range and seems slow.",
|
||||||
"midnightcontrols.tooltip.max_left_y_value": "Changes what the mod considers the highest value for the left Y axis. Useful if your axis does not use the full range and seems slow.",
|
"midnightcontrols.tooltip.max_left_y_value": "Changes what the mod considers the highest value for the left Y axis. Useful if your axis does not use the full range and seems slow.",
|
||||||
"midnightcontrols.tooltip.max_right_x_value": "Changes what the mod considers the highest value for the right X axis. Useful if your axis does not use the full range and seems slow.",
|
"midnightcontrols.tooltip.max_right_x_value": "Changes what the mod considers the highest value for the right X axis. Useful if your axis does not use the full range and seems slow.",
|
||||||
@@ -164,11 +166,11 @@
|
|||||||
"midnightcontrols.tooltip.reacharound.horizontal": "Enables front block placing, §cmight be considered cheating on some servers§r.",
|
"midnightcontrols.tooltip.reacharound.horizontal": "Enables front block placing, §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.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 analog stick.",
|
||||||
"midnightcontrols.tooltip.rotation_speed": "The camera X Axis rotation speed in controller mode.",
|
"midnightcontrols.tooltip.rotation_speed": "The camera's X Axis rotation speed in controller mode.",
|
||||||
"midnightcontrols.tooltip.y_axis_rotation_speed": "The camera Y Axis rotation speed in controller mode.",
|
"midnightcontrols.tooltip.y_axis_rotation_speed": "The camera's Y Axis rotation speed in controller mode.",
|
||||||
"midnightcontrols.tooltip.unfocused_input": "Allow controller input when the window is not focused.",
|
"midnightcontrols.tooltip.unfocused_input": "Allows 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": "Enables the virtual mouse which is useful ie during splitscreen.",
|
||||||
"midnightcontrols.virtual_mouse.skin.default_light": "Default Light",
|
"midnightcontrols.virtual_mouse.skin.default_light": "Default Light",
|
||||||
"midnightcontrols.virtual_mouse.skin.default_dark": "Default Dark",
|
"midnightcontrols.virtual_mouse.skin.default_dark": "Default Dark",
|
||||||
"midnightcontrols.virtual_mouse.skin.second_light": "Second Light",
|
"midnightcontrols.virtual_mouse.skin.second_light": "Second Light",
|
||||||
|
|||||||
@@ -3,11 +3,12 @@
|
|||||||
"key.midnightcontrols.look_down": "Смотреть Вниз",
|
"key.midnightcontrols.look_down": "Смотреть Вниз",
|
||||||
"key.midnightcontrols.look_left": "Смотреть Налево",
|
"key.midnightcontrols.look_left": "Смотреть Налево",
|
||||||
"key.midnightcontrols.look_right": "Смотреть Направо",
|
"key.midnightcontrols.look_right": "Смотреть Направо",
|
||||||
"key.midnightcontrols.look_up": "Смотерть Вверх",
|
"key.midnightcontrols.look_up": "Смотрeть Вверх",
|
||||||
"key.midnightcontrols.ring": "Показать Кольцо Управления",
|
"key.midnightcontrols.ring": "Показать Кольцо Управления",
|
||||||
"midnightcontrols.action.attack": "Атаковать",
|
"midnightcontrols.action.attack": "Атаковать",
|
||||||
"midnightcontrols.action.back": "Назад",
|
"midnightcontrols.action.back": "Назад",
|
||||||
"midnightcontrols.action.chat": "Открыть Чат",
|
"midnightcontrols.action.chat": "Открыть Чат",
|
||||||
|
"midnightcontrols.action.debug_screen": "Открыть Отладку (F3)",
|
||||||
"midnightcontrols.action.drop_item": "Выбросить Предмет",
|
"midnightcontrols.action.drop_item": "Выбросить Предмет",
|
||||||
"midnightcontrols.action.exit": "Выйти",
|
"midnightcontrols.action.exit": "Выйти",
|
||||||
"midnightcontrols.action.forward": "Вперед",
|
"midnightcontrols.action.forward": "Вперед",
|
||||||
@@ -18,7 +19,7 @@
|
|||||||
"midnightcontrols.action.jump": "Прыжок",
|
"midnightcontrols.action.jump": "Прыжок",
|
||||||
"midnightcontrols.action.left": "Налево",
|
"midnightcontrols.action.left": "Налево",
|
||||||
"midnightcontrols.action.pause_game": "Приостановить игру",
|
"midnightcontrols.action.pause_game": "Приостановить игру",
|
||||||
"midnightcontrols.action.pick_block": "Выбор Блок",
|
"midnightcontrols.action.pick_block": "Выбор Блока",
|
||||||
"midnightcontrols.action.pickup": "Взять Половину",
|
"midnightcontrols.action.pickup": "Взять Половину",
|
||||||
"midnightcontrols.action.pickup_all": "Взять Всё",
|
"midnightcontrols.action.pickup_all": "Взять Всё",
|
||||||
"midnightcontrols.action.place": "Поставить",
|
"midnightcontrols.action.place": "Поставить",
|
||||||
@@ -26,13 +27,19 @@
|
|||||||
"midnightcontrols.action.quick_move": "Переложить",
|
"midnightcontrols.action.quick_move": "Переложить",
|
||||||
"midnightcontrols.action.right": "Направо",
|
"midnightcontrols.action.right": "Направо",
|
||||||
"midnightcontrols.action.screenshot": "Сделать Скриншот",
|
"midnightcontrols.action.screenshot": "Сделать Скриншот",
|
||||||
|
"midnightcontrols.action.slot_up": "Двинуть На Слот Вверх",
|
||||||
|
"midnightcontrols.action.slot_down": "Двинуть На Слот Вниз",
|
||||||
|
"midnightcontrols.action.slot_left": "Двинуть На Слот Влево",
|
||||||
|
"midnightcontrols.action.slot_right": "Двинуть На Слот Вправо",
|
||||||
"midnightcontrols.action.sneak": "Красться",
|
"midnightcontrols.action.sneak": "Красться",
|
||||||
"midnightcontrols.action.sprint": "Бег",
|
"midnightcontrols.action.sprint": "Бег",
|
||||||
"midnightcontrols.action.swap_hands": "Поменять Руку",
|
"midnightcontrols.action.swap_hands": "Поменять Руку",
|
||||||
"midnightcontrols.action.toggle_perspective": "Переключить Преспективу",
|
"midnightcontrols.action.toggle_perspective": "Переключить Перспективу",
|
||||||
"midnightcontrols.action.toggle_smooth_camera": "Переключить Кинематографическую Камеру",
|
"midnightcontrols.action.toggle_smooth_camera": "Переключить Кинематографическую Камеру",
|
||||||
"midnightcontrols.action.page_back": "Предыдущая Страница",
|
"midnightcontrols.action.page_back": "Предыдущая Страница",
|
||||||
"midnightcontrols.action.page_next": "Следующая Страница",
|
"midnightcontrols.action.page_next": "Следующая Страница",
|
||||||
|
"midnightcontrols.action.tab_back": "Предыдущая Секция",
|
||||||
|
"midnightcontrols.action.tab_next": "Следующая Секция",
|
||||||
"midnightcontrols.action.take": "Взять Предмет",
|
"midnightcontrols.action.take": "Взять Предмет",
|
||||||
"midnightcontrols.action.take_all": "Взять Стак",
|
"midnightcontrols.action.take_all": "Взять Стак",
|
||||||
"midnightcontrols.action.use": "Использовать",
|
"midnightcontrols.action.use": "Использовать",
|
||||||
@@ -40,8 +47,9 @@
|
|||||||
"midnightcontrols.action.zoom_in": "Увеличить Масштаб",
|
"midnightcontrols.action.zoom_in": "Увеличить Масштаб",
|
||||||
"midnightcontrols.action.zoom_out": "Уменьшить Масштаб",
|
"midnightcontrols.action.zoom_out": "Уменьшить Масштаб",
|
||||||
"midnightcontrols.action.zoom_reset": "Сбросить Масштаб",
|
"midnightcontrols.action.zoom_reset": "Сбросить Масштаб",
|
||||||
"midnightcontrols.action.key.emotecraft.fastchoose": "Быстрый Выбор Эмоции",
|
"midnightcontrols.action.emi_page_left": "Предыдущая Страница",
|
||||||
"midnightcontrols.action.key.emotecraft.stop": "Прекратить Эмоцию",
|
"midnightcontrols.action.emi_page_right": "Следующая Страница",
|
||||||
|
"midnightcontrols.category.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",
|
||||||
@@ -79,15 +87,18 @@
|
|||||||
"midnightcontrols.controller.mappings.error": "Ошибка при загрузке раскладки.",
|
"midnightcontrols.controller.mappings.error": "Ошибка при загрузке раскладки.",
|
||||||
"midnightcontrols.controller.mappings.error.write": "Ошибка при записи раскладки в файл.",
|
"midnightcontrols.controller.mappings.error.write": "Ошибка при записи раскладки в файл.",
|
||||||
"midnightcontrols.controller.mappings.updated": "Раскладка обновлена!",
|
"midnightcontrols.controller.mappings.updated": "Раскладка обновлена!",
|
||||||
"midnightcontrols.controller_type.default": "По обычному",
|
"midnightcontrols.controller_type.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": "Клавиатура/Мышь",
|
"midnightcontrols.controls_mode.default": "Клавиатура/Мышь",
|
||||||
"midnightcontrols.controls_mode.controller": "Контроллер",
|
"midnightcontrols.controls_mode.controller": "Контроллер",
|
||||||
"midnightcontrols.controls_mode.touchscreen": "Сенсорный Экран",
|
"midnightcontrols.controls_mode.touchscreen": "Сенсорный Экран (Разраб.)",
|
||||||
"midnightcontrols.hud_side.left": "Больше Налево",
|
"midnightcontrols.hud_side.left": "Больше Налево",
|
||||||
"midnightcontrols.hud_side.right": "Больше Направо",
|
"midnightcontrols.hud_side.right": "Больше Направо",
|
||||||
"midnightcontrols.menu.analog_movement": "Аналоговое Движение",
|
"midnightcontrols.menu.analog_movement": "Аналоговое Движение",
|
||||||
|
|||||||
|
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 |
|
Before Width: | Height: | Size: 9.8 KiB 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: 6.4 KiB |
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"pack": {
|
"pack": {
|
||||||
"pack_format": 9,
|
"pack_format": 8,
|
||||||
"description": "Makes the controller buttons look like from Bedrock Edition"
|
"description": "Makes controller tooltips use similar icons to Bedrock Edition"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
|
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: 11 KiB |
6
src/main/resources/resourcepacks/legacy/pack.mcmeta
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"pack": {
|
||||||
|
"pack_format": 8,
|
||||||
|
"description": "Makes controller tooltips use similar icons to Legacy Console Edition"
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
src/main/resources/resourcepacks/legacy/pack.png
Normal file
|
After Width: | Height: | Size: 14 KiB |