That worked! Thank You!!!
- Infernal_Device
- Registered Member
-
Member for 2 years, 1 month, and 4 days
Last active Wed, Mar, 19 2025 22:00:55
- 37 Followers
- 104 Total Posts
- 19 Thanks
-
1
Psychanovich posted a message on Minecraft wont reconize my mcfunctions filesPosted in: Commands, Command Blocks and Functions -
1
TechnoBro03_ posted a message on check item in chest by namePosted in: Commands, Command Blocks and FunctionsHello,
It depends on how the name of the book is formatted. Use '/data get entity @s SelectedItem' when holding the book in question and look at how to name is formatted. If you use a command like this to give the book:
/give @s book{Custom:1,display:{Name:'"Waffles"'}}
Use the following command to test for a specific name:
/execute if block ~ ~ ~ chest{Items:[{id:"minecraft:book",tag:{display:{Name:'"Waffles"'}}}]}
Use the following command to test for a specific tag (this is the better way to do this, since the name may be formatted weirdly)
/execute if block ~ ~ ~ chest{Items:[{id:"minecraft:book",tag:{Custom:1}}]}
-
2
TechnoBro03_ posted a message on Spawning entities/blocks in between random coordinates?Posted in: Commands, Command Blocks and FunctionsHello,
There is a pretty easy way to do this. It might look something like this:
# Set up storage /data modify storage minecraft:pos coordinates set value [0,-39,0] # Randomly get coordinates /execute store result storage minecraft:pos coordinates[0] int 1 run random roll -80..-55 /execute store result storage minecraft:pos coordinates[2] int 1 run random roll -2..23 # Move minecart /execute store result entity @e[type=tnt_minecart] Pos[0] double 1 run data get storage minecraft:pos coordinates[0] /execute store result entity @e[type=tnt_minecart] Pos[1] double 1 run data get storage minecraft:pos coordinates[1] /execute store result entity @e[type=tnt_minecart] Pos[2] double 1 run data get storage minecraft:pos coordinates[2] # Because of the way data storage works, this is the simpliest solution while using only command blocks, if you are using a datapack, you can just run a /tp command with a macro.
Then just do that for every new minecard spawned, it might be helpful to add a tag so you only teleport the new minecarts.
Hope this helps!
-
1
Valvoga posted a message on Use item frame to detect an specific item with especific tagPosted in: Commands, Command Blocks and FunctionsThank you soo much man, i've burned my mind for hours trying to make something like that works.
-
1
Valvoga posted a message on Custom item detector with command blockPosted in: Commands, Command Blocks and FunctionsThank you soo much, gonna test later, but its something like that what i searching for.
-
1
FantomMC2 posted a message on Aternos Server (Spigot for Java and Bedrock) "Boss" SpawningPosted in: Commands, Command Blocks and FunctionsYeah! I just updated the previous post because I ran into some healthbar issues. I did not quite understand how they work, but I think I got it down now.
I may come back and add a couple more for coloring and styling the healthbar.
Besides that, everything is done!
Thanks again for your help. Onward to greener worlds!
-
1
FantomMC2 posted a message on Aternos Server (Spigot for Java and Bedrock) "Boss" SpawningPosted in: Commands, Command Blocks and FunctionsUpdate [Working]
So, I finally got it all working!
Boss 1
Boss 1 InitializationC01: /execute unless entity @e[tag=Boss1] run setblock 97 100 2 minecraft:redstone_block keep `[Impulse,Unconditional,Needs Redstone]` Places a redstone at the Boss 1 Initialization phase.
C02: /execute unless entity @e[tag=Boss1] run summon minecraft:pillager 104 127 9 {CustomName:Ekkinitis,NoAI:0,ArmorItems:[{Count:1,id:chainmail_boots},{Count:1,id:chainmail_leggings},{Count:1,id:chainmail_chestplate},{Count:1,id:chainmail_helmet}],HandItems:[{Count:1,id:crossbow},{Count:1,id:shield}],HandDropChances:[1.0f,1.0f],ArmorDropChances:[1.0f,1.0f,1.0f,1.0f],Tags:["Boss","Boss1","Boss1HealthBar"],Health:67,Attributes:[{Name:"generic.max_health",Base:67}]} `[Impulse,Unconditional,Needs Redstone]` Summons Ekkinitis (Boss 1).
C03: /execute as @e[tag=Boss1] run data merge entity @s {CustomName:"\"Ekkinitis\""} `[Chain,Unconditional,Always Active]` Names Boss 1 "Ekkinitis".
C04: /execute as @e[tag=Boss1HealthBar] run data modify entity @s CustomNameVisible set value 1 `[Chain,Unconditional,Always Active]` Displays Ekkinitis name above Boss 1's head.
C05: /execute unless entity @e[tag=IMC1] at @p as @e[tag=Boss1,distance=..15] run say You fool! Prepare for your demise! `[Chain,Unconditional,Always Active]` Boss 1 Ekkinitis says initial comment, unless armor stand IMC1 already exists.
C06: /execute unless entity @e[tag=IMC1] if entity @e[type=minecraft:pillager,tag=Boss1] run summon minecraft:armor_stand ~ ~ ~ {Tags:["B1C","IMC1"]} `[Repeat,Unconditional,Always Active]` Summons armor stand of tag IMC1, unless armor stand of tag IMC1 already exists.
C07: /execute if entity @e[tag=Boss1] run bossbar add boss1healthbar "Ekkinitis" `[Chain,Unconditional,Always Active]` Creates Ekkinitis health bar.
C08: /execute run scoreboard objectives add PreliminaryThriambos dummy "Preliminary Thríambos" `[Chain,Unconditional,Always Active]` Creates objective Preliminary Thríambos.
C009: /execute at @e[tag=Boss1] as @p[distance=..15] run scoreboard objectives setdisplay sidebar PreliminaryThriambos `[Chain,Unconditional,Always Active]` Displays Preliminary Thríambos score when near Ekkinitis (Boss 1).
Redstone Modification
C01: /execute unless entity @e[tag=B1T] if entity @e[tag=Boss1] run setblock 97 100 2 air `[Repeat,Unconditional,Always Active]` Replaces redstone block that starts the Boss 1 Initialization phase.
C02: /execute unless entity @e[tag=B1T] if entity @e[tag=Boss1] run setblock 106 100 2 air `[Repeat,Unconditional,Always Active]` Replaces redstone block that starts the Boss 1 Transition phase.
Barriers
C01: /execute unless entity @e[tag=B1T] run fill 96 112 2 96 133 16 minecraft:barrier keep `[Repeat,Unconditional,Always Active]` Generates and sustains western barrier at top of tower, unless armor stand of tag B1T exists.
C02: /execute unless entity @e[tag=B1T] run fill 96 112 16 111 133 16 minecraft:barrier keep `[Chain,Unconditional,Always Active]` Generates and sustains south barrier at the top of tower, unless armor stand of tag B1T exists.
C03: /execute unless entity @e[tag=B1T] run fill 111 112 16 111 133 2 minecraft:barrier keep `[Chain,Unconditional,Always Active]` Generates and sustains east barrier at the top of tower, unless armor stand of tag B1T exists.
C04: /execute unless entity @e[tag=B1T] run fill 111 112 2 96 133 2 minecraft:barrier keep `[Chain,Unconditional,Always Active]` Generates and sustains north barrier at the top of north, unless armor stand of tag B1T exists.
C05: /execute unless entity @e[tag=B1T] run fill 96 111 2 111 111 16 minecraft:grass_block keep `[Chain,Unconditional,Always Active]` Generates and sustains grass blocks below tower, unless armor stand of tag B1T exists.
C06: /execute unless entity @e[tag=B1T] run fill 96 133 2 111 133 16 minecraft:barrier keep `[Chain,Unconditional,Always Active]` Generates and sustains barrier above tower, unless armor stand of tag B1T exists.
C07: /execute if entity @e[tag=B1T] run fill 96 112 2 111 133 16 air replace minecraft:barrier `[Chain,Unconditional,Always Active]`Removes all barrier around tower after armor stand of tag B1T exists.
Ekkitinis's Defeat
C01: /execute unless entity @e[tag=Boss1] unless entity @e[tag=B1T] run summon minecraft:armor_stand 104 125 9 {Tags:["B1C","B1T"]} `[Repeat,Unconditional,Always Active]` Summons armor stand of tag B1T, unless Ekkinitis (Boss 1) does not exist and unless armor stand of tag B1T already exists.
C02: /execute as @e[tag=B1T] run data merge entity @s {CustomName:"\"Ekkinitis\""} `[Chain,Unconditional,Always Active]` Names armor stand of tag B1T "Ekkinitis".
C03: /execute unless entity @e[tag=FMC1] if entity @e[tag=B1T] at @p as @e[type=minecraft:armor_stand,tag=B1T,distance=..17] run say This is only the beginning! `[Chain,Unconditional,Always Active]` Armor stand Ekkinitis says final comment, unless armor stand FMC1 already exists.
C04: /execute unless entity @e[tag=FMC1] if entity @e[tag=B1T] run summon minecraft:armor_stand ~ ~ ~ {Tags:["B1C","FMC1"]} `[Chain,Unconditional,Always Active]` Summons armor stand of tag FMC1 if armor stand of tag B1T exists, unless armor stand of tag FMC1 already exists.
C05: /execute if entity @e[tag=B1T] run kill @e[tag=IMC1] `[Chain,Unconditional,Always Active]` Removes armor stand of tag IMC1 if armor stand of tag B1T exists.
C06: /execute if entity @e[tag=Boss1] run kill @e[tag=B1T] run kill @e[tag=B1T] `[Repeat,Unconditional,Always Active]` Removes armor stand of tag B1T if Ekkinitis (Boss 1) exists.
C07: /execute if entity @e[tag=Boss1] run kill @e[tag=FMC1] `[Chain,Unconditional,Always Active]` Removes armor stand of tag FMC1 if Ekkinitis (Boss 1) exists.
C08: /execute if entity @e[tag=B1T] run setblock 106 100 2 minecraft:redstone_block `[Chain,Unconditional,Always Active]` Places a redstone block if armor stand with tag of B1T exists.
Health
C01: /execute if entity @e[tag=Boss1] run bossbar set minecraft:boss1healthbar players @a[distance=15..] `[Repeat,Unconditional,Always Active]` Displays Ekkinitis (Boss 1)'s health to players within a distance of 15 blocks from Ekkinitis (Boss 1), if Ekkinitis (Boss 1) exists.
C02: /execute if entity @e[tag=Boss1] store result bossbar minecraft:boss1healthbar max run attribute @e[tag=Boss1,limit=1] minecraft:generic.max_health get `[Chain,Unconditional,Always Active]` Stores max health of Ekkinitis (Boss 1).
C03: /execute if entity @e[tag=Boss1] store result bossbar minecraft:boss1healthbar value run data get entity @e[tag=Boss1HealthBar,limit=1] Health `[Chain,Unconditional,Always Active]` Stores current health of Ekkinitis (Boss 1).
Transition
C01: /execute run scoreboard players add @p[x=96,y=112,z=2,dx=15,dy=21,dz=14] PreliminaryThriambos 1 `[Impulse,Unconditional,Needs Redstone]` Adds a point to the Preliminary Thríambos objective for defeating Ekkinitis (Boss 1)
C01: /execute run teleport @p[x=96,y=112,z=2,dx=15,dy=21,dz=14] 111 194 -246 `[Chain,Unconditional,Always Active]` Teleports the party within the Pillager Outpost to the tower.
Efficient Command Blocks (Button-Activated)
Boss 1
C01: /execute run kill @e[tag=Boss1] `[Impulse,Unconditional,Needs Redstone]` Kills Boss 1 (Ekkinitis).
C02: /execute run bossbar remove minecraft:boss1healthbar `[Chain,Unconditional,Always Active]` Removes Boss 1 (Ekkinitis)'s health bar.Armor Stands
C03: /execute run kill @e[type=minecraft:armor_stand,tag=B1C] `[Impulse,Unconditional,Needs Redstone]` Kills all armor stands of tag B1C (those generated for Boss 1 (Ekkinitis)).Barriers
C04: /execute run fill 97 112 2 111 132 15 air replace minecraft:barrier `[Impulse,Unconditional,Needs Redstone]` Replaces all barrier present around the Pillager Outpost with air.Score
C05: /scoreboard players reset @a[name=YOURNAMEHERE] PreliminaryThriambos
So yeah... 31 command blocks to get this working the way I wanted, but I did it! Now I can reuse this again for future bosses as players progress through the boss gauntlet thing I am trying to build. This is the preliminary boss battle. The next ones will be extremely challenging. I will have many new challenges myself in terms of command blocks and I still need to recode all of this for Spigot on my crossplay server.
I hope this helps others out. I have been grinding to get this working and faced a lot of problems, many of them were repeat issues I recreated due to trying to figure things out!
-
1
FantomMC2 posted a message on Aternos Server (Spigot for Java and Bedrock) "Boss" SpawningPosted in: Commands, Command Blocks and FunctionsWow, thanks! Your suggestions are really helpful!
I am still working on this and experimenting with different ways to show health. I plan to provide updates as I go, I am sure others are looking for similar things that I might be able to provide in one place as I continue.
So far, this is what I have:
L = Line, C = Command Block
L1C1: /execute unless entity @e[tag=Boss1] run summon minecraft:pillager 104 125 10 {NoAI:1,Tags:["Boss","Boss1"],Health:48,Attributes:[{Name:"generic.max_health",Base:48}]} [Impulse,Unconditional,Needs Redstone]
L1C2: /execute if entity @e[type=minecraft:pillager,tag=Boss1] unless entity @e[tag=IMC1] as @e[type=minecraft:pillager,tag=Boss,tag=Boss1] run say You fool! Prepare for your demise! [Chain,Unconditional,Always Active]
L1C3: /execute unless entity @e[type=minecraft:armor_stand,tag=IMC1] run summon minecraft:armor_stand ~ ~1 ~ {Tags:["B1C","IMC1","B1T","RemovePreviousTag"]} [Chain,Unconditional,Always Active]
L1C4: /execute unless entity @e[type=minecraft:armor_stand,tag=B1T] run fill 101 123 10 101 123 11 minecraft:bedrock keep [Repeat,Unconditional,Always Active]
L1C5: /execute unless entity @e[type=minecraft:armor_stand,tag=B1T] run fill 101 124 9 101 124 11 minecraft:birch_planks keep [Chain,Unconditional,Always Active]L2C1: /execute at @e[tag=Boss1HealthBar] if entity @e[tag=B1C] run setblock ~ ~ ~ minecraft:cherry_sign [Repeat,Unconditional,Always Active]
L2C2: /execute as @e[tag=Boss1HealthBar] store result score @s Boss1HealthBar run data get entity @s Health [Chain,Unconditional,Always Active]
L2C3: /execute as @e[tag=Boss1HealthBar] at @s run data modify block ~ ~ ~ Boss1HealthText set value '[{"score":{"objective":"Boss1HealthBar","name":"@e[tag=Boss1HealthBar,sort=nearest,limit=1]"}},{"text":"♥","color":"red"}][Chain,Unconditional,Always Active]
L2C4: /execute as @e[tag=Boss1HealthBar] at @s run data modify entity @s CustomName set from block ~ ~ ~ Boss1HealthText[Chain,Unconditional,Always Active]
L2C5: /execute at @e[tag=Boss1HealthBar] if block ~ ~ ~ minecraft:cherry_sign run setblock ~ ~ ~ air replace[Chain,Unconditional,Always Active]
L2C6: /execute as @e[tag=Boss1HealthBar] run data modify entity @s CustomNameVisible set value 1[Chain,Unconditional,Always Active]
L1's commands are working!
I used your method to create a health bar for the boss at first, and while it does work, I realized that it stays at the top of the screen. L2's commands were trying to create a more aesthetic health bar (which I found from a video: ), but unfortunately did not work (probably because things are different in 1.20+ and it only displays the name of the entity. I watched a bunch of other videos and tried some things, tried a datapack, but all to no avail. I would like to show the health only when near the boss (like 7 blocks). I am going to continue with yours and see if I can have it display with a command block with some conditions.
As for the teleportation, I want to tp all players within 7 blocks of the boss after it is defeated. I think I can do this by summoning something above the boss when it is defeated (or maybe with a health of 0) with a tag that checks for those near it.
I really appreciate the help so far. Cheers!
-
1
Saucy_Jack posted a message on Putting Multiple custom items in a shulker with /givePosted in: Commands, Command Blocks and FunctionsYep, I just came back to mention the solution i found!
https://www.gamergeeks.net/apps/minecraft/give-command-generator/chests-shulkers
This site lets me enter/give commands to set items as per slots in a shulker and has a beautiful visual interface
This is the command I generated after all that
It worked beautifully
/give @p black_shulker_box{BlockEntityTag:{Items:[{Slot:0,id:"minecraft:netherite_helmet",Count:1,tag:{AttributeModifiers:[{AttributeName:"generic.armor",Amount:2147483647,Slot:head,Operation:0,Name:"generic.armor",UUID:[I;-12301,1992,121355,-3984]},{AttributeName:"generic.armor_toughness",Amount:2147483647,Slot:head,Operation:1,Name:"generic.armor_toughness",UUID:[I;-12301,2092,121355,-4184]},{AttributeName:"generic.knockback_resistance",Amount:1,Slot:head,Name:"generic.knockback_resistance",UUID:[I;-12301,2192,121355,-4384]}],display:{Name:'[{"text":"Battle Armour Maximus","italic":false}]',Lore:['[{"text":"Protection IV","italic":false,"color":"gray"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"Unbreaking III","italic":false,"color":"gray"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"Thorns III","italic":false,"color":"gray"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"Respiration III","italic":false,"color":"gray"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"Aqua Affinity","italic":false,"color":"gray"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"Mending","italic":false,"color":"gray"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"When on Head:","italic":false,"color":"gray"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"+3 Armour","italic":false,"color":"blue"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"+3 Armour Toughness","italic":false,"color":"blue"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"+1 Knockback Resistance","italic":false,"color":"blue"}]']},Enchantments:[{id:"minecraft:aqua_affinity",lvl:1},{id:"minecraft:blast_protection",lvl:255},{id:"minecraft:vanishing_curse",lvl:1},{id:unbreaking,lvl:4},{id:"minecraft:fire_protection",lvl:255},{id:"minecraft:mending",lvl:1},{id:unbreaking,lvl:4},{id:"minecraft:projectile_protection",lvl:255},{id:"minecraft:protection",lvl:255},{id:"minecraft:respiration",lvl:255},{id:"minecraft:thorns",lvl:5}],HideFlags:7}},{Slot:1,id:"minecraft:netherite_chestplate",Count:1,tag:{AttributeModifiers:[{AttributeName:"generic.armor",Amount:2147483647,Slot:chest,Operation:0,Name:"generic.armor",UUID:[I;-12301,2892,121355,-5784]},{AttributeName:"generic.armor_toughness",Amount:2147483647,Slot:chest,Operation:1,Name:"generic.armor_toughness",UUID:[I;-12301,2992,121355,-5984]},{AttributeName:"generic.knockback_resistance",Amount:1,Slot:chest,Name:"generic.knockback_resistance",UUID:[I;-12301,3092,121355,-6184]}],display:{Name:'[{"text":"Battle Armour Maximus","italic":false}]',Lore:['[{"text":"Protection IV","italic":false,"color":"gray"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"Unbreaking III","italic":false,"color":"gray"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"Thorns III","italic":false,"color":"gray"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"Mending","italic":false,"color":"gray"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"When on Body:","italic":false,"color":"gray"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"+8 Armour","italic":false,"color":"blue"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"+3 Armour Toughness","italic":false,"color":"blue"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"+1 Knockback resistance","italic":false,"color":"blue"}]']},Enchantments:[{id:"minecraft:blast_protection",lvl:255},{id:"minecraft:fire_protection",lvl:255},{id:"minecraft:mending",lvl:1},{id:"minecraft:projectile_protection",lvl:255},{id:"minecraft:protection",lvl:255},{id:"minecraft:thorns",lvl:5},{id:unbreaking,lvl:4}],HideFlags:7}},{Slot:2,id:"minecraft:netherite_leggings",Count:1,tag:{AttributeModifiers:[{AttributeName:"generic.armor",Amount:2147483647,Slot:legs,Operation:0,Name:"generic.armor",UUID:[I;-12301,3792,121355,-7584]},{AttributeName:"generic.armor_toughness",Amount:2147483647,Slot:legs,Operation:1,Name:"generic.armor_toughness",UUID:[I;-12301,3892,121355,-7784]},{AttributeName:"generic.knockback_resistance",Amount:1,Slot:legs,Name:"generic.knockback_resistance",UUID:[I;-12301,3992,121355,-7984]}],display:{Name:'[{"text":"Battle Armour Maximus","italic":false}]',Lore:['[{"text":"Protection IV","italic":false,"color":"gray"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"Unbreaking III","italic":false,"color":"gray"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"Thorns III","italic":false,"color":"gray"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"Swift Sneak V","italic":false,"color":"gray"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"Mending","italic":false,"color":"gray"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"When on Legs:","italic":false,"color":"gray"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"+6 Armour","italic":false,"color":"blue"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"+3 Armour Toughness","italic":false,"color":"blue"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"+1 Knockback Resistance","italic":false,"color":"blue"}]']},Enchantments:[{id:"minecraft:blast_protection",lvl:255},{id:"minecraft:fire_protection",lvl:255},{id:"minecraft:mending",lvl:1},{id:"minecraft:projectile_protection",lvl:255},{id:"minecraft:protection",lvl:255},{id:"minecraft:swift_sneak",lvl:10},{id:"minecraft:thorns",lvl:5},{id:unbreaking,lvl:4}],HideFlags:7}},{Slot:3,id:"minecraft:netherite_boots",Count:1,tag:{AttributeModifiers:[{AttributeName:"generic.armor",Amount:2147483647,Slot:feet,Operation:0,Name:"generic.armor",UUID:[I;-12301,4692,121355,-9384]},{AttributeName:"generic.armor_toughness",Amount:2147483647,Slot:feet,Operation:1,Name:"generic.armor_toughness",UUID:[I;-12301,4792,121355,-9584]},{AttributeName:"generic.knockback_resistance",Amount:1,Slot:feet,Name:"generic.knockback_resistance",UUID:[I;-12301,4892,121355,-9784]}],display:{Name:'[{"text":"Battle Armour Maximus","italic":false}]',Lore:['[{"text":"Protection IV","italic":false,"color":"gray"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"Unbreaking III","italic":false,"color":"gray"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"Thorns III","italic":false,"color":"gray"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"Depth Strider III","italic":false,"color":"gray"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"Soul Speed III","italic":false,"color":"gray"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"Feather Falling IV","italic":false,"color":"gray"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"Mending","italic":false,"color":"gray"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"When on Feet:","italic":false,"color":"gray"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"+3 Armour","italic":false,"color":"blue"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"+3 Armour Toughness","italic":false,"color":"blue"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"+1 Knockback Resistance","italic":false,"color":"blue"}]']},Enchantments:[{id:"minecraft:blast_protection",lvl:255},{id:"minecraft:depth_strider",lvl:5},{id:"minecraft:feather_falling",lvl:10},{id:"minecraft:fire_protection",lvl:255},{id:"minecraft:mending",lvl:1},{id:unbreaking,lvl:4},{id:"minecraft:projectile_protection",lvl:255},{id:"minecraft:protection",lvl:255},{id:"minecraft:soul_speed",lvl:5},{id:"minecraft:thorns",lvl:5}],HideFlags:7}},{Slot:4,id:end_crystal,Count:64},{Slot:5,id:firework_rocket,Count:64},{Slot:6,id:firework_rocket,Count:64},{Slot:7,id:firework_rocket,Count:64},{Slot:8,id:firework_rocket,Count:64},{Slot:9,id:"minecraft:netherite_sword",Count:1,tag:{AttributeModifiers:[{AttributeName:"generic.attack_speed",Amount:2,Slot:mainhand,Name:"generic.attack_speed",UUID:[I;-12301,7092,121355,-14184]},{AttributeName:"generic.attack_damage",Amount:10,Slot:mainhand,Name:"generic.attack_damage",UUID:[I;-12301,7192,121355,-14384]}],display:{Name:'[{"text":"Name.(\\"Insert Funny Name Here\\");","italic":false}]',Lore:['[{"text":"Sharpness V","italic":false,"color":"gray"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"Sweeping Edge III","italic":false,"color":"gray"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"Fire Aspect II","italic":false,"color":"gray"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"Knockback II","italic":false,"color":"gray"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"Unbreaking III","italic":false,"color":"gray"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"Looting III","italic":false,"color":"gray"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"Mending","italic":false,"color":"gray"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"When in Main Hand:","italic":false,"color":"gray"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"11 Attack Damage","italic":false,"color":"dark_green"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"1.6 Attack Speed","italic":false,"color":"dark_green"}]']},Enchantments:[{id:"minecraft:fire_aspect",lvl:255},{id:"minecraft:knockback",lvl:3},{id:"minecraft:looting",lvl:10},{id:"minecraft:mending",lvl:1},{id:"minecraft:sharpness",lvl:10},{id:"minecraft:sweeping",lvl:255},{id:unbreaking,lvl:4}],HideFlags:7}},{Slot:10,id:"minecraft:shield",Count:1,tag:{AttributeModifiers:[{AttributeName:"generic.armor",Amount:2147483647,Slot:offhand,Operation:0,Name:"generic.armor",UUID:[I;-12301,9392,121355,-18784]},{AttributeName:"gene
ric.armor_toughness",Amount:2147483647,Slot:offhand,Operation:1,Name:"generic.armor_toughness",UUID:[I;-12301,9492,121355,-18984]}],display:{Name:'[{"text":"Just a Shield","italic":false}]',Lore:['[{"text":"Unbreaking III","italic":false,"color":"gray"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"Mending","italic":false,"color":"gray"}]']},Enchantments:[{id:"minecraft:blast_protection",lvl:255},{id:"minecraft:fire_protection",lvl:255},{id:"minecraft:mending",lvl:1},{id:"minecraft:projectile_protection",lvl:255},{id:"minecraft:protection",lvl:255},{id:"minecraft:thorns",lvl:5},{id:"minecraft:unbreaking",lvl:4}],HideFlags:7}},{Slot:11,id:bow,Count:1,tag:{display:{Name:'[{"text":"SCAR-20 Sniper","italic":false}]',Lore:['[{"text":"Power V","italic":false,"color":"gray"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"Punch II","italic":false,"color":"gray"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"Flame","italic":false,"color":"gray"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"Infinity","italic":false,"color":"gray"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"Unbreaking III","italic":false,"color":"gray"}]']},Enchantments:[{id:flame,lvl:1},{id:infinity,lvl:1},{id:looting,lvl:5},{id:mending,lvl:1},{id:unbreaking,lvl:4},{id:power,lvl:10},{id:punch,lvl:3}],HideFlags:7}},{Slot:12,id:"minecraft:elytra",Count:1,tag:{AttributeModifiers:[{AttributeName:"generic.armor",Amount:2147483647,Slot:chest,Operation:0,Name:"generic.armor",UUID:[I;-12301,8992,121355,-17984]},{AttributeName:"generic.armor",Amount:2147483647,Slot:chest,Operation:0,Name:"generic.armor",UUID:[I;-12301,9092,121355,-18184]}],display:{Name:'[{"text":"SR-71 Blackbird Wings","italic":false}]',Lore:['[{"text":"Mending","italic":false,"color":"gray"}]','[{"text":"Unbreaking III","italic":false,"color":"gray"}]']},Enchantments:[{id:"minecraft:aqua_affinity",lvl:1},{id:"minecraft:blast_protection",lvl:255},{id:"minecraft:depth_strider",lvl:5},{id:"minecraft:feather_falling",lvl:10},{id:"minecraft:fire_protection",lvl:255},{id:"minecraft:mending",lvl:1},{id:"minecraft:projectile_protection",lvl:255},{id:"minecraft:protection",lvl:255},{id:"minecraft:respiration",lvl:255},{id:"minecraft:soul_speed",lvl:5},{id:"minecraft:thorns",lvl:5},{id:"minecraft:unbreaking",lvl:4}],HideFlags:7}},{Slot:13,id:end_crystal,Count:64},{Slot:14,id:enchanted_golden_apple,Count:64},{Slot:15,id:enchanted_golden_apple,Count:64},{Slot:16,id:obsidian,Count:64},{Slot:17,id:obsidian,Count:64},{Slot:18,id:"minecraft:netherite_pickaxe",Count:1,tag:{display:{Name:'[{"text":"Fortune Pickaxe","italic":false}]',Lore:['[{"text":"Efficiency V","italic":false,"color":"gray"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"Fortune III","italic":false,"color":"gray"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"Unbreaking III","italic":false,"color":"gray"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"Mending","italic":false,"color":"gray"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"When in Main Hand:","italic":false,"color":"gray"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"6 Attack Damage","italic":false,"color":"dark_green"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"1.2 Attack Speed","italic":false,"color":"dark_green"}]']},Enchantments:[{id:"minecraft:efficiency",lvl:10},{id:"minecraft:fortune",lvl:10},{id:"minecraft:mending",lvl:1},{id:"minecraft:unbreaking",lvl:4}],HideFlags:7}},{Slot:19,id:"minecraft:netherite_pickaxe",Count:1,tag:{display:{Name:'[{"text":"Silk Touch Pickaxe","italic":false}]',Lore:['[{"text":"Efficiency V","italic":false,"color":"gray"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"Silk Touch","italic":false,"color":"gray"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"Unbreaking III","italic":false,"color":"gray"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"Mending","italic":false,"color":"gray"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"When in Main Hand:","italic":false,"color":"gray"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"6 Attack Damage","italic":false,"color":"dark_green"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"1.2 Attack Speed","italic":false,"color":"dark_green"}]']},Enchantments:[{id:"minecraft:efficiency",lvl:10},{id:"minecraft:mending",lvl:1},{id:"minecraft:silk_touch",lvl:1},{id:"minecraft:unbreaking",lvl:4}],HideFlags:7}},{Slot:20,id:"minecraft:netherite_axe",Count:1,tag:{display:{Name:'[{"text":"War Hammer! Conquerer of forests and Ruler of wood","italic":false}]',Lore:['[{"text":"Sharpness V","italic":false,"color":"gray"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"Efficiency V","italic":false,"color":"gray"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"Unbreaking III","italic":false,"color":"gray"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"Mending","italic":false,"color":"gray"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"When in Main Hand:","italic":false,"color":"gray"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"13 Attack Damage","italic":false,"color":"dark_green"},{"text":"","italic":false,"color":"dark_purple"}]','[{"text":"1 Attack Speed","italic":false,"color":"dark_green"}]']},Enchantments:[{id:"minecraft:efficiency",lvl:10},{id:"minecraft:looting",lvl:10},{id:"minecraft:mending",lvl:1},{id:"minecraft:sharpness",lvl:10},{id:"minecraft:silk_touch",lvl:1},{id:"minecraft:sweeping",lvl:255},{id:"minecraft:unbreaking",lvl:4}],HideFlags:7}},{Slot:21,id:water_bucket,Count:1},{Slot:22,id:arrow,Count:1},{Slot:23,id:golden_carrot,Count:64},{Slot:24,id:golden_carrot,Count:64},{Slot:25,id:golden_carrot,Count:64},{Slot:26,id:golden_carrot,Count:64}]},display:{Name:'[{"text":"Crystal PVP gear","italic":false}]'}} 1 -
1
VanilinVV posted a message on /tellraw, clickEvent, run_commandPosted in: Commands, Command Blocks and FunctionsOh, thank you. I didn't think it could be solved so easily with one gamerule.
- To post a comment, please login.
1
I believe that in 1.21 the folders have been renamed. Try changing the folder name from "functions" to "function".
Here is the changelog in case it helps: https://www.minecraft.net/en-us/article/minecraft-java-edition-1-21#:~:text=TAGS-,DIRECTORY RENAMES,-Some registry types
1
Which version are you in?
What item are you holding when you activate the command block?
It looks like you are trying to enchant an item that can't have the sharpness enchantment.
In 1.19.4 if I put the following command into a command block and activate it while holding a sword then it works:
1
If you are using a Datapack I'm pretty sure you could set up a custom item tag called #everything and put the id of every item that can have "the_tag:1" in there. Then use the following in game:
1
Maybe the /execute command is what you want. That is on the page I sent, but here is a direct link: https://minecraft.wiki/w/Commands/execute
andThat has
1
Tested version: Java 1.20.2:
You can give yourself the item with a custom tag:
Then you can use this to check if an item with the custom tag is in an item frame at x y z coordinates:
You will need to change xyz1 to the coordinates of the sign, and change xyz2 to under the block the door is on so the torch will power it and make it open.
1
Version 1.19
Hello, something like this may help you:
Replace the x y z with the coordinates of your chest.
If there is no Netherite Block in the first slot, the top left slot, then it will say "My block was taken!".
1
Version: Java 1.19
Hello, here are a few things that may help you.
1: You can give your boss a tag, and then only summon it if no mob with that tag already exists:
2: First set up a boss bar:
After the boss is summoned set the max value of the boss bar.
In a repeating command block update the boss bar to match your bosses health.
3: You can play a message depending on the bosses health.
The first command checks the health and is a repeating command block that needs redstone. It has a redstone block powering it.
The second command is chained to the first and gives players within 5 block of the boss 1 myObj point.
The third command is conditional and chained to the first block, it removes the redstone block so the messasge only plays once and they only get one point. This will only work if the boss has exactly 1 health though, so you may want to set up a scoreboard and check for a range, or a less than:
4:This will teleport any players within 5 blocks of the boss to 0 0 0:
Hopefully some of these help you out a bit.
1
You could start with a command generator like https://mcstacker.net/
That way you can easily add and remove things to see how the command changes. Super useful for making long commands like summoning villagers with trades. Have a look at that first and see how you get on with it.
1
Version: Java 1.19
Here's the command to create the scoreboard objective:
1
Version: Java 1.19
Does using the disableRaids gamerule work?
Maybe you could disable them, and then enable them again straight away.