• 1

    posted a message on Detect Armor Stand With Gold Armor

    The Count tag full item id is required in every ArmorItems object.

    /execute if entity @e[type=minecraft:armor_stand,distance=..5,nbt={ArmorItems:[{id:"minecraft:golden_boots",Count:1b},{id:"minecraft:golden_leggings",Count:1b},{id:"minecraft:golden_chestplate"},{id:"minecraft:golden_helmet",Count:1b}]}]

    Thanks for the correction, eglaios.

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Updating syntax to +1.15 Java

    Did you paste them in the right order?


    I wrote the commands in the same order they were written on the website you linked. Follow the layout instructions from the website but use the commands I wrote instead. So the last command (/scoreboard players add @e[name=PLATFORM] platform 1) should be in a repeating command block, the second to last command should be in a chain command block and so on.

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Match a zombie's body rotation to the head rotation

    Have you tried enabling the AI while rotating the zombie and then disabling it afterward?

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Updating syntax to +1.15 Java

    Here are all the commands from the page updated to the new syntax:

    /scoreboard objectives add platform dummy
    /summon minecraft:armor_stand ~ ~ ~ {CustomName:"\"PLATFORM\"",Marker:1b,Invisible:1,NoGravity:1}
    /execute at @e[name=PLATFORM] run fill ~1 ~ ~1 ~-1 ~ ~-1 minecraft:white_stained_glass replace air
    /execute at @e[name=PLATFORM] run fill ~2 ~ ~2 ~-2 ~ ~-2 air replace minecraft:white_stained_glass
    /execute as @e[name=PLATFORM,scores={platform=101..200}] at @s run tp ~ ~ ~-.2
    /execute as @e[name=PLATFORM,scores={platform=1..100}] at @s run tp ~ ~ ~.2
    /scoreboard players reset @e[name=PLATFORM,scores={platform=201..}] platform
    /scoreboard players add @e[name=PLATFORM] platform 1
    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Armor stand with players username

    The only issue is getting the player's name in text form. The CustomName tag doesn't seem to support the selector option when using JSON formatting ({"selector"."@p"}) so I don't think this can be done directly. Someone on Reddit pointed out a really clever workaround using sings. Signs do support the selector option so you can use them to get the player's name in text form and then you can copy that text to the armor stand's CustomName tag.


    To get the player's name on the sign:

    /data modify block <sign_x> <sign_y> <sign_z> Text1 set value '{"selector":"@p"}'

    To copy the text to the armor stand:

    /data modify entity <armor_stand> CustomName set from block <sign_x> <sign_y> <sign_z> Text1
    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on rail system -execute if- logic isn't working(?) 1.14.4

    Cool system. You could limit the number of players that can use the system at the same time to prevent it from breaking. Sort of like a queue.

    The minecarts can be stopped using:

    /execute as <some_minecarts> run data modify entity @s Motion set value [0.0d,0.0d,0.0d]

    But I have no idea how the queue would work lol.

    Posted in: Commands, Command Blocks and Functions
  • 2

    posted a message on Is there a way to detect if a player is sneaking?

    Here's a list of all the stat types: https://minecraft.gamepedia.com/Statistics#Statistic_types_and_names

    and right below that is a list of all the custom stats.

    Posted in: Commands, Command Blocks and Functions
  • 1

    posted a message on rail system -execute if- logic isn't working(?) 1.14.4
    But I checked it and apparently it stores the display name tag for items exactly as you enter it.

    The command will be able to detect the value but it won't be displayed in-game. The reason is that the value has to be stored as a string. And to be a string, it needs to have a pair of double-quotes around it. If you use Name:"stick", the game will store that value as stick. But if you use Name:"\"stick\"", the game will store that value as "stick" (which is the correct format). And you need to "escape" the inner pair of double quotes because the game can't store a string inside another string. I just wanted to explain that so anyone reading this knows why the backslashes are required.


    Anyway, back to the original problem. The NBT data should be inside the nbt tag in the selector. Here is the correct version:

    /execute positioned -630 62 348 if entity @p[distance=..7,nbt={Inventory:[{id:"minecraft:name_tag",tag:{display:{Name:'{"text":"substation"}'}}}]}]

    Also, I assumed that the nametag was renamed using an anvil so I changed the name format to '{"text":"substation"}' because that's the format anvils use. You can change it if you didn't use an anvil.

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on rail system -execute if- logic isn't working(?) 1.14.4

    also im not sure you can just put "text" for a JSON string correct me if I'm wrong but minecraft stores it as '{"text":"substation"}'

    The JSON formatting is optional. You can use plain text but it has to be stringified (Name:"\"someName\"").

    Posted in: Commands, Command Blocks and Functions
  • 2

    posted a message on Is there a way to detect if a player is sneaking?

    The scoreboard system has some built-in criteria for detecting actions like walking, sprinting, jumping, sneaking, etc.


    Create an objective like this:

    /scoreboard objectives add sneaking minecraft.custom:minecraft.sneak_time

    The value of this objective will increase every time the player sneaks. Now all you need is a repeating command block with the detection command:

    /execute as @a[scores={sneaking=1..}] run say sneaking

    and a chain command block that will reset the value:

    /scoreboard players reset @a[scores={sneaking=1..}] sneaking
    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on I'm struggling with making a shop.

    You need to store the amount of string the player has, into a scoreboard objective so you can test for a range.


    Create an objective:

    /scoreboard objectives add string dummy

    Store the number into the objective:

    /execute as @a store result score @s string run clear @s string 0

    And now you can use that objective like this:

    /clear @a[scores={string=16..}] string 16
    Posted in: Commands, Command Blocks and Functions
  • 1

    posted a message on Making a custom named gold nugget, "Coins", into in-game currency for mini-game map.

    The total amount is stored in the Coins objective of the fake player global. So you should decrease global's objective instead of the player's objective:

    /execute if score global Coins matches 5.. run give @p minecraft:iron_sword
    /scoreboard players remove global Coins 5
    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Making a custom named gold nugget, "Coins", into in-game currency for mini-game map.

    I thought the fourth command block had something to do with the scoreboard, my bad.

    It does. It displays the value of the temp objective in the chat. Ptolemy2002's system uses two objectives, temp, and coins. You need to create those two objectives before running the system if you haven't already.

    /scoreboard objectives add coins dummy
    /scoreboard objectives add temp dummy

    I manually set the value of my temp objective to 1 and ran the fourth command (see included screenshot).

    Posted in: Commands, Command Blocks and Functions
  • 1

    posted a message on Kill Oak Fences
    /kill @e[type=minecraft:item,nbt={Item:{id:"minecraft:oak_fence"},OnGround:1b}]
    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on How to summon a mob in unloaded chunks?

    Are these chunks predetermined?

    if so, you can keep them loaded using /forceload.

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