Hopefully fixed compolation with the new preprocessor

This commit is contained in:
coolGi
2023-12-12 22:17:21 +10:30
parent 24520824e9
commit cf8b0329bb
39 changed files with 104 additions and 104 deletions
@@ -44,7 +44,7 @@ import net.minecraftforge.event.level.ChunkEvent;
import net.minecraftforge.event.level.LevelEvent;
#endif
#if MC_VER > MC_1_18_2
#if MC_VER >= MC_1_18_2
import net.minecraftforge.client.event.RenderLevelStageEvent;
#endif
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
@@ -298,15 +298,15 @@ public class ForgeClientProxy
//===========//
@SubscribeEvent
#if MC_VER > MC_1_18_2
#if MC_VER >= MC_1_18_2
public void afterLevelRenderEvent(RenderLevelStageEvent event)
#else
public void afterLevelRenderEvent(TickEvent.RenderTickEvent event)
#endif
{
#if MC_VER > MC_1_20_1
#if MC_VER >= MC_1_20_1
if (event.getStage() == RenderLevelStageEvent.Stage.AFTER_LEVEL)
#elif MC_VER > MC_1_18_2
#elif MC_VER >= MC_1_18_2
if (event.getStage() == RenderLevelStageEvent.Stage.AFTER_SOLID_BLOCKS)
#else
// FIXME: Is this the correct location for 1.16 & 1.17???
@@ -39,7 +39,7 @@ import com.seibel.distanthorizons.forge.wrappers.modAccessor.OptifineAccessor;
import net.minecraft.client.renderer.block.model.BakedQuad;
import net.minecraft.core.Direction;
#if MC_VER > MC_1_19_2
#if MC_VER >= MC_1_19_2
import net.minecraft.util.RandomSource;
#endif
import net.minecraft.world.level.ColorResolver;
@@ -55,7 +55,7 @@ import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
import net.minecraftforge.fml.ExtensionPoint;
#elif MC_VER == MC_1_17_1
import net.minecraftforge.fmlclient.ConfigGuiHandler;
#elif MC_VER > MC_1_18_2 && MC_VER < MC_1_19_2
#elif MC_VER >= MC_1_18_2 && MC_VER < MC_1_19_2
import net.minecraftforge.client.ConfigGuiHandler;
#else
import net.minecraftforge.client.ConfigScreenHandler;
@@ -131,7 +131,7 @@ public class ForgeMain implements LodForgeMethodCaller
#if MC_VER < MC_1_17_1
ModLoadingContext.get().registerExtensionPoint(ExtensionPoint.CONFIGGUIFACTORY,
() -> (client, parent) -> GetConfigScreen.getScreen(parent));
#elif MC_VER >= MC_1_17_1 && MC_VER <= MC_1_19_2
#elif MC_VER >= MC_1_17_1 && MC_VER < MC_1_19_2
ModLoadingContext.get().registerExtensionPoint(ConfigGuiHandler.ConfigGuiFactory.class,
() -> new ConfigGuiHandler.ConfigGuiFactory((client, parent) -> GetConfigScreen.getScreen(parent)));
#else
@@ -184,7 +184,7 @@ public class ForgeMain implements LodForgeMethodCaller
#else
public List<BakedQuad> getQuads(MinecraftClientWrapper mc, Block block, BlockState blockState, Direction direction, RandomSource random)
{
return mc.getModelManager().getBlockModelShaper().getBlockModel(block.defaultBlockState()).getQuads(blockState, direction, random, modelData #if MC_VER > MC_1_19_2 , RenderType.solid() #endif );
return mc.getModelManager().getBlockModelShaper().getBlockModel(block.defaultBlockState()).getQuads(blockState, direction, random, modelData #if MC_VER >= MC_1_19_2 , RenderType.solid() #endif );
}
#endif
@@ -16,7 +16,7 @@ public class MixinGameRenderer
{
private static final Logger LOGGER = LogManager.getLogger(MixinGameRenderer.class.getSimpleName());
#if MC_VER > MC_1_17_1
#if MC_VER >= MC_1_17_1
// FIXME: This I think will dup multiple renderStartupEvent calls...
@Inject(method = {"reloadShaders", "preloadUiShader"}, at = @At("TAIL"))
public void onStartupShaders(CallbackInfo ci)
@@ -61,7 +61,7 @@ public class MixinMinecraft
}
#endif
#if MC_VER > MC_1_20_2
#if MC_VER >= MC_1_20_2
@Redirect(
method = "Lnet/minecraft/client/Minecraft;onGameLoadFinished(Lnet/minecraft/client/Minecraft$GameLoadCookie;)V",
at = @At(value = "INVOKE", target = "Ljava/lang/Runnable;run()V")
@@ -50,7 +50,7 @@ public class MixinUtilBackgroundThread
}
}
#if MC_VER > MC_1_17_1
#if MC_VER >= MC_1_17_1
@Inject(method = "wrapThreadWithTaskName(Ljava/lang/String;Ljava/lang/Runnable;)Ljava/lang/Runnable;",
at = @At("HEAD"), cancellable = true)
private static void overrideUtil$wrapThreadWithTaskName(String string, Runnable r, CallbackInfoReturnable<Runnable> ci)
@@ -62,7 +62,7 @@ public class MixinUtilBackgroundThread
}
}
#endif
#if MC_VER > MC_1_18_2
#if MC_VER >= MC_1_18_2
@Inject(method = "wrapThreadWithTaskName(Ljava/lang/String;Ljava/util/function/Supplier;)Ljava/util/function/Supplier;",
at = @At("HEAD"), cancellable = true)
private static void overrideUtil$wrapThreadWithTaskNameForSupplier(String string, Supplier<?> r, CallbackInfoReturnable<Supplier<?>> ci)
@@ -20,7 +20,7 @@
package com.seibel.distanthorizons.forge.mixins.server.unsafe;
import org.spongepowered.asm.mixin.Mixin;
#if MC_VER > MC_1_18_2
#if MC_VER >= MC_1_18_2
import net.minecraft.util.ThreadingDetector;
import org.spongepowered.asm.mixin.Mutable;