-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Renamed "player_received_*" events
- Loading branch information
1 parent
77da5bb
commit 9e01394
Showing
7 changed files
with
26 additions
and
27 deletions.
There are no files selected for viewing
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
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
11 changes: 11 additions & 0 deletions
11
datapack/data/oran9eutan/functions/hats/event/player_received_head_hat.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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Triggered via advancement when a players inventory contains a #hat_head. | ||
# Replaces it with a #hat_inventory. | ||
# @s: Player that made the advancement | ||
|
||
# Tag Player that they received a #hat_head | ||
tag @s add hats.tmp.received_head_hat | ||
# Fix the #hat_head in the next tick. Changing the inventory on an advancement trigger is buggy | ||
schedule function oran9eutan:hats/proxies/fix_players_stick_hats_if_necessary 1t | ||
|
||
# Reset trigger | ||
advancement revoke @s only oran9eutan:hats/event/player_received_head_hat |
9 changes: 0 additions & 9 deletions
9
datapack/data/oran9eutan/functions/hats/event/player_received_helmet_hat.mcfunction
This file was deleted.
Oops, something went wrong.
9 changes: 9 additions & 0 deletions
9
datapack/data/oran9eutan/functions/hats/event/player_received_inventory_hat.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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Triggered via advancement when a players inventory contains a #hat_inventory. | ||
# If the item is on the players head, replace it with a #hat_head. | ||
# @s: Player that made the advancement | ||
|
||
# Check if the item is on the players hat. If so, schedule to fix it | ||
execute if predicate oran9eutan:hats/entity/wears_inventory_hat run schedule function oran9eutan:hats/proxies/equip_player_with_correct_hat 1t | ||
|
||
# Reset trigger | ||
advancement revoke @s only oran9eutan:hats/event/player_received_inventory_hat |
10 changes: 0 additions & 10 deletions
10
datapack/data/oran9eutan/functions/hats/event/player_received_stick_hat.mcfunction
This file was deleted.
Oops, something went wrong.
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