[SPIGOT-619] setYaw() yields no result Created: 26/Feb/15 Updated: 19/May/17 Resolved: 23/Nov/16 |
|
Status: | Resolved |
Project: | Spigot |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Bug | Priority: | Minor |
Reporter: | PikaMug | Assignee: | md_5 |
Resolution: | Fixed | Votes: | 4 |
Labels: | 1.8, bukkit, entity, spigot | ||
Environment: |
Tested with slimes on Win7 and CentOS |
Attachments: |
![]() |
||||||||
Issue Links: |
|
Description |
This seems to be a long-standing issue. When the body rotation (yaw) of a monster entity (and possibly other entities) is set, it does not update in-game. Several forum suggestions include teleporting the entity after setYaw(), setting yaw before spawning the entity, and using NMS code, all with limited or no results. Same result with /summon command. Sources: |
Comments |
Comment by PikaMug [ 14/Apr/15 ] |
Thanks md_5! The easy solution is to enable it with NoAI:0, set the yaw, then disable again. However, this is counter-intuitive and causes a slight visual delay in the rotation. |
Comment by Tarkan Nielsen [ 13/Apr/15 ] |
The problem here is that we'd like to be able to rotate the NoAI mobs, which isn't currently possible in Spigot (I however know that NoAI mobs work as intended in Vanilla). I feel that this is a problem due to the fact that even using the inbuilt command to summon a NoAI mob (which I believe is /summon <EntityType> {NoAI:1}, which works flawlessly in vanilla) should set the yaw of the player using the command, however, this is not the case, what ends up happening instead is rather a fixed yaw which if I recall correctly is facing south. I'd greatly appreciate if you were to re-consider this bug due to the fact that it breaks a functionality that is present in Vanilla and encourages developers into using "hacky" methods such as manipulating packets to trick the client into thinking the entity is facing the given way, just to work around this silly bug. |
Comment by md_5 [ 12/Apr/15 ] |
I tested your plugin (after removing the NoAI part) and the slime rotates as expected. |
Comment by PikaMug [ 12/Apr/15 ] |
Still an issue on CraftBukkit version git-Spigot-2f787bd-501372f (MC: 1.8.3) |
Comment by PikaMug [ 13/Mar/15 ] |
Thanks, noted. Attempt #2 should work, though, correct? |
Comment by md_5 [ 13/Mar/15 ] |
Attempt #1 will never work btw, since location handles are not reflective of the entities location. |
Comment by PikaMug [ 13/Mar/15 ] |
I've attached a 1.8.3 test jar which tries to set a Slime's yaw using two methods to no avail. To test, left-click a block to place a Slime above it, then right-click a BLOCK (not the Slime, or Air per |