Skip to content

Commit e5389de

Browse files
committed
checks added for baker and oleri
1 parent 8dca041 commit e5389de

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

data/miniblock_traders/functions/traders/baker.mcfunction

+8-8
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@
77
# --------------------------------------------------------------- #
88

99
# Destroy the item used to convert the villager.
10-
kill @e[type=item,nbt={Item:{tag:{tag:mt_bake}}},distance=..0.5]
10+
execute if entity @e[type=player,distance=..2] run kill @e[type=item,nbt={Item:{tag:{tag:mt_bake}}},distance=..0.5]
1111

1212
# 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
1515

1616
# 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
2222

2323
# The below command split into lines to make it easier to read. It will not run unless it is a single line.
2424
# data merge entity @s {VillagerData:{profession:butcher,level:5,type:taiga},PersistenceRequired:1,CustomName:"\"Baker\"",Offers:{Recipes:[

data/miniblock_traders/functions/traders/olericulturist.mcfunction

+8-8
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,18 @@
77
# --------------------------------------------------------------- #
88

99
# 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]
1111

1212
# 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
1515

1616
# 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
2222

2323
# The below command split into lines to make it easier to read. It will not run unless it is a single line.
2424
# data merge entity @s {VillagerData:{profession:farmer,level:5,type:swamp},PersistenceRequired:1,CustomName:"\"Olericulturist\"",Offers:{Recipes:[

0 commit comments

Comments
 (0)