[1.11] Your item handler is incorrect
thiakil opened this issue ยท 7 comments
com.buuz135.industrial.tile.misc.BlackHoleControllerTile.BlackHoleControllerHandler.getSlots
should be returning how many slots the inventory has, not the counts of the items within!
public interface IItemHandler
{
/**
* Returns the number of slots available
*
* @return The number of slots available
**/
int getSlots();
Black Hole controller provides that number to make available all the items provided by the black hole units.
I haven't looked is something is wrong but that's why it is coded like that. https://github.com/Buuz135/Industrial-Foregoing/blob/1.11.2/src/main/java/com/buuz135/industrial/tile/misc/BlackHoleControllerTile.java#L185
See the javadoc comment I quoted; the purpose of the function is to determine the number of slots, not items
Im not counting the items, The Black Hole Controller holds Black Hole Units (BHU)
that have stored in the NBT a max Integer.MAX_INT
of items. My getSlots()
gets the number of items of each BHU and divides it with it stackSize
to simulate how many slot would have.
Then perhaps your extractItem is wrong as iteration of the slots fails. See https://gist.githubusercontent.com/leagris/77c32db6e2519d9edf10ca10e5f837fe/raw/671effe58bb04a0e9f6e9aa5471cde0205c1a354/fml-server-3.log
Yes it is . As I add extra slots as a buffer the last slots will throw an error.