ModMCdl

SoundsHandler.java

May 16th, 2018
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.71 KB | None | 0 0
  1. package com.camellias.voidaicarcania.util.handlers;
  2.  
  3. import com.camellias.voidaicarcania.Reference;
  4.  
  5. import net.minecraft.util.ResourceLocation;
  6. import net.minecraft.util.SoundEvent;
  7. import net.minecraftforge.fml.common.registry.ForgeRegistries;
  8.  
  9. public class SoundsHandler
  10. {
  11.     public static SoundEvent VOID_ENTRY_AMBIENT;
  12.    
  13.     public static void registerSounds()
  14.     {
  15.         VOID_ENTRY_AMBIENT = registerSound("voidic.ambient");
  16.     }
  17.    
  18.     private static SoundEvent registerSound(String name)
  19.     {
  20.         ResourceLocation location = new ResourceLocation(Reference.MODID, name);
  21.         SoundEvent event = new SoundEvent(location);
  22.         event.setRegistryName(name);
  23.         ForgeRegistries.SOUND_EVENTS.register(event);
  24.         return event;
  25.     }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment