Started by
Gamer43251
on
Topic category: Help with Minecraft modding (Java Edition)
Hi im just wondering if anyone could assist me or show me how to make a procedure that will change the block when its placed next to concrete?
Topic category: Help with Minecraft modding (Java Edition)
Hi im just wondering if anyone could assist me or show me how to make a procedure that will change the block when its placed next to concrete?
You can use the 'when block added' procedure to check when your block is placed. Then, you can use a modified version of the procedure template 'check for block in 6x6x6 area':
- Change the initial values of 'sx', 'sy' and 'sz' all to -1.
- Change each loop to repeat 2 times.
- Set the block in 'is (get block at sx, sy, sz) the same as (block)' to concrete.
These changes will instead look for a concrete block in a 3x3x3 area around your placed block. If it finds one, the 'found' variable will be set as 'true', and the if statement at the end will run. If there are no concrete blocks in the area, the if statement at the end will not run.
Then, in the if statement, you should put 'replace block at x y z with (block)', and enter your block into the empty block input. This code will change the block you placed from the block it originally was to a new block.
Thank you very much i got it working!