Update ReplayStudio for dedicated replay cache

Also change artifact back from localMaven to jitpack
This commit is contained in:
Jonas Herzig
2019-03-11 17:41:29 +01:00
parent fde807f8ff
commit 32de147ae2
2 changed files with 5 additions and 6 deletions

View File

@@ -283,10 +283,10 @@ public class QuickReplaySender extends ChannelHandlerAdapter implements ReplaySe
private boolean tryLoadFromCache(Consumer<Double> progress) throws IOException {
boolean success = false;
Optional<InputStream> cacheIndexOpt = replayFile.get(CACHE_INDEX_ENTRY);
Optional<InputStream> cacheIndexOpt = replayFile.getCache(CACHE_INDEX_ENTRY);
if (!cacheIndexOpt.isPresent()) return false;
try (InputStream indexIn = cacheIndexOpt.get()) {
Optional<InputStream> cacheOpt = replayFile.get(CACHE_ENTRY);
Optional<InputStream> cacheOpt = replayFile.getCache(CACHE_ENTRY);
if (!cacheOpt.isPresent()) return false;
try (InputStream cacheIn = cacheOpt.get()) {
success = loadFromCache(cacheIn, indexIn, progress);
@@ -370,8 +370,8 @@ public class QuickReplaySender extends ChannelHandlerAdapter implements ReplaySe
double sysTimeStart = System.currentTimeMillis();
double duration;
try (ReplayInputStream in = replayFile.getPacketData(studio);
OutputStream cacheOut = replayFile.write(CACHE_ENTRY);
OutputStream cacheIndexOut = replayFile.write(CACHE_INDEX_ENTRY)) {
OutputStream cacheOut = replayFile.writeCache(CACHE_ENTRY);
OutputStream cacheIndexOut = replayFile.writeCache(CACHE_INDEX_ENTRY)) {
NetOutput out = new StreamNetOutput(cacheOut);
out.writeVarInt(CACHE_VERSION);
NetOutput indexOut = new StreamNetOutput(cacheIndexOut);

View File

@@ -136,7 +136,6 @@ afterEvaluate {
}
repositories {
mavenLocal()
maven {
name = "SpongePowered Repo"
url = "http://repo.spongepowered.org/maven/"
@@ -182,7 +181,7 @@ dependencies {
def studioVersion = mcVersionStr
if (studioVersion == '1.8.9') studioVersion = '1.8'
shade "com.replaymod.replaystudio:$studioVersion:9e362ef", shadeExclusions // FIXME
shade "com.github.ReplayMod.ReplayStudio:$studioVersion:e0562a30", shadeExclusions
def jGuiVersion = project.name
if (['1.10.2', '1.11', '1.11.2'].contains(jGuiVersion)) jGuiVersion = '1.9.4'