Jump to content

Recommended Posts

Posted

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.

Posted (edited)

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!

Posted
10 hours ago, SilentSforce said:

Hi, I was wondering if anyone knows how to progress an advancement for killing a specific entity with nbt data.

you can take a look at the KilledTrigger,
i would also recommend to use Data Generator to create the advancement

Posted
1 minute ago, Luis_ST said:

you can take a look at the KilledTrigger,
i would also recommend to use Data Generator to create the advancement

Thanks, I'm currently using a generator for it and referencing with vanilla advancement .jsons.
How does KilledTrigger work in this context?

Posted
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?

Posted
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!

Posted
19 hours ago, OutCraft said:

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)

yeah that's what i've done!

Posted
20 hours ago, Luis_ST said:

take a look at vanilla uneasy alliance Advancement

this is alright in theory, however using location won't work since the entity could move away from the location. Additionally there are other entities of the same type, but with different nbt data.

Posted
18 minutes ago, SilentSforce said:

yeah that's what i've done!

Isn't it working?

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!

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.