Commands
Are you wanting to do some hacks in Minecraft? Use commands! They are the most advanced things to do in Minecraft, and so...
About Commands
Commands can do special things like changing the weather, changing the time, killing mobs with just one click, and even adding status effects that don't appear in potions! Every command starts with a forward slash (/) or the game will just send it as a message.
Using the Chat Menu
Using the Chat Menu for commands is easier: They offer prompts to you sometimes for what to type.
To start, select the blank button. Type a message or a command. Now follow the prompts they give you. See? You just did your first command! Now an important tip: Always check what the command does, and be careful, as it might cause events you seriously don't want to happen, such as removing operator status or even teleporting a large number of mobs and players to your location or killing them!
Using the Command Block Menu
Now in the command block menu, there's no prompts, so try testing it in the Chat Menu first.
Starting
To start, go to the Chat Menu and type "/give @s [Type "chain" or "repeat"]_command_block [How many command blocks you want]" to get your command block. Then, press the L2 button to enter it's menu. On the "Command Input" prompt (Not the typing-command prompt!), type your command. Press the + button next to the blank space you're typing in to fill the whole menu with a blank space. Note that this option will remove the prompts and all the other options and replace them with just the blank space, making it bigger.
Digging through the Options
Now you'll see that there is a "Block Type" prompted button with the blue "Chain" text in the button or the purple "Repeat" button. Select the button and choose from 3 options: Impulse, Chain, or Repeat. Impulse will need redstone. Chain has order. Repeat will repeat commands over and over but be careful as the world might corrupt.
And now the "Condition" prompted button. Select the button and choose from Unconditional or Conditional. Unconditional will not activate the block from events happening, and Conditional will.
And now the "Redstone" prompted button. Select from Always Active or Needs Redstone. Always Active will always keep the block active, and Needs Redstone will only activate if triggered by redstone.
And now the "Execute on First Tick" prompted button. It's a true or false button. Execute on First Tick is only usable for repeating command blocks with a delay. If enabled, the command will execute as soon as the block is powered, and then will wait for the delay before running again. If disabled, the command will not run the first time until the delay has finished. In the blank space, type the delay. Delay in Ticks is a value that defines how long a command block waits to execute after the command block receives redstone power.
Don't forget the "Hover Note" prompted button! Type a label to go above it, and to be replaced with the "!" starting command information. For example: "Weather Control", or "Time Control".
The /weather Command
Sets the weather.
Replace "[clear:rain:thunder]" with the weather you want to set. Type "clear" for no weather at all, "rain" for a rainy day, or "thunder" for rain and thunder.
Replace "[duration: int]" with the duration of your weather. For example, if you type "/weather thunder 999", it will cause a thunderstorm for 16 minutes.
The /time Command
Changes or queries the world's game time.
/time add
This will add more time to the game world.
Replace "<amount: int>" with the amount of the time you want to add.
/time query
This will query the world's game time.
Replace "<time: TimeQuery>" with the type of time you want to query. Type "day" for the number of the day, "daytime" for the number of the minute, or "gametime" for the number of the minute of the game.
/time set
This will set the world's game time.
Replace "<amount: int>" with the number of the time you want to set.
Replace "<time: TimeSpec>" with the following options: "sunrise", "day", "noon", "sunset", "night", or "midnight".
The @here Command
This is the only command that doesn't start with a forward slash (/).
Mention all players.
This command has no other stuff to type. The only thing to type is "@here". Just type "@here", remove any space, and send it.
The /tp Command
Teleports entities (players, mobs, etc.)
Replace "<destination: x y z>" with your destination's coordinate. For example: "0 64 0". That is a coordinate with the zeros except on the height number.
This detail is also found in another post. View in Cut Mode
The /give Command
Gives an item to a player.
Replace "<player: target>" with the type of group you want to give the item to. It must be player-type.
Replace "<itemName: Item>" with the item you want to give to the target. Of course, there is advanced items on the lists. Keep looking closely on the prompts!
Replace "[amount: int]" with how many you want to give in one inventory slot.
The /setblock Command
Changes a block to another block.
Replace "<position: x y z>" with the coordinate you want your block to be on. For example: "0 64 0". That is a coordinate with the zeros except on the height number.
Replace "<tileName>" with the type of block you want to replace. There is one more advanced type: The End portal block! If you use this command, you can put a small End portal block without even needing a frame!
The /summon Command
Summons an entity.
Replace "<entityType: EntityType>" with the type of entity you want to summon. There are different advanced items and mobs too! Like summoning an Ender Dragon in the Overworld or the Nether!
Replace "<nameTag: string>" with the name of the entity you want to summon. The name that you want to call it will hover above the mob like this:
Replace "[spawnPos: x y z]" with the coordinates of where you want your entity to spawn. For example: "0 64 0". That is a coordinate with the zeros except on the height number.
The /daylock Command
Locks and unlocks the day-night cycle.
Replace "[lock: Boolean]" with if you want the world to always be on daytime. When activated, "/time set" commands won't work. Type "true" for yes or "false" for no.
The /xp Command
Adds or removes player experience.
Replace "<amount: int>" with the amount of experience you want to give to the target, and type "L" at the end of the syntax (No space) if you want to increase the experience level of the target instead of just experience points.
Replace "[player: target]" with the target who must get the experience. It must be player-type.
This is a good way to reward players!
The /me Command
Displays a message about yourself.
Replace "<message: message>" with the message you want to send.
The /say Command
Sends a message in the chat to other players.
Replace "<message: message>" with the message you want to send to the other players.
The /testfor Command
Counts entities (players, mobs, etc.) matching specified conditions.
Replace "<victim: target>" with the type of group you want to count.
The /damage Command
Apply damage to the specified entities.
Replace "<target: target>" with the type of group you want to damage.
Replace "<amount: int>" with the amount of damage you want to cause to the target group. Of course, you can kill them completely with a giant amount of damage!
Replace "[cause: DamageCause]" or "<cause: DamageCause>" with the type of damage you want to cause to the target group.
If you replaced "<cause: DamageCause>", type "entity" and replace "<damager: target>" with the type of group to attack the part of the target group in the attacker's current location.
The /kill Command
Kills entities (players, mobs, etc.).
Replace "[target: target]" with the target group you want to kill. Note that it's impossible to kill a player in Creative or Spectator Mode.
The /deop Command
Revokes operator status from a player.
Replace "<player: target>" with the target group you want to remove operator status.
The /kick Command
Kicks a player from the server.
Replace "<name: target>" with the name of the player you want to kick (victims like "@s" or "@a" won't work). Note that the host can't be kicked out from the server.
Replace "<reason: message>" with the reason you're kicking the target player.
The /locate Command
Type one of the words: "biome" or "structure". It depends on what type of location you want to locate.
Replace "<biome: Biome>" with the ID of the biome to locate, or "<structure: Structure>" with the ID of the structure to locate.
Use the /? Command!
To learn more, type "/?" and type in the command you want to learn! Or, go here.
More about Commands
So, you see how much magic commands do, right? So, as you've seen, it takes hard work (but it's not impossible) to make a portal (it just can't have animations on the energy) with command blocks. If you can learn all commands, you'll sure will be able to create hacks in Minecraft, like making a button create a whole structure in only one click!
Tips for Using Commands
When you have to type a coordinate at a command and you might forget the code, get a piece of paper and write down the coordinates so then you can type in what you wrote and you sure won't forget! A lot of block commands have coordinate syntaxes.
When you're using command blocks, if you don't know what to type in, try testing in the chat menu, because it offers prompts telling the choices, but don't complete it, because remember, it might cause events that you seriously don't want them to happen, so always check! now, when there's no prompts, then it's likely that you have to type in your own, valid, word.
Comments ()