aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/moe/nea/firmament/gui
diff options
context:
space:
mode:
authornea <nea@nea.moe>2023-06-03 19:58:34 +0200
committernea <nea@nea.moe>2023-06-03 19:58:34 +0200
commit3c437efa12d536cdc347895b3e37bc3f5acc0193 (patch)
treece674eb1ad15cc2e56d9f194659bed088f5e23b1 /src/main/kotlin/moe/nea/firmament/gui
parentd2d032ba05dd476d7edc0038f8a5f60f98769256 (diff)
downloadfirmament-3c437efa12d536cdc347895b3e37bc3f5acc0193.tar.gz
firmament-3c437efa12d536cdc347895b3e37bc3f5acc0193.tar.bz2
firmament-3c437efa12d536cdc347895b3e37bc3f5acc0193.zip
Add pet level data to /firm pv
Diffstat (limited to 'src/main/kotlin/moe/nea/firmament/gui')
-rw-r--r--src/main/kotlin/moe/nea/firmament/gui/profileviewer/PetsPage.kt5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/main/kotlin/moe/nea/firmament/gui/profileviewer/PetsPage.kt b/src/main/kotlin/moe/nea/firmament/gui/profileviewer/PetsPage.kt
index bf412b9..4c669df 100644
--- a/src/main/kotlin/moe/nea/firmament/gui/profileviewer/PetsPage.kt
+++ b/src/main/kotlin/moe/nea/firmament/gui/profileviewer/PetsPage.kt
@@ -6,7 +6,6 @@ import io.github.cottonmc.cotton.gui.widget.WGridPanel
import io.github.cottonmc.cotton.gui.widget.WItem
import io.github.cottonmc.cotton.gui.widget.WText
import io.github.cottonmc.cotton.gui.widget.WWidget
-import io.github.cottonmc.cotton.gui.widget.data.InputResult
import io.github.cottonmc.cotton.gui.widget.data.Insets
import io.github.cottonmc.cotton.gui.widget.icon.Icon
import io.github.cottonmc.cotton.gui.widget.icon.ItemIcon
@@ -15,8 +14,8 @@ import net.minecraft.client.util.math.MatrixStack
import net.minecraft.item.Items
import net.minecraft.text.Text
import moe.nea.firmament.gui.WTightScrollPanel
+import moe.nea.firmament.rei.PetData
import moe.nea.firmament.rei.SBItemStack
-import moe.nea.firmament.util.MC
object PetsPage : ProfilePage {
override fun getElements(profileViewer: ProfileViewer): WWidget {
@@ -26,7 +25,7 @@ object PetsPage : ProfilePage {
it.add((WTightScrollPanel(WGridPanel().also {
it.setGaps(8, 8)
for ((i, pet) in profileViewer.member.pets.withIndex()) {
- val stack = SBItemStack(pet.itemId, 1).asItemStack()
+ val stack = SBItemStack(pet.itemId, PetData(pet.tier, pet.type.name, pet.exp)).asItemStack()
it.add(object : WItem(stack) {
override fun paint(matrices: MatrixStack?, x: Int, y: Int, mouseX: Int, mouseY: Int) {
BackgroundPainter.SLOT.paintBackground(matrices, x, y, this)