-
Notifications
You must be signed in to change notification settings - Fork 15
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
0573d4d
commit c65ed04
Showing
5 changed files
with
59 additions
and
0 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
15 changes: 15 additions & 0 deletions
15
...ava/me/senseiwells/essentialclient/mixins/longChatMessages/ChatMessageC2SPacketMixin.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,15 @@ | ||
package me.senseiwells.essentialclient.mixins.longChatMessages; | ||
|
||
import me.senseiwells.essentialclient.utils.EssentialUtils; | ||
import net.minecraft.network.packet.c2s.play.ChatMessageC2SPacket; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.Constant; | ||
import org.spongepowered.asm.mixin.injection.ModifyConstant; | ||
|
||
@Mixin(ChatMessageC2SPacket.class) | ||
public class ChatMessageC2SPacketMixin { | ||
@ModifyConstant(method = "<init>(Ljava/lang/String;)V", constant = @Constant(intValue = 256)) | ||
private int onMaxLength(int constant) { | ||
return EssentialUtils.getMaxChatLength(constant); | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
src/main/java/me/senseiwells/essentialclient/mixins/longChatMessages/ChatScreenMixin.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,15 @@ | ||
package me.senseiwells.essentialclient.mixins.longChatMessages; | ||
|
||
import me.senseiwells.essentialclient.utils.EssentialUtils; | ||
import net.minecraft.client.gui.screen.ChatScreen; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
import org.spongepowered.asm.mixin.injection.Constant; | ||
import org.spongepowered.asm.mixin.injection.ModifyConstant; | ||
|
||
@Mixin(ChatScreen.class) | ||
public class ChatScreenMixin { | ||
@ModifyConstant(method = "init", constant = @Constant(intValue = 256)) | ||
private int getMaxLength(int constant) { | ||
return EssentialUtils.getMaxChatLength(constant); | ||
} | ||
} |
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