Disable extracting invisible items from Storage Buses altogether
Reverts d82cdabc6d, closes #408
Allows Cells to report/extract lingering unpartitioned items
This commit is contained in:
@@ -218,11 +218,7 @@ public class ContainerCraftConfirm extends AEBaseContainer {
|
|||||||
IAEItemStack m = null;
|
IAEItemStack m = null;
|
||||||
if (c != null && this.result.isSimulation()) {
|
if (c != null && this.result.isSimulation()) {
|
||||||
m = o.copy();
|
m = o.copy();
|
||||||
if (items.getStorageList().findPrecise(o) != null) {
|
o = items.extractItems(o, Actionable.SIMULATE, this.getActionSource());
|
||||||
o = items.extractItems(o, Actionable.SIMULATE, this.getActionSource());
|
|
||||||
} else {
|
|
||||||
o = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (o == null) {
|
if (o == null) {
|
||||||
o = m.copy();
|
o = m.copy();
|
||||||
|
|||||||
@@ -134,4 +134,14 @@ public class BasicCellInventoryHandler<T extends IAEStack<T>> extends MEInventor
|
|||||||
NBTTagCompound openNbtData() {
|
NBTTagCompound openNbtData() {
|
||||||
return Platform.openNbtData(this.getCellInv().getItemStack());
|
return Platform.openNbtData(this.getCellInv().getItemStack());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean canExtract(T request) {
|
||||||
|
return this.hasReadAccess();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean shouldItemBeAvailable(T request) {
|
||||||
|
return this.hasReadAccess();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,6 +43,15 @@ public class MEInventoryHandler<T extends IAEStack<T>> implements IMEInventoryHa
|
|||||||
private IPartitionList<T> myPartitionList;
|
private IPartitionList<T> myPartitionList;
|
||||||
|
|
||||||
private AccessRestriction cachedAccessRestriction;
|
private AccessRestriction cachedAccessRestriction;
|
||||||
|
|
||||||
|
protected final boolean hasReadAccess() {
|
||||||
|
return hasReadAccess;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected final boolean hasWriteAccess() {
|
||||||
|
return hasWriteAccess;
|
||||||
|
}
|
||||||
|
|
||||||
private boolean hasReadAccess;
|
private boolean hasReadAccess;
|
||||||
private boolean hasWriteAccess;
|
private boolean hasWriteAccess;
|
||||||
private boolean isSticky;
|
private boolean isSticky;
|
||||||
@@ -195,11 +204,11 @@ public class MEInventoryHandler<T extends IAEStack<T>> implements IMEInventoryHa
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected boolean canExtract(T request) {
|
protected boolean canExtract(T request) {
|
||||||
return this.hasReadAccess;
|
return this.hasReadAccess && this.passesBlackOrWhitelist(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean shouldItemBeAvailable(T t) {
|
protected boolean shouldItemBeAvailable(T request) {
|
||||||
return this.hasReadAccess && this.passesBlackOrWhitelist(t);
|
return this.hasReadAccess && this.passesBlackOrWhitelist(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean passesBlackOrWhitelist(T input) {
|
public boolean passesBlackOrWhitelist(T input) {
|
||||||
|
|||||||
Reference in New Issue
Block a user