mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 01:47:42 +01:00
Upstream has released updates that appears to apply and compile correctly Paper Changes: 4a97a7ca Add option to disable pillager patrols (#2626) 23e53aab Backport MC-160177 fix from 1.15 (#2702) 45089d59 Update upstream CB 761c24fa Fix stuck in sneak when changing worlds (MC-10657) (#2627)
42 lines
1.8 KiB
Diff
42 lines
1.8 KiB
Diff
From f71a6b979a284bf7f992a60251937b33250f9e01 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
|
|
|