• 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
  • 1

    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
  • 1

    posted a message on Change to Survival upon Death within a certain area

    Hey.


    You can just use scoreboard, like when player enter dungeon, you put scoreboard "dungeon" to 1 and you create a scoreboard that store death.

    When the death scoreboard matches 1, you check if the dungeon scoreboard matches 1. If it does, then you pass the player into survival. Don't forget to reset the two scoreboards after the death.


    Anyways if a death player always have to resurrect in survival, you don't even need the dungeon scoreboard, just use the death scoreboard.


    /scoreboard objectives add Deaths deathCount


    This line is to have a scoreboard that count the number of death a player have.

    Posted in: Commands, Command Blocks and Functions
  • 0

    posted a message on Accept or Refuse Voting System

    Hey !


    For your system, first I think it will be good if after one player throw his wool, the other wool is suppressed and the wool on ground become impossible to pick up. So we gonna start with that :


    execute as @a[nbt={Inventory:[{id:"minecraft:red_wool",tag:{choice:1}}]},nbt=!{Inventory:[{id:"minecraft:green_wool",tag:{choice:1}}]}] run clear @s
    
    execute as @a[nbt=!{Inventory:[{id:"minecraft:red_wool",tag:{choice:1}}]},nbt={Inventory:[{id:"minecraft:green_wool",tag:{choice:1}}]}] run clear @s
    
    execute as @e[type=item,nbt={tag:{choice:1}}] run data modify entity @s PickupDelay set value 32767



    Give to the players the wool with a tag like this, it will be more easy to count the number of wool on ground, as we can see next.


    So now, they can only throw one wool, then the other one is clear (if you don't want to clear all the inventory, you can only clean the other wool, I let you go search how to do this with the function clear ;)

    Now, you have to count if you have as much as wool on ground as players in the room. Here two choices. You know in advance the number of players in the room or not. I gonna do it like if you not know. (is this sentence correct ? Don't know ^^' )


    For this, you need four scoreboard : one for the nuber of wool on ground, the second for the number of players and the two last for the count of red and green wools


    scoreboard objectives add player_count dummy
    scoreboard objectives add wool_count dummy
    scoreboard objectives add red_wool dummy
    scoreboard objectives add green_wool dummy


    And know, we have to count and test if the two scores are the same :

    execute store result score @s wool_count run execute if entity @e[type=item,nbt={Item:{tag:choice:1}}]
    execute store result score @s player_count run execute if entity @a
    
    execute if score @s player_count = @s wool_count store result score @s accept run execute if entity @e[type=item,nbt={Item:{id:"minecraft:green_wool",tag:{choice:1}}}]
    execute if score @s player_count = @s wool_count store result score @s refuse run execute if entity @e[type=item,nbt={Item:{id:"minecraft:red_wool",tag:{choice:1}}}]

    I haven't tested it, so if something is wrong please tell me. I'm quite tired from my work and it's 01:00 am so forgive me :'o

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