
[0.2.5] Redirect conflict with Obscure API
muon-rw opened this issue ยท 0 comments
Critical injection failure: Redirector penetration(FFF)F in obscure_api.mixins.json:attributes.LivingEntityMixin from mod obscure_api failed injection check, (0/1) succeeded. Scanned 1 target(s). Using refmap obscureapi-refmap.json
It seems that fbebc7e changing zenith_attributes$applyArmorPenplyArmorPen from @ModifyExpressionValue
to @Redirect
is the source of the conflict.
I'm not sure if this was an intentional or an accidental regression from the refactor.
from ObscureAPI:
method = {"applyArmorToDamage"},
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/entity/DamageUtil;getDamageLeft(FFF)F"
)
)
private float penetration(float damage, float armor, float armorToughness) {
if (this.sourceApplyArmorToDamage == null) {
return class_1280.method_5496(damage, armor, armorToughness);
} else {
class_1297 var6 = this.sourceApplyArmorToDamage.method_5526();
float var10000;
if (var6 instanceof class_1309) {
class_1309 living = (class_1309)var6;
var10000 = ObscureAPIAttributes.getPenetration(living);
} else {
var10000 = 0.0F;
}
float penetration = var10000;
return class_1280.method_5496(damage, armor * (1.0F - penetration), armorToughness * (1.0F - penetration));
}
}