On block replacement.

Started by project141 on

Topic category: Help with Minecraft modding (Java Edition)

Joined May 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
On block replacement.

I created a cactus in Blockbench, but the graphics in the item column were not right, so I created another block.

Then I created a procedure that when I put the block A, I replace it with the block B with the condition of the image, but it does not work.

Sorry for the automatic translation, but can anyone help me?

Joined Feb 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
hey so i think the issue…
Sun, 06/22/2025 - 22:32

hey so i think the issue might be that the local blockstate variable has no value, try giving it a value by setting it.

also try these

  • Use “When block is placed” trigger
  • remove the plus 1 on y+1 as it checks the block above the block your trying to check
  • Add a small delay before the replacement
  • Make sure Block A is tagged properly
  • Also when your comparing the blocks you say get block at x y z tagged in block tags as minecraft:air , minecraft:air isn't a tag plus tags are groups of blocks like types of wool, they are all wool just different colours so they are grouped together so that if you want a wool type in a crafting recipe but don't care what colour of wool it is so it will craft regardless of the colour of the wool. Plus its probably better to just do is get block at x y x the same block as air as there aren't different types of air.