[RESOLVED] What is the ID of your custom enchantment?

Started by nojustgavin on

Topic category: Help with modding (Java Edition)

Last seen on 00:18, 14. Mar 2023
Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
[RESOLVED] What is the ID of your custom enchantment?
Sat, 07/17/2021 - 22:57 (edited)

I'm trying to summon a basic piglin/pillager with a crossbow that has a custom enchantment. I already know the enchantment works because I can give them the special crossbow by throwing it at them, but I want to be able to use a command to summon them with the special crossbow as a spawn egg. Like this: "/give @p piglin_spawn_egg{EntityTag:{id:"minecraft:piglin",HandItems:[{id:"minecraft:crossbow",tag:{Enchantments:[{id:thundering,lvl:2}]},Count:1},{}]}}" I can't get the highlighted part to work properly. The name of the mod is Illaging and the enchantment is called thundering. How do I format it properly so it summons a piglin with the crossbow enchanted properly? I've already tried illaging:thundering,lvl:2 but that doesnt work either.

Edited by nojustgavin on Sat, 07/17/2021 - 22:57
Last seen on 00:18, 14. Mar 2023
Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I got it, turns out you need…
Sat, 07/17/2021 - 22:59

I got it, turns out you need to put quotations around your enchantment, like this: "/give @p piglin_spawn_egg{EntityTag:{id:"minecraft:piglin",HandItems:[{id:"minecraft:crossbow",tag:{Enchantments:[{id:"illaging:thundering",lvl:2}]},Count:1},{}]}}"

Last seen on 06:43, 26. Apr 2024
Joined May 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
As a tip, anytime you see…
Wed, 08/25/2021 - 17:27

As a tip, anytime you see the word "id" in a command, you're going to need quotes for whatever is after it.