Skip to content

Commit 1aca16a

Browse files
committedOct 17, 2015
Mixins in Java with ASM, Forge stripping interfaces, and random calling of methods do not mix.
1 parent da22a77 commit 1aca16a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed
 

‎src/main/java/moe/nightfall/vic/integratedcircuits/gate/peripheral/GatePeripheral.java

+6-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@
1717

1818
@Optional.Interface(iface = "dan200.computercraft.api.peripheral.IPeripheral", modid = "ComputerCraft")
1919
public abstract class GatePeripheral implements IPeripheral {
20-
20+
21+
// Everything from IPeripheral has to be implemented, to make sure things don't get stripped by forge.
22+
@Override
23+
public abstract String getType();
24+
2125
private final Map<String, Method> methods = Maps.newLinkedHashMap();
2226
private final String[] methodNames;
2327

@@ -29,7 +33,7 @@ public GatePeripheral() {
2933
}
3034
methodNames = methods.keySet().toArray(new String[methods.size()]);
3135
}
32-
36+
3337
@Override
3438
public final String[] getMethodNames() {
3539
return methodNames;

0 commit comments

Comments
 (0)
Please sign in to comment.