Item procedure

Started by viatrophy997 on

Topic category: Help with Minecraft modding (Java Edition)

Active 1 year ago
Joined Mar 2021
Points:
656

User statistics:

  • Modifications: 0
  • Forum topics: 16
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 7
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.

Active 1 month ago
Joined Apr 2020
Points:
787

User statistics:

  • Modifications: 4
  • Forum topics: 14
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 101
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.

 

Active 1 year ago
Joined Mar 2021
Points:
656

User statistics:

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

Thank you

Active 1 month ago
Joined Apr 2020
Points:
787

User statistics:

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

No problem :)