SkillAgentSearch skills...

Commandblocks

Mindustry Command Mod: A highly utilitarian mod with fun and useful blocks such as Command Blocks, Dash Panels and Pistons; New features such as Skills; And an upcoming new Gamemode!

Install / Use

/learn @sk7725/Commandblocks
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Commandblocks

Mindustry Command Block Mod(MCBM)
This mod adds Minecraft-like Command Blocks, along with other blocks.
This is currently in development.
As of 4.8, Command Blocks require you to be an Admin to edit.

Blocks

Blocks that need further descriptions.

  • Command Block
    A fully customizable block. You can decide whether or not is chained, repeated, normal, requires power, delay and more! It lets you execute built in functions and javascript!
  • Unit Command Block
    Executes command as an unit, for the unit stepping on this block.
    The unit has to be on this block and not fly.
  • Unit Tagger
    Remembers the last unit that stepped on this tile, using its message as the tag.
    The unit has to be on this block and not fly, and only a single unit will be tagged.
    If the block is removed, the tagged unit will be untagged.
    For more information on tags, refer to Target Selectors.
  • Position Reader
    Gets the x and y coordinates where this block is placed.
Pos: ( tile.x , tile.y ) / Rot: tile.rotation()
  • Tile Reader
    Gets the information of the tile this block is facing when this block is placed.
floor.name:block.name:overlay[x,y] entity=entity.getClass():getTeam()
  • Tile Entity Reader
    Gets the information of the tile entity this block is facing when this block is placed.
    Is empty if no tile entity is found.
TileEntity{tile=tile, health=health}
  • Mod Reader
    Gets the information of the mod.
  • Note Player
    Plays a note when the power requirement is met. Instrument changes depending on the wall under it.
    All walls, door, router, junction, sorter, mender, shock mine, liquid router and junction, and unloaders have different instruments.
  • Note Tuner
    Tunes a note. The instrument that will be tuned depends on the block under it.
  • Music Player
    Plays an array of notes. First, specify the BPM, then the notes seperated by spaces, using x for rests. End the note with - for double length, and / for half(these may be stacked). This is not done yet.
150 6e 6d 6c 6d 6e 6e 6e- 6d 6d 6d x 6e 6e 6e-   
  • Mp3 Player
    Plays a especified mp3 file of your device.
  • Camera Wall
    Acts as a wall to the center of the camera. Can be ignored with a fast enough screen swipe.
    The hitbox is 3x3, one block to all four directions. Turns off if it is not rendered(minimap open, or out of screen).
  • Directional Camera Wall
    Acts as a one-way to the center of the camera. Much more stable.
    The hitbox is 1 in width, and stretches infinitely to the back, making it more stable.
  • Key Block
    Produces power if a key is pressed. Is not synced in multiplayer.
    Refer here for the list of loggable keys.
  • Transistor
    Cuts power if the node on the marked position has 0 power or less.
  • Logic Gate
    2 node power block that makes its output depend on its entries, using a configurable truth table.

Commands

List and description of commands.
Commands will fail to work when an error happens, params are invalid or fail to be parsed, or requirements below are not made.
Starting the command with a / is optional.
Some params are optional.

/say string:text

In multiplayer, sends text to all players.

/title pos:x pos:y

Emits text to all players.

  • /title pos:x pos:y top|world int:duration string:text
    • top
      shows the text as a popup at the top of the screen.
    • world
      Shows the text as a popup at x,y.
  • /title pos:x pos:y string:functionname (arguments)
    Runs an UI function called functionname that can show text in various forms.
    Refer here for the list of functions.

/overwrite string:text

Overwrites this command block's content to text.

/setblock pos:x pos:y string:block (int:rotation) (int:team) (replace|keep|build|force)

Sets the tile at x,y to the specified block.
Rotation should be between 0 and 3, default is 0.
Team should be -1 and 255, default is -1. When team is -1, the team is set to the executor's team.
Fails if the previous block is already the same as the current block.
replace destroys the previous block, and sets a new block. (default)
keep only sets the block if previous block is Air.
build destroys the previous block, and sets a new block, as if a player built it.
force sets a new block. crashes the game if the previous block is a tile entity.

/execute

