2020-10-27 20:15:13 +01:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2021-01-21 11:58:52 +01:00
|
|
|
From: Zoe <duplexsys@protonmail.com>
|
2020-10-27 20:15:13 +01:00
|
|
|
Date: Sun, 25 Oct 2020 12:24:19 -0500
|
|
|
|
Subject: [PATCH] Infinity No Arrows
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
|
2021-01-21 11:58:52 +01:00
|
|
|
index c9f490e4e4e7a5a3a9ad99f864ff8fb2acc5b5b2..b3c76fcf65b028e4aa53699ee93a5c3ba59981f2 100644
|
2020-10-27 20:15:13 +01:00
|
|
|
--- a/src/main/java/net/minecraft/server/EntityHuman.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
|
2021-01-21 11:58:52 +01:00
|
|
|
@@ -2179,7 +2179,7 @@ public abstract class EntityHuman extends EntityLiving {
|
2020-10-27 20:15:13 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
- return this.abilities.canInstantlyBuild ? new ItemStack(Items.ARROW) : ItemStack.b;
|
|
|
|
+ return this.abilities.canInstantlyBuild || (world.purpurConfig.infinityWorksWithNoArrows && EnchantmentManager.getEnchantmentLevel(Enchantments.ARROW_INFINITE, itemstack) > 0) ? new ItemStack(Items.ARROW) : ItemStack.b; // Yatopia
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
2021-01-21 11:58:52 +01:00
|
|
|
index 7c9ea94960e8147d5d193b40c17178f8c28b4acf..7fa0a12781028b8352897556c8613ad41cf29036 100644
|
2020-10-27 20:15:13 +01:00
|
|
|
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
|
|
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
2021-01-21 11:58:52 +01:00
|
|
|
@@ -200,10 +200,12 @@ public class PurpurWorldConfig {
|
2020-10-27 20:15:13 +01:00
|
|
|
public boolean infinityWorksWithNormalArrows = true;
|
|
|
|
public boolean infinityWorksWithSpectralArrows = false;
|
|
|
|
public boolean infinityWorksWithTippedArrows = false;
|
|
|
|
+ public boolean infinityWorksWithNoArrows = false;
|
|
|
|
private void infinityArrowsSettings() {
|
|
|
|
infinityWorksWithNormalArrows = getBoolean("gameplay-mechanics.infinity-bow.normal-arrows", infinityWorksWithNormalArrows);
|
|
|
|
infinityWorksWithSpectralArrows = getBoolean("gameplay-mechanics.infinity-bow.spectral-arrows", infinityWorksWithSpectralArrows);
|
|
|
|
infinityWorksWithTippedArrows = getBoolean("gameplay-mechanics.infinity-bow.tipped-arrows", infinityWorksWithTippedArrows);
|
|
|
|
+ infinityWorksWithNoArrows = getBoolean("gameplay-mechanics.infinity-bow.no-arrows", infinityWorksWithNoArrows);
|
|
|
|
}
|
2020-11-26 11:38:40 +01:00
|
|
|
|
2021-01-21 11:58:52 +01:00
|
|
|
public int dragonFireballDespawnRate = -1;
|