Fix compilation of 1.12.2
This commit is contained in:
@@ -73,6 +73,7 @@ import net.fabricmc.loader.api.FabricLoader;
|
|||||||
//$$ import net.minecraftforge.fml.common.Mod.Instance;
|
//$$ import net.minecraftforge.fml.common.Mod.Instance;
|
||||||
//$$ import net.minecraftforge.fml.common.event.FMLInitializationEvent;
|
//$$ import net.minecraftforge.fml.common.event.FMLInitializationEvent;
|
||||||
//$$ import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
|
//$$ import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
|
||||||
|
//$$ import static com.replaymod.core.versions.MCVer.FORGE_BUS;
|
||||||
//#if MC>=10800
|
//#if MC>=10800
|
||||||
//$$ import net.minecraftforge.fml.client.FMLClientHandler;
|
//$$ import net.minecraftforge.fml.client.FMLClientHandler;
|
||||||
//#else
|
//#else
|
||||||
|
|||||||
@@ -363,7 +363,7 @@ public class MCVer {
|
|||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public static List<Box> cubeList(Cuboid modelRenderer) {
|
public static List<Box> cubeList(Cuboid modelRenderer) {
|
||||||
//#if MC>=11400
|
//#if MC>=11500
|
||||||
//$$ return new ArrayList<>(); // FIXME 1.15
|
//$$ return new ArrayList<>(); // FIXME 1.15
|
||||||
//#else
|
//#else
|
||||||
return modelRenderer.boxes;
|
return modelRenderer.boxes;
|
||||||
|
|||||||
@@ -20,7 +20,11 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
|||||||
public abstract class Mixin_ChromaKeyColorSky {
|
public abstract class Mixin_ChromaKeyColorSky {
|
||||||
@Shadow @Final private MinecraftClient client;
|
@Shadow @Final private MinecraftClient client;
|
||||||
|
|
||||||
|
//#if MC>=11400
|
||||||
@Inject(method = "renderSky", at = @At("HEAD"), cancellable = true)
|
@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) {
|
private void chromaKeyingSky(CallbackInfo ci) {
|
||||||
EntityRendererHandler handler = ((EntityRendererHandler.IEntityRenderer) this.client.gameRenderer).replayModRender_getHandler();
|
EntityRendererHandler handler = ((EntityRendererHandler.IEntityRenderer) this.client.gameRenderer).replayModRender_getHandler();
|
||||||
if (handler != null) {
|
if (handler != null) {
|
||||||
|
|||||||
@@ -18,7 +18,9 @@ import java.util.concurrent.ExecutorService;
|
|||||||
import java.util.concurrent.ThreadPoolExecutor;
|
import java.util.concurrent.ThreadPoolExecutor;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
|
//#if MC>=11400
|
||||||
import static com.replaymod.core.versions.MCVer.getWindow;
|
import static com.replaymod.core.versions.MCVer.getWindow;
|
||||||
|
//#endif
|
||||||
|
|
||||||
public class Pipeline<R extends Frame, P extends Frame> implements Runnable {
|
public class Pipeline<R extends Frame, P extends Frame> implements Runnable {
|
||||||
|
|
||||||
|
|||||||
@@ -261,13 +261,9 @@ public class VideoRenderer implements RenderInfo {
|
|||||||
|
|
||||||
// FBOs are always used in 1.14+
|
// FBOs are always used in 1.14+
|
||||||
//#if MC<11400
|
//#if MC<11400
|
||||||
if (!GLX.isUsingFBOs()) {
|
//$$ if (!OpenGlHelper.isFramebufferEnabled()) {
|
||||||
//#if MC>=11300
|
|
||||||
GLFW.glfwSetWindowAttrib(getWindow(mc).getHandle(), GLFW.GLFW_RESIZABLE, 1);
|
|
||||||
//#else
|
|
||||||
//$$ Display.setResizable(false);
|
//$$ Display.setResizable(false);
|
||||||
//#endif
|
//$$ }
|
||||||
}
|
|
||||||
//#endif
|
//#endif
|
||||||
if (mc.options.debugEnabled) {
|
if (mc.options.debugEnabled) {
|
||||||
debugInfoWasShown = true;
|
debugInfoWasShown = true;
|
||||||
@@ -339,13 +335,9 @@ public class VideoRenderer implements RenderInfo {
|
|||||||
|
|
||||||
// FBOs are always used in 1.14+
|
// FBOs are always used in 1.14+
|
||||||
//#if MC<11400
|
//#if MC<11400
|
||||||
if (!GLX.isUsingFBOs()) {
|
//$$ if (!OpenGlHelper.isFramebufferEnabled()) {
|
||||||
//#if MC>=11300
|
|
||||||
GLFW.glfwSetWindowAttrib(getWindow(mc).getHandle(), GLFW.GLFW_RESIZABLE, 0);
|
|
||||||
//#else
|
|
||||||
//$$ Display.setResizable(true);
|
//$$ Display.setResizable(true);
|
||||||
//#endif
|
//$$ }
|
||||||
}
|
|
||||||
//#endif
|
//#endif
|
||||||
mc.options.debugEnabled = debugInfoWasShown;
|
mc.options.debugEnabled = debugInfoWasShown;
|
||||||
if (mouseWasGrabbed) {
|
if (mouseWasGrabbed) {
|
||||||
|
|||||||
@@ -39,10 +39,15 @@ import java.io.IOException;
|
|||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
|
//#if MC>=11400
|
||||||
|
import net.minecraft.world.dimension.DimensionType;
|
||||||
|
//#else
|
||||||
|
//$$ import net.minecraft.world.EnumDifficulty;
|
||||||
|
//#endif
|
||||||
|
|
||||||
//#if MC>=11200
|
//#if MC>=11200
|
||||||
import com.replaymod.core.utils.WrappedTimer;
|
import com.replaymod.core.utils.WrappedTimer;
|
||||||
import net.minecraft.world.GameMode;
|
import net.minecraft.world.GameMode;
|
||||||
import net.minecraft.world.dimension.DimensionType;
|
|
||||||
import net.minecraft.world.level.LevelGeneratorType;
|
import net.minecraft.world.level.LevelGeneratorType;
|
||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
@@ -180,12 +185,16 @@ public class QuickReplaySender extends ChannelHandlerAdapter implements ReplaySe
|
|||||||
public void restart() {
|
public void restart() {
|
||||||
replay.reset();
|
replay.reset();
|
||||||
ctx.fireChannelRead(new PlayerRespawnS2CPacket(
|
ctx.fireChannelRead(new PlayerRespawnS2CPacket(
|
||||||
|
//#if MC>=11400
|
||||||
DimensionType.OVERWORLD,
|
DimensionType.OVERWORLD,
|
||||||
|
//#else
|
||||||
|
//$$ 0,
|
||||||
|
//#endif
|
||||||
//#if MC>=11500
|
//#if MC>=11500
|
||||||
//$$ 0,
|
//$$ 0,
|
||||||
//#endif
|
//#endif
|
||||||
//#if MC<11400
|
//#if MC<11400
|
||||||
//$$ Difficulty.NORMAL,
|
//$$ EnumDifficulty.NORMAL,
|
||||||
//#endif
|
//#endif
|
||||||
LevelGeneratorType.DEFAULT,
|
LevelGeneratorType.DEFAULT,
|
||||||
GameMode.SPECTATOR
|
GameMode.SPECTATOR
|
||||||
|
|||||||
Reference in New Issue
Block a user