Compare commits
307
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6d67256632 | ||
|
|
be0753109c | ||
|
|
0ee36b705e | ||
|
|
396a827b37 | ||
|
|
b146892b50 | ||
|
|
0f41194d22 | ||
|
|
5797838711 | ||
|
|
36b1e926a9 | ||
|
|
b80b27e8f9 | ||
|
|
755ca9d261 | ||
|
|
24f64da512 | ||
|
|
b11f553af0 | ||
|
|
bce33acbc5 | ||
|
|
a42b88f22f | ||
|
|
fe7d3a51f9 | ||
|
|
c260594865 | ||
|
|
89a25ab03e | ||
|
|
b97589c934 | ||
|
|
b3ffcdd039 | ||
|
|
51e81d207e | ||
|
|
50a3aa6a4f | ||
|
|
f84cb41f28 | ||
|
|
6c95b3e50c | ||
|
|
60667794a7 | ||
|
|
f39f2c3e4a | ||
|
|
d104342df1 | ||
|
|
1d9f540198 | ||
|
|
ec34f51ead | ||
|
|
fa284636ed | ||
|
|
306ac74cd8 | ||
|
|
ff65613ffd | ||
|
|
1b41cc04eb | ||
|
|
45e7d8fe81 | ||
|
|
e048e8a58d | ||
|
|
3656513255 | ||
|
|
2734f1d00c | ||
|
|
2ff406453f | ||
|
|
29a9d3caba | ||
|
|
f6ae1b8a69 | ||
|
|
b2b4c934a2 | ||
|
|
b1815bc0cd | ||
|
|
8c431f2af5 | ||
|
|
04bcb0d41e | ||
|
|
d1e119ac9b | ||
|
|
7db059d4ba | ||
|
|
a930a71a3a | ||
|
|
87f0c6cf7a | ||
|
|
54037fc499 | ||
|
|
e2f6c02ad9 | ||
|
|
1fc24a5ee3 | ||
|
|
e66069b270 | ||
|
|
a661575451 | ||
|
|
a23017cd1f | ||
|
|
0df19ce18a | ||
|
|
5a751546ec | ||
|
|
ee9e1cabc1 | ||
|
|
d78b46155f | ||
|
|
1afd61d517 | ||
|
|
97a5083ff5 | ||
|
|
0d31e74790 | ||
|
|
02214196f4 | ||
|
|
aae268cfc5 | ||
|
|
20f37d8799 | ||
|
|
0b825bcda3 | ||
|
|
aba3bd22c7 | ||
|
|
b1fc33f5a1 | ||
|
|
f2033f5e33 | ||
|
|
6c600b7bdb | ||
|
|
e93bfb7f0f | ||
|
|
8976909742 | ||
|
|
30a9c2f53e | ||
|
|
5a5a9113e9 | ||
|
|
ea60790865 | ||
|
|
f906fac8f3 | ||
|
|
05b324a3cb | ||
|
|
8ce1c7ccf5 | ||
|
|
a37f93241f | ||
|
|
6689663ca9 | ||
|
|
959b81a58f | ||
|
|
62e607b44e | ||
|
|
407bb6b977 | ||
|
|
a9efd327b8 | ||
|
|
64cb4d2ff8 | ||
|
|
54786fa82e | ||
|
|
ecab1b7825 | ||
|
|
75d7106f46 | ||
|
|
6f82c09afa | ||
|
|
778e5e219c | ||
|
|
f4682e0bd2 | ||
|
|
906d487ffc | ||
|
|
817b801bf7 | ||
|
|
e401b11ab9 | ||
|
|
165f70e01d | ||
|
|
fddfbfb4ed | ||
|
|
03e229c511 | ||
|
|
0b08372407 | ||
|
|
6d26b5de20 | ||
|
|
ef179410f9 | ||
|
|
194f6e019a | ||
|
|
1f933827b9 | ||
|
|
28765bb2ce | ||
|
|
136391db04 | ||
|
|
0cc39e71fc | ||
|
|
d65cc08793 | ||
|
|
a1729a0266 | ||
|
|
8505634df3 | ||
|
|
02047c1ec0 | ||
|
|
068fa4b2ef | ||
|
|
bfd266a40e | ||
|
|
6367d4e2aa | ||
|
|
f8a680f381 | ||
|
|
81750e6eb9 | ||
|
|
818cf682bf | ||
|
|
3112a0650f | ||
|
|
747ef94f04 | ||
|
|
dbacada48c | ||
|
|
26db8a40cc | ||
|
|
6e5feda00e | ||
|
|
f04330074b | ||
|
|
80d733d329 | ||
|
|
0099dcf5c5 | ||
|
|
0a30551b7d | ||
|
|
e4ee0227fd | ||
|
|
4ec7168499 | ||
|
|
650647e94b | ||
|
|
a5371f4b5d | ||
|
|
d47e7fb3c4 | ||
|
|
ef983e17fe | ||
|
|
d78975be6e | ||
|
|
19a264870c | ||
|
|
ee1753de67 | ||
|
|
742354b2cb | ||
|
|
e2f6aaa4de | ||
|
|
abc2911059 | ||
|
|
d76caf7093 | ||
|
|
bf859f8435 | ||
|
|
8728e3a69a | ||
|
|
b31c10cc52 | ||
|
|
89e3c7d8b0 | ||
|
|
167b09f24f | ||
|
|
39165266d5 | ||
|
|
7405f2de75 | ||
|
|
762fe87454 | ||
|
|
ebbc81b605 | ||
|
|
12d41aada1 | ||
|
|
61fe9c23ce | ||
|
|
945c9c60a9 | ||
|
|
8413b0392e | ||
|
|
868edcd392 | ||
|
|
a3b2f9b6fc | ||
|
|
12b444bb41 | ||
|
|
0e814fd567 | ||
|
|
7b083aa038 | ||
|
|
4e0a4c84b5 | ||
|
|
2d9b47e645 | ||
|
|
39a2182736 | ||
|
|
5a996abbf3 | ||
|
|
a20def5161 | ||
|
|
030f370290 | ||
|
|
f3ade3cb82 | ||
|
|
315cb6a1ac | ||
|
|
60615d32f5 | ||
|
|
1d27d9cf5b | ||
|
|
2ba760d0f9 | ||
|
|
c31ec3b418 | ||
|
|
d0afab9604 | ||
|
|
4e9f8fe1c0 | ||
|
|
803f93aa73 | ||
|
|
853940d009 | ||
|
|
6ddb746d49 | ||
|
|
2b86b15132 | ||
|
|
5f0f5d0aa5 | ||
|
|
136aab872a | ||
|
|
a1d4702af0 | ||
|
|
b2777c13b8 | ||
|
|
26cb473b9d | ||
|
|
907c639e28 | ||
|
|
80d2eafed7 | ||
|
|
519122e5be | ||
|
|
c211768d5c | ||
|
|
908f318eeb | ||
|
|
0143f93577 | ||
|
|
f8615aeb82 | ||
|
|
b113448a9c | ||
|
|
2930a11c75 | ||
|
|
982de7f5c7 | ||
|
|
bfdb5e9787 | ||
|
|
d5ea945c6b | ||
|
|
5a18d038a2 | ||
|
|
d0389d6c9c | ||
|
|
c9bc6e24fe | ||
|
|
8b4a8e9534 | ||
|
|
5adfd00509 | ||
|
|
4090e038ae | ||
|
|
f3ab282fd1 | ||
|
|
40b97d3c1e | ||
|
|
829b97270d | ||
|
|
61111c8038 | ||
|
|
1f4fbaa177 | ||
|
|
9e8ef7e875 | ||
|
|
190d90a966 | ||
|
|
5a07c82a5d | ||
|
|
9c2e56ee8b | ||
|
|
c83f194dc9 | ||
|
|
b9bcb66d2a | ||
|
|
b72050da1d | ||
|
|
82522ad6ab | ||
|
|
d40e2e6103 | ||
|
|
96715770a7 | ||
|
|
48fa67c2e4 | ||
|
|
9a6217f755 | ||
|
|
f1f035b5f9 | ||
|
|
19aa53effc | ||
|
|
be7cb4583c | ||
|
|
887891f74d | ||
|
|
d83cd34bf4 | ||
|
|
bee41a90f9 | ||
|
|
79afe9d812 | ||
|
|
9fe55c5692 | ||
|
|
feddce2575 | ||
|
|
9ae31a3f5d | ||
|
|
4ddc5e3a93 | ||
|
|
f63f1764ab | ||
|
|
bc6c9f5df8 | ||
|
|
1231e1b0f6 | ||
|
|
b99822e7da | ||
|
|
7c694e9733 | ||
|
|
21b6977387 | ||
|
|
408735399c | ||
|
|
f6c856d161 | ||
|
|
167e22cb9c | ||
|
|
5fe2ae9af1 | ||
|
|
8173cf13a8 | ||
|
|
7d0becf1bd | ||
|
|
9b4a87ce68 | ||
|
|
464c4d349d | ||
|
|
a35d3131f8 | ||
|
|
9d99d3c331 | ||
|
|
b100516b24 | ||
|
|
8da5396443 | ||
|
|
5d2a727311 | ||
|
|
d7f03215e2 | ||
|
|
d366471e71 | ||
|
|
e5163f154a | ||
|
|
cfc497d8ed | ||
|
|
35f8ab0257 | ||
|
|
e890743c86 | ||
|
|
ffec6e307d | ||
|
|
7c35db7eaa | ||
|
|
9f0c2296bc | ||
|
|
6b0a06c64d | ||
|
|
160186931f | ||
|
|
22c4a14fbe | ||
|
|
241a82764b | ||
|
|
6e4d48bb07 | ||
|
|
7a383f419a | ||
|
|
933b99d349 | ||
|
|
72d78084f6 | ||
|
|
fcee4d2774 | ||
|
|
61c7f3bc13 | ||
|
|
3830637f3c | ||
|
|
45f8049521 | ||
|
|
823774bcfe | ||
|
|
920e5211c0 | ||
|
|
7da61e3d8d | ||
|
|
754b60b15c | ||
|
|
839454bfd6 | ||
|
|
3b6a0667d6 | ||
|
|
f298adaea8 | ||
|
|
641206b811 | ||
|
|
117f13b056 | ||
|
|
93a94b4900 | ||
|
|
40363c2ea1 | ||
|
|
056252d2bb | ||
|
|
6f15d65d90 | ||
|
|
02f9b21cff | ||
|
|
79cf154304 | ||
|
|
a650683d45 | ||
|
|
311dc3dc9c | ||
|
|
bda1f80ecc | ||
|
|
817796bf40 | ||
|
|
8a48eeab8b | ||
|
|
0061104c0d | ||
|
|
5110a1be17 | ||
|
|
4cbb998106 | ||
|
|
17de3f496c | ||
|
|
b54181e93a | ||
|
|
eaf7edcd94 | ||
|
|
cdf1631e2b | ||
|
|
841f49553e | ||
|
|
57d7d5a1b9 | ||
|
|
b1f2ab2ed7 | ||
|
|
f629d95844 | ||
|
|
30904fbdda | ||
|
|
9a3be6a85a | ||
|
|
88c91d9bdd | ||
|
|
5d2efe3e6b | ||
|
|
d6354d3d94 | ||
|
|
4ddfdd828c | ||
|
|
06b70c6204 | ||
|
|
2dc9d11f79 | ||
|
|
fbb161c511 | ||
|
|
f84bc62d61 | ||
|
|
2e20554d1e | ||
|
|
bb9fcc64ed | ||
|
|
2d908468ea | ||
|
|
c9ae148d86 |
No files matched your search
+206
-6
@@ -7,18 +7,18 @@
|
||||
- Added Lure Ball functionality, increasing the catch rate of Pokémon that were caught on a fishing rod.
|
||||
- Added Repeat Ball functionality, increasing the catch rate of Pokémon that are already registered as caught in a player's Pokédex.
|
||||
- Added property chaining support for duplicate CustomPokemonPropertyType elements.
|
||||
- Added flat level battling with options to set all Pokemon to level 50, 100, or 5 for the duration of a battle. No experience or EVs are granted for a flat battle.
|
||||
- Added `aspect` and `unaspect` PokemonProperty arguments (which also includes commands such as `/pokemonedit`, `/spawnpokemon`, and `/givepokemon`) to allow forcing or un-forcing an aspect on a Pokémon.
|
||||
- Added `type` alternatively `elemental_type` PokemonProperty argument, this is only used for filtering and is not applied to Pokémon. Example `type=fire` would be true for Charmander but false for Squirtle.
|
||||
- Added support for Double Battles, Triple Battles, and Multi-battles.
|
||||
- CriticalCaptures and Pokédex progress capture multiplier now work with the Pokédex.
|
||||
- Added extra visuals to early berry growth stages.
|
||||
- Hidden Power now displays its effective typing.
|
||||
- Moves impacted by the abilities Pixelate, Refrigerate, Aerilate, Galvanize, and Normalize now display as their altered typing.
|
||||
- Added Polished Tumblestone and Tumblestone Brick block sets from Tumblestone, Black Tumblestone, and Sky Tumblestone.
|
||||
- Added Metronome, Protective Pads, Punching Glove, Room Service, Scope Lens, Shed Shell, Terrain Extender, Throat Spray, Utility Umbrella, Wide Lens, and Zoom Lens held items
|
||||
- Added particles for moves: Watersport, Mud Sport, and Psychic.
|
||||
- Added Fire, Water, Thunder, Leaf, Ice, Sun, Moon, Shiny, Dawn, and Dusk Stone storage blocks.
|
||||
- Added Eject Pack, Metronome, Protective Pads, Punching Glove, Room Service, Scope Lens, Shed Shell, Terrain Extender, Throat Spray, Utility Umbrella, Wide Lens, and Zoom Lens held items
|
||||
- Moves can now be benched without specifying a replacement move, allowing for empty move slots.
|
||||
- Moves learned via Sketch now persist after battle.
|
||||
- Added `stonjourner_henge_ruins`, `luna_henge_ruins`, and `sol_henge_ruins` structures.
|
||||
- Added a `battleInvulnerability` gamerule to make players invulnerable to any damage during a battle.
|
||||
- Added a `mobTargetInBattle` gamerule to exclude players from being targeted by mobs during a battle.
|
||||
@@ -31,8 +31,17 @@
|
||||
- `/freezepokemon` command to pause a Pokémon's animation at a specific point in time.
|
||||
- Added `no_ai` and `freeze_frame` options to the `/spawnpokemon` command.
|
||||
- Added shiny Pokémon particles with sound effects.
|
||||
- Added animation for trading.
|
||||
- Added shiny Pokémon effects.
|
||||
- Added effects for the burn status effect.
|
||||
- Added effects for the moves: Psychic, Water Sport, and Mud Sport.
|
||||
- Added a new universal locator called "top".
|
||||
|
||||
### Pokémon Added
|
||||
#### Gen 1
|
||||
- Alola Bias Cubone
|
||||
- Alolan Marowak
|
||||
|
||||
#### Gen 2
|
||||
- Ledyba
|
||||
- Ledian
|
||||
@@ -40,13 +49,39 @@
|
||||
- Sunflora
|
||||
- Wobbuffet
|
||||
- Girafarig
|
||||
- Corsola
|
||||
- Remoraid
|
||||
- Octillery
|
||||
- Mantine
|
||||
- Smeargle
|
||||
- Remoraid
|
||||
- Octillery
|
||||
- Mantine
|
||||
- Corsola
|
||||
|
||||
#### Gen 3
|
||||
- Slakoth
|
||||
- Vigoroth
|
||||
- Slaking
|
||||
- Corphish
|
||||
- Crawdaunt
|
||||
- Feebas
|
||||
- Milotic
|
||||
- Wynaut
|
||||
- Absol
|
||||
- Spheal
|
||||
- Sealeo
|
||||
- Walrein
|
||||
- Bagon
|
||||
- Shelgon
|
||||
- Salamence
|
||||
|
||||
#### Gen 4
|
||||
- Shellos [East Sea form]
|
||||
- Gastrodon [East Sea form]
|
||||
- Finneon
|
||||
- Lumineon
|
||||
- Mantyke
|
||||
- Feebas
|
||||
- Milotic
|
||||
- Spheal
|
||||
@@ -65,12 +100,28 @@
|
||||
#### Gen 5
|
||||
- Purrloin
|
||||
- Liepard
|
||||
- Scraggy
|
||||
- Scrafty
|
||||
|
||||
#### Gen 6
|
||||
- Clauncher
|
||||
- Clawitzer
|
||||
|
||||
#### Gen 7
|
||||
- Pikipek
|
||||
- Trumbeak
|
||||
- Toucannon
|
||||
- Mareanie
|
||||
- Toxapex
|
||||
- Sandygast
|
||||
- Palossand
|
||||
- Bruxish
|
||||
|
||||
#### Gen 8
|
||||
- Cramorant
|
||||
- Hatenna
|
||||
- Hattrem
|
||||
- Hatterene
|
||||
- Bruxish
|
||||
- Mareanie
|
||||
- Toxapex
|
||||
@@ -80,16 +131,156 @@
|
||||
- Pincurchin
|
||||
|
||||
#### Gen 9
|
||||
- Wattrel
|
||||
- Kilowattrel
|
||||
- Wiglett
|
||||
- Wugtrio
|
||||
- Flamigo
|
||||
- Veluza
|
||||
- Farigiraf
|
||||
- Klawf
|
||||
- Finizen
|
||||
- Palafin
|
||||
- Wiglett
|
||||
- Wugtrio
|
||||
- Flamigo
|
||||
|
||||
#### Unique Forms
|
||||
- Magikarp Jump Variants
|
||||
- Gyarados Jump Variants
|
||||
|
||||
### Added cries to the following Pokémon
|
||||
- Sandshrew, Sandslash
|
||||
- Magnemite, Magneton, Magnezone
|
||||
- Gastly, Haunter, Gengar
|
||||
- Rhyhorn, Rhydon, Rhyperior
|
||||
- Happiny, Chansey
|
||||
- Horsea, Seadra, Kingdra
|
||||
- Magby, Magmar, Magmortar
|
||||
- Porygon, Porygon2, Porygon-Z
|
||||
- Sentret, Furret
|
||||
- Misdreavus, Mismagius
|
||||
- Corsola
|
||||
- Mantyke, Mantine
|
||||
- Girafarig, Farigiraf
|
||||
- Wynaut, Wobbuffet
|
||||
- Lunatone
|
||||
- Solrock
|
||||
- Corphish, Crawdaunt
|
||||
- Feebas, Milotic
|
||||
- Kecleon
|
||||
- Absol
|
||||
- Spheal, Sealeo, Walrein
|
||||
- Relicanth
|
||||
- Bagon, Shelgon, Salamence
|
||||
- Munchlax
|
||||
- Finneon, Lumineon
|
||||
- Purrloin, Liepard
|
||||
- Timburr, Gurdurr, Conkeldurr
|
||||
- Joltik, Galvantula
|
||||
- Elgyem, Beheeyem
|
||||
- Golett, Golurk
|
||||
- Deino, Zweilous, Hydreigon
|
||||
- Flabébé, Floette, Florges
|
||||
- Clauncher, Clawitzer
|
||||
- Mareanie, Toxapex
|
||||
- Wimpod, Golisopod
|
||||
- Bruxish
|
||||
- Hatenna, Hattrem, Hatterene
|
||||
- Pincurchin
|
||||
- Klawf
|
||||
- Finizen, Palafin [Zero], Palafin [Hero]
|
||||
- Dondozo
|
||||
|
||||
### Added shoulder mounts for the following Pokémon
|
||||
- Weedle
|
||||
- Caterpie
|
||||
- Spearow
|
||||
- Mew
|
||||
- Murkrow
|
||||
- Smoochum
|
||||
- Larvitar
|
||||
- Tailow
|
||||
- Plusle
|
||||
- Minun
|
||||
- Beldum
|
||||
- Starly
|
||||
- Buneary
|
||||
- Combee
|
||||
- Pachirisu
|
||||
- Pidove
|
||||
- Petilil, Hisui Bias Petilil
|
||||
- Zorua, Hisui Bias Zorua
|
||||
- Elgyem
|
||||
- Fletchling
|
||||
- Skrelp
|
||||
- Klefki
|
||||
- Fomantis
|
||||
- Morelull
|
||||
- Dreepy
|
||||
- Shroodle
|
||||
- Tatsugiri
|
||||
- Glimmet
|
||||
- Gimmighoul [Roaming]
|
||||
|
||||
### Animation updates for the following Pokémon
|
||||
- Bellsprout, Weepinbel, Victreebel
|
||||
- Shellder, Cloyster
|
||||
- Porygon, Porygon2, Porygon-Z
|
||||
- Furret
|
||||
- Swinub, Piloswine, Mamoswine
|
||||
- Skarmory
|
||||
- Spinda
|
||||
- Torkoal
|
||||
- Nincada, Ninjask
|
||||
- Lunatone
|
||||
- Solrock
|
||||
- Buneary, Lopunny
|
||||
- Alomomola
|
||||
- Dreepy, Drakloak
|
||||
- Kleavor
|
||||
|
||||
### Model updates for the following Pokémon
|
||||
- Bulbasaur, Ivysaur, Venusaur
|
||||
- Charmander, Charmeleon, Charizard
|
||||
- Kakuna, Beedrill
|
||||
- Porygon, Porygon2, Porygon-Z
|
||||
- Igglybuff, Jigglypuff, Wigglytuff
|
||||
- Poliwhirl, Poliwrath
|
||||
- Bellsprout, Weepinbell, Victreebel
|
||||
- Shellder, Cloyster
|
||||
- Gastly, Haunter
|
||||
- Onix
|
||||
- Krabby, Kingler
|
||||
- Rhyhorn, Rhydon, Rhyperior
|
||||
- Horsea, Seadra, Kingdra
|
||||
- Goldeen, Seaking
|
||||
- Magby, Magmar, Magmortar
|
||||
- Magikarp, Gyarados
|
||||
- Munchlax, Snorlax
|
||||
- Swinub, Piloswine, Mamoswine
|
||||
- Mudkip, Marshtomp, Swampert
|
||||
- Baltoy, Claydol
|
||||
- Carvanha
|
||||
- Relicanth
|
||||
- Prinplup, Empoleon
|
||||
- Gible, Gabite, Garchomp
|
||||
- Riolu, Lucario
|
||||
- Snivy, Servine, Serperior
|
||||
- Tepig, Pignite, Emboar
|
||||
- Krookodile
|
||||
- Dwebble, Crustle
|
||||
- Joltik, Galvantula
|
||||
- Klink, Klang, Klinglang
|
||||
- Golett, Golurk
|
||||
- Fennekin, Braixen, Delphox
|
||||
- Phantump, Trevenant
|
||||
- Litten, Torracat, Incineroar
|
||||
- Popplio, Brionne, Primarina
|
||||
- Lurantis
|
||||
- Scorbunny, Cinderace
|
||||
- Quaxly
|
||||
- Tatsugiri
|
||||
|
||||
### Changes
|
||||
- Buffed Dusk Ball catch multipliers: Increased multiplier to 3.5 (from 3.0) in light level 0. Increased multiplier to 3.0 (from 1.5) in light levels 1-7.
|
||||
@@ -97,9 +288,7 @@
|
||||
- Adjusted some berry balance values like yield and growth times.
|
||||
- Adjusted volumes of sounds made by Display Cases, Berry Bushes, Energy Root, Medicinal Leek, Vivichoke, Mints, Revival Herbs and Gilded Chests.
|
||||
- Changes to mulch buffs/durations.
|
||||
- Dreepy is now shoulder mountable.
|
||||
- Updated potion sprites.
|
||||
- Weedle, Caterpie, Spearow, Smoochum, Mew, Murkrow, Larvitar, Taillow, Plusle, Minun, Beldum, Starly, Buneary, Combee, Pachirisu, Pidove, Petilil, Hisui Bias Petilil, Zorua, Hisuian Zorua, Elgyem, Fletchling, Skrelp, Klefki, Fomantis, Morelull, Dreepy, Shroodle, Tatsugiri, Glimmet, and Roaming Gimmighoul are now shoulder mountable.
|
||||
- Link Cable recipe has been redesigned.
|
||||
- Updated sounds for Medicinal Leeks, Big Roots, Energy Roots and Revival Herbs.
|
||||
- Updated UI sounds for clicking and evolving Pokémon.
|
||||
@@ -117,11 +306,20 @@
|
||||
- Updated dialogue GUI assets with proper assets.
|
||||
- Updated party switching interface when in battle.
|
||||
- Relic coin pouches can now be waterlogged.
|
||||
- Pokemon Name (and level) labels are now only visible when crouching by default, set the `displayEntityLabelsWhenCrouchingOnly` to `false` to always them even when not crouching
|
||||
- Pokémon name and level labels are now only visible when crouching by default. Set the `displayEntityLabelsWhenCrouchingOnly` config to `false` to always have them displayed.
|
||||
- The "Press R to start battle prompt" will now disappear after a player's first battle has been won.
|
||||
- The default number of digits for the Pokédex number in the summary has been increased, from 3 to 4.
|
||||
- The pasture block model's screen is now off by default.
|
||||
- The Poké Balls creative tab is now named Utility Items as it also encompasses Poké Rod and Pokédex items.
|
||||
- Moves can now be benched without specifying a replacement move, allowing for empty move slots.
|
||||
- Moves learned via Sketch now persist after battle.
|
||||
- Updated potion sprites
|
||||
- Removed the interchangeable evolution results for the first stage Hisuian starters to prevent confusion. The method still exists for stage 2 to 3, but stage 1 to 2 was not distinguishable enough for many users.
|
||||
- Hidden Power now displays its effective typing.
|
||||
- Updated particles for moves: Confusion, Protect, Sand Attack, and Quick Attack.
|
||||
- Updated particles for status effects: Paralysis, Poison, and Sleep.
|
||||
- Updated particles on Gastly.
|
||||
- Revamped stat buff and de-buff particles.
|
||||
|
||||
### Fixes
|
||||
- Scaled down Amaura's fetus model to avoid clipping through the tank while animating.
|
||||
@@ -177,6 +375,7 @@
|
||||
- Fixed Slowking's battle idle.
|
||||
- Fixed Grafaiai's walk speed to prevent model sliding.
|
||||
- Fixed Alolan Exeggutor's tail not showing in the party UI. It will now also stand in front of all Pokémon in the party menu :)
|
||||
- Fixed Timburr duplicating its log while fainting.
|
||||
- Fixed reviving items throwing an exception when used in battle.
|
||||
- Fixed messages for Focus Sash, Confusion, Mummy, Ice Face, Own Tempo, and Revive.
|
||||
- Improve error handling when loading spawn-sets to ensure invalid configurations don't crash the server.
|
||||
@@ -193,6 +392,7 @@
|
||||
- Fixed village generation caps not applying for berry farms. You were not meant to see more than two berry farms per village!
|
||||
- Fixed the Ice Face ability activation being displayed incorrectly in a battle.
|
||||
- Fixed edge case of F1 and R locking you in battle with no R functionality (requiring ESC to get out).
|
||||
- Fixed Poké Ball render orientation in battle interface when capturing.
|
||||
|
||||
### Developer
|
||||
- `SpawnCause` is now an implementation of `SpawningInfluence`.
|
||||
|
||||
@@ -97,6 +97,7 @@ import com.cobblemon.mod.common.pokemon.properties.HiddenAbilityPropertyType
|
||||
import com.cobblemon.mod.common.pokemon.properties.NoAIProperty
|
||||
import com.cobblemon.mod.common.pokemon.properties.UnaspectPropertyType
|
||||
import com.cobblemon.mod.common.pokemon.properties.UncatchableProperty
|
||||
import com.cobblemon.mod.common.pokemon.properties.BattleCloneProperty
|
||||
import com.cobblemon.mod.common.pokemon.properties.tags.PokemonFlagProperty
|
||||
import com.cobblemon.mod.common.pokemon.stat.CobblemonStatProvider
|
||||
import com.cobblemon.mod.common.starter.CobblemonStarterHandler
|
||||
@@ -273,6 +274,7 @@ object Cobblemon {
|
||||
FlagSpeciesFeatureProvider(keys = listOf(DataKeys.HAS_BEEN_SHEARED), default = false))
|
||||
|
||||
CustomPokemonProperty.register(UncatchableProperty)
|
||||
CustomPokemonProperty.register(BattleCloneProperty)
|
||||
CustomPokemonProperty.register(PokemonFlagProperty)
|
||||
CustomPokemonProperty.register(HiddenAbilityPropertyType)
|
||||
CustomPokemonProperty.register(AspectPropertyType)
|
||||
|
||||
@@ -51,13 +51,7 @@ import com.cobblemon.mod.common.client.net.storage.pc.OpenPCHandler
|
||||
import com.cobblemon.mod.common.client.net.storage.pc.SetPCBoxPokemonHandler
|
||||
import com.cobblemon.mod.common.client.net.storage.pc.SetPCPokemonHandler
|
||||
import com.cobblemon.mod.common.client.net.toast.ToastPacketHandler
|
||||
import com.cobblemon.mod.common.client.net.trade.TradeAcceptanceChangedHandler
|
||||
import com.cobblemon.mod.common.client.net.trade.TradeCancelledHandler
|
||||
import com.cobblemon.mod.common.client.net.trade.TradeCompletedHandler
|
||||
import com.cobblemon.mod.common.client.net.trade.TradeOfferExpiredHandler
|
||||
import com.cobblemon.mod.common.client.net.trade.TradeOfferNotificationHandler
|
||||
import com.cobblemon.mod.common.client.net.trade.TradeStartedHandler
|
||||
import com.cobblemon.mod.common.client.net.trade.TradeUpdatedHandler
|
||||
import com.cobblemon.mod.common.client.net.trade.*
|
||||
import com.cobblemon.mod.common.net.PacketRegisterInfo
|
||||
import com.cobblemon.mod.common.net.messages.client.PlayerInteractOptionsPacket
|
||||
import com.cobblemon.mod.common.net.messages.client.animation.PlayPosableAnimationPacket
|
||||
@@ -100,13 +94,6 @@ import com.cobblemon.mod.common.net.messages.client.storage.party.SetPartyPokemo
|
||||
import com.cobblemon.mod.common.net.messages.client.storage.party.SetPartyReferencePacket
|
||||
import com.cobblemon.mod.common.net.messages.client.storage.pc.*
|
||||
import com.cobblemon.mod.common.net.messages.client.toast.ToastPacket
|
||||
import com.cobblemon.mod.common.net.messages.client.trade.TradeAcceptanceChangedPacket
|
||||
import com.cobblemon.mod.common.net.messages.client.trade.TradeCancelledPacket
|
||||
import com.cobblemon.mod.common.net.messages.client.trade.TradeCompletedPacket
|
||||
import com.cobblemon.mod.common.net.messages.client.trade.TradeOfferExpiredPacket
|
||||
import com.cobblemon.mod.common.net.messages.client.trade.TradeOfferNotificationPacket
|
||||
import com.cobblemon.mod.common.net.messages.client.trade.TradeStartedPacket
|
||||
import com.cobblemon.mod.common.net.messages.client.trade.TradeUpdatedPacket
|
||||
import com.cobblemon.mod.common.net.messages.client.ui.InteractPokemonUIPacket
|
||||
import com.cobblemon.mod.common.net.messages.client.ui.PokedexUIPacket
|
||||
import com.cobblemon.mod.common.net.messages.client.ui.SummaryUIPacket
|
||||
@@ -141,11 +128,6 @@ import com.cobblemon.mod.common.net.messages.server.storage.pc.MovePartyPokemonT
|
||||
import com.cobblemon.mod.common.net.messages.server.storage.pc.ReleasePCPokemonPacket
|
||||
import com.cobblemon.mod.common.net.messages.server.storage.pc.SwapPCPokemonPacket
|
||||
import com.cobblemon.mod.common.net.messages.server.storage.pc.UnlinkPlayerFromPCPacket
|
||||
import com.cobblemon.mod.common.net.messages.server.trade.AcceptTradeRequestPacket
|
||||
import com.cobblemon.mod.common.net.messages.server.trade.CancelTradePacket
|
||||
import com.cobblemon.mod.common.net.messages.server.trade.ChangeTradeAcceptancePacket
|
||||
import com.cobblemon.mod.common.net.messages.server.trade.OfferTradePacket
|
||||
import com.cobblemon.mod.common.net.messages.server.trade.UpdateTradeOfferPacket
|
||||
import com.cobblemon.mod.common.net.serverhandling.*
|
||||
import com.cobblemon.mod.common.net.serverhandling.battle.BattleSelectActionsHandler
|
||||
import com.cobblemon.mod.common.net.serverhandling.battle.RemoveSpectatorHandler
|
||||
@@ -180,15 +162,13 @@ import com.cobblemon.mod.common.net.serverhandling.storage.pc.MovePartyPokemonTo
|
||||
import com.cobblemon.mod.common.net.serverhandling.storage.pc.ReleasePartyPokemonHandler
|
||||
import com.cobblemon.mod.common.net.serverhandling.storage.pc.SwapPCPokemonHandler
|
||||
import com.cobblemon.mod.common.net.serverhandling.storage.pc.UnlinkPlayerFromPCHandler
|
||||
import com.cobblemon.mod.common.net.serverhandling.trade.AcceptTradeRequestHandler
|
||||
import com.cobblemon.mod.common.net.serverhandling.trade.CancelTradeHandler
|
||||
import com.cobblemon.mod.common.net.serverhandling.trade.ChangeTradeAcceptanceHandler
|
||||
import com.cobblemon.mod.common.net.serverhandling.trade.OfferTradeHandler
|
||||
import com.cobblemon.mod.common.net.serverhandling.trade.UpdateTradeOfferHandler
|
||||
import com.cobblemon.mod.common.net.messages.client.pokedex.ServerConfirmedRegisterPacket
|
||||
import com.cobblemon.mod.common.net.messages.client.trade.*
|
||||
import com.cobblemon.mod.common.net.messages.server.pokedex.scanner.FinishScanningPacket
|
||||
import com.cobblemon.mod.common.net.messages.server.trade.*
|
||||
import com.cobblemon.mod.common.net.serverhandling.pokedex.scanner.FinishScanningHandler
|
||||
import com.cobblemon.mod.common.net.serverhandling.pokedex.scanner.StartScanningHandler
|
||||
import com.cobblemon.mod.common.net.serverhandling.trade.*
|
||||
import com.cobblemon.mod.common.util.server
|
||||
import net.minecraft.server.level.ServerPlayer
|
||||
|
||||
@@ -297,6 +277,7 @@ object CobblemonNetwork {
|
||||
list.add(PacketRegisterInfo(BattleChallengeExpiredPacket.ID, BattleChallengeExpiredPacket::decode, BattleChallengeExpiredHandler))
|
||||
list.add(PacketRegisterInfo(BattleReplacePokemonPacket.ID, BattleReplacePokemonPacket::decode, BattleReplacePokemonHandler))
|
||||
list.add(PacketRegisterInfo(BattleTransformPokemonPacket.ID, BattleTransformPokemonPacket::decode, BattleTransformPokemonHandler))
|
||||
list.add(PacketRegisterInfo(BattleAppendTargetedEntityPacket.ID, BattleAppendTargetedEntityPacket::decode, BattleSetTargetedEntityHandler))
|
||||
|
||||
// MultiBattleTeam Packets
|
||||
list.add(PacketRegisterInfo(TeamRequestNotificationPacket.ID, TeamRequestNotificationPacket::decode, TeamRequestNotificationHandler))
|
||||
@@ -341,6 +322,7 @@ object CobblemonNetwork {
|
||||
|
||||
// Trade packets
|
||||
list.add(PacketRegisterInfo(TradeAcceptanceChangedPacket.ID, TradeAcceptanceChangedPacket::decode, TradeAcceptanceChangedHandler))
|
||||
list.add(PacketRegisterInfo(TradeProcessStartedPacket.ID, TradeProcessStartedPacket::decode, TradeProcessStartedHandler))
|
||||
list.add(PacketRegisterInfo(TradeCancelledPacket.ID, TradeCancelledPacket::decode, TradeCancelledHandler))
|
||||
list.add(PacketRegisterInfo(TradeCompletedPacket.ID, TradeCompletedPacket::decode, TradeCompletedHandler))
|
||||
list.add(PacketRegisterInfo(TradeUpdatedPacket.ID, TradeUpdatedPacket::decode, TradeUpdatedHandler))
|
||||
@@ -428,6 +410,7 @@ object CobblemonNetwork {
|
||||
list.add(PacketRegisterInfo(AcceptTradeRequestPacket.ID, AcceptTradeRequestPacket::decode, AcceptTradeRequestHandler))
|
||||
list.add(PacketRegisterInfo(CancelTradePacket.ID, CancelTradePacket::decode, CancelTradeHandler))
|
||||
list.add(PacketRegisterInfo(ChangeTradeAcceptancePacket.ID, ChangeTradeAcceptancePacket::decode, ChangeTradeAcceptanceHandler))
|
||||
list.add(PacketRegisterInfo(PerformTradePacket.ID, PerformTradePacket::decode, PerformTradeHandler))
|
||||
list.add(PacketRegisterInfo(OfferTradePacket.ID, OfferTradePacket::decode, OfferTradeHandler))
|
||||
list.add(PacketRegisterInfo(UpdateTradeOfferPacket.ID, UpdateTradeOfferPacket::decode, UpdateTradeOfferHandler))
|
||||
|
||||
|
||||
@@ -25,6 +25,8 @@ object CobblemonSounds : PlatformRegistry<Registry<SoundEvent>, ResourceKey<Regi
|
||||
|
||||
@JvmField
|
||||
val GUI_CLICK = this.create("gui.click")
|
||||
@JvmField
|
||||
val GUI_TRADE = this.create("gui.trade")
|
||||
|
||||
@JvmField
|
||||
val PC_ON = this.create("pc.on")
|
||||
|
||||
@@ -25,6 +25,7 @@ import com.cobblemon.mod.common.api.events.battles.BattleFledEvent
|
||||
import com.cobblemon.mod.common.api.moves.Moves
|
||||
import com.cobblemon.mod.common.api.molang.MoLangFunctions.asMoLangValue
|
||||
import com.cobblemon.mod.common.api.net.NetworkPacket
|
||||
import com.cobblemon.mod.common.api.storage.party.PlayerPartyStore
|
||||
import com.cobblemon.mod.common.api.tags.CobblemonItemTags
|
||||
import com.cobblemon.mod.common.api.text.red
|
||||
import com.cobblemon.mod.common.api.text.yellow
|
||||
@@ -83,6 +84,8 @@ open class PokemonBattle(
|
||||
|
||||
val onEndHandlers: MutableList<(PokemonBattle) -> Unit> = mutableListOf()
|
||||
|
||||
val battlePartyStores = mutableListOf<PlayerPartyStore>()
|
||||
|
||||
init {
|
||||
side1.battle = this
|
||||
side2.battle = this
|
||||
@@ -371,6 +374,13 @@ open class PokemonBattle(
|
||||
|
||||
}
|
||||
|
||||
fun dispatchWaitingToFront(delaySeconds: Float = 1F, dispatcher: () -> Unit) {
|
||||
dispatches.addFirst(BattleDispatch {
|
||||
dispatcher()
|
||||
WaitDispatch(delaySeconds)
|
||||
})
|
||||
}
|
||||
|
||||
fun dispatchGo(dispatcher: () -> Unit) {
|
||||
dispatch {
|
||||
dispatcher()
|
||||
|
||||
@@ -32,6 +32,9 @@ import com.cobblemon.mod.common.api.storage.party.PartyStore
|
||||
import com.cobblemon.mod.common.api.text.text
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.wavefunction.WaveFunctions
|
||||
import com.cobblemon.mod.common.entity.npc.NPCEntity
|
||||
import com.cobblemon.mod.common.entity.pokemon.PokemonBehaviourFlag
|
||||
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity
|
||||
import com.cobblemon.mod.common.entity.pokemon.ai.PokemonMoveControl
|
||||
import com.cobblemon.mod.common.net.messages.client.effect.RunPosableMoLangPacket
|
||||
import com.cobblemon.mod.common.pokemon.Pokemon
|
||||
import com.cobblemon.mod.common.util.*
|
||||
@@ -53,6 +56,7 @@ import net.minecraft.server.level.ServerPlayer
|
||||
import net.minecraft.tags.TagKey
|
||||
import net.minecraft.world.damagesource.DamageSource
|
||||
import net.minecraft.world.damagesource.DamageTypes
|
||||
import net.minecraft.world.entity.Entity
|
||||
import net.minecraft.world.entity.LivingEntity
|
||||
import net.minecraft.world.entity.player.Player
|
||||
import net.minecraft.world.level.Level
|
||||
@@ -192,6 +196,7 @@ object MoLangFunctions {
|
||||
map.put("is_in_water") { _ -> DoubleValue(entity.isUnderWater) }
|
||||
map.put("is_touching_water_or_rain") { _ -> DoubleValue(entity.isInWaterRainOrBubble) }
|
||||
map.put("is_touching_water") { _ -> DoubleValue(entity.isInWater) }
|
||||
map.put("is_underwater") { DoubleValue(entity.getIsSubmerged()) }
|
||||
map.put("is_in_lava") { _ -> DoubleValue(entity.isInLava) }
|
||||
map.put("is_on_fire") { _ -> DoubleValue(entity.isOnFire) }
|
||||
map.put("is_invisible") { _ -> DoubleValue(entity.isInvisible) }
|
||||
@@ -208,10 +213,18 @@ object MoLangFunctions {
|
||||
map.put("velocity_x") { _ -> DoubleValue(entity.deltaMovement.x) }
|
||||
map.put("velocity_y") { _ -> DoubleValue(entity.deltaMovement.y) }
|
||||
map.put("velocity_z") { _ -> DoubleValue(entity.deltaMovement.z) }
|
||||
map.put("width") { DoubleValue(entity.boundingBox.xsize) }
|
||||
map.put("height") { DoubleValue(entity.boundingBox.ysize) }
|
||||
map.put("entity_size") { DoubleValue(entity.boundingBox.run { if (xsize > ysize) xsize else ysize }) }
|
||||
map.put("entity_width") { DoubleValue(entity.boundingBox.xsize) }
|
||||
map.put("entity_height") { DoubleValue(entity.boundingBox.ysize) }
|
||||
|
||||
map.put("horizontal_velocity") { _ -> DoubleValue(entity.deltaMovement.horizontalDistance()) }
|
||||
map.put("vertical_velocity") { DoubleValue(entity.deltaMovement.y) }
|
||||
map.put("is_on_ground") { _ -> DoubleValue(entity.onGround()) }
|
||||
map.put("world") { _ -> entity.level().worldRegistry.wrapAsHolder(entity.level()).asWorldMoLangValue() }
|
||||
map.put("biome") { _ -> entity.level().getBiome(entity.blockPosition()).asBiomeMoLangValue() }
|
||||
map.put("is_passenger") { DoubleValue(entity.isPassenger) }
|
||||
map.put("is_healer_in_use") { params ->
|
||||
val pos = params.get<ArrayStruct>(0).asBlockPos()
|
||||
val healer = entity.level().getBlockEntity(pos, CobblemonBlockEntities.HEALING_MACHINE).orElse(null) ?: return@put DoubleValue.ONE
|
||||
@@ -319,6 +332,28 @@ object MoLangFunctions {
|
||||
}
|
||||
)
|
||||
|
||||
val pokemonFunctions = mutableListOf<(Pokemon) -> HashMap<String, java.util.function.Function<MoParams, Any>>>(
|
||||
{ pokemon ->
|
||||
val map = hashMapOf<String, java.util.function.Function<MoParams, Any>>()
|
||||
map.put("is_wild") { DoubleValue(pokemon.isWild()) }
|
||||
map.put("is_shiny") { DoubleValue(pokemon.shiny) }
|
||||
map.put("form") { StringValue(pokemon.form.name) }
|
||||
map.put("weight") { DoubleValue(pokemon.species.weight.toDouble()) }
|
||||
map
|
||||
}
|
||||
)
|
||||
|
||||
val pokemonEntityFunctions = mutableListOf<(PokemonEntity) -> HashMap<String, java.util.function.Function<MoParams, Any>>>(
|
||||
{ pokemonEntity ->
|
||||
val map = hashMapOf<String, java.util.function.Function<MoParams, Any>>()
|
||||
map.put("in_battle") { DoubleValue(pokemonEntity.isBattling) }
|
||||
map.put("is_moving") { DoubleValue((pokemonEntity.moveControl as? PokemonMoveControl)?.hasWanted() == true) }
|
||||
map.put("is_flying") { DoubleValue(pokemonEntity.getBehaviourFlag(PokemonBehaviourFlag.FLYING)) }
|
||||
map.put("has_aspect") { DoubleValue(it.getString(0) in pokemonEntity.aspects) }
|
||||
map
|
||||
}
|
||||
)
|
||||
|
||||
val partyFunctions = mutableListOf<(PartyStore) -> HashMap<String, java.util.function.Function<MoParams, Any>>>(
|
||||
{ party ->
|
||||
val map = hashMapOf<String, java.util.function.Function<MoParams, Any>>()
|
||||
@@ -388,6 +423,30 @@ object MoLangFunctions {
|
||||
return this
|
||||
}
|
||||
|
||||
fun QueryStruct.addEntityFunctions(entity: LivingEntity): QueryStruct {
|
||||
val addedFunctions = entityFunctions
|
||||
.flatMap { it.invoke(entity).entries }
|
||||
.associate { it.key to it.value }
|
||||
functions.putAll(addedFunctions)
|
||||
return this
|
||||
}
|
||||
|
||||
fun QueryStruct.addPokemonFunctions(pokemon: Pokemon): QueryStruct {
|
||||
val addedFunctions = pokemonFunctions
|
||||
.flatMap { it.invoke(pokemon).entries }
|
||||
.associate { it.key to it.value }
|
||||
functions.putAll(addedFunctions)
|
||||
return this
|
||||
}
|
||||
|
||||
fun QueryStruct.addPokemonEntityFunctions(pokemonEntity: PokemonEntity): QueryStruct {
|
||||
val addedFunctions = pokemonEntityFunctions
|
||||
.flatMap { it.invoke(pokemonEntity).entries }
|
||||
.associate { it.key to it.value }
|
||||
functions.putAll(addedFunctions)
|
||||
return this
|
||||
}
|
||||
|
||||
fun <T : QueryStruct> T.addFunctions(functions: Map<String, java.util.function.Function<MoParams, Any>>): T {
|
||||
this.functions.putAll(functions)
|
||||
return this
|
||||
|
||||
@@ -35,6 +35,14 @@ class BenchedMoves : Iterable<BenchedMove> {
|
||||
emit = previousEmit
|
||||
}
|
||||
|
||||
fun copyFrom(other: BenchedMoves) {
|
||||
doWithoutEmitting {
|
||||
clear()
|
||||
other.forEach { add(it) }
|
||||
}
|
||||
update()
|
||||
}
|
||||
|
||||
fun doThenEmit(action: () -> Unit) {
|
||||
doWithoutEmitting(action)
|
||||
update()
|
||||
|
||||
@@ -13,6 +13,7 @@ import com.cobblemon.mod.common.CobblemonSounds
|
||||
import com.cobblemon.mod.common.api.battles.model.PokemonBattle
|
||||
import com.cobblemon.mod.common.api.battles.model.actor.BattleActor
|
||||
import com.cobblemon.mod.common.api.storage.party.PartyStore
|
||||
import com.cobblemon.mod.common.api.storage.party.PlayerPartyStore
|
||||
import com.cobblemon.mod.common.battles.actor.PlayerBattleActor
|
||||
import com.cobblemon.mod.common.battles.actor.PokemonBattleActor
|
||||
import com.cobblemon.mod.common.battles.pokemon.BattlePokemon
|
||||
@@ -32,7 +33,6 @@ import net.minecraft.network.chat.MutableComponent
|
||||
import net.minecraft.server.level.ServerPlayer
|
||||
import net.minecraft.world.entity.Entity
|
||||
import net.minecraft.world.phys.Vec3
|
||||
import java.util.*
|
||||
import kotlin.collections.HashMap
|
||||
import kotlin.collections.Iterable
|
||||
import kotlin.collections.MutableSet
|
||||
@@ -61,8 +61,30 @@ object BattleBuilder {
|
||||
healFirst: Boolean = false,
|
||||
partyAccessor: (ServerPlayer) -> PartyStore = { it.party() }
|
||||
): BattleStartResult {
|
||||
val team1 = partyAccessor(player1).toBattleTeam(clone = cloneParties, healPokemon = healFirst, leadingPokemonPlayer1).sortedBy { it.health <= 0 }
|
||||
val team2 = partyAccessor(player2).toBattleTeam(clone = cloneParties, healPokemon = healFirst, leadingPokemonPlayer2).sortedBy { it.health <= 0 }
|
||||
|
||||
val adjustLevel = battleFormat.adjustLevel
|
||||
val team1 = partyAccessor(player1).toBattleTeam(clone = cloneParties || adjustLevel > 0, healPokemon = healFirst, leadingPokemonPlayer1).sortedBy { it.health <= 0 }
|
||||
val team2 = partyAccessor(player2).toBattleTeam(clone = cloneParties || adjustLevel > 0, healPokemon = healFirst, leadingPokemonPlayer2).sortedBy { it.health <= 0 }
|
||||
|
||||
val battlePartyStores = mutableListOf<PlayerPartyStore>()
|
||||
|
||||
if (adjustLevel > 0) {
|
||||
val tempStoreP1 = PlayerPartyStore(player1.uuid)
|
||||
team1.forEachIndexed { index, it ->
|
||||
it.effectedPokemon.level = adjustLevel
|
||||
it.effectedPokemon.heal()
|
||||
tempStoreP1.set(index, it.effectedPokemon)
|
||||
}
|
||||
battlePartyStores.add(tempStoreP1)
|
||||
|
||||
val tempStoreP2 = PlayerPartyStore(player2.uuid)
|
||||
team2.forEachIndexed { index, it ->
|
||||
it.effectedPokemon.level = adjustLevel
|
||||
it.effectedPokemon.heal()
|
||||
tempStoreP2.set(index, it.effectedPokemon)
|
||||
}
|
||||
battlePartyStores.add(tempStoreP2)
|
||||
}
|
||||
|
||||
val player1Actor = PlayerBattleActor(player1.uuid, team1)
|
||||
val player2Actor = PlayerBattleActor(player2.uuid, team2)
|
||||
@@ -92,6 +114,7 @@ object BattleBuilder {
|
||||
).ifSuccessful {
|
||||
player1Actor.battleTheme = player2.getBattleTheme()
|
||||
player2Actor.battleTheme = player1.getBattleTheme()
|
||||
it.battlePartyStores.addAll(battlePartyStores)
|
||||
result = SuccessfulBattleStart(it)
|
||||
}
|
||||
result
|
||||
@@ -118,6 +141,20 @@ object BattleBuilder {
|
||||
}
|
||||
val playerActors = teams.mapIndexed { index, team -> PlayerBattleActor(players[index].uuid, team)}.toMutableList()
|
||||
|
||||
val adjustLevel = battleFormat.adjustLevel
|
||||
val battlePartyStores = mutableListOf<PlayerPartyStore>()
|
||||
|
||||
if (adjustLevel > 0) {
|
||||
teams.forEachIndexed { index, battleTeam ->
|
||||
battleTeam.forEach { battlePokemon ->
|
||||
battlePokemon.effectedPokemon.level = adjustLevel
|
||||
battlePokemon.effectedPokemon.heal()
|
||||
val tempStore = PlayerPartyStore(players[index].uuid)
|
||||
battlePartyStores.add(tempStore)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val errors = ErroredBattleStart()
|
||||
|
||||
if (players.size != BattleRegistry.MAX_TEAM_MEMBER_COUNT * 2) {
|
||||
@@ -170,6 +207,8 @@ object BattleBuilder {
|
||||
|
||||
playerActors[2].battleTheme = players[0].getBattleTheme()
|
||||
playerActors[3].battleTheme = players[0].getBattleTheme()
|
||||
|
||||
it.battlePartyStores.addAll(battlePartyStores)
|
||||
}
|
||||
errors
|
||||
} else {
|
||||
|
||||
@@ -24,8 +24,9 @@ import net.minecraft.network.RegistryFriendlyByteBuf
|
||||
data class BattleFormat(
|
||||
val mod: String = "cobblemon",
|
||||
val battleType: BattleType = BattleTypes.SINGLES,
|
||||
val ruleSet: Set<String> = setOf(),
|
||||
val gen: Int = 9
|
||||
var ruleSet: Set<String> = setOf(),
|
||||
val gen: Int = 9,
|
||||
var adjustLevel: Int = -1, // Stop gap rule before a more general system for rules enforced by Cobblemon is implemented.
|
||||
) {
|
||||
companion object {
|
||||
val GEN_9_SINGLES = BattleFormat(
|
||||
@@ -49,8 +50,8 @@ data class BattleFormat(
|
||||
)
|
||||
|
||||
val GEN_9_ROYAL = BattleFormat(
|
||||
battleType = BattleTypes.ROYAL,
|
||||
ruleSet = mutableSetOf(BattleRules.OBTAINABLE, BattleRules.PAST, BattleRules.UNOBTAINABLE)
|
||||
battleType = BattleTypes.ROYAL,
|
||||
ruleSet = mutableSetOf(BattleRules.OBTAINABLE, BattleRules.PAST, BattleRules.UNOBTAINABLE)
|
||||
)
|
||||
|
||||
fun loadFromBuffer(buffer: RegistryFriendlyByteBuf): BattleFormat {
|
||||
@@ -58,10 +59,12 @@ data class BattleFormat(
|
||||
val battleType = BattleType.loadFromBuffer(buffer)
|
||||
val ruleSet = mutableSetOf<String>()
|
||||
repeat(times = buffer.readSizedInt(IntSize.U_BYTE)) { ruleSet.add(buffer.readString()) }
|
||||
val adjustLevel = buffer.readSizedInt(IntSize.INT)
|
||||
return BattleFormat(
|
||||
mod = mod,
|
||||
battleType = battleType,
|
||||
ruleSet = ruleSet
|
||||
ruleSet = ruleSet,
|
||||
adjustLevel = adjustLevel
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -71,6 +74,7 @@ data class BattleFormat(
|
||||
battleType.saveToBuffer(buffer)
|
||||
buffer.writeSizedInt(IntSize.U_BYTE, ruleSet.size)
|
||||
ruleSet.forEach(buffer::writeString)
|
||||
buffer.writeSizedInt(IntSize.INT, adjustLevel)
|
||||
return buffer
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -38,7 +38,7 @@ class InitializeInstruction(val instructionSet: InstructionSet, val message: Bat
|
||||
pokemon.entity?.let {
|
||||
// If a Pokémon entity is being recalled with an animation,
|
||||
// wrap up the animation and recall the Pokémon immediately.
|
||||
if (it.beamMode == 3) {
|
||||
if (it.beamMode == 3 && battle.battlePartyStores.isEmpty()) {
|
||||
pokemon.effectedPokemon.recall()
|
||||
}
|
||||
// If already on the field, initialize for the BattleInitializePacket
|
||||
|
||||
+28
@@ -9,11 +9,16 @@
|
||||
package com.cobblemon.mod.common.battles.interpreter.instructions
|
||||
|
||||
import com.bedrockk.molang.runtime.MoLangRuntime
|
||||
import com.bedrockk.molang.runtime.struct.QueryStruct
|
||||
import com.bedrockk.molang.runtime.value.DoubleValue
|
||||
import com.bedrockk.molang.runtime.value.StringValue
|
||||
import com.cobblemon.mod.common.CobblemonNetwork.sendPacket
|
||||
import com.cobblemon.mod.common.api.battles.interpreter.BattleMessage
|
||||
import com.cobblemon.mod.common.api.battles.interpreter.Effect
|
||||
import com.cobblemon.mod.common.api.battles.model.PokemonBattle
|
||||
import com.cobblemon.mod.common.api.molang.MoLangFunctions.addEntityFunctions
|
||||
import com.cobblemon.mod.common.api.molang.MoLangFunctions.addPokemonEntityFunctions
|
||||
import com.cobblemon.mod.common.api.molang.MoLangFunctions.addPokemonFunctions
|
||||
import com.cobblemon.mod.common.api.molang.MoLangFunctions.addStandardFunctions
|
||||
import com.cobblemon.mod.common.api.moves.Moves
|
||||
import com.cobblemon.mod.common.api.moves.animations.ActionEffectContext
|
||||
@@ -26,9 +31,14 @@ import com.cobblemon.mod.common.battles.dispatch.InstructionSet
|
||||
import com.cobblemon.mod.common.battles.dispatch.InterpreterInstruction
|
||||
import com.cobblemon.mod.common.battles.dispatch.UntilDispatch
|
||||
import com.cobblemon.mod.common.battles.pokemon.BattlePokemon
|
||||
import com.cobblemon.mod.common.net.messages.client.battle.BattleAppendTargetedEntityPacket
|
||||
import com.cobblemon.mod.common.pokemon.evolution.progress.UseMoveEvolutionProgress
|
||||
import com.cobblemon.mod.common.util.battleLang
|
||||
import com.cobblemon.mod.common.util.cobblemonResource
|
||||
import net.minecraft.server.level.ServerLevel
|
||||
import net.minecraft.server.level.ServerPlayer
|
||||
import net.minecraft.world.entity.ai.targeting.TargetingConditions
|
||||
import net.minecraft.world.phys.AABB
|
||||
import java.util.concurrent.CompletableFuture
|
||||
|
||||
/**
|
||||
@@ -97,6 +107,13 @@ class MoveInstruction(
|
||||
val runtime = MoLangRuntime().also {
|
||||
battle.addQueryFunctions(it.environment.query).addStandardFunctions()
|
||||
}
|
||||
userPokemon.effectedPokemon.entity?.let {
|
||||
val queryStruct = QueryStruct(hashMapOf())
|
||||
queryStruct.addEntityFunctions(it)
|
||||
queryStruct.addPokemonEntityFunctions(it)
|
||||
queryStruct.addPokemonFunctions(it.pokemon)
|
||||
runtime.environment.variable.setDirectly("user", queryStruct)
|
||||
}
|
||||
|
||||
actionEffect ?: return@dispatch GO
|
||||
val context = ActionEffectContext(
|
||||
@@ -130,6 +147,17 @@ class MoveInstruction(
|
||||
runtime.environment.query.addFunction("move") { move.struct }
|
||||
runtime.environment.query.addFunction("instruction_id") { StringValue(cobblemonResource("move").toString()) }
|
||||
|
||||
if (userPokemon.entity != null && targetPokemon?.entity != null) {
|
||||
//Not the most elegant solution, maybe we should just make the targeted entity a piece of SyncedData
|
||||
val serverLevel = userPokemon.entity!!.level() as? ServerLevel
|
||||
serverLevel?.getNearbyPlayers(
|
||||
TargetingConditions.forNonCombat(),
|
||||
userPokemon.entity!!,
|
||||
AABB.ofSize(userPokemon.entity!!.position(), 128.0, 128.0, 128.0)
|
||||
)?.mapNotNull { it as? ServerPlayer }?.forEach { it.sendPacket(BattleAppendTargetedEntityPacket(userPokemon.entity!!.id, targetPokemon.entity!!.id)) }
|
||||
|
||||
battle.sendUpdate(BattleAppendTargetedEntityPacket(userPokemon.entity!!.id, targetPokemon.entity!!.id))
|
||||
}
|
||||
this.future = actionEffect.run(context)
|
||||
holds = context.holds // Reference so future things can check on this action effect's holds
|
||||
future.thenApply { holds.clear() }
|
||||
|
||||
+24
@@ -25,6 +25,8 @@ import com.cobblemon.mod.common.net.serverhandling.storage.SendOutPokemonHandler
|
||||
import com.cobblemon.mod.common.net.serverhandling.storage.SendOutPokemonHandler.SEND_OUT_STAGGER_BASE_DURATION
|
||||
import com.cobblemon.mod.common.net.serverhandling.storage.SendOutPokemonHandler.SEND_OUT_STAGGER_RANDOM_MAX_DURATION
|
||||
import com.cobblemon.mod.common.util.battleLang
|
||||
import com.cobblemon.mod.common.util.getPlayer
|
||||
import com.cobblemon.mod.common.util.party
|
||||
import com.cobblemon.mod.common.util.swap
|
||||
import java.util.concurrent.CompletableFuture
|
||||
import kotlin.random.Random
|
||||
@@ -89,6 +91,28 @@ class SwitchInstruction(val instructionSet: InstructionSet, val battleActor: Bat
|
||||
}
|
||||
GO
|
||||
}
|
||||
|
||||
val futureSwitches = instructionSet.getSubsequentInstructions(this).filterIsInstance<SwitchInstruction>()
|
||||
if (futureSwitches.isEmpty()) {
|
||||
if (battle.format.adjustLevel > 0) {
|
||||
// means battle is using clone teams, recall the "real" pokemon before the sendouts occur
|
||||
var waitOnRecall = false
|
||||
battle.actors.forEach { it ->
|
||||
val playerUUIDS = it.getPlayerUUIDs()
|
||||
playerUUIDS.forEach { uuid ->
|
||||
uuid.getPlayer()?.party()?.forEach { pokemon ->
|
||||
if (pokemon.entity != null) {
|
||||
waitOnRecall = true
|
||||
pokemon.entity!!.recallWithAnimation()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (waitOnRecall) {
|
||||
battle.dispatchWaitingToFront(SEND_OUT_DURATION) { }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
battle.dispatchInsert {
|
||||
|
||||
@@ -22,6 +22,8 @@ import com.cobblemon.mod.common.net.messages.client.battle.BattleUpdateTeamPokem
|
||||
import com.cobblemon.mod.common.pokemon.IVs
|
||||
import com.cobblemon.mod.common.pokemon.Nature
|
||||
import com.cobblemon.mod.common.pokemon.Pokemon
|
||||
import com.cobblemon.mod.common.pokemon.properties.BattleCloneProperty
|
||||
import com.cobblemon.mod.common.pokemon.properties.UncatchableProperty
|
||||
import com.cobblemon.mod.common.util.battleLang
|
||||
import java.util.UUID
|
||||
import net.minecraft.network.chat.MutableComponent
|
||||
@@ -33,11 +35,16 @@ open class BattlePokemon(
|
||||
) {
|
||||
lateinit var actor: BattleActor
|
||||
companion object {
|
||||
fun safeCopyOf(pokemon: Pokemon): BattlePokemon = BattlePokemon(
|
||||
originalPokemon = pokemon,
|
||||
effectedPokemon = pokemon.clone(),
|
||||
postBattleEntityOperation = { entity -> entity.discard() }
|
||||
)
|
||||
fun safeCopyOf(pokemon: Pokemon): BattlePokemon {
|
||||
val effectedPokemon = pokemon.clone()
|
||||
BattleCloneProperty.isBattleClone().apply(effectedPokemon)
|
||||
UncatchableProperty.uncatchable().apply(effectedPokemon)
|
||||
return BattlePokemon(
|
||||
originalPokemon = pokemon,
|
||||
effectedPokemon = effectedPokemon,
|
||||
postBattleEntityOperation = { it.recallWithAnimation() }
|
||||
)
|
||||
}
|
||||
|
||||
fun playerOwned(pokemon: Pokemon): BattlePokemon = BattlePokemon(
|
||||
originalPokemon = pokemon,
|
||||
|
||||
@@ -23,6 +23,7 @@ import net.minecraft.world.level.LevelReader
|
||||
import net.minecraft.world.level.block.Block
|
||||
import net.minecraft.world.level.block.Blocks
|
||||
import net.minecraft.world.level.block.CropBlock
|
||||
import net.minecraft.world.level.block.FarmBlock
|
||||
import net.minecraft.world.level.block.state.BlockState
|
||||
import net.minecraft.world.level.block.state.StateDefinition
|
||||
import net.minecraft.world.level.block.state.properties.BooleanProperty
|
||||
@@ -98,12 +99,61 @@ class RevivalHerbBlock(settings: Properties) : CropBlock(settings), Mulchable {
|
||||
if (world.getRawBrightness(pos, 0) < 9 || this.isMaxAge(state)) {
|
||||
return
|
||||
}
|
||||
val currentMoisture = getGrowthSpeed(this, world, pos)
|
||||
val currentMoisture = getMoistureAmount(this, world, pos)
|
||||
if (random.nextInt((25F / currentMoisture).toInt() + 1) == 0) {
|
||||
this.growCrops(world, pos, state, false)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is a copy pasta of [CropBlock.getGrowthSpeed]. Why? Because neoforge changes the signature of this
|
||||
* vanilla method, breaking us at runtime. To prevent this, we simply avoid using the vanilla method and create our own,
|
||||
* while not ideal, it works....
|
||||
*/
|
||||
fun getMoistureAmount(block: Block, level: BlockGetter, pos: BlockPos): Float {
|
||||
var growthSpeed = 1.0F
|
||||
var ground = pos.below()
|
||||
|
||||
for(x in -1..1) {
|
||||
for(z in -1..1) {
|
||||
var nearbyFarmLandBoost = 0.0F
|
||||
var blockState = level.getBlockState(ground.offset(x, 0, z))
|
||||
if (blockState.`is`(Blocks.FARMLAND)) {
|
||||
nearbyFarmLandBoost = 1.0F
|
||||
if (blockState.getValue(FarmBlock.MOISTURE) > 0) {
|
||||
nearbyFarmLandBoost = 3.0F
|
||||
}
|
||||
}
|
||||
|
||||
if (x != 0 || z != 0) {
|
||||
nearbyFarmLandBoost /= 4.0F
|
||||
}
|
||||
|
||||
growthSpeed += nearbyFarmLandBoost
|
||||
}
|
||||
}
|
||||
|
||||
var north = pos.north()
|
||||
var south = pos.south()
|
||||
var west = pos.west()
|
||||
var east = pos.east()
|
||||
var sameBlockDirectNeighborXAxis = level.getBlockState(west).`is`(block) || level.getBlockState(east).`is`(block)
|
||||
var sameBlockDirectNeighborZAxis = level.getBlockState(north).`is`(block) || level.getBlockState(south).`is`(block)
|
||||
if (sameBlockDirectNeighborZAxis && sameBlockDirectNeighborXAxis) {
|
||||
growthSpeed /= 2.0F
|
||||
} else {
|
||||
var sameBlockDiagonallyPresent = level.getBlockState(west.north()).`is`(block) ||
|
||||
level.getBlockState(east.north()).`is`(block) ||
|
||||
level.getBlockState(east.south()).`is`(block) ||
|
||||
level.getBlockState(west.south()).`is`(block)
|
||||
if (sameBlockDiagonallyPresent) {
|
||||
growthSpeed /= 2.0F
|
||||
}
|
||||
}
|
||||
|
||||
return growthSpeed
|
||||
}
|
||||
|
||||
override fun growCrops(world: Level, pos: BlockPos, state: BlockState) {
|
||||
this.growCrops(world, pos, state, true)
|
||||
}
|
||||
|
||||
+4
-2
@@ -14,6 +14,7 @@ import com.bedrockk.molang.runtime.value.StringValue
|
||||
import com.cobblemon.mod.common.Cobblemon
|
||||
import com.cobblemon.mod.common.CobblemonSounds
|
||||
import com.cobblemon.mod.common.api.entity.PokemonSideDelegate
|
||||
import com.cobblemon.mod.common.api.molang.MoLangFunctions.addEntityFunctions
|
||||
import com.cobblemon.mod.common.api.molang.MoLangFunctions.addFunctions
|
||||
import com.cobblemon.mod.common.api.pokemon.PokemonSpecies
|
||||
import com.cobblemon.mod.common.api.scheduling.ScheduledTask
|
||||
@@ -45,8 +46,6 @@ import net.minecraft.world.InteractionHand
|
||||
import net.minecraft.world.entity.Entity
|
||||
import net.minecraft.world.entity.player.Player
|
||||
import net.minecraft.world.phys.Vec3
|
||||
import java.util.UUID
|
||||
import java.util.concurrent.ConcurrentHashMap
|
||||
|
||||
class PokemonClientDelegate : PosableState(), PokemonSideDelegate {
|
||||
companion object {
|
||||
@@ -94,6 +93,8 @@ class PokemonClientDelegate : PosableState(), PokemonSideDelegate {
|
||||
private var scaleAnimTask: ScheduledTask? = null
|
||||
private var cryAnimation: ActiveAnimation? = null
|
||||
|
||||
var targetedEntityId: Int? = null
|
||||
|
||||
override fun onSyncedDataUpdated(data: EntityDataAccessor<*>) {
|
||||
super.onSyncedDataUpdated(data)
|
||||
if (this::currentEntity.isInitialized) {
|
||||
@@ -339,6 +340,7 @@ class PokemonClientDelegate : PosableState(), PokemonSideDelegate {
|
||||
struct.addFunctions(functions.functions)
|
||||
struct.addFunctions(ClientMoLangFunctions.clientFunctions)
|
||||
runtime.environment.query = struct
|
||||
addEnemyFunctions(struct)
|
||||
}
|
||||
|
||||
override fun initialize(entity: PokemonEntity) {
|
||||
|
||||
@@ -312,6 +312,7 @@ class BattleOverlay : Gui(Minecraft.getInstance()), Schedulable {
|
||||
drawPokeBall(
|
||||
state = ballState,
|
||||
matrixStack = matrixStack,
|
||||
reversed = reversed,
|
||||
partialTicks = partialTicks
|
||||
)
|
||||
} else {
|
||||
|
||||
+88
-12
@@ -36,6 +36,8 @@ class BattleConfigureGUI(
|
||||
private val backgroundResource = cobblemonResource("textures/gui/interact/request/battle_request.png")
|
||||
private val battleArrowsResource = cobblemonResource("textures/gui/interact/request/battle_request_arrows.png")
|
||||
private var requestButton: BattleRequestButton? = null
|
||||
var autoLevelNavButtonLeft: BattleRequestNavigationButton? = null
|
||||
var autoLevelNavButtonRight: BattleRequestNavigationButton? = null
|
||||
|
||||
val battleRequestMap = mutableMapOf(
|
||||
Pair(
|
||||
@@ -140,6 +142,8 @@ class BattleConfigureGUI(
|
||||
),
|
||||
)
|
||||
|
||||
val levelRulesetOption = mutableListOf(-1, 50, 100, 5)
|
||||
|
||||
fun sendBattleRequest(battleFormat: BattleFormat, packet: PlayerInteractOptionsPacket) {
|
||||
BattleChallengePacket(packet.numericTargetId, packet.selectedPokemonId, battleFormat).sendToServer()
|
||||
}
|
||||
@@ -173,6 +177,16 @@ class BattleConfigureGUI(
|
||||
else 0
|
||||
}
|
||||
|
||||
private var levelRulesetOptionIndex = 0
|
||||
set(value) {
|
||||
// If value is within min and max
|
||||
field = if (value > 0 && value < levelRulesetOption.count()) value
|
||||
// If value is less than zero, wrap around to end
|
||||
else if (value < 0) levelRulesetOption.count() - 1
|
||||
// Else it's greater than max, wrap around to start
|
||||
else 0
|
||||
}
|
||||
|
||||
private var targetName = Component.literal("Target Name").bold()
|
||||
private var hasRequest = false
|
||||
private var ticksPassed = 0F
|
||||
@@ -182,13 +196,16 @@ class BattleConfigureGUI(
|
||||
|
||||
|
||||
override fun init() {
|
||||
|
||||
val challenge = activeRequest
|
||||
targetName = Minecraft.getInstance().player?.level()?.getPlayerByUUID(packet.targetId)?.name?.plainCopy()?.bold() ?: targetName
|
||||
hasRequest = challenge != null || activeTeamRequest != null
|
||||
if (activeTeamRequest != null) {
|
||||
options = listOf(PlayerInteractOptionsPacket.Options.TEAM_REQUEST)
|
||||
} else if (challenge != null) {
|
||||
options = packet.options.keys.filter { packet.options[it] === PlayerInteractOptionsPacket.OptionStatus.AVAILABLE && battleRequestMap[it]?.battleFormat?.battleType?.name == challenge.battleFormat?.battleType?.name }
|
||||
options = packet.options.keys.filter { packet.options[it] === PlayerInteractOptionsPacket.OptionStatus.AVAILABLE && battleRequestMap[it]?.battleFormat?.battleType?.name == challenge.battleFormat?.battleType?.name }
|
||||
val level = challenge.battleFormat?.adjustLevel ?: -1
|
||||
levelRulesetOptionIndex = maxOf(0, levelRulesetOption.indexOf(level))
|
||||
} else {
|
||||
options = packet.options.keys.filter { packet.options[it] === PlayerInteractOptionsPacket.OptionStatus.AVAILABLE && battleRequestMap.containsKey(it) }.toList()
|
||||
}
|
||||
@@ -228,21 +245,24 @@ class BattleConfigureGUI(
|
||||
) {
|
||||
//TODO: add additional battle rules, otherwise this call feels pretty silly
|
||||
battleRequestMap[options[currentPage]]?.onRequest?.let { it1 ->
|
||||
it1(packet, battleRequestMap[options[currentPage]]?.battleFormat ?: BattleFormat.GEN_9_SINGLES) }
|
||||
val battleFormat = battleRequestMap[options[currentPage]]?.battleFormat ?: BattleFormat.GEN_9_SINGLES
|
||||
val level = levelRulesetOption[levelRulesetOptionIndex]
|
||||
battleFormat.adjustLevel = level
|
||||
it1(packet, battleFormat)
|
||||
}
|
||||
closeGUI()
|
||||
}
|
||||
requestButton?.let {
|
||||
this.addRenderableWidget(
|
||||
it
|
||||
)
|
||||
this.addRenderableWidget(it)
|
||||
}
|
||||
|
||||
// Selection buttons
|
||||
// BattleFormat Selection buttons
|
||||
this.addRenderableWidget(
|
||||
BattleRequestNavigationButton(
|
||||
pX = x + 2,
|
||||
pY = y + 30,
|
||||
forward = false
|
||||
pX = x + 2,
|
||||
pY = y + 30,
|
||||
clickHeight = BattleRequestNavigationButton.HEIGHT * 6,
|
||||
forward = false
|
||||
) { currentPage = (currentPage - 1) % options.count()
|
||||
updateRequestButtonText()
|
||||
}
|
||||
@@ -250,13 +270,33 @@ class BattleConfigureGUI(
|
||||
|
||||
this.addRenderableWidget(
|
||||
BattleRequestNavigationButton(
|
||||
pX = x + 106,
|
||||
pY = y + 30,
|
||||
forward = true
|
||||
pX = x + 106,
|
||||
pY = y + 30,
|
||||
clickHeight = BattleRequestNavigationButton.HEIGHT * 6,
|
||||
forward = true
|
||||
) { currentPage = (currentPage + 1) % options.count()
|
||||
updateRequestButtonText()
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
if (battleRequestMap[options[currentPage]]?.option != PlayerInteractOptionsPacket.Options.TEAM_REQUEST) {
|
||||
|
||||
// Level Selection buttons
|
||||
autoLevelNavButtonLeft = BattleRequestNavigationButton(
|
||||
pX = x + 15,
|
||||
pY = y + 75,
|
||||
forward = false
|
||||
) { levelRulesetOptionIndex -= 1 }
|
||||
this.addRenderableWidget(autoLevelNavButtonLeft)
|
||||
|
||||
autoLevelNavButtonRight = BattleRequestNavigationButton(
|
||||
pX = x + 93,
|
||||
pY = y + 75,
|
||||
forward = true
|
||||
) {levelRulesetOptionIndex += 1 }
|
||||
this.addRenderableWidget(autoLevelNavButtonRight)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -328,6 +368,42 @@ class BattleConfigureGUI(
|
||||
shadow = true
|
||||
)
|
||||
|
||||
if (battleRequestMap[options[currentPage]]?.option != PlayerInteractOptionsPacket.Options.TEAM_REQUEST) {
|
||||
// Level Rule Display Text
|
||||
drawScaledText(
|
||||
context = context,
|
||||
font = CobblemonResources.DEFAULT_LARGE,
|
||||
text = if (levelRulesetOption[levelRulesetOptionIndex] < 0) lang("challenge.rule.anything_goes").bold()
|
||||
else lang("challenge.rule.level", levelRulesetOption[levelRulesetOptionIndex]).bold(),
|
||||
x = x + 55,
|
||||
y = y + 75,
|
||||
centered = true,
|
||||
shadow = true
|
||||
)
|
||||
|
||||
autoLevelNavButtonLeft.let {
|
||||
if (it != null) {
|
||||
it.active = true
|
||||
}
|
||||
}
|
||||
autoLevelNavButtonRight.let {
|
||||
if (it != null) {
|
||||
it.active = true
|
||||
}
|
||||
}
|
||||
} else {
|
||||
autoLevelNavButtonLeft.let {
|
||||
if (it != null) {
|
||||
it.active = false
|
||||
}
|
||||
}
|
||||
autoLevelNavButtonRight.let {
|
||||
if (it != null) {
|
||||
it.active = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Opponent display name
|
||||
drawScaledText(
|
||||
context = context,
|
||||
|
||||
+10
-7
@@ -19,25 +19,28 @@ import net.minecraft.network.chat.Component
|
||||
|
||||
class BattleRequestNavigationButton(
|
||||
pX: Int, pY: Int,
|
||||
private val clickHeight: Float = HEIGHT,
|
||||
private val forward: Boolean,
|
||||
onPress: OnPress
|
||||
): Button(pX, pY, (WIDTH * SCALE).toInt(), (CLICK_HEIGHT * SCALE).toInt(), Component.literal("Navigation"), onPress, DEFAULT_NARRATION) {
|
||||
): Button(pX, pY, (WIDTH * SCALE).toInt(), (clickHeight * SCALE).toInt(), Component.literal("Navigation"), onPress, DEFAULT_NARRATION) {
|
||||
|
||||
companion object {
|
||||
private const val WIDTH = 9F
|
||||
private const val HEIGHT = 16F
|
||||
private const val CLICK_HEIGHT = HEIGHT * 6
|
||||
private const val SCALE = 0.5F
|
||||
const val WIDTH = 9F
|
||||
const val HEIGHT = 16F
|
||||
const val SCALE = 0.5F
|
||||
private val forwardButtonResource = cobblemonResource("textures/gui/interact/request/arrow_right.png")
|
||||
private val backwardsButtonResource = cobblemonResource("textures/gui/interact/request/arrow_left.png")
|
||||
}
|
||||
|
||||
override fun renderWidget(context: GuiGraphics, pMouseX: Int, pMouseY: Int, pPartialTicks: Float) {
|
||||
if (!isActive) {
|
||||
return
|
||||
}
|
||||
val hovered = (isHovered(pMouseX.toDouble(), pMouseY.toDouble()))
|
||||
blitk(
|
||||
matrixStack = context.pose(),
|
||||
x = x / SCALE,
|
||||
y = (y + (CLICK_HEIGHT - HEIGHT) / 4) / SCALE,
|
||||
y = (y + (clickHeight - HEIGHT) / 4) / SCALE,
|
||||
texture = if (forward) forwardButtonResource else backwardsButtonResource,
|
||||
width = WIDTH,
|
||||
height = HEIGHT,
|
||||
@@ -51,5 +54,5 @@ class BattleRequestNavigationButton(
|
||||
soundManager.play(SimpleSoundInstance.forUI(CobblemonSounds.PC_CLICK, 1.0F))
|
||||
}
|
||||
|
||||
fun isHovered(mouseX: Double, mouseY: Double) = mouseX.toFloat() in (x.toFloat()..(x.toFloat() + (WIDTH * SCALE))) && mouseY.toFloat() in ((y.toFloat())..(y.toFloat() + (CLICK_HEIGHT * SCALE)))
|
||||
fun isHovered(mouseX: Double, mouseY: Double) = mouseX.toFloat() in (x.toFloat()..(x.toFloat() + (WIDTH * SCALE))) && mouseY.toFloat() in ((y.toFloat())..(y.toFloat() + (clickHeight * SCALE)))
|
||||
}
|
||||
@@ -314,26 +314,26 @@ class Summary private constructor(party: Collection<Pokemon?>, private val edita
|
||||
when (screen) {
|
||||
INFO -> {
|
||||
mainScreen = InfoWidget(
|
||||
pX = x + 77,
|
||||
pY = y + 12,
|
||||
pokemon = this.selectedPokemon
|
||||
pX = x + 77,
|
||||
pY = y + 12,
|
||||
pokemon = this.selectedPokemon
|
||||
)
|
||||
}
|
||||
|
||||
MOVES -> {
|
||||
mainScreen = MovesWidget(
|
||||
pX = x + 77,
|
||||
pY = y + 12,
|
||||
summary = this
|
||||
pX = x + 77,
|
||||
pY = y + 12,
|
||||
summary = this
|
||||
)
|
||||
}
|
||||
|
||||
STATS -> {
|
||||
mainScreen = StatWidget(
|
||||
pX = x + 77,
|
||||
pY = y + 12,
|
||||
pokemon = this.selectedPokemon,
|
||||
tabIndex = subIndex
|
||||
pX = x + 77,
|
||||
pY = y + 12,
|
||||
pokemon = this.selectedPokemon,
|
||||
tabIndex = subIndex
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -365,19 +365,16 @@ class Summary private constructor(party: Collection<Pokemon?>, private val edita
|
||||
val movesWidget = mainScreen
|
||||
if (movesWidget is MovesWidget) {
|
||||
sideScreen = MoveSwapScreen(
|
||||
x + 216,
|
||||
y + 24,
|
||||
movesWidget = movesWidget,
|
||||
replacedMove = move
|
||||
x + 216,
|
||||
y + 24,
|
||||
movesWidget = movesWidget,
|
||||
replacedMove = move
|
||||
).also { switchPane ->
|
||||
val pokemon = selectedPokemon
|
||||
var moveSlotList = (pokemon.allAccessibleMoves
|
||||
.filter { template -> pokemon.moveSet.none { it.template == template } }
|
||||
.map { template ->
|
||||
val benched = pokemon.benchedMoves.find { it.moveTemplate == template }
|
||||
MoveSwapScreen.MoveSlot(switchPane, template, benched?.ppRaisedStages
|
||||
?: 0, pokemon)
|
||||
})
|
||||
var moveSlotList = pokemon.relearnableMoves.map { template ->
|
||||
val benched = pokemon.benchedMoves.find { it.moveTemplate == template }
|
||||
MoveSwapScreen.MoveSlot(switchPane, template, benched?.ppRaisedStages ?: 0, pokemon)
|
||||
}
|
||||
if (pokemon.moveSet.getMoves().size > 1 && move != null) {
|
||||
// Adds the "Forget" slot
|
||||
moveSlotList += MoveSwapScreen.MoveSlot(switchPane, null, 0, pokemon)
|
||||
|
||||
+3
-3
@@ -111,9 +111,9 @@ class MoveSlotWidget(
|
||||
|
||||
var movePPText = Component.literal("${move.currentPp}/${move.maxPp}").bold()
|
||||
|
||||
if (move.currentPp <= Mth.floor(move.maxPp / 2F)) {
|
||||
movePPText = if (move.currentPp == 0) movePPText.red() else movePPText.gold()
|
||||
}
|
||||
if (move.currentPp <= Mth.floor(move.maxPp / 2F)) {
|
||||
movePPText = if (move.currentPp == 0) movePPText.red() else movePPText.gold()
|
||||
}
|
||||
|
||||
drawScaledText(
|
||||
context = context,
|
||||
|
||||
+1
-1
@@ -49,7 +49,7 @@ class MovesWidget(
|
||||
|
||||
private var index = -1
|
||||
private val moves = (
|
||||
if (summary.selectedPokemon.benchedMoves.count() > 0)
|
||||
if (summary.selectedPokemon.relearnableMoves.count() > 0)
|
||||
summary.selectedPokemon.moveSet.getMovesWithNulls()
|
||||
else summary.selectedPokemon.moveSet
|
||||
).map { move ->
|
||||
|
||||
+1
-1
@@ -49,7 +49,7 @@ class SwapMoveButton(
|
||||
val selected = if (swapScreen is MoveSwapScreen) swapScreen.replacedMove?.template == move else false
|
||||
blitk(
|
||||
matrixStack = context.pose(),
|
||||
texture = if(move == null) addMoveButtonResource else switchMoveButtonResource,
|
||||
texture = if (move == null) addMoveButtonResource else switchMoveButtonResource,
|
||||
x = (pX + OFFSET_X) / SCALE,
|
||||
y = (pY + OFFSET_Y) / SCALE,
|
||||
width = WIDTH,
|
||||
|
||||
@@ -22,7 +22,7 @@ class ModelWidget(
|
||||
pX: Int, pY: Int,
|
||||
pWidth: Int, pHeight: Int,
|
||||
var pokemon: RenderablePokemon,
|
||||
val baseScale: Float = 2.7F,
|
||||
var baseScale: Float = 2.7F,
|
||||
var rotationY: Float = 35F,
|
||||
var offsetY: Double = 0.0
|
||||
): SoundlessWidget(pX, pY, pWidth, pHeight, Component.literal("Trade - ModelWidget")) {
|
||||
|
||||
@@ -60,13 +60,7 @@ open class PartySlot(
|
||||
}
|
||||
|
||||
if (pokemon != null) {
|
||||
context.enableScissor(
|
||||
x - 2,
|
||||
y + 2,
|
||||
x + SIZE + 4,
|
||||
y + SIZE + 4
|
||||
)
|
||||
|
||||
// context.enableScissor(x - 2, y + 2, x + SIZE + 4, y + SIZE + 4)
|
||||
// Render Pokémon
|
||||
matrices.pushPose()
|
||||
matrices.translate(x + (SIZE / 2.0), y + 1.0, 0.0)
|
||||
@@ -81,7 +75,7 @@ open class PartySlot(
|
||||
)
|
||||
matrices.popPose()
|
||||
|
||||
context.disableScissor()
|
||||
// context.disableScissor()
|
||||
|
||||
// Ensure elements are not hidden behind Pokémon render
|
||||
matrices.pushPose()
|
||||
|
||||
@@ -36,7 +36,7 @@ class TradeButton(
|
||||
}
|
||||
|
||||
override fun renderWidget(context: GuiGraphics, mouseX: Int, mouseY: Int, delta: Float) {
|
||||
val enabled = parent.offeredPokemon != null && parent.opposingOfferedPokemon != null && parent.protectiveTicks <= 0
|
||||
val enabled = parent.offeredPokemon != null && parent.opposingOfferedPokemon != null && parent.protectiveTicks <= 0 && !parent.tradeProcessing
|
||||
val active = parent.trade.acceptedOppositeOffer && !parent.trade.oppositeAcceptedMyOffer.get()
|
||||
|
||||
val texture = if (!enabled) buttonDisabledResource
|
||||
@@ -52,14 +52,13 @@ class TradeButton(
|
||||
textureHeight = HEIGHT * 2
|
||||
)
|
||||
|
||||
|
||||
val label = if (active) ".".repeat(parent.readyProgress).text() else lang("ui.trade")
|
||||
drawScaledText(
|
||||
context = context,
|
||||
font = CobblemonResources.DEFAULT_LARGE,
|
||||
text = label.bold(),
|
||||
x = x + (WIDTH / 2),
|
||||
y = y + 2.5,
|
||||
y = y + (if (active) 1 else 3),
|
||||
centered = true,
|
||||
shadow = true
|
||||
)
|
||||
|
||||
@@ -21,11 +21,10 @@ import com.cobblemon.mod.common.client.gui.TypeIcon
|
||||
import com.cobblemon.mod.common.client.gui.summary.Summary
|
||||
import com.cobblemon.mod.common.client.gui.summary.widgets.common.reformatNatureTextIfMinted
|
||||
import com.cobblemon.mod.common.client.render.drawScaledText
|
||||
import com.cobblemon.mod.common.client.render.drawScaledTextJustifiedRight
|
||||
import com.cobblemon.mod.common.client.trade.ClientTrade
|
||||
import com.cobblemon.mod.common.net.messages.client.trade.TradeStartedPacket.TradeablePokemon
|
||||
import com.cobblemon.mod.common.net.messages.server.trade.CancelTradePacket
|
||||
import com.cobblemon.mod.common.net.messages.server.trade.ChangeTradeAcceptancePacket
|
||||
import com.cobblemon.mod.common.net.messages.server.trade.UpdateTradeOfferPacket
|
||||
import com.cobblemon.mod.common.net.messages.server.trade.*
|
||||
import com.cobblemon.mod.common.pokemon.Gender
|
||||
import com.cobblemon.mod.common.pokemon.Pokemon
|
||||
import com.cobblemon.mod.common.util.asTranslated
|
||||
@@ -36,6 +35,7 @@ import net.minecraft.client.Minecraft
|
||||
import net.minecraft.client.gui.GuiGraphics
|
||||
import net.minecraft.client.gui.screens.Screen
|
||||
import net.minecraft.client.resources.sounds.SimpleSoundInstance
|
||||
import net.minecraft.client.resources.sounds.SoundInstance
|
||||
import net.minecraft.network.chat.MutableComponent
|
||||
import net.minecraft.sounds.SoundEvent
|
||||
import java.util.*
|
||||
@@ -61,12 +61,25 @@ class TradeGUI(
|
||||
const val BASE_BACKGROUND_HEIGHT = 85
|
||||
const val PARTY_SLOT_PADDING = 4
|
||||
const val PORTRAIT_SIZE = 78
|
||||
const val PORTRAIT_SCALE = 2F
|
||||
const val PORTRAIT_SCALE_MULTIPLIER = 0.4F
|
||||
const val PORTRAIT_MODEL_OFFSET_Y = -8.0
|
||||
const val TYPE_SPACER_WIDTH = 134
|
||||
const val TYPE_SPACER_HEIGHT = 12
|
||||
const val TRADE_READY_WIDTH = 28
|
||||
const val TRADE_READY_HEIGHT = 6
|
||||
const val TRADE_READY_TOP_HEIGHT = 5
|
||||
const val READY_PROGRESS_LIMIT = 6
|
||||
const val TRADE_ANIMATION_WIDTH = 114
|
||||
const val TRADE_ANIMATION_HEIGHT = 133
|
||||
const val TRADE_ANIMATION_ARROWS_WIDTH = 69
|
||||
const val TRADE_ANIMATION_FRAMES = 13
|
||||
const val TRADE_ANIMATION_ARROWS_FRAMES = 18
|
||||
const val MODEL_SCALE_BUFFER_FRAMES = 3
|
||||
const val REVERSE_ANIMATION_TICK = TRADE_ANIMATION_FRAMES + MODEL_SCALE_BUFFER_FRAMES + TRADE_ANIMATION_ARROWS_FRAMES
|
||||
const val MAX_TRADE_PROGRESS = REVERSE_ANIMATION_TICK + TRADE_ANIMATION_FRAMES + MODEL_SCALE_BUFFER_FRAMES
|
||||
const val CRY_BUFFER = 7
|
||||
|
||||
const val SCALE = 0.5F
|
||||
|
||||
private val baseResource = cobblemonResource("textures/gui/trade/trade_base.png")
|
||||
@@ -78,6 +91,8 @@ class TradeGUI(
|
||||
private val tradeReadyTopResource = cobblemonResource("textures/gui/trade/trade_ready_top.png")
|
||||
private val opposingTradeReadyResource = cobblemonResource("textures/gui/trade/trade_ready_opposing.png")
|
||||
private val opposingTradeReadyTopResource = cobblemonResource("textures/gui/trade/trade_ready_top_opposing.png")
|
||||
private val tradeAnimationResource = cobblemonResource("textures/gui/trade/trade_animation.png")
|
||||
private val tradeAnimationArrowsResource = cobblemonResource("textures/gui/trade/trade_animation_arrows.png")
|
||||
}
|
||||
|
||||
private var offeredPokemonModel: ModelWidget? = null
|
||||
@@ -87,15 +102,20 @@ class TradeGUI(
|
||||
var opposingOfferedPokemon: Pokemon? = null
|
||||
|
||||
var ticksElapsed = 0
|
||||
var protectiveTicks = 0
|
||||
var selectPointerOffsetY = 0
|
||||
var readyProgress = 0
|
||||
var tradeAnimationProgress = 0
|
||||
var selectPointerOffsetIncrement = false
|
||||
var protectiveTicks = 0
|
||||
var tradeProcessing = false
|
||||
var isTradeInitiator = false
|
||||
|
||||
var tradeSoundInstance: SoundInstance? = null
|
||||
|
||||
init {
|
||||
trade.cancelEmitter.subscribe {
|
||||
cancelTradeSound()
|
||||
super.onClose()
|
||||
// Maybe a sound
|
||||
}
|
||||
|
||||
trade.completedEmitter.subscribe {
|
||||
@@ -106,30 +126,36 @@ class TradeGUI(
|
||||
CobblemonNetwork.sendToServer(CancelTradePacket())
|
||||
return@subscribe onClose()
|
||||
}
|
||||
val i1 = party.indexOf(myTradedPokemon)
|
||||
val i2 = traderParty.indexOf(theirTradedPokemon)
|
||||
party[i1] = theirTradedPokemon
|
||||
traderParty[i2] = myTradedPokemon
|
||||
offeredPokemon = null
|
||||
opposingOfferedPokemon = null
|
||||
ticksElapsed = 0
|
||||
readyProgress = 0
|
||||
val tradedSlot = party.indexOf(myTradedPokemon)
|
||||
val opposingTradedSlot = traderParty.indexOf(theirTradedPokemon)
|
||||
party[tradedSlot] = theirTradedPokemon
|
||||
traderParty[opposingTradedSlot] = myTradedPokemon
|
||||
|
||||
trade.oppositeAcceptedMyOffer.set(false)
|
||||
setOfferedPokemon(pokemon = null, isOpposing = true)
|
||||
setOfferedPokemon(pokemon = null, isOpposing = false)
|
||||
CobblemonNetwork.sendToServer(UpdateTradeOfferPacket(Pair(theirTradedPokemon.pokemonId, PartyPosition(tradedSlot))))
|
||||
|
||||
rebuildWidgets()
|
||||
// Make a sound maybe
|
||||
}
|
||||
|
||||
trade.oppositeOffer.subscribe { newOffer: Pokemon? ->
|
||||
setOfferedPokemon(pokemon = newOffer, isOpposing = true)
|
||||
}
|
||||
|
||||
trade.myOffer.subscribe { myOffer: Pokemon? ->
|
||||
setOfferedPokemon(pokemon = myOffer)
|
||||
}
|
||||
|
||||
trade.oppositeAcceptedMyOffer.subscribe {
|
||||
ticksElapsed = 0
|
||||
readyProgress = 0
|
||||
}
|
||||
|
||||
trade.tradeProcessing.subscribe {
|
||||
val (processStatus, isInitiator) = it
|
||||
tradeProcessing = processStatus
|
||||
isTradeInitiator = isInitiator
|
||||
tradeAnimationProgress = 0
|
||||
}
|
||||
}
|
||||
|
||||
override fun init() {
|
||||
@@ -152,17 +178,11 @@ class TradeGUI(
|
||||
y = y + 119,
|
||||
parent = this,
|
||||
onPress = {
|
||||
if (offeredPokemon != null && opposingOfferedPokemon != null && protectiveTicks <= 0) {
|
||||
if (offeredPokemon != null && opposingOfferedPokemon != null && protectiveTicks <= 0 && !tradeProcessing) {
|
||||
ticksElapsed = 0
|
||||
if (trade.acceptedOppositeOffer) {
|
||||
// trade.acceptedOppositeOffer = false;
|
||||
readyProgress = 0
|
||||
CobblemonNetwork.sendToServer(ChangeTradeAcceptancePacket(opposingOfferedPokemon!!.uuid, false))
|
||||
} else {
|
||||
// trade.acceptedOppositeOffer = true;
|
||||
readyProgress = 0
|
||||
CobblemonNetwork.sendToServer(ChangeTradeAcceptancePacket(opposingOfferedPokemon!!.uuid, true))
|
||||
}
|
||||
readyProgress = 0
|
||||
CobblemonNetwork.sendToServer(ChangeTradeAcceptancePacket(opposingOfferedPokemon!!.uuid, !trade.acceptedOppositeOffer))
|
||||
playSound(CobblemonSounds.GUI_CLICK)
|
||||
}
|
||||
}
|
||||
)
|
||||
@@ -190,9 +210,10 @@ class TradeGUI(
|
||||
pokemon = pokemon,
|
||||
parent = this,
|
||||
onPress = {
|
||||
if (!trade.acceptedOppositeOffer) {
|
||||
if (!trade.acceptedOppositeOffer && !tradeProcessing) {
|
||||
val pk = if (offeredPokemon?.uuid == pokemon?.pokemonId) null else pokemon
|
||||
CobblemonNetwork.sendToServer(UpdateTradeOfferPacket(pk?.let { it.pokemonId to PartyPosition(partyIndex) }))
|
||||
playSound(CobblemonSounds.GUI_CLICK)
|
||||
}
|
||||
}
|
||||
).also { widget -> addRenderableWidget(widget) }
|
||||
@@ -244,16 +265,59 @@ class TradeGUI(
|
||||
height = BASE_BACKGROUND_HEIGHT
|
||||
)
|
||||
|
||||
if (
|
||||
(tradeAnimationProgress in MODEL_SCALE_BUFFER_FRAMES until(TRADE_ANIMATION_FRAMES + MODEL_SCALE_BUFFER_FRAMES)) ||
|
||||
(tradeAnimationProgress in (REVERSE_ANIMATION_TICK..(REVERSE_ANIMATION_TICK + TRADE_ANIMATION_FRAMES)).drop(1))
|
||||
) {
|
||||
val frameOffset = (
|
||||
if (tradeAnimationProgress > REVERSE_ANIMATION_TICK)
|
||||
(REVERSE_ANIMATION_TICK + TRADE_ANIMATION_FRAMES - tradeAnimationProgress)
|
||||
else (tradeAnimationProgress - MODEL_SCALE_BUFFER_FRAMES)
|
||||
) * TRADE_ANIMATION_HEIGHT
|
||||
blitk(
|
||||
matrixStack = matrices,
|
||||
texture = tradeAnimationResource,
|
||||
x = (x + 80.5) / SCALE,
|
||||
y = (y + 31) / SCALE,
|
||||
width = TRADE_ANIMATION_WIDTH,
|
||||
height = TRADE_ANIMATION_HEIGHT,
|
||||
vOffset = frameOffset,
|
||||
textureHeight = TRADE_ANIMATION_HEIGHT * TRADE_ANIMATION_FRAMES,
|
||||
scale = SCALE
|
||||
)
|
||||
|
||||
blitk(
|
||||
matrixStack = matrices,
|
||||
texture = tradeAnimationResource,
|
||||
x = (x + 155.5) / SCALE,
|
||||
y = (y + 31) / SCALE,
|
||||
width = TRADE_ANIMATION_WIDTH,
|
||||
height = TRADE_ANIMATION_HEIGHT,
|
||||
vOffset = frameOffset,
|
||||
textureHeight = TRADE_ANIMATION_HEIGHT * TRADE_ANIMATION_FRAMES,
|
||||
scale = SCALE
|
||||
)
|
||||
}
|
||||
|
||||
// Render Model Portraits
|
||||
context.enableScissor(
|
||||
backgroundX,
|
||||
backgroundY,
|
||||
backgroundX + BASE_BACKGROUND_WIDTH,
|
||||
backgroundY + BASE_BACKGROUND_HEIGHT
|
||||
)
|
||||
offeredPokemonModel?.render(context, mouseX, mouseY, delta)
|
||||
opposingOfferedPokemonModel?.render(context, mouseX, mouseY, delta)
|
||||
context.disableScissor()
|
||||
var scale = PORTRAIT_SCALE
|
||||
var scaleOffsetY = PORTRAIT_MODEL_OFFSET_Y
|
||||
if (tradeProcessing) {
|
||||
val scaleInterval = if (tradeAnimationProgress > REVERSE_ANIMATION_TICK) (MAX_TRADE_PROGRESS - tradeAnimationProgress) else tradeAnimationProgress
|
||||
scale = (PORTRAIT_SCALE - (scaleInterval * PORTRAIT_SCALE_MULTIPLIER)).coerceIn(0F, PORTRAIT_SCALE)
|
||||
scaleOffsetY = (45.0 - (45.0 / PORTRAIT_SCALE) * scale) + PORTRAIT_MODEL_OFFSET_Y
|
||||
}
|
||||
if (scale > 0F) {
|
||||
context.enableScissor(backgroundX, backgroundY, backgroundX + BASE_BACKGROUND_WIDTH, backgroundY + BASE_BACKGROUND_HEIGHT)
|
||||
offeredPokemonModel?.baseScale = scale
|
||||
offeredPokemonModel?.offsetY = scaleOffsetY
|
||||
offeredPokemonModel?.render(context, mouseX, mouseY, delta)
|
||||
|
||||
opposingOfferedPokemonModel?.baseScale = scale
|
||||
opposingOfferedPokemonModel?.offsetY = scaleOffsetY
|
||||
opposingOfferedPokemonModel?.render(context, mouseX, mouseY, delta)
|
||||
context.disableScissor()
|
||||
}
|
||||
|
||||
// Render Base Resource
|
||||
blitk(
|
||||
@@ -281,16 +345,18 @@ class TradeGUI(
|
||||
textureHeight = TRADE_READY_HEIGHT * READY_PROGRESS_LIMIT
|
||||
)
|
||||
|
||||
blitk(
|
||||
matrixStack = matrices,
|
||||
texture = tradeReadyTopResource,
|
||||
x = x + 112,
|
||||
y = y + 2,
|
||||
width = TRADE_READY_WIDTH,
|
||||
height = TRADE_READY_TOP_HEIGHT,
|
||||
vOffset = TRADE_READY_TOP_HEIGHT * readyProgress,
|
||||
textureHeight = TRADE_READY_TOP_HEIGHT * READY_PROGRESS_LIMIT
|
||||
)
|
||||
if (!tradeProcessing) {
|
||||
blitk(
|
||||
matrixStack = matrices,
|
||||
texture = tradeReadyTopResource,
|
||||
x = x + 112,
|
||||
y = y + 2,
|
||||
width = TRADE_READY_WIDTH,
|
||||
height = TRADE_READY_TOP_HEIGHT,
|
||||
vOffset = TRADE_READY_TOP_HEIGHT * readyProgress,
|
||||
textureHeight = TRADE_READY_TOP_HEIGHT * READY_PROGRESS_LIMIT
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
if (trade.oppositeAcceptedMyOffer.get()) {
|
||||
@@ -305,15 +371,31 @@ class TradeGUI(
|
||||
textureHeight = TRADE_READY_HEIGHT * READY_PROGRESS_LIMIT
|
||||
)
|
||||
|
||||
if (!tradeProcessing) {
|
||||
blitk(
|
||||
matrixStack = matrices,
|
||||
texture = opposingTradeReadyTopResource,
|
||||
x = x + 153,
|
||||
y = y + 2,
|
||||
width = TRADE_READY_WIDTH,
|
||||
height = TRADE_READY_TOP_HEIGHT,
|
||||
vOffset = TRADE_READY_TOP_HEIGHT * readyProgress,
|
||||
textureHeight = TRADE_READY_TOP_HEIGHT * READY_PROGRESS_LIMIT
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
// Trade animation arrows
|
||||
if (tradeAnimationProgress >= (TRADE_ANIMATION_FRAMES + MODEL_SCALE_BUFFER_FRAMES) && tradeAnimationProgress < REVERSE_ANIMATION_TICK) {
|
||||
blitk(
|
||||
matrixStack = matrices,
|
||||
texture = opposingTradeReadyTopResource,
|
||||
x = x + 153,
|
||||
texture = tradeAnimationArrowsResource,
|
||||
x = x + 112,
|
||||
y = y + 2,
|
||||
width = TRADE_READY_WIDTH,
|
||||
width = TRADE_ANIMATION_ARROWS_WIDTH,
|
||||
height = TRADE_READY_TOP_HEIGHT,
|
||||
vOffset = TRADE_READY_TOP_HEIGHT * readyProgress,
|
||||
textureHeight = TRADE_READY_TOP_HEIGHT * READY_PROGRESS_LIMIT
|
||||
vOffset = (((tradeAnimationProgress - MODEL_SCALE_BUFFER_FRAMES) % TRADE_ANIMATION_ARROWS_FRAMES) - MODEL_SCALE_BUFFER_FRAMES) * TRADE_READY_TOP_HEIGHT,
|
||||
textureHeight = TRADE_READY_TOP_HEIGHT * TRADE_ANIMATION_ARROWS_FRAMES
|
||||
)
|
||||
}
|
||||
|
||||
@@ -322,19 +404,17 @@ class TradeGUI(
|
||||
context = context,
|
||||
font = CobblemonResources.DEFAULT_LARGE,
|
||||
text = Minecraft.getInstance().user.name.text().bold(),
|
||||
x = x + 57,
|
||||
x = x + 13,
|
||||
y = y - 10.5,
|
||||
centered = true,
|
||||
shadow = true
|
||||
)
|
||||
|
||||
drawScaledText(
|
||||
drawScaledTextJustifiedRight(
|
||||
context = context,
|
||||
font = CobblemonResources.DEFAULT_LARGE,
|
||||
text = traderName.bold(),
|
||||
x = x + 237,
|
||||
x = x + 280,
|
||||
y = y - 10.5,
|
||||
centered = true,
|
||||
shadow = true
|
||||
)
|
||||
|
||||
@@ -359,14 +439,15 @@ class TradeGUI(
|
||||
override fun keyPressed(keyCode: Int, scanCode: Int, modifiers: Int): Boolean {
|
||||
if (minecraft?.options?.keyInventory?.matches(keyCode, scanCode) == true) {
|
||||
CancelTradePacket().sendToServer()
|
||||
cancelTradeSound()
|
||||
Minecraft.getInstance().setScreen(null)
|
||||
return true
|
||||
}
|
||||
|
||||
when (keyCode) {
|
||||
InputConstants.KEY_ESCAPE -> {
|
||||
// playSound(CobblemonSounds.PC_OFF)
|
||||
CancelTradePacket().sendToServer()
|
||||
cancelTradeSound()
|
||||
}
|
||||
}
|
||||
return super.keyPressed(keyCode, scanCode, modifiers)
|
||||
@@ -374,8 +455,35 @@ class TradeGUI(
|
||||
|
||||
override fun tick() {
|
||||
ticksElapsed++
|
||||
if (protectiveTicks > 0) {
|
||||
protectiveTicks--
|
||||
if (protectiveTicks > 0) protectiveTicks--
|
||||
if (tradeProcessing) {
|
||||
if (tradeAnimationProgress == 0) tradeSoundInstance = playSound(CobblemonSounds.GUI_TRADE)
|
||||
|
||||
tradeAnimationProgress++
|
||||
|
||||
if (offeredPokemon != null && opposingOfferedPokemon != null
|
||||
&& tradeAnimationProgress == REVERSE_ANIMATION_TICK
|
||||
&& isTradeInitiator
|
||||
) {
|
||||
CobblemonNetwork.sendToServer(PerformTradePacket(opposingOfferedPokemon!!.uuid))
|
||||
}
|
||||
|
||||
if (tradeAnimationProgress == (MAX_TRADE_PROGRESS + CRY_BUFFER)) {
|
||||
if (offeredPokemonModel !== null && opposingOfferedPokemonModel !== null) {
|
||||
offeredPokemonModel!!.state.activeAnimations.clear()
|
||||
offeredPokemonModel!!.state.addFirstAnimation(setOf("cry"))
|
||||
opposingOfferedPokemonModel!!.state.activeAnimations.clear()
|
||||
opposingOfferedPokemonModel!!.state.addFirstAnimation(setOf("cry"))
|
||||
}
|
||||
}
|
||||
|
||||
if (tradeAnimationProgress > (MAX_TRADE_PROGRESS + CRY_BUFFER)) {
|
||||
trade.tradeProcessing.set(Pair(false, false))
|
||||
ticksElapsed = 0
|
||||
readyProgress = 0
|
||||
tradeAnimationProgress = 0
|
||||
tradeSoundInstance = null
|
||||
}
|
||||
}
|
||||
|
||||
// Calculate select pointer offset
|
||||
@@ -388,6 +496,7 @@ class TradeGUI(
|
||||
|
||||
override fun onClose() {
|
||||
CobblemonNetwork.sendToServer(CancelTradePacket())
|
||||
cancelTradeSound()
|
||||
super.onClose()
|
||||
}
|
||||
|
||||
@@ -403,33 +512,39 @@ class TradeGUI(
|
||||
if (isOpposing) {
|
||||
opposingOfferedPokemon = pokemon
|
||||
opposingOfferedPokemonModel = if (pokemon != null) ModelWidget(
|
||||
pX = x + 147,
|
||||
pX = x + 145,
|
||||
pY = y + 30,
|
||||
pWidth = PORTRAIT_SIZE,
|
||||
pHeight = PORTRAIT_SIZE,
|
||||
pokemon = pokemon.asRenderablePokemon(),
|
||||
baseScale = 2F,
|
||||
baseScale = PORTRAIT_SCALE,
|
||||
rotationY = 35F,
|
||||
offsetY = -10.0
|
||||
offsetY = PORTRAIT_MODEL_OFFSET_Y
|
||||
) else null
|
||||
trade.acceptedOppositeOffer = false
|
||||
} else {
|
||||
offeredPokemon = pokemon
|
||||
offeredPokemonModel = if (pokemon != null) ModelWidget(
|
||||
pX = x + 68,
|
||||
pX = x + 70,
|
||||
pY = y + 30,
|
||||
pWidth = PORTRAIT_SIZE,
|
||||
pHeight = PORTRAIT_SIZE,
|
||||
pokemon = pokemon.asRenderablePokemon(),
|
||||
baseScale = 2F,
|
||||
baseScale = PORTRAIT_SCALE,
|
||||
rotationY = 325F,
|
||||
offsetY = -10.0
|
||||
offsetY = PORTRAIT_MODEL_OFFSET_Y
|
||||
) else null
|
||||
}
|
||||
}
|
||||
|
||||
private fun playSound(soundEvent: SoundEvent) {
|
||||
Minecraft.getInstance().soundManager.play(SimpleSoundInstance.forUI(soundEvent, 1.0F))
|
||||
private fun playSound(soundEvent: SoundEvent): SoundInstance {
|
||||
val soundInstance = SimpleSoundInstance.forUI(soundEvent, 1.0F)
|
||||
Minecraft.getInstance().soundManager.play(soundInstance)
|
||||
return soundInstance
|
||||
}
|
||||
|
||||
private fun cancelTradeSound() {
|
||||
if (tradeSoundInstance !== null) Minecraft.getInstance().soundManager.stop(tradeSoundInstance)
|
||||
}
|
||||
|
||||
private fun renderPokemonInfo(pokemon: Pokemon?, isOpposing: Boolean, context: GuiGraphics, x: Int, y: Int, mouseX: Int, mouseY: Int) {
|
||||
@@ -506,7 +621,7 @@ class TradeGUI(
|
||||
blitk(
|
||||
matrixStack = matrices,
|
||||
texture = Summary.iconShinyResource,
|
||||
x = (x + (if (isOpposing) 214.5 else 71.5)) / SCALE,
|
||||
x = (x + (if (isOpposing) 213.5 else 71.5)) / SCALE,
|
||||
y = (y + 33.5) / SCALE,
|
||||
width = 16,
|
||||
height = 16,
|
||||
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
package com.cobblemon.mod.common.client.net.battle
|
||||
|
||||
import com.cobblemon.mod.common.api.net.ClientNetworkPacketHandler
|
||||
import com.cobblemon.mod.common.client.entity.PokemonClientDelegate
|
||||
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity
|
||||
import com.cobblemon.mod.common.net.messages.client.battle.BattleAppendTargetedEntityPacket
|
||||
import net.minecraft.client.Minecraft
|
||||
|
||||
object BattleSetTargetedEntityHandler : ClientNetworkPacketHandler<BattleAppendTargetedEntityPacket> {
|
||||
override fun handle(packet: BattleAppendTargetedEntityPacket, client: Minecraft) {
|
||||
val sourceEntity = Minecraft.getInstance().level?.getEntity(packet.sourceEntityId)
|
||||
val sourcePokemon = sourceEntity as? PokemonEntity
|
||||
if (sourcePokemon != null) {
|
||||
(sourcePokemon.delegate as PokemonClientDelegate).targetedEntityId = packet.targetedEntityId
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+50
-3
@@ -16,12 +16,10 @@ import com.cobblemon.mod.common.client.particle.BedrockParticleOptionsRepository
|
||||
import com.cobblemon.mod.common.client.particle.ParticleStorm
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.PosableState
|
||||
import com.cobblemon.mod.common.entity.PosableEntity
|
||||
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity
|
||||
import com.cobblemon.mod.common.net.messages.client.effect.SpawnSnowstormEntityParticlePacket
|
||||
import com.cobblemon.mod.common.pokemon.Pokemon
|
||||
import net.minecraft.client.Minecraft
|
||||
import net.minecraft.world.entity.Entity
|
||||
import kotlin.text.get
|
||||
import kotlin.math.pow
|
||||
|
||||
object SpawnSnowstormEntityParticleHandler : ClientNetworkPacketHandler<SpawnSnowstormEntityParticlePacket> {
|
||||
override fun handle(packet: SpawnSnowstormEntityParticlePacket, client: Minecraft) {
|
||||
@@ -35,6 +33,55 @@ object SpawnSnowstormEntityParticleHandler : ClientNetworkPacketHandler<SpawnSno
|
||||
|
||||
val particleRuntime = MoLangRuntime().setup().setupClient()
|
||||
particleRuntime.environment.query.addFunction("entity") { state.runtime.environment.query }
|
||||
particleRuntime.environment.query.addFunction("point_on_curve") {
|
||||
//All this just finds a curve that goes through the given points + 0, 0
|
||||
//And calcs where we are on it at t
|
||||
val t = it.getDouble(0)
|
||||
val x1 = it.getDouble(1)
|
||||
val y1 = it.getDouble(2)
|
||||
val x2 = it.getDouble(3)
|
||||
val y2 = it.getDouble(4)
|
||||
|
||||
val a0 = 0.0
|
||||
val a1 = x1.pow(2)
|
||||
val a2 = x2.pow(2)
|
||||
val b0 = 0.0
|
||||
val b1 = x1
|
||||
val b2 = x2
|
||||
val c0 = 1.0
|
||||
val c1 = 1.0
|
||||
val c2 = 1.0
|
||||
val d0 = 0.0
|
||||
val d1 = y1
|
||||
val d2 = y2
|
||||
|
||||
val matrix = arrayOf(
|
||||
arrayOf(a2, b2, c2, d2),
|
||||
arrayOf(a1, b1, c1, d1),
|
||||
arrayOf(a0, b0, c0, d0)
|
||||
)
|
||||
|
||||
for (i in 0 until 3) {
|
||||
var pivot = matrix[i][i]
|
||||
if (pivot != 0.0) {
|
||||
for (j in 0 until 4) {
|
||||
matrix[i][j] /= pivot
|
||||
}
|
||||
}
|
||||
|
||||
// Make other elements in the current column 0
|
||||
for (k in 0 until 3) {
|
||||
if (k != i) {
|
||||
val factor = matrix[k][i]
|
||||
for (j in 0 until 4) {
|
||||
matrix[k][j] -= factor * matrix[i][j]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return@addFunction matrix[0][3] * t.pow(2) + matrix[1][3] * t + matrix[2][3]
|
||||
}
|
||||
|
||||
val storm = ParticleStorm(
|
||||
effect = effect,
|
||||
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* 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.client.net.trade
|
||||
|
||||
import com.cobblemon.mod.common.api.net.ClientNetworkPacketHandler
|
||||
import com.cobblemon.mod.common.client.CobblemonClient
|
||||
import com.cobblemon.mod.common.net.messages.client.trade.TradeProcessStartedPacket
|
||||
import net.minecraft.client.Minecraft
|
||||
|
||||
object TradeProcessStartedHandler : ClientNetworkPacketHandler<TradeProcessStartedPacket> {
|
||||
override fun handle(packet: TradeProcessStartedPacket, client: Minecraft) {
|
||||
val trade = CobblemonClient.trade ?: return
|
||||
trade.tradeProcessing.emit(Pair(true, packet.isTradeInitiator))
|
||||
}
|
||||
}
|
||||
@@ -15,6 +15,7 @@ import com.cobblemon.mod.common.api.snowstorm.BedrockParticleOptions
|
||||
import com.cobblemon.mod.common.api.snowstorm.ParticleEmitterAction
|
||||
import com.cobblemon.mod.common.client.render.MatrixWrapper
|
||||
import com.cobblemon.mod.common.client.render.SnowstormParticle
|
||||
import com.cobblemon.mod.common.entity.AttackingEntity
|
||||
import com.cobblemon.mod.common.entity.PosableEntity
|
||||
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity
|
||||
import com.cobblemon.mod.common.particle.SnowstormParticleOptions
|
||||
@@ -62,6 +63,9 @@ class ParticleStorm(
|
||||
}
|
||||
if (entity is PosableEntity) {
|
||||
runtime.environment.query.addFunction("entity") { entity.struct }
|
||||
if (entity is AttackingEntity) {
|
||||
addAttackingFunctions()
|
||||
}
|
||||
} else if (entity is Player) {
|
||||
runtime.environment.query.addFunction("entity") { entity.asMoLangValue() }
|
||||
}
|
||||
@@ -76,6 +80,33 @@ class ParticleStorm(
|
||||
Minecraft.getInstance().particleEngine.add(this)
|
||||
}
|
||||
|
||||
fun addAttackingFunctions(attackingEntity: AttackingEntity) {
|
||||
attackingEntity as Entity
|
||||
runtime.environment.query.addFunction("target_deltax") {
|
||||
val targetedEntity = getEntityById(attackingEntity.getAttackingEntityId())?: return@addFunction 1.0
|
||||
matrixWrapper.transformWorldToParticle(attackingEntity.position()).x - matrixWrapper.transformWorldToParticle(targetedEntity.position()).x
|
||||
}
|
||||
runtime.environment.query.addFunction("target_deltay") {
|
||||
val targetedEntity = getEntityById(attackingEntity.getAttackingEntityId())?: return@addFunction 1.0
|
||||
matrixWrapper.transformWorldToParticle(attackingEntity.position()).y - matrixWrapper.transformWorldToParticle(targetedEntity.position()).y
|
||||
}
|
||||
runtime.environment.query.addFunction("target_deltaz") {
|
||||
val targetedEntity = getEntityById(attackingEntity.getAttackingEntityId())?: return@addFunction 1.0
|
||||
matrixWrapper.transformWorldToParticle(attackingEntity.position()).z - matrixWrapper.transformWorldToParticle(targetedEntity.position()).z
|
||||
}
|
||||
runtime.environment.query.addFunction("target_distance") {
|
||||
val targetedEntity = getEntityById(attackingEntity.getAttackingEntityId())?: return@addFunction 2.0
|
||||
targetedEntity.position().distanceTo(attackingEntity.position())
|
||||
}
|
||||
}
|
||||
|
||||
private fun getEntityById(entityId: Int?): Entity? {
|
||||
if (entityId != null) {
|
||||
Minecraft.getInstance().level?.getEntity(entityId)
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
fun getX() = x
|
||||
fun getY() = y
|
||||
fun getZ() = z
|
||||
|
||||
@@ -33,4 +33,5 @@ class MatrixWrapper {
|
||||
|
||||
fun getOrigin() = position.add(matrix.getOrigin())
|
||||
fun transformPosition(position: Vec3) = this.position.add(matrix.transformPosition(position))
|
||||
fun transformWorldToParticle(position: Vec3) = Matrix4f(matrix).invertAffine().transformPosition(position.subtract(this.position))
|
||||
}
|
||||
+6
@@ -96,6 +96,12 @@ class LocatorAccess(
|
||||
state.getOrPut("middle") { MatrixWrapper() }.updateMatrix(matrixStack.last().pose())
|
||||
matrixStack.popPose()
|
||||
|
||||
// If we have the entity, put in a "top" locator for top center of hitbox.
|
||||
matrixStack.pushPose()
|
||||
matrixStack.translate(0.0, -entity.boundingBox.ysize, 0.0)
|
||||
matrixStack.scale(-1F, -1F, 1F)
|
||||
state.getOrPut("top") { MatrixWrapper() }.updateMatrix(matrixStack.last().pose())
|
||||
matrixStack.popPose()
|
||||
}
|
||||
|
||||
for ((name, locator) in locators) {
|
||||
|
||||
-74
@@ -1,74 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Cobblemon Contributors
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
package com.cobblemon.mod.common.client.render.models.blockbench.pokemon.gen1
|
||||
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.animation.BimanualSwingAnimation
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.animation.BipedWalkAnimation
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.BimanualFrame
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.BipedFrame
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.HeadedFrame
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.PokemonPosableModel
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pose.Pose
|
||||
import com.cobblemon.mod.common.entity.PoseType.Companion.MOVING_POSES
|
||||
import com.cobblemon.mod.common.entity.PoseType.Companion.STATIONARY_POSES
|
||||
import com.cobblemon.mod.common.entity.PoseType.Companion.UI_POSES
|
||||
import net.minecraft.client.model.geom.ModelPart
|
||||
import net.minecraft.world.phys.Vec3
|
||||
|
||||
class AlakazamModel(root: ModelPart) : PokemonPosableModel(root), HeadedFrame, BipedFrame, BimanualFrame {
|
||||
override val rootPart = root.registerChildWithAllChildren("alakazam")
|
||||
override val head = getPart("head")
|
||||
|
||||
override val leftArm = getPart("left_shoulder")
|
||||
override val rightArm = getPart("right_shoulder")
|
||||
override val leftLeg = getPart("left_upper_leg")
|
||||
override val rightLeg = getPart("right_upper_leg")
|
||||
|
||||
override var portraitScale = 1.75F
|
||||
override var portraitTranslation = Vec3(-0.25, 0.85, 0.0)
|
||||
|
||||
override var profileScale = 0.73F
|
||||
override var profileTranslation = Vec3(0.0, 0.65, 0.0)
|
||||
|
||||
lateinit var sleep: Pose
|
||||
lateinit var standing: Pose
|
||||
lateinit var walk: Pose
|
||||
|
||||
override fun registerPoses() {
|
||||
val blink = quirk { bedrockStateful("alakazam", "blink")}
|
||||
standing = registerPose(
|
||||
poseName = "standing",
|
||||
poseTypes = STATIONARY_POSES + UI_POSES,
|
||||
transformTicks = 10,
|
||||
quirks = arrayOf(blink),
|
||||
animations = arrayOf(
|
||||
singleBoneLook() ,
|
||||
bedrock("alakazam", "ground_idle")
|
||||
)
|
||||
)
|
||||
|
||||
walk = registerPose(
|
||||
poseName = "walk",
|
||||
poseTypes = MOVING_POSES,
|
||||
transformTicks = 10,
|
||||
quirks = arrayOf(blink),
|
||||
animations = arrayOf(
|
||||
singleBoneLook(),
|
||||
bedrock("alakazam", "ground_idle"),
|
||||
BipedWalkAnimation(this, periodMultiplier = 0.6F, amplitudeMultiplier = 0.9F),
|
||||
BimanualSwingAnimation(this, swingPeriodMultiplier = 0.6F, amplitudeMultiplier = 0.9F)
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
// override fun getFaintAnimation(
|
||||
// pokemonEntity: PokemonEntity,
|
||||
// state: PosableState<PokemonEntity>
|
||||
// ) = if (state.isPosedIn(standing, walk)) bedrockStateful("alakazam", "faint") else null
|
||||
}
|
||||
-60
@@ -1,60 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Cobblemon Contributors
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
package com.cobblemon.mod.common.client.render.models.blockbench.pokemon.gen1
|
||||
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.HeadedFrame
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.PokemonPosableModel
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pose.Pose
|
||||
import com.cobblemon.mod.common.entity.PoseType.Companion.MOVING_POSES
|
||||
import com.cobblemon.mod.common.entity.PoseType.Companion.STATIONARY_POSES
|
||||
import com.cobblemon.mod.common.entity.PoseType.Companion.UI_POSES
|
||||
import net.minecraft.client.model.geom.ModelPart
|
||||
import net.minecraft.world.phys.Vec3
|
||||
|
||||
class BellsproutModel(root: ModelPart) : PokemonPosableModel(root), HeadedFrame {
|
||||
override val rootPart = root.registerChildWithAllChildren("bellsprout")
|
||||
override val head = getPart("head")
|
||||
|
||||
override var portraitScale = 2.0F
|
||||
override var portraitTranslation = Vec3(-0.1, 0.41, 0.0)
|
||||
|
||||
override var profileScale = 0.75F
|
||||
override var profileTranslation = Vec3(0.0, 0.64, 0.0)
|
||||
|
||||
lateinit var standing: Pose
|
||||
lateinit var walk: Pose
|
||||
|
||||
override fun registerPoses() {
|
||||
standing = registerPose(
|
||||
poseName = "standing",
|
||||
poseTypes = STATIONARY_POSES + UI_POSES,
|
||||
transformTicks = 10,
|
||||
animations = arrayOf(
|
||||
singleBoneLook(),
|
||||
bedrock("bellsprout", "ground_idle")
|
||||
)
|
||||
)
|
||||
|
||||
walk = registerPose(
|
||||
poseName = "walk",
|
||||
poseTypes = MOVING_POSES,
|
||||
transformTicks = 10,
|
||||
animations = arrayOf(
|
||||
singleBoneLook(),
|
||||
bedrock("bellsprout", "ground_idle")
|
||||
//bedrock("bellsprout", "ground_walk")
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
// override fun getFaintAnimation(
|
||||
// pokemonEntity: PokemonEntity,
|
||||
// state: PosableState<PokemonEntity>
|
||||
// ) = if (state.isPosedIn(standing, walk)) bedrockStateful("bellsprout", "faint") else null
|
||||
}
|
||||
+3
@@ -10,6 +10,7 @@ package com.cobblemon.mod.common.client.render.models.blockbench.pokemon.gen1
|
||||
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.animation.BipedWalkAnimation
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.BipedFrame
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.CryProvider
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.PokemonPosableModel
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pose.Pose
|
||||
import com.cobblemon.mod.common.entity.PoseType.Companion.MOVING_POSES
|
||||
@@ -33,6 +34,8 @@ class GengarModel(root: ModelPart) : PokemonPosableModel(root), BipedFrame {
|
||||
lateinit var standing: Pose
|
||||
lateinit var walk: Pose
|
||||
|
||||
override val cryAnimation = CryProvider { bedrockStateful("gengar", "cry") }
|
||||
|
||||
override fun registerPoses() {
|
||||
standing = registerPose(
|
||||
poseName = "standing",
|
||||
|
||||
-68
@@ -1,68 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Cobblemon Contributors
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
package com.cobblemon.mod.common.client.render.models.blockbench.pokemon.gen1
|
||||
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.animation.BimanualSwingAnimation
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.animation.BipedWalkAnimation
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.BimanualFrame
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.BipedFrame
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.HeadedFrame
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.PokemonPosableModel
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pose.Pose
|
||||
import com.cobblemon.mod.common.entity.PoseType.Companion.MOVING_POSES
|
||||
import com.cobblemon.mod.common.entity.PoseType.Companion.STATIONARY_POSES
|
||||
import com.cobblemon.mod.common.entity.PoseType.Companion.UI_POSES
|
||||
import net.minecraft.client.model.geom.ModelPart
|
||||
import net.minecraft.world.phys.Vec3
|
||||
|
||||
class MagmarModel(root: ModelPart) : PokemonPosableModel(root), HeadedFrame, BipedFrame, BimanualFrame {
|
||||
override val rootPart = root.registerChildWithAllChildren("magmar")
|
||||
override val head = getPart("head")
|
||||
|
||||
override val leftArm = getPart("leftarm")
|
||||
override val rightArm = getPart("rightarm")
|
||||
override val leftLeg = getPart("leftleg")
|
||||
override val rightLeg = getPart("rightleg")
|
||||
|
||||
override var portraitScale = 2.8F
|
||||
override var portraitTranslation = Vec3(-0.1, 0.3, 0.0)
|
||||
|
||||
override var profileScale = 0.8F
|
||||
override var profileTranslation = Vec3(0.0, 0.58, 0.0)
|
||||
|
||||
lateinit var standing: Pose
|
||||
lateinit var walk: Pose
|
||||
|
||||
override fun registerPoses() {
|
||||
standing = registerPose(
|
||||
poseName = "standing",
|
||||
poseTypes = STATIONARY_POSES + UI_POSES,
|
||||
animations = arrayOf(
|
||||
singleBoneLook(),
|
||||
bedrock("magmar", "ground_idle")
|
||||
)
|
||||
)
|
||||
|
||||
walk = registerPose(
|
||||
poseName = "walk",
|
||||
poseTypes = MOVING_POSES,
|
||||
animations = arrayOf(
|
||||
singleBoneLook(),
|
||||
bedrock("magmar", "ground_idle"),
|
||||
BipedWalkAnimation(this, periodMultiplier = 0.6F, amplitudeMultiplier = 0.9F),
|
||||
BimanualSwingAnimation(this, swingPeriodMultiplier = 0.6F, amplitudeMultiplier = 0.9F)
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
// override fun getFaintAnimation(
|
||||
// pokemonEntity: PokemonEntity,
|
||||
// state: PosableState<PokemonEntity>
|
||||
// ) = if (state.isPosedIn(standing, walk)) bedrockStateful("magmar", "faint") else null
|
||||
}
|
||||
+3
@@ -10,6 +10,7 @@ package com.cobblemon.mod.common.client.render.models.blockbench.pokemon.gen1
|
||||
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.PokemonPosableModel
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.PosableState
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.CryProvider
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pose.Pose
|
||||
import com.cobblemon.mod.common.entity.PoseType
|
||||
import net.minecraft.client.model.geom.ModelPart
|
||||
@@ -28,6 +29,8 @@ class MagnemiteModel(root: ModelPart) : PokemonPosableModel(root) {
|
||||
lateinit var walk: Pose
|
||||
lateinit var sleep: Pose
|
||||
|
||||
override val cryAnimation = CryProvider { bedrockStateful("magnemite", "cry") }
|
||||
|
||||
|
||||
override fun registerPoses() {
|
||||
val blink = quirk { bedrockStateful("magnemite", "blink") }
|
||||
|
||||
+3
@@ -9,6 +9,7 @@
|
||||
package com.cobblemon.mod.common.client.render.models.blockbench.pokemon.gen1
|
||||
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.PosableState
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.CryProvider
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.PokemonPosableModel
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pose.Pose
|
||||
import com.cobblemon.mod.common.entity.PoseType
|
||||
@@ -28,6 +29,8 @@ class MagnetonModel(root: ModelPart) : PokemonPosableModel(root) {
|
||||
lateinit var walk: Pose
|
||||
lateinit var sleep: Pose
|
||||
|
||||
override val cryAnimation = CryProvider { bedrockStateful("magneton", "cry") }
|
||||
|
||||
|
||||
override fun registerPoses() {
|
||||
val blink = quirk { bedrockStateful("magneton", "blink") }
|
||||
|
||||
-102
@@ -1,102 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Cobblemon Contributors
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
package com.cobblemon.mod.common.client.render.models.blockbench.pokemon.gen1
|
||||
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.PosableState
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.HeadedFrame
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.CryProvider
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.PokemonPosableModel
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pose.Pose
|
||||
import com.cobblemon.mod.common.entity.PoseType
|
||||
import com.cobblemon.mod.common.entity.PoseType.Companion.MOVING_POSES
|
||||
import com.cobblemon.mod.common.entity.PoseType.Companion.STATIONARY_POSES
|
||||
import com.cobblemon.mod.common.entity.PoseType.Companion.UI_POSES
|
||||
import com.cobblemon.mod.common.util.isBattling
|
||||
import net.minecraft.client.model.geom.ModelPart
|
||||
import net.minecraft.world.phys.Vec3
|
||||
|
||||
class OnixModel(root: ModelPart) : PokemonPosableModel(root), HeadedFrame {
|
||||
override val rootPart = root.registerChildWithAllChildren("onix")
|
||||
override val head = getPart("head")
|
||||
|
||||
override var portraitScale = 1.1F
|
||||
override var portraitTranslation = Vec3(-0.2, 1.4, 0.0)
|
||||
|
||||
override var profileScale = 0.55F
|
||||
override var profileTranslation = Vec3(-0.1, 0.9, 0.0)
|
||||
|
||||
lateinit var standing: Pose
|
||||
lateinit var walk: Pose
|
||||
lateinit var ui: Pose
|
||||
lateinit var sleep: Pose
|
||||
lateinit var battleidle: Pose
|
||||
|
||||
override val cryAnimation = CryProvider { bedrockStateful("onix", "cry") }
|
||||
|
||||
override fun registerPoses() {
|
||||
val blink = quirk { bedrockStateful("onix", "blink") }
|
||||
ui = registerPose(
|
||||
poseName = "ui",
|
||||
poseTypes = UI_POSES,
|
||||
quirks = arrayOf(blink),
|
||||
animations = arrayOf(
|
||||
bedrock("onix", "summary_idle")
|
||||
)
|
||||
)
|
||||
|
||||
sleep = registerPose(
|
||||
poseType = PoseType.SLEEP,
|
||||
transformTicks = 0,
|
||||
animations = arrayOf(
|
||||
bedrock("onix", "sleep"),
|
||||
bedrock("onix", "slow_boulder_rotation")
|
||||
)
|
||||
)
|
||||
|
||||
standing = registerPose(
|
||||
poseName = "standing",
|
||||
poseTypes = STATIONARY_POSES,
|
||||
transformTicks = 1,
|
||||
condition = { !it.isBattling },
|
||||
quirks = arrayOf(blink),
|
||||
animations = arrayOf(
|
||||
singleBoneLook(),
|
||||
bedrock("onix", "ground_idle"),
|
||||
bedrock("onix", "boulder_rotation")
|
||||
)
|
||||
)
|
||||
|
||||
walk = registerPose(
|
||||
poseName = "walk",
|
||||
poseTypes = MOVING_POSES,
|
||||
transformTicks = 1,
|
||||
quirks = arrayOf(blink),
|
||||
animations = arrayOf(
|
||||
singleBoneLook(),
|
||||
bedrock("onix", "ground_walk"),
|
||||
bedrock("onix", "boulder_rotation")
|
||||
)
|
||||
)
|
||||
|
||||
battleidle = registerPose(
|
||||
poseName = "battle_idle",
|
||||
poseTypes = PoseType.STATIONARY_POSES,
|
||||
transformTicks = 10,
|
||||
quirks = arrayOf(blink),
|
||||
condition = { it.isBattling },
|
||||
animations = arrayOf(
|
||||
singleBoneLook(),
|
||||
bedrock("onix", "battle_idle"),
|
||||
bedrock("onix", "boulder_rotation")
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
override fun getFaintAnimation(state: PosableState) = bedrockStateful("onix", "faint")
|
||||
}
|
||||
-72
@@ -1,72 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Cobblemon Contributors
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
package com.cobblemon.mod.common.client.render.models.blockbench.pokemon.gen1
|
||||
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.PokemonPosableModel
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pose.Pose
|
||||
import com.cobblemon.mod.common.entity.PoseType
|
||||
import com.cobblemon.mod.common.entity.PoseType.Companion.UI_POSES
|
||||
import net.minecraft.client.model.geom.ModelPart
|
||||
import net.minecraft.world.phys.Vec3
|
||||
|
||||
class PoliwhirlModel(root: ModelPart) : PokemonPosableModel(root) {
|
||||
override val rootPart = root.registerChildWithAllChildren("poliwhirl")
|
||||
|
||||
override var portraitScale = 1.4F
|
||||
override var portraitTranslation = Vec3(-0.1, 0.2, 0.0)
|
||||
|
||||
override var profileScale = 0.8F
|
||||
override var profileTranslation = Vec3(0.0, 0.5, 0.0)
|
||||
|
||||
lateinit var sleep: Pose
|
||||
lateinit var standing: Pose
|
||||
lateinit var float: Pose
|
||||
lateinit var swim: Pose
|
||||
|
||||
override fun registerPoses() {
|
||||
val blink = quirk { bedrockStateful("poliwhirl", "blink")}
|
||||
|
||||
sleep = registerPose(
|
||||
poseType = PoseType.SLEEP,
|
||||
animations = arrayOf(bedrock("poliwhirl", "sleep"))
|
||||
)
|
||||
|
||||
standing = registerPose(
|
||||
poseName = "standing",
|
||||
poseTypes = PoseType.STANDING_POSES + UI_POSES,
|
||||
quirks = arrayOf(blink),
|
||||
animations = arrayOf(
|
||||
bedrock("poliwhirl", "ground_idle")
|
||||
)
|
||||
)
|
||||
|
||||
float = registerPose(
|
||||
poseName = "float",
|
||||
poseType = PoseType.FLOAT,
|
||||
quirks = arrayOf(blink),
|
||||
animations = arrayOf(
|
||||
bedrock("poliwhirl", "water_idle")
|
||||
)
|
||||
)
|
||||
|
||||
swim = registerPose(
|
||||
poseName = "swim",
|
||||
poseType = PoseType.SWIM,
|
||||
quirks = arrayOf(blink),
|
||||
animations = arrayOf(
|
||||
bedrock("poliwhirl", "water_swim")
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
// override fun getFaintAnimation(
|
||||
// pokemonEntity: PokemonEntity,
|
||||
// state: PosableState<PokemonEntity>
|
||||
// ) = if (state.isPosedIn(standing, walk)) bedrockStateful("poliwhirl", "faint") else null
|
||||
}
|
||||
-72
@@ -1,72 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Cobblemon Contributors
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
package com.cobblemon.mod.common.client.render.models.blockbench.pokemon.gen1
|
||||
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.PokemonPosableModel
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pose.Pose
|
||||
import com.cobblemon.mod.common.entity.PoseType
|
||||
import com.cobblemon.mod.common.entity.PoseType.Companion.UI_POSES
|
||||
import net.minecraft.client.model.geom.ModelPart
|
||||
import net.minecraft.world.phys.Vec3
|
||||
|
||||
class PoliwrathModel(root: ModelPart) : PokemonPosableModel(root) {
|
||||
override val rootPart = root.registerChildWithAllChildren("poliwrath")
|
||||
|
||||
override var portraitScale = 1.3F
|
||||
override var portraitTranslation = Vec3(-0.1, 0.36, 0.0)
|
||||
|
||||
override var profileScale = 0.85F
|
||||
override var profileTranslation = Vec3(0.0, 0.42, 0.0)
|
||||
|
||||
lateinit var sleep: Pose
|
||||
lateinit var standing: Pose
|
||||
lateinit var float: Pose
|
||||
lateinit var swim: Pose
|
||||
|
||||
override fun registerPoses() {
|
||||
val blink = quirk { bedrockStateful("poliwrath", "blink")}
|
||||
standing = registerPose(
|
||||
poseName = "standing",
|
||||
poseTypes = PoseType.STANDING_POSES + UI_POSES,
|
||||
quirks = arrayOf(blink),
|
||||
animations = arrayOf(
|
||||
bedrock("poliwrath", "ground_idle")
|
||||
)
|
||||
)
|
||||
|
||||
sleep = registerPose(
|
||||
poseType = PoseType.SLEEP,
|
||||
animations = arrayOf(bedrock("poliwrath", "sleep"))
|
||||
)
|
||||
|
||||
float = registerPose(
|
||||
poseName = "float",
|
||||
poseType = PoseType.FLOAT,
|
||||
quirks = arrayOf(blink),
|
||||
animations = arrayOf(
|
||||
bedrock("poliwrath", "water_idle")
|
||||
)
|
||||
)
|
||||
|
||||
swim = registerPose(
|
||||
poseName = "swim",
|
||||
poseType = PoseType.SWIM,
|
||||
quirks = arrayOf(blink),
|
||||
animations = arrayOf(
|
||||
bedrock("poliwrath", "water_swim")
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
// override fun getFaintAnimation(
|
||||
// pokemonEntity: PokemonEntity,
|
||||
// state: PosableState<PokemonEntity>
|
||||
// ) = if (state.isPosedIn(standing, walk)) bedrockStateful("poliwrath", "faint") else null
|
||||
}
|
||||
+3
@@ -10,6 +10,7 @@ package com.cobblemon.mod.common.client.render.models.blockbench.pokemon.gen1
|
||||
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.PosableState
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.HeadedFrame
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.CryProvider
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.PokemonPosableModel
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pose.Pose
|
||||
import com.cobblemon.mod.common.entity.PoseType
|
||||
@@ -33,6 +34,8 @@ class SandshrewModel(root: ModelPart) : PokemonPosableModel(root), HeadedFrame {
|
||||
lateinit var standing: Pose
|
||||
lateinit var walk: Pose
|
||||
|
||||
override val cryAnimation = CryProvider { bedrockStateful("sandshrew", "cry") }
|
||||
|
||||
override fun registerPoses() {
|
||||
val blink = quirk { bedrockStateful("sandshrew", "blink")}
|
||||
standing = registerPose(
|
||||
|
||||
+3
@@ -9,6 +9,7 @@
|
||||
package com.cobblemon.mod.common.client.render.models.blockbench.pokemon.gen1
|
||||
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.HeadedFrame
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.CryProvider
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.PokemonPosableModel
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pose.Pose
|
||||
import com.cobblemon.mod.common.entity.PoseType
|
||||
@@ -32,6 +33,8 @@ class SandslashModel(root: ModelPart) : PokemonPosableModel(root), HeadedFrame {
|
||||
lateinit var standing: Pose
|
||||
lateinit var walk: Pose
|
||||
|
||||
override val cryAnimation = CryProvider { bedrockStateful("sandslash", "cry") }
|
||||
|
||||
override fun registerPoses() {
|
||||
val blink = quirk { bedrockStateful("sandslash", "blink")}
|
||||
standing = registerPose(
|
||||
|
||||
-56
@@ -1,56 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Cobblemon Contributors
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
package com.cobblemon.mod.common.client.render.models.blockbench.pokemon.gen1
|
||||
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.PokemonPosableModel
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pose.Pose
|
||||
import com.cobblemon.mod.common.entity.PoseType.Companion.MOVING_POSES
|
||||
import com.cobblemon.mod.common.entity.PoseType.Companion.STATIONARY_POSES
|
||||
import com.cobblemon.mod.common.entity.PoseType.Companion.UI_POSES
|
||||
import net.minecraft.client.model.geom.ModelPart
|
||||
import net.minecraft.world.phys.Vec3
|
||||
|
||||
class VictreebelModel(root: ModelPart) : PokemonPosableModel(root) {
|
||||
override val rootPart = root.registerChildWithAllChildren("victreebel")
|
||||
|
||||
override var portraitScale = 2.0F
|
||||
override var portraitTranslation = Vec3(-0.1, -0.2, 0.0)
|
||||
|
||||
override var profileScale = 0.92F
|
||||
override var profileTranslation = Vec3(0.0, 0.35, 0.0)
|
||||
|
||||
lateinit var standing: Pose
|
||||
lateinit var walk: Pose
|
||||
|
||||
override fun registerPoses() {
|
||||
standing = registerPose(
|
||||
poseName = "standing",
|
||||
poseTypes = STATIONARY_POSES + UI_POSES,
|
||||
transformTicks = 10,
|
||||
animations = arrayOf(
|
||||
bedrock("victreebel", "ground_idle")
|
||||
)
|
||||
)
|
||||
|
||||
walk = registerPose(
|
||||
poseName = "walk",
|
||||
poseTypes = MOVING_POSES,
|
||||
transformTicks = 10,
|
||||
animations = arrayOf(
|
||||
bedrock("victreebel", "ground_idle")
|
||||
//bedrock("victreebel", "ground_walk")
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
// override fun getFaintAnimation(
|
||||
// pokemonEntity: PokemonEntity,
|
||||
// state: PosableState<PokemonEntity>
|
||||
// ) = if (state.isPosedIn(standing, walk)) bedrockStateful("victreebel", "faint") else null
|
||||
}
|
||||
-54
@@ -1,54 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Cobblemon Contributors
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
package com.cobblemon.mod.common.client.render.models.blockbench.pokemon.gen1
|
||||
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.PokemonPosableModel
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pose.Pose
|
||||
import com.cobblemon.mod.common.entity.PoseType.Companion.MOVING_POSES
|
||||
import com.cobblemon.mod.common.entity.PoseType.Companion.STATIONARY_POSES
|
||||
import com.cobblemon.mod.common.entity.PoseType.Companion.UI_POSES
|
||||
import net.minecraft.client.model.geom.ModelPart
|
||||
import net.minecraft.world.phys.Vec3
|
||||
|
||||
class WeepinbellModel(root: ModelPart) : PokemonPosableModel(root) {
|
||||
override val rootPart = root.registerChildWithAllChildren("weepinbell")
|
||||
|
||||
override var portraitScale = 1.73F
|
||||
override var portraitTranslation = Vec3(0.0, -1.0, 0.0)
|
||||
|
||||
override var profileScale = 1.1F
|
||||
override var profileTranslation = Vec3(0.0, 0.2, 0.0)
|
||||
|
||||
lateinit var standing: Pose
|
||||
lateinit var walk: Pose
|
||||
|
||||
override fun registerPoses() {
|
||||
standing = registerPose(
|
||||
poseName = "standing",
|
||||
poseTypes = STATIONARY_POSES + UI_POSES,
|
||||
animations = arrayOf(
|
||||
bedrock("weepinbell", "ground_idle")
|
||||
)
|
||||
)
|
||||
|
||||
walk = registerPose(
|
||||
poseName = "walk",
|
||||
poseTypes = MOVING_POSES,
|
||||
animations = arrayOf(
|
||||
bedrock("weepinbell", "ground_idle")
|
||||
//bedrock("weepinbell", "ground_walk")
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
// override fun getFaintAnimation(
|
||||
// pokemonEntity: PokemonEntity,
|
||||
// state: PosableState<PokemonEntity>
|
||||
// ) = if (state.isPosedIn(standing, walk)) bedrockStateful("weepinbell", "faint") else null
|
||||
}
|
||||
-63
@@ -1,63 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Cobblemon Contributors
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
package com.cobblemon.mod.common.client.render.models.blockbench.pokemon.gen2
|
||||
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.animation.QuadrupedWalkAnimation
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.QuadrupedFrame
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.PokemonPosableModel
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pose.CobblemonPose
|
||||
import com.cobblemon.mod.common.entity.PoseType
|
||||
import net.minecraft.client.model.geom.ModelPart
|
||||
import net.minecraft.world.phys.Vec3
|
||||
|
||||
class FurretModel (root: ModelPart) : PokemonPosableModel(root), QuadrupedFrame {
|
||||
override val rootPart = root.registerChildWithAllChildren("furret")
|
||||
|
||||
override val foreLeftLeg = getPart("arm_left")
|
||||
override val foreRightLeg = getPart("arm_right")
|
||||
override val hindLeftLeg = getPart("leg_left")
|
||||
override val hindRightLeg = getPart("leg_right")
|
||||
|
||||
override var portraitScale = 2.1F
|
||||
override var portraitTranslation = Vec3(-0.6, 0.2, 0.0)
|
||||
|
||||
override var profileScale = 0.82F
|
||||
override var profileTranslation = Vec3(0.0, 0.54, 0.0)
|
||||
|
||||
lateinit var standing: CobblemonPose
|
||||
lateinit var walk: CobblemonPose
|
||||
|
||||
override fun registerPoses() {
|
||||
val blink = quirk { bedrockStateful("furret", "blink") }
|
||||
|
||||
standing = registerPose(
|
||||
poseName = "standing",
|
||||
poseTypes = PoseType.STATIONARY_POSES + PoseType.UI_POSES,
|
||||
quirks = arrayOf(blink),
|
||||
animations = arrayOf(
|
||||
bedrock("furret", "ground_idle")
|
||||
)
|
||||
)
|
||||
|
||||
walk = registerPose(
|
||||
poseName = "walk",
|
||||
poseTypes = PoseType.MOVING_POSES,
|
||||
quirks = arrayOf(blink),
|
||||
animations = arrayOf(
|
||||
QuadrupedWalkAnimation(this, periodMultiplier = 0.6F, amplitudeMultiplier = 0.9F),
|
||||
bedrock("furret", "pose")
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
// override fun getFaintAnimation(
|
||||
// pokemonEntity: PokemonEntity,
|
||||
// state: PosableState<PokemonEntity>
|
||||
// ) = if (state.isPosedIn(standing, walk)) bedrockStateful("furret", "faint") else null
|
||||
}
|
||||
-68
@@ -1,68 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Cobblemon Contributors
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
package com.cobblemon.mod.common.client.render.models.blockbench.pokemon.gen2
|
||||
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.animation.BimanualSwingAnimation
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.animation.BipedWalkAnimation
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.BimanualFrame
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.BipedFrame
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.HeadedFrame
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.PokemonPosableModel
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pose.Pose
|
||||
import com.cobblemon.mod.common.entity.PoseType.Companion.MOVING_POSES
|
||||
import com.cobblemon.mod.common.entity.PoseType.Companion.STATIONARY_POSES
|
||||
import com.cobblemon.mod.common.entity.PoseType.Companion.UI_POSES
|
||||
import net.minecraft.client.model.geom.ModelPart
|
||||
import net.minecraft.world.phys.Vec3
|
||||
|
||||
class MagbyModel(root: ModelPart) : PokemonPosableModel(root), HeadedFrame, BipedFrame, BimanualFrame {
|
||||
override val rootPart = root.registerChildWithAllChildren("magby")
|
||||
override val head = getPart("head")
|
||||
|
||||
override val leftArm = getPart("lefthand")
|
||||
override val rightArm = getPart("righthand")
|
||||
override val leftLeg = getPart("leftleg")
|
||||
override val rightLeg = getPart("rightleg")
|
||||
|
||||
override var portraitScale = 2.4F
|
||||
override var portraitTranslation = Vec3(-0.05, -0.45, 0.0)
|
||||
|
||||
override var profileScale = 0.78F
|
||||
override var profileTranslation = Vec3(-0.03, 0.61, 0.0)
|
||||
|
||||
lateinit var standing: Pose
|
||||
lateinit var walk: Pose
|
||||
|
||||
override fun registerPoses() {
|
||||
standing = registerPose(
|
||||
poseName = "standing",
|
||||
poseTypes = STATIONARY_POSES + UI_POSES,
|
||||
animations = arrayOf(
|
||||
singleBoneLook(),
|
||||
bedrock("magby", "ground_idle")
|
||||
)
|
||||
)
|
||||
|
||||
walk = registerPose(
|
||||
poseName = "walk",
|
||||
poseTypes = MOVING_POSES,
|
||||
animations = arrayOf(
|
||||
singleBoneLook(),
|
||||
bedrock("magby", "ground_idle"),
|
||||
BipedWalkAnimation(this, periodMultiplier = 0.6F, amplitudeMultiplier = 0.9F),
|
||||
BimanualSwingAnimation(this, swingPeriodMultiplier = 0.6F, amplitudeMultiplier = 0.9F)
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
// override fun getFaintAnimation(
|
||||
// pokemonEntity: PokemonEntity,
|
||||
// state: PosableState<PokemonEntity>
|
||||
// ) = if (state.isPosedIn(standing, walk)) bedrockStateful("magby", "faint") else null
|
||||
}
|
||||
+3
@@ -9,6 +9,7 @@
|
||||
package com.cobblemon.mod.common.client.render.models.blockbench.pokemon.gen2
|
||||
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.HeadedFrame
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.CryProvider
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.PokemonPosableModel
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pose.Pose
|
||||
import com.cobblemon.mod.common.entity.PoseType
|
||||
@@ -28,6 +29,8 @@ class MisdreavusModel (root: ModelPart) : PokemonPosableModel(root), HeadedFrame
|
||||
lateinit var standing: Pose
|
||||
lateinit var walk: Pose
|
||||
|
||||
override val cryAnimation = CryProvider { bedrockStateful("misdreavus", "cry") }
|
||||
|
||||
override fun registerPoses() {
|
||||
val blink = quirk { bedrockStateful("misdreavus", "blink") }
|
||||
standing = registerPose(
|
||||
|
||||
+3
@@ -12,6 +12,7 @@ import com.cobblemon.mod.common.client.render.models.blockbench.animation.Bimanu
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.animation.BipedWalkAnimation
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.BimanualFrame
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.BipedFrame
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.CryProvider
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.PokemonPosableModel
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pose.CobblemonPose
|
||||
import com.cobblemon.mod.common.entity.PoseType
|
||||
@@ -35,6 +36,8 @@ class SentretModel (root: ModelPart) : PokemonPosableModel(root), BipedFrame, Bi
|
||||
lateinit var standing: CobblemonPose
|
||||
lateinit var walk: CobblemonPose
|
||||
|
||||
override val cryAnimation = CryProvider { bedrockStateful("sentret", "cry") }
|
||||
|
||||
override fun registerPoses() {
|
||||
val blink = quirk { bedrockStateful("sentret", "blink") }
|
||||
|
||||
|
||||
-106
@@ -1,106 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Cobblemon Contributors
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
package com.cobblemon.mod.common.client.render.models.blockbench.pokemon.gen2
|
||||
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.animation.BipedWalkAnimation
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.BiWingedFrame
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.BipedFrame
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.HeadedFrame
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.PokemonPosableModel
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pose.CobblemonPose
|
||||
import com.cobblemon.mod.common.entity.PoseType
|
||||
import com.cobblemon.mod.common.util.isBattling
|
||||
import net.minecraft.client.model.geom.ModelPart
|
||||
import net.minecraft.world.phys.Vec3
|
||||
|
||||
class SkarmoryModel (root: ModelPart) : PokemonPosableModel(root), BipedFrame, BiWingedFrame, HeadedFrame {
|
||||
override val rootPart = root.registerChildWithAllChildren("skarmory")
|
||||
override val head = getPart("lower_neck")
|
||||
|
||||
override val leftLeg = getPart("left_thigh")
|
||||
override val rightLeg = getPart("right_thigh")
|
||||
|
||||
override val leftWing = getPart("left_wing")
|
||||
override val rightWing = getPart("right_wing")
|
||||
|
||||
override var portraitScale = 2.49F
|
||||
override var portraitTranslation = Vec3(-1.05, 1.1, 0.0)
|
||||
|
||||
override var profileScale = 0.69F
|
||||
override var profileTranslation = Vec3(0.0, 0.7, 0.0)
|
||||
|
||||
lateinit var standing: CobblemonPose
|
||||
lateinit var walk: CobblemonPose
|
||||
lateinit var sleeping: CobblemonPose
|
||||
lateinit var hovering: CobblemonPose
|
||||
lateinit var flying: CobblemonPose
|
||||
lateinit var battleidle: CobblemonPose
|
||||
|
||||
override fun registerPoses() {
|
||||
val blink = quirk { bedrockStateful("skarmory", "blink") }
|
||||
|
||||
sleeping = registerPose(
|
||||
poseName = "sleeping",
|
||||
poseType = PoseType.SLEEP,
|
||||
animations = arrayOf(
|
||||
bedrock("skarmory", "sleep")
|
||||
)
|
||||
)
|
||||
|
||||
standing = registerPose(
|
||||
poseName = "standing",
|
||||
poseTypes = PoseType.STATIONARY_POSES - PoseType.HOVER + PoseType.UI_POSES,
|
||||
condition = { !it.isBattling },
|
||||
quirks = arrayOf(blink),
|
||||
animations = arrayOf(
|
||||
singleBoneLook(),
|
||||
bedrock("skarmory", "ground_idle")
|
||||
)
|
||||
)
|
||||
|
||||
walk = registerPose(
|
||||
poseName = "walk",
|
||||
poseTypes = PoseType.MOVING_POSES - PoseType.FLY,
|
||||
quirks = arrayOf(blink),
|
||||
animations = arrayOf(
|
||||
singleBoneLook(),
|
||||
bedrock("skarmory", "ground_idle"),
|
||||
BipedWalkAnimation(this,0.6F, 1F)
|
||||
)
|
||||
)
|
||||
|
||||
hovering = registerPose(
|
||||
poseName = "hovering",
|
||||
poseType = PoseType.HOVER,
|
||||
quirks = arrayOf(blink),
|
||||
animations = arrayOf(
|
||||
bedrock("skarmory", "air_idle")
|
||||
)
|
||||
)
|
||||
|
||||
flying = registerPose(
|
||||
poseName = "flying",
|
||||
poseType = PoseType.FLY,
|
||||
quirks = arrayOf(blink),
|
||||
animations = arrayOf(
|
||||
bedrock("skarmory", "air_idle")
|
||||
)
|
||||
)
|
||||
|
||||
battleidle = registerPose(
|
||||
poseName = "battleidle",
|
||||
poseTypes = PoseType.STATIONARY_POSES,
|
||||
condition = { it.isBattling },
|
||||
quirks = arrayOf(blink),
|
||||
animations = arrayOf(
|
||||
bedrock("skarmory", "battle_idle")
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
+2
-1
@@ -9,6 +9,7 @@
|
||||
package com.cobblemon.mod.common.client.render.models.blockbench.pokemon.gen2
|
||||
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.animation.BipedWalkAnimation
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.CryProvider
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.BipedFrame
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.HeadedFrame
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.PokemonPosableModel
|
||||
@@ -34,7 +35,7 @@ class SmeargleModel(root: ModelPart) : PokemonPosableModel(root), HeadedFrame, B
|
||||
lateinit var standing: Pose
|
||||
lateinit var walk: Pose
|
||||
|
||||
//override val cryAnimation = CryProvider { _, _ -> bedrockStateful("smeargle", "cry") }
|
||||
override val cryAnimation = CryProvider { bedrockStateful("smeargle", "cry") }
|
||||
|
||||
override fun registerPoses() {
|
||||
val blink = quirk { bedrockStateful("smeargle", "blink") }
|
||||
|
||||
+3
@@ -10,6 +10,7 @@ package com.cobblemon.mod.common.client.render.models.blockbench.pokemon.gen2
|
||||
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.HeadedFrame
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.QuadrupedFrame
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.CryProvider
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.PokemonPosableModel
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pose.Pose
|
||||
import com.cobblemon.mod.common.entity.PoseType
|
||||
@@ -35,6 +36,8 @@ class StantlerModel (root: ModelPart) : PokemonPosableModel(root), HeadedFrame,
|
||||
lateinit var standing: Pose
|
||||
lateinit var walk: Pose
|
||||
|
||||
override val cryAnimation = CryProvider { bedrockStateful("stantler", "cry") }
|
||||
|
||||
override fun registerPoses() {
|
||||
val blink = quirk { bedrockStateful("stantler", "blink") }
|
||||
|
||||
|
||||
-49
@@ -1,49 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Cobblemon Contributors
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
package com.cobblemon.mod.common.client.render.models.blockbench.pokemon.gen3
|
||||
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.PokemonPosableModel
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pose.CobblemonPose
|
||||
import com.cobblemon.mod.common.entity.PoseType
|
||||
import net.minecraft.client.model.geom.ModelPart
|
||||
import net.minecraft.world.phys.Vec3
|
||||
|
||||
class LunatoneModel (root: ModelPart) : PokemonPosableModel(root) {
|
||||
override val rootPart = root.registerChildWithAllChildren("lunatone")
|
||||
|
||||
override var portraitScale = 1.05F
|
||||
override var portraitTranslation = Vec3(0.23, 0.53, 0.0)
|
||||
|
||||
override var profileScale = 0.73F
|
||||
override var profileTranslation = Vec3(0.05, 0.68, 0.0)
|
||||
|
||||
lateinit var sleep: CobblemonPose
|
||||
lateinit var standing: CobblemonPose
|
||||
|
||||
override fun registerPoses() {
|
||||
val blink = quirk { bedrockStateful("lunatone", "blink") }
|
||||
sleep = registerPose(
|
||||
poseType = PoseType.SLEEP,
|
||||
animations = arrayOf(bedrock("lunatone", "sleep"))
|
||||
)
|
||||
|
||||
standing = registerPose(
|
||||
poseName = "standing",
|
||||
poseTypes = PoseType.ALL_POSES - PoseType.SLEEP,
|
||||
quirks = arrayOf(blink),
|
||||
animations = arrayOf(
|
||||
bedrock("lunatone", "ground_idle")
|
||||
)
|
||||
)
|
||||
}
|
||||
// override fun getFaintAnimation(
|
||||
// pokemonEntity: PokemonEntity,
|
||||
// state: PosableState<PokemonEntity>
|
||||
// ) = if (state.isPosedIn(sleep)) bedrockStateful("lunatone", "faint") else null
|
||||
}
|
||||
-74
@@ -1,74 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Cobblemon Contributors
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
package com.cobblemon.mod.common.client.render.models.blockbench.pokemon.gen3
|
||||
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.PokemonPosableModel
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.PosableState
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.HeadedFrame
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.QuadrupedFrame
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.CryProvider
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pose.Pose
|
||||
import com.cobblemon.mod.common.entity.PoseType
|
||||
import net.minecraft.client.model.geom.ModelPart
|
||||
import net.minecraft.world.phys.Vec3
|
||||
|
||||
class NincadaModel (root: ModelPart) : PokemonPosableModel(root), HeadedFrame, QuadrupedFrame {
|
||||
override val rootPart = root.registerChildWithAllChildren("nincada")
|
||||
override val head = getPart("head")
|
||||
override val foreLeftLeg= getPart("leg_front_left")
|
||||
override val foreRightLeg = getPart("leg_front_right")
|
||||
override val hindLeftLeg = getPart("leg_back_left")
|
||||
override val hindRightLeg = getPart("leg_back_right")
|
||||
|
||||
override var portraitScale = 2.0F
|
||||
override var portraitTranslation = Vec3(-0.26, -1.0, 0.0)
|
||||
override var profileScale = 0.7F
|
||||
override var profileTranslation = Vec3(0.0, 0.6, 0.0)
|
||||
|
||||
lateinit var sleep: Pose
|
||||
lateinit var standing: Pose
|
||||
lateinit var walk: Pose
|
||||
|
||||
override val cryAnimation = CryProvider { bedrockStateful("nincada", "cry") }
|
||||
|
||||
override fun registerPoses() {
|
||||
val blink = quirk { bedrockStateful("nincada", "blink") }
|
||||
val flutter = quirk { bedrockStateful("nincada", "quirk_wingflutter") }
|
||||
|
||||
sleep = registerPose(
|
||||
poseType = PoseType.SLEEP,
|
||||
transformTicks = 10,
|
||||
animations = arrayOf(bedrock("nincada", "sleep"))
|
||||
)
|
||||
|
||||
standing = registerPose(
|
||||
poseName = "standing",
|
||||
poseTypes = setOf(PoseType.NONE, PoseType.STAND, PoseType.PORTRAIT, PoseType.PROFILE),
|
||||
transformTicks = 10,
|
||||
quirks = arrayOf(blink, flutter),
|
||||
animations = arrayOf(
|
||||
singleBoneLook(),
|
||||
bedrock("nincada", "ground_idle")
|
||||
)
|
||||
)
|
||||
|
||||
walk = registerPose(
|
||||
poseName = "walking",
|
||||
poseTypes = setOf(PoseType.SWIM, PoseType.WALK),
|
||||
transformTicks = 10,
|
||||
quirks = arrayOf(blink, flutter),
|
||||
animations = arrayOf(
|
||||
singleBoneLook(),
|
||||
bedrock("nincada", "ground_walk")
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
override fun getFaintAnimation(state: PosableState) = if (state.isPosedIn(standing, walk)) bedrockStateful("nincada", "faint") else null
|
||||
}
|
||||
-93
@@ -1,93 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Cobblemon Contributors
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
package com.cobblemon.mod.common.client.render.models.blockbench.pokemon.gen3
|
||||
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.PokemonPosableModel
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.PosableState
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.HeadedFrame
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.CryProvider
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pose.Pose
|
||||
import com.cobblemon.mod.common.entity.PoseType
|
||||
import net.minecraft.client.model.geom.ModelPart
|
||||
import net.minecraft.world.phys.Vec3
|
||||
|
||||
class NinjaskModel (root: ModelPart) : PokemonPosableModel(root), HeadedFrame {
|
||||
override val rootPart = root.registerChildWithAllChildren("ninjask")
|
||||
|
||||
override val head = getPart("head")
|
||||
|
||||
override var portraitScale = 1.8F
|
||||
override var portraitTranslation = Vec3(-0.2, -0.4, 0.0)
|
||||
|
||||
override var profileScale = 0.9F
|
||||
override var profileTranslation = Vec3(0.0, 0.3, 0.0)
|
||||
|
||||
lateinit var sleep: Pose
|
||||
lateinit var stand: Pose
|
||||
lateinit var walk: Pose
|
||||
lateinit var hover: Pose
|
||||
lateinit var fly: Pose
|
||||
|
||||
override val cryAnimation = CryProvider { bedrockStateful("ninjask", "cry") }
|
||||
|
||||
override fun registerPoses() {
|
||||
val blink = quirk { bedrockStateful("ninjask", "blink") }
|
||||
val barrelRoll = quirk { bedrockStateful("ninjask", "run_quirk") }
|
||||
|
||||
sleep = registerPose(
|
||||
poseType = PoseType.SLEEP,
|
||||
animations = arrayOf(bedrock("ninjask", "sleep"))
|
||||
)
|
||||
|
||||
stand = registerPose(
|
||||
poseName = "standing",
|
||||
poseTypes = PoseType.UI_POSES + PoseType.STATIONARY_POSES - PoseType.HOVER,
|
||||
transformTicks = 10,
|
||||
quirks = arrayOf(blink),
|
||||
animations = arrayOf(
|
||||
singleBoneLook(),
|
||||
bedrock("ninjask", "ground_idle")
|
||||
)
|
||||
)
|
||||
|
||||
hover = registerPose(
|
||||
poseName = "hover",
|
||||
poseType = PoseType.HOVER,
|
||||
transformTicks = 10,
|
||||
quirks = arrayOf(blink, barrelRoll),
|
||||
animations = arrayOf(
|
||||
singleBoneLook(),
|
||||
bedrock("ninjask", "air_idle")
|
||||
)
|
||||
)
|
||||
|
||||
fly = registerPose(
|
||||
poseName = "fly",
|
||||
poseType = PoseType.FLY,
|
||||
transformTicks = 10,
|
||||
quirks = arrayOf(blink, barrelRoll),
|
||||
animations = arrayOf(
|
||||
singleBoneLook(),
|
||||
bedrock("ninjask", "air_fly")
|
||||
)
|
||||
)
|
||||
|
||||
walk = registerPose(
|
||||
poseName = "walking",
|
||||
poseTypes = PoseType.MOVING_POSES - PoseType.FLY,
|
||||
transformTicks = 10,
|
||||
quirks = arrayOf(blink, barrelRoll),
|
||||
animations = arrayOf(
|
||||
singleBoneLook(),
|
||||
bedrock("ninjask", "ground_walk")
|
||||
)
|
||||
)
|
||||
}
|
||||
override fun getFaintAnimation(state: PosableState) = bedrockStateful("ninjask", "faint")
|
||||
}
|
||||
-49
@@ -1,49 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Cobblemon Contributors
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
package com.cobblemon.mod.common.client.render.models.blockbench.pokemon.gen3
|
||||
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.PokemonPosableModel
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pose.CobblemonPose
|
||||
import com.cobblemon.mod.common.entity.PoseType
|
||||
import net.minecraft.client.model.geom.ModelPart
|
||||
import net.minecraft.world.phys.Vec3
|
||||
|
||||
class SolrockModel (root: ModelPart) : PokemonPosableModel(root) {
|
||||
override val rootPart = root.registerChildWithAllChildren("solrock")
|
||||
|
||||
override var portraitScale = 1.6F
|
||||
override var portraitTranslation = Vec3(-0.08, 0.31, 0.0)
|
||||
|
||||
override var profileScale = 0.8F
|
||||
override var profileTranslation = Vec3(0.0, 0.74, 0.0)
|
||||
|
||||
lateinit var sleep: CobblemonPose
|
||||
lateinit var standing: CobblemonPose
|
||||
|
||||
override fun registerPoses() {
|
||||
val blink = quirk { bedrockStateful("solrock", "blink") }
|
||||
sleep = registerPose(
|
||||
poseType = PoseType.SLEEP,
|
||||
animations = arrayOf(bedrock("solrock", "sleep"))
|
||||
)
|
||||
|
||||
standing = registerPose(
|
||||
poseName = "standing",
|
||||
poseTypes = PoseType.ALL_POSES - PoseType.SLEEP,
|
||||
quirks = arrayOf(blink),
|
||||
animations = arrayOf(
|
||||
bedrock("solrock", "ground_idle")
|
||||
)
|
||||
)
|
||||
}
|
||||
// override fun getFaintAnimation(
|
||||
// pokemonEntity: PokemonEntity,
|
||||
// state: PosableState<PokemonEntity>
|
||||
// ) = if (state.isPosedIn(sleep)) bedrockStateful("solrock", "faint") else null
|
||||
}
|
||||
-57
@@ -1,57 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Cobblemon Contributors
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
package com.cobblemon.mod.common.client.render.models.blockbench.pokemon.gen3
|
||||
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.animation.BipedWalkAnimation
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.BipedFrame
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.HeadedFrame
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.PokemonPosableModel
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pose.Pose
|
||||
import com.cobblemon.mod.common.entity.PoseType
|
||||
import net.minecraft.client.model.geom.ModelPart
|
||||
import net.minecraft.world.phys.Vec3
|
||||
|
||||
class SpindaModel (root: ModelPart) : PokemonPosableModel(root), HeadedFrame, BipedFrame {
|
||||
override val rootPart = root.registerChildWithAllChildren("spinda")
|
||||
override val head = getPart("head")
|
||||
|
||||
override val leftLeg = getPart("leg_left")
|
||||
override val rightLeg = getPart("leg_right")
|
||||
|
||||
override var portraitScale = 1.9F
|
||||
override var portraitTranslation = Vec3(-0.5, -0.1, 0.0)
|
||||
|
||||
override var profileScale = 0.76F
|
||||
override var profileTranslation = Vec3(0.0, 0.6, 0.0)
|
||||
|
||||
lateinit var standing: Pose
|
||||
lateinit var walk: Pose
|
||||
|
||||
override fun registerPoses() {
|
||||
standing = registerPose(
|
||||
poseName = "standing",
|
||||
poseTypes = PoseType.STATIONARY_POSES + PoseType.UI_POSES,
|
||||
animations = arrayOf(
|
||||
singleBoneLook(),
|
||||
bedrock("spinda", "ground_idle")
|
||||
)
|
||||
)
|
||||
|
||||
walk = registerPose(
|
||||
poseName = "walk",
|
||||
poseTypes = PoseType.MOVING_POSES,
|
||||
animations = arrayOf(
|
||||
singleBoneLook(),
|
||||
bedrock("spinda", "ground_idle"),
|
||||
BipedWalkAnimation(this, periodMultiplier = 0.7F)
|
||||
//bedrock("spinda", "ground_walk")
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
-74
@@ -1,74 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Cobblemon Contributors
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
package com.cobblemon.mod.common.client.render.models.blockbench.pokemon.gen3
|
||||
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.animation.QuadrupedWalkAnimation
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.HeadedFrame
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.QuadrupedFrame
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.PokemonPosableModel
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pose.CobblemonPose
|
||||
import com.cobblemon.mod.common.entity.PoseType
|
||||
import com.cobblemon.mod.common.util.isBattling
|
||||
import net.minecraft.client.model.geom.ModelPart
|
||||
import net.minecraft.world.phys.Vec3
|
||||
|
||||
class TorkoalModel (root: ModelPart) : PokemonPosableModel(root), HeadedFrame, QuadrupedFrame {
|
||||
override val rootPart = root.registerChildWithAllChildren("torkoal")
|
||||
override val head = getPart("neck")
|
||||
|
||||
override val foreLeftLeg= getPart("leg_front_left")
|
||||
override val foreRightLeg = getPart("leg_front_right")
|
||||
override val hindLeftLeg = getPart("leg_back_left")
|
||||
override val hindRightLeg = getPart("leg_back_right")
|
||||
|
||||
override var portraitScale = 2.5F
|
||||
override var portraitTranslation = Vec3(-1.3, -0.5, 0.0)
|
||||
|
||||
override var profileScale = 0.8F
|
||||
override var profileTranslation = Vec3(0.0, 0.43, 0.0)
|
||||
|
||||
lateinit var standing: CobblemonPose
|
||||
lateinit var walk: CobblemonPose
|
||||
lateinit var battleidle: CobblemonPose
|
||||
|
||||
override fun registerPoses() {
|
||||
standing = registerPose(
|
||||
poseName = "standing",
|
||||
poseTypes = PoseType.STATIONARY_POSES + PoseType.UI_POSES,
|
||||
condition = { !it.isBattling },
|
||||
transformTicks = 10,
|
||||
animations = arrayOf(
|
||||
singleBoneLook(),
|
||||
bedrock("torkoal", "ground_idle")
|
||||
)
|
||||
)
|
||||
|
||||
walk = registerPose(
|
||||
poseName = "walk",
|
||||
poseTypes = PoseType.MOVING_POSES,
|
||||
transformTicks = 10,
|
||||
animations = arrayOf(
|
||||
singleBoneLook(),
|
||||
bedrock("torkoal", "ground_idle"),
|
||||
QuadrupedWalkAnimation(this, periodMultiplier = 0.7F, amplitudeMultiplier = 0.7F)
|
||||
)
|
||||
)
|
||||
|
||||
battleidle = registerPose(
|
||||
poseName = "battleidle",
|
||||
poseTypes = PoseType.STATIONARY_POSES,
|
||||
condition = { it.isBattling },
|
||||
transformTicks = 10,
|
||||
animations = arrayOf(
|
||||
singleBoneLook(),
|
||||
bedrock("torkoal", "battle_idle")
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
+3
@@ -10,6 +10,7 @@ package com.cobblemon.mod.common.client.render.models.blockbench.pokemon.gen4
|
||||
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.PosableState
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.BipedFrame
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.CryProvider
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.PokemonPosableModel
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pose.CobblemonPose
|
||||
import com.cobblemon.mod.common.entity.PoseType
|
||||
@@ -36,6 +37,8 @@ class HappinyModel(root: ModelPart) : PokemonPosableModel(root), BipedFrame {
|
||||
lateinit var sleep: CobblemonPose
|
||||
lateinit var battle_idle: CobblemonPose
|
||||
|
||||
override val cryAnimation = CryProvider { bedrockStateful("happiny", "cry") }
|
||||
|
||||
override fun registerPoses() {
|
||||
val blink = quirk { bedrockStateful("happiny", "blink") }
|
||||
val hairQuirk = quirk { bedrockStateful("happiny", "hairshake_quirk") }
|
||||
|
||||
-83
@@ -1,83 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Cobblemon Contributors
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
package com.cobblemon.mod.common.client.render.models.blockbench.pokemon.gen4
|
||||
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.PokemonPosableModel
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.animation.BimanualSwingAnimation
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.animation.BipedWalkAnimation
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.BimanualFrame
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.BipedFrame
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.HeadedFrame
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.CryProvider
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pose.CobblemonPose
|
||||
import com.cobblemon.mod.common.entity.PoseType
|
||||
import com.cobblemon.mod.common.util.isBattling
|
||||
import net.minecraft.client.model.geom.ModelPart
|
||||
import net.minecraft.world.phys.Vec3
|
||||
|
||||
class LucarioModel (root: ModelPart) : PokemonPosableModel(root), HeadedFrame, BipedFrame, BimanualFrame {
|
||||
override val rootPart = root.registerChildWithAllChildren("lucario")
|
||||
override val head = getPart("head")
|
||||
|
||||
override val leftArm = getPart("arm_left")
|
||||
override val rightArm = getPart("arm_right")
|
||||
override val leftLeg = getPart("leg_left")
|
||||
override val rightLeg = getPart("leg_right")
|
||||
|
||||
override var portraitScale = 2.2F
|
||||
override var portraitTranslation = Vec3(-0.2, 2.2, 0.0)
|
||||
|
||||
override var profileScale = 0.6F
|
||||
override var profileTranslation = Vec3(0.0, 0.83, 0.0)
|
||||
|
||||
lateinit var standing: CobblemonPose
|
||||
lateinit var walk: CobblemonPose
|
||||
lateinit var battleIdle: CobblemonPose
|
||||
|
||||
override val cryAnimation = CryProvider { bedrockStateful("lucario", "cry") }
|
||||
|
||||
override fun registerPoses() {
|
||||
val blink = quirk { bedrockStateful("lucario", "blink") }
|
||||
standing = registerPose(
|
||||
poseName = "standing",
|
||||
poseTypes = PoseType.STATIONARY_POSES + PoseType.UI_POSES,
|
||||
condition = { !it.isBattling },
|
||||
quirks = arrayOf(blink),
|
||||
animations = arrayOf(
|
||||
singleBoneLook(),
|
||||
bedrock("lucario", "ground_idle")
|
||||
)
|
||||
)
|
||||
|
||||
walk = registerPose(
|
||||
poseName = "walk",
|
||||
poseTypes = PoseType.MOVING_POSES,
|
||||
quirks = arrayOf(blink),
|
||||
animations = arrayOf(
|
||||
singleBoneLook(),
|
||||
bedrock("lucario", "ground_idle"),
|
||||
BimanualSwingAnimation(this),
|
||||
BipedWalkAnimation(this)
|
||||
)
|
||||
)
|
||||
|
||||
battleIdle = registerPose(
|
||||
poseName = "battle_idle",
|
||||
poseTypes = PoseType.STATIONARY_POSES,
|
||||
condition = { it.isBattling },
|
||||
quirks = arrayOf(blink),
|
||||
animations = arrayOf(
|
||||
singleBoneLook(),
|
||||
bedrock("lucario", "ground_idle"),
|
||||
bedrock("lucario", "battle_idle_aura_left"),
|
||||
bedrock("lucario", "battle_idle_aura_right")
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
-68
@@ -1,68 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Cobblemon Contributors
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
package com.cobblemon.mod.common.client.render.models.blockbench.pokemon.gen4
|
||||
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.PokemonPosableModel
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.animation.BimanualSwingAnimation
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.animation.BipedWalkAnimation
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.BimanualFrame
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.BipedFrame
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.HeadedFrame
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pose.Pose
|
||||
import com.cobblemon.mod.common.entity.PoseType.Companion.MOVING_POSES
|
||||
import com.cobblemon.mod.common.entity.PoseType.Companion.STATIONARY_POSES
|
||||
import com.cobblemon.mod.common.entity.PoseType.Companion.UI_POSES
|
||||
import net.minecraft.client.model.geom.ModelPart
|
||||
import net.minecraft.world.phys.Vec3
|
||||
|
||||
class MagmortarModel(root: ModelPart) : PokemonPosableModel(root), HeadedFrame, BipedFrame, BimanualFrame {
|
||||
override val rootPart = root.registerChildWithAllChildren("magmortar")
|
||||
override val head = getPart("head")
|
||||
|
||||
override val leftArm = getPart("leftarm")
|
||||
override val rightArm = getPart("rightarm")
|
||||
override val leftLeg = getPart("leftleg")
|
||||
override val rightLeg = getPart("rightleg")
|
||||
|
||||
override var portraitScale = 2.2F
|
||||
override var portraitTranslation = Vec3(-0.35, 1.2, 0.0)
|
||||
|
||||
override var profileScale = 0.65F
|
||||
override var profileTranslation = Vec3(0.0, 0.73, 0.0)
|
||||
|
||||
lateinit var standing: Pose
|
||||
lateinit var walk: Pose
|
||||
|
||||
override fun registerPoses() {
|
||||
standing = registerPose(
|
||||
poseName = "standing",
|
||||
poseTypes = STATIONARY_POSES + UI_POSES,
|
||||
animations = arrayOf(
|
||||
singleBoneLook(),
|
||||
bedrock("magmortar", "ground_idle")
|
||||
)
|
||||
)
|
||||
|
||||
walk = registerPose(
|
||||
poseName = "walk",
|
||||
poseTypes = MOVING_POSES,
|
||||
animations = arrayOf(
|
||||
singleBoneLook(),
|
||||
bedrock("magmortar", "ground_idle"),
|
||||
BipedWalkAnimation(this, periodMultiplier = 0.6F, amplitudeMultiplier = 0.9F),
|
||||
BimanualSwingAnimation(this, swingPeriodMultiplier = 0.6F, amplitudeMultiplier = 0.9F)
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
// override fun getFaintAnimation(
|
||||
// pokemonEntity: PokemonEntity,
|
||||
// state: PosableState<PokemonEntity>
|
||||
// ) = if (state.isPosedIn(standing, walk)) bedrockStateful("magmortar", "faint") else null
|
||||
}
|
||||
+3
@@ -8,6 +8,7 @@
|
||||
|
||||
package com.cobblemon.mod.common.client.render.models.blockbench.pokemon.gen4
|
||||
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.CryProvider
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.PokemonPosableModel
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pose.Pose
|
||||
import com.cobblemon.mod.common.entity.PoseType
|
||||
@@ -27,6 +28,8 @@ class MagnezoneModel(root: ModelPart) : PokemonPosableModel(root) {
|
||||
lateinit var walk: Pose
|
||||
lateinit var sleep: Pose
|
||||
|
||||
override val cryAnimation = CryProvider { bedrockStateful("magnezone", "cry") }
|
||||
|
||||
|
||||
override fun registerPoses() {
|
||||
val blink = quirk { bedrockStateful("magnezone", "blink") }
|
||||
|
||||
+3
@@ -10,6 +10,7 @@ package com.cobblemon.mod.common.client.render.models.blockbench.pokemon.gen4
|
||||
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.PokemonPosableModel
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.HeadedFrame
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.CryProvider
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pose.Pose
|
||||
import com.cobblemon.mod.common.entity.PoseType
|
||||
import net.minecraft.client.model.geom.ModelPart
|
||||
@@ -28,6 +29,8 @@ class MismagiusModel (root: ModelPart) : PokemonPosableModel(root), HeadedFrame
|
||||
lateinit var standing: Pose
|
||||
lateinit var walk: Pose
|
||||
|
||||
override val cryAnimation = CryProvider { bedrockStateful("mismagius", "cry") }
|
||||
|
||||
override fun registerPoses() {
|
||||
val blink = quirk { bedrockStateful("mismagius", "blink") }
|
||||
standing = registerPose(
|
||||
|
||||
-67
@@ -1,67 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Cobblemon Contributors
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
package com.cobblemon.mod.common.client.render.models.blockbench.pokemon.gen4
|
||||
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.animation.BimanualSwingAnimation
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.animation.BipedWalkAnimation
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.BimanualFrame
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.BipedFrame
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.HeadedFrame
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.CryProvider
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.PokemonPosableModel
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pose.Pose
|
||||
import com.cobblemon.mod.common.entity.PoseType
|
||||
import net.minecraft.client.model.geom.ModelPart
|
||||
import net.minecraft.world.phys.Vec3
|
||||
|
||||
class RioluModel (root: ModelPart) : PokemonPosableModel(root), HeadedFrame, BipedFrame, BimanualFrame {
|
||||
override val rootPart = root.registerChildWithAllChildren("riolu")
|
||||
override val head = getPart("head")
|
||||
|
||||
override val leftArm = getPart("arm_left")
|
||||
override val rightArm = getPart("arm_right")
|
||||
override val leftLeg = getPart("leg_left")
|
||||
override val rightLeg = getPart("leg_right")
|
||||
|
||||
override var portraitScale = 2.8F
|
||||
override var portraitTranslation = Vec3(0.0, -0.3, 0.0)
|
||||
|
||||
override var profileScale = 0.85F
|
||||
override var profileTranslation = Vec3(0.0, 0.5, 0.0)
|
||||
|
||||
lateinit var standing: Pose
|
||||
lateinit var walk: Pose
|
||||
|
||||
override val cryAnimation = CryProvider { bedrockStateful("riolu", "cry") }
|
||||
|
||||
override fun registerPoses() {
|
||||
val blink = quirk { bedrockStateful("riolu", "blink") }
|
||||
standing = registerPose(
|
||||
poseName = "standing",
|
||||
poseTypes = PoseType.STATIONARY_POSES + PoseType.UI_POSES,
|
||||
quirks = arrayOf(blink),
|
||||
animations = arrayOf(
|
||||
singleBoneLook(),
|
||||
bedrock("riolu", "ground_idle")
|
||||
)
|
||||
)
|
||||
|
||||
walk = registerPose(
|
||||
poseName = "walk",
|
||||
poseTypes = PoseType.MOVING_POSES,
|
||||
quirks = arrayOf(blink),
|
||||
animations = arrayOf(
|
||||
singleBoneLook(),
|
||||
bedrock("riolu", "ground_idle"),
|
||||
BipedWalkAnimation(this),
|
||||
BimanualSwingAnimation(this)
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
+3
@@ -11,6 +11,7 @@ package com.cobblemon.mod.common.client.render.models.blockbench.pokemon.gen5
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.BimanualFrame
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.BipedFrame
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.HeadedFrame
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.CryProvider
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.PokemonPosableModel
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pose.Pose
|
||||
import com.cobblemon.mod.common.entity.PoseType
|
||||
@@ -35,6 +36,8 @@ class BeheeyemModel (root: ModelPart) : PokemonPosableModel(root), HeadedFrame,
|
||||
lateinit var standing: Pose
|
||||
lateinit var walk: Pose
|
||||
|
||||
override val cryAnimation = CryProvider { bedrockStateful("beheeyem", "cry") }
|
||||
|
||||
override fun registerPoses() {
|
||||
sleep = registerPose(
|
||||
poseType = PoseType.SLEEP,
|
||||
|
||||
-61
@@ -1,61 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Cobblemon Contributors
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
package com.cobblemon.mod.common.client.render.models.blockbench.pokemon.gen5
|
||||
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.PokemonPosableModel
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.HeadedFrame
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.CryProvider
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pose.Pose
|
||||
import com.cobblemon.mod.common.entity.PoseType.Companion.MOVING_POSES
|
||||
import com.cobblemon.mod.common.entity.PoseType.Companion.STATIONARY_POSES
|
||||
import com.cobblemon.mod.common.entity.PoseType.Companion.UI_POSES
|
||||
import net.minecraft.client.model.geom.ModelPart
|
||||
import net.minecraft.world.phys.Vec3
|
||||
|
||||
class CrustleModel(root: ModelPart) : PokemonPosableModel(root), HeadedFrame {
|
||||
override val rootPart = root.registerChildWithAllChildren("crustle")
|
||||
override val head = getPart("head")
|
||||
|
||||
override var portraitScale = 4.0F
|
||||
override var portraitTranslation = Vec3(-0.55, -4.0, 0.0)
|
||||
|
||||
override var profileScale = 1.0F
|
||||
override var profileTranslation = Vec3(0.0, 0.1, 0.0)
|
||||
|
||||
lateinit var standing: Pose
|
||||
lateinit var walk: Pose
|
||||
|
||||
override val cryAnimation = CryProvider { bedrockStateful("crustle", "cry") }
|
||||
|
||||
override fun registerPoses() {
|
||||
standing = registerPose(
|
||||
poseName = "standing",
|
||||
poseTypes = STATIONARY_POSES + UI_POSES,
|
||||
animations = arrayOf(
|
||||
singleBoneLook(),
|
||||
bedrock("crustle", "ground_idle")
|
||||
)
|
||||
)
|
||||
|
||||
walk = registerPose(
|
||||
poseName = "walk",
|
||||
poseTypes = MOVING_POSES,
|
||||
animations = arrayOf(
|
||||
singleBoneLook(),
|
||||
bedrock("crustle", "ground_idle")
|
||||
//bedrock("crustle", "ground_walk")
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
// override fun getFaintAnimation(
|
||||
// pokemonEntity: PokemonEntity,
|
||||
// state: PosableState<PokemonEntity>
|
||||
// ) = if (state.isPosedIn(standing, walk)) bedrockStateful("crustle", "faint") else null
|
||||
}
|
||||
+2
-1
@@ -11,6 +11,7 @@ package com.cobblemon.mod.common.client.render.models.blockbench.pokemon.gen5
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.animation.QuadrupedWalkAnimation
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.HeadedFrame
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.QuadrupedFrame
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.CryProvider
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.PokemonPosableModel
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pose.CobblemonPose
|
||||
import com.cobblemon.mod.common.entity.PoseType
|
||||
@@ -35,7 +36,7 @@ class DeinoModel (root: ModelPart) : PokemonPosableModel(root), HeadedFrame, Qua
|
||||
lateinit var standing: CobblemonPose
|
||||
lateinit var walk: CobblemonPose
|
||||
|
||||
// override val cryAnimation = CryProvider { bedrockStateful("deino", "cry") }
|
||||
override val cryAnimation = CryProvider { bedrockStateful("deino", "cry") }
|
||||
|
||||
override fun registerPoses() {
|
||||
standing = registerPose(
|
||||
|
||||
-61
@@ -1,61 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Cobblemon Contributors
|
||||
*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
package com.cobblemon.mod.common.client.render.models.blockbench.pokemon.gen5
|
||||
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.HeadedFrame
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.CryProvider
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.PokemonPosableModel
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pose.Pose
|
||||
import com.cobblemon.mod.common.entity.PoseType.Companion.MOVING_POSES
|
||||
import com.cobblemon.mod.common.entity.PoseType.Companion.STATIONARY_POSES
|
||||
import com.cobblemon.mod.common.entity.PoseType.Companion.UI_POSES
|
||||
import net.minecraft.client.model.geom.ModelPart
|
||||
import net.minecraft.world.phys.Vec3
|
||||
|
||||
class DwebbleModel(root: ModelPart) : PokemonPosableModel(root), HeadedFrame {
|
||||
override val rootPart = root.registerChildWithAllChildren("dwebble")
|
||||
override val head = getPart("head")
|
||||
|
||||
override var portraitScale = 2.6F
|
||||
override var portraitTranslation = Vec3(-0.2, -1.9, 0.0)
|
||||
|
||||
override var profileScale = 1.0F
|
||||
override var profileTranslation = Vec3(0.0, 0.2, 0.0)
|
||||
|
||||
lateinit var standing: Pose
|
||||
lateinit var walk: Pose
|
||||
|
||||
override val cryAnimation = CryProvider { bedrockStateful("dwebble", "cry") }
|
||||
|
||||
override fun registerPoses() {
|
||||
standing = registerPose(
|
||||
poseName = "standing",
|
||||
poseTypes = STATIONARY_POSES + UI_POSES,
|
||||
animations = arrayOf(
|
||||
singleBoneLook(),
|
||||
bedrock("dwebble", "ground_idle")
|
||||
)
|
||||
)
|
||||
|
||||
walk = registerPose(
|
||||
poseName = "walk",
|
||||
poseTypes = MOVING_POSES,
|
||||
animations = arrayOf(
|
||||
singleBoneLook(),
|
||||
bedrock("dwebble", "ground_idle")
|
||||
//bedrock("dwebble", "ground_walk")
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
// override fun getFaintAnimation(
|
||||
// pokemonEntity: PokemonEntity,
|
||||
// state: PosableState<PokemonEntity>
|
||||
// ) = if (state.isPosedIn(standing, walk)) bedrockStateful("dwebble", "faint") else null
|
||||
}
|
||||
+3
@@ -13,6 +13,7 @@ import com.cobblemon.mod.common.client.render.models.blockbench.createTransforma
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.BimanualFrame
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.BipedFrame
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.HeadedFrame
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.CryProvider
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.PokemonPosableModel
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pose.ModelPartTransformation
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pose.Pose
|
||||
@@ -42,6 +43,8 @@ class ElgyemModel (root: ModelPart) : PokemonPosableModel(root), HeadedFrame, Bi
|
||||
lateinit var shoulderLeft: Pose
|
||||
lateinit var shoulderRight: Pose
|
||||
|
||||
override val cryAnimation = CryProvider { bedrockStateful("elgyem", "cry") }
|
||||
|
||||
val shoulderOffset = 5.6
|
||||
|
||||
override fun registerPoses() {
|
||||
|
||||
+2
-1
@@ -10,6 +10,7 @@ package com.cobblemon.mod.common.client.render.models.blockbench.pokemon.gen5
|
||||
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.BiWingedFrame
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.HeadedFrame
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.CryProvider
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.PokemonPosableModel
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pose.CobblemonPose
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pose.ModelPartTransformation
|
||||
@@ -33,7 +34,7 @@ class HydreigonModel (root: ModelPart) : PokemonPosableModel(root), HeadedFrame
|
||||
lateinit var standing: CobblemonPose
|
||||
lateinit var walk: CobblemonPose
|
||||
|
||||
// override val cryAnimation = CryProvider { bedrockStateful("hydreigon", "cry") }
|
||||
override val cryAnimation = CryProvider { bedrockStateful("hydreigon", "cry") }
|
||||
|
||||
override fun registerPoses() {
|
||||
val blink = quirk { bedrockStateful("hydreigon", "blink") }
|
||||
|
||||
+2
-1
@@ -12,6 +12,7 @@ import com.cobblemon.mod.common.client.render.models.blockbench.animation.Quadru
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.animation.SingleBoneLookAnimation
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.HeadedFrame
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.QuadrupedFrame
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.CryProvider
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.PokemonPosableModel
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pose.CobblemonPose
|
||||
import com.cobblemon.mod.common.entity.PoseType
|
||||
@@ -41,7 +42,7 @@ class ZweilousModel (root: ModelPart) : PokemonPosableModel(root), HeadedFrame,
|
||||
lateinit var standing: CobblemonPose
|
||||
lateinit var walk: CobblemonPose
|
||||
|
||||
// override val cryAnimation = CryProvider { bedrockStateful("zweilous", "cry") }
|
||||
override val cryAnimation = CryProvider { bedrockStateful("zweilous", "cry") }
|
||||
|
||||
override fun registerPoses() {
|
||||
|
||||
|
||||
+3
@@ -10,6 +10,7 @@ package com.cobblemon.mod.common.client.render.models.blockbench.pokemon.gen6
|
||||
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.createTransformation
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.HeadedFrame
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.CryProvider
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.PokemonPosableModel
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pose.CobblemonPose
|
||||
import com.cobblemon.mod.common.entity.PoseType
|
||||
@@ -31,6 +32,8 @@ class FlabebeModel (root: ModelPart) : PokemonPosableModel(root), HeadedFrame {
|
||||
lateinit var shoulderLeft: CobblemonPose
|
||||
lateinit var shoulderRight: CobblemonPose
|
||||
|
||||
override val cryAnimation = CryProvider { bedrockStateful("flabebe", "cry") }
|
||||
|
||||
val shoulderOffset = 10.5
|
||||
override fun registerPoses() {
|
||||
val blink = quirk { bedrockStateful("flabebe", "blink") }
|
||||
|
||||
+4
@@ -9,6 +9,7 @@
|
||||
package com.cobblemon.mod.common.client.render.models.blockbench.pokemon.gen6
|
||||
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.HeadedFrame
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.CryProvider
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.PokemonPosableModel
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pose.CobblemonPose
|
||||
import com.cobblemon.mod.common.entity.PoseType
|
||||
@@ -27,6 +28,9 @@ class FloetteModel (root: ModelPart) : PokemonPosableModel(root), HeadedFrame {
|
||||
|
||||
lateinit var standing: CobblemonPose
|
||||
lateinit var walk: CobblemonPose
|
||||
|
||||
override val cryAnimation = CryProvider { bedrockStateful("floette", "cry") }
|
||||
|
||||
override fun registerPoses() {
|
||||
val blink = quirk { bedrockStateful("floette", "blink") }
|
||||
|
||||
|
||||
+4
@@ -9,6 +9,7 @@
|
||||
package com.cobblemon.mod.common.client.render.models.blockbench.pokemon.gen6
|
||||
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.frame.HeadedFrame
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.CryProvider
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pokemon.PokemonPosableModel
|
||||
import com.cobblemon.mod.common.client.render.models.blockbench.pose.CobblemonPose
|
||||
import com.cobblemon.mod.common.entity.PoseType
|
||||
@@ -27,6 +28,9 @@ class FlorgesModel (root: ModelPart) : PokemonPosableModel(root), HeadedFrame {
|
||||
|
||||
lateinit var standing: CobblemonPose
|
||||
lateinit var walk: CobblemonPose
|
||||
|
||||
override val cryAnimation = CryProvider { bedrockStateful("florges", "cry") }
|
||||
|
||||
override fun registerPoses() {
|
||||
val blink = quirk { bedrockStateful("florges", "blink") }
|
||||
|
||||
|
||||
-22
@@ -74,11 +74,9 @@ object PokemonModelRepository : VaryingModelRepository<PokemonPosableModel>() {
|
||||
inbuilt("machop", ::MachopModel)
|
||||
inbuilt("machoke", ::MachokeModel)
|
||||
inbuilt("machamp", ::MachampModel)
|
||||
inbuilt("alakazam", ::AlakazamModel)
|
||||
inbuilt("arbok", ::ArbokModel)
|
||||
inbuilt("arcanine", ::ArcanineModel)
|
||||
inbuilt("articuno", ::ArticunoModel)
|
||||
inbuilt("bellsprout", ::BellsproutModel)
|
||||
inbuilt("chansey", ::ChanseyModel)
|
||||
inbuilt("crobat", ::CrobatModel)
|
||||
inbuilt("cubone", ::CuboneModel)
|
||||
@@ -118,7 +116,6 @@ object PokemonModelRepository : VaryingModelRepository<PokemonPosableModel>() {
|
||||
inbuilt("koffing", ::KoffingModel)
|
||||
inbuilt("krabby", ::KrabbyModel)
|
||||
inbuilt("lickitung", ::LickitungModel)
|
||||
inbuilt("magmar", ::MagmarModel)
|
||||
inbuilt("magnemite", ::MagnemiteModel)
|
||||
inbuilt("magneton", ::MagnetonModel)
|
||||
inbuilt("marowak", ::MarowakModel)
|
||||
@@ -137,13 +134,10 @@ object PokemonModelRepository : VaryingModelRepository<PokemonPosableModel>() {
|
||||
inbuilt("ninetales", ::NinetalesModel)
|
||||
inbuilt("omanyte", ::OmanyteModel)
|
||||
inbuilt("omastar", ::OmastarModel)
|
||||
inbuilt("onix", ::OnixModel)
|
||||
inbuilt("persian", ::PersianModel)
|
||||
inbuilt("pikachu", ::PikachuModel)
|
||||
inbuilt("pinsir", ::PinsirModel)
|
||||
inbuilt("poliwag", ::PoliwagModel)
|
||||
inbuilt("poliwhirl", ::PoliwhirlModel)
|
||||
inbuilt("poliwrath", ::PoliwrathModel)
|
||||
inbuilt("politoed", ::PolitoedModel)
|
||||
inbuilt("ponyta", ::PonytaModel)
|
||||
inbuilt("psyduck", ::PsyduckModel)
|
||||
@@ -167,13 +161,10 @@ object PokemonModelRepository : VaryingModelRepository<PokemonPosableModel>() {
|
||||
inbuilt("vaporeon", ::VaporeonModel)
|
||||
inbuilt("venomoth", ::VenomothModel)
|
||||
inbuilt("venonat", ::VenonatModel)
|
||||
inbuilt("victreebel", ::VictreebelModel)
|
||||
inbuilt("vulpix", ::VulpixModel)
|
||||
inbuilt("weepinbell", ::WeepinbellModel)
|
||||
inbuilt("weezing", ::WeezingModel)
|
||||
inbuilt("zapdos", ::ZapdosModel)
|
||||
inbuilt("elekid", ::ElekidModel)
|
||||
inbuilt("magby", ::MagbyModel)
|
||||
inbuilt("pichu", ::PichuModel)
|
||||
inbuilt("smoochum", ::SmoochumModel)
|
||||
inbuilt("tyrogue", ::TyrogueModel)
|
||||
@@ -183,7 +174,6 @@ object PokemonModelRepository : VaryingModelRepository<PokemonPosableModel>() {
|
||||
inbuilt("happiny", ::HappinyModel)
|
||||
inbuilt("leafeon", ::LeafeonModel)
|
||||
inbuilt("lickilicky", ::LickilickyModel)
|
||||
inbuilt("magmortar", ::MagmortarModel)
|
||||
inbuilt("magnezone", ::MagnezoneModel)
|
||||
inbuilt("mimejr", ::MimejrModel)
|
||||
inbuilt("scizor", ::ScizorModel)
|
||||
@@ -214,8 +204,6 @@ object PokemonModelRepository : VaryingModelRepository<PokemonPosableModel>() {
|
||||
inbuilt("piplup", ::PiplupModel)
|
||||
inbuilt("yanmega", ::YanmegaModel)
|
||||
inbuilt("basculin", ::BasculinModel)
|
||||
inbuilt("crustle", ::CrustleModel)
|
||||
inbuilt("dwebble", ::DwebbleModel)
|
||||
inbuilt("emolga", ::EmolgaModel)
|
||||
inbuilt("maractus", ::MaractusModel)
|
||||
inbuilt("bounsweet", ::BounsweetModel)
|
||||
@@ -256,8 +244,6 @@ object PokemonModelRepository : VaryingModelRepository<PokemonPosableModel>() {
|
||||
inbuilt("klinklang", :: KlinklangModel)
|
||||
inbuilt("morelull", :: MorelullModel)
|
||||
inbuilt("shiinotic", :: ShiinoticModel)
|
||||
inbuilt("riolu", :: RioluModel)
|
||||
inbuilt("lucario", :: LucarioModel)
|
||||
inbuilt("treecko", :: TreeckoModel)
|
||||
inbuilt("grovyle", :: GrovyleModel)
|
||||
inbuilt("sceptile", :: SceptileModel)
|
||||
@@ -302,7 +288,6 @@ object PokemonModelRepository : VaryingModelRepository<PokemonPosableModel>() {
|
||||
inbuilt("popplio", :: PopplioModel)
|
||||
inbuilt("brionne", :: BrionneModel)
|
||||
inbuilt("primarina", ::PrimarinaModel)
|
||||
inbuilt("spinda", ::SpindaModel)
|
||||
inbuilt("seedot", ::SeedotModel)
|
||||
inbuilt("nuzleaf", ::NuzleafModel)
|
||||
inbuilt("shiftry", ::ShiftryModel)
|
||||
@@ -315,7 +300,6 @@ object PokemonModelRepository : VaryingModelRepository<PokemonPosableModel>() {
|
||||
inbuilt("walkingwake", ::WalkingwakeModel)
|
||||
inbuilt("ironleaves", ::IronleavesModel)
|
||||
inbuilt("miltank", ::MiltankModel)
|
||||
inbuilt("torkoal", ::TorkoalModel)
|
||||
inbuilt("froakie", ::FroakieModel)
|
||||
inbuilt("frogadier", ::FrogadierModel)
|
||||
inbuilt("greninja", ::GreninjaModel)
|
||||
@@ -503,8 +487,6 @@ object PokemonModelRepository : VaryingModelRepository<PokemonPosableModel>() {
|
||||
inbuilt("crabominable", ::CrabominableModel)
|
||||
inbuilt("wimpod", ::WimpodModel)
|
||||
inbuilt("golisopod", ::GolisopodModel)
|
||||
inbuilt("nincada", ::NincadaModel)
|
||||
inbuilt("ninjask", ::NinjaskModel)
|
||||
inbuilt("shedinja", ::ShedinjaModel)
|
||||
inbuilt("ralts", ::RaltsModel)
|
||||
inbuilt("kirlia", ::KirliaModel)
|
||||
@@ -569,7 +551,6 @@ object PokemonModelRepository : VaryingModelRepository<PokemonPosableModel>() {
|
||||
inbuilt("voltorb_hisuian", ::VoltorbHisuianModel)
|
||||
inbuilt("electrode_hisuian", ::ElectrodeHisuianModel)
|
||||
inbuilt("sentret", ::SentretModel)
|
||||
inbuilt("furret", ::FurretModel)
|
||||
inbuilt("qwilfish", ::QwilfishModel)
|
||||
inbuilt("qwilfish_hisuian", ::QwilfishHisuianModel)
|
||||
inbuilt("overqwil", ::OverqwilModel)
|
||||
@@ -590,8 +571,6 @@ object PokemonModelRepository : VaryingModelRepository<PokemonPosableModel>() {
|
||||
inbuilt("budew", ::BudewModel)
|
||||
inbuilt("roselia", ::RoseliaModel)
|
||||
inbuilt("roserade", ::RoseradeModel)
|
||||
inbuilt("solrock", ::SolrockModel)
|
||||
inbuilt("lunatone", ::LunatoneModel)
|
||||
inbuilt("woobat", ::WoobatModel)
|
||||
inbuilt("swoobat", ::SwoobatModel)
|
||||
inbuilt("sandile", ::SandileModel)
|
||||
@@ -628,7 +607,6 @@ object PokemonModelRepository : VaryingModelRepository<PokemonPosableModel>() {
|
||||
inbuilt("goodra", ::GoodraModel)
|
||||
inbuilt("goodra_hisuian", ::GoodraHisuianModel)
|
||||
inbuilt("heracross", ::HeracrossModel)
|
||||
inbuilt("skarmory", ::SkarmoryModel)
|
||||
inbuilt("salandit", ::SalanditModel)
|
||||
inbuilt("salazzle", ::SalazzleModel)
|
||||
inbuilt("jangmo-o", ::JangmoOModel)
|
||||
|
||||
+14
-4
@@ -27,16 +27,26 @@ object FishingRodTooltipGenerator : TooltipGenerator() {
|
||||
|
||||
// Add the description of the Poke Ball used in the rod
|
||||
ball.item.description.let {
|
||||
val bobberDescription = Component.literal("Bobber: ").append(it.copy().gray())
|
||||
val bobberDescription = Component.translatable(
|
||||
"cobblemon.pokerod.bobber",
|
||||
it.copy().gray()
|
||||
)
|
||||
resultLines.add(bobberDescription)
|
||||
}
|
||||
|
||||
val client = Minecraft.getInstance()
|
||||
val itemRegistry = client.level?.registryAccess()?.registryOrThrow(Registries.ITEM)
|
||||
itemRegistry?.let { registry ->
|
||||
FishingBaits.getFromRodItemStack(stack)?.toItemStack(registry)?.item?.description?.copy()?.gray()?.let { // maybe this can be simplified to not use the FishingBaits to get the stack and just use PokerodItem to get the stack since we have it already
|
||||
resultLines.add(Component.literal("Bait: ").append(it).append(" x${PokerodItem.getBaitStackOnRod(stack).count}"))
|
||||
}
|
||||
FishingBaits.getFromRodItemStack(stack)?.toItemStack(registry)?.item?.description
|
||||
?.let { // maybe this can be simplified to not use the FishingBaits to get the stack and just use PokerodItem to get the stack since we have it already
|
||||
val baitDescription =
|
||||
Component.translatable(
|
||||
"cobblemon.pokerod.bait",
|
||||
it.copy().gray(),
|
||||
PokerodItem.getBaitStackOnRod(stack).count
|
||||
)
|
||||
resultLines.add(baitDescription)
|
||||
}
|
||||
}
|
||||
|
||||
return resultLines
|
||||
|
||||
@@ -16,6 +16,7 @@ import java.util.UUID
|
||||
class ClientTrade {
|
||||
var myOffer = SettableObservable<Pokemon?>(null)
|
||||
var oppositeOffer = SettableObservable<Pokemon?>(null)
|
||||
var tradeProcessing = SettableObservable(Pair(false, false))
|
||||
var oppositeAcceptedMyOffer = SettableObservable(false)
|
||||
var acceptedOppositeOffer = false
|
||||
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
package com.cobblemon.mod.common.entity
|
||||
|
||||
interface AttackingEntity {
|
||||
fun getAttackingEntityId(): Int?
|
||||
}
|
||||
@@ -34,7 +34,7 @@ class NPCBattleActor(
|
||||
) : AIBattleActor(
|
||||
gameId = npc.uuid,
|
||||
pokemonList = party.toBattleTeam(),
|
||||
battleAI = StrongBattleAI(skill)
|
||||
battleAI = RandomBattleAI()
|
||||
), EntityBackedBattleActor<NPCEntity> {
|
||||
override val entity = npc
|
||||
override val type = ActorType.NPC
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
package com.cobblemon.mod.common.entity.pokemon
|
||||
|
||||
import com.bedrockk.molang.runtime.struct.QueryStruct
|
||||
import com.bedrockk.molang.runtime.value.DoubleValue
|
||||
import com.bedrockk.molang.runtime.value.StringValue
|
||||
import com.cobblemon.mod.common.*
|
||||
import com.cobblemon.mod.common.CobblemonNetwork.sendPacket
|
||||
import com.cobblemon.mod.common.api.drop.DropTable
|
||||
@@ -22,6 +20,9 @@ import com.cobblemon.mod.common.api.events.entity.PokemonEntitySaveEvent
|
||||
import com.cobblemon.mod.common.api.events.entity.PokemonEntitySaveToWorldEvent
|
||||
import com.cobblemon.mod.common.api.events.pokemon.ShoulderMountEvent
|
||||
import com.cobblemon.mod.common.api.interaction.PokemonEntityInteraction
|
||||
import com.cobblemon.mod.common.api.molang.MoLangFunctions.addEntityFunctions
|
||||
import com.cobblemon.mod.common.api.molang.MoLangFunctions.addPokemonEntityFunctions
|
||||
import com.cobblemon.mod.common.api.molang.MoLangFunctions.addPokemonFunctions
|
||||
import com.cobblemon.mod.common.api.molang.MoLangFunctions.addStandardFunctions
|
||||
import com.cobblemon.mod.common.api.net.serializers.PoseTypeDataSerializer
|
||||
import com.cobblemon.mod.common.api.net.serializers.StringSetDataSerializer
|
||||
@@ -44,6 +45,7 @@ import com.cobblemon.mod.common.battles.BattleBuilder
|
||||
import com.cobblemon.mod.common.battles.BattleRegistry
|
||||
import com.cobblemon.mod.common.block.entity.PokemonPastureBlockEntity
|
||||
import com.cobblemon.mod.common.client.entity.PokemonClientDelegate
|
||||
import com.cobblemon.mod.common.entity.AttackingEntity
|
||||
import com.cobblemon.mod.common.entity.PosableEntity
|
||||
import com.cobblemon.mod.common.entity.PoseType
|
||||
import com.cobblemon.mod.common.entity.generic.GenericBedrockEntity
|
||||
@@ -130,7 +132,7 @@ open class PokemonEntity(
|
||||
world: Level,
|
||||
pokemon: Pokemon = Pokemon().apply { isClient = world.isClientSide },
|
||||
type: EntityType<out PokemonEntity> = CobblemonEntities.POKEMON,
|
||||
) : ShoulderRidingEntity(type, world), PosableEntity, Shearable, Schedulable, ScannableEntity {
|
||||
) : ShoulderRidingEntity(type, world), PosableEntity, Shearable, Schedulable, ScannableEntity, AttackingEntity {
|
||||
companion object {
|
||||
@JvmStatic val SPECIES = SynchedEntityData.defineId(PokemonEntity::class.java, EntityDataSerializers.STRING)
|
||||
@JvmStatic val NICKNAME = SynchedEntityData.defineId(PokemonEntity::class.java, EntityDataSerializers.COMPONENT)
|
||||
@@ -253,25 +255,10 @@ open class PokemonEntity(
|
||||
|
||||
override val struct: QueryStruct = QueryStruct(hashMapOf())
|
||||
.addStandardFunctions()
|
||||
.addFunction("uuid") { StringValue(uuid.toString()) }
|
||||
.addFunction("in_battle") { DoubleValue(isBattling) }
|
||||
.addFunction("is_wild") { DoubleValue(pokemon.isWild()) }
|
||||
.addFunction("is_shiny") { DoubleValue(pokemon.shiny) }
|
||||
.addFunction("form") { StringValue(pokemon.form.name) }
|
||||
.addFunction("width") { DoubleValue(boundingBox.xsize) }
|
||||
.addFunction("height") { DoubleValue(boundingBox.ysize) }
|
||||
.addFunction("horizontal_velocity") { DoubleValue(deltaMovement.horizontalDistance()) }
|
||||
.addFunction("vertical_velocity") { DoubleValue(deltaMovement.y) }
|
||||
.addFunction("weight") { DoubleValue(pokemon.species.weight.toDouble()) }
|
||||
.addFunction("is_moving") { DoubleValue((moveControl as? PokemonMoveControl)?.hasWanted() == true) }
|
||||
.addFunction("is_underwater") { DoubleValue(getIsSubmerged()) }
|
||||
.addFunction("is_flying") { DoubleValue(getBehaviourFlag(PokemonBehaviourFlag.FLYING)) }
|
||||
.addFunction("is_passenger") { DoubleValue(isPassenger()) }
|
||||
.addFunction("entity_width") { DoubleValue(boundingBox.xsize) }
|
||||
.addFunction("entity_height") { DoubleValue(boundingBox.ysize) }
|
||||
.addFunction("entity_size") { DoubleValue(boundingBox.run { if (xsize > ysize) xsize else ysize }) }
|
||||
.addFunction("entity_radius") { DoubleValue(boundingBox.run { if (xsize > ysize) xsize else ysize } / 2) }
|
||||
.addFunction("has_aspect") { DoubleValue(it.getString(0) in aspects) }
|
||||
.addEntityFunctions(this)
|
||||
.addPokemonFunctions(pokemon)
|
||||
.addPokemonEntityFunctions(this)
|
||||
|
||||
|
||||
init {
|
||||
delegate.initialize(this)
|
||||
@@ -363,6 +350,12 @@ open class PokemonEntity(
|
||||
|
||||
override fun tick() {
|
||||
super.tick()
|
||||
|
||||
if (!this.isBattling && this.beamMode == 0 && this.isBattleClone()) {
|
||||
discard()
|
||||
return
|
||||
}
|
||||
|
||||
// We will be handling idle logic ourselves thank you
|
||||
this.setNoActionTime(0)
|
||||
if (queuedToDespawn) {
|
||||
@@ -468,6 +461,13 @@ open class PokemonEntity(
|
||||
*/
|
||||
fun isUncatchable() = pokemon.isUncatchable()
|
||||
|
||||
/**
|
||||
* A utility method that checks if this Pokémon has the [UncatchableProperty.uncatchable] property.
|
||||
*
|
||||
* @return If the Pokémon is uncatchable.
|
||||
*/
|
||||
fun isBattleClone() = pokemon.isBattleClone()
|
||||
|
||||
fun recallWithAnimation(): CompletableFuture<Pokemon> {
|
||||
val owner = owner ?: pokemon.getOwnerEntity()
|
||||
val future = CompletableFuture<Pokemon>()
|
||||
@@ -732,6 +732,9 @@ open class PokemonEntity(
|
||||
}
|
||||
|
||||
override fun mobInteract(player: Player, hand: InteractionHand): InteractionResult {
|
||||
if (!this.isBattling && this.isBattleClone()) {
|
||||
return InteractionResult.FAIL
|
||||
}
|
||||
val itemStack = player.getItemInHand(hand)
|
||||
val colorFeatureType = SpeciesFeatures.getFeaturesFor(pokemon.species)
|
||||
.find { it is ChoiceSpeciesFeatureProvider && DataKeys.CAN_BE_COLORED in it.keys }
|
||||
@@ -1427,4 +1430,13 @@ open class PokemonEntity(
|
||||
override fun resolveEntityScan(): LivingEntity {
|
||||
return this
|
||||
}
|
||||
|
||||
override fun getAttackingEntityId(): Int? {
|
||||
if (pokemon.isClient) {
|
||||
return (delegate as PokemonClientDelegate).targetedEntityId
|
||||
}
|
||||
else {
|
||||
TODO("Currently there is nothing that needs to know this on the server")
|
||||
}
|
||||
}
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
package com.cobblemon.mod.common.net.messages.client.battle
|
||||
|
||||
import com.cobblemon.mod.common.api.net.NetworkPacket
|
||||
import com.cobblemon.mod.common.util.cobblemonResource
|
||||
import net.minecraft.network.RegistryFriendlyByteBuf
|
||||
|
||||
class BattleAppendTargetedEntityPacket(val sourceEntityId: Int, val targetedEntityId: Int) : NetworkPacket<BattleAppendTargetedEntityPacket> {
|
||||
override val id = ID
|
||||
override fun encode(buffer: RegistryFriendlyByteBuf) {
|
||||
buffer.writeVarInt(sourceEntityId)
|
||||
buffer.writeVarInt(targetedEntityId)
|
||||
}
|
||||
|
||||
companion object {
|
||||
val ID = cobblemonResource("battle_append_targeted")
|
||||
fun decode(buffer: RegistryFriendlyByteBuf) = BattleAppendTargetedEntityPacket(buffer.readVarInt(), buffer.readVarInt())
|
||||
}
|
||||
|
||||
}
|
||||
+1
-4
@@ -20,10 +20,7 @@ class BenchedMovesUpdatePacket(pokemon: () -> Pokemon, value: BenchedMoves): Sin
|
||||
}
|
||||
|
||||
override fun set(pokemon: Pokemon, value: BenchedMoves) {
|
||||
pokemon.benchedMoves.doThenEmit {
|
||||
pokemon.benchedMoves.clear()
|
||||
pokemon.benchedMoves.addAll(value)
|
||||
}
|
||||
pokemon.benchedMoves.copyFrom(value)
|
||||
}
|
||||
|
||||
companion object {
|
||||
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* 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.trade
|
||||
|
||||
import com.cobblemon.mod.common.api.net.NetworkPacket
|
||||
import com.cobblemon.mod.common.util.cobblemonResource
|
||||
import net.minecraft.network.RegistryFriendlyByteBuf
|
||||
|
||||
/**
|
||||
* Packet sent to the client when the trade has started.
|
||||
*
|
||||
* Handled by [com.cobblemon.mod.common.client.net.trade.TradeProcessStartedHandler]
|
||||
*/
|
||||
class TradeProcessStartedPacket(val isTradeInitiator: Boolean) : NetworkPacket<TradeProcessStartedPacket> {
|
||||
companion object {
|
||||
val ID = cobblemonResource("trade_process_started")
|
||||
fun decode(buffer: RegistryFriendlyByteBuf) = TradeProcessStartedPacket(buffer.readBoolean())
|
||||
}
|
||||
|
||||
override val id = ID
|
||||
override fun encode(buffer: RegistryFriendlyByteBuf) {
|
||||
buffer.writeBoolean(isTradeInitiator)
|
||||
}
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* 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.server.trade
|
||||
|
||||
import com.cobblemon.mod.common.api.net.NetworkPacket
|
||||
import com.cobblemon.mod.common.util.cobblemonResource
|
||||
import com.cobblemon.mod.common.util.readUUID
|
||||
import com.cobblemon.mod.common.util.writeUUID
|
||||
import net.minecraft.network.RegistryFriendlyByteBuf
|
||||
import java.util.UUID
|
||||
|
||||
class PerformTradePacket(val pokemonOfferId: UUID) : NetworkPacket<PerformTradePacket> {
|
||||
companion object {
|
||||
val ID = cobblemonResource("perform_trade")
|
||||
fun decode(buffer: RegistryFriendlyByteBuf) = PerformTradePacket(buffer.readUUID())
|
||||
}
|
||||
|
||||
override val id = ID
|
||||
override fun encode(buffer: RegistryFriendlyByteBuf) {
|
||||
buffer.writeUUID(pokemonOfferId)
|
||||
}
|
||||
}
|
||||
+1
-2
@@ -48,8 +48,7 @@ object RequestInteractionsHandler : ServerNetworkPacketHandler<RequestPlayerInte
|
||||
val isTargetBattling = BattleRegistry.getBattleByParticipatingPlayerId(packet.targetId) != null
|
||||
if (isTargetBattling and Cobblemon.config.allowSpectating && squaredDistance <= Cobblemon.config.battleSpectateMaxDistance.pow(2)) {
|
||||
options[PlayerInteractOptionsPacket.Options.SPECTATE_BATTLE] = PlayerInteractOptionsPacket.OptionStatus.AVAILABLE
|
||||
}
|
||||
else if (squaredDistance <= Cobblemon.config.BattlePvPMaxDistance.pow(2)) {
|
||||
} else if (squaredDistance <= Cobblemon.config.BattlePvPMaxDistance.pow(2)) {
|
||||
// LOS and distance checks passed, now check parties and add appropriate options
|
||||
val playerPartyCount = player.party().count { pokemon -> !pokemon.isFainted() }
|
||||
val targetPartyCount = (targetPlayerEntity as ServerPlayer).party().count { pokemon -> !pokemon.isFainted() }
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ import net.minecraft.server.level.ServerPlayer
|
||||
object InteractPokemonHandler : ServerNetworkPacketHandler<InteractPokemonPacket> {
|
||||
override fun handle(packet: InteractPokemonPacket, server: MinecraftServer, player: ServerPlayer) {
|
||||
val pokemonEntity = player.serverLevel().getEntity(packet.pokemonID)
|
||||
if (pokemonEntity is PokemonEntity) {
|
||||
if (pokemonEntity is PokemonEntity && !pokemonEntity.isBattleClone()) {
|
||||
if (packet.mountShoulder) {
|
||||
if (!pokemonEntity.canSitOnShoulder() || player.party().none { it == pokemonEntity.pokemon }) {
|
||||
return
|
||||
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* 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.serverhandling.trade
|
||||
|
||||
import com.cobblemon.mod.common.CobblemonNetwork.sendPacket
|
||||
import com.cobblemon.mod.common.api.net.ServerNetworkPacketHandler
|
||||
import com.cobblemon.mod.common.net.messages.client.trade.TradeCancelledPacket
|
||||
import com.cobblemon.mod.common.net.messages.server.trade.PerformTradePacket
|
||||
import com.cobblemon.mod.common.trade.TradeManager
|
||||
import net.minecraft.server.MinecraftServer
|
||||
import net.minecraft.server.level.ServerPlayer
|
||||
|
||||
object PerformTradeHandler : ServerNetworkPacketHandler<PerformTradePacket> {
|
||||
override fun handle(packet: PerformTradePacket, server: MinecraftServer, player: ServerPlayer) {
|
||||
val trade = TradeManager.getActiveTrade(player.uuid) ?: return player.sendPacket(TradeCancelledPacket())
|
||||
val tradeParticipant = trade.getTradeParticipant(player.uuid)
|
||||
if (trade.getOpposingOffer(tradeParticipant).pokemon?.uuid == packet.pokemonOfferId) {
|
||||
trade.performTrade(tradeParticipant)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -75,6 +75,7 @@ import com.cobblemon.mod.common.pokemon.evolution.progress.DamageTakenEvolutionP
|
||||
import com.cobblemon.mod.common.pokemon.evolution.progress.RecoilEvolutionProgress
|
||||
import com.cobblemon.mod.common.pokemon.feature.SeasonFeatureHandler
|
||||
import com.cobblemon.mod.common.pokemon.feature.StashHandler
|
||||
import com.cobblemon.mod.common.pokemon.properties.BattleCloneProperty
|
||||
import com.cobblemon.mod.common.pokemon.properties.UncatchableProperty
|
||||
import com.cobblemon.mod.common.pokemon.status.PersistentStatus
|
||||
import com.cobblemon.mod.common.pokemon.status.PersistentStatusContainer
|
||||
@@ -247,22 +248,23 @@ open class Pokemon : ShowdownIdentifiable {
|
||||
}
|
||||
this.healTimer = Cobblemon.config.healTimer
|
||||
}
|
||||
|
||||
var gender = Gender.GENDERLESS
|
||||
set(value) {
|
||||
if (!isClient && value !in species.possibleGenders) {
|
||||
return
|
||||
}
|
||||
field = value
|
||||
if (!isClient) {
|
||||
checkGender()
|
||||
}
|
||||
if (field == value) {
|
||||
updateAspects()
|
||||
_gender.emit(value)
|
||||
}
|
||||
updateAspects()
|
||||
_gender.emit(value)
|
||||
}
|
||||
|
||||
var status: PersistentStatusContainer? = null
|
||||
set(value) {
|
||||
field = value
|
||||
this._status.emit(value?.status)
|
||||
}
|
||||
|
||||
var experience = 0
|
||||
internal set(value) {
|
||||
field = value
|
||||
@@ -820,6 +822,13 @@ open class Pokemon : ShowdownIdentifiable {
|
||||
*/
|
||||
fun isUncatchable() = UncatchableProperty.uncatchable().matches(this)
|
||||
|
||||
/**
|
||||
* A utility method that checks if this Pokémon has the [BattleCloneProperty.isBattleClone] property.
|
||||
*
|
||||
* @return If the Pokémon is a battle clone.
|
||||
*/
|
||||
fun isBattleClone() = BattleCloneProperty.isBattleClone().matches(this)
|
||||
|
||||
/**
|
||||
* Returns a copy of the held item.
|
||||
* In order to change the [ItemStack] use [swapHeldItem].
|
||||
@@ -931,7 +940,7 @@ open class Pokemon : ShowdownIdentifiable {
|
||||
this.currentHealth = other.currentHealth
|
||||
this.gender = other.gender
|
||||
this.moveSet.copyFrom(other.moveSet)
|
||||
this.benchedMoves = other.benchedMoves
|
||||
this.benchedMoves.copyFrom(other.benchedMoves)
|
||||
this.scaleModifier = other.scaleModifier
|
||||
this.shiny = other.shiny
|
||||
this.state = other.state
|
||||
@@ -1109,6 +1118,9 @@ open class Pokemon : ShowdownIdentifiable {
|
||||
val allAccessibleMoves: Set<MoveTemplate>
|
||||
get() = form.moves.getLevelUpMovesUpTo(level) + benchedMoves.map { it.moveTemplate } + form.moves.evolutionMoves
|
||||
|
||||
val relearnableMoves: Iterable<MoveTemplate>
|
||||
get() = allAccessibleMoves.filter { accessibleMove -> moveSet.none { it.template == accessibleMove } }
|
||||
|
||||
fun updateAspects() {
|
||||
aspects = emptySet()
|
||||
/*
|
||||
|
||||
@@ -111,6 +111,19 @@ class Species : ClientDataSynchronizer<Species>, ShowdownIdentifiable {
|
||||
var labels = hashSetOf<String>()
|
||||
private set
|
||||
|
||||
val possibleGenders: Set<Gender>
|
||||
get() = forms.flatMap {
|
||||
if (it.maleRatio == -1F) {
|
||||
setOf(Gender.GENDERLESS)
|
||||
} else if (it.maleRatio == 0F) {
|
||||
setOf(Gender.FEMALE)
|
||||
} else if (it.maleRatio == 1F) {
|
||||
setOf(Gender.MALE)
|
||||
} else {
|
||||
setOf(Gender.FEMALE)
|
||||
}
|
||||
}.toSet()
|
||||
|
||||
/**
|
||||
* Contains the evolutions of this species.
|
||||
* If you're trying to find out the possible evolutions of a Pokémon you should always work with their [FormData].
|
||||
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* 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.pokemon.properties
|
||||
|
||||
import com.cobblemon.mod.common.api.properties.CustomPokemonPropertyType
|
||||
|
||||
/**
|
||||
* A type of [CustomPokemonPropertyType] handling a [FlagProperty] which, when
|
||||
* present, indicates that the Pokémon is a battle clone and should not
|
||||
* persist outside the context of a battle.
|
||||
*
|
||||
*/
|
||||
object BattleCloneProperty : CustomPokemonPropertyType<FlagProperty> {
|
||||
override val keys = setOf("battleClone")
|
||||
override val needsKey = true
|
||||
|
||||
override fun fromString(value: String?) =
|
||||
when {
|
||||
value == null || value.lowercase() in listOf("true", "yes") -> isBattleClone()
|
||||
value.lowercase() in listOf("false", "no") -> { FlagProperty(keys.first(), false) }
|
||||
else -> null
|
||||
}
|
||||
|
||||
fun isBattleClone() = FlagProperty(keys.first(), false)
|
||||
|
||||
override fun examples() = setOf("yes", "no")
|
||||
}
|
||||
@@ -35,20 +35,25 @@ class ActiveTrade(val player1: TradeParticipant, val player2: TradeParticipant)
|
||||
}
|
||||
|
||||
if (offer.accepted && getOffer(tradeParticipant).accepted) {
|
||||
performTrade()
|
||||
//performTrade
|
||||
player1.startTradeProcess(this, tradeParticipant == player1)
|
||||
player2.startTradeProcess(this, tradeParticipant == player2)
|
||||
}
|
||||
}
|
||||
|
||||
fun getOppositePlayer(tradeParticipant: TradeParticipant) = if (tradeParticipant == player1) player2 else player1
|
||||
|
||||
fun performTrade() {
|
||||
TradeManager.performTrade(
|
||||
player1 = player1,
|
||||
player2 = player2,
|
||||
pokemon1 = player1Offer.pokemon!!,
|
||||
pokemon2 = player2Offer.pokemon!!
|
||||
)
|
||||
completeTrade()
|
||||
fun performTrade(tradeParticipant: TradeParticipant) {
|
||||
val offer = getOpposingOffer(tradeParticipant)
|
||||
if (offer.accepted && getOffer(tradeParticipant).accepted) {
|
||||
TradeManager.performTrade(
|
||||
player1 = player1,
|
||||
player2 = player2,
|
||||
pokemon1 = player1Offer.pokemon!!,
|
||||
pokemon2 = player2Offer.pokemon!!
|
||||
)
|
||||
completeTrade()
|
||||
}
|
||||
}
|
||||
|
||||
fun cancelTrade() {
|
||||
|
||||
@@ -11,10 +11,7 @@ package com.cobblemon.mod.common.trade
|
||||
import com.cobblemon.mod.common.CobblemonNetwork.sendPacket
|
||||
import com.cobblemon.mod.common.api.storage.party.PartyStore
|
||||
import com.cobblemon.mod.common.api.text.text
|
||||
import com.cobblemon.mod.common.net.messages.client.trade.TradeAcceptanceChangedPacket
|
||||
import com.cobblemon.mod.common.net.messages.client.trade.TradeCancelledPacket
|
||||
import com.cobblemon.mod.common.net.messages.client.trade.TradeCompletedPacket
|
||||
import com.cobblemon.mod.common.net.messages.client.trade.TradeUpdatedPacket
|
||||
import com.cobblemon.mod.common.net.messages.client.trade.*
|
||||
import com.cobblemon.mod.common.pokemon.Pokemon
|
||||
import com.cobblemon.mod.common.util.party
|
||||
import java.util.UUID
|
||||
@@ -49,6 +46,15 @@ interface TradeParticipant {
|
||||
*/
|
||||
fun changeTradeAcceptance(trade: ActiveTrade, pokemonId: UUID, acceptance: Boolean)
|
||||
|
||||
/**
|
||||
* Notifies the participant that the trade process has begun.
|
||||
*
|
||||
* @param isTradeInitiator Indicates if the user is the one who accepted last.
|
||||
* Used by the UI to complete the trade after the process/animation is done.
|
||||
* Only 1 user should handle sending the completion to the server to prevent conflicts.
|
||||
*/
|
||||
fun startTradeProcess(trade: ActiveTrade, isTradeInitiator: Boolean)
|
||||
|
||||
/** Notifies the participant that the trade has been cancelled. */
|
||||
fun cancelTrade(trade: ActiveTrade)
|
||||
|
||||
@@ -75,6 +81,10 @@ class PlayerTradeParticipant(val player: ServerPlayer): TradeParticipant {
|
||||
player.sendPacket(TradeAcceptanceChangedPacket(pokemonId, acceptance))
|
||||
}
|
||||
|
||||
override fun startTradeProcess(trade: ActiveTrade, isTradeInitiator: Boolean) {
|
||||
player.sendPacket(TradeProcessStartedPacket(isTradeInitiator))
|
||||
}
|
||||
|
||||
override fun cancelTrade(trade: ActiveTrade) {
|
||||
player.sendPacket(TradeCancelledPacket())
|
||||
}
|
||||
@@ -103,6 +113,10 @@ class DummyTradeParticipant(val pokemonList: MutableList<Pokemon>) : TradePartic
|
||||
// Don't need to do any notifying.
|
||||
}
|
||||
|
||||
override fun startTradeProcess(trade: ActiveTrade, isTradeInitiator: Boolean) {
|
||||
// React, maybe. Change code and hotswap.
|
||||
}
|
||||
|
||||
override fun changeTradeAcceptance(trade: ActiveTrade, pokemonId: UUID, acceptance: Boolean) {
|
||||
// React, maybe. Change code and hotswap.
|
||||
}
|
||||
|
||||
+10
-1
@@ -11,11 +11,13 @@ package com.cobblemon.mod.common.util.adapters
|
||||
import com.google.gson.JsonDeserializationContext
|
||||
import com.google.gson.JsonDeserializer
|
||||
import com.google.gson.JsonElement
|
||||
import com.google.gson.JsonSerializationContext
|
||||
import com.google.gson.JsonSerializer
|
||||
import com.mojang.serialization.Codec
|
||||
import com.mojang.serialization.JsonOps
|
||||
import java.lang.reflect.Type
|
||||
|
||||
class CodecBackedAdapter<T>(val codec: Codec<T>) : JsonDeserializer<T> {
|
||||
class CodecBackedAdapter<T>(val codec: Codec<T>) : JsonDeserializer<T>, JsonSerializer<T> {
|
||||
override fun deserialize(
|
||||
jElement: JsonElement,
|
||||
typeOfT: Type,
|
||||
@@ -24,4 +26,11 @@ class CodecBackedAdapter<T>(val codec: Codec<T>) : JsonDeserializer<T> {
|
||||
return JsonOps.INSTANCE.withDecoder(codec).apply(jElement).result().get().first as T
|
||||
}
|
||||
|
||||
override fun serialize(
|
||||
src: T,
|
||||
typeOfSrc: Type?,
|
||||
context: JsonSerializationContext?
|
||||
): JsonElement {
|
||||
return JsonOps.INSTANCE.withEncoder(codec).apply(src).result().get()
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -64,7 +64,7 @@ internal class ClientPokemonP1(
|
||||
other.currentHealth = this.currentHealth
|
||||
other.gender = this.gender
|
||||
other.moveSet.copyFrom(this.moveSet)
|
||||
other.benchedMoves = this.benchedMoves
|
||||
other.benchedMoves.copyFrom(this.benchedMoves)
|
||||
other.scaleModifier = this.scaleModifier
|
||||
this.features.forEach { featureNbt ->
|
||||
val featureId = featureNbt.getString(FEATURE_ID)
|
||||
|
||||
@@ -58,7 +58,7 @@ internal class PokemonP1(
|
||||
other.currentHealth = this.currentHealth
|
||||
other.gender = this.gender
|
||||
other.moveSet.copyFrom(this.moveSet)
|
||||
other.benchedMoves = this.benchedMoves
|
||||
other.benchedMoves.copyFrom(this.benchedMoves)
|
||||
other.scaleModifier = this.scaleModifier
|
||||
other.shiny = this.shiny
|
||||
return other
|
||||
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
{
|
||||
"format_version": "1.8.0",
|
||||
"animations": {
|
||||
"animation.psychic.target": {
|
||||
"animation_length": 1.70833,
|
||||
"bones": {
|
||||
"root_part": {
|
||||
"rotation": {
|
||||
"0.0": [0, 0, 0],
|
||||
"0.5": [0, "math.sin(q.anim_time*90*5-90)*5", 0],
|
||||
"0.9583": [0, "math.sin(q.anim_time*90*12-90)*5", 0],
|
||||
"1.0833": [0, 0, 0]
|
||||
},
|
||||
"scale": {
|
||||
"0.0": [1, 1, 1],
|
||||
"0.5": ["1+math.sin(q.anim_time*90*7-135)*0.15", "1+math.sin(q.anim_time*90*7)*0.15", 1],
|
||||
"0.9583": ["1+math.sin(q.anim_time*90*7-135)*0.15", "1+math.sin(q.anim_time*90*7)*0.15", 1],
|
||||
"1.0833": [
|
||||
"1.2+math.sin(q.anim_time*90*7-135)*0.2+math.sin(q.anim_time*90*350)*0.4",
|
||||
"1.2+math.sin(q.anim_time*90*7)*0.2+math.sin(q.anim_time*90*350)*0.25",
|
||||
1.2
|
||||
],
|
||||
"1.3333": [1, 1, 1]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
{
|
||||
"format_version": "1.10.0",
|
||||
"particle_effect": {
|
||||
"description": {
|
||||
"identifier": "cobblemon:burn_actor",
|
||||
"basic_render_parameters": {
|
||||
"material": "particles_blend",
|
||||
"texture": "textures/particles/large-flame"
|
||||
}
|
||||
},
|
||||
"curves": {
|
||||
"variable.burnflicker": {
|
||||
"type": "linear",
|
||||
"input": "v.particle_age",
|
||||
"horizontal_range": "v.particle_lifetime",
|
||||
"nodes": [0, 0.79, 1, 0.97, 0.88, 0.71, 0.5, 0.25, -0.05]
|
||||
}
|
||||
},
|
||||
"components": {
|
||||
"minecraft:emitter_rate_steady": {
|
||||
"spawn_rate": "90*(q.entity_radius*1.2)",
|
||||
"max_particles": 120
|
||||
},
|
||||
"minecraft:emitter_lifetime_once": {
|
||||
"active_time": 0.2
|
||||
},
|
||||
"minecraft:emitter_shape_sphere": {
|
||||
"radius": "(q.entity_radius*(0.95+v.emitter_age))/math.clamp(q.entity_scale*1.1-0.1,1,2)",
|
||||
"surface_only": true,
|
||||
"direction": ["math.random(-1.5,1.5)*0.4", "math.random(1,2)", "math.random(-1.5,1.5)*0.4"]
|
||||
},
|
||||
"minecraft:particle_lifetime_expression": {
|
||||
"max_lifetime": "math.random(0.3,0.5)"
|
||||
},
|
||||
"minecraft:particle_initial_speed": "math.random(3.75,4.75)*1",
|
||||
"minecraft:particle_motion_dynamic": {
|
||||
"linear_drag_coefficient": 4
|
||||
},
|
||||
"minecraft:particle_appearance_billboard": {
|
||||
"size": ["0.1*v.burnflicker+(v.particle_random_2*0.1)", "0.15*v.burnflicker+(v.particle_random_2*0.1)"],
|
||||
"facing_camera_mode": "rotate_xyz",
|
||||
"uv": {
|
||||
"texture_width": 56,
|
||||
"texture_height": 10,
|
||||
"flipbook": {
|
||||
"base_UV": [0, 0],
|
||||
"size_UV": [8, 10],
|
||||
"step_UV": [8, 0],
|
||||
"frames_per_second": 10,
|
||||
"max_frame": 7,
|
||||
"stretch_to_lifetime": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"minecraft:particle_appearance_tinting": {
|
||||
"color": {
|
||||
"interpolant": "v.particle_age / v.particle_lifetime",
|
||||
"gradient": {
|
||||
"0.0": "#FFFFFFFF",
|
||||
"0.63": "#ffffffff",
|
||||
"1.0": "#00B23000"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
{
|
||||
"format_version": "1.10.0",
|
||||
"particle_effect": {
|
||||
"description": {
|
||||
"identifier": "cobblemon:burn_actorresidual",
|
||||
"basic_render_parameters": {
|
||||
"material": "particles_alpha",
|
||||
"texture": "textures/particles/ember"
|
||||
}
|
||||
},
|
||||
"components": {
|
||||
"minecraft:emitter_rate_steady": {
|
||||
"spawn_rate": 40,
|
||||
"max_particles": 20
|
||||
},
|
||||
"minecraft:emitter_lifetime_once": {
|
||||
"active_time": 0.5
|
||||
},
|
||||
"minecraft:emitter_shape_sphere": {
|
||||
"radius": "(q.entity_radius*(0.95+v.emitter_age))/math.clamp(q.entity_scale*1.1-0.1,1,2)",
|
||||
"surface_only": true,
|
||||
"direction": ["math.random(-1.5,1.5)", "math.random(0,2)", "math.random(-1.5,1.5)"]
|
||||
},
|
||||
"minecraft:particle_lifetime_expression": {
|
||||
"max_lifetime": 0.25
|
||||
},
|
||||
"minecraft:particle_initial_speed": "math.random(2.75,4.75)*0.45",
|
||||
"minecraft:particle_motion_dynamic": {
|
||||
"linear_acceleration": [0, 6, 0],
|
||||
"linear_drag_coefficient": 2
|
||||
},
|
||||
"minecraft:particle_appearance_billboard": {
|
||||
"size": [0.12, 0.12],
|
||||
"facing_camera_mode": "rotate_xyz",
|
||||
"uv": {
|
||||
"texture_width": 25,
|
||||
"texture_height": 5,
|
||||
"flipbook": {
|
||||
"base_UV": [0, 0],
|
||||
"size_UV": [5, 5],
|
||||
"step_UV": [5, 0],
|
||||
"frames_per_second": 20,
|
||||
"max_frame": 5
|
||||
}
|
||||
}
|
||||
},
|
||||
"minecraft:particle_appearance_tinting": {
|
||||
"color": {
|
||||
"interpolant": "v.particle_age / v.particle_lifetime",
|
||||
"gradient": {
|
||||
"0.0": "#FFFFC8B3",
|
||||
"1.0": "#FFB23000"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+6
-10
@@ -10,28 +10,24 @@
|
||||
},
|
||||
"events": {
|
||||
"paraSparks": {
|
||||
"particle_effect": {
|
||||
"effect": "cobblemon:paralysis_actorresidual",
|
||||
"type": "emitter"
|
||||
},
|
||||
"sound_effect": {
|
||||
"event_name": "cobblemon:status.nonvolatile.paralysis.actor"
|
||||
"event_name": "cobblemon:status.paralysis.actor"
|
||||
}
|
||||
}
|
||||
},
|
||||
"components": {
|
||||
"minecraft:emitter_rate_steady": {
|
||||
"spawn_rate": 28,
|
||||
"max_particles": 14
|
||||
"spawn_rate": "math.clamp(30*(q.entity_radius*1.5),30,120)",
|
||||
"max_particles": 140
|
||||
},
|
||||
"minecraft:emitter_lifetime_once": {
|
||||
"active_time": 0.5
|
||||
"active_time": 0.3
|
||||
},
|
||||
"minecraft:emitter_lifetime_events": {
|
||||
"creation_event": "paraSparks"
|
||||
},
|
||||
"minecraft:emitter_shape_sphere": {
|
||||
"radius": "math.clamp(q.entity_radius*0.9,0.7,1.5)",
|
||||
"radius": "(q.entity_radius*(0.95+v.emitter_age))/math.clamp(q.entity_scale*1.1-0.1,1,2)",
|
||||
"surface_only": true,
|
||||
"direction": ["(math.random(-2,2))*math.random(2,4)", "math.random(12,15)", "(math.random(-2,2))*math.random(2,4)"]
|
||||
},
|
||||
@@ -44,7 +40,7 @@
|
||||
"minecraft:particle_initial_speed": "math.random(0.55,0.85)*0.8",
|
||||
"minecraft:particle_motion_dynamic": {},
|
||||
"minecraft:particle_appearance_billboard": {
|
||||
"size": ["(0.225-(variable.particle_random_3*0.075))*math.clamp(q.entity_height,1,1.25)", "(0.225-(variable.particle_random_3*0.075))*math.clamp(q.entity_height,1,1.25)"],
|
||||
"size": ["0.125+(v.particle_random_2*0.1)*math.clamp(q.entity_height,1,1.25)", "0.125+(v.particle_random_2*0.1)*math.clamp(q.entity_height,1,1.25)"],
|
||||
"facing_camera_mode": "rotate_xyz",
|
||||
"uv": {
|
||||
"texture_width": 80,
|
||||
|
||||
+2
-2
@@ -18,7 +18,7 @@
|
||||
},
|
||||
"minecraft:emitter_shape_sphere": {
|
||||
"offset": [0, 0, 0],
|
||||
"radius": "math.clamp(q.entity_radius*0.95,0.75,1.55)",
|
||||
"radius": "(q.entity_radius*(0.95+v.emitter_age))/math.clamp(q.entity_scale*1.1-0.1,1,2)",
|
||||
"surface_only": true,
|
||||
"direction": ["(math.random(-2,2))*math.random(2,4)", "math.random(12,15)", "(math.random(-2,2))*math.random(2,4)"]
|
||||
},
|
||||
@@ -31,7 +31,7 @@
|
||||
"minecraft:particle_initial_speed": "math.random(0.55,0.85)*1",
|
||||
"minecraft:particle_motion_dynamic": {},
|
||||
"minecraft:particle_appearance_billboard": {
|
||||
"size": ["(0.3-(variable.particle_random_3*0.085))*math.clamp(q.entity_height,1,1.25)", "(0.3-(variable.particle_random_3*0.085))*math.clamp(q.entity_height,1,1.25)"],
|
||||
"size": ["0.125+(v.particle_random_2*0.1)*math.clamp(q.entity_height,1,1.25)", "0.125+(v.particle_random_2*0.1)*math.clamp(q.entity_height,1,1.25)"],
|
||||
"facing_camera_mode": "rotate_xyz",
|
||||
"uv": {
|
||||
"texture_width": 32,
|
||||
|
||||
Loaded 100 of 925 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user