mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
43 lines
2.4 KiB
Diff
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 fb607c9eda6ff7f661117cd9ce13c7a9e0114132..06ab3344318c6e902135abed014488c1188f8669 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;
|