aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/mache-spigotflower-stripped/net/minecraft/world/item/SnowballItem.java.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patch-remap/mache-spigotflower-stripped/net/minecraft/world/item/SnowballItem.java.patch')
-rw-r--r--patch-remap/mache-spigotflower-stripped/net/minecraft/world/item/SnowballItem.java.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/patch-remap/mache-spigotflower-stripped/net/minecraft/world/item/SnowballItem.java.patch b/patch-remap/mache-spigotflower-stripped/net/minecraft/world/item/SnowballItem.java.patch
new file mode 100644
index 0000000000..9a0cd1a7ee
--- /dev/null
+++ b/patch-remap/mache-spigotflower-stripped/net/minecraft/world/item/SnowballItem.java.patch
@@ -0,0 +1,26 @@
+--- a/net/minecraft/world/item/SnowballItem.java
++++ b/net/minecraft/world/item/SnowballItem.java
+@@ -20,7 +19,8 @@
+ public InteractionResultHolder<ItemStack> use(Level level, Player player, InteractionHand interactionhand) {
+ ItemStack itemstack = player.getItemInHand(interactionhand);
+
+- level.playSound((Player) null, player.getX(), player.getY(), player.getZ(), SoundEvents.SNOWBALL_THROW, SoundSource.NEUTRAL, 0.5F, 0.4F / (level.getRandom().nextFloat() * 0.4F + 0.8F));
++ // CraftBukkit - moved down
++ // world.playSound((EntityHuman) null, entityhuman.getX(), entityhuman.getY(), entityhuman.getZ(), SoundEffects.SNOWBALL_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (world.getRandom().nextFloat() * 0.4F + 0.8F));
+ if (!level.isClientSide) {
+ Snowball snowball = new Snowball(level, player);
+
+@@ -28,9 +36,12 @@
+ snowball.shootFromRotation(player, player.getXRot(), player.getYRot(), 0.0F, 1.5F, 1.0F);
+ level.addFreshEntity(snowball);
+ }
++ // CraftBukkit end
+
+ player.awardStat(Stats.ITEM_USED.get(this));
+- if (!player.getAbilities().instabuild) {
++ // CraftBukkit start - moved up
++ /*
++ if (!entityhuman.getAbilities().instabuild) {
+ itemstack.shrink(1);
+ }
+