forked from CCBlueX/LiquidBounce
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(BetterChat): copy chat line (CCBlueX#4958)
- Loading branch information
1 parent
2b65d58
commit aa66b99
Showing
7 changed files
with
218 additions
and
4 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
28 changes: 28 additions & 0 deletions
28
...in/java/net/ccbluex/liquidbounce/injection/mixins/minecraft/gui/MixinChatHudAccessor.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,28 @@ | ||
package net.ccbluex.liquidbounce.injection.mixins.minecraft.gui; | ||
|
||
import net.minecraft.client.gui.hud.ChatHud; | ||
import net.minecraft.client.gui.hud.ChatHudLine; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.gen.Accessor; | ||
import org.spongepowered.asm.mixin.gen.Invoker; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* @author 00101110001100010111000101111 | ||
* @since 12/18/2024 | ||
**/ | ||
@Mixin(ChatHud.class) | ||
public interface MixinChatHudAccessor { | ||
@Invoker("toChatLineY") | ||
double invokeToChatLineY(double y); | ||
|
||
@Invoker("getMessageIndex") | ||
int invokeGetMessageIndex(double chatLineX, double chatLineY); | ||
|
||
@Invoker("getLineHeight") | ||
int invokeGetLineHeight(); | ||
|
||
@Accessor | ||
List<ChatHudLine.Visible> getVisibleMessages(); | ||
} |
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
12 changes: 12 additions & 0 deletions
12
...java/net/ccbluex/liquidbounce/injection/mixins/minecraft/gui/MixinChatScreenAccessor.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,12 @@ | ||
package net.ccbluex.liquidbounce.injection.mixins.minecraft.gui; | ||
|
||
import net.minecraft.client.gui.screen.ChatScreen; | ||
import net.minecraft.client.gui.widget.TextFieldWidget; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.gen.Accessor; | ||
|
||
@Mixin(ChatScreen.class) | ||
public interface MixinChatScreenAccessor { | ||
@Accessor("chatField") | ||
TextFieldWidget getChatField(); | ||
} |
5 changes: 5 additions & 0 deletions
5
src/main/java/net/ccbluex/liquidbounce/interfaces/ChatHudAddition.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,5 @@ | ||
package net.ccbluex.liquidbounce.interfaces; | ||
|
||
public interface ChatHudAddition { | ||
int liquidbounce_getChatY(); | ||
} |
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