Compare commits

..
Author SHA1 Message Date
Guilherme Pereira 4eba39562a add pokeball firework shape 2025-10-29 18:00:00 -03:00
Polymeta b8f73f277d Fix PokeRodFishingBobberEntity baitId detection for ReelInPokemonCriterionCondition
Fixes #1744

Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-10-25 21:40:17 +01:00
Polymeta 6df2b996e2 Merge branch 'smarter-scalable-brains' into 'main'
New tools for brain activity management

See merge request cable-mc/cobblemon!1916
2025-10-25 19:39:15 +00:00
Polymeta ddc4bd358d Merge branch 'niche-tags' into 'main'
Berry Tag Updates

See merge request cable-mc/cobblemon!1918
2025-10-25 19:34:59 +00:00
dhi_holo 40c5df46ce Berry Tag Updates
Reformatted how the tag is handled to be a bit cleaner, and allow for more specific berry querying via searching, mod compat, etc
2025-10-25 17:08:06 +10:00
Hiroku 1b1d22fdf3 Merge branch 'social-distancing' into 'main'
Adds random offset to follow herd leader task

See merge request cable-mc/cobblemon!1917
2025-10-25 01:49:48 +00:00
lionandHiroku 1ee1001774 Adds random offset to follow herd leader task 2025-10-25 01:49:48 +00:00
Paul 533272ef09 u got a loicense for that error? 2025-10-24 20:27:31 +10:00
Landon 91300e4d03 Merge branch '1.7-spawns' into 'main'
Some JSON tweaks

See merge request cable-mc/cobblemon!1913
2025-10-21 23:38:34 +00:00
Polymeta fc135faf57 revert pokemon number range 2025-10-21 22:48:59 +00:00
Polymeta cdd72c664e fix some typos
Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-10-21 23:23:43 +01:00
Polymeta 5f025d0f68 Merge branch 'moomoo-milk' into 'main'
Adds clear stat changes effect to Moomoo Milk

See merge request cable-mc/cobblemon!1911
2025-10-21 21:50:59 +00:00
lionandPolymeta 6af2c807ab Adds clear stat changes effect to Moomoo Milk 2025-10-21 21:50:58 +00:00
Polymeta c45c90c6c7 Merge branch 'main' into 1.7-spawns
# Conflicts:
#	common/src/main/resources/data/cobblemon/spawn_pool_world/0027_sandshrew.json
#	common/src/main/resources/data/cobblemon/spawn_pool_world/0028_sandslash.json
#	common/src/main/resources/data/cobblemon/spawn_pool_world/0079_slowpoke.json
#	common/src/main/resources/data/cobblemon/spawn_pool_world/0080_slowbro.json
#	common/src/main/resources/data/cobblemon/spawn_pool_world/0194_wooper.json
#	common/src/main/resources/data/cobblemon/spawn_pool_world/0199_slowking.json
#	common/src/main/resources/data/cobblemon/spawn_pool_world/0688_binacle.json
#	common/src/main/resources/data/cobblemon/spawn_pool_world/0689_barbaracle.json
#	common/src/main/resources/data/cobblemon/spawn_pool_world/0751_dewpider.json
#	common/src/main/resources/data/cobblemon/spawn_pool_world/0752_araquanid.json
#	common/src/main/resources/data/cobblemon/spawn_pool_world/0845_cramorant.json
#	common/src/main/resources/data/cobblemon/tags/worldgen/biome/is_overworld.json
#	utilityscripts/cobblemon_spawn_csv_to_json.py
2025-10-21 22:38:33 +01:00
Polymeta 1ec97c4c90 Merge branch 'riding-style-molang' into 'main'
Add molang function to get the current riding style of a pokemon

See merge request cable-mc/cobblemon!1912
2025-10-21 06:42:54 +00:00
Landon Wills f0bcd38ac7 Add molang function to get the current riding style of a pokemon 2025-10-21 01:55:19 -04:00
Test f4ba446c79 Merge branch 'restoration-tank-fixes' into 'main'
Small fixes

Closes #1735 and #1741

See merge request cable-mc/cobblemon!1908
2025-10-21 03:49:09 +00:00
Guilherme Pereira 60f98ebfce refactor poke snack 2025-10-21 00:04:20 -03:00
Guilherme Pereira 36a93bda5a refactor poke snack 2025-10-20 03:10:09 -03:00
Paul 8d60b07c54 Merge remote-tracking branch 'origin/main' 2025-10-20 14:45:26 +10:00
Paul 5f9cc86044 Added rouseChance and drowsyChance to RestBehaviour so pokemon don't insta sleep in the wild and may spontaneously wake up 2025-10-20 14:45:06 +10:00
Landon a6b7e07cf5 Merge branch 'held-item-fix' into 'main'
Remove pvp check for held item logic

See merge request cable-mc/cobblemon!1907
2025-10-20 03:18:36 +00:00
Landon Wills 0ba6215b8d Elaborate on comment 2025-10-19 23:05:16 -04:00
Guilherme Pereira e2f6fae689 change willDefendSelf combat behaviour default to false 2025-10-19 23:36:52 -03:00
Guilherme Pereira 296aa01d0f remove println 2025-10-19 18:41:38 -03:00
Guilherme Pereira 12ab3f2d07 fix dolphin crash on servers 2025-10-19 18:18:31 -03:00
Guilherme Pereira 5a7a374bc9 Merge branch 'main' of gitlab.com:cable-mc/cobblemon into restoration-tank-fixes 2025-10-19 17:35:50 -03:00
Guilherme Pereira ceece45ad4 make poke snack spawn 4 mons per bite 2025-10-19 17:24:01 -03:00
Landon Wills b344ad66c5 Remove pvp check 2025-10-19 14:44:08 -04:00
Paul dbc7af4ad4 Don't need to override the start conditions function for activity aware behavior 2025-10-18 21:40:43 +10:00
Paul 5f5bf01cb5 Added ActivityAwareBehavior and tagging for memories and activities 2025-10-18 21:30:47 +10:00
Polymeta 04f2af22f3 Merge branch 'hide-server-configs' into 'main'
Hide server configs when playing on a server

See merge request cable-mc/cobblemon!1905
2025-10-18 10:06:06 +00:00
lionandPolymeta ea916a0db8 Hide server configs when playing on a server 2025-10-18 10:06:06 +00:00
Guilherme Pereira 3f03afc7eb smooth campfire pot spinning animation 2025-10-18 06:53:20 -03:00
Paul e940483863 Typos corrected 2025-10-18 18:46:37 +10:00
Hiroku 9e3d3df3a9 Merge branch 'patch-1' into 'main'
Added Resource Texture Behaviour.

See merge request cable-mc/cobblemon!1894
2025-10-18 08:42:39 +00:00
Jolihan c18368d777 fixed? 2025-10-18 08:40:24 +00:00
Hiroku aab5b55204 Merge branch 'Bee-Polite-Bee-Efficient' into 'main'
Pokemon bee behavior rework

See merge request cable-mc/cobblemon!1892
2025-10-17 10:24:14 +00:00
Paul 3e6e346eb9 Nectar aspect shouldn't be mixed case, Jazz!! 2025-10-17 19:39:41 +10:00
Hiroku 7bef6db7b7 Merge branch 'riding-scraper-changes' into 'main'
Add lighting data to riding scraper

See merge request cable-mc/cobblemon!1904
2025-10-17 05:29:07 +00:00
lionandHiroku 71775328ef Add lighting data to riding scraper 2025-10-17 05:29:07 +00:00
Landon 727785b0b3 Merge branch 'boat-stamina' into 'main'
Adjust stamina logic

See merge request cable-mc/cobblemon!1903
2025-10-16 03:45:39 +00:00
Landon Wills 762241420e Adjust stamina logic 2025-10-15 19:48:10 -04:00
Guilherme Pereira 93011f084b make riding fov effects proportional to minecraft fov effect scale setting 2025-10-15 19:23:51 -03:00
Guilherme Pereira 7c90a8425e fix restoration tank concurrent modification crash #1735 2025-10-15 15:01:41 -03:00
Jolihan 8674cbe788 Update 2 files
- /resource_texture.json
- /common/src/main/resources/data/cobblemon/behaviours/npc/resource_identifier.json
2025-10-15 07:06:20 +00:00
Jolihan 8075fe0bae Update 2 files
- /common/src/main/resources/assets/cobblemon/lang/en_us.json
- /resource_texture.json
2025-10-15 07:03:10 +00:00
Polymeta 0152803192 Merge branch 'fix-hide-tooltips' into 'main'
Pulled up the Hide Tooltip check to instead run before any custom tooltip generators are performed.

Closes #1733

See merge request cable-mc/cobblemon!1902
2025-10-15 06:14:22 +00:00
Charzard4261 5e094241e3 Pulled up the Hide Tooltip check to instead run before any custom tooltip generators are performed. 2025-10-14 23:33:08 +01:00
Paul bd028c328d Fixed NPC class variables not being applied to NPCs 2025-10-14 22:43:06 +10:00
Polymeta 598cb1d964 Merge branch 'dead-bushes-bad-omen' into 'main'
Adds bad omen effect to dead bushes

See merge request cable-mc/cobblemon!1901
2025-10-14 08:30:41 +00:00
JazzMcNade 79d264fd94 Merge branch 'main' into Bee-Polite-Bee-Efficient 2025-10-14 00:34:09 -05:00
Guilherme Pereira 5f691d3f1c add bad omen effect to dead bushes 2025-10-13 22:26:29 -03:00
Landon 7be0163e76 Merge branch 'bird-stamina-changes' into 'main'
Bird stamina changes and bird fixes

See merge request cable-mc/cobblemon!1897
2025-10-13 21:51:47 +00:00
Jackson BowesandLandon c0b3068824 Bird stamina changes and bird fixes 2025-10-13 21:51:46 +00:00
Polymeta dd35adc05d Merge branch 'help-i-cannot-get-down' into 'main'
Fixed neoforge hover mounts not being able to descend

Closes #1717

See merge request cable-mc/cobblemon!1900
2025-10-13 10:58:40 +00:00
Paul 26b5707317 how about you license deez 2025-10-13 19:37:14 +10:00
Hiroku 75e39f5595 Merge branch 'neoforge-tag-annoyance' into 'main'
Plural Tags Please

See merge request cable-mc/cobblemon!1899
2025-10-13 06:47:59 +00:00
Paul 7fdeaeabef Fixed neoforge hover mounts not being able to descend 2025-10-13 16:45:32 +10:00
dhi_holo 809ffd8b90 Merge branch 'main' into neoforge-tag-annoyance 2025-10-13 14:50:58 +10:00
dhi_holo da7610951d Plural Tags Please
NeoForge uses singular form food tags for some reason. Also removed our berries as they're not technically a food and it would break balancing
2025-10-13 14:50:53 +10:00
Paul 76fdd1fa98 No more tricky riding pokemon after battles start 2025-10-11 21:04:59 +10:00
Polymeta 156983bf58 [skip-ci] changelog 2025-10-10 09:28:59 +00:00
Polymeta c69930b836 Merge branch 'SaferPokeballBreakFree' into 'main'
Avoid suffocation when a pokeball breaks near a wall

See merge request cable-mc/cobblemon!1898
2025-10-10 09:27:56 +00:00
JazzMcNade 6926932340 Merge branch 'main' into SaferPokeballBreakFree 2025-10-10 00:29:18 -05:00
Landon 221b3308fa Merge branch 'fix-boat-crash' into 'main'
Fix typo

See merge request cable-mc/cobblemon!1896
2025-10-09 22:39:05 +00:00
Landon Wills 66840670b6 Fix typo 2025-10-09 17:51:51 -04:00
Jolihan 5d6a7807e5 Added Resource Texture Behaviour. This adds a behaviour that allows the user to change the resource identifier of the npc class without needing a new class. 2025-10-08 12:48:20 +00:00
JazzMcNade 20b7eb17f3 simplify 2025-10-07 00:52:36 -05:00
JazzMcNade 103ac86345 Merge branch 'main' into SaferPokeballBreakFree 2025-10-05 02:00:56 -05:00
JazzMcNade 8f705a698d Merge branch 'main' into Bee-Polite-Bee-Efficient 2025-10-04 21:16:20 -05:00
JazzMcNade f4fb09947e Change log 2025-10-04 20:51:49 -05:00
JazzMcNade 97e31e341b Licenses! 2025-10-04 19:26:32 -05:00
JazzMcNade 813789235d Serializable hive/flow/leaf memories 2025-10-04 19:10:32 -05:00
JazzMcNade 5a82e7e185 Clean up and refactor 2025-10-04 17:15:20 -05:00
JazzMcNade 3bc8d3ce75 Code cleanup 2025-10-04 16:50:23 -05:00
JazzMcNade d9e9fd0f4e Clean up wander and move to hive task 2025-10-04 04:09:11 -05:00
Polymeta fddb203db3 Merge branch 'fix-aprijuice-crash' into 'main'
Aprijuice feeding crash

Closes #1712

See merge request cable-mc/cobblemon!1887
2025-10-03 16:14:39 +00:00
lionandPolymeta 8a8cace5e8 Aprijuice feeding crash 2025-10-03 16:14:38 +00:00
Polymeta 5f5b4ee3c1 Merge branch 'implement_pokemon' into 'main'
Implement pokemon

See merge request cable-mc/cobblemon!1890
2025-10-03 08:19:57 +00:00
JazzMcNade aa6581ae39 WIP hive blacklisting 2025-10-03 02:18:32 -05:00
Paul 8aa9e0191f Shulker Boxes and Traveler's Backpacks cannot be held by Pokémon and make the PC file 5000000gb large anymore 2025-10-03 16:43:35 +10:00
JazzMcNade 8dc09796f8 corrected extra start conditions 2025-10-02 23:57:38 -05:00
JazzMcNade 8f93712edb Merge branch 'main' into Bee-Polite-Bee-Efficient 2025-10-02 23:40:46 -05:00
JazzMcNade b91d1b931e Bees can now give up on a unreachable hive 2025-10-02 23:27:51 -05:00
Test 9d84cbb3ac Merge branch 'main' of https://gitlab.com/cable-mc/cobblemon 2025-10-02 22:35:54 -04:00
Test 8e730f2b5c fix ride stat exceeding limit 2025-10-02 22:35:24 -04:00
Hiroku 7b5809fd55 Merge branch 'aprijuice-feeding-crash-fix' into 'main'
Aprijuice feeding crash fix

Closes #1712

See merge request cable-mc/cobblemon!1891
2025-10-03 01:22:09 +00:00
PieDuck bc682ddf62 Removes comments 2025-10-03 00:57:04 +01:00
PieDuck 990ead0544 Fixes ConcurrentModificationException crash when feeding pokemon aprijuice 2025-10-03 00:55:38 +01:00
Carmendar 4cf55dc95d Merge branch 'main' into implement_pokemon 2025-10-02 17:54:36 -05:00
Polymeta 27a9f3c704 Merge branch 'ride-settings-network-fixes-electric-boogaloo' into 'main'
Make RideSettingsSyncHandler be correctly sided

See merge request cable-mc/cobblemon!1889
2025-10-02 20:47:01 +00:00
Nadja Reitzenstein 83aba7e4a6 Make RideSettingsSyncHandler be correctly sided 2025-10-02 18:57:37 +02:00
JazzMcNade 73275626a3 Persist bees that have a valid nectar deposit location 2025-09-30 00:51:29 -05:00
GenotypeXD-Dev 0686428138 Implemented Elgyem, and Beheeyem remodels 2025-09-29 23:47:04 -05:00
GenotypeXD-Dev f05e6008e5 Ho-oh Fixes 2025-09-29 13:33:00 -05:00
Carmendar 4450164d9c Garchomp can swim in liquid water now. 2025-09-28 23:56:10 -05:00
Carmendar b99899353c Merge branch 'main' into implement_pokemon 2025-09-28 22:39:22 -05:00
violet 608b711833 minor fix to exeggutor's animations 🥚 2025-09-28 00:59:44 -04:00
violet 3adc1b9f30 altered posers for staryu, starmie, and corsola 🫧 2025-09-28 00:35:52 -04:00
violet 478cbc2489 updated models & animations for litwick, lampent, and chandelure 🕯️ 2025-09-27 23:49:26 -04:00
Carmendar 03edb5a385 Merge branch 'main' into implement_pokemon 2025-09-27 02:47:44 -05:00
Carmendar cf77713860 No more Hydreigon quirks while flying. 2025-09-27 01:08:41 -05:00
Carmendar 0494193c9b fixed paldean tauros falling too. 2025-09-26 22:50:30 -05:00
Carmendar 7bee34170d removed non-existant quirk from crobat poser & fixed tauros falling in battle. 2025-09-26 22:47:49 -05:00
JazzMcNade 3a22e387b6 Clean up flower sensor 2025-09-26 00:46:27 -05:00
JazzMcNade 956b3bfcbd removed hive sensor from non-wild bees, clean up 2025-09-26 00:28:43 -05:00
JazzMcNade a9ceddd94a Clean up, disabled hive storage for non-wild bees 2025-09-25 00:50:04 -05:00
JazzMcNade e99c55e812 Merge branch 'main' into Bee-Polite-Bee-Efficient 2025-09-24 01:10:00 -05:00
JazzMcNade 5053d559bc Refactor, tweak start conditions, stop channeled behaviours when exiting the bee activity, allow bees to patrol sacc leaves if no hive is availiable. 2025-09-24 01:09:21 -05:00
Jerzykv 1a30109f1c Galarian Farfetch'd can no longer fly 2025-09-23 15:03:21 +02:00
violet 5088497575 MANECTRIC. 2025-09-21 18:55:04 -04:00
JazzMcNade 31129ef14d Merge branch 'main' into Bee-Polite-Bee-Efficient 2025-09-20 19:44:59 -05:00
Veraxiel 17c71efb17 Added spawns for 1.7 Pokémon. Updated spawns. Updated spawn scraper. 2025-09-08 02:04:58 -04:00
JazzMcNade e80eb91e69 Refactored Combees to only pass through Saccharine Leaves 2025-09-08 01:03:31 -05:00
Veraxiel a5b6a954fd Added "Mansion Dining" preset tag. Updated is_overworld tag. 2025-09-07 20:42:53 -04:00
JazzMcNade 2a295a8796 Merge branch 'main' into Bee-Polite-Bee-Efficient 2025-09-07 03:55:50 -05:00
JazzMcNade 245226f4f6 Refresh/delete hive memory on exiting a hive 2025-09-02 20:31:13 -05:00
JazzMcNade d3e1c2c79d Merge branch 'main' into Bee-Polite-Bee-Efficient 2025-09-02 01:34:58 -05:00
JazzMcNade e04e82c6de Added combee aggression for defending hives, more refactoring 2025-08-27 00:45:12 -05:00
JazzMcNade 95589dd48b Added hasNectar aspect particle effect. Removed programmer textures, removed unused file. 2025-08-23 19:34:02 -05:00
JazzMcNade 4cb17135bd Cancel honey deposit if the leaves are removed 2025-08-23 18:09:53 -05:00
JazzMcNade 8dc23160fc Added hasNectar aspect. Refactored POLLINATED memory to HAS_NECTAR 2025-08-23 17:22:58 -05:00
JazzMcNade 4a96a41c8e Merge branch 'main' into Bee-Polite-Bee-Efficient 2025-08-23 14:40:51 -05:00
JazzMcNade 3f18e7c0bf Combees may pass through leaves to deposit honey in saccharine leaves. 2025-08-19 23:37:24 -05:00
JazzMcNade 3c3a23a397 Merge branch 'LionsFoxesAndWolvesOhMy' into Bee-Polite-Bee-Efficient 2025-08-16 14:38:57 -05:00
JazzMcNade 438de6ed6d Merge branch 'main' into Bee-Polite-Bee-Efficient 2025-08-16 14:36:53 -05:00
JazzMcNade c754d820a5 Combee no longer gets stuck if it tries to enter a full hive, Will now always attempt to return to a hive in night or rain. 2025-08-15 00:35:38 -05:00
JazzMcNade 81c819ddd3 Pollination more closely reflects vanilla bees. Combee now stay closer to the ground. Combee now correctly update their rotation upon leaving a hive. 2025-08-14 22:26:38 -05:00
JazzMcNade ec3e0bfd04 More beelike hive logic. Nectar is applied more closely to how minecraft bees function 2025-08-11 00:38:42 -05:00
JazzMcNade b61d739e46 Wild Combees can store themselves in beehives, partial rework of hive sensor 2025-08-09 20:34:43 -05:00
JazzMcNade 7a050d5374 Merge branch 'main' into Bee-Polite-Bee-Efficient 2025-08-09 13:58:48 -05:00
JazzMcNade 52076de76a Reduced performance cost of flower sensor 2025-08-09 13:57:43 -05:00
JazzMcNade be8dfd7fa2 Utilize setPositionSafely in breakFree() 2025-07-01 22:04:20 -05:00
706 changed files with 19375 additions and 3893 deletions
+15
View File
@@ -34,6 +34,7 @@
- Added Hyper Training items (IV Modification) as well as some additional candy items to do so (Health Candy, Sickly Candy)
- Added Galarica Nut Bushes
- Many Pokémon (mostly cats) are now feared by phantoms
- Combees are now capable of gathering nectar from flowers and delivering it to either Saccharine leaves or hives. (Hive interactions are restricted to wild Combees)
- Lightning is now affected by a Pokemon's ability/typing
- Pokémon with the ability Lightning Rod draw in lightning similar to a lightning rod block albeit with a lower priority and range, gain immunity to lightning damage, and receive a temporary damage buff.
- Pokémon with the ability Motor Drive are immune to lightning damage and receive a temporary speed buff when struck by lightning
@@ -293,6 +294,7 @@
- Tauros - Paldea Blaze
- Tauros - Paldea Combat
- Dewgong
- Exeggutor - Kanto
### Model updates for the following Pokémon
- Cleffa
@@ -403,6 +405,9 @@
- Revavroom
- Nickit
- Thievul
- Litwick
- Lampent
- Chandelure
### Changes
- Changed pokemon caught and seen count to update based on the current pokedex being looked
@@ -416,6 +421,8 @@
- Updated some item tags to better integrate behaviours between Cobblemon, Vanilla Minecraft, and other mods
- Removed Cooked Meat, Raw Meat, Protein Ingredients, and Zinc Ingredients, the first two are now using `c` namespace tags, the latter have better integrated use of tags within their recipes which removes need for custom tags.
- Added our seeds tag into `#c:seeds`, which is now made use of for the Miracle Seed recipe.
- Updated the `#cobblemon:berries` tag to use subtags located in `data/cobblemon/tags/item/berries`, such as `#cobblemon:berries/hp_recovery` for sorting purposes
- Moved the tag `#cobblemon:mutated_berries` to `#cobblemon:berries/mutation_result`
- Added herbs and snowballs to the consumable in PvE and Wild battle tags
- Tweaked the Natural Materials Vanilla file to fit with the changes to tags
- Substantially optimised spawning checks mainly by front-loading biome filtering.
@@ -467,6 +474,8 @@
- Updated `HatchEggEvent.Post` to include the Pokemon that hatched.
- Roseli Berry Trees now naturally generate in their preferred biomes.
- Refactored dynamic lights compat to be more future proof. The dynamic light support is only tested with LambDynamicLights, on NeoForged use that mod in combination with Sinytra Connector
- Shulker Boxes and Traveler's Backpacks can no longer be held by Pokémon. Thanks Monocle ;) You could re-enable this with a datapack but you'd be crazy.
- Moomoo Milk now clears Pokémon stat changes when used in battle.
### Fixes
- Fixed game crashing when removing national pokedex using datapacks
@@ -551,6 +560,8 @@
- Fixed singular Pokémon corruption causing entire storage corruption. Storages will now skip corrupted Pokémon and print an error to console.
- Fixed species additions not being able to properly mark a species as implemented.
- Fixed Pokémon item models not showing a glint when enchanted.
- Fixed some specific bag items not being dropped when used in battle.
- Fixed the "use all berry bait" achievement not being progressed
### Developer
- A finished battle now has winners and losers set inside of `PokemonBattle` instead of them always being empty.
@@ -695,6 +706,9 @@
- Mechanics
- Unlockable Wallpapers
- Starter Data
- Fixed `cobblemon:reel_in_pokemon` criteria not working when used together with a `baitId`
- Also changed the default from `cobblemon:empty_bait` to `any`
- The previous default is still available by using the above as baitId
### Particles
Added new/updated particles for the following moves:
@@ -990,6 +1004,7 @@ Added new/updated particles for the following moves:
- Parametric particle motion now works.
- Event-spawned particles now work.
- Particles can now have independent coordinate spaces.
- Fixed suffocation of Pokémon when a pokeball breaks near a wall
### Developer
- Updated the Pokédex data updated events to always include a `Pokemon` instance, and optionally a `DisguiseData` instance.
@@ -0,0 +1,100 @@
/*
* Copyright (C) 2023 Cobblemon Contributors
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
package com.cobblemon.mod.common.mixin;
import com.cobblemon.mod.common.CobblemonMemories;
import com.cobblemon.mod.common.api.ai.config.task.PathToBeeHiveTaskConfig;
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity;
import net.minecraft.core.BlockPos;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.tags.BlockTags;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.item.component.CustomData;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.BeehiveBlock;
import net.minecraft.world.level.block.HorizontalDirectionalBlock;
import net.minecraft.world.level.block.entity.BeehiveBlockEntity;
import net.minecraft.world.phys.Vec3;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
@Mixin(BeehiveBlockEntity.Occupant.class)
public abstract class BeeOccupantMixin {
@Inject(method = "createEntity", at = @At("RETURN"), cancellable = true)
private void cobblemon$createEntity(Level level, BlockPos pos, CallbackInfoReturnable<Entity> cir) {
// Needing to replicate all the post op stuff on the hive isn't great
if (cir.getReturnValue() == null) {
final BeehiveBlockEntity.Occupant occupant = (BeehiveBlockEntity.Occupant) (Object) this;
CompoundTag compoundTag = occupant.entityData().copyTag();
Entity entity = EntityType.loadEntityRecursive(compoundTag, level, (entityx) -> entityx);
if (entity instanceof PokemonEntity pokemonEntity) {
var state = level.getBlockState(pos);
var newPos = Vec3.ZERO;
var newYaw = 0f;
var brain = pokemonEntity.getBrain();
if (state.is(BlockTags.BEEHIVES)) {
// position in front of the entrance, face away from the block
var facing = state.getValue(HorizontalDirectionalBlock.FACING);
newPos = pos.relative(facing).getCenter();
newYaw = facing.toYRot();
brain.setMemory(CobblemonMemories.INSTANCE.getHIVE_LOCATION(), pos); // This needs to be set in the case that the hive was picked up and moved.
} else {
// Block has likely been destroyed
var center = pos.getCenter();
newPos = new Vec3(
center.x + level.random.nextFloat() * 0.6 - 0.3,
center.y + level.random.nextFloat() * 0.6 - 0.3,
center.z + level.random.nextFloat() * 0.6 - 0.3
);
newYaw = level.random.nextFloat() * 360F;
brain.eraseMemory(CobblemonMemories.INSTANCE.getHIVE_LOCATION());
}
entity.yRotO = newYaw;
entity.setPos(newPos);
// Do honey logic
var hasNectar = brain.getMemory(CobblemonMemories.INSTANCE.getHAS_NECTAR()).orElse(false);
if (hasNectar) {
// Remove nectar and reset got to hive cooldown
brain.eraseMemory(CobblemonMemories.INSTANCE.getHAS_NECTAR());
brain.setMemoryWithExpiry(CobblemonMemories.INSTANCE.getHIVE_COOLDOWN(), true, PathToBeeHiveTaskConfig.STAY_OUT_OF_HIVE_COOLDOWN);
// Increment honey level of the hive
if (state.is(BlockTags.BEEHIVES, (blockStateBase) -> blockStateBase.hasProperty(BeehiveBlock.HONEY_LEVEL))) {
int i = state.getValue(BeehiveBlock.HONEY_LEVEL);
if (i < 5) {
int j = level.random.nextInt(100) == 0 ? 2 : 1;
if (i + j > 5) {
--j;
}
level.setBlockAndUpdate(pos, state.setValue(BeehiveBlock.HONEY_LEVEL, i + j));
}
}
}
cir.setReturnValue(entity);
}
}
}
@Inject(method = "of", at = @At("HEAD"), cancellable = true)
private static void cobblemon$of(Entity entity, CallbackInfoReturnable<BeehiveBlockEntity.Occupant> cir) {
if (entity instanceof PokemonEntity pokemonEntity) {
CompoundTag compoundTag = new CompoundTag();
entity.save(compoundTag);
Boolean hasNectar = pokemonEntity.getBrain().getMemory(CobblemonMemories.INSTANCE.getHAS_NECTAR()).orElse(false);
cir.setReturnValue(new BeehiveBlockEntity.Occupant(CustomData.of(compoundTag), 0, hasNectar ? 2400 : 600));
cir.cancel();
}
}
}
@@ -0,0 +1,102 @@
/*
* Copyright (C) 2023 Cobblemon Contributors
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
package com.cobblemon.mod.common.mixin;
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity;
import com.cobblemon.mod.common.mixin.accessor.BeeDataAccessor;
import com.cobblemon.mod.common.mixin.accessor.BeehiveBlockEntityAccessor;
import com.cobblemon.mod.common.mixin.accessor.BlockEntityAccessor;
import com.google.common.collect.Lists;
import net.minecraft.core.BlockPos;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.ai.memory.MemoryModuleType;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.entity.BeehiveBlockEntity;
import net.minecraft.world.level.block.state.BlockState;
import org.jetbrains.annotations.Nullable;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.gen.Accessor;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.Redirect;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import java.util.List;
@Mixin(BeehiveBlockEntity.class)
public abstract class BeehiveBlockEntityMixin {
// Accessor for the private 'stored' field in BeehiveBlockEntity
@Accessor("stored")
public abstract List<BeeDataAccessor> getStored();
@Inject(method = "emptyAllLivingFromHive", at = @At("HEAD"))
private void cobblemon$emptyAllLivingFromHive(@Nullable Player player, BlockState state, BeehiveBlockEntity.BeeReleaseStatus releaseStatus, CallbackInfo ci) {
if (player != null) {
final BeehiveBlockEntity blockEntity = (BeehiveBlockEntity) (Object) this;
// if the block is sedated or the player is too far away, no aggro should be applied
if (blockEntity.isSedated() || player.position().distanceToSqr(blockEntity.getBlockPos().getCenter()) > 16.0)
return;
// from this point need to access private members of the block entity
final BeehiveBlockEntityAccessor blockEntityAccessor = (BeehiveBlockEntityAccessor) this;
List<Object> storedList = blockEntityAccessor.getStored();
List<Entity> list = Lists.newArrayList();
storedList.removeIf((beeData) -> {
BeehiveBlockEntity.Occupant occupant = ((BeeDataAccessor) beeData).invokeToOccupant();
// Checking the for the tag allows us to make sure it's one of our pokemon before trying to rehydrate it into an entity
boolean isPokemon = false;
if (occupant.entityData().contains("id")) {
isPokemon = "cobblemon:pokemon".equals(occupant.entityData().getUnsafe().getString("id"));
}
if (isPokemon) {
return BeehiveBlockEntityAccessor.releaseOccupant(
((BlockEntityAccessor) blockEntityAccessor).getLevel(),
((BlockEntityAccessor) blockEntityAccessor).getWorldPosition(),
state,
occupant,
list,
releaseStatus,
blockEntityAccessor.savedFlowerPos());
} else {
return false;
}
}
);
for (Entity entity : list) {
if (entity instanceof PokemonEntity) {
((PokemonEntity) entity).getBrain().setMemory(MemoryModuleType.ATTACK_TARGET, player);
}
}
}
}
@Redirect(
method = "releaseOccupant",
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/world/level/Level;addFreshEntity(Lnet/minecraft/world/entity/Entity;)Z"
)
)
private static boolean cobblemon$captureReleasedEntity(
Level level, Entity entity,
Level lvl, BlockPos pos, BlockState state,
BeehiveBlockEntity.Occupant occupant, @Nullable List<Entity> bees,
BeehiveBlockEntity.BeeReleaseStatus releaseStatus, @Nullable BlockPos flowerPos) {
if (bees != null && !bees.contains(entity)) {
// Avoid duplicates if vanilla also adds bees to the list on your version
bees.add(entity);
}
return level.addFreshEntity(entity);
}
}
@@ -0,0 +1,75 @@
/*
* Copyright (C) 2023 Cobblemon Contributors
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
package com.cobblemon.mod.common.mixin;
import com.mojang.serialization.Codec;
import io.netty.buffer.ByteBuf;
import net.minecraft.network.codec.ByteBufCodecs;
import net.minecraft.network.codec.StreamCodec;
import net.minecraft.util.ByIdMap;
import net.minecraft.util.StringRepresentable;
import net.minecraft.world.item.component.FireworkExplosion;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Mutable;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.gen.Invoker;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import java.util.ArrayList;
import java.util.List;
import java.util.function.IntFunction;
@Mixin(FireworkExplosion.Shape.class)
public abstract class FireworkExplosionShapeMixin {
@Shadow
@Final
@Mutable
private static FireworkExplosion.Shape[] $VALUES;
@Shadow
@Final
@Mutable
private static IntFunction<FireworkExplosion.Shape> BY_ID;
@Shadow
@Final
@Mutable
public static StreamCodec<ByteBuf, FireworkExplosion.Shape> STREAM_CODEC;
@Shadow
@Final
@Mutable
public static Codec<FireworkExplosion.Shape> CODEC;
@Invoker("<init>")
private static FireworkExplosion.Shape cobblemon$createFireworkExplosionShape(String enumName, int internalId, int id, String name) {
throw new AssertionError();
}
@Inject(
method = "<clinit>",
at = @At("TAIL")
)
private static void cobblemon$addFireworkExplosionShape(CallbackInfo ci) {
ArrayList<FireworkExplosion.Shape> types = new ArrayList<>(List.of($VALUES));
types.add(cobblemon$createFireworkExplosionShape("POKEBALL", $VALUES.length, 5, "pokeball"));
$VALUES = types.toArray(FireworkExplosion.Shape[]::new);
BY_ID = ByIdMap.continuous(FireworkExplosion.Shape::getId, FireworkExplosion.Shape.values(), ByIdMap.OutOfBoundsStrategy.ZERO);
STREAM_CODEC = ByteBufCodecs.idMapper(BY_ID, FireworkExplosion.Shape::getId);
CODEC = StringRepresentable.fromValues(FireworkExplosion.Shape::values);
}
}
@@ -0,0 +1,87 @@
/*
* Copyright (C) 2023 Cobblemon Contributors
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
package com.cobblemon.mod.common.mixin;
import com.llamalad7.mixinextras.sugar.Local;
import it.unimi.dsi.fastutil.ints.IntList;
import net.minecraft.client.particle.FireworkParticles;
import net.minecraft.world.item.component.FireworkExplosion;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import org.spongepowered.asm.mixin.injection.callback.LocalCapture;
@Mixin(FireworkParticles.Starter.class)
public abstract class FireworkParticlesMixin {
@Shadow
protected abstract void createParticleShape(double speed, double[][] coords, IntList colors, IntList fadeColors, boolean trail, boolean twinkle, boolean isCreeper);
@Inject(
method = "tick()V",
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/client/particle/Particle;setColor(FFF)V",
shift = At.Shift.BEFORE,
by = 2
)
)
private void cobblemon$createPokeballParticleShape(
CallbackInfo ci,
@Local FireworkExplosion fireworkExplosion2,
@Local(ordinal = 0) int bl3,
@Local(ordinal = 0) int bl4,
@Local(ordinal = 0) IntList intList,
@Local(ordinal = 0) IntList intList2
) {
if (fireworkExplosion2.shape().getSerializedName().equals("pokeball")) {
final double[][] POKEBALL_PARTICLE_COORDS = new double[][]{
{0, 0.5},
{0.05, 0.497494},
{0.1, 0.489898},
{0.15, 0.47697},
{0.2, 0.458258},
{0.25, 0.433013},
{0.3, 0.4},
{0.35, 0.357071},
{0.4, 0.3},
{0.45, 0.217945},
{0.4975, 0.049937},
{0.086606, 0.049994},
{0.05, 0.086603},
{0, 0.1},
{0.05, 0.049994},
{0.05, -0.049994},
{0, -0.1},
{0.05, -0.086603},
{0.086606, -0.049994},
{0.0, -0.049937},
{0.4975, -0.049937},
{0.45, -0.217945},
{0.4, -0.3},
{0.35, -0.357071},
{0.3, -0.4},
{0.25, -0.433013},
{0.2, -0.458258},
{0.15, -0.47697},
{0.1, -0.489898},
{0.05, -0.497494},
{0, -0.5},
};
boolean b3 = bl3 == 1;
boolean b4 = bl4 == 1;
this.createParticleShape(0.5, POKEBALL_PARTICLE_COORDS, intList, intList2, b3, b4, true);
}
}
}
@@ -0,0 +1,52 @@
/*
* Copyright (C) 2023 Cobblemon Contributors
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
package com.cobblemon.mod.common.mixin;
import com.cobblemon.mod.common.CobblemonItems;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.component.FireworkExplosion;
import net.minecraft.world.item.crafting.FireworkStarRecipe;
import net.minecraft.world.item.crafting.Ingredient;
import net.minecraft.world.level.ItemLike;
import org.spongepowered.asm.mixin.*;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import java.util.Arrays;
import java.util.Map;
@Mixin(FireworkStarRecipe.class)
public class FireworkStarRecipeMixin {
@Mutable
@Shadow
@Final
private static Map<Item, FireworkExplosion.Shape> SHAPE_BY_ITEM;
@Mutable
@Shadow
@Final
private static Ingredient SHAPE_INGREDIENT;
@Inject(method = "<clinit>", at = @At("TAIL"))
private static void cobblemon$addCustomShape(CallbackInfo ci) {
ItemStack[] existing = SHAPE_INGREDIENT.getItems();
ItemStack[] extended = new ItemStack[existing.length + 1];
System.arraycopy(existing, 0, extended, 0, existing.length);
extended[existing.length] = new ItemStack(CobblemonItems.POKE_BALL);
SHAPE_INGREDIENT = Ingredient.of(Arrays.stream(extended)
.map(ItemStack::getItem)
.toArray(ItemLike[]::new));
SHAPE_BY_ITEM.put(CobblemonItems.POKE_BALL, FireworkExplosion.Shape.byId(5));
}
}
@@ -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.mixin.accessor;
import net.minecraft.world.level.block.entity.BeehiveBlockEntity;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.gen.Invoker;
@Mixin(targets = "net.minecraft.world.level.block.entity.BeehiveBlockEntity$BeeData")
public interface BeeDataAccessor {
@Invoker("toOccupant")
BeehiveBlockEntity.Occupant invokeToOccupant();
}
@@ -0,0 +1,40 @@
/*
* Copyright (C) 2023 Cobblemon Contributors
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
package com.cobblemon.mod.common.mixin.accessor;
import net.minecraft.core.BlockPos;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.entity.BeehiveBlockEntity;
import net.minecraft.world.level.block.state.BlockState;
import org.jetbrains.annotations.Nullable;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.gen.Accessor;
import org.spongepowered.asm.mixin.gen.Invoker;
import java.util.List;
@Mixin(BeehiveBlockEntity.class)
public interface BeehiveBlockEntityAccessor {
@Accessor("stored")
List<Object> getStored();
@Accessor("savedFlowerPos")
BlockPos savedFlowerPos();
/**
* Access the private static method:
* private static void releaseOccupant(Level level, BlockPos pos, BeeData beeData, ...)
*/
@Invoker("releaseOccupant")
static boolean releaseOccupant(Level level, BlockPos pos, BlockState state, BeehiveBlockEntity.Occupant occupant, @Nullable List<Entity> storedInHives, BeehiveBlockEntity.BeeReleaseStatus releaseStatus, @Nullable BlockPos storedFlowerPos) {
throw new AssertionError(); // Mixin will overwrite
}
}
@@ -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.mixin.accessor;
import net.minecraft.core.BlockPos;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.entity.BlockEntity;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.gen.Accessor;
@Mixin(BlockEntity.class)
public interface BlockEntityAccessor {
@Accessor("level") Level getLevel();
@Accessor("worldPosition") BlockPos getWorldPosition();
}
@@ -696,7 +696,7 @@ object CobblemonItems : PlatformRegistry<Registry<Item>, ResourceKey<Registry<It
@JvmField
val SUPERB_REMEDY = compostableItem("superb_remedy", RemedyItem(RemedyItem.SUPERB), 0.85f)
@JvmField
val MOOMOO_MILK = create("moomoo_milk", CobblemonItem(Item.Properties().craftRemainder(Items.GLASS_BOTTLE).stacksTo((16))))
val MOOMOO_MILK = create("moomoo_milk", MoomooMilk(Item.Properties().craftRemainder(Items.GLASS_BOTTLE).stacksTo((16))))
@JvmField
val POTION = create("potion", PotionItem(PotionType.POTION))
@@ -15,12 +15,12 @@ import com.cobblemon.mod.common.api.moves.animations.ActionEffectContext
import com.mojang.serialization.Codec
import com.mojang.serialization.codecs.ListCodec
import com.mojang.serialization.codecs.PrimitiveCodec
import net.minecraft.core.UUIDUtil
import net.minecraft.world.entity.ai.memory.MemoryModuleType
import java.util.Optional
import java.util.UUID
import net.minecraft.core.BlockPos
import net.minecraft.core.GlobalPos
import net.minecraft.core.UUIDUtil
import net.minecraft.world.entity.LivingEntity
import net.minecraft.world.entity.ai.memory.MemoryModuleType
import java.util.*
object CobblemonMemories {
val memories = mutableMapOf<String, MemoryModuleType<*>>()
@@ -48,10 +48,13 @@ object CobblemonMemories {
val TIME_TRYING_TO_REACH_BERRY_BUSH = register<Int>("time_trying_to_reach_berry_bush")
val IS_CONSUMING_ITEM = register<Boolean>("is_consuming_item")
val RECENTLY_ATE_GRASS = register<Boolean>("recently_ate_grass")
val HIVE_LOCATION = register<BlockPos>("hive_location")
val HIVE_LOCATION = register<BlockPos>("hive_location", BlockPos.CODEC)
val HIVE_BLACKLIST = register<List<BlockPos>>("hive_blacklist")
val HIVE_COOLDOWN = register<Boolean>("hive_cooldown")
val NEARBY_FLOWERS = register<List<BlockPos>>("nearby_flower")
val POLLINATED = register<Boolean>("pollinated", PrimitiveCodec.BOOL)
val NEARBY_FLOWER = register<BlockPos>("nearby_flower", BlockPos.CODEC)
val PATH_TO_NEARBY_FLOWER_COOLDOWN = register<Boolean>("path_to_nearby_flower_cooldown")
val HAS_NECTAR = register<Boolean>("has_nectar", PrimitiveCodec.BOOL)
val NEARBY_SACC_LEAVES = register<BlockPos>("nearby_sacc_leaves", BlockPos.CODEC)
/** who am i following rn? */
val HERD_LEADER = register<String>("herd_leader", PrimitiveCodec.STRING)
/** how many are following me rn? */
@@ -41,6 +41,8 @@ object CobblemonSensors {
val POKEMON_NEARBY_WANTED_ITEM = register("pokemon_nearby_wanted_item", ::PokemonItemSensor)
val NEARBY_SACC_LEAVES = register("nearby_sacc_leaves", ::SacLeavesSensor)
fun <E : Entity, U : Sensor<E>> register(id: String, supplier: Supplier<U>): SensorType<U> {
val sensor = SensorType(supplier)
sensors[id] = sensor
@@ -22,18 +22,19 @@ class ReelInPokemonContext(val species : ResourceLocation, val baitId: ResourceL
class ReelInPokemonCriterionCondition(
playerCtx: Optional<ContextAwarePredicate>,
val species: String,
val baitId: String
val baitId: String // also allows "cobblemon:empty_bait" to indicate that no bait is allowed for this criterion to match
) : SimpleCriterionCondition<ReelInPokemonContext>(playerCtx) {
companion object {
val CODEC: Codec<ReelInPokemonCriterionCondition> = RecordCodecBuilder.create { it.group(
EntityPredicate.ADVANCEMENT_CODEC.optionalFieldOf("player").forGetter { it.playerCtx },
Codec.STRING.optionalFieldOf("species", "any").forGetter { it.species },
Codec.STRING.optionalFieldOf("baitId", "empty_bait").forGetter { it.baitId }
).apply(it, { playerCtx, pokemonId, baitId -> ReelInPokemonCriterionCondition(playerCtx, pokemonId, baitId.ifEmpty { "empty_bait" }) }) }
Codec.STRING.optionalFieldOf("baitId", "any").forGetter { it.baitId }
).apply(it, { playerCtx, pokemonId, baitId -> ReelInPokemonCriterionCondition(playerCtx, pokemonId, baitId) }) }
}
override fun matches(player: ServerPlayer, context: ReelInPokemonContext): Boolean {
return (context.species == this.species.asIdentifierDefaultingNamespace() || this.species == "any") && (context.baitId == this.baitId.asIdentifierDefaultingNamespace() || this.baitId == "empty_bait")
return (context.species == this.species.asIdentifierDefaultingNamespace() || this.species == "any")
&& (context.baitId == this.baitId.asIdentifierDefaultingNamespace() || this.baitId == "any")
}
}
@@ -0,0 +1,49 @@
/*
* 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.api.ai
import net.minecraft.server.level.ServerLevel
import net.minecraft.world.entity.LivingEntity
import net.minecraft.world.entity.ai.behavior.Behavior
import net.minecraft.world.entity.ai.memory.MemoryModuleType
import net.minecraft.world.entity.ai.memory.MemoryStatus
import net.minecraft.world.entity.schedule.Activity
/**
* A [Behavior] subclass that represents tasks that check that the entity is still in one
* of the activities that this task is part of. If the entity is no longer doing any of those
* activities, the task will be interrupted and you can handle any cleanup in [onInterrupted].
*
* @author Hiroku
* @since October 17th, 2025
*/
abstract class ActivityAwareBehavior<E : LivingEntity> : Behavior<E> {
constructor(entryCondition: Map<MemoryModuleType<*>, MemoryStatus>) : super(entryCondition)
constructor(entryCondition: Map<MemoryModuleType<*>, MemoryStatus>, duration: Int) : super(entryCondition, duration)
constructor(entryCondition: Map<MemoryModuleType<*>, MemoryStatus>, minDuration: Int, maxDuration: Int) : super(entryCondition, minDuration, maxDuration)
val activities: MutableSet<Activity> = mutableSetOf()
fun isStillDoingActivity(entity: E): Boolean {
return activities.any(entity.brain::isActive)
}
override fun canStillUse(level: ServerLevel, entity: E, gameTime: Long) = isStillDoingActivity(entity)
open fun onInterrupted(level: ServerLevel, entity: E, gameTime: Long) {
// No-op
}
override fun stop(level: ServerLevel, entity: E, gameTime: Long) {
super.stop(level, entity, gameTime)
if (!isStillDoingActivity(entity)) {
onInterrupted(level, entity, gameTime)
}
}
}
@@ -11,7 +11,6 @@ package com.cobblemon.mod.common.api.ai
import com.google.common.collect.ImmutableList
import com.mojang.datafixers.util.Pair
import net.minecraft.world.entity.LivingEntity
import net.minecraft.world.entity.Mob
import net.minecraft.world.entity.ai.behavior.BehaviorControl
import net.minecraft.world.entity.schedule.Activity
@@ -23,6 +22,13 @@ class ActivityConfigurationContext(val activity: Activity) {
}
fun apply(entity: LivingEntity) {
tasks.forEach {
val activityAwareBehavior = it.second as? ActivityAwareBehavior<*>
?: (it.second as? WrapperLivingEntityTask<*>)?.task as? ActivityAwareBehavior
?: return@forEach
activityAwareBehavior.activities += activity
}
entity.brain.addActivity(activity, ImmutableList.copyOf(tasks))
}
}
@@ -23,7 +23,7 @@ import net.minecraft.world.entity.schedule.Activity
class ActivityChangeTaskConfig : SingleTaskConfig {
val activity: Activity = Activity.IDLE
val condition: ExpressionLike = "false".asExpressionLike()
val condition: ExpressionLike = "true".asExpressionLike()
override fun getVariables(entity: LivingEntity, behaviourConfigurationContext: BehaviourConfigurationContext): List<MoLangConfigVariable> = emptyList()
@@ -17,6 +17,7 @@ import com.cobblemon.mod.common.api.ai.ExpressionOrEntityVariable
import com.cobblemon.mod.common.api.ai.asVariables
import com.cobblemon.mod.common.entity.npc.NPCEntity
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity
import com.cobblemon.mod.common.util.getMemorySafely
import com.cobblemon.mod.common.util.resolveString
import com.mojang.datafixers.util.Either
import net.minecraft.server.level.ServerLevel
@@ -62,7 +63,7 @@ class MemoryAspectTaskConfig : SingleTaskConfig {
override fun canStillUse(level: ServerLevel, entity: LivingEntity, gameTime: Long) = true
override fun tick(level: ServerLevel, owner: LivingEntity, gameTime: Long) {
val hasMemory = !owner.brain.hasMemoryValue(memory)
val hasMemory = owner.brain.hasMemoryValue(memory)
if (owner is PokemonEntity) {
if (!hasMemory && aspect in owner.pokemon.forcedAspects) {
owner.pokemon.forcedAspects -= aspect
@@ -8,16 +8,31 @@
package com.cobblemon.mod.common.api.ai.config.task
import com.cobblemon.mod.common.CobblemonMemories
import com.cobblemon.mod.common.CobblemonSensors
import com.cobblemon.mod.common.api.ai.BehaviourConfigurationContext
import com.cobblemon.mod.common.api.ai.asVariables
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity
import com.cobblemon.mod.common.entity.pokemon.ai.tasks.PathToBeeHiveTask
import com.cobblemon.mod.common.entity.pokemon.ai.tasks.PlaceHoneyInHiveTask
import com.cobblemon.mod.common.util.distanceTo
import com.cobblemon.mod.common.util.getMemorySafely
import net.minecraft.core.BlockPos
import net.minecraft.server.level.ServerLevel
import net.minecraft.world.entity.LivingEntity
import net.minecraft.world.entity.PathfinderMob
import net.minecraft.world.entity.ai.behavior.Behavior
import net.minecraft.world.entity.ai.behavior.BehaviorControl
import net.minecraft.world.entity.ai.behavior.BlockPosTracker
import net.minecraft.world.entity.ai.memory.MemoryModuleType
import net.minecraft.world.entity.ai.memory.MemoryStatus
import net.minecraft.world.entity.ai.memory.WalkTarget
import net.minecraft.world.phys.Vec3
class PathToBeeHiveTaskConfig : SingleTaskConfig {
companion object {
const val HONEY = "honey"
const val STAY_OUT_OF_HIVE_COOLDOWN = 400
}
val condition = booleanVariable(HONEY, "can_add_honey", true).asExpressible()
@@ -36,6 +51,107 @@ class PathToBeeHiveTaskConfig : SingleTaskConfig {
if (!checkCondition(behaviourConfigurationContext.runtime, condition)) {
return null
}
return PathToBeeHiveTask.create()
behaviourConfigurationContext.addSensors(CobblemonSensors.NEARBY_BEE_HIVE)
return object : Behavior<LivingEntity>(
mapOf(
MemoryModuleType.LOOK_TARGET to MemoryStatus.REGISTERED,
MemoryModuleType.WALK_TARGET to MemoryStatus.VALUE_ABSENT,
CobblemonMemories.HAS_NECTAR to MemoryStatus.REGISTERED,
CobblemonMemories.HIVE_LOCATION to MemoryStatus.VALUE_PRESENT,
CobblemonMemories.HIVE_COOLDOWN to MemoryStatus.VALUE_ABSENT,
CobblemonMemories.HIVE_BLACKLIST to MemoryStatus.REGISTERED,
),
400,
400
) {
val maxTicks = 400
var traveledTicks = 0
override fun checkExtraStartConditions(level: ServerLevel, owner: LivingEntity): Boolean {
return (owner is PathfinderMob && owner.isAlive && (owner is PokemonEntity && PlaceHoneyInHiveTask.wantsToEnterHive(owner))) && owner.brain.checkMemory(
MemoryModuleType.WALK_TARGET, MemoryStatus.VALUE_ABSENT)
}
override fun canStillUse(level: ServerLevel, entity: LivingEntity, gameTime: Long): Boolean {
if (maxTicks >= traveledTicks) return false
val pos = entity.brain.getMemory(CobblemonMemories.HIVE_LOCATION)
return !pos.isEmpty && entity.distanceTo(pos.get()) > 1.0
}
override fun start(level: ServerLevel, entity: LivingEntity, gameTime: Long) {
super.start(level, entity, gameTime)
val hiveLocation = entity.brain.getMemorySafely(CobblemonMemories.HIVE_LOCATION).orElse(null)
val world = entity.level()
val sidesByClosest = listOf(
hiveLocation.north(),
hiveLocation.south(),
hiveLocation.east(),
hiveLocation.west()
).sortedBy { it.distSqr(entity.blockPosition()) }
var openSide = BlockPos.ZERO
for (side in sidesByClosest) {
if (world.getBlockState(side).isAir) {
openSide = side
break
}
}
if (openSide == BlockPos.ZERO) {
if (world.getBlockState(hiveLocation.above()).isAir) {
// If the above position is also air, we can use it
openSide = hiveLocation.above() // Fallback to above if no open sides found
} else if (world.getBlockState(hiveLocation.below()).isAir) {
// If the below position is also air, we can use it
openSide = hiveLocation.below() // Fallback to below if no open sides found
} else {
// If no open sides or above/below positions are found, we cannot proceed
return
}
}
val targetVec = Vec3.atCenterOf(openSide)
// Set path target toward hive
if (pathfindDirectlyTowards(openSide, entity)) {
entity.brain.setMemory(MemoryModuleType.WALK_TARGET,WalkTarget(targetVec, 0.35F, 0))
entity.brain.setMemory(MemoryModuleType.LOOK_TARGET,BlockPosTracker(targetVec.add(0.0, entity.eyeHeight.toDouble(), 0.0)))
traveledTicks = 0
} else {
dropAndBlackListHive(entity)
}
}
override fun tick(level: ServerLevel, owner: LivingEntity, gameTime: Long) {
traveledTicks++
}
override fun stop(level: ServerLevel, entity: LivingEntity, gameTime: Long) {
if (maxTicks < traveledTicks) {
dropAndBlackListHive(entity)
entity.brain.setMemoryWithExpiry(CobblemonMemories.HIVE_COOLDOWN, true, 100)
}
}
fun dropAndBlackListHive(entity: LivingEntity) {
val hivePos = entity.brain.getMemorySafely(CobblemonMemories.HIVE_LOCATION).orElse(null)
if (hivePos == null) return
val blackList = entity.brain.getMemorySafely(CobblemonMemories.HIVE_BLACKLIST).orElse(emptyList()).toMutableList()
blackList.add(hivePos)
if (blackList.count() > 3) {
blackList.removeFirst()
}
entity.brain.eraseMemory(CobblemonMemories.HIVE_LOCATION)
entity.brain.setMemory(CobblemonMemories.HIVE_BLACKLIST, blackList)
}
private fun pathfindDirectlyTowards(pos: BlockPos, entity: LivingEntity): Boolean {
if (entity !is PathfinderMob) return false
val nav = entity.navigation
val path = nav. createPath(pos, 0)
return path != null && path.canReach()
}
}
}
}
@@ -8,7 +8,6 @@
package com.cobblemon.mod.common.api.ai.config.task
import com.bedrockk.molang.runtime.MoLangRuntime
import com.cobblemon.mod.common.CobblemonMemories
import com.cobblemon.mod.common.CobblemonSensors
import com.cobblemon.mod.common.api.ai.BehaviourConfigurationContext
@@ -41,12 +40,14 @@ class PathToFlowerTaskConfig : SingleTaskConfig {
return null
}
behaviourConfigurationContext.addMemories(
CobblemonMemories.NEARBY_FLOWERS,
CobblemonMemories.NEARBY_FLOWER,
CobblemonMemories.PATH_TO_NEARBY_FLOWER_COOLDOWN,
CobblemonMemories.HIVE_COOLDOWN,
CobblemonMemories.HIVE_LOCATION,
CobblemonMemories.POLLINATED
CobblemonMemories.HIVE_BLACKLIST,
CobblemonMemories.HAS_NECTAR,
)
behaviourConfigurationContext.addSensors(CobblemonSensors.NEARBY_BEE_HIVE, CobblemonSensors.NEARBY_FLOWER)
behaviourConfigurationContext.addSensors(CobblemonSensors.NEARBY_FLOWER)
return PathToFlowerTask.create()
}
}
@@ -0,0 +1,49 @@
/*
* 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.api.ai.config.task
import com.cobblemon.mod.common.CobblemonMemories
import com.cobblemon.mod.common.CobblemonSensors
import com.cobblemon.mod.common.api.ai.BehaviourConfigurationContext
import com.cobblemon.mod.common.api.ai.asVariables
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity
import com.cobblemon.mod.common.entity.pokemon.ai.tasks.PathToSacLeafTask
import net.minecraft.world.entity.LivingEntity
import net.minecraft.world.entity.ai.behavior.BehaviorControl
class PathToSaccLeavesTaskConfig : SingleTaskConfig {
companion object {
const val POLLINATE = "pollinate"
}
val condition = booleanVariable(POLLINATE, "can_pollinate", true).asExpressible()
override fun getVariables(entity: LivingEntity, behaviourConfigurationContext: BehaviourConfigurationContext) = listOf(
condition
).asVariables()
override fun createTask(
entity: LivingEntity,
behaviourConfigurationContext: BehaviourConfigurationContext
): BehaviorControl<in LivingEntity>? {
if (entity !is PokemonEntity) {
return null
}
if (!checkCondition(behaviourConfigurationContext.runtime, condition)) {
return null
}
behaviourConfigurationContext.addMemories(
CobblemonMemories.NEARBY_SACC_LEAVES,
CobblemonMemories.HAS_NECTAR
)
behaviourConfigurationContext.addSensors(CobblemonSensors.NEARBY_SACC_LEAVES, CobblemonSensors.NEARBY_FLOWER)
return PathToSacLeafTask.create()
}
}
@@ -8,8 +8,8 @@
package com.cobblemon.mod.common.api.ai.config.task
import com.bedrockk.molang.runtime.MoLangRuntime
import com.cobblemon.mod.common.api.ai.BehaviourConfigurationContext
import com.cobblemon.mod.common.api.ai.WrapperLivingEntityTask
import com.cobblemon.mod.common.api.ai.asVariables
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity
import com.cobblemon.mod.common.entity.pokemon.ai.tasks.PlaceHoneyInHiveTask
@@ -37,6 +37,9 @@ class PlaceHoneyInHiveTaskConfig : SingleTaskConfig {
if (!checkCondition(behaviourConfigurationContext.runtime, condition)) {
return null
}
return PlaceHoneyInHiveTask.create()
return WrapperLivingEntityTask(
PlaceHoneyInHiveTask.create(),
PokemonEntity::class.java
)
}
}
@@ -0,0 +1,130 @@
/*
* 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.api.ai.config.task
import com.cobblemon.mod.common.CobblemonActivities
import com.cobblemon.mod.common.CobblemonBlocks
import com.cobblemon.mod.common.CobblemonMemories
import com.cobblemon.mod.common.api.ai.BehaviourConfigurationContext
import com.cobblemon.mod.common.api.ai.asVariables
import com.cobblemon.mod.common.block.SaccharineLeafBlock
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity
import com.cobblemon.mod.common.util.getMemorySafely
import net.minecraft.server.level.ServerLevel
import net.minecraft.sounds.SoundEvents
import net.minecraft.world.entity.LivingEntity
import net.minecraft.world.entity.ai.behavior.Behavior
import net.minecraft.world.entity.ai.behavior.BehaviorControl
import net.minecraft.world.entity.ai.memory.MemoryModuleType
import net.minecraft.world.entity.ai.memory.MemoryStatus
import net.minecraft.world.phys.Vec3
class PlaceHoneyInSaccLeavesTaskConfig : SingleTaskConfig {
companion object {
const val POLLINATE = "pollinate"
const val MIN_DURATION : Int = 300
const val MAX_DURATION : Int = 400
const val REQUIRED_SUCCESSFUL_POLLINATION_TICKS = 250
}
val condition = booleanVariable(POLLINATE, "can_pollinate", true).asExpressible()
override fun getVariables(entity: LivingEntity, behaviourConfigurationContext: BehaviourConfigurationContext) = listOf(
condition
).asVariables()
override fun createTask(
entity: LivingEntity,
behaviourConfigurationContext: BehaviourConfigurationContext
): BehaviorControl<in LivingEntity>? {
if (entity !is PokemonEntity) {
return null
}
if (!checkCondition(behaviourConfigurationContext.runtime, condition)) {
return null
}
return object : Behavior<LivingEntity>(
mapOf(
CobblemonMemories.NEARBY_SACC_LEAVES to MemoryStatus.VALUE_PRESENT,
MemoryModuleType.WALK_TARGET to MemoryStatus.VALUE_ABSENT,
CobblemonMemories.HAS_NECTAR to MemoryStatus.VALUE_PRESENT,
),
MIN_DURATION,
MAX_DURATION
) {
var successfulPollinationTicks = 0
var lastSoundPlayedTick = 0
var hoverPos: Vec3? = null
override fun checkExtraStartConditions(level: ServerLevel, owner: LivingEntity): Boolean {
if (level.isNight || level.isRaining || !(entity.brain.getMemorySafely(CobblemonMemories.HAS_NECTAR).orElse(false))) return false
val optionalBlockPos = entity.brain.getMemorySafely(CobblemonMemories.NEARBY_SACC_LEAVES)
if (!optionalBlockPos.isPresent || level.getBlockState(optionalBlockPos.get()).block != CobblemonBlocks.SACCHARINE_LEAVES) return false
return Vec3.atCenterOf(optionalBlockPos.get()).distanceTo(entity.position()) <= 0.6
}
override fun canStillUse(level: ServerLevel, entity: LivingEntity, gameTime: Long): Boolean {
return checkExtraStartConditions(level, entity) && entity.brain.activeActivities.indexOf(
CobblemonActivities.POKEMON_POLLINATION) != -1
}
override fun start(level: ServerLevel, entity: LivingEntity, gameTime: Long) {
super.start(level, entity, gameTime)
hoverPos = null
}
override fun tick(level: ServerLevel, owner: LivingEntity, gameTime: Long) {
++successfulPollinationTicks
if (entity.random.nextFloat() < 0.05f && successfulPollinationTicks > this.lastSoundPlayedTick + 60) {
this.lastSoundPlayedTick = successfulPollinationTicks
entity.playSound(SoundEvents.BEEHIVE_DRIP, 1.0f, 1.0f)
}
val leavesPos = entity.brain.getMemorySafely(CobblemonMemories.NEARBY_SACC_LEAVES).orElse(null)
val bl = hoverPos == null || entity.position().distanceTo(hoverPos!!) <= 0.1
val bl3 = entity.random.nextInt(40) == 0
if (bl && bl3) {
// mimics the wriggling over a flower the vanilla bees do
if (hoverPos == null) {
hoverPos = leavesPos.bottomCenter.add(0.0, 0.4, 0.0)
}
if (leavesPos != null) {
hoverPos = leavesPos.bottomCenter.add(Vec3((entity.random.nextDouble() * 2.0 - 1.0) * (1.0/5.0), 0.3 + (entity.random.nextDouble() * 2.0 - 1.0) * (1.0/7.0), (entity.random.nextDouble() * 2.0 - 1.0) * (1.0/5.0)))
entity.getMoveControl()
.setWantedPosition(hoverPos!!.x(), hoverPos!!.y(), hoverPos!!.z(), 0.35)
entity.lookControl.setLookAt(leavesPos.bottomCenter.add(0.0,0.5,0.0))
}
} else if (!bl) {
entity.getMoveControl()
.setWantedPosition(hoverPos!!.x(), hoverPos!!.y(), hoverPos!!.z(), 0.35)
}
}
override fun stop(level: ServerLevel, entity: LivingEntity, gameTime: Long) {
if (successfulPollinationTicks > REQUIRED_SUCCESSFUL_POLLINATION_TICKS) {
val blockPos = entity.brain.getMemorySafely(CobblemonMemories.NEARBY_SACC_LEAVES).orElse(null)
blockPos.let {
val blockState = level.getBlockState(blockPos)
if (blockState.block == CobblemonBlocks.SACCHARINE_LEAVES) {
val saccAge = blockState.getValue( SaccharineLeafBlock.AGE)
if (saccAge < SaccharineLeafBlock.MAX_AGE) {
entity.brain.eraseMemory(CobblemonMemories.HAS_NECTAR)
val newBlockState = blockState.setValue(SaccharineLeafBlock.AGE, saccAge + 1)
level.setBlock(blockPos, newBlockState, 3)
}
}
}
}
successfulPollinationTicks = 0
entity.brain.eraseMemory(MemoryModuleType.WALK_TARGET)
}
}
}
}
@@ -8,17 +8,14 @@
package com.cobblemon.mod.common.api.ai.config.task
import com.cobblemon.mod.common.CobblemonActivities
import com.cobblemon.mod.common.CobblemonMemories
import com.cobblemon.mod.common.api.ai.BehaviourConfigurationContext
import com.cobblemon.mod.common.api.ai.ExpressionOrEntityVariable
import com.cobblemon.mod.common.api.ai.asVariables
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity
import com.cobblemon.mod.common.util.asExpression
import com.cobblemon.mod.common.util.getMemorySafely
import com.cobblemon.mod.common.util.sendParticlesServer
import com.mojang.datafixers.util.Either
import net.minecraft.core.particles.ParticleTypes
import net.minecraft.server.level.ServerLevel
import net.minecraft.sounds.SoundEvents
import net.minecraft.world.entity.LivingEntity
import net.minecraft.world.entity.ai.behavior.Behavior
import net.minecraft.world.entity.ai.behavior.BehaviorControl
@@ -29,10 +26,11 @@ import net.minecraft.world.phys.Vec3
class PollinateFlowerTaskConfig : SingleTaskConfig {
companion object {
const val POLLINATE = "pollinate"
const val PATH_TO_FLOWER_COOLDOWN_TICKS : Long = 200
const val HAS_NECTAR_ASPECT = "has_nectar"
}
val condition = booleanVariable(POLLINATE, "can_pollinate", true).asExpressible()
val durationTicks: ExpressionOrEntityVariable = Either.left("30".asExpression())
override fun getVariables(entity: LivingEntity, behaviourConfigurationContext: BehaviourConfigurationContext) = listOf(
condition
@@ -51,22 +49,28 @@ class PollinateFlowerTaskConfig : SingleTaskConfig {
return object : Behavior<LivingEntity>(
mapOf(
CobblemonMemories.NEARBY_FLOWERS to MemoryStatus.VALUE_PRESENT,
CobblemonMemories.NEARBY_FLOWER to MemoryStatus.VALUE_PRESENT,
MemoryModuleType.WALK_TARGET to MemoryStatus.VALUE_ABSENT,
CobblemonMemories.POLLINATED to MemoryStatus.VALUE_ABSENT,
CobblemonMemories.HAS_NECTAR to MemoryStatus.REGISTERED,
CobblemonMemories.HIVE_COOLDOWN to MemoryStatus.VALUE_ABSENT,
),
15,
45
600,
625
) {
val REQUIRED_SUCCESSFUL_POLLINATION_TICKS = 400
var successfulPollinationTicks = 0
var lastSoundPlayedTick = 0
var hoverPos: Vec3? = null
override fun checkExtraStartConditions(level: ServerLevel, owner: LivingEntity): Boolean {
return entity.brain.getMemorySafely(CobblemonMemories.NEARBY_FLOWERS).orElse(emptyList()).any {
Vec3.atCenterOf(it).distanceTo(entity.position()) <= 1.0
}
if (level.isNight || level.isRaining || entity.brain.getMemorySafely(CobblemonMemories.HAS_NECTAR).orElse(false)) return false
val optionalBlockPos = entity.brain.getMemorySafely(CobblemonMemories.NEARBY_FLOWER)
return optionalBlockPos.isPresent && Vec3.atCenterOf(optionalBlockPos.get()).distanceTo(entity.position()) <= 1.0
}
override fun canStillUse(level: ServerLevel, entity: LivingEntity, gameTime: Long): Boolean {
return checkExtraStartConditions(level, entity)
return checkExtraStartConditions(level, entity) && entity.brain.activeActivities.indexOf(
CobblemonActivities.POKEMON_POLLINATION) != -1
}
override fun start(level: ServerLevel, entity: LivingEntity, gameTime: Long) {
@@ -74,20 +78,44 @@ class PollinateFlowerTaskConfig : SingleTaskConfig {
}
override fun tick(level: ServerLevel, owner: LivingEntity, gameTime: Long) {
level.sendParticlesServer(
particleType = ParticleTypes.DRIPPING_HONEY,
position = owner.eyePosition,
particles = 3,
offset = Vec3.ZERO,
speed = 0.0
)
++successfulPollinationTicks
if (entity.random.nextFloat() < 0.05f && successfulPollinationTicks > this.lastSoundPlayedTick + 60) {
this.lastSoundPlayedTick = successfulPollinationTicks
entity.playSound(SoundEvents.BEE_POLLINATE, 1.0f, 1.0f)
}
val flowerPos = entity.brain.getMemorySafely(CobblemonMemories.NEARBY_FLOWER).orElse(null)
val bl = hoverPos == null || entity.position().distanceTo(hoverPos!!) <= 0.1
val bl3 = entity.random.nextInt(40) == 0
if (bl && bl3) {
// mimics the wriggling over a flower the vanilla bees do
if (hoverPos == null) {
hoverPos = flowerPos.bottomCenter.add(0.0, 0.4, 0.0)
}
if (flowerPos != null) {
hoverPos = flowerPos.bottomCenter.add(Vec3((entity.random.nextDouble() * 2.0 - 1.0) * (1.0/5.0), 0.3 + (entity.random.nextDouble() * 2.0 - 1.0) * (1.0/7.0), (entity.random.nextDouble() * 2.0 - 1.0) * (1.0/5.0)))
entity.getMoveControl()
.setWantedPosition(hoverPos!!.x(), hoverPos!!.y(), hoverPos!!.z(), 0.35)
entity.lookControl.setLookAt(flowerPos.bottomCenter.add(0.0,0.5,0.0))
}
} else if (!bl) {
entity.getMoveControl()
.setWantedPosition(hoverPos!!.x(), hoverPos!!.y(), hoverPos!!.z(), 0.35)
}
entity.lookControl.setLookAt(flowerPos.bottomCenter.add(0.0,0.5,0.0))
}
override fun stop(level: ServerLevel, entity: LivingEntity, gameTime: Long) {
val flowerStillThere = canStillUse(level, entity, gameTime)
if (flowerStillThere) {
entity.brain.setMemory(CobblemonMemories.POLLINATED, true)
if (successfulPollinationTicks > REQUIRED_SUCCESSFUL_POLLINATION_TICKS) {
entity.brain.setMemory(CobblemonMemories.HAS_NECTAR, true)
}
successfulPollinationTicks = 0
entity.brain.setMemoryWithExpiry(CobblemonMemories.PATH_TO_NEARBY_FLOWER_COOLDOWN, true, PATH_TO_FLOWER_COOLDOWN_TICKS)
}
}
}
@@ -97,7 +97,9 @@ interface TaskConfig {
cobblemonResource("go_to_land") to GoToLandTaskConfig::class.java,
cobblemonResource("path_to_hive") to PathToBeeHiveTaskConfig::class.java,
cobblemonResource("place_honey_in_hive") to PlaceHoneyInHiveTaskConfig::class.java,
cobblemonResource("place_honey_in_sacc_leaves") to PlaceHoneyInSaccLeavesTaskConfig::class.java,
cobblemonResource("path_to_flower") to PathToFlowerTaskConfig::class.java,
cobblemonResource("path_to_sacc_leaves") to PathToSaccLeavesTaskConfig::class.java,
cobblemonResource("pollinate_flower") to PollinateFlowerTaskConfig::class.java,
cobblemonResource("go_to_land") to GoToLandTaskConfig::class.java,
cobblemonResource("manage_flight_in_battle") to ManageFlightInBattleTaskConfig::class.java,
@@ -12,7 +12,6 @@ import com.bedrockk.molang.runtime.MoLangEnvironment
import com.bedrockk.molang.runtime.MoLangRuntime
import com.bedrockk.molang.runtime.MoParams
import com.bedrockk.molang.runtime.struct.ArrayStruct
import com.bedrockk.molang.runtime.struct.MoStruct
import com.bedrockk.molang.runtime.struct.QueryStruct
import com.bedrockk.molang.runtime.struct.VariableStruct
import com.bedrockk.molang.runtime.value.DoubleValue
@@ -40,7 +39,6 @@ import com.cobblemon.mod.common.api.moves.animations.ActionEffectContext
import com.cobblemon.mod.common.api.moves.animations.ActionEffects
import com.cobblemon.mod.common.api.moves.animations.NPCProvider
import com.cobblemon.mod.common.api.moves.animations.TargetsProvider
import com.cobblemon.mod.common.api.npc.NPCClass
import com.cobblemon.mod.common.api.npc.NPCClasses
import com.cobblemon.mod.common.api.npc.configuration.interaction.DialogueNPCInteractionConfiguration
import com.cobblemon.mod.common.api.npc.configuration.interaction.ScriptNPCInteractionConfiguration
@@ -57,7 +55,6 @@ import com.cobblemon.mod.common.api.pokemon.evolution.Evolution
import com.cobblemon.mod.common.api.pokemon.experience.SidemodExperienceSource
import com.cobblemon.mod.common.api.pokemon.moves.LearnsetQuery
import com.cobblemon.mod.common.api.pokemon.stats.Stats
import com.cobblemon.mod.common.api.riding.Rideable
import com.cobblemon.mod.common.api.riding.stats.RidingStat
import com.cobblemon.mod.common.api.scheduling.ClientTaskTracker
import com.cobblemon.mod.common.api.scheduling.Schedulable
@@ -137,7 +134,6 @@ import net.minecraft.world.entity.LightningBolt
import net.minecraft.world.entity.LivingEntity
import net.minecraft.world.entity.Mob
import net.minecraft.world.entity.PathfinderMob
import net.minecraft.world.entity.PlayerRideable
import net.minecraft.world.entity.TamableAnimal
import net.minecraft.world.entity.ai.behavior.BlockPosTracker
import net.minecraft.world.entity.ai.memory.MemoryModuleType
@@ -145,7 +141,6 @@ import net.minecraft.world.entity.ai.memory.MemoryStatus
import net.minecraft.world.entity.ai.memory.WalkTarget
import net.minecraft.world.entity.animal.Animal
import net.minecraft.world.entity.item.ItemEntity
import net.minecraft.world.entity.monster.Enemy
import net.minecraft.world.entity.monster.Monster
import net.minecraft.world.entity.player.Player
import net.minecraft.world.item.ItemStack
@@ -160,9 +155,6 @@ import net.minecraft.world.level.levelgen.Heightmap
import net.minecraft.world.level.pathfinder.PathType
import net.minecraft.world.phys.AABB
import net.minecraft.world.phys.Vec3
import kotlin.text.get
import kotlin.text.toInt
import kotlin.toString
/**
* Holds a bunch of useful MoLang trickery that can be used or extended in API
@@ -1185,16 +1177,28 @@ object MoLangFunctions {
return@put DoubleValue.ONE
}
map.put("has_memory_value") { params ->
val memoryTypes = params.params.map {
it.asString().asIdentifierDefaultingNamespace()
}.map(BuiltInRegistries.MEMORY_MODULE_TYPE::get)
return@put DoubleValue(memoryTypes.all { entity.brain.checkMemory(it, MemoryStatus.VALUE_PRESENT) })
for (param in params.params) {
if (!entity.hasMemoryFromString(param.asString())) {
return@put DoubleValue.ZERO
}
}
return@put DoubleValue.ONE
}
map.put("lacks_memory_value") { params ->
val memoryTypes = params.params.map {
it.asString().asIdentifierDefaultingNamespace()
}.map(BuiltInRegistries.MEMORY_MODULE_TYPE::get)
return@put DoubleValue(memoryTypes.none { entity.brain.checkMemory(it, MemoryStatus.VALUE_PRESENT) })
for (param in params.params) {
if (entity.hasMemoryFromString(param.asString())) {
return@put DoubleValue.ZERO
}
}
return@put DoubleValue.ONE
}
map.put("is_doing_activity") { params ->
for (param in params.params) {
if (entity.isDoingActivityFromString(param.asString())) {
return@put DoubleValue.ONE
}
}
return@put DoubleValue.ZERO
}
map.put("can_see") { params ->
val target = params.get<MoValue>(0)
@@ -1252,15 +1256,6 @@ object MoLangFunctions {
map.put("in_battle") { DoubleValue(npc.isInBattle()) }
map.put("battles") { ArrayStruct(npc.battleIds.mapNotNull { BattleRegistry.getBattle(it)?.struct }.mapIndexed { index, value -> "$index" to value }.toMap()) }
map.put("stop_battles") { _ -> npc.battleIds.forEach { BattleRegistry.getBattle(it)?.stop() } }
map.put("is_doing_activity") { params ->
val identifiers = params.params.map { it.asString().asIdentifierDefaultingNamespace(namespace = "minecraft") }
val activities = identifiers.mapNotNull { identifier -> BuiltInRegistries.ACTIVITY.get(identifier) }
if (activities.isNotEmpty()) {
return@put DoubleValue(activities.any { activity -> npc.brain.isActive(activity) })
} else {
return@put DoubleValue.ZERO
}
}
map.put("run_script_on_client") { params ->
val world = npc.level()
if (world is ServerLevel) {
@@ -1905,6 +1900,9 @@ object MoLangFunctions {
map.put("is_holding_item") { DoubleValue(!pokemonEntity.entityData.get(PokemonEntity.SHOWN_HELD_ITEM).let {
it.isEmpty || it.`is`(CobblemonItemTags.WEARABLE_HAT_ITEMS) || it.`is`(CobblemonItemTags.WEARABLE_FACE_ITEMS)
}) }
map.put("riding_style") {
StringValue(pokemonEntity.ifRidingAvailableSupply("") { behaviour, settings, state -> behaviour.getRidingStyle(settings, state).name })
}
map.put("is_wearing_hat") { DoubleValue(pokemonEntity.entityData.get(PokemonEntity.SHOWN_HELD_ITEM).`is`(CobblemonItemTags.WEARABLE_HAT_ITEMS)) }
map.put("is_wearing_face") { DoubleValue(pokemonEntity.entityData.get(PokemonEntity.SHOWN_HELD_ITEM).`is`(CobblemonItemTags.WEARABLE_FACE_ITEMS)) }
map.put("is_pastured") {
@@ -9,6 +9,7 @@
package com.cobblemon.mod.common.api.pokemon.aspect
import com.cobblemon.mod.common.CobblemonBlocks
import com.cobblemon.mod.common.api.ai.config.task.PollinateFlowerTaskConfig
import com.cobblemon.mod.common.api.spawning.influence.SaccharineLogSlatheredInfluence
import com.cobblemon.mod.common.api.spawning.prospecting.LurePokeSnackDetector
import com.cobblemon.mod.common.client.entity.PokemonClientDelegate
@@ -27,6 +28,7 @@ val aspectParticleMap: Map<String, ParticleData> = mapOf(
ParticleTypes.BLOCK,
CobblemonBlocks.POKE_SNACK.defaultBlockState()
), 0.05, 3),
PollinateFlowerTaskConfig.HAS_NECTAR_ASPECT to ParticleData.MinecraftParticle(ParticleTypes.FALLING_NECTAR, 0.075, 1)
)
sealed class ParticleData {
@@ -30,6 +30,6 @@ interface RidingBehaviourSettings: Encodable, Decodable {
fun calculate(stat: RidingStat, boostAmount: Float): Float {
val range = stats[stat] ?: return 0F
return range.first + boostAmount
return (range.first + boostAmount).coerceAtMost(range.endInclusive.toFloat())
}
}
@@ -19,6 +19,7 @@ import net.minecraft.world.entity.LivingEntity
import kotlin.collections.get
import net.minecraft.server.level.ServerPlayer
import net.minecraft.world.entity.player.Player
import kotlin.collections.get
/**
* Small wrapper around a RidingBehaviour to provide sane defaults in the event that the behaviour is not active.
@@ -109,12 +110,22 @@ class RidingController(
}
private fun canTransitionToLand(): Boolean {
if (entity.isInLiquid || entity.isUnderWater) return false
val hasLandController = entity.pokemon.riding.behaviours?.get(RidingStyle.LAND) != null
if (hasLandController && (entity.isInLiquid || entity.isUnderWater)) return false
if (!hasLandController && (entity.isEyeInFluid(FluidTags.WATER) || entity.isEyeInFluid(FluidTags.LAVA))) return false
return entity.onGround()
}
private fun canTransitionToLiquid(): Boolean {
return entity.isInLiquid || entity.isUnderWater
// If it has a liquid controller to transition to and it isn't currently an air controller then transition on
// touching water. If not then check for eyes in water. This allows fliers to fly closely above water and
// for walkers that don't have a liquid controller to be able to walk in not deep water
return if (entity.pokemon.riding.behaviours?.get(RidingStyle.LIQUID) != null && context?.style != RidingStyle.AIR) {
entity.isInLiquid || entity.isUnderWater
} else {
entity.isEyeInFluid(FluidTags.WATER) || entity.isEyeInFluid(FluidTags.LAVA)
}
}
private fun canTransitionToAir(driver: LivingEntity?): Boolean {
@@ -54,18 +54,7 @@ class BirdBehaviour : RidingBehaviour<BirdSettings, BirdState> {
get() = CobblemonRideSettings.bird
override fun isActive(settings: BirdSettings, state: BirdState, vehicle: PokemonEntity): Boolean {
return Shapes.create(vehicle.boundingBox).blockPositionsAsListRounded().any {
//Need to check other fluids
if (vehicle.isInWater || vehicle.isUnderWater) {
return@any false
}
//This might not actually work, depending on what the yPos actually is. yPos of the middle of the entity? the feet?
if (it.y.toDouble() == (vehicle.position().y)) {
val blockState = vehicle.level().getBlockState(it.below())
return@any !(!blockState.isAir && blockState.fluidState.isEmpty)
}
true
}
return !(vehicle.isInWater || vehicle.isUnderWater)
}
override fun pose(settings: BirdSettings, state: BirdState, vehicle: PokemonEntity): PoseType {
@@ -118,16 +107,24 @@ class BirdBehaviour : RidingBehaviour<BirdSettings, BirdState> {
driver: Player
) {
val stam = state.stamina.get()
val controller = (driver as OrientationControllable).orientationController
// Grab the boost time in seconds and convert to ticks. Then calculate the drain rate as inversely
// proportional to the number of ticks of boost thus making a full boost take x ticks
// in short: "Stamina drains slower at higher values and also replenishes slower"
val totalStam = vehicle.runtime.resolveDouble(settings.staminaExpr ?: globalBird.staminaExpr!!) * 20.0f
val stamDrainRate = (1.0f / totalStam).toFloat()
val horzMod = vehicle.runtime.resolveDouble(settings.stamDrainHorzMod ?: globalBird.stamDrainHorzMod!!)
val glideMod = vehicle.runtime.resolveFloat(settings.stamDrainPercRateGlide ?: globalBird.stamDrainPercRateGlide!!)
val stamDrainPerRateDive = vehicle.runtime.resolveDouble(settings.stamDrainPerRateDive ?: globalBird.stamDrainPerRateDive!!).coerceIn(0.0, 1.0) // Ensure its between 1 and 0 or things get weird
val newStam = if (driver.zza > 0.0) max(0.0f,stam - stamDrainRate)
else if (!state.gliding.get()) max(0.0f,stam - stamDrainRate * 0.5f) // if hovering half the stam drain
else min(1.0f,stam + stamDrainRate * 0.2f)
val stamDrainHorz = if(vehicle.deltaMovement.horizontalDistance() < 1e-6) horzMod else max(1.0 + ((horzMod - 1.0) * atan( vehicle.deltaMovement.y / vehicle.deltaMovement.horizontalDistance())), 1.0)
val diveAmount = sin(controller.pitch.toRadians()).coerceIn(0.0f, 1.0f)// from 0.0 -> 1.0 how steep is the current dive angle
val diveMod = ((1.0 - diveAmount) * ( 1.0 - stamDrainPerRateDive ) + stamDrainPerRateDive).toFloat() // smooth between 1.0 and the dive drain mod depending upon how dived the ride is
val stamDrainRate = (1.0f / totalStam).toFloat() * stamDrainHorz.toFloat()
val newStam = if (driver.deltaMovement.length() > 0.1) max(0.0f,stam - stamDrainRate) // Drain at normal fly rate
else if (state.gliding.get()) min(1.0f,stam - stamDrainRate * glideMod * diveMod) // Gliding drain logic
else max(0.0f,stam - stamDrainRate * 0.5f) // if hovering half the stam drain
state.stamina.set(newStam)
}
@@ -191,8 +188,8 @@ class BirdBehaviour : RidingBehaviour<BirdSettings, BirdState> {
newVelocity = newVelocity.normalize().scale(vehicle.deltaMovement.length())
}
//speed up and slow down based on input
if (driver.zza != 0.0f && state.stamina.get() > 0.0) {
// speed up and slow down based on input
if (driver.zza != 0.0f && state.stamina.get() > 0.0 && newVelocity.length() < glideTopSpeed) {
//make sure it can't exceed top speed
val forwardInput = when {
state.stamina.get() == 0.0f -> 0.0
@@ -347,9 +344,6 @@ class BirdBehaviour : RidingBehaviour<BirdSettings, BirdState> {
val maxPitchForce = maxPitchCorrectionRate.toFloat() / 40.0f
val pitchArrivalDeg = 45.0f
var desiredPitch = if (state.currUpsideDownForce.get() != 0.0) 90.0 else 0.0
// if (cos(controller.roll.toRadians()) < 0.0) {
// desiredPitch *= -1 // If not rolled over then flip the pitch force. There are better ways to do this :(
// }
if((state.rideVelocity.get().length() < 0.1 && controller.pitch < 0.0) || state.currUpsideDownForce.get() != 0.0) {
val arrivalInfluence = (min(pitchArrivalDeg,abs(Mth.wrapDegrees(desiredPitch.toFloat().angleDifference(controller.pitch)))) / pitchArrivalDeg)
@@ -510,11 +504,13 @@ class BirdBehaviour : RidingBehaviour<BirdSettings, BirdState> {
val currSpeed = state.rideVelocity.get().length()
val currHorzSpeed = state.rideVelocity.get().horizontalDistance()
val hoverSpeed = 0.1
val pitchDamping = abs(cos(controller.pitch.toRadians())).pow(2) // Helper value used when wanting to discard the influence of another value at steep pitches
// Yaw locally when at or below hoverSpeed but not when pitched up or rolled over
val yawDampen = abs(cos(controller.pitch.toRadians())).pow(2) * abs(cos(controller.roll.toRadians())).pow(2)
val localYaw = if (currHorzSpeed < hoverSpeed) xInput * (1 - sqrt(RidingBehaviour.scaleToRange(currHorzSpeed, hoverSpeed, topSpeed))).coerceIn(0.0, 1.0)
else 0.0 //xInput * 0.4 * cos(controller.roll.toRadians()).coerceIn(0.0f, 1.0f) * yawDampen
val globalYaw = xInput * (1 - sqrt(RidingBehaviour.scaleToRange(currHorzSpeed, hoverSpeed, topSpeed))).coerceIn(0.0, 1.0)
//xInput * 0.4 * cos(controller.roll.toRadians()).coerceIn(0.0f, 1.0f) * yawDampen
controller.applyGlobalYaw(globalYaw.toFloat())
// Pitch locally up or down depending upon a number of factors:
// - Reduce pitch substantially when rolled and in a steep yaw. This prevents the player from ignoring a slow handling stat
@@ -529,14 +525,18 @@ class BirdBehaviour : RidingBehaviour<BirdSettings, BirdState> {
// Apply a roll righting force when trying to pitch hard while rolled sideways. This nudges the player towards
// pitching globally
val pitchInfluencedRollCorrection = 0.0
val howRolledAmI = (( cos(controller.roll.toRadians()) - 1).coerceIn(-1.0f, 0.0f) * -2).coerceIn(0.0f, 0.7f) //Coerce into how much roll you want to let in in the deadzone
val inputInRolledDir = if (xInput.sign.toFloat() == controller.roll.sign) 1.0 else -cos(controller.roll.toRadians()).coerceIn(-1.0f, 0.0f).toDouble()
val rollDampen = (1 - howRolledAmI * abs(cos(controller.pitch.toRadians())).pow(2) * inputInRolledDir)
val howRolledAmI = (( cos(controller.roll.toRadians()) - 1).coerceIn(-1.0f, 0.0f) * -2) //Coerce into how much roll you want to let in in the deadzone
val isInputtingTowardsRoll = if ( xInput.sign == controller.roll.sign.toDouble()) 1.0 else 0.0
val inputInRolledDir = if (isInputtingTowardsRoll == 1.0) 1.0 else -cos(controller.roll.toRadians()).coerceIn(-1.0f, 0.0f).toDouble()
val rollDampen = (1 - howRolledAmI.coerceIn(0.0f, 0.7f) * pitchDamping * inputInRolledDir)
val rollForce = if (currHorzSpeed > hoverSpeed) xInput * sqrt(abs(RidingBehaviour.scaleToRange(currHorzSpeed, hoverSpeed, topSpeed)).coerceIn(0.0,1.0)) * rollDampen + pitchInfluencedRollCorrection
else 0.0
// When already rolled significantly part of the roll force should turn to local yaw force
val localYawForce = rollForce * abs(sin(controller.roll.toRadians())).pow(2) * pitchDamping * isInputtingTowardsRoll
//yaw, pitch, roll
return Vec3(localYaw, localPitch, rollForce)
return Vec3(localYawForce, localPitch, rollForce)
}
@@ -584,11 +584,11 @@ class BirdBehaviour : RidingBehaviour<BirdSettings, BirdState> {
driver: Player
): Float {
val topSpeed = vehicle.runtime.resolveDouble(settings.speedExpr ?: globalBird.speedExpr!!) / 20.0
val glideTopSpeed = topSpeed * vehicle.runtime.resolveDouble(settings.glideSpeedExpr ?: globalBird.glideSpeedExpr!!)
val currSpeed = state.rideVelocity.get().length()
// Must I ensure that topspeed is greater than minimum?
val normalizedGlideSpeed = RidingBehaviour.scaleToRange(currSpeed, topSpeed, glideTopSpeed)
val speedOverTopSpeed = max( 0.0, currSpeed - topSpeed)
val normalizedGlideSpeed = RidingBehaviour.scaleToRange(speedOverTopSpeed, 0.0, 0.3)
// Only ever want the fov change to be a max of 0.2 and for it to have non linear scaling.
return 1.0f + normalizedGlideSpeed.pow(2).toFloat() * 0.2f
@@ -692,6 +692,22 @@ class BirdSettings : RidingBehaviourSettings {
var glideSpeedExpr: Expression? = null
private set
// debuff to stamina drain (increases stamina drain?) depending on how horizontal you're looking (so just drain more when climbing in altitude)
// So for the base 1.5: If looking straight up and holding forward you drain at 150 percent the rate you would if
// you were horizontal.
var stamDrainHorzMod: Expression? = null
private set
// long ass variable name
// Percent of stamina drain during glide (percent of normal drain rate) So base is 25 percent. (change to 0 if you want no drain or negative if you want regen)
var stamDrainPercRateGlide: Expression? = null
private set
// Percent of stamina drain as a factor of how hard you're diving. So if its zero then at full dive you drain no stam.
// This stacks with `stamDrainPercRateGlide`
// This is coerced between 1 and 0 or things would get weird.
var stamDrainPerRateDive: Expression? = null
private set
var rideSounds: RideSoundSettingsList = RideSoundSettingsList()
override fun encode(buffer: RegistryFriendlyByteBuf) {
@@ -706,6 +722,9 @@ class BirdSettings : RidingBehaviourSettings {
buffer.writeNullableExpression(speedExpr)
buffer.writeNullableExpression(accelerationExpr)
buffer.writeNullableExpression(staminaExpr)
buffer.writeNullableExpression(stamDrainHorzMod)
buffer.writeNullableExpression(stamDrainPercRateGlide)
buffer.writeNullableExpression(stamDrainPerRateDive)
buffer.writeNullableExpression(timeToRollCorrect)
}
@@ -721,6 +740,9 @@ class BirdSettings : RidingBehaviourSettings {
speedExpr = buffer.readNullableExpression()
accelerationExpr = buffer.readNullableExpression()
staminaExpr = buffer.readNullableExpression()
stamDrainHorzMod = buffer.readNullableExpression()
stamDrainPercRateGlide = buffer.readNullableExpression()
stamDrainPerRateDive = buffer.readNullableExpression()
timeToRollCorrect = buffer.readNullableExpression()
}
}
@@ -103,12 +103,12 @@ class BoatBehaviour : RidingBehaviour<BoatSettings, BoatState> {
if (!state.isVehicleSprinting.get()) {
if (state.staminaBuffer.get() >= 20) {
val staminaIncrease = vehicle.runtime.resolveDouble(settings.staminaIncreaseExpr ?: globalBoat.staminaIncreaseExpr!!)
state.stamina.set(min(1.0f, state.stamina.get() + 0.01f * staminaIncrease.toFloat()))
val staminaIncrease = (1.0f / vehicle.runtime.resolveDouble(settings.stamReplenishTimeSeconds ?: globalBoat.stamReplenishTimeSeconds!!) ).toFloat() / 20.0f
state.stamina.set(min(1.0f, state.stamina.get() + staminaIncrease))
}
}
else if (abs(state.rideVelocity.get().z) > 0.1 && state.isVehicleSprinting.get()) {
consumeStamina(vehicle, driver, settings, state, 0.01f)
consumeStamina(vehicle, driver, settings, state)
}
state.staminaBuffer.set(state.staminaBuffer.get() + 1)
super.tick(settings, state, vehicle, driver, input)
@@ -219,12 +219,12 @@ class BoatBehaviour : RidingBehaviour<BoatSettings, BoatState> {
return state.stamina.get() != 0f
}
private fun consumeStamina(vehicle: PokemonEntity, driver: Player, settings: BoatSettings, state: BoatState, drain: Float) {
val staminaModifier = vehicle.runtime.resolveFloat(settings.staminaDecreaseExpr ?: globalBoat.staminaDecreaseExpr!!)
if (staminaModifier == 0F) {
private fun consumeStamina(vehicle: PokemonEntity, driver: Player, settings: BoatSettings, state: BoatState) {
if (vehicle.runtime.resolveBoolean(settings.infiniteStamina ?: globalBoat.infiniteStamina!!)) {
return
}
state.stamina.set(max(0f, state.stamina.get() - drain / staminaModifier))
val stamDrainRate = (1.0f / vehicle.runtime.resolveDouble(settings.staminaExpr ?: globalBoat.staminaExpr!!)).toFloat() / 20.0f
state.stamina.set(max(0f, state.stamina.get() - stamDrainRate))
if (state.stamina.get() == 0f) {
state.isVehicleSprinting.set(false)
driver.isSprinting = false
@@ -404,16 +404,19 @@ class BoatSettings : RidingBehaviourSettings {
override val stats = mutableMapOf<RidingStat, IntRange>()
var rideSounds: RideSoundSettingsList = RideSoundSettingsList()
var infiniteStamina: Expression? = null
private set
var terminalVelocity: Expression? = null
private set
var rotatePokemonHead: Expression? = null
private set
var staminaIncreaseExpr: Expression? = null
var stamReplenishTimeSeconds: Expression? = null
private set
var staminaDecreaseExpr: Expression? = null
var staminaExpr: Expression? = null
private set
var rotationSpeedModifierExpr: Expression? = null
@@ -438,10 +441,11 @@ class BoatSettings : RidingBehaviourSettings {
override fun encode(buffer: RegistryFriendlyByteBuf) {
buffer.writeRidingStats(stats)
rideSounds.encode(buffer)
buffer.writeNullableExpression(infiniteStamina)
buffer.writeNullableExpression(terminalVelocity)
buffer.writeNullableExpression(rotatePokemonHead)
buffer.writeNullableExpression(staminaIncreaseExpr)
buffer.writeNullableExpression(staminaDecreaseExpr)
buffer.writeNullableExpression(stamReplenishTimeSeconds)
buffer.writeNullableExpression(staminaExpr)
buffer.writeNullableExpression(rotationSpeedModifierExpr)
buffer.writeNullableExpression(jumpStrengthExpr)
buffer.writeNullableExpression(speedExpr)
@@ -454,10 +458,11 @@ class BoatSettings : RidingBehaviourSettings {
override fun decode(buffer: RegistryFriendlyByteBuf) {
stats.putAll(buffer.readRidingStats())
rideSounds = RideSoundSettingsList.decode(buffer)
infiniteStamina = buffer.readNullableExpression()
terminalVelocity = buffer.readNullableExpression()
rotatePokemonHead = buffer.readNullableExpression()
staminaIncreaseExpr = buffer.readNullableExpression()
staminaDecreaseExpr = buffer.readNullableExpression()
stamReplenishTimeSeconds = buffer.readNullableExpression()
staminaExpr = buffer.readNullableExpression()
rotationSpeedModifierExpr = buffer.readNullableExpression()
jumpStrengthExpr = buffer.readNullableExpression()
speedExpr = buffer.readNullableExpression()
@@ -603,6 +603,7 @@ class DolphinSettings : RidingBehaviourSettings {
buffer.writeNullableExpression(canJump)
buffer.writeNullableExpression(reverseDriveFactor)
buffer.writeNullableExpression(strafeFactor)
buffer.writeNullableExpression(timeToRollCorrect)
buffer.writeNullableExpression(jumpExpr)
buffer.writeNullableExpression(handlingExpr)
buffer.writeNullableExpression(horizontalPitchExpr)
@@ -619,6 +620,7 @@ class DolphinSettings : RidingBehaviourSettings {
canJump = buffer.readNullableExpression()
reverseDriveFactor = buffer.readNullableExpression()
strafeFactor = buffer.readNullableExpression()
timeToRollCorrect = buffer.readNullableExpression()
jumpExpr = buffer.readNullableExpression()
handlingExpr = buffer.readNullableExpression()
horizontalPitchExpr = buffer.readNullableExpression()
@@ -51,12 +51,13 @@ import net.minecraft.world.phys.Vec3
import net.minecraft.world.phys.shapes.CollisionContext
import net.minecraft.world.phys.shapes.Shapes
import net.minecraft.world.phys.shapes.VoxelShape
import kotlin.math.floor
import kotlin.random.Random
class PokeSnackBlock(settings: Properties, val isLure: Boolean): BaseEntityBlock(settings) {
companion object {
val MAX_BITES = 8
val CAKE_HEIGHT = 0.4375
const val MAX_BITES = 8
const val CAKE_HEIGHT = 0.4375
val CANDLE_PARTICLE_POSITION = Vec3(0.5, CAKE_HEIGHT + 0.5, 0.5)
@@ -135,6 +136,7 @@ class PokeSnackBlock(settings: Properties, val isLure: Boolean): BaseEntityBlock
if (hasCandle(state)) {
return Shapes.or(SHAPES[state.getValue(BITES)], CANDLE_SHAPE)
}
return SHAPES[state.getValue(BITES)]
}
@@ -294,15 +296,27 @@ class PokeSnackBlock(settings: Properties, val isLure: Boolean): BaseEntityBlock
fun eat(level: Level, pos: BlockPos, state: BlockState, player: Player?) {
val bites = state.getValue(BITES) as Int
if (bites < MAX_BITES) {
level.setBlock(pos, state.setValue(BITES, bites + 1) as BlockState, UPDATE_ALL)
} else {
val newBites =
if (isLure) {
val pokeSnackBlockEntity = level.getBlockEntity(pos) as PokeSnackBlockEntity? ?: return
pokeSnackBlockEntity.amountSpawned += 1
floor(pokeSnackBlockEntity.amountSpawned / PokeSnackBlockEntity.SPAWNS_PER_BITE.toDouble()).toInt()
} else {
bites + 1
}
if (newBites > MAX_BITES) {
dropCandle(level, pos, state, player)
level.removeBlock(pos, false)
level.removeBlockEntity(pos)
} else {
level.setBlock(pos, state.setValue(BITES, newBites) as BlockState, UPDATE_ALL)
}
level.playSound(null, player?.blockPosition() ?: pos, SoundEvents.GENERIC_EAT, if (player != null) SoundSource.PLAYERS else SoundSource.NEUTRAL)
spawnEatParticles(level, pos)
player?.let {
level.gameEvent(it, GameEvent.BLOCK_DESTROY, pos)
}
@@ -8,6 +8,8 @@
package com.cobblemon.mod.common.block
import com.bedrockk.molang.runtime.value.DoubleValue
import com.cobblemon.mod.common.entity.MoLangScriptingEntity
import net.minecraft.core.BlockPos
import net.minecraft.core.Direction
import net.minecraft.core.dispenser.DispenseItemBehavior
@@ -25,6 +27,7 @@ import net.minecraft.world.entity.player.Player
import net.minecraft.world.item.Item
import net.minecraft.world.item.ItemStack
import net.minecraft.world.item.Items
import net.minecraft.world.level.BlockGetter
import net.minecraft.world.level.Level
import net.minecraft.world.level.LevelAccessor
import net.minecraft.world.level.block.Block
@@ -40,6 +43,9 @@ import net.minecraft.world.level.material.FluidState
import net.minecraft.world.level.material.Fluids
import net.minecraft.world.level.pathfinder.PathComputationType
import net.minecraft.world.phys.BlockHitResult
import net.minecraft.world.phys.shapes.CollisionContext
import net.minecraft.world.phys.shapes.EntityCollisionContext
import net.minecraft.world.phys.shapes.Shapes
import net.minecraft.world.phys.shapes.VoxelShape
class SaccharineLeafBlock(settings: Properties) : LeavesBlock(settings) {
@@ -90,7 +96,13 @@ class SaccharineLeafBlock(settings: Properties) : LeavesBlock(settings) {
}
}
if (!added) Containers.dropItemStack(level, source.pos.x.toDouble(), source.pos.y.toDouble(), source.pos.z.toDouble(), outputStack)
if (!added) Containers.dropItemStack(
level,
source.pos.x.toDouble(),
source.pos.y.toDouble(),
source.pos.z.toDouble(),
outputStack
)
}
}
stack
@@ -108,7 +120,27 @@ class SaccharineLeafBlock(settings: Properties) : LeavesBlock(settings) {
)
}
override fun isRandomlyTicking(state: BlockState): Boolean = !state.getValue(PERSISTENT) && state.getValue(DISTANCE) > 6
override fun getCollisionShape(
state: BlockState,
level: BlockGetter,
pos: BlockPos,
context: CollisionContext
): VoxelShape? {
if (context is EntityCollisionContext) {
val entity = context.entity
if (entity != null
&& entity is MoLangScriptingEntity
&& entity.config.map.getOrDefault("can_path_through_sacc_leaves", DoubleValue.ZERO).asDouble() == 1.0
) {
return Shapes.empty()
}
}
return super.getCollisionShape(state, level, pos, context)
}
override fun isRandomlyTicking(state: BlockState): Boolean =
true //!state.getValue(PERSISTENT) && state.getValue(DISTANCE) > 6
override fun randomTick(state: BlockState, world: ServerLevel, pos: BlockPos, random: RandomSource) {
val currentAge = state.getValue(AGE)
@@ -123,8 +155,8 @@ class SaccharineLeafBlock(settings: Properties) : LeavesBlock(settings) {
} else if (belowState.block is SaccharineLeafBlock) {
val belowAge = belowState.getValue(AGE)
if (belowAge < MAX_AGE) {
changeAge(state, -1)
changeAge(belowState, 1)
world.setBlock(pos, changeAge(state, -1), UPDATE_CLIENTS)
world.setBlock(belowPos, changeAge(belowState, 1), UPDATE_CLIENTS)
}
break
} else {
@@ -217,7 +249,15 @@ class SaccharineLeafBlock(settings: Properties) : LeavesBlock(settings) {
override fun isPathfindable(state: BlockState, type: PathComputationType): Boolean = false
override fun useItemOn(stack: ItemStack, state: BlockState, level: Level, pos: BlockPos, player: Player, hand: InteractionHand, hit: BlockHitResult): ItemInteractionResult {
override fun useItemOn(
stack: ItemStack,
state: BlockState,
level: Level,
pos: BlockPos,
player: Player,
hand: InteractionHand,
hit: BlockHitResult
): ItemInteractionResult {
if (!state.getValue(WATERLOGGED)) {
val itemStack = player.getItemInHand(hand)
val isGlassBottle = itemStack.`is`(Items.GLASS_BOTTLE)
@@ -134,6 +134,8 @@ class CampfireBlockEntity(pos: BlockPos, state: BlockState) : BaseContainerBlock
campfireBlockEntity.particleCooldown = 20
}
campfireBlockEntity.time++
}
fun serverTick(level: Level, pos: BlockPos, state: BlockState, campfireBlockEntity: CampfireBlockEntity) {
@@ -237,6 +239,7 @@ class CampfireBlockEntity(pos: BlockPos, state: BlockState) : BaseContainerBlock
private var particleCooldown: Int = 0
var brothColor: Int = BASE_BROTH_COLOR
var bubbleColor: Int = BASE_BROTH_BUBBLE_COLOR
var time: Int = 0
var dataAccess: ContainerData = object : ContainerData {
override fun get(index: Int): Int {
@@ -28,6 +28,11 @@ import kotlin.collections.orEmpty
open class PokeSnackBlockEntity(pos: BlockPos, state: BlockState) : TintBlockEntity(CobblemonBlockEntities.POKE_SNACK, pos, state) {
companion object {
const val SPAWNS_PER_BITE = 4
}
var amountSpawned: Int = 0
var flavourComponent: FlavourComponent? = null
var baitEffectsComponent: BaitEffectsComponent? = null
var ingredientComponent: IngredientComponent? = null
@@ -54,12 +59,19 @@ open class PokeSnackBlockEntity(pos: BlockPos, state: BlockState) : TintBlockEnt
fun toItemStack(): ItemStack {
val stack = ItemStack(this.blockState.block)
if (isLure() && baitEffectsComponent != null) {
stack.set(CobblemonItemComponents.BAIT_EFFECTS, baitEffectsComponent)
}
if (flavourComponent != null) {
stack.set(CobblemonItemComponents.FLAVOUR, flavourComponent)
}
if (ingredientComponent != null) {
stack.set(CobblemonItemComponents.INGREDIENT, ingredientComponent)
}
return stack
}
@@ -73,6 +85,8 @@ open class PokeSnackBlockEntity(pos: BlockPos, state: BlockState) : TintBlockEnt
override fun saveAdditional(tag: CompoundTag, registries: HolderLookup.Provider) {
super.saveAdditional(tag, registries)
tag.putInt(DataKeys.AMOUNT_SPAWNED, amountSpawned)
flavourComponent?.let { component ->
CobblemonItemComponents.FLAVOUR.codec()!!
.encodeStart(NbtOps.INSTANCE, component)
@@ -104,6 +118,8 @@ open class PokeSnackBlockEntity(pos: BlockPos, state: BlockState) : TintBlockEnt
override fun loadAdditional(tag: CompoundTag, registries: HolderLookup.Provider) {
super.loadAdditional(tag, registries)
amountSpawned = tag.getInt(DataKeys.AMOUNT_SPAWNED)
if (tag.contains(DataKeys.FLAVOUR)) {
CobblemonItemComponents.FLAVOUR.codec()
?.parse(NbtOps.INSTANCE, tag.get(DataKeys.FLAVOUR))
@@ -69,14 +69,11 @@ import com.cobblemon.mod.common.client.tooltips.RecipeSeasoningAbsorbtionTooltip
import com.cobblemon.mod.common.client.tooltips.SeasoningTooltipGenerator
import com.cobblemon.mod.common.client.tooltips.TooltipManager
import com.cobblemon.mod.common.client.trade.ClientTrade
import com.cobblemon.mod.common.debug.RidingDebugRenderer
import com.cobblemon.mod.common.entity.boat.CobblemonBoatType
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity
import com.cobblemon.mod.common.platform.events.PlatformEvents
import com.cobblemon.mod.common.pokedex.scanner.PokedexUsageContext
import com.cobblemon.mod.common.util.cobblemonResource
import com.cobblemon.mod.common.util.isLookingAt
import io.github.flemmli97.debugutils.api.RegisterDebugRenderers
import net.minecraft.client.Minecraft
import net.minecraft.client.color.block.BlockColor
import net.minecraft.client.gui.GuiGraphics
@@ -196,11 +193,6 @@ object CobblemonClient {
}
ClientPlayerIcon.onTick()
}
val debugId = cobblemonResource("riding")
RegisterDebugRenderers.registerCustomDebugRenderer(debugId, RidingDebugRenderer)
RegisterDebugRenderers.registerServerToggle(debugId)
RegisterDebugRenderers.registerClientHandler(debugId) { RidingDebugRenderer.clientHandler(it) }
}
private fun registerTooltipManagers() {
@@ -45,6 +45,7 @@ class CobblemonConfigScreen(
val clonedConfig = Cobblemon.config.clone()
val defaultConfig = CobblemonConfig()
val hideServerConfigs = Minecraft.getInstance().currentServer != null && !Minecraft.getInstance().isLocalServer
private lateinit var layout: HeaderAndFooterLayout
private lateinit var searchEdit: EditBox
@@ -21,6 +21,7 @@ import com.cobblemon.mod.common.client.render.drawScaledText
import com.cobblemon.mod.common.config.Category
import com.cobblemon.mod.common.config.CobblemonConfig
import com.cobblemon.mod.common.config.CobblemonConfigField
import com.cobblemon.mod.common.config.CobblemonConfigField.CobblemonConfigSide.SERVER
import com.cobblemon.mod.common.util.asTranslated
import net.minecraft.SharedConstants
import net.minecraft.client.Minecraft
@@ -32,6 +33,7 @@ import net.minecraft.client.gui.narration.NarratableEntry
import kotlin.math.min
import kotlin.reflect.KClass
import kotlin.reflect.KMutableProperty1
import kotlin.reflect.full.findAnnotation
import kotlin.reflect.full.memberProperties
import kotlin.reflect.jvm.javaField
@@ -62,6 +64,11 @@ class CobblemonConfigVariableList(
return@map null
}
val fieldAnnotation = property.javaField!!.getAnnotation(CobblemonConfigField::class.java)
if (parent.hideServerConfigs && fieldAnnotation.side == SERVER) {
return@map null
}
val entry: CobblemonConfigVariable? =
when (val classifier = property.returnType.classifier) {
String::class -> CobblemonConfigStringVariable(this, property as KMutableProperty1<out CobblemonConfig, String>)
@@ -10,6 +10,7 @@ package com.cobblemon.mod.common.client.gui.debug.riding
import com.bedrockk.molang.Expression
import com.cobblemon.mod.common.CobblemonNetwork
import com.cobblemon.mod.common.CobblemonRideSettings
import com.cobblemon.mod.common.api.riding.RidingStyle
import com.cobblemon.mod.common.api.riding.behaviour.RidingBehaviourSettings
import com.cobblemon.mod.common.api.text.text
@@ -89,7 +90,7 @@ class RideSettingsEditorGUI(val parentScreen: Screen, val vehicle: PokemonEntity
for (variable in expressionVariables) {
val (name, value) = variable
val editBox = EditBox(this.minecraft!!.font, 110, currentY, 300, 20, name.text())
val editBox = EditBox(this.minecraft!!.font, 130, currentY, 300, 20, name.text())
editBox.setMaxLength(256)
editBox.value = value
@@ -158,6 +159,10 @@ class RideSettingsEditorGUI(val parentScreen: Screen, val vehicle: PokemonEntity
val clazz = settings.javaClass
val fields = clazz.declaredFields
val gsField = CobblemonRideSettings.javaClass.declaredFields.firstOrNull { it.type == clazz }
gsField?.isAccessible = true
val controllerGlobalSettings = gsField?.get(CobblemonRideSettings) as? RidingBehaviourSettings?
// Iterate through all expression fields and return the list of those that
// aer expressions
return fields.mapNotNull { field ->
@@ -165,10 +170,18 @@ class RideSettingsEditorGUI(val parentScreen: Screen, val vehicle: PokemonEntity
field.isAccessible = true // Make private fields accessible
val name = field.name
// Get the value, cast it, and call .getString() on it
val value = (field.get(settings) as Expression).getString()
if (field.get(settings) != null) {
val value = (field.get(settings) as Expression).getString()
// Create the pair and return it for the list
name to value
// Create the pair and return it for the list
name to value
} else {
// If the settings field is null then check for a global setting
val value = getMatchingGlobalSettingsValue(settings, controllerGlobalSettings, name) ?: "novalue"
name to value
}
} else {
// If it's not an Expression (they all honestly should be if being used by the
// behaviour in question) then ignore
@@ -176,4 +189,13 @@ class RideSettingsEditorGUI(val parentScreen: Screen, val vehicle: PokemonEntity
}
}
}
private fun getMatchingGlobalSettingsValue(settings: RidingBehaviourSettings, globalSettings: RidingBehaviourSettings?, fieldName: String): String? {
if (globalSettings == null) return null
val gssField = globalSettings.javaClass.declaredFields.firstOrNull {
it.name == fieldName
}
gssField?.isAccessible = true
return (gssField?.get(globalSettings) as? Expression)?.getString()
}
}
@@ -25,6 +25,8 @@ import com.cobblemon.mod.common.client.gui.summary.widgets.SoundlessWidget
import com.cobblemon.mod.common.client.gui.summary.widgets.screens.stats.features.FriendshipFeatureRenderer
import com.cobblemon.mod.common.client.gui.summary.widgets.screens.stats.features.FullnessFeatureRenderer
import com.cobblemon.mod.common.client.render.drawScaledText
import com.cobblemon.mod.common.pokemon.EVs
import com.cobblemon.mod.common.pokemon.IVs
import com.cobblemon.mod.common.pokemon.Pokemon
import com.cobblemon.mod.common.util.cobblemonResource
import com.cobblemon.mod.common.util.lang
@@ -74,6 +76,7 @@ class StatWidget(
private val statsBaseResource = cobblemonResource("textures/gui/summary/summary_stats_chart_base.png")
private val statsChartResource = cobblemonResource("textures/gui/summary/summary_stats_chart.png")
private val statsChartPentagonResource = cobblemonResource("textures/gui/summary/summary_stats_chart_pentagon.png")
private val statsChartPentagonHighlightResource = cobblemonResource("textures/gui/summary/summary_stats_chart_pentagon_highlight.png")
private val statsOtherBaseResource = cobblemonResource("textures/gui/summary/summary_stats_other_base.png")
private val statsOtherSidebarsResource = cobblemonResource("textures/gui/summary/summary_stats_other_sidebars.png")
private val statsOtherSidebarArrowLeft = cobblemonResource("textures/gui/summary/summary_stats_other_sidebar_arrow_left.png")
@@ -290,33 +293,34 @@ class StatWidget(
}
} else {
if (renderPentagonStats) {
blitk(
matrixStack = matrices,
texture = statsChartPentagonResource,
x= (x + 20.5) / SCALE,
y = (y + 22) / SCALE,
width = 186,
height = 176,
scale = SCALE
)
pokemon.form.riding.behaviours?.let {
val behaviours = it.entries.toList()
val selectedBehaviour = behaviours[rideBehaviourIndex]
val canSwitchStyle = behaviours.size > 1 && centerHovered(pMouseX, pMouseY)
blitk(
matrixStack = matrices,
texture = if (canSwitchStyle) statsChartPentagonHighlightResource else statsChartPentagonResource,
x= (x + 20.5) / SCALE,
y = (y + 22) / SCALE,
width = 186,
height = 176,
scale = SCALE
)
val pentagonColour = when (selectedBehaviour.key) {
RidingStyle.AIR -> {
if (behaviours.size > 1 && centerHovered(pMouseX, pMouseY))
if (canSwitchStyle)
Vector3f(70F/255F, 235F/225F, 195F/255F)
else Vector3f(40F/255F, 205F/255F, 165F/255F)
}
RidingStyle.LIQUID -> {
if (behaviours.size > 1 && centerHovered(pMouseX, pMouseY))
if (canSwitchStyle)
Vector3f(95F/255F, 165F/255F, 1F)
else Vector3f(65F/255F, 135F/255F, 1F)
}
else -> {
if (behaviours.size > 1 && centerHovered(pMouseX, pMouseY))
if (canSwitchStyle)
Vector3f(1F, 195F/255F, 30F/255F)
else Vector3f(1F, 165F/255F, 0F)
}
@@ -353,8 +357,8 @@ class StatWidget(
context = context,
labels = RidingStat.entries.toList().map { stat ->
if (statLabelsHovered(pentagonVerticesOffset, pMouseX, pMouseY))
"${floor((pokemon.getRideStat(selectedBehaviour.key, stat) / (selectedBehaviour.value.stats[stat]?.endInclusive ?: 1)) * 100)}%".text()
else floor(pokemon.getRideStat(selectedBehaviour.key, stat)).toString().text()
"+${floor(pokemon.getRideBoost(stat) / pokemon.getMaxRideBoost(stat) * 100)}%".text()
else floor(pokemon.getRideStat(selectedBehaviour.key, stat)).toString().text()
},
verticesOffset = pentagonVerticesOffset,
offsetY = 5.5
@@ -389,7 +393,7 @@ class StatWidget(
colour = Vector3f(216F/255, 100F/255, 1F)
)
EV -> drawStatPolygon(
statLabels.values.map { (pokemon.evs[it]?.toFloat() ?: 0F) / 252F },
statLabels.values.map { (pokemon.evs[it]?.toFloat() ?: 0F) / EVs.MAX_STAT_VALUE.toFloat() },
colour = Vector3f(1F, 1F, 100F/255F)
)
}
@@ -403,9 +407,9 @@ class StatWidget(
"${
if (pokemon.ivs.isHyperTrained(stat.value)) "${pokemon.ivs[stat.value]} (${pokemon.ivs.hyperTrainedIVs[stat.value]})"
else pokemon.ivs[stat.value].toString()
}/31".text()
}/${IVs.MAX_VALUE}".text()
}
EV -> "${pokemon.evs.getOrDefault(stat.value)}/252".text()
EV -> "${pokemon.evs.getOrDefault(stat.value)}/${EVs.MAX_STAT_VALUE}".text()
else -> stat.key
}
} else { stat.key }
@@ -490,14 +494,14 @@ class StatWidget(
STATS -> (if (stat == Stats.HP) "${pokemon.currentHealth} / ${pokemon.maxHealth}" else pokemon.getStat(stat).toString()).text()
IV -> {
(if (asPercent) {
"${floor((((if (pokemon.ivs.isHyperTrained(stat)) pokemon.ivs.hyperTrainedIVs[stat] else pokemon.ivs[stat]) ?: 0) / 31.0) * 100)}%"
"${floor((((if (pokemon.ivs.isHyperTrained(stat)) pokemon.ivs.hyperTrainedIVs[stat] else pokemon.ivs[stat]) ?: 0) / IVs.MAX_VALUE.toDouble()) * 100)}%"
} else {
if (pokemon.ivs.isHyperTrained(stat)) "${pokemon.ivs[stat]} (${pokemon.ivs.hyperTrainedIVs[stat]})"
else pokemon.ivs[stat].toString()
}).text()
}
EV -> {
(if (asPercent) "${floor((pokemon.evs.getOrDefault(stat) / 252.0) * 100)}%"
(if (asPercent) "${floor((pokemon.evs.getOrDefault(stat) / EVs.MAX_STAT_VALUE.toDouble()) * 100)}%"
else pokemon.evs.getOrDefault(stat).toString()).text()
}
else -> "0".text()
@@ -558,7 +562,9 @@ class StatWidget(
}
private fun centerHovered(pMouseX: Number, pMouseY: Number): Boolean {
return (pMouseX.toInt() in (x + 44)..(x + 90)) && (pMouseY.toInt() in (y + 47)..(y + 93))
val centerX = x + (WIDTH / 2)
val centerY = y + (HEIGHT / 2)
return (pMouseX.toInt() in (centerX - 30)..(centerX + 30)) && (pMouseY.toInt() in (centerY - 30)..(centerY + 30))
}
private fun statLabelsHovered(labelOffsets: List<Pair<Double, Double>>, mouseX: Int, mouseY: Int): Boolean {
@@ -9,13 +9,12 @@
package com.cobblemon.mod.common.client.net.data
import com.cobblemon.mod.common.CobblemonRideSettings
import com.cobblemon.mod.common.api.net.ServerNetworkPacketHandler
import com.cobblemon.mod.common.api.net.ClientNetworkPacketHandler
import com.cobblemon.mod.common.net.messages.client.data.RideSettingsSyncPacket
import net.minecraft.server.MinecraftServer
import net.minecraft.server.level.ServerPlayer
import net.minecraft.client.Minecraft
object RideSettingsSyncHandler : ServerNetworkPacketHandler<RideSettingsSyncPacket> {
override fun handle(packet: RideSettingsSyncPacket, server: MinecraftServer, player: ServerPlayer) {
object RideSettingsSyncHandler : ClientNetworkPacketHandler<RideSettingsSyncPacket> {
override fun handle(packet: RideSettingsSyncPacket, client: Minecraft) {
CobblemonRideSettings.bird = packet.bird
CobblemonRideSettings.glider = packet.glider
CobblemonRideSettings.helicopter = packet.helicopter
@@ -125,7 +125,7 @@ class CampfireBlockEntityRenderer(ctx: BlockEntityRendererProvider.Context) : Bl
) {
val seasonings = blockEntity.getSeasonings()
val gameTime = (blockEntity.level?.gameTime ?: 0) + tickDelta
val gameTime = blockEntity.time + tickDelta
val rotationAngle = (gameTime * ROTATION_SPEED) % 360
seasonings.forEachIndexed { index, seasoning ->
@@ -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.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
import net.minecraft.client.model.geom.ModelPart
import net.minecraft.world.phys.Vec3
class BeheeyemModel (root: ModelPart) : PokemonPosableModel(root), HeadedFrame, BipedFrame, BimanualFrame {
override val rootPart = root.registerChildWithAllChildren("beheeyem")
override val head = getPart("head")
override val rightArm = getPart("arm_right")
override val leftArm = getPart("arm_left")
override val rightLeg = getPart("leg_right")
override val leftLeg = getPart("leg_left")
override var portraitScale = 3.0F
override var portraitTranslation = Vec3(-0.34, -0.8, 0.0)
override var profileScale = 0.8F
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("beheeyem", "cry") }
override fun registerPoses() {
sleep = registerPose(
poseType = PoseType.SLEEP,
animations = arrayOf(bedrock("beheeyem", "sleep"))
)
standing = registerPose(
poseName = "standing",
poseTypes = PoseType.STATIONARY_POSES + PoseType.UI_POSES,
transformTicks = 10,
animations = arrayOf(
singleBoneLook(),
bedrock("beheeyem", "ground_idle")
)
)
walk = registerPose(
poseName = "walk",
poseTypes = PoseType.MOVING_POSES,
transformTicks = 5,
animations = arrayOf(
singleBoneLook(),
bedrock("beheeyem", "ground_walk")
)
)
}
}
@@ -1,94 +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.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 ChandelureModel (root: ModelPart) : PokemonPosableModel(root), HeadedFrame {
override val rootPart = root.registerChildWithAllChildren("chandelure")
override val head = getPart("head")
override var portraitScale = 1.85F
override var portraitTranslation = Vec3(-0.3, -0.19, 0.0)
override var profileScale = 0.81F
override var profileTranslation = Vec3(0.0, 0.68, 0.0)
lateinit var standing: CobblemonPose
lateinit var walk: CobblemonPose
lateinit var hover: CobblemonPose
lateinit var flying: CobblemonPose
lateinit var battle_idle: CobblemonPose
lateinit var sleep: CobblemonPose
override val cryAnimation = CryProvider { bedrockStateful("chandelure", "cry") }
override fun registerPoses() {
val blink = quirk { bedrockStateful("chandelure", "blink") }
standing = registerPose(
poseName = "standing",
poseTypes = PoseType.STATIONARY_POSES + PoseType.UI_POSES - PoseType.HOVER,
quirks = arrayOf(blink),
condition = { !it.isBattling },
animations = arrayOf(
bedrock("chandelure", "ground_idle")
)
)
walk = registerPose(
poseName = "walk",
poseTypes = PoseType.MOVING_POSES - PoseType.FLY,
quirks = arrayOf(blink),
animations = arrayOf(
bedrock("chandelure", "ground_walk")
)
)
hover = registerPose(
poseName = "hover",
poseType = PoseType.HOVER,
quirks = arrayOf(blink),
animations = arrayOf(
bedrock("chandelure", "air_idle")
)
)
flying = registerPose(
poseName = "flying",
poseType = PoseType.FLY,
quirks = arrayOf(blink),
animations = arrayOf(
bedrock("chandelure", "air_fly")
)
)
battle_idle = registerPose(
poseName = "battle_idle",
poseTypes = PoseType.STATIONARY_POSES,
quirks = arrayOf(blink),
condition = { it.isBattling },
animations = arrayOf(
bedrock("chandelure", "battle_idle")
)
)
}
// override fun getFaintAnimation(
// pokemonEntity: PokemonEntity,
// state: PosableState<PokemonEntity>
// ) = if (state.isPosedIn(standing, walk)) bedrockStateful("chandelure", "faint") else null
}
@@ -1,113 +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.PosableState
import com.cobblemon.mod.common.client.render.models.blockbench.createTransformation
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
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 ElgyemModel (root: ModelPart) : PokemonPosableModel(root), HeadedFrame, BipedFrame, BimanualFrame {
override val rootPart = root.registerChildWithAllChildren("elgyem")
override val head = getPart("head")
override val rightArm = getPart("arm_right")
override val leftArm = getPart("arm_left")
override val rightLeg = getPart("leg_right")
override val leftLeg = getPart("leg_left")
override var portraitScale = 2.5F
override var portraitTranslation = Vec3(-0.2, -0.8, 0.0)
override var profileScale = 0.85F
override var profileTranslation = Vec3(0.0, 0.5, 0.0)
lateinit var sleep: Pose
lateinit var standing: Pose
lateinit var walk: Pose
lateinit var battleidle: Pose
lateinit var shoulderLeft: Pose
lateinit var shoulderRight: Pose
override val cryAnimation = CryProvider { bedrockStateful("elgyem", "cry") }
val shoulderOffset = 5.6
override fun registerPoses() {
sleep = registerPose(
poseType = PoseType.SLEEP,
animations = arrayOf(bedrock("elgyem", "sleep"))
)
standing = registerPose(
poseName = "standing",
poseTypes = PoseType.STATIONARY_POSES + PoseType.UI_POSES,
transformTicks = 10,
condition = { !it.isBattling },
animations = arrayOf(
singleBoneLook(),
bedrock("elgyem", "ground_idle")
)
)
walk = registerPose(
poseName = "walk",
poseTypes = PoseType.MOVING_POSES,
transformTicks = 5,
animations = arrayOf(
singleBoneLook(),
bedrock("elgyem", "ground_walk")
)
)
battleidle = registerPose(
poseName = "battle_idle",
poseTypes = PoseType.STATIONARY_POSES,
transformTicks = 10,
condition = { it.isBattling },
animations = arrayOf(
singleBoneLook(),
bedrock("elgyem", "battle_idle")
)
)
shoulderLeft = registerPose(
poseType = PoseType.SHOULDER_LEFT,
//quirks = arrayOf(blink),
animations = arrayOf(
singleBoneLook(),
bedrock("elgyem", "ground_idle")
),
transformedParts = arrayOf(
rootPart.createTransformation().addPosition(ModelPartTransformation.X_AXIS, shoulderOffset)
)
)
shoulderRight = registerPose(
poseType = PoseType.SHOULDER_RIGHT,
//quirks = arrayOf(blink),
animations = arrayOf(
singleBoneLook(),
bedrock("elgyem", "ground_idle")
),
transformedParts = arrayOf(
rootPart.createTransformation().addPosition(ModelPartTransformation.X_AXIS, -shoulderOffset)
)
)
}
override fun getFaintAnimation(state: PosableState) = if (state.isPosedIn(standing, walk, battleidle, sleep)) bedrockStateful("elgyem", "faint") else null
}
@@ -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.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.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 LampentModel (root: ModelPart) : PokemonPosableModel(root), HeadedFrame {
override val rootPart = root.registerChildWithAllChildren("lampent")
override val head = getPart("head")
override var portraitScale = 2.2F
override var portraitTranslation = Vec3(-0.19, -0.17, 0.0)
override var profileScale = 0.8F
override var profileTranslation = Vec3(0.0, 0.7, 0.0)
lateinit var standing: CobblemonPose
lateinit var walk: CobblemonPose
lateinit var hover: CobblemonPose
lateinit var flying: CobblemonPose
lateinit var battle_idle: CobblemonPose
lateinit var sleep: CobblemonPose
override val cryAnimation = CryProvider { bedrockStateful("lampent", "cry") }
override fun registerPoses() {
val blink = quirk { bedrockStateful("lampent", "blink") }
sleep = registerPose(
poseName = "sleep",
poseType = PoseType.SLEEP,
animations = arrayOf(
bedrock("lampent", "sleep")
)
)
standing = registerPose(
poseName = "standing",
poseTypes = PoseType.STATIONARY_POSES + PoseType.UI_POSES - PoseType.HOVER,
quirks = arrayOf(blink),
condition = { !it.isBattling },
animations = arrayOf(
bedrock("lampent", "ground_idle")
)
)
walk = registerPose(
poseName = "walk",
poseTypes = PoseType.MOVING_POSES - PoseType.FLY,
quirks = arrayOf(blink),
animations = arrayOf(
bedrock("lampent", "ground_walk")
)
)
hover = registerPose(
poseName = "hover",
poseType = PoseType.HOVER,
quirks = arrayOf(blink),
animations = arrayOf(
bedrock("lampent", "air_idle")
)
)
flying = registerPose(
poseName = "flying",
poseType = PoseType.FLY,
quirks = arrayOf(blink),
animations = arrayOf(
bedrock("lampent", "air_fly")
)
)
battle_idle = registerPose(
poseName = "battle_idle",
poseTypes = PoseType.STATIONARY_POSES,
quirks = arrayOf(blink),
condition = { it.isBattling },
animations = arrayOf(
bedrock("lampent", "battle_idle")
)
)
}
// override fun getFaintAnimation(
// pokemonEntity: PokemonEntity,
// state: PosableState<PokemonEntity>
// ) = if (state.isPosedIn(standing, walk)) bedrockStateful("lampent", "faint") else null
}
@@ -1,110 +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.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.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 LitwickModel (root: ModelPart) : PokemonPosableModel(root), HeadedFrame {
override val rootPart = root.registerChildWithAllChildren("litwick")
override val head = getPart("head")
override var portraitScale = 2.33F
override var portraitTranslation = Vec3(0.01, -1.9, 0.0)
override var profileScale = 0.86F
override var profileTranslation = Vec3(0.0, 0.44, 0.0)
lateinit var standing: CobblemonPose
lateinit var walk: CobblemonPose
lateinit var sleep: CobblemonPose
lateinit var battle_idle: CobblemonPose
lateinit var shoulderLeft: CobblemonPose
lateinit var shoulderRight: CobblemonPose
override val cryAnimation = CryProvider { bedrockStateful("litwick", "cry") }
val shoulderOffset = 5.5
val wax = getPart("wax_trail")
override fun registerPoses() {
val blink = quirk { bedrockStateful("litwick", "blink") }
sleep = registerPose(
poseName = "sleep",
poseType = PoseType.SLEEP,
animations = arrayOf(
bedrock("litwick", "sleep")
)
)
standing = registerPose(
poseName = "standing",
poseTypes = PoseType.STATIONARY_POSES + PoseType.UI_POSES,
condition = { !it.isBattling },
quirks = arrayOf(blink),
animations = arrayOf(
bedrock("litwick", "ground_idle")
)
)
walk = registerPose(
poseName = "walk",
poseTypes = PoseType.MOVING_POSES,
quirks = arrayOf(blink),
animations = arrayOf(
bedrock("litwick", "ground_walk")
)
)
battle_idle = registerPose(
poseName = "battle_idle",
poseTypes = PoseType.STATIONARY_POSES,
quirks = arrayOf(blink),
condition = { it.isBattling },
animations = arrayOf(
bedrock("litwick", "battle_idle")
)
)
shoulderLeft = registerPose(
poseType = PoseType.SHOULDER_LEFT,
quirks = arrayOf(blink),
animations = arrayOf(
bedrock("litwick", "ground_idle")
),
transformedParts = arrayOf(
wax.createTransformation().withVisibility(visibility = false)
)
)
shoulderRight = registerPose(
poseType = PoseType.SHOULDER_RIGHT,
quirks = arrayOf(blink),
animations = arrayOf(
bedrock("litwick", "ground_idle")
),
transformedParts = arrayOf(
wax.createTransformation().withVisibility(visibility = false)
)
)
}
// override fun getFaintAnimation(
// pokemonEntity: PokemonEntity,
// state: PosableState<PokemonEntity>
// ) = if (state.isPosedIn(standing, walk)) bedrockStateful("litwick", "faint") else null
}
@@ -361,8 +361,6 @@ object VaryingModelRepository {
inbuilt("chespin", :: ChespinModel)
inbuilt("quilladin", :: QuilladinModel)
inbuilt("chesnaught", :: ChesnaughtModel)
inbuilt("elgyem", :: ElgyemModel)
inbuilt("beheeyem", :: BeheeyemModel)
inbuilt("pineco", :: PinecoModel)
inbuilt("forretress", :: ForretressModel)
inbuilt("lotad", :: LotadModel)
@@ -554,9 +552,6 @@ object VaryingModelRepository {
inbuilt("gurdurr", ::GurdurrModel)
inbuilt("conkeldurr", ::ConkeldurrModel)
inbuilt("clodsire", ::ClodsireModel)
inbuilt("litwick", ::LitwickModel)
inbuilt("lampent", ::LampentModel)
inbuilt("chandelure", ::ChandelureModel)
inbuilt("gimmighoulchest", ::GimmighoulChestModel)
inbuilt("drifloon", ::DrifloonModel)
inbuilt("lileep", ::LileepModel)
@@ -23,9 +23,6 @@ object CobblemonTooltipGenerator : TooltipGenerator() {
val resultLines = mutableListOf<Component>()
if (stack.item.builtInRegistryHolder().unwrapKey().isPresent && stack.item.builtInRegistryHolder().unwrapKey().get().location().namespace == Cobblemon.MODID) {
if (stack.get(DataComponents.HIDE_ADDITIONAL_TOOLTIP) != null) {
return null
}
val language = Language.getInstance()
val key = this.baseLangKeyForItem(stack)
if (language.has(key)) {
@@ -31,9 +31,6 @@ object FishingBaitTooltipGenerator : TooltipGenerator() {
private val fishingBaitItemClass by lazy { lang("item_class.fishing_bait").blue() }
override fun generateCategoryTooltip(stack: ItemStack, lines: MutableList<Component>): MutableList<Component>? {
if (stack.get(DataComponents.HIDE_ADDITIONAL_TOOLTIP) != null) {
return null
}
if (!SpawnBaitEffects.isFishingBait(stack)) {
return null
}
@@ -41,9 +38,6 @@ object FishingBaitTooltipGenerator : TooltipGenerator() {
}
override fun generateAdditionalTooltip(stack: ItemStack, lines: MutableList<Component>): MutableList<Component>? {
if (stack.get(DataComponents.HIDE_ADDITIONAL_TOOLTIP) != null) {
return null
}
val resultLines = mutableListOf<Component>()
if (SpawnBaitEffects.isFishingBait(stack)) resultLines.add(this.fishingBaitItemClass)
@@ -23,9 +23,6 @@ import net.minecraft.world.item.ItemStack
object FishingRodTooltipGenerator : TooltipGenerator() {
override fun generateTooltip(stack: ItemStack, lines: MutableList<Component>): MutableList<Component>? {
if (stack.get(DataComponents.HIDE_ADDITIONAL_TOOLTIP) != null) {
return null
}
val resultLines = mutableListOf<Component>()
val rod = (stack.item as? PokerodItem)?.pokeRodId?.let { PokeRods.getPokeRod(it) } ?: return null
@@ -61,10 +61,6 @@ object SeasoningTooltipGenerator : TooltipGenerator() {
}
override fun generateAdditionalTooltip(stack: ItemStack, lines: MutableList<Component>): MutableList<Component>? {
if (stack.get(DataComponents.HIDE_ADDITIONAL_TOOLTIP) != null) {
return null
}
val isSeasoningIngredient = Seasonings.isSeasoning(stack)
val flavors = stack.get(CobblemonItemComponents.FLAVOUR)?.flavours
val food = stack.get(CobblemonItemComponents.FOOD)
@@ -10,6 +10,7 @@ package com.cobblemon.mod.common.client.tooltips
import com.cobblemon.mod.common.api.text.yellow
import com.cobblemon.mod.common.util.lang
import net.minecraft.core.component.DataComponents
import net.minecraft.network.chat.Component
import net.minecraft.world.item.ItemStack
@@ -22,6 +23,12 @@ object TooltipManager {
}
fun generateTooltips(stack: ItemStack, lines: MutableList<Component>, hasShiftDown: Boolean) {
// This will need to be changed in 1.21.5 as 25w04a changed the following:
// "Removed the hide_tooltip and hide_additional_tooltip components in favor of the new tooltip_display component."
if (stack.get(DataComponents.HIDE_ADDITIONAL_TOOLTIP) != null) {
return
}
val standardLines = tooltipGenerators.flatMap {
val innerLines = mutableListOf<Component>()
val regularTooltip = it.generateTooltip(stack, lines)
@@ -12,6 +12,8 @@ import com.cobblemon.mod.common.api.drop.ItemDropMethod
import com.cobblemon.mod.common.api.pokeball.catching.calculators.CaptureCalculator
import com.cobblemon.mod.common.api.pokemon.status.Statuses
import com.cobblemon.mod.common.client.gui.portrait.PortraitStyle
import com.cobblemon.mod.common.config.CobblemonConfigField.CobblemonConfigSide.CLIENT
import com.cobblemon.mod.common.config.CobblemonConfigField.CobblemonConfigSide.SERVER
import com.cobblemon.mod.common.config.constraint.IntConstraint
import com.cobblemon.mod.common.pokeball.catching.calculators.CobblemonCaptureCalculator
import com.cobblemon.mod.common.util.adapters.CaptureCalculatorAdapter
@@ -19,9 +21,9 @@ import com.cobblemon.mod.common.util.adapters.IdentifierAdapter
import com.cobblemon.mod.common.util.adapters.IntRangeAdapter
import com.google.gson.GsonBuilder
import com.google.gson.annotations.SerializedName
import net.minecraft.resources.ResourceLocation
import kotlin.reflect.full.memberProperties
import kotlin.reflect.jvm.isAccessible
import net.minecraft.resources.ResourceLocation
class CobblemonConfig {
companion object {
@@ -37,123 +39,123 @@ class CobblemonConfig {
var lastSavedVersion: String = "0.0.1"
@CobblemonConfigField(Category.Pokemon, lang = "max_pokemon_level")
@CobblemonConfigField(Category.Pokemon, lang = "max_pokemon_level", SERVER)
@IntConstraint(min = 1, max = 1000)
var maxPokemonLevel = 100
@CobblemonConfigField(Category.Pokemon, lang = "max_pokemon_friendship")
@CobblemonConfigField(Category.Pokemon, lang = "max_pokemon_friendship", SERVER)
@IntConstraint(min = 0, max = 1000)
var maxPokemonFriendship = 255
@CobblemonConfigField(Category.Pokemon, lang = "announce_drop_items")
@CobblemonConfigField(Category.Pokemon, lang = "announce_drop_items", SERVER)
var announceDropItems = true
@CobblemonConfigField(Category.Pokemon, lang = "default_drop_item_method")
@CobblemonConfigField(Category.Pokemon, lang = "default_drop_item_method", SERVER)
var defaultDropItemMethod = ItemDropMethod.ON_ENTITY
@CobblemonConfigField(Category.Pokemon, lang = "drops_after_death_animation")
@CobblemonConfigField(Category.Pokemon, lang = "drops_after_death_animation", SERVER)
var dropAfterDeathAnimation = false
@CobblemonConfigField(Category.Pokemon, lang = "ambient_pokemon_cry_ticks")
@CobblemonConfigField(Category.Pokemon, lang = "ambient_pokemon_cry_ticks", SERVER)
@LastChangedVersion("1.4.0")
var ambientPokemonCryTicks = 1080
@CobblemonConfigField(Category.Storage, lang = "default_box_count")
@CobblemonConfigField(Category.Storage, lang = "default_box_count", SERVER)
@IntConstraint(min = 1, max = 1000)
@LastChangedVersion("1.7.0")
var defaultBoxCount = 40
@CobblemonConfigField(Category.Storage, lang = "pokemon_save_interval_seconds")
@CobblemonConfigField(Category.Storage, lang = "pokemon_save_interval_seconds", SERVER)
@IntConstraint(min = 1, max = 120)
var pokemonSaveIntervalSeconds = 30
@CobblemonConfigField(Category.Storage, lang = "storage_format")
@CobblemonConfigField(Category.Storage, lang = "storage_format", SERVER)
var storageFormat = "nbt"
@CobblemonConfigField(Category.Storage, lang = "prevent_complete_party_deposit")
@CobblemonConfigField(Category.Storage, lang = "prevent_complete_party_deposit", SERVER)
var preventCompletePartyDeposit = false
@CobblemonConfigField(Category.Storage, lang = "mongo_db_connection_string")
@CobblemonConfigField(Category.Storage, lang = "mongo_db_connection_string", SERVER)
var mongoDBConnectionString = "mongodb://localhost:27017"
@CobblemonConfigField(Category.Storage, lang = "mongo_db_database_name")
@CobblemonConfigField(Category.Storage, lang = "mongo_db_database_name", SERVER)
var mongoDBDatabaseName = "cobblemon"
@CobblemonConfigField(Category.Spawning, lang = "max_vertical_correction_blocks")
@CobblemonConfigField(Category.Spawning, lang = "max_vertical_correction_blocks", SERVER)
@IntConstraint(min = 1, max = 200)
var maxVerticalCorrectionBlocks = 64
@CobblemonConfigField(Category.Spawning, lang = "minimum_level_range_max")
@CobblemonConfigField(Category.Spawning, lang = "minimum_level_range_max", SERVER)
@IntConstraint(min = 1, max = 1000)
var minimumLevelRangeMax = 10
@CobblemonConfigField(Category.Spawning, lang = "enable_spawning")
@CobblemonConfigField(Category.Spawning, lang = "enable_spawning", SERVER)
var enableSpawning = true
@CobblemonConfigField(Category.Spawning, lang = "minimum_distance_between_entities")
@CobblemonConfigField(Category.Spawning, lang = "minimum_distance_between_entities", SERVER)
var minimumDistanceBetweenEntities = 8.0
@CobblemonConfigField(Category.Spawning, lang = "max_nearby_blocks_horizontal_range")
@CobblemonConfigField(Category.Spawning, lang = "max_nearby_blocks_horizontal_range", SERVER)
var maxNearbyBlocksHorizontalRange = 4
@CobblemonConfigField(Category.Spawning, lang = "max_nearby_blocks_vertical_range")
@CobblemonConfigField(Category.Spawning, lang = "max_nearby_blocks_vertical_range", SERVER)
var maxNearbyBlocksVerticalRange = 2
@CobblemonConfigField(Category.Spawning, lang = "max_vertical_space")
@CobblemonConfigField(Category.Spawning, lang = "max_vertical_space", SERVER)
var maxVerticalSpace = 8
@CobblemonConfigField(Category.Spawning, lang = "spawning_zone_diameter")
@CobblemonConfigField(Category.Spawning, lang = "spawning_zone_diameter", SERVER)
@SerializedName("spawningZoneDiameter", alternate = ["worldSliceDiameter"])
var spawningZoneDiameter = 8
@CobblemonConfigField(Category.Spawning, lang = "spawning_zone_height")
@CobblemonConfigField(Category.Spawning, lang = "spawning_zone_height", SERVER)
@SerializedName("spawningZoneHeight", alternate = ["worldSliceHeight"])
var spawningZoneHeight = 16
@CobblemonConfigField(Category.Spawning, lang = "ticks_between_spawn_attempts")
@CobblemonConfigField(Category.Spawning, lang = "ticks_between_spawn_attempts", SERVER)
var ticksBetweenSpawnAttempts = 20F
@CobblemonConfigField(Category.Spawning, lang = "minimum_spawning_zone_distance_from_player")
@CobblemonConfigField(Category.Spawning, lang = "minimum_spawning_zone_distance_from_player", SERVER)
@SerializedName("minimumSpawningZoneDistanceFromPlayer", alternate = ["minimumSliceDistanceFromPlayer"])
var minimumSpawningZoneDistanceFromPlayer = 16F
@CobblemonConfigField(Category.Spawning, lang = "maximum_spawning_zone_distance_from_player")
@CobblemonConfigField(Category.Spawning, lang = "maximum_spawning_zone_distance_from_player", SERVER)
@SerializedName("maximumSpawningZoneDistanceFromPlayer", alternate = ["maximumSliceDistanceFromPlayer"])
var maximumSpawningZoneDistanceFromPlayer = 16 * 4F
@CobblemonConfigField(Category.Spawning, lang = "maximum_spawns_per_pass")
@CobblemonConfigField(Category.Spawning, lang = "maximum_spawns_per_pass", SERVER)
var maximumSpawnsPerPass = 8
@CobblemonConfigField(Category.Spawning, lang = "export_spawn_config")
@CobblemonConfigField(Category.Spawning, lang = "export_spawn_config", SERVER)
var exportSpawnConfig = false
@CobblemonConfigField(Category.Spawning, lang = "save_pokemon_to_world")
@CobblemonConfigField(Category.Spawning, lang = "save_pokemon_to_world", SERVER)
var savePokemonToWorld = true
@CobblemonConfigField(Category.Starter, lang = "export_starter_config")
@CobblemonConfigField(Category.Starter, lang = "export_starter_config", SERVER)
var exportStarterConfig = false
@CobblemonConfigField(Category.Battles, lang = "auto_update_showdown")
@CobblemonConfigField(Category.Battles, lang = "auto_update_showdown", SERVER)
var autoUpdateShowdown = true
@CobblemonConfigField(Category.Battles, lang = "default_flee_distance")
@CobblemonConfigField(Category.Battles, lang = "default_flee_distance", SERVER)
var defaultFleeDistance = 16F * 2
@CobblemonConfigField(Category.Battles, lang = "allow_experience_from_pvp")
@CobblemonConfigField(Category.Battles, lang = "allow_experience_from_pvp", SERVER)
var allowExperienceFromPvP = true
@CobblemonConfigField(Category.Battles, lang = "experience_share_multiplier")
@CobblemonConfigField(Category.Battles, lang = "experience_share_multiplier", SERVER)
var experienceShareMultiplier = .5
@CobblemonConfigField(Category.Battles, lang = "lucky_egg_multiplier")
@CobblemonConfigField(Category.Battles, lang = "lucky_egg_multiplier", SERVER)
var luckyEggMultiplier = 1.5
@CobblemonConfigField(Category.Battles, lang = "allow_spectating")
@CobblemonConfigField(Category.Battles, lang = "allow_spectating", SERVER)
var allowSpectating = true
@CobblemonConfigField(Category.Pokemon, lang = "experience_multiplier")
@CobblemonConfigField(Category.Pokemon, lang = "experience_multiplier", SERVER)
var experienceMultiplier = 2F
@CobblemonConfigField(Category.Spawning, lang = "pokemon_per_chunk")
@CobblemonConfigField(Category.Spawning, lang = "pokemon_per_chunk", SERVER)
var pokemonPerChunk = 1F
@CobblemonConfigField(Category.PassiveStatus, lang = "passive_statuses")
@CobblemonConfigField(Category.PassiveStatus, lang = "passive_statuses", SERVER)
var passiveStatuses = mutableMapOf(
Statuses.POISON.configEntry(),
Statuses.POISON_BADLY.configEntry(),
@@ -163,165 +165,165 @@ class CobblemonConfig {
Statuses.BURN.configEntry()
)
@CobblemonConfigField(Category.Healing, lang = "infinite_healer_charge")
@CobblemonConfigField(Category.Healing, lang = "infinite_healer_charge", SERVER)
var infiniteHealerCharge = false
@CobblemonConfigField(Category.Healing, lang = "max_healer_charge")
@CobblemonConfigField(Category.Healing, lang = "max_healer_charge", SERVER)
var maxHealerCharge = 6.0f
@CobblemonConfigField(Category.Healing, lang = "seconds_to_charge_healing_machine")
@CobblemonConfigField(Category.Healing, lang = "seconds_to_charge_healing_machine", SERVER)
var secondsToChargeHealingMachine = 900.0
@CobblemonConfigField(Category.Healing, lang = "default_faint_timer")
@CobblemonConfigField(Category.Healing, lang = "default_faint_timer", SERVER)
var defaultFaintTimer = 300
@CobblemonConfigField(Category.Healing, lang = "faint_awaken_health_percent")
@CobblemonConfigField(Category.Healing, lang = "faint_awaken_health_percent", SERVER)
var faintAwakenHealthPercent = 0.2f
@CobblemonConfigField(Category.Healing, lang = "heal_percent")
@CobblemonConfigField(Category.Healing, lang = "heal_percent", SERVER)
var healPercent = 0.05
@CobblemonConfigField(Category.Healing, lang = "heal_timer")
@CobblemonConfigField(Category.Healing, lang = "heal_timer", SERVER)
var healTimer = 60
@CobblemonConfigField(Category.Spawning, lang = "base_apricorn_tree_generation_chance")
@CobblemonConfigField(Category.Spawning, lang = "base_apricorn_tree_generation_chance", SERVER)
var baseApricornTreeGenerationChance = 0.1F
@CobblemonConfigField(Category.Pokemon, lang = "display_entity_level_label")
@CobblemonConfigField(Category.Pokemon, lang = "display_entity_level_label", CLIENT)
var displayEntityLevelLabel = true
@CobblemonConfigField(Category.Pokemon, lang = "display_entity_name_label")
@CobblemonConfigField(Category.Pokemon, lang = "display_entity_name_label", CLIENT)
var displayEntityNameLabel = true
@CobblemonConfigField(Category.Pokemon, lang = "display_name_for_unknown_pokemon")
@CobblemonConfigField(Category.Pokemon, lang = "display_name_for_unknown_pokemon", CLIENT)
var displayNameForUnknownPokemon = false
@CobblemonConfigField(Category.Pokemon, lang = "display_entity_labels_when_crouching_only")
@CobblemonConfigField(Category.Pokemon, lang = "display_entity_labels_when_crouching_only", CLIENT)
var displayEntityLabelsWhenCrouchingOnly = false
@CobblemonConfigField(Category.Spawning, lang = "shiny_rate")
@CobblemonConfigField(Category.Spawning, lang = "shiny_rate", SERVER)
var shinyRate = 8192F
@CobblemonConfigField(Category.Pokemon, lang = "shiny_notice_particles_distance")
@CobblemonConfigField(Category.Pokemon, lang = "shiny_notice_particles_distance", CLIENT)
var shinyNoticeParticlesDistance = 24F
@CobblemonConfigField(Category.Pokemon, lang = "capture_calculator")
@CobblemonConfigField(Category.Pokemon, lang = "capture_calculator", SERVER)
var captureCalculator: CaptureCalculator = CobblemonCaptureCalculator
@CobblemonConfigField(Category.Pokemon, lang = "player_damage_pokemon")
@CobblemonConfigField(Category.Pokemon, lang = "player_damage_pokemon", SERVER)
var playerDamagePokemon = true
@CobblemonConfigField(Category.World, lang = "apple_leftovers_chance")
@CobblemonConfigField(Category.World, lang = "apple_leftovers_chance", SERVER)
var appleLeftoversChance = 0.025
@CobblemonConfigField(Category.World, lang = "max_roots_in_area")
@CobblemonConfigField(Category.World, lang = "max_roots_in_area", SERVER)
var maxRootsInArea = 5
@CobblemonConfigField(Category.World, lang = "big_root_propagation_chance")
@CobblemonConfigField(Category.World, lang = "big_root_propagation_chance", SERVER)
var bigRootPropagationChance = 0.1
@CobblemonConfigField(Category.World, lang = "energy_root_chance")
@CobblemonConfigField(Category.World, lang = "energy_root_chance", SERVER)
var energyRootChance = 0.25
@CobblemonConfigField(Category.Pokemon, lang = "max_dynamax_level")
@CobblemonConfigField(Category.Pokemon, lang = "max_dynamax_level", SERVER)
@IntConstraint(min = 0, max = 10)
var maxDynamaxLevel = 10
@CobblemonConfigField(Category.Spawning, lang = "tera_type_rate")
@CobblemonConfigField(Category.Spawning, lang = "tera_type_rate", SERVER)
var teraTypeRate = 20F
@CobblemonConfigField(Category.World, lang = "default_pastured_pokemon_limit")
@CobblemonConfigField(Category.World, lang = "default_pastured_pokemon_limit", SERVER)
var defaultPasturedPokemonLimit = 16
@CobblemonConfigField(Category.World, lang = "pasture_block_update_ticks")
@CobblemonConfigField(Category.World, lang = "pasture_block_update_ticks", SERVER)
var pastureBlockUpdateTicks = 40
@CobblemonConfigField(Category.World, lang = "pasture_max_wander_distance")
@CobblemonConfigField(Category.World, lang = "pasture_max_wander_distance", SERVER)
var pastureMaxWanderDistance = 64
@CobblemonConfigField(Category.World, lang = "pasture_max_per_chunk")
@CobblemonConfigField(Category.World, lang = "pasture_max_per_chunk", SERVER)
var pastureMaxPerChunk = 4F
@CobblemonConfigField(Category.World, lang = "max_inserted_fossil_items")
@CobblemonConfigField(Category.World, lang = "max_inserted_fossil_items", SERVER)
var maxInsertedFossilItems = 2
@CobblemonConfigField(Category.Battles, lang = "walking_in_battle_animations")
@CobblemonConfigField(Category.Battles, lang = "walking_in_battle_animations", CLIENT)
var walkingInBattleAnimations = false
@CobblemonConfigField(Category.Battles, lang = "battle_wild_max_distance")
@CobblemonConfigField(Category.Battles, lang = "battle_wild_max_distance", SERVER)
var battleWildMaxDistance = 12F
@CobblemonConfigField(Category.World, lang = "trade_max_distance")
@CobblemonConfigField(Category.World, lang = "trade_max_distance", SERVER)
var tradeMaxDistance = 12F
@CobblemonConfigField(Category.Battles, lang = "battle_pvp_max_distance")
@CobblemonConfigField(Category.Battles, lang = "battle_pvp_max_distance", SERVER)
@SerializedName("battlePvPMaxDistance", alternate = ["BattlePvPMaxDistance"])
var battlePvPMaxDistance = 32F
@CobblemonConfigField(Category.Battles, lang = "battle_spectate_max_distance")
@CobblemonConfigField(Category.Battles, lang = "battle_spectate_max_distance", SERVER)
var battleSpectateMaxDistance = 64F
@CobblemonConfigField(Category.Pokedex, lang = "max_pokedex_scanning_detection_range")
@CobblemonConfigField(Category.Pokedex, lang = "max_pokedex_scanning_detection_range", SERVER)
var maxPokedexScanningDetectionRange = 10.0
@CobblemonConfigField(Category.Pokedex, lang = "hide_unimplemented_pokemon_in_the_pokedex")
@CobblemonConfigField(Category.Pokedex, lang = "hide_unimplemented_pokemon_in_the_pokedex", CLIENT)
var hideUnimplementedPokemonInThePokedex = false
@CobblemonConfigField(Category.Interface, lang = "summary_pokemon_follow_cursor")
@CobblemonConfigField(Category.Interface, lang = "summary_pokemon_follow_cursor", CLIENT)
var summaryPokemonFollowCursor = true
@CobblemonConfigField(Category.Interface, lang = "party_portrait_animations")
@CobblemonConfigField(Category.Interface, lang = "party_portrait_animations", CLIENT)
var partyPortraitAnimations = PortraitStyle.NEVER_ANIMATE
@CobblemonConfigField(Category.Riding, lang = "third_person_view_bobbing")
@CobblemonConfigField(Category.Riding, lang = "third_person_view_bobbing", CLIENT)
var thirdPersonViewBobbing = true
@CobblemonConfigField(Category.Riding, lang = "invert_roll")
@CobblemonConfigField(Category.Riding, lang = "invert_roll", CLIENT)
var invertRoll = false
@CobblemonConfigField(Category.Riding, lang = "invert_pitch")
@CobblemonConfigField(Category.Riding, lang = "invert_pitch", CLIENT)
var invertPitch = false
@CobblemonConfigField(Category.Riding, lang = "invert_yaw")
@CobblemonConfigField(Category.Riding, lang = "invert_yaw", CLIENT)
var invertYaw = false
@CobblemonConfigField(Category.Riding, lang = "x_axis_sensitivity")
@CobblemonConfigField(Category.Riding, lang = "x_axis_sensitivity", CLIENT)
var xAxisSensitivity = 1.0
@CobblemonConfigField(Category.Riding, lang = "y_axis_sensitivity")
@CobblemonConfigField(Category.Riding, lang = "y_axis_sensitivity", CLIENT)
var yAxisSensitivity = 1.0
@CobblemonConfigField(Category.Riding, lang = "swap_x_and_y_axes")
@CobblemonConfigField(Category.Riding, lang = "swap_x_and_y_axes", CLIENT)
var swapXAndYAxes = false
@CobblemonConfigField(Category.Riding, lang = "automatic_righting_delay")
@CobblemonConfigField(Category.Riding, lang = "automatic_righting_delay", CLIENT)
var rightingDelay = -1.0
@CobblemonConfigField(Category.Riding, lang = "disable_roll")
@CobblemonConfigField(Category.Riding, lang = "disable_roll", CLIENT)
var disableRoll = false
@CobblemonConfigField(Category.Riding, lang = "display_controls_duration_seconds")
@CobblemonConfigField(Category.Riding, lang = "display_controls_duration_seconds", CLIENT)
var displayControlSeconds = 3
@CobblemonConfigField(Category.Riding, lang = "infinite_ride_stamina")
@CobblemonConfigField(Category.Riding, lang = "infinite_ride_stamina", SERVER)
var infiniteRideStamina = false
@CobblemonConfigField(Category.Riding, lang = "remember_riding_camera")
@CobblemonConfigField(Category.Riding, lang = "remember_riding_camera", CLIENT)
var rememberRidingCamera = true
@CobblemonConfigField(Category.Debug, lang = "enable_debug_keys")
@CobblemonConfigField(Category.Debug, lang = "enable_debug_keys", CLIENT)
var enableDebugKeys = true
@CobblemonConfigField(Category.Spawning, lang = "despawner_near_distance")
@CobblemonConfigField(Category.Spawning, lang = "despawner_near_distance", SERVER)
var despawnerNearDistance = 32f
@CobblemonConfigField(Category.Spawning, lang = "despawner_far_distance")
@CobblemonConfigField(Category.Spawning, lang = "despawner_far_distance", SERVER)
var despawnerFarDistance = 96f
@CobblemonConfigField(Category.Spawning, lang = "despawner_min_age_ticks")
@CobblemonConfigField(Category.Spawning, lang = "despawner_min_age_ticks", SERVER)
var despawnerMinAgeTicks = 600
@CobblemonConfigField(Category.Spawning, lang = "despawner_max_age_ticks")
@CobblemonConfigField(Category.Spawning, lang = "despawner_max_age_ticks", SERVER)
var despawnerMaxAgeTicks = 3600
fun clone(): CobblemonConfig {
@@ -13,4 +13,10 @@ package com.cobblemon.mod.common.config
annotation class CobblemonConfigField(
val category: Category,
val lang: String,
)
val side: CobblemonConfigSide,
) {
enum class CobblemonConfigSide {
CLIENT,
SERVER,
}
}
@@ -10,8 +10,9 @@ package com.cobblemon.mod.common.config.starter
import com.cobblemon.mod.common.api.pokemon.PokemonProperties
import com.cobblemon.mod.common.config.Category
import com.cobblemon.mod.common.config.LastChangedVersion
import com.cobblemon.mod.common.config.CobblemonConfigField
import com.cobblemon.mod.common.config.CobblemonConfigField.CobblemonConfigSide.SERVER
import com.cobblemon.mod.common.config.LastChangedVersion
import com.cobblemon.mod.common.util.adapters.pokemonPropertiesShortAdapter
import com.google.gson.GsonBuilder
@@ -24,17 +25,17 @@ class StarterConfig {
.create()
}
@CobblemonConfigField(Category.Starter, lang = "allow_starter_on_join")
@CobblemonConfigField(Category.Starter, lang = "allow_starter_on_join", SERVER)
var allowStarterOnJoin = true
@CobblemonConfigField(Category.Starter, lang = "prompt_starter_once_only")
@CobblemonConfigField(Category.Starter, lang = "prompt_starter_once_only", SERVER)
@LastChangedVersion("1.5.0")
var promptStarterOnceOnly = true
@CobblemonConfigField(Category.Starter, lang = "use_config_starters")
@CobblemonConfigField(Category.Starter, lang = "use_config_starters", SERVER)
var useConfigStarters = false
@CobblemonConfigField(Category.Starter, lang = "starters")
@CobblemonConfigField(Category.Starter, lang = "starters", SERVER)
var starters = mutableListOf(
StarterCategory(
name = "Kanto",
@@ -1,58 +0,0 @@
package com.cobblemon.mod.common.debug
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity
import com.mojang.blaze3d.vertex.PoseStack
import net.minecraft.client.Minecraft
import net.minecraft.client.renderer.MultiBufferSource
import net.minecraft.client.renderer.debug.DebugRenderer
import net.minecraft.core.BlockPos
import net.minecraft.core.Position
import java.util.function.Consumer
object RidingDebugRenderer : DebugRenderer.SimpleDebugRenderer {
var enabled = false
override fun render(
poseStack: PoseStack,
buffer: MultiBufferSource,
camX: Double,
camY: Double,
camZ: Double
) {
val minecraft = Minecraft.getInstance() ?: return
val vehicle = minecraft.player?.vehicle
if (vehicle != null && vehicle is PokemonEntity) {
DebugRenderer.renderFloatingText(poseStack, buffer, "riding", camX, camY, camZ, -1, 1f, false, 0.5f, true)
renderRidingInfo(vehicle, poseStack, buffer)
}
}
private fun renderRidingInfo(vehicle: PokemonEntity, poseStack: PoseStack, buffer: MultiBufferSource) {
val ridingController = vehicle.ridingController
if (ridingController != null) {
var i = 0
ridingController.context?.let { context ->
val debugString = "Currently active: ${context.behaviour}"
renderTextOverVehicle(poseStack, buffer, vehicle.position(), i, debugString, -1, 0.03f)
i++
}
ridingController.behaviours.forEach { (style, settings) ->
val debugString = "Available: $style"
renderTextOverVehicle(poseStack, buffer, vehicle.position(), i, debugString, -1, 0.03f)
i++
}
}
}
private fun renderTextOverVehicle(poseStack: PoseStack, buffer: MultiBufferSource, pos: Position, layer: Int, text: String, color: Int, scale: Float) {
val blockPos = BlockPos.containing(pos)
val x = blockPos.x.toDouble() + 0.5
val y = blockPos.y.toDouble() + 2.4 + layer * 0.25
val z = blockPos.z.toDouble() + 0.5
DebugRenderer.renderFloatingText(poseStack, buffer, text, x, y, z, color, scale, false, 0.5f, true)
}
fun clientHandler(enabled: Boolean) {
this.enabled = enabled
}
}
@@ -25,6 +25,7 @@ interface OmniPathingEntity {
fun canSwimInLava(): Boolean
fun canWalkOnLava(): Boolean
fun canSwimUnderFluid(fluidState: FluidState): Boolean
fun canPathThroughSaccLeaves(): Boolean
fun canFly(): Boolean
fun isFlying(): Boolean
fun setFlying(state: Boolean)
@@ -11,16 +11,17 @@ package com.cobblemon.mod.common.entity.ai
import com.cobblemon.mod.common.CobblemonMemories
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity
import com.cobblemon.mod.common.entity.pokemon.ai.PokemonMoveControl
import com.cobblemon.mod.common.util.toBlockPos
import com.google.common.collect.ImmutableMap
import java.util.UUID
import kotlin.math.pow
import net.minecraft.server.level.ServerLevel
import net.minecraft.world.entity.MoverType
import net.minecraft.util.Mth
import net.minecraft.world.entity.ai.behavior.Behavior
import net.minecraft.world.entity.ai.memory.MemoryModuleType
import net.minecraft.world.entity.ai.memory.MemoryStatus
import net.minecraft.world.entity.ai.memory.WalkTarget
import net.minecraft.world.phys.Vec3
import java.util.*
import kotlin.math.cos
import kotlin.math.sin
class FollowHerdLeaderTask : Behavior<PokemonEntity>(
ImmutableMap.of(
@@ -34,7 +35,7 @@ class FollowHerdLeaderTask : Behavior<PokemonEntity>(
var tooFar = 8F
var closeEnough = 4F
/** Chance per tick of following the herd leader. */
val chance = 1 / 20F
val chance = 1 / 60F
override fun checkExtraStartConditions(level: ServerLevel, owner: PokemonEntity): Boolean {
leader = level.getEntity(owner.brain.getMemory(CobblemonMemories.HERD_LEADER).map(UUID::fromString).orElse(null) ?: return false) as? PokemonEntity
@@ -50,16 +51,19 @@ class FollowHerdLeaderTask : Behavior<PokemonEntity>(
override fun tick(level: ServerLevel, entity: PokemonEntity, gameTime: Long) {
val leader = leader ?: return
if (entity.brain.hasMemoryValue(MemoryModuleType.WALK_TARGET)) {
return // We're busy goin' n' shit
}
val moveControl = entity.moveControl as? PokemonMoveControl ?: return
val leaderMoveControl = leader.moveControl as? PokemonMoveControl ?: return
if (leader.distanceTo(entity) > tooFar) {
entity.brain.setMemory(
MemoryModuleType.WALK_TARGET,
CobblemonWalkTarget(
pos = leader.blockPosition(),
pos = leader.position().add(getRandomOffset(entity, level)).toBlockPos(),
speedModifier = 0.4F,
completionRange = closeEnough.toInt()
)
@@ -69,10 +73,11 @@ class FollowHerdLeaderTask : Behavior<PokemonEntity>(
entity.brain.eraseMemory(CobblemonMemories.HERD_LEADER) // We can't go where this guy's going
return
}
entity.brain.setMemory(
MemoryModuleType.WALK_TARGET,
CobblemonWalkTarget(
pos = leader.blockPosition(),
pos = leader.position().add(getRandomOffset(entity, level)).toBlockPos(),
speedModifier = 0.3F,
completionRange = closeEnough.toInt()
)
@@ -83,7 +88,7 @@ class FollowHerdLeaderTask : Behavior<PokemonEntity>(
entity.brain.setMemory(
MemoryModuleType.WALK_TARGET,
CobblemonWalkTarget(
pos = leader.blockPosition(),
pos = leader.position().add(getRandomOffset(entity, level)).toBlockPos(),
speedModifier = 0.4F,
completionRange = 1
)
@@ -105,14 +110,15 @@ class FollowHerdLeaderTask : Behavior<PokemonEntity>(
// Go to the leader's walk target, roughly.
val walkTarget = leader.brain.getMemory(MemoryModuleType.WALK_TARGET).orElse(null) ?: return
if (entity.distanceToSqr(walkTarget.target.currentPosition()) < leader.distanceToSqr(walkTarget.target.currentPosition())) {
return // We're already closer to the walk target than the leader is, so no need to move, if anything we should get out of the way
// We're already closer to the walk target than the leader is, so no need to move, if anything we should get out of the way
if (entity.distanceToSqr(walkTarget.target.currentPosition()) + closeEnough < leader.distanceToSqr(walkTarget.target.currentPosition())) {
return
}
entity.brain.setMemory(
MemoryModuleType.WALK_TARGET,
CobblemonWalkTarget(
pos = walkTarget.target.currentBlockPosition(),
pos = walkTarget.target.currentPosition().add(getRandomOffset(entity, level)).toBlockPos(),
speedModifier = walkTarget.speedModifier,
nodeTypeFilter = (walkTarget as? CobblemonWalkTarget)?.nodeTypeFilter ?: { true },
completionRange = closeEnough.toInt()
@@ -120,4 +126,23 @@ class FollowHerdLeaderTask : Behavior<PokemonEntity>(
)
}
}
fun getRandomOffset(entity: PokemonEntity, level: ServerLevel): Vec3 {
val leader = leader ?: return Vec3.ZERO
val minRange = closeEnough.toDouble()
val maxRange = (tooFar - closeEnough / 2).toDouble()
val randomDistance = Mth.nextDouble(level.random, minRange, maxRange)
val randomAngle = Mth.nextDouble(level.random, 0.0, 2 * Math.PI)
var offset = Vec3(cos(randomAngle) * randomDistance, 0.0, sin(randomAngle) * randomDistance)
if ((entity.isInLiquid && leader.isInLiquid) || (entity.isFlying() && leader.isFlying())) {
val verticalRange = randomDistance * 0.5
val randomY = Mth.nextDouble(level.random, -verticalRange, verticalRange)
offset = offset.add(0.0, randomY, 0.0)
}
return offset
}
}
@@ -8,13 +8,16 @@
package com.cobblemon.mod.common.entity.ai
import com.cobblemon.mod.common.CobblemonBlocks
import com.cobblemon.mod.common.entity.OmniPathingEntity
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity
import com.cobblemon.mod.common.pokemon.ai.OmniPathNodeMaker
import com.cobblemon.mod.common.util.deleteNode
import com.cobblemon.mod.common.util.getWaterAndLavaIn
import com.cobblemon.mod.common.util.toVec3d
import com.google.common.collect.ImmutableSet
import net.minecraft.core.BlockPos
import net.minecraft.tags.BlockTags
import net.minecraft.tags.FluidTags
import net.minecraft.util.Mth
import net.minecraft.world.damagesource.DamageSource
@@ -181,7 +184,9 @@ class OmniPathNavigation(val world: Level, val entity: Mob) : GroundPathNavigati
target = blockPos
}
val path = if (!this.world.getBlockState(target).isSolid) {
val blockState = this.world.getBlockState(target)
val path = if (!blockState.isSolid
|| (blockState.`is`(BlockTags.LEAVES) && blockState.block == CobblemonBlocks.SACCHARINE_LEAVES && (this.entity as PokemonEntity).canPathThroughSaccLeaves())) {
findPath(target, distance)
} else {
blockPos = target.above()
@@ -264,6 +269,9 @@ class OmniPathNavigation(val world: Level, val entity: Mob) : GroundPathNavigati
// If we can fly and we're airborne, return the current Y position
return vec.y
}
if (world.getBlockState(blockPos).block == CobblemonBlocks.SACCHARINE_LEAVES && (this.entity as PokemonEntity).canPathThroughSaccLeaves()) {
return vec.y + 0.5
}
return if ((canFloat()) && blockGetter.getFluidState(blockPos).`is`(FluidTags.WATER)) vec.y + 0.5 else super.getGroundY(vec)
}
@@ -811,8 +811,11 @@ class PokeRodFishingBobberEntity(type: EntityType<out PokeRodFishingBobberEntity
// create accessory splash particle when you fish something up
particleEntityHandler(this, ResourceLocation.fromNamespaceAndPath("cobblemon", "accessory_fish_splash"))
var baitId = PokerodItem.getBaitStackOnRod(this.bobberBait).takeUnless { it.isEmpty }?.itemHolder?.unwrapKey()
?.orElse(null)?.location() ?: "empty_bait".asIdentifierDefaultingNamespace()
val baitId =
if (bobberBait.isEmpty)
"empty_bait".asIdentifierDefaultingNamespace()
else
bobberBait.itemHolder.unwrapKey().map { it.location() }.orElse("empty_bait".asIdentifierDefaultingNamespace())
val pokemonId = spawnedPokemon.pokemon.species.resourceIdentifier
CobblemonCriteria.REEL_IN_POKEMON.trigger(player, ReelInPokemonContext(pokemonId, baitId))
@@ -850,7 +853,7 @@ class PokeRodFishingBobberEntity(type: EntityType<out PokeRodFishingBobberEntity
BobberSpawnPokemonEvent.Post(
this,
spawnAction,
rodItemStack,
bobberBait,
entity
)
)
@@ -11,6 +11,7 @@ package com.cobblemon.mod.common.entity.npc
import com.cobblemon.mod.common.CobblemonBehaviours
import com.cobblemon.mod.common.CobblemonMemories
import com.cobblemon.mod.common.api.ai.BehaviourConfigurationContext
import com.cobblemon.mod.common.api.ai.config.AddVariablesConfig
import com.cobblemon.mod.common.api.ai.config.ApplyBehaviours
import com.cobblemon.mod.common.api.ai.config.BehaviourConfig
import com.cobblemon.mod.common.api.npc.NPCClass
@@ -22,6 +23,7 @@ object NPCBrain {
if (npcEntity.behavioursAreCustom) {
behaviourConfigurations = listOf(ApplyBehaviours().apply { behaviours.addAll(npcEntity.behaviours) })
}
behaviourConfigurations = behaviourConfigurations + AddVariablesConfig(npcClass.config)
val ctx = BehaviourConfigurationContext()
ctx.addMemories(CobblemonMemories.DIALOGUES)
@@ -708,6 +708,10 @@ class NPCEntity(world: Level) : AgeableMob(CobblemonEntities.NPC, world), Npc, P
return false
}
override fun canPathThroughSaccLeaves(): Boolean {
return false
}
override fun canFly(): Boolean {
return false
}
@@ -393,7 +393,8 @@ class EmptyPokeBallEntity : ThrowableItemProjectile, PosableEntity, WaterDragMod
private fun breakFree() {
val pokemon = capturingPokemon ?: return
pokemon.setPos(position())
pokemon.setPositionSafely(position())
pokemon.beamMode = 2
pokemon.isInvisible = false
pokemon.isSilent = false
@@ -490,7 +491,6 @@ class EmptyPokeBallEntity : ThrowableItemProjectile, PosableEntity, WaterDragMod
fun beginCapture() {
// We have hit the ground, time to stop falling and start shaking! Calculate capture.
capturingPokemon?.setPositionSafely(position())
val thrower = owner as LivingEntity
val captureResult = Cobblemon.config.captureCalculator.processCapture(thrower, this, capturingPokemon!!).let {
val event = PokeBallCaptureCalculatedEvent(thrower = thrower, pokemonEntity = capturingPokemon!!, pokeBallEntity = this, captureResult = it)
@@ -120,6 +120,7 @@ import com.cobblemon.mod.common.util.math.geometry.toRadians
import com.cobblemon.mod.common.world.gamerules.CobblemonGameRules
import com.mojang.serialization.Codec
import com.mojang.serialization.Dynamic
import net.minecraft.client.Minecraft
import java.util.Optional
import java.util.UUID
import java.util.concurrent.CompletableFuture
@@ -165,6 +166,7 @@ import net.minecraft.world.entity.ai.attributes.AttributeSupplier
import net.minecraft.world.entity.ai.attributes.Attributes
import net.minecraft.world.entity.ai.control.MoveControl
import net.minecraft.world.entity.ai.memory.MemoryModuleType
import net.minecraft.world.entity.ai.memory.MemoryStatus
import net.minecraft.world.entity.ai.sensing.Sensor
import net.minecraft.world.entity.ai.sensing.SensorType
import net.minecraft.world.entity.animal.Animal
@@ -1186,6 +1188,7 @@ open class PokemonEntity(
if (!this.canRide(player)) return@ifRidingAvailableSupply false
if (tethering != null) return@ifRidingAvailableSupply false
if (seats.isEmpty()) return@ifRidingAvailableSupply false
if ((owner as? ServerPlayer)?.isInBattle() == true) return@ifRidingAvailableSupply false
if (this.owner != player && this.passengers.isEmpty()) return@ifRidingAvailableSupply false
return@ifRidingAvailableSupply behaviour.isActive(settings, state, this)
}
@@ -1244,11 +1247,19 @@ open class PokemonEntity(
}
override fun checkDespawn() {
if (pokemon.getOwnerUUID() == null && !isPersistenceRequired && (!this.pokemon.canDropHeldItem || this.pokemon.heldItem.isEmpty) && despawner.shouldDespawn(this) ) {
if (pokemon.getOwnerUUID() == null && !isPersistenceRequired && despawner.shouldDespawn(this) ) {
discard()
}
}
override fun isPersistenceRequired(): Boolean {
return super.isPersistenceRequired()
|| (this.pokemon.canDropHeldItem && !this.pokemon.heldItem.isEmpty)
|| this.brain.checkMemory(CobblemonMemories.HIVE_LOCATION, MemoryStatus.VALUE_PRESENT)
|| this.brain.checkMemory(CobblemonMemories.HIVE_COOLDOWN, MemoryStatus.VALUE_PRESENT)
|| this.brain.checkMemory(CobblemonMemories.NEARBY_SACC_LEAVES, MemoryStatus.VALUE_PRESENT)
}
fun setBehaviourFlag(flag: PokemonBehaviourFlag, on: Boolean) {
entityData.set(BEHAVIOUR_FLAGS, setBitForByte(entityData.get(BEHAVIOUR_FLAGS), flag.bit, on))
}
@@ -2397,8 +2408,12 @@ open class PokemonEntity(
fun rideFovMult(): Float {
val driver = this.controllingPassenger as? Player ?: return 1.0f
val fovEffectScale = Minecraft.getInstance().options.fovEffectScale().get().toFloat()
return ifRidingAvailableSupply(fallback = 1.0f) { behaviour, settings, state ->
behaviour.rideFovMultiplier(settings, state, this, driver)
val rideFov = behaviour.rideFovMultiplier(settings, state, this, driver)
1f + (rideFov - 1f) * fovEffectScale
}
}
@@ -2430,6 +2445,7 @@ open class PokemonEntity(
override fun canWalkOnWater() = exposedForm.behaviour.moving.swim.canWalkOnWater
override fun canFly() = exposedForm.behaviour.moving.fly.canFly
override fun canSwimInLava() = exposedForm.behaviour.moving.swim.canSwimInLava
override fun canPathThroughSaccLeaves() = this.config.getMap().getOrDefault("can_path_through_sacc_leaves", DoubleValue.ZERO).asDouble() == 1.0
override fun canWalkOnLava() = exposedForm.behaviour.moving.swim.canWalkOnLava
override fun entityOnGround() = onGround()
@@ -9,17 +9,22 @@
package com.cobblemon.mod.common.entity.pokemon.ai.sensors
import com.cobblemon.mod.common.CobblemonMemories
import com.cobblemon.mod.common.block.SaccharineLeafBlock
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity
import net.minecraft.core.BlockPos
import net.minecraft.core.Direction
import net.minecraft.server.level.ServerLevel
import net.minecraft.tags.PoiTypeTags
import net.minecraft.world.entity.ai.sensing.Sensor
import net.minecraft.world.level.block.BeehiveBlock
import net.minecraft.world.entity.ai.village.poi.PoiManager
import net.minecraft.world.entity.ai.village.poi.PoiRecord
import net.minecraft.world.level.Level
import net.minecraft.world.level.block.Blocks
import net.minecraft.world.level.block.entity.BeehiveBlockEntity
import net.minecraft.world.level.block.entity.BlockEntity
class BeeHiveSensor : Sensor<PokemonEntity>(300) {
override fun requires() = setOf(CobblemonMemories.HIVE_LOCATION)
override fun requires() = setOf(CobblemonMemories.HIVE_LOCATION, CobblemonMemories.HIVE_BLACKLIST)
override fun doTick(world: ServerLevel, entity: PokemonEntity) {
val brain = entity.brain
val currentHive = brain.getMemory(CobblemonMemories.HIVE_LOCATION).orElse(null)
@@ -27,35 +32,30 @@ class BeeHiveSensor : Sensor<PokemonEntity>(300) {
if (currentHive != null) {
val state = world.getBlockState(currentHive)
if (!isValidHiveOrLeaf(state) || !hasReachableAdjacentSide(world, entity, currentHive)) {
brain.eraseMemory(CobblemonMemories.HIVE_LOCATION)
} else if (isAtMaxHoney(state)) {
if (!isValidHive(state) || !hasReachableAdjacentSide(world, currentHive)) {
brain.eraseMemory(CobblemonMemories.HIVE_LOCATION)
} else {
return // We already have a valid hive, no need to search for another
}
}
// Search for nearest hive/nest
val searchRadius = 16 // is this too big for us to use?
val centerPos = entity.blockPosition()
var closestHivePos: BlockPos? = null
var closestDistance = Double.MAX_VALUE
BlockPos.betweenClosedStream(
centerPos.offset(-searchRadius, -2, -searchRadius),
centerPos.offset(searchRadius, 2, searchRadius)
).forEach { pos ->
val state = world.getBlockState(pos)
val list = findNearbyHivesWithSpace(entity)
if (isValidHiveOrLeaf(state) && !isAtMaxHoney(state) && hasReachableAdjacentSide(world, entity, pos)) {
val distance = pos.distToCenterSqr(centerPos.x + 0.5, centerPos.y + 0.5, centerPos.z + 0.5)
if (distance < closestDistance) {
closestDistance = distance
closestHivePos = pos.immutable()
if (!list.isEmpty()) {
val blackList = brain.getMemory(CobblemonMemories.HIVE_BLACKLIST).orElse(emptyList())
for (blockPos in list) {
if (blackList.contains(blockPos)) continue
if (hasReachableAdjacentSide(world, blockPos)) {
closestHivePos = blockPos
break
}
}
if (closestHivePos == null) {
brain.eraseMemory(CobblemonMemories.HIVE_BLACKLIST)
closestHivePos = list.first()
}
}
if (closestHivePos != null) {
@@ -63,37 +63,47 @@ class BeeHiveSensor : Sensor<PokemonEntity>(300) {
}
}
private fun isAtMaxHoney(state: net.minecraft.world.level.block.state.BlockState): Boolean {
return when {
isHiveBlock(state) -> state.getValue(BeehiveBlock.HONEY_LEVEL) == BeehiveBlock.MAX_HONEY_LEVELS
isSaccharineLeafBlock(state) -> state.getValue(SaccharineLeafBlock.AGE) == SaccharineLeafBlock.MAX_AGE
else -> true // Unknown block type
}
private fun isValidHive(state: net.minecraft.world.level.block.state.BlockState): Boolean {
return isHiveBlock(state)
}
private fun isValidHiveOrLeaf(state: net.minecraft.world.level.block.state.BlockState): Boolean {
return isHiveBlock(state) || isSaccharineLeafBlock(state)
}
private fun isSaccharineLeafBlock(state: net.minecraft.world.level.block.state.BlockState): Boolean {
return state.block is SaccharineLeafBlock
}
private fun isHiveBlock(state: net.minecraft.world.level.block.state.BlockState): Boolean {
return state.`is`(Blocks.BEEHIVE) || state.`is`(Blocks.BEE_NEST)
}
private fun hasReachableAdjacentSide(world: ServerLevel, entity: PokemonEntity, pos: BlockPos): Boolean {
private fun hasReachableAdjacentSide(world: ServerLevel, pos: BlockPos): Boolean {
for (dir in Direction.entries) {
val adjacentPos = pos.relative(dir)
if (world.isEmptyBlock(adjacentPos)) {
val nav = entity.navigation
val path = nav.createPath(adjacentPos, 0)
if (path != null && path.canReach()) {
return true
}
return true
}
}
return false
}
private fun findNearbyHivesWithSpace(entity: PokemonEntity): List<BlockPos> {
val blockPos = entity.blockPosition()
val poiManager = (entity.level() as ServerLevel).poiManager
val stream = poiManager.getInRange(
{ holder -> holder.`is`(PoiTypeTags.BEE_HOME) },
blockPos,
20,
PoiManager.Occupancy.ANY
)
return stream
.map(PoiRecord::getPos)
.filter { pos -> doesHiveHaveSpace(pos, entity.level()) }
.sorted { pos1, pos2 -> pos1.distSqr(blockPos).toInt() - pos2.distSqr(blockPos).toInt() }
.toList()
}
private fun doesHiveHaveSpace(hivePos: BlockPos, world: Level): Boolean {
val blockEntity: BlockEntity? = world.getBlockEntity(hivePos)
if (blockEntity is BeehiveBlockEntity) {
return !blockEntity.isFull
} else {
return false
}
}
}
@@ -45,10 +45,12 @@ class DrowsySensor : Sensor<PokemonEntity>(20) {
entity.brain.eraseMemory(CobblemonMemories.POKEMON_DROWSY)
}
} else {
if (!isDrowsy && shouldBeDrowsy) {
if (!isDrowsy && shouldBeDrowsy && entity.random.nextFloat() < rest.drowsyChance) {
entity.brain.setMemory(CobblemonMemories.POKEMON_DROWSY, true)
} else if (isDrowsy && !shouldBeDrowsy) {
entity.brain.eraseMemory(CobblemonMemories.POKEMON_DROWSY)
} else if (isDrowsy && entity.random.nextFloat() < rest.rouseChance) {
entity.brain.eraseMemory(CobblemonMemories.POKEMON_DROWSY)
}
}
}
@@ -10,46 +10,73 @@ package com.cobblemon.mod.common.entity.pokemon.ai.sensors
import com.cobblemon.mod.common.CobblemonMemories
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity
import com.cobblemon.mod.common.util.distanceTo
import com.cobblemon.mod.common.util.getMemorySafely
import net.minecraft.core.BlockPos
import net.minecraft.core.Vec3i
import net.minecraft.server.level.ServerLevel
import net.minecraft.tags.BlockTags
import net.minecraft.world.entity.ai.sensing.Sensor
import net.minecraft.world.level.block.Blocks
import net.minecraft.world.level.block.DoublePlantBlock
import net.minecraft.world.level.block.state.BlockState
import net.minecraft.world.level.block.state.properties.BlockStateProperties
import net.minecraft.world.level.block.state.properties.DoubleBlockHalf
class FlowerSensor : Sensor<PokemonEntity>(120) {
override fun requires() = setOf(CobblemonMemories.NEARBY_FLOWERS)
override fun requires() = setOf(CobblemonMemories.NEARBY_FLOWER)
override fun doTick(world: ServerLevel, entity: PokemonEntity) {
val brain = entity.brain
val searchRadius = 32
val centerPos = entity.blockPosition()
val flowers = mutableListOf<BlockPos>()
// Check curr memory
val currPos = brain.getMemorySafely(CobblemonMemories.NEARBY_FLOWER).orElse(null)
if (currPos != null && isFlower(entity.level().getBlockState(currPos)) && entity.distanceTo(currPos) <= 32) {
return
}
val searchRadius = 5
val centerPos = entity.blockPosition()
var flowerPos: BlockPos? = null
var shortestDist = Double.MAX_VALUE
BlockPos.betweenClosedStream(
centerPos.offset(-searchRadius, -2, -searchRadius),
centerPos.offset(searchRadius, 2, searchRadius)
).forEach { pos ->
val state = world.getBlockState(pos)
if (isFlower(state) && isPathfindableTo(entity, pos)) {
flowers += pos.immutable()
if (isFlower(state)) {
val distance = pos.distSqr(Vec3i(centerPos.x, centerPos.y, centerPos.z))
if (distance < shortestDist) {
flowerPos = BlockPos(pos)
shortestDist = distance
}
}
}
if (!flowers.isEmpty()) {
brain.setMemory(CobblemonMemories.NEARBY_FLOWERS, flowers)
if (flowerPos != null) {
brain.setMemory(CobblemonMemories.NEARBY_FLOWER, flowerPos)
} else {
brain.eraseMemory(CobblemonMemories.NEARBY_FLOWERS)
brain.eraseMemory(CobblemonMemories.NEARBY_FLOWER)
}
}
private fun isFlower(state: BlockState): Boolean {
return state.`is`(BlockTags.FLOWERS)
}
private fun isPathfindableTo(entity: PokemonEntity, pos: BlockPos): Boolean {
val nav = entity.navigation
val path = nav.createPath(pos, 0)
return path != null && path.canReach()
// Borrowed from Bee.class
if (state.hasProperty(BlockStateProperties.WATERLOGGED) && state.getValue(
BlockStateProperties.WATERLOGGED
) as Boolean
) {
return false
} else if (state.`is`(BlockTags.FLOWERS)) {
if (state.`is`(Blocks.SUNFLOWER)) {
return state.getValue(DoublePlantBlock.HALF) == DoubleBlockHalf.UPPER
} else {
return true
}
} else {
return false
}
}
}
@@ -0,0 +1,79 @@
/*
* 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.entity.pokemon.ai.sensors
import com.cobblemon.mod.common.CobblemonMemories
import com.cobblemon.mod.common.block.SaccharineLeafBlock
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity
import com.cobblemon.mod.common.util.distanceTo
import com.cobblemon.mod.common.util.getMemorySafely
import net.minecraft.core.BlockPos
import net.minecraft.core.Vec3i
import net.minecraft.server.level.ServerLevel
import net.minecraft.world.entity.ai.sensing.Sensor
import net.minecraft.world.level.block.state.BlockState
import net.minecraft.world.level.block.state.properties.BlockStateProperties
import kotlin.time.measureTime
class SacLeavesSensor : Sensor<PokemonEntity>(120) {
override fun requires() = setOf(CobblemonMemories.NEARBY_SACC_LEAVES)
override fun doTick(world: ServerLevel, entity: PokemonEntity) {
val brain = entity.brain
val searchRadius = 7
val tooFarDistance = 30
val wayTooFarDistance = 64
val currPos: BlockPos? = brain.getMemorySafely(CobblemonMemories.NEARBY_SACC_LEAVES).orElse(null)
if (currPos != null && isValidLeafBlock(entity.level().getBlockState(currPos))) {
val distance = entity.distanceTo(currPos)
if (distance <= tooFarDistance) {
return
} else if (distance > wayTooFarDistance) {
brain.eraseMemory(CobblemonMemories.NEARBY_SACC_LEAVES)
}
}
val centerPos = entity.blockPosition()
var leavesPos: BlockPos? = null
var shortestDist = Double.MAX_VALUE
BlockPos.betweenClosedStream(
centerPos.offset(-searchRadius, -2, -searchRadius),
centerPos.offset(searchRadius, searchRadius, searchRadius)
).forEach { pos ->
val state = world.getBlockState(pos)
if (isValidLeafBlock(state)) {
val distance = pos.distSqr(Vec3i(centerPos.x, centerPos.y, centerPos.z))
if (distance < shortestDist) {
leavesPos = BlockPos(pos)
shortestDist = distance
}
}
}
if (leavesPos != null) {
brain.setMemory(CobblemonMemories.NEARBY_SACC_LEAVES, leavesPos)
} else {
brain.eraseMemory(CobblemonMemories.NEARBY_SACC_LEAVES)
}
}
private fun isValidLeafBlock(state: BlockState): Boolean {
if (state.block !is SaccharineLeafBlock) return false
if (state.hasProperty(BlockStateProperties.WATERLOGGED) && state.getValue(
BlockStateProperties.WATERLOGGED
) as Boolean
) {
return false
}
return state.getValue(SaccharineLeafBlock.AGE) != SaccharineLeafBlock.MAX_AGE
}
}
@@ -1,77 +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.entity.pokemon.ai.tasks
import com.cobblemon.mod.common.CobblemonMemories
import net.minecraft.core.BlockPos
import net.minecraft.world.entity.LivingEntity
import net.minecraft.world.entity.PathfinderMob
import net.minecraft.world.entity.ai.behavior.BlockPosTracker
import net.minecraft.world.entity.ai.behavior.OneShot
import net.minecraft.world.entity.ai.behavior.declarative.BehaviorBuilder
import net.minecraft.world.entity.ai.behavior.declarative.Trigger
import net.minecraft.world.entity.ai.memory.MemoryModuleType
import net.minecraft.world.entity.ai.memory.WalkTarget
import net.minecraft.world.phys.Vec3
object PathToBeeHiveTask {
fun create(): OneShot<in LivingEntity> {
return BehaviorBuilder.create {
it.group(
it.registered(MemoryModuleType.LOOK_TARGET),
it.absent(MemoryModuleType.WALK_TARGET),
it.present(CobblemonMemories.POLLINATED),
it.present(CobblemonMemories.HIVE_LOCATION),
it.absent(CobblemonMemories.HIVE_COOLDOWN)
).apply(it) { lookTarget, walkTarget, pollinated, hiveMemory, hiveCooldown ->
Trigger { world, entity, time ->
if (entity !is PathfinderMob || !entity.isAlive) {
return@Trigger false
}
val hiveLocation = it.get(hiveMemory)
val sidesByClosest = listOf(
hiveLocation.north(),
hiveLocation.south(),
hiveLocation.east(),
hiveLocation.west()
).sortedBy { it.distSqr(entity.blockPosition()) }
var openSide = BlockPos.ZERO
for (side in sidesByClosest) {
if (world.getBlockState(side).isAir) {
openSide = side
break
}
}
if (openSide == BlockPos.ZERO) {
if (world.getBlockState(hiveLocation.above()).isAir) {
// If the above position is also air, we can use it
openSide = hiveLocation.above() // Fallback to above if no open sides found
} else if (world.getBlockState(hiveLocation.below()).isAir) {
// If the below position is also air, we can use it
openSide = hiveLocation.below() // Fallback to below if no open sides found
} else {
// If no open sides or above/below positions are found, we cannot proceed
return@Trigger false
}
}
val targetVec = Vec3.atCenterOf(openSide)
// Set path target toward hive
walkTarget.set(WalkTarget(targetVec, 0.35F, 0))
lookTarget.set(BlockPosTracker(targetVec.add(0.0, entity.eyeHeight.toDouble(), 0.0)))
return@Trigger true
}
}
}
}
}
@@ -9,6 +9,7 @@
package com.cobblemon.mod.common.entity.pokemon.ai.tasks
import com.cobblemon.mod.common.CobblemonMemories
import com.cobblemon.mod.common.util.getMemorySafely
import net.minecraft.world.entity.LivingEntity
import net.minecraft.world.entity.PathfinderMob
import net.minecraft.world.entity.ai.behavior.BlockPosTracker
@@ -20,31 +21,26 @@ import net.minecraft.world.entity.ai.memory.WalkTarget
import net.minecraft.world.phys.Vec3
object PathToFlowerTask {
fun create(): OneShot<in LivingEntity> {
return BehaviorBuilder.create {
it.group(
it.registered(MemoryModuleType.LOOK_TARGET),
it.absent(MemoryModuleType.WALK_TARGET),
it.present(CobblemonMemories.NEARBY_FLOWERS),
it.absent(CobblemonMemories.POLLINATED),
it.present(CobblemonMemories.NEARBY_FLOWER),
it.registered(CobblemonMemories.HAS_NECTAR),
it.absent(CobblemonMemories.PATH_TO_NEARBY_FLOWER_COOLDOWN),
it.absent(CobblemonMemories.HIVE_COOLDOWN)
).apply(it) { lookTarget, walkTarget, flowerMemory, pollinated, hiveCooldown ->
).apply(it) { lookTarget, walkTarget, flowerMemory, pollinated, flowerCooldown, hiveCooldown ->
Trigger { world, entity, time ->
if (entity !is PathfinderMob || !entity.isAlive) return@Trigger false
val flowerLocations = it.get(flowerMemory).map(Vec3::atCenterOf)
if (flowerLocations.isEmpty()) {
return@Trigger false
}
val sortedByDistance = flowerLocations.sortedBy { it.distanceTo(entity.position()) }
val closestHalf = sortedByDistance.subList(0, flowerLocations.size / 2 + 1)
if (closestHalf.isEmpty()) {
return@Trigger false
}
val targetVec = closestHalf.random()
if (entity !is PathfinderMob || !entity.isAlive || world.isNight || world.isRaining || entity.brain.getMemorySafely(CobblemonMemories.HAS_NECTAR).orElse(false)) return@Trigger false
val flowerLocation = it.get(flowerMemory)
val targetVec = Vec3.atCenterOf(flowerLocation)
// if we're really close to one then forget it, pollination is gonna occur
if (flowerLocations.any { it.distanceToSqr(entity.x, entity.y, entity.z) <= 1.0 }) {
if (targetVec.distanceToSqr(entity.x, entity.y, entity.z) <= 1.0 ) {
return@Trigger false
}
@@ -10,33 +10,34 @@ package com.cobblemon.mod.common.entity.pokemon.ai.tasks
import com.cobblemon.mod.common.CobblemonMemories
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity
import com.cobblemon.mod.common.util.toVec3d
import net.minecraft.world.entity.LivingEntity
import net.minecraft.world.entity.PathfinderMob
import net.minecraft.world.entity.ai.behavior.BlockPosTracker
import net.minecraft.world.entity.ai.behavior.OneShot
import net.minecraft.world.entity.ai.behavior.declarative.BehaviorBuilder
import net.minecraft.world.entity.ai.behavior.declarative.Trigger
import net.minecraft.world.entity.ai.memory.MemoryModuleType
import net.minecraft.world.phys.Vec3
import net.minecraft.world.entity.ai.memory.WalkTarget
object PathToSacLeafTask {
object PollinateFlowerTask {
fun create(): OneShot<in LivingEntity> {
return BehaviorBuilder.create {
it.group(
it.present(CobblemonMemories.NEARBY_FLOWERS),
it.registered(MemoryModuleType.LOOK_TARGET),
it.absent(MemoryModuleType.WALK_TARGET),
it.absent(CobblemonMemories.POLLINATED),
it.absent(CobblemonMemories.HIVE_COOLDOWN)
).apply(it) { flowerMemory, walkTarget, pollinated, hiveCooldown ->
it.present(CobblemonMemories.HAS_NECTAR),
it.present(CobblemonMemories.NEARBY_SACC_LEAVES)
).apply(it) { lookTarget, walkTarget, pollinated, saccLeavesPos ->
Trigger { world, entity, time ->
if (entity !is PathfinderMob || !entity.isAlive) return@Trigger false
val flowerLocations = it.get(flowerMemory)
if (flowerLocations.any { it.distSqr(entity.blockPosition()) < 1 }) {
entity.brain.setMemoryWithExpiry(CobblemonMemories.POLLINATED, true, 20 * 20L) // 20 seconds to dump the pollen
if (entity is PokemonEntity) {
entity.pokemon.updateAspects()
}
if (entity !is PathfinderMob || !entity.isAlive || entity !is PokemonEntity || !it.get(pollinated) || world.isRaining || world.isNight) {
return@Trigger false
}
val targetPos = it.get(saccLeavesPos)
walkTarget.set(WalkTarget(targetPos, 0.35F, 0))
lookTarget.set(BlockPosTracker(targetPos.toVec3d().add(0.0, entity.eyeHeight.toDouble(), 0.0)))
return@Trigger true
}
@@ -9,31 +9,33 @@
package com.cobblemon.mod.common.entity.pokemon.ai.tasks
import com.cobblemon.mod.common.CobblemonMemories
import com.cobblemon.mod.common.block.SaccharineLeafBlock
import net.minecraft.world.entity.LivingEntity
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity
import com.cobblemon.mod.common.util.getMemorySafely
import net.minecraft.world.entity.PathfinderMob
import net.minecraft.world.entity.ai.behavior.OneShot
import net.minecraft.world.entity.ai.behavior.declarative.BehaviorBuilder
import net.minecraft.world.entity.ai.behavior.declarative.Trigger
import net.minecraft.world.entity.ai.memory.MemoryModuleType
import net.minecraft.world.entity.ai.memory.MemoryStatus
import net.minecraft.world.level.block.BeehiveBlock
import net.minecraft.world.level.block.entity.BeehiveBlockEntity
import net.minecraft.world.phys.Vec3
object PlaceHoneyInHiveTask {
fun create(): OneShot<in LivingEntity> {
fun create(): OneShot<PokemonEntity> {
return BehaviorBuilder.create {
it.group(
it.absent(MemoryModuleType.WALK_TARGET),
it.present(CobblemonMemories.POLLINATED),
it.registered(CobblemonMemories.HAS_NECTAR),
it.present(CobblemonMemories.HIVE_LOCATION),
it.absent(CobblemonMemories.HIVE_COOLDOWN)
it.absent(CobblemonMemories.HIVE_COOLDOWN),
).apply(it) { walkTarget, pollinated, hiveMemory, hiveCooldown ->
Trigger { world, entity, time ->
if (entity !is PathfinderMob) {
if (entity !is PathfinderMob || !wantsToEnterHive(entity)) {
return@Trigger false
}
val hiveCooldown = 1200L
val hiveLocation = it.get(hiveMemory)
val targetVec = Vec3.atCenterOf(hiveLocation)
@@ -45,19 +47,13 @@ object PlaceHoneyInHiveTask {
val state = world.getBlockState(hiveLocation)
val block = state.block
if (block is BeehiveBlock) {
val currentLevel = state.getValue(BeehiveBlock.HONEY_LEVEL)
if (currentLevel < BeehiveBlock.MAX_HONEY_LEVELS) {
world.setBlock(hiveLocation, state.setValue(BeehiveBlock.HONEY_LEVEL, currentLevel + 1), 3)
entity.brain.setMemoryWithExpiry(CobblemonMemories.HIVE_COOLDOWN, true, hiveCooldown)
entity.brain.eraseMemory(CobblemonMemories.POLLINATED)
}
} else if (block is SaccharineLeafBlock) {
val currentAge = state.getValue(SaccharineLeafBlock.AGE)
if (currentAge < SaccharineLeafBlock.MAX_AGE) {
world.setBlock(hiveLocation, state.setValue(SaccharineLeafBlock.AGE, currentAge + 1), 3)
entity.brain.setMemoryWithExpiry(CobblemonMemories.HIVE_COOLDOWN, true, hiveCooldown)
entity.brain.eraseMemory(CobblemonMemories.POLLINATED)
val blockEntity = world.getBlockEntity(hiveLocation)
if (blockEntity !is BeehiveBlockEntity) return@Trigger false
if (blockEntity.isFull) {
// Erase Hive memory and give the bee a moment to locate a new hive
entity.brain.eraseMemory(CobblemonMemories.HIVE_LOCATION)
}
blockEntity.addOccupant(entity)
}
return@Trigger true
@@ -65,4 +61,15 @@ object PlaceHoneyInHiveTask {
}
}
}
fun wantsToEnterHive( entity: PokemonEntity) : Boolean {
val result = !entity.brain.checkMemory(CobblemonMemories.HIVE_COOLDOWN, MemoryStatus.VALUE_PRESENT)
&& (entity.level().isRaining || entity.level().isNight || entity.brain.getMemory(CobblemonMemories.HAS_NECTAR).orElse(false))
if (result) {
val blockPos = entity.brain.getMemorySafely(CobblemonMemories.HIVE_LOCATION).orElse(null)
val blockEntity = entity.level().getBlockEntity(blockPos)
return blockEntity is BeehiveBlockEntity && !blockEntity.isFireNearby
}
return false
}
}
@@ -102,13 +102,11 @@ class AprijuiceItem(val type: Apricorn): CobblemonItem(Properties().stacksTo(16)
if (!canUseOnPokemon(stack, pokemon)) {
return InteractionResultHolder.fail(stack)
}
val boosts = getBoosts(stack, pokemon)
// Feed the Pokémon 1 fullness point
pokemon.feedPokemon(1)
boosts.forEach { (stat, value) ->
pokemon.addRideBoost(stat, value)
}
pokemon.feedPokemon(1)
val boosts = getBoosts(stack, pokemon)
pokemon.addRideBoosts(boosts)
stack.consume(1, player)
@@ -0,0 +1,32 @@
/*
* 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.item
import com.cobblemon.mod.common.api.battles.model.PokemonBattle
import com.cobblemon.mod.common.api.battles.model.actor.BattleActor
import com.cobblemon.mod.common.battles.pokemon.BattlePokemon
import com.cobblemon.mod.common.item.battle.BagItem
import com.cobblemon.mod.common.item.battle.SimpleBagItemLike
import net.minecraft.world.item.ItemStack
import net.minecraft.world.item.Items
class MoomooMilk(properties: Properties) : CobblemonItem(properties), SimpleBagItemLike {
override val bagItem = object : BagItem {
override val itemName = "item.cobblemon.moomoo_milk"
override val returnItem = Items.GLASS_BOTTLE
override fun canUse(stack: ItemStack, battle: PokemonBattle, target: BattlePokemon): Boolean {
return target.health > 0
}
override fun getShowdownInput(actor: BattleActor, battlePokemon: BattlePokemon, data: String?): String {
return "clear_boost"
}
}
}
@@ -53,7 +53,10 @@ interface BagItemLike {
battlePokemon.actor.forceChoose(BagItemActionResponse(bagItem, battlePokemon))
val stackName = BuiltInRegistries.ITEM.getKey(stack.item)
stack.consume(1, player)
if (!player.hasInfiniteMaterials()) {
stack.shrink(1)
battlePokemon.actor.itemsUsed.add(bagItem)
}
CobblemonCriteria.POKEMON_INTERACT.trigger(player, PokemonInteractContext(battlePokemon.effectedPokemon.species.resourceIdentifier, stackName))
return true
}
@@ -1867,19 +1867,40 @@ open class Pokemon : ShowdownIdentifiable {
}
val max = getMaxRideBoost(stat)
rideBoosts[stat] = (getRideBoost(stat) + boostAmount).coerceAtMost(max)
onChange(RideBoostsUpdatePacket({ this }, rideBoosts))
onChange(RideBoostsUpdatePacket({ this }, getRideBoosts()))
return true
}
fun addRideBoosts(boosts: Map<RidingStat, Float>) {
var changed = false
for (boost in boosts) {
val (stat, boostAmount) = boost
if (!canAddRideBoost(stat)) {
continue
}
val max = getMaxRideBoost(stat)
rideBoosts[stat] = (getRideBoost(stat) + boostAmount).coerceAtMost(max)
changed = true
}
if (changed) {
onChange(RideBoostsUpdatePacket({ this }, getRideBoosts()))
}
}
fun setRideBoost(stat: RidingStat, boost: Float) {
rideBoosts[stat] = boost.coerceIn(0F, getMaxRideBoost(stat))
onChange(RideBoostsUpdatePacket({ this }, rideBoosts))
onChange(RideBoostsUpdatePacket({ this }, getRideBoosts()))
}
fun setRideBoosts(boosts: Map<RidingStat, Float>) {
rideBoosts.clear()
rideBoosts.putAll(boosts.mapValues { it.value.coerceIn(0F, getMaxRideBoost(it.key)) })
onChange(RideBoostsUpdatePacket({ this }, rideBoosts))
onChange(RideBoostsUpdatePacket({ this }, getRideBoosts()))
}
fun getExperienceToNextLevel() = getExperienceToLevel(level + 1)
@@ -14,10 +14,11 @@ import com.cobblemon.mod.common.api.molang.ObjectValue
class BlockBehavior {
private val immuneToSweetBerryBushBlock = false
private val canStandOnPowderSnow = false
val canPathThroughSaccLeaves = false
@Transient
val struct = ObjectValue(this).also {
it.addFunction("immune_to_sweet_berry_bush_block") { DoubleValue(immuneToSweetBerryBushBlock) }
it.addFunction("can_stand_on_powder_snow") { DoubleValue(canStandOnPowderSnow) }
it.addFunction("can_path_through_sacc_leaves") { DoubleValue(canPathThroughSaccLeaves) }
}
}
@@ -8,15 +8,13 @@
package com.cobblemon.mod.common.pokemon.ai
import com.cobblemon.mod.common.CobblemonBlocks
import com.cobblemon.mod.common.entity.OmniPathingEntity
import com.cobblemon.mod.common.util.canFit
import com.google.common.collect.Maps
import it.unimi.dsi.fastutil.longs.Long2ObjectFunction
import it.unimi.dsi.fastutil.longs.Long2ObjectMap
import it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap
import java.util.EnumSet
import java.util.function.Predicate
import kotlin.math.max
import net.minecraft.core.BlockPos
import net.minecraft.core.Direction
import net.minecraft.tags.BlockTags
@@ -29,15 +27,14 @@ import net.minecraft.world.level.block.BaseRailBlock
import net.minecraft.world.level.block.Blocks
import net.minecraft.world.level.block.FenceGateBlock
import net.minecraft.world.level.material.FluidState
import net.minecraft.world.level.pathfinder.Node
import net.minecraft.world.level.pathfinder.NodeEvaluator
import net.minecraft.world.level.pathfinder.PathComputationType
import net.minecraft.world.level.pathfinder.PathType
import net.minecraft.world.level.pathfinder.PathfindingContext
import net.minecraft.world.level.pathfinder.*
import net.minecraft.world.level.pathfinder.Target
import net.minecraft.world.level.pathfinder.WalkNodeEvaluator
import net.minecraft.world.phys.AABB
import net.minecraft.world.phys.Vec3
import java.util.*
import java.util.function.Predicate
import kotlin.math.max
/**
* A path node maker that constructs paths knowing that the entity might be capable of
@@ -88,6 +85,7 @@ class OmniPathNodeMaker : NodeEvaluator() {
Long2ObjectFunction<PathType?> { this.getPathTypeOfMob(currentContext, x, y, z, entity) }
)
}
fun doesBlockHavePartialCollision(pathType: PathType): Boolean {
return pathType == PathType.FENCE || pathType == PathType.DOOR_WOOD_CLOSED || pathType == PathType.DOOR_IRON_CLOSED
}
@@ -96,7 +94,15 @@ class OmniPathNodeMaker : NodeEvaluator() {
return max(1.125, mob.maxUpStep().toDouble())
}
protected fun findAcceptedNodeWalk(x: Int, y: Int, z: Int, verticalDeltaLimit: Int, nodeFloorLevel: Double, direction: Direction?, pathType: PathType?): Node? {
protected fun findAcceptedNodeWalk(
x: Int,
y: Int,
z: Int,
verticalDeltaLimit: Int,
nodeFloorLevel: Double,
direction: Direction?,
pathType: PathType?
): Node? {
var node: Node? = null
val mutableBlockPos = BlockPos.MutableBlockPos()
val d: Double = this.getFloorLevel(mutableBlockPos.set(x, y, z))
@@ -113,12 +119,23 @@ class OmniPathNodeMaker : NodeEvaluator() {
if (f >= 0.0f) {
node = this.getNodeAndUpdateCostToMax(x, y, z, pathType2, f)
}
if ( pathType?.let { doesBlockHavePartialCollision(it) } == true && node != null && node.costMalus >= 0.0f && !this.canReachWithoutCollision(node)) {
if (pathType?.let { doesBlockHavePartialCollision(it) } == true && node != null && node.costMalus >= 0.0f && !this.canReachWithoutCollision(
node
)) {
node = null
}
if (pathType2 != PathType.WALKABLE ) {
if (pathType2 != PathType.WALKABLE) {
if ((node == null || node.costMalus < 0.0f) && verticalDeltaLimit > 0 && (pathType2 != PathType.FENCE || canWalkOverFences()) && pathType2 != PathType.UNPASSABLE_RAIL && pathType2 != PathType.TRAPDOOR && pathType2 != PathType.POWDER_SNOW) {
node = this.tryJumpOn(x, y, z, verticalDeltaLimit, nodeFloorLevel, direction!!, pathType!!, mutableBlockPos)
node = this.tryJumpOn(
x,
y,
z,
verticalDeltaLimit,
nodeFloorLevel,
direction!!,
pathType!!,
mutableBlockPos
)
} else if (pathType2 == PathType.WATER && !canFloat()) {
node = this.tryFindFirstNonWaterBelow(x, y, z, node)
} else if (pathType2 == PathType.OPEN) {
@@ -143,7 +160,11 @@ class OmniPathNodeMaker : NodeEvaluator() {
private fun canReachWithoutCollision(node: Node): Boolean {
var aABB = mob.boundingBox
var vec3 = Vec3(node.x.toDouble() - mob.x + aABB.xsize / 2.0, node.y.toDouble() - mob.y + aABB.ysize / 2.0, node.z.toDouble() - mob.z + aABB.zsize / 2.0)
var vec3 = Vec3(
node.x.toDouble() - mob.x + aABB.xsize / 2.0,
node.y.toDouble() - mob.y + aABB.ysize / 2.0,
node.z.toDouble() - mob.z + aABB.zsize / 2.0
)
val i = Mth.ceil(vec3.length() / aABB.size)
vec3 = vec3.scale((1.0f / i.toFloat()).toDouble())
for (j in 1..i) {
@@ -187,13 +208,22 @@ class OmniPathNodeMaker : NodeEvaluator() {
}
private fun getNodeAndUpdateCostToMax(x: Int, y: Int, z: Int, pathType: PathType, malus: Float): Node? {
val node = this.getNode(x, y, z) ?: super.getNode(x,y,z) ?: return null
val node = this.getNode(x, y, z) ?: super.getNode(x, y, z) ?: return null
node.type = pathType
node.costMalus = max(node.costMalus.toDouble(), malus.toDouble()).toFloat()
return node
}
private fun tryJumpOn(x: Int, y: Int, z: Int, verticalDeltaLimit: Int, nodeFloorLevel: Double, direction: Direction, pathType: PathType, pos: BlockPos.MutableBlockPos): Node? {
private fun tryJumpOn(
x: Int,
y: Int,
z: Int,
verticalDeltaLimit: Int,
nodeFloorLevel: Double,
direction: Direction,
pathType: PathType,
pos: BlockPos.MutableBlockPos
): Node? {
val node = findAcceptedNodeWalk(x, y + 1, z, verticalDeltaLimit - 1, nodeFloorLevel, direction, pathType)
return if (node == null) {
null
@@ -205,7 +235,20 @@ class OmniPathNodeMaker : NodeEvaluator() {
val d = (x - direction.stepX).toDouble() + 0.5
val e = (z - direction.stepZ).toDouble() + 0.5
val f = mob.bbWidth.toDouble() / 2.0
val aABB = AABB(d - f, this.getFloorLevel(pos.set(d, (y + 1).toDouble(), e)) + 0.001, e - f, d + f, mob.bbHeight.toDouble() + this.getFloorLevel(pos.set(node.x.toDouble(), node.y.toDouble(), node.z.toDouble())) - 0.002, e + f)
val aABB = AABB(
d - f,
this.getFloorLevel(pos.set(d, (y + 1).toDouble(), e)) + 0.001,
e - f,
d + f,
mob.bbHeight.toDouble() + this.getFloorLevel(
pos.set(
node.x.toDouble(),
node.y.toDouble(),
node.z.toDouble()
)
) - 0.002,
e + f
)
if (this.hasCollisions(aABB)) null else node
}
}
@@ -227,7 +270,9 @@ class OmniPathNodeMaker : NodeEvaluator() {
if ((canFloat()) && blockGetter.getFluidState(pos).`is`(FluidTags.WATER)) {
return pos.y.toDouble() + 0.5
}
return if ((canFloat()) && blockGetter.getFluidState(pos).`is`(FluidTags.WATER)) pos.y.toDouble() + 0.5 else WalkNodeEvaluator.getFloorLevel(blockGetter, pos)
return if ((canFloat()) && blockGetter.getFluidState(pos)
.`is`(FluidTags.WATER)
) pos.y.toDouble() + 0.5 else WalkNodeEvaluator.getFloorLevel(blockGetter, pos)
}
override fun getNeighbors(successors: Array<Node?>, node: Node): Int {
@@ -241,11 +286,20 @@ class OmniPathNodeMaker : NodeEvaluator() {
// Non-diagonal surroundings in 3d space
for (direction in Direction.entries) {
var pathNode : Node?
var pathNode: Node?
if (mob.isInWater || canFly()) {
pathNode = this.getNode(node.x + direction.stepX, node.y + direction.stepY, node.z + direction.stepZ) ?: continue
pathNode = this.getNode(node.x + direction.stepX, node.y + direction.stepY, node.z + direction.stepZ)
?: continue
} else {
pathNode = findAcceptedNodeWalk(node.x + direction.stepX, node.y + direction.stepY, node.z + direction.stepZ, if (direction == Direction.DOWN || direction == Direction.UP) 0 else 1, d, direction, node.type) ?: continue
pathNode = findAcceptedNodeWalk(
node.x + direction.stepX,
node.y + direction.stepY,
node.z + direction.stepZ,
if (direction == Direction.DOWN || direction == Direction.UP) 0 else 1,
d,
direction,
node.type
) ?: continue
}
map[direction] = pathNode
if (!hasNotVisited(pathNode, node)) {
@@ -259,21 +313,34 @@ class OmniPathNodeMaker : NodeEvaluator() {
val direction2 = direction.clockWise
val x = node.x + direction.stepX + direction2.stepX
val z = node.z + direction.stepZ + direction2.stepZ
var pathNode2 : Node?
var pathNode2: Node?
if (mob.isInWater || canFly()) {
pathNode2 = this.getNode(x, node.y, z) ?: continue
} else {
pathNode2 = findAcceptedNodeWalk(x, node.y, z, if (direction == Direction.DOWN || direction == Direction.UP) 0 else 1, d, direction, node.type) ?: continue
pathNode2 = findAcceptedNodeWalk(
x,
node.y,
z,
if (direction == Direction.DOWN || direction == Direction.UP) 0 else 1,
d,
direction,
node.type
) ?: continue
}
// Skip 'inaccessible' diagonals if we're pathing from a blocked node since we're trying to get unstuck
if (isAccessibleDiagonal(pathNode2, map[direction], map[direction2]) || (node.type == PathType.BLOCKED && !pathNode2.closed)) {
if (isAccessibleDiagonal(
pathNode2,
map[direction],
map[direction2]
) || (node.type == PathType.BLOCKED && !pathNode2.closed)
) {
successors[i++] = pathNode2
}
}
if (canFly() || mob.isInWater) {
// Upward non-diagonals
for (direction in Direction.Plane.HORIZONTAL.iterator()) {
var pathNode2 : Node? = null
var pathNode2: Node? = null
pathNode2 = getNode(node.x + direction.stepX, node.y + 1, node.z + direction.stepZ) ?: continue
if (upIsOpen && hasNotVisited(pathNode2, node)) {
@@ -285,8 +352,12 @@ class OmniPathNodeMaker : NodeEvaluator() {
// Upward diagonals
for (direction in Direction.Plane.HORIZONTAL.iterator()) {
val direction2 = direction.clockWise
var pathNode2 : Node? = null
pathNode2 = getNode(node.x + direction.stepX + direction2.stepX, node.y + 1, node.z + direction.stepZ + direction2.stepZ) ?: continue
var pathNode2: Node? = null
pathNode2 = getNode(
node.x + direction.stepX + direction2.stepX,
node.y + 1,
node.z + direction.stepZ + direction2.stepZ
) ?: continue
if (isAccessibleDiagonal(pathNode2, upperMap[direction], upperMap[direction2])) {
successors[i++] = pathNode2
@@ -309,7 +380,11 @@ class OmniPathNodeMaker : NodeEvaluator() {
// Downward diagonals
for (direction in Direction.Plane.HORIZONTAL.iterator()) {
val direction2 = direction.clockWise
val pathNode2 = getNode(node.x + direction.stepX + direction2.stepX, node.y - 1, node.z + direction.stepZ + direction2.stepZ) ?: continue
val pathNode2 = getNode(
node.x + direction.stepX + direction2.stepX,
node.y - 1,
node.z + direction.stepZ + direction2.stepZ
) ?: continue
if (isAccessibleDiagonal(pathNode2, lowerMap[direction], lowerMap[direction2])) {
successors[i++] = pathNode2
}
@@ -352,7 +427,12 @@ class OmniPathNodeMaker : NodeEvaluator() {
}
fun isAccessibleDiagonal(pathNode: Node, vararg borderNodes: Node?): Boolean {
return borderNodes.all{ it != null && hasNotVisited(pathNode, it) } && borderNodes.all { it != null && it.costMalus >= 0.0F }
return borderNodes.all {
it != null && hasNotVisited(
pathNode,
it
)
} && borderNodes.all { it != null && it.costMalus >= 0.0F }
}
fun isValidPathType(type: PathType): Boolean {
@@ -385,7 +465,9 @@ class OmniPathNodeMaker : NodeEvaluator() {
}
fun addNodePos(x: Int, y: Int, z: Int): PathType {
return nodePosToType.computeIfAbsent(BlockPos.asLong(x, y, z), Long2ObjectFunction { getPathTypeOfMob(currentContext, x, y, z, mob) })
return nodePosToType.computeIfAbsent(
BlockPos.asLong(x, y, z),
Long2ObjectFunction { getPathTypeOfMob(currentContext, x, y, z, mob) })
}
override fun getPathType(pfContext: PathfindingContext, x: Int, y: Int, z: Int): PathType {
@@ -411,7 +493,7 @@ class OmniPathNodeMaker : NodeEvaluator() {
var figuredNode = if (blockState.`is`(BlockTags.FENCES) || blockState.`is`(BlockTags.WALLS)) {
PathType.FENCE
} else if (blockStateBelow.block is FenceGateBlock) {
if(blockStateBelow.getValue(FenceGateBlock.OPEN)) {
if (blockStateBelow.getValue(FenceGateBlock.OPEN)) {
PathType.OPEN
} else {
PathType.FENCE
@@ -440,6 +522,8 @@ class OmniPathNodeMaker : NodeEvaluator() {
// PathType.WALKABLE
// } else if (blockState.canPathfindThrough(world, pos, NavigationType.AIR) && !blockStateBelow.isSideSolid(world, below, Direction.UP, SideShapeType.FULL)) {
// PathType.OPEN
} else if (blockState.`is`(BlockTags.LEAVES) && blockState.block == CobblemonBlocks.SACCHARINE_LEAVES && canPathThroughLeaves()) {
return PathType.OPEN
} else PathType.BLOCKED
if (figuredNode == PathType.OPEN && pos.y >= pfContext.level().getMinBuildHeight() + 1) {
@@ -470,10 +554,15 @@ class OmniPathNodeMaker : NodeEvaluator() {
val sizeX = (mob.boundingBox.maxX - mob.boundingBox.minX).toInt() + 1
val sizeY = (mob.boundingBox.maxY - mob.boundingBox.minY).toInt() + 1
val sizeZ = (mob.boundingBox.maxZ - mob.boundingBox.minZ).toInt() + 1
val type = findNearbyNodeTypes(pfContext, x, y, z, sizeX, sizeY, sizeZ, canOpenDoors, canPassDoors, set, PathType.BLOCKED,
val type = findNearbyNodeTypes(
pfContext, x, y, z, sizeX, sizeY, sizeZ, canOpenDoors, canPassDoors, set, PathType.BLOCKED,
BlockPos(x, y, z)
)
if (PathType.LEAVES in set) {
return PathType.OPEN
}
if (PathType.FENCE in set) {
return PathType.FENCE
}
@@ -574,7 +663,11 @@ class OmniPathNodeMaker : NodeEvaluator() {
} else if (type == PathType.RAIL && block !is BaseRailBlock && pfContext.getBlockState(pos.below()).block !is BaseRailBlock) {
PathType.UNPASSABLE_RAIL
} else if (type == PathType.LEAVES) {
PathType.BLOCKED
if (blockState.block === CobblemonBlocks.SACCHARINE_LEAVES && canPathThroughLeaves()) {
PathType.OPEN
} else {
PathType.BLOCKED
}
} else type
}
@@ -594,13 +687,13 @@ class OmniPathNodeMaker : NodeEvaluator() {
}
}
fun canSwimInWater(): Boolean {
return if (this.mob is OmniPathingEntity) {
(this.mob as OmniPathingEntity).canSwimInWater()
} else {
false
}
}
fun canSwimInWater(): Boolean {
return if (this.mob is OmniPathingEntity) {
(this.mob as OmniPathingEntity).canSwimInWater()
} else {
false
}
}
fun canSwimUnderFluid(fluidState: FluidState): Boolean {
return if (this.mob is OmniPathingEntity) {
@@ -610,6 +703,14 @@ class OmniPathNodeMaker : NodeEvaluator() {
}
}
fun canPathThroughLeaves() : Boolean {
return if (this.mob is OmniPathingEntity) {
(this.mob as OmniPathingEntity).canPathThroughSaccLeaves()
} else {
false
}
}
fun canWalkOnWater(): Boolean {
return if (this.mob is OmniPathingEntity) {
(this.mob as OmniPathingEntity).canWalkOnWater()
@@ -195,8 +195,8 @@ object PokemonBrain {
CobblemonMemories.RECENTLY_ATE_GRASS,
CobblemonMemories.HIVE_LOCATION,
CobblemonMemories.HIVE_COOLDOWN,
CobblemonMemories.NEARBY_FLOWERS,
CobblemonMemories.POLLINATED,
CobblemonMemories.NEARBY_FLOWER,
CobblemonMemories.HAS_NECTAR,
CobblemonMemories.RECENTLY_ATE_GRASS,
CobblemonMemories.HERD_LEADER,
CobblemonMemories.HERD_SIZE,
@@ -33,6 +33,8 @@ class RestBehaviour {
val depth = SleepDepth.normal
val canSeeSky: Boolean? = null
val skyLight: IntRange? = null
val drowsyChance: Float = 1 / 60F // Once per minute on average. Drowsy sensor runs once per second.
val rouseChance: Float = 1 / 120F // Once every two minutes on average. Drowsy sensor runs once per second.
val willSleepOnBed = false
@@ -100,53 +100,58 @@ object CobblemonHeldItemManager : BaseCobblemonHeldItemManager() {
return this.showdownIdOf(itemStack.item)
}
override fun handleStartInstruction(pokemon: BattlePokemon, battle: PokemonBattle, battleMessage: BattleMessage) {
val itemID = battleMessage.effectAt(1)?.id ?: return
val consumeHeldItems = this.shouldConsumeItem(pokemon, battle, itemID)
if (battleMessage.hasOptionalArgument("silent")) {
if (consumeHeldItems) {
this.take(pokemon, itemID)
}
return
}
val effect = battleMessage.effect()
val battlerName = pokemon.getName()
val itemName = this.nameOf(itemID)
// Airballoon is the only item using the null effect gimmick
if (effect == null) {
battle.broadcastChatMessage(battleLang("item.$itemID", battlerName, itemName))
return
}
val sourceName = battleMessage.battlePokemonFromOptional(battle)?.getName() ?: Component.literal("UNKNOWN")
val effectId = effect.id
val text = when (effectId) {
"magician", "pickpocket", "covet", "thief" -> battleLang("item.thief", battlerName, itemName, sourceName) // The "source" is actually the target here
"pickup", "recycle" -> battleLang("item.recycle", battlerName, itemName)
"switcheroo", "trick" -> battleLang("item.trick", battlerName, itemName)
else -> battleLang("item.$effectId", battlerName, itemName, sourceName)
}
battle.broadcastChatMessage(text)
// If it's a take and give effect, we don't want to follow through if we are not consuming held items
if (this.takeItemEffect.contains(effectId) && this.giveItemEffect.contains(effectId) && !consumeHeldItems) {
return
}
// Block item swapping in PVP until we have a rule
if (battle.isPvP && !consumeHeldItems) {
return
}
// Block stealing from NPCs
if (battle.isPvN) {
return
}
// if items aren't consumed, then we don't want to give them to wild pokemon (dupe)
if (this.giveItemEffect.contains(effectId) && (pokemon.actor is PlayerBattleActor || consumeHeldItems)) {
this.give(pokemon, itemID)
}
// allow players to steal wild held items
if (this.takeItemEffect.contains(effectId) && (pokemon.actor !is PlayerBattleActor || consumeHeldItems)) {
battleMessage.actorAndActivePokemonFromOptional(battle)?.second?.battlePokemon?.let { this.take(it, itemID) }
override fun handleStartInstruction(pokemon: BattlePokemon, battle: PokemonBattle, battleMessage: BattleMessage) {
val itemID = battleMessage.effectAt(1)?.id ?: return
val consumeHeldItems = this.shouldConsumeItem(pokemon, battle, itemID)
if (battleMessage.hasOptionalArgument("silent")) {
if (consumeHeldItems) {
this.take(pokemon, itemID)
}
return
}
val effect = battleMessage.effect()
val battlerName = pokemon.getName()
val itemName = this.nameOf(itemID)
// Airballoon is the only item using the null effect gimmick
if (effect == null) {
battle.broadcastChatMessage(battleLang("item.$itemID", battlerName, itemName))
return
}
val sourceName = battleMessage.battlePokemonFromOptional(battle)?.getName() ?: Component.literal("UNKNOWN")
val effectId = effect.id
val text = when (effectId) {
"magician", "pickpocket", "covet", "thief" -> battleLang("item.thief", battlerName, itemName, sourceName) // The "source" is actually the target here
"pickup", "recycle" -> battleLang("item.recycle", battlerName, itemName)
"switcheroo", "trick" -> battleLang("item.trick", battlerName, itemName)
else -> battleLang("item.$effectId", battlerName, itemName, sourceName)
}
battle.broadcastChatMessage(text)
// If it's a take and give effect, we don't want to follow through if we are not consuming held items
if (this.takeItemEffect.contains(effectId) && this.giveItemEffect.contains(effectId) && !consumeHeldItems) {
return
}
// TODO: This is strictly a temporary fix to prevent duping, we should determine a proper solution where we
// can allow physical item swapping while covering the proper use cases here.
if (this.takeItemEffect.contains(effectId) || this.giveItemEffect.contains(effectId)) {
return
}
// Block item swapping in PVP until we have a rule
if (battle.isPvP && !consumeHeldItems) {
return
}
// Block stealing from NPCs
if (battle.isPvN) {
return
}
// if items aren't consumed, then we don't want to give them to wild pokemon (dupe)
if (this.giveItemEffect.contains(effectId) && (pokemon.actor is PlayerBattleActor || consumeHeldItems)) {
this.give(pokemon, itemID)
}
// allow players to steal wild held items
if (this.takeItemEffect.contains(effectId) && (pokemon.actor !is PlayerBattleActor || consumeHeldItems)) {
battleMessage.actorAndActivePokemonFromOptional(battle)?.second?.battlePokemon?.let { this.take(it, itemID) }
}
}
override fun handleEndInstruction(pokemon: BattlePokemon, battle: PokemonBattle, battleMessage: BattleMessage) {
val itemID = battleMessage.effectAt(1)?.id ?: return
@@ -151,6 +151,7 @@ object DataKeys {
const val HEALER_MACHINE_INFINITE = "MachineInfinite"
// Cooking
const val AMOUNT_SPAWNED = "AmountSpawned"
const val FLAVOUR = "Flavour"
const val BAIT_EFFECTS = "BaitEffects"
const val INGREDIENTS = "Ingredients"
@@ -17,14 +17,20 @@ import kotlin.math.floor
import kotlin.math.min
import net.minecraft.core.BlockPos
import net.minecraft.core.Direction
import net.minecraft.core.registries.BuiltInRegistries
import net.minecraft.core.registries.Registries
import net.minecraft.nbt.NbtOps
import net.minecraft.nbt.Tag
import net.minecraft.network.syncher.EntityDataAccessor
import net.minecraft.network.syncher.SynchedEntityData
import net.minecraft.resources.ResourceLocation
import net.minecraft.tags.TagKey
import net.minecraft.util.ExtraCodecs
import net.minecraft.world.entity.Entity
import net.minecraft.world.entity.LivingEntity
import net.minecraft.world.entity.ai.memory.MemoryModuleType
import net.minecraft.world.entity.ai.memory.MemoryStatus
import net.minecraft.world.entity.schedule.Activity
import net.minecraft.world.level.Level
import net.minecraft.world.phys.AABB
import net.minecraft.world.phys.Vec3
@@ -40,8 +46,45 @@ fun Entity.makeEmptyBrainDynamic() = Dynamic(
fun Entity.effectiveName() = this.displayName ?: this.name
fun LivingEntity.hasMemory(memoryIdentifier: ResourceLocation): Boolean {
val registry = BuiltInRegistries.MEMORY_MODULE_TYPE
val memoryType = registry.get(memoryIdentifier)
return brain.checkMemory(memoryType, MemoryStatus.VALUE_PRESENT)
}
fun LivingEntity.hasMemory(tagKey: TagKey<MemoryModuleType<*>>): Boolean {
val registry = BuiltInRegistries.MEMORY_MODULE_TYPE
val memoryTypesInTag = registry.getTag(tagKey).orElse(null) ?: return false
return memoryTypesInTag.any { brain.checkMemory(it.value(), MemoryStatus.VALUE_PRESENT) }
}
fun LivingEntity.hasMemoryFromString(memory: String): Boolean {
val key = memory.asIdentifierOrTag(Registries.MEMORY_MODULE_TYPE)
return key.map(
{ hasMemory(memoryIdentifier = it) },
{ hasMemory(tagKey = it) }
)
}
fun LivingEntity.isDoingActivity(activityIdentifier: ResourceLocation): Boolean {
val registry = BuiltInRegistries.ACTIVITY
val activity = registry.get(activityIdentifier) ?: return false
return brain.isActive(activity)
}
fun LivingEntity.isDoingActivity(tagKey: TagKey<Activity>): Boolean {
val registry = BuiltInRegistries.ACTIVITY
val activitiesInTag = registry.getTag(tagKey).orElse(null) ?: return false
return activitiesInTag.any { brain.isActive(it.value()) }
}
fun LivingEntity.isDoingActivityFromString(activity: String): Boolean {
val key = activity.asIdentifierOrTag(Registries.ACTIVITY)
return key.map(
{ isDoingActivity(activityIdentifier = it) },
{ isDoingActivity(tagKey = it) }
)
}
private fun getPosScore(level: Level, entity: Entity, box: AABB, pos: BlockPos): Int {
// position the hitbox in the xz center of the block
@@ -10,6 +10,11 @@ package com.cobblemon.mod.common.util
import com.cobblemon.mod.common.Cobblemon
import com.cobblemon.mod.common.api.pokemon.PokemonProperties
import com.mojang.datafixers.util.Either
import net.minecraft.core.Registry
import net.minecraft.resources.ResourceKey
import net.minecraft.resources.ResourceLocation
import net.minecraft.tags.TagKey
const val QUOTE = '"'
@@ -62,6 +67,15 @@ fun String.splitMap(delimiter: String, assigner: String) : MutableList<Pair<Stri
return result
}
fun <T, U : Registry<T>> String.asIdentifierOrTag(resourceKey: ResourceKey<U>): Either<ResourceLocation, TagKey<T>> {
return if (this.startsWith("#")) {
val tagLocation = ResourceLocation.parse(this.substring(1))
Either.right(TagKey.create<T>(resourceKey, tagLocation))
} else {
Either.left(ResourceLocation.parse(this))
}
}
fun String.isLaterVersion(otherVersion: String): Boolean {
if (this === otherVersion) {
return false
@@ -86,8 +86,8 @@ internal data class ClientPokemonP3(
Optional.ofNullable(pokemon.heldItemVisible),
Optional.ofNullable(pokemon.cosmeticItem.takeIf { !it.isEmpty }),
Optional.ofNullable(pokemon.activeMark?.identifier),
pokemon.marks.map { it.identifier }.toSet(),
pokemon.potentialMarks.map { it.identifier }.toSet(),
pokemon.marks.toList().map { it.identifier }.toSet(),
pokemon.potentialMarks.toList().map { it.identifier }.toSet(),
pokemon.markings,
pokemon.getRideBoosts().mapKeys { it.key.name },
pokemon.currentFullness,
@@ -21,7 +21,7 @@
"per_update_expression": "variable.radius = 0.6;"
},
"minecraft:emitter_rate_steady": {
"spawn_rate": 30,
"spawn_rate": 60,
"max_particles": 10000
},
"minecraft:emitter_lifetime_expression": {
@@ -29,14 +29,14 @@
},
"minecraft:emitter_shape_sphere": {
"offset": [0, 0, -1],
"radius": "1.25+(v.particle_random_4*1.25)",
"radius": "0.85+(v.particle_random_4*1.25)",
"surface_only": true,
"direction": ["math.random(-0.1,0.1)*3", "math.random(-0.1,0.1)*1.25", "-0.5-math.random(-0.1,0.1)*2"]
"direction": ["math.random(-0.1,0.1)*1", "math.random(-0.1,0.1)*1", "-math.random(-0.1,0.1)*1"]
},
"minecraft:particle_lifetime_expression": {
"max_lifetime": 1
"max_lifetime": 1.25
},
"minecraft:particle_initial_speed": 1,
"minecraft:particle_initial_speed": 0.3,
"minecraft:particle_motion_dynamic": {
"linear_drag_coefficient": "0.25+v.particle_random_4"
},
@@ -50,8 +50,9 @@
"base_UV": [0, 0],
"size_UV": [9, 9],
"step_UV": [9, 0],
"frames_per_second": 20,
"max_frame": 11
"frames_per_second": 12,
"max_frame": 11,
"loop": true
}
}
},
@@ -163,7 +163,7 @@
},
"animation.exeggutor.ground_walk": {
"loop": true,
"animation_length": 4.79167,
"animation_length": 4.7917,
"bones": {
"leg_left": {
"rotation": {
@@ -724,126 +724,36 @@
}
}
},
"animation.exeggutor.cry": {
"animation_length": 1.5,
"bones": {
"mouth": {
"position": {
"0.0": [0, 0, 0],
"0.25": [0, -2, 0],
"1.25": [0, -2, 0],
"1.5": [0, 0, 0]
}
},
"mouth2": {
"position": {
"0.0": [0, 0, 0],
"0.25": [0, -5, 0],
"1.25": [0, -5, 0],
"1.5": [0, 0, 0]
}
},
"jaw": {
"position": {
"0.0": [0, 0, 0],
"0.25": [0, -3, 0],
"1.25": [0, -3, 0],
"1.5": [0, 0, 0]
}
},
"head": {
"rotation": {
"0.0": [0, 0, 0],
"0.25": [-15, 0, 0],
"1.25": [-15, 0, 0],
"1.5": [0, 0, 0]
}
},
"mouth_closed": {
"position": {
"0.0": [0, 0, -0.1],
"0.25": {"pre": [0, 0, -0.1], "post": [0, 0, 0]},
"1.25": {"pre": [0, 0, 0], "post": [0, 0, -0.1]}
}
},
"mouth_open": {
"position": {
"0.0": [0, 0, 0.1],
"0.25": {"pre": [0, 0, 0.1], "post": [0, 0, 0]},
"1.25": {"pre": [0, 0, 0], "post": [0, 0, 0.1]}
}
},
"head2": {
"rotation": {
"0.0": [0, 0, 0],
"0.25": [-15, 0, 0],
"1.25": [-15, 0, 0],
"1.5": [0, 0, 0]
}
},
"mouth_closed2": {
"position": {
"0.0": [0, 0, 0],
"0.25": {"pre": [0, 0, 0], "post": [0, 0, 0.2]},
"1.25": {"pre": [0, 0, 0.2], "post": [0, 0, 0]}
}
},
"mouth_open2": {
"position": {
"0.0": [0, 0, 0],
"0.25": {"pre": [0, 0, 0], "post": [0, 0, -0.1]},
"1.25": {"pre": [0, 0, -0.1], "post": [0, 0, 0]}
}
},
"head3": {
"rotation": {
"0.0": [0, 0, 0],
"0.25": [-15, 0, 0],
"1.25": [-15, 0, 0],
"1.5": [0, 0, 0]
}
},
"mouth_closed3": {
"position": {
"0.0": [0, 0, -0.1],
"0.25": {"pre": [0, 0, -0.1], "post": [0, 0, 0]},
"1.25": {"pre": [0, 0, 0], "post": [0, 0, -0.1]}
}
},
"mouth_open3": {
"position": {
"0.0": [0, 0, 0.1],
"0.25": {"pre": [0, 0, 0.1], "post": [0, 0, 0]},
"1.25": {"pre": [0, 0, 0], "post": [0, 0, 0.1]}
}
}
}
},
"animation.exeggutor.battle_idle": {
"loop": true,
"animation_length": 1.58333,
"animation_length": 1.5833,
"bones": {
"leg_left": {
"rotation": {
"0.0": ["-15+math.clamp(-math.sin(q.anim_time*90*2.5+225)*65,-90,0)", -35, 0],
"0.0": [-15, -35, 0],
"0.5833": [-15, -35, 0],
"0.625": ["-15+math.clamp(-math.sin(q.anim_time*90*2.5+225)*65,-90,0)", -35, 0],
"1.125": ["-15+math.clamp(-math.sin(q.anim_time*90*2.5+225)*65,-90,0)", -35, 0],
"0.7917": [-65, -35, 0],
"0.9583": {
"pre": [-75, -35, 0],
"post": [-75, -35, 0],
"lerp_mode": "catmullrom"
},
"1.125": {
"post": [-65, -35, 0],
"lerp_mode": "catmullrom"
},
"1.2917": [-15, -35, 0],
"1.5833": [-15, -35, 0]
},
"position": {
"0.0": [
"math.clamp(math.sin(q.anim_time*90*2.5+225)*0.5,0,90)",
"math.clamp(math.sin(q.anim_time*90*2.5+225)*3.5,0,90)",
"math.clamp(-math.sin(q.anim_time*90*2.5+225)*2,-90,0)"
],
"0.0": [0, 0, 0],
"0.5833": [0, 0, 0],
"0.625": [
"math.clamp(math.sin(q.anim_time*90*2.5+225)*0.5,0,90)",
"math.clamp(math.sin(q.anim_time*90*2.5+225)*3.5,0,90)",
"math.clamp(-math.sin(q.anim_time*90*2.5+225)*2,-90,0)"
],
"0.625": [0.06, 0.42, -0.24],
"0.7083": [0.18, 1.26, -0.72],
"0.7917": [0.15, 1.08, -0.62],
"0.9167": [0.11, 0.81, -0.47],
"1.0417": [0.07, 0.54, -0.31],
"1.1667": [0.04, 0.27, -0.16],
"1.2917": [0, 0, 0],
"1.5833": [0, 0, 0]
}
@@ -852,7 +762,7 @@
"rotation": {
"0.0": [20, 0, 0],
"0.5833": [20, 0, 0],
"0.875": [5, 0, 0],
"0.875": [40, 0, 0],
"1.125": [20, 0, 0]
}
},
@@ -860,53 +770,55 @@
"rotation": {
"0.0": [-5, 0, 0],
"0.5833": [-5, 0, 0],
"0.7083": [30, 0, 0],
"0.9167": [10, 0, 0],
"1.125": [-5, 0, 0],
"1.25": [-5, 0, 0]
"0.7083": [17.5, 0, 0],
"0.9167": [-5, 0, 0]
}
},
"leg_right": {
"rotation": {
"0.0": ["-15+math.clamp(math.sin(q.anim_time*90*2.5+225)*65,-90,0)", 35, 0],
"0.3333": ["-15+math.clamp(math.sin(q.anim_time*90*2.5+225)*65,-90,0)", 35, 0],
"0.0": [-65, 35, 0],
"0.1667": {
"pre": [-75, 35, 0],
"post": [-75, 35, 0],
"lerp_mode": "catmullrom"
},
"0.3333": {
"post": [-65, 35, 0],
"lerp_mode": "catmullrom"
},
"0.5": [-15, 35, 0],
"1.3333": [-15, 35, 0],
"1.375": ["-15+math.clamp(math.sin(q.anim_time*90*2.5+225)*65,-90,0)", 35, 0]
"1.375": [-15, 35, 0],
"1.5833": [-65, 35, 0]
},
"position": {
"0.0": [
"math.clamp(math.sin(q.anim_time*90*2.5+225)*0.5,-90,0)",
"math.clamp(-math.sin(q.anim_time*90*2.5+225)*3.5,0,90)",
"math.clamp(math.sin(q.anim_time*90*2.5+225)*2,-90,0)"
],
"0.0": [-0.37, 2.61, -1.49],
"0.0417": [-0.37, 2.61, -1.49],
"0.125": [-0.3, 2.13, -1.22],
"0.25": [-0.2, 1.42, -0.81],
"0.375": [-0.1, 0.71, -0.4],
"0.5": [0, 0, 0],
"1.3333": [0, 0, 0],
"1.375": [
"math.clamp(math.sin(q.anim_time*90*2.5+225)*0.5,-90,0)",
"math.clamp(-math.sin(q.anim_time*90*2.5+225)*3.5,0,90)",
"math.clamp(math.sin(q.anim_time*90*2.5+225)*2,-90,0)"
]
"1.375": [0, 0, 0],
"1.5833": [-0.37, 2.61, -1.49]
}
},
"leg_right2": {
"rotation": {
"0.0": [7, 0, 0],
"0.125": [5, 0, 0],
"0.0": [35, 0, 0],
"0.125": [40, 0, 0],
"0.375": [20, 0, 0],
"1.375": [20, 0, 0],
"1.5833": [7, 0, 0]
"1.5833": [35, 0, 0]
}
},
"foot_right": {
"rotation": {
"0.0": [22, 0, 0],
"0.125": [10, 0, 0],
"0.3333": [-5, 0, 0],
"0.4583": [-5, 0, 0],
"0.0": [4, 0, 0],
"0.0833": [-5, 0, 0],
"1.375": [-5, 0, 0],
"1.5": [30, 0, 0],
"1.5833": [22, 0, 0]
"1.5": [17.5, 0, 0],
"1.5833": [8.5, 0, 0]
}
},
"body": {
@@ -1063,6 +975,106 @@
}
}
},
"animation.exeggutor.cry": {
"animation_length": 1.5,
"bones": {
"mouth": {
"position": {
"0.0": [0, 0, 0],
"0.25": [0, -2, 0],
"1.25": [0, -2, 0],
"1.5": [0, 0, 0]
}
},
"mouth2": {
"position": {
"0.0": [0, 0, 0],
"0.25": [0, -5, 0],
"1.25": [0, -5, 0],
"1.5": [0, 0, 0]
}
},
"jaw": {
"position": {
"0.0": [0, 0, 0],
"0.25": [0, -3, 0],
"1.25": [0, -3, 0],
"1.5": [0, 0, 0]
}
},
"head": {
"rotation": {
"0.0": [0, 0, 0],
"0.25": [-5, 0, 0],
"1.25": [-2.5, 0, 0],
"1.5": [0, 0, 0]
}
},
"mouth_closed": {
"position": {
"0.0": [-1, 0, -0.1],
"0.25": {"pre": [-1, 0, -0.1], "post": [-1, 0, 0]},
"1.25": {"pre": [-1, 0, 0], "post": [-1, 0, -0.1]}
}
},
"mouth_open": {
"position": {
"0.0": [0, 0, 0.1],
"0.25": {"pre": [0, 0, 0.1], "post": [0, 0, 0]},
"1.25": {"pre": [0, 0, 0], "post": [0, 0, 0.1]}
}
},
"head2": {
"rotation": {
"0.0": [0, 0, 0],
"0.25": [-5, 0, 0],
"1.25": [-2.5, 0, 0],
"1.5": [0, 0, 0]
}
},
"mouth_closed2": {
"position": {
"0.0": [0, 0, 0],
"0.25": {"pre": [0, 0, 0], "post": [0, 0, 0.2]},
"1.25": {"pre": [0, 0, 0.2], "post": [0, 0, 0]}
}
},
"mouth_open2": {
"position": {
"0.0": [0, 0, 0],
"0.25": {"pre": [0, 0, 0], "post": [0, 0, -0.1]},
"1.25": {"pre": [0, 0, -0.1], "post": [0, 0, 0]}
}
},
"head3": {
"rotation": {
"0.0": [0, 0, 0],
"0.25": [-5, 0, 0],
"1.25": [-2.5, 0, 0],
"1.5": [0, 0, 0]
}
},
"mouth_closed3": {
"position": {
"0.0": [-1, 0, -0.1],
"0.25": {"pre": [-1, 0, -0.1], "post": [-1, 0, 0]},
"1.25": {"pre": [-1, 0, 0], "post": [-1, 0, -0.1]}
}
},
"mouth_open3": {
"position": {
"0.0": [0, 0, 0.1],
"0.25": {"pre": [0, 0, 0.1], "post": [0, 0, 0]},
"1.25": {"pre": [0, 0, 0], "post": [0, 0, 0.1]}
}
}
},
"sound_effects": {
"0.25": {
"effect": "pokemon.exeggutor.cry"
}
}
},
"animation.exeggutor.sleep": {
"loop": true,
"animation_length": 8,
@@ -1294,7 +1306,7 @@
}
},
"animation.exeggutor.blink3": {
"animation_length": 0.16667,
"animation_length": 0.1667,
"bones": {
"eyelid_right3": {
"position": {
@@ -5,47 +5,78 @@
"loop": true,
"bones": {
"body": {
"rotation": ["5+(math.sin(q.anim_time*90*2*1+180)*6)*0.6", 0, "0+(math.sin(q.anim_time*90*2*1+180)*1)*0.6"],
"position": [0, "2+(math.cos(q.anim_time*90*2*1+180)*0.8)*0.6", 0]
"rotation": ["-5+math.cos(query.anim_time*90*1)*2", 0, "0+math.cos(query.anim_time*90*1/2)*2"],
"position": ["0+math.sin(query.anim_time*90*1/2)*0.75", "3+math.sin(query.anim_time*90*1)*0.5", 0]
},
"torso_top": {
"rotation": ["0-(math.sin(q.anim_time*90*2*1+180)*1.5)*0.6", 0, 0]
"rotation": ["2.5-math.cos(query.anim_time*90*1-30)*2", 0, "0+math.cos(query.anim_time*90*1/2-60)*2"]
},
"collar_back": {
"rotation": ["0-(math.sin(q.anim_time*90*2*1+180)*5)*0.6", 0, 0]
"rotation": ["0+math.cos(query.anim_time*90*1-30)*2", 0, 0]
},
"collar_front": {
"rotation": ["0+(math.sin(q.anim_time*90*2*1+180)*5)*0.6", 0, 0]
"rotation": ["27.5-math.cos(query.anim_time*90*1-60)*1", 0, 0]
},
"head": {
"rotation": ["5-(math.sin(q.anim_time*90*2*1+180)*3)*0.6", 0, 0]
"eyes_bright": {
"position": [0, 0, -0.1]
},
"arm_right": {
"rotation": [0, "(math.sin(q.anim_time*90*2*1+180)*2)*1", "-60-(math.sin(q.anim_time*90*2*1+180)*2)*0.6"]
"rotation": [
"26.4641+math.cos(query.anim_time*90*1/2-120)*7",
"19.3475-math.cos(query.anim_time*90*1/2-60)*6",
"-42.5248-math.cos(query.anim_time*90*1-90)*2"
]
},
"arm_right2": {
"rotation": [0, "0+(math.cos(q.anim_time*90*2*1+180)*1)*0.6", 0]
"rotation": [
"48.1034+math.cos(query.anim_time*90*1-90)*6",
"-28.22+math.cos(query.anim_time*90*1/2-90)*8",
"-9.9783-math.cos(query.anim_time*90*1-120)*6"
]
},
"hand_right": {
"rotation": [0, 0, -10]
"rotation": [12.42995, "-10.0859-math.cos(query.anim_time*90*1-120)*5", "-31.3315+math.cos(query.anim_time*90*1-150)*6"]
},
"arm_left": {
"rotation": [0, "-(math.sin(q.anim_time*90*2*1+180)*2)*1", "60+(math.sin(q.anim_time*90*2*1+180)*2)*0.6"]
"rotation": [
"26.4641+math.cos(query.anim_time*90*1/2-120)*7",
"-19.3475+math.cos(query.anim_time*90*1/2-60)*6",
"42.5248+math.cos(query.anim_time*90*1-90)*2"
]
},
"arm_left2": {
"rotation": [0, "0-(math.sin(q.anim_time*90*2*1+180)*5)*0.6", 0]
"rotation": [
"48.1034+math.cos(query.anim_time*90*1-90)*6",
"28.22-math.cos(query.anim_time*90*1/2-90)*8",
"9.9783+math.cos(query.anim_time*90*1-120)*6"
]
},
"hand_left": {
"rotation": [0, 0, 10]
"rotation": [12.42995, "10.0859+math.cos(query.anim_time*90*1-120)*5", "31.3315-math.cos(query.anim_time*90*1-150)*6"]
},
"torso_bottom": {
"rotation": ["-7.5+math.cos(query.anim_time*90*1-60)*2", 0, "0-math.cos(query.anim_time*90*1/2-120)*2"]
},
"bottom_coat": {
"rotation": ["0-(math.cos(q.anim_time*90*2*1+180)*3)*0.6", 0, 0]
"rotation": ["-3+math.cos(query.anim_time*90*1-90)*2", 0, "0-math.cos(query.anim_time*90*1/2-90)*3"]
},
"leg_right": {
"rotation": ["0+(math.sin(q.anim_time*90*2*1+180)*3)*0.6", 0, "0-(math.sin(q.anim_time*90*2*1+180)*3)*0.6"]
"rotation": ["2.5062+math.cos(query.anim_time*90*1-120)*6", 10.02087, "2.4142-math.cos(query.anim_time*90*1/2-90)*8"]
},
"leg_right2": {
"rotation": ["22.5+math.cos(query.anim_time*90*1-170)*10", 0, "NaN-math.cos(query.anim_time*90*1/2-150)*6"]
},
"leg_left": {
"rotation": ["0+(math.sin(q.anim_time*90*2*1+180)*3)*0.6", 0, "0+(math.sin(q.anim_time*90*2*1+180)*3)*0.6"]
"rotation": ["2.5062+math.cos(query.anim_time*90*1-120)*6", -10.02087, "-2.4142-math.cos(query.anim_time*90*1/2-90)*8"]
},
"leg_left2": {
"rotation": ["22.5+math.cos(query.anim_time*90*1-170)*10", 0, "-math.cos(query.anim_time*90*1/2-150)*6"]
},
"eyes_dim": {
"position": [0, 0, 0.1]
},
"head": {
"rotation": ["15+math.cos(query.anim_time*90*1)*1", 0, "0-math.cos(query.anim_time*90*1/2-120)*3"]
}
}
},
@@ -53,47 +84,157 @@
"loop": true,
"bones": {
"body": {
"rotation": ["17.5-(math.cos(q.anim_time*90*2*1+180)*10)*0.6", 0, "0-(math.sin(q.anim_time*90*2*1+180)*1)*0.6"],
"position": [0, "2+(math.cos(q.anim_time*90*2*1+180)*1.5)*0.6", "0+(math.sin(q.anim_time*90*2*1+180)*1.8)*0.6"]
"rotation": ["25+math.cos(query.anim_time*90*3/2)*2", "0+math.cos(query.anim_time*90*3/2/2)*4", "0+math.cos(query.anim_time*90*3/2/2-60)*2"],
"position": ["0-math.cos(query.anim_time*90*3/2/2-30)*1", "3+math.sin(query.anim_time*90*3/2)*0.7", "0-math.sin(query.anim_time*90*3/2-60)*1"]
},
"torso_top": {
"rotation": ["0+(math.cos(q.anim_time*90*2*1+180)*3)*0.6", 0, 0]
"rotation": ["10-math.cos(query.anim_time*90*3/2-30)*2", "0+math.cos(query.anim_time*90*3/2/2)*4", 0]
},
"collar_back": {
"rotation": ["0-(math.cos(q.anim_time*90*2*1+180)*6)*0.6", 0, 0]
"rotation": ["-15+math.cos(query.anim_time*90*3/2-30)*2", "0+math.cos(query.anim_time*90*3/2/2-90)*2", 0]
},
"collar_front": {
"rotation": ["0+(math.cos(q.anim_time*90*2*1+180)*6)*0.6", 0, 0]
"rotation": ["27.5-math.cos(query.anim_time*90*3/2-60)*1", 0, 0]
},
"head": {
"rotation": ["0+(math.cos(q.anim_time*90*2*1+180)*6)*0.6", 0, 0]
"eyes_bright": {
"position": [0, 0, -0.1]
},
"arm_right": {
"rotation": [0, "20-(math.sin(q.anim_time*90*2*1+180)*3)*0.6", "-55-(math.sin(q.anim_time*90*2*1+180)*6)*0.6"]
"rotation": [
"20.433+math.cos(query.anim_time*90*3/2/2-120)*7",
"31.8177-math.cos(query.anim_time*90*3/2-60)*6",
"-45.313-math.cos(query.anim_time*90*3/2-90)*2"
]
},
"arm_right2": {
"rotation": ["-(math.cos(q.anim_time*90*2*1+180)*6)*0.6", 0, "0+(math.cos(q.anim_time*90*2*1+180)*1)*0.6"]
"rotation": [
"39.442+math.cos(query.anim_time*90*3/2-90)*6",
"-27.7035+math.cos(query.anim_time*90*3/2-90)*8",
"-8.2892-math.cos(query.anim_time*90*3/2-120)*6"
]
},
"hand_right": {
"rotation": [0, 0, -10]
"rotation": [19.42631, "0.9236-math.cos(query.anim_time*90*3/2-120)*5", "-39.9562+math.cos(query.anim_time*90*3/2-150)*6"]
},
"arm_left": {
"rotation": [0, "-20+(math.sin(q.anim_time*90*2*1+180)*3)*0.6", "55+(math.sin(q.anim_time*90*2*1+180)*6)*0.6"]
"rotation": [
"20.433+math.cos(query.anim_time*90*3/2/2-120)*7",
"-31.8177+math.cos(query.anim_time*90*3/2-60)*6",
"45.313+math.cos(query.anim_time*90*3/2-90)*2"
]
},
"arm_left2": {
"rotation": ["(math.cos(q.anim_time*90*2*1+180)*6)*0.6", 0, "0-(math.cos(q.anim_time*90*2*1+180)*1)*0.6"]
"rotation": [
"39.442+math.cos(query.anim_time*90*3/2-90)*6",
"27.7035-math.cos(query.anim_time*90*3/2-90)*8",
"8.2892+math.cos(query.anim_time*90*3/2-120)*6"
]
},
"hand_left": {
"rotation": [0, 0, 10]
"rotation": [19.42631, "-0.9236+math.cos(query.anim_time*90*3/2-120)*5", "39.9562-math.cos(query.anim_time*90*3/2-150)*6"]
},
"torso_bottom": {
"rotation": ["2.5+math.cos(query.anim_time*90*3/2-60)*2", 0, "0+math.cos(query.anim_time*90*3/2/2-60)*4"]
},
"bottom_coat": {
"rotation": ["-2.5-(math.cos(q.anim_time*90*2*1+180)*6)*0.6", 0, 0]
"rotation": ["-8+math.cos(query.anim_time*90*3/2-90)*2", "0+math.cos(query.anim_time*90*3/2/2-120)*2", "0+math.cos(query.anim_time*90*3/2/2-120)*2"]
},
"leg_right": {
"rotation": ["0-(math.cos(q.anim_time*90*2*1+180)*5)*2", 0, "0-(math.cos(q.anim_time*90*2*1+180)*1)*2"]
"rotation": ["4.5574+math.cos(query.anim_time*90*3/2-120)*6", 10.64348, 7.53105]
},
"leg_right2": {
"rotation": ["22.5+math.cos(query.anim_time*90*3/2-170)*10", 0, 0]
},
"leg_left": {
"rotation": ["0-(math.cos(q.anim_time*90*2*1+180)*5)*2", 0, "0+(math.cos(q.anim_time*90*2*1+180)*1)*2"]
"rotation": ["4.5574+math.cos(query.anim_time*90*3/2-120)*6", -10.64348, -7.53105]
},
"leg_left2": {
"rotation": ["22.5+math.cos(query.anim_time*90*3/2-170)*10", 0, 0]
},
"eyes_dim": {
"position": [0, 0, 0.1]
},
"head": {
"rotation": ["-12.5+math.cos(query.anim_time*90*3/2)*3", "0-math.cos(query.anim_time*90*3/2/2)*4", 0]
}
}
},
"animation.beheeyem.battle_idle": {
"loop": true,
"bones": {
"body": {
"rotation": ["-5+math.cos(query.anim_time*90*1)*2", 0, "0+math.cos(query.anim_time*90*1/2)*1"],
"position": ["0+math.sin(query.anim_time*90*1/2)*0.5", "3+math.sin(query.anim_time*90*1)*0.5", 0]
},
"torso_top": {
"rotation": ["2.5-math.cos(query.anim_time*90*1-30)*2", 0, "0+math.cos(query.anim_time*90*1/2-60)*2"]
},
"collar_back": {
"rotation": ["7.5+math.cos(query.anim_time*90*1-30)*2", 0, 0]
},
"collar_front": {
"rotation": ["27.5-math.cos(query.anim_time*90*1-60)*1", 0, 0]
},
"eyes_bright": {
"position": [0, 0, -0.1]
},
"arm_right": {
"rotation": [
"19.1787+math.cos(query.anim_time*90*1/2-120)*4",
"22.2175-math.cos(query.anim_time*90*1-60)*3",
"-48.3831-math.cos(query.anim_time*90*1-90)*2"
]
},
"arm_right2": {
"rotation": ["38.8131+math.cos(query.anim_time*90*1-90)*6", "-35.024+math.cos(query.anim_time*90*1-90)*4", "3.02+math.cos(query.anim_time*90*1-120)*2"]
},
"hand_right": {
"rotation": [17.41964, "-20.6269-math.cos(query.anim_time*90*1-120)*3", "-23.4374+math.cos(query.anim_time*90*1-150)*8"]
},
"arm_left": {
"rotation": [
"19.1787+math.cos(query.anim_time*90*1/2-120)*4",
"-22.2175+math.cos(query.anim_time*90*1-60)*3",
"48.3831+math.cos(query.anim_time*90*1-90)*2"
]
},
"arm_left2": {
"rotation": ["38.8131+math.cos(query.anim_time*90*1-90)*6", "35.024-math.cos(query.anim_time*90*1-90)*4", "-3.02-math.cos(query.anim_time*90*1-120)*2"]
},
"hand_left": {
"rotation": [17.41964, "20.6269+math.cos(query.anim_time*90*1-120)*3", "23.4374-math.cos(query.anim_time*90*1-150)*8"]
},
"torso_bottom": {
"rotation": ["-7.5+math.cos(query.anim_time*90*1-60)*2", 0, "0-math.cos(query.anim_time*90*1/2-120)*1"]
},
"bottom_coat": {
"rotation": ["-10.5+math.cos(query.anim_time*90*1-90)*2", 0, "-math.cos(query.anim_time*90*1/2-90)*2"]
},
"leg_right": {
"rotation": ["2.0651+math.cos(query.anim_time*90*1-120)*6", 9.9897, "-0.1242-math.cos(query.anim_time*90*1/2-90)*4"]
},
"leg_right2": {
"rotation": ["22.5+math.cos(query.anim_time*90*1-170)*10", 0, "NaN-math.cos(query.anim_time*90*1/2-150)*3"]
},
"leg_left": {
"rotation": ["2.9483+math.cos(query.anim_time*90*1-120)*6", -10.03277, "-4.953-math.cos(query.anim_time*90*1/2-90)*4"]
},
"leg_left2": {
"rotation": ["22.5+math.cos(query.anim_time*90*1-170)*10", 0, "-math.cos(query.anim_time*90*1/2-150)*3"]
},
"pupil_left": {
"position": [0, 0, -0.1],
"scale": 0.75
},
"pupil_right": {
"position": [0, 0, -0.1],
"scale": 0.75
},
"eyes_dim": {
"position": [0, 0, 0.1]
},
"head": {
"rotation": ["25+math.cos(query.anim_time*90*1)*1", 0, "0-math.cos(query.anim_time*90*1/2-120)*3"]
}
}
},
@@ -101,50 +242,341 @@
"loop": true,
"bones": {
"body": {
"rotation": ["0+(math.sin(q.anim_time*90*1+180)*1.5)*0.6", 0, "0+(math.sin(q.anim_time*90*1+180)*3)*0.6"],
"position": [0, "1+(math.cos(q.anim_time*90*1+180)*0.8)*0.6", 0]
"rotation": [40, 0, 0],
"position": [0, 3, 0]
},
"torso_top": {
"rotation": ["0+(math.sin(q.anim_time*90*1+180)*5)*0.6", 0, 0]
},
"collar_back": {
"rotation": ["0-(math.cos(q.anim_time*90*1+180)*3)*0.6", 0, 0]
},
"collar_front": {
"rotation": ["0-(math.cos(q.anim_time*90*1+180)*3)*0.6", 0, 0]
},
"head": {
"rotation": ["25+(math.sin(q.anim_time*90*1+180)*3)*0.6", 0, 0]
},
"arm_right": {
"rotation": [0, "0-(math.cos(q.anim_time*90*1+180)*10)*0.3", "-60+(math.sin(q.anim_time*90*1+180)*5)*0.6"]
},
"arm_right2": {
"rotation": [0, "0-(math.cos(q.anim_time*90*1+180)*10)*0.3", 0]
},
"hand_right": {
"rotation": [0, 0, -10]
},
"arm_left": {
"rotation": [0, "0+(math.cos(q.anim_time*90*1+180)*10)*0.3", "60-(math.sin(q.anim_time*90*1+180)*5)*0.6"]
},
"arm_left2": {
"rotation": [0, "0+(math.cos(q.anim_time*90*1+180)*10)*0.3", 0]
},
"hand_left": {
"rotation": [0, 0, 10]
},
"torso_bottom": {
"rotation": ["0+(math.sin(q.anim_time*90*1+180)*5)*0.6", 0, 0]
},
"bottom_coat": {
"rotation": [-2.5, 0, 0]
},
"collar_back": {
"rotation": [10, 0, 0]
},
"collar_front": {
"rotation": [-15, 0, 0]
},
"arm_right": {
"rotation": [30.18785, -13.49583, -55.38615]
},
"arm_right2": {
"rotation": [8.0521, -19.65857, 17.64818]
},
"hand_right": {
"rotation": [12.21635, -29.21703, -28.76232]
},
"arm_left": {
"rotation": [30.18785, 13.49583, 55.38615]
},
"arm_left2": {
"rotation": [8.0521, 19.65857, -17.64818]
},
"hand_left": {
"rotation": [12.21635, 29.21703, 28.76232]
},
"torso_bottom": {
"rotation": [-17.5, 0, 0]
},
"bottom_coat": {
"rotation": [-17.5, 0, 0]
},
"leg_right": {
"rotation": ["0+(math.sin(q.anim_time*90*1+180)*20)*0.6", 0, "0+(math.cos(q.anim_time*90*1+180)*5)*0.6"]
"rotation": [-22.5, 0, 0]
},
"leg_right2": {
"rotation": [10, 0, 0]
},
"leg_left": {
"rotation": ["0-(math.sin(q.anim_time*90*1+180)*20)*0.6", 0, "0-(math.cos(q.anim_time*90*1+180)*5)*0.6"]
"rotation": [-10, 0, 0]
},
"head": {
"rotation": [20, 0, 0]
}
}
},
"animation.beheeyem.alt_sleep": {
"loop": true,
"bones": {
"body": {
"rotation": [-52.5, 0, 0],
"position": [0, 3, 0]
},
"torso_top": {
"rotation": [2.5, 0, 0]
},
"collar_back": {
"rotation": [5, 0, 0]
},
"collar_front": {
"rotation": [27.5, 0, 0]
},
"arm_right": {
"rotation": [-40.58835, 28.2876, -5.84768]
},
"arm_right2": {
"rotation": [-23.10066, 18.44452, 79.80343]
},
"hand_right": {
"rotation": [-103.94239, -26.14027, 28.61413]
},
"arm_left": {
"rotation": [-40.58835, -28.2876, 5.84768]
},
"arm_left2": {
"rotation": [-23.10066, -18.44452, -79.80343]
},
"hand_left": {
"rotation": [-103.94239, 26.14027, -28.61413]
},
"torso_bottom": {
"rotation": [-12.5, 0, 0]
},
"bottom_coat": {
"rotation": [-17.5, 0, 0]
},
"leg_right": {
"rotation": [-19.76968, -1.50179, -17.43745]
},
"leg_right2": {
"rotation": [10, 0, 0]
},
"leg_left": {
"rotation": [17.24721, -1.93597, 14.87739]
}
}
},
"animation.beheeyem.blink": {
"animation_length": 0.1667,
"bones": {
"eyes_bright": {
"position": {
"0.0": [0, 0, 0.1],
"0.125": [0, 0, 0.1],
"0.1667": {"pre": [0, 0, 0.1], "post": [0, 0, 0]}
}
}
}
},
"animation.beheeyem.pose": {
"loop": true,
"bones": {
"body": {
"rotation": [-2.5, 0, 0],
"position": [0, 3, 0]
},
"torso_top": {
"rotation": [2.5, 0, 0]
},
"collar_back": {
"rotation": [5, 0, 0]
},
"collar_front": {
"rotation": [-7.5, 0, 0]
},
"eyes_bright": {
"position": [0, 0, -0.1]
},
"arm_right": {
"rotation": [0.18641, 11.50404, -55.30513]
},
"arm_right2": {
"rotation": [24.59434, -22.85086, 0.87852]
},
"hand_right": {
"rotation": [19.6995, -3.27667, -28.1772]
},
"arm_left": {
"rotation": [0.18641, -11.50404, 55.30513]
},
"arm_left2": {
"rotation": [24.59434, 22.85086, -0.87852]
},
"hand_left": {
"rotation": [19.6995, 3.27667, 28.1772]
},
"torso_bottom": {
"rotation": [-2.5, 0, 0]
},
"bottom_coat": {
"rotation": [-17.5, 0, 0]
},
"leg_right": {
"rotation": [-5, 0, 0]
},
"leg_right2": {
"rotation": [10, 0, 0]
},
"leg_left": {
"rotation": [7.5, 0, 0]
},
"leg_left2": {
"rotation": [15, 0, 0]
},
"eyes_dim": {
"position": [0, 0, 0.1]
},
"head": {
"rotation": [10, 0, 0]
}
}
},
"animation.beheeyem.lights_quirk1": {
"loop": true,
"animation_length": 1.5,
"bones": {
"right_finger_bright_red2": {
"scale": {
"0.0": [1.05, 1.05, 1.05],
"0.5": {"pre": [1.05, 1.05, 1.05], "post": [1, 1, 1]},
"1.0": [1, 1, 1],
"1.5": {"pre": [1, 1, 1], "post": [1.05, 1.05, 1.05]}
}
},
"right_finger_bright_yellow": {
"scale": {
"0.0": [1, 1, 1],
"0.5": {"pre": [1, 1, 1], "post": [1.05, 1.05, 1.05]},
"1.0": {"pre": [1.05, 1.05, 1.05], "post": [1, 1, 1]},
"1.5": [1, 1, 1]
}
},
"right_finger_bright_green2": {
"scale": {
"0.0": [1, 1, 1],
"0.5": [1, 1, 1],
"1.0": {"pre": [1, 1, 1], "post": [1.05, 1.05, 1.05]},
"1.5": {"pre": [1.05, 1.05, 1.05], "post": [1, 1, 1]}
}
},
"left_finger_bright_red2": {
"scale": {
"0.0": [1.05, 1.05, 1.05],
"0.5": {"pre": [1.05, 1.05, 1.05], "post": [1, 1, 1]},
"1.0": [1, 1, 1],
"1.5": {"pre": [1, 1, 1], "post": [1.05, 1.05, 1.05]}
}
},
"left_finger_bright_yellow": {
"scale": {
"0.0": [1, 1, 1],
"0.5": {"pre": [1, 1, 1], "post": [1.05, 1.05, 1.05]},
"1.0": {"pre": [1.05, 1.05, 1.05], "post": [1, 1, 1]},
"1.5": [1, 1, 1]
}
},
"left_finger_bright_green2": {
"scale": {
"0.0": [1, 1, 1],
"0.5": [1, 1, 1],
"1.0": {"pre": [1, 1, 1], "post": [1.05, 1.05, 1.05]},
"1.5": {"pre": [1.05, 1.05, 1.05], "post": [1, 1, 1]}
}
}
}
},
"animation.beheeyem.lights_quirk2": {
"loop": true,
"animation_length": 1,
"bones": {
"right_finger_bright_red2": {
"scale": {
"0.0": [1.05, 1.05, 1.05],
"0.3333": {"pre": [1.05, 1.05, 1.05], "post": [1, 1, 1]},
"0.6667": [1, 1, 1],
"1.0": {"pre": [1, 1, 1], "post": [1.05, 1.05, 1.05]}
}
},
"right_finger_bright_yellow": {
"scale": {
"0.0": [1, 1, 1],
"0.3333": {"pre": [1, 1, 1], "post": [1.05, 1.05, 1.05]},
"0.6667": {"pre": [1.05, 1.05, 1.05], "post": [1, 1, 1]},
"1.0": [1, 1, 1]
}
},
"right_finger_bright_green2": {
"scale": {
"0.0": [1, 1, 1],
"0.3333": [1, 1, 1],
"0.6667": {"pre": [1, 1, 1], "post": [1.05, 1.05, 1.05]},
"1.0": {"pre": [1.05, 1.05, 1.05], "post": [1, 1, 1]}
}
},
"left_finger_bright_red2": {
"scale": {
"0.0": [1.05, 1.05, 1.05],
"0.3333": {"pre": [1.05, 1.05, 1.05], "post": [1, 1, 1]},
"0.6667": [1, 1, 1],
"1.0": {"pre": [1, 1, 1], "post": [1.05, 1.05, 1.05]}
}
},
"left_finger_bright_yellow": {
"scale": {
"0.0": [1, 1, 1],
"0.3333": {"pre": [1, 1, 1], "post": [1.05, 1.05, 1.05]},
"0.6667": {"pre": [1.05, 1.05, 1.05], "post": [1, 1, 1]},
"1.0": [1, 1, 1]
}
},
"left_finger_bright_green2": {
"scale": {
"0.0": [1, 1, 1],
"0.3333": [1, 1, 1],
"0.6667": {"pre": [1, 1, 1], "post": [1.05, 1.05, 1.05]},
"1.0": {"pre": [1.05, 1.05, 1.05], "post": [1, 1, 1]}
}
}
}
},
"animation.beheeyem.lights_quirk3": {
"loop": true,
"animation_length": 0.5,
"bones": {
"right_finger_bright_red2": {
"scale": {
"0.0": [1.05, 1.05, 1.05],
"0.1667": {"pre": [1.05, 1.05, 1.05], "post": [1, 1, 1]},
"0.3333": [1, 1, 1],
"0.5": {"pre": [1, 1, 1], "post": [1.05, 1.05, 1.05]}
}
},
"right_finger_bright_yellow": {
"scale": {
"0.0": [1, 1, 1],
"0.1667": {"pre": [1, 1, 1], "post": [1.05, 1.05, 1.05]},
"0.3333": {"pre": [1.05, 1.05, 1.05], "post": [1, 1, 1]},
"0.5": [1, 1, 1]
}
},
"right_finger_bright_green2": {
"scale": {
"0.0": [1, 1, 1],
"0.1667": [1, 1, 1],
"0.3333": {"pre": [1, 1, 1], "post": [1.05, 1.05, 1.05]},
"0.5": {"pre": [1.05, 1.05, 1.05], "post": [1, 1, 1]}
}
},
"left_finger_bright_red2": {
"scale": {
"0.0": [1.05, 1.05, 1.05],
"0.1667": {"pre": [1.05, 1.05, 1.05], "post": [1, 1, 1]},
"0.3333": [1, 1, 1],
"0.5": {"pre": [1, 1, 1], "post": [1.05, 1.05, 1.05]}
}
},
"left_finger_bright_yellow": {
"scale": {
"0.0": [1, 1, 1],
"0.1667": {"pre": [1, 1, 1], "post": [1.05, 1.05, 1.05]},
"0.3333": {"pre": [1.05, 1.05, 1.05], "post": [1, 1, 1]},
"0.5": [1, 1, 1]
}
},
"left_finger_bright_green2": {
"scale": {
"0.0": [1, 1, 1],
"0.1667": [1, 1, 1],
"0.3333": {"pre": [1, 1, 1], "post": [1.05, 1.05, 1.05]},
"0.5": {"pre": [1.05, 1.05, 1.05], "post": [1, 1, 1]}
}
}
}
},
@@ -178,15 +610,6 @@
"1.4583": [0, 0, 0]
}
},
"head": {
"rotation": {
"0.0": ["0+(math.cos(q.anim_time*90*2*1+180)*0.8)*0.6", 0, 0],
"0.125": [11.5, 0, 0],
"0.4167": ["-6-(math.cos(q.anim_time*90*80+180)*2)*2", 0, 0],
"0.9583": ["-6+(math.cos(q.anim_time*90*8+180)*2)*0.6", 0, 0],
"1.4583": [0, 0, 0]
}
},
"arm_right": {
"rotation": {
"0.0": [0, 0, 0],
@@ -222,11 +645,94 @@
"0.9583": [7.3679, 40.2246, -30.8095],
"1.4583": [0, 0, 0]
}
},
"head": {
"rotation": {
"0.0": ["0+(math.cos(q.anim_time*90*2*1+180)*0.8)*0.6", 0, 0],
"0.125": [11.5, 0, 0],
"0.4167": ["-6-(math.cos(q.anim_time*90*80+180)*2)*2", 0, 0],
"0.9583": ["-6+(math.cos(q.anim_time*90*8+180)*2)*0.6", 0, 0],
"1.4583": [0, 0, 0]
}
}
},
"sound_effects": {
"0.04": {
"effect": "pokemon.beheeyem.cry"
}
},
"animation.beheeyem.new": {
"loop": true,
"bones": {
"beheeyem": {
"position": [0, 0, "33-query.anim_time*90*0.08"]
}
}
},
"animation.beheeyem.pose2": {
"loop": true,
"bones": {
"body": {
"rotation": [-2.5, 0, 0],
"position": [0, 3, 0]
},
"torso_top": {
"rotation": [2.5, 0, 0]
},
"collar_back": {
"rotation": [5, 0, 0]
},
"collar_front": {
"rotation": [-7.5, 0, 0]
},
"eyes_bright": {
"position": [0, 0, -0.1]
},
"arm_right": {
"rotation": [-16.69715, -44.79233, -31.70444]
},
"arm_right2": {
"rotation": [24.59434, -22.85086, 0.87852]
},
"hand_right": {
"rotation": [19.6995, -3.27667, -28.1772]
},
"arm_left": {
"rotation": [0.18641, -11.50404, 55.30513]
},
"arm_left2": {
"rotation": [24.59434, 22.85086, -0.87852]
},
"hand_left": {
"rotation": [19.6995, 3.27667, 28.1772]
},
"torso_bottom": {
"rotation": [-2.5, 0, 0]
},
"bottom_coat": {
"rotation": [-17.5, 0, 0]
},
"leg_right": {
"rotation": [-5, 0, 0]
},
"leg_right2": {
"rotation": [10, 0, 0]
},
"leg_left": {
"rotation": [7.5, 0, 0]
},
"leg_left2": {
"rotation": [15, 0, 0]
},
"pupil_left": {
"position": [-0.25, 0, -0.1],
"scale": 0.75
},
"pupil_right": {
"position": [-0.25, 0, -0.1],
"scale": 0.75
},
"eyes_dim": {
"position": [0, 0, 0.1]
},
"head": {
"rotation": [10, 0, 0]
}
}
}
@@ -26,6 +26,9 @@
},
"eyes": {
"scale": [1, "1-math.sin(q.anim_time*90)*0.03", 1]
},
"wax_trail": {
"position": [0, 0.02, 0]
}
}
},
@@ -43,7 +46,7 @@
"scale": [1, "1-math.sin(q.anim_time*90*4-135)*0.01", 1]
},
"flame": {
"rotation": ["(math.sin(q.anim_time*90)*6)*(math.sin(q.anim_time*90-90))", 0, "-(math.sin(q.anim_time*90-45)*6)*(math.sin(q.anim_time*90-90))"],
"rotation": ["-2.5+(math.sin(q.anim_time*90)*6)*(math.sin(q.anim_time*90-90))", 0, "0-(math.sin(q.anim_time*90-45)*6)*(math.sin(q.anim_time*90-90))"],
"scale": [1, "1+math.sin(q.anim_time*90*4+125)*0.1", 1]
},
"arm_right": {
@@ -61,7 +64,10 @@
"scale": [1, "1+math.sin(q.anim_time*90*4+90)*0.01", 1]
},
"wax_trail2": {
"position": [0, 0, "0.3-math.sin(q.anim_time*90*4+75)*0.33"]
"scale": [1, 1, "1-math.sin(q.anim_time*90*4+75)*0.1"]
},
"wax_trail": {
"position": [0, 0.03, 0]
}
}
},
@@ -100,7 +106,7 @@
"position": ["(math.sin(q.anim_time*90*2)*0.5)", 0, 0]
},
"wax_trail": {
"position": ["(math.sin(q.anim_time*90*2-90)*0.2)", 0, 0],
"position": ["(math.sin(q.anim_time*90*2-90)*0.2)", 0.02, 0],
"scale": ["1+(math.sin(q.anim_time*90*4+45)*0.04)", 1, 1]
},
"lip": {
@@ -141,7 +147,7 @@
"scale": [1, 0.9, 1]
},
"wax_trail": {
"position": [0, 0.5, 0],
"position": [0, 0.52, 0],
"scale": 1.075
},
"eyelid_right": {
@@ -153,62 +159,129 @@
"lip": {
"rotation": [4.98, 0, 0],
"position": [0, 0, -0.008]
},
"eye_left_open": {
"position": [0, 0, 0.1]
},
"eye_closed_left": {
"position": [0, 0, -0.1]
},
"eye_right_open": {
"position": [0, 0, 0.1]
},
"eye_closed_right": {
"position": [0, 0, -0.1]
}
}
},
"animation.litwick.blink": {
"animation_length": 0.20833,
"animation_length": 0.1667,
"bones": {
"eyelid_right": {
"eye_left_open": {
"position": {
"0.0": [-0.1, 0, -0.1],
"0.1667": [-0.1, 0, -0.1],
"0.2083": [0, 0, 0]
"0.0": [0, 0, 0.1],
"0.125": [0, 0, 0.1],
"0.1667": [0, 0, 0]
}
},
"eyelid_left": {
"eye_closed_left": {
"position": {
"0.0": [0.1, 0, -0.1],
"0.1667": [0.1, 0, -0.1],
"0.2083": [0, 0, 0]
"0.0": [0, 0, -0.1],
"0.125": [0, 0, -0.1],
"0.1667": [0, 0, 0]
}
},
"eye_right_open": {
"position": {
"0.0": [0, 0, 0.1],
"0.125": [0, 0, 0.1],
"0.1667": [0, 0, 0]
}
},
"eye_closed_right": {
"position": {
"0.0": [0, 0, -0.1],
"0.125": [0, 0, -0.1],
"0.1667": [0, 0, 0]
}
}
}
},
"animation.litwick.pose": {
"animation.litwick.shock": {
"loop": true,
"bones": {
"head": {
"rotation": [-7.56397, -7.43547, 0.98448]
"eye_left_open": {
"position": [0, 0.25, 0],
"scale": [1, 0.5, 1]
},
"hair": {
"rotation": [-2.5, 0, 0]
"eye_right_open": {
"position": [0, 0.25, 0]
},
"flame": {
"rotation": [-19.8423, -2.55868, -12.05239]
},
"arm_right": {
"rotation": [0, 0, -50]
},
"arm_left": {
"rotation": [0, 0, 52.5]
},
"lip": {
"rotation": [-7.5, 0, 0]
},
"mouth_small": {
"position": [0, 0, 0]
},
"mouth_large": {
"position": [0, 0, 0]
"mouth_open": {
"position": [0, 0, -0.1],
"scale": [0.9, 1, 1]
}
}
},
"animation.litwick.cry": {
"animation_length": 1.2,
"sound_effects": {
"0.04": {
"effect": "pokemon.litwick.cry"
"animation.litwick.angry": {
"loop": true,
"bones": {
"eye_expression_left": {
"position": [-0.5, 0, -0.1]
},
"eye_expression_right": {
"position": [0.5, 0, -0.1]
}
}
},
"animation.litwick.sad": {
"loop": true,
"bones": {
"eye_expression_left": {
"position": [0.5, 0, -0.1]
},
"eye_expression_right": {
"position": [-0.5, 0, -0.1]
}
}
},
"animation.litwick.happy": {
"loop": true,
"bones": {
"eye_left_open": {
"position": [0, 0, 0.1]
},
"eye_happy_left": {
"position": [0, 0, -0.1]
},
"eye_right_open": {
"position": [0, 0, 0.1]
},
"eye_happy_right": {
"position": [0, 0, -0.1]
},
"mouth_open": {
"position": [0, 0, -0.1],
"scale": [0.9, 1, 1]
}
}
},
"animation.litwick.hurt": {
"loop": true,
"bones": {
"eye_left_open": {
"position": [0, 0, 0.1]
},
"eye_closed_left": {
"rotation": [0, 0, -27.5],
"position": [0, 0, -0.1]
},
"eye_right_open": {
"position": [0, 0, 0.1]
},
"eye_closed_right": {
"rotation": [0, 0, 27.5],
"position": [0, 0, -0.1]
}
}
}
@@ -20,7 +20,7 @@
"rotation": ["-2.5 + math.sin(q.anim_time*90*2-90)", 5, "7.5 + 5*math.sin(q.anim_time*90*2)"]
},
"arm_left2": {
"rotation": [0, 0, "10 + 5*math.sin(q.anim_time*90*2+90)"]
"rotation": [0, 0, "5*math.sin(q.anim_time*90*2+90)"]
},
"arm_left3": {
"rotation": [0, 0, "10 + 5*math.sin(q.anim_time*90*2+180)"]
@@ -38,7 +38,7 @@
"rotation": ["-2.5+math.sin(q.anim_time*90*2-90)", -5, "-7.5 - 5*math.sin(q.anim_time*90*2)"]
},
"arm_right2": {
"rotation": [0, 0, "-10 - 5*math.sin(q.anim_time*90*2+90)"]
"rotation": [0, 0, "- 5*math.sin(q.anim_time*90*2+90)"]
},
"arm_right3": {
"rotation": [0, 0, "-10 - 5*math.sin(q.anim_time*90*2+180)"]
@@ -59,7 +59,13 @@
"scale": 0
},
"body": {
"position": [0, 4, 0]
"position": [0, 1, 0]
},
"arm_left7": {
"rotation": [0, 0, 57.5]
},
"arm_right7": {
"rotation": [0, 0, -57.5]
}
}
},
@@ -82,7 +88,7 @@
"rotation": ["10.2854 + math.sin(q.anim_time*90*2-90)*2", 6.26335, "18.6835 + 5*math.sin(q.anim_time*90*2)"]
},
"arm_left2": {
"rotation": [0, 0, "18 + 5*math.sin(q.anim_time*90*2+90)"]
"rotation": [0, 0, "10.5 + 5*math.sin(q.anim_time*90*2+90)"]
},
"arm_left3": {
"rotation": [0, 0, "20 + 5*math.sin(q.anim_time*90*2+180)"]
@@ -100,7 +106,7 @@
"rotation": ["10.2854 + math.sin(q.anim_time*90*2-90)*2", -6.26335, "-18.6835+ 5*math.sin(q.anim_time*90*2)"]
},
"arm_right2": {
"rotation": [0, 0, "-18+ 5*math.sin(q.anim_time*90*2+90)"]
"rotation": [0, 0, "-10.5+ 5*math.sin(q.anim_time*90*2+90)"]
},
"arm_right3": {
"rotation": [0, 0, "-20+ 5*math.sin(q.anim_time*90*2+180)"]
@@ -125,6 +131,12 @@
},
"head": {
"rotation": [0, 0, 0]
},
"arm_left7": {
"rotation": [0, 0, 57.5]
},
"arm_right7": {
"rotation": [-2.50463, -13.04546, -71.15153]
}
}
},
@@ -187,6 +199,12 @@
},
"body": {
"position": [0, 4, 0]
},
"arm_left7": {
"rotation": [0, 0, 47.5]
},
"arm_right7": {
"rotation": [0, 0, -47.5]
}
}
},
@@ -209,7 +227,7 @@
"rotation": ["10.2854 + math.sin(q.anim_time*90*2-90)*2", 6.26335, "18.6835 + 5*math.sin(q.anim_time*90*2)"]
},
"arm_left2": {
"rotation": [0, 0, "18 + 5*math.sin(q.anim_time*90*2+90)"]
"rotation": [0, 0, "10.5 + 5*math.sin(q.anim_time*90*2+90)"]
},
"arm_left3": {
"rotation": [0, 0, "20 + 5*math.sin(q.anim_time*90*2+180)"]
@@ -227,7 +245,7 @@
"rotation": ["10.2854 + math.sin(q.anim_time*90*2-90)*2", -6.26335, "-18.6835+ 5*math.sin(q.anim_time*90*2)"]
},
"arm_right2": {
"rotation": [0, 0, "-18+ 5*math.sin(q.anim_time*90*2+90)"]
"rotation": [0, 0, "-10.5+ 5*math.sin(q.anim_time*90*2+90)"]
},
"arm_right3": {
"rotation": [0, 0, "-20+ 5*math.sin(q.anim_time*90*2+180)"]
@@ -252,6 +270,12 @@
},
"head": {
"rotation": [0, 0, 0]
},
"arm_left7": {
"rotation": [0, 0, 57.5]
},
"arm_right7": {
"rotation": [0, 0, -57.5]
}
}
},
@@ -297,13 +321,13 @@
"rotation": [0, 0, "22+5*math.sin(q.anim_time*90*2)*0.5"]
},
"arm_right3": {
"rotation": [0, 0, "35+5*math.sin(q.anim_time*90*2)"]
"rotation": [0, 0, "25+5*math.sin(q.anim_time*90*2)"]
},
"arm_right4": {
"rotation": [0, 0, "19.5+5*math.sin(q.anim_time*90*2)*0.5"]
},
"arm_right5": {
"rotation": [0, 0, "30+5*math.sin(q.anim_time*90*2)*0.5"]
"rotation": [0, 0, "15+5*math.sin(q.anim_time*90*2)*0.5"]
},
"arm_right6": {
"rotation": [0, 0, "24+5*math.sin(q.anim_time*90*2)*0.5"]
@@ -316,6 +340,12 @@
},
"body": {
"position": [0, 4, 0]
},
"arm_left7": {
"rotation": [0, 0, 70]
},
"arm_right7": {
"rotation": [0, 0, 12.5]
}
}
},
@@ -379,31 +409,29 @@
"body": {
"position": [0, 4, 0]
},
"eye_left": {
"scale": 0
"arm_left7": {
"rotation": [0, 0, 67.5]
},
"eye_right": {
"scale": 0
"arm_right7": {
"rotation": [0, 0, -67.5]
},
"eye_left_open": {
"position": [0, 4, 0]
},
"eye_closed_left": {
"position": [0, -4, 0]
},
"eye_right_open": {
"position": [0, 4, 0]
},
"eye_closed_right": {
"position": [0, -4, 0]
}
}
},
"animation.lampent.blink": {
"animation_length": 0.16667,
"animation_length": 0.1667,
"bones": {
"eye_left": {
"scale": {
"0.0": [0, 0, 0],
"0.125": [0, 0, 0],
"0.1667": [1, 1, 1]
}
},
"eye_right": {
"scale": {
"0.0": [0, 0, 0],
"0.125": [0, 0, 0],
"0.1667": [1, 1, 1]
}
},
"eyelid_left": {
"scale": {
"0.0": [1, 1, 1],
@@ -417,68 +445,116 @@
"0.125": [1, 1, 1],
"0.1667": [1, 1, 1]
}
},
"eye_left_open": {
"position": {
"0.0": [0, 4, 0],
"0.125": {"pre": [0, 4, 0], "post": [0, 4, 0]},
"0.1667": {"pre": [0, 4, 0], "post": [0, 0, 0]}
}
},
"eye_closed_left": {
"position": {
"0.0": [0, -4, 0],
"0.125": {"pre": [0, -4, 0], "post": [0, -4, 0]},
"0.1667": {"pre": [0, -4, 0], "post": [0, 0, 0]}
}
},
"eye_right_open": {
"position": {
"0.0": [0, 4, 0],
"0.125": {"pre": [0, 4, 0], "post": [0, 4, 0]},
"0.1667": {"pre": [0, 4, 0], "post": [0, 0, 0]}
}
},
"eye_closed_right": {
"position": {
"0.0": [0, -4, 0],
"0.125": {"pre": [0, -4, 0], "post": [0, -4, 0]},
"0.1667": {"pre": [0, -4, 0], "post": [0, 0, 0]}
}
}
}
},
"animation.lampent.pose": {
"animation.lampent.shock": {
"loop": true,
"bones": {
"body": {
"rotation": [0, -5, 7.5]
"eye_left_open": {
"position": [0, 0.25, 0],
"scale": [0.7, 0.7, 1]
},
"head": {
"rotation": [14.60945, 2.9986, -5.59467]
"eye_left_open2": {
"scale": 0
},
"arm_left": {
"rotation": [0, 25, -7.5]
"eye_right_open": {
"position": [0, 0.25, 0],
"scale": [0.7, 0.7, 1]
},
"arm_left2": {
"rotation": [0, 0, -22.5]
},
"arm_left3": {
"rotation": [0, 0, -17.5]
},
"arm_left4": {
"rotation": [0, 0, -22.5]
},
"arm_left5": {
"rotation": [0, 0, -30]
},
"arm_left6": {
"rotation": [0, 0, -28.5]
},
"arm_right": {
"rotation": [0, 0, -5]
},
"arm_right2": {
"rotation": [0, 0, -20]
},
"arm_right3": {
"rotation": [0, 0, -25]
},
"arm_right4": {
"rotation": [0, 0, -40]
},
"arm_right5": {
"rotation": [0, 0, -38.5]
},
"arm_right6": {
"rotation": [0, 0, -36.5]
},
"swing": {
"rotation": [-13.63677, 25.79103, 6.17047],
"position": [4.2, 4, 11]
},
"flame": {
"rotation": [0, 22.5, 0]
"eye_right_open2": {
"position": [-0.25, -0.25, 0],
"scale": 0
}
}
},
"animation.lampent.cry": {
"animation_length": 1.2,
"sound_effects": {
"0.04": {
"effect": "pokemon.lampent.cry"
"animation.lampent.angry": {
"loop": true,
"bones": {
"eye_left_open2": {
"position": [0.25, -0.25, 0],
"scale": [0.5, 0.5, 1]
},
"eye_right_open2": {
"position": [-0.25, -0.25, 0],
"scale": [0.5, 0.5, 1]
}
}
},
"animation.lampent.sad": {
"loop": true,
"bones": {
"eye_left_open2": {
"position": [-0.25, -0.25, 0],
"scale": [0.5, 0.5, 1]
},
"eye_right_open2": {
"position": [0.25, -0.25, 0],
"scale": [0.5, 0.5, 1]
}
}
},
"animation.lampent.happy": {
"loop": true,
"bones": {
"eye_left_open": {
"position": [0, 4, 0]
},
"eye_happy_left": {
"position": [0, -4, 0]
},
"eye_right_open": {
"position": [0, 4, 0]
},
"eye_happy_right": {
"position": [0, -4, 0]
}
}
},
"animation.lampent.hurt": {
"loop": true,
"bones": {
"eye_left_open": {
"position": [0, 4, 0]
},
"eye_closed_left": {
"rotation": [0, 0, -20],
"position": [0, -4, 0]
},
"eye_right_open": {
"position": [0, 4, 0]
},
"eye_closed_right": {
"rotation": [0, 0, 20],
"position": [0, -4, 0]
}
}
}
@@ -31,6 +31,14 @@
"top": [0, 38, 0]
}
},
{
"name": "locator_target",
"parent": "manectric",
"pivot": [0, 15, -17],
"locators": {
"target": [0, 15, -17]
}
},
{
"name": "body",
"parent": "manectric",
@@ -44,14 +52,6 @@
"middle": [0, 17, 0]
}
},
{
"name": "locator_target",
"parent": "body",
"pivot": [0, 18, -19],
"locators": {
"target": [0, 18, -19]
}
},
{
"name": "hips",
"parent": "body",
@@ -16,144 +16,445 @@
"pivot": [0, 0, 0]
},
{
"name": "body",
"name": "locator_root",
"parent": "elgyem",
"pivot": [0, 5.5, 0.25]
"pivot": [0, 0, 0],
"locators": {
"root": [0, 0, 0]
}
},
{
"name": "torso_medium",
"name": "locator_top",
"parent": "elgyem",
"pivot": [0, 24, 0],
"locators": {
"top": [0, 24, 0]
}
},
{
"name": "body",
"parent": "elgyem",
"pivot": [0, 5.75, 0]
},
{
"name": "locator_target",
"parent": "body",
"pivot": [0, 5, 1.75],
"pivot": [0, 9, -6],
"locators": {
"target": [0, 9, -6]
}
},
{
"name": "locator_middle",
"parent": "body",
"pivot": [0, 10, 0],
"locators": {
"middle": [0, 10, 0]
}
},
{
"name": "torso_middle",
"parent": "body",
"pivot": [0, 5.25, 1.75],
"cubes": [
{"origin": [-1.5, 4.75, -1.25], "size": [3, 2, 3], "uv": [39, 4]}
{"origin": [-1.5, 5, -1.25], "size": [3, 2, 3], "uv": [39, 4]}
]
},
{
"name": "torso_top",
"parent": "torso_medium",
"pivot": [0, 6.25, 1],
"parent": "torso_middle",
"pivot": [0, 6.5, 1],
"cubes": [
{"origin": [-1, 6, -1], "size": [2, 3, 2], "uv": [49, 11]}
{"origin": [-1, 6.25, -1], "size": [2, 4, 2], "uv": [39, 13]}
]
},
{
"name": "head",
"parent": "torso_top",
"pivot": [0, 9, 0],
"pivot": [0, 9.25, 0]
},
{
"name": "head_ai",
"parent": "head",
"pivot": [0, 9.25, 0]
},
{
"name": "head_angle",
"parent": "head_ai",
"pivot": [0, 9.25, 0],
"cubes": [
{"origin": [-3.5, 9, -3.25], "size": [7, 11, 6], "uv": [0, 0]},
{"origin": [-3.5, 11.5, -3.25], "size": [7, 1, 6], "inflate": 0.01, "uv": [0, 17]}
{"origin": [-3.5, 9.25, -3.25], "size": [7, 11, 6], "uv": [0, 0]},
{"origin": [-3.5, 11.75, -3.25], "size": [7, 1, 6], "inflate": 0.01, "uv": [0, 17]}
]
},
{
"name": "locator_item_hat",
"parent": "head_angle",
"pivot": [0, 19.5, -0.25],
"locators": {
"item_hat": [0, 19.5, -0.25]
}
},
{
"name": "locator_head",
"parent": "head_angle",
"pivot": [0, 19.25, -3.25],
"locators": {
"head": [0, 19.25, -3.25]
}
},
{
"name": "locator_item_face",
"parent": "head_angle",
"pivot": [0, 11, -3.25],
"locators": {
"item_face": [0, 11, -3.25]
}
},
{
"name": "locator_face",
"parent": "head_angle",
"pivot": [0, 11.25, -3.25],
"locators": {
"face": [0, 11.25, -3.25]
}
},
{
"name": "eyes",
"parent": "head_angle",
"pivot": [0, 10.75, -3.25]
},
{
"name": "eye_right",
"parent": "head",
"pivot": [-1.25, 10.5, -3.25],
"parent": "eyes",
"pivot": [-1.5, 10.75, -3.25],
"cubes": [
{"origin": [-1.75, 9.5, -3.265], "size": [1, 2, 0], "uv": [4, 17]}
{"origin": [-2, 9.75, -3.265], "size": [1, 2, 0], "uv": [43, 1]}
]
},
{
"name": "locator_eye_right",
"parent": "eye_right",
"pivot": [-1.5, 10.75, -3.25],
"locators": {
"eye1": [-1.5, 10.75, -3.25]
}
},
{
"name": "eye_bright_right",
"parent": "eye_right",
"pivot": [-1.5, 10.75, -3.15],
"cubes": [
{"origin": [-2, 9.75, -3.165], "size": [1, 2, 0], "inflate": 0.01, "uv": [49, 1]}
]
},
{
"name": "eye_left",
"parent": "head",
"pivot": [1.25, 10.5, -3.25],
"parent": "eyes",
"pivot": [1.5, 10.75, -3.25],
"cubes": [
{"origin": [0.75, 9.5, -3.265], "size": [1, 2, 0], "uv": [4, 0]}
{"origin": [1, 9.75, -3.265], "size": [1, 2, 0], "uv": [40, 1]}
]
},
{
"name": "arm_right",
"parent": "torso_top",
"pivot": [-1, 8.5, 0],
"name": "locator_eye_left",
"parent": "eye_left",
"pivot": [1.5, 10.75, -3.25],
"locators": {
"eye2": [1.5, 10.75, -3.25]
}
},
{
"name": "eye_bright_left",
"parent": "eye_left",
"pivot": [1.5, 10.75, -3.15],
"cubes": [
{"origin": [-4.5, 7.5, -0.5], "size": [4, 1, 1], "uv": [38, 11]}
{"origin": [1, 9.75, -3.165], "size": [1, 2, 0], "inflate": 0.01, "uv": [46, 1]}
]
},
{
"name": "arms",
"parent": "torso_top",
"pivot": [0, 8.75, 0]
},
{
"name": "arm_right",
"parent": "arms",
"pivot": [-1, 8.75, 0],
"cubes": [
{"origin": [-4.5, 7.75, -0.5], "size": [4, 1, 1], "uv": [38, 11]}
]
},
{
"name": "forearm_right",
"parent": "arm_right",
"pivot": [-4, 8, 0],
"pivot": [-4, 8.25, 0],
"cubes": [
{"origin": [-6, 7, -1], "size": [2, 2, 2], "uv": [44, 0]}
{"origin": [-7, 7.25, -1], "size": [3, 2, 2], "uv": [47, 11]}
]
},
{
"name": "hand_right",
"parent": "forearm_right",
"pivot": [-6, 8, 0],
"pivot": [-7, 9.25, 0],
"cubes": [
{"origin": [-9, 7, -1.5], "size": [3, 2, 3], "inflate": 0.01, "uv": [26, 11]},
{"origin": [-8.75, 6.5, -0.5], "size": [1, 1, 1], "uv": [0, 17]},
{"origin": [-7.25, 6.5, 0.25], "size": [1, 1, 1], "uv": [0, 19]},
{"origin": [-7.25, 6.5, -1.25], "size": [1, 1, 1], "uv": [0, 21]}
{"origin": [-9, 7.25, -1.5], "size": [3, 2, 3], "inflate": 0.01, "uv": [26, 11]}
]
},
{
"name": "locator_hand_primary",
"parent": "hand_right",
"pivot": [-7.5, 7.25, 0],
"rotation": [0, 90, 0],
"locators": {
"hand_primary": [-7.5, 7.25, 0],
"physical": [-7.5, 7.25, 0],
"special": [-7.5, 7.25, 0]
}
},
{
"name": "locator_item",
"parent": "hand_right",
"pivot": [-7.5, 6.5, -0.5],
"locators": {
"item": [-7.5, 6.5, -0.5]
}
},
{
"name": "fingers_right",
"parent": "hand_right",
"pivot": [-7.25, 7.25, 0]
},
{
"name": "right_finger_dim_green",
"parent": "fingers_right",
"pivot": [-6.75, 7.25, -0.75],
"cubes": [
{"origin": [-7.25, 6.75, -1.25], "size": [1, 1, 1], "inflate": 0.01, "uv": [5, 29]}
]
},
{
"name": "right_finger_bright_green",
"parent": "right_finger_dim_green",
"pivot": [-6.75, 7.25, -0.75],
"cubes": [
{"origin": [-7.25, 6.75, -1.25], "size": [1, 1, 1], "uv": [10, 29]}
]
},
{
"name": "right_finger_dim_red",
"parent": "fingers_right",
"pivot": [-8.25, 7.25, 0],
"cubes": [
{"origin": [-8.75, 6.75, -0.5], "size": [1, 1, 1], "inflate": 0.01, "uv": [5, 25]}
]
},
{
"name": "right_finger_bright_red",
"parent": "right_finger_dim_red",
"pivot": [-8.25, 7.25, 0],
"cubes": [
{"origin": [-8.75, 6.75, -0.5], "size": [1, 1, 1], "uv": [10, 25]}
]
},
{
"name": "right_finger_dim_yellow",
"parent": "fingers_right",
"pivot": [-6.75, 7.25, 0.75],
"cubes": [
{"origin": [-7.25, 6.75, 0.25], "size": [1, 1, 1], "inflate": 0.01, "uv": [5, 27]}
]
},
{
"name": "right_finger_bright_yellow",
"parent": "right_finger_dim_yellow",
"pivot": [-6.75, 7.25, 0.75],
"cubes": [
{"origin": [-7.25, 6.75, 0.25], "size": [1, 1, 1], "uv": [10, 27]}
]
},
{
"name": "arm_left",
"parent": "torso_top",
"pivot": [1, 8.5, 0],
"parent": "arms",
"pivot": [1, 8.75, 0],
"cubes": [
{"origin": [0.5, 7.5, -0.5], "size": [4, 1, 1], "uv": [38, 9]}
{"origin": [0.5, 7.75, -0.5], "size": [4, 1, 1], "uv": [38, 9]}
]
},
{
"name": "forearm_left",
"parent": "arm_left",
"pivot": [4, 8, 0],
"pivot": [4, 8.25, 0],
"cubes": [
{"origin": [4, 7, -1], "size": [2, 2, 2], "uv": [36, 0]}
{"origin": [4, 7.25, -1], "size": [3, 2, 2], "uv": [47, 15]}
]
},
{
"name": "hand_left",
"parent": "forearm_left",
"pivot": [6, 8, 0],
"pivot": [7, 9.25, 0],
"cubes": [
{"origin": [6, 7, -1.5], "size": [3, 2, 3], "inflate": 0.01, "uv": [26, 6]},
{"origin": [7.75, 6.5, -0.5], "size": [1, 1, 1], "uv": [0, 0]},
{"origin": [6.25, 6.5, 0.25], "size": [1, 1, 1], "uv": [0, 2]},
{"origin": [6.25, 6.5, -1.25], "size": [1, 1, 1], "uv": [0, 4]}
{"origin": [6, 7.25, -1.5], "size": [3, 2, 3], "inflate": 0.01, "uv": [26, 6]}
]
},
{
"name": "locator_hand_secondary",
"parent": "hand_left",
"pivot": [7.5, 7.25, 0],
"rotation": [0, -90, 0],
"locators": {
"hand_secondary": [7.5, 7.25, 0]
}
},
{
"name": "fingers_left",
"parent": "hand_left",
"pivot": [7.25, 7.25, 0]
},
{
"name": "left_finger_dim_green",
"parent": "fingers_left",
"pivot": [6.75, 7.25, -0.75],
"cubes": [
{"origin": [6.25, 6.75, -1.25], "size": [1, 1, 1], "inflate": 0.01, "uv": [1, 29]}
]
},
{
"name": "left_finger_bright_green",
"parent": "left_finger_dim_green",
"pivot": [6.75, 7.25, -0.75],
"cubes": [
{"origin": [6.25, 6.75, -1.25], "size": [1, 1, 1], "uv": [14, 29]}
]
},
{
"name": "left_finger_dim_red",
"parent": "fingers_left",
"pivot": [8.25, 7.25, 0],
"cubes": [
{"origin": [7.75, 6.75, -0.5], "size": [1, 1, 1], "inflate": 0.01, "uv": [1, 25]}
]
},
{
"name": "left_finger_bright_red2",
"parent": "left_finger_dim_red",
"pivot": [8.25, 7.25, 0],
"cubes": [
{"origin": [7.75, 6.75, -0.5], "size": [1, 1, 1], "uv": [14, 25]}
]
},
{
"name": "left_finger_dim_yellow",
"parent": "fingers_left",
"pivot": [6.75, 7.25, 0.75],
"cubes": [
{"origin": [6.25, 6.75, 0.25], "size": [1, 1, 1], "inflate": 0.01, "uv": [1, 27]}
]
},
{
"name": "left_finger_bright_yellow",
"parent": "left_finger_dim_yellow",
"pivot": [6.75, 7.25, 0.75],
"cubes": [
{"origin": [6.25, 6.75, 0.25], "size": [1, 1, 1], "uv": [14, 27]}
]
},
{
"name": "torso_bottom",
"parent": "body",
"pivot": [0, 5.5, 1.75],
"pivot": [0, 5.75, 1.75],
"cubes": [
{"origin": [-2, 2.5, -1.5], "size": [4, 3, 4], "uv": [48, 0]}
{"origin": [-2, 2.75, -1.5], "size": [4, 3, 4], "uv": [48, 0]}
]
},
{
"name": "tail",
"parent": "torso_bottom",
"pivot": [0, 2.5, 1.5],
"pivot": [0, 3.75, 1.5],
"cubes": [
{"origin": [-1, 2.5, 1.25], "size": [2, 2, 2], "inflate": 0.01, "uv": [49, 7]}
{"origin": [-1, 2.75, 1.25], "size": [2, 2, 2], "inflate": 0.01, "uv": [49, 7]}
]
},
{
"name": "tail_tip",
"name": "locator_tail",
"parent": "tail",
"pivot": [0, 3.5, 3.25],
"pivot": [0, 3.75, 3.25],
"rotation": [-180, 0, 180],
"locators": {
"tail": [0, 3.75, 3.25]
}
},
{
"name": "tail2",
"parent": "tail",
"pivot": [0, 3.75, 3.25],
"cubes": [
{"origin": [-0.5, 3, 3], "size": [1, 1, 2], "uv": [36, 4]}
{"origin": [-0.5, 3.25, 3], "size": [1, 1, 2], "uv": [36, 4]}
]
},
{
"name": "locator_tail_tip",
"parent": "tail2",
"pivot": [0, 3.75, 5],
"rotation": [-180, 0, 180],
"locators": {
"tail_tip": [0, 3.75, 5]
}
},
{
"name": "legs",
"parent": "torso_bottom",
"pivot": [0, 3.25, -0.25]
},
{
"name": "leg_right",
"parent": "torso_bottom",
"pivot": [-1.25, 3.25, 0.25],
"parent": "legs",
"pivot": [-1.25, 3.25, -0.25],
"cubes": [
{"origin": [-2.5, 0, -0.75], "size": [2, 4, 2], "uv": [28, 0]}
{"origin": [-2.5, 2, -1.25], "size": [2, 2, 2], "inflate": 0.01, "uv": [28, 20]}
]
},
{
"name": "leg_left",
"parent": "torso_bottom",
"pivot": [1.25, 3.25, 0.25],
"name": "leg_right2",
"parent": "leg_right",
"pivot": [-1.5, 2, -1.25],
"cubes": [
{"origin": [0.5, 0, -0.75], "size": [2, 4, 2], "uv": [20, 0]}
{"origin": [-2.5, 0, -1.25], "size": [2, 2, 2], "uv": [28, 16]}
]
},
{
"name": "locator_foot_primary",
"parent": "leg_right2",
"pivot": [-1.5, 0.5, -0.3],
"rotation": [90, 0, 0],
"locators": {
"foot_primary": [-1.5, 0.5, -0.3]
}
},
{
"name": "leg_left",
"parent": "legs",
"pivot": [1.25, 3.25, -0.25],
"cubes": [
{"origin": [0.5, 2, -1.25], "size": [2, 2, 2], "inflate": 0.01, "uv": [20, 2]}
]
},
{
"name": "leg_left2",
"parent": "leg_left",
"pivot": [1.5, 2, -1.25],
"cubes": [
{"origin": [0.5, 0, -1.25], "size": [2, 2, 2], "uv": [28, 2]}
]
},
{
"name": "locator_foot_secondary",
"parent": "leg_left2",
"pivot": [1.5, 0.5, -0.3],
"rotation": [90, 0, 0],
"locators": {
"foot_secondary": [1.5, 0.5, -0.3]
}
}
]
}
@@ -4,8 +4,8 @@
{
"description": {
"identifier": "geometry.beheeyem",
"texture_width": 128,
"texture_height": 32,
"texture_width": 64,
"texture_height": 64,
"visible_bounds_width": 3,
"visible_bounds_height": 3.5,
"visible_bounds_offset": [0, 1.25, 0]
@@ -15,160 +15,442 @@
"name": "beheeyem",
"pivot": [0, 0, 0]
},
{
"name": "locator_root",
"parent": "beheeyem",
"pivot": [0, 0, 0],
"locators": {
"root": [0, 0, 0]
}
},
{
"name": "locator_top",
"parent": "beheeyem",
"pivot": [0, 31, 0],
"locators": {
"top": [0, 31, 0]
}
},
{
"name": "body",
"parent": "beheeyem",
"pivot": [0, 7, 0]
},
{
"name": "locator_middle",
"parent": "body",
"pivot": [0, 11, 0],
"locators": {
"middle": [0, 11, 0]
}
},
{
"name": "locator_target",
"parent": "body",
"pivot": [0, 10, -8],
"locators": {
"target": [0, 10, -8]
}
},
{
"name": "torso_top",
"parent": "body",
"pivot": [-1.25, 7.25, 2],
"pivot": [0.25, 7.25, 0],
"cubes": [
{"origin": [-2, 7.22906, -2.00011], "size": [4, 6, 4], "uv": [35, 0]},
{"origin": [0.75, 7.97906, -2.32511], "size": [1, 1, 1], "pivot": [1.25, 8.47906, -1.92511], "rotation": [0, -5, 0], "uv": [81, 2]},
{"origin": [-1.75, 7.97906, -2.32511], "size": [1, 1, 1], "pivot": [-1.25, 8.47906, -1.92511], "rotation": [0, 5, 0], "uv": [95, 2]}
{"origin": [-2, 6.25, -2], "size": [4, 7, 4], "uv": [35, 0]},
{"origin": [0.75, 8.5, -2.3], "size": [1, 1, 1], "uv": [40, 58]},
{"origin": [-1.75, 8.5, -2.3], "size": [1, 1, 1], "uv": [36, 58]}
]
},
{
"name": "collar_back",
"parent": "torso_top",
"pivot": [0, 13.22906, -0.25011],
"pivot": [0, 12.23, -0.25],
"cubes": [
{"origin": [-2.5, 11.22906, -0.25011], "size": [5, 2, 3], "inflate": 0.01, "uv": [89, 14]}
{"origin": [-2.5, 11.25, -0.25], "size": [5, 2, 3], "inflate": 0.01, "uv": [48, 12]}
]
},
{
"name": "collar_front",
"parent": "collar_back",
"pivot": [0, 12.72906, -0.25011],
"rotation": [30, 0, 0],
"pivot": [0, 12.75, -0.25],
"cubes": [
{"origin": [-2.5, 11.72906, -3.25011], "size": [2, 1, 3], "uv": [50, 22]},
{"origin": [0.5, 11.72906, -3.25011], "size": [2, 1, 3], "uv": [60, 22]}
{"origin": [-2.5, 11.75, -3.25], "size": [2, 1, 3], "uv": [54, 17]},
{"origin": [0.5, 11.75, -3.25], "size": [2, 1, 3], "uv": [54, 21]}
]
},
{
"name": "head",
"parent": "torso_top",
"pivot": [0, 12.72906, -0.00011],
"pivot": [0, 12.73, 0]
},
{
"name": "head_ai",
"parent": "head",
"pivot": [0, 12.73, 0]
},
{
"name": "head_angle",
"parent": "head_ai",
"pivot": [0, 12.73, 0],
"cubes": [
{"origin": [-4, 19.72906, -3.50011], "size": [8, 7, 7], "uv": [0, 14]},
{"origin": [-4.5, 16.72906, -4.50011], "size": [9, 3, 9], "uv": [92, 0]},
{"origin": [-6, 13.72906, -5.50011], "size": [12, 3, 11], "uv": [0, 0]},
{"origin": [-4, 12.72906, -3.50011], "size": [8, 1, 7], "uv": [98, 12]},
{"origin": [-0.5, 19.72906, -3.50011], "size": [1, 1, 1], "inflate": 0.005, "uv": [51, 5]},
{"origin": [-6, 14.22906, -5.50011], "size": [12, 1, 11], "inflate": 0.005, "uv": [46, 0]},
{"origin": [-5, 13.72906, -4.50011], "size": [10, 1, 9], "inflate": 0.005, "uv": [37, 12]},
{"origin": [-4, 13.22906, -3.50011], "size": [8, 1, 7], "inflate": 0.005, "uv": [66, 12]}
{"origin": [-4, 19.75, -4], "size": [8, 7, 7], "uv": [0, 14]},
{"origin": [-4.5, 16.75, -5], "size": [9, 3, 9], "uv": [0, 28]},
{"origin": [-6, 13.75, -6], "size": [12, 3, 11], "uv": [0, 0]},
{"origin": [-4, 12.75, -4], "size": [8, 1, 7], "uv": [23, 40]},
{"origin": [-0.5, 19.75, -4], "size": [1, 1, 0], "inflate": 0.005, "uv": [48, 1]},
{"origin": [-6, 14.25, -6], "size": [12, 1, 11], "inflate": 0.005, "uv": [0, 52]},
{"origin": [-4, 13.25, -4], "size": [8, 1, 7], "inflate": 0.005, "uv": [0, 44]}
]
},
{
"name": "locator_item_hat",
"parent": "head_angle",
"pivot": [0, 25.75, -0.5],
"locators": {
"item_hat": [0, 25.75, -0.5]
}
},
{
"name": "locator_head",
"parent": "head_angle",
"pivot": [0, 22.75, -4],
"locators": {
"head": [0, 22.75, -4]
}
},
{
"name": "locator_item_face",
"parent": "head_angle",
"pivot": [0, 15, -5.9],
"locators": {
"item_face": [0, 15, -5.9]
}
},
{
"name": "locator_face",
"parent": "head_angle",
"pivot": [0, 14.85, -6],
"locators": {
"face": [0, 14.85, -6]
}
},
{
"name": "eyes",
"parent": "head",
"pivot": [0, 14.72906, -5.50011],
"parent": "head_angle",
"pivot": [0, 14.75, -6]
},
{
"name": "eyes_bright",
"parent": "eyes",
"pivot": [0, 14.85, -5.9],
"cubes": [
{"origin": [-4, 14.22906, -5.51511], "size": [8, 1, 0], "uv": [35, 10]},
{"origin": [-3, 13.72906, -5.51011], "size": [2, 2, 0], "uv": [51, 7]},
{"origin": [1, 13.72906, -5.51011], "size": [2, 2, 0], "uv": [51, 9]},
{"origin": [-2.5, 13.72906, -5.52011], "size": [1, 2, 0], "uv": [55, 7]},
{"origin": [1.5, 13.72906, -5.52011], "size": [1, 2, 0], "uv": [55, 9]},
{"origin": [-2.5, 14.22906, -5.52511], "size": [1, 1, 0], "uv": [55, 5]},
{"origin": [1.5, 14.22906, -5.52511], "size": [1, 1, 0], "uv": [55, 6]}
{"origin": [-4, 14.35, -5.91], "size": [8, 1, 0], "uv": [47, 45]},
{"origin": [-3, 13.85, -5.915], "size": [2, 2, 0], "uv": [1, 4]},
{"origin": [1, 13.85, -5.915], "size": [2, 2, 0], "uv": [6, 4]}
]
},
{
"name": "arm_right",
"parent": "torso_top",
"pivot": [-2, 10.97906, -0.00011],
"name": "eyes_dim",
"parent": "eyes",
"pivot": [0, 14.85, -6],
"cubes": [
{"origin": [-6.5, 10.47906, -0.50011], "size": [5, 1, 1], "uv": [87, 20]}
{"origin": [-4, 14.35, -6.01], "size": [8, 1, 0], "uv": [47, 43]},
{"origin": [-3, 13.85, -6.015], "size": [2, 2, 0], "uv": [1, 1]},
{"origin": [1, 13.85, -6.015], "size": [2, 2, 0], "uv": [6, 1]}
]
},
{
"name": "pupil_left",
"parent": "eyes",
"pivot": [2, 14.85, -6],
"cubes": [
{"origin": [1.5, 14.35, -6.02], "size": [1, 1, 0], "uv": [6, 7]}
]
},
{
"name": "locator_eye_left",
"parent": "pupil_left",
"pivot": [2, 14.85, -6],
"locators": {
"eye2": [2, 14.85, -6]
}
},
{
"name": "pupil_right",
"parent": "eyes",
"pivot": [-2, 14.85, -6.01],
"cubes": [
{"origin": [-2.5, 14.35, -6.02], "size": [1, 1, 0], "uv": [1, 7]}
]
},
{
"name": "locator_eye_right",
"parent": "pupil_right",
"pivot": [-2, 14.85, -6],
"locators": {
"eye1": [-2, 14.85, -6]
}
},
{
"name": "arms",
"parent": "torso_top",
"pivot": [0, 11, 0]
},
{
"name": "arm_right",
"parent": "arms",
"pivot": [-2, 11, -0.00011],
"cubes": [
{"origin": [-5.5, 10.5, -0.5], "size": [4, 1, 1], "uv": [27, 35]}
]
},
{
"name": "arm_right2",
"parent": "arm_right",
"pivot": [-6, 10.97906, -0.00011],
"pivot": [-5, 11, 0],
"cubes": [
{"origin": [-9, 10.22906, -1.00011], "size": [3, 2, 2], "uv": [0, 4]}
{"origin": [-9, 10.25, -1], "size": [4, 2, 2], "uv": [23, 14]}
]
},
{
"name": "hand_right",
"parent": "arm_right2",
"pivot": [-8.5, 10.97906, -0.00011],
"pivot": [-8.5, 11.25, 0],
"cubes": [
{"origin": [-10.5, 10.22906, -1.50011], "size": [2, 3, 3], "inflate": 0.01, "uv": [30, 22]},
{"origin": [-11, 10.37906, 0.27489], "size": [1, 1, 1], "uv": [119, 2]},
{"origin": [-11, 12.07906, -0.50011], "size": [1, 1, 1], "uv": [119, 0]},
{"origin": [-11, 10.37906, -1.27511], "size": [1, 1, 1], "uv": [119, 4]}
{"origin": [-11, 10, -1.5], "size": [3, 3, 3], "inflate": 0.01, "uv": [51, 6]}
]
},
{
"name": "locator_hand_primary",
"parent": "hand_right",
"pivot": [-11, 11.5, 0],
"rotation": [0, 90, 0],
"locators": {
"hand_primary": [-11, 11.5, 0],
"physical": [-11, 11.5, 0],
"special": [-11, 11.5, 0]
}
},
{
"name": "locator_item",
"parent": "hand_right",
"pivot": [-11.75, 11.25, 0],
"rotation": [-90, 0, 0],
"locators": {
"item": [-11.75, 11.25, 0]
}
},
{
"name": "right_fingers",
"parent": "hand_right",
"pivot": [-11, 10.75, 0.75]
},
{
"name": "right_finger_dim_green",
"parent": "right_fingers",
"pivot": [-11, 10.75, -0.75],
"cubes": [
{"origin": [-11.5, 10.25, -1.25], "size": [1, 1, 1], "inflate": 0.01, "uv": [55, 40]}
]
},
{
"name": "right_finger_bright_green2",
"parent": "right_finger_dim_green",
"pivot": [-11, 10.75, -0.75],
"cubes": [
{"origin": [-11.5, 10.25, -1.25], "size": [1, 1, 1], "uv": [55, 33]}
]
},
{
"name": "right_finger_dim_red",
"parent": "right_fingers",
"pivot": [-11, 12.25, 0],
"cubes": [
{"origin": [-11.5, 11.75, -0.5], "size": [1, 1, 1], "inflate": 0.01, "uv": [55, 36]}
]
},
{
"name": "right_finger_bright_red2",
"parent": "right_finger_dim_red",
"pivot": [-11, 12.25, 0],
"cubes": [
{"origin": [-11.5, 11.75, -0.5], "size": [1, 1, 1], "uv": [55, 29]}
]
},
{
"name": "right_finger_dim_yellow",
"parent": "right_fingers",
"pivot": [-11, 10.75, 0.75],
"cubes": [
{"origin": [-11.5, 10.25, 0.25], "size": [1, 1, 1], "inflate": 0.01, "uv": [55, 38]}
]
},
{
"name": "right_finger_bright_yellow",
"parent": "right_finger_dim_yellow",
"pivot": [-11, 10.75, 0.75],
"cubes": [
{"origin": [-11.5, 10.25, 0.25], "size": [1, 1, 1], "uv": [55, 31]}
]
},
{
"name": "arm_left",
"parent": "torso_top",
"pivot": [2, 10.97906, -0.00011],
"parent": "arms",
"pivot": [2, 11, 0],
"cubes": [
{"origin": [1.5, 10.47906, -0.50011], "size": [5, 1, 1], "uv": [75, 20]}
{"origin": [1.5, 10.5, -0.5], "size": [4, 1, 1], "uv": [37, 35]}
]
},
{
"name": "arm_left2",
"parent": "arm_left",
"pivot": [6, 10.97906, -0.00011],
"pivot": [5, 11, 0],
"cubes": [
{"origin": [6, 10.22906, -1.00011], "size": [3, 2, 2], "uv": [0, 0]}
{"origin": [5, 10.25, -1], "size": [4, 2, 2], "uv": [35, 14]}
]
},
{
"name": "hand_left",
"parent": "arm_left2",
"pivot": [8.5, 10.97906, -0.00011],
"pivot": [8.5, 11.25, 0],
"cubes": [
{"origin": [8.5, 10.22906, -1.50011], "size": [2, 3, 3], "inflate": 0.01, "uv": [40, 22]},
{"origin": [10, 10.37906, 0.27489], "size": [1, 1, 1], "uv": [124, 2]},
{"origin": [10, 12.07906, -0.50011], "size": [1, 1, 1], "uv": [124, 0]},
{"origin": [10, 10.37906, -1.27511], "size": [1, 1, 1], "uv": [124, 4]}
{"origin": [8, 10, -1.5], "size": [3, 3, 3], "inflate": 0.01, "uv": [51, 0]}
]
},
{
"name": "locator_hand_secondary",
"parent": "hand_left",
"pivot": [11, 11.5, 0],
"rotation": [0, -90, 0],
"locators": {
"hand_secondary": [11, 11.5, 0]
}
},
{
"name": "left_fingers",
"parent": "hand_left",
"pivot": [11, 10.75, 0.75]
},
{
"name": "left_finger_dim_green",
"parent": "left_fingers",
"pivot": [11, 10.75, -0.75],
"cubes": [
{"origin": [10.5, 10.25, -1.25], "size": [1, 1, 1], "inflate": 0.01, "uv": [59, 40]}
]
},
{
"name": "left_finger_bright_green2",
"parent": "left_finger_dim_green",
"pivot": [11, 10.75, -0.75],
"cubes": [
{"origin": [10.5, 10.25, -1.25], "size": [1, 1, 1], "uv": [59, 33]}
]
},
{
"name": "left_finger_dim_red",
"parent": "left_fingers",
"pivot": [11, 12.25, 0],
"cubes": [
{"origin": [10.5, 11.75, -0.5], "size": [1, 1, 1], "inflate": 0.01, "uv": [59, 36]}
]
},
{
"name": "left_finger_bright_red2",
"parent": "left_finger_dim_red",
"pivot": [11, 12.25, 0],
"cubes": [
{"origin": [10.5, 11.75, -0.5], "size": [1, 1, 1], "uv": [59, 29]}
]
},
{
"name": "left_finger_dim_yellow",
"parent": "left_fingers",
"pivot": [11, 10.75, 0.75],
"cubes": [
{"origin": [10.5, 10.25, 0.25], "size": [1, 1, 1], "inflate": 0.01, "uv": [59, 38]}
]
},
{
"name": "left_finger_bright_yellow",
"parent": "left_finger_dim_yellow",
"pivot": [11, 10.75, 0.75],
"cubes": [
{"origin": [10.5, 10.25, 0.25], "size": [1, 1, 1], "uv": [59, 31]}
]
},
{
"name": "torso_bottom",
"parent": "body",
"pivot": [0, 7.25, 2],
"pivot": [0, 7.25, 0],
"cubes": [
{"origin": [-2.5, 3.25, -2], "size": [5, 4, 4], "uv": [81, 0]},
{"origin": [-1.75, 5.5, -2.275], "size": [1, 1, 1], "pivot": [-1.25, 6, -1.875], "rotation": [0, 5, 0], "uv": [81, 0]},
{"origin": [0.75, 5.5, -2.275], "size": [1, 1, 1], "pivot": [1.25, 6, -1.875], "rotation": [0, -5, 0], "uv": [95, 0]}
{"origin": [-2.5, 3.75, -2.5], "size": [5, 4, 5], "inflate": 0.01, "uv": [27, 26]},
{"origin": [-1.75, 6, -2.8], "size": [1, 1, 1], "uv": [36, 60]},
{"origin": [0.75, 6, -2.8], "size": [1, 1, 1], "uv": [40, 60]}
]
},
{
"name": "bottom_coat",
"parent": "torso_bottom",
"pivot": [0, 5, -2],
"rotation": [-17.5, 0, 0],
"pivot": [0, 4.75, -2.6],
"cubes": [
{"origin": [-4, 3, -2], "size": [0, 2, 6], "uv": [100, 14]},
{"origin": [-4, 3, -2], "size": [8, 2, 0], "uv": [112, 20]},
{"origin": [4, 3, -2], "size": [0, 2, 6], "uv": [100, 16]},
{"origin": [-4, 3, 4], "size": [8, 2, 0], "uv": [112, 22]},
{"origin": [-4, 5, -2], "size": [8, 0, 6], "uv": [106, 24]}
{"origin": [-4, 2.75, -2.6], "size": [0, 2, 7], "uv": [50, 44]},
{"origin": [-4, 2.75, -2.6], "size": [8, 2, 0], "uv": [48, 53]},
{"origin": [4, 2.75, -2.6], "size": [0, 2, 7], "uv": [50, 42]},
{"origin": [-4, 2.75, 4.4], "size": [8, 2, 0], "uv": [48, 55]},
{"origin": [-4, 4.75, -2.6], "size": [8, 0, 7], "uv": [41, 57]}
]
},
{
"name": "leg_right",
"parent": "torso_bottom",
"pivot": [-1.25, 3.25, 0],
"pivot": [-1.5, 3.25, 0],
"cubes": [
{"origin": [-2.25, 0, -1], "size": [2, 4, 2], "uv": [23, 15]}
{"origin": [-2.5, 2, -1], "size": [2, 2, 2], "inflate": 0.01, "uv": [30, 18]}
]
},
{
"name": "leg_right2",
"parent": "leg_right",
"pivot": [-1.5, 2, -1],
"cubes": [
{"origin": [-2.5, 0, -1], "size": [2, 2, 2], "uv": [30, 22]}
]
},
{
"name": "locator_foot_primary",
"parent": "leg_right2",
"pivot": [-1.5, 0.5, 0],
"rotation": [90, 0, 0],
"locators": {
"foot_primary": [-1.5, 0.5, 0]
}
},
{
"name": "leg_left",
"parent": "torso_bottom",
"pivot": [1.25, 3.25, 0],
"pivot": [1.5, 3.25, 0],
"cubes": [
{"origin": [0.25, 0, -1], "size": [2, 4, 2], "uv": [38, 15]}
{"origin": [0.5, 2, -1], "size": [2, 2, 2], "inflate": 0.01, "uv": [38, 18]}
]
},
{
"name": "leg_left2",
"parent": "leg_left",
"pivot": [1.5, 2, -1],
"cubes": [
{"origin": [0.5, 0, -1], "size": [2, 2, 2], "uv": [38, 22]}
]
},
{
"name": "locator_foot_secondary",
"parent": "leg_left2",
"pivot": [1.5, 0.5, 0],
"rotation": [90, 0, 0],
"locators": {
"foot_secondary": [1.5, 0.5, 0]
}
}
]
}
@@ -18,136 +18,179 @@
{
"name": "body",
"parent": "litwick",
"pivot": [0, 0, 0]
},
{
"name": "wax_trail",
"parent": "body",
"pivot": [0, 0, 0],
"cubes": [
{"origin": [-4, 0.015, -4], "size": [8, 0, 8], "uv": [0, 0]}
]
},
{
"name": "wax_trail2",
"parent": "wax_trail",
"pivot": [0, 0, 0],
"cubes": [
{"origin": [-4, 0.02, 0], "size": [8, 0, 4], "uv": [14, 8]}
]
"pivot": [0, 4.5, 0]
},
{
"name": "head",
"parent": "body",
"pivot": [0, 0, 0],
"cubes": [
{"origin": [-3, 0, -3], "size": [6, 7, 6], "uv": [0, 8]}
{"origin": [-3.5, 0.015, -3.5], "size": [7, 2, 7], "inflate": -0.01, "uv": [0, 16]}
]
},
{
"name": "head2",
"parent": "head",
"pivot": [0, 1.5, 0],
"cubes": [
{"origin": [-4, 1.25, -4], "size": [8, 8, 8], "inflate": -0.1, "uv": [0, 0]}
]
},
{
"name": "eyes",
"parent": "head2",
"pivot": [0, 4, -3.9]
},
{
"name": "eye_left",
"parent": "eyes",
"pivot": [2.45, 4, -3.91]
},
{
"name": "eye_left_open",
"parent": "eye_left",
"pivot": [2.45, 4, -3.91],
"cubes": [
{"origin": [1.95, 3, -3.91], "size": [1, 2, 0], "uv": [0, 0]}
]
},
{
"name": "eye_expression_left",
"parent": "eye_left_open",
"pivot": [2.45, 5, -3.82],
"cubes": [
{"origin": [1.95, 4.5, -3.82], "size": [1, 1, 0], "uv": [2, 0]}
]
},
{
"name": "eye_closed_left",
"parent": "eye_left",
"pivot": [2.45, 4, -3.81],
"cubes": [
{"origin": [1.45, 3.5, -3.81], "size": [2, 1, 0], "uv": [4, 0]}
]
},
{
"name": "eye_happy_left",
"parent": "eye_left",
"pivot": [2.45, 4.5, -3.81],
"cubes": [
{"origin": [1.45, 4, -3.81], "size": [2, 1, 0], "uv": [4, 2]},
{"origin": [1.95, 3.5, -3.82], "size": [1, 1, 0], "uv": [2, 2]}
]
},
{
"name": "eye_right",
"parent": "eyes",
"pivot": [-2.45, 4, -3.91]
},
{
"name": "eye_right_open",
"parent": "eye_right",
"pivot": [-2.45, 4, -3.91],
"cubes": [
{"origin": [-2.95, 3, -3.91], "size": [1, 2, 0], "uv": [0, 2], "mirror": true}
]
},
{
"name": "eye_expression_right",
"parent": "eye_right_open",
"pivot": [-2.45, 5, -3.82],
"cubes": [
{"origin": [-2.95, 4.5, -3.82], "size": [1, 1, 0], "uv": [2, 1], "mirror": true}
]
},
{
"name": "eye_closed_right",
"parent": "eye_right",
"pivot": [-2.45, 4, -3.81],
"cubes": [
{"origin": [-3.45, 3.5, -3.81], "size": [2, 1, 0], "uv": [4, 1], "mirror": true}
]
},
{
"name": "eye_happy_right",
"parent": "eye_right",
"pivot": [-2.45, 4.5, -3.81],
"cubes": [
{"origin": [-3.45, 4, -3.81], "size": [2, 1, 0], "uv": [4, 3], "mirror": true},
{"origin": [-2.95, 3.5, -3.82], "size": [1, 1, 0], "uv": [2, 3], "mirror": true}
]
},
{
"name": "mouth",
"parent": "head2",
"pivot": [0, 3.5, -3.9]
},
{
"name": "mouth_rotation",
"parent": "mouth",
"pivot": [0, 3.5, -3.9],
"rotation": [-25, 0, 0],
"cubes": [
{"origin": [-1, 2.5, -3.9], "size": [2, 1, 1], "uv": [24, 2]}
]
},
{
"name": "mouth_open",
"parent": "mouth",
"pivot": [0, 2.5, -3.8],
"cubes": [
{"origin": [-1, 2, -3.81], "size": [2, 1, 0], "uv": [4, 7]}
]
},
{
"name": "hair",
"parent": "head",
"pivot": [0, 9.5, 0],
"parent": "head2",
"pivot": [0, 9, 0],
"cubes": [
{"origin": [-3.5, 7.5, -3.5], "size": [7, 0, 7], "uv": [17, 0]},
{"origin": [-3.5, 2.5, -3.5], "size": [7, 5, 0], "uv": [0, 26]},
{"origin": [-3.5, 2.5, -3.5], "size": [0, 5, 7], "uv": [14, 14]},
{"origin": [3.5, 2.5, -3.5], "size": [0, 5, 7], "uv": [0, 14]},
{"origin": [-3.5, 2.5, 3.5], "size": [7, 5, 0], "uv": [24, 12]}
{"origin": [-4.5, 2.5, -4.5], "size": [9, 7, 9], "inflate": 0.01, "uv": [23, 7]}
]
},
{
"name": "flame",
"parent": "hair",
"pivot": [0, 7.5, 0],
"pivot": [0, 9.5, 0],
"cubes": [
{"origin": [-2, 7, 0], "size": [4, 5, 0], "uv": [0, 0]},
{"origin": [0, 7, -2], "size": [0, 5, 4], "uv": [14, 22]}
{"origin": [-3, 9.5, 0], "size": [6, 8, 0], "pivot": [0, 13, 0], "rotation": [0, 45, 0], "uv": [51, 8]},
{"origin": [0, 9.5, -3], "size": [0, 8, 6], "pivot": [0, 13, 0], "rotation": [0, 45, 0], "uv": [51, -6]}
]
},
{
"name": "arms",
"parent": "head2",
"pivot": [0, 2.5, 0]
},
{
"name": "arm_left",
"parent": "arms",
"pivot": [4, 2.75, 0],
"cubes": [
{"origin": [3.75, 2, -0.5], "size": [2, 1, 1], "inflate": 0.1, "uv": [24, 4]}
]
},
{
"name": "arm_right",
"parent": "head",
"pivot": [-3, 2, -0.5],
"rotation": [0, 0, -90],
"parent": "arms",
"pivot": [-4, 2.75, 0],
"cubes": [
{"origin": [-3, 2, -2], "size": [0, 2, 2], "uv": [18, 10]}
{"origin": [-5.75, 2, -0.5], "size": [2, 1, 1], "inflate": 0.1, "uv": [24, 6], "mirror": true}
]
},
{
"name": "arm_left",
"parent": "head",
"pivot": [3, 2, -0.5],
"rotation": [0, 0, -90],
"name": "wax_trail",
"parent": "body",
"pivot": [0, 0, 0],
"cubes": [
{"origin": [3, 0, -2], "size": [0, 2, 2], "uv": [0, 9]}
{"origin": [-5.5, 0.015, -5.5], "size": [11, 0, 7], "uv": [21, 23]}
]
},
{
"name": "eyes",
"parent": "head",
"pivot": [0, 4.5, -4]
},
{
"name": "eye_right",
"parent": "eyes",
"pivot": [-2, 2.5, -3],
"name": "wax_trail2",
"parent": "wax_trail",
"pivot": [0, 0, 1.5],
"cubes": [
{"origin": [-2.5, 2.5, -3.01], "size": [1, 1, 0], "uv": [6, 6]}
]
},
{
"name": "eyelid_right",
"parent": "eye_right",
"pivot": [-1.9, 2.5, -2.9],
"cubes": [
{"origin": [-2.9, 2.5, -2.91], "size": [2, 2, 1], "inflate": 0.01, "uv": [0, 8]}
]
},
{
"name": "eye_left",
"parent": "eyes",
"pivot": [2, 2.5, -3],
"cubes": [
{"origin": [1.5, 2.5, -3.01], "size": [1, 1, 0], "uv": [5, 5]}
]
},
{
"name": "eyelid_left",
"parent": "eye_left",
"pivot": [1.9, 2.5, -2.9],
"cubes": [
{"origin": [0.9, 2.5, -2.91], "size": [2, 2, 1], "inflate": 0.01, "uv": [0, 5]}
]
},
{
"name": "mouth",
"parent": "head",
"pivot": [0, 2.5, -3]
},
{
"name": "lip",
"parent": "mouth",
"pivot": [0, 2.5, -3],
"rotation": [-5, 0, 0],
"cubes": [
{"origin": [-1, 1.5, -3.01], "size": [2, 1, 0], "uv": [24, 7]}
]
},
{
"name": "mouth_small",
"parent": "mouth",
"pivot": [0, 2.5, -3],
"cubes": [
{"origin": [-1, 1.5, -3.01], "size": [2, 1, 0], "uv": [0, 13]}
]
},
{
"name": "mouth_large",
"parent": "mouth",
"pivot": [0, 2.5, -2.9],
"cubes": [
{"origin": [-1, 0.5, -2.91], "size": [2, 2, 0], "uv": [24, 17]}
{"origin": [-4.5, 0.02, 1.5], "size": [9, 0, 5], "uv": [5, 26]}
]
}
]
@@ -4,11 +4,11 @@
{
"description": {
"identifier": "geometry.lampent",
"texture_width": 64,
"texture_width": 128,
"texture_height": 64,
"visible_bounds_width": 4,
"visible_bounds_height": 3.5,
"visible_bounds_offset": [0, 1.25, 0]
"visible_bounds_width": 5,
"visible_bounds_height": 2.5,
"visible_bounds_offset": [0, 0.75, 0]
},
"bones": [
{
@@ -18,16 +18,134 @@
{
"name": "body",
"parent": "lampent",
"pivot": [0, 0, 0]
"pivot": [0, 6, 0]
},
{
"name": "swing",
"parent": "body",
"pivot": [0, 21, 0],
"cubes": [
{"origin": [-1.5, 1.5, -1.5], "size": [3, 2, 3], "pivot": [0, 0, 0], "rotation": [0, -45, 0], "uv": [30, 16]},
{"origin": [-1, 0, -1], "size": [2, 1, 2], "pivot": [0, 0, 0], "rotation": [0, -45, 0], "uv": [0, 31]},
{"origin": [-2.5, 1, -2.5], "size": [5, 1, 5], "pivot": [0, 0, 0], "rotation": [0, -45, 0], "uv": [27, 28]}
{"origin": [-1, 0.5, -1], "size": [2, 1, 2], "uv": [120, 11]},
{"origin": [-3, 1.35, -3], "size": [6, 1, 6], "inflate": 0.1, "uv": [104, 16]},
{"origin": [-1.5, 2, -1.5], "size": [3, 2, 3], "inflate": -0.1, "uv": [116, 1]},
{"origin": [-2.5, 3.69, -2.5], "size": [5, 1, 5], "inflate": -0.1, "uv": [96, 0]}
]
},
{
"name": "arms",
"parent": "swing",
"pivot": [0, 3.5, 0]
},
{
"name": "arm_left",
"parent": "arms",
"pivot": [2.125, 3.5, 0],
"cubes": [
{"origin": [1.125, 3.5, -0.5], "size": [3, 0, 1], "uv": [59, 20]}
]
},
{
"name": "arm_left2",
"parent": "arm_left",
"pivot": [4.125, 3.5, 0],
"cubes": [
{"origin": [4.125, 3.5, -0.5], "size": [3, 0, 1], "uv": [65, 20]}
]
},
{
"name": "arm_left3",
"parent": "arm_left2",
"pivot": [7.125, 3.5, 0],
"cubes": [
{"origin": [7.125, 3.5, -1], "size": [4, 0, 2], "uv": [70, 18]}
]
},
{
"name": "arm_left4",
"parent": "arm_left3",
"pivot": [11.125, 3.5, 0],
"cubes": [
{"origin": [11.125, 3.5, -1], "size": [4, 0, 2], "uv": [78, 18]}
]
},
{
"name": "arm_left5",
"parent": "arm_left4",
"pivot": [15.125, 3.5, 0],
"cubes": [
{"origin": [15.125, 3.5, -1], "size": [3, 0, 2], "uv": [86, 18]}
]
},
{
"name": "arm_left6",
"parent": "arm_left5",
"pivot": [18.125, 3.5, 0],
"cubes": [
{"origin": [18.125, 3.5, -1.5], "size": [3, 0, 3], "uv": [91, 18]}
]
},
{
"name": "arm_left7",
"parent": "arm_left6",
"pivot": [21.125, 3.5, 0],
"cubes": [
{"origin": [21.125, 3.5, -1.5], "size": [3, 0, 3], "uv": [91, 21]}
]
},
{
"name": "arm_right",
"parent": "arms",
"pivot": [-2.125, 3.5, 0],
"cubes": [
{"origin": [-4.125, 3.5, -0.5], "size": [3, 0, 1], "uv": [59, 21], "mirror": true}
]
},
{
"name": "arm_right2",
"parent": "arm_right",
"pivot": [-4.125, 3.5, 0],
"cubes": [
{"origin": [-7.125, 3.5, -0.5], "size": [3, 0, 1], "uv": [65, 21], "mirror": true}
]
},
{
"name": "arm_right3",
"parent": "arm_right2",
"pivot": [-7.125, 3.5, 0],
"cubes": [
{"origin": [-11.125, 3.5, -1], "size": [4, 0, 2], "uv": [70, 20], "mirror": true}
]
},
{
"name": "arm_right4",
"parent": "arm_right3",
"pivot": [-11.125, 3.5, 0],
"cubes": [
{"origin": [-15.125, 3.5, -1], "size": [4, 0, 2], "uv": [78, 20], "mirror": true}
]
},
{
"name": "arm_right5",
"parent": "arm_right4",
"pivot": [-15.125, 3.5, 0],
"cubes": [
{"origin": [-18.125, 3.5, -1], "size": [3, 0, 2], "uv": [86, 20], "mirror": true}
]
},
{
"name": "arm_right6",
"parent": "arm_right5",
"pivot": [-18.125, 3.5, 0],
"cubes": [
{"origin": [-21.125, 3.5, -1.5], "size": [3, 0, 3], "uv": [97, 18], "mirror": true}
]
},
{
"name": "arm_right7",
"parent": "arm_right6",
"pivot": [-21.125, 3.5, 0],
"cubes": [
{"origin": [-24.125, 3.5, -1.5], "size": [3, 0, 3], "uv": [97, 23], "mirror": true}
]
},
{
@@ -35,165 +153,112 @@
"parent": "swing",
"pivot": [0, 3.5, 0],
"cubes": [
{"origin": [-4.5, 3.5, -4.5], "size": [9, 6, 0], "uv": [42, 34]},
{"origin": [-4.5, 3.5, 4.5], "size": [9, 6, 0], "uv": [42, 40]},
{"origin": [-4.5, 3.5, -4.5], "size": [0, 6, 9], "uv": [42, 7]},
{"origin": [4.5, 3.5, -4.5], "size": [0, 6, 9], "uv": [42, 13]},
{"origin": [-4.5, 9.5, -4.5], "size": [9, 0, 9], "inflate": 0.01, "uv": [0, 28]},
{"origin": [-4.5, 3.5, -4.5], "size": [9, 0, 9], "inflate": 0.001, "uv": [33, 0]},
{"origin": [-4.5, 3.5, -4.5], "size": [9, 6, 9], "uv": [0, 37]}
]
},
{
"name": "flame",
"parent": "head",
"pivot": [0, 3.5, 0],
"cubes": [
{"origin": [-3, 3.5, 0], "size": [6, 6, 0], "pivot": [0, 3.5, 0], "rotation": [0, -45, 0], "uv": [0, 0]},
{"origin": [0, 3.5, -3], "size": [0, 6, 6], "pivot": [0, 3.5, 0], "rotation": [0, -45, 0], "uv": [0, 0]}
{"origin": [-5, 4.6, -5], "size": [10, 6, 0], "uv": [0, 20]},
{"origin": [-5, 4.6, 5], "size": [10, 6, 0], "uv": [0, 26]},
{"origin": [-5, 4.6, -5], "size": [10, 0, 10], "uv": [30, 20]},
{"origin": [5, 4.6, -5], "size": [0, 6, 10], "uv": [20, 10]},
{"origin": [-5, 4.6, -5], "size": [0, 6, 10], "uv": [20, 16], "mirror": true}
]
},
{
"name": "eyes",
"parent": "head",
"pivot": [0, 6, -4.5]
"pivot": [0, 7.5, -5]
},
{
"name": "eye_left",
"parent": "eyes",
"pivot": [3, 7, -4.5],
"pivot": [3.2, 7.75, -5.01]
},
{
"name": "eye_left_open",
"parent": "eye_left",
"pivot": [3.2, 7.75, -5.01],
"cubes": [
{"origin": [2.5, 6, -4.5], "size": [1, 2, 0], "uv": [12, 0]}
{"origin": [2.7, 6.75, -5.01], "size": [1, 1, 0], "uv": [2, 16]}
]
},
{
"name": "eye_left_open2",
"parent": "eye_left_open",
"pivot": [3.2, 8.25, -5.02],
"cubes": [
{"origin": [2.7, 7.75, -5.01], "size": [1, 1, 0], "uv": [4, 16]}
]
},
{
"name": "eye_closed_left",
"parent": "eye_left",
"pivot": [3.2, 11.75, -5.01],
"cubes": [
{"origin": [2.2, 11.25, -5.01], "size": [2, 1, 0], "uv": [6, 16]}
]
},
{
"name": "eye_happy_left",
"parent": "eye_left",
"pivot": [3.2, 12, -5.01],
"cubes": [
{"origin": [1.7, 11, -5.01], "size": [3, 1, 0], "uv": [12, 16]},
{"origin": [2.7, 11.5, -5.02], "size": [1, 1, 0], "uv": [10, 16]}
]
},
{
"name": "eye_right",
"parent": "eyes",
"pivot": [-3, 7, -4.5],
"pivot": [-3.2, 7.75, -5.01]
},
{
"name": "eye_right_open",
"parent": "eye_right",
"pivot": [-3.2, 7.75, -5.01],
"cubes": [
{"origin": [-3.5, 6, -4.5], "size": [1, 2, 0], "uv": [0, 12]}
{"origin": [-3.7, 6.75, -5.01], "size": [1, 1, 0], "uv": [2, 17], "mirror": true}
]
},
{
"name": "eyelid_left",
"parent": "eyes",
"pivot": [1.5, 6, -4.5],
"name": "eye_right_open2",
"parent": "eye_right_open",
"pivot": [-3.2, 8.25, -5.02],
"cubes": [
{"origin": [2.5, 6.5, -4.51], "size": [1, 1, 0], "uv": [42, 48]}
{"origin": [-3.7, 7.75, -5.01], "size": [1, 1, 0], "uv": [4, 17], "mirror": true}
]
},
{
"name": "eyelid_right",
"parent": "eyes",
"pivot": [4.5, 6, -4.5],
"name": "eye_closed_right",
"parent": "eye_right",
"pivot": [-3.2, 11.75, -5.01],
"cubes": [
{"origin": [-3.5, 6.5, -4.51], "size": [1, 1, 0], "uv": [42, 49], "mirror": true}
{"origin": [-4.2, 11.25, -5.01], "size": [2, 1, 0], "uv": [6, 17], "mirror": true}
]
},
{
"name": "eye_happy_right",
"parent": "eye_right",
"pivot": [-3.2, 12, -5.01],
"cubes": [
{"origin": [-4.7, 11, -5.01], "size": [3, 1, 0], "uv": [12, 17], "mirror": true},
{"origin": [-3.7, 11.5, -5.02], "size": [1, 1, 0], "uv": [10, 17], "mirror": true}
]
},
{
"name": "flame",
"parent": "head",
"pivot": [0, 4.5, 0],
"cubes": [
{"origin": [-2.5, 4.5, 0], "size": [5, 7, 0], "pivot": [0, 8, 0], "rotation": [0, 45, 0], "uv": [58, 9]},
{"origin": [0, 4.5, -2.5], "size": [0, 7, 5], "pivot": [0, 8, 0], "rotation": [0, 45, 0], "uv": [58, -3]}
]
},
{
"name": "brim",
"parent": "head",
"pivot": [0, 9.5, 0],
"pivot": [0, 11.5, 0],
"cubes": [
{"origin": [-7, 9.5, -7], "size": [14, 2, 14], "uv": [0, 0]},
{"origin": [-5, 11.5, -5], "size": [10, 2, 10], "uv": [0, 16]},
{"origin": [-1, 13.5, -1], "size": [2, 4, 2], "uv": [0, 16]}
]
},
{
"name": "arm_left",
"parent": "swing",
"pivot": [2.125, 2.75, 0],
"cubes": [
{"origin": [1.125, 2.75, -0.5], "size": [3, 0, 1], "uv": [26, 34]}
]
},
{
"name": "arm_left2",
"parent": "arm_left",
"pivot": [4.125, 2.75, 0],
"cubes": [
{"origin": [4.125, 2.75, -0.5], "size": [4, 0, 1], "uv": [0, 30]}
]
},
{
"name": "arm_left3",
"parent": "arm_left2",
"pivot": [8.125, 2.75, 0],
"cubes": [
{"origin": [8.125, 2.75, -0.5], "size": [4, 0, 1], "uv": [29, 25]}
]
},
{
"name": "arm_left4",
"parent": "arm_left3",
"pivot": [12.125, 2.75, 0],
"cubes": [
{"origin": [12.125, 2.75, -1], "size": [3, 0, 2], "uv": [28, 21]}
]
},
{
"name": "arm_left5",
"parent": "arm_left4",
"pivot": [15.125, 2.75, 0],
"cubes": [
{"origin": [15.125, 2.75, -1], "size": [3, 0, 2], "uv": [0, 28]}
]
},
{
"name": "arm_left6",
"parent": "arm_left5",
"pivot": [18.125, 2.75, 0],
"cubes": [
{"origin": [18.125, 2.75, -1], "size": [3, 0, 2], "uv": [0, 24]}
]
},
{
"name": "arm_right",
"parent": "swing",
"pivot": [-2.125, 2.75, 0],
"cubes": [
{"origin": [-4.125, 2.75, -0.5], "size": [3, 0, 1], "uv": [0, 34]}
]
},
{
"name": "arm_right2",
"parent": "arm_right",
"pivot": [-4.125, 2.75, 0],
"cubes": [
{"origin": [-8.125, 2.75, -0.5], "size": [4, 0, 1], "uv": [29, 24]}
]
},
{
"name": "arm_right3",
"parent": "arm_right2",
"pivot": [-8.125, 2.75, 0],
"cubes": [
{"origin": [-12.125, 2.75, -0.5], "size": [4, 0, 1], "uv": [29, 23]}
]
},
{
"name": "arm_right4",
"parent": "arm_right3",
"pivot": [-12.125, 2.75, 0],
"cubes": [
{"origin": [-15.125, 2.75, -1], "size": [3, 0, 2], "uv": [0, 22]}
]
},
{
"name": "arm_right5",
"parent": "arm_right4",
"pivot": [-15.125, 2.75, 0],
"cubes": [
{"origin": [-18.125, 2.75, -1], "size": [3, 0, 2], "uv": [6, 12]}
]
},
{
"name": "arm_right6",
"parent": "arm_right5",
"pivot": [-18.125, 2.75, 0],
"cubes": [
{"origin": [-21.125, 2.75, -1], "size": [3, 0, 2], "uv": [0, 12]}
{"origin": [-9, 10.5, -9], "size": [18, 2, 18], "uv": [0, 0]},
{"origin": [-6.75, 12, -7], "size": [14, 2, 14], "uv": [54, 2]},
{"origin": [-4, 13.5, -4], "size": [8, 2, 8], "uv": [96, 6]},
{"origin": [-1, 15.5, -1], "size": [2, 5, 2], "uv": [96, 7]}
]
}
]
@@ -5,10 +5,10 @@
"description": {
"identifier": "geometry.chandelure",
"texture_width": 128,
"texture_height": 64,
"visible_bounds_width": 6,
"visible_bounds_height": 3.5,
"visible_bounds_offset": [0, 1.25, 0]
"texture_height": 128,
"visible_bounds_width": 8,
"visible_bounds_height": 4.5,
"visible_bounds_offset": [0, 1.75, 0]
},
"bones": [
{
@@ -18,283 +18,548 @@
{
"name": "body",
"parent": "chandelure",
"pivot": [0, 0, 0]
"pivot": [0, 4, 0]
},
{
"name": "swing",
"parent": "body",
"pivot": [0, 41, 0]
"pivot": [0, 52, 0],
"cubes": [
{"origin": [-1, 0, -1], "size": [2, 3, 2], "inflate": 0.1, "uv": [40, 43]},
{"origin": [-2, 2.5, -2], "size": [4, 3, 4], "uv": [42, 28]},
{"origin": [-5, 5.51, -5], "size": [10, 2, 10], "uv": [2, 22]}
]
},
{
"name": "head",
"name": "arms",
"parent": "swing",
"pivot": [0, 5, 0],
"cubes": [
{"origin": [-6.5, 5, -6.4], "size": [13, 9, 13], "uv": [0, 0]},
{"origin": [-6.5, 5, -6.4], "size": [13, 0, 13], "inflate": 0.001, "uv": [51, 18]},
{"origin": [-6.5, 14, -6.4], "size": [13, 0, 13], "uv": [51, 31]},
{"origin": [-6.5, 5, -6.4], "size": [13, 9, 0], "uv": [63, 0]},
{"origin": [-6.5, 5, 6.6], "size": [13, 9, 0], "uv": [89, 0]},
{"origin": [-6.5, 5, -6.4], "size": [0, 9, 13], "uv": [63, -4]},
{"origin": [6.5, 5, -6.4], "size": [0, 9, 13], "uv": [89, -4]},
{"origin": [-1.5, 0, -1.5], "size": [3, 5, 3], "pivot": [0, 0, 0], "rotation": [0, -45, 0], "uv": [16, 36]}
]
},
{
"name": "eyes",
"parent": "head",
"pivot": [0.5, 9, -6]
},
{
"name": "eye_left",
"parent": "eyes",
"pivot": [4.5, 9.5, -6],
"cubes": [
{"origin": [3, 8, -6.42], "size": [3, 3, 0], "uv": [26, 47]},
{"origin": [3, 8, -6.39], "size": [3, 3, 0], "uv": [26, 53]},
{"origin": [3.5, 8.5, -6.43], "size": [2, 2, 0], "uv": [12, 42]}
]
},
{
"name": "eyelid_left",
"parent": "eye_left",
"pivot": [0.5, 3.5, 0],
"cubes": [
{"origin": [-0.5, 2.5, -0.43], "size": [2, 2, 1], "inflate": 0.01, "uv": [51, 21]}
]
},
{
"name": "eye_right",
"parent": "eyes",
"pivot": [-4.5, 9.5, -6],
"cubes": [
{"origin": [-6, 8, -6.42], "size": [3, 3, 0], "uv": [20, 47]},
{"origin": [-5.5, 8.5, -6.43], "size": [2, 2, 0], "uv": [12, 40]},
{"origin": [-6, 8, -6.39], "size": [3, 3, 0], "uv": [32, 53]}
]
},
{
"name": "eyelid_left2",
"parent": "eye_right",
"pivot": [-0.5, 3.5, 0],
"cubes": [
{"origin": [-1.5, 2.5, -0.43], "size": [2, 2, 1], "inflate": 0.01, "uv": [52, 18]}
]
},
{
"name": "brim",
"parent": "head",
"pivot": [0, 14, 0],
"cubes": [
{"origin": [-4, 14, -3], "size": [8, 3, 0], "pivot": [0, 14.5, -3], "rotation": [20, 0, 0], "uv": [40, 25]},
{"origin": [-3, 14, -4], "size": [0, 3, 8], "pivot": [-3, 14.5, 0], "rotation": [0, 0, -20], "uv": [16, 14]},
{"origin": [-4, 14, 3], "size": [8, 3, 0], "pivot": [0, 14.5, 3], "rotation": [-20, 0, 0], "uv": [39, 10]},
{"origin": [3, 14, -4], "size": [0, 3, 8], "pivot": [3, 14.5, 0], "rotation": [0, 0, 20], "uv": [0, 14]},
{"origin": [-3, 14.16, -3], "size": [6, 0, 6], "inflate": -0.15, "uv": [84, 18]}
]
},
{
"name": "flame_middle",
"parent": "head",
"pivot": [0, 14, 0],
"cubes": [
{"origin": [-3, 14, 0], "size": [6, 7, 0], "uv": [28, 36]},
{"origin": [0, 14, -3], "size": [0, 7, 6], "uv": [12, 19]}
]
},
{
"name": "flame_middle2",
"parent": "flame_middle",
"pivot": [0, 21, 0],
"cubes": [
{"origin": [-3, 21, 0], "size": [6, 7, 0], "uv": [39, 3]},
{"origin": [0, 21, -3], "size": [0, 7, 6], "uv": [0, 19]}
]
},
{
"name": "flame_middle3",
"parent": "flame_middle2",
"pivot": [0, 28, 0],
"cubes": [
{"origin": [-3, 28, 0], "size": [6, 7, 0], "uv": [0, 40]},
{"origin": [0, 28, -3], "size": [0, 7, 6], "uv": [0, 0]}
]
},
{
"name": "flame_inner",
"parent": "head",
"pivot": [0, 5, 0],
"cubes": [
{"origin": [-5, 5, 0], "size": [10, 9, 0], "uv": [100, 27]},
{"origin": [0, 5, -5], "size": [0, 9, 10], "uv": [100, 26]}
]
"pivot": [0, 4.25, 0]
},
{
"name": "arm_left",
"parent": "head",
"pivot": [2.125, 3, 0],
"parent": "arms",
"pivot": [2, 4.25, 0],
"cubes": [
{"origin": [1.125, 2, 0], "size": [6, 2, 0], "inflate": 0.01, "uv": [14, 54]}
{"origin": [1.5, 3.75, -0.5], "size": [9, 1, 1], "uv": [0, 34]}
]
},
{
"name": "arm_left2",
"parent": "arm_left",
"pivot": [7.125, 2, 0],
"pivot": [9.5, 4.25, 0],
"cubes": [
{"origin": [7.125, 2, 0], "size": [6, 2, 0], "uv": [40, 34]}
{"origin": [9, 3.25, -1], "size": [9, 2, 2], "inflate": -0.15, "uv": [20, 34]}
]
},
{
"name": "arm_left3",
"parent": "arm_left2",
"pivot": [13.125, 2, 0],
"pivot": [17.5, 4.25, 0],
"cubes": [
{"origin": [13.125, 2, 0], "size": [6, 2, 0], "inflate": 0.01, "uv": [0, 0]}
{"origin": [17, 3.25, -1], "size": [8, 2, 2], "uv": [0, 38]}
]
},
{
"name": "candle_front_left",
"parent": "arm_left3",
"pivot": [19, 4.25, -1],
"cubes": [
{"origin": [18.5, 4.25, -1.5], "size": [4, 0, 1], "uv": [57, 44]}
]
},
{
"name": "candle_front_left2",
"parent": "candle_front_left",
"pivot": [22.5, 4.25, -1],
"cubes": [
{"origin": [22, 4.25, -1.5], "size": [4, 0, 1], "inflate": 0.005, "uv": [76, 28]}
]
},
{
"name": "candle_front_left3",
"parent": "candle_front_left2",
"pivot": [26, 4.25, -1],
"rotation": [0, 0, -0.00001],
"cubes": [
{"origin": [25.5, 4.25, -1.5], "size": [4, 0, 1], "inflate": 0.01, "uv": [-1, 62]}
]
},
{
"name": "candle_front_left4",
"parent": "candle_front_left3",
"pivot": [29.5, 4.25, -1],
"rotation": [0, 0, -0.00001],
"cubes": [
{"origin": [29, 1.75, -3.5], "size": [6, 5, 5], "uv": [0, 42]}
]
},
{
"name": "flame_front_left",
"parent": "candle_front_left4",
"pivot": [34.5, 4.75, -1],
"rotation": [0, 0, -0.00001],
"cubes": [
{"origin": [34, 2.25, -3], "size": [5, 4, 4], "uv": [44, 44]}
]
},
{
"name": "flame_front_left2",
"parent": "flame_front_left",
"pivot": [39, 4.25, -1],
"rotation": [0, 0, -0.00001],
"cubes": [
{"origin": [38.5, 2.75, -2.5], "size": [4, 3, 3], "inflate": -0.1, "uv": [77, 39]}
]
},
{
"name": "flame_front_left3",
"parent": "flame_front_left2",
"pivot": [42.5, 4.25, -1],
"rotation": [0, 0, -0.00001],
"cubes": [
{"origin": [42, 3.25, -1], "size": [4, 2, 0], "uv": [17, 43]}
]
},
{
"name": "candle_back_left",
"parent": "arm_left3",
"pivot": [19, 4.25, 1],
"cubes": [
{"origin": [18.5, 4.25, 0.5], "size": [4, 0, 1], "uv": [57, 46]}
]
},
{
"name": "candle_back_left2",
"parent": "candle_back_left",
"pivot": [22.5, 4.25, 1],
"cubes": [
{"origin": [22, 4.25, 0.5], "size": [4, 0, 1], "inflate": 0.005, "uv": [79, 34]}
]
},
{
"name": "candle_back_left3",
"parent": "candle_back_left2",
"pivot": [26, 4.25, 1],
"rotation": [0, 0, -0.00001],
"cubes": [
{"origin": [25.5, 4.25, 0.5], "size": [4, 0, 1], "inflate": 0.01, "uv": [7, 62]}
]
},
{
"name": "candle_back_left4",
"parent": "candle_back_left3",
"pivot": [29.5, 4.25, 1],
"rotation": [0, 0, -0.00001],
"cubes": [
{"origin": [29, 1.75, -1.5], "size": [6, 5, 5], "uv": [22, 43]}
]
},
{
"name": "flame_back_left",
"parent": "candle_back_left4",
"pivot": [34.5, 4.75, 1],
"rotation": [0, 0, -0.00001],
"cubes": [
{"origin": [34, 2.25, -1], "size": [5, 4, 4], "uv": [62, 44]}
]
},
{
"name": "flame_back_left2",
"parent": "flame_back_left",
"pivot": [39, 4.25, 1],
"rotation": [0, 0, -0.00001],
"cubes": [
{"origin": [38.5, 2.75, -0.5], "size": [4, 3, 3], "inflate": -0.1, "uv": [93, 36]}
]
},
{
"name": "flame_back_left3",
"parent": "flame_back_left2",
"pivot": [42.5, 4.25, 1],
"rotation": [0, 0, -0.00001],
"cubes": [
{"origin": [42, 3.25, 1], "size": [4, 2, 0], "uv": [17, 53]}
]
},
{
"name": "arm_left4",
"parent": "arm_left3",
"pivot": [19.125, 2, 0],
"pivot": [25, 4.25, 0],
"cubes": [
{"origin": [19.125, 2, 0], "size": [8, 8, 0], "uv": [0, 32]}
{"origin": [24, 3.25, -1], "size": [8, 2, 2], "inflate": 0.1, "uv": [42, 35]}
]
},
{
"name": "candleholder_front_left",
"name": "arm_left5",
"parent": "arm_left4",
"pivot": [19.125, 2, 0],
"pivot": [32, 4.25, 0],
"cubes": [
{"origin": [19.125, 2, -2], "size": [4, 0, 2], "uv": [10, 46]}
{"origin": [31, 3.25, -1], "size": [7, 2, 2], "inflate": 0.05, "uv": [40, 39]}
]
},
{
"name": "candleholder_front_left2",
"parent": "candleholder_front_left",
"pivot": [23.125, 2, -2],
"name": "arm_left6",
"parent": "arm_left5",
"pivot": [38, 4.25, 0],
"cubes": [
{"origin": [23.125, 2, -2], "size": [2, 0, 2], "uv": [30, 45]},
{"origin": [25.125, 0.5, -2.5], "size": [2, 3, 3], "uv": [49, 35]}
{"origin": [37, 3.25, -1], "size": [7, 2, 2], "uv": [58, 40]}
]
},
{
"name": "flame_front_left",
"parent": "candleholder_front_left2",
"pivot": [27.125, 2, -1],
"name": "arm_left7",
"parent": "arm_left6",
"pivot": [44, 4.25, 0],
"cubes": [
{"origin": [26.625, 2, -2.5], "size": [7, 0, 3], "uv": [36, 0]},
{"origin": [26.625, 0.5, -1], "size": [7, 3, 0], "uv": [40, 31]}
]
},
{
"name": "candleholder_back_left",
"parent": "arm_left4",
"pivot": [19.125, 2, 0],
"cubes": [
{"origin": [19.125, 2, 0], "size": [4, 0, 2], "uv": [22, 45]}
]
},
{
"name": "candleholder_back_left2",
"parent": "candleholder_back_left",
"pivot": [23.125, 2, 2],
"cubes": [
{"origin": [23.125, 2, 0], "size": [2, 0, 2], "uv": [38, 44]},
{"origin": [25.125, 0.5, -0.5], "size": [2, 3, 3], "uv": [54, 25]}
]
},
{
"name": "flame_back_left",
"parent": "candleholder_back_left2",
"pivot": [27.125, 2, 1],
"cubes": [
{"origin": [26.625, 2, -0.5], "size": [7, 0, 3], "uv": [-3, 50]},
{"origin": [26.625, 0.5, 1], "size": [7, 3, 0], "uv": [40, 28]}
{"origin": [43.5, 3.75, -0.5], "size": [6, 1, 1], "uv": [32, 28]}
]
},
{
"name": "arm_right",
"parent": "head",
"pivot": [-2.125, 3, 0],
"parent": "arms",
"pivot": [-2, 4.25, 0],
"cubes": [
{"origin": [-7.125, 2, 0], "size": [6, 2, 0], "inflate": 0.01, "uv": [14, 51]}
{"origin": [-10.5, 3.75, -0.5], "size": [9, 1, 1], "uv": [0, 36], "mirror": true}
]
},
{
"name": "arm_right2",
"parent": "arm_right",
"pivot": [-7.125, 2, 0],
"pivot": [-9.5, 4.25, 0],
"cubes": [
{"origin": [-13.125, 2, 0], "size": [6, 2, 0], "uv": [40, 36]}
{"origin": [-18, 3.25, -1], "size": [9, 2, 2], "inflate": -0.15, "uv": [54, 28], "mirror": true}
]
},
{
"name": "arm_right3",
"parent": "arm_right2",
"pivot": [-13.125, 2, 0],
"pivot": [-17.5, 4.25, 0],
"cubes": [
{"origin": [-19.125, 2, 0], "size": [6, 2, 0], "inflate": 0.01, "uv": [0, 3]}
{"origin": [-25, 3.25, -1], "size": [8, 2, 2], "uv": [20, 38], "mirror": true}
]
},
{
"name": "candle_front_right",
"parent": "arm_right3",
"pivot": [-19, 4.25, -1],
"cubes": [
{"origin": [-22.5, 4.25, -1.5], "size": [4, 0, 1], "uv": [57, 45], "mirror": true}
]
},
{
"name": "candle_front_right2",
"parent": "candle_front_right",
"pivot": [-22.5, 4.25, -1],
"cubes": [
{"origin": [-26, 4.25, -1.5], "size": [4, 0, 1], "inflate": 0.005, "uv": [76, 29], "mirror": true}
]
},
{
"name": "candle_front_right3",
"parent": "candle_front_right2",
"pivot": [-26, 4.25, -1],
"rotation": [0, 0, 0.00001],
"cubes": [
{"origin": [-29.5, 4.25, -1.5], "size": [4, 0, 1], "inflate": 0.01, "uv": [-1, 63], "mirror": true}
]
},
{
"name": "candle_front_right4",
"parent": "candle_front_right3",
"pivot": [-29.5, 4.25, -1],
"rotation": [0, 0, 0.00001],
"cubes": [
{"origin": [-35, 1.75, -3.5], "size": [6, 5, 5], "uv": [0, 52], "mirror": true}
]
},
{
"name": "flame_front_right",
"parent": "candle_front_right4",
"pivot": [-34.5, 4.75, -1],
"rotation": [0, 0, 0.00001],
"cubes": [
{"origin": [-39, 2.25, -3], "size": [5, 4, 4], "uv": [76, 64], "mirror": true}
]
},
{
"name": "flame_front_right2",
"parent": "flame_front_right",
"pivot": [-39, 4.25, -1],
"rotation": [0, 0, 0.00001],
"cubes": [
{"origin": [-42.5, 2.75, -2.5], "size": [4, 3, 3], "inflate": -0.1, "uv": [80, 45], "mirror": true}
]
},
{
"name": "flame_front_right3",
"parent": "flame_front_right2",
"pivot": [-42.5, 4.25, -1],
"rotation": [0, 0, 0.00001],
"cubes": [
{"origin": [-46, 3.25, -1], "size": [4, 2, 0], "uv": [17, 45], "mirror": true}
]
},
{
"name": "candle_back_right",
"parent": "arm_right3",
"pivot": [-19, 4.25, 1],
"cubes": [
{"origin": [-22.5, 4.25, 0.5], "size": [4, 0, 1], "uv": [57, 47], "mirror": true}
]
},
{
"name": "candle_back_right2",
"parent": "candle_back_right",
"pivot": [-22.5, 4.25, 1],
"cubes": [
{"origin": [-26, 4.25, 0.5], "size": [4, 0, 1], "inflate": 0.005, "uv": [79, 35], "mirror": true}
]
},
{
"name": "candle_back_right3",
"parent": "candle_back_right2",
"pivot": [-26, 4.25, 1],
"rotation": [0, 0, 0.00001],
"cubes": [
{"origin": [-29.5, 4.25, 0.5], "size": [4, 0, 1], "inflate": 0.01, "uv": [7, 63], "mirror": true}
]
},
{
"name": "candle_back_right4",
"parent": "candle_back_right3",
"pivot": [-29.5, 4.25, 1],
"rotation": [0, 0, 0.00001],
"cubes": [
{"origin": [-35, 1.75, -1.5], "size": [6, 5, 5], "uv": [0, 81], "mirror": true}
]
},
{
"name": "flame_back_right",
"parent": "candle_back_right4",
"pivot": [-34.5, 4.75, 1],
"rotation": [0, 0, 0.00001],
"cubes": [
{"origin": [-39, 2.25, -1], "size": [5, 4, 4], "uv": [60, 56], "mirror": true}
]
},
{
"name": "flame_back_right2",
"parent": "flame_back_right",
"pivot": [-39, 4.25, 1],
"rotation": [0, 0, 0.00001],
"cubes": [
{"origin": [-42.5, 2.75, -0.5], "size": [4, 3, 3], "inflate": -0.1, "uv": [82, 28], "mirror": true}
]
},
{
"name": "flame_back_right3",
"parent": "flame_back_right2",
"pivot": [-42.5, 4.25, 1],
"rotation": [0, 0, 0.00001],
"cubes": [
{"origin": [-46, 3.25, 1], "size": [4, 2, 0], "uv": [17, 55], "mirror": true}
]
},
{
"name": "arm_right4",
"parent": "arm_right3",
"pivot": [-19.125, 2, 0],
"pivot": [-25, 4.25, 0],
"cubes": [
{"origin": [-27.125, 2, 0], "size": [8, 8, 0], "uv": [24, 25]}
{"origin": [-32, 3.25, -1], "size": [8, 2, 2], "inflate": 0.1, "uv": [60, 32], "mirror": true}
]
},
{
"name": "candleholder_front_right",
"name": "arm_right5",
"parent": "arm_right4",
"pivot": [-19.125, 2, 0],
"pivot": [-32, 4.25, 0],
"cubes": [
{"origin": [-23.125, 2, -2], "size": [4, 0, 2], "uv": [38, 42]}
{"origin": [-38, 3.25, -1], "size": [7, 2, 2], "inflate": 0.05, "uv": [62, 36], "mirror": true}
]
},
{
"name": "candleholder_front_right2",
"parent": "candleholder_front_right",
"pivot": [-23.125, 2, -2],
"name": "arm_right6",
"parent": "arm_right5",
"pivot": [-38, 4.25, 0],
"cubes": [
{"origin": [-25.125, 2, -2], "size": [2, 0, 2], "uv": [30, 22]},
{"origin": [-27.125, 0.5, -2.5], "size": [2, 3, 3], "uv": [52, 10]}
{"origin": [-44, 3.25, -1], "size": [7, 2, 2], "uv": [60, 52], "mirror": true}
]
},
{
"name": "flame_front_right",
"parent": "candleholder_front_right2",
"pivot": [-27.125, 2, -1],
"name": "arm_right7",
"parent": "arm_right6",
"pivot": [-44, 4.25, 0],
"cubes": [
{"origin": [-33.625, 2, -2.5], "size": [7, 0, 3], "uv": [13, 33]},
{"origin": [-33.625, 0.5, -1], "size": [7, 3, 0], "uv": [36, 46]}
{"origin": [-49.5, 3.75, -0.5], "size": [6, 1, 1], "uv": [32, 30], "mirror": true}
]
},
{
"name": "candleholder_back_right",
"parent": "arm_right4",
"pivot": [-19.125, 2, 0],
"name": "head",
"parent": "swing",
"pivot": [0, 7.5, 0],
"cubes": [
{"origin": [-23.125, 2, 0], "size": [4, 0, 2], "uv": [38, 40]}
{"origin": [-8.5, 7.5, -8.5], "size": [17, 11, 17], "inflate": -0.01, "uv": [8, 53]},
{"origin": [-8.5, 7.5, -8.5], "size": [17, 11, 0], "uv": [0, 11]},
{"origin": [-8.5, 7.5, 8.5], "size": [17, 11, 0], "uv": [0, 0]},
{"origin": [-8.5, 18.5, -8.5], "size": [17, 0, 17], "uv": [17, 0]},
{"origin": [-8.5, 7.5, -8.5], "size": [17, 0, 17], "uv": [51, 0]},
{"origin": [8.5, 7.5, -8.5], "size": [0, 11, 17], "uv": [34, 0]},
{"origin": [-8.5, 7.5, -8.5], "size": [0, 11, 17], "uv": [68, 0], "mirror": true}
]
},
{
"name": "candleholder_back_right2",
"parent": "candleholder_back_right",
"pivot": [-23.125, 2, 2],
"name": "eyes",
"parent": "head",
"pivot": [0, 13, -8.51]
},
{
"name": "eye_left",
"parent": "eyes",
"pivot": [6, 13, -8.51]
},
{
"name": "eye_open_left",
"parent": "eye_left",
"pivot": [6, 13, -8.51],
"cubes": [
{"origin": [-25.125, 2, 0], "size": [2, 0, 2], "uv": [38, 38]},
{"origin": [-27.125, 0.5, -0.5], "size": [2, 3, 3], "uv": [29, 47]}
{"origin": [5, 12, -8.51], "size": [2, 2, 0], "uv": [0, 64]}
]
},
{
"name": "flame_back_right",
"parent": "candleholder_back_right2",
"pivot": [-27.125, 2, 1],
"name": "eye_expression_left",
"parent": "eye_open_left",
"pivot": [6, 14, -8.42],
"cubes": [
{"origin": [-33.625, 2, -0.5], "size": [7, 0, 3], "uv": [-3, 47]},
{"origin": [-33.625, 0.5, 1], "size": [7, 3, 0], "uv": [48, 41]}
{"origin": [5.5, 13.5, -8.42], "size": [1, 1, 0], "uv": [0, 69]}
]
},
{
"name": "eye_closed_left",
"parent": "eye_left",
"pivot": [6, 12.5, -8.41],
"cubes": [
{"origin": [5, 12, -8.41], "size": [2, 1, 0], "uv": [0, 66]}
]
},
{
"name": "eye_happy_left",
"parent": "eye_left",
"pivot": [6, 12.75, -8.41],
"cubes": [
{"origin": [4.499, 12.25, -8.41], "size": [3, 1, 0], "uv": [0, 67]},
{"origin": [5.5, 12.75, -8.41], "size": [1, 1, 0], "uv": [2, 69]}
]
},
{
"name": "eye_right",
"parent": "eyes",
"pivot": [-6, 13, -8.51]
},
{
"name": "eye_open_right",
"parent": "eye_right",
"pivot": [-6, 13, -8.51],
"cubes": [
{"origin": [-7, 12, -8.51], "size": [2, 2, 0], "uv": [4, 64], "mirror": true}
]
},
{
"name": "eye_expression_right",
"parent": "eye_open_right",
"pivot": [-6, 14, -8.42],
"cubes": [
{"origin": [-6.5, 13.5, -8.42], "size": [1, 1, 0], "uv": [0, 70], "mirror": true}
]
},
{
"name": "eye_closed_right",
"parent": "eye_right",
"pivot": [-6, 12.5, -8.41],
"cubes": [
{"origin": [-7, 12, -8.41], "size": [2, 1, 0], "uv": [4, 66], "mirror": true}
]
},
{
"name": "eye_happy_right",
"parent": "eye_right",
"pivot": [-6, 12.75, -8.41],
"cubes": [
{"origin": [-7.499, 12.25, -8.41], "size": [3, 1, 0], "uv": [0, 68], "mirror": true},
{"origin": [-6.5, 12.75, -8.41], "size": [1, 1, 0], "uv": [2, 70], "mirror": true}
]
},
{
"name": "flame_inner",
"parent": "head",
"pivot": [0, 7.5, -0.1],
"cubes": [
{"origin": [-3, 7, -3.1], "size": [6, 3, 6], "uv": [102, 2]}
]
},
{
"name": "flame_inner2",
"parent": "flame_inner",
"pivot": [0, 8.75, -0.1],
"cubes": [
{"origin": [-4, 8.75, -4.1], "size": [8, 8, 8], "uv": [96, 20]}
]
},
{
"name": "flame_inner3",
"parent": "flame_inner2",
"pivot": [0, 16.75, -0.1],
"cubes": [
{"origin": [-3, 15.5, -3.1], "size": [6, 3, 6], "uv": [102, 11]}
]
},
{
"name": "brim",
"parent": "head",
"pivot": [0, 19, -0.1],
"cubes": [
{"origin": [-3.5, 18.5, -3.6], "size": [7, 1, 7], "inflate": 0.01, "uv": [100, 36]},
{"origin": [-3.5, 18.76, -3.35], "size": [7, 3, 0], "pivot": [0, 18.75, -3.35], "rotation": [25, 0, 0], "uv": [106, 44]},
{"origin": [-3.5, 18.76, 3.15], "size": [7, 3, 0], "pivot": [0, 18.75, 3.15], "rotation": [-25, 0, 0], "uv": [112, 47]},
{"origin": [3.25, 18.76, -3.6], "size": [0, 3, 7], "pivot": [3.25, 18.75, -0.1], "rotation": [0, 0, 25], "uv": [80, 29]},
{"origin": [-3.25, 18.76, -3.6], "size": [0, 3, 7], "pivot": [-3.25, 18.75, -0.1], "rotation": [0, 0, -25], "uv": [59, 57], "mirror": true}
]
},
{
"name": "flame_middle",
"parent": "brim",
"pivot": [0, 19, -0.1],
"cubes": [
{"origin": [-3, 19, -3.1], "size": [6, 8, 6], "uv": [104, 50]}
]
},
{
"name": "flame_middle2",
"parent": "flame_middle",
"pivot": [0, 26, -0.1],
"cubes": [
{"origin": [-2.5, 25.5, -2.6], "size": [5, 8, 5], "uv": [78, 51]}
]
},
{
"name": "flame_middle3",
"parent": "flame_middle2",
"pivot": [0, 33, -0.1],
"cubes": [
{"origin": [-2, 32, -2.1], "size": [4, 7, 4], "uv": [94, 45]}
]
},
{
"name": "flame_middle4",
"parent": "flame_middle3",
"pivot": [0, 39, -0.1],
"cubes": [
{"origin": [-1.5, 38, -1.6], "size": [3, 7, 3], "uv": [0, 22]}
]
},
{
"name": "flame_middle5",
"parent": "flame_middle4",
"pivot": [0, 45, -0.1],
"cubes": [
{"origin": [-1, 44, -0.1], "size": [2, 6, 0], "uv": [120, 11]}
]
}
]
@@ -53,7 +53,6 @@
"isTouchingWater": true,
"isUnderWater": false,
"animations": [
"q.look('body')",
"q.bedrock('staryu', 'surfacewater_swim')"
]
},
@@ -71,7 +70,6 @@
"isUnderWater": true,
"animations": [
"q.pitch_tilt('body', 1)",
"q.look('body')",
"q.bedrock('staryu', 'water_swim')"
]
}

Some files were not shown because too many files have changed in this diff Show More