use of com.almuradev.almura.feature.storage.block.StorageBlock in project Almura by AlmuraDev.
the class MultiSlotTileEntity method onLoad.
@Override
public void onLoad() {
final IMultiSlotItemHandler itemHandler = (IMultiSlotItemHandler) this.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null);
final IBlockState state = this.world.getBlockState(this.pos);
final Block block = state.getBlock();
if (block instanceof StorageBlock) {
final int slotCount = ((StorageBlock) block).getSlotCount();
itemHandler.resize(slotCount);
}
}
Aggregations