From eeaa836c458be8c29ed07ffec1e9e4b055eedf35 Mon Sep 17 00:00:00 2001 From: coolGi Date: Thu, 20 Jul 2023 20:13:44 +0930 Subject: [PATCH] Fixed improper location for remap (fixing forge 1.20.1) --- .../fabric/mixins/client/MixinLevelRenderer.java | 8 ++++---- .../fabric/mixins/client/MixinTextureUtil.java | 2 +- .../forge/mixins/client/MixinTextureUtil.java | 6 ++---- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinLevelRenderer.java b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinLevelRenderer.java index c4a135d98..569d6c2c5 100644 --- a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinLevelRenderer.java +++ b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinLevelRenderer.java @@ -1,19 +1,19 @@ /* * This file is part of the Distant Horizons mod (formerly the LOD Mod), - * licensed under the GNU GPL v3 License. + * licensed under the GNU LGPL v3 License. * * Copyright (C) 2020-2022 James Seibel * * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by + * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, version 3. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * GNU Lesser General Public License for more details. * - * You should have received a copy of the GNU General Public License + * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see . */ diff --git a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinTextureUtil.java b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinTextureUtil.java index 6335fcd43..d37c22905 100644 --- a/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinTextureUtil.java +++ b/fabric/src/main/java/com/seibel/distanthorizons/fabric/mixins/client/MixinTextureUtil.java @@ -15,7 +15,7 @@ import org.spongepowered.asm.mixin.injection.Redirect; @Mixin(TextureUtil.class) public class MixinTextureUtil { @Redirect(method = "Lcom/mojang/blaze3d/platform/TextureUtil;prepareImage(Lcom/mojang/blaze3d/platform/NativeImage$InternalGlFormat;IIII)V", - at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/platform/GlStateManager;_texParameter(IIF)V", remap=false)) + at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/platform/GlStateManager;_texParameter(IIF)V"), remap=false) private static void setLodBias(int target, int pname, float param) { float biasValue = Config.Client.Advanced.Graphics.AdvancedGraphics.lodBias.get().floatValue(); if (biasValue != 0) { diff --git a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinTextureUtil.java b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinTextureUtil.java index 553fda49e..dfc87e030 100644 --- a/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinTextureUtil.java +++ b/forge/src/main/java/com/seibel/distanthorizons/forge/mixins/client/MixinTextureUtil.java @@ -12,11 +12,10 @@ import org.spongepowered.asm.mixin.injection.Redirect; * * @author coolGi */ - #if PRE_MC_1_20_1 // FIXME: Forge seems to be missing the mapping for this ,and remap=false doesn't work... Help @Mixin(TextureUtil.class) public class MixinTextureUtil { @Redirect(method = "Lcom/mojang/blaze3d/platform/TextureUtil;prepareImage(Lcom/mojang/blaze3d/platform/NativeImage$InternalGlFormat;IIII)V", - at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/platform/GlStateManager;_texParameter(IIF)V", remap=false)) + at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/platform/GlStateManager;_texParameter(IIF)V"), remap=false) private static void setLodBias(int target, int pname, float param) { float biasValue = Config.Client.Advanced.Graphics.AdvancedGraphics.lodBias.get().floatValue(); @@ -26,5 +25,4 @@ public class MixinTextureUtil { GlStateManager._texParameter(target, pname, biasValue); } } -} - #endif +} \ No newline at end of file