Started by
AlexTheAwesome
on
Topic category: Help with MCreator software
I managed it, somewhat, by making 3 variables for x, y, and z, and setting them to (Random(0,1)+Random(0,1))+(Random(0,1)+Random(0,1)) each, and then adding them to the x coordinate of the player, detecting if it's stone, and if it is, breaking it and dropping it at the player. Then, I did the same, but with negative coordinate values. It's a huge mess. Is there a simpler way of going about this? I'd like it to (every tick) pick a block that's within 5(or more, though more would take longer and possibly be laggier) blocks of the player, in any direction except down, and if it's stone, break it, so you can wander around, collect stone, and mine whatever ores are now floating in the air.
I think the main thing that would be helpful is having a way to change the random value range. Is there a way to do that?
Use this:
Set variable 1 to {x + [(random × 10) - 5]}
Set variable 2 to {z + [(random × 10) - 5]}
If (get block at (variable 1), y, (variable 3) = stone
Destroy block at (variable 1), y, (variable 2) drop at x, y, z