Skip to content

Commit

Permalink
Should fix #823
Browse files Browse the repository at this point in the history
Signed-off-by: Ross Allan <rallanpcl@gmail.com>
  • Loading branch information
LunNova committed Jun 30, 2013
1 parent c14738a commit b0f4125
Showing 1 changed file with 47 additions and 41 deletions.
88 changes: 47 additions & 41 deletions resources/patches.xml
Expand Up @@ -1391,57 +1391,63 @@
}
List sList = new SynchronizedList();
synchronized(sList) {
List newList = inv.getAvailableItems(sList);
if (newList != sList) {
sList.addAll(newList);
newList = sList;
}
if (newList == null) {
newList = new SynchronizedList();
}
if (this.oldList == null) {
this.oldList = new SynchronizedList();
}
oList = this.oldList;
this.oldList = newList;
synchronized(oList) {
if (oList.size() != newList.size()) {
gi.onInventoryChange();
Object o = getGrid();
if (o == null) {
o = new Object();
}
synchronized (o) {
synchronized(sList) {
List newList = inv.getAvailableItems(sList);
if (newList != sList) {
sList.addAll(newList);
newList = sList;
}
if (newList == null) {
newList = new SynchronizedList();
}
if (this.oldList == null) {
this.oldList = new SynchronizedList();
}
oList = this.oldList;
this.oldList = newList;
for (Iterator i1 = newList.iterator(); i1.hasNext();) {
ur x = (ur) i1.next();
boolean found = false;
for (Iterator i2 = oList.iterator(); i2.hasNext();) {
ur y = (ur) i2.next();
if (appeng.util.Platform.isSameItem(x, y))
{
found = true;
synchronized(oList) {
if (oList.size() != newList.size()) {
gi.onInventoryChange();
}
if (x.a != y.a)
for (Iterator i1 = newList.iterator(); i1.hasNext();) {
ur x = (ur) i1.next();
boolean found = false;
for (Iterator i2 = oList.iterator(); i2.hasNext();) {
ur y = (ur) i2.next();
if (appeng.util.Platform.isSameItem(x, y))
{
this.freq = 0;
gi.onInventoryChange();
found = true;
if (x.a != y.a)
{
this.freq = 0;
gi.onInventoryChange();
if (x.a &lt;= y.a)
if (x.a &lt;= y.a)
break;
ur j = x.l();
j.a -= y.a;
gi.signalInput(null, j);
break;
ur j = x.l();
j.a -= y.a;
gi.signalInput(null, j);
break;
}
}
}
}
if (!found)
{
this.freq = 0;
gi.onInventoryChange();
gi.signalInput(null, x);
if (!found)
{
this.freq = 0;
gi.onInventoryChange();
gi.signalInput(null, x);
}
}
}
}
Expand Down

0 comments on commit b0f4125

Please sign in to comment.