diff --git a/src/com/jaquadro/minecraft/storagedrawers/api/storage/IFractionalDrawer.java b/src/com/jaquadro/minecraft/storagedrawers/api/storage/IFractionalDrawer.java index 03316e346..efcf6dfd8 100644 --- a/src/com/jaquadro/minecraft/storagedrawers/api/storage/IFractionalDrawer.java +++ b/src/com/jaquadro/minecraft/storagedrawers/api/storage/IFractionalDrawer.java @@ -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 (); } diff --git a/src/com/jaquadro/minecraft/storagedrawers/inventory/StorageInventory.java b/src/com/jaquadro/minecraft/storagedrawers/inventory/StorageInventory.java index 97ac8d7d2..f43ec93cd 100644 --- a/src/com/jaquadro/minecraft/storagedrawers/inventory/StorageInventory.java +++ b/src/com/jaquadro/minecraft/storagedrawers/inventory/StorageInventory.java @@ -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; @@ -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); }