Fix crash caused by use of de-obfuscated field name

This commit is contained in:
Cheeserolls 2015-05-28 13:54:27 +01:00
parent fc2e910b88
commit f003accc02

View file

@ -46,7 +46,8 @@ public class ModPotions
System.arraycopy(Potion.potionTypes, 0, potionTypes, 0, oldNumOfPotions); System.arraycopy(Potion.potionTypes, 0, potionTypes, 0, oldNumOfPotions);
// replace Potion.potionTypes with our new expanded array // replace Potion.potionTypes with our new expanded array
BOPReflectionHelper.setPrivateFinalValue(Potion.class, null, potionTypes, "potionTypes" /* TODO: what's this? "field_76425_a" */); // note - need to specify both the obfuscated and de-obfuscated field names so that it works in dev and in the normal game
BOPReflectionHelper.setPrivateFinalValue(Potion.class, null, potionTypes, "potionTypes", "field_76425_a");
} }
private static int getNextId() private static int getNextId()