Help with custom entity ranged attack sound

Started by FoxZarz on

Topic category: Help with modding (Java Edition)

Last seen on 19:32, 27. Jun 2024
Joined Jul 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Help with custom entity ranged attack sound

Long story short, i've made a custom entity who shoots Wither Skulls. The problem is that the "shoot" sound of theese are the default bow sound, also, when hitting a player/entity/block, the hitting arrow sounds reproduce

Also i saw this on the code of the entity


        @Override
        public net.minecraft.util.SoundEvent getAmbientSound() {
            return (net.minecraft.util.SoundEvent) net.minecraft.util.SoundEvent.REGISTRY.getObject(new ResourceLocation("entity.wither.ambient"));
        }

        @Override
        public net.minecraft.util.SoundEvent getHurtSound(DamageSource ds) {
            return (net.minecraft.util.SoundEvent) net.minecraft.util.SoundEvent.REGISTRY.getObject(new ResourceLocation("entity.wither.hurt"));
        }

        @Override
        public net.minecraft.util.SoundEvent getDeathSound() {
            return (net.minecraft.util.SoundEvent) net.minecraft.util.SoundEvent.REGISTRY.getObject(new ResourceLocation("entity.wither.death"));
        }

Maybe it's possible to override the sound of shooting the skull + the sound of it hitting? If this is not possible then, its there a way (even with justom code) to make the mob use a custom made ranged bullet wich has custom sound AND procedure?