How it works:
To see what's inside of each command block just point your mouse over it.
How to read?
Don't worry that's simple.
Read before the chain on the left and than the one on the right. Start from the bottom to the top following the direction that the arrow are pointing.
execute @e[name=ench] ~ ~ ~ particle enchantmenttable ~ ~1 ~ 0 0 0 1 2
This command plays some particles at the location of the armor stand previously placed.
execute @e[name=ench] ~ ~2 ~ execute @e[type=Item,r=1,tag=!NOTench] ~ ~ ~ playsound entity.zombie.attack_iron_door master @a
When the armor stand detects an item in a radius of 1 block which has not the tag "NOTench" it plays a "metallic" sound.
execute @e[name=ench] ~ ~2 ~ execute @e[type=Item,r=1,tag=!NOTench] ~ ~ ~ summon LightningBolt
When the armor stand detects an item in a radius of 1 block which has not the tag "NOTench" it summons a lighting.
execute @e[name=ench] ~ ~2 ~ entitydata @e[type=Item,tag=!NOTench,r=1] {Tags:[NOTench],Invulnerable:1,Item:{Damage:0s}}
When the armor stand detects an item in a radius of 1 block which has not the tag "NOTench" using an entitydata it does 3 things:
- It adds a tag "NOTench", so it won't be target anymore.
- It makes the item invulnerable, so it won't disappear because of the bolt.
- And it sets its damage to 0, aka it repairs it.
Command to mark an anvil:
summon ArmorStand ~ ~-2 ~ {Invisible:1,ArmorItems:[{},{},{},{id:anvil,Count:1}],DisabledSlots:2039583,NoGravity:1,CustomName:ench,Invulnerable:1}
Command to summon a damaged item:
/give @p minecraft:stone_hoe 1 100
© Cimap. All Rights Reserved
This website is not endorsed, associated or affiliated with Mojang AB.