Data Packs Tool

Global ID

    • 510 views • 1 today
    • 10 downloads • 0 today
    • 3
    • 2
    • 6
    deWonknu
    Level 31 : Artisan Artist
    39
    Global ID Minecraft Data Pack

    Global ID is a Library to manage entity ID easly, this library was made originally as personal use but since the Yeggs Map Jam rules doesn't allow to use things prev made, im publishing it to everyone and also for future datapacks.

    Usage:

    Connect the function "globalid:load" to your own "#minecraft:load"

    To make a new ID, you can use the function "globalid:internal/createid" or "globalid:internal/createidasentity".
    The first function will create an ID without copying it to entity, you will need to use "globalid:internal/copyactualid", that function will copy to the entity that you're executing the newest ID. The second function makes all this automaticly

    If you're working with various entities and them all needs the same id, run the previous function for the Parent (To create a new ID) and run the function "globalid:internal/copyactualid" for the Child entities

    To use the ID system, do this:
    tag @e[Your Entity] add checkID
    function globalid:internal/checkentities
    execute as @e[Your Entity,tag=hasID] run function foo:...

    tag @e[tag=hasID] remove hasID


    Add to your entities the tag "checkID", run the function "globalid:internal/checkentities" and use the tag "hasID" as your output, the library will make the commands to check if the ID matches

    For copying IDs, the function "globalid:internal/copytempid" will copy the ID from another fake player. the usage is this:
    scoreboard players operation #copy globalID = @s globalID
    execute summon minecraft:pig run function foo:.../initiate
    > foo:.../initiate
    function globalid:internal/copytempid
    This functions will spawn a new pig and copy the ID from the entity in which it is running this first function.

    Thanks

    That's all, this is a very small library but also its very useful for datapacks, if you want to use the library, it's all yours. Credit is not needed to use but i appreciate it.
    CreditMinho - Making Obsidian, the Ancestor of Global ID
    CompatibilityMinecraft 1.21
    Tags

      Have something to say?

    ALDgamer
    05/24/2025 10:31 pm
    He/Him • Level 51 : Grandmaster Engineer Builder
    Ojazo
    2
    Kiwi Kcz
    05/24/2025 9:47 pm
    Level 59 : Grandmaster Artist
    history
    Está cosa es revolucionaria
    2
    deWonknu
    05/24/2025 9:47 pm
    Level 31 : Artisan Artist
    XD
    1
    MinhoCreates
    04/26/2025 5:53 pm
    Level 64 : High Grandmaster Engineer Dinosaur
    su merecido like y report 🔥. Nunca decepcionas cuando se trata de decepcionar!! 🧡. Vas a llegar muy cerca! 🔥🔥‼️‼️
    2
    deWonknu
    04/26/2025 6:35 pm
    Level 31 : Artisan Artist
    history
    Comencé desde abajo y empecé a excavar🔥🔥‼️‼️🔥🔥‼️‼️
    2
    MinhoCreates
    04/26/2025 7:59 pm
    Level 64 : High Grandmaster Engineer Dinosaur
    abriendo bocas y cerrando puertas 🔥‼️🔥‼️
    2

    Welcome