Remove red overlays
This commit is contained in:
@@ -12,18 +12,18 @@ public abstract class ItemStorageExternal implements IItemStorage {
|
|||||||
public abstract int getCapacity();
|
public abstract int getCapacity();
|
||||||
|
|
||||||
public boolean updateCache() {
|
public boolean updateCache() {
|
||||||
List<ItemStack> items = getStacks();
|
List<ItemStack> newStacks = getStacks();
|
||||||
|
|
||||||
if (this.cache == null) {
|
if (this.cache == null) {
|
||||||
this.cache = items;
|
this.cache = newStacks;
|
||||||
} else if (items.size() != cache.size()) {
|
} else if (newStacks.size() != cache.size()) {
|
||||||
this.cache = items;
|
this.cache = newStacks;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
for (int i = 0; i < items.size(); ++i) {
|
for (int i = 0; i < newStacks.size(); ++i) {
|
||||||
if (!API.instance().getComparer().isEqual(items.get(i), cache.get(i))) {
|
if (!API.instance().getComparer().isEqual(newStacks.get(i), cache.get(i))) {
|
||||||
this.cache = items;
|
this.cache = newStacks;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.7 KiB |
Reference in New Issue
Block a user