Skip to content

Commit

Permalink
Fix some mis-spellings which shouldn't be there, and add some which s…
Browse files Browse the repository at this point in the history
…hould.

Signed-off-by: Ross Allan <rallanpcl@gmail.com>
  • Loading branch information
LunNova committed Jul 11, 2013
1 parent 84746a1 commit afb05fc
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
6 changes: 3 additions & 3 deletions resources/patches-deobfuscated.xml
Expand Up @@ -1651,10 +1651,10 @@
appeng.me.tile.TileTerminal
appeng.me.tile.TileStorageMonitor
appeng.me.tile.TileStorageBus
appeng.me.tile.TileProgrammableInterface
appeng.me.tile.TileProgramableInterface
appeng.me.tile.TileP2PTunnel
appeng.me.tile.TileOutputCable
appeng.me.tile.TileLEvelEmitter
appeng.me.tile.TileLevelEmitter
appeng.me.tile.TileIOPort
appeng.me.tile.TileInterfaceBase
appeng.me.tile.TileInputCable
Expand All @@ -1665,7 +1665,7 @@
appeng.me.tile.TileAssemblerMB
appeng.me.tile.TileAssembler
">
<newMethod code="public void ^method:TileEntity/updateEntity^() { }" new=""/>
<newMethod code="public void ^method:TileEntity/updateEntity^() { }" ignoreDuplicate=""/>
<renameInterfaceMethod name="tickNetwork" interface="appeng.api.me.tiles.IGridMachine" allowMissing="">^method:TileEntity/updateEntity^</renameInterfaceMethod>
</class>
</appliedEnergistics>
Expand Down
4 changes: 3 additions & 1 deletion src/common/nallar/tickthreading/patcher/PatchManager.java
Expand Up @@ -336,7 +336,9 @@ public Object run(Element patchElement, CtClass ctClass) {
try {
ctMethod = methodDescription.inClass(ctClass);
} catch (Throwable t) {
Log.warning("", t);
if (!attributes.containsKey("allowMissing")) {
Log.warning("", t);
}
continue;
}
run(ctMethod, attributes);
Expand Down
9 changes: 8 additions & 1 deletion src/common/nallar/tickthreading/patcher/Patches.java
Expand Up @@ -32,6 +32,7 @@
import javassist.bytecode.CodeIterator;
import javassist.bytecode.ConstPool;
import javassist.bytecode.Descriptor;
import javassist.bytecode.DuplicateMemberException;
import javassist.bytecode.MethodInfo;
import javassist.bytecode.Mnemonic;
import javassist.bytecode.Opcode;
Expand Down Expand Up @@ -78,7 +79,13 @@ public void remove(CtMethod ctMethod) {
requiredAttributes = "code"
)
public void newMethod(CtClass ctClass, Map<String, String> attributes) throws CannotCompileException {
ctClass.addMethod(CtNewMethod.make(attributes.get("code"), ctClass));
try {
ctClass.addMethod(CtNewMethod.make(attributes.get("code"), ctClass));
} catch (DuplicateMemberException e) {
if (!attributes.containsKey("ignoreDuplicate")) {
throw e;
}
}
}

@Patch (
Expand Down

0 comments on commit afb05fc

Please sign in to comment.