Compare commits

..
Author SHA1 Message Date
JadedArts 14f7c4051c Begin standardizing Move Action Effects
A stat boost failing to change stats now has a 1 second pause in the battle system for improved readability.

Set up Amnesia and Nasty Plot to use Fork Keyframes in their Action Effect timelines.

Fixed positioning on Amnesia and Nasty Plot particles.
2026-11-27 15:17:46 -06:00
Sterrezo a016188534 Added stepsounds to Girafarig, fixed doubled Dragonite stepsounds 2026-11-25 21:57:28 +01:00
Sterrezo a100a3adf1 Revoked stepsound privileges from Crobat 2026-11-25 21:42:52 +01:00
Sterrezo d847e9e23b Stepsound volume rebalancing 2026-11-25 21:38:01 +01:00
Sterrezo 45fdaf43ea Added stepsounds to Ariados 2026-11-25 21:29:24 +01:00
Sterrezo dea8c56226 Added stepsounds to Draognite 2026-11-25 17:05:19 +01:00
Sterrezo 98e4232239 Update aerodactyl.animation.json 2026-11-25 16:55:17 +01:00
Sterrezo 65559b86c8 Added stepsounds to Aerodactyl 2026-11-25 16:53:30 +01:00
Sterrezo fdb2957844 Added stepsounds to Lapras 2026-11-25 16:41:02 +01:00
ewwww 396b31e530 locators added to smeargle 2026-11-07 13:30:33 -05:00
62 changed files with 479 additions and 728 deletions

No files matched your search

