Check if block is replaceable?

Started by STARRYSOCK on

Topic category: Help with modding (Java Edition)

Last seen on 02:30, 16. May 2022
Joined Sep 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Check if block is replaceable?

Is there a way to check if a block is replaceable, like air/water/grass/vines?

I have several blocks that are placed using custom procedures, but haven't found a good way to test if the space they're attempting to be placed in is occupied with a replaceable block, beyond just manually testing for each block. But that doesn't help with modded replaceable blocks

Last seen on 06:49, 6. May 2023
Joined Aug 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Any luck with this yet? I've…
Fri, 05/13/2022 - 10:50

Any luck with this yet? I've been trying to do something similar to this.

Last seen on 11:05, 20. Sep 2024
Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hopefully this gets answered…
Fri, 05/13/2022 - 17:26

Hopefully this gets answered, because many of us don't know how to check for that.

Last seen on 02:15, 25. Sep 2024
Joined Apr 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Not sure if this is what you…
Fri, 05/13/2022 - 22:38

Not sure if this is what you mean but If so here is a solution.

Create a Block Tag and fill it with all the blocks that you want to be replaceable and in your procedure check if the block that's trying to be replaced is tagged as your Block Tag and if it is then replace it.

Last seen on 15:23, 1. Jul 2024
Joined Mar 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
someone answer this pls
Sun, 03/10/2024 - 21:58

someone answer this pls