Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- global_overworld = 'overworld';
- global_nether = 'the_nether';
- global_valid_dims = {global_overworld, global_nether};
- __config() -> {
- 'commands' ->
- {
- '' -> _() -> main(),
- }
- };
- main() -> (
- print('this is a root call');
- player = player();
- dim = query(player, 'dimension');
- other_dim;
- print('dim: ' + dim);
- if (!has(global_valid_dims, dim), print('Markers can only be created while in the nether or the overworld'); return(););
- oCoords;
- nCoords;
- if (dim == global_overworld, (
- other_dim = global_nether;
- oCoords = query(player, 'pos');
- delete(oCoords, 1); //delete y
- nCoords = [];
- for (oCoords, (
- put(nCoords, _i, _/8);
- ));
- print('oCoords: ' + oCoords);
- print('nCoords: ' + nCoords);
- ), //else
- (
- other_dim = global_overworld;
- nCoords = query(player, 'pos');
- delete(nCoords, 1); //delete y
- oCoords = [];
- for (nCoords, (
- put(oCoords, _i, _*8);
- ));
- ));
- in_dimension(global_overworld, draw_shape('line', -1,
- {
- 'from' -> [get(oCoords, 0), 0, get(oCoords, 1)],
- 'to' -> [get(oCoords, 0), 255, get(oCoords, 1)]
- }));
- in_dimension(global_nether, draw_shape('line', -1,
- {
- 'from' -> [get(nCoords, 0), 0, get(nCoords, 1)],
- 'to' -> [get(nCoords, 0), 255, get(nCoords, 1)]
- }));
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement