Files
Purpur/patches/server/0212-Player-ridable-in-water-option.patch
BillyGalbreath e85e5ebc2e Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@eb48ada Merge chunk task urgent executor thread into the worker queue
PaperMC/Paper@d9fb602 Expose vanilla BiomeProvider from WorldInfo (#7295)
PaperMC/Paper@7d7ae7b Updated Upstream (Bukkit/CraftBukkit/Spigot) (#7246)
2022-01-09 00:27:05 -06: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 41d163e35dc9d9e7732974b16891aa16f599973d..c8792fee068c13ae45f9eb936ef34fc5cae7ba57 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -2014,6 +2014,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/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
index ba56f6d9ab1029ee6261968b732ee5cddf45f242..6370b3638c518b6dd9b1e6690d31da580f52d3d9 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -386,6 +386,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);
@@ -411,6 +412,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;