use of com.bergerkiller.mountiplex.conversion.annotations.ConverterMethod in project BKCommonLib by bergerhealer.
the class WrapperConversion method toPotionEffectType.
@SuppressWarnings("deprecation")
@ConverterMethod(input = "net.minecraft.server.MobEffectList")
public static PotionEffectType toPotionEffectType(Object nmsMobEffectListHandle) {
int id = NMSMobEffect.List.getId.invoke(null, nmsMobEffectListHandle);
PotionEffectType type = PotionEffectType.getById(id);
if (type != null) {
return type;
} else {
return null;
}
}
Aggregations