• 1

    posted a message on Summon entity at entity command?

    Execute command os used when you want to run a command as someone or at a special place, and when you want to store the result or the success of the following command :)

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Summon entity at entity command?

    Hey, you just have to use "at" in an execute command like this :


    execute at @e[type=arrow] run summon... 
    Posted in: Commands, Command Blocks and Functions
  • 1

    posted a message on tp redirect??

    Maybe you can create a scoreboard that will store player position, and if the position change drastically, it will be because the player has teleport, and then you test if he is on your land.

    Posted in: Commands, Command Blocks and Functions
  • 1

    posted a message on tp redirect??

    For this, you can set a range to your base, and have this command :


    /execute positioned x y z as @a[distance=..[range]] at @s if entity [pseudo][distance=..1] run tp x' y' z'


    You have to change x y z by the coordinate of the middle of your base, [range] by the range of your base, [pseudo] by your pseudo, and x' y' z' where you want the player to be teleported.


    If you're in your base and someone is at 1 block or less of you, it will teleport him


    Don't know if it will work, I haven't try it, tell me if something is wrong. (you can test it by summon an armor_stand, change "@a[distance=..[range]]" in the command by "@e[distance=..[range], type=armor_stand]" and tp the armorstand on you)

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Bug (I think) with detecting items after they have been summoned or given to a player

    your command is not wright, here is the good way :


    /execute if entity @e[distance=..3,type=minecraft:item,nbt={Item:{id:"minecraft:sea_pickle",tag:{display:{Name:'"Key"'}}}}] run ...

    Also, I recommand you to give your item a custom tag, since it's impossible in vanilla to change tag, 'cause if the player just rename a sea pickles, your command will work.

    Posted in: Commands, Command Blocks and Functions
  • 1

    posted a message on need help making an arcade-style minigame

    For the arrow, you can just make the arrow with NoGravity, and give it a motion, just one time or every tick, like you want, it will be easier.

    Posted in: Commands, Command Blocks and Functions
  • 1

    posted a message on command block not running

    We can't figure what's the problem with only that infos.


    Send us the command you write in, check if you are on "unconditionnal" mode.

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Need help detecting when a player touches armour stand

    For what you want, you have to use "distance" instead of dx.


    execute at @e[name=WEBAS_Armour] as @e[name=WEBAS_BEE,distance=...1] run... 

    Like this, it would run the command for all the bee with the good name at maximum 0.1 block of the armor stand.

    I suggest you to use tag instead of custom names for checking entities, because it's easy to rename an entity.

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Detecting a powered pressur plate

    Oups my bad, don't see the "#"

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Detecting a powered pressur plate

    Pressure_plate don't have a "s" at the end.

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Freezing a horse in it's place with the push of a button

    If there no other way, you can spawn an AEC at the horse position, and tp it on the AEC, then when you push the button, kill it.


    first time button pushed :


    execute as @e[tag=skeleton_horse] run summon summon area_effect_cloud ~ ~ ~ {Tags:["AEC"]}

    every tick function :


    teleport @e[tag=skeleton_horse] @e[tag=AEC]

    second time button pushed :


    kill @e[tag=AEC]


    But that will only work with one skeleton at a time.

    If you have more, you can store the position where it was when you pushed the button, and tp on it until you pushed the button a sencond time.


    scoreboard create :


    scoreboard objectives add save_x dummy
    scoreboard objectives add save_y dummy
    scoreboard objectives add save_z dummy
    scoreboard objectives add save_rx dummy
    scoreboard objectives add save_rz dummy
    scoreboard objectives add paused dummy


    First time button pushed :


    execute as @e[tag=skeleton_horse] run function datapack:save_coords

    save_coords.mcfunction :

    scoreboard players add @s paused 1
    execute store result score @s save_x run data get entity @s Pos[0]
    execute store result score @s save_y run data get entity @s Pos[1]
    execute store result score @s save_z run data get entity @s Pos[2]
    execute store result score @s save_rx run data get entity @s Rotation[0]
    execute store result score @s save_rz run data get entity @s Rotation[1]

    every tick function :


    execute as @e[scores={paused=1}] run function datapack:tp

    tp.mcfunction :


    execute store result entity @s Pos[0] int 1 run scoreboard players get @s save_x
    execute store result entity @s Pos[1] int 1 run scoreboard players get @s save_y
    execute store result entity @s Pos[2] int 1 run scoreboard players get @s save_z
    execute store result entity @s Rotation[0] float 1 run scoreboard players get @s save_rx
    execute store result entity @s Rotation[1] float 1 run scoreboard players get @s save_rz


    second time button pushed :


    scoreboard players reset @e[tag=skeleton_horse] paused


    I haven't tried these commands anyways, so maybe there are some errors ^^

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on /home in vanilla minecraft?

    You can use a trigger function.

    Here how to do it :


    1) You have to set a trigger scoreboard like this :


    scoreboard objectives add SetHome trigger
    scoreboard objectives add Home trigger
    scoreboard players enable @a Home
    scoreboard players enable @a SetHome


    2) You set the trigger function to add 1 to score when the player run the command :

    trigger Home add 1
    trigger SetHome add 1

    3) In your every_tick_function, you write that if a player use the SetHome trigger function, it save his coordinates, and if he use the Home trigger, it will tp him.


    every_tick_function.mcfunction :


    execute as @a[scores={SetHome=1}] run function datapack:set_home
    execute as @a[scores={Home=1}] run function datapack:home
    scoreboard players reset @a set_home
    scoreboard players reset @a home



    set_home.mcfunction :

    scoreboard objectives add save_x dummy
    scoreboard objectives add save_y dummy
    scoreboard objectives add save_z dummy
    scoreboard objectives add save_rx dummy
    scoreboard objectives add save_rz dummy
    
    execute store result score @s save_x run data get entity @s Pos[0]
    execute store result score @s save_y run data get entity @s Pos[1]
    execute store result score @s save_z run data get entity @s Pos[2]
    execute store result score @s save_rx run data get entity @s Rotation[0]
    execute store result score @s save_rz run data get entity @s Rotation[1]

    home.mcfunction :


    summon area_effect_cloud ~ ~ ~ {Tags:["move"]}
    
    execute store result entity @e[tag=move,limit=1] Pos[0] int 1 run scoreboard players get @s save_x
    execute store result entity @e[tag=move,limit=1] Pos[1] int 1 run scoreboard players get @s save_y
    execute store result entity @e[tag=move,limit=1] Pos[2] int 1 run scoreboard players get @s save_z
    execute store result entity @e[tag=move,limit=1] Rotation[0] float 1 run scoreboard players get @s save_rx
    execute store result entity @e[tag=move,limit=1] Rotation[1] float 1 run scoreboard players get @s save_rz
    
    tp @s @e[limit=1,tag=move]
    
    kill @e[tag=move]



    With that, if the player want to run the set_home command, he can do /trigger Set_Home, and if he want to run the home, command, he can do /trigger Home, without being OP.

    I haven't tested it, so tell me if something is wrong, I never used trigger before ^^'

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on [Solved] Detect specific item (with lore) in inventory and give effect

    Why do you write "minecraft:execute"?

    You just have to write "/execute"

    :)

    Posted in: Commands, Command Blocks and Functions
  • 1

    posted a message on Run command after player stands somewhere long enough.

    All you need is to use scoreboard.


    You create a dummy scoreboard that will count how many tick the player stood on the position


    (once) : /scoreboard objectives add TimePassed
    
    (every tick) : /scoreboard players add @a[x=0,y=0,z=0,distance=..1] Time Passed 1
    
    (if you want the counter to reset if the player is not on the position) : /scoreboard reset @a[x=0,y=0,z=0,distance=1..] TimePassed
    
    (every tick) : /execute as @a[scores={TimePassed=200}] run say "I stood 200 tick in there... So what now?" 

    I haven't test the code, so tell me if something is wrong. :)

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on change commands for a very large amount of command blocks

    I think a good solution will be to use function instead of command block.


    I don't know what you want to do, but 500*40 commands blocks is so much !


    With function, you can just change command to call under conditions, and so have some commands in your function that will change without touching or copied the rest of yout function.


    If you can't, I have no idea what you can do, sorry :s

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