Minecraft Data Packs / Tool

Data Pack Checker

    • 1,542 views, 13 today
    • 98 downloads, 2 today
    • 29
    • 20
    • 10
    Bertiecrafter avatar Bertiecrafter
    Event Host
    Level 59 : Grandmaster Cyborg
    267

    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 Snapshot
    Tags

    2
    01/26/2021 1:10 pm
    Level 9 : Apprentice Engineer
    SheepCommander
    SheepCommander avatar
    Would recommend telling poeple to be wary of dll files tho since they can hurt your computer
    1
    01/26/2021 1:42 pm
    Level 59 : Grandmaster Cyborg
    Bertiecrafter
    Bertiecrafter avatar
    I did on the github page :)
    2
    01/26/2021 1:10 pm
    Level 9 : Apprentice Engineer
    SheepCommander
    SheepCommander avatar
    I've yet to try it out myself but looks great! I'm assuming it uses the official datapack conventions for a default?
    1
    01/26/2021 1:43 pm
    Level 59 : Grandmaster Cyborg
    Bertiecrafter
    Bertiecrafter avatar
    There are no "official" data pack conventions. The checker is separated from the rules, but the rules I made follow the conventions I proposed in the data pack tutorial series. I'm aware that there are more conventions out there.
    2
    01/26/2021 11:59 am
    Level 71 : Legendary Engineer
    Moggla
    Moggla avatar
    I've tested it and I love it! Great job Bertiecrafter.
    The Only thing is that I have to unzip my datapack first :(
    1
    01/26/2021 2:36 pm
    Level 59 : Grandmaster Cyborg
    Bertiecrafter
    Bertiecrafter avatar
    In a normal use case the data pack is already unzipped during development. Actually specifying the data pack path is a bit awkward for now, though.
    3
    01/26/2021 10:02 am
    Level 15 : Journeyman Dragonborn
    Galdeveer
    Galdeveer avatar
    As a software engineer, I definitely agree that this is important. I will test it out soon.
    3
    01/25/2021 7:04 pm
    Level 27 : Expert Strawberry
    Vellariya
    Vellariya avatar
    10/10 good good
    2
    01/25/2021 7:05 pm
    Level 59 : Grandmaster Cyborg
    Bertiecrafter
    Bertiecrafter avatar
    Hahaha xD
    4
    01/25/2021 6:17 pmhistory
    Level 59 : Grandmaster Cyborg
    Bertiecrafter
    Bertiecrafter avatar
    Thank you FishStacks, pettyGamingHD, Yekc, Sandesu, McMeddon, Vellaris, DinoDesmond, JitteryPluto, Beguiled_Hydra, Cybear_Tron, CorporalKeith, Nozokuma, Moggla, Francielly, SheepCommander, TheVirusNVGM, PMC, kanokarob, TPLWolfe, OCEAN_F1SH, bentleycoburn, Millimedia Games, Ranger_Danger, Luracasmus, Yellowglacier, Cyprezz, Sir_Wodr and Drakio-X for the diamonds!
    Planet Minecraft Logo

    Website

    © 2010 - 2021
    www.planetminecraft.com

    Welcome