We've split up the commands, scripting and mods, and add ons category! Please be sure you get your thread in the right place.

83

Command That Counts Blocks

6 Comments

Please sign in to leave a comment.

Sorted by oldest
  • 2
    Registered User commented
    Comment actions Permalink

    Cool idea. Already exists in some mods, but would be nice to have in vanilla.

  • 1
    Registered User commented
    Comment actions Permalink

    this would be super useful for block by block tutorial creators, it can  get pretty tricky counting how much of a certain block you used in a big farm or build

  • 2
    Registered User commented
    Comment actions Permalink

    Excellent idea, this is just what I am looking for, I tried to use fill command, but with no success.


    My use case is this: I want to obtain 100 Diamond Blocks and then use them to create a build that specifically will have that exact amount, I want to build it in creative and then count how many blocks I have used in that area, so that I could easily tell weather I have let's say 124 and then I could remove 24 and have build that has the exact desired amount of blocks that I need.

  • 0
    Registered User commented
    Comment actions Permalink

    So for a small number of block types I figured out a way to do it with Clone

     

    if you do /clone x1 y1 z1 x2 y2 z2 x3 y1 z1 filtered minecraft:BLOCK move

    I previously copied the structure so I am not taking apart the original (maybe use a structure block)

    but do that it will tell you how many blocks it moved successfully, you have to do this for every block type in the build but its the best Idea I came up with. 

  • 1
    Registered User commented
    Comment actions Permalink

    Super useful for building and for knowing the best layer to mine in your world.

  • 0
    Registered User commented
    Comment actions Permalink

    I'm making battleship right now so I just made this, but I'm trying to get figure out how to call on this argument in a command block "pass_count",with:[5]".

    Made this instead, but I'd still like to know how to call on "pass_count".

    /execute if entity @e[scores={Board=2},name="redPlayer"] run setblock ~ ~1 ~ minecraft:stone
    /scoreboard objectives add Board dummy
    /summon minecraft:chest_minecart ~1 ~ ~ {CustomNameVisible:0,Invulnerable:1,CustomName:"redPlayer"}
    /scoreboard players set @e[name=redPlayer] Board 0
    /clone ~-5 ~1 ~2 ~4 ~10 ~2 ~-5 ~1 ~-2 filtered minecraft:yellow_concrete normal
    /execute store result score @e[name=redPlayer] Board if blocks ~-4 ~1 ~-2 ~5 ~10 ~-2 ~-4 ~1 ~-2 masked