Hello, I have a problem where I can't teleport an entity a long distance of Y(testing with chest_minecart) correctly.
What I am doing:
1,place the chest_minecart with tag:a at 100, 100, 100. /forceload the chunk to keep it loaded.
2,player leaves the location (moves to the_end)
3,at the_end, run /execute in minecraft:overworld as @e[tag=a] at @s run tp @s ~ 0 ~
what I get: a chest_minecart that is at 100,100,100 while having it's nbt tag Pos[1] 0.
I can check this from the_end accordingly:
/execute in minecraft:overworld positioned 100 0 100 if entity @e[tag=a,distance=..1] >> result:fail
/execute in minecraft:overworld positioned 100 0 100 if entity @e[tag=a,distance=..50] >> result:fail
/execute in minecraft:overworld positioned 100 0 100 if entity @e[tag=a,distance=..100] >> result:success(1)
/execute as @e[tag=a] run data get entity @s Pos[1] >> result:0.0d
The said cart does not actually move to 100,0,100 untill I move to overworld.
for additional info, testing with distance=..93~99 sometimes result in success.
Does anyone know if there is any way to update such entity position, with player staying where they are? please help.
I don't know if you know this but, block 0 is where bedrock is. If you teleport the minecart to block 0, it will fall through the bedrock so that's why you are getting a result: fail
yes, i do know that, and the minecart has the invulnerable and NoGravity tag on.
note that i'm getting a success when i set the distance selector to ..100, so the entity is alive and loaded, therefore providing its nbt data on the next line.
thanks for your reply though.
these commands are all run through the chat in-game btw.
further experimenting showed that which ever direction on the Y-axis the minecart moves, any amount further from the original position(position where it was when the player was last in the overworld) than 20 will result with the same problem.(problem being here, the minecart not being at it's nbt data's Pos, but instead is in the original position.)
yes, i do know that, and the minecart has the invulnerable and NoGravity tag on.
note that i'm getting a success when i set the distance selector to ..100, so the entity is alive and loaded, therefore providing its nbt data on the next line.
thanks for your reply though.
these commands are all run through the chat in-game btw.
further experimenting showed that which ever direction on the Y-axis the minecart moves, any amount further from the original position(position where it was when the player was last in the overworld) than 20 will result with the same problem.(problem being here, the minecart not being at it's nbt data's Pos, but instead is in the original position.)
I've tried the same thing with an armor stand but couldn't really tell if it moved 5 blocks or not but I got a confirmation in chat saying it was teleported.
I don't know much about this since I never really use cross-dimensional commands
Edit:this is in 1.13.2 java minecraft.
Hello, I have a problem where I can't teleport an entity a long distance of Y(testing with chest_minecart) correctly.
What I am doing:
1,place the chest_minecart with tag:a at 100, 100, 100. /forceload the chunk to keep it loaded.
2,player leaves the location (moves to the_end)
3,at the_end, run /execute in minecraft:overworld as @e[tag=a] at @s run tp @s ~ 0 ~
what I get: a chest_minecart that is at 100,100,100 while having it's nbt tag Pos[1] 0.
I can check this from the_end accordingly:
/execute in minecraft:overworld positioned 100 0 100 if entity @e[tag=a,distance=..1] >> result:fail
/execute in minecraft:overworld positioned 100 0 100 if entity @e[tag=a,distance=..50] >> result:fail
/execute in minecraft:overworld positioned 100 0 100 if entity @e[tag=a,distance=..100] >> result:success(1)
/execute as @e[tag=a] run data get entity @s Pos[1] >> result:0.0d
The said cart does not actually move to 100,0,100 untill I move to overworld.
for additional info, testing with distance=..93~99 sometimes result in success.
Does anyone know if there is any way to update such entity position, with player staying where they are? please help.
I don't know if you know this but, block 0 is where bedrock is. If you teleport the minecart to block 0, it will fall through the bedrock so that's why you are getting a result: fail
Command block engineer // Developer // #TeamTrees
yes, i do know that, and the minecart has the invulnerable and NoGravity tag on.
note that i'm getting a success when i set the distance selector to ..100, so the entity is alive and loaded, therefore providing its nbt data on the next line.
thanks for your reply though.
these commands are all run through the chat in-game btw.
further experimenting showed that which ever direction on the Y-axis the minecart moves, any amount further from the original position(position where it was when the player was last in the overworld) than 20 will result with the same problem.(problem being here, the minecart not being at it's nbt data's Pos, but instead is in the original position.)
I've tried the same thing with an armor stand but couldn't really tell if it moved 5 blocks or not but I got a confirmation in chat saying it was teleported.
I don't know much about this since I never really use cross-dimensional commands
Command block engineer // Developer // #TeamTrees
yeah, it says its teleported, itsnbt data also says it moved. but when i run
/execute as @e[tag=a,limit=1] at @s if entity @e[distance=..1]
(tag=a being my chest_minecart), it doesn't even give an answer. idk, really.
not sure if it's the same with armorstands also, ive been working on chest minecarts and they act strange.