Possible avoid #214
This commit is contained in:
parent
daefcc4dbf
commit
13e169c458
2 changed files with 10 additions and 2 deletions
|
@ -46,6 +46,7 @@ def useOptional(String dep) {
|
|||
exclude group: "net.fabricmc.fabric-api"
|
||||
exclude group: "net.fabricmc"
|
||||
if (!dep.contains("me.shedaniel")) {
|
||||
exclude group: "me.shedaniel.cloth"
|
||||
exclude group: "me.shedaniel"
|
||||
}
|
||||
}
|
||||
|
@ -53,6 +54,7 @@ def useOptional(String dep) {
|
|||
exclude group: "net.fabricmc.fabric-api"
|
||||
exclude group: "net.fabricmc"
|
||||
if (!dep.contains("me.shedaniel")) {
|
||||
exclude group: "me.shedaniel.cloth"
|
||||
exclude group: "me.shedaniel"
|
||||
}
|
||||
}
|
||||
|
@ -63,6 +65,7 @@ def useApi(String dep) {
|
|||
exclude group: "net.fabricmc.fabric-api"
|
||||
exclude group: "net.fabricmc"
|
||||
if (!dep.contains("me.shedaniel")) {
|
||||
exclude group: "me.shedaniel.cloth"
|
||||
exclude group: "me.shedaniel"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,6 +32,7 @@ import net.minecraft.world.item.Item;
|
|||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
import ru.betterend.BetterEnd;
|
||||
import ru.betterend.interfaces.FallFlyingItem;
|
||||
import ru.betterend.interfaces.MobEffectApplier;
|
||||
import ru.betterend.item.CrystaliteArmor;
|
||||
|
@ -89,9 +90,13 @@ public abstract class LivingEntityMixin extends Entity {
|
|||
|
||||
@Inject(method = "canBeAffected", at = @At("HEAD"), cancellable = true)
|
||||
public void be_canBeAffected(MobEffectInstance mobEffectInstance, CallbackInfoReturnable<Boolean> info) {
|
||||
try {
|
||||
if (mobEffectInstance.getEffect() == MobEffects.BLINDNESS && getAttributes().getValue(EndAttributes.BLINDNESS_RESISTANCE) > 0.0) {
|
||||
info.setReturnValue(false);
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
BetterEnd.LOGGER.warning("Blindness resistance attribute haven't registered.");
|
||||
}
|
||||
}
|
||||
|
||||
@Inject(method = "hurt", at = @At("HEAD"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue