use of com.almuradev.almura.shared.tileentity.SingleSlotTileEntity in project Almura by AlmuraDev.
the class CacheBlock method getDrops.
@Override
public void getDrops(NonNullList<ItemStack> drops, IBlockAccess world, BlockPos pos, IBlockState state, int fortune) {
if (!(world instanceof WorldServer) || ((WorldServer) world).isRemote) {
return;
}
final ItemStack toDrop = new ItemStack(this, 1, 0);
drops.add(toDrop);
TileEntity te = world.getTileEntity(pos);
if (te == null) {
te = cacheTe;
}
if (te == null || !(te instanceof SingleSlotTileEntity)) {
return;
}
final SingleSlotTileEntity cte = (SingleSlotTileEntity) te;
this.addCacheToStack(toDrop, cte);
cacheTe = null;
}
Aggregations