• 1

    posted a message on [1.13-Pre4] Select Target by Item with Custom Name Held

    Too lazy to check other two command...

    The second one is working fine in 1.13-pre2, so I guess that's a bug in pre4?

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Help with 2 commands

    What i mean is, if you want to replace specific blocks other than just one type of block into another block at once. By followig these step, you can now just do it by only one command. Replacing it one by one is also ok, you just have to do several /fill commands instead of one.


    Also, /fill command doesnt really change that much, except majority of the block ID has changed, which means if you know how to use it before, then you should already know how to use it in 1.13.

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Help with 2 commands

    1.

    execute as @e[type=minecraft:villager_golem] at @s if score @s say matches 1..2 run summon...

    execute as @e[type=minecraft:villager_golem] at @s if entity @s[scores={say=1..2}] run summon...

    execute at @e[type=minecraft:villager_golem,scores={say=1..2}] run summon...

    There are a few more combination, but either one above should work.





    2.

    fill <x> <y> <z> <x2> <y2> <z2> minecraft:diamond_block replace minecraft:diorite


    If you want to target a list of block, then you should create a block tag json in

    saves\<yourworld>\datapacks\<datapackname>\data\<namespace>\tags\blocks

    Lets say if you create a diamond_onb.json(with the infomation below), and the namespace of your datapack is test


    {
    "replace": false,
    "values": [
    "minecraft:diamond_ore",
    "minecraft:diamond_block"
    ]
    }



    Once you enabled this datapack, do the following command will replace both diamond ores and blocks by stone.

    fill <x> <y> <z> <x2> <y2> <z2> minecraft:stone replace #test:diamond_onb

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Target selector variables (@s)

    stat.useItem.minecraft.stone_button

    Try to create a scoreboard using this criteia.


    For the command block that is placed around the button, do this

    /teleport @a[score_pressed_min=1,r=7] <x> <y> <z>

    Then reset the score.

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on [1.13] Help Creating 'Silk Spawners' with functions

    That will do...It is up to him which one to use, he could add more predicate like below...

    unless block ~ ~ ~ air positioned ~1 ~ ~ if block ~ ~ ~ air run...

    unless block ~ ~ ~ air positioned ~ ~ ~1 if block ~ ~ ~ air run...

    unless block ~ ~ ~ air positioned ~-1 ~ ~ if block ~ ~ ~ air run...

    ...

    or just teleport that spawned entity to nearest air block, before the setblock cmd.

    If he use only if block air ~ ~ ~ run, what if there isn't a air block there? Then his spawn egg would be wasted.

    Posted in: Commands, Command Blocks and Functions
  • 1

    posted a message on How can I run a command if a player is below a certain "y" level on 1.13_pre3?

    emmm...a little bit trick here if you want to run in a command block


    /execute as @a at @s if entity @s[y=0,dy=30] run say i

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on [1.13] Help Creating 'Silk Spawners' with functions

    emmm...Sorry I forgot that you need to setblock to make spawner work..



    Then you might have to change a little bit.

    Instead of giving them the spawner, give them a custom spawn egg that spawn a mob with custom nbt or tag.

    Then run sth like this,


    /execute at @e[tag=hey] run setblock ~ ~ ~ minecraft:mob_spawner{SpawnData:{id:"minecraft:armor_stand"}}

    /kill @e[tag=hey]


    The problem is it might replace the previous block when placing on buttons, torch, sign, water, carpets...

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on How can I run a command if a player is below a certain "y" level on 1.13_pre3?

    I tested it using /execute if entity @s[y=0,dy=30] run say i

    And it worked fine on 1.13_pre2 and pre3


    Then it might be other things that caused this not working.

    ex. Who is executing this command.

    check if the command that you run is also correct.

    ...

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on [1.13] Help Creating 'Silk Spawners' with functions

    Not quite right...See those two commands in #ray function?


    The first cmd check if there is a spawner in current location.

    If there is, record the data.

    If not, run the next cmd.


    Then the second cmd is just to move your current location foward if the current location is the block listed under #pass, and it will keep moving foward until either there is a solid block or out of the range of 6.


    ...emmm, I guess you are right. We don't really need the #pass here, since the range of 6 is a small distance. So you can change the second cmd in #ray from "if block ~ ~ ~ #namespace:pass" to "unless block ~ ~ ~ minecraft:mob_spawner". But keep in mind that using #pass can reduce some unnessary raycasting.

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on [1.13] Help Creating 'Silk Spawners' with functions

    datapacks\UIN\data\uin\tags\blocks\pass.json is where I would place my pass.json.

    UIN is the name of my datapacks, and uin is the namespace.

    If the namespace of your datapack is namespace, then you write function namespace:pass

    Since my namespace is uin, so I would write function uin:pass instead.



    And here is how the pass.json file would looks like. (Just a example)

    Notice that this block tag json also contain another group of block tag(flower_pots, buttons)

    {
      "replace": false,
      "values": [
        "#minecraft:buttons",
        "#minecraft:carpets",
        "#minecraft:flower_pots",
        "minecraft:air",
        "minecraft:barrier",
        "minecraft:lever",
        "minecraft:comparator",
        "minecraft:cobweb",
        "minecraft:redstone_torch",
        "minecraft:redstone_wire",
        "minecraft:repeater",
        "minecraft:sign",
        "minecraft:torch",
        "minecraft:wall_sign",
        "minecraft:water"
        ]
    }




    See also https://minecraft.gamepedia.com/Tag

    Posted in: Commands, Command Blocks and Functions
  • 1

    posted a message on [1.13] Help Creating 'Silk Spawners' with functions

    Wrote a bunch, then the website was refresh... :(


    Seems doable, but it is kind of limit (depend on how many spawn data you want to copy).

    First, you need scoreboard minecraft.broken:minecraft.mob_spawner to detemine if the player actually broke the spawner.

    Then, you need to create a block tag in your data pack which it contain a list of block that tell which block the ray should pass. (air,sign,wall_sign,lever,torch,#minecraft:water,#minecraft:buttons,etc.)


    Now, here is the main part.

    #either in a function or command block, where you need player to run repeatedly

    execute as @s at @s positioned ~ ~1.62 ~ run function namespace:ray


    #ray

    execute if entity @s[distance=..6] if block ~ ~ ~ minecraft:mob_spawner run function namespace:getspawnertype

    execute if entity @s[distance=..6] if block ~ ~ ~ #namespace:pass positioned ^ ^ ^0.1 run function namespace:ray


    #getspawnertype

    execute if block ~ ~ ~ minecraft:mob_spawner{SpawnData:{id:"minecraft:pig"}} run tag @s add spawner_pig

    execute if block ~ ~ ~ minecraft:mob_spawner{SpawnData:{id:"minecraft:cow"}} run tag @s add spawner_cow

    execute if block ~ ~ ~ minecraft:mob_spawner{SpawnData:{id:"minecraft:zombie"}} run tag @s add spawner_zombie

    execute if block ~ ~ ~ minecraft:mob_spawner{SpawnData:{id:"minecraft:spider"}} run tag @s add spawner_spider

    ...


    Once the player have a score of 1 in minecraft.broken:minecraft.mob_spawner, give them the correspond spawner, then remove the score and tag.

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on problem summoning an armor stand

    Tried the command you gave, It works fine. So the problem could be the arrow that you shoot doesn't have the score of 1 under the arrowtype scoreboard.

    Posted in: Commands, Command Blocks and Functions
  • 1

    posted a message on SOLVED [1.13] Scoreboard Min and Max for Target Selector Data?

    greenrepu=17 when the score is 17

    greenrepu=..17 17 or below

    greenrepu=17.. 17 or above

    greenrepu=0..17 between 0 and 17(inclusive)


    See Selecting targets by score

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on I need someone to convert this command to 1.13

    execute if entity @a[scores={FIRSTTIME=0..30}] run say hi

    execute if score @a FIRSTTIME matches 0..30 run say hi

    either one will do

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