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

Paper Changes:
05cb10c56f Add repo for Velocity natives to dev bundle (#6536)
7bd7b18811 Configurable feature seeds (#6531)
ca708a0944 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#6539)
f02d3d8989 flattener should try to render custom translations (#6540)
1276bd5039 Fixed layers from V2550 not being added to list (#6541)
a763f258da docs: remove Paper tool method for patch mods
20903fcf5e docs: drop table of contents; it's built into GH
2021-09-02 12:13:11 -05:00

43 lines
2.4 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 841e21e160f728af12daef1eba8d25e5cd081bda..8102ee4cc9f936de20a0cb6875ada524800f28f7 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 5d7562577eb5f63773263d929760982f4dd1f6b5..c94152cffd69ee533031426dfcc65aad933fd9e9 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -348,6 +348,7 @@ public class PurpurWorldConfig {
public boolean playerBurpWhenFull = false;
public boolean playerArmorSwapping = false;
public boolean playerArmorSwappingCreativeMakesCopy = true;
+ public boolean playerRidableInWater = false;
private void playerSettings() {
if (PurpurConfig.version < 19) {
boolean oldVal = getBoolean("gameplay-mechanics.player.idle-timeout.mods-target", idleTimeoutTargetPlayer);
@@ -373,6 +374,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;