Executes a command from another tile or unit's perspective.
Fails if the executed command fails, or the tile or entity is not found.
execute is optional, one can start a command with at/as

  • /execute at pos:x pos:y string:command
    Executes as a tile at x,y.
  • /execute as target:target string:command
    Executes as a target.

/f(/function) string:functionname (arguments)

Runs a function of the executor called functionname. Fails if the executor is neither a tile nor an unit.
Refer here for the list of functions (if executor is a Tile), or here (if executor is an Unit).
Can only be used inside an /execute.

  • Example
execute at ~ ~2 function setTeam team:5
//sets the team of the tile 2 blocks to the north of the executor to 5.
//calls setTeam( Team.get(5) ) of the tile 2 blocks to the north of the executor.

/fb(/functionblock) string:functionname (arguments)

Runs a function of the block of the executor called functionname. Fails if the executor is not a tile.
Refer here or here for the list of functions.
Can only be used inside an /execute.

  • Example
execute at ~ ~2 functionblock handleStack item:copper 5 tile:~,~ js:null
//gives 5 copper to the block 2 blocks to the north of the executor.

/fe(/functionent) string:functionname (arguments)

Runs a function of the tile entity of the executor called functionname. Fails if the executor is not a tile.
Refer here for the list of functions.
Can only be used inside an /execute.

  • Example
execute at ~ ~2 functionent damage 50
//damages the tile 2 blocks to the north of the executor by 50.

/gamerule string:rulename (boolean|int:state)

Sets the gamerule or gets the current gamerule.
Fails if no such gamerule exists, or state is not specified and the current state of the gamerule is false or 0.
commandBlockOutput whether to log command failures in multiplayer chat.
commandBlockTitle whether to log command failures as a popup.
setWave sets current wave.
sendCommandFeedback whether to log extra descriptive command outputs.
doCommands whether to run commands at all, /gamerule will bypass this rule but other commands will be blocked.
For more gamerules, refer here.

/fx(/particle) string:effect (pos:x pos:y) (string:color)

Plays particle effects on the given position. Fails if coordinates are below 0.

/playsound string:effect (pos:x pos:y) (int:volume)

Plays a sound on the given position. Fails if coordinates are below 0. Default volume is 0.5.

/give string:item (int:amount)

Gives the executor an amount of an item.
If the executor is a tile, amount may be negative.
Fails if amount is negative and executor is not a tile, or amount is negative and less than 1 items were removed.

/clear

Clears the executor of the item. Fails if the executor does not have an inventory.

  • /clear string:item
    if the executor is a tile. Fails if less then 1 items are removed.
  • /clear
    if the executor is an unit.

/effect target:target string:statuseffect (int:duration) (int:level) (boolean:hideparticle)

Gives the executor a status effect for the given duration of seconds.
Fails if executor is not an unit. Some effects are custom potion effects, which are affected by the given level and hideparticle.
speed sets speedMultiplier to level*0.1+1.1.
slowness sets speedMultiplier to -1*level*0.05+0.95.
strength sets damageMultiplier to level*0.1+1.1.
weakness sets damageMultiplier to -1*level*0.05+0.95.
resistance sets armorMultiplier to level*0.2+1.1.
pain sets armorMultiplier to -1*level*0.05+0.95.
poison gives damage of 0.05*level+0.05 every frame. Kills, unlike what it looks like.
wither gives damage of 0.1*level+0.1 every frame. Kills.
instant_damage gives damage of 10*level+10. Duration is overridden.
burning, freezing, wet, melting, tarred, overdrive, shielded, shocked, corroded, boss are vanilla status effects. Refer here.
SPEED MULTIPLIERS ARE NOT SUPPOSED TO WORK FOR PLAYERS, MAY RESULT IN UNEXPECTED BEHAVIORS SUCH AS CRASHES.

/kill (target:target)

Kills the target. The target is the executor if unspecified. Fails if the target is not an unit.

/assert

The executor asserts dominance.

/configure pos:x pos:y (int|boolean:value)

Configures a block at the specified position to a value.
Doors accept boolean, others accept intergers. Value may be unspecified for doors(then it will toggle).

View on GitHub
GitHub Stars156
CategoryDevelopment
Updated9d ago
Forks48

Languages

JavaScript

Security Score

100/100

Audited on Mar 15, 2026

No findings