diff --git a/gradle.properties b/gradle.properties index 34311395..cc2b050e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,13 +2,13 @@ org.gradle.jvmargs=-Xmx8G minecraft_version=1.8.9 -yarn_mappings=1.8.9+build.202004210309 -loader_version=0.8.2+build.202006122116 +yarn_mappings=1.8.9+build.202011050955 +loader_version=0.9.3+build.202009100647 fabric_asm_version=v2.0 zt_zip_version=1.14 slf4j_version=1.7.30 -mod_version = 1.0.0 +mod_version = 1.0.1 maven_group = me.modmuss50 archives_base_name = optifabric diff --git a/src/main/java/me/modmuss50/optifabric/mixin/MixinOptifineConfig.java b/src/main/java/me/modmuss50/optifabric/mixin/MixinOptifineConfig.java index 72d81fd4..3b0329ed 100644 --- a/src/main/java/me/modmuss50/optifabric/mixin/MixinOptifineConfig.java +++ b/src/main/java/me/modmuss50/optifabric/mixin/MixinOptifineConfig.java @@ -15,7 +15,6 @@ public class MixinOptifineConfig { @Shadow private static GameOptions gameSettings; - @SuppressWarnings({"InvalidMemberReference", "UnresolvedMixinReference"}) @Inject(method = {"isAnimatedTerrain", "isAnimatedTextures", "isSwampColors", "isRandomEntities", "isSmoothBiome", "isCustomColors", "isCustomSky", "isCustomFonts", "isShowCapes", "isConnectedTextures", "isNaturalTextures", "isEmissiveTextures", "isConnectedTexturesFancy", "isFastRender", "isTranslucentBlocksFancy", "isSmoothWorld", "isLazyChunkLoading", "isDynamicFov", "isAlternateBlocks", "isCustomItems", "isDynamicLights", "isDynamicLightsFast", "isCustomEntityModels", "isCustomGuis", "isSmoothFps", "isShowGlErrors"}, at = @At("HEAD"), cancellable = true, remap = false) private static void isRandomEntities(CallbackInfoReturnable returnable) { diff --git a/src/main/java/me/modmuss50/optifabric/mixin/MixinTitleScreen.java b/src/main/java/me/modmuss50/optifabric/mixin/MixinTitleScreen.java index a704a62a..4bce26f8 100644 --- a/src/main/java/me/modmuss50/optifabric/mixin/MixinTitleScreen.java +++ b/src/main/java/me/modmuss50/optifabric/mixin/MixinTitleScreen.java @@ -3,35 +3,29 @@ import me.modmuss50.optifabric.mod.Optifabric; import me.modmuss50.optifabric.mod.OptifabricError; import me.modmuss50.optifabric.mod.OptifineVersion; - -import net.minecraft.client.MinecraftClient; import net.minecraft.client.gui.screen.Screen; import net.minecraft.client.gui.screen.TitleScreen; -import net.minecraft.text.Text; -import net.minecraft.util.Util; -import net.minecraft.util.math.MathHelper; -import org.spongepowered.asm.mixin.Final; import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Shadow; -import org.spongepowered.asm.mixin.injection.*; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; @Mixin(TitleScreen.class) -public abstract class MixinTitleScreen extends Screen { +public class MixinTitleScreen extends Screen { protected MixinTitleScreen() { super(); } - @Inject(method = "init", at = @At("RETURN")) + @Inject(method = "init", at = @At("TAIL")) private void init(CallbackInfo info) { Optifabric.checkForErrors(); } - @Inject(method = "render", at = @At("RETURN")) - private void render(int int_1, int int_2, float float_1, CallbackInfo info) { + @Inject(method = "render", at = @At("TAIL")) + private void render(CallbackInfo info) { if (!OptifabricError.hasError()) { - this.drawString(MinecraftClient.getInstance().textRenderer, OptifineVersion.version, 2, this.height - 20, 0xFFFFFFFF); + this.textRenderer.draw(OptifineVersion.version, 2, this.height - 20, 0xFFFFFFFF); } } } diff --git a/src/main/java/me/modmuss50/optifabric/mixin/MixinTypeFilterableList.java b/src/main/java/me/modmuss50/optifabric/mixin/MixinTypeFilterableList.java index 50a108ce..04716bbb 100644 --- a/src/main/java/me/modmuss50/optifabric/mixin/MixinTypeFilterableList.java +++ b/src/main/java/me/modmuss50/optifabric/mixin/MixinTypeFilterableList.java @@ -24,6 +24,7 @@ public abstract class MixinTypeFilterableList { /** * @author hydos + * @reason optifabric for 1.8.9 */ @Overwrite public Iterable method_6408(final Class var1) { @@ -40,6 +41,7 @@ public Iterable method_6408(final Class var1) { /** * @author hydos + * @reason optifabric for 1.8.9 */ @Overwrite public Iterator iterator() { diff --git a/src/main/java/me/modmuss50/optifabric/mod/OptifineInstaller.java b/src/main/java/me/modmuss50/optifabric/mod/OptifineInstaller.java index de7fe154..3098fda3 100644 --- a/src/main/java/me/modmuss50/optifabric/mod/OptifineInstaller.java +++ b/src/main/java/me/modmuss50/optifabric/mod/OptifineInstaller.java @@ -13,7 +13,7 @@ public class OptifineInstaller { public static void extract(File installer, File output, File minecraftJar) throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, IllegalAccessException, MalformedURLException { System.out.println("Running optifine patcher"); ClassLoader classLoader = new URLClassLoader(new URL[]{installer.toURI().toURL()}, OptifineInstaller.class.getClassLoader()); - Class clazz = classLoader.loadClass("optifine.Patcher"); + Class clazz = classLoader.loadClass("optifine.Patcher"); Method method = clazz.getDeclaredMethod("process", File.class, File.class, File.class); method.invoke(null, minecraftJar, installer, output); }