• 0

    posted a message on So, now I've got a new problem

    Distance works just fine. The problem is you used @s(the executor).

    When you run it in chat, you are the executor so you are the one that run and received /tell.

    But if you run it in command block, well...


    If the executor was not an entity, for instance if the executor was a command block or a server console, this selector will find nothing.


    Change it to...

    /execute as @a if entity @s[x=X,y=Y,z=Z,distance=..5] run tell @s <message>

    /tell @a[x=X,y=Y,z=Z,distance=..5] <message>

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Scoreboard help

    In case you are wondering why it doesn't work.


    /execute if score @p <targetObjective> >= <source> <sourceObjective> ...

    /execute if score @p P1P >= 100 P1P

    This is the one you are using, it compare the nearest player's P1P score with a player named 100's P1P score.



    Or in your own word, execute if nearest player scoreboard named P1P score is greater than or equals to player named 100's score from scoreboard P1P.



    The correct way is

    /execute (if|unless) score <target> <objective> matches <range>

    /execute if score @p P1P matches 100..

    or

    /execute (if|unless) entity <entity> <chained command>

    /execute if entity @p[scores={P1P=100..}]




    In addition, execute if and execute as are not the same nor work the same way.
    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on coordinate selector broken in 1.13?

    Try these...


    execute as @e[type=armor_stand] at @s run say HI

    execute as @e[type=armor_stand] at @s if entity @s[z=10,dz=10] run say HI

    execute as @e[tag=myarmorstand] at @s if entity @s[z=10,dz=10] run say HI

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Need help with killing an entity!!

    Try these...

    Spawn an armor stand and a chicken.

    minecraft:kill @e[type=armor_stand,c=1,r=10]

    minecraft:kill @e[type=chicken,c=1,r=10]


    If the chicken is gone but the armor stand is still here, it means there are plugins preventing you from killing armor stands. If that's the case, either find out and change the setting of that plugin, or use area_effect_clouds to replace armor_stand.

    Posted in: Commands, Command Blocks and Functions
  • 1

    posted a message on /kill @e[type=minecraft:armor_stand,distance=5] Not working? (1.13.1)

    distance=5 means exactly 5 block.

    So you might want to change it to distance=..5

    Posted in: Commands, Command Blocks and Functions
  • 2

    posted a message on How to detect the last person alive (in 1.13?)

    Slightly change...dummy isn't really need.


    SETUP

    scoreboard objectives add deathCount deathCount

    summon area_effect_cloud ~ ~ ~ {Tags:["count"],Age:0,Duration:2147483647}


    WHEN PLAYER ENTER YOUR MINI GAME, RUN

    tag @a[...] add ingame

    CHAIN CONDITIONAL ACTIVE

    scoreboard players set @a[tag=ingame] deathCount -1


    REPEAT UNCONDITIONAL ACTIVE

    execute store result score @e[tag=count,limit=1] deathCount if entity @a[tag=ingame,scores={deathCount=-1}]

    CHAIN CONDITIONAL ACTIVE

    execute if entity @e[tag=count,scores={deathCount=1}] as @a[tag=ingame,scores={deathCount=-1}] at @s run say LAST PLAYER



    A example of how command blocks are place.

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Can't Disable Slots in Item Frames (1.13)

    emmm...Mojang could add the disable slots feature just like the armor stand, but they didn't...


    tips:F3+I for a quick way to obtain NBT.


    Repeat

    execute unless entity @e[nbt={Facing:2b,ItemRotation:0b,Rotation:[180.0f,0.0f],Item:{id:"minecraft:blaze_spawn_egg",Count:1b},Tags:["check"]}] run summon minecraft:item_frame -6.50 5.50 -7.03 {Facing:2b,ItemRotation:0b,Invulnerable:1b,Rotation:[180.0f,0.0f],Item:{id:"minecraft:blaze_spawn_egg",Count:1b},Tags:["check"]}


    Chain

    kill @e[tag=check,nbt=!{Facing:2b,ItemRotation:0b,Item:{id:"minecraft:blaze_spawn_egg",Count:1b}}]

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on How to detect the last person alive (in 1.13?)

    Tag is for differentiating in-game player and guest/spectator.

    deathCount scoreboard is for...well you know.

    For those who join the game, give them a tag(ingame) and a deathCount score of -1.


    execute store result score @p testdummy if entity @a[tag=ingame,scores={deathCount=-1}]

    When the entity who store this score(@p in this case) has a score of 1, it means there's only one player alive.

    Then execute as @a[tag=ingame,scores={deathCount=-1}] at @s run say HI would let this player say HI...


    Or you can use scoreboard operation to add every player's deathCount score together. Only one left if the total score is -1. Then use execute as @a[scores={deathCount=-1}]... to detect...

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Need help with killing an entity!!

    I don't think this "fix" will work.

    The "minecraft:"(namespace) at the front is need to let it run as a vanilla command.


    I believe the problem occurs because of the way how his command block connected, perhaps wrong testforblock coordinate, as well as the missing namespace for his first command. Also, try not to use testfor, repeater and comparator, they are not that great. Keep in mind that since you are using spawn egg, you may want to avoid player spawning blaze on non-air block(buttons, torch...)


    execute @e[type=minecraft:blaze] ~ ~ ~ summon minecraft:armor_stand ~ ~ ~ {Invulnerable:1b,Marker:1b,NoGravity:1b,Tags:["goldGen"]}

    kill @e[type=minecraft:blaze]

    execute @e[tag=goldGen] ~ ~ ~ setblock ~ ~ ~ minecraft:stained_glass 4 replace


    execute @e[tag=goldGen] ~ ~ ~ detect ~ ~ ~ minecraft:air * scoreboard players tag @s add notgood

    execute @e[tag=notgood] ~ ~ ~ say HI

    kill @e[tag=notgood]


    Purple ones set to REPEAT, UNCONDITIONAL, ALWAYS ACTIVE.

    Green ones set to CHAIN, CONDITIONAL, ALWAYS ACTIVE.


    These commands above worked in vanilla. If it doesn't work on server, try to add "minecraft" namespace at the begin of EVERY command.

    Not sure about whether the execute command need namespace for its sub command, so try it yourself.


    ex.

    minecraft:execute @e[type=minecraft:blaze] ~ ~ ~ minecraft:summon minecraft:armor_stand ~ ~ ~ {Invulnerable:1b,Ma...}

    minecraft:execute @e[type=minecraft:blaze] ~ ~ ~summon minecraft:armor_stand ~ ~ ~ {Invulnerable:1b,Ma...}

    minecraft:kill @e[type=minecraft:blaze]

    minecraft:execute @e[tag=goldGen] ~ ~ ~ minecraft:setblock ~ ~ ~ ...

    minecraft:execute @e[tag=goldGen] ~ ~ ~ setblock ~ ~ ~ ...

    ...

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Please Help! 1.12 commands to 1.13

    teleport @a[scores={rejoin=1..}] -1252 78 576

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on [Solved] 1.13 Functions not working

    Unless that line is empty, every line that's not a command need # at the front.


    And try enable the gameoutput screen in launcher settings, it will shows you where the errors are.

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on [Solved] 1.13 Functions not working

    What command did you wrote in tablenchairs.mcfunction? There might be some error that make the whole mcfunction invalid.


    Not trying to critic you but unless you are absolutely sure about your commands, never said "that's not the problem". And try let others check your commands if possible. I heard so many times when people said that their commands are fine, but actually not.

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on [Solved] 1.13 Functions not working

    With this little bit of information, that's all we can help you.

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on How to disable nametags in my server on 1.13?

    teams option <team> nametagVisibility <never|hideForOtherTeams|hideForOwnTeam|always>

    https://minecraft.gamepedia.com/Scoreboard#Teams_commands

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Issue with custom sounds in resource pack (1.13.1)

    One possibility I can think of is that you have more than 4 "stream:true" ogg with the same type is playing.

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