Power - ups in Minecraft! - Command Concept/Tutorial
HTML-код
- Опубликовано: 18 сен 2024
- Today we take a look at some Minecraft commands! Using just 5 commands, you can create a pretty neat power-up system. Useful for minigames, or any other adventure map!
1st command: [Always active, repeating] :
/tag @a[nbt={Inventory:[{id:"minecraft:potion",tag:{Potion:"minecraft:healing"}}]},] add HealingBuff
2nd command: [Chain, unconditional, always active] :
/execute at @a[tag=HealingBuff] run effect give @a[tag=HealingBuff] minecraft:regeneration 4 3
3rd command: [Chain, unconditional, always active] :
clear @a[tag=HealingBuff] minecraft:potion
4th command: [Chain, unconditional, always active] :
tag @a remove HealingBuff
5th command: [Chain, conditional, always active] :
execute at @a run playsound minecraft:block.brewing_stand.brew master @a ~ ~ ~ 9999
Particle command: [Always active, repeating]*
execute at @e[type=item] run particle minecraft:end_rod ~ ~ ~ 0.2 0.2 0.2 0.01 1
*note: this will add particles to all items
Music by Kevin Macleod.
Twitter : @ntader_
Instagram : @ntaderbuilds
Could you possibly tell us your upload schedule? I really want to know when I’ll be able to watch some top quality videos!
s.teoh Tuesdays and Saturdays:)
This is Amazing! but I’m on bedrock so most of these probably won’t work sadly
ShockingRed :(
Wow, really cool idea!
new music gang
Good one
is there any commands to make dropped items not despawn or something?
/summon minecraft:item ~ ~ ~ {Age:-32768,Item:{id:"minecraft:diamond",Count:1b}}
on top of ntader's solution, you could use /data merge entity @e[type=minecraft:item,limit=1] {PersistenceRequired:1}
Is it possible to make the power up to spawn again after a few seconds of being used or picked up?
If you want the particles to only display on potions use this command /execute as @e[type=item,nbt={Item:{id:"minecraft:potion",Count:1b}}] run particle minecraft:end_rod ~ ~ ~ 0.2 0.2 0.2 0.01 1
Yes AND no. The format is right but it's not AS but AT.
By using AS, you're telling the command when there's an item entity, the particles will still show up at the command block coordinates
By using AT, you're telling the command to show up particles AT the item entity, in this case, the potion.
The correct command would be this one:
/execute at @e[type=item,nbt={Item:{id:"minecraft:potion",Count:1b}}] run particle minecraft:end_rod ~ ~ ~ 0.2 0.2 0.2 0.01 1
Is there any way to make a randomized generator to make these powerups spawn at random spots on a map?
Yes! You can make an invisible armor stand, and then use /spreadplayers to randomly teleport it around. From there, you can use a "execute as @e[type=armorstand] run summon item (item/potion)" command to summon the potion where the armor stand is. If you want more detailed commands lmk!
@@ntader Thank you!
@@ntader I'm trying to do this "/execute at @e[type=minecraft:armor_stand] run summon minecraft:item ~ ~ ~ {Item:{id:"minecraft:potion{Potion:healing}",Count:1b}}". But it's not working?!
@@timtime1455 Try this: /execute at @e[type=armor_stand] run summon minecraft:item ~ ~ ~ {Item:{id:"minecraft:potion",Count:1b,tag:{Potion:"minecraft:healing"}}}
how do i switch the item cuz i want to make a book instead of a potion?
Change the first command to:
/tag @a[nbt={Inventory:[{id:"minecraft:book"}]},] add HealingBuff
@@ntader thanks
@@dwayne6704 No problem!