random stuff that doesn't owrk.,.,.,,.

This commit is contained in:
Chayapak 2023-05-17 11:44:01 +07:00
parent cbfbe612bd
commit 9b7b9cd368
4 changed files with 29 additions and 2 deletions

View file

@ -14,5 +14,5 @@ org.gradle.parallel=true
archives_base_name = chipmunkmod archives_base_name = chipmunkmod
# Dependencies # Dependencies
fabric_version=0.80.0+1.19.4 fabric_version=0.81.1+1.19.4

View file

@ -6,6 +6,7 @@ import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.ModifyArg;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
import net.minecraft.client.MinecraftClient; import net.minecraft.client.MinecraftClient;
@ -38,4 +39,9 @@ public class ChatScreenMixin {
public void init (CallbackInfo ci) { public void init (CallbackInfo ci) {
chatField.setMaxLength(Integer.MAX_VALUE); chatField.setMaxLength(Integer.MAX_VALUE);
} }
@ModifyArg(method = "normalize", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/StringHelper;truncateChat(Ljava/lang/String;)Ljava/lang/String;"))
private String normalize (String text) {
return text;
}
} }

View file

@ -0,0 +1,20 @@
package land.chipmunk.chipmunkmod.mixin;
import net.minecraft.util.StringHelper;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.ModifyArg;
@Mixin(StringHelper.class)
public class StringHelperMixin {
// totallynotskidded from meteor client
@ModifyArg(method = "truncateChat", at = @At(value = "INVOKE", target = "Lnet/minecraft/util/StringHelper;truncate(Ljava/lang/String;IZ)Ljava/lang/String;"))
private static int truncateChat(int maxLength) {
return Integer.MAX_VALUE;
}
@ModifyArg(method = "stripTextFormat", at = @At(value = "INVOKE", target = "Ljava/util/regex/Matcher;replaceAll(Ljava/lang/String;)Ljava/lang/String;"))
private static String stripTextFormat (String replacement) {
return replacement;
}
}

View file

@ -13,7 +13,8 @@
"ClientPlayNetworkHandlerMixin", "ClientPlayNetworkHandlerMixin",
"MinecraftClientAccessor", "MinecraftClientAccessor",
"LightmapTextureManagerMixin", "LightmapTextureManagerMixin",
"DecoderHandlerMixin" "DecoderHandlerMixin",
"StringHelperMixin"
], ],
"injectors": { "injectors": {
"defaultRequire": 1 "defaultRequire": 1