[SOLVED] Remove item from inventory, Add new item to inventory, Upon right clicking a specific block with said item.

Started by PiinkPeridot on

Topic category: Help with modding (Java Edition)

Last seen on 14:38, 2. Jul 2021
Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
[SOLVED] Remove item from inventory, Add new item to inventory, Upon right clicking a specific block with said item.
Wed, 06/30/2021 - 16:47 (edited)

I know how to remove the item and give the item in procedures but even with the procedure I have setup it always gives the item no matter what block I am choosing.

 

The procedure is set up as follows:

IF > is (any log) material type WOOD = true

DO > remove 1 (specified item 1) from inventory

      > Add 1 (specified item 2) to inventory

 

I have tried adding another if statement after that for IF = false then reversing them by > remove (item 2) and add (item 1) but it doesnt work. 

 

Basically I just want to right click a log with "item 1" , have it remove "item 1" and get "item 2" which does work but I need it to specifically be for ONLY any log type as currently it will give the item and remove the other item no matter where you click and yes I have the procedure setup with "when right clicked on block (hand pos.)"

Also side note why the HELL is there no procedure to simply just DO NOTHING?? (if false)

Edited by PiinkPeridot on Wed, 06/30/2021 - 16:47
Last seen on 14:38, 2. Jul 2021
Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I AM A WIZARD. I figured it…
Wed, 06/30/2021 - 16:26

I AM A WIZARD. I figured it out!

The procedure that worked: https://imgur.com/zRNlGGJ

 

This multi selection of "log" >[https://imgur.com/UpAM6SJ]< does not work as intended at all. Instead it gets confused and thinks you are only meaning the first block within this set, which is oak logs. Thus any log after becomes ignored completely and upon right clicking anything besides oak logs, nothing will happen. Which is why the above procedure is needed.

Last seen on 14:38, 2. Jul 2021
Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Note: The procedure that…
Wed, 06/30/2021 - 16:29

Note: The procedure that worked is a GLOBAL trigger. So do not try linking it up to the item by doing "when right click on block (hand pos)" within the items settings or else that procedure will just scream at you saying it changes the external trigger or something along those lines.