Release 2.4.5
This commit is contained in:
@@ -178,7 +178,7 @@ val doRelease by tasks.registering {
|
|||||||
defaultTasks("shadowJar")
|
defaultTasks("shadowJar")
|
||||||
|
|
||||||
preprocess {
|
preprocess {
|
||||||
"1.16.2"(11602, "yarn") {
|
"1.16.3"(11603, "yarn") {
|
||||||
"1.16.1"(11601, "yarn") {
|
"1.16.1"(11601, "yarn") {
|
||||||
"1.15.2"(11502, "yarn") {
|
"1.15.2"(11502, "yarn") {
|
||||||
"1.14.4"(11404, "yarn", file("versions/mapping-fabric-1.15.2-1.14.4.txt")) {
|
"1.14.4"(11404, "yarn", file("versions/mapping-fabric-1.15.2-1.14.4.txt")) {
|
||||||
|
|||||||
2
jGui
2
jGui
Submodule jGui updated: e9387ad003...6602aac42a
@@ -29,7 +29,7 @@ val jGuiVersions = listOf(
|
|||||||
"1.14.4",
|
"1.14.4",
|
||||||
"1.15.2",
|
"1.15.2",
|
||||||
"1.16.1",
|
"1.16.1",
|
||||||
"1.16.2"
|
"1.16.3"
|
||||||
)
|
)
|
||||||
val replayModVersions = listOf(
|
val replayModVersions = listOf(
|
||||||
"1.7.10",
|
"1.7.10",
|
||||||
@@ -46,7 +46,7 @@ val replayModVersions = listOf(
|
|||||||
"1.14.4",
|
"1.14.4",
|
||||||
"1.15.2",
|
"1.15.2",
|
||||||
"1.16.1",
|
"1.16.1",
|
||||||
"1.16.2"
|
"1.16.3"
|
||||||
)
|
)
|
||||||
|
|
||||||
include(":jGui")
|
include(":jGui")
|
||||||
|
|||||||
@@ -66,6 +66,7 @@ import java.security.cert.CertificateException;
|
|||||||
import java.security.cert.CertificateFactory;
|
import java.security.cert.CertificateFactory;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Comparator;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
@@ -350,6 +351,10 @@ public class Utils {
|
|||||||
super(container);
|
super(container);
|
||||||
setBackgroundColor(Colors.DARK_TRANSPARENT);
|
setBackgroundColor(Colors.DARK_TRANSPARENT);
|
||||||
|
|
||||||
|
ProtocolVersion latestVersion = ProtocolVersion.getProtocols()
|
||||||
|
.stream()
|
||||||
|
.max(Comparator.comparing(ProtocolVersion::getId))
|
||||||
|
.orElseThrow(RuntimeException::new);
|
||||||
getInfo().addElements(new VerticalLayout.Data(0.5),
|
getInfo().addElements(new VerticalLayout.Data(0.5),
|
||||||
new GuiLabel()
|
new GuiLabel()
|
||||||
.setColor(Colors.BLACK)
|
.setColor(Colors.BLACK)
|
||||||
@@ -357,10 +362,7 @@ public class Utils {
|
|||||||
new GuiLabel()
|
new GuiLabel()
|
||||||
.setColor(Colors.BLACK)
|
.setColor(Colors.BLACK)
|
||||||
.setI18nText("replaymod.gui.minimalmode.supportedversion",
|
.setI18nText("replaymod.gui.minimalmode.supportedversion",
|
||||||
ProtocolVersion.v1_7_6.getName()
|
"1.7.10 - " + latestVersion.getName()));
|
||||||
+ " - "
|
|
||||||
+ Iterables.getLast(ProtocolVersion.getProtocols()).getName()
|
|
||||||
));
|
|
||||||
|
|
||||||
open();
|
open();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -120,6 +120,9 @@ public class MarkerProcessor {
|
|||||||
squashFilter.init(studio, null);
|
squashFilter.init(studio, null);
|
||||||
|
|
||||||
Path inputPath = path.resolveSibling("raw").resolve(path.getFileName());
|
Path inputPath = path.resolveSibling("raw").resolve(path.getFileName());
|
||||||
|
for (int i = 1; Files.exists(inputPath); i++) {
|
||||||
|
inputPath = inputPath.resolveSibling(replayName + "." + i + ".mcpr");
|
||||||
|
}
|
||||||
Files.createDirectories(inputPath.getParent());
|
Files.createDirectories(inputPath.getParent());
|
||||||
Files.move(path, inputPath);
|
Files.move(path, inputPath);
|
||||||
|
|
||||||
|
|||||||
@@ -85,6 +85,7 @@ public class GuiCreateScreenshot extends GuiRenderSettings implements Loadable {
|
|||||||
protected File generateOutputFile(RenderSettings.EncodingPreset encodingPreset) {
|
protected File generateOutputFile(RenderSettings.EncodingPreset encodingPreset) {
|
||||||
DateFormat DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd_HH.mm.ss");
|
DateFormat DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd_HH.mm.ss");
|
||||||
File screenshotFolder = new File(getMinecraft().runDirectory, "screenshots");
|
File screenshotFolder = new File(getMinecraft().runDirectory, "screenshots");
|
||||||
|
screenshotFolder.mkdirs();
|
||||||
String baseName = DATE_FORMAT.format(new Date());
|
String baseName = DATE_FORMAT.format(new Date());
|
||||||
for (int i = 1; ; i++) {
|
for (int i = 1; ; i++) {
|
||||||
File screenshotFile = new File(screenshotFolder, baseName + (i == 1 ? "" : "_" + i) + ".png");
|
File screenshotFile = new File(screenshotFolder, baseName + (i == 1 ? "" : "_" + i) + ".png");
|
||||||
@@ -94,6 +95,11 @@ public class GuiCreateScreenshot extends GuiRenderSettings implements Loadable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void load(RenderSettings settings) {
|
||||||
|
super.load(settings.withEncodingPreset(RenderSettings.EncodingPreset.PNG));
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Path getSettingsPath() {
|
protected Path getSettingsPath() {
|
||||||
return getMinecraft().runDirectory.toPath().resolve("config/replaymod-screenshotsettings.json");
|
return getMinecraft().runDirectory.toPath().resolve("config/replaymod-screenshotsettings.json");
|
||||||
|
|||||||
@@ -206,6 +206,30 @@ public class RenderSettings {
|
|||||||
this.highPerformance = highPerformance;
|
this.highPerformance = highPerformance;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public RenderSettings withEncodingPreset(EncodingPreset encodingPreset) {
|
||||||
|
return new RenderSettings(
|
||||||
|
renderMethod,
|
||||||
|
encodingPreset,
|
||||||
|
videoWidth,
|
||||||
|
videoHeight,
|
||||||
|
framesPerSecond,
|
||||||
|
bitRate,
|
||||||
|
outputFile,
|
||||||
|
renderNameTags,
|
||||||
|
stabilizeYaw,
|
||||||
|
stabilizePitch,
|
||||||
|
stabilizeRoll,
|
||||||
|
chromaKeyingColor,
|
||||||
|
sphericalFovX,
|
||||||
|
sphericalFovY,
|
||||||
|
injectSphericalMetadata,
|
||||||
|
antiAliasing,
|
||||||
|
exportCommand,
|
||||||
|
exportArguments,
|
||||||
|
highPerformance
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return the width of the output video during rendering, including the upscale for Anti-Aliasing.
|
* @return the width of the output video during rendering, including the upscale for Anti-Aliasing.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -141,6 +141,5 @@ public abstract class OpenGlFrameCapturer<F extends Frame, D extends CaptureData
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void close() throws IOException {
|
public void close() throws IOException {
|
||||||
worldRenderer.close();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ import net.minecraft.client.render.WorldRenderer;
|
|||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
//#if MC>=10904
|
//#if MC>=10904
|
||||||
import net.minecraft.world.RayTraceContext;
|
import net.minecraft.world.RaycastContext;
|
||||||
//#else
|
//#else
|
||||||
//$$ import net.minecraft.util.MovingObjectPosition;
|
//$$ import net.minecraft.util.MovingObjectPosition;
|
||||||
//#endif
|
//#endif
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.replaymod.render.rendering;
|
|||||||
|
|
||||||
import com.replaymod.core.mixin.MinecraftAccessor;
|
import com.replaymod.core.mixin.MinecraftAccessor;
|
||||||
import com.replaymod.core.versions.MCVer;
|
import com.replaymod.core.versions.MCVer;
|
||||||
|
import com.replaymod.render.capturer.WorldRenderer;
|
||||||
import net.minecraft.client.MinecraftClient;
|
import net.minecraft.client.MinecraftClient;
|
||||||
import net.minecraft.util.crash.CrashReport;
|
import net.minecraft.util.crash.CrashReport;
|
||||||
import net.minecraft.util.crash.CrashException;
|
import net.minecraft.util.crash.CrashException;
|
||||||
@@ -23,6 +24,7 @@ import static com.replaymod.core.versions.MCVer.getWindow;
|
|||||||
|
|
||||||
public class Pipeline<R extends Frame, P extends Frame> implements Runnable {
|
public class Pipeline<R extends Frame, P extends Frame> implements Runnable {
|
||||||
|
|
||||||
|
private final WorldRenderer worldRenderer;
|
||||||
private final FrameCapturer<R> capturer;
|
private final FrameCapturer<R> capturer;
|
||||||
private final FrameProcessor<R, P> processor;
|
private final FrameProcessor<R, P> processor;
|
||||||
private int consumerNextFrame;
|
private int consumerNextFrame;
|
||||||
@@ -31,7 +33,8 @@ public class Pipeline<R extends Frame, P extends Frame> implements Runnable {
|
|||||||
|
|
||||||
private volatile boolean abort;
|
private volatile boolean abort;
|
||||||
|
|
||||||
public Pipeline(FrameCapturer<R> capturer, FrameProcessor<R, P> processor, FrameConsumer<P> consumer) {
|
public Pipeline(WorldRenderer worldRenderer, FrameCapturer<R> capturer, FrameProcessor<R, P> processor, FrameConsumer<P> consumer) {
|
||||||
|
this.worldRenderer = worldRenderer;
|
||||||
this.capturer = capturer;
|
this.capturer = capturer;
|
||||||
this.processor = processor;
|
this.processor = processor;
|
||||||
this.consumer = consumer;
|
this.consumer = consumer;
|
||||||
@@ -81,6 +84,7 @@ public class Pipeline<R extends Frame, P extends Frame> implements Runnable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
worldRenderer.close();
|
||||||
capturer.close();
|
capturer.close();
|
||||||
processor.close();
|
processor.close();
|
||||||
consumer.close();
|
consumer.close();
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import com.replaymod.render.capturer.SimpleOpenGlFrameCapturer;
|
|||||||
import com.replaymod.render.capturer.SimplePboOpenGlFrameCapturer;
|
import com.replaymod.render.capturer.SimplePboOpenGlFrameCapturer;
|
||||||
import com.replaymod.render.capturer.StereoscopicOpenGlFrameCapturer;
|
import com.replaymod.render.capturer.StereoscopicOpenGlFrameCapturer;
|
||||||
import com.replaymod.render.capturer.StereoscopicPboOpenGlFrameCapturer;
|
import com.replaymod.render.capturer.StereoscopicPboOpenGlFrameCapturer;
|
||||||
|
import com.replaymod.render.capturer.WorldRenderer;
|
||||||
import com.replaymod.render.frame.CubicOpenGlFrame;
|
import com.replaymod.render.frame.CubicOpenGlFrame;
|
||||||
import com.replaymod.render.frame.ODSOpenGlFrame;
|
import com.replaymod.render.frame.ODSOpenGlFrame;
|
||||||
import com.replaymod.render.frame.OpenGlFrame;
|
import com.replaymod.render.frame.OpenGlFrame;
|
||||||
@@ -45,66 +46,72 @@ public class Pipelines {
|
|||||||
|
|
||||||
public static Pipeline<OpenGlFrame, RGBFrame> newDefaultPipeline(RenderInfo renderInfo, FrameConsumer<RGBFrame> consumer) {
|
public static Pipeline<OpenGlFrame, RGBFrame> newDefaultPipeline(RenderInfo renderInfo, FrameConsumer<RGBFrame> consumer) {
|
||||||
RenderSettings settings = renderInfo.getRenderSettings();
|
RenderSettings settings = renderInfo.getRenderSettings();
|
||||||
|
WorldRenderer worldRenderer = new EntityRendererHandler(settings, renderInfo);
|
||||||
FrameCapturer<OpenGlFrame> capturer;
|
FrameCapturer<OpenGlFrame> capturer;
|
||||||
if (PixelBufferObject.SUPPORTED) {
|
if (PixelBufferObject.SUPPORTED) {
|
||||||
capturer = new SimplePboOpenGlFrameCapturer(new EntityRendererHandler(settings, renderInfo), renderInfo);
|
capturer = new SimplePboOpenGlFrameCapturer(worldRenderer, renderInfo);
|
||||||
} else {
|
} else {
|
||||||
capturer = new SimpleOpenGlFrameCapturer(new EntityRendererHandler(settings, renderInfo), renderInfo);
|
capturer = new SimpleOpenGlFrameCapturer(worldRenderer, renderInfo);
|
||||||
}
|
}
|
||||||
return new Pipeline<>(capturer, new OpenGlToRGBProcessor(), consumer);
|
return new Pipeline<>(worldRenderer, capturer, new OpenGlToRGBProcessor(), consumer);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Pipeline<StereoscopicOpenGlFrame, RGBFrame> newStereoscopicPipeline(RenderInfo renderInfo, FrameConsumer<RGBFrame> consumer) {
|
public static Pipeline<StereoscopicOpenGlFrame, RGBFrame> newStereoscopicPipeline(RenderInfo renderInfo, FrameConsumer<RGBFrame> consumer) {
|
||||||
RenderSettings settings = renderInfo.getRenderSettings();
|
RenderSettings settings = renderInfo.getRenderSettings();
|
||||||
|
WorldRenderer worldRenderer = new EntityRendererHandler(settings, renderInfo);
|
||||||
FrameCapturer<StereoscopicOpenGlFrame> capturer;
|
FrameCapturer<StereoscopicOpenGlFrame> capturer;
|
||||||
if (PixelBufferObject.SUPPORTED) {
|
if (PixelBufferObject.SUPPORTED) {
|
||||||
capturer = new StereoscopicPboOpenGlFrameCapturer(new EntityRendererHandler(settings, renderInfo), renderInfo);
|
capturer = new StereoscopicPboOpenGlFrameCapturer(worldRenderer, renderInfo);
|
||||||
} else {
|
} else {
|
||||||
capturer = new StereoscopicOpenGlFrameCapturer(new EntityRendererHandler(settings, renderInfo), renderInfo);
|
capturer = new StereoscopicOpenGlFrameCapturer(worldRenderer, renderInfo);
|
||||||
}
|
}
|
||||||
return new Pipeline<>(capturer, new StereoscopicToRGBProcessor(), consumer);
|
return new Pipeline<>(worldRenderer, capturer, new StereoscopicToRGBProcessor(), consumer);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Pipeline<CubicOpenGlFrame, RGBFrame> newCubicPipeline(RenderInfo renderInfo, FrameConsumer<RGBFrame> consumer) {
|
public static Pipeline<CubicOpenGlFrame, RGBFrame> newCubicPipeline(RenderInfo renderInfo, FrameConsumer<RGBFrame> consumer) {
|
||||||
RenderSettings settings = renderInfo.getRenderSettings();
|
RenderSettings settings = renderInfo.getRenderSettings();
|
||||||
|
WorldRenderer worldRenderer = new EntityRendererHandler(settings, renderInfo);
|
||||||
FrameCapturer<CubicOpenGlFrame> capturer;
|
FrameCapturer<CubicOpenGlFrame> capturer;
|
||||||
if (PixelBufferObject.SUPPORTED) {
|
if (PixelBufferObject.SUPPORTED) {
|
||||||
capturer = new CubicPboOpenGlFrameCapturer(new EntityRendererHandler(settings, renderInfo), renderInfo, settings.getVideoWidth() / 4);
|
capturer = new CubicPboOpenGlFrameCapturer(worldRenderer, renderInfo, settings.getVideoWidth() / 4);
|
||||||
} else {
|
} else {
|
||||||
capturer = new CubicOpenGlFrameCapturer(new EntityRendererHandler(settings, renderInfo), renderInfo, settings.getVideoWidth() / 4);
|
capturer = new CubicOpenGlFrameCapturer(worldRenderer, renderInfo, settings.getVideoWidth() / 4);
|
||||||
}
|
}
|
||||||
return new Pipeline<>(capturer, new CubicToRGBProcessor(), consumer);
|
return new Pipeline<>(worldRenderer, capturer, new CubicToRGBProcessor(), consumer);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Pipeline<CubicOpenGlFrame, RGBFrame> newEquirectangularPipeline(RenderInfo renderInfo, FrameConsumer<RGBFrame> consumer) {
|
public static Pipeline<CubicOpenGlFrame, RGBFrame> newEquirectangularPipeline(RenderInfo renderInfo, FrameConsumer<RGBFrame> consumer) {
|
||||||
RenderSettings settings = renderInfo.getRenderSettings();
|
RenderSettings settings = renderInfo.getRenderSettings();
|
||||||
|
WorldRenderer worldRenderer = new EntityRendererHandler(settings, renderInfo);
|
||||||
|
|
||||||
EquirectangularToRGBProcessor processor = new EquirectangularToRGBProcessor(settings.getVideoWidth(),
|
EquirectangularToRGBProcessor processor = new EquirectangularToRGBProcessor(settings.getVideoWidth(),
|
||||||
settings.getVideoHeight(), settings.getSphericalFovX());
|
settings.getVideoHeight(), settings.getSphericalFovX());
|
||||||
|
|
||||||
FrameCapturer<CubicOpenGlFrame> capturer;
|
FrameCapturer<CubicOpenGlFrame> capturer;
|
||||||
if (PixelBufferObject.SUPPORTED) {
|
if (PixelBufferObject.SUPPORTED) {
|
||||||
capturer = new CubicPboOpenGlFrameCapturer(new EntityRendererHandler(settings, renderInfo), renderInfo, processor.getFrameSize());
|
capturer = new CubicPboOpenGlFrameCapturer(worldRenderer, renderInfo, processor.getFrameSize());
|
||||||
} else {
|
} else {
|
||||||
capturer = new CubicOpenGlFrameCapturer(new EntityRendererHandler(settings, renderInfo), renderInfo, processor.getFrameSize());
|
capturer = new CubicOpenGlFrameCapturer(worldRenderer, renderInfo, processor.getFrameSize());
|
||||||
}
|
}
|
||||||
return new Pipeline<>(capturer, processor, consumer);
|
return new Pipeline<>(worldRenderer, capturer, processor, consumer);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Pipeline<ODSOpenGlFrame, RGBFrame> newODSPipeline(RenderInfo renderInfo, FrameConsumer<RGBFrame> consumer) {
|
public static Pipeline<ODSOpenGlFrame, RGBFrame> newODSPipeline(RenderInfo renderInfo, FrameConsumer<RGBFrame> consumer) {
|
||||||
RenderSettings settings = renderInfo.getRenderSettings();
|
RenderSettings settings = renderInfo.getRenderSettings();
|
||||||
|
WorldRenderer worldRenderer = new EntityRendererHandler(settings, renderInfo);
|
||||||
|
|
||||||
ODSToRGBProcessor processor = new ODSToRGBProcessor(settings.getVideoWidth(),
|
ODSToRGBProcessor processor = new ODSToRGBProcessor(settings.getVideoWidth(),
|
||||||
settings.getVideoHeight(), settings.getSphericalFovX());
|
settings.getVideoHeight(), settings.getSphericalFovX());
|
||||||
|
|
||||||
FrameCapturer<ODSOpenGlFrame> capturer =
|
FrameCapturer<ODSOpenGlFrame> capturer =
|
||||||
new ODSFrameCapturer(new EntityRendererHandler(settings, renderInfo), renderInfo, processor.getFrameSize());
|
new ODSFrameCapturer(worldRenderer, renderInfo, processor.getFrameSize());
|
||||||
return new Pipeline<>(capturer, processor, consumer);
|
return new Pipeline<>(worldRenderer, capturer, processor, consumer);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Pipeline<RGBFrame, RGBFrame> newBlendPipeline(RenderInfo renderInfo) {
|
public static Pipeline<RGBFrame, RGBFrame> newBlendPipeline(RenderInfo renderInfo) {
|
||||||
RenderSettings settings = renderInfo.getRenderSettings();
|
RenderSettings settings = renderInfo.getRenderSettings();
|
||||||
FrameCapturer<RGBFrame> capturer = new BlendFrameCapturer(new EntityRendererHandler(settings, renderInfo), renderInfo);
|
WorldRenderer worldRenderer = new EntityRendererHandler(settings, renderInfo);
|
||||||
|
FrameCapturer<RGBFrame> capturer = new BlendFrameCapturer(worldRenderer, renderInfo);
|
||||||
FrameConsumer<RGBFrame> consumer = new FrameConsumer<RGBFrame>() {
|
FrameConsumer<RGBFrame> consumer = new FrameConsumer<RGBFrame>() {
|
||||||
@Override
|
@Override
|
||||||
public void consume(RGBFrame frame) {
|
public void consume(RGBFrame frame) {
|
||||||
@@ -114,6 +121,6 @@ public class Pipelines {
|
|||||||
public void close() {
|
public void close() {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
return new Pipeline<>(capturer, new DummyProcessor<>(), consumer);
|
return new Pipeline<>(worldRenderer, capturer, new DummyProcessor<>(), consumer);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -624,13 +624,15 @@ public class FullReplaySender extends ChannelDuplexHandler implements ReplaySend
|
|||||||
//#endif
|
//#endif
|
||||||
false,
|
false,
|
||||||
//#if MC>=11600
|
//#if MC>=11600
|
||||||
packet.method_29443(),
|
//#if MC>=11603
|
||||||
//#if MC>=11602
|
packet.getDimensionIds(),
|
||||||
(net.minecraft.util.registry.DynamicRegistryManager.Impl) packet.getRegistryManager(),
|
(net.minecraft.util.registry.DynamicRegistryManager.Impl) packet.getRegistryManager(),
|
||||||
|
packet.getDimensionType(),
|
||||||
//#else
|
//#else
|
||||||
|
//$$ packet.method_29443(),
|
||||||
//$$ (net.minecraft.util.registry.RegistryTracker.Modifiable) packet.getDimension(),
|
//$$ (net.minecraft.util.registry.RegistryTracker.Modifiable) packet.getDimension(),
|
||||||
|
//$$ packet.method_29444(),
|
||||||
//#endif
|
//#endif
|
||||||
packet.method_29444(),
|
|
||||||
packet.getDimensionId(),
|
packet.getDimensionId(),
|
||||||
//#else
|
//#else
|
||||||
//$$ packet.getDimension(),
|
//$$ packet.getDimension(),
|
||||||
@@ -639,7 +641,7 @@ public class FullReplaySender extends ChannelDuplexHandler implements ReplaySend
|
|||||||
//#if MC<11600
|
//#if MC<11600
|
||||||
//$$ packet.getGeneratorType(),
|
//$$ packet.getGeneratorType(),
|
||||||
//#endif
|
//#endif
|
||||||
packet.getChunkLoadDistance(),
|
packet.getViewDistance(),
|
||||||
packet.hasReducedDebugInfo()
|
packet.hasReducedDebugInfo()
|
||||||
//#if MC>=11500
|
//#if MC>=11500
|
||||||
, packet.showsDeathScreen()
|
, packet.showsDeathScreen()
|
||||||
@@ -727,10 +729,12 @@ public class FullReplaySender extends ChannelDuplexHandler implements ReplaySend
|
|||||||
final PlayerPositionLookS2CPacket ppl = (PlayerPositionLookS2CPacket) p;
|
final PlayerPositionLookS2CPacket ppl = (PlayerPositionLookS2CPacket) p;
|
||||||
if(!hasWorldLoaded) hasWorldLoaded = true;
|
if(!hasWorldLoaded) hasWorldLoaded = true;
|
||||||
|
|
||||||
|
ReplayMod.instance.runLater(() -> {
|
||||||
if (mc.currentScreen instanceof DownloadingTerrainScreen) {
|
if (mc.currentScreen instanceof DownloadingTerrainScreen) {
|
||||||
// Close the world loading screen manually in case we swallow the packet
|
// Close the world loading screen manually in case we swallow the packet
|
||||||
mc.openScreen(null);
|
mc.openScreen(null);
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
if(replayHandler.shouldSuppressCameraMovements()) return null;
|
if(replayHandler.shouldSuppressCameraMovements()) return null;
|
||||||
|
|
||||||
|
|||||||
@@ -519,10 +519,6 @@ public class ReplayHandler {
|
|||||||
return spectating;
|
return spectating;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTargetPosition(Location pos) {
|
|
||||||
targetCameraPosition = pos;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void moveCameraToTargetPosition() {
|
public void moveCameraToTargetPosition() {
|
||||||
CameraEntity cam = getCameraEntity();
|
CameraEntity cam = getCameraEntity();
|
||||||
if (cam != null && targetCameraPosition != null) {
|
if (cam != null && targetCameraPosition != null) {
|
||||||
@@ -592,7 +588,7 @@ public class ReplayHandler {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
long diff = targetTime - replaySender.getDesiredTimestamp();
|
long diff = targetTime - (replaySender.isHurrying() ? replaySender.getDesiredTimestamp() : replaySender.currentTimeStamp());
|
||||||
if (diff != 0) {
|
if (diff != 0) {
|
||||||
if (diff > 0 && diff < 5000) { // Small difference and no time travel
|
if (diff > 0 && diff < 5000) { // Small difference and no time travel
|
||||||
replaySender.jumpToTime(targetTime);
|
replaySender.jumpToTime(targetTime);
|
||||||
|
|||||||
@@ -74,11 +74,13 @@ import net.minecraft.util.Hand;
|
|||||||
|
|
||||||
//#if MC>=10800
|
//#if MC>=10800
|
||||||
import net.minecraft.client.network.ClientPlayerEntity;
|
import net.minecraft.client.network.ClientPlayerEntity;
|
||||||
|
import net.minecraft.client.render.entity.PlayerModelPart;
|
||||||
//#else
|
//#else
|
||||||
//$$ import net.minecraft.client.entity.EntityClientPlayerMP;
|
//$$ import net.minecraft.client.entity.EntityClientPlayerMP;
|
||||||
//$$ import net.minecraft.util.Session;
|
//$$ import net.minecraft.util.Session;
|
||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
@@ -98,6 +100,8 @@ public class CameraEntity
|
|||||||
//$$ extends EntityClientPlayerMP
|
//$$ extends EntityClientPlayerMP
|
||||||
//#endif
|
//#endif
|
||||||
{
|
{
|
||||||
|
private static final UUID CAMERA_UUID = UUID.nameUUIDFromBytes("ReplayModCamera".getBytes(StandardCharsets.UTF_8));
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Roll of this camera in degrees.
|
* Roll of this camera in degrees.
|
||||||
*/
|
*/
|
||||||
@@ -154,6 +158,11 @@ public class CameraEntity
|
|||||||
, false
|
, false
|
||||||
//#endif
|
//#endif
|
||||||
);
|
);
|
||||||
|
//#if MC>=10900
|
||||||
|
setUuid(CAMERA_UUID);
|
||||||
|
//#else
|
||||||
|
//$$ entityUniqueID = CAMERA_UUID;
|
||||||
|
//#endif
|
||||||
eventHandler.register();
|
eventHandler.register();
|
||||||
if (ReplayModReplay.instance.getReplayHandler().getSpectatedUUID() == null) {
|
if (ReplayModReplay.instance.getReplayHandler().getSpectatedUUID() == null) {
|
||||||
cameraController = ReplayModReplay.instance.createCameraController(this);
|
cameraController = ReplayModReplay.instance.createCameraController(this);
|
||||||
@@ -423,6 +432,15 @@ public class CameraEntity
|
|||||||
}
|
}
|
||||||
return super.getModel();
|
return super.getModel();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isPartVisible(PlayerModelPart modelPart) {
|
||||||
|
Entity view = getRenderViewEntity(this.client);
|
||||||
|
if (view != this && view instanceof PlayerEntity) {
|
||||||
|
return ((PlayerEntity) view).isPartVisible(modelPart);
|
||||||
|
}
|
||||||
|
return super.isPartVisible(modelPart);
|
||||||
|
}
|
||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -481,8 +499,8 @@ public class CameraEntity
|
|||||||
|
|
||||||
//#if MC>=11400
|
//#if MC>=11400
|
||||||
@Override
|
@Override
|
||||||
public HitResult rayTrace(double maxDistance, float tickDelta, boolean fluids) {
|
public HitResult raycast(double maxDistance, float tickDelta, boolean fluids) {
|
||||||
HitResult result = super.rayTrace(maxDistance, tickDelta, fluids);
|
HitResult result = super.raycast(maxDistance, tickDelta, fluids);
|
||||||
|
|
||||||
// Make sure we can never look at blocks (-> no outline)
|
// Make sure we can never look at blocks (-> no outline)
|
||||||
if (result instanceof BlockHitResult) {
|
if (result instanceof BlockHitResult) {
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import com.replaymod.core.ReplayMod;
|
|||||||
import com.replaymod.core.versions.MCVer.Keyboard;
|
import com.replaymod.core.versions.MCVer.Keyboard;
|
||||||
import com.replaymod.replay.ReplayHandler;
|
import com.replaymod.replay.ReplayHandler;
|
||||||
import com.replaymod.replay.ReplayModReplay;
|
import com.replaymod.replay.ReplayModReplay;
|
||||||
|
import com.replaymod.replay.camera.CameraEntity;
|
||||||
import com.replaymod.replaystudio.data.Marker;
|
import com.replaymod.replaystudio.data.Marker;
|
||||||
import com.replaymod.replaystudio.util.Location;
|
import com.replaymod.replaystudio.util.Location;
|
||||||
import de.johni0702.minecraft.gui.GuiRenderer;
|
import de.johni0702.minecraft.gui.GuiRenderer;
|
||||||
@@ -168,11 +169,14 @@ public class GuiMarkerTimeline extends AbstractGuiTimeline<GuiMarkerTimeline> im
|
|||||||
} else if (button == 1) { // Right click
|
} else if (button == 1) { // Right click
|
||||||
selectedMarker = null;
|
selectedMarker = null;
|
||||||
if (replayHandler != null) {
|
if (replayHandler != null) {
|
||||||
replayHandler.setTargetPosition(new Location(
|
CameraEntity cameraEntity = replayHandler.getCameraEntity();
|
||||||
|
if (cameraEntity != null) {
|
||||||
|
cameraEntity.setCameraPosRot(new Location(
|
||||||
marker.getX(), marker.getY(), marker.getZ(),
|
marker.getX(), marker.getY(), marker.getZ(),
|
||||||
marker.getPitch(), marker.getYaw()
|
marker.getYaw(), marker.getPitch()
|
||||||
));
|
));
|
||||||
replayHandler.doJump(marker.getTime(), false);
|
}
|
||||||
|
replayHandler.doJump(marker.getTime(), true);
|
||||||
} else {
|
} else {
|
||||||
setCursorPosition(marker.getTime());
|
setCursorPosition(marker.getTime());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
//#if MC>=11600
|
||||||
|
package com.replaymod.replay.mixin;
|
||||||
|
|
||||||
|
import net.minecraft.client.gui.screen.TitleScreen;
|
||||||
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
|
import org.spongepowered.asm.mixin.injection.ModifyArg;
|
||||||
|
|
||||||
|
@Mixin(TitleScreen.class)
|
||||||
|
public abstract class Mixin_MoveRealmsButton {
|
||||||
|
@ModifyArg(
|
||||||
|
method = "init",
|
||||||
|
at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/screen/Screen;init(Lnet/minecraft/client/MinecraftClient;II)V"),
|
||||||
|
index = 2
|
||||||
|
)
|
||||||
|
private int adjustRealmsButton(int height) {
|
||||||
|
return height - (24 - 10) * 4;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//#endif
|
||||||
@@ -5,6 +5,9 @@
|
|||||||
"mixins": [],
|
"mixins": [],
|
||||||
"server": [],
|
"server": [],
|
||||||
"client": [
|
"client": [
|
||||||
|
//#if MC>=11600
|
||||||
|
"Mixin_MoveRealmsButton",
|
||||||
|
//#endif
|
||||||
//#if MC>=11400
|
//#if MC>=11400
|
||||||
"MixinCamera",
|
"MixinCamera",
|
||||||
"MixinInGameHud",
|
"MixinInGameHud",
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
2.4.4
|
2.4.5
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
net.minecraft.entity.player.EntityPlayer isWearing() func_175148_a()
|
||||||
net.minecraft.client.renderer.WorldRenderer begin() startDrawing()
|
net.minecraft.client.renderer.WorldRenderer begin() startDrawing()
|
||||||
net.minecraft.network.play.server.S38PacketPlayerListItem getAction() func_179768_b()
|
net.minecraft.network.play.server.S38PacketPlayerListItem getAction() func_179768_b()
|
||||||
net.minecraft.network.play.server.S40PacketDisconnect getReason() func_149165_c()
|
net.minecraft.network.play.server.S40PacketDisconnect getReason() func_149165_c()
|
||||||
|
|||||||
@@ -225,25 +225,25 @@ dependencies {
|
|||||||
11404: '1.14.4',
|
11404: '1.14.4',
|
||||||
11502: '1.15.2',
|
11502: '1.15.2',
|
||||||
11601: '1.16.1',
|
11601: '1.16.1',
|
||||||
11602: '1.16.2',
|
11603: '1.16.3',
|
||||||
][mcVersion]
|
][mcVersion]
|
||||||
mappings 'net.fabricmc:yarn:' + [
|
mappings 'net.fabricmc:yarn:' + [
|
||||||
11404: '1.14.4+build.16',
|
11404: '1.14.4+build.16',
|
||||||
11502: '1.15.2+build.14',
|
11502: '1.15.2+build.14',
|
||||||
11601: '1.16.1+build.17:v2',
|
11601: '1.16.1+build.17:v2',
|
||||||
11602: '1.16.2+build.1:v2',
|
11603: '1.16.3+build.1:v2',
|
||||||
][mcVersion]
|
][mcVersion]
|
||||||
modCompile 'net.fabricmc:fabric-loader:' + [
|
modCompile 'net.fabricmc:fabric-loader:' + [
|
||||||
11404: '0.7.8+build.189',
|
11404: '0.7.8+build.189',
|
||||||
11502: '0.7.8+build.189',
|
11502: '0.7.8+build.189',
|
||||||
11601: '0.8.8+build.202',
|
11601: '0.8.8+build.202',
|
||||||
11602: '0.9.1+build.205',
|
11603: '0.9.1+build.205',
|
||||||
][mcVersion]
|
][mcVersion]
|
||||||
def fabricApiVersion = [
|
def fabricApiVersion = [
|
||||||
11404: '0.4.3+build.247-1.14',
|
11404: '0.4.3+build.247-1.14',
|
||||||
11502: '0.5.1+build.294-1.15',
|
11502: '0.5.1+build.294-1.15',
|
||||||
11601: '0.14.0+build.371-1.16',
|
11601: '0.14.0+build.371-1.16',
|
||||||
11602: '0.17.1+build.394-1.16',
|
11603: '0.17.1+build.394-1.16',
|
||||||
][mcVersion]
|
][mcVersion]
|
||||||
def fabricApiModules = [
|
def fabricApiModules = [
|
||||||
"api-base",
|
"api-base",
|
||||||
@@ -295,7 +295,7 @@ dependencies {
|
|||||||
|
|
||||||
shadow 'com.github.ReplayMod.JavaBlend:2.79.0:a0696f8'
|
shadow 'com.github.ReplayMod.JavaBlend:2.79.0:a0696f8'
|
||||||
|
|
||||||
shadow "com.github.ReplayMod:ReplayStudio:bc8baba", shadeExclusions
|
shadow "com.github.ReplayMod:ReplayStudio:b29955e", shadeExclusions
|
||||||
|
|
||||||
implementation(jGui){
|
implementation(jGui){
|
||||||
transitive = false // FG 1.2 puts all MC deps into the compile configuration and we don't want to shade those
|
transitive = false // FG 1.2 puts all MC deps into the compile configuration and we don't want to shade those
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
1.16.2
|
1.16.3
|
||||||
Reference in New Issue
Block a user