Files
Purpur/patches/server/0234-Player-ridable-in-water-option.patch
William Blake Galbreath ef304d16da Updated Upstream (Paper & Tuinity)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
0aa3cc7228 Suppress deprecation registration warnings for brigadier events (#6297)
81a7559b41 Correct handling of invalid maps (#6302)

Tuinity Changes:
5620c57206 Use Velocity compression and cipher natives (#351)
3be4fc5809 [CI-SKIP] Redirect to CI when clicking CI badge in README (#344)
2021-07-31 22:50:20 -05:00

43 lines
2.5 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <blake.galbreath@gmail.com>
Date: Sat, 17 Jul 2021 15:55:14 -0500
Subject: [PATCH] Player ridable in water option
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
index 8d62bbb4fb818bea940bbac565cb8e30cb85818e..4d7e9a0d59ca2e3d9df1a7e47637bdbd6bf26809 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -2062,6 +2062,11 @@ public abstract class Player extends LivingEntity {
return this.inventory.armor;
}
+ @Override
+ public boolean rideableUnderWater() {
+ return this.level.purpurConfig.playerRidableInWater;
+ }
+
public boolean setEntityOnShoulder(CompoundTag entityNbt) {
if (!this.isPassenger() && this.onGround && !this.isInWater() && !this.isInPowderSnow) {
if (this.getShoulderEntityLeft().isEmpty()) {
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
index 28228d1e32ec9c63d251cc0f375a6bc9bac57a6b..d5ea371909d629dae91f8b4928cfbac78ff424d8 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -347,6 +347,7 @@ public class PurpurWorldConfig {
public boolean playerBurpWhenFull = false;
public boolean playerArmorSwapping = false;
public boolean playerArmorSwappingCreativeMakesCopy = true;
+ public boolean playerRidableInWater = false;
private void playerSettings() {
idleTimeoutKick = getBoolean("gameplay-mechanics.player.idle-timeout.kick-if-idle", idleTimeoutKick);
idleTimeoutTickNearbyEntities = getBoolean("gameplay-mechanics.player.idle-timeout.tick-nearby-entities", idleTimeoutTickNearbyEntities);
@@ -366,6 +367,7 @@ public class PurpurWorldConfig {
playerBurpWhenFull = getBoolean("gameplay-mechanics.player.burp-when-full", playerBurpWhenFull);
playerArmorSwapping = getBoolean("gameplay-mechanics.player.armor-click-equip.allow-hot-swapping", playerArmorSwapping);
playerArmorSwappingCreativeMakesCopy = getBoolean("gameplay-mechanics.player.armor-click-equip.creative-makes-copy", playerArmorSwappingCreativeMakesCopy);
+ playerRidableInWater = getBoolean("gameplay-mechanics.player.ridable-in-water", playerRidableInWater);
}
public int snowballDamage = -1;