superb-warfare/elements/Aa12autofire.mod.json
2024-05-04 14:26:24 +08:00

7 lines
No EOL
14 KiB
JSON

{
"_fv": 57,
"_type": "procedure",
"definition": {
"procedurexml": "<xml xmlns=\"https://developers.google.com/blockly/xml\"><variables><variable type=\"MCItem\" id=\"usehand\">usehand</variable></variables><block type=\"event_trigger\" deletable=\"false\" x=\"52\" y=\"-45\"><field name=\"trigger\">player_ticks</field><next><block type=\"variables_set_itemstack\"><mutation xmlns=\"http://www.w3.org/1999/xhtml\" is_player_var=\"false\" has_entity=\"false\"></mutation><field name=\"VAR\">local:usehand</field><value name=\"VAL\"><block type=\"entity_iteminhand\"><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></value><next><block type=\"controls_if\"><mutation elseif=\"1\"></mutation><value name=\"IF0\"><block type=\"logic_binary_ops\"><field name=\"OP\">AND</field><value name=\"A\"><block type=\"math_binary_ops\"><field name=\"OP\">EQ</field><value name=\"A\"><block type=\"entity_nbt_num_get\"><value name=\"entity\"><block type=\"entity_from_deps\"></block></value><value name=\"tagName\"><block type=\"text\"><field name=\"TEXT\">firing</field></block></value></block></value><value name=\"B\"><block type=\"math_number\"><field name=\"NUM\">1</field></block></value></block></value><value name=\"B\"><block type=\"math_binary_ops\"><field name=\"OP\">EQ</field><value name=\"A\"><block type=\"item_nbt_num_get\"><value name=\"item\"><block type=\"variables_get_itemstack\"><mutation xmlns=\"http://www.w3.org/1999/xhtml\" is_player_var=\"false\" has_entity=\"false\"></mutation><field name=\"VAR\">local:usehand</field></block></value><value name=\"tagName\"><block type=\"text\"><field name=\"TEXT\">firemode</field></block></value></block></value><value name=\"B\"><block type=\"math_number\"><field name=\"NUM\">2</field></block></value></block></value></block></value><statement name=\"DO0\"><block type=\"controls_if\"><value name=\"IF0\"><block type=\"logic_binary_ops\"><field name=\"OP\">AND</field><value name=\"A\"><block type=\"logic_binary_ops\"><field name=\"OP\">AND</field><value name=\"A\"><block type=\"logic_binary_ops\"><field name=\"OP\">AND</field><value name=\"A\"><block type=\"compare_mcitems\"><value name=\"a\"><block type=\"variables_get_itemstack\"><mutation xmlns=\"http://www.w3.org/1999/xhtml\" is_player_var=\"false\" has_entity=\"false\"></mutation><field name=\"VAR\">local:usehand</field></block></value><value name=\"b\"><block type=\"mcitem_all\"><field name=\"value\">CUSTOM:Aa12</field></block></value></block></value><value name=\"B\"><block type=\"math_binary_ops\"><field name=\"OP\">EQ</field><value name=\"A\"><block type=\"item_nbt_num_get\"><value name=\"item\"><block type=\"variables_get_itemstack\"><mutation xmlns=\"http://www.w3.org/1999/xhtml\" is_player_var=\"false\" has_entity=\"false\"></mutation><field name=\"VAR\">local:usehand</field></block></value><value name=\"tagName\"><block type=\"text\"><field name=\"TEXT\">reloading</field></block></value></block></value><value name=\"B\"><block type=\"math_number\"><field name=\"NUM\">0</field></block></value></block></value></block></value><value name=\"B\"><block type=\"math_binary_ops\"><field name=\"OP\">GT</field><value name=\"A\"><block type=\"item_nbt_num_get\"><value name=\"item\"><block type=\"variables_get_itemstack\"><mutation xmlns=\"http://www.w3.org/1999/xhtml\" is_player_var=\"false\" has_entity=\"false\"></mutation><field name=\"VAR\">local:usehand</field></block></value><value name=\"tagName\"><block type=\"text\"><field name=\"TEXT\">ammo</field></block></value></block></value><value name=\"B\"><block type=\"math_number\"><field name=\"NUM\">0</field></block></value></block></value></block></value><value name=\"B\"><block type=\"logic_negate\"><value name=\"BOOL\"><block type=\"item_is_cooldown\"><value name=\"item\"><block type=\"variables_get_itemstack\"><mutation xmlns=\"http://www.w3.org/1999/xhtml\" is_player_var=\"false\" has_entity=\"false\"></mutation><field name=\"VAR\">local:usehand</field></block></value><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></value></block></value></block></value><statement name=\"DO0\"><block type=\"controls_repeat_ext\"><value name=\"TIMES\"><block type=\"math_number\"><field name=\"NUM\">8</field></block></value><statement name=\"DO\"><block type=\"call_procedure\"><field name=\"procedure\">BulletfireNormal</field></block></statement><next><block type=\"call_procedure\"><field name=\"procedure\">As12Ds</field><next><block type=\"item_cooldown_for\"><value name=\"entity\"><block type=\"entity_from_deps\"></block></value><value name=\"item\"><block type=\"variables_get_itemstack\"><mutation xmlns=\"http://www.w3.org/1999/xhtml\" is_player_var=\"false\" has_entity=\"false\"></mutation><field name=\"VAR\">local:usehand</field></block></value><value name=\"ticks\"><block type=\"math_number\"><field name=\"NUM\">4</field></block></value><next><block type=\"entity_execute_command\"><value name=\"entity\"><block type=\"entity_from_deps\"></block></value><value name=\"command\"><block type=\"text\"><field name=\"TEXT\">playsound target:aa12_fire_1p player @s ~ ~ ~ 2 1</field></block></value><next><block type=\"entity_execute_command\"><value name=\"entity\"><block type=\"entity_from_deps\"></block></value><value name=\"command\"><block type=\"text\"><field name=\"TEXT\">playsound target:aa12fire player @a ~ ~ ~ 6 1</field></block></value><next><block type=\"entity_execute_command\"><value name=\"entity\"><block type=\"entity_from_deps\"></block></value><value name=\"command\"><block type=\"text\"><field name=\"TEXT\">stopsound @s player target:aa12fire</field></block></value><next><block type=\"item_nbt_num_set\"><value name=\"item\"><block type=\"variables_get_itemstack\"><mutation xmlns=\"http://www.w3.org/1999/xhtml\" is_player_var=\"false\" has_entity=\"false\"></mutation><field name=\"VAR\">local:usehand</field></block></value><value name=\"tagName\"><block type=\"text\"><field name=\"TEXT\">fireanim</field></block></value><value name=\"tagValue\"><block type=\"math_number\"><field name=\"NUM\">2</field></block></value><next><block type=\"item_nbt_num_set\"><value name=\"item\"><block type=\"variables_get_itemstack\"><mutation xmlns=\"http://www.w3.org/1999/xhtml\" is_player_var=\"false\" has_entity=\"false\"></mutation><field name=\"VAR\">local:usehand</field></block></value><value name=\"tagName\"><block type=\"text\"><field name=\"TEXT\">ammo</field></block></value><value name=\"tagValue\"><block type=\"math_dual_ops\"><field name=\"OP\">MINUS</field><value name=\"A\"><block type=\"item_nbt_num_get\"><value name=\"item\"><block type=\"variables_get_itemstack\"><mutation xmlns=\"http://www.w3.org/1999/xhtml\" is_player_var=\"false\" has_entity=\"false\"></mutation><field name=\"VAR\">local:usehand</field></block></value><value name=\"tagName\"><block type=\"text\"><field name=\"TEXT\">ammo</field></block></value></block></value><value name=\"B\"><block type=\"math_number\"><field name=\"NUM\">1</field></block></value></block></value></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></statement></block></statement><value name=\"IF1\"><block type=\"logic_binary_ops\"><field name=\"OP\">AND</field><value name=\"A\"><block type=\"math_binary_ops\"><field name=\"OP\">EQ</field><value name=\"A\"><block type=\"entity_nbt_num_get\"><value name=\"entity\"><block type=\"entity_from_deps\"></block></value><value name=\"tagName\"><block type=\"text\"><field name=\"TEXT\">firing</field></block></value></block></value><value name=\"B\"><block type=\"math_number\"><field name=\"NUM\">1</field></block></value></block></value><value name=\"B\"><block type=\"math_binary_ops\"><field name=\"OP\">EQ</field><value name=\"A\"><block type=\"item_nbt_num_get\"><value name=\"item\"><block type=\"variables_get_itemstack\"><mutation xmlns=\"http://www.w3.org/1999/xhtml\" is_player_var=\"false\" has_entity=\"false\"></mutation><field name=\"VAR\">local:usehand</field></block></value><value name=\"tagName\"><block type=\"text\"><field name=\"TEXT\">firemode</field></block></value></block></value><value name=\"B\"><block type=\"math_number\"><field name=\"NUM\">0</field></block></value></block></value></block></value><statement name=\"DO1\"><block type=\"entity_nbt_num_set\"><value name=\"entity\"><block type=\"entity_from_deps\"></block></value><value name=\"tagName\"><block type=\"text\"><field name=\"TEXT\">firing</field></block></value><value name=\"tagValue\"><block type=\"math_number\"><field name=\"NUM\">0</field></block></value><next><block type=\"controls_if\"><value name=\"IF0\"><block type=\"logic_binary_ops\"><field name=\"OP\">AND</field><value name=\"A\"><block type=\"logic_binary_ops\"><field name=\"OP\">AND</field><value name=\"A\"><block type=\"logic_binary_ops\"><field name=\"OP\">AND</field><value name=\"A\"><block type=\"compare_mcitems\"><value name=\"a\"><block type=\"variables_get_itemstack\"><mutation xmlns=\"http://www.w3.org/1999/xhtml\" is_player_var=\"false\" has_entity=\"false\"></mutation><field name=\"VAR\">local:usehand</field></block></value><value name=\"b\"><block type=\"mcitem_all\"><field name=\"value\">CUSTOM:Aa12</field></block></value></block></value><value name=\"B\"><block type=\"math_binary_ops\"><field name=\"OP\">EQ</field><value name=\"A\"><block type=\"item_nbt_num_get\"><value name=\"item\"><block type=\"variables_get_itemstack\"><mutation xmlns=\"http://www.w3.org/1999/xhtml\" is_player_var=\"false\" has_entity=\"false\"></mutation><field name=\"VAR\">local:usehand</field></block></value><value name=\"tagName\"><block type=\"text\"><field name=\"TEXT\">reloading</field></block></value></block></value><value name=\"B\"><block type=\"math_number\"><field name=\"NUM\">0</field></block></value></block></value></block></value><value name=\"B\"><block type=\"math_binary_ops\"><field name=\"OP\">GT</field><value name=\"A\"><block type=\"item_nbt_num_get\"><value name=\"item\"><block type=\"variables_get_itemstack\"><mutation xmlns=\"http://www.w3.org/1999/xhtml\" is_player_var=\"false\" has_entity=\"false\"></mutation><field name=\"VAR\">local:usehand</field></block></value><value name=\"tagName\"><block type=\"text\"><field name=\"TEXT\">ammo</field></block></value></block></value><value name=\"B\"><block type=\"math_number\"><field name=\"NUM\">0</field></block></value></block></value></block></value><value name=\"B\"><block type=\"logic_negate\"><value name=\"BOOL\"><block type=\"item_is_cooldown\"><value name=\"item\"><block type=\"variables_get_itemstack\"><mutation xmlns=\"http://www.w3.org/1999/xhtml\" is_player_var=\"false\" has_entity=\"false\"></mutation><field name=\"VAR\">local:usehand</field></block></value><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></value></block></value></block></value><statement name=\"DO0\"><block type=\"controls_repeat_ext\"><value name=\"TIMES\"><block type=\"math_number\"><field name=\"NUM\">8</field></block></value><statement name=\"DO\"><block type=\"call_procedure\"><field name=\"procedure\">BulletfireNormal</field></block></statement><next><block type=\"call_procedure\"><field name=\"procedure\">As12Ds</field><next><block type=\"item_cooldown_for\"><value name=\"entity\"><block type=\"entity_from_deps\"></block></value><value name=\"item\"><block type=\"variables_get_itemstack\"><mutation xmlns=\"http://www.w3.org/1999/xhtml\" is_player_var=\"false\" has_entity=\"false\"></mutation><field name=\"VAR\">local:usehand</field></block></value><value name=\"ticks\"><block type=\"math_number\"><field name=\"NUM\">4</field></block></value><next><block type=\"entity_execute_command\"><value name=\"entity\"><block type=\"entity_from_deps\"></block></value><value name=\"command\"><block type=\"text\"><field name=\"TEXT\">playsound target:aa12_fire_1p player @s ~ ~ ~ 2 1</field></block></value><next><block type=\"entity_execute_command\"><value name=\"entity\"><block type=\"entity_from_deps\"></block></value><value name=\"command\"><block type=\"text\"><field name=\"TEXT\">playsound target:aa12fire player @a ~ ~ ~ 6 1</field></block></value><next><block type=\"entity_execute_command\"><value name=\"entity\"><block type=\"entity_from_deps\"></block></value><value name=\"command\"><block type=\"text\"><field name=\"TEXT\">stopsound @s player target:aa12fire</field></block></value><next><block type=\"item_nbt_num_set\"><value name=\"item\"><block type=\"variables_get_itemstack\"><mutation xmlns=\"http://www.w3.org/1999/xhtml\" is_player_var=\"false\" has_entity=\"false\"></mutation><field name=\"VAR\">local:usehand</field></block></value><value name=\"tagName\"><block type=\"text\"><field name=\"TEXT\">fireanim</field></block></value><value name=\"tagValue\"><block type=\"math_number\"><field name=\"NUM\">2</field></block></value><next><block type=\"item_nbt_num_set\"><value name=\"item\"><block type=\"variables_get_itemstack\"><mutation xmlns=\"http://www.w3.org/1999/xhtml\" is_player_var=\"false\" has_entity=\"false\"></mutation><field name=\"VAR\">local:usehand</field></block></value><value name=\"tagName\"><block type=\"text\"><field name=\"TEXT\">ammo</field></block></value><value name=\"tagValue\"><block type=\"math_dual_ops\"><field name=\"OP\">MINUS</field><value name=\"A\"><block type=\"item_nbt_num_get\"><value name=\"item\"><block type=\"variables_get_itemstack\"><mutation xmlns=\"http://www.w3.org/1999/xhtml\" is_player_var=\"false\" has_entity=\"false\"></mutation><field name=\"VAR\">local:usehand</field></block></value><value name=\"tagName\"><block type=\"text\"><field name=\"TEXT\">ammo</field></block></value></block></value><value name=\"B\"><block type=\"math_number\"><field name=\"NUM\">1</field></block></value></block></value></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></statement></block></next></block></statement></block></next></block></next></block></xml>"
}
}