All users will need to merge their Minecraft Forum account with a new or existing Twitch account starting October 23rd. You can merge your accounts by clicking here. Have questions? Learn more here.
Dismiss
  • 0

    posted a message on Unable to use /execute with detect
    Quote from Diamondman211»

    Here is my command.

    /execute @e ~ ~ ~ detect ~ ~-1 ~ hay_block 0 effect @e[r=0] 14 1 3

    It works on other worlds, but for some reason in the world I want to use it in, it doesn't work. I'm in 16w20a.



    Let's start with something Skylinerw would barge in to say: if you can, try to use another selector as this one would execute from every entity, which isn't ideal.

    For the second selector, I'd recommand using 'c=1' instead of using radius. This would prevent executing the command more than once when multiple targets are at the same position.

    Your command should work without any problem. Make sure the block data of the hay you're trying it on is 0, not 4 or 8 (standing upward, not on the side). If you want to detect any data, use -1 instead of 0.
    The problem could be located on the world you're trying it in, not in the command. Are commands allowed? Is the CB you're using conditional?

    Posted in: Redstone Discussion and Mechanisms
  • 0

    posted a message on How do you make block-breaking particles?
    Quote from Kishigai»

    The command is:


    /particle blockcrack_(id+(data*4096)) <x> <y> <z> <xd> <yd> <zd> <speed> [count] [mode]


    I would've understood your issue if you were in 1.9, but the quoted command (and the whole thread until its revival) still apply in 1.8.

    Quote from Kishigai»

    Spruce wood plank:

    /particle blockcrack ~ ~1 ~ 0.5 0.5 0.5 1 10 force @a 4101


    Birch wood log:


    /particle blockcrack ~ ~1 ~ 0.5 0.5 0.5 1 10 force @a 8209


    Here are the same commands for 1.8:

    /particle blockcrack_4101 ~ ~1 ~ 0.5 0.5 0.5 1 10 force
     
    /particle blockcrack_8209 ~ ~1 ~ 0.5 0.5 0.5 1 10 force

    Naturally, those are just examples. You should replace these arguments by the ones you want.

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on How do you make block-breaking particles?

    The particle command changed a bit since 1.9 with a new argument for blockdust, iconcrack and blockcrack particles. Here's the new format:


    /particle <name> <x> <y> <z> <xd> <yd> <zd> <speed> [count] [mode] [player] [params ...]


    The particle name is now "blockcrack" and the id must be specified in the "params" argument. However, the calculus for the id stayed the same: (id+(data*4096)). Some examples:


    Spruce wood plank:

    /particle blockcrack ~ ~1 ~ 0.5 0.5 0.5 1 10 force @a 4101

    Birch wood log:

    /particle blockcrack ~ ~1 ~ 0.5 0.5 0.5 1 10 force @a 8209

    Some helpful links:

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Help me

    Name and Lore should be part of the 'display' tag, and almost half the parsing is missing.

    /scoreboard players add @a FireShield 1 {SelectedItem:{id:"minecraft:shield",tag:{display:{Name:"BlazingShield",Lore:["Hot as fire!"]}}}}
    Posted in: Redstone Discussion and Mechanisms
  • 0

    posted a message on Testfor - testing items on the ground

    The c argument stands for Count and is more than an equivalent of @p. I'll quote the wiki, since it's pretty well explained:


    [c=C] — Selects only the specified number of targets. Usually in order of distance from the command executor.

    When used with @p or @r, this argument defaults to 1, so using a higher number will increase the number of nearest or random targets returned. When used with @a or @e, this argument returns only the nearest targets.

    If there are multiple nearest targets, caused by them being precisely the same distance away, targets are sorted by the time they have been on the server (since their most recent join for players or their creation for other entities) with the longest times selected first. For example, if equally distant, @a[c=1] will select the player who has been on the server the longest and @e[type=Creeper,c=3] will select the three oldest creepers.

    When used with a negative value, the order of targets is reversed. For example, @p[c=-3] will return the three farthest targets, and, if all potential targets are equally far away, @e[c=-3] will select the last three targets created.
    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Testfor - testing items on the ground

    I need a bit of help with my commands. I'm trying to make animated armorstands who teleports to villagers but when theres 2 armorstand they both stop teleporting and the villagers continue to move. I'm currently playing in the newest snapshot.

    command:

    /teleport @e[type=ArmorStand,name=Walking_Armorstand] @e[type=Villager]




    This command should work when there's armorstands, but not when there's more than one villager. If you'd like every armorstand to follow their attributed villager, this command should be good:

    execute @e[type=ArmorStand,name=Walking_Armorstand] ~ ~ ~ tp @e[type=ArmorStand,name=Walking_Armorstand,c=1] @e[type=Villager,c=1]




    Hey

    how can i test for an item that is a custom head on the ground?




    Here are the tags:

    {Item:{id:"minecraft:skull",Damage:3s,tag:{SkullOwner:...}}}


    Fill the SkullOwner part with either the name of the player or the tags used in the give command:

    {SkullOwner:{Id:"...",Properties:{textures:[{Value:"..."}]}}}
    Posted in: Commands, Command Blocks and Functions
  • 2

    posted a message on Help!!!!!!!!!!

    Actually, mobs won't attack their teammates. Simply have the guardian in the same team as the players that shouldn't get attacked.

    Posted in: Redstone Discussion and Mechanisms
  • 1

    posted a message on 1.9 [Solved] Execute/Kill on Empty Hopper Minecarts

    It can be done easily and instantly, but you won't be able to place down a hopper minecart manually. Commands in order:

    scoreboard players tag @e[type=MinecartHopper] add Empty {Items:[]}
    
    kill @e[type=MinecartHopper,tag=Empty]
    Posted in: Redstone Discussion and Mechanisms
  • 1

    posted a message on Crafting within a Written Book. (Explanation + Commands)
    Quote from Nefashus»

    I changed only one thing in order to get it to work. There was a problem that the trigger "Craft"

    was not enabled for me, since it only enables itself if the score is 1 or more.

    This was the problem:

    scoreboard players enable @a[score_Craft_min=1] Craft



    I changed it to @a[Score_Craft_min=0] and everything worked fine for me.



    Did you enable the trigger once before trying it? Having the trigger enabled for a score of 0 makes it loop, which isn't ideal. I'd suggest changing the resetting score (the last command) from 0 to -1.

    Posted in: Commands, Command Blocks and Functions
  • 1

    posted a message on assistance required (solved)

    You didn't tell what the tellraw should be, so just replace 'Example Tellraw' with what you want.


    blockdata ~ ~1 ~ {Text1:"{\"text\":\"Right click this\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"/tellraw @p [\\\"\\\",{\\\"text\\\":\\\"Example Tellraw\\\",\\\"color\\\":\\\"red\\\"}]\"}}",Text2:"sign for unit",Text3:"information"}
    Posted in: Redstone Discussion and Mechanisms
  • 0

    posted a message on Vanilla NoPvP Zone

    Simply replace the last command with this one:

    scoreboard teams leave @a[m=0,team=NoPvP]
    Posted in: Redstone Discussion and Mechanisms
  • 0

    posted a message on Vanilla NoPvP Zone

    As long as:

    - the "Default" is the only team the players have to get back to

    - gamemode 2 is only set in the spawn or any place PvP should be disabled

    it's pretty simply done. The team "NoPvP" has friendlyfire off:

    scoreboard teams join NoPvP @a[m=2,team=!NoPvP]
    
    scoreboard teams join Default @a[m=0,team=NoPvP]


    If players can get into other gamemodes upon leaving the spawn, you just need to copy the last command and replace the value of the 'mode' selector to 1 and/or 3.


    A 'Default' team doesn't have to exist if it's only used for this purpose, the players could just leave the NoPvP team instead of joining another.

    Posted in: Redstone Discussion and Mechanisms
  • 1

    posted a message on Crafting within a Written Book. (Explanation + Commands)
    Quote from Kishigai»

    Let's say the player wants to craft a stone shovel. The book would, for example, give the player a score of 273 (the item's ID, let's be organized) in the 'Craft' objective. This score would give to the player a score of -1 in the HasCobblestone objective, thus running the above function. Same for another function testing for sticks.



    I'll keep the stone shovel example. Here's the book's command:

    /trigger Craft set 273


    Then, the clock would run those commands first:

    scoreboard players set @a[score_Craft_min=273,score_Craft=273] HasCobblestone -1
    
    scoreboard players set @a[score_Craft_min=273,score_Craft=273] HasStick -1


    It's best that all of the Craft score start by calling the "HasItem" function. Only once they are all done, the next part in the order of the clock are the previously stated functions:

    execute @a[score_HasCobblestone=-1] ~ ~ ~ stats entity @a[c=1] set AffectedItems @a[c=1] HasCobblestone
    
    execute @a[score_HasCobblestone=-1] ~ ~ ~ clear @a[c=1] minecraft:cobblestone 0 0
    
    execute @a[score_HasStick=-1] ~ ~ ~ stats entity @a[c=1] set AffectedItems @a[c=1] HasStick
    
    execute @a[score_HasStick=-1] ~ ~ ~ clear @a[c=1] minecraft:stick 0 0
    
    stats entity @a[score_Craft_min=1] clear AffectedItems


    To be more efficient with the number of command blocks, The last command should only be at the end of all the functions.

    Then, this part of the clock is the "clear and give":

    clear @a[score_Craft_min=273,score_Craft=273,score_HasCobblestone_min=1,score_HasStick_min=2] minecraft:cobblestone 0 1
    
    clear @a[score_Craft_min=273,score_Craft=273,score_HasCobblestone_min=1,score_HasStick_min=2] minecraft:stick 0 2
    
    give @a[score_Craft_min=273,score_Craft=273,score_HasCobblestone_min=1,score_HasStick_min=2] minecraft:stone_shovel

    And finally, at the very end:

    scoreboard players reset @a[score_HasCobblestone_min=0] HasCobblestone
    
    scoreboard players reset @a[score_HasStick_min=0] HasStick
    
    scoreboard players enable @a[score_Craft_min=1] Craft
    
    scoreboard players set @a[score_Craft_min=1] Craft 0


    There you have it, the full process.

    If you want to make your crafting book, it's going to take a lot of place and time.

    Posted in: Commands, Command Blocks and Functions
  • 1

    posted a message on Individual scoreboard timer

    It said the "entity UUID provided is in an invalid format", and that's normal, because it means no player fitting the selector was found. It'll work when all the arguments match, otherwise it'll simply state this error.

    Posted in: Commands, Command Blocks and Functions
  • 1

    posted a message on Individual scoreboard timer
    Quote from Kishigai»

    To use coordinates, start by setting x, y and z to a corner of the line then extend the selection using dx, dy and dz. In this example, the line goes from 0 64 0 to 10 64 1:




    Your coordinates are where the line is. If you're unsure how to use dx, dy and dz, juste give me the coordinates of 2 opposite corners of your line and I'll give you the arguments.

    Tildes (~) are used for relative positions. They are the coordinates from where the command is executed from, you don't need to change it.



    Do you need to use a timer? Did you see my second post?

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