Item procedure

Started by viatrophy997 on

Topic category: Help with modding (Java Edition)

Last seen on 16:07, 12. May 2021
Joined Mar 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Item procedure

Hello, So I've created an item called unknownartifact, what i wanted to is to give player one of mod's rare items, maybe even two with only a right click, then remove the unknown artifact, but i dont know procedures and had trouble with creating a chance to drop.

Last seen on 01:18, 28. Mar 2024
Joined Apr 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hello viatrophy997 here are…
Tue, 03/23/2021 - 20:11

Hello viatrophy997 here are 2 options

1) Here

#1 checks is the player has the "Artifact" in their inventory

#2 picks a number randomly, and if its below 0.5 it will

#3 remove 1 artifact from the players inventory

#4 add 1 item of your choice to the players inventory

If you setting it up like this, then this procedure needs to be attached to your item trigger called "when player right clicks in air" and/or "when player right clicks block"

 

2) Here

If your doing it this way, you don't need to attach it to your item this procedure will detect if a player is right clicking with the artifact in their main hand.

 

Last seen on 16:07, 12. May 2021
Joined Mar 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thank you
Wed, 03/24/2021 - 12:16

Thank you

Last seen on 01:18, 28. Mar 2024
Joined Apr 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
No problem :)
Wed, 03/24/2021 - 22:06

No problem :)