7 lines
No EOL
17 KiB
JSON
7 lines
No EOL
17 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=\"56\" y=\"143\"><field name=\"trigger\">no_ext_trigger</field><next><block type=\"controls_if\"><value name=\"IF0\"><block type=\"logic_negate\"><value name=\"BOOL\"><block type=\"entity_checkgamemode\"><field name=\"gamemode\">SPECTATOR</field><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></value></block></value><statement name=\"DO0\"><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\"><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:Sentinel</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=\"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><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><statement name=\"DO0\"><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\">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\">power</field></block></value></block></value><value name=\"B\"><block type=\"math_number\"><field name=\"NUM\">0</field></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=\"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\">zoomfiring</field></block></value><value name=\"tagValue\"><block type=\"math_number\"><field name=\"NUM\">24</field></block></value></block></statement><statement name=\"ELSE\"><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\">firing</field></block></value><value name=\"tagValue\"><block type=\"math_number\"><field name=\"NUM\">24</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:sentinelfirecharge1 player @s ~ ~ ~ 100 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:sentinelfirecharge3 player @a ~ ~ ~ 4 1</field></block></value><next><block type=\"controls_if\"><mutation else=\"1\"></mutation><value name=\"IF0\"><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\">power</field></block></value></block></value><value name=\"B\"><block type=\"math_number\"><field name=\"NUM\">20</field></block></value></block></value><statement name=\"DO0\"><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\">power</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\">power</field></block></value></block></value><value name=\"B\"><block type=\"math_number\"><field name=\"NUM\">20</field></block></value></block></value></block></statement><statement name=\"ELSE\"><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\">power</field></block></value><value name=\"tagValue\"><block type=\"math_number\"><field name=\"NUM\">0</field></block></value></block></statement></block></next></block></next></block></next></block></statement><statement name=\"ELSE\"><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=\"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\">zoomfiring</field></block></value><value name=\"tagValue\"><block type=\"math_number\"><field name=\"NUM\">24</field></block></value></block></statement><statement name=\"ELSE\"><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\">firing</field></block></value><value name=\"tagValue\"><block type=\"math_number\"><field name=\"NUM\">24</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:sentinelfire1 player @s ~ ~ ~ 100 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:sentinelfire3 player @a ~ ~ ~ 4 1</field></block></value></block></next></block></next></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_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\">DIVIDE</field><value name=\"A\"><block type=\"math_dual_ops\"><field name=\"OP\">ADD</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\">adddamage</field></block></value></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=\"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_number\"><field name=\"NUM\">50</field></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><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\">crot</field></block></value><value name=\"tagValue\"><block type=\"math_number\"><field name=\"NUM\">20</field></block></value><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\">23</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:sentinelfire3</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:sentinelfirecharge3</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><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></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></statement></block></next></block></statement></block></next></block></xml>"
|
|
}
|
|
} |