Update ReplayStudio for dedicated replay cache
Also change artifact back from localMaven to jitpack
This commit is contained in:
@@ -283,10 +283,10 @@ public class QuickReplaySender extends ChannelHandlerAdapter implements ReplaySe
|
|||||||
private boolean tryLoadFromCache(Consumer<Double> progress) throws IOException {
|
private boolean tryLoadFromCache(Consumer<Double> progress) throws IOException {
|
||||||
boolean success = false;
|
boolean success = false;
|
||||||
|
|
||||||
Optional<InputStream> cacheIndexOpt = replayFile.get(CACHE_INDEX_ENTRY);
|
Optional<InputStream> cacheIndexOpt = replayFile.getCache(CACHE_INDEX_ENTRY);
|
||||||
if (!cacheIndexOpt.isPresent()) return false;
|
if (!cacheIndexOpt.isPresent()) return false;
|
||||||
try (InputStream indexIn = cacheIndexOpt.get()) {
|
try (InputStream indexIn = cacheIndexOpt.get()) {
|
||||||
Optional<InputStream> cacheOpt = replayFile.get(CACHE_ENTRY);
|
Optional<InputStream> cacheOpt = replayFile.getCache(CACHE_ENTRY);
|
||||||
if (!cacheOpt.isPresent()) return false;
|
if (!cacheOpt.isPresent()) return false;
|
||||||
try (InputStream cacheIn = cacheOpt.get()) {
|
try (InputStream cacheIn = cacheOpt.get()) {
|
||||||
success = loadFromCache(cacheIn, indexIn, progress);
|
success = loadFromCache(cacheIn, indexIn, progress);
|
||||||
@@ -370,8 +370,8 @@ public class QuickReplaySender extends ChannelHandlerAdapter implements ReplaySe
|
|||||||
double sysTimeStart = System.currentTimeMillis();
|
double sysTimeStart = System.currentTimeMillis();
|
||||||
double duration;
|
double duration;
|
||||||
try (ReplayInputStream in = replayFile.getPacketData(studio);
|
try (ReplayInputStream in = replayFile.getPacketData(studio);
|
||||||
OutputStream cacheOut = replayFile.write(CACHE_ENTRY);
|
OutputStream cacheOut = replayFile.writeCache(CACHE_ENTRY);
|
||||||
OutputStream cacheIndexOut = replayFile.write(CACHE_INDEX_ENTRY)) {
|
OutputStream cacheIndexOut = replayFile.writeCache(CACHE_INDEX_ENTRY)) {
|
||||||
NetOutput out = new StreamNetOutput(cacheOut);
|
NetOutput out = new StreamNetOutput(cacheOut);
|
||||||
out.writeVarInt(CACHE_VERSION);
|
out.writeVarInt(CACHE_VERSION);
|
||||||
NetOutput indexOut = new StreamNetOutput(cacheIndexOut);
|
NetOutput indexOut = new StreamNetOutput(cacheIndexOut);
|
||||||
|
|||||||
@@ -136,7 +136,6 @@ afterEvaluate {
|
|||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenLocal()
|
|
||||||
maven {
|
maven {
|
||||||
name = "SpongePowered Repo"
|
name = "SpongePowered Repo"
|
||||||
url = "http://repo.spongepowered.org/maven/"
|
url = "http://repo.spongepowered.org/maven/"
|
||||||
@@ -182,7 +181,7 @@ dependencies {
|
|||||||
|
|
||||||
def studioVersion = mcVersionStr
|
def studioVersion = mcVersionStr
|
||||||
if (studioVersion == '1.8.9') studioVersion = '1.8'
|
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
|
def jGuiVersion = project.name
|
||||||
if (['1.10.2', '1.11', '1.11.2'].contains(jGuiVersion)) jGuiVersion = '1.9.4'
|
if (['1.10.2', '1.11', '1.11.2'].contains(jGuiVersion)) jGuiVersion = '1.9.4'
|
||||||
|
|||||||
Reference in New Issue
Block a user