-
-
Notifications
You must be signed in to change notification settings - Fork 208
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: shwords causing blank messages in chat (#3110)
- Loading branch information
1 parent
a58bd09
commit 52c078a
Showing
2 changed files
with
17 additions
and
8 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
17 changes: 17 additions & 0 deletions
17
...main/java/at/hannibal2/skyhanni/mixins/transformers/gui/MixinGuiUtilRenderComponents.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,17 @@ | ||
package at.hannibal2.skyhanni.mixins.transformers.gui; | ||
|
||
import at.hannibal2.skyhanni.features.misc.visualwords.ModifyVisualWords; | ||
import net.minecraft.client.gui.GuiUtilRenderComponents; | ||
import net.minecraft.util.IChatComponent; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.At; | ||
import org.spongepowered.asm.mixin.injection.Redirect; | ||
|
||
@Mixin(GuiUtilRenderComponents.class) | ||
public class MixinGuiUtilRenderComponents { | ||
|
||
@Redirect(method = "splitText", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/IChatComponent;getUnformattedTextForChat()Ljava/lang/String;")) | ||
private static String onSplitText(IChatComponent instance) { | ||
return ModifyVisualWords.INSTANCE.modifyText(instance.getUnformattedTextForChat()); | ||
} | ||
} |