I would like to be able to execute the fill command around a player holding a specific item in a certain slot (I will make 9 for all possible slots) but i'm not sure how to achieve this. Any help is appreciated.
I would like to be able to execute the fill command around a player holding a specific item in a certain slot (I will make 9 for all possible slots) but i'm not sure how to achieve this. Any help is appreciated.
You can assign a score to players based on their NBT data in the latest snapshots:
/scoreboard players set @p OBJECTIVE 1 {SelectedItemSlot:0,Inventory:[{id:minecraft:redstone_block,Slot:0b}]}
You would repeat this for each slot/item pair while changing the value of the score. The score itself will determine which slot/item pair the player has selected. You can then /fill around a player once they have that score set:
How to use objective, i want a like a sword to make a region thing or a one shot but gives you some wither as an effect for as long as you hold it.
you could add the player to a team when they are holding the sword and then use
/execute @e[team=<team name here>] ~ ~ ~ /summon AreaEffectCloud ~ ~ ~ <your custom effects not sure how to apply them to the cloud>
you could add the player to a team when they are holding the sword and then use
/execute @e[team=<team name here>] ~ ~ ~ /summon AreaEffectCloud ~ ~ ~ <your custom effects not sure how to apply them to the cloud>
It might be less intrusive to add a tag to them instead of putting them on a team.
scoreboard players tag @a add TagName {SelectedItem:{id:"minecraft:diamond_sword",tag:{display:{Name:"Cursed Sword"}}}}
And then:
/effect @a[tag=TagName] wither 1 1 true
You can assign a score to players based on their NBT data in the latest snapshots:
You would repeat this for each slot/item pair while changing the value of the score. The score itself will determine which slot/item pair the player has selected. You can then /fill around a player once they have that score set:
Minecraft-things: http://skylinerw.com
More Minecraft-things: https://sourceblock.net
Guides for command-related features (eventually moving to Source Block): https://github.com/skylinerw/guides
I primarily hang out in the /r/MinecraftCommands discord, where there's a lot of people that help with commands: https://discord.gg/QAFXFtZ
Their corresponding subreddit: https://www.reddit.com/r/MinecraftCommands/
How to use objective, i want a like a sword to make a region thing or a one shot but gives you some wither as an effect for as long as you hold it.
you could add the player to a team when they are holding the sword and then use
/execute @e[team=<team name here>] ~ ~ ~ /summon AreaEffectCloud ~ ~ ~ <your custom effects not sure how to apply them to the cloud>
It might be less intrusive to add a tag to them instead of putting them on a team.
scoreboard players tag @a add TagName {SelectedItem:{id:"minecraft:diamond_sword",tag:{display:{Name:"Cursed Sword"}}}}
And then:
/effect @a[tag=TagName] wither 1 1 true