How to make an advancement that detects an item with an enchantment?

Started by JacksonAnimates on

Topic category: Help with modding (Java Edition)

Last seen on 21:48, 4. Oct 2021
Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make an advancement that detects an item with an enchantment?

I'm making this mod for a SMP I host. In the mod there's an achievement that requires you to enchant a Netherite hoe. Is there any way to detect if an item has enchantments in a if-do statement? If there is, could you kindly tell me what it is please, it'd be much appreciated.

Last seen on 04:28, 26. Jan 2024
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
if provided itemstack is…
Mon, 10/04/2021 - 16:12

if provided itemstack is enchanted

etc etc

Last seen on 21:48, 4. Oct 2021
Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
That didn't work when I…
Mon, 10/04/2021 - 20:45

That didn't work when I tried it....didn't work when i added = true in there either

 

Last seen on 04:28, 26. Jan 2024
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
no not like that, but if…
Mon, 10/04/2021 - 20:54

no not like that, but if Event target entity has ITEM in main inventory AND provided itemstack is enchanted

etc etc

Last seen on 21:48, 4. Oct 2021
Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Then it says it doesn't know…
Mon, 10/04/2021 - 21:08

Then it says it doesn't know what provided itemstack is, how do I fix that?...?

Last seen on 04:28, 26. Jan 2024
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
then replace Itemstack with…
Mon, 10/04/2021 - 21:11

then replace Itemstack with Hoe

Last seen on 04:28, 26. Jan 2024
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
just noticed, you didn't…
Mon, 10/04/2021 - 21:11

just noticed, you didn't select right trigger

Last seen on 04:28, 26. Jan 2024
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
if none of that works, new…
Mon, 10/04/2021 - 21:14

if none of that works, new procedure:

Player Tick Update

if item in main hand of event target entity = HOE AND provided itemstack is enchanted

etc etc

 

 

Last seen on 21:48, 4. Oct 2021
Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
...It didn't work, neither…
Mon, 10/04/2021 - 21:29

...It didn't work, neither method worked ._.

Last seen on 04:28, 26. Jan 2024
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
then on second method change…
Mon, 10/04/2021 - 21:34

then on second method change itemstack to Item in main hand

Last seen on 21:48, 4. Oct 2021
Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
That worked! Thank you!
Mon, 10/04/2021 - 21:48

That worked! Thank you!

Last seen on 04:28, 26. Jan 2024
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
:)
Mon, 10/04/2021 - 22:04

:)

Last seen on 14:15, 15. May 2022
Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thats strange, if you have…
Tue, 04/26/2022 - 16:16

Thats strange, if you have set the procedure in "When item is created" each and everyone of the prcedures should have worked. Well, maybe the first one is the exception.

Last seen on 14:15, 15. May 2022
Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
RexCerv, following the topic…
Tue, 04/26/2022 - 16:19

RexCerv, following the topic Do you know how to replace an item wile is begin enchanted with another one? Example. CustomBook in enchanting table is replaced with CustomBookEnchanted with especific enchantments. Or giving the result of CustomBookEnchanted. I didnt see the enchantment option in the "Recipe"option