From 6505c85726ccb08690be167c02db04904f17eecb Mon Sep 17 00:00:00 2001 From: FlorianMichael <60033407+FlorianMichael@users.noreply.github.com> Date: Sun, 12 Nov 2023 13:38:16 +0100 Subject: [PATCH] updated TODO list, moved some mixins --- .../de/florianmichael/viafabricplus/ViaFabricPlus.java | 4 ++++ .../mixin/fixes/minecraft/MixinDrawContext.java | 4 +++- .../mixin/fixes/minecraft/{ => input}/MixinCamera.java | 2 +- .../fixes/minecraft/{ => item}/MixinItemRenderer.java | 2 +- .../minecraft/{ => screen}/MixinHandledScreens.java | 2 +- .../fixes/minecraft/screen/{ => hud}/MixinChatHud.java | 4 ++-- .../minecraft/{ => screen/hud}/MixinInGameHud.java | 2 +- src/main/resources/viafabricplus.mixins.json | 10 +++++----- 8 files changed, 18 insertions(+), 12 deletions(-) rename src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/{ => input}/MixinCamera.java (99%) rename src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/{ => item}/MixinItemRenderer.java (99%) rename src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/{ => screen}/MixinHandledScreens.java (99%) rename src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/screen/{ => hud}/MixinChatHud.java (94%) rename src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/{ => screen/hud}/MixinInGameHud.java (99%) diff --git a/src/main/java/de/florianmichael/viafabricplus/ViaFabricPlus.java b/src/main/java/de/florianmichael/viafabricplus/ViaFabricPlus.java index ac874c07..1b0ca5e0 100644 --- a/src/main/java/de/florianmichael/viafabricplus/ViaFabricPlus.java +++ b/src/main/java/de/florianmichael/viafabricplus/ViaFabricPlus.java @@ -44,6 +44,10 @@ import java.io.File; * - Check if relevant for protocol translation: TakeItemEntityPacket isEmpty case (1.20 -> 1.20.1 change) * - Window interactions in <= 1.16.5 has changed and can be detected by the server * - Entity hit boxes and eye heights has changed in almost all versions + * - Block hardness / resistance has changed in almost all versions + * - Item properties: maxDamage and stackCount? + * - Recipes for <= 1.8 are broken + * - Supported character fix should cover all versions * - Most CTS protocol features aren't supported (see https://github.com/ViaVersion/ViaFabricPlus/issues/181) * - Most CPE features aren't implemented correctly (see https://github.com/ViaVersion/ViaFabricPlus/issues/152) * - Bedrock scaffolding should be added as soon as ViaBedrock supports block placement (see https://github.com/ViaVersion/ViaFabricPlus/issues/204) diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/MixinDrawContext.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/MixinDrawContext.java index 7791ebcf..a4469b1f 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/MixinDrawContext.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/MixinDrawContext.java @@ -31,7 +31,9 @@ public class MixinDrawContext { @Redirect(method = "drawItemInSlot(Lnet/minecraft/client/font/TextRenderer;Lnet/minecraft/item/ItemStack;IILjava/lang/String;)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/DrawContext;drawText(Lnet/minecraft/client/font/TextRenderer;Ljava/lang/String;IIIZ)I")) public int recolor(DrawContext instance, TextRenderer textRenderer, String text, int x, int y, int color, boolean shadow) { - if (ProtocolHack.getTargetVersion().isOlderThanOrEqualTo(VersionEnum.r1_10) && text.startsWith("-")) color = -43213; + if (ProtocolHack.getTargetVersion().isOlderThanOrEqualTo(VersionEnum.r1_10) && text.startsWith("-")) { + color = -43213; // red + } return instance.drawText(textRenderer, text, x, y, color, shadow); } diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/MixinCamera.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/input/MixinCamera.java similarity index 99% rename from src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/MixinCamera.java rename to src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/input/MixinCamera.java index 171e4409..6c05df55 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/MixinCamera.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/input/MixinCamera.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.input; import de.florianmichael.viafabricplus.settings.impl.DebugSettings; import net.minecraft.client.render.Camera; diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/MixinItemRenderer.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/item/MixinItemRenderer.java similarity index 99% rename from src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/MixinItemRenderer.java rename to src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/item/MixinItemRenderer.java index 0e9a8b41..e14f3cd1 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/MixinItemRenderer.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/item/MixinItemRenderer.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.item; import de.florianmichael.viafabricplus.settings.impl.VisualSettings; import net.minecraft.client.render.item.ItemModels; diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/MixinHandledScreens.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/screen/MixinHandledScreens.java similarity index 99% rename from src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/MixinHandledScreens.java rename to src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/screen/MixinHandledScreens.java index 3eeb6830..830917e1 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/MixinHandledScreens.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/screen/MixinHandledScreens.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.screen; import de.florianmichael.viafabricplus.definition.TripleChestHandler1_13_2; import de.florianmichael.viafabricplus.protocolhack.ProtocolHack; diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/screen/MixinChatHud.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/screen/hud/MixinChatHud.java similarity index 94% rename from src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/screen/MixinChatHud.java rename to src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/screen/hud/MixinChatHud.java index e9635543..45b76ff2 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/screen/MixinChatHud.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/screen/hud/MixinChatHud.java @@ -1,6 +1,6 @@ /* * This file is part of ViaFabricPlus - https://github.com/FlorianMichael/ViaFabricPlus - * Copyright (C) 2021-2023 FlorianMichael/MrLookAtMe (EnZaXD) and contributors + * Copyright (C) 2021-2023 FlorianMichael/EnZaXD and contributors * * 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 @@ -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.screen; +package de.florianmichael.viafabricplus.injection.mixin.fixes.minecraft.screen.hud; import com.llamalad7.mixinextras.injector.wrapoperation.Operation; import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/MixinInGameHud.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/screen/hud/MixinInGameHud.java similarity index 99% rename from src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/MixinInGameHud.java rename to src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/screen/hud/MixinInGameHud.java index e75d1c4c..09ebd12d 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/MixinInGameHud.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/screen/hud/MixinInGameHud.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.screen.hud; import com.llamalad7.mixinextras.injector.ModifyExpressionValue; import de.florianmichael.viafabricplus.settings.impl.VisualSettings; diff --git a/src/main/resources/viafabricplus.mixins.json b/src/main/resources/viafabricplus.mixins.json index eb9f91c2..d69131b5 100644 --- a/src/main/resources/viafabricplus.mixins.json +++ b/src/main/resources/viafabricplus.mixins.json @@ -27,13 +27,13 @@ "fixes.authlib.MixinKeyPairResponse", "fixes.authlib.MixinYggdrasilUserApiService", "fixes.minecraft.MixinBipedEntityModel", - "fixes.minecraft.MixinCamera", + "fixes.minecraft.input.MixinCamera", "fixes.minecraft.MixinClientPlayerInteractionManager", "fixes.minecraft.MixinDrawContext", "fixes.minecraft.MixinFontStorage", - "fixes.minecraft.MixinHandledScreens", - "fixes.minecraft.MixinInGameHud", - "fixes.minecraft.MixinItemRenderer", + "fixes.minecraft.screen.MixinHandledScreens", + "fixes.minecraft.screen.hud.MixinInGameHud", + "fixes.minecraft.item.MixinItemRenderer", "fixes.minecraft.MixinMinecraftClient", "fixes.minecraft.MixinPendingUpdateManager", "fixes.minecraft.MixinPlayerEntityRenderer", @@ -122,7 +122,7 @@ "fixes.minecraft.packet.MixinUpdatePlayerAbilitiesC2SPacket", "fixes.minecraft.screen.MixinAbstractSignEditScreen", "fixes.minecraft.screen.MixinAnvilScreen", - "fixes.minecraft.screen.MixinChatHud", + "fixes.minecraft.screen.hud.MixinChatHud", "fixes.minecraft.screen.MixinChatScreen", "fixes.minecraft.screen.MixinCommandBlockScreen", "fixes.minecraft.screen.MixinConnectScreen_1",