SportBukkit icon indicating copy to clipboard operation
SportBukkit copied to clipboard

Fix skull items not displaying skins

Open ShinyDialga opened this issue 9 years ago • 9 comments

In 1.8, they added player skull previews to the inventory item. Currently, if you use SkullMeta in order to have a custom SkullOwner, it'll appear in the inventory as a steve skin (it looks like the SkullOwner when placed down though). This patch uses TileEntitySkull.b() to update the skin, and it won't update skin inventory items if it is disabled in bukkit.yml (fetch-skulls) because of the base b method.

Before patch: image

After patch: image

The skulls in the screenshots use the same method (SkullMeta setSkullOwner()), and both have the fetch-skulls setting enabled in bukkit.yml. Thanks.

ShinyDialga avatar May 18 '15 02:05 ShinyDialga

So this PR respects the fetch-skins setting? These skins are populated when the world (er, chunk) is loaded?

tonybruess avatar May 18 '15 02:05 tonybruess

Yes, if fetch-skins is set to false, it won't render the skins. It looks like this: image

The skins are loaded when they're called in the SkullMeta.

ShinyDialga avatar May 18 '15 02:05 ShinyDialga

There are a few lines that remove this which is unnecessary.

Yukon avatar May 21 '15 16:05 Yukon

Sorry about that, wasn't sure if it was necessary as I wanted it the same throughout. I'll see if I can fix it later.

ShinyDialga avatar May 22 '15 16:05 ShinyDialga

@tonybruess @jedediah Would it be possible to get this merged? I'd like to file a PR after this gets merged to expand on the current Skull API to support setting Skull owners by UUID rather than only by usernames.

ryanwarsaw avatar Dec 29 '15 16:12 ryanwarsaw

If the unnecessary diffs get fixed, I'll merge it.

jedediah avatar Dec 29 '15 21:12 jedediah

Feel free to do whatever with this patch. I don't even know if I have the code anymore. I didn't look hard, but maybe you could find what Spigot used to fix this as theirs works.

ShinyDialga avatar Dec 29 '15 22:12 ShinyDialga

@ShinyDialga If you're cool with this, I can file a new PR with these changes + diffs and also take a look at how Spigot fixes this issue, this weekend.

ryanwarsaw avatar Dec 29 '15 23:12 ryanwarsaw

Go for it

ShinyDialga avatar Dec 30 '15 16:12 ShinyDialga