mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 08:27:43 +01:00
Add option to allow loyalty on tridents to work in the void
This commit is contained in:
committed by
granny
parent
676b9dbb76
commit
97698faa02
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/world/entity/projectile/ThrownTrident.java
|
||||
+++ b/net/minecraft/world/entity/projectile/ThrownTrident.java
|
||||
@@ -64,7 +_,7 @@
|
||||
|
||||
Entity owner = this.getOwner();
|
||||
int i = this.entityData.get(ID_LOYALTY);
|
||||
- if (i > 0 && (this.dealtDamage || this.isNoPhysics()) && owner != null) {
|
||||
+ if (i > 0 && (this.dealtDamage || this.isNoPhysics() || (level().purpurConfig.tridentLoyaltyVoidReturnHeight < 0.0D && getY() < level().purpurConfig.tridentLoyaltyVoidReturnHeight)) && owner != null) { // Purpur - Add option to allow loyalty on tridents to work in the void
|
||||
if (!this.isAcceptibleReturnOwner()) {
|
||||
if (this.level() instanceof ServerLevel serverLevel && this.pickup == AbstractArrow.Pickup.ALLOWED) {
|
||||
this.spawnAtLocation(serverLevel, this.getPickupItem(), 0.1F);
|
||||
@@ -86,9 +86,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 double minecartMaxSpeed = 0.4D;
|
||||
|
||||
Reference in New Issue
Block a user