Skip to content

Conversation

@Owen1212055
Copy link
Contributor

@Owen1212055 Owen1212055 commented Dec 24, 2025

Fixes #1143

This uses an approach similar to what was done with boats where we pretty much track everything about the entity and then spawn it when the entity meta is recieved.

This must be done because the skin data must be sent on the first player info received, which MUST happen after the entity meta is sent in order to grab that info. So, we have to delay spawning the entity.

This also adds tracking for the entity equipment.

I also make sure that this properly supports resending when the skin is changed. This also properly tracks with the name change.

@Owen1212055
Copy link
Contributor Author

One issue I am not really sure about what is going on is that if you join a server with these manniquins it seems the head rotation is wrong.

However, the head rotation is correct when live respawning it, simply not when initially joining the server. So, would love some pointers if possible.

Copy link
Member

@FlorianMichael FlorianMichael left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me now, would appreciate if you could do new lines after if clauses (for example in storeMovementMannequinData)

@Owen1212055
Copy link
Contributor Author

@FlorianMichael Otherwise do you have any comment with the head rotation issue? I'm not too familiar with head rotation with player entities as I vaguely remember there being some syncing issues.

@FlorianMichael
Copy link
Member

Currently doing something else but I already had planned to look at it later :)

@FlorianMichael
Copy link
Member

FlorianMichael commented Dec 24, 2025

Found something else: Your emulation code is assuming that the skin entity data is always send which isn't the case (e.g if the mannequin doesn't have a skin) so right now the mannequin doesn't spawn at all if no skin is set (which is the Vanilla default case with a simple /summon). Currently thinking about how this can be properly handled:

In theory, we would need to always immediately spawn the mannequin and later replace the entity when the skin data is sent. Problem with that is entity id conflicting / it would require even more uglier tracking and hacks.....
Maybe it's easier to just either wait a few seconds for the skin data and then fallback spawn the mannequin or just have the skin support as optional config option?
Still had the pre 1.16 behavior in mind, sorry about that

@FlorianMichael
Copy link
Member

image Not sure if I'm doing something wrong, but I don't get a skin:

/summon mannequin ~ ~ ~ {profile:{"name":"EnZaXD","id":[954437565,-1071166292,-1908981416,1896491133],"properties":[{"name":"textures","value":"ewogICJ0aW1lc3RhbXAiIDogMTc2NjYxNDE0MzA5MSwKICAicHJvZmlsZUlkIiA6ICIzOGUzOGZiZGMwMjc0Y2FjOGUzNzQxNTg3MTBhMjg3ZCIsCiAgInByb2ZpbGVOYW1lIiA6ICJFblphWEQiLAogICJ0ZXh0dXJlcyIgOiB7CiAgICAiU0tJTiIgOiB7CiAgICAgICJ1cmwiIDogImh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZjQ4M2U2MjEzMjBjMWZhMmFhMzIyNjZkMTBiMDRjNzdlZDQxYjY4MDYxZTQ4NTc5MjM5YzZhYjdhODU5Njg2NiIsCiAgICAgICJtZXRhZGF0YSIgOiB7CiAgICAgICAgIm1vZGVsIiA6ICJzbGltIgogICAgICB9CiAgICB9LAogICAgIkNBUEUiIDogewogICAgICAidXJsIiA6ICJodHRwOi8vdGV4dHVyZXMubWluZWNyYWZ0Lm5ldC90ZXh0dXJlL2EzZjZlNGYxNDgwMWYzZWE1NWUzZDk1YjliNGVmM2I1ZTg4MDJkOTQ3ZjY2OWRlOTNkNmVjNGI5MzU0YTQzNmIiCiAgICB9CiAgfQp9"}]}}

@Owen1212055
Copy link
Contributor Author

Owen1212055 commented Dec 25, 2025

