mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-21 02:17:42 +01:00
Add option for boats to eject players on land
This commit is contained in:
@@ -270,6 +270,10 @@ bamboo
|
|||||||
- **default**: 10
|
- **default**: 10
|
||||||
- **description**: Maximum height bamboo may be small thickness
|
- **description**: Maximum height bamboo may be small thickness
|
||||||
|
|
||||||
|
* boat-eject-players-on-land
|
||||||
|
- **default**: false
|
||||||
|
- **description**: Whether or not boats eject players when on land
|
||||||
|
|
||||||
campfire-obeys-gravity
|
campfire-obeys-gravity
|
||||||
~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~
|
||||||
* **default**: true
|
* **default**: true
|
||||||
|
|||||||
@@ -0,0 +1,41 @@
|
|||||||
|
From baac2e148d13279531edb0d1cb3015732a70243b 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 b5bcd1f80..37a98eba6 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 3ff5dc4a3..f68744460 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.23.0.rc1
|
||||||
|
|
||||||
Reference in New Issue
Block a user