Merge branch 'interact-wheel-qol' into 'main'

Pressing the inventory key now closes the interact wheel gui

See merge request cable-mc/cobblemon!2247
This commit is contained in:
Polymeta
2026-05-06 06:20:00 +00:00
2 changed files with 10 additions and 0 deletions
+1
View File
@@ -53,6 +53,7 @@
- All shipwreck coves' spawners have been adjusted to give compatible mobs enchanted iron or diamond armour and weapons while in its ominous state. The armour given to the mobs will also use the automaton trim. We upped the difficulty because it was too easy now that your Pokémon can fight for you.
- One TM of the elemental hyper beams has been added as guaranteed loot to the main treasure chest in every shipwreck cove. (Magma cove gets blast burn, lush cove gets frenzy plant, and submerged cove gets hydro cannon)
- Added 7 new advancements
- Pressing the inventory key now closes the Pokémon interact wheel GUI
### New rideable Pokémon
- Drampa
@@ -11,6 +11,7 @@ package com.cobblemon.mod.common.client.gui.interact.wheel
import com.cobblemon.mod.common.api.gui.blitk
import com.cobblemon.mod.common.client.gui.CobblemonRenderable
import com.cobblemon.mod.common.util.cobblemonResource
import com.cobblemon.mod.common.util.isInventoryKeyPressed
import com.google.common.collect.Multimap
import net.minecraft.client.gui.GuiGraphics
import net.minecraft.client.gui.screens.Screen
@@ -23,6 +24,14 @@ class InteractWheelGUI(private val options: Multimap<Orientation, InteractWheelO
private val backgroundResource = cobblemonResource("textures/gui/interact/interact_wheel_base.png")
}
override fun keyPressed(keyCode: Int, scanCode: Int, modifiers: Int): Boolean {
if (isInventoryKeyPressed(minecraft, keyCode, scanCode)) {
onClose()
return true
}
return super.keyPressed(keyCode, scanCode, modifiers)
}
private val buttons = mutableListOf<InteractWheelButton>()
private var maxPage = 1
private var currentPage = 0