-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
5 additions
and
6 deletions.
There are no files selected for viewing
11 changes: 5 additions & 6 deletions
11
data/game/functions/managers/shulkers/place/block.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |