Skript: Teleporting ignores yaw + pitch?

Created on 3 Dec 2017  路  21Comments  路  Source: SkriptLang/Skript

I have locations saved into variables which used to teleport players to the location I set (with north south location respected) Now in dev32b it just teleports player looking at the north with is rather annoying... Having to turn around every time when you spawn (get teleported) is just plain stupid.

bug completed low

Most helpful comment

Weird, but this happens only when the yaw or pitch is 0, 90, 180, 270 or 360. For example 360.01 will work and it will be 360 in the game.

Related to https://github.com/SkriptLang/Skript/blob/master/src/main/java/ch/njol/skript/effects/EffTeleport.java#L105

All 21 comments

What version were you using before?

2.2-dev29

Oh. That is weird... Same server version, right?

I'm not sure - I might have updated to 1.12.2

Can anyone else reproduce this with dev32 on 1.12.2?

i can reproduce it, although its on 1.8:

also confirmed on 1.12:

This is not an error on the latest build of Skript 1.12.2 or a bug

@GrimEpp can you provide a screenshot? i reproduced it on dev32d.

having this issue also. generally setting the yaw of an entity doesn't work for me, but won't throw any bugs either. for instance:

set victim's yaw to attacker's yaw

nothing

@jaylawl that's a expected behaviour, as you have to teleport the entity to actually change it.

If setting the yaw/pitch of an entity isn't supposed to work then it should be changed so that setters for it don't parse. It should be disallowed & give a warning saying to use teleportation instead. Unless I'm misunderstanding something.

Or, I could make it so when you set the yaw/pitch of an entity it also teleports the entity, either way works.

That works too!

shouldn't this be bug not enhancement? this used to work

Weird, but this happens only when the yaw or pitch is 0, 90, 180, 270 or 360. For example 360.01 will work and it will be 360 in the game.

Related to https://github.com/SkriptLang/Skript/blob/master/src/main/java/ch/njol/skript/effects/EffTeleport.java#L105

Adding priority for this issue since it still occurs on Skript 2.4 / Spigot 1.14.4 2 years after the issue was made...

According to my testing, even using values like 0.00001 will work, but not 0.

Could maybe make the effect something like teleport %entities% (to|%direction%) %location% [directionally], ignore direction unless directionally is present?

It's 2020 now and still not fixed. :-(

I鈥檒l open a PR soon to fix this issue.

Was this page helpful?
0 / 5 - 0 ratings