how to make a block do a procedure next to a specific block

Started by Lqe on

Topic category: Help with modding (Java Edition)

Last seen on 00:25, 16. Mar 2024
Joined Mar 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
how to make a block do a procedure next to a specific block

i'm trying to create a block that explodes whentouching a specific block in the game.

Last seen on 05:29, 31. Jan 2022
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Use event trigger procedure …
Wed, 11/27/2019 - 08:54

Use event trigger procedure "Update Tick", then in the procedure check for surrounding blocks' type, then explode if match.

Last seen on 00:25, 16. Mar 2024
Joined Mar 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do I do that? Could you…
Wed, 11/27/2019 - 17:01

How do I do that? Could you give an example or an image

Last seen on 05:29, 31. Jan 2022
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I don't use a site that…
Wed, 11/27/2019 - 17:35

I don't use a site that uploads pics.

In your workspace:

  1. Create a new block
  2. Define block properties ->  define particles -> define tile entity -> define block event procedures
  3. in the define block event procedures, create a new proc for "Update Tick"
  4. in the new proc, use "Get block at x, y, z", "is block of material type" & "if else" procedures to scan for adjacent blocks and "Explode at x,y,z with power n" if the block matches type
Last seen on 05:29, 31. Jan 2022
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You need to check adjacent…
Thu, 11/28/2019 - 04:24

You need to check adjacent blocks, not your block's position.

Check blocks (x-1,y, z), (x,y+1,z), (x,y,z-1), (x+1,y,z), etc. Basically the 6 blocks surrounding your block.

Last seen on 00:25, 16. Mar 2024
Joined Mar 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I made the block do it on…
Thu, 11/28/2019 - 04:48

I made the block do it on all 6 of it's sides like you said and it works. Thank you! :)

Last seen on 00:24, 2. Nov 2023
Joined Oct 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hey, i have been trying to…
Mon, 10/30/2023 - 11:34

Hey, i have been trying to do the same but since the "is material type" block got removed i though it would work like this tho it doesn't. Any help?                                                                                  

Last seen on 00:24, 2. Nov 2023
Joined Oct 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Nvm i figured it out lol
Tue, 10/31/2023 - 21:18

Nvm i figured it out lol