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
1 changed files with 2 additions and 1 deletions

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