- 8,597 views, 4 today
- 861 downloads, 1 today
776
Automatic Dynamic Rule-Based Data Pack Style Checker
What is a Style Checker?
Style checkers are often used in programming to enforce certain guidelines. If everything is fine, you get a bit of green text and if something is wrong you'll see red text. This can then also be automated and hooked up into a code review process to make sure that your code follows the guidelines. Guidelines are created because a team or organization might have certain requirements that are not enforced by the language itself. Similarly, this Data Pack Checker will load up a data pack and perform a lot of checks to improve the quality of the data pack.Okay, so it's software that does nothing but complain. Why would I want that?
Guidelines are beneficial for everyone involved. It's understandable that you view "guidelines" as unnecessary struggle. However, if you want to go for high quality and happy users, you'll see that using an automated checker is easier than trying to provide that quality without a checker. If you're not convinced yet, here are a couple areas in which guidelines (or "conventions") really help out:- Compatibility: A convention that enforces correct namespacing (also in /scoreboard commands for example) will decrease the chances of data packs breaking when combined with other data packs.
- User Experience: A convention that enforces an uninstall function will make users happier knowing that the data pack can leave their world with less or no traces when removed.
- Debugging & Readability: Sooner rather than later something will go wrong during the development of a data pack. Each function has a context that gives meaning to @s, @p and ~ ~ ~. A convention that enforces comments describing that context will help you find bugs and understand your code when you come back to it later.
- Safety: Knowing that your data pack follows a guideline that dictates which commands are banned (/ban, /op, /kick, etc.), will let Server Owners, Event Organizers and more trust your data pack. By being able to quickly prove that your data pack is harmless, you can increase the chances of your data pack appearing in older highly valued single player worlds, YouTube videos and multi-player servers.
Neat! So how does the checker work and how do I use it?
The data pack checker software consists of 4 major parts.The Checker | The software will load up rules, configuration files and a data pack. Then it will check the data pack according to the specified rules. |
---|---|
The Rules | These are DLL files that contain the actual code for the rules / guidelines. Any developer can write rules and publish them as DLL files. As a user, you put those files in a Rules folder like plugins. When you then run the checker it will load up those rules and run them depending on the configuration. |
The Library | In order to connect the checker with the rules, some code needs to be shared by both. You can find a download for that on the download page of the checker. This is only required when you want to develop your own rules. |
The Configuration | This is a JSON file that specifies which rules to run and any additional configuration that a rule would need. |
Now you know the components at play, you can view the documentation to see how you can get started on checking your data packs. You'll see that there are already existing rules and configurations to get you up to speed.
What is next?
I have tested the rules myself to see if they work, but I didn't test actually creating a new data pack while using the checker. In the meantime I encourage you to start using the checker and give me feedback. Eventually I plan on hosting more data pack events which are made possible due to this automated way of checking. I would probably end up writing custom rules for the events, allowing great stuff to be made together, me to be able to check submissions faster and in general keep the feedback loop a lot shorter.Who knows what this new found trust in data packs, granted by automated checking can bring us in the future.
Credit | Vellaris for creating the cute robot in the image :) |
Compatibility | Minecraft 1.13 |
to | Minecraft 1.17 |
Tags |
1 Update Logs
The data pack checker is now interactive! : by Bertiecrafter 03/11/2021 1:01:28 pmMar 11th, 2021
This means that you won't need to open up the console/terminal and manually paste in complicated paths to your data packs and config files anymore. Simply double click the executable and make decisions by entering the numbers associated with an option.
If the checker doesn't suggest the right options, you can still manually provide all values (like the base path to your minecraft folder) by adding extra arguments on the command line. Use the "--help" argument to list all other arguments.
If the checker doesn't suggest the right options, you can still manually provide all values (like the base path to your minecraft folder) by adding extra arguments on the command line. Use the "--help" argument to list all other arguments.
tools/tracking
4935097
119
data-pack-style-checker
Create an account or sign in to comment.
The following errors occurred while trying to read the rule files (.dll):
TypeLoadException: Could not load DataPackChecker.Shared.CheckerRule, Shared, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
InvalidOperationException: No visible default constructor on DataPackChecker.Shared.CheckerRule, Shared, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
You can send me a stack trace in a spoiler (to not clutter up the comments) if you want to.
The software only reads files, no files are modified and it does not send anything over the internet.