mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-12-01 16:27:59 +01:00
Removed the uneneccessary parameter. And the unneccessary lamda that caused this confusion
This commit is contained in:
parent
bbff6ceaab
commit
4c6441e322
1 changed files with 5 additions and 3 deletions
|
@ -102,12 +102,14 @@ public class SkinResourceManager implements IResourceManagerReloadListener {
|
|||
*/
|
||||
private void loadSkinResource(@Nullable ResourceLocation res) {
|
||||
if (res != null) {
|
||||
inProgress.computeIfAbsent(res, r -> scheduleConvertion(res, r));
|
||||
if (!inProgress.containsKey(res)) {
|
||||
inProgress.put(res, scheduleConvertion(res));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private Future<ResourceLocation> scheduleConvertion(ResourceLocation res, ResourceLocation r) {
|
||||
return CompletableFuture.supplyAsync(new ImageLoader(r), executor).whenComplete((result, error) -> {
|
||||
private Future<ResourceLocation> scheduleConvertion(ResourceLocation res) {
|
||||
return CompletableFuture.supplyAsync(new ImageLoader(res), executor).whenComplete((result, error) -> {
|
||||
if (result == null) {
|
||||
result = res;
|
||||
LogManager.getLogger().warn("Errored while processing {}. Using original.", res, error);
|
||||
|
|
Loading…
Reference in a new issue