From 66f74689a0a51ffe595663076907df95e11faf59 Mon Sep 17 00:00:00 2001 From: granny Date: Wed, 8 May 2024 01:51:27 -0700 Subject: [PATCH] allow using quiver in offhand --- ...-turning-bundles-into-functional-quivers.patch | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/patches/server/0296-config-for-turning-bundles-into-functional-quivers.patch b/patches/server/0296-config-for-turning-bundles-into-functional-quivers.patch index 3b6fd0b22..be0cc70b5 100644 --- a/patches/server/0296-config-for-turning-bundles-into-functional-quivers.patch +++ b/patches/server/0296-config-for-turning-bundles-into-functional-quivers.patch @@ -94,7 +94,7 @@ index 845c4af5d5d38d54de4a1b20fe32bf5dd4776a29..15763ebc6c1ba3ba47d8110cf87fd486 return itemstack2; } diff --git a/src/main/java/net/minecraft/world/item/BowItem.java b/src/main/java/net/minecraft/world/item/BowItem.java -index ff39d3614f360918d74b54b817bc227f89d34c9c..4544835f2fe916e81f2932c1c6117bc9c1faa3ae 100644 +index 8bca38ec152f9612298bf6b3e10e7e0566ec3b78..2786272f45b82263e74e20407ffa7f3a439641a4 100644 --- a/src/main/java/net/minecraft/world/item/BowItem.java +++ b/src/main/java/net/minecraft/world/item/BowItem.java @@ -24,7 +24,7 @@ public class BowItem extends ProjectileWeaponItem { @@ -106,6 +106,19 @@ index ff39d3614f360918d74b54b817bc227f89d34c9c..4544835f2fe916e81f2932c1c6117bc9 if (!itemStack.isEmpty()) { int i = this.getUseDuration(stack) - remainingUseTicks; float f = getPowerForTime(i); +diff --git a/src/main/java/net/minecraft/world/item/BundleItem.java b/src/main/java/net/minecraft/world/item/BundleItem.java +index 233c50af05085c1ecb069dd2e90d17c85f27e5ab..05843f14261764ff6add052e4ec1e3b2ef4ca6a8 100644 +--- a/src/main/java/net/minecraft/world/item/BundleItem.java ++++ b/src/main/java/net/minecraft/world/item/BundleItem.java +@@ -101,7 +101,7 @@ public class BundleItem extends Item { + @Override + public InteractionResultHolder use(Level world, Player user, InteractionHand hand) { + ItemStack itemStack = user.getItemInHand(hand); +- if (dropContents(itemStack, user)) { ++ if (!(world.purpurConfig.bowUseBundleAsQuiver || world.purpurConfig.bowUseBundleAsQuiver) && dropContents(itemStack, user)) { // Purpur + this.playDropContentsSound(user); + user.awardStat(Stats.ITEM_USED.get(this)); + return InteractionResultHolder.sidedSuccess(itemStack, world.isClientSide()); diff --git a/src/main/java/net/minecraft/world/item/CrossbowItem.java b/src/main/java/net/minecraft/world/item/CrossbowItem.java index 78f124f5204e4af9318ca3eeced6b1e3353b210f..40c6076a9cb17ac8120181dab77290bb0131b121 100644 --- a/src/main/java/net/minecraft/world/item/CrossbowItem.java