Files
Purpur/patches/server/0069-Add-option-for-boats-to-eject-players-on-land.patch
William Blake Galbreath 655af9a48c Component related conveniences
2021-06-29 21:43:43 -05:00

38 lines
2.1 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <blake.galbreath@gmail.com>
Date: Sat, 7 Sep 2019 22:47:59 -0500
Subject: [PATCH] Add option for boats to eject players on land
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 aa7c022c4faade23bd9061311d4152cf845d3331..d4a19fc38027717e43353bc62ef23e564f3b4c26 100644
--- a/src/main/java/net/minecraft/world/entity/vehicle/Boat.java
+++ b/src/main/java/net/minecraft/world/entity/vehicle/Boat.java
@@ -520,6 +520,7 @@ public class Boat extends Entity {
if (f > 0.0F) {
this.landFriction = f;
+ if (level.purpurConfig.boatEjectPlayersOnLand) ejectPassengers(); // Purpur
return Boat.Status.ON_LAND;
} else {
return Boat.Status.IN_AIR;
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
index 9a3fbdfe9f1c963e5df95aded7082ad7f57bb966..89be7d21dd0cfea24fa1f4bebf7ffd42d1c910f2 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -192,12 +192,14 @@ public class PurpurWorldConfig {
});
}
+ public boolean boatEjectPlayersOnLand = false;
public boolean disableDropsOnCrammingDeath = false;
public boolean milkCuresBadOmen = true;
public double tridentLoyaltyVoidReturnHeight = 0.0D;
public double voidDamageHeight = -64.0D;
public double voidDamageDealt = 4.0D;
private void miscGameplayMechanicsSettings() {
+ boatEjectPlayersOnLand = getBoolean("gameplay-mechanics.boat.eject-players-on-land", boatEjectPlayersOnLand);
disableDropsOnCrammingDeath = getBoolean("gameplay-mechanics.disable-drops-on-cramming-death", disableDropsOnCrammingDeath);
milkCuresBadOmen = getBoolean("gameplay-mechanics.milk-cures-bad-omen", milkCuresBadOmen);
tridentLoyaltyVoidReturnHeight = getDouble("gameplay-mechanics.trident-loyalty-void-return-height", tridentLoyaltyVoidReturnHeight);