public ItemStack insertItem(
final int slot,
final ItemStack stack,
final boolean simulate )
{
<BUG>if ( slot >= 0 && slot < BAG_STORAGE_SLOTS && stack != null )
</BUG>
{
final int indexId = ItemBitBag.INTS_PER_BIT_TYPE * slot + ItemBitBag.OFFSET_STATE_ID;
final int indexQty = ItemBitBag.INTS_PER_BIT_TYPE * slot + ItemBitBag.OFFSET_QUANTITY;

public ItemStack insertItem(
final int slot,
final ItemStack stack,
final boolean simulate )
{
if ( slot >= 0 && slot < BAG_STORAGE_SLOTS && !ModUtil.isEmpty( stack ) )
{
final int indexId = ItemBitBag.INTS_PER_BIT_TYPE * slot + ItemBitBag.OFFSET_STATE_ID;
final int indexQty = ItemBitBag.INTS_PER_BIT_TYPE * slot + ItemBitBag.OFFSET_QUANTITY;
