Head rotation works alright on 1.13+
Head rotation on 1.8 does not.
Some tests:
/ph setblock ~ 0 84 0 #skeleton north floor
results in a wall-head facing north
/ph setblock ~ 0 84 0 #skeleton east floor
results in a floor-head facing northeast
/ph setblock ~ 0 84 0 #skeleton south floor
(result: floor east-southeast)
/ph setblock ~ 0 84 0 #skeleton west floor
(result: floor west-southwest)
/ph setblock ~ 0 84 0 #skeleton south_south_west floor
(result: floor south-south-west - CORRECT)
And concerningly, some results depended on the prior state:
/ph setblock ~ 0 84 0 #skeleton south wall
(after north floor
: north wall unchanged result)
/ph setblock ~ 0 84 0 #skeleton south wall
(after south floor
: east floor)
Some positions were indeterminant / updated only after a prior position update.
same behavior with a username head and custom-textured head.
Logs:
north floor
[12:26:12 INFO]: crashdemons issued server command: /ph setblock ~ 0 84 0 #skeleton north floor
[12:26:12 INFO]: [PlayerHeads] setblock FLOOR NORTH
[12:26:12 INFO]: [PlayerHeads] setblock profile null null null
[12:26:12 INFO]: SkullDetails setblock - got material SKULL for attachment FLOOR rot NORTH
[12:26:12 INFO]: LegacyData set on block NORTH FLOOR => FLOOR
[12:26:12 INFO]: MaterialData set to rotation NORTH
[12:26:12 INFO]: SkullState set to rotation NORTH
[12:26:12 INFO]: SkullType set to rotation SKELETON
[12:26:12 WARN]: [PlayerHeads] Blockstate wasn't a skull or profile wasn't valid true false
south floor
[12:27:08 INFO]: crashdemons issued server command: /ph setblock ~ 0 84 0 #skeleton south floor
[12:27:08 INFO]: [PlayerHeads] setblock FLOOR SOUTH
[12:27:08 INFO]: [PlayerHeads] setblock profile null null null
[12:27:08 INFO]: SkullDetails setblock - got material SKULL for attachment FLOOR rot SOUTH
[12:27:08 INFO]: LegacyData set on block SOUTH FLOOR => FLOOR
[12:27:08 INFO]: MaterialData set to rotation SOUTH
[12:27:08 INFO]: SkullState set to rotation SOUTH
[12:27:08 INFO]: SkullType set to rotation SKELETON
[12:27:08 WARN]: [PlayerHeads] Blockstate wasn't a skull or profile wasn't valid true false
south wall
(after north floor
)
[12:31:56 INFO]: crashdemons issued server command: /ph setblock ~ 0 84 0 #skeleton south wall
[12:31:56 INFO]: [PlayerHeads] setblock WALL SOUTH
[12:31:56 INFO]: [PlayerHeads] setblock profile null null null
[12:31:56 INFO]: SkullDetails setblock - got material SKULL for attachment WALL rot SOUTH
[12:31:56 INFO]: LegacyData set on block SOUTH WALL => WALL_SOUTH
[12:31:56 INFO]: LegacyData did not need additional tile data
[12:31:56 INFO]: SkullType set to rotation SKELETON
[12:31:56 WARN]: [PlayerHeads] Blockstate wasn't a skull or profile wasn't valid true false
south wall
(after south floor
) - final direction was different than above.
[12:35:12 INFO]: crashdemons issued server command: /ph setblock ~ 0 84 0 #skeleton south wall
[12:35:12 INFO]: [PlayerHeads] setblock WALL SOUTH
[12:35:12 INFO]: [PlayerHeads] setblock profile null null null
[12:35:12 INFO]: SkullDetails setblock - got material SKULL for attachment WALL rot SOUTH
[12:35:12 INFO]: LegacyData set on block SOUTH WALL => WALL_SOUTH
[12:35:12 INFO]: LegacyData did not need additional tile data
[12:35:12 INFO]: SkullType set to rotation SKELETON
[12:35:12 WARN]: [PlayerHeads] Blockstate wasn't a skull or profile wasn't valid true false
matters are probably complicated by having 3 types of rotation:
A. raw block datavalue (LegacyHeadData) - ref https://bukkit.org/threads/setting-blocktype-to-skull-places-a-bugged-skull-fix.145637/
FLOOR(0x1,true),// On the floor (rotation is stored in the tile entity)
WALL_NORTH(0x2,false),// On a wall, facing north
WALL_SOUTH(0x3,false),// On a wall, facing south
WALL_EAST(0x4,false),// On a wall, facing east
WALL_WEST(0x5,false)// On a wall, facing west
B. Skull (MaterialData, Directional) : setFacingDirection
C. Skull (BlockState) : setRotation
note that the latter two are only changed when the attachment is FLOOR, since it was indicated by a few posts that orientation was only needed on Floor heads...
so if this actually needs to be updated when not floor, that would explain a lot