we compile

This commit is contained in:
Ben Kerllenevich
2023-06-09 09:57:52 -04:00
parent 589c34e018
commit 71c445017d
22 changed files with 110 additions and 98 deletions

View File

@@ -5,7 +5,7 @@ Subject: [PATCH] Allow infinity on crossbows
diff --git a/src/main/java/net/minecraft/world/item/CrossbowItem.java b/src/main/java/net/minecraft/world/item/CrossbowItem.java
index a433910fb4d0bd8d7b6b0d66c8fc88d62a0e4879..795803bbb89e8f19a308ece7b5d1359da1538519 100644
index a433910fb4d0bd8d7b6b0d66c8fc88d62a0e4879..ae6ba3c0a7722674b304291f643960b0a58fca57 100644
--- a/src/main/java/net/minecraft/world/item/CrossbowItem.java
+++ b/src/main/java/net/minecraft/world/item/CrossbowItem.java
@@ -114,7 +114,7 @@ public class CrossbowItem extends ProjectileWeaponItem implements Vanishable {
@@ -13,7 +13,7 @@ index a433910fb4d0bd8d7b6b0d66c8fc88d62a0e4879..795803bbb89e8f19a308ece7b5d1359d
int i = EnchantmentHelper.getItemEnchantmentLevel(Enchantments.MULTISHOT, crossbow);
int j = i == 0 ? 1 : 3;
- boolean flag = !consume || shooter instanceof Player && ((Player) shooter).getAbilities().instabuild; // Paper - add consume
+ boolean flag = !consume || shooter instanceof Player && ((Player) shooter).getAbilities().instabuild || (org.purpurmc.purpur.PurpurConfig.allowCrossbowInfinity && EnchantmentHelper.getItemEnchantmentLevel(Enchantments.INFINITY_ARROWS, projectile) > 0); // Paper - add consume // Purpur
+ boolean flag = !consume || shooter instanceof Player && ((Player) shooter).getAbilities().instabuild || (org.purpurmc.purpur.PurpurConfig.allowCrossbowInfinity && EnchantmentHelper.getItemEnchantmentLevel(Enchantments.INFINITY_ARROWS, crossbow) > 0); // Paper - add consume // Purpur
ItemStack itemstack1 = shooter.getProjectile(crossbow);
ItemStack itemstack2 = itemstack1.copy();