Skip to content

Commit

Permalink
Possible avoid #214
Browse files Browse the repository at this point in the history
  • Loading branch information
Bulldog83 committed Jun 29, 2021
1 parent daefcc4 commit 13e169c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
3 changes: 3 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,15 @@ 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"
}
}
dependencies.modCompileOnly (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"
}
}
Expand All @@ -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"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
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;
Expand Down Expand Up @@ -89,8 +90,12 @@ protected void be_applyEffects(CallbackInfo info) {

@Inject(method = "canBeAffected", at = @At("HEAD"), cancellable = true)
public void be_canBeAffected(MobEffectInstance mobEffectInstance, CallbackInfoReturnable<Boolean> info) {
if (mobEffectInstance.getEffect() == MobEffects.BLINDNESS && getAttributes().getValue(EndAttributes.BLINDNESS_RESISTANCE) > 0.0) {
info.setReturnValue(false);
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.");
}
}

Expand Down

0 comments on commit 13e169c

Please sign in to comment.