Dont send repeat action

Dieser Commit ist enthalten in:
zOnlyKroks 2022-12-23 20:28:39 +01:00
Ursprung 2bc8b1a9fb
Commit dbcf31c629
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen

Datei anzeigen

@ -21,7 +21,7 @@ public class KeyboardMixin {
@Inject(method = "onKey", at = @At("HEAD"))
public void sendKeyPress(long window, int key, int scancode, int action, int modifiers, CallbackInfo ci) {
MinecraftClient client = ((Keyboard) (Object)this).client;
if(client.currentScreen == null) {
if(client.currentScreen == null && action != 2) {
PacketByteBuf byteBuf = new PacketByteBuf(Unpooled.buffer());
byteBuf.writeInt(key);
byteBuf.writeByte(action);