Event right click with item on block for change block

Started by Wertuo on

Topic category: Help with modding (Java Edition)

Last seen on 16:48, 15. Apr 2023
Joined Apr 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Event right click with item on block for change block

Hi,

I would like to create a procedure so that when I right click with an item on one block, the block becomes another block.

But I do not understand how to do a procedure, if anyone wants to help me :DD

 

Thanks :)

Last seen on 20:25, 8. May 2020
Joined Aug 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Noo don't give up xD It's…
Fri, 11/08/2019 - 14:49

Noo don't give up xD

It's really simple:

STEP 1:

Go to your block AvaritiaInfinityBlock. Every block has an "OnBlockAdded" procedure call. Inside of that procedure put:

Set logic NBT tag "SomeNameYouLikeToUse" to true.

For this block, enable the inventory checkbox and set slots to 0 if you don't want any slots. You need this in order to use NBT tags on a block. Now we're done editing the Block we go to your item in:

STEP 2:

Your item has an "OnBlockRightClicked" procedure call. Inside of that put:

If Get Logic NBT tag "SomeNameYouLikeToUse" = true
place [some block] at x y z

The "=" sign has to be the blue one in the Logic Operators tab in procedures.

Last seen on 16:48, 15. Apr 2023
Joined Apr 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
But the infinity block comes…
Fri, 11/08/2019 - 15:06

But the infinity block comes from the Avaritia mod that was not done with MCreator so I do not know the name of the block for the NTB tag

Last seen on 20:25, 8. May 2020
Joined Aug 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Then it may not be possible…
Fri, 11/08/2019 - 16:30

Then it may not be possible without custom coding.

Last seen on 03:06, 7. Nov 2021
Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
It is possible, use the…
Mon, 06/28/2021 - 08:35

It is possible, use the template for stripping oak logs and put it on when right clicked on block, and edit the procedure to change it from the block to the other block.