Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

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.

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!

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

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

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

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!

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

  • 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.

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!

  • 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.

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 :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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.