image Not sure if I'm doing something wrong, but I don't get a skin:
/summon mannequin ~ ~ ~ {profile:{"name":"EnZaXD","id":[954437565,-1071166292,-1908981416,1896491133],"properties":[{"name":"textures","value":"ewogICJ0aW1lc3RhbXAiIDogMTc2NjYxNDE0MzA5MSwKICAicHJvZmlsZUlkIiA6ICIzOGUzOGZiZGMwMjc0Y2FjOGUzNzQxNTg3MTBhMjg3ZCIsCiAgInByb2ZpbGVOYW1lIiA6ICJFblphWEQiLAogICJ0ZXh0dXJlcyIgOiB7CiAgICAiU0tJTiIgOiB7CiAgICAgICJ1cmwiIDogImh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZjQ4M2U2MjEzMjBjMWZhMmFhMzIyNjZkMTBiMDRjNzdlZDQxYjY4MDYxZTQ4NTc5MjM5YzZhYjdhODU5Njg2NiIsCiAgICAgICJtZXRhZGF0YSIgOiB7CiAgICAgICAgIm1vZGVsIiA6ICJzbGltIgogICAgICB9CiAgICB9LAogICAgIkNBUEUiIDogewogICAgICAidXJsIiA6ICJodHRwOi8vdGV4dHVyZXMubWluZWNyYWZ0Lm5ldC90ZXh0dXJlL2EzZjZlNGYxNDgwMWYzZWE1NWUzZDk1YjliNGVmM2I1ZTg4MDJkOTQ3ZjY2OWRlOTNkNmVjNGI5MzU0YTQzNmIiCiAgICB9CiAgfQp9"}]}}

You need a signature. The client cannot display skins that dont have signatures cause of player entities funnyness.

@Owen1212055
Copy link
Contributor Author

Found something else: Your emulation code is assuming that the skin entity data is always send which isn't the case (e.g if the mannequin doesn't have a skin) so right now the mannequin doesn't spawn at all if no skin is set (which is the Vanilla default case with a simple /summon). Currently thinking about how this can be properly handled:

That is a good point... hm... I am not quite sure however what the best way to solve this is? Do you have any opinions?

@FlorianMichael
Copy link
Member

Yeah I already had a fix in my mind locally, will try it out and push to here if it works. Also head rotations seem fine to me, but I noticed that the remapping of ROTATE_HEAD is wrong.

@FlorianMichael
Copy link
Member

FlorianMichael commented Dec 25, 2025

image Not sure if I'm doing something wrong, but I don't get a skin:
/summon mannequin ~ ~ ~ {profile:{"name":"EnZaXD","id":[954437565,-1071166292,-1908981416,1896491133],"properties":[{"name":"textures","value":"ewogICJ0aW1lc3RhbXAiIDogMTc2NjYxNDE0MzA5MSwKICAicHJvZmlsZUlkIiA6ICIzOGUzOGZiZGMwMjc0Y2FjOGUzNzQxNTg3MTBhMjg3ZCIsCiAgInByb2ZpbGVOYW1lIiA6ICJFblphWEQiLAogICJ0ZXh0dXJlcyIgOiB7CiAgICAiU0tJTiIgOiB7CiAgICAgICJ1cmwiIDogImh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZjQ4M2U2MjEzMjBjMWZhMmFhMzIyNjZkMTBiMDRjNzdlZDQxYjY4MDYxZTQ4NTc5MjM5YzZhYjdhODU5Njg2NiIsCiAgICAgICJtZXRhZGF0YSIgOiB7CiAgICAgICAgIm1vZGVsIiA6ICJzbGltIgogICAgICB9CiAgICB9LAogICAgIkNBUEUiIDogewogICAgICAidXJsIiA6ICJodHRwOi8vdGV4dHVyZXMubWluZWNyYWZ0Lm5ldC90ZXh0dXJlL2EzZjZlNGYxNDgwMWYzZWE1NWUzZDk1YjliNGVmM2I1ZTg4MDJkOTQ3ZjY2OWRlOTNkNmVjNGI5MzU0YTQzNmIiCiAgICB9CiAgfQp9"}]}}

You need a signature. The client cannot display skins that dont have signatures cause of player entities funnyness.

Hmm they shouldn't be needed though. It works like this in Vanilla, even without the properties/id part. But yeah I guess that's too hard to fix. Pushed a fix to the other issue now.

@FlorianMichael
Copy link
Member

head rotations should also be fixed now :)

@Owen1212055
Copy link
Contributor Author

Thank you! I will just test and double check.

@Owen1212055
Copy link
Contributor Author

After testing, seems good!

Fix head yaw type
Some other cleanup
@kennytv
Copy link
Member

kennytv commented Dec 26, 2025

What you used when going from byte to float was the wrong way around, that's where the issues came from (all yaw pitch and headyaw)

Copy link
Member

@kennytv kennytv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good now

@kennytv kennytv merged commit 9a79f9e into ViaVersion:master Dec 26, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mannequin skins not visible on 1.21.8 and older clients

3 participants