Custom enchantment makes mob drop custom item

Started by sebastiank2939 on Sun, 10/24/2021 - 10:36

Topic category: Help with modding (Java Edition)

Last seen on 04:50, 15. Nov 2021
Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Custom enchantment makes mob drop custom item
Sun, 10/24/2021 - 10:36

I'm trying to make a custom enchantment drop a custom item when an undead mob type is killed with the enchantment applied to a sword. I've been trying to figure out how to do it, but without any luck. I thought what I currently have would work, unfortunately it does not. If you know how to do it, please help.

Last seen on 09:30, 5. Dec 2021
Joined Mar 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Trigger is entity dies If…
Sun, 10/24/2021 - 14:11

Trigger is entity dies

If source entity has active = potion effect name

then do: randomize % drop

Last seen on 06:48, 4. Dec 2021
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
potion effect??? also this…
Sun, 10/24/2021 - 16:02

potion effect???

also this should be your procedure

Trigger entity dies

if item in main hand of source entity is enchanted with: ENCHANT AND is event target entity type:Undead (found in entity data)

do spawn gem: ITEM at x y z 

Last seen on 04:50, 15. Nov 2021
Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I tried this and nothing…
Mon, 10/25/2021 - 03:08

I tried this and nothing happened. Does it work with vanilla mob drops, or do I need to have a custom entity for it to drop?

Last seen on 06:48, 4. Dec 2021
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
works with anything you…
Mon, 10/25/2021 - 03:13

works with anything

you probably did the procedure wrong

Last seen on 04:50, 15. Nov 2021
Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Yeah, most likely. Do I need…
Mon, 10/25/2021 - 04:00

Yeah, most likely. Do I need to add the procedure to anything or is it fine on its own?

Last seen on 06:48, 4. Dec 2021
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
fine on its own
Mon, 10/25/2021 - 04:03

fine on its own

Last seen on 09:30, 5. Dec 2021
Joined Mar 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Sorry i misunderstood your…
Mon, 10/25/2021 - 05:52

Sorry i misunderstood your request

I have same feature on my mod

Trigger entity dies

If main hand of source entity = item and get enchantment = enchant name and entity = undead

Do spawn gem  item to be dropped

 

Last seen on 06:48, 4. Dec 2021
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
isn't that what I just said…
Mon, 10/25/2021 - 06:13

isn't that what I just said lol

Last seen on 04:50, 15. Nov 2021
Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I figured it out, I just did…
Mon, 10/25/2021 - 18:33

I figured it out, I just did the procedure wrong lol. Thank you