Search in sources :

Example 1 with SingleSlotItemHandler

use of com.almuradev.almura.shared.capability.impl.SingleSlotItemHandler in project Almura by AlmuraDev.

the class CacheBlock method createNewTileEntity.

@Nullable
@Override
public TileEntity createNewTileEntity(World worldIn, int meta) {
    final SingleSlotTileEntity cte = new SingleSlotTileEntity();
    final ISingleSlotItemHandler itemHandler = (ISingleSlotItemHandler) cte.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null);
    ((SingleSlotItemHandler) itemHandler).setSlotLimit(this.slotLimit);
    return cte;
}
Also used : SingleSlotTileEntity(com.almuradev.almura.shared.tileentity.SingleSlotTileEntity) ISingleSlotItemHandler(com.almuradev.almura.shared.capability.ISingleSlotItemHandler) SingleSlotItemHandler(com.almuradev.almura.shared.capability.impl.SingleSlotItemHandler) ISingleSlotItemHandler(com.almuradev.almura.shared.capability.ISingleSlotItemHandler) Nullable(javax.annotation.Nullable)

Aggregations

ISingleSlotItemHandler (com.almuradev.almura.shared.capability.ISingleSlotItemHandler)1 SingleSlotItemHandler (com.almuradev.almura.shared.capability.impl.SingleSlotItemHandler)1 SingleSlotTileEntity (com.almuradev.almura.shared.tileentity.SingleSlotTileEntity)1 Nullable (javax.annotation.Nullable)1