Merge branch 'fix/qa-bundle' into 'main'

fix: an assortment of qa bugs

Closes #2070

See merge request cable-mc/cobblemon!2473
This commit is contained in:
Polymeta
2026-10-10 15:40:51 +00:00
6 changed files with 22 additions and 15 deletions
+2
View File
@@ -170,6 +170,8 @@
- Medicinal Leeks can now be eaten when they aren't being planted, matching their food properties.
- Sweeping attacks no longer set owned Pokémon on fire (e.g. with Fire Aspect) or knock them back.
- Fixed #updateMovesOnFormChange not properly initializing a form-swapped Pokemon's non-form_change moves.
- Fixed Oricorio Pa'u form dex description
- Fixed PC playing sound on close when opened via command
### Developer
- Evolution requirements can now set `pokedexIcon` and `pokedexTooltip` directly in their JSON to control how they're shown on the Pokédex's evolution tree, for example:
@@ -56,7 +56,8 @@ class PCGUI(
val party: ClientParty,
val configuration: PCGUIConfiguration,
val openOnBox: Int = CobblemonClient.lastPcBoxViewed,
val unseenWallpapers: MutableSet<ResourceLocation> = mutableSetOf()
val unseenWallpapers: MutableSet<ResourceLocation> = mutableSetOf(),
val silent: Boolean = false
) : Screen(Component.translatable("cobblemon.ui.pc.title")), CobblemonRenderable {
companion object {
@@ -703,7 +704,7 @@ class PCGUI(
}
fun closeNormally(unlink: Boolean = true) {
playSound(CobblemonSounds.PC_OFF)
if (!silent) playSound(CobblemonSounds.PC_OFF)
Minecraft.getInstance().setScreen(null)
if (unlink) {
UnlinkPlayerFromPCPacket().sendToServer()
@@ -748,7 +749,7 @@ class PCGUI(
if (isInventoryKeyPressed(minecraft, keyCode, scanCode) && !boxNameFocused && !filterFocused) {
saveMarkings(isPreviewInParty ?: false)
playSound(CobblemonSounds.PC_OFF)
if (!silent) playSound(CobblemonSounds.PC_OFF)
UnlinkPlayerFromPCPacket().sendToServer()
Minecraft.getInstance().setScreen(null)
return true
@@ -759,7 +760,7 @@ class PCGUI(
if (!filterFocused && !boxNameFocused) {
when (keyCode) {
InputConstants.KEY_ESCAPE -> {
playSound(CobblemonSounds.PC_OFF)
if (!silent) playSound(CobblemonSounds.PC_OFF)
UnlinkPlayerFromPCPacket().sendToServer()
onClose()
return true
@@ -831,4 +832,4 @@ class PCGUI(
markingsWidget.setActivePokemon(null)
}
}
}
}
@@ -24,8 +24,9 @@ object OpenPCHandler : ClientNetworkPacketHandler<OpenPCPacket> {
party = CobblemonClient.storage.party,
configuration = PCGUIConfiguration(),
openOnBox = packet.box ?: CobblemonClient.lastPcBoxViewed,
unseenWallpapers = packet.unseenWallpapers.toMutableSet()
unseenWallpapers = packet.unseenWallpapers.toMutableSet(),
silent = packet.silent
)
)
}
}
}
@@ -8,7 +8,6 @@
package com.cobblemon.mod.common.command
import com.cobblemon.mod.common.CobblemonSounds
import com.cobblemon.mod.common.api.permission.CobblemonPermissions
import com.cobblemon.mod.common.api.storage.pc.link.PCLinkManager
import com.cobblemon.mod.common.api.storage.pc.link.PermissiblePcLink
@@ -54,8 +53,8 @@ object PcCommand {
throw SimpleCommandExceptionType(lang("command.pc.invalid-box", box, pc.boxes.size).red()).create()
}
PCLinkManager.addLink(PermissiblePcLink(pc, player, CobblemonPermissions.PC))
OpenPCPacket(pc, box = if (box != null) (box - 1) else null).sendToPlayer(player)
OpenPCPacket(pc, box = if (box != null) (box - 1) else null, silent = true).sendToPlayer(player)
return Command.SINGLE_SUCCESS
}
}
}
@@ -34,17 +34,19 @@ class OpenPCPacket : NetworkPacket<OpenPCPacket> {
val storeID: UUID
val box: Int?
val unseenWallpapers: Set<ResourceLocation>
val silent: Boolean
@JvmOverloads
@Deprecated("Use the constructor with the PCStore object instead, this will become private in a future title update", level = DeprecationLevel.WARNING)
constructor(storeID: UUID, box: Int? = null, unseenWallpapers: Set<ResourceLocation> = emptySet()) {
constructor(storeID: UUID, box: Int? = null, unseenWallpapers: Set<ResourceLocation> = emptySet(), silent: Boolean? = false) {
this.storeID = storeID
this.box = box
this.unseenWallpapers = unseenWallpapers
this.silent = silent ?: false
}
@JvmOverloads
constructor(pc: PCStore, box: Int? = null): this(pc.uuid, box, pc.unseenWallpapers)
constructor(pc: PCStore, box: Int? = null, silent: Boolean? = false): this(pc.uuid, box, pc.unseenWallpapers, silent ?: false)
override val id = ID
@@ -52,6 +54,7 @@ class OpenPCPacket : NetworkPacket<OpenPCPacket> {
buffer.writeUUID(storeID)
buffer.writeNullable(box) { buf, value -> buf.writeInt(value)}
buffer.writeCollection(unseenWallpapers) { _, it -> buffer.writeResourceLocation(it) }
buffer.writeBoolean(silent)
}
companion object {
@@ -59,7 +62,8 @@ class OpenPCPacket : NetworkPacket<OpenPCPacket> {
fun decode(buffer: RegistryFriendlyByteBuf) = OpenPCPacket(
buffer.readUUID(),
buffer.readNullable { it.readInt() },
buffer.readList { buffer.readResourceLocation() }.toSet()
buffer.readList { buffer.readResourceLocation() }.toSet(),
buffer.readBoolean()
)
}
}
}
@@ -8071,7 +8071,7 @@
"cobblemon.ui.pokedex.info.form.oricorio-pompom": "Pom-Pom Style",
"cobblemon.species.oricorio-pompom.desc": "This Oricorio has drunk bright yellow nectar. When it sees someone looking glum, it will try to cheer them up with a dance.",
"cobblemon.ui.pokedex.info.form.oricorio-pau": "Pa’u Style",
"cobblemon.species.oricorio-pa'u.desc": "This Oricorio has sipped pink nectar. It gets so caught up in its dancing that it sometimes doesn't hear its Trainer's orders.",
"cobblemon.species.oricorio-pau.desc": "This Oricorio has sipped pink nectar. It gets so caught up in its dancing that it sometimes doesn't hear its Trainer's orders.",
"cobblemon.ui.pokedex.info.form.oricorio-sensu": "Sensu Style",
"cobblemon.species.oricorio-sensu.desc": "This Oricorio has sipped purple nectar. Some dancers use its graceful, elegant dancing as inspiration.",
"cobblemon.species.cutiefly.name": "Cutiefly",