Minecraft Blogs / Tutorial

Ore to blocks using Command blocks.

  • 740 views, 2 today
  • 1
  • 1
DualMacaroon777's Avatar DualMacaroon777
Level 38 : Artisan Magical Boy
8
So you all might have seen some datapacks that turns ores to blocks when you go near them or stand on them. So I am going to tell you how you can do it yourself without downloading any datapacks by just using a command block.

So let us assume that you want to change a coal ore to a coal block when you stand on it. So the steps to do this are:
i) Type: give @p command_block and place it.
ii) Type this command: execute at @p if block ~ ~-1 ~ minecraft:coal_ore run setblock ~ ~-1 ~ minecraft:coal_block replace
iii) Set it to Repeat and Always Active.
iv) Now enjoy!

Note: To do this to other ores, just change the coal_ore to any ore and change the coal_block to its corresponding block.
Tags

Create an account or sign in to comment.

Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome