Minecraft Data Packs / Tool

Data Pack Checker

    • 5,517 views, 5 today
    • 452 downloads, 0 today
    • 44
    • 32
    • 21
    Bertiecrafter avatar Bertiecrafter
    Site Moderator
    Level 67 : High Grandmaster Stack
    646

    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 CheckerThe software will load up rules, configuration files and a data pack. Then it will check the data pack according to the specified rules.
    The RulesThese 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 LibraryIn 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 ConfigurationThis 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.



    Data Pack Checker Minecraft Data Pack
    Data Pack Checker Minecraft Data Pack
    CreditVellaris for creating the cute robot in the image :)
    CompatibilityMinecraft 1.13
    toMinecraft 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.

    Create an account or sign in to comment.

    1
    04/12/2022 9:42 pm
    Level 10 : Journeyman Cookie
    Unavalible_User
    Unavalible_User avatar
    so I have downloaded everything (I hope!) but every time I launch the .exe file it closes with an error message - before I can read the said error message
    1
    04/14/2022 1:37 pm
    Level 67 : High Grandmaster Stack
    Bertiecrafter
    Bertiecrafter avatar
    Ah that's unfortunate. Try running it from the command line. (If you're on windows, you can click the address bar in the file explorer and type "cmd" to start a prompt at the current directory. You can then use tab to find the file and run it.)
    1
    04/14/2022 5:44 pm
    Level 10 : Journeyman Cookie
    Unavalible_User
    Unavalible_User avatar
    well at least that allowed me to see the error...

    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
    1
    04/15/2022 1:27 pm
    Level 67 : High Grandmaster Stack
    Bertiecrafter
    Bertiecrafter avatar
    Interesting... I'll need the stack trace (a set of lines describing where the problem happened) to better assist, but if I'd had to guess you used the internal "CheckerRule" in your config file. You should be downloading and using rules from rule repositories (check rules or update rules).

    You can send me a stack trace in a spoiler (to not clutter up the comments) if you want to.
    1
    11/11/2021 7:06 pm
    Level 14 : Journeyman Network
    Jayneshplayz
    Jayneshplayz avatar
    how would i know whether it steal datapack
    2
    11/14/2021 9:10 am
    Level 67 : High Grandmaster Stack
    Bertiecrafter
    Bertiecrafter avatar
    The software does not send data packs anywhere and won't steal your data pack. If I wanted to steal a data pack, I would simply download it instead of making software to trick people into uploading it haha. If you meant to ask if the software can check if the data pack was stolen, it cannot distinguish between original and copies of data packs.
    1
    10/23/2021 6:13 pm
    Level 14 : Journeyman Dragon
    Why900
    Why900 avatar
    I can't find the executable.
    1
    10/23/2021 6:16 pm
    Level 14 : Journeyman Dragon
    Why900
    Why900 avatar
    nvm i downloaded the wrong thing
    2
    03/14/2021 1:48 am
    Level 37 : Artisan Pixel Painter
    Dunk__
    Dunk__ avatar
    how can I know this isn't a virus?
    5
    03/14/2021 5:26 am
    Level 67 : High Grandmaster Stack
    Bertiecrafter
    Bertiecrafter avatar
    Good question! How do you know any software isn't a virus? You could put it through a scan or read through the source code on GitHub, but you can trust me that the software is not a virus. If it was, somebody would start raising awareness and all the support I gathered over the years would be gone, I don't want that.

    The software only reads files, no files are modified and it does not send anything over the internet.
    Planet Minecraft

    Website

    © 2010 - 2022
    www.planetminecraft.com

    Welcome