Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into 1.8
Browse files Browse the repository at this point in the history
  • Loading branch information
jaquadro committed May 31, 2015
2 parents 196d05f + bdd3759 commit bd37fb3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public interface IFractionalDrawer extends IDrawer

/**
* Gets the number of items left in the drawer if the maximum number of equivalent compressed items had been removed.
* The equivalency is determined by the conversion rate.
* The equivalency is determined by the next compression tier, and not necessarily the conversion rate.
*/
int getStoredItemRemainder ();
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
import com.jaquadro.minecraft.storagedrawers.api.storage.IDrawer;
import com.jaquadro.minecraft.storagedrawers.api.storage.IDrawerGroup;
import com.jaquadro.minecraft.storagedrawers.api.inventory.IDrawerInventory;
import com.jaquadro.minecraft.storagedrawers.api.storage.attribute.ILockable;
import com.jaquadro.minecraft.storagedrawers.api.storage.attribute.LockAttribute;
import com.jaquadro.minecraft.storagedrawers.storage.IUpgradeProvider;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
Expand Down Expand Up @@ -65,6 +67,9 @@ public boolean canInsertItem (int slot, ItemStack stack) {
if (drawer == null)
return false;

if (drawer.isEmpty() && drawer instanceof ILockable && ((ILockable) drawer).isLocked(LockAttribute.LOCK_EMPTY))
return false;

return drawer.canItemBeStored(stack);
}

Expand Down

0 comments on commit bd37fb3

Please sign in to comment.