CreateCraft

make me a minecraft mod for fabric 1.21.11 that works like this, when you put a bell under a note block and play the note block it plays the sound file that i sent you, make the sound reach at least 500 blocks far from the original place that the sound was played in all directions, so you basically replace the normal minecraft note block notes with this sound effect but it only works when a bell and only a bell is underneath the note block.

Kodari AI
KodariOct 30 at 4:26 pm 2
BellNoteSoundMod
A Fabric mod for Minecraft 1.21.11 that replaces note block sounds when a bell is placed directly beneath the note block. When the note block is activated, it plays a custom sound file at a volume and range reaching at least 500 blocks in all directions, overriding the default note block sound. The mod detects the bell underneath via block state checks and plays the custom sound effect only under this specific configuration, leaving normal note block behavior unchanged otherwise. The custom sound is registered as a new sound event and triggered at the note block's position with high attenuation distance.
  1. Hook note-block playback and check that the block directly below is a bell.

  2. Play a custom sound at the note-block position with a 500-block range.

  3. Add the Fabric mod metadata and sound resource definition; the audio file itself wasn’t attached, so I’ll leave its required asset path explicit.

Created the Fabric 1.21.11 mod. When a bell is directly beneath a note block, playing it replaces the normal note with a custom sound broadcast up to 500 blocks; without a bell beneath it, note blocks behave normally.

The sound file wasn’t available in the project inputs I received. Add it as an OGG file at src/main/resources/assets/bellnoteaudio/sounds/custom_note.ogg for the custom sound to play.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Church Bell Mod
gradle.properties
settings.gradle
Code
11 210
src/main/java/com/kodari/bellnoteaudio/BellNoteAudio.java
package com.kodari.bellnoteaudio;

import net.fabricmc.api.ModInitializer;

public final class BellNoteAudio implements ModInitializer {
    public static final String MOD_ID = "bellnoteaudio";

    @Override
    public void onInitialize() {
        ModSounds.initialize();
    }
}