Skip to content

Commit

Permalink
Fix some patching issues.
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 b0f4125 commit 6708b45
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 89 deletions.
90 changes: 1 addition & 89 deletions resources/patches.xml
Expand Up @@ -599,7 +599,7 @@
return top.a + this.middleCount + b.a;
}">getItemCount
</replaceMethod>
<synchronize>updateStacks,changeItemCount,setItemCount,a(IL^class;ItemStack^;)V</synchronize>
<synchronize>updateStacks,changeItemCount,setItemCount,a(IL^class:ItemStack^;)V</synchronize>
</class>
<class id="factorization.common.TileEntityMirror">
<replaceMethod code="{
Expand Down Expand Up @@ -1370,94 +1370,6 @@
<synchronize>getCellArray,resetCache</synchronize>
</class>
<class id="appeng.me.tile.TileStorageBus">
<replaceMethod code="{
super.g();
if (this.delay++ > Math.min(100, Math.max(20, this.freq)))
{
appeng.api.me.util.IGridInterface gi = getGrid();
List oList;
if (gi != null)
{
this.delay = 0;
appeng.api.me.util.IMEInventory inv = getInv();
if (inv == null) {
if (oldList != null) {
this.freq = 0;
gi.onInventoryChange();
this.oldList = null;
}
return;
}
List sList = new SynchronizedList();
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;
synchronized(oList) {
if (oList.size() != newList.size()) {
gi.onInventoryChange();
}
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;
if (x.a != y.a)
{
this.freq = 0;
gi.onInventoryChange();
if (x.a &lt;= y.a)
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);
}
}
}
}
}
}
this.freq += 1;
}
}">^method:TileEntity/updateEntity^
</replaceMethod>
<synchronize>getCellArray,getSharedTagCompound,signalInput</synchronize>
</class>
<class id="appeng.me.MEInventoryArray">
Expand Down
4 changes: 4 additions & 0 deletions src/common/javassist/RemappingPool.java
Expand Up @@ -87,6 +87,10 @@ protected synchronized CtClass get0(String className, boolean useCache) throws N
if (cachedClass != null) {
return cachedClass;
}
cachedClass = super.getCached(className);
if (cachedClass != null && cachedClass.isPrimitive()) {
return cachedClass;
}
if (!Transformer.remapClassName(className).equals(className)) {
Log.severe("Attempted to load obfuscated class " + className, new Throwable());
return null;
Expand Down

0 comments on commit 6708b45

Please sign in to comment.