mirror of
https://github.com/GTNewHorizons/StorageDrawers.git
synced 2026-11-27 23:45:36 +00:00
Now we can input into all drawers
This commit is contained in:
1 parent
b74c2d127b
commit
34f2d9c1f3
1 file changed
+10
-2
@@ -10,6 +10,8 @@ import net.minecraft.item.ItemStack;
|
||||
|
||||
public class StorageInventory implements IDrawerInventory
|
||||
{
|
||||
private static final int[] emptySlots = new int[0];
|
||||
|
||||
private final IDrawerGroup group;
|
||||
private final ISideManager sideMan;
|
||||
|
||||
@@ -26,7 +28,7 @@ public class StorageInventory implements IDrawerInventory
|
||||
|
||||
@Override
|
||||
public int getDrawerSlot (int inventorySlot) {
|
||||
return inventorySlot % SlotType.values.length;
|
||||
return inventorySlot % group.getDrawerCount();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -41,7 +43,13 @@ public class StorageInventory implements IDrawerInventory
|
||||
|
||||
@Override
|
||||
public int[] getAccessibleSlotsFromSide (int side) {
|
||||
return sideMan.getSlotsForSide(side);
|
||||
int[] autoSides = sideMan.getSlotsForSide(side);
|
||||
for (int aside : autoSides) {
|
||||
if (side == aside)
|
||||
return inventorySlots;
|
||||
}
|
||||
|
||||
return emptySlots;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user