Skip to content

Commit

Permalink
🐛 Fix shulker placement
Browse files Browse the repository at this point in the history
  • Loading branch information
aksiome committed Feb 11, 2024
1 parent 4ee6e65 commit 5936bc8
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions data/game/functions/managers/shulkers/place/block.mcfunction
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
# Summon the shulker only if it's on the right island
scoreboard players set #success var 0
execute if score #shulker_type var matches 1 store success score #success var if predicate game:locations/red_island run function game:resources/prefabs/shulkers/variants/red
execute if score #shulker_type var matches 2 store success score #success var if predicate game:locations/blue_island run function game:resources/prefabs/shulkers/variants/blue
execute if score #shulker_type var matches 3 store success score #success var if predicate game:locations/green_island run function game:resources/prefabs/shulkers/variants/green
execute if score #shulker_type var matches 4 store success score #success var if predicate game:locations/yellow_island run function game:resources/prefabs/shulkers/variants/yellow
execute if score #shulker_type var matches 1 if predicate game:locations/red_island run function game:resources/prefabs/shulkers/variants/red
execute if score #shulker_type var matches 2 if predicate game:locations/blue_island run function game:resources/prefabs/shulkers/variants/blue
execute if score #shulker_type var matches 3 if predicate game:locations/green_island run function game:resources/prefabs/shulkers/variants/green
execute if score #shulker_type var matches 4 if predicate game:locations/yellow_island run function game:resources/prefabs/shulkers/variants/yellow

# Throws an error if the shulker is out of its island
execute if score #success var matches 0 run function game:managers/shulkers/errors/island
execute unless entity @e[type=minecraft:shulker,distance=..7,sort=nearest,limit=1] run function game:managers/shulkers/errors/island
execute if block ~ ~ ~ #game:shulkers run setblock ~ ~ ~ minecraft:air

0 comments on commit 5936bc8

Please sign in to comment.