diff --git a/data/fz/functions/carpet/install.mcfunction b/data/fz/functions/carpet/install.mcfunction new file mode 100644 index 0000000..20fc61b --- /dev/null +++ b/data/fz/functions/carpet/install.mcfunction @@ -0,0 +1,5 @@ +scoreboard objectives add carpet dummy +scoreboard players reset script carpet +team add fakePlayer +team modify fakePlayer prefix [{"text":"假的 "}] +function fz:carpet/script \ No newline at end of file diff --git a/data/fz/functions/carpet/scarpettagplayer.mcfunction b/data/fz/functions/carpet/scarpettagplayer.mcfunction new file mode 100644 index 0000000..32cb2d2 --- /dev/null +++ b/data/fz/functions/carpet/scarpettagplayer.mcfunction @@ -0,0 +1,3 @@ +execute store result score tagplayer carpet run script load tagplayer +#带标签的假玩家# +execute if score tagplayer carpet matches 0 run script run global_version = 'Version: 0.0.0-dev.20200127.1201';global_tag = 'carpetBot';global_bot_state = m();__check_offline(player_name) ->(f_player = player(player_name);if (!f_player, exit('§4假人'+player_name+'未在线');'');if (!query(f_player,'has_tag',global_tag), exit('§4'+f_player+'不是假人');''));__check_online(player_name) ->(f_player = player(player_name);if (f_player,if (query(f_player,'has_tag',global_tag), exit('§4假人'+f_player+'已经在线了');'');exit('§4玩家'+f_player+'已经在线了');''));__check_pos(x) ->(x = number(x);if(x == null,exit('§4请输入正确的坐标');'');return(x));__check_tick(tick) ->(tick = round(number(tick));if(tick == null,exit('§4请输入正确的游戏刻间隔');'');if(tick < 2,print(tick);exit(str('§4整数不能小于2,却发现了%d',tick));'');return(tick));__check_dim(s_player,f_player) ->(if (s_player~'dimension' != f_player~'dimension',exit('§4不在同一维度!');''););__player_list(i,player_list) ->(one_player_list = split(' ',join('',slice(player_list,i,i+1)));if(slice(one_player_list,0,1) == l('假的'),one_player_str = join('',slice(one_player_list,1,2));'');if(slice(one_player_list,0,1) != l('假的'),one_player_str = join('',one_player_list);'');return(one_player_str));__on_statistic(player, category, stat, value) ->(if(query(player, 'has_tag', global_tag),if(stat == 'leave_game' && category == 'custom',modify(player, 'clear_tag', global_tag))));help() ->(print('--使用帮助(/script invoke):');print('/script invoke summon <玩家名>\n-生成假人');print('/script invoke kill <玩家名>\n-删除假人');print('/script invoke killall\n-删除全部假人');print('/script invoke tp <玩家名> \n-传送假人,可替换为“s”来代表你的位置');print('/script invoke tp_at_<参数> <玩家名> \n-以<假人/玩家>为坐标原点传送假人');print('/script invoke check <玩家名>\n-检查假人状态');print('/script invoke checkall\n- 检查所有假人状态');print('/script invoke look <玩家名> <仰俯> <偏航>\n-转动假人视角,可替换为“s”来代表你的视角方向');print('/script invoke look_ <玩家名>\n-让假人向<上/下/东/西/南/北>方向看');print('/script invoke turn_ <玩家名>\n-让假人向<后/左/右>方向看');print('/script invoke move_ <玩家名>\n-让假人<向前/向后/向左/向右/停止>移动');print('/script invoke _continuous <玩家名>\n-让假人持续<攻击或挖掘/丢一个物品/丢一组物品/跳跃/换手/使用物品>');print('/script invoke _interval <玩家名> <整数>\n-让假人每<整数>游戏刻<攻击/丢一个物品/丢一组物品/跳跃/换手/使用物品>一');print('/script invoke _once <玩家名>\n-让假人<攻击或挖掘/丢一个物品/丢一组物品/跳跃/换手/使用物品>一次');print('/script invoke _stop <玩家名>\n-让假人停止<攻击或挖掘/丢一个物品/丢一组物品/跳跃/换手/使用物品>,如果没有动作则和<数>_once功能一致');print('/script invoke <玩家名>\n-让假人<潜行/站立>');print('/script invoke <玩家名>\n-让假人准备<疾跑/行走>,在水中疾跑以游泳');print('/script invoke <玩家名>\n-让假人<乘坐/卸下>');print('/script invoke stop <玩家名>\n-停止假人的一切动作');print(global_version);'');summon(player_name) ->(__check_online(player_name);s_player = player();run(str('player %s spawn at %f %f %f', player_name, s_player~'x', s_player~'y', s_player~'z'));if (!(player(player_name)),exit('§4生成失败'));modify(player(player_name), 'tag', global_tag);print('已为'+player_name+'添加标签和队伍');game_tick(50);f_player = player(player_name);global_bot_state:f_player = m();'');kill(player_name) ->(__check_offline(player_name);run(str('player %s kill', player_name));game_tick(50);print('已清除'+player_name);'');killall() ->(i = 0;player_list = player('all');loop(2147483647,,,one_player_str = __player_list(i,player_list);if(one_player_str == '',break());if(query(player(one_player_str),'has_tag',global_tag),do_fake_player = 1);run(str('player %s kill', one_player_str)); i += 1);if(do_fake_player != 1,exit('§4不存在假人');'');print('已将全部假人移交§6FZ\'sDataPack§f清除标签');game_tick(50);print('已清除全部假人');'');attack_continuous(player_name) ->(__check_offline(player_name);run(str('player %s attack continuous', player_name));global_bot_state:player(player_name):'attack' = '1';'');attack_interval(player_name,tick) ->(__check_offline(player_name);tick = __check_tick(tick);run(str('player %s attack interval %d', player_name, tick));global_bot_state:player(player_name):'attack' = tick;'');attack_once(player_name) ->(__check_offline(player_name);run(str('player %s attack once', player_name));delete(global_bot_state:player(player_name):'attack');'');attack_stop(player_name) ->(__check_offline(player_name);run(str('player %s attack', player_name));delete(global_bot_state:player(player_name):'attack');'');drop_continuous(player_name) ->(__check_offline(player_name);run(str('player %s drop continuous', player_name));global_bot_state:player(player_name):'drop' = '1';'');drop_interval(player_name,tick) ->(__check_offline(player_name);tick = __check_tick(tick);run(str('player %s drop interval %d', player_name, tick));global_bot_state:player(player_name):'drop' = tick;'');drop_once(player_name) ->(__check_offline(player_name);run(str('player %s drop once', player_name));delete(global_bot_state:player(player_name):'drop');'');drop_stop(player_name) ->(__check_offline(player_name);run(str('player %s drop', player_name));delete(global_bot_state:player(player_name):'drop');'');drop_stack_continuous(player_name) ->(__check_offline(player_name);run(str('player %s dropStack continuous', player_name));global_bot_state:player(player_name):'drop_stack' = '1';'');drop_stack_interval(player_name,tick) ->(__check_offline(player_name);tick = __check_tick(tick);run(str('player %s dropStack interval %d', player_name, tick));global_bot_state:player(player_name):'drop_stack' = tick;'');drop_stack_once(player_name) ->(__check_offline(player_name);run(str('player %s dropStack once', player_name));delete(global_bot_state:player(player_name):'drop_stack');'');drop_stack_stop(player_name) ->(__check_offline(player_name);run(str('player %s dropStack', player_name));delete(global_bot_state:player(player_name):'drop_stack');'');jump_continuous(player_name) ->(__check_offline(player_name);run(str('player %s jump continuous', player_name));global_bot_state:player(player_name):'jump' = '1';'');jump_interval(player_name,tick) ->(__check_offline(player_name);tick = __check_tick(tick);run(str('player %s jump interval %d', player_name, tick));global_bot_state:player(player_name):'jump' = tick;'');jump_once(player_name) ->(__check_offline(player_name);run(str('player %s jump once', player_name));delete(global_bot_state:player(player_name):'jump');'');jump_stop(player_name) ->(__check_offline(player_name);run(str('player %s jump', player_name));delete(global_bot_state:player(player_name):'jump');'');swap_hands_continuous(player_name) ->(__check_offline(player_name);run(str('player %s swapHands continuous', player_name));global_bot_state:player(player_name):'swap_hands' = '1';'');swap_hands_interval(player_name,tick) ->(__check_offline(player_name);tick = __check_tick(tick);run(str('player %s swapHands interval %d', player_name, tick));global_bot_state:player(player_name):'swap_hands' = tick;'');swap_hands_once(player_name) ->(__check_offline(player_name);run(str('player %s swapHands once', player_name));delete(global_bot_state:player(player_name):'swap_hands');'');swap_hands_stop(player_name) ->(__check_offline(player_name);run(str('player %s swapHands', player_name));delete(global_bot_state:player(player_name):'swap_hands');'');use_continuous(player_name) ->(__check_offline(player_name);run(str('player %s use continuous', player_name));global_bot_state:player(player_name):'use' = '1';'');use_interval(player_name,tick) ->(__check_offline(player_name);tick = __check_tick(tick);run(str('player %s use interval %d', player_name, tick));global_bot_state:player(player_name):'use' = tick;'');use_once(player_name) ->(__check_offline(player_name);run(str('player %s use once', player_name));delete(global_bot_state:player(player_name):'use');'');use_stop(player_name) ->(__check_offline(player_name);run(str('player %s use', player_name));delete(global_bot_state:player(player_name):'use');'');mount(player_name) ->(__check_offline(player_name);run(str('player %s mount', player_name));'');dismount(player_name) ->(__check_offline(player_name);run(str('player %s dismount', player_name));'');sprint(player_name) ->(__check_offline(player_name);run(str('player %s sprint', player_name));'');unsprint(player_name) ->(__check_offline(player_name);run(str('player %s unsprint', player_name));'');sneak(player_name) ->(__check_offline(player_name);run(str('player %s sneak', player_name));'');unsneak(player_name) ->(__check_offline(player_name);run(str('player %s unsneak', player_name));'');turn_back(player_name) ->(__check_offline(player_name);run(str('player %s turn back', player_name));'');turn_left(player_name) ->(__check_offline(player_name);run(str('player %s turn left', player_name));'');turn_right(player_name) ->(__check_offline(player_name);run(str('player %s turn right', player_name));'');look(player_name,x,y) ->(__check_offline(player_name);s_player = player();if(x == 's',x = s_player~'yaw';);if(y == 's',y = s_player~'pitch');x = __check_pos(x);y = __check_pos(y);if(x > 180,x = x - 360);if(x < -180,x = x + 360);if(y > 90,y = y - 180);if(y < -90,y = y + 180);modify(player(player_name), 'yaw', x);modify(player(player_name), 'pitch', y);print(str('已将'+player_name+'的视角指向§a[%.1f,%.1f]',x,y));'');look_up(player_name) ->(__check_offline(player_name);run(str('player %s look up', player_name));'');look_down(player_name) ->(__check_offline(player_name);run(str('player %s look down', player_name));'');look_east(player_name) ->(__check_offline(player_name);run(str('player %s look east', player_name));'');look_north(player_name) ->(__check_offline(player_name);run(str('player %s look north', player_name));'');look_south(player_name) ->(__check_offline(player_name);run(str('player %s look south', player_name));'');look_west(player_name) ->(__check_offline(player_name);run(str('player %s look west', player_name));'');move_backward(player_name) ->(__check_offline(player_name);run(str('player %s move backward', player_name));global_bot_state:player(player_name):'move_vertical' = 'backward';'');move_forward(player_name) ->(__check_offline(player_name);run(str('player %s move forward', player_name));global_bot_state:player(player_name):'move_vertical' = 'forward';'');move_left(player_name) ->(__check_offline(player_name);run(str('player %s move left', player_name));global_bot_state:player(player_name):'move_transverse' = 'left';'');move_right(player_name) ->(__check_offline(player_name);run(str('player %s move right', player_name));global_bot_state:player(player_name):'move_transverse' = 'right';'');move_stop(player_name) ->(__check_offline(player_name);run(str('player %s move', player_name));delete(global_bot_state:player(player_name):'move');'');stop(player_name) ->(__check_offline(player_name);run(str('player %s stop', player_name));'');tp(player_name,x,y,z) ->(__check_offline(player_name);s_player = player();f_player = player(player_name);if(x == 's',__check_dim(s_player,f_player);x = s_player~'x');if(y == 's',__check_dim(s_player,f_player);y = s_player~'y');if(z == 's',__check_dim(s_player,f_player);z = s_player~'z');x = __check_pos(x);y = __check_pos(y);if(y>4096,exit('§4y值不能超过4096!');'');z = __check_pos(z);modify(f_player,'pos',x,y,z);print(str('已将'+player_name+'传送至§a[%.2f,%.2f,%.2f]',x,y,z));'');tp_at_player(player_name,x,y,z) ->(__check_offline(player_name);s_player = player();f_player = player(player_name);__check_dim(s_player,f_player);x = s_player~'x'+__check_pos(x);y = s_player~'y'+__check_pos(y);if(y>4096,exit('§4y值不能超过4096!');'');z = s_player~'z'+__check_pos(z);modify(f_player,'pos',x,y,z);print(str('已将'+player_name+'传送至§a[%.2f,%.2f,%.2f]',x,y,z));'');tp_at_bot(player_name,x,y,z) ->(__check_offline(player_name);f_player = player(player_name);x = f_player~'x'+__check_pos(x);y = f_player~'y'+__check_pos(y);if(y>4096,exit('§4y值不能超过4096!');'');z = f_player~'z'+__check_pos(z);modify(f_player,'pos',x,y,z);print(str('已将'+player_name+'传送至§a[%.2f,%.2f,%.2f]',x,y,z));'');check(player_name) ->(__check_offline(player_name);f_player = player(player_name);print('假人“'+f_player+'”:');inner_health = number(str('%d',query(f_player,'health')+0.9));if(inner_health <= 5,inner_color = '§4';);if(inner_health > 5 && inner_health <= 10,inner_color = '§c';);if(inner_health > 10 && inner_health <= 15,inner_color = '§e';);if(inner_health > 15,inner_color = '§a';);print('- 血量:'+inner_color+inner_health);if(f_player~'dimension' == 'overworld',f_dimension = '§2主世界');if(f_player~'dimension' == 'the_nether',f_dimension = '§4地狱');if(f_player~'dimension' == 'the_end',f_dimension = '§7末地');print(str('- 位于:%s§a[%.2f,%.2f,%.2f]',f_dimension,f_player~'x',f_player~'y',f_player~'z'));f_yaw = f_player~'yaw';if(f_yaw > 180,f_yaw = f_yaw - 360);if(f_yaw < -180,f_yaw = f_yaw + 360);if(f_yaw > -112.5 && f_yaw <= -67.5,f_yaw_curt = '东');if(f_yaw > -22.5 && f_yaw <= 22.5,f_yaw_curt = '南');if(f_yaw > 67.5 && f_yaw <= 112.5,f_yaw_curt = '西');if(f_yaw > 157.5 || f_yaw <= -157.5,f_yaw_curt = '北');if(f_yaw > -157.5 && f_yaw <= -112.5,f_yaw_curt = '东北');if(f_yaw > -67.5 && f_yaw <= -22.5,f_yaw_curt = '东南');if(f_yaw > 112.5 && f_yaw <= 157.5,f_yaw_curt = '西北');if(f_yaw > 22.5 && f_yaw <= 67.5,f_yaw_curt = '西南');f_pitch = f_player~'pitch';if(f_pitch > -15 && f_pitch <= 15,f_pitch_curt = '前方');if(f_pitch > 15 && f_pitch <= 75,f_pitch_curt = '斜下方');if(f_pitch > 75 && f_pitch <= 90,f_pitch_curt = '下方');if(f_pitch > -75 && f_pitch <= -15,f_pitch_curt = '斜上方');if(f_pitch >= -90 && f_pitch <= -75,f_pitch_curt = '上方');print(str('- 指向:§e%s,%s§a[%.1f,%.1f]',f_yaw_curt,f_pitch_curt,f_yaw,f_pitch));f_state = global_bot_state:f_player;inner_sneak = query(f_player,'sneaking');inner_sprint = query(f_player,'sprinting');inner_swim = query(f_player,'swimming');if(f_state == m() && inner_sneak == false && inner_sprint == false,print('- 无动作');'');if(f_state != m() || inner_sneak == true || inner_sprint == true,if(f_state:'attack' != null,if(f_state:'attack' == 1,print('- 正在疯狂输出(然并卵)或挖掘'));if(f_state:'attack' > 1,inner_sec = f_state:'attack'/20;print('- 每'+f_state:'attack'+'游戏刻('+inner_sec+'游戏秒)尝试攻击一次')));if(f_state:'drop' != null,inner_sec = f_state:'drop'/20;print('- 每'+f_state:'drop'+'游戏刻('+inner_sec+'游戏秒)扔1个物品'));if(f_state:'drop_stack' != null,inner_sec = f_state:'drop_stack'/20;print('- 每'+f_state:'drop_stack'+'游戏刻('+inner_sec+'游戏秒)扔1组物品'));if(f_state:'jump' != null,if(f_state:'jump' == 1,print('- 正在持续跳跃'));if(f_state:'jump' > 1,inner_sec = f_state:'jump'/20;print('- 每'+f_state:'jump'+'游戏刻('+inner_sec+'游戏秒)尝试跳跃一次')));if(f_state:'swap_hands' != null,inner_sec = f_state:'swap_hands'/20;print('- 每'+f_state:'swap_hands'+'游戏刻('+inner_sec+'游戏秒)交换一次左右手的物品'));if(f_state:'use' != null,if(f_state:'use' == 1,print('- 正在持续使♂用物品'));if(f_state:'use' > 1,inner_sec = f_state:'use'/20;print('- 每'+f_state:'use'+'游戏刻('+inner_sec+'游戏秒)尝试使用一次物♂品')));if(f_state:'move_vertical' != null || f_state:'move_transverse' != null,if(inner_sneak == true,if(f_state:'move_vertical' == 'forward',if(f_state:'move_transverse' == 'right',print('- 正在向右前方潜行↗'));if(f_state:'move_transverse' == 'left',print('- 正在向左前方潜行↖'));if(f_state:'move_transverse' == null,print('- 正在向前潜行↑');));if(f_state:'move_vertical' == 'backward',if(f_state:'move_transverse' == 'right',print('- 正在向右后方潜行↘'));if(f_state:'move_transverse' == 'left',print('- 正在向左后方潜行↙'));if(f_state:'move_transverse' == null,print('- 正在向后潜行↓');)));if(inner_sprint == true,if(inner_swim == true,if(f_state:'move_vertical' == 'forward',if(f_state:'move_transverse' == 'right',print('- 正在向右前方游泳↗'));if(f_state:'move_transverse' == 'left',print('- 正在向左前方游泳↖'));if(f_state:'move_transverse' == null,print('- 正在向前游泳↑');));if(f_state:'move_vertical' == 'backward',if(f_state:'move_transverse' == 'right',print('- 正在向右后方游泳↘'));if(f_state:'move_transverse' == 'left',print('- 正在向左后方游泳↙'));if(f_state:'move_transverse' == null,print('- 正在向后游泳↓');)));if(inner_swim == false,if(f_state:'move_vertical' == 'forward',if(f_state:'move_transverse' == 'right',print('- 正在向右前方疾跑↗'));if(f_state:'move_transverse' == 'left',print('- 正在向左前方疾跑↖'));if(f_state:'move_transverse' == null,print('- 正在向前疾跑↑');));if(f_state:'move_vertical' == 'backward',if(f_state:'move_transverse' == 'right',print('- 正在向右后方疾跑↘§e(没错它可以开挂)'));if(f_state:'move_transverse' == 'left',print('- 正在向左后方疾跑↙§e(没错它可以开挂)'));if(f_state:'move_transverse' == null,print('- 正在向后疾跑↓§e(没错它可以开挂)');))););if(inner_sprint == false && inner_sneak == false,if(f_state:'move_vertical' == 'forward',if(f_state:'move_transverse' == 'right',print('- 正在向右前方走↗'));if(f_state:'move_transverse' == 'left',print('- 正在向左前方走↖'));if(f_state:'move_transverse' == null,print('- 正在向前走↑');));if(f_state:'move_vertical' == 'backward',if(f_state:'move_transverse' == 'right',print('- 正在向右后方走↘'));if(f_state:'move_transverse' == 'left',print('- 正在向左后方走↙'));if(f_state:'move_transverse' == null,print('- 正在向后走↓');));));if(f_state:'move_vertical' == null && f_state:'move_transverse' == null && inner_sneak == true,print('- 正在潜行'));if(f_state:'move_vertical' == null && f_state:'move_transverse' == null && inner_sprint == true && inner_swim == false,print('- 正在原地疾跑'));if(f_state:'move_vertical' == null && f_state:'move_transverse' == null && inner_swim == true,print('- 正在原地游泳')));'');checkall() ->(i = 0;player_list = player('all');loop(2147483647,,,one_player_str = __player_list(i,player_list);if(one_player_str == '',break());if(query(player(one_player_str),'has_tag',global_tag),check(one_player_str);do_fake_player = 1);i += 1);if(do_fake_player != 1,print('§4当前无假人'));'') \ No newline at end of file diff --git a/data/fz/functions/carpet/script.mcfunction b/data/fz/functions/carpet/script.mcfunction new file mode 100644 index 0000000..35af892 --- /dev/null +++ b/data/fz/functions/carpet/script.mcfunction @@ -0,0 +1,2 @@ +execute store result score script carpet run script run null +execute if score script carpet matches 1 run function fz:carpet/scarpettagplayer \ No newline at end of file diff --git a/data/fz/functions/carpet/scriptplayer.mcfunction b/data/fz/functions/carpet/scriptplayer.mcfunction new file mode 100644 index 0000000..fbb38fc --- /dev/null +++ b/data/fz/functions/carpet/scriptplayer.mcfunction @@ -0,0 +1,9 @@ +tellraw @s [{"text":"- 查看帮助:"},{"text":"/script invoke help","color":"green","clickEvent":{"action":"suggest_command","value":"/script invoke help"},"hoverEvent":{"action":"show_text","value":"点击以写入聊天栏"}}] +tellraw @s [{"text":"- 生成假人:"},{"text":"/script invoke summon 玩家名","color":"green","clickEvent":{"action":"suggest_command","value":"/script invoke summon "},"hoverEvent":{"action":"show_text","value":"点击以写入聊天栏"}}] +tellraw @s [{"text":"- 删除假人:"},{"text":"/script invoke kill 玩家名","color":"green","clickEvent":{"action":"suggest_command","value":"/script invoke kill "},"hoverEvent":{"action":"show_text","value":"点击以写入聊天栏"}}] +tellraw @s [{"text":"- 删除全部假人:"},{"text":"/script invoke killall","color":"green","clickEvent":{"action":"suggest_command","value":"/script invoke killall"},"hoverEvent":{"action":"show_text","value":"点击以写入聊天栏"}}] +tellraw @s [{"text":"- 传送假人:"},{"text":"/script invoke tp xxx x y z","color":"green","clickEvent":{"action":"suggest_command","value":"/script invoke tp "},"hoverEvent":{"action":"show_text","value":"点击以写入聊天栏"}},{"text":",xyz可替换为\"s\"来代表你的位置","color":"white"}] +tellraw @s [{"text":"- 以玩家为原点传送假人:"},{"text":"/script invoke tp_at_player xxx x y z","color":"green","clickEvent":{"action":"suggest_command","value":"/script invoke tp_at_player "},"hoverEvent":{"action":"show_text","value":"点击以写入聊天栏"}}] +tellraw @s [{"text":"- 以假人为原点传送假人:"},{"text":"/script invoke tp_at_bot xxx x y z","color":"green","clickEvent":{"action":"suggest_command","value":"/script invoke tp_at_bot "},"hoverEvent":{"action":"show_text","value":"点击以写入聊天栏"}}] +tellraw @s [{"text":"- 查看假人信息:"},{"text":"/script invoke check xxx","color":"green","clickEvent":{"action":"suggest_command","value":"/script invoke check "},"hoverEvent":{"action":"show_text","value":"点击以写入聊天栏"}}] +tellraw @s [{"text":"- 查看全部假人信息:"},{"text":"/script invoke checkall","color":"green","clickEvent":{"action":"suggest_command","value":"/script invoke checkall"},"hoverEvent":{"action":"show_text","value":"点击以写入聊天栏"}}] \ No newline at end of file diff --git a/data/fz/functions/carpet/tagplayer.mcfunction b/data/fz/functions/carpet/tagplayer.mcfunction new file mode 100644 index 0000000..881d886 --- /dev/null +++ b/data/fz/functions/carpet/tagplayer.mcfunction @@ -0,0 +1,9 @@ +tellraw @s [{"text":"- 查看帮助:"},{"text":"/tagplayer","color":"green","clickEvent":{"action":"suggest_command","value":"/tagplayer"},"hoverEvent":{"action":"show_text","value":"点击以写入聊天栏"}}] +tellraw @s [{"text":"- 生成假人:"},{"text":"/tagplayer summon 玩家名","color":"green","clickEvent":{"action":"suggest_command","value":"/tagplayer summon "},"hoverEvent":{"action":"show_text","value":"点击以写入聊天栏"}}] +tellraw @s [{"text":"- 删除假人:"},{"text":"/tagplayer kill 玩家名","color":"green","clickEvent":{"action":"suggest_command","value":"/tagplayer kill "},"hoverEvent":{"action":"show_text","value":"点击以写入聊天栏"}}] +tellraw @s [{"text":"- 删除全部假人:"},{"text":"/tagplayer killall","color":"green","clickEvent":{"action":"suggest_command","value":"/tagplayer killall"},"hoverEvent":{"action":"show_text","value":"点击以写入聊天栏"}}] +tellraw @s [{"text":"- 传送假人:"},{"text":"/tagplayer tp xxx x y z","color":"green","clickEvent":{"action":"suggest_command","value":"/tagplayer tp "},"hoverEvent":{"action":"show_text","value":"点击以写入聊天栏"}},{"text":",xyz可替换为\"s\"来代表你的位置","color":"white"}] +tellraw @s [{"text":"- 以玩家为原点传送假人:"},{"text":"/tagplayer tp_at_player xxx x y z","color":"green","clickEvent":{"action":"suggest_command","value":"/tagplayer tp_at_player "},"hoverEvent":{"action":"show_text","value":"点击以写入聊天栏"}}] +tellraw @s [{"text":"- 以假人为原点传送假人:"},{"text":"/tagplayer tp_at_bot xxx x y z","color":"green","clickEvent":{"action":"suggest_command","value":"/tagplayer tp_at_bot "},"hoverEvent":{"action":"show_text","value":"点击以写入聊天栏"}}] +tellraw @s [{"text":"- 查看假人信息:"},{"text":"/tagplayer check xxx","color":"green","clickEvent":{"action":"suggest_command","value":"/tagplayer check "},"hoverEvent":{"action":"show_text","value":"点击以写入聊天栏"}}] +tellraw @s [{"text":"- 查看全部假人信息:"},{"text":"/tagplayer checkall","color":"green","clickEvent":{"action":"suggest_command","value":"/tagplayer checkall"},"hoverEvent":{"action":"show_text","value":"点击以写入聊天栏"}}] \ No newline at end of file diff --git a/data/fz/functions/carpet/uninstall.mcfunction b/data/fz/functions/carpet/uninstall.mcfunction new file mode 100644 index 0000000..ff9d0b6 --- /dev/null +++ b/data/fz/functions/carpet/uninstall.mcfunction @@ -0,0 +1,2 @@ +scoreboard objectives remove carpet +team remove fakePlayer \ No newline at end of file diff --git a/data/fz/functions/cleaner/cleanerbaroff.mcfunction b/data/fz/functions/cleaner/cleanerbaroff.mcfunction new file mode 100644 index 0000000..a548ea8 --- /dev/null +++ b/data/fz/functions/cleaner/cleanerbaroff.mcfunction @@ -0,0 +1,2 @@ +tag @s remove displayCleanerBossBar +tellraw @s {"text":"您已关闭扫地姬的血条栏提示"} \ No newline at end of file diff --git a/data/fz/functions/cleaner/cleanerbaron.mcfunction b/data/fz/functions/cleaner/cleanerbaron.mcfunction new file mode 100644 index 0000000..3a0bf33 --- /dev/null +++ b/data/fz/functions/cleaner/cleanerbaron.mcfunction @@ -0,0 +1,2 @@ +tag @s add displayCleanerBossBar +tellraw @s {"text":"您已开启扫地姬的血条栏提示"} \ No newline at end of file diff --git a/data/fz/functions/cleaner/cleanerchatoff.mcfunction b/data/fz/functions/cleaner/cleanerchatoff.mcfunction new file mode 100644 index 0000000..b9adba0 --- /dev/null +++ b/data/fz/functions/cleaner/cleanerchatoff.mcfunction @@ -0,0 +1,2 @@ +tag @s add noDisplayCleanerChat +tellraw @s {"text":"您已关闭扫地姬的聊天栏提示"} \ No newline at end of file diff --git a/data/fz/functions/cleaner/cleanerchaton.mcfunction b/data/fz/functions/cleaner/cleanerchaton.mcfunction new file mode 100644 index 0000000..b9334bf --- /dev/null +++ b/data/fz/functions/cleaner/cleanerchaton.mcfunction @@ -0,0 +1,2 @@ +tag @s remove noDisplayCleanerChat +tellraw @s {"text":"您已开启扫地姬的聊天栏提示"} \ No newline at end of file diff --git a/data/fz/functions/cleaner/cleaneroff.mcfunction b/data/fz/functions/cleaner/cleaneroff.mcfunction new file mode 100644 index 0000000..c3c7e23 --- /dev/null +++ b/data/fz/functions/cleaner/cleaneroff.mcfunction @@ -0,0 +1,5 @@ +execute if score cleaner cleanerBooleans matches 1 run tellraw @a [{"text":"扫地姬已关闭~","color":"green"}] +bossbar set cleaner visible false +scoreboard players set cleaner cleanerBooleans 0 +scoreboard players set cleaner setCleanTime 0 +scoreboard players set cleaner displayCleanTime 0 \ No newline at end of file diff --git a/data/fz/functions/cleaner/cleaneron.mcfunction b/data/fz/functions/cleaner/cleaneron.mcfunction new file mode 100644 index 0000000..a08693c --- /dev/null +++ b/data/fz/functions/cleaner/cleaneron.mcfunction @@ -0,0 +1,17 @@ +scoreboard players operation cleaner displayCleanTime = @s cleaner +scoreboard players operation cleaner setCleanTime = @s cleaner +scoreboard players operation cleaner setCleanTime *= 20 20 +scoreboard players operation cleaner timeCounter = cleaner setCleanTime +tellraw @a [{"selector":"@s"},{"text":"已开启扫地姬~","color":"green"},{"score":{"objective":"displayCleanTime","name":"cleaner"},"color":"dark_aqua","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"游戏秒后清理掉落物~","color":"yellow"}] +scoreboard players set cleaner cleanerBooleans 1 +execute if score cleaner setCleanTime matches 5401.. run function fz:cleaner/time/5min +execute if score cleaner setCleanTime matches 4801..5400 run function fz:cleaner/time/4min30s +execute if score cleaner setCleanTime matches 4201..4800 run function fz:cleaner/time/4min +execute if score cleaner setCleanTime matches 3601..4200 run function fz:cleaner/time/3min30s +execute if score cleaner setCleanTime matches 3001..3600 run function fz:cleaner/time/3min +execute if score cleaner setCleanTime matches 2401..3000 run function fz:cleaner/time/2min30s +execute if score cleaner setCleanTime matches 1801..2400 run function fz:cleaner/time/2min +execute if score cleaner setCleanTime matches 1201..1800 run function fz:cleaner/time/1min30s +execute if score cleaner setCleanTime matches 601..1200 run function fz:cleaner/time/60s +execute if score cleaner setCleanTime matches ..600 run function fz:cleaner/time/30s +bossbar set cleaner visible true \ No newline at end of file diff --git a/data/fz/functions/cleaner/cleanersoundoff.mcfunction b/data/fz/functions/cleaner/cleanersoundoff.mcfunction new file mode 100644 index 0000000..1d93b52 --- /dev/null +++ b/data/fz/functions/cleaner/cleanersoundoff.mcfunction @@ -0,0 +1,2 @@ +tag @s add noCleanerSound +tellraw @s {"text":"您已关闭扫地姬的声音提示"} \ No newline at end of file diff --git a/data/fz/functions/cleaner/cleanersoundon.mcfunction b/data/fz/functions/cleaner/cleanersoundon.mcfunction new file mode 100644 index 0000000..df20c7f --- /dev/null +++ b/data/fz/functions/cleaner/cleanersoundon.mcfunction @@ -0,0 +1,2 @@ +tag @s remove noCleanerSound +tellraw @s {"text":"您已开启扫地姬的声音提示"} \ No newline at end of file diff --git a/data/fz/functions/cleaner/install.mcfunction b/data/fz/functions/cleaner/install.mcfunction new file mode 100644 index 0000000..850b83d --- /dev/null +++ b/data/fz/functions/cleaner/install.mcfunction @@ -0,0 +1,10 @@ +scoreboard objectives add cleaner trigger +scoreboard objectives add cleaned dummy +scoreboard objectives add cleanerBooleans dummy +scoreboard objectives add setCleanTime dummy +scoreboard objectives add displayCleanTime dummy +scoreboard objectives add secondsCounter dummy +scoreboard objectives add cleanerMessage trigger +bossbar add cleaner 1 +bossbar set cleaner max 60 +scoreboard players set cleaner installed 1 \ No newline at end of file diff --git a/data/fz/functions/cleaner/main.mcfunction b/data/fz/functions/cleaner/main.mcfunction new file mode 100644 index 0000000..f4ad894 --- /dev/null +++ b/data/fz/functions/cleaner/main.mcfunction @@ -0,0 +1,28 @@ +scoreboard players operation cleaner secondsCounter = cleaner timeCounter +scoreboard players operation cleaner secondsCounter /= 20 20 +scoreboard players operation cleaner secondsCounter += 1 1 +bossbar set cleaner players @a[tag=displayCleanerBossBar] +bossbar set cleaner name [{"text":"扫地姬倒计时:"},{"score":{"objective":"secondsCounter","name":"cleaner"},"bold":true},{"text":"游戏秒后清理"}] +execute if score cleaner timeCounter matches ..0 run function fz:cleaner/subclean +execute if score cleaner timeCounter matches 6000 run function fz:cleaner/time/5min +execute if score cleaner timeCounter matches 6000 run tellraw @a[tag=!noDisplayCleanerChat] [{"text":"5游戏分后清理掉落物~","color":"green"}] +execute if score cleaner timeCounter matches 5400 run function fz:cleaner/time/4min30s +execute if score cleaner timeCounter matches 4800 run function fz:cleaner/time/4min +execute if score cleaner timeCounter matches 4200 run function fz:cleaner/time/3min30s +execute if score cleaner timeCounter matches 3600 run function fz:cleaner/time/3min +execute if score cleaner timeCounter matches 3600 run tellraw @a[tag=!noDisplayCleanerChat] [{"text":"3游戏分后清理掉落物~","color":"green"}] +execute if score cleaner timeCounter matches 3000 run function fz:cleaner/time/2min30s +execute if score cleaner timeCounter matches 2400 run function fz:cleaner/time/2min +execute if score cleaner timeCounter matches 2400 run tellraw @a[tag=!noDisplayCleanerChat] [{"text":"2游戏分后清理掉落物~","color":"yellow"}] +execute if score cleaner timeCounter matches 1800 run function fz:cleaner/time/1min30s +execute if score cleaner timeCounter matches 1200 run function fz:cleaner/time/60s +execute if score cleaner timeCounter matches 1200 run tellraw @a[tag=!noDisplayCleanerChat] [{"text":"60游戏秒后清理掉落物~","color":"gold"}] +execute if score cleaner timeCounter matches 600 run function fz:cleaner/time/30s +execute if score cleaner timeCounter matches 600 run tellraw @a[tag=!noDisplayCleanerChat] [{"text":"30游戏秒后清理掉落物~","color":"red"}] +execute if score cleaner timeCounter matches 200 run function fz:cleaner/time/10s +execute if score cleaner timeCounter matches 100 run function fz:cleaner/time/5s +execute if score cleaner timeCounter matches 80 run function fz:cleaner/time/4s +execute if score cleaner timeCounter matches 60 run function fz:cleaner/time/3s +execute if score cleaner timeCounter matches 40 run function fz:cleaner/time/2s +execute if score cleaner timeCounter matches 20 run function fz:cleaner/time/1s +scoreboard players remove cleaner timeCounter 1 \ No newline at end of file diff --git a/data/fz/functions/cleaner/subclean.mcfunction b/data/fz/functions/cleaner/subclean.mcfunction new file mode 100644 index 0000000..08a6914 --- /dev/null +++ b/data/fz/functions/cleaner/subclean.mcfunction @@ -0,0 +1,15 @@ +execute store result score cleaned cleaned run kill @e[type=item] +tellraw @a [{"text":"这次一共清理了","color":"dark_green","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"score":{"objective":"cleaned","name":"cleaned"},"color":"yellow","bold":true,"italic":false,"underlined":true,"strikethrough":false,"obfuscated":false},{"text":"堆物品~","color":"dark_green","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"下次清理将在","color":"yellow"},{"score":{"objective":"displayCleanTime","name":"cleaner"},"color":"dark_aqua","bold":false,"italic":false,"underlined":false,"strikethrough":false,"obfuscated":false},{"text":"游戏秒后开始~","color":"yellow"}] +scoreboard players reset cleaned cleaned +execute if score cleaner setCleanTime matches 5401.. run function fz:cleaner/time/5min +execute if score cleaner setCleanTime matches 4801..5400 run function fz:cleaner/time/4min30s +execute if score cleaner setCleanTime matches 4201..4800 run function fz:cleaner/time/4min +execute if score cleaner setCleanTime matches 3601..4200 run function fz:cleaner/time/3min30s +execute if score cleaner setCleanTime matches 3001..3600 run function fz:cleaner/time/3min +execute if score cleaner setCleanTime matches 2401..3000 run function fz:cleaner/time/2min30s +execute if score cleaner setCleanTime matches 1801..2400 run function fz:cleaner/time/2min +execute if score cleaner setCleanTime matches 1201..1800 run function fz:cleaner/time/1min30s +execute if score cleaner setCleanTime matches 601..1200 run function fz:cleaner/time/60s +execute if score cleaner setCleanTime matches ..600 run function fz:cleaner/time/30s +scoreboard players operation cleaner timeCounter = cleaner setCleanTime +execute as @a[tag=!noCleanerSound] at @s run playsound minecraft:block.note_block.pling player @s ~ ~ ~ 1 2 \ No newline at end of file diff --git a/data/fz/functions/cleaner/trigger.mcfunction b/data/fz/functions/cleaner/trigger.mcfunction new file mode 100644 index 0000000..7372921 --- /dev/null +++ b/data/fz/functions/cleaner/trigger.mcfunction @@ -0,0 +1,14 @@ +scoreboard players enable @a cleaner +scoreboard players enable @a cleanerMessage +execute as @a[scores={cleaner=..-1}] run function fz:cleaner/cleaneroff +execute as @a[scores={cleaner=1..29}] run tellraw @s [{"text":"请输入>=30的时间(单位:秒)","color":"dark_red"}] +execute as @a[scores={cleaner=30..}] run function fz:cleaner/cleaneron +execute as @a[scores={cleanerMessage=1},tag=noDisplayCleanerChat] run function fz:cleaner/cleanerchaton +execute as @a[scores={cleanerMessage=-1},tag=!noDisplayCleanerChat] run function fz:cleaner/cleanerchatoff +execute as @a[scores={cleanerMessage=2},tag=!displayCleanerBossBar] run function fz:cleaner/cleanerbaron +execute as @a[scores={cleanerMessage=-2},tag=displayCleanerBossBar] run function fz:cleaner/cleanerbaroff +execute as @a[scores={cleanerMessage=3},tag=noCleanerSound] run function fz:cleaner/cleanersoundon +execute as @a[scores={cleanerMessage=-3},tag=!noCleanerSound] run function fz:cleaner/cleanersoundoff +scoreboard players reset @a[scores={cleaner=..-1}] cleaner +scoreboard players reset @a[scores={cleaner=1..}] cleaner +execute if score cleaner cleanerBooleans matches 1 run function fz:cleaner/main \ No newline at end of file diff --git a/data/fz/functions/cleaner/uninstall.mcfunction b/data/fz/functions/cleaner/uninstall.mcfunction new file mode 100644 index 0000000..2a33f9e --- /dev/null +++ b/data/fz/functions/cleaner/uninstall.mcfunction @@ -0,0 +1,7 @@ +scoreboard objectives remove cleaner +scoreboard objectives remove cleaned +scoreboard objectives remove cleanerBooleans +scoreboard objectives remove setCleanTime +scoreboard objectives remove displayCleanTime +scoreboard objectives remove cleanerMessage +bossbar remove cleaner \ No newline at end of file diff --git a/data/fz/functions/install.mcfunction b/data/fz/functions/install.mcfunction new file mode 100644 index 0000000..6bd6125 --- /dev/null +++ b/data/fz/functions/install.mcfunction @@ -0,0 +1,41 @@ +# @Author: Harvey.Kang +# @Date: 2019-10-01 +# @License: GNU General Public License, version 3 (GPL-3.0) + +# This project is licensed under the terms of the GNU General Public License v3.0 +# Copyright (C)2019-2020 Harvey.Kang +#升级用before# +scoreboard objectives add version dummy +scoreboard players operation version version = version version +execute if score version version matches 132 run function fz:update/before/1.3.3 +execute if score version version matches 133 run function fz:update/before/1.3.3d +execute if score versionMinor version matches 4 if score versionPatch version matches 0 if score dev1 version matches ..20200118 run function fz:update/before/1.4.0-dev +execute if score versionMinor version matches 4 if score versionPatch version matches 0 if score dev1 version matches ..20200111 unless score dev2 version matches 2241.. run function fz:update/before/1.4.0-dev5 +#### +scoreboard objectives add installed dummy +gamerule disableElytraMovementCheck true +scoreboard objectives add leaveGame minecraft.custom:minecraft.leave_game +scoreboard objectives add timeCounter dummy +scoreboard objectives add 20 dummy +scoreboard objectives add 1 dummy +scoreboard players set 20 20 20 +scoreboard players set 1 1 1 +function fz:carpet/install +function fz:score/install +function fz:health/install +function fz:sleep/install +function fz:cleaner/install +function fz:logintips/install +function fz:config/install +#升级用after# +###1.4.0-dev2 +scoreboard players set versionMajor version 1 +scoreboard players set versionMinor version 4 +scoreboard players set versionPatch version 0 +scoreboard players reset dev1 version +scoreboard players reset dev2prefix version +scoreboard players reset dev2 version +#### +#预览版本号 +#tellraw @a [{"text":"[Datapack]"},{"text":" FZ'sDatapack-","color":"gold"},{"score":{"objective":"version","name":"versionMajor"},"color":"gold"},{"text":".","color":"gold"},{"score":{"objective":"version","name":"versionMinor"},"color":"gold"},{"text":".","color":"gold"},{"score":{"objective":"version","name":"versionPatch"},"color":"gold"},{"text":"-dev.","color":"gold"},{"score":{"objective":"version","name":"dev1"},"color":"gold"},{"text":".","color":"gold"},{"score":{"objective":"version","name":"dev2prefix"},"color":"gold"},{"score":{"objective":"version","name":"dev2"},"color":"gold"},{"text":" installed successfully","color":"gold"}] +tellraw @a [{"text":"[Datapack]"},{"text":" FZ'sDatapack-","color":"gold"},{"score":{"objective":"version","name":"versionMajor"},"color":"gold"},{"text":".","color":"gold"},{"score":{"objective":"version","name":"versionMinor"},"color":"gold"},{"text":".","color":"gold"},{"score":{"objective":"version","name":"versionPatch"},"color":"gold"},{"text":" installed successfully","color":"gold"}] \ No newline at end of file diff --git a/data/fz/functions/logintips/install.mcfunction b/data/fz/functions/logintips/install.mcfunction new file mode 100644 index 0000000..f21e2b8 --- /dev/null +++ b/data/fz/functions/logintips/install.mcfunction @@ -0,0 +1 @@ +scoreboard players set logintips installed 1 \ No newline at end of file diff --git a/data/fz/functions/logintips/main.mcfunction b/data/fz/functions/logintips/main.mcfunction new file mode 100644 index 0000000..8350069 --- /dev/null +++ b/data/fz/functions/logintips/main.mcfunction @@ -0,0 +1,3 @@ +execute as @a unless score @s leaveGame matches -2147483648..2147483647 run scoreboard players operation @s leaveGame = @s leaveGame +tellraw @a[scores={leaveGame=0..}] [{"text":"使用","color":"gold"},{"text":"/trigger options","underlined":true,"clickEvent":{"action":"run_command","value":"/trigger options"},"hoverEvent":{"action":"show_text","value":"点击以访问全部设置"}},{"text":"以访问帮助和全部设置"}] +scoreboard players set @a[scores={leaveGame=0..}] leaveGame -1 \ No newline at end of file diff --git a/data/fz/functions/logintips/uninstall.mcfunction b/data/fz/functions/logintips/uninstall.mcfunction new file mode 100644 index 0000000..9c43c15 --- /dev/null +++ b/data/fz/functions/logintips/uninstall.mcfunction @@ -0,0 +1 @@ +scoreboard players reset logintips installed \ No newline at end of file diff --git a/data/fz/functions/main.mcfunction b/data/fz/functions/main.mcfunction new file mode 100644 index 0000000..a2d8353 --- /dev/null +++ b/data/fz/functions/main.mcfunction @@ -0,0 +1,6 @@ +execute if score scoreboard installed matches 1 run function fz:score/main +execute if score sleep installed matches 1 run function fz:sleep/main +execute if score cleaner installed matches 1 run function fz:cleaner/trigger +execute if score logintips installed matches 1 run function fz:logintips/main +execute if score noai installed matches 1 run function fz:noai/main +execute if score config installed matches 1 run function fz:config/main \ No newline at end of file diff --git a/data/fz/functions/score/activationcarry.mcfunction b/data/fz/functions/score/activationcarry.mcfunction new file mode 100644 index 0000000..68671a6 --- /dev/null +++ b/data/fz/functions/score/activationcarry.mcfunction @@ -0,0 +1,2 @@ +scoreboard players reset @s actCounter +scoreboard players add @s activation 1 \ No newline at end of file diff --git a/data/fz/functions/score/delscores.mcfunction b/data/fz/functions/score/delscores.mcfunction new file mode 100644 index 0000000..d65d979 --- /dev/null +++ b/data/fz/functions/score/delscores.mcfunction @@ -0,0 +1,19 @@ +#移除基础记分板# +scoreboard objectives remove digCounter +scoreboard objectives remove deathCounter +scoreboard objectives remove killCounter +scoreboard objectives remove tradingCounter +scoreboard objectives remove damageTaken +scoreboard objectives remove fishingCounter +scoreboard objectives remove activation +scoreboard objectives remove actCounter +scoreboard objectives remove totalList +scoreboard objectives remove tDigC +scoreboard objectives remove tDeathC +scoreboard objectives remove tKillC +scoreboard objectives remove tFishC +scoreboard objectives remove tTradeC +scoreboard objectives remove tHurtC +#提示信息 +tellraw @a [{"text":"记分板已移除"}] +#### \ No newline at end of file diff --git a/data/fz/functions/score/runaddprefix.mcfunction b/data/fz/functions/score/runaddprefix.mcfunction new file mode 100644 index 0000000..08633b8 --- /dev/null +++ b/data/fz/functions/score/runaddprefix.mcfunction @@ -0,0 +1,2 @@ +team join fakePlayer @s +tellraw @a {"text":"↑假的"} \ No newline at end of file diff --git a/data/fz/functions/score/runbotdead.mcfunction b/data/fz/functions/score/runbotdead.mcfunction new file mode 100644 index 0000000..307ddf7 --- /dev/null +++ b/data/fz/functions/score/runbotdead.mcfunction @@ -0,0 +1,2 @@ +team leave @s +tellraw @a {"text":"↑真的"} \ No newline at end of file diff --git a/data/fz/functions/score/totalnodisplay/activation.mcfunction b/data/fz/functions/score/totalnodisplay/activation.mcfunction new file mode 100644 index 0000000..6d2d1b4 --- /dev/null +++ b/data/fz/functions/score/totalnodisplay/activation.mcfunction @@ -0,0 +1,2 @@ +scoreboard players reset 总活跃时间 activation +scoreboard players reset 总活跃时间 totalActivation \ No newline at end of file diff --git a/data/fz/functions/score/totalnodisplay/damagetaken.mcfunction b/data/fz/functions/score/totalnodisplay/damagetaken.mcfunction new file mode 100644 index 0000000..961e126 --- /dev/null +++ b/data/fz/functions/score/totalnodisplay/damagetaken.mcfunction @@ -0,0 +1,2 @@ +scoreboard players reset 总受伤害量 damageTaken +scoreboard players reset 总受伤害量 totalHurt \ No newline at end of file diff --git a/data/fz/functions/score/totalnodisplay/deathcounter.mcfunction b/data/fz/functions/score/totalnodisplay/deathcounter.mcfunction new file mode 100644 index 0000000..6291a9b --- /dev/null +++ b/data/fz/functions/score/totalnodisplay/deathcounter.mcfunction @@ -0,0 +1,2 @@ +scoreboard players reset 总死亡数 deathCounter +scoreboard players reset 总死亡数 totalDeath \ No newline at end of file diff --git a/data/fz/functions/score/totalnodisplay/digcounter.mcfunction b/data/fz/functions/score/totalnodisplay/digcounter.mcfunction new file mode 100644 index 0000000..f5bc6b1 --- /dev/null +++ b/data/fz/functions/score/totalnodisplay/digcounter.mcfunction @@ -0,0 +1,2 @@ +scoreboard players reset 总挖掘数 digCounter +scoreboard players reset 总挖掘数 totalDug \ No newline at end of file diff --git a/data/fz/functions/score/totalnodisplay/fishingcounter.mcfunction b/data/fz/functions/score/totalnodisplay/fishingcounter.mcfunction new file mode 100644 index 0000000..1c6b16f --- /dev/null +++ b/data/fz/functions/score/totalnodisplay/fishingcounter.mcfunction @@ -0,0 +1,2 @@ +scoreboard players reset 总钓鱼数 fishingCounter +scoreboard players reset 总钓鱼数 totalFished \ No newline at end of file diff --git a/data/fz/functions/score/totalnodisplay/killcounter.mcfunction b/data/fz/functions/score/totalnodisplay/killcounter.mcfunction new file mode 100644 index 0000000..6642ed2 --- /dev/null +++ b/data/fz/functions/score/totalnodisplay/killcounter.mcfunction @@ -0,0 +1,2 @@ +scoreboard players reset 总击杀数 killCounter +scoreboard players reset 总击杀数 totalKilled \ No newline at end of file diff --git a/data/fz/functions/score/totalnodisplay/tradingcounter.mcfunction b/data/fz/functions/score/totalnodisplay/tradingcounter.mcfunction new file mode 100644 index 0000000..5e76705 --- /dev/null +++ b/data/fz/functions/score/totalnodisplay/tradingcounter.mcfunction @@ -0,0 +1,2 @@ +scoreboard players reset 总交易数 tradingCounter +scoreboard players reset 总交易数 totalTraded \ No newline at end of file diff --git a/data/fz/functions/uninstall.mcfunction b/data/fz/functions/uninstall.mcfunction new file mode 100644 index 0000000..32954d4 --- /dev/null +++ b/data/fz/functions/uninstall.mcfunction @@ -0,0 +1,15 @@ +scoreboard objectives remove timeCounter +scoreboard objectives remove 20 +scoreboard objectives remove version +scoreboard objectives remove leaveGame +scoreboard objectives remove installed +function fz:carpet/uninstall +function fz:health/uninstall +function fz:sleep/uninstall +function fz:cleaner/uninstall +function fz:logintips/uninstall +function fz:score/uninstall +function fz:logintips/uninstall +function fz:config/uninstall +scoreboard objectives remove installed +tellraw @a {"text":"FZ'sDataPack卸载成功!","color":"dark_green"} \ No newline at end of file diff --git a/data/fz/functions/update/before/1.3.3.mcfunction b/data/fz/functions/update/before/1.3.3.mcfunction new file mode 100644 index 0000000..7c0d1e1 --- /dev/null +++ b/data/fz/functions/update/before/1.3.3.mcfunction @@ -0,0 +1,20 @@ +scoreboard objectives remove installed +scoreboard players operation 总挖掘数 totalList = totalDug totalList +scoreboard players operation 总击杀数 totalList = totalKilled totalList +scoreboard players operation 总死亡数 totalList = totalDeath totalList +scoreboard players operation 总交易数 totalList = totalTraded totalList +scoreboard players operation 总钓鱼数 totalList = totalFished totalList +scoreboard players operation 总受伤害量 totalList = totalHurt totalList +scoreboard players operation 总活跃时间 totalList = totalActivation totalList +execute if score 总挖掘数 totalList = totalDug totalList run scoreboard players reset totalDug +execute if score 总击杀数 totalList = totalKilled totalList run scoreboard players reset totalKilled +execute if score 总死亡数 totalList = totalDeath totalList run scoreboard players reset totalDeath +execute if score 总交易数 totalList = totalTraded totalList run scoreboard players reset totalTraded +execute if score 总钓鱼数 totalList = totalFished totalList run scoreboard players reset totalFished +execute if score 总受伤害量 totalList = totalHurt totalList run scoreboard players reset totalHurt +execute if score 总活跃时间 totalList = totalActivation totalList run scoreboard players reset totalActivation +scoreboard objectives remove scoreswitch +scoreboard objectives remove actCounter +scoreboard objectives setdisplay sidebar.team.dark_purple +team remove displayScoresOff +scoreboard players reset version version \ No newline at end of file diff --git a/data/fz/functions/update/before/1.3.3d.mcfunction b/data/fz/functions/update/before/1.3.3d.mcfunction new file mode 100644 index 0000000..03dde3f --- /dev/null +++ b/data/fz/functions/update/before/1.3.3d.mcfunction @@ -0,0 +1,3 @@ +scoreboard objectives setdisplay sidebar.team.dark_purple +team remove displayScoresOff +scoreboard players reset version version \ No newline at end of file diff --git a/data/fz/functions/update/before/1.4.0-dev.mcfunction b/data/fz/functions/update/before/1.4.0-dev.mcfunction new file mode 100644 index 0000000..eacd06d --- /dev/null +++ b/data/fz/functions/update/before/1.4.0-dev.mcfunction @@ -0,0 +1,6 @@ +scoreboard objectives remove botDeath +scoreboard objectives remove cleanerBar +scoreboard objectives remove cleanerChat +scoreboard objectives remove versionMajor +scoreboard objectives remove versionMinor +scoreboard objectives remove versionPatch \ No newline at end of file diff --git a/data/fz/functions/update/before/1.4.0-dev5.mcfunction b/data/fz/functions/update/before/1.4.0-dev5.mcfunction new file mode 100644 index 0000000..f3ed55c --- /dev/null +++ b/data/fz/functions/update/before/1.4.0-dev5.mcfunction @@ -0,0 +1,21 @@ +scoreboard players reset 总挖掘数 totalList +scoreboard players reset 总击杀数 totalList +scoreboard players reset 总死亡数 totalList +scoreboard players reset 总交易数 totalList +scoreboard players reset 总钓鱼数 totalList +scoreboard players reset 总受伤害量 totalList +scoreboard players reset 总活跃时间 totalList +scoreboard objectives remove tActC +scoreboard objectives remove tDeathC +scoreboard objectives remove tDigC +scoreboard objectives remove tFishC +scoreboard objectives remove tHurtC +scoreboard objectives remove tKillC +scoreboard objectives remove tTradeC +scoreboard objectives add tActC dummy +scoreboard objectives add tDeathC dummy +scoreboard objectives add tDigC dummy +scoreboard objectives add tFishC dummy +scoreboard objectives add tHurtC dummy +scoreboard objectives add tKillC dummy +scoreboard objectives add tTradeC dummy \ No newline at end of file diff --git a/data/minecraft/tags/functions/tick.json b/data/minecraft/tags/functions/tick.json index f11d49f..05fc054 100644 --- a/data/minecraft/tags/functions/tick.json +++ b/data/minecraft/tags/functions/tick.json @@ -1,5 +1,5 @@ { "values": [ - "fz:condition" + "fz:main" ] } \ No newline at end of file