3
0
Mirror von https://github.com/ViaVersion/ViaBackwards.git synchronisiert 2024-11-17 13:30:14 +01:00

Handle new argument types

Dieser Commit ist enthalten in:
Nassim Jahnke 2024-03-22 20:39:31 +01:00
Ursprung 0c7aa1d037
Commit 9beaf71196
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: EF6771C01F6EF02F

Datei anzeigen

@ -139,7 +139,18 @@ public final class Protocol1_20_3To1_20_5 extends BackwardsProtocol<ClientboundP
response.sendToServer(Protocol1_20_3To1_20_5.class);
});
new CommandRewriter1_19_4<>(this).registerDeclareCommands1_19(ClientboundPackets1_20_5.DECLARE_COMMANDS);
new CommandRewriter1_19_4<ClientboundPacket1_20_5>(this) {
@Override
public void handleArgument(final PacketWrapper wrapper, final String argumentType) throws Exception {
if (argumentType.equals("minecraft:loot_table")
|| argumentType.equals("minecraft:loot_predicate")
|| argumentType.equals("minecraft:loot_modifier")) {
wrapper.write(Type.VAR_INT, 0);
} else {
super.handleArgument(wrapper, argumentType);
}
}
}.registerDeclareCommands1_19(ClientboundPackets1_20_5.DECLARE_COMMANDS);
cancelClientbound(ClientboundPackets1_20_5.DEBUG_SAMPLE);
}