OvercastNetwork / SportBukkit

CraftBukkit and Bukkit modifications that improve stability and add new features
99 stars 84 forks source link

Fix skull items not displaying skins #146

Open ShinyDialga opened 9 years ago

ShinyDialga commented 9 years ago

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.

tonybruess commented 9 years ago

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

ShinyDialga commented 9 years ago

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.

Yukon commented 9 years ago

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

ShinyDialga commented 9 years ago

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.

ryanwarsaw commented 8 years ago

@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.

jedediah commented 8 years ago

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

ShinyDialga commented 8 years ago

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.

ryanwarsaw commented 8 years ago

@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.

ShinyDialga commented 8 years ago

Go for it