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

7 lines
No EOL
9 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=\"dam\">dam</variable></variables><block type=\"event_trigger\" deletable=\"false\" x=\"54\" y=\"-46\"><field name=\"trigger\">no_ext_trigger</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 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=\"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\"><mutation else=\"1\"></mutation><value name=\"IF0\"><block type=\"math_binary_ops\"><field name=\"OP\">GTE</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\">level</field></block></value></block></value><value name=\"B\"><block type=\"math_number\"><field name=\"NUM\">10</field></block></value></block></value><statement name=\"DO0\"><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:dam</field><value name=\"VAL\"><block type=\"math_dual_ops\"><field name=\"OP\">MULTIPLY</field><value name=\"A\"><block type=\"math_dual_ops\" collapsed=\"true\"><field name=\"OP\">DIVIDE</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\">damage</field></block></value></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\">velocity</field></block></value></block></value></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=\"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\">level</field></block></value></block></value><value name=\"B\"><block type=\"math_number\"><field name=\"NUM\">10</field></block></value></block></value></block></value></block></value></block></value></block></statement><statement name=\"ELSE\"><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:dam</field><value name=\"VAL\"><block type=\"math_dual_ops\"><field name=\"OP\">DIVIDE</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\">damage</field></block></value></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\">velocity</field></block></value></block></value></block></value></block></statement><next><block type=\"projectile_shoot_from_entity\"><value name=\"entity\"><block type=\"entity_from_deps\"></block></value><value name=\"projectile\"><block type=\"projectiles_throwable\"><field name=\"projectile\">Snowball</field><value name=\"shooter\"><block type=\"entity_from_deps\"></block></value></block></value><value name=\"speed\"><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\">velocity</field></block></value></block></value><value name=\"inaccuracy\"><block type=\"get_attribute\"><field name=\"attribute\">CUSTOM:Spread</field><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></value></block></next></block></next></block></next></block></next></block></next></block></next></block><block type=\"projectile_shoot_from_entity\" x=\"91\" y=\"684\"><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=\"variables_get_number\"><mutation xmlns=\"http://www.w3.org/1999/xhtml\" is_player_var=\"false\" has_entity=\"false\"></mutation><field name=\"VAR\">local:dam</field></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=\"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\">velocity</field></block></value></block></value><value name=\"inaccuracy\"><block type=\"get_attribute\"><field name=\"attribute\">CUSTOM:Spread</field><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></value></block></xml>"
}
}