mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
43 lines
2.5 KiB
Diff
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 f634735add2cd9467ac2d2dae1f8cf06eaa23d0a..f2677acf87e6cc279c902915617ef887799b5f2a 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
|
@@ -2104,6 +2104,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 3a29ae68b15005fdec1e1e5889e2dec1354b8844..fa6cbac5936296336a53772f9d655b0b6fbbf2f4 100644
|
|
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
|
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
|
@@ -397,6 +397,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);
|
|
@@ -423,6 +424,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);
|
|
}
|
|
|
|
private static boolean projectileDespawnRateSettingsMigrated = false;
|