Jump to content

Advancement for killing an enitity with nbt data (1.16.5)


SilentSforce

Recommended Posts

Hi, I was wondering if anyone knows how to progress an advancement for killing a specific entity with nbt data. I know there is an "nbt" option under "type", but i'm not quite sure what to put in it to have it work. Any help is appreciated thanks!
For reference, the entity is a stray with custom armour, custom name and a custom weapon.
P.s Here's what i've got at the moment.
 

{
    "__comment": "killing osthir advancement",
    "display": {
        "title": {
            "text": "Last Prince of Cardolan",
            "color": "gold"
        },
        "description": {
            "text": "Return the last Prince to his eternal slumber"
        },
        "icon": {
            "item": "lotr:arnor_sword"
        },
        "frame": "challenge",
        "show_toast": true,
        "announce_to_chat": true,
        "hidden": false
    },
    "criteria": {
        "osthir": {
            "trigger": "minecraft:player_killed_entity",
            "conditions": {
                "entity": {
                    "type": "minecraft:stray",
                    "nbt":
                }
            }
        }
    },
    "parent": "cmd:root"
}

(Also I know having blank nbt isn't correct, i'm just not sure about what should be there.

Link to comment
Share on other sites

Hi!

I would recommend using this site for custom advancements: https://advancements.thedestruc7i0n.ca/ It has everything you need, also checking for the armor the entity is wearing.

If you don't know what to put into "nbt" just go to a stray and run /data get entity <the uuid of the entity that will be shown if you're looking at it> (as Minecraft conmand) and see what it outputs

Edited by OutCraft

Sorry if my Posts are weird sometimes, I just try to help and learn as much as I can :D

Also: PLEASE use SPOILERS for logs!

Link to comment
Share on other sites

5 hours ago, OutCraft said:

Hi!

I would recommend using this site for custom advancements: https://advancements.thedestruc7i0n.ca/ It has everything you need, also checking for the armor the entity is wearing.

If you don't know what to put into "nbt" just go to a stray and run /data get entity <the uuid of the entity that will be shown if you're looking at it> (as Minecraft conmand) and see what it outputs

That's the site I used for the base files, but i'm editing in visualstudio since it's with modded items and armours. I think there is a workaround with detecting the mainhand weapon of the entity, however this requires them to have a weapon. I'll test pasting the entire nbt data into there. Is it possible to do it via the name of the entity?

Link to comment
Share on other sites

49 minutes ago, SilentSforce said:

it's with modded items and armours

Just select a placeholder item like dirt and change it in the json to your custom item (replace minecraft:dirt with yourmodid:your_custom_item)

Sorry if my Posts are weird sometimes, I just try to help and learn as much as I can :D

Also: PLEASE use SPOILERS for logs!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.