getDeathSound() add more sounds?

Upvotes: 0
Issue description

I'm making a mod and I usually don't code and I noticed you can only have one sound when making NPCs is there a way to use more that one if you code it.

== code itself ==

		public net.minecraft.util.SoundEvent getDeathSound() {
			return (net.minecraft.util.SoundEvent) net.minecraft.util.SoundEvent.REGISTRY.getObject(new ResourceLocation(

please let me know because I want my NPCs to feel more fleshed out.

please provide with an example too, it will be much appreciated.

Issue comments

You could use on entity death procedure and use play sound procedure block in combination with randomizer to achieve what you want.

If you insist on custom code, open a forum topic, the issue tracker is not a support place for coding.

I suggest you check our tutorials collection playlist on our YouTube channel which contains many examples and tutorials that can help you get started with MCreator:

Ok thank you so much, I did not know you could do it that way.

Donate to MCreator

By donating to developers you can speed up development, as with more resources, we can dedicate more time to MCreator. It is a free project made by developers working on it in their free time.