mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-21 10:27:44 +01:00
Player ridable in water option
This commit is contained in:
42
patches/server/0234-Player-ridable-in-water-option.patch
Normal file
42
patches/server/0234-Player-ridable-in-water-option.patch
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
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 2064f93074a58c116352ee768ef9ad9663004641..e90193b303ecafc1073d22ff0e145a6fef42c4ce 100644
|
||||||
|
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||||
|
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||||
|
@@ -2060,6 +2060,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 8a85ffdf4aa73923077004e0a228db6833f52815..c097f5525e36084805c1aa1b4eb33aab9fe1405b 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() {
|
||||||
|
idleTimeoutKick = getBoolean("gameplay-mechanics.player.idle-timeout.kick-if-idle", idleTimeoutKick);
|
||||||
|
idleTimeoutTickNearbyEntities = getBoolean("gameplay-mechanics.player.idle-timeout.tick-nearby-entities", idleTimeoutTickNearbyEntities);
|
||||||
|
@@ -368,6 +369,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;
|
||||||
Reference in New Issue
Block a user