Posted February 1, 20223 yr 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.
February 1, 20223 yr 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 February 1, 20223 yr by OutCraft Sorry if my Posts are weird sometimes, I just try to help and learn as much as I can Also: PLEASE use SPOILERS for logs!
February 1, 20223 yr 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
February 1, 20223 yr Author 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?
February 1, 20223 yr Author 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?
February 1, 20223 yr Author Alright, I'll do it tomorrow so that I don't die from exhaustion first though.
February 1, 20223 yr 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 Also: PLEASE use SPOILERS for logs!
February 2, 20223 yr Author 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!
February 2, 20223 yr Author 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.
February 2, 20223 yr 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 Also: PLEASE use SPOILERS for logs!
February 2, 20223 yr Author 3 minutes ago, OutCraft said: Isn't it working? nope, it works if it's the base mob and nothing else. but i need it to target a specific enitity.
February 2, 20223 yr Can you paste the advancement json? Sorry if my Posts are weird sometimes, I just try to help and learn as much as I can 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.