1
HEEEEEEEEELP!
I'm still wondering how to replace blocks you break automatically with another block type using command blocks or functions. (.E.g. breaking stone turns it into andesite)
Can anyone help?
I'm still wondering how to replace blocks you break automatically with another block type using command blocks or functions. (.E.g. breaking stone turns it into andesite)
Can anyone help?
Create an account or sign in to comment.
4
1
Create a clock and make a command block with this written in it:
Then put a comparator out of it, and make an OFF gate.
The OFF gate should lead to a command block with
/testforblock X Y Z (block)
Then put a comparator out of it, and make an OFF gate.
The OFF gate should lead to a command block with
/setblock X Y Z (block)
1
first, use a command block to test for the stone item like this: "/scoreboard objectives add <objectiveNameHere> dummy" and then to add stone to it you do: "/scoreboard players add @e[type=item] <objectiveNameHere> 1 {Item:{id:"minecraft:stone"}}". Then, we need to set the block of where the stone is like this: "execute @e[type=item,score_<objectiveNameHere>_min=3] ~ ~ ~ setblock ~ ~ ~ minecraft:stone 6". And then kill the stone: "/kill @e[type=item,score_<objectiveNameHere>_min=3]". However, if the player drops stone, you'll need to prevent that stone item from turning into an andesite block. So, you can create another scoreboard: "/scoreboard objectives add <objectiveNameHere2> stat.drop.minecaft.stone". Then, do this to make sure that the stone is not turned into andesite: "/execute @a ~ ~ ~ entitydata @e[type=item,r=2] {PickupDelay:0b}" This is also why I did a min of 3 instead of 1 just in case.
1
Do you want a block to be placed at the position of the block a player just broke or do you want the dropped item to turn into another block?
1
Have an ever-running command that replaces any air block within a said distance or cords with andesite. That would be the easiest way to do it imo.