From 8f46f130a216cce53e8d52aed4dc55f543c9ed2c Mon Sep 17 00:00:00 2001 From: maxanier Date: Mon, 28 Aug 2023 22:23:25 +0200 Subject: [PATCH] Fix #1254 --- .../entity/player/vampire/actions/BatVampireAction.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main/java/de/teamlapen/vampirism/entity/player/vampire/actions/BatVampireAction.java b/src/main/java/de/teamlapen/vampirism/entity/player/vampire/actions/BatVampireAction.java index 9fd407e140..202ae73289 100644 --- a/src/main/java/de/teamlapen/vampirism/entity/player/vampire/actions/BatVampireAction.java +++ b/src/main/java/de/teamlapen/vampirism/entity/player/vampire/actions/BatVampireAction.java @@ -20,7 +20,6 @@ import net.minecraft.world.entity.ai.attributes.AttributeModifier; import net.minecraft.world.entity.ai.attributes.Attributes; import net.minecraft.world.entity.player.Player; -import net.minecraft.world.level.Level; import org.jetbrains.annotations.NotNull; import java.util.UUID; @@ -59,7 +58,6 @@ public boolean canBeUsedBy(@NotNull IVampirePlayer vampire) { && vampire.isGettingGarlicDamage(vampire.getRepresentingEntity().level()) == EnumStrength.NONE && !vampire.getActionHandler().isActionActive(VampireActions.VAMPIRE_RAGE.get()) && !vampire.getRepresentingPlayer().isInWater() - && !(vampire.getRepresentingPlayer().getCommandSenderWorld().dimension() == Level.END) && !VampirismConfig.SERVER.batDimensionBlacklist.get().contains(vampire.getRepresentingPlayer().getCommandSenderWorld().dimension().location().toString()) && (vampire.getRepresentingEntity().getVehicle() == null); } @@ -116,7 +114,7 @@ public boolean onUpdate(@NotNull IVampirePlayer vampire) { } else if (vampire.isGettingGarlicDamage(vampire.getRepresentingEntity().level()) != EnumStrength.NONE && !vampire.isRemote()) { vampire.getRepresentingEntity().sendSystemMessage(Component.translatable("text.vampirism.cant_fly_garlic")); return true; - } else if (VampirismConfig.SERVER.batDimensionBlacklist.get().contains(vampire.getRepresentingPlayer().getCommandSenderWorld().dimension().location().toString()) && vampire.getRepresentingPlayer().getCommandSenderWorld().dimension() == Level.END) { + } else if (VampirismConfig.SERVER.batDimensionBlacklist.get().contains(vampire.getRepresentingPlayer().getCommandSenderWorld().dimension().location().toString())) { vampire.getRepresentingPlayer().sendSystemMessage(Component.translatable("text.vampirism.cant_fly_dimension")); return true; } else {