From f52fea41f942414a937b9fef89f7fff9288d6e2e Mon Sep 17 00:00:00 2001 From: Ember Date: Fri, 16 Aug 2024 16:26:17 +1000 Subject: [PATCH] Fix horse_stats.sc `horse.jump_strength` was renamed to `generic.jump_strength`, however the script was still broken --- programs/survival/horse_stats.sc | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/programs/survival/horse_stats.sc b/programs/survival/horse_stats.sc index 7f5cbbc5..c20bbfbe 100644 --- a/programs/survival/horse_stats.sc +++ b/programs/survival/horse_stats.sc @@ -3,20 +3,11 @@ __command() -> ( target = query(player(), 'trace', 4.5, 'entities'); if (has({'horse', 'donkey', 'mule'}, target~'type'), - stats = map(['generic.max_health', 'generic.movement_speed', 'horse.jump_strength'], - __get_attribute(target, _)); print(format( - ' Health: ', 'd ' + str('%d', stats:0), - ' \ Speed: ', 'd ' + str('%.6f', stats:1), - ' \ Jump: ', 'd ' + str('%.5f', stats:2) + ' Health: ', 'd ' + str(query(target, 'attribute', 'generic.max_health')), + ' \ Speed: ', 'd ' + str(query(target, 'attribute', 'generic.movement_speed')), + ' \ Jump: ', 'd ' + str(query(target, 'attribute', 'generic.jump_strength')) )) ); null ); - -__get_attribute(target, attribute) -> ( - number( - run('attribute ' + target~'uuid' + ' ' + attribute + ' base get') - :1:0~'[.0-9]*$' - ) -)