Skip to content

Commit

Permalink
Fix #1254
Browse files Browse the repository at this point in the history
  • Loading branch information
maxanier committed Oct 14, 2023
1 parent 9a484bb commit 8f46f13
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 8f46f13

Please sign in to comment.