+5 -28
View File
@@ -2,49 +2,26 @@
## [1.8.5 (MONTH xth, 2026)](#1-8-5)
### Additions
- You can now drag to select multiple Pokémon inside the PC menu.
### Pokémon Added
#### Generation 4
#### Generation 5
#### Generation 6
#### Generation 7
#### Generation 8
#### Generation 9
### Model updates for the following Pokémon
### Animation updates for the following Pokémon
- Added the `healersSetSpawn` gamerule. When enabled, using a healing machine will set your spawnpoint.
- A Pokémon holding a Power item now gains 1 point in the corresponding riding stat every two minutes while being ridden. The interval is configurable, and can be disabled with `-1`.
- Added sounds to Gigaton Hammer and Pyro Ball
- Added stepsounds to Venusaur, Blastoise, Dewgong, Rhydon, Rhyhorn, Parasect and Mr. Mime.
- Certain Pokémon now have custom, animation-driven footstep sounds that change based on the surface! We're slowly working on adding them to all animated Pokémon, but for now we've covered most that are rideable.
- Added footstep sounds to Venusaur, Blastoise, Dewgong, Rhydon, Rhyhorn, Parasect, Mr. Mime, Lapras, Aerodactyl, Dragonite and Ariados.
### Changes
- Amethyst now grows from Typegem core blocks like typegems do
- Updated the recipe category for the Create compatibility EXP Candy recipe
- Added No Man's Lands' Honeyed Apple to the Leaves Leftovers tag
- Updated Unown's punctuation form names from `!` and `?` to `Exclamation` and `Question`, changing their visible form labels in tooltips and mod integrations.
- Pokémon that received footstep sounds this update no longer make the usual Minecraft footstep sounds. This is also the case for Crobat. (Note, game event detection like with Sculk Shriekers still functions as normal.)
### Fixes
- Fixed Ponigiri food values for AppleSkin integration
- Fixed errors emitted by typos in Parched Peat bog structure files
- Fixed Unown punctuation forms (? and !) resolving to duplicate Showdown IDs and colliding in form displays.
### Developer
- Fixed JsonArray to MoValue conversion not working properly.
### Molang & Datapacks
- `q.is_standing_on_blocks` now properly checks for non-full blocks like slabs, Mud or Soul Sand
- `q.is_standing_on_blocks` now properly checks for non-full blocks like slabs, Mud or Soul Sand.
- Added Molang functions to play footstep sounds based on the corresponding surface. These are intended to be used by Pokémon animations.
- Pokémon can now have their Minecraft footstep sounds silenced in their poser. This doesn't affect emitting game events.
- Fixed the Molang coalescing operator not working the way you'd expect a coalesce operator to.
- Added `v.spawnable_position` to the weight spawn rule component's "weight" expression
- Pokémon can now have their Minecraft footstep sounds silenced in their species file. This doesn't affect emitting game events.
### Particles
@@ -566,7 +566,6 @@ object CobblemonNetwork {
list.add(PacketRegisterInfo(SwapPartyPokemonPacket.ID, SwapPartyPokemonPacket::decode, SwapPartyPokemonHandler))
list.add(PacketRegisterInfo(MovePCPokemonPacket.ID, MovePCPokemonPacket::decode, MovePCPokemonHandler))
list.add(PacketRegisterInfo(MovePCPokemonBatchPacket.ID, MovePCPokemonBatchPacket::decode, MovePCPokemonBatchHandler))
list.add(PacketRegisterInfo(MovePartyPokemonPacket.ID, MovePartyPokemonPacket::decode, MovePartyPokemonHandler))
list.add(PacketRegisterInfo(SwapPCPartyPokemonPacket.ID, SwapPCPartyPokemonPacket::decode, SwapPCPartyPokemonHandler))
@@ -41,7 +41,6 @@ class WeightTweakRuleComponent : SpawnRuleComponent {
return if (spawnDetailSelector.selects(detail) && spawnablePositionSelector.selects(spawnablePosition)) {
runtime.environment.setSimpleVariable("spawn", detail.struct)
runtime.environment.setSimpleVariable("spawn_detail", detail.struct)
runtime.environment.setSimpleVariable("spawnable_position", spawnablePosition.getOrSetupStruct())
runtime.environment.setSimpleVariable("weight", DoubleValue(weight.toDouble()))
runtime.resolveFloat(this.weight)
} else {
@@ -29,7 +29,6 @@ import com.cobblemon.mod.common.net.messages.client.storage.pc.InitializePCPacke
import com.cobblemon.mod.common.net.messages.client.storage.pc.MoveClientPCPokemonPacket
import com.cobblemon.mod.common.net.messages.client.storage.pc.SetPCPokemonPacket
import com.cobblemon.mod.common.net.messages.client.storage.pc.wallpaper.UnlockPCBoxWallpaperPacket
import com.cobblemon.mod.common.net.messages.server.storage.pc.MovePCPokemonBatchPacket
import com.cobblemon.mod.common.pokemon.Pokemon
import com.cobblemon.mod.common.util.DataKeys
import com.cobblemon.mod.common.util.asTranslated
@@ -271,31 +270,6 @@ open class PCStore(
}
}
fun moveBatch(moves: List<Triple<UUID, PCPosition, PCPosition>>): Boolean {
if (moves.isEmpty() || moves.size > MovePCPokemonBatchPacket.MAX_MOVES) return false
if (moves.map { it.second }.toSet().size != moves.size ||
moves.map { it.third }.toSet().size != moves.size ||
moves.map { it.first }.toSet().size != moves.size
) return false
if (moves.any { (_, source, target) -> !isValidPosition(source) || !isValidPosition(target) }) return false
val sourcePositions = moves.mapTo(mutableSetOf()) { it.second }
val pokemonMoves = moves.map { (pokemonID, source, target) ->
val pokemon = get(source)?.takeIf { it.uuid == pokemonID } ?: return false
Triple(source, target, pokemon)
}
if (pokemonMoves.any { (_, target, _) -> get(target) != null && target !in sourcePositions }) return false
pokemonMoves.forEach { (source, target, pokemon) ->
setAtPosition(source, null)
setAtPosition(target, pokemon)
sendPacketToObservers(RemoveClientPokemonPacket(this, pokemon.uuid))
sendPacketToObservers(SetPCPokemonPacket(uuid, target) { pokemon })
}
pcChangeObservable.emit(Unit)
return true
}
override fun loadPositionFromNBT(nbt: CompoundTag): StoreCoordinates<PCPosition> {
return StoreCoordinates(this, PCPosition(nbt.getShort(DataKeys.STORE_BOX).toInt(), nbt.getByte(DataKeys.STORE_SLOT).toInt()))
}
@@ -22,6 +22,7 @@ import com.cobblemon.mod.common.battles.ShowdownInterpreter
import com.cobblemon.mod.common.battles.dispatch.ActionEffectInstruction
import com.cobblemon.mod.common.battles.dispatch.GO
import com.cobblemon.mod.common.battles.dispatch.UntilDispatch
import com.cobblemon.mod.common.battles.dispatch.WaitDispatch
import com.cobblemon.mod.common.util.battleLang
import com.cobblemon.mod.common.util.cobblemonResource
import java.util.concurrent.CompletableFuture
@@ -82,6 +83,7 @@ class BoostInstruction(battle: PokemonBattle, val message: BattleMessage, val is
else -> battleLang("$rootKey.$severity", pokemon.getName(), stat)
}
battle.broadcastChatMessage(lang)
if (stages == 0) return@dispatch WaitDispatch(1F)
val boostBucket = if (isBoost) BattleContext.Type.BOOST else BattleContext.Type.UNBOOST
val context = ShowdownInterpreter.getContextFromAction(message, boostBucket, battle)
@@ -169,6 +169,7 @@ class TypeGemCoreBlock(properties: Properties) : Block(properties) {
if (fullClusterCount == 0) {
if (gemCount < Cobblemon.config.typeGemMinGrowth && clusters.isNotEmpty()) {
println("Force set a cluster to FULL at size $gemCount")
val randomCluster = clusters.random()
level.setBlockAndUpdate(randomCluster.second, randomCluster.first.setValue(GROWTH_TYPE, GrowthType.FULL))
}
@@ -111,7 +111,6 @@ object CobblemonClient {
val battleOverlay: BattleOverlay by lazy { BattleOverlay() }
val pokedexUsageContext: PokedexUsageContext by lazy { PokedexUsageContext() }
val rideControlsOverlay: RideControlsOverlay by lazy { RideControlsOverlay() }
var pcHealthToggle: Boolean = false
fun onLogin() {
clientPlayerData = ClientGeneralPlayerData()
@@ -29,7 +29,7 @@ class BoxStorageSlot(
val grabbedSlot = parent.grabbedSlot
return if (grabbedSlot == null) {
getPokemon().let { it == null || !parent.isInMultiSelection(it, position) }
true
} else {
grabbedSlot.getPokemon() != getPokemon()
}
@@ -50,8 +50,6 @@ import net.minecraft.network.chat.Component
import net.minecraft.sounds.SoundEvent
import kotlin.isInitialized
import net.minecraft.resources.ResourceLocation
import net.minecraft.util.FastColor
import org.lwjgl.glfw.GLFW
class PCGUI(
val pc: ClientPC,
@@ -100,8 +98,6 @@ class PCGUI(
private val buttonWallpaperResource = cobblemonResource("textures/gui/pc/pc_button_set_wallpaper.png")
private val buttonInfoArrow = cobblemonResource("textures/gui/pc/info_arrow.png")
private val buttonHealthToggleResource = cobblemonResource("textures/gui/pc/pc_button_toggle_health.png")
private val topSpacerResource = cobblemonResource("textures/gui/pc/pc_spacer_top.png")
private val bottomSpacerResource = cobblemonResource("textures/gui/pc/pc_spacer_bottom.png")
private val rightSpacerResource = cobblemonResource("textures/gui/pc/pc_spacer_right.png")
@@ -133,55 +129,6 @@ class PCGUI(
var selectPointerOffsetIncrement = false
var displayOptions = false
private var dragStartX: Int? = null
private var dragStartY: Int? = null
private var dragEndX: Int? = null
private var dragEndY: Int? = null
private var selectionDragActive = false
data class SelectionArea(val left: Int, val top: Int, val right: Int, val bottom: Int)
private data class BoxGridBounds(val left: Int, val top: Int, val right: Int, val bottom: Int) {
fun contains(x: Int, y: Int) = x in left..< right && y >= top && y < bottom
}
private fun getBoxGridBounds(): BoxGridBounds {
val left = storageWidget.x
val top = storageWidget.y
return BoxGridBounds(
left,
top,
left + StorageWidget.SCREEN_WIDTH,
top + StorageWidget.SCREEN_HEIGHT
)
}
fun getSelectionArea(): SelectionArea? {
if (!selectionDragActive) return null
val startX = dragStartX ?: return null
val startY = dragStartY ?: return null
val endX = dragEndX ?: return null
val endY = dragEndY ?: return null
val bounds = getBoxGridBounds()
if (!bounds.contains(startX, startY)) return null
val columns = 6
val rows = 5
val slotPitch = StorageSlot.SIZE + StorageWidget.BOX_SLOT_PADDING
val gridLeft = bounds.left + StorageWidget.BOX_SLOT_START_OFFSET_X
val gridTop = bounds.top + StorageWidget.BOX_SLOT_START_OFFSET_Y + if (displayOptions) 5 else 0
val startColumn = ((startX - gridLeft) / slotPitch).coerceIn(0, columns - 1)
val endColumn = (((endX.coerceIn(bounds.left, bounds.right - 1)) - gridLeft) / slotPitch).coerceIn(0, columns - 1)
val startRow = ((startY - gridTop) / slotPitch).coerceIn(0, rows - 1)
val endRow = (((endY.coerceIn(bounds.top, bounds.bottom - 1)) - gridTop) / slotPitch).coerceIn(0, rows - 1)
return SelectionArea(
gridLeft + minOf(startColumn, endColumn) * slotPitch, // left
gridTop + minOf(startRow, endRow) * slotPitch, // top
gridLeft + (maxOf(startColumn, endColumn) * slotPitch) + StorageSlot.SIZE, // right
gridTop + (maxOf(startRow, endRow) * slotPitch) + StorageSlot.SIZE // bottom
)
}
override fun renderBlurredBackground(delta: Float) {}
override fun renderMenuBackground(context: GuiGraphics) {}
@@ -272,6 +219,7 @@ class PCGUI(
storageWidget.setupStorageSlots()
for (button in optionButtons) {
button.visible = displayOptions
button.highlighted = false
}
}.also { it.highlighted = displayOptions }
)
@@ -302,28 +250,12 @@ class PCGUI(
configuration.showParty = isVisible
wallpaperWidget.visible = !isVisible
(it as IconButton).highlighted = !isVisible
if (unseenWallpapers.isNotEmpty()) MarkPCBoxWallpapersSeenPacket(unseenWallpapers).sendToServer()
if (!unseenWallpapers.isEmpty()) MarkPCBoxWallpapersSeenPacket(unseenWallpapers).sendToServer()
}.also {
it.visible = displayOptions
optionButtons.add(it)
})
val healthButton = this.addRenderableWidget(IconButton(
pX = x + 230,
pY = y + 31,
buttonWidth = 20,
buttonHeight = 20,
resource = buttonHealthToggleResource,
label = "toggle_health_bars",
) {
CobblemonClient.pcHealthToggle = !CobblemonClient.pcHealthToggle
(it as IconButton).highlighted = CobblemonClient.pcHealthToggle
}.also {
it.visible = displayOptions
optionButtons.add(it)
})
healthButton.highlighted = CobblemonClient.pcHealthToggle
PokemonSortMode.entries.forEachIndexed { index, sortType ->
val typeName = sortType.name.lowercase()
this.addRenderableWidget(IconButton(
@@ -383,20 +315,6 @@ class PCGUI(
super.init()
}
private fun renderSelectionBox(context: GuiGraphics, area: SelectionArea) {
context.pose().pushPose()
context.pose().translate(0.0, 0.0, 1500.0)
val borderColor = FastColor.ARGB32.color(255, 205, 212, 255)
val bgColor = FastColor.ARGB32.color(75, 133, 183, 230)
val thickness = 1
context.fill(area.left, area.top, area.right, area.bottom, bgColor)
context.fill(area.left, area.top, area.right, area.top + thickness, borderColor)
context.fill(area.left, area.bottom - thickness, area.right, area.bottom, borderColor)
context.fill(area.left, area.top, area.left + thickness, area.bottom, borderColor)
context.fill(area.right - thickness, area.top, area.right, area.bottom, borderColor)
context.pose().popPose()
}
override fun render(context: GuiGraphics, mouseX: Int, mouseY: Int, delta: Float) {
val matrices = context.pose()
renderBackground(context, mouseX, mouseY, delta)
@@ -537,20 +455,6 @@ class PCGUI(
shadow = true
)
// var dexNo = pokemon.species.nationalPokedexNumber.toString()
// while (dexNo.length < 4) {
// dexNo = "0$dexNo"
// }
// drawScaledText(
// context = context,
// font = CobblemonResources.DEFAULT_LARGE,
// text = Component.literal(dexNo).bold(),
// x = x + 38,
// y = y + 1.5,
// shadow = true,
// scale = 0.85f
// )
drawScaledText(
context = context,
font = CobblemonResources.DEFAULT_LARGE,
@@ -781,14 +685,12 @@ class PCGUI(
scale = SCALE
)
if (optionButtons.isNotEmpty() && displayOptions) {
if (!optionButtons.isEmpty() && displayOptions) {
for (button in optionButtons) button.showAlt = hasShiftDown()
}
super.render(context, mouseX, mouseY, delta)
getSelectionArea()?.let { renderSelectionBox(context, it) }
// Item Tooltip
if (pokemon != null) {
val displayedItem = if (showCosmeticItem) pokemon.cosmeticItem else pokemon.heldItemNoCopy()
@@ -810,20 +712,6 @@ class PCGUI(
}
override fun mouseClicked(mouseX: Double, mouseY: Double, button: Int): Boolean {
storageWidget.clearPendingStorageSlotClick()
selectionDragActive = false
val clickX = mouseX.toInt()
val clickY = mouseY.toInt()
if (storageWidget.multiSelection == null && button == 0 &&
getBoxGridBounds().contains(clickX, clickY) &&
storageWidget.pastureWidget == null) {
dragStartX = clickX
dragStartY = clickY
} else {
dragStartX = null
dragStartY = null
}
// Trigger child component function as they will need to check the entire screen click area
if (::boxNameWidget.isInitialized) boxNameWidget.mouseClicked(mouseX, mouseY, button)
return super.mouseClicked(mouseX, mouseY, button)
@@ -852,43 +740,9 @@ class PCGUI(
storageWidget.pastureWidget?.let { pasture ->
if (pasture.pastureScrollList.isHovered) pasture.pastureScrollList.mouseDragged(mouseX, mouseY, button, deltaX, deltaY)
}
if (button == 0 && storageWidget.pastureWidget == null) {
val startX = dragStartX
val startY = dragStartY
if (startX != null && startY != null) {
val offsetX = mouseX - startX
val offsetY = mouseY - startY
if (offsetX * offsetX + offsetY * offsetY >= 25.0) {
selectionDragActive = true
storageWidget.clearPendingStorageSlotClick()
dragEndX = mouseX.toInt()
dragEndY = mouseY.toInt()
}
}
}
return super.mouseDragged(mouseX, mouseY, button, deltaX, deltaY)
}
override fun mouseReleased(mouseX: Double, mouseY: Double, button: Int): Boolean {
val handled = super.mouseReleased(mouseX, mouseY, button)
if (button == GLFW.GLFW_MOUSE_BUTTON_LEFT) {
if (selectionDragActive) {
dragEndX = mouseX.toInt()
dragEndY = mouseY.toInt()
storageWidget.updateSelection()
storageWidget.clearPendingStorageSlotClick()
} else {
storageWidget.completePendingStorageSlotClick(mouseX, mouseY)
}
}
dragStartX = null
dragStartY = null
dragEndX = null
dragEndY = null
selectionDragActive = false
return handled
}
override fun keyPressed(keyCode: Int, scanCode: Int, modifiers: Int): Boolean {
val boxNameFocused = this::boxNameWidget.isInitialized && boxNameWidget.isFocused
val filterFocused = this::filterWidget.isInitialized && filterWidget.isFocused
@@ -1,37 +0,0 @@
package com.cobblemon.mod.common.client.gui.pc
import com.cobblemon.mod.common.pokemon.Pokemon
data class PCMultiSelection(
private val grid: MutableList<MutableList<Pokemon?>> = mutableListOf(),
val sourceBox: Int = 0,
val sourceColumn: Int = 0,
val sourceRow: Int = 0
) {
fun getHorizontalSize(): Int = grid.firstOrNull()?.size ?: 0
fun getVerticalSize(): Int = grid.size
constructor(horizontalSize: Int, verticalSize: Int, sourceBox: Int, sourceColumn: Int, sourceRow: Int) : this(
MutableList(verticalSize) { MutableList<Pokemon?>(horizontalSize) { null } },
sourceBox,
sourceColumn,
sourceRow
)
fun getPokemon(x: Int, y: Int): Pokemon? {
return grid[y][x]
}
fun setPokemon(x: Int, y: Int, pokemon: Pokemon?) {
grid[y][x] = pokemon
}
fun pokemonEntries(): List<Triple<Int, Int, Pokemon>> {
return grid.flatMapIndexed { y, row ->
row.mapIndexedNotNull { x, pokemon -> pokemon?.let { Triple(x, y, it) } }
}
}
fun getPokemonCount(): Int = pokemonEntries().size
}
@@ -45,13 +45,11 @@ class ReleaseButton(
vOffset = if (isHovered(mouseX.toDouble(), mouseY.toDouble())) HEIGHT else 0,
textureHeight = HEIGHT * 2
)
val pokemonCount = parent.multiSelection?.getPokemonCount() ?: 0
drawScaledText(
context = context,
font = CobblemonResources.DEFAULT_LARGE,
text = if (pokemonCount > 1)
{ lang("ui.pc.release_all").bold() } else { lang("ui.pc.release").bold() },
text = lang("ui.pc.release").bold(),
x = x + (WIDTH / 2),
y = y + 3.5,
centered = true,
@@ -10,11 +10,10 @@ package com.cobblemon.mod.common.client.gui.pc
import com.cobblemon.mod.common.Cobblemon
import com.cobblemon.mod.common.api.gui.blitk
import com.cobblemon.mod.common.client.CobblemonClient
import com.cobblemon.mod.common.client.gui.CobblemonRenderable
import com.cobblemon.mod.common.client.gui.PokemonGUIAnimationStyle
import com.cobblemon.mod.common.client.gui.drawProfilePokemon
import com.cobblemon.mod.common.client.gui.pasture.PasturePCGUIConfiguration
import com.cobblemon.mod.common.client.gui.PokemonGUIAnimationStyle
import com.cobblemon.mod.common.client.render.drawScaledText
import com.cobblemon.mod.common.client.render.models.blockbench.FloatingState
import com.cobblemon.mod.common.client.render.renderScaledGuiItemIcon
@@ -23,19 +22,13 @@ import com.cobblemon.mod.common.pokemon.Pokemon
import com.cobblemon.mod.common.util.cobblemonResource
import com.cobblemon.mod.common.util.lang
import com.cobblemon.mod.common.util.math.fromEulerXYZDegrees
import juuxel.adorn.util.Colors
import net.minecraft.client.Minecraft
import net.minecraft.client.gui.GuiGraphics
import net.minecraft.client.gui.components.Button
import net.minecraft.client.renderer.RenderType
import net.minecraft.client.sounds.SoundManager
import net.minecraft.network.chat.Component
import net.minecraft.util.Mth
import org.joml.Quaternionf
import org.joml.Vector3f
import kotlin.math.abs
import kotlin.math.max
import kotlin.math.roundToInt
open class StorageSlot(
x: Int, y: Int,
@@ -61,17 +54,9 @@ open class StorageSlot(
}
override fun renderWidget(context: GuiGraphics, mouseX: Int, mouseY: Int, delta: Float) {
val selectionArea = parent.pcGui.getSelectionArea()
if (selectionArea != null && parent.getSelectedPokemon(selectionArea).contains(this)) {
val highlightColor = 0x40FFFFFF
context.fill(x + 1, y, x + (SIZE - 1), y + SIZE, highlightColor)
context.fill(x, y + 1, x + 1, y + (SIZE - 1), highlightColor)
context.fill(x + SIZE - 1, y + 1, x + SIZE, y + (SIZE - 1), highlightColor)
}
if (shouldRender()) {
renderSlot(context, x, y, delta)
}
}
fun renderSlot(context: GuiGraphics, posX: Int, posY: Int, partialTicks: Float) {
@@ -145,23 +130,6 @@ open class StorageSlot(
matrixStack = matrices
)
}
// Pokemon health
// Taken from vanilla durability rendering
val currentHealth = pokemon.currentHealth
val maxHealth = pokemon.maxHealth.toFloat()
if (currentHealth < maxHealth && CobblemonClient.pcHealthToggle) {
val damageValue = maxHealth - currentHealth
val f = max(0.0f, (maxHealth - (maxHealth - currentHealth)) / maxHealth)
val color = Mth.hsvToRgb(f / 3.0f, 1.0f, 1.0f)
val totalWidth = 12
val width = (totalWidth - damageValue * totalWidth / pokemon.maxHealth.toFloat()).roundToInt();
val k = posX + 1
val l = posY + 6
val bgColor = if (this is PartyStorageSlot) Colors.BLACK else 0xFF3E3E3E.toInt()
context.fill(RenderType.guiOverlay(), k, l, k + totalWidth, l + 1, bgColor)
context.fill(RenderType.guiOverlay(), k, l, k + width, l + 1, color or bgColor)
}
matrices.popPose()
}
@@ -11,6 +11,7 @@ package com.cobblemon.mod.common.client.gui.pc
import com.cobblemon.mod.common.CobblemonNetwork
import com.cobblemon.mod.common.CobblemonSounds
import com.cobblemon.mod.common.api.gui.blitk
import com.cobblemon.mod.common.api.storage.StorePosition
import com.cobblemon.mod.common.api.storage.party.PartyPosition
import com.cobblemon.mod.common.api.storage.pc.PCPosition
import com.cobblemon.mod.common.api.text.bold
@@ -38,9 +39,8 @@ import net.minecraft.client.gui.components.Button
import net.minecraft.client.gui.screens.Screen
import net.minecraft.client.resources.sounds.SimpleSoundInstance
import net.minecraft.network.chat.Component
import net.minecraft.resources.ResourceLocation
import net.minecraft.sounds.SoundEvent
import java.util.UUID
import com.cobblemon.mod.common.net.messages.server.storage.pc.MovePCPokemonBatchPacket.PCPokemonMove
class StorageWidget(
pX: Int, pY: Int,
@@ -77,14 +77,9 @@ class StorageWidget(
var displayConfirmRelease = false
var screenLoaded = false
var selectedPosition: PartyPosition? = null
var selectedPosition: StorePosition? = null
var grabbedSlot: GrabbedStorageSlot? = null
var multiSelection: PCMultiSelection? = null
private val multiGrabbedSlots = mutableMapOf<UUID, GrabbedStorageSlot>()
private var pendingStorageSlotClick: Button? = null
private var movePending = false
var box = 0
set(value) {
field =
@@ -118,22 +113,16 @@ class StorageWidget(
subKey = "ui.generic.yes",
onPress = {
if (canDeleteSelected() && displayConfirmRelease) {
val selection = multiSelection
if (selection != null) {
selection.pokemonEntries().forEach { (column, row, pokemon) ->
val position = PCPosition(
selection.sourceBox,
(selection.sourceRow + row) * 6 + selection.sourceColumn + column
)
CobblemonNetwork.sendToServer(ReleasePCPokemonPacket(pokemon.uuid, position))
}
} else {
val position = selectedPosition ?: return@ReleaseConfirmButton
val pokemon = getSelectedPokemon() ?: return@ReleaseConfirmButton
val position = selectedPosition ?: return@ReleaseConfirmButton
val pokemon = getSelectedPokemon() ?: return@ReleaseConfirmButton
CobblemonNetwork.sendToServer(ReleasePartyPokemonPacket(pokemon.uuid, position))
val packet = when (position) {
is PartyPosition -> ReleasePartyPokemonPacket(pokemon.uuid, position)
is PCPosition -> ReleasePCPokemonPacket(pokemon.uuid, position)
else -> return@ReleaseConfirmButton
}
CobblemonNetwork.sendToServer(packet)
playSound(CobblemonSounds.PC_RELEASE)
resetSelected()
displayConfirmRelease = false
@@ -160,8 +149,9 @@ class StorageWidget(
}
fun canDeleteSelected(): Boolean {
multiSelection?.let { return it.pokemonEntries().isNotEmpty() }
return party.filterNotNull().size > 1 && selectedPosition != null && grabbedSlot != null
return !(selectedPosition is PartyPosition && party.filterNotNull().size <= 1)
&& selectedPosition != null
&& grabbedSlot != null
}
fun setupStorageSlots() {
@@ -180,7 +170,7 @@ class StorageWidget(
parent = this,
pc = pc,
position = PCPosition(box, index),
onPress = { pendingStorageSlotClick = it }
onPress = { this.onStorageSlotClicked(it) }
).also { widget ->
this.addWidget(widget)
this.boxSlots.add(widget)
@@ -210,7 +200,7 @@ class StorageWidget(
parent = this,
party = party,
position = PartyPosition(partyIndex),
onPress = { pendingStorageSlotClick = it }
onPress = { this.onStorageSlotClicked(it) }
).also { widget ->
this.addWidget(widget)
this.partySlots.add(widget)
@@ -220,118 +210,14 @@ class StorageWidget(
private fun getSelectedPokemon(): Pokemon? {
val selectedPosition = this.selectedPosition ?: return null
return party.get(selectedPosition)
}
fun getSelectedPokemon(area: PCGUI.SelectionArea): List<BoxStorageSlot> {
return boxSlots.filter { slot ->
slot.x < area.right && slot.x + StorageSlot.SIZE > area.left &&
slot.y < area.bottom && slot.y + StorageSlot.SIZE > area.top &&
slot.getPokemon()?.let(pcGui.search::passes) == true
return when (selectedPosition) {
is PCPosition -> pc.get(selectedPosition)
is PartyPosition -> party.get(selectedPosition)
else -> null
}
}
fun clearPendingStorageSlotClick() {
pendingStorageSlotClick = null
}
fun completePendingStorageSlotClick(mouseX: Double, mouseY: Double) {
val button = pendingStorageSlotClick ?: return
pendingStorageSlotClick = null
if (button.isMouseOver(mouseX, mouseY)) {
onStorageSlotClicked(button)
}
}
fun updateSelection() {
val area = pcGui.getSelectionArea()
if (area == null) {
multiSelection = null
return
}
selectedPosition = null
grabbedSlot = null
pcGui.setPreviewPokemon(null)
val selectedSlots = getSelectedPokemon(area)
if (selectedSlots.isEmpty()) {
multiSelection = null
return
}
val minColumn = selectedSlots.minOf { it.position.slot % 6 }
val maxColumn = selectedSlots.maxOf { it.position.slot % 6 }
val minRow = selectedSlots.minOf { it.position.slot / 6 }
val maxRow = selectedSlots.maxOf { it.position.slot / 6 }
val selection = PCMultiSelection(maxColumn - minColumn + 1, maxRow - minRow + 1, box, minColumn, minRow)
selectedSlots.forEach { slot ->
val pokemon = slot.getPokemon() ?: return@forEach
val slotIndex = slot.position.slot
val column = slotIndex % 6
val row = slotIndex / 6
if (column in minColumn..maxColumn && row in minRow..maxRow) {
selection.setPokemon(column - minColumn, row - minRow, pokemon)
}
}
playSound(CobblemonSounds.PC_GRAB)
multiSelection = selection
}
private fun moveMultiSelectionTo(destination: PCPosition): Boolean {
val selection = multiSelection ?: return false
val width = selection.getHorizontalSize()
val height = selection.getVerticalSize()
val destinationColumn = destination.slot % 6
val destinationRow = destination.slot / 6
if (destinationColumn + width > 6 || destinationRow + height > 5) return false
val moves = mutableListOf<PCPokemonMove>()
val selectedSources = mutableSetOf<PCPosition>()
repeat(height) { row ->
repeat(width) { column ->
val pokemon = selection.getPokemon(column, row) ?: return@repeat
val source = PCPosition(selection.sourceBox, (selection.sourceRow + row) * 6 + selection.sourceColumn + column)
val target = PCPosition(destination.box, (destinationRow + row) * 6 + destinationColumn + column)
selectedSources.add(source)
moves.add(PCPokemonMove(pokemon.uuid, source, target))
}
}
if (moves.isEmpty()) return false
repeat(height) { row ->
repeat(width) { column ->
if (selection.getPokemon(column, row) == null) return@repeat
val target = PCPosition(destination.box, (destinationRow + row) * 6 + destinationColumn + column)
val displacedPokemon = pc.get(target) ?: return@repeat
if (target in selectedSources) return@repeat
val displacedSource = PCPosition(
selection.sourceBox,
(selection.sourceRow + row) * 6 + selection.sourceColumn + column
)
if (pc.get(displacedSource) != null && displacedSource !in selectedSources) return false
moves.add(PCPokemonMove(displacedPokemon.uuid, target, displacedSource))
}
}
if (moves.map { it.newPosition }.toSet().size != moves.size) return false
MovePCPokemonBatchPacket(moves).sendToServer()
return true
}
fun isInMultiSelection(pokemon: Pokemon, position: PCPosition): Boolean {
val selection = multiSelection ?: return false
return selection.sourceBox == position.box && selection.pokemonEntries().any { it.third == pokemon }
}
override fun renderWidget(context: GuiGraphics, mouseX: Int, mouseY: Int, delta: Float) {
updatePendingMove()
val matrices = context.pose()
// Party Label
if (pcGui.configuration.showParty) {
@@ -354,14 +240,11 @@ class StorageWidget(
shadow = true
)
val pokemonCount = multiSelection?.getPokemonCount() ?: 0
if (canDeleteSelected() && displayConfirmRelease) {
drawScaledText(
context = context,
font = CobblemonResources.DEFAULT_LARGE,
text = if (pokemonCount > 1)
{ lang("ui.pc.release_all").bold() } else { lang("ui.pc.release").bold() },
text = lang("ui.pc.release").bold(),
x = x + 223,
y = y + 119,
centered = true
@@ -425,7 +308,6 @@ class StorageWidget(
slot.render(context, mouseX, mouseY, delta)
val pokemon = slot.getPokemon()
if (grabbedSlot == null && slot.isHovered(mouseX, mouseY)
&& multiSelection == null
&& pokemon != null && pokemon != pcGui.previewPokemon
) {
pcGui.setPreviewPokemon(pokemon, pcGui.isPreviewInParty ?: false)
@@ -442,7 +324,6 @@ class StorageWidget(
slot.render(context, mouseX, mouseY, delta)
val pokemon = slot.getPokemon()
if (grabbedSlot == null && slot.isHovered(mouseX, mouseY)
&& multiSelection == null
&& pokemon != null && pokemon != pcGui.previewPokemon
) {
pcGui.setPreviewPokemon(pokemon, pcGui.isPreviewInParty ?: true)
@@ -454,32 +335,10 @@ class StorageWidget(
pastureWidget?.render(context, mouseX, mouseY, delta)
matrices.pushPose()
matrices.translate(0.0, 0.0, 1000.0)
renderSelectedPokemon(context, mouseX, mouseY, delta)
grabbedSlot?.render(context, mouseX, mouseY, delta)
matrices.popPose()
}
private fun renderSelectedPokemon(context: GuiGraphics, mouseX: Int, mouseY: Int, delta: Float) {
if (movePending) return
val selection = multiSelection
if (selection == null) {
grabbedSlot?.render(context, mouseX, mouseY, delta)
return
}
val slotOffset = StorageSlot.SIZE + BOX_SLOT_PADDING
selection.pokemonEntries().forEach { (column, row, pokemon) ->
val grabbed = multiGrabbedSlots.getOrPut(pokemon.uuid) {
GrabbedStorageSlot(0, 0, this, pokemon)
}
grabbed.render(
context,
mouseX + column * slotOffset,
mouseY + row * slotOffset,
delta
)
}
}
override fun mouseClicked(pMouseX: Double, pMouseY: Double, pButton: Int): Boolean {
if (displayConfirmRelease) {
if (releaseYesButton.isHovered(pMouseX, pMouseY)) releaseYesButton.mouseClicked(pMouseX, pMouseY, pButton)
@@ -512,55 +371,23 @@ class StorageWidget(
else -> return
}
val clickedPokemon = when (clickedPosition) {
is PCPosition -> pc.get(clickedPosition)
is PartyPosition -> party.get(clickedPosition)
else -> null
}
multiSelection?.let { selection ->
when (clickedPosition) {
is PCPosition -> {
if (clickedPosition.box == selection.sourceBox &&
clickedPosition.slot == selection.sourceRow * 6 + selection.sourceColumn
) {
resetSelected()
} else if (moveMultiSelectionTo(clickedPosition)) {
playSound(CobblemonSounds.PC_DROP)
movePending = true
}
}
is PartyPosition -> {
val selectedPokemon = selection.pokemonEntries().singleOrNull() ?: return
val (column, row, pokemon) = selectedPokemon
val source = PCPosition(
selection.sourceBox,
(selection.sourceRow + row) * 6 + selection.sourceColumn + column
)
if (pc.get(source) !== pokemon) return
val packet = clickedPokemon?.let {
SwapPCPartyPokemonPacket(it.uuid, clickedPosition, pokemon.uuid, source)
} ?: MovePCPokemonToPartyPacket(pokemon.uuid, source, clickedPosition)
packet.sendToServer()
playSound(CobblemonSounds.PC_DROP)
movePending = true
}
else -> Unit
}
return
}
// Reset release confirmation
displayConfirmRelease = false
// Clicking on itself, so unselect position
if (selectedPosition == clickedPosition) {
if (this.selectedPosition != null && this.selectedPosition == clickedPosition) {
if (grabbedSlot != null) playSound(CobblemonSounds.PC_DROP)
resetSelected()
return
}
// Check for selecting a Pokémon
val clickedPokemon = when(button) {
is BoxStorageSlot -> pc.get(clickedPosition as PCPosition)
is PartyStorageSlot -> party.get(clickedPosition as PartyPosition)
else -> null
}
val selectOverride = pcGui.configuration.selectOverride
if (selectOverride != null) {
selectOverride(pcGui, clickedPosition, clickedPokemon)
@@ -593,47 +420,59 @@ class StorageWidget(
}
}
if (clickedPosition is PCPosition) {
val column = clickedPosition.slot % 6
val row = clickedPosition.slot / 6
multiSelection = PCMultiSelection(1, 1, clickedPosition.box, column, row).also {
it.setPokemon(0, 0, clickedPokemon)
}
playSound(CobblemonSounds.PC_GRAB)
return
} else if (clickedPosition is PartyPosition) {
this.selectedPosition = clickedPosition
this.pcGui.setPreviewPokemon(clickedPokemon, pcGui.isPreviewInParty ?: false)
grabbedSlot = GrabbedStorageSlot(
x = button.x,
y = button.y,
parent = this,
pokemon = clickedPokemon
)
playSound(CobblemonSounds.PC_GRAB)
}
this.selectedPosition = clickedPosition
this.pcGui.setPreviewPokemon(clickedPokemon, pcGui.isPreviewInParty ?: false)
grabbedSlot = GrabbedStorageSlot(
x = button.x,
y = button.y,
parent = this,
pokemon = clickedPokemon
)
playSound(CobblemonSounds.PC_GRAB)
}
} else {
val sourcePosition = selectedPosition ?: return
val selectedPokemon = party.get(sourcePosition) ?: return
// Handle movement within the Box
val selectedPokemon = when(this.selectedPosition) {
is PCPosition -> pc.get(this.selectedPosition as PCPosition)
is PartyPosition -> party.get(this.selectedPosition as PartyPosition)
else -> null
} ?: return
// Box to Box
if (this.selectedPosition is PCPosition && clickedPosition is PCPosition) {
val packet = clickedPokemon?.let { SwapPCPokemonPacket(it.uuid, clickedPosition, selectedPokemon.uuid, this.selectedPosition as PCPosition) }
?: MovePCPokemonPacket(selectedPokemon.uuid, selectedPosition as PCPosition, clickedPosition)
packet.sendToServer()
playSound(CobblemonSounds.PC_DROP)
resetSelected()
}
// Box to Party
else if (this.selectedPosition is PCPosition && clickedPosition is PartyPosition) {
val packet = clickedPokemon?.let { SwapPCPartyPokemonPacket(clickedPokemon.uuid, clickedPosition, selectedPokemon.uuid, this.selectedPosition as PCPosition) }
?: MovePCPokemonToPartyPacket(selectedPokemon.uuid, this.selectedPosition as PCPosition, clickedPosition)
packet.sendToServer()
playSound(CobblemonSounds.PC_DROP)
resetSelected()
}
// Party to Box
if (clickedPosition is PCPosition) {
else if (this.selectedPosition is PartyPosition && clickedPosition is PCPosition) {
if (ServerSettings.preventCompletePartyDeposit && this.party.filterNotNull().size == 1 && clickedPokemon == null) {
return
}
val packet = clickedPokemon?.let { SwapPCPartyPokemonPacket(selectedPokemon.uuid, sourcePosition, clickedPokemon.uuid, clickedPosition) }
?: MovePartyPokemonToPCPacket(selectedPokemon.uuid, sourcePosition, clickedPosition)
val packet = clickedPokemon?.let { SwapPCPartyPokemonPacket(selectedPokemon.uuid, this.selectedPosition as PartyPosition, clickedPokemon.uuid, clickedPosition) }
?: MovePartyPokemonToPCPacket(selectedPokemon.uuid, this.selectedPosition as PartyPosition, clickedPosition)
packet.sendToServer()
playSound(CobblemonSounds.PC_DROP)
movePending = true
resetSelected()
}
// Party to Party
else if (clickedPosition is PartyPosition) {
val packet = clickedPokemon?.let { SwapPartyPokemonPacket(it.uuid, clickedPosition, selectedPokemon.uuid, sourcePosition) }
?: MovePartyPokemonPacket(selectedPokemon.uuid, sourcePosition, clickedPosition)
else if (this.selectedPosition is PartyPosition && clickedPosition is PartyPosition) {
val packet = clickedPokemon?.let { SwapPartyPokemonPacket(it.uuid, clickedPosition, selectedPokemon.uuid, this.selectedPosition as PartyPosition) }
?: MovePartyPokemonPacket(selectedPokemon.uuid, selectedPosition as PartyPosition, clickedPosition)
packet.sendToServer()
playSound(CobblemonSounds.PC_DROP)
movePending = true
resetSelected()
}
}
}
@@ -641,36 +480,6 @@ class StorageWidget(
fun resetSelected() {
selectedPosition = null
grabbedSlot = null
multiSelection = null
multiGrabbedSlots.clear()
pcGui.setPreviewPokemon(null)
}
// annoyingly complex solution, but server/client desync causes flashing when moving pokemon. this should fix it
// if you can think of a simpler solution, feel free to implement it
private fun updatePendingMove() {
if (!movePending) return
val selection = multiSelection
if (selection != null) {
val updated = selection.pokemonEntries().any { (column, row, pokemon) ->
val source = PCPosition(selection.sourceBox, (selection.sourceRow + row) * 6 + selection.sourceColumn + column)
pc.get(source)?.uuid != pokemon.uuid
}
if (updated) {
movePending = false
resetSelected()
}
return
}
val source = selectedPosition
val pokemon = grabbedSlot?.getPokemon()
if (source != null && pokemon != null) {
if (party.get(source)?.uuid != pokemon.uuid) {
movePending = false
resetSelected()
}
}
}
}
@@ -1,55 +0,0 @@
/*
* Copyright (C) 2023 Cobblemon Contributors
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://www.mozilla.org/MPL/2.0/.
*/
package com.cobblemon.mod.common.net.messages.server.storage.pc
import com.cobblemon.mod.common.api.net.NetworkPacket
import com.cobblemon.mod.common.api.storage.pc.PCPosition
import com.cobblemon.mod.common.util.cobblemonResource
import com.cobblemon.mod.common.util.readPCPosition
import com.cobblemon.mod.common.util.writePCPosition
import java.util.UUID
import net.minecraft.network.RegistryFriendlyByteBuf
class MovePCPokemonBatchPacket(val moves: List<PCPokemonMove>) : NetworkPacket<MovePCPokemonBatchPacket> {
override val id = ID
data class PCPokemonMove(
val pokemonID: UUID,
val oldPosition: PCPosition,
val newPosition: PCPosition
)
override fun encode(buffer: RegistryFriendlyByteBuf) {
buffer.writeVarInt(moves.size)
moves.forEach { move ->
buffer.writeUUID(move.pokemonID)
buffer.writePCPosition(move.oldPosition)
buffer.writePCPosition(move.newPosition)
}
}
companion object {
val ID = cobblemonResource("move_pc_pokemon_batch")
const val MAX_MOVES = 60
fun decode(buffer: RegistryFriendlyByteBuf): MovePCPokemonBatchPacket {
val size = buffer.readVarInt()
require(size in 1..MAX_MOVES) { "Invalid batch PC move size: $size" }
return MovePCPokemonBatchPacket(
List(size) {
PCPokemonMove(
pokemonID = buffer.readUUID(),
oldPosition = buffer.readPCPosition(),
newPosition = buffer.readPCPosition()
)
}
)
}
}
}
@@ -1,23 +0,0 @@
/*
* Copyright (C) 2023 Cobblemon Contributors
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://www.mozilla.org/MPL/2.0/.
*/
package com.cobblemon.mod.common.net.serverhandling.storage.pc
import com.cobblemon.mod.common.api.net.ServerNetworkPacketHandler
import com.cobblemon.mod.common.api.storage.pc.link.PCLinkManager
import com.cobblemon.mod.common.net.messages.client.storage.pc.ClosePCPacket
import com.cobblemon.mod.common.net.messages.server.storage.pc.MovePCPokemonBatchPacket
import net.minecraft.server.MinecraftServer
import net.minecraft.server.level.ServerPlayer
object MovePCPokemonBatchHandler : ServerNetworkPacketHandler<MovePCPokemonBatchPacket> {
override fun handle(packet: MovePCPokemonBatchPacket, server: MinecraftServer, player: ServerPlayer) {
val pc = PCLinkManager.getPC(player) ?: return run { ClosePCPacket(null).sendToPlayer(player) }
pc.moveBatch(packet.moves.map { Triple(it.pokemonID, it.oldPosition, it.newPosition) })
}
}
@@ -17,7 +17,7 @@
"active_time": 1.5
},
"minecraft:emitter_shape_sphere": {
"offset": [-0.68571, 1.16204, -0.68571],
"offset": [0.68571, 1.16204, -0.68571],
"radius": 0.125,
"surface_only": true,
"direction": ["((v.particle_random_1)-0.5)*4", 0, "((v.particle_random_3)-0.5)*4"]
@@ -16,13 +16,13 @@
"active_time": 1
},
"minecraft:emitter_shape_point": {
"offset": [-0.68571, 1.16204, -0.68571]
"offset": [0.68571, 1.16204, -0.68571]
},
"minecraft:particle_lifetime_expression": {
"max_lifetime": 1
},
"minecraft:particle_motion_parametric": {
"relative_position": [0.68571, "-1.6*(math.pow((0.5*((math.clamp(v.particle_age, 0, 0.5))-0.5)), 2))+1.26204", -0.68571]
"relative_position": [-0.68571, "-1.6*(math.pow((0.5*((math.clamp(v.particle_age, 0, 0.5))-0.5)), 2))+1.26204", -0.68571]
},
"minecraft:particle_appearance_billboard": {
"size": [0.625, 0.625],
@@ -24,7 +24,7 @@
"active_time": 1
},
"minecraft:emitter_shape_point": {
"offset": [-0.43214, 0.31347, -0.43214],
"offset": [0.43214, 0.31347, -0.43214],
"direction": [-0.5, 0.766, -0.5]
},
"minecraft:particle_lifetime_expression": {
@@ -24,7 +24,7 @@
"active_time": 1
},
"minecraft:emitter_shape_point": {
"offset": [-0.22857, 0.07837, -0.22857],
"offset": [0.22857, 0.07837, -0.22857],
"direction": [-0.5, 0.666, -0.5]
},
"minecraft:particle_lifetime_expression": {
@@ -17,7 +17,7 @@
"active_time": 1
},
"minecraft:emitter_shape_point": {
"offset": [-0.68571, 1.16204, -0.68571],
"offset": [0.68571, 1.16204, -0.68571],
"direction": ["((v.particle_random_1)-0.5)*4", "((v.particle_random_2)-0.5)/3", "((v.particle_random_3)-0.5)*4"]
},
"minecraft:particle_lifetime_expression": {
@@ -16,13 +16,13 @@
"active_time": 1
},
"minecraft:emitter_shape_point": {
"offset": [-0.68571, 1.36204, -0.68571]
"offset": [0.68571, 1.36204, -0.68571]
},
"minecraft:particle_lifetime_expression": {
"max_lifetime": 0.5
},
"minecraft:particle_motion_parametric": {
"relative_position": [0.68571, "-0.2*(math.pow((2*((math.clamp(v.particle_age, 0, 0.5))-0.5)), 2))+1.36204", -0.68571]
"relative_position": [-0.68571, "-0.2*(math.pow((2*((math.clamp(v.particle_age, 0, 0.5))-0.5)), 2))+1.36204", -0.68571]
},
"minecraft:particle_appearance_billboard": {
"size": [0.625, 0.625],
@@ -24,7 +24,7 @@
"active_time": 2
},
"minecraft:emitter_shape_point": {
"offset": [-0.43214, 0.31347, -0.43214],
"offset": [0.43214, 0.31347, -0.43214],
"direction": [-0.5, 0.766, -0.5]
},
"minecraft:particle_lifetime_expression": {
@@ -24,7 +24,7 @@
"active_time": 1
},
"minecraft:emitter_shape_point": {
"offset": [-0.22857, 0.07837, -0.22857],
"offset": [0.22857, 0.07837, -0.22857],
"direction": [-0.5, 0.666, -0.5]
},
"minecraft:particle_lifetime_expression": {
@@ -612,6 +612,9 @@
"locator_target": {
"position": [0, 0, -3]
}
},
"timeline": {
"0.0": "q.run_molang('cobblemon:stepsound_standard_large');"
}
},
"animation.lapras.ride_ground_walk": {
@@ -6970,6 +6970,10 @@
"2.6667": [0, 0, 0]
}
}
},
"timeline": {
"0.0": "q.run_molang('cobblemon:stepsound_claw_large');",
"1.3333": "q.run_molang('cobblemon:stepsound_claw_large');"
}
},
"animation.aerodactyl.ground_run": {
@@ -8170,6 +8174,10 @@
"finger_air_outer_right2": {
"rotation": [72.5, 0, 0]
}
},
"timeline": {
"0.0": "q.run_molang('cobblemon:stepsound_claw_large');",
"0.6667": "q.run_molang('cobblemon:stepsound_claw_large');"
}
},
"animation.aerodactyl.battle_air_idle": {
@@ -835,6 +835,10 @@
}
}
}
},
"timeline": {
"0.5": "q.run_molang('cobblemon:stepsound_standard_large');",
"1.5": "q.run_molang('cobblemon:stepsound_standard_large');"
}
},
"animation.dragonite.sleep": {
@@ -485,6 +485,10 @@
"locator_seat_1": {
"rotation": ["-12.5+math.cos(q.anim_time*90*3*2)*3", "0-math.cos(q.anim_time*90*3-180)*6", "0-math.cos(q.anim_time*90*3)*6"]
}
},
"timeline": {
"0.0": "q.run_molang('cobblemon:stepsound_minecraft');",
"0.6667": "q.run_molang('cobblemon:stepsound_minecraft');"
}
},
"animation.ariados.ground_run": {
@@ -1535,6 +1539,14 @@
"locator_seat_1": {
"rotation": ["-17.5+math.cos(q.anim_time*90*9*2)*4", "0+math.cos(q.anim_time*90*9-60)*4", 0]
}
},
"timeline": {
"0.125": "q.run_molang('cobblemon:stepsound_minecraft');",
"0.375": "q.run_molang('cobblemon:stepsound_minecraft');",
"0.5833": "q.run_molang('cobblemon:stepsound_minecraft');",
"0.7917": "q.run_molang('cobblemon:stepsound_minecraft');",
"1.0417": "q.run_molang('cobblemon:stepsound_minecraft');",
"1.25": "q.run_molang('cobblemon:stepsound_minecraft');"
}
},
"animation.ariados.ride_ground_walk": {
@@ -427,6 +427,12 @@
"neck2_spikes": {
"rotation": [0, "-math.cos(q.anim_time*90*4+30)*3", 0]
}
},
"timeline": {
"0.0": "q.run_molang('cobblemon:stepsound_hoof_medium');",
"0.0278": "q.run_molang('cobblemon:stepsound_hoof_medium');",
"0.5": "q.run_molang('cobblemon:stepsound_hoof_medium');",
"0.5278": "q.run_molang('cobblemon:stepsound_hoof_medium');"
}
},
"animation.girafarig.ground_run": {
@@ -876,6 +882,12 @@
"head_spikes": {
"rotation": [0, "-math.sin(q.anim_time*90*8+30)*8", 0]
}
},
"timeline": {
"0.2083": "q.run_molang('cobblemon:stepsound_hoof_medium');",
"0.25": "q.run_molang('cobblemon:stepsound_hoof_medium');",
"0.2917": "q.run_molang('cobblemon:stepsound_hoof_medium');",
"0.3333": "q.run_molang('cobblemon:stepsound_hoof_medium');"
}
},
"animation.girafarig.battle_idle": {
@@ -15,11 +15,51 @@
"name": "smeargle",
"pivot": [0, 0, 0]
},
{
"name": "locator_root",
"parent": "smeargle",
"pivot": [0, 0, 0],
"locators": {
"root": [0, 0, 0]
}
},
{
"name": "locator_top",
"parent": "smeargle",
"pivot": [0, 30, 0],
"locators": {
"top": [0, 30, 0]
}
},
{
"name": "locator_special",
"parent": "smeargle",
"pivot": [0, 14, -20],
"locators": {
"special": [0, 14, -20]
}
},
{
"name": "body",
"parent": "smeargle",
"pivot": [0, 6, 0]
},
{
"name": "locator_target",
"parent": "body",
"pivot": [0, 14, -8],
"locators": {
"target": [0, 14, -8]
}
},
{
"name": "locator_middle",
"parent": "body",
"pivot": [0, 14, 0],
"locators": {
"middle": [0, 14, 0]
}
},
{
"name": "torso",
"parent": "body",
@@ -68,6 +108,23 @@
{"origin": [10.5, 14, -1.5], "size": [2, 2, 3], "inflate": 0.02, "uv": [22, 46]}
]
},
{
"name": "locator_hand_secondary",
"parent": "hand_left",
"pivot": [12.5, 14, 0],
"rotation": [0, -90, 0],
"locators": {
"hand_secondary": [12.5, 14, 0]
}
},
{
"name": "locator_item",
"parent": "hand_left",
"pivot": [12.5, 14, 0],
"locators": {
"item": [12.5, 14, 0]
}
},
{
"name": "thumb_left",
"parent": "hand_left",
@@ -140,6 +197,15 @@
{"origin": [-12.5, 14, -1.5], "size": [2, 2, 3], "inflate": 0.02, "uv": [32, 46], "mirror": true}
]
},
{
"name": "locator_hand_primary",
"parent": "hand_right",
"pivot": [-12.5, 14, 0],
"rotation": [0, 90, 0],
"locators": {
"hand_primary": [-12.5, 14, 0]
}
},
{
"name": "thumb_right",
"parent": "hand_right",
@@ -206,6 +272,31 @@
{"origin": [-1.5, 21, -8.01], "size": [1, 1, 0], "uv": [0, 9], "mirror": true}
]
},
{
"name": "locator_mouth",
"parent": "head",
"pivot": [0, 18, -4.75],
"locators": {
"mouth": [0, 18, -4.75]
}
},
{
"name": "locator_item_face",
"parent": "head",
"pivot": [0, 25.5, -7.5],
"rotation": [-35, 0, 0],
"locators": {
"item_face": [0, 25.5, -7.5]
}
},
{
"name": "locator_face",
"parent": "head",
"pivot": [0, 23, -8],
"locators": {
"face": [0, 23, -8]
}
},
{
"name": "eyes",
"parent": "head",
@@ -255,6 +346,15 @@
{"origin": [4.03, 22.5, -5.5], "size": [0, 2, 1], "uv": [8, -1]}
]
},
{
"name": "locator_eye_left",
"parent": "pupil_left",
"pivot": [4, 23.5, -5],
"rotation": [0, -90, 0],
"locators": {
"eye2": [4, 23.5, -5]
}
},
{
"name": "eyelid_left",
"parent": "eye_left",
@@ -323,6 +423,15 @@
{"origin": [-4.03, 22.5, -5.5], "size": [0, 2, 1], "uv": [8, 18], "mirror": true}
]
},
{
"name": "locator_eye_right",
"parent": "pupil_right",
"pivot": [-4, 23.5, -5],
"rotation": [0, 90, 0],
"locators": {
"eye1": [-4, 23.5, -5]
}
},
{
"name": "eyelid_happy_right",
"parent": "eye_right",
@@ -405,6 +514,22 @@
{"origin": [-1, 28, -1.25], "size": [2, 3, 2], "uv": [3, 25]}
]
},
{
"name": "locator_head",
"parent": "hat",
"pivot": [0, 26.5, -6.25],
"locators": {
"head": [0, 26.5, -6.25]
}
},
{
"name": "locator_item_hat",
"parent": "hat",
"pivot": [0, 28.5, -0.75],
"locators": {
"item_hat": [0, 28.5, -0.75]
}
},
{
"name": "tail",
"parent": "torso",
@@ -437,6 +562,15 @@
{"origin": [-1.1, 6.5, 19.5], "size": [2, 2, 6], "uv": [44, 32]}
]
},
{
"name": "locator_tail",
"parent": "tail4",
"pivot": [0, 7.5, 22.5],
"rotation": [-180, 0, 180],
"locators": {
"tail": [0, 7.5, 22.5]
}
},
{
"name": "tail5",
"parent": "tail4",
@@ -486,6 +620,24 @@
{"origin": [-3, 7.5, 50], "size": [6, 0, 4], "pivot": [0, 7.5, 52], "rotation": [0, 0, -45], "uv": [66, 19]}
]
},
{
"name": "locator_tail_tip",
"parent": "tail_end_fur",
"pivot": [0, 7.5, 54],
"rotation": [-180, 0, 180],
"locators": {
"tail_tip": [0, 7.5, 54]
}
},
{
"name": "locator_physical",
"parent": "tail_end_fur",
"pivot": [0, 7.5, 51],
"rotation": [-180, 0, 180],
"locators": {
"physical": [0, 7.5, 51]
}
},
{
"name": "tail_end_fur_left",
"parent": "tail_end2",
@@ -534,6 +686,15 @@
{"origin": [1, 0.09, -1], "size": [2, 0, 2], "uv": [50, 48]}
]
},
{
"name": "locator_foot_secondary",
"parent": "foot_left",
"pivot": [2, 0.5, -2],
"rotation": [90, 0, 0],
"locators": {
"foot_secondary": [2, 0.5, -2]
}
},
{
"name": "foot_left2",
"parent": "foot_left",
@@ -567,6 +728,15 @@
{"origin": [-3, 0.09, -1], "size": [2, 0, 2], "uv": [50, 52], "mirror": true}
]
},
{
"name": "locator_foot_primary",
"parent": "foot_right",
"pivot": [-2, 0.5, -2],
"rotation": [90, 0, 0],
"locators": {
"foot_primary": [-2, 0.5, -2]
}
},
{
"name": "foot_right2",
"parent": "foot_right",
@@ -1299,7 +1299,6 @@
"cobblemon.ui.pc.filter.tooltip": "Format: pikachu shiny held_item lvl=1...",
"cobblemon.ui.pc.options": "Options",
"cobblemon.ui.pc.release": "Release",
"cobblemon.ui.pc.release_all": "Release All",
"cobblemon.ui.sort.name": "Sort by name",
"cobblemon.ui.sort.level": "Sort by level",
"cobblemon.ui.sort.pokedex_number": "Sort by Pokédex number",
@@ -2516,12 +2516,12 @@
"stepsound.grass.minecraft": {
"subtitle": "subtitles.block.generic.footsteps",
"sounds": [
{ "name": "step/grass1", "volume": 0.05 },
{ "name": "step/grass2", "volume": 0.05 },
{ "name": "step/grass3", "volume": 0.05 },
{ "name": "step/grass4", "volume": 0.05 },
{ "name": "step/grass5", "volume": 0.05 },
{ "name": "step/grass6", "volume": 0.05 }
{ "name": "step/grass1", "volume": 0.1 },
{ "name": "step/grass2", "volume": 0.1 },
{ "name": "step/grass3", "volume": 0.1 },
{ "name": "step/grass4", "volume": 0.1 },
{ "name": "step/grass5", "volume": 0.1 },
{ "name": "step/grass6", "volume": 0.1 }
]
},
"stepsound.glass.minecraft": {
@@ -2547,23 +2547,23 @@
"stepsound.mud.minecraft": {
"subtitle": "subtitles.block.generic.footsteps",
"sounds": [
{ "name": "block/mud/step1", "volume": 0.2 },
{ "name": "block/mud/step2", "volume": 0.2 },
{ "name": "block/mud/step3", "volume": 0.2 },
{ "name": "block/mud/step4", "volume": 0.2 },
{ "name": "block/mud/step5", "volume": 0.2 },
{ "name": "block/mud/step6", "volume": 0.2 }
{ "name": "block/mud/step1", "volume": 0.08 },
{ "name": "block/mud/step2", "volume": 0.08 },
{ "name": "block/mud/step3", "volume": 0.08 },
{ "name": "block/mud/step4", "volume": 0.08 },
{ "name": "block/mud/step5", "volume": 0.08 },
{ "name": "block/mud/step6", "volume": 0.08 }
]
},
"stepsound.stone.minecraft": {
"subtitle": "subtitles.block.generic.footsteps",
"sounds": [
{ "name": "step/stone1", "volume": 0.08 },
{ "name": "step/stone2", "volume": 0.08 },
{ "name": "step/stone3", "volume": 0.08 },
{ "name": "step/stone4", "volume": 0.08 },
{ "name": "step/stone5", "volume": 0.08 },
{ "name": "step/stone6", "volume": 0.08 }
{ "name": "step/stone1", "volume": 0.1 },
{ "name": "step/stone2", "volume": 0.1 },
{ "name": "step/stone3", "volume": 0.1 },
{ "name": "step/stone4", "volume": 0.1 },
{ "name": "step/stone5", "volume": 0.1 },
{ "name": "step/stone6", "volume": 0.1 }
]
},
"stepsound.wood.minecraft": {
Binary file not shown.

Before

Width:  |  Height:  |  Size: 548 B

@@ -1,14 +1,18 @@
{
"timeline": [
{
"type": "add_holds",
"holds": ["effects"]
},
"timeline": [
{
"type": "add_holds",
"holds": ["effects"]
},
{
"type": "fork",
"condition": "q.failed(q.user.uuid) == false",
"ifTrue": [
{
"type": "entity_particles",
"effect": "cobblemon:amnesia_actortrailsmall",
"locators": ["top"]
},
"locators": ["head", "top"]
},
{
"type": "pause",
"pause": 0.1
@@ -16,8 +20,8 @@
{
"type": "entity_particles",
"effect": "cobblemon:amnesia_actortraillarge",
"locators": ["top"]
},
"locators": ["head", "top"]
},
{
"type": "pause",
"pause": 0.1
@@ -25,8 +29,8 @@
{
"type": "entity_particles",
"effect": "cobblemon:amnesia_actorcloud",
"locators": ["top"]
},
"locators": ["head", "top"]
},
{
"type": "pause",
"pause": 1.8
@@ -34,8 +38,8 @@
{
"type": "entity_particles",
"effect": "cobblemon:amnesia_actorquestion",
"locators": ["top"]
},
"locators": ["head", "top"]
},
{
"type": "pause",
"pause": 0.25
@@ -43,18 +47,22 @@
{
"type": "entity_molang",
"expressions": ["q.play_animation(q.bedrock_stateful('amnesia', 'actor'))"]
},
},
{
"type": "pause",
"pause": 1.55
},
{
"type": "remove_holds",
"holds": ["effects"]
},
{
"type": "pause",
"pause": 1.5
"pause": 1.0
}
]
],
"ifFalse": [
{
"type": "pause",
"pause": 1.2
}
]
},
{
"type": "remove_holds",
"holds": ["effects"]
}
]
}
@@ -3,59 +3,68 @@
{
"type": "add_holds",
"holds": ["effects"]
},
{
"type": "entity_particles",
"effect": "cobblemon:nastyplot_actortrailsmall",
"locators": ["top"]
},
{
"type": "pause",
"pause": 0.1
},
{
"type": "entity_particles",
"effect": "cobblemon:nastyplot_actortraillarge",
"locators": ["top"]
},
{
"type": "pause",
"pause": 0.1
"type": "fork",
"condition": "q.failed(q.user.uuid) == false",
"ifTrue": [
{
"type": "entity_particles",
"effect": "cobblemon:nastyplot_actortrailsmall",
"locators": ["head", "top"]
},
{
"type": "pause",
"pause": 0.1
},
{
"type": "entity_particles",
"effect": "cobblemon:nastyplot_actortraillarge",
"locators": ["head", "top"]
},
{
"type": "pause",
"pause": 0.1
},
{
"type": "entity_particles",
"effect": "cobblemon:nastyplot_actorcloud",
"locators": ["head", "top"]
},
{
"type": "pause",
"pause": 1.4
},
{
"type": "entity_molang",
"expressions": ["q.play_animation(q.bedrock_stateful('nastyplot', 'actor'))"]
},
{
"type": "entity_particles",
"effect": "cobblemon:nastyplot_actorexclamation",
"locators": ["head", "top"]
},
{
"type": "pause",
"pause": 0.3
},
{
"type": "animation",
"animation": ["nastyplot", "status"],
"delay": 1.2
}
],
"ifFalse": [
{
"type": "animation",
"animation": ["nastyplot", "status"],
"delay": 1.2
}
]
},
{
"type": "entity_particles",
"effect": "cobblemon:nastyplot_actorcloud",
"locators": ["top"]
},
{
"type": "pause",
"pause": 1.4
},
{
"type": "entity_molang",
"expressions": ["q.play_animation(q.bedrock_stateful('nastyplot', 'actor'))"]
},
{
"type": "entity_particles",
"effect": "cobblemon:nastyplot_actorexclamation",
"locators": ["top"]
},
{
"type": "pause",
"pause": 0.3
},
{
"type": "animation",
"animation": ["nastyplot", "status"],
"delay": 0.5
},
{
"type": "remove_holds",
"holds": ["effects"]
},
{
"type": "pause",
"pause": 2.5
}
]
}
@@ -14,7 +14,7 @@
}
],
"type": "cobblemon:cooking_pot_shapeless",
"category": "misc",
"category": "medicines",
"ingredients": [
{
"item": "create:experience_nugget"
@@ -7,6 +7,7 @@
"maleRatio": 0.875,
"height": 18,
"weight": 590,
"silenceStepSounds": true,
"pokedex": [
"cobblemon.species.aerodactyl.desc"
],
@@ -7,6 +7,7 @@
"maleRatio": 0.5,
"height": 22,
"weight": 2100,
"silenceStepSounds": true,
"pokedex": [
"cobblemon.species.dragonite.desc"
],
@@ -7,6 +7,7 @@
"maleRatio": 0.5,
"height": 25,
"weight": 2200,
"silenceStepSounds": true,
"pokedex": [
"cobblemon.species.lapras.desc"
],
@@ -7,6 +7,7 @@
"maleRatio": 0.5,
"height": 11,
"weight": 335,
"silenceStepSounds": true,
"pokedex": [
"cobblemon.species.ariados.desc"
],
@@ -7,6 +7,7 @@
"maleRatio": 0.5,
"height": 18,
"weight": 750,
"silenceStepSounds": true,
"pokedex": [
"cobblemon.species.crobat.desc"
],
@@ -7,6 +7,7 @@
"maleRatio": 0.5,
"height": 15,
"weight": 415,
"silenceStepSounds": true,
"pokedex": [
"cobblemon.species.girafarig.desc"
],
@@ -548,7 +548,7 @@
"battleOnly": false
},
{
"name": "Exclamation",
"name": "!",
"primaryType": "psychic",
"maleRatio": -1,
"height": 5,
@@ -563,7 +563,7 @@
"battleOnly": false
},
{
"name": "Question",
"name": "?",
"primaryType": "psychic",
"maleRatio": -1,
"height": 5,
@@ -6,7 +6,6 @@
"cobblemon:tart_apple",
"cobblemon:syrupy_apple",
"cobblemon:candied_apple",
{ "id": "create:honeyed_apple","required": false },
{ "id": "nomansland:honeyed_apple","required": false }
{ "id": "create:honeyed_apple","required": false }
]
}
Binary file not shown.
@@ -4,5 +4,5 @@
<modelVersion>4.0.0</modelVersion>
<groupId>local.com.bedrockk</groupId>
<artifactId>molang</artifactId>
<version>1.1.21</version>
<version>1.1.12</version>
</project>
Binary file not shown.
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>local.com.bedrockk</groupId>
<artifactId>molang</artifactId>
<version>1.1.13</version>
</project>
Binary file not shown.
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>local.com.bedrockk</groupId>
<artifactId>molang</artifactId>
<version>1.1.14</version>
</project>
Binary file not shown.
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>local.com.bedrockk</groupId>
<artifactId>molang</artifactId>
<version>1.1.15</version>
</project>
Binary file not shown.
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>local.com.bedrockk</groupId>
<artifactId>molang</artifactId>
<version>1.1.16</version>
</project>
Binary file not shown.
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>local.com.bedrockk</groupId>
<artifactId>molang</artifactId>
<version>1.1.18</version>
</project>
Binary file not shown.
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>local.com.bedrockk</groupId>
<artifactId>molang</artifactId>
<version>1.1.19</version>
</project>
Binary file not shown.
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>local.com.bedrockk</groupId>
<artifactId>molang</artifactId>
<version>1.1.20</version>
</project>
Binary file not shown.
+3 -3
View File
@@ -3,10 +3,10 @@
<groupId>local.com.bedrockk</groupId>
<artifactId>molang</artifactId>
<versioning>
<release>1.1.21</release>
<release>1.1.20</release>
<versions>
<version>1.1.21</version>
<version>1.1.20</version>
</versions>
<lastUpdated>20231949390008</lastUpdated>
<lastUpdated>20231949390007</lastUpdated>
</versioning>
</metadata>
+1 -1
View File
@@ -14,7 +14,7 @@ architectury-plugin = "3.4-SNAPSHOT"
moddev = "1.0.11"
# Common
molang = "1.1.21"
molang = "1.1.20"
jei-api = "19.22.1.316"
appleskin-api = "mc1.21-3.0.5"