Skip to main content
replaced https://minecraft.gamepedia.com/ with https://minecraft.wiki/w/
Source Link

You could do this by writing a functionfunction (.mcfunction file) and placing it in a datapack in the map folder. To create a function, follow these steps:

  1. Open notepad (or your text editor of choice), and enter the commands you wish to run, each on their own line.

  2. Save the file, name it whatever you want, (replace .txt with .mcfunction) on your desktop.

  3. Create folders in this order:

    datapacks / [name of datapack] / data / [namespace] / functions

  4. Move the .mcfunction file you created into the functions folder, and move the datapacks folder into your world folder. (for a Realm, you will first need to download the map - go to World backups and Download latest)

  5. (for a Realm) Upload the modified map to the Realm.

  6. Run the function with /function [namespace] : [function name]. This can be done by a player or from a command block.

Note: @p selector will be relative to the command block or player that ran the function, in this usecase I'm assuming @a would fit better.

You could do this by writing a function (.mcfunction file) and placing it in a datapack in the map folder. To create a function, follow these steps:

  1. Open notepad (or your text editor of choice), and enter the commands you wish to run, each on their own line.

  2. Save the file, name it whatever you want, (replace .txt with .mcfunction) on your desktop.

  3. Create folders in this order:

    datapacks / [name of datapack] / data / [namespace] / functions

  4. Move the .mcfunction file you created into the functions folder, and move the datapacks folder into your world folder. (for a Realm, you will first need to download the map - go to World backups and Download latest)

  5. (for a Realm) Upload the modified map to the Realm.

  6. Run the function with /function [namespace] : [function name]. This can be done by a player or from a command block.

Note: @p selector will be relative to the command block or player that ran the function, in this usecase I'm assuming @a would fit better.

You could do this by writing a function (.mcfunction file) and placing it in a datapack in the map folder. To create a function, follow these steps:

  1. Open notepad (or your text editor of choice), and enter the commands you wish to run, each on their own line.

  2. Save the file, name it whatever you want, (replace .txt with .mcfunction) on your desktop.

  3. Create folders in this order:

    datapacks / [name of datapack] / data / [namespace] / functions

  4. Move the .mcfunction file you created into the functions folder, and move the datapacks folder into your world folder. (for a Realm, you will first need to download the map - go to World backups and Download latest)

  5. (for a Realm) Upload the modified map to the Realm.

  6. Run the function with /function [namespace] : [function name]. This can be done by a player or from a command block.

Note: @p selector will be relative to the command block or player that ran the function, in this usecase I'm assuming @a would fit better.

fixed grammar in codeblocks
Source Link
AMJ
  • 954
  • 6
  • 17

You could do this by writing a function (.mcfunction file) and placing it in a datapack in the map folder. To create a function, follow these steps:

  1. Open notepad (or your text editor of choice), and enter the commands you wish to run, each on their own line.

  2. Save the file, name it whatever you want, (replace .txt with .mcfunction) on your desktop.

  3. Create folders in this order:

    datapacks / (**name[name of datapack**)datapack] / data / (**namespace**)[namespace] / functions

  4. Move the .mcfunction file you created into the functions folder, and move the datapacks folder into your world folder. (for a Realm, you will first need to download the map - go to World backups and Download latest)

  5. (for a Realm) Upload the modified map to the Realm.

  6. Run the function with /function **namespace**[namespace] : **function[function name**name]. This can be done by a player or from a command block.

Note: @p selector will be relative to the command block or player that ran the function, in this usecase I'm assuming @a would fit better.

You could do this by writing a function (.mcfunction file) and placing it in a datapack in the map folder. To create a function, follow these steps:

  1. Open notepad (or your text editor of choice), and enter the commands you wish to run, each on their own line.

  2. Save the file, name it whatever you want, (replace .txt with .mcfunction) on your desktop.

  3. Create folders in this order:

    datapacks / (**name of datapack**) / data / (**namespace**) / functions

  4. Move the .mcfunction file you created into the functions folder, and move the datapacks folder into your world folder. (for a Realm, you will first need to download the map - go to World backups and Download latest)

  5. (for a Realm) Upload the modified map to the Realm.

  6. Run the function with /function **namespace** : **function name**. This can be done by a player or from a command block.

Note: @p selector will be relative to the command block or player that ran the function, in this usecase I'm assuming @a would fit better.

You could do this by writing a function (.mcfunction file) and placing it in a datapack in the map folder. To create a function, follow these steps:

  1. Open notepad (or your text editor of choice), and enter the commands you wish to run, each on their own line.

  2. Save the file, name it whatever you want, (replace .txt with .mcfunction) on your desktop.

  3. Create folders in this order:

    datapacks / [name of datapack] / data / [namespace] / functions

  4. Move the .mcfunction file you created into the functions folder, and move the datapacks folder into your world folder. (for a Realm, you will first need to download the map - go to World backups and Download latest)

  5. (for a Realm) Upload the modified map to the Realm.

  6. Run the function with /function [namespace] : [function name]. This can be done by a player or from a command block.

Note: @p selector will be relative to the command block or player that ran the function, in this usecase I'm assuming @a would fit better.

Source Link
AMJ
  • 954
  • 6
  • 17

You could do this by writing a function (.mcfunction file) and placing it in a datapack in the map folder. To create a function, follow these steps:

  1. Open notepad (or your text editor of choice), and enter the commands you wish to run, each on their own line.

  2. Save the file, name it whatever you want, (replace .txt with .mcfunction) on your desktop.

  3. Create folders in this order:

    datapacks / (**name of datapack**) / data / (**namespace**) / functions

  4. Move the .mcfunction file you created into the functions folder, and move the datapacks folder into your world folder. (for a Realm, you will first need to download the map - go to World backups and Download latest)

  5. (for a Realm) Upload the modified map to the Realm.

  6. Run the function with /function **namespace** : **function name**. This can be done by a player or from a command block.

Note: @p selector will be relative to the command block or player that ran the function, in this usecase I'm assuming @a would fit better.