fix player ridable underwater option

This commit is contained in:
granny
2023-03-22 03:18:44 -07:00
parent f7801bd51a
commit 798472879a
2 changed files with 6 additions and 5 deletions

View File

@@ -5,7 +5,7 @@ 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 af882016364257f01a154b99783e96f5e932364f..8e088b2a9b10ca0f1188469a7dd360b209cdde87 100644
index af882016364257f01a154b99783e96f5e932364f..61380231105bd7d139989b05789800e5f7b89106 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -2072,6 +2072,11 @@ public abstract class Player extends LivingEntity {
@@ -14,14 +14,14 @@ index af882016364257f01a154b99783e96f5e932364f..8e088b2a9b10ca0f1188469a7dd360b2
+ @Override
+ public boolean dismountsUnderwater() {
+ return !this.level.purpurConfig.playerRidableInWater || super.dismountsUnderwater();
+ return !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 9642374fd97fc0dc55f668fb6d85d2258b7dd77d..e1f96fc7deec93fb7eea12a600630d603924469b 100644
index 0a1b894dad87b73f28fe9b37e08abb7b95d3b040..cbf4c40bf7c7e6547554f8d9086be0d7d99b522f 100644
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
@@ -398,6 +398,7 @@ public class PurpurWorldConfig {