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

Signed-off-by: cpw <cpw+github@weeksfamily.ca>
This commit is contained in:
cpw 2019-07-26 00:35:03 -04:00
parent 0bdc2d04b4
commit 4c05c63a04
No known key found for this signature in database
GPG key ID: 8EB3DF749553B1B7

View file

@ -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;
}
}