cawezs_mantle_to_stratus/elements/StarSerpentOnEntityTickUpdate.mod.json

7 lines
21 KiB
JSON

{
"_fv": 77,
"_type": "procedure",
"definition": {
"procedurexml": "<xml xmlns=\"https://developers.google.com/blockly/xml\"><variables><variable type=\"Entity\" id=\"target\">target</variable><variable type=\"Number\" id=\"distsqr\">distsqr</variable><variable type=\"Number\" id=\"tickCounter\">tickCounter</variable></variables><block type=\"event_trigger\" deletable=\"false\" x=\"-49\" y=\"-204\"><field name=\"trigger\">no_ext_trigger</field><next><block type=\"controls_if\"><value name=\"IF0\"><block type=\"math_binary_ops\"><field name=\"OP\">EQ</field><value name=\"A\"><block type=\"math_number\"><field name=\"NUM\">0</field></block></value><value name=\"B\"><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\">tick</field></block></value></block></value></block></value><statement name=\"DO0\"><block type=\"entity_execute_command\"><value name=\"command\"><block type=\"text_join\"><mutation items=\"5\"></mutation><value name=\"ADD0\"><block type=\"text\"><field name=\"TEXT\">/summon block_display ~ ~ ~ {transformation:{left_rotation:[0f,0f,0f,1f],right_rotation:[0f,0f,0f,1f],scale:[1.5f,1.5f,1.5f],translation:[-0.5f,-0.5f,-0.5f]},Rotation:[</field></block></value><value name=\"ADD1\"><block type=\"math_random_number_between\"><value name=\"min\"><block type=\"math_number\"><field name=\"NUM\">-90</field></block></value><value name=\"max\"><block type=\"math_number\"><field name=\"NUM\">90</field></block></value></block></value><value name=\"ADD2\"><block type=\"text\"><field name=\"TEXT\">f,</field></block></value><value name=\"ADD3\"><block type=\"math_random_number_between\"><value name=\"min\"><block type=\"math_number\"><field name=\"NUM\">-90</field></block></value><value name=\"max\"><block type=\"math_number\"><field name=\"NUM\">90</field></block></value></block></value><value name=\"ADD4\"><block type=\"text\"><field name=\"TEXT\">f],block_state:{Name:black_concrete}}</field></block></value></block></value><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></statement><next><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\">tick</field></block></value><value name=\"tagValue\"><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=\"entity_nbt_num_get\"><value name=\"entity\"><block type=\"entity_from_deps\"></block></value><value name=\"tagName\"><block type=\"text\"><field name=\"TEXT\">tick</field></block></value></block></value></block></value><next><block type=\"controls_if\"><value name=\"IF0\"><block type=\"math_binary_ops\"><field name=\"OP\">EQ</field><value name=\"A\"><block type=\"math_number\"><field name=\"NUM\">100</field></block></value><value name=\"B\"><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\">tick</field></block></value></block></value></block></value><statement name=\"DO0\"><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\">tick</field></block></value><value name=\"tagValue\"><block type=\"math_number\"><field name=\"NUM\">1</field></block></value></block></statement><next><block type=\"variables_set_entity\"><mutation xmlns=\"http://www.w3.org/1999/xhtml\" is_player_var=\"false\" has_entity=\"false\"></mutation><field name=\"VAR\">local:target</field><value name=\"VAL\"><block type=\"world_entity_inrange\"><field name=\"entity\">EntityPlayer</field><value name=\"x\"><block type=\"coord_x\"></block></value><value name=\"y\"><block type=\"coord_y\"></block></value><value name=\"z\"><block type=\"coord_z\"></block></value><value name=\"range\"><block type=\"math_number\"><field name=\"NUM\">500</field></block></value></block></value><next><block type=\"controls_if\"><value name=\"IF0\"><block type=\"logic_negate\"><value name=\"BOOL\"><block type=\"compare_entities\"><value name=\"a\"><block type=\"entity_none\"></block></value><value name=\"b\"><block type=\"variables_get_entity\"><mutation xmlns=\"http://www.w3.org/1999/xhtml\" is_player_var=\"false\" has_entity=\"false\"></mutation><field name=\"VAR\">local:target</field></block></value></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:distsqr</field><value name=\"VAL\"><block type=\"math_dual_ops\"><field name=\"OP\">ADD</field><value name=\"A\"><block type=\"math_dual_ops\"><field name=\"OP\">POWER</field><value name=\"A\"><block type=\"math_dual_ops\"><field name=\"OP\">MINUS</field><value name=\"A\"><block type=\"entity_pos_z\"><value name=\"entity\"><block type=\"variables_get_entity\"><mutation xmlns=\"http://www.w3.org/1999/xhtml\" is_player_var=\"false\" has_entity=\"false\"></mutation><field name=\"VAR\">local:target</field></block></value></block></value><value name=\"B\"><block type=\"entity_pos_z\"><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></value></block></value><value name=\"B\"><block type=\"math_number\"><field name=\"NUM\">2</field></block></value></block></value><value name=\"B\"><block type=\"math_dual_ops\"><field name=\"OP\">ADD</field><value name=\"A\"><block type=\"math_dual_ops\"><field name=\"OP\">POWER</field><value name=\"A\"><block type=\"math_dual_ops\"><field name=\"OP\">MINUS</field><value name=\"A\"><block type=\"entity_pos_y\"><value name=\"entity\"><block type=\"variables_get_entity\"><mutation xmlns=\"http://www.w3.org/1999/xhtml\" is_player_var=\"false\" has_entity=\"false\"></mutation><field name=\"VAR\">local:target</field></block></value></block></value><value name=\"B\"><block type=\"entity_pos_y\"><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></value></block></value><value name=\"B\"><block type=\"math_number\"><field name=\"NUM\">2</field></block></value></block></value><value name=\"B\"><block type=\"math_dual_ops\"><field name=\"OP\">POWER</field><value name=\"A\"><block type=\"math_dual_ops\"><field name=\"OP\">MINUS</field><value name=\"A\"><block type=\"entity_pos_x\"><value name=\"entity\"><block type=\"variables_get_entity\"><mutation xmlns=\"http://www.w3.org/1999/xhtml\" is_player_var=\"false\" has_entity=\"false\"></mutation><field name=\"VAR\">local:target</field></block></value></block></value><value name=\"B\"><block type=\"entity_pos_x\"><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></value></block></value><value name=\"B\"><block type=\"math_number\"><field name=\"NUM\">2</field></block></value></block></value></block></value></block></value><next><block type=\"controls_if\"><mutation elseif=\"1\"></mutation><value name=\"IF0\"><block type=\"math_binary_ops\"><field name=\"OP\">GT</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:distsqr</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:distsqr</field><value name=\"VAL\"><block type=\"math_number\"><field name=\"NUM\">10000000</field></block></value></block></statement><value name=\"IF1\"><block type=\"math_binary_ops\"><field name=\"OP\">LT</field><value name=\"A\"><block type=\"math_number\"><field name=\"NUM\">2500</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:distsqr</field></block></value></block></value><statement name=\"DO1\"><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:distsqr</field><value name=\"VAL\"><block type=\"math_number\"><field name=\"NUM\">1</field></block></value></block></statement><next><block type=\"controls_if\"><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.001</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:distsqr</field><value name=\"VAL\"><block type=\"math_number\"><field name=\"NUM\">0.1</field></block></value></block></statement><next><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\">vx</field></block></value><value name=\"tagValue\"><block type=\"math_dual_ops\"><field name=\"OP\">ADD</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\">vx</field></block></value></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.5</field></block></value><value name=\"B\"><block type=\"math_dual_ops\" inline=\"false\"><field name=\"OP\">DIVIDE</field><value name=\"A\"><block type=\"math_dual_ops\"><field name=\"OP\">MINUS</field><value name=\"A\"><block type=\"entity_pos_x\"><value name=\"entity\"><block type=\"variables_get_entity\"><mutation xmlns=\"http://www.w3.org/1999/xhtml\" is_player_var=\"false\" has_entity=\"false\"></mutation><field name=\"VAR\">local:target</field></block></value></block></value><value name=\"B\"><block type=\"entity_pos_x\"><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></value></block></value><value name=\"B\"><block type=\"math_dual_ops\"><field name=\"OP\">POWER</field><value name=\"A\"><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:distsqr</field></block></value><value name=\"B\"><block type=\"math_number\"><field name=\"NUM\">1</field></block></value></block></value></block></value></block></value></block></value><next><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\">vy</field></block></value><value name=\"tagValue\"><block type=\"math_dual_ops\"><field name=\"OP\">ADD</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\">vy</field></block></value></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.5</field></block></value><value name=\"B\"><block type=\"math_dual_ops\" inline=\"false\"><field name=\"OP\">DIVIDE</field><value name=\"A\"><block type=\"math_dual_ops\"><field name=\"OP\">MINUS</field><value name=\"A\"><block type=\"entity_pos_y\"><value name=\"entity\"><block type=\"variables_get_entity\"><mutation xmlns=\"http://www.w3.org/1999/xhtml\" is_player_var=\"false\" has_entity=\"false\"></mutation><field name=\"VAR\">local:target</field></block></value></block></value><value name=\"B\"><block type=\"entity_pos_y\"><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></value></block></value><value name=\"B\"><block type=\"math_dual_ops\"><field name=\"OP\">POWER</field><value name=\"A\"><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:distsqr</field></block></value><value name=\"B\"><block type=\"math_number\"><field name=\"NUM\">1</field></block></value></block></value></block></value></block></value></block></value><next><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\">vz</field></block></value><value name=\"tagValue\"><block type=\"math_dual_ops\"><field name=\"OP\">ADD</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\">vz</field></block></value></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.5</field></block></value><value name=\"B\"><block type=\"math_dual_ops\" inline=\"false\"><field name=\"OP\">DIVIDE</field><value name=\"A\"><block type=\"math_dual_ops\"><field name=\"OP\">MINUS</field><value name=\"A\"><block type=\"entity_pos_z\"><value name=\"entity\"><block type=\"variables_get_entity\"><mutation xmlns=\"http://www.w3.org/1999/xhtml\" is_player_var=\"false\" has_entity=\"false\"></mutation><field name=\"VAR\">local:target</field></block></value></block></value><value name=\"B\"><block type=\"entity_pos_z\"><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block></value></block></value><value name=\"B\"><block type=\"math_dual_ops\"><field name=\"OP\">POWER</field><value name=\"A\"><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:distsqr</field></block></value><value name=\"B\"><block type=\"math_number\"><field name=\"NUM\">1</field></block></value></block></value></block></value></block></value></block></value><next><block type=\"move_entity\"><value name=\"entity\"><block type=\"entity_from_deps\"></block></value><value name=\"x\"><block type=\"math_dual_ops\"><field name=\"OP\">ADD</field><value name=\"A\"><block type=\"coord_x\"></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.5</field></block></value><value name=\"B\"><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\">vx</field></block></value></block></value></block></value></block></value><value name=\"y\"><block type=\"math_dual_ops\"><field name=\"OP\">ADD</field><value name=\"A\"><block type=\"coord_y\"></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.5</field></block></value><value name=\"B\"><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\">vy</field></block></value></block></value></block></value></block></value><value name=\"z\"><block type=\"math_dual_ops\"><field name=\"OP\">ADD</field><value name=\"A\"><block type=\"coord_z\"></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.5</field></block></value><value name=\"B\"><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\">vz</field></block></value></block></value></block></value></block></value><next><block type=\"entity_set_movement\"><value name=\"entity\"><block type=\"entity_from_deps\"></block></value><value name=\"vx\"><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=\"entity_nbt_num_get\"><value name=\"entity\"><block type=\"entity_from_deps\"></block></value><value name=\"tagName\"><block type=\"text\"><field name=\"TEXT\">vx</field></block></value></block></value></block></value><value name=\"vy\"><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=\"entity_nbt_num_get\"><value name=\"entity\"><block type=\"entity_from_deps\"></block></value><value name=\"tagName\"><block type=\"text\"><field name=\"TEXT\">vy</field></block></value></block></value></block></value><value name=\"vz\"><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=\"entity_nbt_num_get\"><value name=\"entity\"><block type=\"entity_from_deps\"></block></value><value name=\"tagName\"><block type=\"text\"><field name=\"TEXT\">vz</field></block></value></block></value></block></value><next><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\">vx</field></block></value><value name=\"tagValue\"><block type=\"math_dual_ops\"><field name=\"OP\">MIN</field><value name=\"A\"><block type=\"math_number\"><field name=\"NUM\">0.7</field></block></value><value name=\"B\"><block type=\"math_dual_ops\"><field name=\"OP\">MAX</field><value name=\"A\"><block type=\"math_number\"><field name=\"NUM\">-0.7</field></block></value><value name=\"B\"><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\">vx</field></block></value></block></value></block></value></block></value><next><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\">vy</field></block></value><value name=\"tagValue\"><block type=\"math_dual_ops\"><field name=\"OP\">MIN</field><value name=\"A\"><block type=\"math_number\"><field name=\"NUM\">0.7</field></block></value><value name=\"B\"><block type=\"math_dual_ops\"><field name=\"OP\">MAX</field><value name=\"A\"><block type=\"math_number\"><field name=\"NUM\">-0.7</field></block></value><value name=\"B\"><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\">vy</field></block></value></block></value></block></value></block></value><next><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\">vz</field></block></value><value name=\"tagValue\"><block type=\"math_dual_ops\"><field name=\"OP\">MIN</field><value name=\"A\"><block type=\"math_number\"><field name=\"NUM\">0.7</field></block></value><value name=\"B\"><block type=\"math_dual_ops\"><field name=\"OP\">MAX</field><value name=\"A\"><block type=\"math_number\"><field name=\"NUM\">-0.7</field></block></value><value name=\"B\"><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\">vz</field></block></value></block></value></block></value></block></value></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></next></block></statement><next><block type=\"controls_if\"><value name=\"IF0\"><block type=\"blockat_is_solid\"><value name=\"x\"><block type=\"coord_x\"></block></value><value name=\"y\"><block type=\"coord_y\"></block></value><value name=\"z\"><block type=\"coord_z\"></block></value></block></value><statement name=\"DO0\"><block type=\"block_add\"><value name=\"block\"><block type=\"mcitem_allblocks\"><field name=\"value\">Blocks.STAINED_GLASS#15</field></block></value><value name=\"x\"><block type=\"coord_x\"></block></value><value name=\"y\"><block type=\"coord_y\"></block></value><value name=\"z\"><block type=\"coord_z\"></block></value></block></statement></block></next></block></next></block></next></block></next></block></next></block></next></block></xml>"
}
}