Release 2.6.20
This commit is contained in:
@@ -87,6 +87,7 @@ dependencies {
|
|||||||
12004 -> "0.91.2+1.20.4"
|
12004 -> "0.91.2+1.20.4"
|
||||||
12006 -> "0.98.0+1.20.6"
|
12006 -> "0.98.0+1.20.6"
|
||||||
12100 -> "0.100.3+1.21"
|
12100 -> "0.100.3+1.21"
|
||||||
|
12102 -> "0.106.1+1.21.2"
|
||||||
else -> throw UnsupportedOperationException()
|
else -> throw UnsupportedOperationException()
|
||||||
}
|
}
|
||||||
val fabricApiModules = mutableListOf(
|
val fabricApiModules = mutableListOf(
|
||||||
@@ -165,6 +166,7 @@ dependencies {
|
|||||||
|
|
||||||
if (platform.isFabric) {
|
if (platform.isFabric) {
|
||||||
val modMenuVersion = when {
|
val modMenuVersion = when {
|
||||||
|
mcVersion >= 12102 -> "12.0.0-beta.1"
|
||||||
mcVersion >= 12100 -> "11.0.0-rc.4"
|
mcVersion >= 12100 -> "11.0.0-rc.4"
|
||||||
mcVersion >= 12006 -> "10.0.0-beta.1"
|
mcVersion >= 12006 -> "10.0.0-beta.1"
|
||||||
mcVersion >= 12003 -> "9.0.0-pre.1"
|
mcVersion >= 12003 -> "9.0.0-pre.1"
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
essential.defaults.loom=0
|
essential.defaults.loom=0
|
||||||
essential.defaults.loom.fabric-loader=net.fabricmc:fabric-loader:0.15.11
|
essential.defaults.loom.fabric-loader=net.fabricmc:fabric-loader:0.16.9
|
||||||
|
|
||||||
# Sets default memory used for gradle commands. Can be overridden by user or command line properties.
|
# Sets default memory used for gradle commands. Can be overridden by user or command line properties.
|
||||||
# This is required to provide enough memory for the Minecraft decompilation process.
|
# This is required to provide enough memory for the Minecraft decompilation process.
|
||||||
|
|||||||
2
jGui
2
jGui
Submodule jGui updated: e4d4d127a1...5f4d3a51ac
Submodule libs/ReplayStudio updated: 696ce89ee3...4e670490d1
@@ -203,6 +203,7 @@ defaultTasks("bundleJar")
|
|||||||
preprocess {
|
preprocess {
|
||||||
strictExtraMappings.set(true)
|
strictExtraMappings.set(true)
|
||||||
|
|
||||||
|
val mc12102 = createNode("1.21.2", 12102, "yarn")
|
||||||
val mc12100 = createNode("1.21", 12100, "yarn")
|
val mc12100 = createNode("1.21", 12100, "yarn")
|
||||||
val mc12006 = createNode("1.20.6", 12006, "yarn")
|
val mc12006 = createNode("1.20.6", 12006, "yarn")
|
||||||
val mc12004 = createNode("1.20.4", 12004, "yarn")
|
val mc12004 = createNode("1.20.4", 12004, "yarn")
|
||||||
@@ -232,6 +233,7 @@ preprocess {
|
|||||||
val mc10800 = createNode("1.8", 10800, "srg")
|
val mc10800 = createNode("1.8", 10800, "srg")
|
||||||
val mc10710 = createNode("1.7.10", 10710, "srg")
|
val mc10710 = createNode("1.7.10", 10710, "srg")
|
||||||
|
|
||||||
|
mc12102.link(mc12100)
|
||||||
mc12100.link(mc12006)
|
mc12100.link(mc12006)
|
||||||
mc12006.link(mc12004)
|
mc12006.link(mc12004)
|
||||||
mc12004.link(mc12002, file("versions/mapping-fabric-1.20.4-1.20.2.txt"))
|
mc12004.link(mc12002, file("versions/mapping-fabric-1.20.4-1.20.2.txt"))
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ pluginManagement {
|
|||||||
maven("https://repo.essential.gg/repository/maven-public")
|
maven("https://repo.essential.gg/repository/maven-public")
|
||||||
}
|
}
|
||||||
plugins {
|
plugins {
|
||||||
id("gg.essential.multi-version.root") version "0.6.2"
|
id("gg.essential.multi-version.root") version "0.6.4"
|
||||||
id("io.github.goooler.shadow") version "8.1.7"
|
id("io.github.goooler.shadow") version "8.1.7"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -40,6 +40,7 @@ val jGuiVersions = listOf(
|
|||||||
"1.20.4",
|
"1.20.4",
|
||||||
"1.20.6",
|
"1.20.6",
|
||||||
"1.21",
|
"1.21",
|
||||||
|
"1.21.2",
|
||||||
)
|
)
|
||||||
val replayModVersions = listOf(
|
val replayModVersions = listOf(
|
||||||
// "1.7.10",
|
// "1.7.10",
|
||||||
@@ -70,6 +71,7 @@ val replayModVersions = listOf(
|
|||||||
"1.20.4",
|
"1.20.4",
|
||||||
"1.20.6",
|
"1.20.6",
|
||||||
"1.21",
|
"1.21",
|
||||||
|
"1.21.2",
|
||||||
)
|
)
|
||||||
|
|
||||||
rootProject.buildFileName = "root.gradle.kts"
|
rootProject.buildFileName = "root.gradle.kts"
|
||||||
|
|||||||
@@ -414,7 +414,9 @@ public class MCVer {
|
|||||||
//#else
|
//#else
|
||||||
//$$ RenderSystem.getModelViewStack().pop();
|
//$$ RenderSystem.getModelViewStack().pop();
|
||||||
//#endif
|
//#endif
|
||||||
|
//#if MC<12102
|
||||||
//$$ RenderSystem.applyModelViewMatrix();
|
//$$ RenderSystem.applyModelViewMatrix();
|
||||||
|
//#endif
|
||||||
//#else
|
//#else
|
||||||
GlStateManager.popMatrix();
|
GlStateManager.popMatrix();
|
||||||
//#endif
|
//#endif
|
||||||
|
|||||||
@@ -62,8 +62,7 @@ public class SchedulerImpl implements Scheduler {
|
|||||||
super(string_1);
|
super(string_1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override public Runnable createTask(Runnable runnable) {
|
||||||
protected Runnable createTask(Runnable runnable) {
|
|
||||||
return runnable;
|
return runnable;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ import net.minecraft.network.packet.s2c.play.BlockBreakingProgressS2CPacket;
|
|||||||
import net.minecraft.network.packet.s2c.play.EntityAnimationS2CPacket;
|
import net.minecraft.network.packet.s2c.play.EntityAnimationS2CPacket;
|
||||||
import net.minecraft.network.packet.s2c.play.EntityAttachS2CPacket;
|
import net.minecraft.network.packet.s2c.play.EntityAttachS2CPacket;
|
||||||
import net.minecraft.network.packet.s2c.play.EntityEquipmentUpdateS2CPacket;
|
import net.minecraft.network.packet.s2c.play.EntityEquipmentUpdateS2CPacket;
|
||||||
import net.minecraft.network.packet.s2c.play.EntityPositionS2CPacket;
|
|
||||||
import net.minecraft.network.packet.s2c.play.EntityS2CPacket;
|
import net.minecraft.network.packet.s2c.play.EntityS2CPacket;
|
||||||
import net.minecraft.network.packet.s2c.play.EntitySetHeadYawS2CPacket;
|
import net.minecraft.network.packet.s2c.play.EntitySetHeadYawS2CPacket;
|
||||||
import net.minecraft.network.packet.s2c.play.EntityVelocityUpdateS2CPacket;
|
import net.minecraft.network.packet.s2c.play.EntityVelocityUpdateS2CPacket;
|
||||||
@@ -29,6 +28,13 @@ import net.minecraft.server.integrated.IntegratedServer;
|
|||||||
//$$ import net.minecraftforge.event.entity.player.PlayerEvent.ItemPickupEvent;
|
//$$ import net.minecraftforge.event.entity.player.PlayerEvent.ItemPickupEvent;
|
||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
|
//#if MC>=12102
|
||||||
|
//$$ import net.minecraft.entity.player.PlayerPosition;
|
||||||
|
//$$ import net.minecraft.network.packet.s2c.play.EntityPositionSyncS2CPacket;
|
||||||
|
//#else
|
||||||
|
import net.minecraft.network.packet.s2c.play.EntityPositionS2CPacket;
|
||||||
|
//#endif
|
||||||
|
|
||||||
//#if MC>=12002
|
//#if MC>=12002
|
||||||
//$$ import net.minecraft.network.packet.s2c.play.EntitySpawnS2CPacket;
|
//$$ import net.minecraft.network.packet.s2c.play.EntitySpawnS2CPacket;
|
||||||
//#else
|
//#else
|
||||||
@@ -197,7 +203,9 @@ public class RecordingEventHandler extends EventRegistrations {
|
|||||||
|
|
||||||
Packet packet;
|
Packet packet;
|
||||||
if (force || Math.abs(dx) > maxRelDist || Math.abs(dy) > maxRelDist || Math.abs(dz) > maxRelDist) {
|
if (force || Math.abs(dx) > maxRelDist || Math.abs(dy) > maxRelDist || Math.abs(dz) > maxRelDist) {
|
||||||
//#if MC>=10800
|
//#if MC>=12102
|
||||||
|
//$$ packet = new EntityPositionSyncS2CPacket(player.getId(), PlayerPosition.fromEntity(player), player.isOnGround());
|
||||||
|
//#elseif MC>=10800
|
||||||
packet = new EntityPositionS2CPacket(player);
|
packet = new EntityPositionS2CPacket(player);
|
||||||
//#else
|
//#else
|
||||||
//$$ // In 1.7.10 the client player entity has its posY at eye height
|
//$$ // In 1.7.10 the client player entity has its posY at eye height
|
||||||
|
|||||||
@@ -28,7 +28,9 @@ public abstract class MixinWorldClient extends World implements RecordingEventHa
|
|||||||
|
|
||||||
@SuppressWarnings("ConstantConditions")
|
@SuppressWarnings("ConstantConditions")
|
||||||
protected MixinWorldClient() {
|
protected MixinWorldClient() {
|
||||||
//#if MC>=11904
|
//#if MC>=12102
|
||||||
|
//$$ super(null, null, null, null, false, false, 0, 0);
|
||||||
|
//#elseif MC>=11904
|
||||||
//$$ super(null, null, null, null, null, false, false, 0, 0);
|
//$$ super(null, null, null, null, null, false, false, 0, 0);
|
||||||
//#elseif MC>=11900
|
//#elseif MC>=11900
|
||||||
//$$ super(null, null, null, null, false, false, 0, 0);
|
//$$ super(null, null, null, null, false, false, 0, 0);
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ import io.netty.channel.ChannelPromise;
|
|||||||
import io.netty.util.AttributeKey;
|
import io.netty.util.AttributeKey;
|
||||||
import net.minecraft.client.MinecraftClient;
|
import net.minecraft.client.MinecraftClient;
|
||||||
import net.minecraft.network.ClientConnection;
|
import net.minecraft.network.ClientConnection;
|
||||||
|
import net.minecraft.network.packet.s2c.login.LoginHelloS2CPacket;
|
||||||
import net.minecraft.network.packet.s2c.play.CustomPayloadS2CPacket;
|
import net.minecraft.network.packet.s2c.play.CustomPayloadS2CPacket;
|
||||||
import net.minecraft.network.packet.s2c.play.DisconnectS2CPacket;
|
import net.minecraft.network.packet.s2c.play.DisconnectS2CPacket;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
@@ -489,6 +490,10 @@ public class PacketListener extends ChannelInboundHandlerAdapter {
|
|||||||
@Override
|
@Override
|
||||||
public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
|
public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
|
||||||
|
|
||||||
|
if (msg instanceof LoginHelloS2CPacket) {
|
||||||
|
super.channelRead(ctx, msg);
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (msg instanceof LoginCompressionS2CPacket) {
|
if (msg instanceof LoginCompressionS2CPacket) {
|
||||||
super.channelRead(ctx, msg);
|
super.channelRead(ctx, msg);
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ public abstract class OpenGlFrameCapturer<F extends Frame, D extends CaptureData
|
|||||||
frameBuffer().beginWrite(true);
|
frameBuffer().beginWrite(true);
|
||||||
|
|
||||||
GlStateManager.clear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT
|
GlStateManager.clear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT
|
||||||
//#if MC>=11400
|
//#if MC>=11400 && MC<12102
|
||||||
, false
|
, false
|
||||||
//#endif
|
//#endif
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -293,7 +293,10 @@ public class GuiVideoRenderer extends GuiScreen implements Tickable {
|
|||||||
int g = buffer.get() & 0xff;
|
int g = buffer.get() & 0xff;
|
||||||
int r = buffer.get() & 0xff;
|
int r = buffer.get() & 0xff;
|
||||||
buffer.get(); // alpha
|
buffer.get(); // alpha
|
||||||
//#if MC>=11400
|
//#if MC>=12102
|
||||||
|
//$$ int value = 0xff << 24 | r << 16 | g << 8 | b;
|
||||||
|
//$$ data.setColorArgb(x, y, value);
|
||||||
|
//#elseif MC>=11400
|
||||||
int value = 0xff << 24 | b << 16 | g << 8 | r;
|
int value = 0xff << 24 | b << 16 | g << 8 | r;
|
||||||
data.setPixelColor(x, y, value); // actually takes ABGR, not RGBA
|
data.setPixelColor(x, y, value); // actually takes ABGR, not RGBA
|
||||||
//#else
|
//#else
|
||||||
|
|||||||
@@ -68,17 +68,21 @@ public class VirtualWindow implements Closeable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void beginWrite() {
|
public void beginWrite() {
|
||||||
|
MinecraftClientExt.get(mc).setFramebufferDelegate(guiFramebuffer);
|
||||||
guiFramebuffer.beginWrite(true);
|
guiFramebuffer.beginWrite(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void endWrite() {
|
public void endWrite() {
|
||||||
guiFramebuffer.endWrite();
|
guiFramebuffer.endWrite();
|
||||||
|
MinecraftClientExt.get(mc).setFramebufferDelegate(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void flip() {
|
public void flip() {
|
||||||
guiFramebuffer.draw(framebufferWidth, framebufferHeight);
|
guiFramebuffer.draw(framebufferWidth, framebufferHeight);
|
||||||
|
|
||||||
//#if MC>=11500
|
//#if MC>=12102
|
||||||
|
//$$ window.swapBuffers(null);
|
||||||
|
//#elseif MC>=11500
|
||||||
window.swapBuffers();
|
window.swapBuffers();
|
||||||
//#else
|
//#else
|
||||||
//#if MC>=11400
|
//#if MC>=11400
|
||||||
@@ -112,7 +116,7 @@ public class VirtualWindow implements Closeable {
|
|||||||
|
|
||||||
//#if MC>=11400
|
//#if MC>=11400
|
||||||
guiFramebuffer.resize(newWidth, newHeight
|
guiFramebuffer.resize(newWidth, newHeight
|
||||||
//#if MC>=11400
|
//#if MC>=11400 && MC<12102
|
||||||
, false
|
, false
|
||||||
//#endif
|
//#endif
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -2,9 +2,11 @@ package com.replaymod.render.hooks;
|
|||||||
|
|
||||||
import com.replaymod.render.gui.progress.VirtualWindow;
|
import com.replaymod.render.gui.progress.VirtualWindow;
|
||||||
import net.minecraft.client.MinecraftClient;
|
import net.minecraft.client.MinecraftClient;
|
||||||
|
import net.minecraft.client.gl.Framebuffer;
|
||||||
|
|
||||||
public interface MinecraftClientExt {
|
public interface MinecraftClientExt {
|
||||||
void setWindowDelegate(VirtualWindow window);
|
void setWindowDelegate(VirtualWindow window);
|
||||||
|
void setFramebufferDelegate(Framebuffer framebuffer);
|
||||||
|
|
||||||
static MinecraftClientExt get(MinecraftClient mc) {
|
static MinecraftClientExt get(MinecraftClient mc) {
|
||||||
return (MinecraftClientExt) mc;
|
return (MinecraftClientExt) mc;
|
||||||
|
|||||||
@@ -9,6 +9,10 @@ import org.spongepowered.asm.mixin.Shadow;
|
|||||||
import org.spongepowered.asm.mixin.injection.At;
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
import org.spongepowered.asm.mixin.injection.Inject;
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
|
|
||||||
|
//#if MC>=12102
|
||||||
|
//$$ import net.minecraft.client.render.entity.EntityRenderer;
|
||||||
|
//#endif
|
||||||
|
|
||||||
//#if MC>=11500
|
//#if MC>=11500
|
||||||
import net.minecraft.client.render.VertexConsumerProvider;
|
import net.minecraft.client.render.VertexConsumerProvider;
|
||||||
import net.minecraft.client.util.math.MatrixStack;
|
import net.minecraft.client.util.math.MatrixStack;
|
||||||
@@ -31,7 +35,9 @@ public abstract class MixinRenderManager {
|
|||||||
//$$ @Shadow private float cameraYaw;
|
//$$ @Shadow private float cameraYaw;
|
||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
//#if MC>=11500
|
//#if MC>=12102
|
||||||
|
//$$ @Inject(method = "render(Lnet/minecraft/entity/Entity;DDDFLnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;ILnet/minecraft/client/render/entity/EntityRenderer;)V", at = @At("HEAD"))
|
||||||
|
//#elseif MC>=11500
|
||||||
@Inject(method = "render", at = @At("HEAD"))
|
@Inject(method = "render", at = @At("HEAD"))
|
||||||
//#else
|
//#else
|
||||||
//#if MC>=11400 && FABRIC>=1
|
//#if MC>=11400 && FABRIC>=1
|
||||||
@@ -45,7 +51,11 @@ public abstract class MixinRenderManager {
|
|||||||
//#endif
|
//#endif
|
||||||
//#endif
|
//#endif
|
||||||
//#if MC>=10904
|
//#if MC>=10904
|
||||||
private void replayModRender_reorientForCubicRendering(Entity entity, double dx, double dy, double dz, float iDoNotKnow, float partialTicks,
|
private void replayModRender_reorientForCubicRendering(Entity entity, double dx, double dy, double dz,
|
||||||
|
//#if MC<12102
|
||||||
|
float iDoNotKnow,
|
||||||
|
//#endif
|
||||||
|
float partialTicks,
|
||||||
//#if MC>=11500
|
//#if MC>=11500
|
||||||
MatrixStack matrixStack,
|
MatrixStack matrixStack,
|
||||||
VertexConsumerProvider vertexConsumerProvider,
|
VertexConsumerProvider vertexConsumerProvider,
|
||||||
@@ -53,6 +63,9 @@ public abstract class MixinRenderManager {
|
|||||||
//#else
|
//#else
|
||||||
//$$ boolean iDoNotCare,
|
//$$ boolean iDoNotCare,
|
||||||
//#endif
|
//#endif
|
||||||
|
//#if MC>=12102
|
||||||
|
//$$ EntityRenderer<?, ?> renderer,
|
||||||
|
//#endif
|
||||||
CallbackInfo ci) {
|
CallbackInfo ci) {
|
||||||
//#else
|
//#else
|
||||||
//$$ private void replayModRender_reorientForCubicRendering(Entity entity, double dx, double dy, double dz, float iDoNotKnow, float partialTicks, boolean iDoNotCare, CallbackInfoReturnable<Boolean> ci) {
|
//$$ private void replayModRender_reorientForCubicRendering(Entity entity, double dx, double dy, double dz, float iDoNotKnow, float partialTicks, boolean iDoNotCare, CallbackInfoReturnable<Boolean> ci) {
|
||||||
|
|||||||
@@ -21,6 +21,10 @@ import java.util.concurrent.locks.Condition;
|
|||||||
import java.util.concurrent.locks.Lock;
|
import java.util.concurrent.locks.Lock;
|
||||||
import java.util.concurrent.locks.ReentrantLock;
|
import java.util.concurrent.locks.ReentrantLock;
|
||||||
|
|
||||||
|
//#if MC>=12102
|
||||||
|
//$$ import net.minecraft.util.thread.SimpleConsecutiveExecutor;
|
||||||
|
//#endif
|
||||||
|
|
||||||
//#if MC>=12003
|
//#if MC>=12003
|
||||||
//$$ import net.minecraft.client.render.chunk.BlockBufferBuilderPool;
|
//$$ import net.minecraft.client.render.chunk.BlockBufferBuilderPool;
|
||||||
//#endif
|
//#endif
|
||||||
@@ -56,7 +60,11 @@ public abstract class Mixin_BlockOnChunkRebuilds implements ForceChunkLoadingHoo
|
|||||||
@Shadow public abstract boolean upload();
|
@Shadow public abstract boolean upload();
|
||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
|
//#if MC>=12102
|
||||||
|
//$$ @Shadow @Final private SimpleConsecutiveExecutor consecutiveExecutor;
|
||||||
|
//#else
|
||||||
@Shadow @Final private TaskExecutor<Runnable> mailbox;
|
@Shadow @Final private TaskExecutor<Runnable> mailbox;
|
||||||
|
//#endif
|
||||||
|
|
||||||
@Shadow protected abstract void scheduleRunTasks();
|
@Shadow protected abstract void scheduleRunTasks();
|
||||||
|
|
||||||
@@ -99,10 +107,17 @@ public abstract class Mixin_BlockOnChunkRebuilds implements ForceChunkLoadingHoo
|
|||||||
}
|
}
|
||||||
|
|
||||||
private boolean waitForMainThreadWork() {
|
private boolean waitForMainThreadWork() {
|
||||||
|
//#if MC>=12102
|
||||||
|
//$$ this.consecutiveExecutor.executeAsync(future -> {
|
||||||
|
//$$ scheduleRunTasks();
|
||||||
|
//$$ future.complete(getAvailableBufferCount() == this.totalBufferCount);
|
||||||
|
//$$ }).join();
|
||||||
|
//#else
|
||||||
boolean allDone = this.mailbox.<Boolean>ask(reply -> () -> {
|
boolean allDone = this.mailbox.<Boolean>ask(reply -> () -> {
|
||||||
scheduleRunTasks();
|
scheduleRunTasks();
|
||||||
reply.send(getAvailableBufferCount() == this.totalBufferCount);
|
reply.send(getAvailableBufferCount() == this.totalBufferCount);
|
||||||
}).join();
|
}).join();
|
||||||
|
//#endif
|
||||||
|
|
||||||
if (allDone) {
|
if (allDone) {
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -22,14 +22,20 @@ public abstract class Mixin_ChromaKeyColorSky {
|
|||||||
|
|
||||||
//#if MC>=11800
|
//#if MC>=11800
|
||||||
//$$ @Inject(
|
//$$ @Inject(
|
||||||
//#if MC>=12005
|
//#if MC>=12102
|
||||||
|
//$$ method = "method_62215",
|
||||||
|
//#elseif MC>=12005
|
||||||
//$$ method = "renderSky(Lorg/joml/Matrix4f;Lorg/joml/Matrix4f;FLnet/minecraft/client/render/Camera;ZLjava/lang/Runnable;)V",
|
//$$ method = "renderSky(Lorg/joml/Matrix4f;Lorg/joml/Matrix4f;FLnet/minecraft/client/render/Camera;ZLjava/lang/Runnable;)V",
|
||||||
//#elseif MC>=11802
|
//#elseif MC>=11802
|
||||||
//$$ method = "renderSky(Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/util/math/Matrix4f;FLnet/minecraft/client/render/Camera;ZLjava/lang/Runnable;)V",
|
//$$ method = "renderSky(Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/util/math/Matrix4f;FLnet/minecraft/client/render/Camera;ZLjava/lang/Runnable;)V",
|
||||||
//#else
|
//#else
|
||||||
//$$ method = "renderSky(Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/util/math/Matrix4f;FLjava/lang/Runnable;)V",
|
//$$ method = "renderSky(Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/util/math/Matrix4f;FLjava/lang/Runnable;)V",
|
||||||
//#endif
|
//#endif
|
||||||
//$$ at = @At(value = "INVOKE", target = "Ljava/lang/Runnable;run()V", remap = false, shift = At.Shift.AFTER),
|
//#if MC>=12102
|
||||||
|
//$$ at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/RenderPhase$Target;startDrawing()V", shift = At.Shift.AFTER),
|
||||||
|
//#else
|
||||||
|
//$$ at = @At(value = "INVOKE", target = "Ljava/lang/Runnable;run()V", remap = false, shift = At.Shift.AFTER),
|
||||||
|
//#endif
|
||||||
//$$ cancellable = true)
|
//$$ cancellable = true)
|
||||||
//#elseif MC>=11400 || 10710>=MC
|
//#elseif MC>=11400 || 10710>=MC
|
||||||
@Inject(method = "renderSky", at = @At("HEAD"), cancellable = true)
|
@Inject(method = "renderSky", at = @At("HEAD"), cancellable = true)
|
||||||
@@ -43,7 +49,7 @@ public abstract class Mixin_ChromaKeyColorSky {
|
|||||||
if (color != null) {
|
if (color != null) {
|
||||||
GlStateManager.clearColor(color.getRed() / 255f, color.getGreen() / 255f, color.getBlue() / 255f, 1);
|
GlStateManager.clearColor(color.getRed() / 255f, color.getGreen() / 255f, color.getBlue() / 255f, 1);
|
||||||
GlStateManager.clear(GL11.GL_COLOR_BUFFER_BIT
|
GlStateManager.clear(GL11.GL_COLOR_BUFFER_BIT
|
||||||
//#if MC>=11400
|
//#if MC>=11400 && MC<12102
|
||||||
, false
|
, false
|
||||||
//#endif
|
//#endif
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,13 +1,20 @@
|
|||||||
package com.replaymod.render.mixin;
|
package com.replaymod.render.mixin;
|
||||||
|
|
||||||
import com.mojang.blaze3d.platform.GlStateManager;
|
|
||||||
import com.replaymod.core.versions.MCVer;
|
import com.replaymod.core.versions.MCVer;
|
||||||
import com.replaymod.render.hooks.EntityRendererHandler;
|
import com.replaymod.render.hooks.EntityRendererHandler;
|
||||||
import net.minecraft.client.render.BackgroundRenderer;
|
import net.minecraft.client.render.BackgroundRenderer;
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
import org.spongepowered.asm.mixin.injection.At;
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
import org.spongepowered.asm.mixin.injection.Inject;
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
|
|
||||||
|
//#if MC>=12102
|
||||||
|
//$$ import net.minecraft.client.render.Fog;
|
||||||
|
//$$ import net.minecraft.client.render.FogShape;
|
||||||
|
//$$ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||||
|
//#else
|
||||||
|
import com.mojang.blaze3d.platform.GlStateManager;
|
||||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||||
|
//#endif
|
||||||
|
|
||||||
@Mixin(BackgroundRenderer.class)
|
@Mixin(BackgroundRenderer.class)
|
||||||
public abstract class Mixin_ChromaKeyDisableFog {
|
public abstract class Mixin_ChromaKeyDisableFog {
|
||||||
@@ -16,7 +23,13 @@ public abstract class Mixin_ChromaKeyDisableFog {
|
|||||||
//#if MC>=11500
|
//#if MC>=11500
|
||||||
static
|
static
|
||||||
//#endif
|
//#endif
|
||||||
void replayModRender_onSetupFog(CallbackInfo ci) {
|
void replayModRender_onSetupFog(
|
||||||
|
//#if MC>=12102
|
||||||
|
//$$ CallbackInfoReturnable<Fog> ci
|
||||||
|
//#else
|
||||||
|
CallbackInfo ci
|
||||||
|
//#endif
|
||||||
|
) {
|
||||||
EntityRendererHandler handler =
|
EntityRendererHandler handler =
|
||||||
((EntityRendererHandler.IEntityRenderer) MCVer.getMinecraft().gameRenderer).replayModRender_getHandler();
|
((EntityRendererHandler.IEntityRenderer) MCVer.getMinecraft().gameRenderer).replayModRender_getHandler();
|
||||||
if (handler == null) return;
|
if (handler == null) return;
|
||||||
@@ -30,9 +43,13 @@ public abstract class Mixin_ChromaKeyDisableFog {
|
|||||||
// start, as would be the case in these cases. Sodium doing math is also the reason we don't set start
|
// start, as would be the case in these cases. Sodium doing math is also the reason we don't set start
|
||||||
// equal to end (that'll result in undefined behavior because it sticks those into a smoothstep on old
|
// equal to end (that'll result in undefined behavior because it sticks those into a smoothstep on old
|
||||||
// versions), and we don't set it to MAX_VALUE because that also gives wrong results.
|
// versions), and we don't set it to MAX_VALUE because that also gives wrong results.
|
||||||
|
//#if MC>=12102
|
||||||
|
//$$ ci.setReturnValue(new Fog(1E10F, 2E10F, FogShape.CYLINDER, 0f, 0f, 0f, 0f));
|
||||||
|
//#else
|
||||||
GlStateManager.fogStart(1E10F);
|
GlStateManager.fogStart(1E10F);
|
||||||
GlStateManager.fogEnd(2E10F);
|
GlStateManager.fogEnd(2E10F);
|
||||||
ci.cancel();
|
ci.cancel();
|
||||||
|
//#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,11 @@ public abstract class Mixin_PreserveDepthDuringGuiRendering {
|
|||||||
@ModifyArg(
|
@ModifyArg(
|
||||||
//#if MC>=11500
|
//#if MC>=11500
|
||||||
method = "render",
|
method = "render",
|
||||||
|
//#if MC>=12102
|
||||||
|
//$$ at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/systems/RenderSystem;clear(I)V"), index = 0
|
||||||
|
//#else
|
||||||
at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/systems/RenderSystem;clear(IZ)V"), index = 0
|
at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/systems/RenderSystem;clear(IZ)V"), index = 0
|
||||||
|
//#endif
|
||||||
//#elseif MC>=11400
|
//#elseif MC>=11400
|
||||||
//$$ method = "method_4493",
|
//$$ method = "method_4493",
|
||||||
//$$ at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/platform/GlStateManager;clear(IZ)V"), index = 0
|
//$$ at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/platform/GlStateManager;clear(IZ)V"), index = 0
|
||||||
|
|||||||
@@ -16,7 +16,11 @@ public abstract class Mixin_PreserveDepthDuringHandRendering {
|
|||||||
//$$ method = "renderWorldPass",
|
//$$ method = "renderWorldPass",
|
||||||
//#endif
|
//#endif
|
||||||
//#if MC>=11500
|
//#if MC>=11500
|
||||||
|
//#if MC>=12102
|
||||||
|
//$$ at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/systems/RenderSystem;clear(I)V"),
|
||||||
|
//#else
|
||||||
at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/systems/RenderSystem;clear(IZ)V"),
|
at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/systems/RenderSystem;clear(IZ)V"),
|
||||||
|
//#endif
|
||||||
//#elseif MC>=11400
|
//#elseif MC>=11400
|
||||||
//$$ at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/platform/GlStateManager;clear(IZ)V", ordinal = 1),
|
//$$ at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/platform/GlStateManager;clear(IZ)V", ordinal = 1),
|
||||||
//#else
|
//#else
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import org.spongepowered.asm.mixin.injection.Inject;
|
|||||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||||
|
|
||||||
@Mixin(MinecraftClient.class)
|
@Mixin(MinecraftClient.class)
|
||||||
public class Mixin_SuppressFramebufferResizeDuringRender implements MinecraftClientExt {
|
public abstract class Mixin_SuppressFramebufferResizeDuringRender implements MinecraftClientExt {
|
||||||
|
|
||||||
@Unique
|
@Unique
|
||||||
private VirtualWindow windowDelegate;
|
private VirtualWindow windowDelegate;
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
package com.replaymod.render.mixin;
|
||||||
|
|
||||||
|
import com.replaymod.render.hooks.MinecraftClientExt;
|
||||||
|
import net.minecraft.client.MinecraftClient;
|
||||||
|
import net.minecraft.client.gl.Framebuffer;
|
||||||
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.Unique;
|
||||||
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||||
|
|
||||||
|
@Mixin(MinecraftClient.class)
|
||||||
|
public abstract class Mixin_UseGuiFramebufferDuringGuiRendering implements MinecraftClientExt {
|
||||||
|
|
||||||
|
@Unique
|
||||||
|
private Framebuffer framebufferDelegate;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setFramebufferDelegate(Framebuffer framebuffer) {
|
||||||
|
this.framebufferDelegate = framebuffer;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Inject(method = "getFramebuffer", at = @At("HEAD"), cancellable = true)
|
||||||
|
private void useGuiFramebuffer(CallbackInfoReturnable<Framebuffer> ci) {
|
||||||
|
Framebuffer delegate = this.framebufferDelegate;
|
||||||
|
if (delegate != null) {
|
||||||
|
ci.setReturnValue(delegate);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -40,6 +40,10 @@ import net.minecraft.util.crash.CrashException;
|
|||||||
import net.minecraft.sound.SoundCategory;
|
import net.minecraft.sound.SoundCategory;
|
||||||
import org.lwjgl.glfw.GLFW;
|
import org.lwjgl.glfw.GLFW;
|
||||||
|
|
||||||
|
//#if MC>=12102
|
||||||
|
//$$ import com.mojang.blaze3d.systems.ProjectionType;
|
||||||
|
//#endif
|
||||||
|
|
||||||
//#if MC>=12000
|
//#if MC>=12000
|
||||||
//$$ import com.mojang.blaze3d.systems.VertexSorter;
|
//$$ import com.mojang.blaze3d.systems.VertexSorter;
|
||||||
//$$ import net.minecraft.client.gui.DrawContext;
|
//$$ import net.minecraft.client.gui.DrawContext;
|
||||||
@@ -492,7 +496,7 @@ public class VideoRenderer implements RenderInfo {
|
|||||||
|
|
||||||
pushMatrix();
|
pushMatrix();
|
||||||
GlStateManager.clear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT
|
GlStateManager.clear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT
|
||||||
//#if MC>=11400
|
//#if MC>=11400 && MC<12102
|
||||||
, false
|
, false
|
||||||
//#endif
|
//#endif
|
||||||
);
|
);
|
||||||
@@ -502,7 +506,11 @@ public class VideoRenderer implements RenderInfo {
|
|||||||
guiWindow.beginWrite();
|
guiWindow.beginWrite();
|
||||||
|
|
||||||
//#if MC>=11500
|
//#if MC>=11500
|
||||||
|
//#if MC>=12102
|
||||||
|
//$$ RenderSystem.clear(256);
|
||||||
|
//#else
|
||||||
RenderSystem.clear(256, MinecraftClient.IS_SYSTEM_MAC);
|
RenderSystem.clear(256, MinecraftClient.IS_SYSTEM_MAC);
|
||||||
|
//#endif
|
||||||
//#if MC>=11700
|
//#if MC>=11700
|
||||||
//$$ RenderSystem.setProjectionMatrix(Matrix4f.projectionMatrix(
|
//$$ RenderSystem.setProjectionMatrix(Matrix4f.projectionMatrix(
|
||||||
//$$ 0,
|
//$$ 0,
|
||||||
@@ -512,7 +520,9 @@ public class VideoRenderer implements RenderInfo {
|
|||||||
//$$ 1000,
|
//$$ 1000,
|
||||||
//$$ 3000
|
//$$ 3000
|
||||||
//$$ )
|
//$$ )
|
||||||
//#if MC>=12000
|
//#if MC>=12102
|
||||||
|
//$$ , ProjectionType.ORTHOGRAPHIC
|
||||||
|
//#elseif MC>=12000
|
||||||
//$$ , VertexSorter.BY_Z
|
//$$ , VertexSorter.BY_Z
|
||||||
//#endif
|
//#endif
|
||||||
//$$ );
|
//$$ );
|
||||||
@@ -524,7 +534,9 @@ public class VideoRenderer implements RenderInfo {
|
|||||||
//$$ matrixStack.loadIdentity();
|
//$$ matrixStack.loadIdentity();
|
||||||
//$$ matrixStack.translate(0, 0, -2000);
|
//$$ matrixStack.translate(0, 0, -2000);
|
||||||
//#endif
|
//#endif
|
||||||
|
//#if MC<12102
|
||||||
//$$ RenderSystem.applyModelViewMatrix();
|
//$$ RenderSystem.applyModelViewMatrix();
|
||||||
|
//#endif
|
||||||
//$$ DiffuseLighting.enableGuiDepthLighting();
|
//$$ DiffuseLighting.enableGuiDepthLighting();
|
||||||
//#else
|
//#else
|
||||||
RenderSystem.matrixMode(GL11.GL_PROJECTION);
|
RenderSystem.matrixMode(GL11.GL_PROJECTION);
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ import net.minecraft.client.world.ClientWorld;
|
|||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
import net.minecraft.network.Packet;
|
import net.minecraft.network.Packet;
|
||||||
|
import net.minecraft.network.packet.s2c.login.LoginHelloS2CPacket;
|
||||||
import net.minecraft.network.packet.s2c.play.GameMessageS2CPacket;
|
import net.minecraft.network.packet.s2c.play.GameMessageS2CPacket;
|
||||||
import net.minecraft.network.packet.s2c.play.CustomPayloadS2CPacket;
|
import net.minecraft.network.packet.s2c.play.CustomPayloadS2CPacket;
|
||||||
import net.minecraft.network.packet.s2c.play.DisconnectS2CPacket;
|
import net.minecraft.network.packet.s2c.play.DisconnectS2CPacket;
|
||||||
@@ -56,6 +57,10 @@ import net.minecraft.util.math.Vec3d;
|
|||||||
import org.apache.commons.io.FileUtils;
|
import org.apache.commons.io.FileUtils;
|
||||||
import org.apache.commons.io.IOUtils;
|
import org.apache.commons.io.IOUtils;
|
||||||
|
|
||||||
|
//#if MC>=12005
|
||||||
|
//$$ import net.minecraft.network.packet.s2c.common.ServerTransferS2CPacket;
|
||||||
|
//#endif
|
||||||
|
|
||||||
//#if MC>=12002
|
//#if MC>=12002
|
||||||
//$$ import net.minecraft.network.packet.s2c.config.ReadyS2CPacket;
|
//$$ import net.minecraft.network.packet.s2c.config.ReadyS2CPacket;
|
||||||
//$$ import net.minecraft.network.packet.s2c.play.CommonPlayerSpawnInfo;
|
//$$ import net.minecraft.network.packet.s2c.play.CommonPlayerSpawnInfo;
|
||||||
@@ -83,6 +88,10 @@ import net.minecraft.network.packet.s2c.play.MobSpawnS2CPacket;
|
|||||||
import net.minecraft.network.packet.s2c.play.PaintingSpawnS2CPacket;
|
import net.minecraft.network.packet.s2c.play.PaintingSpawnS2CPacket;
|
||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
|
//#if MC>=11800
|
||||||
|
//$$ import org.apache.commons.lang3.mutable.MutableBoolean;
|
||||||
|
//#endif
|
||||||
|
|
||||||
//#if MC>=11600
|
//#if MC>=11600
|
||||||
//#else
|
//#else
|
||||||
//$$ import net.minecraft.network.packet.s2c.play.EntitySpawnGlobalS2CPacket;
|
//$$ import net.minecraft.network.packet.s2c.play.EntitySpawnGlobalS2CPacket;
|
||||||
@@ -166,6 +175,10 @@ public class FullReplaySender extends ChannelInboundHandlerAdapter implements Re
|
|||||||
* These packets are ignored completely during replay.
|
* These packets are ignored completely during replay.
|
||||||
*/
|
*/
|
||||||
private static final List<Class> BAD_PACKETS = Arrays.<Class>asList(
|
private static final List<Class> BAD_PACKETS = Arrays.<Class>asList(
|
||||||
|
LoginHelloS2CPacket.class, // workaround for an issue where ReplayMod prior to 2.6.20 would record these
|
||||||
|
//#if MC>=12005
|
||||||
|
//$$ ServerTransferS2CPacket.class,
|
||||||
|
//#endif
|
||||||
//#if MC>=11404
|
//#if MC>=11404
|
||||||
PlayerActionResponseS2CPacket.class,
|
PlayerActionResponseS2CPacket.class,
|
||||||
//#endif
|
//#endif
|
||||||
@@ -437,7 +450,9 @@ public class FullReplaySender extends ChannelInboundHandlerAdapter implements Re
|
|||||||
ClientWorld world = mc.world;
|
ClientWorld world = mc.world;
|
||||||
if (world != null) {
|
if (world != null) {
|
||||||
//#if MC>=11800
|
//#if MC>=11800
|
||||||
//$$ while (!world.hasNoChunkUpdaters()) {
|
//$$ MutableBoolean done = new MutableBoolean();
|
||||||
|
//$$ world.enqueueChunkUpdate(done::setTrue);
|
||||||
|
//$$ while (!done.booleanValue()) {
|
||||||
//$$ world.runQueuedChunkUpdates();
|
//$$ world.runQueuedChunkUpdates();
|
||||||
//$$ }
|
//$$ }
|
||||||
//#endif
|
//#endif
|
||||||
@@ -842,7 +857,11 @@ public class FullReplaySender extends ChannelInboundHandlerAdapter implements Re
|
|||||||
|
|
||||||
//#if MC>=10800
|
//#if MC>=10800
|
||||||
//#if MC>=11904
|
//#if MC>=11904
|
||||||
|
//#if MC>=12102
|
||||||
|
//$$ for (PositionFlag relative : ppl.relatives()) {
|
||||||
|
//#else
|
||||||
//$$ for (PositionFlag relative : ppl.getFlags()) {
|
//$$ for (PositionFlag relative : ppl.getFlags()) {
|
||||||
|
//#endif
|
||||||
//$$ if (relative == PositionFlag.X || relative == PositionFlag.Y || relative == PositionFlag.Z) {
|
//$$ if (relative == PositionFlag.X || relative == PositionFlag.Y || relative == PositionFlag.Z) {
|
||||||
//#elseif MC>=11400
|
//#elseif MC>=11400
|
||||||
for (PlayerPositionLookS2CPacket.Flag relative : ppl.getFlags()) {
|
for (PlayerPositionLookS2CPacket.Flag relative : ppl.getFlags()) {
|
||||||
@@ -876,14 +895,24 @@ public class FullReplaySender extends ChannelInboundHandlerAdapter implements Re
|
|||||||
}
|
}
|
||||||
|
|
||||||
CameraEntity cent = replayHandler.getCameraEntity();
|
CameraEntity cent = replayHandler.getCameraEntity();
|
||||||
|
//#if MC>=12102
|
||||||
|
//$$ if (!allowMovement && !((Math.abs(cent.getX() - ppl.change().position().x) > TP_DISTANCE_LIMIT) ||
|
||||||
|
//$$ (Math.abs(cent.getZ() - ppl.change().position().z) > TP_DISTANCE_LIMIT))) {
|
||||||
|
//#else
|
||||||
if (!allowMovement && !((Math.abs(cent.getX() - ppl.getX()) > TP_DISTANCE_LIMIT) ||
|
if (!allowMovement && !((Math.abs(cent.getX() - ppl.getX()) > TP_DISTANCE_LIMIT) ||
|
||||||
(Math.abs(cent.getZ() - ppl.getZ()) > TP_DISTANCE_LIMIT))) {
|
(Math.abs(cent.getZ() - ppl.getZ()) > TP_DISTANCE_LIMIT))) {
|
||||||
|
//#endif
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
allowMovement = false;
|
allowMovement = false;
|
||||||
}
|
}
|
||||||
|
//#if MC>=12102
|
||||||
|
//$$ cent.setCameraPosition(ppl.change().position().x, ppl.change().position().y, ppl.change().position().z);
|
||||||
|
//$$ cent.setCameraRotation(ppl.change().yaw(), ppl.change().pitch(), cent.roll);
|
||||||
|
//#else
|
||||||
cent.setCameraPosition(ppl.getX(), ppl.getY(), ppl.getZ());
|
cent.setCameraPosition(ppl.getX(), ppl.getY(), ppl.getZ());
|
||||||
cent.setCameraRotation(ppl.getYaw(), ppl.getPitch(), cent.roll);
|
cent.setCameraRotation(ppl.getYaw(), ppl.getPitch(), cent.roll);
|
||||||
|
//#endif
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -951,6 +980,9 @@ public class FullReplaySender extends ChannelInboundHandlerAdapter implements Re
|
|||||||
//$$ org.isFlat(),
|
//$$ org.isFlat(),
|
||||||
//$$ org.lastDeathLocation(),
|
//$$ org.lastDeathLocation(),
|
||||||
//$$ org.portalCooldown()
|
//$$ org.portalCooldown()
|
||||||
|
//#if MC>=12102
|
||||||
|
//$$ , org.seaLevel()
|
||||||
|
//#endif
|
||||||
//$$ );
|
//$$ );
|
||||||
//$$ }
|
//$$ }
|
||||||
//#endif
|
//#endif
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ public class NoGuiScreenshot {
|
|||||||
pushMatrix();
|
pushMatrix();
|
||||||
GlStateManager.clear(
|
GlStateManager.clear(
|
||||||
16640
|
16640
|
||||||
//#if MC>=11400
|
//#if MC>=11400 && MC<12102
|
||||||
, true
|
, true
|
||||||
//#endif
|
//#endif
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -45,6 +45,10 @@ import net.minecraft.network.ClientConnection;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
|
//#if MC>=12102
|
||||||
|
//$$ import com.mojang.blaze3d.systems.ProjectionType;
|
||||||
|
//#endif
|
||||||
|
|
||||||
//#if MC>=12006
|
//#if MC>=12006
|
||||||
//$$ import net.minecraft.network.handler.NetworkStateTransitions;
|
//$$ import net.minecraft.network.handler.NetworkStateTransitions;
|
||||||
//$$ import net.minecraft.network.state.LoginStates;
|
//$$ import net.minecraft.network.state.LoginStates;
|
||||||
@@ -710,7 +714,7 @@ public class ReplayHandler {
|
|||||||
// Perform the rendering using OpenGL
|
// Perform the rendering using OpenGL
|
||||||
pushMatrix();
|
pushMatrix();
|
||||||
GlStateManager.clear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT
|
GlStateManager.clear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT
|
||||||
//#if MC>=11400
|
//#if MC>=11400 && MC<12102
|
||||||
, true
|
, true
|
||||||
//#endif
|
//#endif
|
||||||
);
|
);
|
||||||
@@ -720,7 +724,11 @@ public class ReplayHandler {
|
|||||||
mc.getFramebuffer().beginWrite(true);
|
mc.getFramebuffer().beginWrite(true);
|
||||||
Window window = mc.getWindow();
|
Window window = mc.getWindow();
|
||||||
//#if MC>=11500
|
//#if MC>=11500
|
||||||
|
//#if MC>=12102
|
||||||
|
//$$ RenderSystem.clear(256);
|
||||||
|
//#else
|
||||||
RenderSystem.clear(256, MinecraftClient.IS_SYSTEM_MAC);
|
RenderSystem.clear(256, MinecraftClient.IS_SYSTEM_MAC);
|
||||||
|
//#endif
|
||||||
//#if MC>=11700
|
//#if MC>=11700
|
||||||
//$$ RenderSystem.setProjectionMatrix(Matrix4f.projectionMatrix(
|
//$$ RenderSystem.setProjectionMatrix(Matrix4f.projectionMatrix(
|
||||||
//$$ 0,
|
//$$ 0,
|
||||||
@@ -730,7 +738,9 @@ public class ReplayHandler {
|
|||||||
//$$ 1000,
|
//$$ 1000,
|
||||||
//$$ 3000
|
//$$ 3000
|
||||||
//$$ )
|
//$$ )
|
||||||
//#if MC>=12000
|
//#if MC>=12102
|
||||||
|
//$$ , ProjectionType.ORTHOGRAPHIC
|
||||||
|
//#elseif MC>=12000
|
||||||
//$$ , VertexSorter.BY_Z
|
//$$ , VertexSorter.BY_Z
|
||||||
//#endif
|
//#endif
|
||||||
//$$ );
|
//$$ );
|
||||||
@@ -742,7 +752,9 @@ public class ReplayHandler {
|
|||||||
//$$ matrixStack.loadIdentity();
|
//$$ matrixStack.loadIdentity();
|
||||||
//$$ matrixStack.translate(0, 0, -2000);
|
//$$ matrixStack.translate(0, 0, -2000);
|
||||||
//#endif
|
//#endif
|
||||||
|
//#if MC<12102
|
||||||
//$$ RenderSystem.applyModelViewMatrix();
|
//$$ RenderSystem.applyModelViewMatrix();
|
||||||
|
//#endif
|
||||||
//$$ DiffuseLighting.enableGuiDepthLighting();
|
//$$ DiffuseLighting.enableGuiDepthLighting();
|
||||||
//#else
|
//#else
|
||||||
RenderSystem.matrixMode(GL11.GL_PROJECTION);
|
RenderSystem.matrixMode(GL11.GL_PROJECTION);
|
||||||
@@ -782,7 +794,9 @@ public class ReplayHandler {
|
|||||||
mc.getFramebuffer().draw(mc.getWindow().getFramebufferWidth(), mc.getWindow().getFramebufferHeight());
|
mc.getFramebuffer().draw(mc.getWindow().getFramebufferWidth(), mc.getWindow().getFramebufferHeight());
|
||||||
popMatrix();
|
popMatrix();
|
||||||
|
|
||||||
//#if MC>=11500
|
//#if MC>=12102
|
||||||
|
//$$ mc.getWindow().swapBuffers(null);
|
||||||
|
//#elseif MC>=11500
|
||||||
mc.getWindow().swapBuffers();
|
mc.getWindow().swapBuffers();
|
||||||
//#else
|
//#else
|
||||||
//#if MC>=11400
|
//#if MC>=11400
|
||||||
|
|||||||
@@ -454,7 +454,16 @@ public class CameraEntity
|
|||||||
//$$ }
|
//$$ }
|
||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
//#if MC>=10800
|
//#if MC>=12102
|
||||||
|
//$$ @Override
|
||||||
|
//$$ public float getFovMultiplier(boolean firstPerson, float fovEffectScale) {
|
||||||
|
//$$ Entity view = this.client.getCameraEntity();
|
||||||
|
//$$ if (view != this && view instanceof AbstractClientPlayerEntity) {
|
||||||
|
//$$ return ((AbstractClientPlayerEntity) view).getFovMultiplier(firstPerson, fovEffectScale);
|
||||||
|
//$$ }
|
||||||
|
//$$ return 1;
|
||||||
|
//$$ }
|
||||||
|
//#elseif MC>=10800
|
||||||
@Override
|
@Override
|
||||||
public float getSpeed() {
|
public float getSpeed() {
|
||||||
Entity view = this.client.getCameraEntity();
|
Entity view = this.client.getCameraEntity();
|
||||||
|
|||||||
@@ -28,7 +28,13 @@ public abstract class MixinRenderLivingBase {
|
|||||||
//#else
|
//#else
|
||||||
//$$ @Inject(method = "canRenderName(Lnet/minecraft/entity/LivingEntity;)Z", at = @At("HEAD"), cancellable = true)
|
//$$ @Inject(method = "canRenderName(Lnet/minecraft/entity/LivingEntity;)Z", at = @At("HEAD"), cancellable = true)
|
||||||
//#endif
|
//#endif
|
||||||
private void replayModReplay_canRenderInvisibleName(LivingEntity entity, CallbackInfoReturnable<Boolean> ci) {
|
private void replayModReplay_canRenderInvisibleName(
|
||||||
|
LivingEntity entity,
|
||||||
|
//#if MC>=12102
|
||||||
|
//$$ double distSquared,
|
||||||
|
//#endif
|
||||||
|
CallbackInfoReturnable<Boolean> ci
|
||||||
|
) {
|
||||||
PlayerEntity thePlayer = getMinecraft().player;
|
PlayerEntity thePlayer = getMinecraft().player;
|
||||||
if (thePlayer instanceof CameraEntity && entity.isInvisible()) {
|
if (thePlayer instanceof CameraEntity && entity.isInvisible()) {
|
||||||
ci.setReturnValue(false);
|
ci.setReturnValue(false);
|
||||||
@@ -36,7 +42,9 @@ public abstract class MixinRenderLivingBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Redirect(
|
@Redirect(
|
||||||
//#if MC>=11500
|
//#if MC>=12102
|
||||||
|
//$$ method = "updateRenderState(Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/client/render/entity/state/LivingEntityRenderState;F)V",
|
||||||
|
//#elseif MC>=11500
|
||||||
method = "render",
|
method = "render",
|
||||||
//#else
|
//#else
|
||||||
//$$ method = "render(Lnet/minecraft/entity/LivingEntity;FFFFFF)V",
|
//$$ method = "render(Lnet/minecraft/entity/LivingEntity;FFFFFF)V",
|
||||||
|
|||||||
@@ -3,16 +3,25 @@ package com.replaymod.replay.mixin.world_border;
|
|||||||
import com.replaymod.core.versions.MCVer;
|
import com.replaymod.core.versions.MCVer;
|
||||||
import com.replaymod.replay.ReplayHandler;
|
import com.replaymod.replay.ReplayHandler;
|
||||||
import com.replaymod.replay.ReplayModReplay;
|
import com.replaymod.replay.ReplayModReplay;
|
||||||
import net.minecraft.client.render.WorldRenderer;
|
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
import org.spongepowered.asm.mixin.injection.At;
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||||
|
|
||||||
|
//#if MC>=12102
|
||||||
|
//$$ import net.minecraft.client.render.WorldBorderRendering;
|
||||||
|
//#else
|
||||||
|
import net.minecraft.client.render.WorldRenderer;
|
||||||
|
//#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Normally Minecraft's world border texture animation is based off real time;
|
* Normally Minecraft's world border texture animation is based off real time;
|
||||||
* this redirect ensures that it is synced with the time in the Replay instead.
|
* this redirect ensures that it is synced with the time in the Replay instead.
|
||||||
*/
|
*/
|
||||||
|
//#if MC>=12102
|
||||||
|
//$$ @Mixin(WorldBorderRendering.class)
|
||||||
|
//#else
|
||||||
@Mixin(WorldRenderer.class)
|
@Mixin(WorldRenderer.class)
|
||||||
|
//#endif
|
||||||
public class Mixin_UseReplayTime_ForTexture {
|
public class Mixin_UseReplayTime_ForTexture {
|
||||||
//#if MC>=11400
|
//#if MC>=11400
|
||||||
@Redirect(method = "*", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/Util;getMeasuringTimeMs()J"))
|
@Redirect(method = "*", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/Util;getMeasuringTimeMs()J"))
|
||||||
|
|||||||
@@ -37,6 +37,10 @@ import static de.johni0702.minecraft.gui.versions.MCVer.popScissorState;
|
|||||||
import static de.johni0702.minecraft.gui.versions.MCVer.pushScissorState;
|
import static de.johni0702.minecraft.gui.versions.MCVer.pushScissorState;
|
||||||
import static de.johni0702.minecraft.gui.versions.MCVer.setScissorDisabled;
|
import static de.johni0702.minecraft.gui.versions.MCVer.setScissorDisabled;
|
||||||
|
|
||||||
|
//#if MC>=12102
|
||||||
|
//$$ import net.minecraft.client.gl.ShaderProgramKeys;
|
||||||
|
//#endif
|
||||||
|
|
||||||
//#if MC>=11700
|
//#if MC>=11700
|
||||||
//$$ import com.mojang.blaze3d.systems.RenderSystem;
|
//$$ import com.mojang.blaze3d.systems.RenderSystem;
|
||||||
//$$ import net.minecraft.client.render.GameRenderer;
|
//$$ import net.minecraft.client.render.GameRenderer;
|
||||||
@@ -175,7 +179,9 @@ public class GuiKeyframeTimeline extends AbstractGuiTimeline<GuiKeyframeTimeline
|
|||||||
emitLine(matrixStack, buffer, p2, p3, color);
|
emitLine(matrixStack, buffer, p2, p3, color);
|
||||||
emitLine(matrixStack, buffer, p3, p4, color);
|
emitLine(matrixStack, buffer, p3, p4, color);
|
||||||
|
|
||||||
//#if MC>=11700
|
//#if MC>=12102
|
||||||
|
//$$ RenderSystem.setShader(ShaderProgramKeys.RENDERTYPE_LINES);
|
||||||
|
//#elseif MC>=11700
|
||||||
//$$ RenderSystem.setShader(GameRenderer::getRenderTypeLinesShader);
|
//$$ RenderSystem.setShader(GameRenderer::getRenderTypeLinesShader);
|
||||||
//#else
|
//#else
|
||||||
GL11.glEnable(GL11.GL_LINE_SMOOTH);
|
GL11.glEnable(GL11.GL_LINE_SMOOTH);
|
||||||
|
|||||||
@@ -30,6 +30,10 @@ import org.apache.commons.lang3.tuple.Pair;
|
|||||||
import org.apache.commons.lang3.tuple.Triple;
|
import org.apache.commons.lang3.tuple.Triple;
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
|
//#if MC>=12102
|
||||||
|
//$$ import net.minecraft.client.gl.ShaderProgramKeys;
|
||||||
|
//#endif
|
||||||
|
|
||||||
//#if MC>=11700
|
//#if MC>=11700
|
||||||
//$$ import net.minecraft.client.render.GameRenderer;
|
//$$ import net.minecraft.client.render.GameRenderer;
|
||||||
//#endif
|
//#endif
|
||||||
@@ -114,7 +118,9 @@ public class PathPreviewRenderer extends EventRegistrations {
|
|||||||
//#else
|
//#else
|
||||||
//$$ RenderSystem.getModelViewStack().method_34425(matrixStack.peek().getModel());
|
//$$ RenderSystem.getModelViewStack().method_34425(matrixStack.peek().getModel());
|
||||||
//#endif
|
//#endif
|
||||||
|
//#if MC<12102
|
||||||
//$$ RenderSystem.applyModelViewMatrix();
|
//$$ RenderSystem.applyModelViewMatrix();
|
||||||
|
//#endif
|
||||||
//#elseif MC>=11500
|
//#elseif MC>=11500
|
||||||
RenderSystem.multMatrix(matrixStack.peek().getModel());
|
RenderSystem.multMatrix(matrixStack.peek().getModel());
|
||||||
//#endif
|
//#endif
|
||||||
@@ -257,7 +263,11 @@ public class PathPreviewRenderer extends EventRegistrations {
|
|||||||
emitLine(new MatrixStack(), buffer, Vector3f.sub(pos1, view, null), Vector3f.sub(pos2, view, null), color);
|
emitLine(new MatrixStack(), buffer, Vector3f.sub(pos1, view, null), Vector3f.sub(pos2, view, null), color);
|
||||||
|
|
||||||
//#if MC>=11700
|
//#if MC>=11700
|
||||||
|
//#if MC>=12102
|
||||||
|
//$$ RenderSystem.setShader(ShaderProgramKeys.RENDERTYPE_LINES);
|
||||||
|
//#else
|
||||||
//$$ RenderSystem.setShader(GameRenderer::getRenderTypeLinesShader);
|
//$$ RenderSystem.setShader(GameRenderer::getRenderTypeLinesShader);
|
||||||
|
//#endif
|
||||||
//$$ RenderSystem.disableCull();
|
//$$ RenderSystem.disableCull();
|
||||||
//#endif
|
//#endif
|
||||||
GL11.glLineWidth(3);
|
GL11.glLineWidth(3);
|
||||||
@@ -314,7 +324,9 @@ public class PathPreviewRenderer extends EventRegistrations {
|
|||||||
GL11.glRotatef(-mc.getEntityRenderDispatcher().camera.getYaw(), 0, 1, 0);
|
GL11.glRotatef(-mc.getEntityRenderDispatcher().camera.getYaw(), 0, 1, 0);
|
||||||
GL11.glRotatef(mc.getEntityRenderDispatcher().camera.getPitch(), 1, 0, 0);
|
GL11.glRotatef(mc.getEntityRenderDispatcher().camera.getPitch(), 1, 0, 0);
|
||||||
|
|
||||||
//#if MC>=11700
|
//#if MC>=12102
|
||||||
|
//$$ RenderSystem.setShader(ShaderProgramKeys.POSITION_TEX);
|
||||||
|
//#elseif MC>=11700
|
||||||
//$$ RenderSystem.applyModelViewMatrix();
|
//$$ RenderSystem.applyModelViewMatrix();
|
||||||
//$$ RenderSystem.setShader(GameRenderer::getPositionTexShader);
|
//$$ RenderSystem.setShader(GameRenderer::getPositionTexShader);
|
||||||
//#endif
|
//#endif
|
||||||
@@ -352,7 +364,9 @@ public class PathPreviewRenderer extends EventRegistrations {
|
|||||||
|
|
||||||
emitLine(new MatrixStack(), buffer, new Vector3f(0, 0, 0), new Vector3f(0, 0, 2), 0x00ff00aa);
|
emitLine(new MatrixStack(), buffer, new Vector3f(0, 0, 0), new Vector3f(0, 0, 2), 0x00ff00aa);
|
||||||
|
|
||||||
//#if MC>=11700
|
//#if MC>=12102
|
||||||
|
//$$ RenderSystem.setShader(ShaderProgramKeys.RENDERTYPE_LINES);
|
||||||
|
//#elseif MC>=11700
|
||||||
//$$ RenderSystem.applyModelViewMatrix();
|
//$$ RenderSystem.applyModelViewMatrix();
|
||||||
//$$ RenderSystem.setShader(GameRenderer::getRenderTypeLinesShader);
|
//$$ RenderSystem.setShader(GameRenderer::getRenderTypeLinesShader);
|
||||||
//#else
|
//#else
|
||||||
@@ -423,7 +437,9 @@ public class PathPreviewRenderer extends EventRegistrations {
|
|||||||
buffer.vertex(r + cubeSize, r + cubeSize, r + cubeSize).texture(2*8/64f, 8/64f).color(255, 255, 255, 200).next();
|
buffer.vertex(r + cubeSize, r + cubeSize, r + cubeSize).texture(2*8/64f, 8/64f).color(255, 255, 255, 200).next();
|
||||||
buffer.vertex(r + cubeSize, r + cubeSize, r).texture(2 * 8 / 64f, 0).color(255, 255, 255, 200).next();
|
buffer.vertex(r + cubeSize, r + cubeSize, r).texture(2 * 8 / 64f, 0).color(255, 255, 255, 200).next();
|
||||||
|
|
||||||
//#if MC>=11700
|
//#if MC>=12102
|
||||||
|
//$$ RenderSystem.setShader(ShaderProgramKeys.POSITION_TEX_COLOR);
|
||||||
|
//#elseif MC>=11700
|
||||||
//$$ RenderSystem.applyModelViewMatrix();
|
//$$ RenderSystem.applyModelViewMatrix();
|
||||||
//$$ RenderSystem.setShader(GameRenderer::getPositionTexColorShader);
|
//$$ RenderSystem.setShader(GameRenderer::getPositionTexColorShader);
|
||||||
//#endif
|
//#endif
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
"Mixin_Stereoscopic_Camera",
|
"Mixin_Stereoscopic_Camera",
|
||||||
"Mixin_Stereoscopic_HandRenderPass",
|
"Mixin_Stereoscopic_HandRenderPass",
|
||||||
"Mixin_SuppressFramebufferResizeDuringRender",
|
"Mixin_SuppressFramebufferResizeDuringRender",
|
||||||
|
"Mixin_UseGuiFramebufferDuringGuiRendering",
|
||||||
//#if MC>=11600
|
//#if MC>=11600
|
||||||
"Mixin_AddIrisOdsShaderUniforms",
|
"Mixin_AddIrisOdsShaderUniforms",
|
||||||
"Mixin_LoadIrisOdsShaderPack",
|
"Mixin_LoadIrisOdsShaderPack",
|
||||||
|
|||||||
@@ -46,7 +46,9 @@
|
|||||||
//#if MC<11400
|
//#if MC<11400
|
||||||
//$$ "MixinRenderManager",
|
//$$ "MixinRenderManager",
|
||||||
//#endif
|
//#endif
|
||||||
|
//#if MC<12102
|
||||||
"MixinViewFrustum",
|
"MixinViewFrustum",
|
||||||
|
//#endif
|
||||||
//#else
|
//#else
|
||||||
//$$ "MixinEntityRenderer",
|
//$$ "MixinEntityRenderer",
|
||||||
//$$ "MixinFMLClientHandler",
|
//$$ "MixinFMLClientHandler",
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
// Fixed in Vanilla
|
||||||
Reference in New Issue
Block a user