Skip to content

Commit

Permalink
Fix spawn egg was given even when villagers was disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
VForiel committed Oct 10, 2023
1 parent 1e5f98f commit d60d373
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ execute as @a[team=yellow,tag=!inTutorial,tag=!TeamEliminated,tag=player.item.ca
unless entity @e[type=villager,tag=respawn_villager,tag=yellow_villager] \
run tag @s add player.item.can_have_spawn_egg

execute if score #villager.enabled options matches 1 \
if score #lobby.active data matches 0 \
run tag @s remove player.item.can_have_spawn_egg

# Remove items if not supposed to have them -----------------------------------

clear @a[tag=!player.item.can_have_items] #scaffolding_rush:scaffolding
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ execute as @a[scores={listener.use.yellow_spawn_egg=1..}] run function scaffoldi
execute as @a[tag=player.item.have_egg,nbt=!{Inventory: [{id: "minecraft:squid_spawn_egg"}]},nbt=!{Inventory: [{id: "minecraft:slime_spawn_egg"}]},nbt=!{Inventory: [{id: "minecraft:mooshroom_spawn_egg"}]},nbt=!{Inventory: [{id: "minecraft:blaze_spawn_egg"}]}] run function scaffolding_rush:villager/egg/give/any

execute if score #lobby.active data matches 1 run effect give @e[type=villager,tag=respawn_villager] glowing infinite 1 true
execute if score #lobby.active data matches 1 run effect give @e[type=villager,tag=respawn_villager] resistance infinite 127 true

execute as @e[type=minecraft:villager,tag=respawn_villager] at @s positioned ~ ~1 ~ run function scaffolding_rush:villager/arrow_shield/trigger
function scaffolding_rush:villager/death/trigger

0 comments on commit d60d373

Please sign in to comment.