Skip to content

Commit

Permalink
Let Animi wait until chunks are loaded (#880)
Browse files Browse the repository at this point in the history
Adds a check to wait until a respawning player has loaded the chunks around themselves, preventing anime items from being converted into a blank stone item.
  • Loading branch information
Bloo-dev committed Jun 12, 2023
1 parent 1978ec7 commit 75ce61b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# at world spawn
# self schduled or run from gm4_animi_shamir:item_caching/add_entry or gm4_animi_shamir:player/rejoin

# look for players that just respawned (@e only selects living entities)
execute as @e[type=player,scores={gm4_animi_deaths=1..}] at @s run function gm4_animi_shamir:player/upon_respawn
# look for players that just respawned (@e only selects living entities) and has loaded the chunks around themselves
execute as @e[type=player,scores={gm4_animi_deaths=1..}] at @s if loaded ~ ~ ~ run function gm4_animi_shamir:player/upon_respawn

# reschedule if there is a player (dead or alive) with a gm4_animi_deaths score (@a also selects dead players)
execute if entity @p[scores={gm4_animi_deaths=1..}] run schedule function gm4_animi_shamir:player/wait_for_respawn 1t

0 comments on commit 75ce61b

Please sign in to comment.