Port to MC 1.18.2 (closes #697)
This commit is contained in:
@@ -245,6 +245,7 @@ dependencies {
|
||||
11701: '1.17.1',
|
||||
11800: '1.18',
|
||||
11801: '1.18.1',
|
||||
11802: '1.18.2',
|
||||
][mcVersion]
|
||||
mappings 'net.fabricmc:yarn:' + [
|
||||
11404: '1.14.4+build.16',
|
||||
@@ -256,6 +257,7 @@ dependencies {
|
||||
11701: '1.17.1+build.29:v2',
|
||||
11800: '1.18+build.1:v2',
|
||||
11801: '1.18.1+build.1:v2',
|
||||
11802: '1.18.2+build.1:v2',
|
||||
][mcVersion]
|
||||
modImplementation 'net.fabricmc:fabric-loader:0.12.5'
|
||||
def fabricApiVersion = [
|
||||
@@ -268,6 +270,7 @@ dependencies {
|
||||
11701: '0.37.1+1.17',
|
||||
11800: '0.43.1+1.18',
|
||||
11801: '0.43.1+1.18',
|
||||
11802: '0.47.9+1.18.2',
|
||||
][mcVersion]
|
||||
def fabricApiModules = [
|
||||
"api-base",
|
||||
@@ -338,7 +341,7 @@ dependencies {
|
||||
|
||||
shadow 'com.github.ReplayMod.JavaBlend:2.79.0:a0696f8'
|
||||
|
||||
shadow "com.github.ReplayMod:ReplayStudio:6d081f6", shadeExclusions
|
||||
shadow "com.github.ReplayMod:ReplayStudio:b5539d1", shadeExclusions
|
||||
|
||||
implementation(FABRIC ? dependencies.project(path: jGui.path, configuration: "namedElements") : jGui) {
|
||||
transitive = false // FG 1.2 puts all MC deps into the compile configuration and we don't want to shade those
|
||||
@@ -346,7 +349,9 @@ dependencies {
|
||||
shadow 'com.github.ReplayMod:lwjgl-utils:27dcd66'
|
||||
|
||||
if (FABRIC) {
|
||||
if (mcVersion >= 11800) {
|
||||
if (mcVersion >= 11802) {
|
||||
modImplementation 'com.terraformersmc:modmenu:3.1.0'
|
||||
} else if (mcVersion >= 11800) {
|
||||
modImplementation 'com.terraformersmc:modmenu:3.0.0'
|
||||
} else if (mcVersion >= 11700) {
|
||||
modImplementation 'com.terraformersmc:modmenu:2.0.0-beta.7'
|
||||
|
||||
2
jGui
2
jGui
Submodule jGui updated: c79b62a73e...5e41452b0e
@@ -189,6 +189,7 @@ val doRelease by tasks.registering {
|
||||
defaultTasks("bundleJar")
|
||||
|
||||
preprocess {
|
||||
val mc11802 = createNode("1.18.2", 11802, "yarn")
|
||||
val mc11801 = createNode("1.18.1", 11801, "yarn")
|
||||
val mc11701 = createNode("1.17.1", 11701, "yarn")
|
||||
val mc11700 = createNode("1.17", 11700, "yarn")
|
||||
@@ -208,6 +209,7 @@ preprocess {
|
||||
val mc10800 = createNode("1.8", 10800, "srg")
|
||||
val mc10710 = createNode("1.7.10", 10710, "srg")
|
||||
|
||||
mc11802.link(mc11801)
|
||||
mc11801.link(mc11701, file("versions/mapping-fabric-1.18.1-1.17.1.txt"))
|
||||
mc11701.link(mc11700)
|
||||
mc11700.link(mc11604, file("versions/mapping-fabric-1.17-1.16.4.txt"))
|
||||
|
||||
@@ -32,6 +32,7 @@ val jGuiVersions = listOf(
|
||||
"1.17",
|
||||
"1.17.1",
|
||||
"1.18.1",
|
||||
"1.18.2",
|
||||
)
|
||||
val replayModVersions = listOf(
|
||||
// "1.7.10",
|
||||
@@ -52,6 +53,7 @@ val replayModVersions = listOf(
|
||||
"1.17",
|
||||
"1.17.1",
|
||||
"1.18.1",
|
||||
"1.18.2",
|
||||
)
|
||||
|
||||
rootProject.buildFileName = "root.gradle.kts"
|
||||
|
||||
@@ -33,7 +33,9 @@ public abstract class MixinMouseHelper {
|
||||
long _p0, double _p1, double _p2,
|
||||
CallbackInfo ci,
|
||||
double _l1,
|
||||
//#if MC>=11400
|
||||
//#if MC>=11802
|
||||
//$$ int yOffsetAccumulated
|
||||
//#elseif MC>=11400
|
||||
float yOffsetAccumulated
|
||||
//#else
|
||||
//$$ double yOffsetAccumulated
|
||||
|
||||
@@ -16,6 +16,10 @@ import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
//#if MC>=11802
|
||||
//$$ import net.minecraft.util.registry.RegistryEntry;
|
||||
//#endif
|
||||
|
||||
//#if MC>=11600
|
||||
import net.minecraft.util.registry.RegistryKey;
|
||||
import net.minecraft.world.MutableWorldProperties;
|
||||
@@ -52,7 +56,12 @@ public abstract class MixinWorldClient extends World implements RecordingEventHa
|
||||
//#if MC<11602
|
||||
//$$ RegistryKey<DimensionType> registryKey2,
|
||||
//#endif
|
||||
DimensionType dimensionType, Supplier<Profiler> profiler, boolean bl, boolean bl2, long l) {
|
||||
//#if MC>=11802
|
||||
//$$ RegistryEntry<DimensionType> dimensionType,
|
||||
//#else
|
||||
DimensionType dimensionType,
|
||||
//#endif
|
||||
Supplier<Profiler> profiler, boolean bl, boolean bl2, long l) {
|
||||
super(mutableWorldProperties, registryKey,
|
||||
//#if MC<11602
|
||||
//$$ registryKey2,
|
||||
|
||||
@@ -21,7 +21,12 @@ public abstract class Mixin_ChromaKeyColorSky {
|
||||
@Shadow @Final private MinecraftClient client;
|
||||
|
||||
//#if MC>=11800
|
||||
//$$ @Inject(method = "renderSky(Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/util/math/Matrix4f;FLjava/lang/Runnable;)V",
|
||||
//$$ @Inject(
|
||||
//#if MC>=11802
|
||||
//$$ method = "renderSky(Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/util/math/Matrix4f;FLnet/minecraft/client/render/Camera;ZLjava/lang/Runnable;)V",
|
||||
//#else
|
||||
//$$ method = "renderSky(Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/util/math/Matrix4f;FLjava/lang/Runnable;)V",
|
||||
//#endif
|
||||
//$$ at = @At(value = "INVOKE", target = "Ljava/lang/Runnable;run()V", remap = false, shift = At.Shift.AFTER),
|
||||
//$$ cancellable = true)
|
||||
//#elseif MC>=11400 || 10710>=MC
|
||||
|
||||
@@ -648,7 +648,11 @@ public class FullReplaySender extends ChannelDuplexHandler implements ReplaySend
|
||||
//#if MC>=11600
|
||||
//#if MC>=11603
|
||||
packet.getDimensionIds(),
|
||||
//#if MC>=11800
|
||||
//$$ packet.registryManager(),
|
||||
//#else
|
||||
(net.minecraft.util.registry.DynamicRegistryManager.Impl) packet.getRegistryManager(),
|
||||
//#endif
|
||||
packet.getDimensionType(),
|
||||
//#else
|
||||
//$$ packet.method_29443(),
|
||||
|
||||
@@ -8,6 +8,10 @@ import com.replaymod.replay.camera.CameraEntity;
|
||||
import net.minecraft.client.MinecraftClient;
|
||||
import net.minecraft.client.render.RenderTickCounter;
|
||||
|
||||
//#if MC>=11802
|
||||
//$$ import net.minecraft.client.gui.screen.DownloadingTerrainScreen;
|
||||
//#endif
|
||||
|
||||
//#if MC>=11400
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
//#else
|
||||
@@ -111,6 +115,15 @@ public class InputReplayTimer extends WrappedTimer {
|
||||
//#endif
|
||||
//$$ }
|
||||
//#endif
|
||||
|
||||
//#if MC>=11802
|
||||
//$$ // As of 1.18.2, this screen always stays open for at least two seconds, and requires ticking to close.
|
||||
//$$ // Thanks, but we'll have none of that (at least while in a replay).
|
||||
//$$ if (mc.currentScreen instanceof DownloadingTerrainScreen) {
|
||||
//$$ mc.currentScreen.close();
|
||||
//$$ }
|
||||
//#endif
|
||||
|
||||
}
|
||||
//#if MC>=11600
|
||||
return ticksThisFrame;
|
||||
|
||||
@@ -31,6 +31,10 @@ import net.minecraft.stat.StatHandler;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.math.Box;
|
||||
|
||||
//#if MC>=11802
|
||||
//$$ import net.minecraft.tag.TagKey;
|
||||
//#endif
|
||||
|
||||
//#if FABRIC>=1
|
||||
//#else
|
||||
//$$ import net.minecraftforge.client.event.EntityViewRenderEvent;
|
||||
@@ -354,7 +358,13 @@ public class CameraEntity
|
||||
|
||||
//#if MC>=11400
|
||||
@Override
|
||||
public boolean isSubmergedIn(Tag<Fluid> fluid) {
|
||||
public boolean isSubmergedIn(
|
||||
//#if MC>=11802
|
||||
//$$ TagKey<Fluid> fluid
|
||||
//#else
|
||||
Tag<Fluid> fluid
|
||||
//#endif
|
||||
) {
|
||||
return falseUnlessSpectating(entity -> entity.isSubmergedIn(fluid));
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ public abstract class MixinGuiSpectator {
|
||||
//$$ @Inject(method = "func_175260_a", at = @At("HEAD"), cancellable = true)
|
||||
//#endif
|
||||
public void isInReplay(
|
||||
//#if MC>=11400
|
||||
//#if MC>=11400 && MC<11802
|
||||
double i,
|
||||
//#else
|
||||
//$$ int i,
|
||||
|
||||
0
versions/1.18.2/.gitkeep
Normal file
0
versions/1.18.2/.gitkeep
Normal file
Reference in New Issue
Block a user