1
0
forked from Clones/Controlify

✏️ Remove vanilla override from show player list

This commit is contained in:
isXander
2023-05-07 12:46:21 +01:00
parent 09f23ff725
commit 63ebf2dc61
4 changed files with 26 additions and 1 deletions

View File

@ -18,6 +18,7 @@ public class InGameInputHandler {
private final Minecraft minecraft;
private double lookInputX, lookInputY;
private boolean shouldShowPlayerList;
public InGameInputHandler(Controller<?, ?> controller) {
this.controller = controller;
@ -38,6 +39,8 @@ public class InGameInputHandler {
}
protected void handleKeybinds() {
shouldShowPlayerList = false;
if (Minecraft.getInstance().screen != null)
return;
@ -63,6 +66,8 @@ public class InGameInputHandler {
if (controller.bindings().TOGGLE_HUD_VISIBILITY.justPressed()) {
minecraft.options.hideGui = !minecraft.options.hideGui;
}
shouldShowPlayerList = controller.bindings().SHOW_PLAYER_LIST.held();
}
protected void handlePlayerLookInput() {
@ -131,6 +136,10 @@ public class InGameInputHandler {
}
}
public boolean shouldShowPlayerList() {
return this.shouldShowPlayerList;
}
public record FunctionalLookInputModifier(BiFunction<Float, Controller<?, ?>, Float> x, BiFunction<Float, Controller<?, ?>, Float> y) implements LookInputModifier {
@Override
public float modifyX(float x, Controller<?, ?> controller) {