More Peripherals

More Peripherals

219k Downloads

Java throws ArrayIndexOutOfBountsException when using trade with the offer index of the last offer

leo3065 opened this issue ยท 1 comments

commented

The screenshot is shown below. The villager associated with the trading interface has 8 offers.

image

I think the issue comes from these lines. The > in trade-1 > tileEntity.villager.getOffers().stream().toList().size() should be >= instead?

commented

hello, i missed a -1 to the size of the list, since list refers to the total number of objects inside it not the indexing itself, its fixed now (i think) soon i'm going to push a new version with some new stuff and fixes for old stuff.