• 0

    posted a message on Detecting last player alive

    You wouldn't have any idea of how to do it on Bedrock, would you?


    Last time I checked, Bedrock edition looked like it was using the old command syntax (from Java 1.12) so I will try to convert all the commands to the old syntax. Here are some I've managed to convert:

    /scoreboard objectives add count dummy

    /execute @a[tag=inGame] ~ ~ ~ scoreboard players add counter count 1

    /execute if score counter count matches 1 run ...  <-- this one I'm not sure how to convert

    /scoreboard players reset counter count 

    the only commands which needed re-writing were the seconds and the third command. Also, I'm not sure what the 1.12 equivalent of the third command is.

    Posted in: Commands, Command Blocks and Functions
  • 1

    posted a message on Detecting last player alive

    These commands are for Java edition 1.13+

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Can you enchant a player head with commands?

    You can enchant it but it will not have the enchantment animation when worn.

    /give @s minecraft:player_head{SkullOwner:"...",Enchantments:[{id:"protection",lvl:14567223}]}
    Posted in: Commands, Command Blocks and Functions
  • 1

    posted a message on Problem detecting a specific item in an item frame at specific coordinates (1.14.4)

    The x, y and z selectors require either dx, dy and dz or distance to work. In your case, you need distance.

    @e[type=item_frame,x=75,y=5,z=75,distance=..1,nbt={Item:{id:"minecraft:wooden_axe"}}]

    There is also a more precise way of doing this. Item frames have three tags called TileX, TileY and TileZ which hold the coordinates of the block the item frame is in (not the block the item frame is ON but the block the item frame is IN). Example:

    /execute if entity @e[type=minecraft:item_frame,nbt={TileX:-265,TileY:10,TileZ:-246,Item:{id:"minecraft:redstone"}}] run ...
    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Question about my command lines and if they are right

    Simply add [facing=<side>] to the end_rod. Example:

    /fill 143 69 -120 0 69 -120 end_rod[facing=west]

    please make a new thread for any new questions so this thread stays on topic :)

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on How to detect a certain item and make it dissapear?
    /tag @e[type=item,nbt={Item:{id:"minecraft:compass"}}] add compass
    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on How to detect a certain item and make it dissapear?

    This means command blocks might be disabled on your server or some plugins are overriding your commands. Check if you have command blocks enabled by opening server.properties in your server's main directory and locating the enable-command-block field. It should be set to true. If it still doesn't work, try removing all the plugins.

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on teleport entity away

    Since command blocks use a sphere to detect the distance between itself and some entity, you can create a cylinder from multiple spheres. Example:

    /execute if entity @e[distance=..10] run ...

    /execute positioned ~ ~5 ~ if entity @e[distance=..10] run ...

    this will create more of a cylindrical shape with a width and length of 10 blocks and a height of around 15 or so blocks. As for the cube, I don't think you can construct a cube from spheres (well not an accurate one).

    Posted in: Commands, Command Blocks and Functions
  • 1

    posted a message on How to detect a certain item and make it dissapear?

    Your commands work perfectly fine. However, I suggest using Inventory instead of SelectedItem so the compass is cleared even if the player is not holding it.

    tag @p[nbt={Inventory:[{id:"minecraft:compass"}]}] add compass

    Tested on 1.14.4. The first command should be in an always active repeating command block and the other two should be in chain always active command blocks.

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on How to make wither Skulls have bigger explosions?

    According to the wiki, the wither skull only contains the properties: life, direction and power. Unlike the fireball entity, wither skull's don't have an ExplosionPower property so their explosion power can't be modified. You could summon a primed TNT at its position once it hits a block using this command:

    /execute as @e[type=minecraft:wither_skull] at @s anchored eyes positioned ^ ^ ^ unless block ^ ^ ^1 air run summon tnt ~ ~ ~

    or even better, summon a creeper because creepers have the EcplosionRadius tag which you can modify (the included screenshot is radius 10):

    /execute as @e[type=minecraft:wither_skull] at @s anchored eyes positioned ^ ^ ^ unless block ^ ^ ^1 air run summon creeper ~ ~ ~ {Fuse:0,ExplosionRadius:10}
    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Question about my command lines and if they are right
    Quote from gillman82»

    Awesome! Thank you! it works! Now all i need is a way to stop it. If I left this going in my world it would lag me really bad. Is there a way to turn it off? or remove the mine carts that started the chain?



    With tags. Simply edit all the commands and add a tag into every selector.

    execute at @e[type=minecraft:command_block_minecart,tag=infinite,tag=your_tag_here] run setblock ~-1 ~-1 ~ minecraft:redstone_block


    execute at @e[type=minecraft:command_block_minecart,tag=infinite,tag=your_tag_here] unless block ~-1 ~ ~ minecraft:rail unless block ~-1 ~-1 ~ air run setblock ~-1 ~ ~ minecraft:rail

    and then you can add/remove the tag with:

    /tag @e[type=command_block_minecart,tag=infinite] add your_tag_here


    via chat or command block. If you use tags, you also need to add the tags to the summon commands (the 2 impulse command blocks) like so:

    /summon command_block_minecart <x> <y> <z> {Tags:["infinite","your_tag_here"]}

    Quote from gillman82»

    Okay everything works fine in the world you sent me. I even moved it around. but when i do the exact same thing as you did in my world it does not create the rails.


    Have you tried resetting the command blocks? un-power and re-power the repeating command block by setting it from "always active" to "needs redstone" and then back to "always active" because command blocks can sometimes freeze.

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Question about my command lines and if they are right

    West is negative X so I think it goes like this:

    execute at @e[type=minecraft:command_block_minecart] run setblock ~-1 ~-1 ~ minecraft:redstone_block

    execute at @e[type=minecraft:command_block_minecart] unless block ~-1 ~ ~ minecraft:rail unless block ~-1 ~-1 ~ air run setblock ~-1 ~ ~ minecraft:rail

    and here is a world download in case you still can't get it to work: https://www.dropbox.com/sh/1pf74f7k06p3qqc/AABQp7WRrQCYPwu00MUN2Be-a?dl=0

    to use normal minecarts instead of the command block minecarts, just replace all "minecraft:command_block_minecart" with "minecraft:minecart".

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Detect if a player is in a minecart

    /data get entity @s is very useful when you want to see the data available to you.

    /execute as @a[nbt={RootVehicle:{Entity:{id:"minecraft:minecart"}}}] run ...
    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Is it possible to create a block that can't be placed?

    You could use an item which can't be used in any crafting recipe (such as the structure void item) and re-texture it to look like a block (requires a resource pack tho).

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Teleportation involving rotation, (X Axis!!)

    The command will modify the armor stands head rotation as well, you can test this by running this command in a repeating command block:

    execute as @e[type=minecraft:armor_stand,distance=..10] at @s run setblock ^ ^ ^2 glass

    an armor stand's head will only visibly rotate if you assign a rotation to it using the Pose:{} tag.

    Posted in: Commands, Command Blocks and Functions
  • To post a comment, please or register a new account.