@@ -1208,7 +1208,12 @@ public Class<PotionEffectType> getSpecificType() {
1208
1208
public Object getGeneric (PotionEffectType specific ) {
1209
1209
Class <?> clazz = MinecraftReflection .getMobEffectListClass ();
1210
1210
if (getMobEffect == null ) {
1211
- getMobEffect = Accessors .getMethodAccessor (clazz , "fromId" , int .class );
1211
+ FuzzyReflection fuzzy = FuzzyReflection .fromClass (clazz , false );
1212
+ getMobEffect = Accessors .getMethodAccessor (fuzzy .getMethod (FuzzyMethodContract .newBuilder ()
1213
+ .parameterExactArray (int .class )
1214
+ .returnTypeExact (clazz )
1215
+ .requireModifier (Modifier .STATIC )
1216
+ .build ()));
1212
1217
}
1213
1218
1214
1219
int id = specific .getId ();
@@ -1219,7 +1224,12 @@ public Object getGeneric(PotionEffectType specific) {
1219
1224
public PotionEffectType getSpecific (Object generic ) {
1220
1225
Class <?> clazz = MinecraftReflection .getMobEffectListClass ();
1221
1226
if (getMobEffectId == null ) {
1222
- getMobEffectId = Accessors .getMethodAccessor (clazz , "getId" , clazz );
1227
+ FuzzyReflection fuzzy = FuzzyReflection .fromClass (clazz , false );
1228
+ getMobEffectId = Accessors .getMethodAccessor (fuzzy .getMethod (FuzzyMethodContract .newBuilder ()
1229
+ .parameterExactArray (clazz )
1230
+ .returnTypeExact (int .class )
1231
+ .requireModifier (Modifier .STATIC )
1232
+ .build ()));
1223
1233
}
1224
1234
1225
1235
int id = (int ) getMobEffectId .invoke (null , generic );
0 commit comments