use of com.cjm721.overloaded.storage.IHyperType in project Overloaded by CJ-MC-Mods.
the class AbstractBlockInfiniteContainer method getDrops.
@Override
@Nonnull
public final List<ItemStack> getDrops(IBlockAccess world, BlockPos pos, @Nonnull IBlockState state, int fortune) {
IHyperType stack = getHyperStack(world, pos);
if (stack != null && stack.getAmount() != 0) {
ItemStack toDrop = new ItemStack(this, 1);
NBTTagCompound compound = new NBTTagCompound();
world.getTileEntity(pos).writeToNBT(compound);
toDrop.setTagCompound(compound);
return Collections.singletonList(toDrop);
}
return super.getDrops(world, pos, state, fortune);
}
Aggregations