diff options
Diffstat (limited to 'patch-remap/mache-vineflower-stripped/net/minecraft/world/item/EnderpearlItem.java.patch')
-rw-r--r-- | patch-remap/mache-vineflower-stripped/net/minecraft/world/item/EnderpearlItem.java.patch | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/patch-remap/mache-vineflower-stripped/net/minecraft/world/item/EnderpearlItem.java.patch b/patch-remap/mache-vineflower-stripped/net/minecraft/world/item/EnderpearlItem.java.patch new file mode 100644 index 0000000000..4851eaadc8 --- /dev/null +++ b/patch-remap/mache-vineflower-stripped/net/minecraft/world/item/EnderpearlItem.java.patch @@ -0,0 +1,37 @@ +--- a/net/minecraft/world/item/EnderpearlItem.java ++++ b/net/minecraft/world/item/EnderpearlItem.java +@@ -15,19 +16,10 @@ + } + + @Override +- public InteractionResultHolder<ItemStack> use(Level level, Player player, InteractionHand hand) { +- ItemStack itemInHand = player.getItemInHand(hand); +- level.playSound( +- null, +- player.getX(), +- player.getY(), +- player.getZ(), +- SoundEvents.ENDER_PEARL_THROW, +- SoundSource.NEUTRAL, +- 0.5F, +- 0.4F / (level.getRandom().nextFloat() * 0.4F + 0.8F) +- ); +- player.getCooldowns().addCooldown(this, 20); ++ public InteractionResultHolder<ItemStack> use(Level level, Player player, EnumHand hand) { ++ ItemStack itemstack = player.getItemInHand(hand); ++ ++ // CraftBukkit start - change order + if (!level.isClientSide) { + ThrownEnderpearl thrownEnderpearl = new ThrownEnderpearl(level, player); + thrownEnderpearl.setItem(itemInHand); +@@ -35,6 +33,10 @@ + level.addFreshEntity(thrownEnderpearl); + } + ++ level.playSound((Player) null, player.getX(), player.getY(), player.getZ(), SoundEvents.ENDER_PEARL_THROW, SoundSource.NEUTRAL, 0.5F, 0.4F / (level.getRandom().nextFloat() * 0.4F + 0.8F)); ++ player.getCooldowns().addCooldown(this, 20); ++ // CraftBukkit end ++ + player.awardStat(Stats.ITEM_USED.get(this)); + if (!player.getAbilities().instabuild) { + itemInHand.shrink(1); |