3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-11-20 06:50:08 +01:00

Gracefully handle empty first input item in trades

Fixes #3885
Dieser Commit ist enthalten in:
Nassim Jahnke 2024-05-27 22:15:40 +02:00
Ursprung 869755ec4a
Commit 3f7d286606
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: EF6771C01F6EF02F

Datei anzeigen

@ -301,7 +301,7 @@ public final class BlockItemPacketRewriter1_20_5 extends ItemRewriter<Clientboun
wrapper.passthrough(Types.VAR_INT); // Container id wrapper.passthrough(Types.VAR_INT); // Container id
final int size = wrapper.passthrough(Types.VAR_INT); final int size = wrapper.passthrough(Types.VAR_INT);
for (int i = 0; i < size; i++) { for (int i = 0; i < size; i++) {
final Item input = handleItemToClient(wrapper.user(), wrapper.read(Types.ITEM1_20_2)); Item input = handleNonNullItemToClient(wrapper.user(), wrapper.read(Types.ITEM1_20_2));
wrapper.write(Types1_20_5.ITEM_COST, input); wrapper.write(Types1_20_5.ITEM_COST, input);
final Item output = handleNonNullItemToClient(wrapper.user(), wrapper.read(Types.ITEM1_20_2)); final Item output = handleNonNullItemToClient(wrapper.user(), wrapper.read(Types.ITEM1_20_2));