Merge pull request #166 from 1n5aN1aC/master

Fix jaquadro/StorageDrawers#163
This commit is contained in:
Justin Aquadro committed 2015-11-21 23:16:04 -05:00
commit 1c9e98afee
3 files changed
+3 -2

No files matched your search

@@ -67,6 +67,7 @@ public interface IDrawer
* Stack size and available capacity are not considered. For drawers that are not empty, this
* method can allow ore-dictionary compatible items to be accepted into the drawer, as defined by what
* the drawer considers to be an equivalent item.
* For drawers that are empty, locking status is considered.
*
* @param itemPrototype An ItemStack representing the type, metadata, and tags of an item.
*/
@@ -71,7 +71,7 @@ public class CompDrawerData extends BaseDrawerData implements IFractionalDrawer,
@Override
public boolean canItemBeStored (ItemStack itemPrototype) {
if (getStoredItemPrototype() == null)
if (getStoredItemPrototype() == null && !isLocked(LockAttribute.LOCK_POPULATED))
return true;
return areItemsEqual(itemPrototype);
@@ -135,7 +135,7 @@ public class DrawerData extends BaseDrawerData implements IVoidable, IShroudable
@Override
public boolean canItemBeStored (ItemStack itemPrototype) {
if (protoStack == nullStack)
if (protoStack == nullStack && !isLocked(LockAttribute.LOCK_POPULATED))
return true;
return areItemsEqual(itemPrototype);