2020-10-27 20:15:13 +01:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Bud Gidiere <sgidiere@gmail.com>
|
|
|
|
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
|
2020-11-07 08:02:33 +01:00
|
|
|
index d855cd77ae0ce67aef1b6d7335e21695f9e30e4d..7dbea179fee36cee78862893552dfd2a5694398f 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
|
|
|
|
@@ -2137,7 +2137,7 @@ public abstract class EntityHuman extends EntityLiving {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
- 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
|
|
|
|
index 142120d9fe4b6a621957b8e7b21dd757a8eb38a2..aed464125373eaefe61c14706b3bef046b2b691e 100644
|
|
|
|
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
|
|
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
|
|
@@ -177,9 +177,11 @@ public class PurpurWorldConfig {
|
|
|
|
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);
|
|
|
|
}
|
|
|
|
}
|