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

7 lines
No EOL
13 KiB
JSON

{
"_fv": 57,
"_type": "procedure",
"definition": {
"procedurexml": "<xml xmlns=\"https://developers.google.com/blockly/xml\"><variables><variable type=\"MCItem\" id=\"usehand\">usehand</variable><variable type=\"Number\" id=\"power\">power</variable></variables><block type=\"event_trigger\" deletable=\"false\" x=\"40\" y=\"40\"><field name=\"trigger\">no_ext_trigger</field><next><block type=\"variables_set_number\"><mutation xmlns=\"http://www.w3.org/1999/xhtml\" is_player_var=\"false\" has_entity=\"false\"></mutation><field name=\"VAR\">local:power</field><value name=\"VAL\"><block type=\"item_nbt_num_get\"><value name=\"item\"><block type=\"entity_iteminhand\"><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></value><value name=\"tagName\"><block type=\"text\"><field name=\"TEXT\">power</field></block></value></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:bowpull</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:bowpull1p</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=\"compare_mcitems\"><value name=\"a\"><block type=\"entity_iteminhand\"><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></value><value name=\"b\"><block type=\"mcitem_all\"><field name=\"value\">CUSTOM:Bocek</field></block></value></block></value><value name=\"B\"><block type=\"math_binary_ops\"><field name=\"OP\">GTE</field><value name=\"A\"><block type=\"item_nbt_num_get\"><value name=\"item\"><block type=\"entity_iteminhand\"><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></value><value name=\"tagName\"><block type=\"text\"><field name=\"TEXT\">power</field></block></value></block></value><value name=\"B\"><block type=\"math_number\"><field name=\"NUM\">6</field></block></value></block></value></block></value><statement name=\"DO0\"><block type=\"controls_if\"><mutation else=\"1\"></mutation><value name=\"IF0\"><block type=\"logic_binary_ops\"><field name=\"OP\">EQ</field><value name=\"A\"><block type=\"variables_get_logic\"><mutation xmlns=\"http://www.w3.org/1999/xhtml\" is_player_var=\"true\" has_entity=\"true\"></mutation><field name=\"VAR\">global:zooming</field><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></value><value name=\"B\"><block type=\"logic_boolean\"><field name=\"BOOL\">TRUE</field></block></value></block></value><statement name=\"DO0\"><block type=\"projectile_shoot_from_entity\"><value name=\"entity\"><block type=\"entity_from_deps\"></block></value><value name=\"projectile\"><block type=\"projectiles_arrow\"><field name=\"projectile\">CUSTOM:Bocekarrow</field><field name=\"fire\">FALSE</field><field name=\"particles\">FALSE</field><field name=\"pickup\">ALLOWED</field><value name=\"damage\"><block type=\"math_dual_ops\"><field name=\"OP\">MULTIPLY</field><value name=\"A\"><block type=\"math_number\"><field name=\"NUM\">0.5</field></block></value><value name=\"B\"><block type=\"math_dual_ops\"><field name=\"OP\">ADD</field><value name=\"A\"><block type=\"math_number\"><field name=\"NUM\">1</field></block></value><value name=\"B\"><block type=\"math_dual_ops\"><field name=\"OP\">MULTIPLY</field><value name=\"A\"><block type=\"math_number\"><field name=\"NUM\">0.05</field></block></value><value name=\"B\"><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\">level</field></block></value></block></value></block></value></block></value></block></value><value name=\"knockback\"><block type=\"math_number\"><field name=\"NUM\">0</field></block></value><value name=\"piercing\"><block type=\"math_number\"><field name=\"NUM\">2</field></block></value><value name=\"shooter\"><block type=\"entity_from_deps\"></block></value></block></value><value name=\"speed\"><block type=\"math_dual_ops\"><field name=\"OP\">MULTIPLY</field><value name=\"A\"><block type=\"math_number\"><field name=\"NUM\">4</field></block></value><value name=\"B\"><block type=\"variables_get_number\"><mutation xmlns=\"http://www.w3.org/1999/xhtml\" is_player_var=\"false\" has_entity=\"false\"></mutation><field name=\"VAR\">local:power</field></block></value></block></value><value name=\"inaccuracy\"><block type=\"math_number\"><field name=\"NUM\">0.05</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:bowfire1p player @s ~ ~ ~ 10 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:bowfire3p player @a ~ ~ ~ 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\">stopsound @s player target:bowfire3p</field></block></value></block></next></block></next></block></next></block></statement><statement name=\"ELSE\"><block type=\"controls_repeat_ext\"><value name=\"TIMES\"><block type=\"math_number\"><field name=\"NUM\">10</field></block></value><statement name=\"DO\"><block type=\"projectile_shoot_from_entity\"><value name=\"entity\"><block type=\"entity_from_deps\"></block></value><value name=\"projectile\"><block type=\"projectiles_arrow\"><field name=\"projectile\">CUSTOM:Bullet</field><field name=\"fire\">FALSE</field><field name=\"particles\">FALSE</field><field name=\"pickup\">DISALLOWED</field><value name=\"damage\"><block type=\"math_dual_ops\"><field name=\"OP\">MULTIPLY</field><value name=\"A\"><block type=\"math_number\"><field name=\"NUM\">0.05</field></block></value><value name=\"B\"><block type=\"math_dual_ops\"><field name=\"OP\">ADD</field><value name=\"A\"><block type=\"math_number\"><field name=\"NUM\">1</field></block></value><value name=\"B\"><block type=\"math_dual_ops\"><field name=\"OP\">MULTIPLY</field><value name=\"A\"><block type=\"math_number\"><field name=\"NUM\">0.05</field></block></value><value name=\"B\"><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\">level</field></block></value></block></value></block></value></block></value></block></value><value name=\"knockback\"><block type=\"math_number\"><field name=\"NUM\">0</field></block></value><value name=\"piercing\"><block type=\"math_number\"><field name=\"NUM\">0</field></block></value><value name=\"shooter\"><block type=\"entity_from_deps\"></block></value></block></value><value name=\"speed\"><block type=\"math_dual_ops\"><field name=\"OP\">MULTIPLY</field><value name=\"A\"><block type=\"math_number\"><field name=\"NUM\">4</field></block></value><value name=\"B\"><block type=\"variables_get_number\"><mutation xmlns=\"http://www.w3.org/1999/xhtml\" is_player_var=\"false\" has_entity=\"false\"></mutation><field name=\"VAR\">local:power</field></block></value></block></value><value name=\"inaccuracy\"><block type=\"math_number\"><field name=\"NUM\">2</field></block></value></block></statement><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:shotfire player @s ~ ~ ~ 10 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:shotfire3p player @a ~ ~ ~ 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\">stopsound @s player target:shotfire3p</field></block></value></block></next></block></next></block></next></block></statement><next><block type=\"controls_if\"><mutation else=\"1\"></mutation><comment pinned=\"false\" h=\"85\" w=\"293\">This example will test if the random number is less than 0.7 (70%). Random numbers range between (0.0 and 1.0). If it is true, then it will run what is in the \"do\" section of the if statement.</comment><value name=\"IF0\"><block type=\"math_binary_ops\"><field name=\"OP\">LT</field><value name=\"A\"><block type=\"math_java_constants\"><field name=\"CONSTANT\">RANDOM</field></block></value><value name=\"B\"><block type=\"math_number\"><field name=\"NUM\">0.5</field></block></value></block></value><statement name=\"DO0\"><block type=\"variables_set_number\"><mutation xmlns=\"http://www.w3.org/1999/xhtml\" is_player_var=\"true\" has_entity=\"true\"></mutation><field name=\"VAR\">global:recoilhorizon</field><value name=\"VAL\"><block type=\"math_number\"><field name=\"NUM\">-1</field></block></value><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></statement><statement name=\"ELSE\"><block type=\"variables_set_number\"><mutation xmlns=\"http://www.w3.org/1999/xhtml\" is_player_var=\"true\" has_entity=\"true\"></mutation><field name=\"VAR\">global:recoilhorizon</field><value name=\"VAL\"><block type=\"math_number\"><field name=\"NUM\">1</field></block></value><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></statement><next><block type=\"variables_set_number\"><mutation xmlns=\"http://www.w3.org/1999/xhtml\" is_player_var=\"true\" has_entity=\"true\"></mutation><field name=\"VAR\">global:recoil</field><value name=\"VAL\"><block type=\"math_number\"><field name=\"NUM\">0.1</field></block></value><value name=\"entity\"><block type=\"entity_from_deps\"></block></value><next><block type=\"item_cooldown_for\"><value name=\"entity\"><block type=\"entity_from_deps\"></block></value><value name=\"item\"><block type=\"entity_iteminhand\"><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></value><value name=\"ticks\"><block type=\"math_number\"><field name=\"NUM\">7</field></block></value><next><block type=\"item_nbt_num_set\"><value name=\"item\"><block type=\"entity_iteminhand\"><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></value><value name=\"tagName\"><block type=\"text\"><field name=\"TEXT\">arrowempty</field></block></value><value name=\"tagValue\"><block type=\"math_number\"><field name=\"NUM\">7</field></block></value><next><block type=\"item_nbt_num_set\"><value name=\"item\"><block type=\"entity_iteminhand\"><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></value><value name=\"tagName\"><block type=\"text\"><field name=\"TEXT\">power</field></block></value><value name=\"tagValue\"><block type=\"math_number\"><field name=\"NUM\">0</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=\"variables_set_number\"><mutation xmlns=\"http://www.w3.org/1999/xhtml\" is_player_var=\"true\" has_entity=\"true\"></mutation><field name=\"VAR\">global:firing</field><value name=\"VAL\"><block type=\"math_number\"><field name=\"NUM\">1</field></block></value><value name=\"entity\"><block type=\"entity_from_deps\"></block></value><next><block type=\"controls_if\"><value name=\"IF0\"><block type=\"logic_negate\"><value name=\"BOOL\"><block type=\"entity_checkgamemode\"><field name=\"gamemode\">CREATIVE</field><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></value></block></value><statement name=\"DO0\"><block type=\"entity_remove_item\"><value name=\"entity\"><block type=\"entity_from_deps\"></block></value><value name=\"amount\"><block type=\"math_number\"><field name=\"NUM\">1</field></block></value><value name=\"item\"><block type=\"mcitem_all\"><field name=\"value\">Items.ARROW</field></block></value></block></statement></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></statement></block></next></block></next></block></next></block></next></block></xml>"
}
}