1

Replace Broken Blocks With Another

BlackeyeI's Avatar BlackeyeI6/8/17 8:55 am
1 emeralds 763 4
6/18/2017 7:03 pm
MilkyRayy's Avatar MilkyRayy
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?
Posted by BlackeyeI's Avatar
BlackeyeI
Level 34 : Artisan Creeper Hugger
17

Create an account or sign in to comment.

4

1
06/18/2017 7:03 pm
Level 8 : Apprentice Architect
MilkyRayy
MilkyRayy's Avatar
Create a clock and make a command block with this written in it:

/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
06/08/2017 3:08 pm
Level 16 : Journeyman Engineer
Cadermate
Cadermate's Avatar
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
06/08/2017 9:06 am
Level 57 : Grandmaster Cyborg
Pepijn
Pepijn's Avatar
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
06/08/2017 9:02 am
Level 60 : High Grandmaster Imposter
QUENTOPOLIS1
QUENTOPOLIS1's Avatar
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.
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome