mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-21 18:37:42 +01:00
apply the rest of the unapplied patches
This commit is contained in:
44
patches/server/0184-Player-ridable-in-water-option.patch
Normal file
44
patches/server/0184-Player-ridable-in-water-option.patch
Normal file
@@ -0,0 +1,44 @@
|
||||
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 2fe3af832a228b1352b9b85dec06115009ef658f..cb6f161d32fe9642e9e9b1efc47d88612041ea15 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -2088,6 +2088,13 @@ public abstract class Player extends LivingEntity {
|
||||
return slot != EquipmentSlot.BODY;
|
||||
}
|
||||
|
||||
+ // Purpur start
|
||||
+ @Override
|
||||
+ public boolean dismountsUnderwater() {
|
||||
+ return !level().purpurConfig.playerRidableInWater;
|
||||
+ }
|
||||
+ // Purpur end
|
||||
+
|
||||
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 2b5ba2e7e953d99220d7c01160e4f93a1ebde6ff..102420987c7b87458af888e733722b467a48b961 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
@@ -384,6 +384,7 @@ public class PurpurWorldConfig {
|
||||
public double playerCriticalDamageMultiplier = 1.5D;
|
||||
public int playerBurpDelay = 10;
|
||||
public boolean playerBurpWhenFull = false;
|
||||
+ public boolean playerRidableInWater = false;
|
||||
private void playerSettings() {
|
||||
if (PurpurConfig.version < 19) {
|
||||
boolean oldVal = getBoolean("gameplay-mechanics.player.idle-timeout.mods-target", idleTimeoutTargetPlayer);
|
||||
@@ -406,6 +407,7 @@ public class PurpurWorldConfig {
|
||||
playerCriticalDamageMultiplier = getDouble("gameplay-mechanics.player.critical-damage-multiplier", playerCriticalDamageMultiplier);
|
||||
playerBurpDelay = getInt("gameplay-mechanics.player.burp-delay", playerBurpDelay);
|
||||
playerBurpWhenFull = getBoolean("gameplay-mechanics.player.burp-when-full", playerBurpWhenFull);
|
||||
+ playerRidableInWater = getBoolean("gameplay-mechanics.player.ridable-in-water", playerRidableInWater);
|
||||
}
|
||||
|
||||
public boolean silkTouchEnabled = false;
|
||||
Reference in New Issue
Block a user