Help with detect/replace block

Started by Lopeszz on

Topic category: Help with Minecraft modding (Java Edition)

Joined Sep 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Help with detect/replace block

So i've been creating a solarpunk, in wich the main focus is to terraform the earth. I´m in the middle of creating a soil purifier, i already have the block and textures sorted out but i need help on the procedures part. My plan was to make the block that when provided with seeds, would, at a random tick speed, detect if there is any corrrupted soil and purify it.

Does anyone know of a way to do so?

Thanks a lot :)

Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You can make it so if get…
Tue, 10/01/2024 - 12:27

You can make it so if get block at x y z is the same as (corrupted soil) then set block at x y-1 z to (purified soil). Then check for all blocks in a radius (us the procedure template get block in 6x6x6 radius) Then check for if block has corrupted soil at x+1 x-1 z+1 z-1 if so then set that block to purified soil. This would be on tick update.

It will be a long procedure.