use of net.minecraftforge.items.IItemHandlerModifiable in project MinecraftForge by MinecraftForge.
the class CombinedInvWrapper method getSlotLimit.
@Override
public int getSlotLimit(int slot) {
int index = getIndexForSlot(slot);
IItemHandlerModifiable handler = getHandlerFromIndex(index);
int localSlot = getSlotFromIndex(slot, index);
return handler.getSlotLimit(localSlot);
}
use of net.minecraftforge.items.IItemHandlerModifiable in project MinecraftForge by MinecraftForge.
the class CombinedInvWrapper method insertItem.
@Override
@Nonnull
public ItemStack insertItem(int slot, @Nonnull ItemStack stack, boolean simulate) {
int index = getIndexForSlot(slot);
IItemHandlerModifiable handler = getHandlerFromIndex(index);
slot = getSlotFromIndex(slot, index);
return handler.insertItem(slot, stack, simulate);
}
use of net.minecraftforge.items.IItemHandlerModifiable in project MinecraftForge by MinecraftForge.
the class CombinedInvWrapper method isItemValid.
@Override
public boolean isItemValid(int slot, @Nonnull ItemStack stack) {
int index = getIndexForSlot(slot);
IItemHandlerModifiable handler = getHandlerFromIndex(index);
int localSlot = getSlotFromIndex(slot, index);
return handler.isItemValid(localSlot, stack);
}
use of net.minecraftforge.items.IItemHandlerModifiable in project MinecraftForge by MinecraftForge.
the class CombinedInvWrapper method setStackInSlot.
@Override
public void setStackInSlot(int slot, @Nonnull ItemStack stack) {
int index = getIndexForSlot(slot);
IItemHandlerModifiable handler = getHandlerFromIndex(index);
slot = getSlotFromIndex(slot, index);
handler.setStackInSlot(slot, stack);
}
use of net.minecraftforge.items.IItemHandlerModifiable in project MinecraftForge by MinecraftForge.
the class CombinedInvWrapper method extractItem.
@Override
@Nonnull
public ItemStack extractItem(int slot, int amount, boolean simulate) {
int index = getIndexForSlot(slot);
IItemHandlerModifiable handler = getHandlerFromIndex(index);
slot = getSlotFromIndex(slot, index);
return handler.extractItem(slot, amount, simulate);
}
Aggregations