From 5e5cb4e388abd54bbf9c7cec7801cd0a3c6e089b Mon Sep 17 00:00:00 2001 From: miasmus <15349355-miasmusa@users.noreply.gitlab.com> Date: Thu, 7 Sep 2023 17:52:22 -0400 Subject: [PATCH 01/11] no more pokemon waterboarding (fixes #385) --- .../mod/common/entity/pokemon/PokemonEntity.kt | 12 +++++++++++- .../main/resources/cobblemon-common.accesswidener | 1 + 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/common/src/main/kotlin/com/cobblemon/mod/common/entity/pokemon/PokemonEntity.kt b/common/src/main/kotlin/com/cobblemon/mod/common/entity/pokemon/PokemonEntity.kt index f8f80024b1..18750ffa51 100644 --- a/common/src/main/kotlin/com/cobblemon/mod/common/entity/pokemon/PokemonEntity.kt +++ b/common/src/main/kotlin/com/cobblemon/mod/common/entity/pokemon/PokemonEntity.kt @@ -946,4 +946,14 @@ class PokemonEntity( } override fun canUsePortals() = false -} + + override fun setAir(air: Int) { + if (this.isBattling) { + this.dataTracker.set(AIR, 300) + return + } + super.setAir(air) + } + + +} \ No newline at end of file diff --git a/common/src/main/resources/cobblemon-common.accesswidener b/common/src/main/resources/cobblemon-common.accesswidener index 7c5aceb129..6fd4575b03 100644 --- a/common/src/main/resources/cobblemon-common.accesswidener +++ b/common/src/main/resources/cobblemon-common.accesswidener @@ -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 From 7e583d631928810a1126f30740402eba6894914c Mon Sep 17 00:00:00 2001 From: miasmus <15349355-miasmusa@users.noreply.gitlab.com> Date: Thu, 7 Sep 2023 19:49:00 -0400 Subject: [PATCH 02/11] fix itemgroup, add descriptions for 96 pokemon, fixes #455 --- .../common/item/group/CobblemonItemGroups.kt | 6 +- .../assets/cobblemon/lang/en_us.json | 105 ++++++++++++++++++ 2 files changed, 108 insertions(+), 3 deletions(-) diff --git a/common/src/main/kotlin/com/cobblemon/mod/common/item/group/CobblemonItemGroups.kt b/common/src/main/kotlin/com/cobblemon/mod/common/item/group/CobblemonItemGroups.kt index 4847769fea..9f48289a1e 100644 --- a/common/src/main/kotlin/com/cobblemon/mod/common/item/group/CobblemonItemGroups.kt +++ b/common/src/main/kotlin/com/cobblemon/mod/common/item/group/CobblemonItemGroups.kt @@ -28,14 +28,14 @@ object CobblemonItemGroups { private val INJECTORS = arrayListOf() @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) } diff --git a/common/src/main/resources/assets/cobblemon/lang/en_us.json b/common/src/main/resources/assets/cobblemon/lang/en_us.json index 14b4ff2d2f..5a469ad8b9 100644 --- a/common/src/main/resources/assets/cobblemon/lang/en_us.json +++ b/common/src/main/resources/assets/cobblemon/lang/en_us.json @@ -4700,110 +4700,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.", From e57c9487ca70425062503bb365b7e104d6628c44 Mon Sep 17 00:00:00 2001 From: Lily Date: Thu, 7 Sep 2023 20:13:36 -0400 Subject: [PATCH 03/11] prevent berry groves from replacing water blocks --- .../tags/blocks/berry_replaceable.json | 19 +++++++++++++++++++ .../worldgen/placed_feature/berry_groves.json | 2 +- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 common/src/main/resources/data/cobblemon/tags/blocks/berry_replaceable.json diff --git a/common/src/main/resources/data/cobblemon/tags/blocks/berry_replaceable.json b/common/src/main/resources/data/cobblemon/tags/blocks/berry_replaceable.json new file mode 100644 index 0000000000..232b46b7d8 --- /dev/null +++ b/common/src/main/resources/data/cobblemon/tags/blocks/berry_replaceable.json @@ -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" + ] +} \ No newline at end of file diff --git a/common/src/main/resources/data/cobblemon/worldgen/placed_feature/berry_groves.json b/common/src/main/resources/data/cobblemon/worldgen/placed_feature/berry_groves.json index 380024ca86..8afd03ad18 100644 --- a/common/src/main/resources/data/cobblemon/worldgen/placed_feature/berry_groves.json +++ b/common/src/main/resources/data/cobblemon/worldgen/placed_feature/berry_groves.json @@ -36,7 +36,7 @@ { "type": "minecraft:matching_block_tag", "offset": [0, 1, 0], - "tag": "minecraft:replaceable" + "tag": "cobblemon:berry_replaceable" } ] } From 4c03891f19dcb37a85c9ee14e7790ad605278991 Mon Sep 17 00:00:00 2001 From: Lily Date: Thu, 7 Sep 2023 21:16:13 -0400 Subject: [PATCH 04/11] berry grove trees now only spawn at age 3 or higher ( Closes #445 ) --- .../com/cobblemon/mod/common/world/feature/BerryGroveFeature.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/main/kotlin/com/cobblemon/mod/common/world/feature/BerryGroveFeature.kt b/common/src/main/kotlin/com/cobblemon/mod/common/world/feature/BerryGroveFeature.kt index aaace99416..1a93967e48 100644 --- a/common/src/main/kotlin/com/cobblemon/mod/common/world/feature/BerryGroveFeature.kt +++ b/common/src/main/kotlin/com/cobblemon/mod/common/world/feature/BerryGroveFeature.kt @@ -50,7 +50,7 @@ class BerryGroveFeature : Feature(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( From 0fc9d2988442059ca470242878fa1d263a62b9fd Mon Sep 17 00:00:00 2001 From: miasmus <15349355-miasmusa@users.noreply.gitlab.com> Date: Sat, 9 Sep 2023 17:13:40 -0400 Subject: [PATCH 05/11] fix leeks generating on ice --- .../configured_feature/medicinal_leek.json | 24 +-------------- .../placed_feature/medicinal_leek.json | 30 +++++++++++++++++++ 2 files changed, 31 insertions(+), 23 deletions(-) diff --git a/common/src/main/resources/data/cobblemon/worldgen/configured_feature/medicinal_leek.json b/common/src/main/resources/data/cobblemon/worldgen/configured_feature/medicinal_leek.json index 496d350f9a..614c8a4643 100644 --- a/common/src/main/resources/data/cobblemon/worldgen/configured_feature/medicinal_leek.json +++ b/common/src/main/resources/data/cobblemon/worldgen/configured_feature/medicinal_leek.json @@ -19,29 +19,7 @@ } } }, - "placement": [ - { - "type": "minecraft:block_predicate_filter", - "predicate": { - "type": "minecraft:all_of", - "predicates": [ - { - "type": "minecraft:matching_blocks", - "blocks": "minecraft:air" - }, - { - "type": "minecraft:would_survive", - "state": { - "Name": "cobblemon:medicinal_leek", - "Properties": { - "age": "0" - } - } - } - ] - } - } - ] + "placement": [] } } } diff --git a/common/src/main/resources/data/cobblemon/worldgen/placed_feature/medicinal_leek.json b/common/src/main/resources/data/cobblemon/worldgen/placed_feature/medicinal_leek.json index eeafc2fc0a..789f1f0f63 100644 --- a/common/src/main/resources/data/cobblemon/worldgen/placed_feature/medicinal_leek.json +++ b/common/src/main/resources/data/cobblemon/worldgen/placed_feature/medicinal_leek.json @@ -15,6 +15,36 @@ { "type": "minecraft:heightmap", "heightmap": "OCEAN_FLOOR" + }, + { + "type": "minecraft:block_predicate_filter", + "predicate": { + "type": "minecraft:all_of", + "predicates": [ + { + "type": "minecraft:matching_fluids", + "offset": [ + 0, + -1, + 0 + ], + "fluids": "#minecraft:water" + }, + { + "type": "minecraft:matching_blocks", + "blocks": "minecraft:air" + }, + { + "type": "minecraft:would_survive", + "state": { + "Name": "cobblemon:medicinal_leek", + "Properties": { + "age": "0" + } + } + } + ] + } } ] } From d9a99ad65b3bd36f96743335e373eb68fb3cb269 Mon Sep 17 00:00:00 2001 From: miasmus <15349355-miasmusa@users.noreply.gitlab.com> Date: Sat, 9 Sep 2023 17:04:09 -0400 Subject: [PATCH 06/11] Fix players being able to battle/trade in spectator mode --- .../mod/common/client/keybind/keybinds/PartySendBinding.kt | 2 ++ .../cobblemon/mod/common/net/serverhandling/ChallengeHandler.kt | 2 ++ .../net/serverhandling/trade/AcceptTradeRequestHandler.kt | 1 + .../mod/common/net/serverhandling/trade/OfferTradeHandler.kt | 2 ++ 4 files changed, 7 insertions(+) diff --git a/common/src/main/kotlin/com/cobblemon/mod/common/client/keybind/keybinds/PartySendBinding.kt b/common/src/main/kotlin/com/cobblemon/mod/common/client/keybind/keybinds/PartySendBinding.kt index 042aa36455..6dbb70c24f 100644 --- a/common/src/main/kotlin/com/cobblemon/mod/common/client/keybind/keybinds/PartySendBinding.kt +++ b/common/src/main/kotlin/com/cobblemon/mod/common/client/keybind/keybinds/PartySendBinding.kt @@ -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 diff --git a/common/src/main/kotlin/com/cobblemon/mod/common/net/serverhandling/ChallengeHandler.kt b/common/src/main/kotlin/com/cobblemon/mod/common/net/serverhandling/ChallengeHandler.kt index f44f8fa832..283594f790 100644 --- a/common/src/main/kotlin/com/cobblemon/mod/common/net/serverhandling/ChallengeHandler.kt +++ b/common/src/main/kotlin/com/cobblemon/mod/common/net/serverhandling/ChallengeHandler.kt @@ -28,6 +28,8 @@ import net.minecraft.server.network.ServerPlayerEntity object ChallengeHandler : ServerNetworkPacketHandler { 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 diff --git a/common/src/main/kotlin/com/cobblemon/mod/common/net/serverhandling/trade/AcceptTradeRequestHandler.kt b/common/src/main/kotlin/com/cobblemon/mod/common/net/serverhandling/trade/AcceptTradeRequestHandler.kt index f4e804f8b7..0429595631 100644 --- a/common/src/main/kotlin/com/cobblemon/mod/common/net/serverhandling/trade/AcceptTradeRequestHandler.kt +++ b/common/src/main/kotlin/com/cobblemon/mod/common/net/serverhandling/trade/AcceptTradeRequestHandler.kt @@ -16,6 +16,7 @@ import net.minecraft.server.network.ServerPlayerEntity object AcceptTradeRequestHandler : ServerNetworkPacketHandler { override fun handle(packet: AcceptTradeRequestPacket, server: MinecraftServer, player: ServerPlayerEntity) { + if(player.isSpectator) return TradeManager.acceptTradeRequest(player, packet.tradeOfferId) } } \ No newline at end of file diff --git a/common/src/main/kotlin/com/cobblemon/mod/common/net/serverhandling/trade/OfferTradeHandler.kt b/common/src/main/kotlin/com/cobblemon/mod/common/net/serverhandling/trade/OfferTradeHandler.kt index 336b0f9b4a..7c8d3bd5a3 100644 --- a/common/src/main/kotlin/com/cobblemon/mod/common/net/serverhandling/trade/OfferTradeHandler.kt +++ b/common/src/main/kotlin/com/cobblemon/mod/common/net/serverhandling/trade/OfferTradeHandler.kt @@ -17,6 +17,8 @@ import net.minecraft.server.network.ServerPlayerEntity object OfferTradeHandler : ServerNetworkPacketHandler { override fun handle(packet: OfferTradePacket, server: MinecraftServer, player: ServerPlayerEntity) { + if(player.isSpectator) return + TradeManager.offerTrade(player, packet.offeredPlayerId.getPlayer() ?: return) } } \ No newline at end of file From 03b29ce468e8ded61a589add7e6e5dce1317b826 Mon Sep 17 00:00:00 2001 From: miasmus <15349355-miasmusa@users.noreply.gitlab.com> Date: Sat, 9 Sep 2023 18:18:53 -0400 Subject: [PATCH 07/11] fix leeks, for real this time (fixes #456) --- .../configured_feature/medicinal_leek.json | 33 ++++++++++++++++++- .../placed_feature/medicinal_leek.json | 30 ----------------- 2 files changed, 32 insertions(+), 31 deletions(-) diff --git a/common/src/main/resources/data/cobblemon/worldgen/configured_feature/medicinal_leek.json b/common/src/main/resources/data/cobblemon/worldgen/configured_feature/medicinal_leek.json index 614c8a4643..517eabd9c3 100644 --- a/common/src/main/resources/data/cobblemon/worldgen/configured_feature/medicinal_leek.json +++ b/common/src/main/resources/data/cobblemon/worldgen/configured_feature/medicinal_leek.json @@ -19,7 +19,38 @@ } } }, - "placement": [] + "placement": [ + { + "type": "minecraft:block_predicate_filter", + "predicate": { + "type": "minecraft:all_of", + "predicates": [ + { + "type": "minecraft:matching_fluids", + "offset": [ + 0, + -1, + 0 + ], + "fluids": "#minecraft:water" + }, + { + "type": "minecraft:matching_blocks", + "blocks": "minecraft:air" + }, + { + "type": "minecraft:would_survive", + "state": { + "Name": "cobblemon:medicinal_leek", + "Properties": { + "age": "0" + } + } + } + ] + } + } + ] } } } diff --git a/common/src/main/resources/data/cobblemon/worldgen/placed_feature/medicinal_leek.json b/common/src/main/resources/data/cobblemon/worldgen/placed_feature/medicinal_leek.json index 789f1f0f63..eeafc2fc0a 100644 --- a/common/src/main/resources/data/cobblemon/worldgen/placed_feature/medicinal_leek.json +++ b/common/src/main/resources/data/cobblemon/worldgen/placed_feature/medicinal_leek.json @@ -15,36 +15,6 @@ { "type": "minecraft:heightmap", "heightmap": "OCEAN_FLOOR" - }, - { - "type": "minecraft:block_predicate_filter", - "predicate": { - "type": "minecraft:all_of", - "predicates": [ - { - "type": "minecraft:matching_fluids", - "offset": [ - 0, - -1, - 0 - ], - "fluids": "#minecraft:water" - }, - { - "type": "minecraft:matching_blocks", - "blocks": "minecraft:air" - }, - { - "type": "minecraft:would_survive", - "state": { - "Name": "cobblemon:medicinal_leek", - "Properties": { - "age": "0" - } - } - } - ] - } } ] } From 6200e3a693b790fdec05ce43da2f7c518f17b61b Mon Sep 17 00:00:00 2001 From: miasmus <15349355-miasmusa@users.noreply.gitlab.com> Date: Sat, 9 Sep 2023 19:35:12 -0400 Subject: [PATCH 08/11] update changelog --- CHANGELOG.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ecf55f06be..e9f3575ddd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -281,6 +281,7 @@ - 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. ### Fixes - Fixed spawning moon phase dependent Pokémon only when the moon phase is wrong @@ -317,13 +318,14 @@ - 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. ### 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. From 0436b3687236598d936f48a50a6ba31404168756 Mon Sep 17 00:00:00 2001 From: miasmus <15349355-miasmusa@users.noreply.gitlab.com> Date: Sun, 10 Sep 2023 11:58:42 -0400 Subject: [PATCH 09/11] partially heal PP when sleeping (fixes #463) --- CHANGELOG.md | 1 + .../kotlin/com/cobblemon/mod/common/api/moves/MoveSet.kt | 7 +++++++ .../kotlin/com/cobblemon/mod/common/pokemon/Pokemon.kt | 1 + 3 files changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e9f3575ddd..60f27a6e9d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -282,6 +282,7 @@ - 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 ### Fixes - Fixed spawning moon phase dependent Pokémon only when the moon phase is wrong diff --git a/common/src/main/kotlin/com/cobblemon/mod/common/api/moves/MoveSet.kt b/common/src/main/kotlin/com/cobblemon/mod/common/api/moves/MoveSet.kt index d66587105e..5ca4295e4c 100644 --- a/common/src/main/kotlin/com/cobblemon/mod/common/api/moves/MoveSet.kt +++ b/common/src/main/kotlin/com/cobblemon/mod/common/api/moves/MoveSet.kt @@ -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 { val observable = SimpleObservable() private var emit = true @@ -63,6 +65,11 @@ class MoveSet : Iterable { 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){ diff --git a/common/src/main/kotlin/com/cobblemon/mod/common/pokemon/Pokemon.kt b/common/src/main/kotlin/com/cobblemon/mod/common/pokemon/Pokemon.kt index 6f248578c0..bceeff573d 100644 --- a/common/src/main/kotlin/com/cobblemon/mod/common/pokemon/Pokemon.kt +++ b/common/src/main/kotlin/com/cobblemon/mod/common/pokemon/Pokemon.kt @@ -494,6 +494,7 @@ open class Pokemon : ShowdownIdentifiable { this.healTimer = -1 val entity = entity entity?.heal(entity.maxHealth - entity.health) + this.moveSet.partialHeal() } /** From 944fdf7c0c00f1e4aa93ed86e58f916fa2f87d85 Mon Sep 17 00:00:00 2001 From: miasmus <15349355-miasmusa@users.noreply.gitlab.com> Date: Mon, 11 Sep 2023 17:06:33 -0400 Subject: [PATCH 10/11] no one told me to test before pushing to main --- .../com/cobblemon/mod/common/entity/pokemon/PokemonEntity.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/src/main/kotlin/com/cobblemon/mod/common/entity/pokemon/PokemonEntity.kt b/common/src/main/kotlin/com/cobblemon/mod/common/entity/pokemon/PokemonEntity.kt index 5dbc960e76..5db64ae2e3 100644 --- a/common/src/main/kotlin/com/cobblemon/mod/common/entity/pokemon/PokemonEntity.kt +++ b/common/src/main/kotlin/com/cobblemon/mod/common/entity/pokemon/PokemonEntity.kt @@ -144,9 +144,9 @@ class PokemonEntity( var tethering: PokemonPastureBlockEntity.Tethering? = null /** - * The amount of steps this entity has taken. + * The amount of steps this entity has traveled. */ - var steps: Int = 0 + var blocksTraveled: Double = 0.0 val entityProperties = mutableListOf>() From 557dda4c1d9cd68efcdfa7f65b305aed0f1d1754 Mon Sep 17 00:00:00 2001 From: miasmus <15349355-miasmusa@users.noreply.gitlab.com> Date: Mon, 11 Sep 2023 22:03:25 -0400 Subject: [PATCH 11/11] holy crap im so smrat (fixes harvesting berries with bonemeal in hand not playing interact anim) --- .../main/kotlin/com/cobblemon/mod/common/block/BerryBlock.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/main/kotlin/com/cobblemon/mod/common/block/BerryBlock.kt b/common/src/main/kotlin/com/cobblemon/mod/common/block/BerryBlock.kt index ece936ce5d..a08e872787 100644 --- a/common/src/main/kotlin/com/cobblemon/mod/common/block/BerryBlock.kt +++ b/common/src/main/kotlin/com/cobblemon/mod/common/block/BerryBlock.kt @@ -157,7 +157,7 @@ class BerryBlock(private val berryIdentifier: Identifier, settings: Settings) : 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