diff options
Diffstat (limited to 'src/test')
32 files changed, 1826 insertions, 109 deletions
diff --git a/src/test/kotlin/MixinTest.kt b/src/test/kotlin/MixinTest.kt new file mode 100644 index 0000000..55aa7c2 --- /dev/null +++ b/src/test/kotlin/MixinTest.kt @@ -0,0 +1,34 @@ +package moe.nea.firmament.test + +import org.junit.jupiter.api.Assertions +import org.junit.jupiter.api.Test +import org.spongepowered.asm.mixin.MixinEnvironment +import org.spongepowered.asm.mixin.transformer.IMixinTransformer +import moe.nea.firmament.init.MixinPlugin + +class MixinTest { + @Test + fun mixinAudit() { + FirmTestBootstrap.bootstrapMinecraft() + MixinEnvironment.getCurrentEnvironment().audit() + val mp = MixinPlugin.instances.single() + Assertions.assertEquals( + mp.expectedFullPathMixins, + mp.appliedFullPathMixins, + ) + Assertions.assertNotEquals( + 0, + mp.mixins.size + ) + + } + + @Test + fun hasInstalledMixinTransformer() { + Assertions.assertInstanceOf( + IMixinTransformer::class.java, + MixinEnvironment.getCurrentEnvironment().activeTransformer + ) + } +} + diff --git a/src/test/kotlin/features/macros/KeyComboTrieCreation.kt b/src/test/kotlin/features/macros/KeyComboTrieCreation.kt new file mode 100644 index 0000000..f0e7a1b --- /dev/null +++ b/src/test/kotlin/features/macros/KeyComboTrieCreation.kt @@ -0,0 +1,103 @@ +package moe.nea.firmament.test.features.macros + +import org.junit.jupiter.api.Assertions +import org.junit.jupiter.api.Test +import net.minecraft.client.util.InputUtil +import moe.nea.firmament.features.macros.Branch +import moe.nea.firmament.features.macros.ComboKeyAction +import moe.nea.firmament.features.macros.CommandAction +import moe.nea.firmament.features.macros.KeyComboTrie +import moe.nea.firmament.features.macros.Leaf +import moe.nea.firmament.keybindings.SavedKeyBinding + +class KeyComboTrieCreation { + val basicAction = CommandAction("ac Hello") + val aPress = SavedKeyBinding(InputUtil.GLFW_KEY_A) + val bPress = SavedKeyBinding(InputUtil.GLFW_KEY_B) + val cPress = SavedKeyBinding(InputUtil.GLFW_KEY_C) + + @Test + fun testValidShortTrie() { + val actions = listOf( + ComboKeyAction(basicAction, listOf(aPress)), + ComboKeyAction(basicAction, listOf(bPress)), + ComboKeyAction(basicAction, listOf(cPress)), + ) + Assertions.assertEquals( + Branch( + mapOf( + aPress to Leaf(basicAction), + bPress to Leaf(basicAction), + cPress to Leaf(basicAction), + ), + ), KeyComboTrie.fromComboList(actions) + ) + } + + @Test + fun testOverlappingLeafs() { + Assertions.assertThrows(IllegalStateException::class.java) { + KeyComboTrie.fromComboList( + listOf( + ComboKeyAction(basicAction, listOf(aPress, aPress)), + ComboKeyAction(basicAction, listOf(aPress, aPress)), + ) + ) + } + Assertions.assertThrows(IllegalStateException::class.java) { + KeyComboTrie.fromComboList( + listOf( + ComboKeyAction(basicAction, listOf(aPress)), + ComboKeyAction(basicAction, listOf(aPress)), + ) + ) + } + } + + @Test + fun testBranchOverlappingLeaf() { + Assertions.assertThrows(IllegalStateException::class.java) { + KeyComboTrie.fromComboList( + listOf( + ComboKeyAction(basicAction, listOf(aPress)), + ComboKeyAction(basicAction, listOf(aPress, aPress)), + ) + ) + } + } + @Test + fun testLeafOverlappingBranch() { + Assertions.assertThrows(IllegalStateException::class.java) { + KeyComboTrie.fromComboList( + listOf( + ComboKeyAction(basicAction, listOf(aPress, aPress)), + ComboKeyAction(basicAction, listOf(aPress)), + ) + ) + } + } + + + @Test + fun testValidNestedTrie() { + val actions = listOf( + ComboKeyAction(basicAction, listOf(aPress, aPress)), + ComboKeyAction(basicAction, listOf(aPress, bPress)), + ComboKeyAction(basicAction, listOf(cPress)), + ) + Assertions.assertEquals( + Branch( + mapOf( + aPress to Branch( + mapOf( + aPress to Leaf(basicAction), + bPress to Leaf(basicAction), + ) + ), + cPress to Leaf(basicAction), + ), + ), KeyComboTrie.fromComboList(actions) + ) + } + +} diff --git a/src/test/kotlin/root.kt b/src/test/kotlin/root.kt index 045fdd5..000ddda 100644 --- a/src/test/kotlin/root.kt +++ b/src/test/kotlin/root.kt @@ -24,6 +24,7 @@ object FirmTestBootstrap { println("Bootstrap completed at $loadEnd after $loadDuration") } + @JvmStatic fun bootstrapMinecraft() { } } diff --git a/src/test/kotlin/testutil/AutoBootstrapExtension.kt b/src/test/kotlin/testutil/AutoBootstrapExtension.kt new file mode 100644 index 0000000..6f225a0 --- /dev/null +++ b/src/test/kotlin/testutil/AutoBootstrapExtension.kt @@ -0,0 +1,14 @@ +package moe.nea.firmament.test.testutil + +import com.google.auto.service.AutoService +import org.junit.jupiter.api.extension.BeforeAllCallback +import org.junit.jupiter.api.extension.Extension +import org.junit.jupiter.api.extension.ExtensionContext +import moe.nea.firmament.test.FirmTestBootstrap + +@AutoService(Extension::class) +class AutoBootstrapExtension : Extension, BeforeAllCallback { + override fun beforeAll(p0: ExtensionContext) { + FirmTestBootstrap.bootstrapMinecraft() + } +} diff --git a/src/test/kotlin/testutil/ItemResources.kt b/src/test/kotlin/testutil/ItemResources.kt index 107b565..e996fc2 100644 --- a/src/test/kotlin/testutil/ItemResources.kt +++ b/src/test/kotlin/testutil/ItemResources.kt @@ -1,15 +1,24 @@ package moe.nea.firmament.test.testutil +import com.mojang.datafixers.DSL +import com.mojang.serialization.Dynamic +import com.mojang.serialization.JsonOps +import net.minecraft.SharedConstants +import net.minecraft.datafixer.Schemas +import net.minecraft.datafixer.TypeReferences import net.minecraft.item.ItemStack import net.minecraft.nbt.NbtCompound import net.minecraft.nbt.NbtElement import net.minecraft.nbt.NbtOps +import net.minecraft.nbt.NbtString import net.minecraft.nbt.StringNbtReader import net.minecraft.registry.RegistryOps import net.minecraft.text.Text import net.minecraft.text.TextCodecs +import moe.nea.firmament.features.debug.ExportedTestConstantMeta import moe.nea.firmament.test.FirmTestBootstrap import moe.nea.firmament.util.MC +import moe.nea.firmament.util.mc.MCTabListAPI object ItemResources { init { @@ -24,18 +33,62 @@ object ItemResources { } fun loadSNbt(path: String): NbtCompound { - return StringNbtReader.parse(loadString(path)) + return StringNbtReader.readCompound(loadString(path)) } + fun getNbtOps(): RegistryOps<NbtElement> = MC.currentOrDefaultRegistries.getOps(NbtOps.INSTANCE) + fun tryMigrateNbt( + nbtCompound: NbtCompound, + typ: DSL.TypeReference?, + ): NbtElement { + val source = nbtCompound.get("source", ExportedTestConstantMeta.CODEC) + nbtCompound.remove("source") + if (source.isPresent) { + val wrappedNbtSource = if (typ == TypeReferences.TEXT_COMPONENT && source.get().dataVersion < 4325) { + // Per 1.21.5 text components are wrapped in a string, which firmament unwrapped in the snbt files + NbtString.of( + NbtOps.INSTANCE.convertTo(JsonOps.INSTANCE, nbtCompound) + .toString() + ) + } else { + nbtCompound + } + if (typ != null) { + return Schemas.getFixer() + .update( + typ, + Dynamic(NbtOps.INSTANCE, wrappedNbtSource), + source.get().dataVersion, + SharedConstants.getGameVersion().saveVersion.id + ).value + } else { + wrappedNbtSource + } + } + return nbtCompound + } + + fun loadTablist(name: String): MCTabListAPI.CurrentTabList { + return MCTabListAPI.CurrentTabList.CODEC.parse( + getNbtOps(), + tryMigrateNbt(loadSNbt("testdata/tablist/$name.snbt"), null), + ).getOrThrow { IllegalStateException("Could not load tablist '$name': $it") } + } + fun loadText(name: String): Text { - return TextCodecs.CODEC.parse(getNbtOps(), loadSNbt("testdata/chat/$name.snbt")) - .getOrThrow { IllegalStateException("Could not load test chat '$name': $it") } + return TextCodecs.CODEC.parse( + getNbtOps(), + tryMigrateNbt(loadSNbt("testdata/chat/$name.snbt"), TypeReferences.TEXT_COMPONENT) + ).getOrThrow { IllegalStateException("Could not load test chat '$name': $it") } } fun loadItem(name: String): ItemStack { - // TODO: make the load work with enchantments - return ItemStack.CODEC.parse(getNbtOps(), loadSNbt("testdata/items/$name.snbt")) - .getOrThrow { IllegalStateException("Could not load test item '$name': $it") } + try { + val itemNbt = loadSNbt("testdata/items/$name.snbt") + return ItemStack.CODEC.parse(getNbtOps(), tryMigrateNbt(itemNbt, TypeReferences.ITEM_STACK)).orThrow + } catch (ex: Exception) { + throw RuntimeException("Could not load item resource '$name'", ex) + } } } diff --git a/src/test/kotlin/testutil/KotestPlugin.kt b/src/test/kotlin/testutil/KotestPlugin.kt deleted file mode 100644 index 6db50fb..0000000 --- a/src/test/kotlin/testutil/KotestPlugin.kt +++ /dev/null @@ -1,16 +0,0 @@ -package moe.nea.firmament.test.testutil - -import io.kotest.core.config.AbstractProjectConfig -import io.kotest.core.extensions.Extension -import moe.nea.firmament.test.FirmTestBootstrap - -class KotestPlugin : AbstractProjectConfig() { - override fun extensions(): List<Extension> { - return listOf() - } - - override suspend fun beforeProject() { - FirmTestBootstrap.bootstrapMinecraft() - super.beforeProject() - } -} diff --git a/src/test/kotlin/util/ColorCodeTest.kt b/src/test/kotlin/util/ColorCodeTest.kt index 949749e..7c581c5 100644 --- a/src/test/kotlin/util/ColorCodeTest.kt +++ b/src/test/kotlin/util/ColorCodeTest.kt @@ -1,57 +1,57 @@ package moe.nea.firmament.test.util -import io.kotest.core.spec.style.AnnotationSpec import org.junit.jupiter.api.Assertions +import org.junit.jupiter.api.Test import moe.nea.firmament.util.removeColorCodes -class ColorCodeTest : AnnotationSpec() { - @Test - fun testWhatever() { - Assertions.assertEquals("", "".removeColorCodes()) - Assertions.assertEquals("", "§".removeColorCodes()) - Assertions.assertEquals("", "§a".removeColorCodes()) - Assertions.assertEquals("ab", "a§ab".removeColorCodes()) - Assertions.assertEquals("ab", "a§ab§§".removeColorCodes()) - Assertions.assertEquals("abc", "a§ab§§c".removeColorCodes()) - Assertions.assertEquals("bc", "§ab§§c".removeColorCodes()) - Assertions.assertEquals("b§lc", "§ab§l§§c".removeColorCodes(true)) - Assertions.assertEquals("b§lc§l", "§ab§l§§c§l".removeColorCodes(true)) - Assertions.assertEquals("§lb§lc", "§l§ab§l§§c".removeColorCodes(true)) - } - - @Test - fun testEdging() { - Assertions.assertEquals("", "§".removeColorCodes()) - Assertions.assertEquals("a", "a§".removeColorCodes()) - Assertions.assertEquals("b", "§ab§".removeColorCodes()) - } - - @Test - fun `testDouble§`() { - Assertions.assertEquals("1", "§§1".removeColorCodes()) - } - - @Test - fun testKeepNonColor() { - Assertions.assertEquals("§k§l§m§n§o§r", "§k§l§m§f§n§o§r".removeColorCodes(true)) - } - - @Test - fun testPlainString() { - Assertions.assertEquals("bcdefgp", "bcdefgp".removeColorCodes()) - Assertions.assertEquals("", "".removeColorCodes()) - } - - @Test - fun testSomeNormalTestCases() { - Assertions.assertEquals( - "You are not currently in a party.", - "§r§cYou are not currently in a party.§r".removeColorCodes() - ) - Assertions.assertEquals( - "Ancient Necron's Chestplate ✪✪✪✪", - "§dAncient Necron's Chestplate §6✪§6✪§6✪§6✪".removeColorCodes() - ) - } +class ColorCodeTest { + @Test + fun testWhatever() { + Assertions.assertEquals("", "".removeColorCodes()) + Assertions.assertEquals("", "§".removeColorCodes()) + Assertions.assertEquals("", "§a".removeColorCodes()) + Assertions.assertEquals("ab", "a§ab".removeColorCodes()) + Assertions.assertEquals("ab", "a§ab§§".removeColorCodes()) + Assertions.assertEquals("abc", "a§ab§§c".removeColorCodes()) + Assertions.assertEquals("bc", "§ab§§c".removeColorCodes()) + Assertions.assertEquals("b§lc", "§ab§l§§c".removeColorCodes(true)) + Assertions.assertEquals("b§lc§l", "§ab§l§§c§l".removeColorCodes(true)) + Assertions.assertEquals("§lb§lc", "§l§ab§l§§c".removeColorCodes(true)) + } + + @Test + fun testEdging() { + Assertions.assertEquals("", "§".removeColorCodes()) + Assertions.assertEquals("a", "a§".removeColorCodes()) + Assertions.assertEquals("b", "§ab§".removeColorCodes()) + } + + @Test + fun `testDouble§`() { + Assertions.assertEquals("1", "§§1".removeColorCodes()) + } + + @Test + fun testKeepNonColor() { + Assertions.assertEquals("§k§l§m§n§o§r", "§k§l§m§f§n§o§r".removeColorCodes(true)) + } + + @Test + fun testPlainString() { + Assertions.assertEquals("bcdefgp", "bcdefgp".removeColorCodes()) + Assertions.assertEquals("", "".removeColorCodes()) + } + + @Test + fun testSomeNormalTestCases() { + Assertions.assertEquals( + "You are not currently in a party.", + "§r§cYou are not currently in a party.§r".removeColorCodes() + ) + Assertions.assertEquals( + "Ancient Necron's Chestplate ✪✪✪✪", + "§dAncient Necron's Chestplate §6✪§6✪§6✪§6✪".removeColorCodes() + ) + } } diff --git a/src/test/kotlin/util/TextUtilText.kt b/src/test/kotlin/util/TextUtilText.kt index 46ed3b4..94ab222 100644 --- a/src/test/kotlin/util/TextUtilText.kt +++ b/src/test/kotlin/util/TextUtilText.kt @@ -1,16 +1,18 @@ package moe.nea.firmament.test.util -import io.kotest.core.spec.style.AnnotationSpec import org.junit.jupiter.api.Assertions +import org.junit.jupiter.api.Test import moe.nea.firmament.test.testutil.ItemResources import moe.nea.firmament.util.getLegacyFormatString -class TextUtilText : AnnotationSpec() { +class TextUtilText { @Test fun testThing() { // TODO: add more tests that are directly validated with 1.8.9 code val text = ItemResources.loadText("all-chat") - Assertions.assertEquals("§r§r§8[§r§9302§r§8] §r§6♫ §r§b[MVP§r§d+§r§b] lrg89§r§f: test§r", - text.getLegacyFormatString()) + Assertions.assertEquals( + "§r§r§8[§r§9302§r§8] §r§6♫ §r§b[MVP§r§d+§r§b] lrg89§r§f: test§r", + text.getLegacyFormatString() + ) } } diff --git a/src/test/kotlin/util/math/GChainReconciliationTest.kt b/src/test/kotlin/util/math/GChainReconciliationTest.kt new file mode 100644 index 0000000..380ea5c --- /dev/null +++ b/src/test/kotlin/util/math/GChainReconciliationTest.kt @@ -0,0 +1,75 @@ +package moe.nea.firmament.test.util.math + +import org.junit.jupiter.api.Assertions +import org.junit.jupiter.api.Assertions.* +import org.junit.jupiter.api.Test +import moe.nea.firmament.util.math.GChainReconciliation +import moe.nea.firmament.util.math.GChainReconciliation.rotated + +class GChainReconciliationTest { + + fun <T> assertEqualCycles( + expected: List<T>, + actual: List<T> + ) { + for (offset in expected.indices) { + val rotated = expected.rotated(offset) + val matchesAtRotation = run { + for ((i, v) in actual.withIndex()) { + if (rotated[i % rotated.size] != v) + return@run false + } + true + } + if (matchesAtRotation) + return + } + assertEquals(expected, actual, "Expected arrays to be cycle equivalent") + } + + @Test + fun testUnfixableCycleNotBeingModified() { + assertEquals( + listOf(1, 2, 3, 4, 6, 1, 2, 3, 4, 6), + GChainReconciliation.reconcileCycles( + listOf(1, 2, 3, 4, 6, 1, 2, 3, 4, 6), + listOf(2, 3, 4, 5, 1, 2, 3, 4, 5, 1) + ) + ) + } + + @Test + fun testMultipleIndependentHoles() { + assertEqualCycles( + listOf(1, 2, 3, 4, 5, 6), + GChainReconciliation.reconcileCycles( + listOf(1, 3, 4, 5, 6, 1, 3, 4, 5, 6), + listOf(2, 3, 4, 5, 1, 2, 3, 4, 5, 1) + ) + ) + + } + + @Test + fun testBigHole() { + assertEqualCycles( + listOf(1, 2, 3, 4, 5, 6), + GChainReconciliation.reconcileCycles( + listOf(1, 4, 5, 6, 1, 4, 5, 6), + listOf(2, 3, 4, 5, 1, 2, 3, 4, 5, 1) + ) + ) + + } + + @Test + fun testOneMissingBeingDetected() { + assertEqualCycles( + listOf(1, 2, 3, 4, 5, 6), + GChainReconciliation.reconcileCycles( + listOf(1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 5, 6), + listOf(2, 3, 4, 5, 1, 2, 3, 4, 5, 1) + ) + ) + } +} diff --git a/src/test/kotlin/util/math/ProjectionsBoxTest.kt b/src/test/kotlin/util/math/ProjectionsBoxTest.kt new file mode 100644 index 0000000..04720a3 --- /dev/null +++ b/src/test/kotlin/util/math/ProjectionsBoxTest.kt @@ -0,0 +1,28 @@ +package moe.nea.firmament.test.util.math + +import java.util.stream.Stream +import org.junit.jupiter.api.Assertions +import org.junit.jupiter.api.DynamicTest +import org.junit.jupiter.api.TestFactory +import kotlin.streams.asStream +import net.minecraft.util.math.Vec2f +import moe.nea.firmament.util.math.Projections + +class ProjectionsBoxTest { + val Double.degrees get() = Math.toRadians(this) + + @TestFactory + fun testProjections(): Stream<DynamicTest> { + return sequenceOf( + 0.0.degrees to Vec2f(1F, 0F), + 63.4349.degrees to Vec2f(0.5F, 1F), + ).map { (angle, expected) -> + DynamicTest.dynamicTest("ProjectionsBoxTest::projectAngleOntoUnitBox(${angle})") { + val actual = Projections.Two.projectAngleOntoUnitBox(angle) + fun msg() = "Expected (${expected.x}, ${expected.y}) got (${actual.x}, ${actual.y})" + Assertions.assertEquals(expected.x, actual.x, 0.0001F, ::msg) + Assertions.assertEquals(expected.y, actual.y, 0.0001F, ::msg) + } + }.asStream() + } +} diff --git a/src/test/kotlin/util/skyblock/AbilityUtilsTest.kt b/src/test/kotlin/util/skyblock/AbilityUtilsTest.kt index 206a357..9d25aad 100644 --- a/src/test/kotlin/util/skyblock/AbilityUtilsTest.kt +++ b/src/test/kotlin/util/skyblock/AbilityUtilsTest.kt @@ -1,7 +1,7 @@ package moe.nea.firmament.test.util.skyblock -import io.kotest.core.spec.style.AnnotationSpec import org.junit.jupiter.api.Assertions +import org.junit.jupiter.api.Test import kotlin.time.Duration.Companion.minutes import kotlin.time.Duration.Companion.seconds import net.minecraft.text.Text @@ -9,7 +9,7 @@ import moe.nea.firmament.test.testutil.ItemResources import moe.nea.firmament.util.skyblock.AbilityUtils import moe.nea.firmament.util.unformattedString -class AbilityUtilsTest : AnnotationSpec() { +class AbilityUtilsTest { fun List<AbilityUtils.ItemAbility>.stripDescriptions() = map { it.copy(descriptionLines = it.descriptionLines.map { Text.literal(it.unformattedString) }) @@ -24,9 +24,11 @@ class AbilityUtilsTest : AnnotationSpec() { false, AbilityUtils.AbilityActivation.RIGHT_CLICK, null, - listOf("Throw your pickaxe to create an", - "explosion mining all ores in a 3 block", - "radius.").map(Text::literal), + listOf( + "Throw your pickaxe to create an", + "explosion mining all ores in a 3 block", + "radius." + ).map(Text::literal), 48.seconds ) ), @@ -43,8 +45,10 @@ class AbilityUtilsTest : AnnotationSpec() { true, AbilityUtils.AbilityActivation.RIGHT_CLICK, null, - listOf("Grants +200% ⸕ Mining Speed for", - "10s.").map(Text::literal), + listOf( + "Grants +200% ⸕ Mining Speed for", + "10s." + ).map(Text::literal), 2.minutes ) ), @@ -58,8 +62,10 @@ class AbilityUtilsTest : AnnotationSpec() { listOf( AbilityUtils.ItemAbility( "Instant Transmission", true, AbilityUtils.AbilityActivation.RIGHT_CLICK, 23, - listOf("Teleport 12 blocks ahead of you and", - "gain +50 ✦ Speed for 3 seconds.").map(Text::literal), + listOf( + "Teleport 12 blocks ahead of you and", + "gain +50 ✦ Speed for 3 seconds." + ).map(Text::literal), null ), AbilityUtils.ItemAbility( @@ -67,9 +73,11 @@ class AbilityUtilsTest : AnnotationSpec() { false, AbilityUtils.AbilityActivation.SNEAK_RIGHT_CLICK, 90, - listOf("Teleport to your targeted block up", - "to 61 blocks away.", - "Soulflow Cost: 1").map(Text::literal), + listOf( + "Teleport to your targeted block up", + "to 61 blocks away.", + "Soulflow Cost: 1" + ).map(Text::literal), null ) ), diff --git a/src/test/kotlin/util/skyblock/ItemTypeTest.kt b/src/test/kotlin/util/skyblock/ItemTypeTest.kt index cca3d13..c0ef2a3 100644 --- a/src/test/kotlin/util/skyblock/ItemTypeTest.kt +++ b/src/test/kotlin/util/skyblock/ItemTypeTest.kt @@ -1,26 +1,28 @@ package moe.nea.firmament.test.util.skyblock -import io.kotest.core.spec.style.ShouldSpec -import io.kotest.matchers.shouldBe +import org.junit.jupiter.api.Assertions +import org.junit.jupiter.api.DynamicTest +import org.junit.jupiter.api.TestFactory import moe.nea.firmament.test.testutil.ItemResources import moe.nea.firmament.util.skyblock.ItemType -class ItemTypeTest - : ShouldSpec( - { - context("ItemType.fromItemstack") { - listOf( - "pets/lion-item" to ItemType.PET, - "pets/rabbit-selected" to ItemType.PET, - "pets/mithril-golem-not-selected" to ItemType.PET, - "aspect-of-the-void" to ItemType.SWORD, - "titanium-drill" to ItemType.DRILL, - "diamond-pickaxe" to ItemType.PICKAXE, - "gemstone-gauntlet" to ItemType.GAUNTLET, - ).forEach { (name, typ) -> - should("return $typ for $name") { - ItemType.fromItemStack(ItemResources.loadItem(name)) shouldBe typ - } +class ItemTypeTest { + @TestFactory + fun fromItemstack() = + listOf( + "pets/lion-item" to ItemType.PET, + "pets/rabbit-selected" to ItemType.PET, + "pets/mithril-golem-not-selected" to ItemType.PET, + "aspect-of-the-void" to ItemType.SWORD, + "titanium-drill" to ItemType.DRILL, + "diamond-pickaxe" to ItemType.PICKAXE, + "gemstone-gauntlet" to ItemType.GAUNTLET, + ).map { (name, typ) -> + DynamicTest.dynamicTest("return $typ for $name") { + Assertions.assertEquals( + typ, + ItemType.fromItemStack(ItemResources.loadItem(name)) + ) } } - }) +} diff --git a/src/test/kotlin/util/skyblock/SackUtilTest.kt b/src/test/kotlin/util/skyblock/SackUtilTest.kt index f93cd2b..e0e3e63 100644 --- a/src/test/kotlin/util/skyblock/SackUtilTest.kt +++ b/src/test/kotlin/util/skyblock/SackUtilTest.kt @@ -1,12 +1,12 @@ package moe.nea.firmament.test.util.skyblock -import io.kotest.core.spec.style.AnnotationSpec import org.junit.jupiter.api.Assertions +import org.junit.jupiter.api.Test import moe.nea.firmament.test.testutil.ItemResources import moe.nea.firmament.util.skyblock.SackUtil import moe.nea.firmament.util.skyblock.SkyBlockItems -class SackUtilTest : AnnotationSpec() { +class SackUtilTest { @Test fun testOneRottenFlesh() { Assertions.assertEquals( diff --git a/src/test/kotlin/util/skyblock/TabListAPITest.kt b/src/test/kotlin/util/skyblock/TabListAPITest.kt new file mode 100644 index 0000000..26eafe0 --- /dev/null +++ b/src/test/kotlin/util/skyblock/TabListAPITest.kt @@ -0,0 +1,48 @@ +package moe.nea.firmament.test.util.skyblock + +import org.junit.jupiter.api.Assertions +import org.junit.jupiter.api.Test +import moe.nea.firmament.test.testutil.ItemResources +import moe.nea.firmament.util.skyblock.TabListAPI + +class TabListAPITest { + val tablist = ItemResources.loadTablist("dungeon_hub") + + @Test + fun checkWithTitle() { + Assertions.assertEquals( + listOf( + "Profile: Strawberry", + " SB Level: [210] 26/100 XP", + " Bank: 1.4B", + " Interest: 12 Hours (689.1k)", + ), + TabListAPI.getWidgetLines(TabListAPI.WidgetName.PROFILE, includeTitle = true, from = tablist).map { it.string }) + } + + @Test + fun checkEndOfColumn() { + Assertions.assertEquals( + listOf( + " Bonzo IV: 110/150", + " Scarf II: 25/50", + " The Professor IV: 141/150", + " Thorn I: 29/50", + " Livid II: 91/100", + " Sadan V: 388/500", + " Necron VI: 531/750", + ), + TabListAPI.getWidgetLines(TabListAPI.WidgetName.COLLECTION, from = tablist).map { it.string } + ) + } + + @Test + fun checkWithoutTitle() { + Assertions.assertEquals( + listOf( + " Undead: 1,907", + " Wither: 318", + ), + TabListAPI.getWidgetLines(TabListAPI.WidgetName.ESSENCE, from = tablist).map { it.string }) + } +} diff --git a/src/test/kotlin/util/skyblock/TimestampTest.kt b/src/test/kotlin/util/skyblock/TimestampTest.kt new file mode 100644 index 0000000..b960cb9 --- /dev/null +++ b/src/test/kotlin/util/skyblock/TimestampTest.kt @@ -0,0 +1,28 @@ +package moe.nea.firmament.test.util.skyblock + +import java.time.Instant +import java.time.ZonedDateTime +import org.junit.jupiter.api.Assertions +import org.junit.jupiter.api.Test +import moe.nea.firmament.test.testutil.ItemResources +import moe.nea.firmament.util.SBData +import moe.nea.firmament.util.timestamp + +class TimestampTest { + + @Test + fun testLongTimestamp() { + Assertions.assertEquals( + Instant.ofEpochSecond(1658091600), + ItemResources.loadItem("hyperion").timestamp + ) + } + + @Test + fun testStringTimestamp() { + Assertions.assertEquals( + ZonedDateTime.of(2021, 10, 11, 15, 39, 0, 0, SBData.hypixelTimeZone).toInstant(), + ItemResources.loadItem("backpack-in-menu").timestamp + ) + } +} diff --git a/src/test/resources/testdata/chat/all-chat.snbt b/src/test/resources/testdata/chat/all-chat.snbt index 15cc2de..386194b 100644 --- a/src/test/resources/testdata/chat/all-chat.snbt +++ b/src/test/resources/testdata/chat/all-chat.snbt @@ -1,4 +1,7 @@ { + source: { + dataVersion: 4189, + }, extra: [ { bold: 0b, diff --git a/src/test/resources/testdata/chat/sacks/gain-and-lose-regular.snbt b/src/test/resources/testdata/chat/sacks/gain-and-lose-regular.snbt index 924a558..d7b8b90 100644 --- a/src/test/resources/testdata/chat/sacks/gain-and-lose-regular.snbt +++ b/src/test/resources/testdata/chat/sacks/gain-and-lose-regular.snbt @@ -1,4 +1,7 @@ { + source: { + dataVersion: 4189, + }, color: "#FFAA00", extra: [ { diff --git a/src/test/resources/testdata/chat/sacks/gain-rotten-flesh.snbt b/src/test/resources/testdata/chat/sacks/gain-rotten-flesh.snbt index 924a558..d7b8b90 100644 --- a/src/test/resources/testdata/chat/sacks/gain-rotten-flesh.snbt +++ b/src/test/resources/testdata/chat/sacks/gain-rotten-flesh.snbt @@ -1,4 +1,7 @@ { + source: { + dataVersion: 4189, + }, color: "#FFAA00", extra: [ { diff --git a/src/test/resources/testdata/items/aspect-of-the-void.snbt b/src/test/resources/testdata/items/aspect-of-the-void.snbt index 180c069..9ffd385 100644 --- a/src/test/resources/testdata/items/aspect-of-the-void.snbt +++ b/src/test/resources/testdata/items/aspect-of-the-void.snbt @@ -1,4 +1,7 @@ { + source: { + dataVersion: 4189, + }, components: { "minecraft:attribute_modifiers": { modifiers: [ diff --git a/src/test/resources/testdata/items/backpack-in-menu.snbt b/src/test/resources/testdata/items/backpack-in-menu.snbt new file mode 100644 index 0000000..2f22768 --- /dev/null +++ b/src/test/resources/testdata/items/backpack-in-menu.snbt @@ -0,0 +1,122 @@ +{ + components: { + "minecraft:custom_data": { + backpack_color: "BROWN", + originTag: "CRAFTING_GRID_COLLECT", + timestamp: "10/11/21 3:39 PM", + uuid: "3d7c83e8-c619-4603-8cfb-c95ceed90864" + }, + "minecraft:custom_name": { + extra: [ + { + color: "gold", + text: "Backpack Slot 3" + } + ], + italic: 0b, + text: "" + }, + "minecraft:lore": [ + { + extra: [ + { + color: "gold", + text: "Jumbo Backpack" + } + ], + italic: 0b, + text: "" + }, + { + extra: [ + { + color: "gray", + text: "" + }, + { + color: "gray", + text: "This backpack has " + }, + { + color: "green", + text: "45" + }, + { + color: "gray", + text: " slots." + } + ], + italic: 0b, + text: "" + }, + { + extra: [ + " " + ], + italic: 0b, + text: "" + }, + { + extra: [ + { + color: "gray", + text: "" + }, + { + color: "yellow", + text: "Left-click to open!" + } + ], + italic: 0b, + text: "" + }, + { + extra: [ + { + color: "gray", + text: "" + }, + { + color: "yellow", + text: "Right-click to remove!" + } + ], + italic: 0b, + text: "" + } + ], + "minecraft:profile": { + id: [I; + 1252359403, + 1319582828, + -1927151386, + 833492163 + ], + properties: [ + { + name: "textures", + signature: "U/49v6SXIw8bAmqM6T7t1BIR736N3Adpx7MlWncnT8zcFEm97zwRx9/tyaUy/XxBHaPGSL6BbgW2TdBtfb9gf0emCAZyWmnzSTtqDGiWpxnQM8v3+gHS8zD7Xrho0a/hU33xTbQ2knj2iRz8C+FReoJFxCjS++aXq6IqliIb3GhqB5b1egaiG2Q3t+yerl2Xue4nhdYM3wtGsYApC/ClR3TEuBcJv1WUVZM8rEoU29pbVnyMCKineG6mIN7W86SmzcT2SF+zMVyD0/mI7R2hRT2lbXnkMpM6FFscdnlvzjjPB9brtAWY7JGJ63b9C+khnvZUlhlQ/3E/08dFnON31VeabJXOmfrbfAgsF0Hgfs7Io+HzoXSXr/FCxNCCFMWlSwORmG2WCT4VRFzG2SThatPVPGJkuR/tLLOLzXo4RKOMzY5EIwa2XSxRUI4+5z2SZY11ofGic3bZD3wvICs2EZ54Pi508ZOda0qI9w5Q/TazC+jX/I5Nq2TLqLj+uU/+UX8eKXvHdk8QpBynyv9SyHo21jVXpiUgL1AsdzBp9cTZHNJuYtBxgDogr3SyAKPmw3BOzVeUi6qW8k4lgtefLKYteVSh52PjFgvQZUR1GNmFaJ+hlgKz8yONp+wXhw3nyL4dMOd2Z/dVVSywBp0tyHuN5l3PfaInK4s8qSydaW0=", + value: "ewogICJ0aW1lc3RhbXAiIDogMTcxOTUzODgxNTgyNCwKICAicHJvZmlsZUlkIiA6ICJkOWYxNTlhYWYxZjY0NGZlOTEwOTg0NzI2ZDBjMWJjMCIsCiAgInByb2ZpbGVOYW1lIiA6ICJtYW5vbmFtaXNzaW9uRyIsCiAgInNpZ25hdHVyZVJlcXVpcmVkIiA6IHRydWUsCiAgInRleHR1cmVzIiA6IHsKICAgICJTS0lOIiA6IHsKICAgICAgInVybCIgOiAiaHR0cDovL3RleHR1cmVzLm1pbmVjcmFmdC5uZXQvdGV4dHVyZS81YWQwYjQwNTIxMjYyYjdhM2Y5OWU2M2JkZGQ0YTNlNTQxOTY1Njc3ZTE0MTRlYWZhMTQyZThiYmE5ZGZlNDgxIiwKICAgICAgIm1ldGFkYXRhIiA6IHsKICAgICAgICAibW9kZWwiIDogInNsaW0iCiAgICAgIH0KICAgIH0KICB9Cn0=" + } + ] + }, + "minecraft:tooltip_display": { + hidden_components: [ + "minecraft:jukebox_playable", + "minecraft:painting/variant", + "minecraft:map_id", + "minecraft:fireworks", + "minecraft:attribute_modifiers", + "minecraft:unbreakable", + "minecraft:written_book_content", + "minecraft:banner_patterns", + "minecraft:trim", + "minecraft:potion_contents", + "minecraft:block_entity_data", + "minecraft:dyed_color" + ] + } + }, + count: 3, + id: "minecraft:player_head" +} diff --git a/src/test/resources/testdata/items/books/feather_falling.snbt b/src/test/resources/testdata/items/books/feather_falling.snbt index 1de4632..4a0b7c6 100644 --- a/src/test/resources/testdata/items/books/feather_falling.snbt +++ b/src/test/resources/testdata/items/books/feather_falling.snbt @@ -1,4 +1,7 @@ { + source: { + dataVersion: 4189, + }, components: { "minecraft:attribute_modifiers": { modifiers: [ diff --git a/src/test/resources/testdata/items/diamond-pickaxe.snbt b/src/test/resources/testdata/items/diamond-pickaxe.snbt index cce12f9..aa5e590 100644 --- a/src/test/resources/testdata/items/diamond-pickaxe.snbt +++ b/src/test/resources/testdata/items/diamond-pickaxe.snbt @@ -1,4 +1,7 @@ { + source: { + dataVersion: 4189, + }, components: { "minecraft:attribute_modifiers": { modifiers: [ diff --git a/src/test/resources/testdata/items/gemstone-gauntlet.snbt b/src/test/resources/testdata/items/gemstone-gauntlet.snbt index 92ce739..92bb806 100644 --- a/src/test/resources/testdata/items/gemstone-gauntlet.snbt +++ b/src/test/resources/testdata/items/gemstone-gauntlet.snbt @@ -1,4 +1,7 @@ { + source: { + dataVersion: 4189, + }, components: { "minecraft:attribute_modifiers": { modifiers: [ diff --git a/src/test/resources/testdata/items/hyperion.snbt b/src/test/resources/testdata/items/hyperion.snbt index c57d457..f0025b9 100644 --- a/src/test/resources/testdata/items/hyperion.snbt +++ b/src/test/resources/testdata/items/hyperion.snbt @@ -1,4 +1,7 @@ { + source: { + dataVersion: 4189, + }, components: { "minecraft:attribute_modifiers": { modifiers: [ diff --git a/src/test/resources/testdata/items/implosion-belt.snbt b/src/test/resources/testdata/items/implosion-belt.snbt index b73542d..875047d 100644 --- a/src/test/resources/testdata/items/implosion-belt.snbt +++ b/src/test/resources/testdata/items/implosion-belt.snbt @@ -1,4 +1,7 @@ { + source: { + dataVersion: 4189, + }, components: { "minecraft:attribute_modifiers": { modifiers: [ diff --git a/src/test/resources/testdata/items/necron-boots.snbt b/src/test/resources/testdata/items/necron-boots.snbt index 35f8cf0..fd740ce 100644 --- a/src/test/resources/testdata/items/necron-boots.snbt +++ b/src/test/resources/testdata/items/necron-boots.snbt @@ -1,4 +1,7 @@ { + source: { + dataVersion: 4189, + }, components: { "minecraft:attribute_modifiers": { modifiers: [ diff --git a/src/test/resources/testdata/items/pets/lion-item.snbt b/src/test/resources/testdata/items/pets/lion-item.snbt index 6e92685..c364032 100644 --- a/src/test/resources/testdata/items/pets/lion-item.snbt +++ b/src/test/resources/testdata/items/pets/lion-item.snbt @@ -1,4 +1,7 @@ { + source: { + dataVersion: 4189, + }, components: { "minecraft:attribute_modifiers": { modifiers: [ diff --git a/src/test/resources/testdata/items/pets/mithril-golem-not-selected.snbt b/src/test/resources/testdata/items/pets/mithril-golem-not-selected.snbt index c0ef585..79f32c9 100644 --- a/src/test/resources/testdata/items/pets/mithril-golem-not-selected.snbt +++ b/src/test/resources/testdata/items/pets/mithril-golem-not-selected.snbt @@ -1,4 +1,7 @@ { + source: { + dataVersion: 4189, + }, components: { "minecraft:custom_data": { id: "PET", diff --git a/src/test/resources/testdata/items/pets/rabbit-selected.snbt b/src/test/resources/testdata/items/pets/rabbit-selected.snbt index 48a6f6f..d4c7235 100644 --- a/src/test/resources/testdata/items/pets/rabbit-selected.snbt +++ b/src/test/resources/testdata/items/pets/rabbit-selected.snbt @@ -1,4 +1,7 @@ { + source: { + dataVersion: 4189, + }, components: { "minecraft:custom_data": { id: "PET", diff --git a/src/test/resources/testdata/items/rune-in-sack.snbt b/src/test/resources/testdata/items/rune-in-sack.snbt index b15488a..4624c0f 100644 --- a/src/test/resources/testdata/items/rune-in-sack.snbt +++ b/src/test/resources/testdata/items/rune-in-sack.snbt @@ -1,4 +1,7 @@ { + source: { + dataVersion: 4189, + }, components: { "minecraft:custom_data": { }, diff --git a/src/test/resources/testdata/items/titanium-drill.snbt b/src/test/resources/testdata/items/titanium-drill.snbt index e3b6819..e49c6b0 100644 --- a/src/test/resources/testdata/items/titanium-drill.snbt +++ b/src/test/resources/testdata/items/titanium-drill.snbt @@ -1,4 +1,7 @@ { + source: { + dataVersion: 4189, + }, components: { "minecraft:attribute_modifiers": { modifiers: [ diff --git a/src/test/resources/testdata/tablist/dungeon_hub.snbt b/src/test/resources/testdata/tablist/dungeon_hub.snbt new file mode 100644 index 0000000..fed57ad --- /dev/null +++ b/src/test/resources/testdata/tablist/dungeon_hub.snbt @@ -0,0 +1,1170 @@ +{ + body: [ + { + extra: [ + " ", + { + bold: 1b, + color: "green", + text: "Players " + }, + { + color: "white", + text: "(15)" + } + ], + italic: 0b, + text: "" + }, + { + extra: [ + { + color: "dark_gray", + text: "[" + }, + { + color: "aqua", + text: "210" + }, + { + color: "dark_gray", + text: "] " + }, + { + color: "aqua", + text: "lrg89" + } + ], + italic: 0b, + text: "" + }, + { + extra: [ + { + color: "dark_gray", + text: "[" + }, + { + color: "light_purple", + text: "322" + }, + { + color: "dark_gray", + text: "] " + }, + { + color: "aqua", + text: "Basilickk" + } + ], + italic: 0b, + text: "" + }, + { + extra: [ + { + color: "dark_gray", + text: "[" + }, + { + color: "light_purple", + text: "330" + }, + { + color: "dark_gray", + text: "] " + }, + { + color: "aqua", + text: "Schauli23 " + }, + { + color: "gray", + text: "Σ" + } + ], + italic: 0b, + text: "" + }, + { + extra: [ + { + color: "dark_gray", + text: "[" + }, + { + color: "dark_green", + text: "187" + }, + { + color: "dark_gray", + text: "] " + }, + { + color: "aqua", + text: "bombardiro13" + } + ], + italic: 0b, + text: "" + }, + { + extra: [ + { + color: "dark_gray", + text: "[" + }, + { + color: "yellow", + text: "119" + }, + { + color: "dark_gray", + text: "] " + }, + { + color: "aqua", + text: "Horuu" + } + ], + italic: 0b, + text: "" + }, + { + extra: [ + { + color: "dark_gray", + text: "[" + }, + { + color: "dark_green", + text: "188" + }, + { + color: "dark_gray", + text: "] " + }, + { + color: "green", + text: "Kirito_Hacker " + }, + { + bold: 1b, + color: "gray", + text: "ꕁ" + } + ], + italic: 0b, + text: "" + }, + { + extra: [ + { + color: "dark_gray", + text: "[" + }, + { + color: "blue", + text: "281" + }, + { + color: "dark_gray", + text: "] " + }, + { + color: "green", + text: "LasseFTW1N " + }, + { + bold: 1b, + color: "dark_purple", + text: "࿇" + } + ], + italic: 0b, + text: "" + }, + { + extra: [ + { + color: "dark_gray", + text: "[" + }, + { + color: "dark_aqua", + text: "274" + }, + { + color: "dark_gray", + text: "] " + }, + { + color: "green", + text: "VN_Tuan " + }, + { + bold: 1b, + color: "aqua", + text: "ᛝ" + } + ], + italic: 0b, + text: "" + }, + { + extra: [ + { + color: "dark_gray", + text: "[" + }, + { + color: "aqua", + text: "205" + }, + { + color: "dark_gray", + text: "] " + }, + { + color: "green", + text: "buttonpurse_1212" + } + ], + italic: 0b, + text: "" + }, + { + extra: [ + { + color: "dark_gray", + text: "[" + }, + { + color: "dark_green", + text: "193" + }, + { + color: "dark_gray", + text: "] " + }, + { + color: "green", + text: "Moly____ " + }, + { + bold: 1b, + color: "gray", + text: "⚛" + } + ], + italic: 0b, + text: "" + }, + { + extra: [ + { + color: "dark_gray", + text: "[" + }, + { + color: "dark_green", + text: "187" + }, + { + color: "dark_gray", + text: "] " + }, + { + color: "green", + text: "BehavingTurtle4" + } + ], + italic: 0b, + text: "" + }, + { + extra: [ + { + color: "dark_gray", + text: "[" + }, + { + color: "dark_green", + text: "169" + }, + { + color: "dark_gray", + text: "] " + }, + { + color: "green", + text: "Kalmaria " + }, + { + color: "gold", + text: "ௐ" + } + ], + italic: 0b, + text: "" + }, + { + extra: [ + { + color: "dark_gray", + text: "[" + }, + { + color: "yellow", + text: "84" + }, + { + color: "dark_gray", + text: "] " + }, + { + color: "green", + text: "Cxter" + } + ], + italic: 0b, + text: "" + }, + { + extra: [ + { + color: "dark_gray", + text: "[" + }, + { + color: "white", + text: "48" + }, + { + color: "dark_gray", + text: "] " + }, + { + color: "gray", + text: "FredyFazballs" + } + ], + italic: 0b, + text: "" + }, + { + extra: [ + { + color: "dark_gray", + text: "[" + }, + { + color: "gray", + text: "21" + }, + { + color: "dark_gray", + text: "] " + }, + { + color: "gray", + text: "Finn1446" + } + ], + italic: 0b, + text: "" + }, + { + italic: 0b, + text: "" + }, + { + italic: 0b, + text: "" + }, + { + italic: 0b, + text: "" + }, + { + italic: 0b, + text: "" + }, + { + extra: [ + " ", + { + bold: 1b, + color: "green", + text: "Players " + }, + { + color: "white", + text: "(15)" + } + ], + italic: 0b, + text: "" + }, + { + italic: 0b, + text: "" + }, + { + italic: 0b, + text: "" + }, + { + italic: 0b, + text: "" + }, + { + italic: 0b, + text: "" + }, + { + italic: 0b, + text: "" + }, + { + italic: 0b, + text: "" + }, + { + italic: 0b, + text: "" + }, + { + italic: 0b, + text: "" + }, + { + italic: 0b, + text: "" + }, + { + italic: 0b, + text: "" + }, + { + italic: 0b, + text: "" + }, + { + italic: 0b, + text: "" + }, + { + italic: 0b, + text: "" + }, + { + italic: 0b, + text: "" + }, + { + italic: 0b, + text: "" + }, + { + italic: 0b, + text: "" + }, + { + italic: 0b, + text: "" + }, + { + italic: 0b, + text: "" + }, + { + italic: 0b, + text: "" + }, + { + extra: [ + " ", + { + bold: 1b, + color: "dark_aqua", + text: "Info" + } + ], + italic: 0b, + text: "" + }, + { + extra: [ + { + bold: 1b, + color: "aqua", + text: "Area: " + }, + { + color: "gray", + text: "Dungeon Hub" + } + ], + italic: 0b, + text: "" + }, + { + extra: [ + " Server: ", + { + color: "dark_gray", + text: "mini90J" + } + ], + italic: 0b, + text: "" + }, + { + extra: [ + " Gems: ", + { + color: "green", + text: "65" + } + ], + italic: 0b, + text: "" + }, + { + extra: [ + " Fairy Souls: ", + { + color: "light_purple", + text: "7" + }, + { + color: "dark_purple", + text: "/" + }, + { + color: "light_purple", + text: "7" + } + ], + italic: 0b, + text: "" + }, + { + extra: [ + " Unclaimed chests: ", + { + color: "gold", + text: "0" + } + ], + italic: 0b, + text: "" + }, + { + italic: 0b, + text: "" + }, + { + extra: [ + { + bold: 1b, + text: "" + }, + { + bold: 1b, + color: "yellow", + text: "Profile: " + }, + { + color: "green", + text: "Strawberry" + } + ], + italic: 0b, + text: "" + }, + { + extra: [ + " SB Level", + { + color: "white", + text: ": " + }, + { + color: "dark_gray", + text: "[" + }, + { + color: "aqua", + text: "210" + }, + { + color: "dark_gray", + text: "] " + }, + { + color: "aqua", + text: "26" + }, + { + color: "dark_aqua", + text: "/" + }, + { + color: "aqua", + text: "100 XP" + } + ], + italic: 0b, + text: "" + }, + { + extra: [ + " Bank: ", + { + color: "gold", + text: "1.4B" + } + ], + italic: 0b, + text: "" + }, + { + extra: [ + " Interest: ", + { + color: "yellow", + text: "12 Hours" + }, + { + color: "gold", + text: " (689.1k)" + } + ], + italic: 0b, + text: "" + }, + { + italic: 0b, + text: "" + }, + { + extra: [ + { + bold: 1b, + color: "yellow", + text: "Collection:" + } + ], + italic: 0b, + text: "" + }, + { + extra: [ + " Bonzo IV: ", + { + color: "yellow", + text: "110" + }, + { + color: "gold", + text: "/" + }, + { + color: "yellow", + text: "150" + } + ], + italic: 0b, + text: "" + }, + { + extra: [ + " Scarf II: ", + { + color: "yellow", + text: "25" + }, + { + color: "gold", + text: "/" + }, + { + color: "yellow", + text: "50" + } + ], + italic: 0b, + text: "" + }, + { + extra: [ + " The Professor IV: ", + { + color: "yellow", + text: "141" + }, + { + color: "gold", + text: "/" + }, + { + color: "yellow", + text: "150" + } + ], + italic: 0b, + text: "" + }, + { + extra: [ + " Thorn I: ", + { + color: "yellow", + text: "29" + }, + { + color: "gold", + text: "/" + }, + { + color: "yellow", + text: "50" + } + ], + italic: 0b, + text: "" + }, + { + extra: [ + " Livid II: ", + { + color: "yellow", + text: "91" + }, + { + color: "gold", + text: "/" + }, + { + color: "yellow", + text: "100" + } + ], + italic: 0b, + text: "" + }, + { + extra: [ + " Sadan V: ", + { + color: "yellow", + text: "388" + }, + { + color: "gold", + text: "/" + }, + { + color: "yellow", + text: "500" + } + ], + italic: 0b, + text: "" + }, + { + extra: [ + " Necron VI: ", + { + color: "yellow", + text: "531" + }, + { + color: "gold", + text: "/" + }, + { + color: "yellow", + text: "750" + } + ], + italic: 0b, + text: "" + }, + { + extra: [ + " ", + { + bold: 1b, + color: "dark_aqua", + text: "Info" + } + ], + italic: 0b, + text: "" + }, + { + extra: [ + { + bold: 1b, + color: "gold", + text: "Dungeons:" + } + ], + italic: 0b, + text: "" + }, + { + extra: [ + " ", + { + color: "white", + text: "Catacombs 39: " + }, + { + color: "green", + text: "15%" + } + ], + italic: 0b, + text: "" + }, + { + extra: [ + " ", + { + color: "green", + text: "Mage 36: " + }, + { + color: "green", + text: "12.9%" + } + ], + italic: 0b, + text: "" + }, + { + italic: 0b, + text: "" + }, + { + extra: [ + { + bold: 1b, + color: "light_purple", + text: "RNG Meter" + } + ], + italic: 0b, + text: "" + }, + { + extra: [ + " ", + { + color: "green", + text: "Catacombs Floor I" + } + ], + italic: 0b, + text: "" + }, + { + extra: [ + " ", + { + color: "gray", + text: "None" + } + ], + italic: 0b, + text: "" + }, + { + italic: 0b, + text: "" + }, + { + extra: [ + { + bold: 1b, + color: "aqua", + text: "Essence:" + } + ], + italic: 0b, + text: "" + }, + { + extra: [ + " Undead: ", + { + color: "light_purple", + text: "1,907" + } + ], + italic: 0b, + text: "" + }, + { + extra: [ + " Wither: ", + { + color: "light_purple", + text: "318" + } + ], + italic: 0b, + text: "" + }, + { + italic: 0b, + text: "" + }, + { + extra: [ + { + bold: 1b, + color: "aqua", + text: "Party: " + }, + { + color: "gray", + text: "No party" + } + ], + italic: 0b, + text: "" + }, + { + italic: 0b, + text: "" + }, + { + italic: 0b, + text: "" + }, + { + italic: 0b, + text: "" + }, + { + italic: 0b, + text: "" + }, + { + italic: 0b, + text: "" + }, + { + italic: 0b, + text: "" + } + ], + footer: { + extra: [ + "\n", + { + extra: [ + { + bold: 1b, + color: "green", + text: "Active Effects" + } + ], + italic: 0b, + text: "" + }, + "\n", + { + extra: [ + { + color: "gray", + text: "" + }, + { + color: "gray", + text: "You have " + }, + { + color: "yellow", + text: "2 " + }, + { + color: "gray", + text: 'active effects. Use "' + }, + { + color: "gold", + text: "/effects" + }, + { + color: "gray", + text: '" to see them!' + } + ], + italic: 0b, + text: "" + }, + "\n", + { + extra: [ + { + color: "yellow", + text: "Haste II" + }, + "", + { + bold: 0b, + italic: 0b, + obfuscated: 0b, + strikethrough: 0b, + text: "", + underlined: 0b + } + ], + italic: 0b, + text: "" + }, + "\n", + { + extra: [ + "", + { + bold: 0b, + extra: [ + "§s" + ], + italic: 0b, + obfuscated: 0b, + strikethrough: 0b, + text: "", + underlined: 0b + } + ], + italic: 0b, + text: "" + }, + "\n", + { + extra: [ + { + bold: 1b, + color: "light_purple", + text: "Cookie Buff" + } + ], + italic: 0b, + text: "" + }, + "\n", + { + extra: [ + { + color: "gray", + text: "" + }, + { + color: "gray", + text: "Not active! Obtain booster cookies from the community" + } + ], + italic: 0b, + text: "" + }, + "\n", + { + extra: [ + { + color: "gray", + text: "shop in the hub." + } + ], + italic: 0b, + text: "" + }, + "\n", + { + extra: [ + "", + { + bold: 0b, + extra: [ + "§s" + ], + italic: 0b, + obfuscated: 0b, + strikethrough: 0b, + text: "", + underlined: 0b + } + ], + italic: 0b, + text: "" + }, + "\n", + { + extra: [ + { + color: "green", + extra: [ + { + bold: 1b, + color: "red", + text: "STORE.HYPIXEL.NET" + } + ], + text: "Ranks, Boosters & MORE! " + } + ], + italic: 0b, + text: "" + } + ], + italic: 0b, + text: "" + }, + header: { + extra: [ + { + color: "aqua", + extra: [ + { + bold: 1b, + color: "yellow", + text: "MC.HYPIXEL.NET" + } + ], + text: "You are playing on " + }, + "\n", + { + extra: [ + "", + { + bold: 0b, + extra: [ + "§s" + ], + italic: 0b, + obfuscated: 0b, + strikethrough: 0b, + text: "", + underlined: 0b + } + ], + italic: 0b, + text: "" + } + ], + italic: 0b, + text: "" + }, + source: { + dataVersion: 4325, + modVersion: "Firmament 3.1.0-dev+mc1.21.5+g2de6cfb" + } +} |