mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 08:27:43 +01:00
36 lines
2.0 KiB
Diff
36 lines
2.0 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 a3150bd1c..b24b8c39d 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 3e1e1d336..61094d4f7 100644
|
|
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
@@ -112,9 +112,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;
|