-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fd2b09d
commit a9be86d
Showing
33 changed files
with
172 additions
and
1,041 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...bletooltips/event/ClientTickEndEvent.java → ...bletooltips/event/ClientTickEndEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ltips/event/PreScreenKeyPressedEvent.java → ...ltips/event/PreScreenKeyPressedEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...tips/event/PreScreenMouseScrollEvent.java → ...tips/event/PreScreenMouseScrollEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...bletooltips/event/RenderTooltipEvent.java → ...bletooltips/event/RenderTooltipEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...labletooltips/event/ScreenCloseEvent.java → ...labletooltips/event/ScreenCloseEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...oltips/listener/EventTriggerListener.java → ...oltips/listener/EventTriggerListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
...etooltips/listener/KeyScrollListener.java → ...etooltips/listener/KeyScrollListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
...ooltips/listener/MouseScrollListener.java → ...ooltips/listener/MouseScrollListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
...ips/listener/ScrollingStatusListener.java → ...ips/listener/ScrollingStatusListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...letooltips/manager/KeyBindingManager.java → ...letooltips/manager/KeyBindingManager.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...s/mixin/AccessorAbstractSliderButton.java → ...s/mixin/AccessorAbstractSliderButton.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
...1-forge/src/main/java/cn/flowerinsnow/greatscrollabletooltips/mixin/MixinDrawContext.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package cn.flowerinsnow.greatscrollabletooltips.mixin; | ||
|
||
import net.minecraft.client.gui.GuiGraphics; | ||
import net.minecraftforge.api.distmarker.Dist; | ||
import net.minecraftforge.api.distmarker.OnlyIn; | ||
import cn.flowerinsnow.greatscrollabletooltips.GreatScrollableTooltips; | ||
import org.objectweb.asm.Opcodes; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.ModifyVariable; | ||
|
||
@Mixin(GuiGraphics.class) | ||
@OnlyIn(Dist.CLIENT) | ||
public class MixinDrawContext { | ||
@ModifyVariable( | ||
method = "renderTooltipInternal", | ||
at = @At( | ||
value = "STORE", | ||
ordinal = 0, | ||
opcode = Opcodes.ISTORE | ||
), | ||
index = 12 | ||
) | ||
private int modifyX(int x) { | ||
GreatScrollableTooltips instance = GreatScrollableTooltips.getInstance(); | ||
return x + (instance.getScrollSession().getHorizontal() * instance.getConfig().sensitivity); | ||
} | ||
|
||
@ModifyVariable( | ||
method = "renderTooltipInternal", | ||
at = @At( | ||
value = "STORE", | ||
ordinal = 0, | ||
opcode = Opcodes.ISTORE | ||
), | ||
index = 13 | ||
) | ||
private int modifyY(int y) { | ||
GreatScrollableTooltips instance = GreatScrollableTooltips.getInstance(); | ||
return y + (instance.getScrollSession().getVertical() * instance.getConfig().sensitivity); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 69 additions & 0 deletions
69
.../flowerinsnow/greatscrollabletooltips/mixin/legendarytooltips/MixinLegendaryTooltips.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
package cn.flowerinsnow.greatscrollabletooltips.mixin.legendarytooltips; | ||
|
||
import com.anthonyhilyard.legendarytooltips.LegendaryTooltips; | ||
import net.minecraftforge.api.distmarker.Dist; | ||
import net.minecraftforge.api.distmarker.OnlyIn; | ||
import cn.flowerinsnow.greatscrollabletooltips.GreatScrollableTooltips; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.ModifyArg; | ||
|
||
@Mixin(LegendaryTooltips.class) | ||
@OnlyIn(Dist.CLIENT) | ||
public class MixinLegendaryTooltips { | ||
@ModifyArg( | ||
method = "onPostTooltipEvent", | ||
at = @At( | ||
value = "INVOKE", | ||
target = "Lcom/anthonyhilyard/legendarytooltips/tooltip/TooltipDecor;drawShadow(Lcom/mojang/blaze3d/vertex/PoseStack;IIII)V" | ||
), | ||
remap = false, | ||
index = 1 | ||
) | ||
private static int modifyDrawShadowX(int x) { | ||
GreatScrollableTooltips instance = GreatScrollableTooltips.getInstance(); | ||
return x + instance.getScrollSession().getHorizontal() * instance.getConfig().sensitivity; | ||
} | ||
|
||
@ModifyArg( | ||
method = "onPostTooltipEvent", | ||
at = @At( | ||
value = "INVOKE", | ||
target = "Lcom/anthonyhilyard/legendarytooltips/tooltip/TooltipDecor;drawShadow(Lcom/mojang/blaze3d/vertex/PoseStack;IIII)V" | ||
), | ||
remap = false, | ||
index = 2 | ||
) | ||
private static int modifyDrawShadowY(int y) { | ||
GreatScrollableTooltips instance = GreatScrollableTooltips.getInstance(); | ||
return y + instance.getScrollSession().getVertical() * instance.getConfig().sensitivity; | ||
} | ||
|
||
@ModifyArg( | ||
method = "onPostTooltipEvent", | ||
at = @At( | ||
value = "INVOKE", | ||
target = "Lcom/anthonyhilyard/legendarytooltips/tooltip/TooltipDecor;drawBorder(Lcom/mojang/blaze3d/vertex/PoseStack;IIIILnet/minecraft/world/item/ItemStack;Ljava/util/List;Lnet/minecraft/client/gui/Font;Lcom/anthonyhilyard/legendarytooltips/config/LegendaryTooltipsConfig$FrameDefinition;ZI)V" | ||
), | ||
remap = false, | ||
index = 1 | ||
) | ||
private static int modifyDrawBorderX(int x) { | ||
GreatScrollableTooltips instance = GreatScrollableTooltips.getInstance(); | ||
return x + instance.getScrollSession().getHorizontal() * instance.getConfig().sensitivity; | ||
} | ||
|
||
@ModifyArg( | ||
method = "onPostTooltipEvent", | ||
at = @At( | ||
value = "INVOKE", | ||
target = "Lcom/anthonyhilyard/legendarytooltips/tooltip/TooltipDecor;drawBorder(Lcom/mojang/blaze3d/vertex/PoseStack;IIIILnet/minecraft/world/item/ItemStack;Ljava/util/List;Lnet/minecraft/client/gui/Font;Lcom/anthonyhilyard/legendarytooltips/config/LegendaryTooltipsConfig$FrameDefinition;ZI)V" | ||
), | ||
remap = false, | ||
index = 2 | ||
) | ||
private static int modifyDrawBorderY(int y) { | ||
GreatScrollableTooltips instance = GreatScrollableTooltips.getInstance(); | ||
return y + instance.getScrollSession().getVertical() * instance.getConfig().sensitivity; | ||
} | ||
} |
Oops, something went wrong.