mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-21 02:17:42 +01:00
Upstream has released updates that appear to apply and compile correctly Paper Changes: 466820160 Upstream Update (#5211) 2a0ee4b65 Add support for hex color codes in console 4e958e229 We're going on an Adventure! (#4842) 1a9735611 Stop loop when flags set to false (#5101) a5928db4a [Auto] Updated Upstream (CraftBukkit)
36 lines
2.1 KiB
Diff
36 lines
2.1 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
|
Date: Thu, 19 Mar 2020 19:39:34 -0500
|
|
Subject: [PATCH] Add option to allow loyalty on tridents to work in the void
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityThrownTrident.java b/src/main/java/net/minecraft/server/EntityThrownTrident.java
|
|
index 8026a55d462a646d6b39db21d52ba0871dfbc4d3..2acbe7437df71fc27580deddee8eb7655a297b70 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityThrownTrident.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityThrownTrident.java
|
|
@@ -38,7 +38,7 @@ public class EntityThrownTrident extends EntityArrow {
|
|
|
|
Entity entity = this.getShooter();
|
|
|
|
- if ((this.ai || this.t()) && entity != null) {
|
|
+ if ((this.ai || this.t() || (world.purpurConfig.tridentLoyaltyVoidReturnHeight < 0.0D && locY() < world.purpurConfig.tridentLoyaltyVoidReturnHeight)) && entity != null) { // Purpur
|
|
byte b0 = (Byte) this.datawatcher.get(EntityThrownTrident.g);
|
|
|
|
if (b0 > 0 && !this.z()) {
|
|
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
index d6a95f47c42538b574ec55c0cfffe064b80fdef0..4a0bbc0cd41b4a50ebad9b4569e07d727fc3e482 100644
|
|
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
@@ -114,9 +114,11 @@ public class PurpurWorldConfig {
|
|
|
|
public boolean disableDropsOnCrammingDeath = false;
|
|
public boolean milkCuresBadOmen = true;
|
|
+ public double tridentLoyaltyVoidReturnHeight = 0.0D;
|
|
private void miscGameplayMechanicsSettings() {
|
|
disableDropsOnCrammingDeath = getBoolean("gameplay-mechanics.disable-drops-on-cramming-death", disableDropsOnCrammingDeath);
|
|
milkCuresBadOmen = getBoolean("gameplay-mechanics.milk-cures-bad-omen", milkCuresBadOmen);
|
|
+ tridentLoyaltyVoidReturnHeight = getDouble("gameplay-mechanics.trident-loyalty-void-return-height", tridentLoyaltyVoidReturnHeight);
|
|
}
|
|
|
|
public int playerSpawnInvulnerableTicks = 60;
|