From 740a439eff763869ec4aea396f1c3ec4fa7a34f7 Mon Sep 17 00:00:00 2001 From: FlorianMichael <60033407+FlorianMichael@users.noreply.github.com> Date: Sun, 12 Nov 2023 22:23:36 +0100 Subject: [PATCH] moved mixin class, removed new warning in 1.20 -> 1.19.4 --- .../fixes/minecraft/{ => entity}/MixinBipedEntityModel.java | 2 +- .../minecraft/network/MixinClientPlayNetworkHandler.java | 5 +++++ src/main/resources/viafabricplus.mixins.json | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) rename src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/{ => entity}/MixinBipedEntityModel.java (99%) diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/MixinBipedEntityModel.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/entity/MixinBipedEntityModel.java similarity index 99% rename from src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/MixinBipedEntityModel.java rename to src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/entity/MixinBipedEntityModel.java index 9e4d7ba46..4baff1a27 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/MixinBipedEntityModel.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/entity/MixinBipedEntityModel.java @@ -15,7 +15,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -package de.florianmichael.viafabricplus.injection.mixin.fixes.minecraft; +package de.florianmichael.viafabricplus.injection.mixin.fixes.minecraft.entity; import de.florianmichael.viafabricplus.settings.impl.VisualSettings; import net.minecraft.client.model.ModelPart; diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/network/MixinClientPlayNetworkHandler.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/network/MixinClientPlayNetworkHandler.java index 5cfd14544..8a87a33f0 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/network/MixinClientPlayNetworkHandler.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/network/MixinClientPlayNetworkHandler.java @@ -160,4 +160,9 @@ public List> rewriteRecipes(SynchronizeRecipesS2CPacket instance) } return instance.getRecipes(); } + + @WrapWithCondition(method = "setPublicSession", at = @At(value = "INVOKE", target = "Lorg/slf4j/Logger;warn(Ljava/lang/String;Ljava/lang/Object;)V", remap = false)) + public boolean removeInvalidSignatureWarning(Logger instance, String s, Object o) { + return ProtocolHack.getTargetVersion().isNewerThanOrEqualTo(VersionEnum.r1_19_4); + } } diff --git a/src/main/resources/viafabricplus.mixins.json b/src/main/resources/viafabricplus.mixins.json index d69131b57..3bd0bb68c 100644 --- a/src/main/resources/viafabricplus.mixins.json +++ b/src/main/resources/viafabricplus.mixins.json @@ -26,7 +26,7 @@ "compat.sodium.MixinChunkTracker", "fixes.authlib.MixinKeyPairResponse", "fixes.authlib.MixinYggdrasilUserApiService", - "fixes.minecraft.MixinBipedEntityModel", + "fixes.minecraft.entity.MixinBipedEntityModel", "fixes.minecraft.input.MixinCamera", "fixes.minecraft.MixinClientPlayerInteractionManager", "fixes.minecraft.MixinDrawContext",