MC Template Functions - Execute JavaScript in Minecraft functions
How to use:
(Anything in between <<>> is executed)
Convert a function file:
1. Put your function file in the functions folder
2. Click the bar that shows the location of the folder you are currently in (image below), type 'cmd' and press Enter
3. Type 'convert '
4. The converted commands are in -converted.mcfunction
Example:
say << new Date().getFullYear() >>
-- turns into --
say 2019
You sadly can't, there's no way of editing block data yet. You could try to use /clone to clone a command block that already has a command inside of it.
I want a command to make a zombie named Death ALWAYS be within 40 blocks of me. If I go further I want him to teleport within that 40 block range. That way I can’t ever escape him. I can build around him but when I travel 40 blocks he will just teleport again and stay within 40 blocks. I am on Minecraft PE and any help is appreciated. I’ve tried /tp @e[name=Death] @p ~~~ and it doesn’t register the ~
But every time I try this, even on different worlds, an error comes up in the previous output section saying:
Failed to execute 'kill' as (anyone in the game)
Yes, it's on a clock. I make the command block Repeat and Doesn't need redstone.
I'm also having another problem where my command blocks are entirely not working anymore. When I try to set a chain of command blocks, I don't know if I'm supposed to to start with an Impulse command block, but it says in the bottom right "Block Type: Impulse" and "Redstone: Always Active" even after changing it to Chain and Needs Redstone.
Stand near the command block and execute this command: /tickingarea add circle ~ ~ ~ 4, this will make an area where in all redstone and entities will always stay active.
The only way to give an armor stand a custom skull is like this replaceitem entity @e[type=armor_stand] slot.armor.head 0 skull 1 3 {SkullOwner:"Player name"} or by summon it with some tags, but with the SkullOwner nbt you can't use @p and that type of selectors so you have to put the players name in yourself.
0
The Scripting API might be useful.
But that's still only available on Windows 10 and on Android using Blocklauncher
0
MC Template Functions - Execute JavaScript in Minecraft functions
How to use:
(Anything in between <<>> is executed)
Convert a function file:
1. Put your function file in the functions folder
2. Click the bar that shows the location of the folder you are currently in (image below), type 'cmd' and press Enter
3. Type 'convert '
4. The converted commands are in -converted.mcfunction
Example:
0
You sadly can't, there's no way of editing block data yet. You could try to use /clone to clone a command block that already has a command inside of it.
0
You need to remove the @p or ~~~
0
It's /give @s lever 1 0 {"can_place_on":{"blocks":["Block of choice"]}}
0
give @s lever 1 0 "can_place_on":{"blocks":["<Your block>"]}
(Not sure if this is correct, need to check.)
0
You can't, you can only use them in scripts and addons
0
Try to execute the cmd without the decimals, that could work
0
Pretty sure it's /give (player) (item) (amount) (data value) "can_place_on:{"blocks":"<block of choice>"}
0
/execute @a ~ ~ ~ detect ~ ~-1 ~ concrete 15 kill @s
0
Stand near the command block and execute this command: /tickingarea add circle ~ ~ ~ 4, this will make an area where in all redstone and entities will always stay active.
0
You can put "c=1" in your kill command so only the closest one gets deleted.
0
I've tried it before but it didn't work for me
0
The only way to give an armor stand a custom skull is like this replaceitem entity @e[type=armor_stand] slot.armor.head 0 skull 1 3 {SkullOwner:"Player name"} or by summon it with some tags, but with the SkullOwner nbt you can't use @p and that type of selectors so you have to put the players name in yourself.
0
It's not yet possible with add-ons, the devs are working on a new modding api, I assume that you can add items when it's released.