how to check if there is free space above the block

Started by notemail on

Topic category: Help with Minecraft modding (Java Edition)

Joined Nov 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
how to check if there is free space above the block
Thu, 11/27/2025 - 11:24 (edited)

how to check if there is free space above the block

version 1.20.1 forge 47.3.0

need to check if there is enough space above the block to place the block there

Edited by notemail on Thu, 11/27/2025 - 11:24
Joined Jun 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You can change the block's…
Sat, 11/29/2025 - 19:25

You can change the block's hitbox to be taller so you can't place it unless it has enough space.

Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
But i dont know if that…
Sat, 12/13/2025 - 19:33

But i dont know if that would work as fences are taller than a block and they can be placed below other blocks

Joined Apr 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
If you just need an extra…
Mon, 12/15/2025 - 16:14

If you just need an extra block of air you could just do "When block placed if block at XY+1Z is not air, break the block"