
Experience Bottler stores max 1 item per slot and deletes empty bottles in some cases
cout970 opened this issue ยท 1 comments
When using the Experience Bottler peripheral, bottleXP(from, to, xp_collector)
it doesn't stack ip the xp bottles, instead, it saves one item per slot until there is no more space and uses all the empty bottles anyway.
I found the problem at line 71:
https://github.com/JheffersonMarques/MorePeripherals/blob/1.20/src/main/java/com/hakimen/peripherals/peripherals/XPBottlerPeripheral.java#L71C121-L71C163
The method equals() returns false even if the slot has the right item, maybe because it's also matching the stack size. It should be getStackInSlot(i).getItem() == Items.EXPERIENCE_BOTTLE
.
The issue with deleting empty bottles comes from the fact that the empty bottle is removed before anything, and then an attempt to insert experience bottle is made, if the attempt fails, e.g. no space left, the bottle is gone and no output was produced.