I need help with living sounds. Like to add more for random effect.

Started by chewdog on Wed, 07/21/2021 - 14:49

Topic category: Help with modding (Java Edition)

Last seen on 13:15, 9. Sep 2021
Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I need help with living sounds. Like to add more for random effect.
Wed, 07/21/2021 - 14:49

 

 @Override
        public net.minecraft.util.SoundEvent getAmbientSound() {
            return (net.minecraft.util.SoundEvent) ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("testing:snake_living"));
        }

 

 Can I add to more to the ResourceLocation and add a delay?

EXAMPLE = (new ResourceLocation("testing:snake_living1","testing:snake_living2","testing:snake_living3","testing:snake_living4"));

 I assumed a delay would not work cause of how MC uses ticks. I am adding empty space on the tail end of the .OGG so it does not repeat etc. This is my only solution atm. 

 

 Side note - My resource pack I made has skeletons and zombies that have multiple living sounds etc for vanilla mobs.

Chew