mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-27 07:17:58 +01:00
Generate vibrations from the player doing the interaction rather than the balloon itself. Fixes #195
This commit is contained in:
parent
522d062726
commit
86409d0ea6
1 changed files with 5 additions and 5 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue