• 0

    posted a message on Function not found

    [Edit because I'm dumb]

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Problem with tp command.

    You have to use


    execute as SilasMikkelsen at @s run tp @s ^ ^ ^ facing entity @e[limit=1,sort=nearest,type=armor_stand]


    With this, the function run at the player's coordinates :)

    Posted in: Commands, Command Blocks and Functions
  • 1

    posted a message on Destroy all dropped items in the world

    /kill @e[type=item]

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Removing grey "When on body:" text

    For that, you can use HideFlags.


    HideFlags : Bit field determining which parts of the tooltip to hide on an item. 1 for "Enchantments", 2 for "AttributeModifiers", 4 for "Unbreakable", 8 for "CanDestroy", 16 for "CanPlaceOn", 32 for various other information (including potion effects, "StoredEnchantments", written book "generation" and "author", "Explosion", "Fireworks", and map tooltips), and 64 for "Dyed" on leather armors. For example, setting to 3 (1 + 2) would hide both "Enchantments" (1) and "AttributeModifiers" (2) tags, and setting to 127 would hide everything.


    Here, you want to HideFlags 2 :)

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Player's Head

    Here you go :


    /give @p minecraft:player_head{display:{Name:"{\"text\":\"Money Bag\",\"italic\":false}"},SkullOwner:{Id:[I;-631208920,-501202084,-1771491357,-1068018600],Properties:{textures:[{Value:"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZTM2ZTk0ZjZjMzRhMzU0NjVmY2U0YTkwZjJlMjU5NzYzODllYjk3MDlhMTIyNzM1NzRmZjcwZmQ0ZGFhNjg1MiJ9fX0="}]}}} 1
    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Skeleton vs mobs

    Hello, the only way I found to make this is to replace the shot zombie by another one when he is touched by an arrow fired by a skeleton.


    I've done it for zombie and it works well. The only problem is I just transfer the zombie's health, and if you want to transfer Potion effect or other nbt, you will have to add more lines to the code^^


    And if you want it to work for every mob, you have to create a file for every mob too. (I made a datapack, don't know if this is possible in command blocks)




    If someone want it, feel free to ask. (There are some changes to make if you want to use it, so if you want to use it tell me, I will work on it more)

    Posted in: Commands, Command Blocks and Functions
  • 1

    posted a message on execute if holding..

    You have a miscomprehension of how selector works.

    Here you want to do the command for each player if they hold the item, so you will use @a and directly put in this @a the condition of holding, and to run the command where the player stand, you have to use "at @a", like this :


    execute at @a[nbt={SelectedItem:{id:"minecraft:ender_eye"}}] run fill ~-10 ~10 ~10 ~10 ~-10 ~-10 glass replace barrier
    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Execute command to detect banners?

    There is a way :


    1) create a scoreboard which count when a player put a banner :


    scoreboard objectives add banner_used minecraft.used:minecraft.white_banner

    2) Create a function that will be called when this scoreboard is up to 1 to summon an area effect cloud where the player put his banner :


    tick.mcfunction :


    execute as @a[scores:{banner_used:1}] at @s anchored eyes run function datapack:block_look


    block_look :


    execute if block ~ ~ ~ #datapack:air if entity @s[distance=..5] positioned ^ ^ ^.05 run function datapack:block_look
    execute if block ~ ~ ~ white_banner run function datapack:banner
    execute unless block ~ ~ ~ white_banner run tellraw @s "pose failed, please replace it."




    banner.mcfunction :


    summon area_effect_cloud ~ ~ ~ {Duration:2147483647,Tags:["banner"]}


    And you have to create a block tag in your datapack called air.json with that :


    {
      "replace": false,
      "values": [
    	"minecraft:cave_air",
    	"minecraft:void_air",
    	"minecraft:air"
    	
      ]
    }


    And now when a player put a banner on the ground, it will spawn an area effect cloud you can called with execute.

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Replacing an item with the same item but with enchantments\other.

    I think I understand what you want. It was a little complicated, but I get it !


    All you have to do is to put a tag on the given netherite helmet.


    In your loop function, you will put this :


    execute as @a[nbt={Inventory:[{id:"minecraft:netherite_helmet"}]},nbt=!{Inventory:[{tag:{special_helmet:1}}]}] run function datapack:change_helmet

    and for the change_helmet.mcfunction :


    clear @s minecraft:netherite_helmet 1
    
    give @s netherite_helmet{special_helmet:1,display:{Name:"\"Easymode\"",Lore:["\"When you suck sooo much you use this!\""]},Enchantments:[{id:protection,lvl:4},{id:respiration,lvl:3},{id:aqua_affinity,lvl:1},{id:thorns,lvl:1},{id:unbreaking,lvl:3},{id:mending,lvl:1}]} 1

    With that, if a player have already a special helmet, it will not give him another one, and if he hasn't, it will give him one and delete a normal helmet.

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on RAIN WITH NO LIGHTNING. *EVER*!

    You can use the execute command where you can put a predicate, but you have to create a datapack to put a predicate.


    To create a datapack with your predicate and the command to have rain instead of thunder, you have to create a folder in the datapacks folder of your world and put this :


    \No_Thunder
          pack.mcmeta
          \data
                \no_thunder
                      \functions
                            tick.mcfunction
                      \predicates
                            is_thunder.json
                 \minecraft
                       \tags
                              \functions
                                    tick.json


    If there's a "\" it's a folder, if not, it's a text file.


    and now, what you have to put in your text files :


    pack.mcmeta :


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


    tick.mcfunction :


    execute if predicate no_thunder:is_thunder run weather rain


    is_thunder.json :


    {
      "condition": "minecraft:weather_check",
      "thundering": true
    }


    tick.json :


    {
    "values": [
    "no_thunder:tick"
    ]
    }

    If you have questions, feel free to ask :)

    Posted in: Redstone Discussion and Mechanisms
  • 0

    posted a message on Detect When A Redstone Lamp Turn On

    You can use the execute command like this :


    /execute if block x y z minecraft:redstone_lamp[lit=true] run [command]
    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Need help with this command! Unbalanced square brackets Minecraft 1.8.9 Java Edition PC

    You have to add " before and after the id of the item.


    /testforblock -1418 4 -633 chest 3 {Items:[{id:"minecraft:diamond_sword"},{id:"minecraft:iron_sword"},{id:"minecraft:stone_sword"},{id:"minecraft:wooden_sword"},{id:"minecraft:golden_sword"},{id:"minecraft:diamond_pickaxe"},{id:"minecraft:iron_pickaxe"},{id:"minecraft:stone_pickaxe"},{id:"minecraft:wooden_pickaxe"},{id:"minecraft:golden_pickaxe"},{id:"minecraft:diamond_axe"},{id:"minecraft:iron_axe"},{id:"minecraft:stone_axe"},{id:"minecraft:wooden_axe"},{id:"minecraft:golden_axe"},{id:"minecraft:bow"},{id:"minecraft:arrow"},{id:"minecraft:tnt"},{id:"minecraft:enchanted_book"},{id:"minecraft:iron_ingot"},{id:"minecraft:gold_ingot"},{id:"minecraft:diamond"},{id:"minecraft:flint"},{id:"minecraft:flint_and_steel"},{id:"minecraft:fire_charge"},{id:"minecraft:lava_bucket"},{id:"minecraft:brewing_stand"},{id:"minecraft:spawn_egg"},{id:"minecraft:potion"},{id:"minecraft:golden_apple"},{id:"minecraft:diamond_block"},{id:"minecraft:iron_block"},{id:"minecraft:lapis_block"},{id:"minecraft:gold_block"},{id:"minecraft:enchanting_table"},{id:"minecraft:noteblock"}]}


    And you forgot one bracket at minecraft:potion.

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on [1.16.3 Updated] UHC Full Game in Vanilla MC, with a single command.

    Hey, why don't you make a datapack for that, it will be simplier to install it.

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Accept or Refuse Voting System

    Hey!


    Yeah of you want I can come and setup this while explaining it to you, it will be more easy. Just mp me the server ip in private message, and when you can be on it :)

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Need help with /execute

    Hello.


    You have an option on the command block "conditional" and "unconditional". If you put the chain command block to conditional, it will only run if the previous command was successfull.


    You can only put this line in your first command block in repeat unconditional always active mode :


    Execute if block 119 11 93 air


    Then put a chain conditional always active command block after with what you want it to do when it detect air.

    Posted in: Redstone Discussion and Mechanisms
  • To post a comment, please or register a new account.