From ae93eb02b9b256df75af9c2f6abe6599d219eb8c Mon Sep 17 00:00:00 2001 From: William Blake Galbreath Date: Sun, 22 Aug 2021 15:16:34 -0500 Subject: [PATCH] Fix sinking boats --- patches/server/0253-Fix-sinking-boats.patch | 22 +++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 patches/server/0253-Fix-sinking-boats.patch diff --git a/patches/server/0253-Fix-sinking-boats.patch b/patches/server/0253-Fix-sinking-boats.patch new file mode 100644 index 000000000..b08cbb0cb --- /dev/null +++ b/patches/server/0253-Fix-sinking-boats.patch @@ -0,0 +1,22 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: William Blake Galbreath +Date: Sun, 22 Aug 2021 14:45:14 -0500 +Subject: [PATCH] Fix sinking boats + + +diff --git a/src/main/java/net/minecraft/world/entity/vehicle/Boat.java b/src/main/java/net/minecraft/world/entity/vehicle/Boat.java +index 0f6e577e47a3b1ce5a356801b6192d1d306d19c2..24c8e3eedcc95a6d12477fb6a5150976d2f5e533 100644 +--- a/src/main/java/net/minecraft/world/entity/vehicle/Boat.java ++++ b/src/main/java/net/minecraft/world/entity/vehicle/Boat.java +@@ -695,7 +695,10 @@ public class Boat extends Entity { + this.invFriction = 0.05F; + if (this.oldStatus == Boat.Status.IN_AIR && this.status != Boat.Status.IN_AIR && this.status != Boat.Status.ON_LAND) { + this.waterLevel = this.getY(1.0D); +- this.setDeltaMovement(this.getDeltaMovement().multiply(1.0D, 0.0D, 1.0D).add(0.0, ((double) (this.getWaterLevelAbove() - this.getBbHeight()) + 0.101D) - this.getY(), 0.0)); // Paper ++ // Purpur start - boats should not sink ++ this.setPos(this.getX(), (double) (this.getWaterLevelAbove() - this.getBbHeight()) + 0.101D, this.getZ()); ++ this.setDeltaMovement(this.getDeltaMovement().multiply(1.0D, 0.0D, 1.0D)); ++ // Purpur end + this.lastYd = 0.0D; + this.status = Boat.Status.IN_WATER; + } else {