Jump to content

[Solved] [1.15.2] Music Disc play sound with no distance limit


_HungTeen_

Recommended Posts

I am making a music disc Item named [Zombie On Your Lawn].

I can correctly use the disc Item to right click JuckBox, and it can play the right music.

But When i leave the JuckBox Block for about 200 blocks away, the music is still playing.(normally, when player about 30 blocks away, the music will stop playing).

Here is the code in ItemRegister.

public static final RegistryObject<Item> ZOMBIE_ON_YOUR_LAWN = ITEMS.register("zombie_on_your_lawn", () -> {return 
			new MusicDiscItem(0, () -> {
				return SoundRegister.ZOMBIE_ON_YOUR_LAWN.get();
				}, new Item.Properties().maxStackSize(1).group(GroupRegister.PVZ_MISC).rarity(Rarity.RARE));
			});
"zombie_on_your_lawn":{
        "subtitle": "sound.pvz.zombie_on_your_lawn",
        "sounds":[{"name":"pvz:music/zombie_on_your_lawn", "stream":true}]
    }

 

Edited by _HungTeen_
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.