From 8a69e037aba105efff10c67ec78289a0597627d2 Mon Sep 17 00:00:00 2001 From: FlorianMichael Date: Tue, 18 Jun 2024 15:00:05 +0200 Subject: [PATCH] Fixup MixinMouseOptionsScreen, update todo list --- .../florianmichael/viafabricplus/ViaFabricPlus.java | 13 ++++++++++++- .../minecraft/screen/MixinMouseOptionsScreen.java | 13 +++++++------ 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/src/main/java/de/florianmichael/viafabricplus/ViaFabricPlus.java b/src/main/java/de/florianmichael/viafabricplus/ViaFabricPlus.java index 4be02bda..8ce6f407 100644 --- a/src/main/java/de/florianmichael/viafabricplus/ViaFabricPlus.java +++ b/src/main/java/de/florianmichael/viafabricplus/ViaFabricPlus.java @@ -41,7 +41,6 @@ import java.util.concurrent.CompletableFuture; * - Particle handling has slightly changed * * TODO | Port 1.21 - * - Fix MixinMouseOptionsScreen * - SetEntityMotion Lerp * - ClientboundRespawnPacket assigns base values now * - Win Game State 0 missing now @@ -55,6 +54,18 @@ import java.util.concurrent.CompletableFuture; * - HangingEntity, ItemFrame, Painting, PrimedTnt * - Villager offers are server only now * - Player#attack + * - Boat floating and interaction + * - Entity collide functions and interaction + * - LivingEntity#getBlockSpeedFactor, decreaseAirSupply, knockback, travel, getPreciseBodyRotation, + * - Mob interact + * - AxeItem playerHasShieldUseIntent new + * - BucketItem, ChorusFruit, FoodOnAStickItem, KnowledgeBookItem, TridentItem, + * - CakeBlock creative check in interaction + * - Jukebox overrides new interaction function + * - SignBlock, TntBlock creative check + * - Check item rarity values + * - ItemStack count max changed in codec + * - SolidBucketItem useOn * * TODO | General * - Make recipe fixes dynamic instead of a data dump in java classes diff --git a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/screen/MixinMouseOptionsScreen.java b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/screen/MixinMouseOptionsScreen.java index ba043474..6818112e 100644 --- a/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/screen/MixinMouseOptionsScreen.java +++ b/src/main/java/de/florianmichael/viafabricplus/injection/mixin/fixes/minecraft/screen/MixinMouseOptionsScreen.java @@ -19,6 +19,10 @@ package de.florianmichael.viafabricplus.injection.mixin.fixes.minecraft.screen; +import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; +import de.florianmichael.viafabricplus.protocoltranslator.ProtocolTranslator; +import de.florianmichael.viafabricplus.protocoltranslator.util.MathUtil; +import net.minecraft.client.gui.DrawContext; import net.minecraft.client.gui.screen.Screen; import net.minecraft.client.gui.screen.option.GameOptionsScreen; import net.minecraft.client.gui.screen.option.MouseOptionsScreen; @@ -29,19 +33,16 @@ import org.spongepowered.asm.mixin.Mixin; @Mixin(MouseOptionsScreen.class) public abstract class MixinMouseOptionsScreen extends GameOptionsScreen { - /*@Shadow - private OptionListWidget buttonList;*/ - public MixinMouseOptionsScreen(Screen parent, GameOptions gameOptions, Text title) { super(parent, gameOptions, title); } - /*@Override + @Override public void render(DrawContext context, int mouseX, int mouseY, float delta) { super.render(context, mouseX, mouseY, delta); - if (ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_13_2) && this.buttonList.getWidgetFor(this.gameOptions.getMouseSensitivity()).isHovered()) { + if (ProtocolTranslator.getTargetVersion().olderThanOrEqualTo(ProtocolVersion.v1_13_2) && this.body.getWidgetFor(this.gameOptions.getMouseSensitivity()).isHovered()) { context.drawTooltip(textRenderer, Text.of("<=1.13.2 Sensitivity: " + MathUtil.get1_13SliderValue(this.gameOptions.getMouseSensitivity().getValue().floatValue()).valueInt() + "%"), mouseX, mouseY); } - }*/ + } }