CivClassic / CivModCore

Plugin Core and general purpose API for Civ Plugins - Updated for Paper 1.16.5
BSD 3-Clause "New" or "Revised" License
2 stars 20 forks source link

Fix NMS skin lookup lag (by ripkilling the Future so they don't happen) #108

Closed caucow closed 3 years ago

caucow commented 3 years ago

Re: https://cdn.discordapp.com/attachments/612456224960806941/888269955227869194/unknown.png https://cdn.discordapp.com/attachments/612456224960806941/888270020386373702/unknown.png

Wasn't doing a logging (oops now it is) so dunno if I can guarantee, but guess is mojang was doing some throttling, the nms internal usercache is bad (last I checked, it is), and an incomplete PlayerProfile was being passed to a skullmeta under the assumption the skull would use the details the PlayerProfile had (if any) and not query Mojang again (woops bad assumption).

Now if a skin fails to load the first time, it logs the exception it gets, just fails outright, does not provide an incomplete profile, and continues to fail until the cached Future is invalidated 5 minutes later (with the end result being that only placeholder items are provided by the SkinCache during that time).