Teleporting an entity riding another doesn't work properly
yrsegal opened this issue ยท 6 comments
There are a few possible solutions to this. Some examples
- Teleporting an entity riding something else dismounts that entity and teleports it
- Pro: Teleporting a player out of a cart would make sense conceptually
- YMMV: Teleporting a minecart teleports the player in it
- Con: Teleporting a Create contraption probably would have strange and unexpected effects
- Teleporting an entity removes it from the entity stack (breaking it into below/above) and teleports it
- Pro: Teleporting an entity out of a stack makes total sense conceptually - only it goes
- YMMV: Teleporting a minecart doesn't teleport the player
- Con: Create Contraptions probably act weird
- Teleporting an entity riding something else teleports the entire entity stack
- Pro: Create contraptions work great
- YMMV: Minecart teleporting
- Con: Teleporting a zombie jockey takes the chicken with it
- Teleporting an entity riding something else mishaps
- YMMV: Current behavior, but formalized.
whoops
I'm inclined to say option 2, but with a tag to activate option 3 for given entity IDs like contraptions.
Hey come to think of it, are Botania spectral-rail-ed minecarts a separate entity? That could be a really cool interaction! If you can get the timing down enough you can teleport the minecart while it's midair hell I'll let you keep your items)
the spectral rail effect is just a component/capability attached to the minecart - presumably it also flips the nogravity flag
the entity "teleports" and then snaps back immediately. Which is great when you're doing it to yourself and your items splatter at the destination...