[DEV] Backport fixes from DEV branch.
This commit is contained in:
@@ -8,24 +8,21 @@
|
||||
import com.hypherionmc.craterlib.nojang.resources.ResourceIdentifier;
|
||||
import me.hypherionmc.mcdiscordformatter.discord.DiscordSerializer;
|
||||
import me.hypherionmc.mcdiscordformatter.minecraft.MinecraftSerializer;
|
||||
@@ -11,14 +9,10 @@
|
||||
@@ -11,11 +9,10 @@
|
||||
import net.minecraft.ChatFormatting;
|
||||
import net.minecraft.SharedConstants;
|
||||
import net.minecraft.Util;
|
||||
-import net.minecraft.client.Minecraft;
|
||||
-import net.minecraft.core.HolderLookup;
|
||||
-import net.minecraft.core.RegistryAccess;
|
||||
-import net.minecraft.data.registries.VanillaRegistries;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.network.chat.Style;
|
||||
-
|
||||
-import java.util.function.Consumer;
|
||||
+import net.minecraft.network.chat.TextComponent;
|
||||
+import net.minecraft.network.chat.TranslatableComponent;
|
||||
|
||||
public class ChatUtils {
|
||||
|
||||
@@ -28,30 +22,20 @@
|
||||
@@ -25,30 +22,20 @@
|
||||
|
||||
public static Component adventureToMojang(net.kyori.adventure.text.Component inComponent) {
|
||||
final String serialised = adventureSerializer.serialize(inComponent);
|
||||
@@ -59,7 +56,7 @@
|
||||
}
|
||||
|
||||
public static String strip(String inString, String... toStrip) {
|
||||
@@ -80,7 +64,7 @@
|
||||
@@ -77,7 +64,7 @@
|
||||
}
|
||||
|
||||
public static net.kyori.adventure.text.Component resolve(String component, boolean formatted) {
|
||||
@@ -68,7 +65,7 @@
|
||||
if (formatted) {
|
||||
returnVal = MinecraftSerializer.INSTANCE.serialize(component);
|
||||
}
|
||||
@@ -108,7 +92,7 @@
|
||||
@@ -105,7 +92,7 @@
|
||||
if (identifier == null)
|
||||
return net.kyori.adventure.text.Component.text("Unknown");
|
||||
|
||||
|
Reference in New Issue
Block a user