Pocketmine-mp: LegacySkinAdapter $height and $width are switched

Created on 12 May 2020  ·  6Comments  ·  Source: pmmp/PocketMine-MP

All 6 comments

legacy skin adapter detects the height and width so I'm not really sure what you're trying to point out.

Should've taken a minute more to fill this issue.
return new self takes the parameters in this order:

  • height
  • width
  • data

Normally skins are either wide (64w 32h) or square (64w 64h).

This means that in PocketMine-MP the $height and $width values are switched around when constructing from the referenced lines, resulting in (32w 64h) values

This is odd. If this is true I suspect this isn't the only place they are the wrong way round, because legacy skins work just fine in game.

I must admit I do not understand where the fault is here. I suspect the bug is actually in MCPE itself, because despite being clearly wrong in the construction, the fields are written in the correct order at the protocol layer and bizarrely still work correctly. So, it needs to be investigated whether MCPE itself has these height/width the wrong way round at the protocol layer.

It seems like the client has its own h/w auto detect irrespective of the parameters provided by the server. I tested with flipped and non-flipped h/w and the skin was rendered correctly anyway regardless.

That weird client.
Thanks for the change anyways 👍🏻

Was this page helpful?
0 / 5 - 0 ratings

Related issues

SuperAdam47 picture SuperAdam47  ·  3Comments

sergeysova picture sergeysova  ·  3Comments

TheDiamondYT1 picture TheDiamondYT1  ·  3Comments

dktapps picture dktapps  ·  3Comments

Hugheth picture Hugheth  ·  3Comments