Skip to content

Commit

Permalink
checks added for baker and oleri
Browse files Browse the repository at this point in the history
  • Loading branch information
maxheyn committed Sep 12, 2021
1 parent 8dca041 commit e5389de
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
16 changes: 8 additions & 8 deletions data/miniblock_traders/functions/traders/baker.mcfunction
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@
# --------------------------------------------------------------- #

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

# Fun effects to give user feedback that the transformation worked.
execute at @s run particle minecraft:happy_villager ~ ~ ~ 0.3 1 0.3 100 250
playsound minecraft:entity.experience_orb.pickup ambient @a[distance=..8] ~ ~ ~ 30
execute if entity @e[type=player,distance=..2] run execute at @s run particle minecraft:happy_villager ~ ~ ~ 0.3 1 0.3 100 250
execute if entity @e[type=player,distance=..2] run playsound minecraft:entity.experience_orb.pickup ambient @a[distance=..8] ~ ~ ~ 30

# Relevant Tags for utility and compatibility
tag @s add mt_trader
tag @s add global.ignore
tag @s add global.ignore.pos
tag @s add global.ignore.gui
tag @s add global.ignore.kill
execute if entity @e[type=player,distance=..2] run tag @s add mt_trader
execute if entity @e[type=player,distance=..2] run tag @s add global.ignore
execute if entity @e[type=player,distance=..2] run tag @s add global.ignore.pos
execute if entity @e[type=player,distance=..2] run tag @s add global.ignore.gui
execute if entity @e[type=player,distance=..2] run tag @s add global.ignore.kill

# The below command split into lines to make it easier to read. It will not run unless it is a single line.
# data merge entity @s {VillagerData:{profession:butcher,level:5,type:taiga},PersistenceRequired:1,CustomName:"\"Baker\"",Offers:{Recipes:[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@
# --------------------------------------------------------------- #

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

# Fun effects to give user feedback that the transformation worked.
execute at @s run particle minecraft:happy_villager ~ ~ ~ 0.3 1 0.3 100 250
playsound minecraft:entity.experience_orb.pickup ambient @a[distance=..8] ~ ~ ~ 30
execute if entity @e[type=player,distance=..2] run execute at @s run particle minecraft:happy_villager ~ ~ ~ 0.3 1 0.3 100 250
execute if entity @e[type=player,distance=..2] run playsound minecraft:entity.experience_orb.pickup ambient @a[distance=..8] ~ ~ ~ 30

# Relevant Tags for utility and compatibility
tag @s add mt_trader
tag @s add global.ignore
tag @s add global.ignore.pos
tag @s add global.ignore.gui
tag @s add global.ignore.kill
execute if entity @e[type=player,distance=..2] run tag @s add mt_trader
execute if entity @e[type=player,distance=..2] run tag @s add global.ignore
execute if entity @e[type=player,distance=..2] run tag @s add global.ignore.pos
execute if entity @e[type=player,distance=..2] run tag @s add global.ignore.gui
execute if entity @e[type=player,distance=..2] run tag @s add global.ignore.kill

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

0 comments on commit e5389de

Please sign in to comment.