Files
Purpur/patches/server/0062-Add-option-for-boats-to-eject-players-on-land.patch
William Blake Galbreath dd928e3864 Updated Upstream (Paper)
Upstream has released updates that appears to apply and compile correctly

Paper Changes:
8d036cea Expose the internal current tick
0c715390 [PATCH] bounding box check for hanging entities (#2664)
527073aa Update config version
0d3b35c3 Rename baby zombie movement config option
2019-10-31 13:51:33 -05:00

42 lines
1.8 KiB
Diff

From 6146816adad1f317c75340779db9dfc05a2dbc42 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
---
src/main/java/net/minecraft/server/EntityBoat.java | 1 +
src/main/java/net/pl3x/purpur/PurpurWorldConfig.java | 5 +++++
2 files changed, 6 insertions(+)
diff --git a/src/main/java/net/minecraft/server/EntityBoat.java b/src/main/java/net/minecraft/server/EntityBoat.java
index b5bcd1f80d..37a98eba61 100644
--- a/src/main/java/net/minecraft/server/EntityBoat.java
+++ b/src/main/java/net/minecraft/server/EntityBoat.java
@@ -425,6 +425,7 @@ public class EntityBoat extends Entity {
if (f > 0.0F) {
this.aH = f;
+ if (world.purpurConfig.boatEjectPlayersOnLand) ejectPassengers(); // Purpur
return EntityBoat.EnumStatus.ON_LAND;
} else {
return EntityBoat.EnumStatus.IN_AIR;
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
index 3ff5dc4a3b..f687444604 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -74,6 +74,11 @@ public class PurpurWorldConfig {
bambooSmallHeight = getInt("bamboo.small-height", bambooSmallHeight);
}
+ public boolean boatEjectPlayersOnLand = false;
+ private void boatEjectPlayersOnLand() {
+ boatEjectPlayersOnLand = getBoolean("boat-eject-players-on-land", boatEjectPlayersOnLand);
+ }
+
public boolean campfireObeysGravity = true;
private void campfireObeysGravity() {
campfireObeysGravity = getBoolean("campfire-obeys-gravity", campfireObeysGravity);
--
2.24.0.rc1