Fix compilation of 1.12.2

This commit is contained in:
Jonas Herzig
2020-03-30 01:22:45 +02:00
parent 13283fb5d2
commit 49ea1ae40a
6 changed files with 25 additions and 17 deletions

View File

@@ -20,7 +20,11 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
public abstract class Mixin_ChromaKeyColorSky {
@Shadow @Final private MinecraftClient client;
//#if MC>=11400
@Inject(method = "renderSky", at = @At("HEAD"), cancellable = true)
//#else
//$$ @Inject(method = "renderSky(FI)V", at = @At("HEAD"), cancellable = true)
//#endif
private void chromaKeyingSky(CallbackInfo ci) {
EntityRendererHandler handler = ((EntityRendererHandler.IEntityRenderer) this.client.gameRenderer).replayModRender_getHandler();
if (handler != null) {

View File

@@ -18,7 +18,9 @@ import java.util.concurrent.ExecutorService;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
//#if MC>=11400
import static com.replaymod.core.versions.MCVer.getWindow;
//#endif
public class Pipeline<R extends Frame, P extends Frame> implements Runnable {

View File

@@ -261,13 +261,9 @@ public class VideoRenderer implements RenderInfo {
// FBOs are always used in 1.14+
//#if MC<11400
if (!GLX.isUsingFBOs()) {
//#if MC>=11300
GLFW.glfwSetWindowAttrib(getWindow(mc).getHandle(), GLFW.GLFW_RESIZABLE, 1);
//#else
//$$ Display.setResizable(false);
//#endif
}
//$$ if (!OpenGlHelper.isFramebufferEnabled()) {
//$$ Display.setResizable(false);
//$$ }
//#endif
if (mc.options.debugEnabled) {
debugInfoWasShown = true;
@@ -339,13 +335,9 @@ public class VideoRenderer implements RenderInfo {
// FBOs are always used in 1.14+
//#if MC<11400
if (!GLX.isUsingFBOs()) {
//#if MC>=11300
GLFW.glfwSetWindowAttrib(getWindow(mc).getHandle(), GLFW.GLFW_RESIZABLE, 0);
//#else
//$$ Display.setResizable(true);
//#endif
}
//$$ if (!OpenGlHelper.isFramebufferEnabled()) {
//$$ Display.setResizable(true);
//$$ }
//#endif
mc.options.debugEnabled = debugInfoWasShown;
if (mouseWasGrabbed) {