vore-mod/elements/GetDimensionTPID.mod.json

7 lines
No EOL
6.7 KiB
JSON

{
"_fv": 34,
"_type": "procedure",
"definition": {
"procedurexml": "<xml xmlns=\"https://developers.google.com/blockly/xml\"><variables><variable type=\"String\" id=\"dimid\">dimid</variable></variables><block type=\"entity_dimension_id\" x=\"0\" y=\"0\"><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block><block type=\"get_dimensionid\" x=\"0\" y=\"0\"><field name=\"dimension\">Surface</field></block><block type=\"entity_dimension_id\" x=\"0\" y=\"0\"><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block><block type=\"get_dimensionid\" x=\"0\" y=\"0\"><field name=\"dimension\">Nether</field></block><block type=\"entity_dimension_id\" x=\"0\" y=\"0\"><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block><block type=\"get_dimensionid\" x=\"0\" y=\"0\"><field name=\"dimension\">End</field></block><block type=\"entity_dimension_id\" x=\"0\" y=\"0\"><value name=\"entity\"><block type=\"entity_from_deps\"></block></value></block><block type=\"get_dimensionid\" x=\"0\" y=\"0\"><field name=\"dimension\">CUSTOM:Belly</field></block><block type=\"event_trigger\" deletable=\"false\" x=\"605\" y=\"280\"><field name=\"trigger\">no_ext_trigger</field><comment pinned=\"false\" h=\"94\" w=\"350\">This is used by the mod when creating the TP return command for when you leave the belly.\nIt converts the dimension id into the namespace for a minecraft command but only works for vanilla and this mod's dimensions.</comment><next><block type=\"controls_if\"><mutation elseif=\"3\" else=\"1\"></mutation><value name=\"IF0\"><block type=\"compare_dimensionids\"><value name=\"a\"><block type=\"world_data_dimensionid\"></block></value><value name=\"b\"><block type=\"get_dimensionid\"><field name=\"dimension\">Surface</field></block></value></block></value><statement name=\"DO0\"><block type=\"variables_set_string\"><mutation xmlns=\"http://www.w3.org/1999/xhtml\" is_player_var=\"false\" has_entity=\"false\"></mutation><field name=\"VAR\">local:dimid</field><value name=\"VAL\"><block type=\"text\"><field name=\"TEXT\">minecraft:overworld</field></block></value></block></statement><value name=\"IF1\"><block type=\"compare_dimensionids\"><value name=\"a\"><block type=\"world_data_dimensionid\"></block></value><value name=\"b\"><block type=\"get_dimensionid\"><field name=\"dimension\">Nether</field></block></value></block></value><statement name=\"DO1\"><block type=\"variables_set_string\"><mutation xmlns=\"http://www.w3.org/1999/xhtml\" is_player_var=\"false\" has_entity=\"false\"></mutation><field name=\"VAR\">local:dimid</field><value name=\"VAL\"><block type=\"text\"><field name=\"TEXT\">minecraft:the_nether</field></block></value></block></statement><value name=\"IF2\"><block type=\"compare_dimensionids\"><value name=\"a\"><block type=\"world_data_dimensionid\"></block></value><value name=\"b\"><block type=\"get_dimensionid\"><field name=\"dimension\">End</field></block></value></block></value><statement name=\"DO2\"><block type=\"variables_set_string\"><mutation xmlns=\"http://www.w3.org/1999/xhtml\" is_player_var=\"false\" has_entity=\"false\"></mutation><field name=\"VAR\">local:dimid</field><value name=\"VAL\"><block type=\"text\"><field name=\"TEXT\">minecraft:the_end</field></block></value></block></statement><value name=\"IF3\"><block type=\"compare_dimensionids\"><value name=\"a\"><block type=\"world_data_dimensionid\"></block></value><value name=\"b\"><block type=\"get_dimensionid\"><field name=\"dimension\">CUSTOM:Belly</field></block></value></block></value><statement name=\"DO3\"><block type=\"variables_set_string\"><mutation xmlns=\"http://www.w3.org/1999/xhtml\" is_player_var=\"false\" has_entity=\"false\"></mutation><field name=\"VAR\">local:dimid</field><value name=\"VAL\"><block type=\"text\"><field name=\"TEXT\">vore_mod:belly</field></block></value></block></statement><statement name=\"ELSE\"><block type=\"variables_set_string\"><mutation xmlns=\"http://www.w3.org/1999/xhtml\" is_player_var=\"false\" has_entity=\"false\"></mutation><field name=\"VAR\">local:dimid</field><comment pinned=\"false\" h=\"95\" w=\"186\">dumb workaround to obtain the id of other dimensions like those from other mods or datapacks</comment><value name=\"VAL\"><block type=\"text_replace\" inline=\"false\"><value name=\"what\"><block type=\"text\"><field name=\"TEXT\">ResourceKey[minecraft:dimension / </field></block></value><value name=\"with\"><block type=\"text\"><field name=\"TEXT\"></field></block></value><value name=\"text\"><block type=\"text_replace\" inline=\"false\"><value name=\"what\"><block type=\"text\"><field name=\"TEXT\">]</field></block></value><value name=\"with\"><block type=\"text\"><field name=\"TEXT\"></field></block></value><value name=\"text\"><block type=\"text_join\"><mutation items=\"1\"></mutation><value name=\"ADD0\"><block type=\"world_data_dimensionid\"></block></value></block></value></block></value></block></value></block></statement><next><block type=\"controls_if\"><value name=\"IF0\"><block type=\"world_data_logic_getgamerule\"><field name=\"gamerulesboolean\">CUSTOM:Vorebose</field></block></value><statement name=\"DO0\"><block type=\"text_print\"><value name=\"TEXT\"><block type=\"text_replace\" inline=\"false\"><value name=\"what\"><block type=\"text\"><field name=\"TEXT\">ResourceKey[minecraft:dimension / </field></block></value><value name=\"with\"><block type=\"text\"><field name=\"TEXT\"></field></block></value><value name=\"text\"><block type=\"text_replace\" inline=\"false\"><value name=\"what\"><block type=\"text\"><field name=\"TEXT\">]</field></block></value><value name=\"with\"><block type=\"text\"><field name=\"TEXT\"></field></block></value><value name=\"text\"><block type=\"text_join\"><mutation items=\"1\"></mutation><value name=\"ADD0\"><block type=\"world_data_dimensionid\"></block></value></block></value></block></value></block></value></block></statement><next><block type=\"return_string\"><value name=\"return\"><block type=\"variables_get_string\"><mutation xmlns=\"http://www.w3.org/1999/xhtml\" is_player_var=\"false\" has_entity=\"false\"></mutation><field name=\"VAR\">local:dimid</field></block></value></block></next></block></next></block></next></block><block type=\"variables_set_string\" x=\"1150\" y=\"453\"><mutation xmlns=\"http://www.w3.org/1999/xhtml\" is_player_var=\"false\" has_entity=\"false\"></mutation><field name=\"VAR\">local:dimid</field><value name=\"VAL\"><block type=\"text\"><field name=\"TEXT\">error</field></block></value><next><block type=\"console_log\"><field name=\"message_type\">error</field><value name=\"message\"><block type=\"text\"><field name=\"TEXT\">[Vore Mod] Error: unknown dimension</field></block></value></block></next></block><block type=\"world_data_dimensionid\" x=\"1195\" y=\"723\"></block></xml>"
}
}