Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

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


_HungTeen_
 Share

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
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.

 Share



×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.