Skip to content

Commit

Permalink
(1.16+) Fixed the style of translation text gets lost during server-s…
Browse files Browse the repository at this point in the history
…ide translation
  • Loading branch information
Fallen-Breath committed Feb 2, 2023
1 parent a5f9334 commit 05e6610
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@

import net.minecraft.text.TranslatableText;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Mutable;
import org.spongepowered.asm.mixin.gen.Accessor;
import org.spongepowered.asm.mixin.gen.Invoker;

//#if MC >= 11800
//$$ import java.util.function.Consumer;
//#else
import org.spongepowered.asm.mixin.gen.Accessor;
import java.util.List;
//#endif

Expand All @@ -40,6 +41,10 @@
@Mixin(TranslatableText.class)
public interface TranslatableTextAccessor
{
@Accessor
@Mutable
void setArgs(Object[] args);

//#if MC < 11800

@Accessor
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/carpettisaddition/utils/Messenger.java
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ public static BaseText copy(BaseText text)
//$$ args[i] = copy((BaseText)args[i]);
//$$ }
//$$ }
//$$ copied = tr(translatableText.getKey(), args.clone());
//$$ ((TranslatableTextAccessor)translatableText).setArgs(args);
//$$ }
//#endif

Expand Down

0 comments on commit 05e6610

Please sign in to comment.