Guest User

Untitled

a guest
Apr 21st, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. public void playFireSound() {
  2. playSound("gun.shotgun.fire");
  3. }
  4.  
  5. public void playReloadSound() {
  6. playSound("gun.shotgun.reload");
  7. }
  8.  
  9. /**
  10. * Play sound
  11. * @param name The name of the sound (not the path to the sound)
  12. */
  13. public void playSound(final String name) {
  14. Minecraft.getMinecraft().getSoundHandler().playSound(PositionedSoundRecord.create(new ResourceLocation(Reference.MOD_ID, name), 1.0F));
  15. }
Add Comment
Please, Sign In to add comment