How to Detect and Fill Enclosed Spaces?

Started by MamaLuigi on

Topic category: Help with modding (Java Edition)

Last seen on 22:37, 26. Jul 2024
Joined Sep 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to Detect and Fill Enclosed Spaces?

I am making a mod similar to Galacticraft, and I want to add a block similar to the Oxygen Sealer, so how would I would I be able to detect and fill an enclosed space with breathable air blocks?

 

Note: When you are in any of the space dimensions, it checks if you are wearing oxygen gear or are in a breathable air block, and if you aren't you'll start to take damage

 

How would I do this?

 

Any help would be greatly appreciated!

Last seen on 20:18, 25. Jul 2024
Joined Oct 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
When the block is used, fill…
Wed, 11/29/2023 - 11:40

When the block is used, fill an area around it with invisible blocks, but make it keep existing blocks. Have those blocks check for blocks around it, and if it finds one, and the ones next to it do, fill with breathable air.