Restore storage drawers compat, closes #166

This commit is contained in:
Vincent Lee committed 2016-03-08 10:57:19 -06:00
1 parent e25cf207a6
commit 3097dde357
1 file changed
+2 -2
@@ -112,8 +112,8 @@ public class WrappedStorageDrawers extends WrappedInventoryBase {
* @return wrapped inventory or null if it has incompatible type.
*/
public static IWrappedInventory wrap(InvWithLocation inv, ICorporeaSpark spark) {
if(inv.handler instanceof InvWrapper && ((InvWrapper) inv.handler).inv instanceof IDrawerGroup) {
return new WrappedStorageDrawers((IDrawerGroup) ((InvWrapper) inv.handler).inv, spark);
if(inv.world.getTileEntity(inv.pos) instanceof IDrawerGroup) {
return new WrappedStorageDrawers((IDrawerGroup) inv.world.getTileEntity(inv.pos), spark);
} else return null;
}
}