Started by
Picture
on
Topic category: Help with Minecraft modding (Java Edition)
I'm having trouble with a custom block I've made, the basic function I'm trying to get is:
Blockstates: On, Off
Block is off by default, Interact with the block > block changes to On > adjacent Off blocks turn on
everything works so far up until the last step, I'm wanting the adjacent blocks to the clicked block also change to On in a chain reaction to all connected blocks, but I can't figure out that last bit for the life of me, so any help would be appreciated :(
in the custom block's on active tick update trigger:
If blockstate property of this block is on:
set the block property (your block state name) of the block z+1 y x to "on"
set the block property (your block state name) of the block z-1 y x to "on"
and so on
You can find these in the action and data section of the block procedures tab, or search property
I might've done it wrong because it didn't work ;;
https://imgur.com/a/1E6O8dI
First I think it's best to check if that block it is about to set privacy to true is your custom block, so if block at x+1yz = [your block] then set privacy to true
I think you should confirm that the if statement is triggering, maybe having a chat to all players saying works, if the statement is not coming true when the value of the block is true. you can try the following
It could be that you didn't give the block a tick rate, which would make it so it never ticks thus not triggering the procedure, you must change the tick rate to anything above 0, 20 ticks are in a second so 1 tick rate would trigger your procedure 20 times every second.
Are there any typos for privacy for your property? if so make sure they all match.
Correction for terrible readability:
The first thing I think you should add is to check if the block at x+1 y z, x y+1 z, x y z+1, etc is your custom block, if so use the corresponding [Set property block].