From 86409d0ea60c6e0bbe1c4c8dfdf6517bd8aed09d Mon Sep 17 00:00:00 2001 From: Sollace Date: Thu, 28 Sep 2023 21:36:48 +0100 Subject: [PATCH] Generate vibrations from the player doing the interaction rather than the balloon itself. Fixes #195 --- .../unicopia/entity/mob/AirBalloonEntity.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/minelittlepony/unicopia/entity/mob/AirBalloonEntity.java b/src/main/java/com/minelittlepony/unicopia/entity/mob/AirBalloonEntity.java index a606fc4a..247de5bd 100644 --- a/src/main/java/com/minelittlepony/unicopia/entity/mob/AirBalloonEntity.java +++ b/src/main/java/com/minelittlepony/unicopia/entity/mob/AirBalloonEntity.java @@ -340,7 +340,7 @@ public class AirBalloonEntity extends MobEntity implements EntityCollisions.Comp } stack.damage(1, player, p -> p.sendToolBreakStatus(hand)); playSound(USounds.Vanilla.ITEM_FLINTANDSTEEL_USE, 1, 1); - getWorld().emitGameEvent(this, GameEvent.ENTITY_INTERACT, getBlockPos()); + getWorld().emitGameEvent(player, GameEvent.ENTITY_INTERACT, getBlockPos()); return ActionResult.SUCCESS; } @@ -352,7 +352,7 @@ public class AirBalloonEntity extends MobEntity implements EntityCollisions.Comp } } else if (stack.isEmpty() && isAscending()) { setBoostTicks(50); - getWorld().emitGameEvent(this, GameEvent.ENTITY_INTERACT, getBlockPos()); + getWorld().emitGameEvent(player, GameEvent.ENTITY_INTERACT, getBlockPos()); } } } @@ -369,7 +369,7 @@ public class AirBalloonEntity extends MobEntity implements EntityCollisions.Comp stack.decrement(1); } playSound(USounds.ENTITY_HOT_AIR_BALLOON_EQUIP_CANOPY, 1, 1); - getWorld().emitGameEvent(this, GameEvent.ENTITY_INTERACT, getBlockPos()); + getWorld().emitGameEvent(player, GameEvent.ENTITY_INTERACT, getBlockPos()); setDesign(HotAirBalloonItem.getDesign(getWorld(), stack)); return ActionResult.SUCCESS; } @@ -381,7 +381,7 @@ public class AirBalloonEntity extends MobEntity implements EntityCollisions.Comp setDesign(BalloonDesign.NONE); dropItem(UItems.GIANT_BALLOON); playSound(USounds.ENTITY_HOT_AIR_BALLOON_EQUIP_CANOPY, 1, 1); - getWorld().emitGameEvent(this, GameEvent.ENTITY_INTERACT, getBlockPos()); + getWorld().emitGameEvent(player, GameEvent.ENTITY_INTERACT, getBlockPos()); return ActionResult.SUCCESS; } @@ -391,7 +391,7 @@ public class AirBalloonEntity extends MobEntity implements EntityCollisions.Comp stack.decrement(1); } playSound(USounds.ENTITY_HOT_AIR_BALLOON_EQUIP_BURNER, 0.2F, 1); - getWorld().emitGameEvent(this, GameEvent.ENTITY_INTERACT, getBlockPos()); + getWorld().emitGameEvent(player, GameEvent.ENTITY_INTERACT, getBlockPos()); return ActionResult.SUCCESS; }