|
7 | 7 | # --------------------------------------------------------------- #
|
8 | 8 |
|
9 | 9 | # Destroy the item used to convert the villager.
|
10 |
| -kill @e[type=item,nbt={Item:{tag:{tag:mt_carrot}}},distance=..0.5] |
| 10 | +execute if entity @e[type=player,distance=..2] run kill @e[type=item,nbt={Item:{tag:{tag:mt_carrot}}},distance=..0.5] |
11 | 11 |
|
12 | 12 | # Fun effects to give user feedback that the transformation worked.
|
13 |
| -execute at @s run particle minecraft:happy_villager ~ ~ ~ 0.3 1 0.3 100 250 |
14 |
| -playsound minecraft:entity.experience_orb.pickup ambient @a[distance=..8] ~ ~ ~ 30 |
| 13 | +execute if entity @e[type=player,distance=..2] run execute at @s run particle minecraft:happy_villager ~ ~ ~ 0.3 1 0.3 100 250 |
| 14 | +execute if entity @e[type=player,distance=..2] run playsound minecraft:entity.experience_orb.pickup ambient @a[distance=..8] ~ ~ ~ 30 |
15 | 15 |
|
16 | 16 | # Relevant Tags for utility and compatibility
|
17 |
| -tag @s add mt_trader |
18 |
| -tag @s add global.ignore |
19 |
| -tag @s add global.ignore.pos |
20 |
| -tag @s add global.ignore.gui |
21 |
| -tag @s add global.ignore.kill |
| 17 | +execute if entity @e[type=player,distance=..2] run tag @s add mt_trader |
| 18 | +execute if entity @e[type=player,distance=..2] run tag @s add global.ignore |
| 19 | +execute if entity @e[type=player,distance=..2] run tag @s add global.ignore.pos |
| 20 | +execute if entity @e[type=player,distance=..2] run tag @s add global.ignore.gui |
| 21 | +execute if entity @e[type=player,distance=..2] run tag @s add global.ignore.kill |
22 | 22 |
|
23 | 23 | # The below command split into lines to make it easier to read. It will not run unless it is a single line.
|
24 | 24 | # data merge entity @s {VillagerData:{profession:farmer,level:5,type:swamp},PersistenceRequired:1,CustomName:"\"Olericulturist\"",Offers:{Recipes:[
|
|
0 commit comments