Started by
Xlemonp
on
Topic category: Help with Minecraft modding (Java Edition)
Hello. I want to check the block below and if it is dirt replace it with stone. How i can make this? Sorry for bad grammar my first language isn't English.
I don't know how you want to accomplish this in game so I will invent something.
Create a new item call it whatever texture it whatever it does not matter.
Next go back into the item and create a new right click on block procedure.
Now the block code is llike this:
if( block comparer [get block at x { y - 1 } z ] == minecraft: dirt ) {
remove block at x { y - 1 } z
place minecraft: stone at x { y - 1 } z
}
If statement can be found under the logic and loops category.
Block comparer can be found under logic operations it is the first yellow block with the cube icon only.
Minecraft: dirt and minecraf: stone can be found under minecraft components use the second yellow one with the white cube only.
Remove and place block can be found under block actions.
{ y - 1 } is a compound of y and the operator block in math - and the number one also found under math 1