Fix potion transformer to look up the right name depending on context.

Signed-off-by: cpw <[email protected]>
This commit is contained in:
cpw committed 2019-07-26 00:35:03 -04:00
1 parent 0bdc2d04b4
commit 4c05c63a04
1 file changed
+2 -1
@@ -7,7 +7,8 @@ function initializeCoreMod() {
},
'transformer': function(classNode) {
var asmapi=Java.type('net.minecraftforge.coremod.api.ASMAPI')
asmapi.redirectFieldToMethod(classNode, 'potion', 'getPotionRaw')
var fn = asmapi.mapField('field_188420_b') // potion field - remap to mcp if necessary
asmapi.redirectFieldToMethod(classNode, fn, 'getPotionRaw')
return classNode;
}
}