Fix trade index in VillagerInventory

This commit is contained in:
TheMode 2021-05-30 16:33:02 +02:00
parent ffca5eea00
commit c080750a88

View File

@ -23,7 +23,7 @@ public class VillagerInventory extends Inventory {
final int length = oldTrades.length + 1;
TradeListPacket.Trade[] trades = new TradeListPacket.Trade[length];
System.arraycopy(oldTrades, 0, trades, 0, oldTrades.length);
trades[length] = trade;
trades[length - 1] = trade;
this.tradeListPacket.trades = trades;
update();
}