CustomDiscs
CustomDiscs copied to clipboard
Custom music disc range
We are wanting this on a server but we wanted to be able to set the range of the music disk.
This add in:
- Command to set the music disk range
- Config option to set a max range
- Default to config if range is not set on disk
Just an upvote on this change, tested on my end with the latest build (2.5.1), working as intended (just struggled with the build process which didn't include the dependencies when building the JAR file, don't know why...).
Just some code need to be adjusted (the "disc detection mechanic" for example, which changed since this commit).
Sorry to ping, but @Navoei any plan on adding this to the main release ? 🙂 (I don't think there is much rework to do even for the 1.21 version).
If you can test this for 1.21 and make a pull request, then I can add this :) its a good addition
For sure I'll do, I like to have this possibility added to the plugin like the original one (same for goat horn, which I'll take a look later on :P )
Just replicated the same changes to the v3 and this is still working.
I'll do a PR as soon as everything is pushed on my git 😊
Just a side note @Navoei : I don't know why, and only with your plugin so far, the dependency are never downloaded and/or packaged with the build process. I always have to unpack those from the last build you give here to pack it in mine 😂 Any idea why this happen ? (I'm quite a noob when it's gradle related)
Sorry (again) for the ping @Navoei , did you get a chance to look at the PR I made ? (to know if this is OK that way for you).
As I'm looking into the Goat horn addition (which might be a little bit tricky for now, but that would allow me to keep those changes on the custom range at least, if all good for you) ❤️
Oh, and I get the shadowJar working again (with a build that support Java 21 😁, but I also had to update to gradle 8.4 (no issues in the compile process so far))
Yeah I havent looked at pull requests for a while and I just recently merged one that improves the command system. I would highly recommend that functionality for discs made in previous versions is kept. For example if some data regarding the range is not present in the persistent data container then just fall back to the default. Not having that data should also apply when no range is set using the command. Also there is already a default range in the config file (music-disc-distance: 16
).
Edit: Nevermind looks like you already use a different PersistentDataContainer to store the custom range. Nice work! I will merge it once you get into looking at the conflicts.
Yeah, the original author did use a different key for the PDC storage, so that shouldn't be an issue, and I think that if we don't set any range, it already use the default (but this is not clearly state in the code if I remember correctly, could be a little change to do).
Let me know if you want me to take a look with this change in the code (to ensure it's working) and redo a new commit in that case with latest branch (but that'll be next week :D )
It has been 3 weeks now, did you want me to take a look at it with the latest changes in the code to include the disc range to it ? As this change stop me into looking for the goat horn too ( even though, it will not be a pretty code anyways, will work, but not in a pretty manner).
Edit : Working on porting, one last time, this change with latest commits.