Add hand to fish event for all player interactions
This commit is contained in:
@@ -12,6 +12,15 @@
|
||||
public class FishingRodItem extends Item {
|
||||
|
||||
public FishingRodItem(Item.Properties settings) {
|
||||
@@ -26,7 +31,7 @@
|
||||
|
||||
if (user.fishing != null) {
|
||||
if (!world.isClientSide) {
|
||||
- int i = user.fishing.retrieve(itemstack);
|
||||
+ int i = user.fishing.retrieve(hand, itemstack); // Paper - Add hand parameter to PlayerFishEvent
|
||||
|
||||
itemstack.hurtAndBreak(i, user, LivingEntity.getSlotForHand(hand));
|
||||
}
|
||||
@@ -34,13 +39,24 @@
|
||||
world.playSound((Player) null, user.getX(), user.getY(), user.getZ(), SoundEvents.FISHING_BOBBER_RETRIEVE, SoundSource.NEUTRAL, 1.0F, 0.4F / (world.getRandom().nextFloat() * 0.4F + 0.8F));
|
||||
user.gameEvent(GameEvent.ITEM_INTERACT_FINISH);
|
||||
|
||||
Reference in New Issue
Block a user