mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-22 02:47:43 +01:00
like 50 more patches
This commit is contained in:
42
patches/server/0193-Player-ridable-in-water-option.patch
Normal file
42
patches/server/0193-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 86007f7ed1e5c4e2e688e1f012468e4cf6dc0d2e..2675e574f2a528e88862d58355d4cd6cdbe8693a 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -2091,6 +2091,11 @@ public abstract class Player extends LivingEntity {
|
||||
return this.inventory.armor;
|
||||
}
|
||||
|
||||
+ @Override
|
||||
+ public boolean 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 5d4cf690acac49974668cc5bff1add8b34b84483..a8e9e77cf8af44a3af8ec9f56c3f5340f0ea0f2b 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
@@ -400,6 +400,7 @@ public class PurpurWorldConfig {
|
||||
public boolean playerBurpWhenFull = false;
|
||||
public int playerPortalWaitTime = 80;
|
||||
public int playerCreativePortalWaitTime = 1;
|
||||
+ public boolean playerRidableInWater = false;
|
||||
private void playerSettings() {
|
||||
if (PurpurConfig.version < 19) {
|
||||
boolean oldVal = getBoolean("gameplay-mechanics.player.idle-timeout.mods-target", idleTimeoutTargetPlayer);
|
||||
@@ -426,6 +427,7 @@ public class PurpurWorldConfig {
|
||||
playerBurpWhenFull = getBoolean("gameplay-mechanics.player.burp-when-full", playerBurpWhenFull);
|
||||
playerPortalWaitTime = getInt("gameplay-mechanics.player.portal-wait-time", playerPortalWaitTime);
|
||||
playerCreativePortalWaitTime = getInt("gameplay-mechanics.player.creative-portal-wait-time", playerCreativePortalWaitTime);
|
||||
+ playerRidableInWater = getBoolean("gameplay-mechanics.player.ridable-in-water", playerRidableInWater);
|
||||
}
|
||||
|
||||
private static boolean projectileDespawnRateSettingsMigrated = false;
|
||||
Reference in New Issue
Block a user