Fix execute source dimension for player teleports

This commit is contained in:
LookImEcho-Rick
2026-10-17 21:08:53 -05:00
parent e4f8154cb4
commit c1211b2245
6 changed files with 108 additions and 26 deletions
+22
View File
@@ -391,6 +391,28 @@ def execute():
*setup('/kill @e[type=minecraft:armor_stand]', '/setblock 4 210 4 minecraft:air', '/setblock 5 210 5 minecraft:air',
'/scoreboard objectives remove exec', '/tp @s 8.5 230 8.5 0 0'),
{'op': 'tick', 'n': 25},
*setup('/gamemode spectator'),
cmd('/execute in minecraft:the_nether if dimension minecraft:the_nether run say source dimension'),
cmd('/execute in minecraft:the_nether at @s if dimension minecraft:overworld run say entity dimension'),
cmd('/execute in minecraft:the_nether positioned as @s if dimension minecraft:the_nether run say position only'),
cmd('/execute in minecraft:the_nether if loaded 0 100 0'),
cmd('/execute in minecraft:the_nether run tp @s 0 100 0'),
{'op': 'settle'},
cmd('/execute if dimension minecraft:the_nether run say dimension switched'),
cmd('/data get entity @s Pos'),
cmd('/execute in minecraft:the_nether positioned 80 100 -40 in minecraft:overworld run tp @s ~ ~ ~'),
{'op': 'settle'},
cmd('/execute if dimension minecraft:overworld run say relative dimension'),
cmd('/data get entity @s Pos'),
cmd('/execute in minecraft:overworld positioned 80 100 -40 in minecraft:the_nether run tp @s ~ ~ ~ 45 30'),
{'op': 'settle'},
cmd('/data get entity @s Pos'),
cmd('/data get entity @s Rotation'),
cmd('/execute in minecraft:overworld run tp @s 8.5 230 8.5'),
{'op': 'settle'},
cmd('/execute if dimension minecraft:overworld run say dimension restored'),
cmd('/data get entity @s Pos'),
*setup('/gamemode creative'),
]