Advertisement
Guest User

Untitled

a guest
May 7th, 2020
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. @Mod.EventBusSubscriber(Dist.CLIENT)
  2. public class PlaySoundClass {
  3. private final ClientPlayerEntity player;
  4.  
  5. public PlaySoundClass(ClientPlayerEntity player) {
  6. this.player = player;
  7. }
  8. @SubscribeEvent
  9. public void tick() {
  10. if (player.getHeldItemMainhand().getItem() == ItemList.blue_lightsaber) {
  11. this.player.playSound(SoundEvents.AMBIENT_CAVE, 1.0F, 1.0F);
  12. }
  13. }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement