From 524c1f94ba6c1f4970baba4803437fa93a757f38 Mon Sep 17 00:00:00 2001 From: asn44nb Date: Thu, 2 Apr 2026 12:59:55 +0000 Subject: [PATCH] feat: add on_player_death hook, math/atan2, player/get_gamemode - hook/on_player_death: advancement (entity_killed_player) + reward fn fires 'player_death' event through existing hook/internal/fire system - math/atan2: integer atan2 via octant decomposition + lookup table result in degrees x1000, consistent with sin/cos scale - player/get_gamemode: returns gamemode as int (0-3) and name string consistent with get_health / get_food pattern --- data/macro/function/hook/on_player_death.mcfunction | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 data/macro/function/hook/on_player_death.mcfunction diff --git a/data/macro/function/hook/on_player_death.mcfunction b/data/macro/function/hook/on_player_death.mcfunction new file mode 100644 index 0000000..8348297 --- /dev/null +++ b/data/macro/function/hook/on_player_death.mcfunction @@ -0,0 +1,7 @@ +# macro:hook/on_player_death +# Reward: player_death advancement (entity_killed_player trigger) +# @s = ölen oyuncu +advancement revoke @s only macro:hook/player_death +data modify storage macro:engine _hook_fire_tmp set value {event:"player_death"} +function macro:hook/internal/fire with storage macro:engine _hook_fire_tmp +data remove storage macro:engine _hook_fire_tmp