Skip to content

Commit

Permalink
Fix Jesus preventing players from using a boat (MeteorDevelopment#4277)
Browse files Browse the repository at this point in the history
  • Loading branch information
crazycat256 authored and tyrannus00 committed Apr 25, 2024
1 parent 783bf11 commit 3bc35cb
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import net.minecraft.block.BlockState;
import net.minecraft.block.Blocks;
import net.minecraft.enchantment.ProtectionEnchantment;
import net.minecraft.entity.EntityType;
import net.minecraft.entity.effect.StatusEffects;
import net.minecraft.fluid.Fluids;
import net.minecraft.network.packet.Packet;
Expand Down Expand Up @@ -270,8 +271,15 @@ private void onSendPacket(PacketEvent.Send event) {
private boolean waterShouldBeSolid() {
if (EntityUtils.getGameMode(mc.player) == GameMode.SPECTATOR || mc.player.getAbilities().flying) return false;


if (mc.player.getVehicle() != null) {
EntityType<?> vehicle = mc.player.getVehicle().getType();
if (vehicle == EntityType.BOAT || vehicle == EntityType.CHEST_BOAT) return false;
}

if (Modules.get().get(Flight.class).isActive()) return false;


if (dipIfBurning.get() && mc.player.isOnFire()) return false;

if (dipOnSneakWater.get() && mc.options.sneakKey.isPressed()) return false;
Expand Down

0 comments on commit 3bc35cb

Please sign in to comment.