mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2025-02-13 16:24:23 +01:00
Don't know how this didn't get committed.
This commit is contained in:
parent
981cd002b3
commit
c10c61b73b
1 changed files with 6 additions and 7 deletions
|
@ -26,7 +26,6 @@ import java.nio.file.Files;
|
|||
import java.nio.file.Path;
|
||||
import java.util.Collections;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
import javax.imageio.ImageIO;
|
||||
|
@ -104,7 +103,7 @@ public class ThreadDownloadImageETag extends SimpleTexture {
|
|||
}
|
||||
|
||||
private void loadTexture() {
|
||||
switch(checkLocalCache()) {
|
||||
switch (checkLocalCache()) {
|
||||
case GONE:
|
||||
clearCache();
|
||||
break;
|
||||
|
@ -196,11 +195,11 @@ public class ThreadDownloadImageETag extends SimpleTexture {
|
|||
try (InputStream in = Files.newInputStream(cacheFile)) {
|
||||
BufferedImage bufferedimage = ImageIO.read(in);
|
||||
|
||||
// maybe write the etag to disk
|
||||
Header eTag = resp.getResponse().getFirstHeader(HttpHeaders.ETAG);
|
||||
if (eTag != null) {
|
||||
Files.write(eTagFile, Collections.singleton(eTag.getValue()));
|
||||
}
|
||||
// maybe write the etag to disk
|
||||
Header eTag = resp.getResponse().getFirstHeader(HttpHeaders.ETAG);
|
||||
if (eTag != null) {
|
||||
Files.write(eTagFile, Collections.singleton(eTag.getValue()));
|
||||
}
|
||||
|
||||
if (imageBuffer != null) {
|
||||
bufferedimage = imageBuffer.parseUserSkin(bufferedimage);
|
||||
|
|
Loading…
Reference in a new issue