Get rid of thumb magic (closes #237)
This commit is contained in:
@@ -390,13 +390,8 @@ public class GuiReplayViewer extends GuiScreen {
|
||||
for (final File file : files) {
|
||||
if (Thread.interrupted()) break;
|
||||
try (ReplayFile replayFile = new ZipReplayFile(new ReplayStudio(), file)) {
|
||||
// TODO add a getThumbBytes method to ReplayStudio
|
||||
final Image thumb = Optional.ofNullable(replayFile.get("thumb").orNull()).flatMap(stream -> {
|
||||
final Image thumb = Optional.ofNullable(replayFile.getThumbBytes().orNull()).flatMap(stream -> {
|
||||
try (InputStream in = stream) {
|
||||
int i = 7;
|
||||
while (i > 0) {
|
||||
i -= in.skip(i);
|
||||
}
|
||||
return Optional.of(Image.read(in));
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
|
||||
@@ -305,7 +305,7 @@ dependencies {
|
||||
|
||||
shadow 'com.github.ReplayMod.JavaBlend:2.79.0:a0696f8'
|
||||
|
||||
shadow "com.github.ReplayMod:ReplayStudio:b29955e", shadeExclusions
|
||||
shadow "com.github.ReplayMod:ReplayStudio:bcffd46", shadeExclusions
|
||||
|
||||
implementation(jGui){
|
||||
transitive = false // FG 1.2 puts all MC deps into the compile configuration and we don't want to shade those
|
||||
|
||||
Reference in New Issue
Block a user