Merge branch 'fix/mooshtank-checks' into 'main'

fix: added checks for mooshtank aspect, denying usage of bowl on common miltanks

See merge request cable-mc/cobblemon!2468
This commit is contained in:
Polymeta
2026-10-09 15:25:11 +00:00
2 changed files with 5 additions and 3 deletions
+1
View File
@@ -171,6 +171,7 @@
- Saccharine Leaves can now be bone mealed
- Fixed equipping a stack of items instead of one item of a stack
- Fixed TM stack consumption in TMM screen when player teaches a move to species
- Fixed every Miltank giving mushroom stew, not only mushroom variants
### 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:
@@ -1192,7 +1192,7 @@ open class PokemonEntity(
itemStack.hurtAndBreak(1, player, EquipmentSlot.MAINHAND)
return InteractionResult.SUCCESS
} else if (itemStack.`is`(Items.BOWL)) {
if (pokemon.aspects.any { it.contains("mooshtank") }) {
if (pokemon.aspects.any { it.contains("mooshtank") && !it.contains("mooshtank-false") }) {
player.playSound(SoundEvents.MOOSHROOM_MILK, 1.0f, 1.0f)
// if the Mooshtank ate a Flower beforehand
if (pokemon.lastFlowerFed != ItemStack.EMPTY && pokemon.aspects.any { it.contains("mooshtank-brown") }) {
@@ -1234,7 +1234,8 @@ open class PokemonEntity(
) {
if (pokemon.aspects.any { it.contains("mooshtank-brown") }) {
player.playSound(SoundEvents.MOOSHROOM_EAT, 1.0f, 1.0f)
pokemon.lastFlowerFed = itemStack
pokemon.lastFlowerFed = itemStack.copyWithCount(1)
if (!player.isCreative && !level().isClientSide) itemStack.shrink(1)
return InteractionResult.sidedSuccess(level().isClientSide)
}
} else if (!player.isShiftKeyDown && StashHandler.interactMob(player, pokemon, itemStack)) {
@@ -2741,4 +2742,4 @@ open class PokemonEntity(
}
fun hasRider() = this.passengers.any { it is LivingEntity }
}
}