Procedure: Test for and remove item from player inventory, then add new item

Started by Theshortcircuit on

Topic category: Help with MCreator software

Joined Apr 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Procedure: Test for and remove item from player inventory, then add new item

Hey guys! 

Basically I want to create a procedure that, upon the slaying of a specific mob, will test for an item in the player inventory (the one that killed the mob). If the player has said item, it will remove it and add another item to their inventory. I know how to make the system test for the item and swap it out, but it's not triggering when I add it into the mob under "when mob killed" please help!! 

Joined Jun 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You can make a normal…
Thu, 06/21/2018 - 09:00

You can make a normal command testing system.

use the /scoreboard command to create a kill counter, make it not seen to the eye, and then make this-

If -> Has provided in inventory [item]

do -> Remove 1 [item]

add 1 [item]

Sorry if I did not help.

Joined Apr 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I meant more without…
Thu, 06/21/2018 - 12:20

I meant more without commands, as a part of the mod, also this would apply to every mob, I want it for a specific one

 

Joined Jun 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Oh, ok. Sorry I could not…
Thu, 06/21/2018 - 16:40

Oh, ok. Sorry I could not help.