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

Started by chewdog on

Topic category: Help with modding (Java Edition)

Last seen on 09:42, 5. Sep 2023
Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I need help with living sounds. Like to add more for random effect.

 

 @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