-
Notifications
You must be signed in to change notification settings - Fork 38
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
Showing
5 changed files
with
28 additions
and
34 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
18 changes: 8 additions & 10 deletions
18
...n/java/mod/acgaming/universaltweaks/mods/emojicord/emojicontext/mixin/UTGuiChatMixin.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 |
---|---|---|
@@ -1,28 +1,26 @@ | ||
package mod.acgaming.universaltweaks.mods.emojicord.emojicontext.mixin; | ||
|
||
import net.minecraft.client.gui.GuiChat; | ||
|
||
import mod.acgaming.universaltweaks.mods.emojicord.emojicontext.EmojiFontRendererContext; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.ModifyVariable; | ||
|
||
import mod.acgaming.universaltweaks.mods.emojicord.emojicontext.EmojiFontRendererContext; | ||
import net.minecraft.client.gui.GuiChat; | ||
|
||
@Mixin(GuiChat.class) | ||
public class UTGuiChatMixin | ||
{ | ||
|
||
@ModifyVariable(method = "drawScreen", at = @At("HEAD"), index = 3, ordinal = 0, name = "partialTicks") | ||
private float pre_drawScreen(float partialTicks) | ||
@ModifyVariable(method = "drawScreen", at = @At("HEAD"), index = 3, ordinal = 0, name = "partialTicks", argsOnly = true) | ||
private float utEmojicordPreDrawScreen(float partialTicks) | ||
{ | ||
EmojiFontRendererContext.isChatInput = true; | ||
return partialTicks; | ||
} | ||
|
||
@ModifyVariable(method = "drawScreen", at = @At("RETURN"), index = 3, ordinal = 0, name = "partialTicks") | ||
private float post_drawScreen(float partialTicks) | ||
@ModifyVariable(method = "drawScreen", at = @At("RETURN"), index = 3, ordinal = 0, name = "partialTicks", argsOnly = true) | ||
private float utEmojicordPostDrawScreen(float partialTicks) | ||
{ | ||
EmojiFontRendererContext.isChatInput = false; | ||
return partialTicks; | ||
} | ||
|
||
} | ||
} |
18 changes: 8 additions & 10 deletions
18
...ava/mod/acgaming/universaltweaks/mods/emojicord/emojicontext/mixin/UTGuiNewChatMixin.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 |
---|---|---|
@@ -1,28 +1,26 @@ | ||
package mod.acgaming.universaltweaks.mods.emojicord.emojicontext.mixin; | ||
|
||
import net.minecraft.client.gui.GuiNewChat; | ||
|
||
import mod.acgaming.universaltweaks.mods.emojicord.emojicontext.EmojiFontRendererContext; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.ModifyVariable; | ||
|
||
import mod.acgaming.universaltweaks.mods.emojicord.emojicontext.EmojiFontRendererContext; | ||
import net.minecraft.client.gui.GuiNewChat; | ||
|
||
@Mixin(GuiNewChat.class) | ||
public class UTGuiNewChatMixin | ||
{ | ||
|
||
@ModifyVariable(method = "drawChat", at = @At("HEAD"), index = 1, ordinal = 0, name = "updateCounter") | ||
private int pre_drawChat(int updateCounter) | ||
@ModifyVariable(method = "drawChat", at = @At("HEAD"), index = 1, ordinal = 0, name = "updateCounter", argsOnly = true) | ||
private int utEmojicordPreDrawChat(int updateCounter) | ||
{ | ||
EmojiFontRendererContext.isChatMessage = true; | ||
return updateCounter; | ||
} | ||
|
||
@ModifyVariable(method = "drawChat", at = @At("RETURN"), index = 1, ordinal = 0, name = "updateCounter") | ||
private int post_drawChat(int updateCounter) | ||
@ModifyVariable(method = "drawChat", at = @At("RETURN"), index = 1, ordinal = 0, name = "updateCounter", argsOnly = true) | ||
private int utEmojicordPostDrawChat(int updateCounter) | ||
{ | ||
EmojiFontRendererContext.isChatMessage = false; | ||
return updateCounter; | ||
} | ||
|
||
} | ||
} |