vore-mod/elements/GetDimensionTPID.mod.json
2024-03-13 00:29:55 -04:00

7 lines
No EOL
6.6 KiB
JSON

{
"_fv": 57,
"_type": "procedure",
"definition": {
"procedurexml": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?><xml xmlns=\"https://developers.google.com/blockly/xml\"><variables><variable id=\"dimid\" type=\"String\">dimid</variable></variables><block type=\"entity_dimension_id\" x=\"0\" y=\"0\"><value name=\"entity\"><block type=\"entity_from_deps\"/></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\"/></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\"/></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\"/></value></block><block type=\"get_dimensionid\" x=\"0\" y=\"0\"><field name=\"dimension\">CUSTOM:Belly</field></block><block deletable=\"false\" type=\"event_trigger\" x=\"605\" y=\"280\"><field name=\"trigger\">no_ext_trigger</field><comment h=\"94\" pinned=\"false\" 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 else=\"1\" elseif=\"3\"/><value name=\"IF0\"><block type=\"compare_dimensionids\"><value name=\"a\"><block type=\"world_data_dimensionid\"/></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\" has_entity=\"false\" is_player_var=\"false\"/><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\"/></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\" has_entity=\"false\" is_player_var=\"false\"/><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\"/></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\" has_entity=\"false\" is_player_var=\"false\"/><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\"/></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\" has_entity=\"false\" is_player_var=\"false\"/><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\" has_entity=\"false\" is_player_var=\"false\"/><field name=\"VAR\">local:dimid</field><comment h=\"95\" pinned=\"false\" w=\"186\">dumb workaround to obtain the id of other dimensions like those from other mods or datapacks</comment><value name=\"VAL\"><block inline=\"false\" type=\"text_replace\"><value name=\"what\"><block type=\"text\"><field name=\"TEXT\">ResourceKey[minecraft:dimension / </field></block></value><value name=\"with\"><block type=\"text\"><field name=\"TEXT\"/></block></value><value name=\"text\"><block inline=\"false\" type=\"text_replace\"><value name=\"what\"><block type=\"text\"><field name=\"TEXT\">]</field></block></value><value name=\"with\"><block type=\"text\"><field name=\"TEXT\"/></block></value><value name=\"text\"><block type=\"text_join\"><mutation items=\"1\"/><value name=\"ADD0\"><block type=\"world_data_dimensionid\"/></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 inline=\"false\" type=\"text_replace\"><value name=\"what\"><block type=\"text\"><field name=\"TEXT\">ResourceKey[minecraft:dimension / </field></block></value><value name=\"with\"><block type=\"text\"><field name=\"TEXT\"/></block></value><value name=\"text\"><block inline=\"false\" type=\"text_replace\"><value name=\"what\"><block type=\"text\"><field name=\"TEXT\">]</field></block></value><value name=\"with\"><block type=\"text\"><field name=\"TEXT\"/></block></value><value name=\"text\"><block type=\"text_join\"><mutation items=\"1\"/><value name=\"ADD0\"><block type=\"world_data_dimensionid\"/></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\" has_entity=\"false\" is_player_var=\"false\"/><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\" has_entity=\"false\" is_player_var=\"false\"/><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\"/></xml>"
}
}