This commit is contained in:
Motschen
2022-08-03 12:42:23 +02:00
parent 070083ab6e
commit 99298b2bc4
4 changed files with 7 additions and 7 deletions

View File

@@ -195,9 +195,9 @@ public class MidnightControlsClient extends MidnightControls implements ClientMo
// client.setScreen(new RingScreen());
// }
if (client.world != null && MidnightControlsConfig.enableHints && !MidnightControlsConfig.autoSwitchMode && MidnightControlsConfig.controlsMode == ControlsMode.DEFAULT && MidnightControlsConfig.getController().isGamepad()) {
client.getToastManager().add(SystemToast.create(client, SystemToast.Type.PERIODIC_NOTIFICATION, Text.translatable("midnightcontrols.controller.tutorial.title"),
Text.translatable("midnightcontrols.controller.tutorial.description", Text.translatable("options.title"), Text.translatable("controls.title"),
Text.translatable("midnightcontrols.menu.title.controller"))));
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();
}

View File

@@ -91,7 +91,7 @@ public final class MovementHandler implements PressAction {
// Slowing down if sneaking or crawling.
if (client.player.shouldSlowDown()) {
this.movementForward *= MathHelper.clamp(0.3F + EnchantmentHelper.getSwiftSneakSpeedBoost(client.player), 0.0F, 1.0F);
this.movementForward *= MathHelper.clamp(0.3F, 0.0F, 1.0F);
}
} else {
// Handle sideways movement.
@@ -101,7 +101,7 @@ public final class MovementHandler implements PressAction {
// Slowing down if sneaking or crawling.
if (client.player.shouldSlowDown()) {
this.movementSideways *= MathHelper.clamp(0.3F + EnchantmentHelper.getSwiftSneakSpeedBoost(client.player), 0.0F, 1.0F);
this.movementSideways *= MathHelper.clamp(0.3F, 0.0F, 1.0F);
}
}

View File

@@ -1,6 +1,6 @@
{
"pack": {
"pack_format": 9,
"pack_format": 8,
"description": "Makes the controller buttons look like from Bedrock Edition"
}
}

View File

@@ -1,6 +1,6 @@
{
"pack": {
"pack_format": 9,
"pack_format": 8,
"description": "Makes the controller buttons look like from Console Edition"
}
}