Merge remote-tracking branch 'origin/main' into berry

# Conflicts:
#	common/src/main/kotlin/com/cobblemon/mod/common/block/BerryBlock.kt
This commit is contained in:
Paul committed 2023-09-12 20:52:23 +10:00
commit dc8d7e36e0
56 files changed
+385 -87

No files matched your search

+6 -2
View File
@@ -28,6 +28,7 @@
- Added the `/testpcslot <player> <slot> <properties>` command allowing command block/mcfunction users to query a pc slot and check if the Pokémon matches specific properties returning a 1 if yes otherwise 0, this will be a cheat command in the Minecraft permission system or use the permission `cobblemon.command.testpcslot` if a permission mod is present.
- Added the `/testpartyslot <player> <slot> <properties>` command allowing command block/mcfunction users to query a party slot and check if the Pokémon matches a specific properties returning a 1 if yes otherwise 0, this will be a cheat command in the Minecraft permission system or use the permission `cobblemon.command.testpartyslot` if a permission mod is present.
- Added the `/clearparty <player>` command for emptying a player's party.
- Added the `/clearpc <player>` command for emptying a player's PC.
- Added the `/pokemonrestart <reset_starters>` and the `/pokemonrestartother <player> <reset_starters>` command allowing command block/mcfunction users to reset a players Pokémon data.
- Added support for "isBattle" and "isTouchingWater" properties on resource pack Pokémon poses. This allows your custom Pokémon to be posed differently when in battle.
- Added support for "isVisible" on a transformed part on resource pack Pokémon poses. This allows your custom Pokémon to have bones disappear in specific poses, such as hiding Greninja's throwing star when not in a battle pose.
@@ -283,6 +284,8 @@
- Master balls are now unable to be burned when dropped into fire/lava.
- Pokémon will appear red when hurt, like regular entities, except when they're fainting.
- Ponyta and Rapidash now have animated textures.
- Pokémon's air meter no longer depletes while battling underwater.
- Sleeping partially restores PP of Pokémon
- Item interaction evolutions and held item requirements now support NBT by creating an object JSON containing the key ``item`` for what used to be the existing condition support and a ``nbt`` key for the NBT format, this is the string [format](https://minecraft.fandom.com/wiki/NBT_format) expected in commands. Existing data does not need to be updated.
- Shoulder mounts now match the shoulder position a bit more accurately when sneaking.
- Poison Heal will now cause poisoned Pokémon to heal outside of battle.
@@ -322,8 +325,9 @@
- Fixed some alignment issues in the stat hexagon of the summary menu.
- Fixed capture calculations not applying ball bonuses entirely correctly.
- Fixed Shedinja healing above 1 HP.
- Fixed battles soft-locking when consecutive Pokemon faint on switch-in.
- Fixed battles soft-locking when consecutive Pokémon faint on switch-in.
- Fixed timing and color of battle window messages.
- Fixed players being able to trade, battle and let out their Pokémon while in spectator mode.
- Fixed Galarian Yamask not being able to evolve and by proxy the ``damage_taken`` evolution requirement.
- Fixed Bisharp not being able to evolve and by proxy the ``defeat`` evolution requirement.
- Fixed White-Striped Basculin not being able to evolve and by proxy the ``recoil`` evolution requirement.
@@ -334,7 +338,7 @@
### Developer
- Added SpawnEvent, ThrownPokeballHitEvent, PokemonSentEvent, PokemonRecalledEvent.
- Added BattleFledEvent, BattleStartedEvent, BattleFaintedEvent.
- Added persistent NBT property inside Pokemon to store quick and simple data.
- Added persistent NBT property inside Pokémon to store quick and simple data.
- Species and FormData have had their evolutions, pre-evolution and labels properties exposed. It is still recommended to work using a Pokémon instance when possible.
- Added capture check to BattleVictoryEvent.
- The various hardcoded potion shoulder effects have been removed, make use of PotionBaseEffect.
@@ -0,0 +1,44 @@
/*
* 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://mozilla.org/MPL/2.0/.
*/
package com.cobblemon.mod.common.mixin;
import com.cobblemon.mod.common.block.PreEmptsExplosion;
import it.unimi.dsi.fastutil.objects.ObjectArrayList;
import it.unimi.dsi.fastutil.objects.ObjectListIterator;
import net.minecraft.block.BlockState;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraft.world.explosion.Explosion;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import org.spongepowered.asm.mixin.injection.callback.LocalCapture;
@Mixin(value = Explosion.class)
public class ExplosionMixin {
@Shadow @Final private World world;
@Inject(
method = "affectWorld",
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/block/BlockState;getBlock()Lnet/minecraft/block/Block;"
),
locals = LocalCapture.CAPTURE_FAILSOFT
)
public void cobblemon$whenExploded(boolean particles, CallbackInfo ci, boolean bl, ObjectArrayList<?> objectArrayList, boolean bl2, ObjectListIterator<?> var5, BlockPos blockPos, BlockState blockState) {
if (blockState.getBlock() instanceof PreEmptsExplosion preExplosionBlock) {
preExplosionBlock.whenExploded(world, blockState, blockPos);
}
}
}
@@ -44,6 +44,7 @@ object CobblemonCommands {
TestPcSlotCommand.register(dispatcher)
TestPartySlotCommand.register(dispatcher)
ClearPartyCommand.register(dispatcher)
ClearPCCommand.register(dispatcher)
PokemonRestartCommand.register(dispatcher)
}
}
@@ -78,6 +78,8 @@ object CobblemonSounds : PlatformRegistry<Registry<SoundEvent>, RegistryKey<Regi
@JvmField
val MEDICINE_SPRAY_USE = this.create("medicine_spray.use")
@JvmField
val BERRY_HARVEST = this.create("berry.harvest")
@JvmField
val BERRY_EAT = this.create("berry.eat")
@@ -62,15 +62,17 @@ interface PokemonSelectingItem {
return interactWithSpecificBattle(player, stack, battlePokemon)
}
} ?: run {
if (entity != null && !player.isSneaking) {
val pokemon = entity.pokemon
if (entity.ownerUuid == player.uuid) {
return applyToPokemon(player, stack, pokemon) ?: TypedActionResult.pass(stack)
if (!player.isSneaking) {
return if (entity != null) {
val pokemon = entity.pokemon
if (entity.ownerUuid == player.uuid) {
applyToPokemon(player, stack, pokemon) ?: TypedActionResult.pass(stack)
} else {
TypedActionResult.fail(stack)
}
} else {
return TypedActionResult.fail(stack)
interactGeneral(player, stack)
}
} else {
return interactGeneral(player, stack)
}
}
@@ -18,6 +18,8 @@ import net.minecraft.nbt.NbtCompound
import net.minecraft.nbt.NbtElement
import net.minecraft.nbt.NbtList
import net.minecraft.network.PacketByteBuf
import kotlin.math.min
class MoveSet : Iterable<Move> {
val observable = SimpleObservable<MoveSet>()
private var emit = true
@@ -63,6 +65,11 @@ class MoveSet : Iterable<Move> {
update()
}
fun partialHeal() {
getMoves().forEach { it.currentPp = min((it.currentPp + (it.maxPp / 2)), it.maxPp)}
update()
}
fun clear() {
doWithoutEmitting {
for (i in 0 until MOVE_COUNT){
@@ -65,6 +65,7 @@ object CobblemonPermissions {
val TEST_PARTY_SLOT = this.create("${COMMAND_PREFIX}testpartyslot", PermissionLevel.CHEAT_COMMANDS_AND_COMMAND_BLOCKS)
val CLEAR_PARTY = this.create("${COMMAND_PREFIX}clearparty", PermissionLevel.CHEAT_COMMANDS_AND_COMMAND_BLOCKS)
val CLEAR_PC = this.create("${COMMAND_PREFIX}clearpc", PermissionLevel.CHEAT_COMMANDS_AND_COMMAND_BLOCKS)
fun all(): Iterable<Permission> = this.permissions
@@ -17,7 +17,11 @@ import com.cobblemon.mod.common.api.pokemon.status.Statuses
import com.cobblemon.mod.common.api.properties.CustomPokemonProperty
import com.cobblemon.mod.common.api.types.ElementalTypes
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity
import com.cobblemon.mod.common.pokemon.*
import com.cobblemon.mod.common.pokemon.EVs
import com.cobblemon.mod.common.pokemon.Gender
import com.cobblemon.mod.common.pokemon.IVs
import com.cobblemon.mod.common.pokemon.Pokemon
import com.cobblemon.mod.common.pokemon.RenderablePokemon
import com.cobblemon.mod.common.pokemon.status.PersistentStatus
import com.cobblemon.mod.common.util.DataKeys
import com.cobblemon.mod.common.util.asIdentifierDefaultingNamespace
@@ -25,6 +29,7 @@ import com.cobblemon.mod.common.util.isInt
import com.cobblemon.mod.common.util.splitMap
import com.google.gson.JsonArray
import com.google.gson.JsonObject
import kotlin.random.Random
import net.minecraft.nbt.NbtCompound
import net.minecraft.nbt.NbtElement
import net.minecraft.nbt.NbtList
@@ -34,7 +39,6 @@ import net.minecraft.text.Text
import net.minecraft.util.Identifier
import net.minecraft.util.InvalidIdentifierException
import net.minecraft.world.World
import kotlin.random.Random
/**
* A grouping of typical, selectable properties for a Pokémon. This is serializable
@@ -151,9 +155,10 @@ open class PokemonProperties {
}
private fun parseSpeciesIdentifier(keyPairs: MutableList<Pair<String, String?>>): String? {
fun cleanSpeciesName(string: String) = string.lowercase().replace("[^a-z0-9]".toRegex(), "")
val matched = getMatchedKeyPair(keyPairs, listOf("species"))
if (matched != null) {
val value = matched.second?.lowercase() ?: return null
val value = matched.second?.let(::cleanSpeciesName) ?: return null
return if (value.lowercase() == "random") {
"random"
} else {
@@ -172,7 +177,7 @@ open class PokemonProperties {
"random"
} else {
try {
val identifier = pair.first.asIdentifierDefaultingNamespace()
val identifier = cleanSpeciesName(pair.first).asIdentifierDefaultingNamespace()
val found = PokemonSpecies.getByIdentifier(identifier) ?: return@find false
if (found.resourceIdentifier.namespace == Cobblemon.MODID) found.resourceIdentifier.path else found.resourceIdentifier.toString()
} catch (e: InvalidIdentifierException) {
@@ -145,7 +145,7 @@ class BerryBlock(private val berryIdentifier: Identifier, settings: Settings) :
val treeEntity = world.getBlockEntity(pos) as BerryBlockEntity
setMulch(world, pos, state, variant)
treeEntity.mulchDuration = variant.duration
world.playSound(null, pos, CobblemonSounds.MULCH_PLACE, SoundCategory.BLOCKS)
world.playSound(null, pos, CobblemonSounds.MULCH_PLACE, SoundCategory.BLOCKS, 0.6F, 1F)
}
@Deprecated("Deprecated in Java")
@@ -154,18 +154,19 @@ class BerryBlock(private val berryIdentifier: Identifier, settings: Settings) :
if (player.getStackInHand(hand).item is ShovelItem && getMulch(state) != MulchVariant.NONE) {
setMulch(world, pos, state, MulchVariant.NONE)
treeEntity.markDirty()
world.playSound(null, pos, CobblemonSounds.MULCH_REMOVE, SoundCategory.BLOCKS)
world.playSound(null, pos, CobblemonSounds.MULCH_REMOVE, SoundCategory.BLOCKS, 0.6F, 1F)
this.spawnBreakParticles(world, player, pos, state.with(AGE, 0))
return ActionResult.SUCCESS
}
if (player.getStackInHand(hand).isOf(Items.BONE_MEAL)) {
if (player.getStackInHand(hand).isOf(Items.BONE_MEAL) && !this.isMaxAge(state)) {
return ActionResult.PASS
} else if (this.isMaxAge(state)) {
val blockEntity = world.getBlockEntity(pos) as? BerryBlockEntity ?: return ActionResult.PASS
blockEntity.harvest(world, state, pos, player).forEach { drop ->
Block.dropStack(world, pos, drop)
}
world.playSound(null, pos, CobblemonSounds.BERRY_HARVEST, SoundCategory.BLOCKS, 0.4F, 1F)
return ActionResult.success(world.isClient)
}
return super.onUse(state, world, pos, player, hand, hit)
@@ -59,9 +59,10 @@ import net.minecraft.world.BlockView
import net.minecraft.world.World
import net.minecraft.world.WorldAccess
import net.minecraft.world.WorldView
import net.minecraft.world.explosion.Explosion
@Suppress("OVERRIDE_DEPRECATION", "DEPRECATION")
class PastureBlock(properties: Settings): BlockWithEntity(properties), Waterloggable {
class PastureBlock(properties: Settings): BlockWithEntity(properties), Waterloggable, PreEmptsExplosion {
companion object {
val PART: EnumProperty<PasturePart> = EnumProperty.of("part", PasturePart::class.java)
val ON: BooleanProperty = BooleanProperty.of("on")
@@ -194,6 +195,11 @@ class PastureBlock(properties: Settings): BlockWithEntity(properties), Waterlogg
blockEntity.onBroken()
}
override fun whenExploded(world: World?, state: BlockState, pos: BlockPos?) {
val blockEntity = world?.getBlockEntity(pos) as? PokemonPastureBlockEntity ?: return
blockEntity.onBroken()
}
override fun <T : BlockEntity?> getTicker(world: World, state: BlockState, type: BlockEntityType<T>): BlockEntityTicker<T>? {
return checkType(type, CobblemonBlockEntities.PASTURE, PokemonPastureBlockEntity.TICKER::tick)
}
@@ -0,0 +1,17 @@
/*
* 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://mozilla.org/MPL/2.0/.
*/
package com.cobblemon.mod.common.block
import net.minecraft.block.BlockState
import net.minecraft.util.math.BlockPos
import net.minecraft.world.World
interface PreEmptsExplosion {
fun whenExploded(world: World?, state: BlockState, pos: BlockPos?)
}
@@ -259,13 +259,6 @@ class PokemonPastureBlockEntity(pos: BlockPos, val state: BlockState) : BlockEnt
}
}
override fun markRemoved() {
super.markRemoved()
if(world is ServerWorld && (world as ServerWorld).getBlockState(pos).isAir) {
onBroken()
}
}
fun releasePokemon(pokemonId: UUID) {
val tethering = tetheredPokemon.find { it.pokemonId == pokemonId } ?: return
tethering.getPokemon()?.tetheringId = null
@@ -432,11 +432,11 @@ class PCGUI(
UnlinkPlayerFromPCPacket().sendToServer()
}
InputUtil.GLFW_KEY_RIGHT -> {
playSound(CobblemonSounds.GUI_CLICK)
playSound(CobblemonSounds.PC_CLICK)
this.storageWidget.box += 1
}
InputUtil.GLFW_KEY_LEFT -> {
playSound(CobblemonSounds.GUI_CLICK)
playSound(CobblemonSounds.PC_CLICK)
this.storageWidget.box -= 1
}
}
@@ -135,7 +135,7 @@ class StorageWidget(
onPress = {
if (displayConfirmRelease) {
displayConfirmRelease = false
playSound(CobblemonSounds.GUI_CLICK)
playSound(CobblemonSounds.PC_CLICK)
}
}
)
@@ -62,6 +62,8 @@ object PartySendBinding : CobblemonBlockingKeyBinding(
canApplyChange = true
val player = MinecraftClient.getInstance().player ?: return
if (player.isSpectator) return
val battle = CobblemonClient.battle
if (battle != null) {
battle.minimised = !battle.minimised
@@ -29,11 +29,11 @@ object ChangeScaleAndSize {
.then(
CommandManager.argument("scale", FloatArgumentType.floatArg())
.then(CommandManager.argument("width", FloatArgumentType.floatArg())
.then(CommandManager.argument("height", FloatArgumentType.floatArg()).executes { execute(it) })
.then(CommandManager.argument("height", FloatArgumentType.floatArg()).executes(::execute))
)
)
.executes { execute(it) })
.executes(::execute))
dispatcher.register(command)
}
@@ -10,15 +10,12 @@ package com.cobblemon.mod.common.command
import com.cobblemon.mod.common.api.permission.CobblemonPermissions
import com.cobblemon.mod.common.command.argument.PokemonArgumentType
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity
import com.cobblemon.mod.common.pokemon.FormData
import com.cobblemon.mod.common.pokemon.ai.PokemonBehaviour
import com.cobblemon.mod.common.util.permission
import com.mojang.brigadier.Command
import com.mojang.brigadier.CommandDispatcher
import com.mojang.brigadier.arguments.FloatArgumentType
import com.mojang.brigadier.context.CommandContext
import net.minecraft.entity.EntityDimensions
import net.minecraft.server.command.CommandManager
import net.minecraft.server.command.ServerCommandSource
@@ -29,10 +26,10 @@ object ChangeWalkSpeed {
.permission(CobblemonPermissions.CHANGE_WALK_SPEED)
.then(
CommandManager.argument("pokemon", PokemonArgumentType.pokemon())
.then(CommandManager.argument("walkSpeed", FloatArgumentType.floatArg()).executes { execute(it) })
.then(CommandManager.argument("walkSpeed", FloatArgumentType.floatArg()).executes(::execute))
)
.executes { execute(it) }
.executes(::execute)
dispatcher.register(command)
}
@@ -0,0 +1,41 @@
/*
* 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://mozilla.org/MPL/2.0/.
*/
package com.cobblemon.mod.common.command
import com.cobblemon.mod.common.api.permission.CobblemonPermissions
import com.cobblemon.mod.common.util.commandLang
import com.cobblemon.mod.common.util.pc
import com.cobblemon.mod.common.util.permission
import com.mojang.brigadier.Command
import com.mojang.brigadier.CommandDispatcher
import com.mojang.brigadier.context.CommandContext
import net.minecraft.command.argument.EntityArgumentType
import net.minecraft.server.command.CommandManager
import net.minecraft.server.command.ServerCommandSource
object ClearPCCommand {
private const val NAME = "clearpc"
private const val PLAYER = "player"
fun register(dispatcher : CommandDispatcher<ServerCommandSource>) {
val command = CommandManager.literal(NAME)
.permission(CobblemonPermissions.CLEAR_PC)
.then(CommandManager.argument(PLAYER, EntityArgumentType.players()).executes(::execute))
dispatcher.register(command)
}
private fun execute(context: CommandContext<ServerCommandSource>) : Int {
val target = EntityArgumentType.getPlayer(context, "player")
val pc = target.pc()
pc.toList().forEach(pc::remove)
context.source.sendFeedback({ commandLang("$NAME.cleared", target.displayName) }, true)
return Command.SINGLE_SUCCESS
}
}
@@ -18,7 +18,6 @@ import com.mojang.brigadier.context.CommandContext
import net.minecraft.command.argument.EntityArgumentType
import net.minecraft.server.command.CommandManager
import net.minecraft.server.command.ServerCommandSource
import net.minecraft.server.network.ServerPlayerEntity
object ClearPartyCommand {
@@ -28,7 +27,7 @@ object ClearPartyCommand {
fun register(dispatcher : CommandDispatcher<ServerCommandSource>) {
val command = CommandManager.literal(NAME)
.permission(CobblemonPermissions.CLEAR_PARTY)
.then( CommandManager.argument(PLAYER, EntityArgumentType.players()).executes { execute(it) }
.then( CommandManager.argument(PLAYER, EntityArgumentType.players()).executes(::execute)
)
dispatcher.register(command)
}
@@ -47,12 +46,7 @@ object ClearPartyCommand {
party.remove(pokemon)
}
if (context.source.entity != target) {
if (context.source.entity is ServerPlayerEntity) {
context.source.sendFeedback({ commandLang("$NAME.cleared", target.displayName) }, true)
return Command.SINGLE_SUCCESS
}
}
context.source.sendFeedback({ commandLang("$NAME.cleared", target.displayName) }, true)
return Command.SINGLE_SUCCESS
}
}
@@ -21,7 +21,7 @@ object ReloadShowdownCommand {
fun register(dispatcher: CommandDispatcher<ServerCommandSource>) {
val command = CommandManager.literal("reloadshowdown")
.requires { it.hasPermissionLevel(4) }
.executes { execute(it) }
.executes(::execute)
dispatcher.register(command)
}
@@ -27,7 +27,7 @@ object StopBattleCommand {
.permission(CobblemonPermissions.STOP_BATTLE)
.then(
CommandManager.argument("player", EntityArgumentType.player())
.executes { execute(it) }
.executes(::execute)
))
}
@@ -29,7 +29,7 @@ object TakePokemon {
CommandManager.argument("player", EntityArgumentType.player())
.then(
CommandManager.argument("slot", IntegerArgumentType.integer(1, 99))
.executes { execute(it) }
.executes(::execute)
)
)
@@ -46,7 +46,7 @@ object TestCommand {
fun register(dispatcher: CommandDispatcher<ServerCommandSource>) {
val command = CommandManager.literal("testcommand")
.requires { it.hasPermissionLevel(4) }
.executes { execute(it) }
.executes(::execute)
dispatcher.register(command)
}
@@ -144,7 +144,7 @@ class PokemonEntity(
var tethering: PokemonPastureBlockEntity.Tethering? = null
/**
* The amount of blocks this entity has traveled.
* The amount of steps this entity has traveled.
*/
var blocksTraveled: Double = 0.0
@@ -935,6 +935,14 @@ class PokemonEntity(
override fun canUsePortals() = false
override fun setAir(air: Int) {
if (this.isBattling) {
this.dataTracker.set(AIR, 300)
return
}
super.setAir(air)
}
override fun onStoppedTrackingBy(player: ServerPlayerEntity?) {
if (player != null) {
if(this.ownerUuid == player.uuid && tethering == null) {
@@ -28,14 +28,14 @@ object CobblemonItemGroups {
private val INJECTORS = arrayListOf<ItemGroupInjector>()
@JvmStatic val BLOCKS_KEY = this.create("blocks", this::blockEntries) { ItemStack(CobblemonItems.PC) }
@JvmStatic val TOOLS_KEY = this.create("tools", this::toolEntries) { ItemStack(CobblemonItems.POKE_BALL) }
@JvmStatic val POKEBALLS_KEY = this.create("pokeball", this::pokeballentries) { ItemStack(CobblemonItems.POKE_BALL) }
@JvmStatic val AGRICULTURE_KEY = this.create("agriculture", this::agricultureEntries) { ItemStack(CobblemonItems.MEDICINAL_LEEK) }
@JvmStatic val CONSUMABLES_KEY = this.create("consumables", this::consumableEntries) { ItemStack(CobblemonItems.ROASTED_LEEK) }
@JvmStatic val HELD_ITEMS_KEY = this.create("held_item", this::heldItemEntries) { ItemStack(CobblemonItems.EXP_SHARE) }
@JvmStatic val EVOLUTION_ITEMS_KEY = this.create("evolution_item", this::evolutionItemEntries) { ItemStack(CobblemonItems.BLACK_AUGURITE) }
@JvmStatic val BLOCKS get() = Registries.ITEM_GROUP.get(BLOCKS_KEY)
@JvmStatic val TOOLS get() = Registries.ITEM_GROUP.get(TOOLS_KEY)
@JvmStatic val POKEBALLS get() = Registries.ITEM_GROUP.get(POKEBALLS_KEY)
@JvmStatic val AGRICULTURE get() = Registries.ITEM_GROUP.get(AGRICULTURE_KEY)
@JvmStatic val CONSUMABLES get() = Registries.ITEM_GROUP.get(CONSUMABLES_KEY)
@JvmStatic val HELD_ITEMS get() = Registries.ITEM_GROUP.get(HELD_ITEMS_KEY)
@@ -356,7 +356,7 @@ object CobblemonItemGroups {
entries.add(CobblemonItems.POWER_WEIGHT)
}
private fun toolEntries(displayContext: DisplayContext, entries: Entries) {
private fun pokeballentries(displayContext: DisplayContext, entries: Entries) {
CobblemonItems.pokeBalls.forEach(entries::add)
}
@@ -1,3 +1,11 @@
/*
* 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://mozilla.org/MPL/2.0/.
*/
package com.cobblemon.mod.common.net.messages.client.pokemon.update
import com.cobblemon.mod.common.net.IntSize
@@ -1,3 +1,11 @@
/*
* 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://mozilla.org/MPL/2.0/.
*/
package com.cobblemon.mod.common.net.messages.client.pokemon.update
import com.cobblemon.mod.common.pokemon.Pokemon
@@ -1,3 +1,11 @@
/*
* 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://mozilla.org/MPL/2.0/.
*/
package com.cobblemon.mod.common.net.messages.client.pokemon.update
import com.cobblemon.mod.common.api.types.ElementalType
@@ -28,6 +28,8 @@ import net.minecraft.server.network.ServerPlayerEntity
object ChallengeHandler : ServerNetworkPacketHandler<BattleChallengePacket> {
override fun handle(packet: BattleChallengePacket, server: MinecraftServer, player: ServerPlayerEntity) {
if(player.isSpectator) return
val targetedEntity = player.world.getEntityById(packet.targetedEntityId)?.let {
if (it is PokemonEntity) {
val owner = it.owner
@@ -16,6 +16,7 @@ import net.minecraft.server.network.ServerPlayerEntity
object AcceptTradeRequestHandler : ServerNetworkPacketHandler<AcceptTradeRequestPacket> {
override fun handle(packet: AcceptTradeRequestPacket, server: MinecraftServer, player: ServerPlayerEntity) {
if(player.isSpectator) return
TradeManager.acceptTradeRequest(player, packet.tradeOfferId)
}
}
@@ -17,6 +17,8 @@ import net.minecraft.server.network.ServerPlayerEntity
object OfferTradeHandler : ServerNetworkPacketHandler<OfferTradePacket> {
override fun handle(packet: OfferTradePacket, server: MinecraftServer, player: ServerPlayerEntity) {
if(player.isSpectator) return
TradeManager.offerTrade(player, packet.offeredPlayerId.getPlayer() ?: return)
}
}
@@ -184,7 +184,7 @@ class FormData(
* To be aware of this gamestage subscribe to [PokemonSpecies.observable].
*/
val evolutions: MutableSet<Evolution>
get() = _evolutions ?: species.evolutions
get() = _evolutions ?: mutableSetOf()
fun eyeHeight(entity: PokemonEntity): Float {
val multiplier = this.resolveEyeHeight(entity) ?: return this.species.eyeHeight(entity)
@@ -522,6 +522,7 @@ open class Pokemon : ShowdownIdentifiable {
this.healTimer = -1
val entity = entity
entity?.heal(entity.maxHealth - entity.health)
this.moveSet.partialHeal()
}
/**
@@ -150,7 +150,7 @@ class Species : ClientDataSynchronizer<Species>, ShowdownIdentifiable {
this.forms.forEach(FormData::resolveEvolutionMoves)
}
fun create(level: Int = 10) = PokemonProperties.parse("${this.name} level=${level}").create()
fun create(level: Int = 10) = PokemonProperties.parse("species=\"${this.name}\" level=${level}").create()
fun getForm(aspects: Set<String>) = forms.lastOrNull { it.aspects.all { it in aspects } } ?: standardForm
@@ -51,8 +51,7 @@ class BerryGroveFeature : Feature<DefaultFeatureConfig>(DefaultFeatureConfig.COD
val randomTreeStateProvider = RandomizedIntBlockStateProvider(
defTreeState, BerryBlock.AGE,
ClampedNormalIntProvider.of(4f, 1f, 1, 5)
)
ClampedNormalIntProvider.of(4f, 1f, 3, 5))
val blockPlaceFeature = PlacedFeatures.createEntry(
SIMPLE_BLOCK,
SimpleBlockFeatureConfig(randomTreeStateProvider),
@@ -327,6 +327,7 @@
"cobblemon.command.pokespawn.invalid-move": "Invalid move name",
"cobblemon.command.clearparty.nonethere": "There are no Pokémon in %1$s's party.",
"cobblemon.command.clearparty.cleared": "Cleared %1$s's party.",
"cobblemon.command.clearpc.cleared": "Cleared %1$s's PC.",
"cobblemon.ui.generic.yes": "Yes",
"cobblemon.ui.generic.no": "No",
@@ -4819,110 +4820,215 @@
"cobblemon.species.enamorus.desc": "When it flies to this land from across the sea, the bitter winter comes to an end. According to legend, this Pokémon's love gives rise to the budding of fresh life across Hisui.",
"cobblemon.species.sprigatito.name": "Sprigatito",
"cobblemon.species.sprigatito.desc": "Its fluffy fur is similar in composition to plants. This Pokémon frequently washes its face to keep it from drying out. ",
"cobblemon.species.floragato.name": "Floragato",
"cobblemon.species.floragato.desc": "Floragato deftly wields the vine hidden beneath its long fur, slamming the hard flower bud against its opponents. ",
"cobblemon.species.meowscarada.name": "Meowscarada",
"cobblemon.species.meowscarada.desc": "This Pokémon uses the reflective fur lining in its cape to camouflage the stem of its flower, creating the illusion that the flower is floating. ",
"cobblemon.species.fuecoco.name": "Fuecoco",
"cobblemon.species.fuecoco.desc": "It lies on warm rocks and uses the heat absorbed by its square-shaped scales to create fire energy. ",
"cobblemon.species.crocalor.name": "Crocalor",
"cobblemon.species.crocalor.desc": "The combination of Crocalor’s fire energy and overflowing vitality has caused an egg-shaped fireball to appear on the Pokémon’s head. ",
"cobblemon.species.skeledirge.name": "Skeledirge",
"cobblemon.species.skeledirge.desc": "The fiery bird changes shape when Skeledirge sings. Rumor has it that the bird was born when the fireball on Skeledirge’s head gained a soul. ",
"cobblemon.species.quaxly.name": "Quaxly",
"cobblemon.species.quaxly.desc": "This Pokémon migrated to Paldea from distant lands long ago. The gel secreted by its feathers repels water and grime. ",
"cobblemon.species.quaxwell.name": "Quaxwell",
"cobblemon.species.quaxwell.desc": "These Pokémon constantly run through shallow waters to train their legs, then compete with each other to see which of them kicks most gracefully. ",
"cobblemon.species.quaquaval.name": "Quaquaval",
"cobblemon.species.quaquaval.desc": "A single kick from a Quaquaval can send a truck rolling. This Pokémon uses its powerful legs to perform striking dances from far-off lands. ",
"cobblemon.species.lechonk.name": "Lechonk",
"cobblemon.species.lechonk.desc": "It searches for food all day. It possesses a keen sense of smell but doesn’t use it for anything other than foraging. ",
"cobblemon.species.oinkologne.name": "Oinkologne",
"cobblemon.species.oinkologne.desc": "-",
"cobblemon.species.tarountula.name": "Tarountula",
"cobblemon.species.tarountula.desc": "The ball of threads wrapped around its body is elastic enough to deflect the scythes of Scyther, this Pokémon’s natural enemy. ",
"cobblemon.species.spidops.name": "Spidops",
"cobblemon.species.spidops.desc": "It clings to branches and ceilings using its threads and moves without a sound. It takes out its prey before the prey even notices it. ",
"cobblemon.species.nymble.name": "Nymble",
"cobblemon.species.nymble.desc": "It has its third set of legs folded up. When it’s in a tough spot, this Pokémon jumps over 30 feet using the strength of its legs. ",
"cobblemon.species.lokix.name": "Lokix",
"cobblemon.species.lokix.desc": "When it decides to fight all out, it stands on its previously folded legs to enter Showdown Mode. It neutralizes its enemies in short order. ",
"cobblemon.species.pawmi.name": "Pawmi",
"cobblemon.species.pawmi.desc": "It has underdeveloped electric sacs on its cheeks. These sacs can produce electricity only if Pawmi rubs them furiously with the pads on its forepaws. ",
"cobblemon.species.pawmo.name": "Pawmo",
"cobblemon.species.pawmo.desc": "When its group is attacked, Pawmo is the first to leap into battle, defeating enemies with a fighting technique that utilizes electric shocks. ",
"cobblemon.species.pawmot.name": "Pawmot",
"cobblemon.species.pawmot.desc": "This Pokémon normally is slow to react, but once it enters battle, it will strike down its enemies with lightning-fast movements. ",
"cobblemon.species.tandemaus.name": "Tandemaus",
"cobblemon.species.tandemaus.desc": "Exhibiting great teamwork, they use their incisors to cut pieces out of any material that might be useful for a nest, then make off with them. ",
"cobblemon.species.maushold.name": "Maushold",
"cobblemon.species.maushold.desc": "-",
"cobblemon.species.fidough.name": "Fidough",
"cobblemon.species.fidough.desc": "This Pokémon is smooth and moist to the touch. Yeast in Fidough’s breath induces fermentation in the Pokémon’s vicinity. ",
"cobblemon.species.dachsbun.name": "Dachsbun",
"cobblemon.species.dachsbun.desc": "The pleasant aroma that emanates from this Pokémon’s body helps wheat grow, so Dachsbun has been treasured by farming villages. ",
"cobblemon.species.smoliv.name": "Smoliv",
"cobblemon.species.smoliv.desc": "It protects itself from enemies by emitting oil from the fruit on its head. This oil is bitter and astringent enough to make someone flinch. ",
"cobblemon.species.dolliv.name": "Dolliv",
"cobblemon.species.dolliv.desc": "Dolliv shares its tasty, fresh-scented oil with others. This species has coexisted with humans since times long gone. ",
"cobblemon.species.arboliva.name": "Arboliva",
"cobblemon.species.arboliva.desc": "This calm Pokémon is very compassionate. It will share its delicious, nutrient-rich oil with weakened Pokémon. ",
"cobblemon.species.squawkabilly.name": "Squawkabilly",
"cobblemon.species.squawkabilly.desc": "-",
"cobblemon.species.nacli.name": "Nacli",
"cobblemon.species.nacli.desc": "It was born in a layer of rock salt deep under the earth. This species was particularly treasured in the old days, as they would share precious salt. ",
"cobblemon.species.naclstack.name": "Naclstack",
"cobblemon.species.naclstack.desc": "This Pokémon dry cures its prey by spraying salt over them. The curing process steals away the water in the prey’s body. ",
"cobblemon.species.garganacl.name": "Garganacl",
"cobblemon.species.garganacl.desc": "Garganacl will rub its fingertips together and sprinkle injured Pokémon with salt. Even severe wounds will promptly heal afterward. ",
"cobblemon.species.charcadet.name": "Charcadet",
"cobblemon.species.charcadet.desc": "Burnt charcoal came to life and became a Pokémon. Possessing a fiery fighting spirit, Charcadet will battle even tough opponents. ",
"cobblemon.species.armarouge.name": "Armarouge",
"cobblemon.species.armarouge.desc": "Armarouge evolved through the use of a set of armor that belonged to a distinguished warrior. This Pokémon is incredibly loyal. ",
"cobblemon.species.ceruledge.name": "Ceruledge",
"cobblemon.species.ceruledge.desc": "The fiery blades on its arms burn fiercely with the lingering resentment of a sword wielder who fell before accomplishing their goal. ",
"cobblemon.species.tadbulb.name": "Tadbulb",
"cobblemon.species.tadbulb.desc": "Tadbulb shakes its tail to generate electricity. If it senses danger, it will make its head blink on and off to alert its allies. ",
"cobblemon.species.bellibolt.name": "Bellibolt",
"cobblemon.species.bellibolt.desc": "When this Pokémon expands and contracts its wobbly body, the belly-button dynamo in its stomach produces a huge amount of electricity. ",
"cobblemon.species.wattrel.name": "Wattrel",
"cobblemon.species.wattrel.desc": "When its wings catch the wind, the bones within produce electricity. This Pokémon dives into the ocean, catching prey by electrocuting them. ",
"cobblemon.species.kilowattrel.name": "Kilowattrel",
"cobblemon.species.kilowattrel.desc": "Kilowattrel inflates its throat sac to amplify its electricity. By riding the wind, this Pokémon can fly over 430 miles in a day. ",
"cobblemon.species.maschiff.name": "Maschiff",
"cobblemon.species.maschiff.desc": "It always scowls in an attempt to make opponents take it seriously, but even crying children will burst into laughter when they see Maschiff’s face. ",
"cobblemon.species.mabosstiff.name": "Mabosstiff",
"cobblemon.species.mabosstiff.desc": "This Pokémon can store energy in its large dewlap. Mabosstiff unleashes this energy all at once to blow away enemies. ",
"cobblemon.species.shroodle.name": "Shroodle",
"cobblemon.species.shroodle.desc": "Though usually a mellow Pokémon, it will sink its sharp, poison-soaked front teeth into any that anger it, causing paralysis in the object of its ire. ",
"cobblemon.species.grafaiai.name": "Grafaiai",
"cobblemon.species.grafaiai.desc": "The color of the poisonous saliva depends on what the Pokémon eats. Grafaiai covers its fingers in its saliva and draws patterns on trees in forests. ",
"cobblemon.species.bramblin.name": "Bramblin",
"cobblemon.species.bramblin.desc": "A soul unable to move on to the afterlife was blown around by the wind until it got tangled up with dried grass and became a Pokémon. ",
"cobblemon.species.brambleghast.name": "Brambleghast",
"cobblemon.species.brambleghast.desc": "It will open the branches of its head to envelop its prey. Once it absorbs all the life energy it needs, it expels the prey and discards it. ",
"cobblemon.species.toedscool.name": "Toedscool",
"cobblemon.species.toedscool.desc": "Toedscool lives in muggy forests. The flaps that fall from its body are chewy and very delicious. ",
"cobblemon.species.toedscruel.name": "Toedscruel",
"cobblemon.species.toedscruel.desc": "These Pokémon gather into groups and form colonies deep within forests. They absolutely hate it when strangers approach. ",
"cobblemon.species.klawf.name": "Klawf",
"cobblemon.species.klawf.desc": "Klawf hangs upside-down from cliffs, waiting for prey. But Klawf can’t remain in this position for long because its blood rushes to its head. ",
"cobblemon.species.capsakid.name": "Capsakid",
"cobblemon.species.capsakid.desc": "The more sunlight this Pokémon bathes in, the more spicy chemicals are produced by its body, and thus the spicier its moves become. ",
"cobblemon.species.scovillain.name": "Scovillain",
"cobblemon.species.scovillain.desc": "The red head converts spicy chemicals into fire energy and blasts the surrounding area with a super spicy stream of flame. ",
"cobblemon.species.rellor.name": "Rellor",
"cobblemon.species.rellor.desc": "This Pokémon creates a mud ball by mixing sand and dirt with psychic energy. It treasures its mud ball more than its own life. ",
"cobblemon.species.rabsca.name": "Rabsca",
"cobblemon.species.rabsca.desc": "The body that supports the ball barely moves. Therefore, it is thought that the true body of this Pokémon is actually inside the ball. ",
"cobblemon.species.flittle.name": "Flittle",
"cobblemon.species.flittle.desc": "Flittle’s toes levitate about half an inch above the ground because of the psychic power emitted from the frills on the Pokémon’s belly. ",
"cobblemon.species.espathra.name": "Espathra",
"cobblemon.species.espathra.desc": "It immobilizes opponents by bathing them in psychic power from its large eyes. Despite its appearance, it has a vicious temperament. ",
"cobblemon.species.tinkatink.name": "Tinkatink",
"cobblemon.species.tinkatink.desc": "It swings its handmade hammer around to protect itself, but the hammer is often stolen by Pokémon that eat metal. ",
"cobblemon.species.tinkatuff.name": "Tinkatuff",
"cobblemon.species.tinkatuff.desc": "This Pokémon will attack groups of Pawniard and Bisharp, gathering metal from them in order to create a large and sturdy hammer. ",
"cobblemon.species.tinkaton.name": "Tinkaton",
"cobblemon.species.tinkaton.desc": "This intelligent Pokémon has a very daring disposition. It knocks rocks into the sky with its hammer, aiming for flying Corviknight. ",
"cobblemon.species.wiglett.name": "Wiglett",
"cobblemon.species.wiglett.desc": "This Pokémon can pick up the scent of a Veluza just over 65 feet away and will hide itself in the sand. ",
"cobblemon.species.wugtrio.name": "Wugtrio",
"cobblemon.species.wugtrio.desc": "It has a vicious temperament, contrary to what its appearance may suggest. It wraps its long bodies around prey, then drags the prey into its den. ",
"cobblemon.species.bombirdier.name": "Bombirdier",
"cobblemon.species.bombirdier.desc": "It gathers things up in an apron made from shed feathers added to the Pokémon’s chest feathers, then drops those things from high places for fun. ",
"cobblemon.species.finizen.name": "Finizen",
"cobblemon.species.finizen.desc": "It likes playing with others of its kind using the water ring on its tail. It uses ultrasonic waves to sense the emotions of other living creatures. ",
"cobblemon.species.palafin.name": "Palafin",
"cobblemon.species.palafin.desc": "-",
"cobblemon.species.varoom.name": "Varoom",
"cobblemon.species.varoom.desc": "It is said that this Pokémon was born when an unknown poison Pokémon entered and inspirited an engine left at a scrap-processing factory. ",
"cobblemon.species.revavroom.name": "Revavroom",
"cobblemon.species.revavroom.desc": "It creates a gas out of poison and minerals from rocks. It then detonates the gas in its cylinders— now numbering eight—to generate energy. ",
"cobblemon.species.cyclizar.name": "Cyclizar",
"cobblemon.species.cyclizar.desc": "Apparently Cyclizar has been allowing people to ride on its back since ancient times. Depictions of this have been found in 10,000-year-old murals. ",
"cobblemon.species.orthworm.name": "Orthworm",
"cobblemon.species.orthworm.desc": "When attacked, this Pokémon will wield the tendrils on its body like fists and pelt the opponent with a storm of punches. ",
"cobblemon.species.glimmet.name": "Glimmet",
"cobblemon.species.glimmet.desc": "It absorbs nutrients from cave walls. The petals it wears are made of crystallized poison. ",
"cobblemon.species.glimmora.name": "Glimmora",
"cobblemon.species.glimmora.desc": "When this Pokémon detects danger, it will open up its crystalline petals and fire beams from its conical body. ",
"cobblemon.species.greavard.name": "Greavard",
"cobblemon.species.greavard.desc": "It is said that a dog Pokémon that died in the wild without ever interacting with a human was reborn as this Pokémon. ",
"cobblemon.species.houndstone.name": "Houndstone",
"cobblemon.species.houndstone.desc": "Houndstone spends most of its time sleeping in graveyards. Among all the dog Pokémon, this one is most loyal to its master. ",
"cobblemon.species.flamigo.name": "Flamigo",
"cobblemon.species.flamigo.desc": "This Pokémon apparently ties the base of its neck into a knot so that the energy stored in its belly does not escape from its beak. ",
"cobblemon.species.cetoddle.name": "Cetoddle",
"cobblemon.species.cetoddle.desc": "This species left the ocean and began living on land a very long time ago. It seems to be closely related to Wailmer. ",
"cobblemon.species.cetitan.name": "Cetitan",
"cobblemon.species.cetitan.desc": "This Pokémon wanders around snowy, icy areas. It protects its body with powerful muscles and a thick layer of fat under its skin. ",
"cobblemon.species.veluza.name": "Veluza",
"cobblemon.species.veluza.desc": "When Veluza discards unnecessary flesh, its mind becomes honed and its psychic power increases. The spare flesh has a mild but delicious flavor. ",
"cobblemon.species.dondozo.name": "Dondozo",
"cobblemon.species.dondozo.desc": "This Pokémon is a glutton, but it’s bad at getting food. It teams up with a Tatsugiri to catch prey. ",
"cobblemon.species.tatsugiri.name": "Tatsugiri",
"cobblemon.species.tatsugiri.desc": "-",
"cobblemon.species.annihilape.name": "Annihilape",
"cobblemon.species.annihilape.desc": "When its anger rose beyond a critical point, this Pokémon gained power that is unfettered by the limits of its physical body. ",
"cobblemon.species.clodsire.name": "Clodsire",
"cobblemon.species.clodsire.desc": "When attacked, this Pokémon will retaliate by sticking thick spines out from its body. It’s a risky move that puts everything on the line. ",
"cobblemon.species.farigiraf.name": "Farigiraf",
"cobblemon.species.farigiraf.desc": "Now that the brain waves from the head and tail are synced up, the psychic power of this Pokémon is 10 times stronger than Girafarig’s. ",
"cobblemon.species.dudunsparce.name": "Dudunsparce",
"cobblemon.species.dudunsparce.desc": "-",
"cobblemon.species.kingambit.name": "Kingambit",
"cobblemon.species.kingambit.desc": "Only a Bisharp that stands above all others in its vast army can evolve into Kingambit. ",
"cobblemon.species.greattusk.name": "Great Tusk",
"cobblemon.species.greattusk.desc": "Sightings of this Pokémon have occurred in recent years. The name Great Tusk was taken from a creature listed in a certain book. ",
"cobblemon.species.screamtail.name": "Scream Tail",
"cobblemon.species.screamtail.desc": "There has been only one reported sighting of this Pokémon. It resembles a mysterious creature depicted in an old expedition journal. ",
"cobblemon.species.brutebonnet.name": "Brute Bonnet",
"cobblemon.species.brutebonnet.desc": "It is possible that the creature listed as Brute Bonnet in a certain book could actually be this Pokémon. ",
"cobblemon.species.fluttermane.name": "Flutter Mane",
"cobblemon.species.fluttermane.desc": "This Pokémon has characteristics similar to those of Flutter Mane, a creature mentioned in a certain book. ",
"cobblemon.species.slitherwing.name": "Slither Wing",
"cobblemon.species.slitherwing.desc": "This mysterious Pokémon has some similarities to a creature that an old book introduced as Slither Wing. ",
"cobblemon.species.sandyshocks.name": "Sandy Shocks",
"cobblemon.species.sandyshocks.desc": "No records exist of this Pokémon being caught. Data is lacking, but the Pokémon’s traits match up with a creature shown in an expedition journal. ",
"cobblemon.species.irontreads.name": "Iron Treads",
"cobblemon.species.irontreads.desc": "This Pokémon closely resembles a scientific weapon that a paranormal magazine claimed was sent to this planet by aliens. ",
"cobblemon.species.ironbundle.name": "Iron Bundle",
"cobblemon.species.ironbundle.desc": "Its shape is similar to a robot featured in a paranormal magazine article. The robot was said to have been created by an ancient civilization. ",
"cobblemon.species.ironhands.name": "Iron Hands",
"cobblemon.species.ironhands.desc": "It is very similar to a cyborg covered exclusively by a paranormal magazine. The cyborg was said to be the modified form of a certain athlete. ",
"cobblemon.species.ironjugulis.name": "Iron Jugulis",
"cobblemon.species.ironjugulis.desc": "It resembles a certain Pokémon introduced in a paranormal magazine, described as the offspring of a Hydreigon that fell in love with a robot. ",
"cobblemon.species.ironmoth.name": "Iron Moth",
"cobblemon.species.ironmoth.desc": "This Pokémon resembles an unknown object described in a paranormal magazine as a UFO sent to observe humanity. ",
"cobblemon.species.ironthorns.name": "Iron Thorns",
"cobblemon.species.ironthorns.desc": "It has some similarities to a Pokémon introduced in a dubious magazine as a Tyranitar from one billion years into the future. ",
"cobblemon.species.frigibax.name": "Frigibax",
"cobblemon.species.frigibax.desc": "Frigibax absorbs heat through its dorsal fin and converts the heat into ice energy. The higher the temperature, the more energy Frigibax stores. ",
"cobblemon.species.arctibax.name": "Arctibax",
"cobblemon.species.arctibax.desc": "Arctibax freezes the air around it, protecting its face with an ice mask and turning its dorsal fin into a blade of ice. ",
"cobblemon.species.baxcalibur.name": "Baxcalibur",
"cobblemon.species.baxcalibur.desc": "This Pokémon blasts cryogenic air out from its mouth. This air can instantly freeze even liquid-hot lava. ",
"cobblemon.species.gimmighoul.name": "Gimmighoul",
"cobblemon.species.gimmighoul.desc": "-",
"cobblemon.species.gholdengo.name": "Gholdengo",
"cobblemon.species.gholdengo.desc": "Its body seems to be made up of 1,000 coins. This Pokémon gets along well with others and is quick to make friends with anybody. ",
"cobblemon.species.wochien.name": "Wo-Chien",
"cobblemon.species.wochien.desc": "The grudge of a person punished for writing the king’s evil deeds upon wooden tablets has clad itself in dead leaves to become a Pokémon. ",
"cobblemon.species.chienpao.name": "Chien-Pao",
"cobblemon.species.chienpao.desc": "This Pokémon can control 100 tons of fallen snow. It plays around innocently by leaping in and out of avalanches it has caused. ",
"cobblemon.species.tinglu.name": "Ting-Lu",
"cobblemon.species.tinglu.desc": "The fear poured into an ancient ritual vessel has clad itself in rocks and dirt to become a Pokémon. ",
"cobblemon.species.chiyu.name": "Chi-Yu",
"cobblemon.species.chiyu.desc": "It controls flames burning at over 5,400 degrees Fahrenheit. It casually swims through the sea of lava it creates by melting rock and sand. ",
"cobblemon.species.roaringmoon.name": "Roaring Moon",
"cobblemon.species.roaringmoon.desc": "It is possible that this is the creature listed as Roaring Moon in an expedition journal that still holds many mysteries. ",
"cobblemon.species.ironvaliant.name": "Iron Valiant",
"cobblemon.species.ironvaliant.desc": "It has some similarities to a mad scientist’s invention covered in a paranormal magazine. ",
"cobblemon.species.koraidon.name": "Koraidon",
"cobblemon.species.koraidon.desc": "-",
"cobblemon.species.miraidon.name": "Miraidon",
"cobblemon.species.miraidon.desc": "-",
"cobblemon.species.walkingwake.name": "Walking Wake",
"cobblemon.species.walkingwake.desc": "Ecology under research.",
"cobblemon.species.ironleaves.name": "Iron Leaves",
"cobblemon.species.ironleaves.desc": "Ecology under analysis.",
"cobblemon.ability.adaptability": "Adaptability",
"cobblemon.ability.adaptability.desc": "Powers up moves of the same type as the Pokémon.",
@@ -12,10 +12,10 @@
"sounds": [ "cobblemon:block/healing_machine_active" ]
},
"mulch.place": {
"sounds": [ "cobblemon:mulch_place" ]
"sounds": [ "cobblemon:block/mulch_place_1", "cobblemon:block/mulch_place_2", "cobblemon:block/mulch_place_3" ]
},
"mulch.remove": {
"sounds": [ "cobblemon:mulch_remove" ]
"sounds": [ "cobblemon:block/mulch_remove_1", "cobblemon:block/mulch_remove_2", "cobblemon:block/mulch_remove_3" ]
},
"pc.on": {
"sounds": [ "cobblemon:pc/pc_on" ]
@@ -81,6 +81,9 @@
"medicine_spray.use": {
"sounds": [ "cobblemon:medicine_spray_use" ]
},
"berry.harvest": {
"sounds": [ "cobblemon:block/berry_harvest_1", "cobblemon:block/berry_harvest_2", "cobblemon:block/berry_harvest_3" ]
},
"berry.eat": {
"sounds": [ "cobblemon:berry_eat" ]
},
@@ -8,6 +8,7 @@ accessWidener v2 named
# "transitive-" to ensure they will extend down to dev environments.
transitive-accessible method net/minecraft/client/render/entity/LivingEntityRenderer addFeature (Lnet/minecraft/client/render/entity/feature/FeatureRenderer;)Z
transitive-accessible field net/minecraft/entity/Entity AIR Lnet/minecraft/entity/data/TrackedData;
transitive-accessible method net/minecraft/entity/player/PlayerEntity setShoulderEntityLeft (Lnet/minecraft/nbt/NbtCompound;)V
transitive-accessible method net/minecraft/entity/player/PlayerEntity setShoulderEntityRight (Lnet/minecraft/nbt/NbtCompound;)V
transitive-accessible method net/minecraft/entity/player/PlayerEntity dropShoulderEntity (Lnet/minecraft/nbt/NbtCompound;)V
@@ -1721,7 +1721,22 @@
}
]
},
{ "name": "Default" }
{
"name": "Default",
"evolutions": [
{
"id": "pikachu_raichu",
"variant": "item_interact",
"result": "raichu",
"consumeHeldItem": false,
"learnableMoves": [
"thunderpunch"
],
"requirements": [],
"requiredContext": "cobblemon:thunder_stone"
}
]
}
],
"baseExperienceYield": 112,
"experienceGroup": "medium_fast",
@@ -1922,19 +1937,7 @@
"cobblemon.species.pikachu.desc"
],
"preEvolution": "pichu",
"evolutions": [
{
"id": "pikachu_raichu",
"variant": "item_interact",
"result": "raichu",
"consumeHeldItem": false,
"learnableMoves": [
"thunderpunch"
],
"requirements": [],
"requiredContext": "cobblemon:thunder_stone"
}
],
"evolutions": [],
"baseScale": 0.5,
"hitbox": {
"width": 0.7,
@@ -128,19 +128,6 @@
"minLevel": 20
}
]
},
{
"id": "nincada_shedinja",
"variant": "level_up",
"result": "shedinja",
"consumeHeldItem": false,
"learnableMoves": [],
"requirements": [
{
"variant": "level",
"minLevel": 20
}
]
}
],
"baseScale": 0.45,
@@ -0,0 +1,19 @@
{
"values": [
"minecraft:air",
"minecraft:grass",
"minecraft:fern",
"minecraft:dead_bush",
"minecraft:fire",
"minecraft:soul_fire",
"minecraft:snow",
"minecraft:vine",
"minecraft:glow_lichen",
"minecraft:light",
"minecraft:tall_grass",
"minecraft:large_fern",
"minecraft:structure_void",
"minecraft:void_air",
"minecraft:cave_air"
]
}
@@ -25,6 +25,15 @@
"predicate": {
"type": "minecraft:all_of",
"predicates": [
{
"type": "minecraft:matching_fluids",
"offset": [
0,
-1,
0
],
"fluids": "#minecraft:water"
},
{
"type": "minecraft:matching_blocks",
"blocks": "minecraft:air"
@@ -3,7 +3,7 @@
"placement": [
{
"type": "minecraft:rarity_filter",
"chance": 80
"chance": 6
},
{
"type": "minecraft:in_square"
@@ -18,8 +18,23 @@
"xzRange": 8,
"yRange": 1,
"predicate": {
"type": "minecraft:matching_block_tag",
"tag": "cobblemon:berry_wild_soil"
"type": "minecraft:all_of",
"predicates": [
{
"type": "minecraft:any_of",
"predicates": [
{
"type": "minecraft:matching_block_tag",
"tag": "cobblemon:berry_wild_soil"
}
]
},
{
"type": "minecraft:matching_block_tag",
"offset": [0, 1, 0],
"tag": "minecraft:replaceable"
}
]
}
}
]
@@ -18,6 +18,7 @@
"pokeball.ItemRendererMixin"
],
"mixins": [
"ExplosionMixin",
"FenceBlockMixin",
"LivingEntityMixin",
"MinecraftDedicatedServerMixin",
@@ -168,7 +168,7 @@ class CobblemonForge : CobblemonImplementation {
CobblemonPlacementModifierTypes.touch()
}
event.register(RegistryKeys.PROCESSOR_LIST) {
event.register(RegistryKeys.STRUCTURE_PROCESSOR) {
CobblemonProcessorTypes.touch()
}
}