• 1

    posted a message on Detect time with command block

    For that, you have to create a scoreboard dummy like this :


    /scoreboard objectives add time dummy


    Then you put in it the result of the /time command lik this :


    /execute store result score @s time run time query daytime


    and you have a scoreboard with the time of day, you can then test it to run a command if it's day or night.

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on elytra boost with commands?

    It's not possible to do that, I think.


    But you can do this :


     execute as @a[nbt={Inventory:[{id:"minecraft:firework_rocket",tag:{a:1,Fireworks:{}}}]}] unless entity @s[nbt={Inventory:[{id:"minecraft:firework_rocket",tag:{a:1,Fireworks:{}},Count:2b}]}] run give @s minecraft:firework_rocket{a:1,Fireworks:{}} 1
     
    kill @e[type=item,nbt={Item:{tag:{a:1,Fireworks:{}}}}] 


    In repeat command block.


    What it does : The player who have the special firework rocket with the tag a=1 will automaticaly receive another firework like this, so he have two. When he use one, it will give it another in his inventory.

    If a firework is on the ground, it disappear (because if the player have more than two, then it will give it firework until he have a stack and two^^)

    Posted in: Commands, Command Blocks and Functions
  • 1

    posted a message on How to change attributes for all entities?

    /execute as @e[type=skeleton] run attribute @s minecraft:generic.follow_range base set 30

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Execute commnand works in command block but not in datapack.

    Have you correctly set you tick function ? Your datapack has to be like this :


    \.minecraft
          \saves
                \[save name]
                      \datapacks
                            \[datapack name]
                                  pack.mcmeta
                                  \data
                                        \[datapack name]
                                              \functions
                                                    tick.mcfunction
                                        \minecraft
                                              \tags
                                                    \functions
                                                          tick.json


    pack.mcmeta :

     {
     "pack": {
     "pack_format": 5,
     "description": ""
     }
     }

    tick.json :

    {
    "values": [
    "[datapack name]:tick"
    ]
    }

    All [datapack name] has to be replaced by the name of your datapack. And in your tick.mcfunction you put the functions you want to be repeated.

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on How to spawn enemy on other enemy when score minimum 50

    You want only one silver fish is spawn? Just add a tag after you spawn it :


    /execute as @a[scores={Scotopic_Spider=50..}, tag!=summoned] at @s run summon minecraft:silverfish ~-1 ~2 ~ {Health:5f,CustomName:'{"text":"Scotopic Spider Minion","color":"gray","italic":true}',Attributes:[{Name:generic.maxHealth,Base:5},{Name:generic.attackDamage,Base:2},{Name:generic.armor,Base:15}]}
    /tag @a[scores={Scotopic_Spider=50..}, tag!=summoned] add summoned

    If you work with command block, put a chain conditional always active command block after the first.


    If you work with datapack, just put this line after the first ^^

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on How to spawn enemy on other enemy when score minimum 50

    You can fusion your "if entity" and "as entity" here, and you have to tell it to run the command at the entity position, like this :


    /execute as @a[scores={Scotopic_Spider=50..}] at @s run summon minecraft:silverfish ~-1 ~2 ~ {Health:5f,CustomName:'{"text":"Scotopic Spider Minion","color":"gray","italic":true}',Attributes:[{Name:generic.maxHealth,Base:5},{Name:generic.attackDamage,Base:2},{Name:generic.armor,Base:15}]}
    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on How do I make particles at someone while they are wearing an item?

    Yes, you can write


    /execute as @p[name=your_name,nbt={Inventory:[{Slot:102b,id:"minecraft:elytra"}]}] at @s run particle minecraft:landing_lava ^ ^1 ^-1 .01 .01 .01 .1 1 force @s
    Posted in: Commands, Command Blocks and Functions
  • 1

    posted a message on How do i combine these two commands? Playerhead + Lore/text

    Hey, I found how to do that.


    You have to create a new spider.json file in your datapack, here where :


    saves\
    
          [save name]\
    
                datapacks\
    
                     [datapack name]\
    
                           pack.mcmeta
    
                           data\
    
                               minecraft\
    
                                    loot_tables\
    
                                          entities\
    
                                               spider.json




    and in your spider.json file, write :


    {
    "type":"entity",
    "pools": [
    {
    "rolls":1,
    "entries": [
    {
    "type":"item",
    "weight":1,
    "name":"minecraft:player_head",
    "functions": [
    {
    "function":"set_count",
    "count":1
    },

    {
    "function":"set_nbt",
    "tag":"{SkullOwner:{Id:\"c570768a-c27e-4b43-a7a8-7efb72fd5ab0\",Properties:{textures:[{Value:\"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNjQxNjRlMzA3MGVkOGEyODIwYzNhMTM1YzE2NWIyNjhjYzJlOWIwN2I3MmUwZTI2Y2Y5Nzk5ZWMwNzUyNGRlIn19fQ==\"}]}}}"
    },

    {
    "function":"set_name",
    "name":[{"text":"Owl Talisman","underlined":true}]},{"function":"set_lore","lore":[[{"text":"Gives the player holding the "},{"text":"Owl Talisman ","color":"white","italic":true},{"text":"Night Vision","color":"dark_blue"}]]
    }
    ]
    }
    ]
    },

    {
    "rolls": 1,
    "entries": [
    {
    "type": "minecraft:item",
    "functions": [
    {
    "function": "minecraft:set_count",
    "count":
    {
    "min": 0.0,
    "max": 2.0,
    "type": "minecraft:uniform"
    }
    },
    {
    "function": "minecraft:looting_enchant",
    "count": {
    "min": 0.0,
    "max": 1.0
    }
    }
    ],
    "name": "minecraft:string"
    }
    ]
    },
    {
    "rolls": 1,
    "entries": [
    {
    "type": "minecraft:item",
    "functions": [
    {
    "function": "minecraft:set_count",
    "count": {
    "min": -1.0,
    "max": 1.0,
    "type": "minecraft:uniform"
    }
    },
    {
    "function": "minecraft:looting_enchant",
    "count": {
    "min": 0.0,
    "max": 1.0
    }
    }
    ],
    "name": "minecraft:spider_eye"
    }
    ],
    "conditions": [
    {
    "condition": "minecraft:killed_by_player"
    }
    ]
    }
    ]
    }
    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on How do i combine these two commands? Playerhead + Lore/text

    I haven't work with the loot_tables for now, so I can't help you here :'o

    I will search how to do it and if I find something, I 'll tell you

    Posted in: Commands, Command Blocks and Functions
  • 1

    posted a message on How do i combine these two commands? Playerhead + Lore/text

    On the /give page, you can choose an item, and give it all the option you want.


    So, you click on it, you choose "the entity executing the command" for the taret option, for item, you choose "player_head", click on the S next to "name" then you put the name on "value", you can choose color, bold, italic, etc.


    You do the same for the Lore, except you have more than 1 value to put, because for each color, italic, etc you have to put 1 more "section".

    So you click on S, you write the first thing you want, here "Gives the player holding the ", you choose the color and then you click on the + next to "Section 1 on 1" and you continue that for each part of your lore.


    And after that I just CC CV the skullOwner.

    Posted in: Commands, Command Blocks and Functions
  • 1

    posted a message on How do i combine these two commands? Playerhead + Lore/text
    [noparse]/give @p minecraft:player_head{display:{Name:'{"text":"Owl Talisman","underlined":true}',Lore:['[{"text":"Gives the player holding the ","italic":false},{"text":"Owl Talisman ","color":"white","italic":true},{"text":"Night Vision","color":"dark_blue"}]']},SkullOwner:{Id:"c570768a-c27e-4b43-a7a8-7efb72fd5ab0",Properties:{textures:[{Value:"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNjQxNjRlMzA3MGVkOGEyODIwYzNhMTM1YzE2NWIyNjhjYzJlOWIwN2I3MmUwZTI2Y2Y5Nzk5ZWMwNzUyNGRlIn19fQ=="}]}}} 1[/noparse]



    I have re-write all using this website : https://mcstacker.net


    Tell me if something is missing.

    Posted in: Commands, Command Blocks and Functions
  • 1

    posted a message on Execute if player has Specific playerhead in inventory (SOLVED)
    effect give @a[nbt={Inventory:[{id:"minecraft:player_head",tag:{SkullOwner:{Properties:{textures:[{Value:"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNjQxNjRlMzA3MGVkOGEyODIwYzNhMTM1YzE2NWIyNjhjYzJlOWIwN2I3MmUwZTI2Y2Y5Nzk5ZWMwNzUyNGRlIn19fQ=="}]}}}}]}] minecraft:absorption 1 1

    If you want only in the player hand, you can do :


    effect give @a[nbt={SelectedItem:{id:"minecraft:player_head",tag:{SkullOwner:{Properties:{textures:[{Value:"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNjQxNjRlMzA3MGVkOGEyODIwYzNhMTM1YzE2NWIyNjhjYzJlOWIwN2I3MmUwZTI2Y2Y5Nzk5ZWMwNzUyNGRlIn19fQ=="}]}}}}}] minecraft:absorption 1 1
    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on How do I make particles at someone while they are wearing an item?

    Hey, you just have to do :


    /execute as @a[nbt={Inventory:[{Slot:102b,id:"minecraft:elytra"}]}] at @s run particle minecraft:landing_lava ^ ^1 ^-1 .01 .01 .01 .1 1 force @s

    I don't know what you want exactly to the elytra to do, feel free to play with the particles options^^

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Countdown (Number round)

    Hey my friends !


    I'm here again for a new datapack.


    Have you always dreamed that you can play the number round of the Countdown game show ?


    Have you always dreamed that you HAVE to have the exact final number to win in only 60 seconds?


    Yeah, I'm just like you !


    So here the datapack !


    https://www.dropbox.com/s/pgkowxukq3tuilx/chiffres[en].zip?dl=0


    How to play :


    1) Write "/trigger countdown_start"


    2) Choose 2 numbers (you can change by re-clicking on it), then choose an operator.


    3) When you have the right number, click on him then click on "=". YOU WIN ! Bravo !


    Praise me.


    Ps : The code is too long, I will not write it here. Excuse me.

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on {Help} /give player only 1 item

    You can put another command block configured as chain conditional and always active below the first, and have a scoreboard that increase if a player is on the pressure plate. If the scoreboard is not 0 you don't give it the reward.

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