mirror of
https://github.com/PaperMC/Paper.git
synced 2025-07-26 09:42:06 -07:00
Fix tests
This commit is contained in:
@@ -138,7 +138,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+import io.papermc.paper.adventure.PaperAdventure;
|
||||
+import net.kyori.adventure.text.format.TextColor;
|
||||
+import net.minecraft.advancements.FrameType;
|
||||
+import net.minecraft.network.chat.TranslatableComponent;
|
||||
+import net.minecraft.network.chat.contents.TranslatableContents;
|
||||
+import org.junit.Test;
|
||||
+
|
||||
+import static org.junit.Assert.assertEquals;
|
||||
@@ -149,7 +149,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ public void test() {
|
||||
+ for (FrameType nmsFrameType : FrameType.values()) {
|
||||
+ final TextColor expectedColor = PaperAdventure.asAdventure(nmsFrameType.getChatColor());
|
||||
+ final String expectedTranslationKey = ((TranslatableComponent) nmsFrameType.getDisplayName()).getKey();
|
||||
+ final String expectedTranslationKey = ((TranslatableContents) nmsFrameType.getDisplayName().getContents()).getKey();
|
||||
+ final var frame = PaperAdvancementDisplay.asPaperFrame(nmsFrameType);
|
||||
+ assertEquals("The translation keys should be the same", expectedTranslationKey, frame.translationKey());
|
||||
+ assertEquals("The frame colors should be the same", expectedColor, frame.color());
|
||||
|
Reference in New Issue
Block a user