Compare commits

...
Author SHA1 Message Date
Paul 57ec200f51 Maybe this will tell us where the forever ticking pokemon is and what its identity is 2025-11-17 13:44:24 +10:00
Paul dd975c184c Little bits of clarification in the node maker plus block any attempt at adding closed nodes to the successors list 2025-11-17 12:52:05 +10:00
Paul 8ae6792785 Fixed fossil substitutes not working, fixed aspects not working in fossil tank rendering, fixed slowpoke tail aspects being added to everything 2025-11-17 11:21:23 +10:00
Landon 5e81e26c69 Merge branch 'molang-riding' into 'main'
Updates to riding to work better in Molang

See merge request cable-mc/cobblemon!1984
2025-11-16 15:33:38 +00:00
Hiroku d103629fd2 Merge branch '1.7-spawns-update' into 'main'
1.7 spawns update

See merge request cable-mc/cobblemon!1983
2025-11-16 09:27:54 +00:00
JPAKx4andJordan 6e2a0cd3b9 Switch to using ObjectValues for states to support riding styles with multiple properties. Added a few useful properties that can now be accessed through get_riding_state(name). 2025-11-16 07:12:59 +00:00
Veraxiel 37f6010381 Edit to Popplio line spawns. 2025-11-15 23:44:38 -05:00
Hiroku 798dd64f84 Merge branch 'RestoreSheepShearing' into 'main'
Restore Sheep Shearing

See merge request cable-mc/cobblemon!1982
2025-11-16 03:43:58 +00:00
Paul c1acf8494c Slowpoke tails are snipped a bit less short 2025-11-16 13:15:44 +10:00
Veraxiel d4601326a7 Removed Water and Lava block tags. Updated spawns using those tags to use the blocks directly. 2025-11-15 22:09:50 -05:00
JazzMcNade a037af6948 Allow herding sheep to eat grass, fix typo 2025-11-15 20:55:58 -06:00
JazzMcNade 517ac94b8d Restore sheep shearing and eating grass to restore wool 2025-11-15 20:26:31 -06:00
Paul b5ec2b28fd Merge remote-tracking branch 'origin/main' 2025-11-16 12:14:50 +10:00
Paul f45a4b784b Fixed percentSum being exceeded during multi-pass spawns, closes #1778 2025-11-16 12:14:35 +10:00
Hiroku 91dda046d8 Merge branch 'revert-transition-logic' into 'main'
Revert transition logic so land mounts can be consistently mounted

See merge request cable-mc/cobblemon!1981
2025-11-16 01:47:59 +00:00
Landon Wills 49577d2518 Revert transition logic so land mounts can be consistently mounted 2025-11-15 19:29:36 -05:00
Landon 2bad8ec673 Merge branch 'implement_pokemon' into 'main'
Implement pokemon

See merge request cable-mc/cobblemon!1945
2025-11-15 22:44:48 +00:00
Carmendar 1524e9c476 smol species fixes. 2025-11-15 15:55:14 -06:00
Carmendar c8ad0cd7e7 Merge branch 'main' into implement_pokemon
# Conflicts:
#	common/src/main/resources/data/cobblemon/species/generation1/aerodactyl.json
#	common/src/main/resources/data/cobblemon/species/generation1/arcanine.json
#	common/src/main/resources/data/cobblemon/species/generation1/blastoise.json
#	common/src/main/resources/data/cobblemon/species/generation1/charizard.json
#	common/src/main/resources/data/cobblemon/species/generation1/dewgong.json
#	common/src/main/resources/data/cobblemon/species/generation1/dragonite.json
#	common/src/main/resources/data/cobblemon/species/generation1/gyarados.json
#	common/src/main/resources/data/cobblemon/species/generation1/lapras.json
#	common/src/main/resources/data/cobblemon/species/generation1/mrmime.json
#	common/src/main/resources/data/cobblemon/species/generation1/nidoking.json
#	common/src/main/resources/data/cobblemon/species/generation1/parasect.json
#	common/src/main/resources/data/cobblemon/species/generation1/rhydon.json
#	common/src/main/resources/data/cobblemon/species/generation1/rhyhorn.json
#	common/src/main/resources/data/cobblemon/species/generation1/seaking.json
#	common/src/main/resources/data/cobblemon/species/generation1/tauros.json
#	common/src/main/resources/data/cobblemon/species/generation1/venusaur.json
#	common/src/main/resources/data/cobblemon/species/generation2/ariados.json
#	common/src/main/resources/data/cobblemon/species/generation2/forretress.json
#	common/src/main/resources/data/cobblemon/species/generation2/girafarig.json
#	common/src/main/resources/data/cobblemon/species/generation2/heracross.json
#	common/src/main/resources/data/cobblemon/species/generation2/piloswine.json
#	common/src/main/resources/data/cobblemon/species/generation2/ursaring.json
#	common/src/main/resources/data/cobblemon/species/generation3/altaria.json
#	common/src/main/resources/data/cobblemon/species/generation3/camerupt.json
#	common/src/main/resources/data/cobblemon/species/generation3/claydol.json
#	common/src/main/resources/data/cobblemon/species/generation3/flygon.json
#	common/src/main/resources/data/cobblemon/species/generation3/latias.json
#	common/src/main/resources/data/cobblemon/species/generation3/latios.json
#	common/src/main/resources/data/cobblemon/species/generation3/metagross.json
#	common/src/main/resources/data/cobblemon/species/generation3/relicanth.json
#	common/src/main/resources/data/cobblemon/species/generation3/salamence.json
#	common/src/main/resources/data/cobblemon/species/generation3/sharpedo.json
#	common/src/main/resources/data/cobblemon/species/generation3/slaking.json
#	common/src/main/resources/data/cobblemon/species/generation3/tropius.json
#	common/src/main/resources/data/cobblemon/species/generation3/wailmer.json
#	common/src/main/resources/data/cobblemon/species/generation3/wailord.json
#	common/src/main/resources/data/cobblemon/species/generation4/bastiodon.json
#	common/src/main/resources/data/cobblemon/species/generation4/bronzong.json
#	common/src/main/resources/data/cobblemon/species/generation4/drifblim.json
#	common/src/main/resources/data/cobblemon/species/generation4/dusknoir.json
#	common/src/main/resources/data/cobblemon/species/generation4/garchomp.json
#	common/src/main/resources/data/cobblemon/species/generation4/gastrodon.json
#	common/src/main/resources/data/cobblemon/species/generation4/lickilicky.json
#	common/src/main/resources/data/cobblemon/species/generation4/magnezone.json
#	common/src/main/resources/data/cobblemon/species/generation4/mamoswine.json
#	common/src/main/resources/data/cobblemon/species/generation4/rhyperior.json
#	common/src/main/resources/data/cobblemon/species/generation4/staraptor.json
#	common/src/main/resources/data/cobblemon/species/generation4/togekiss.json
#	common/src/main/resources/data/cobblemon/species/generation5/bouffalant.json
#	common/src/main/resources/data/cobblemon/species/generation5/braviary.json
#	common/src/main/resources/data/cobblemon/species/generation5/crustle.json
#	common/src/main/resources/data/cobblemon/species/generation5/darmanitan.json
#	common/src/main/resources/data/cobblemon/species/generation5/golurk.json
#	common/src/main/resources/data/cobblemon/species/generation5/hydreigon.json
#	common/src/main/resources/data/cobblemon/species/generation5/klinklang.json
#	common/src/main/resources/data/cobblemon/species/generation5/serperior.json
#	common/src/main/resources/data/cobblemon/species/generation5/volcarona.json
#	common/src/main/resources/data/cobblemon/species/generation5/zebstrika.json
#	common/src/main/resources/data/cobblemon/species/generation6/gogoat.json
#	common/src/main/resources/data/cobblemon/species/generation6/noivern.json
#	common/src/main/resources/data/cobblemon/species/generation6/skiddo.json
#	common/src/main/resources/data/cobblemon/species/generation6/tyrantrum.json
#	common/src/main/resources/data/cobblemon/species/generation7/dhelmise.json
#	common/src/main/resources/data/cobblemon/species/generation7/mudsdale.json
#	common/src/main/resources/data/cobblemon/species/generation8/corviknight.json
#	common/src/main/resources/data/cobblemon/species/generation8/dragapult.json
#	common/src/main/resources/data/cobblemon/species/generation8a/sneasler.json
#	common/src/main/resources/data/cobblemon/species/generation8a/ursaluna.json
#	common/src/main/resources/data/cobblemon/species/generation8a/wyrdeer.json
#	common/src/main/resources/data/cobblemon/species/generation9/cyclizar.json
#	common/src/main/resources/data/cobblemon/species/generation9/dondozo.json
#	common/src/main/resources/data/cobblemon/species/generation9/dudunsparce.json
#	common/src/main/resources/data/cobblemon/species/generation9/espathra.json
#	common/src/main/resources/data/cobblemon/species/generation9/farigiraf.json
#	common/src/main/resources/data/cobblemon/species/generation9/kilowattrel.json
#	common/src/main/resources/data/cobblemon/species/generation9/orthworm.json
#	common/src/main/resources/data/cobblemon/species/generation9/revavroom.json
2025-11-15 15:53:14 -06:00
Landon db1108f7ef Merge branch 'more-more-riding-fixes' into 'main'
Bunch of riding fixes

See merge request cable-mc/cobblemon!1978
2025-11-15 20:53:21 +00:00
Kenji_64 33a4e31b60 Fixed Wartortle's shiny shell not being green 2025-11-15 19:51:14 +01:00
Test 7cb4e96a64 Merge branch 'main' of https://gitlab.com/cable-mc/cobblemon 2025-11-15 12:49:39 -05:00
Test ef0f997682 asset updates 2025-11-15 12:48:58 -05:00
Paul 2988a29e28 Merge remote-tracking branch 'origin/main' 2025-11-15 21:59:56 +10:00
Paul fe59748bf6 Rescraped - fixed inverted fire immunity and implemented explicit drowsy and rouse chances 2025-11-15 21:59:47 +10:00
Polymeta 0235bc108e Merge branch '1.7-spawns-update' into 'main'
Fix to Cursola spawn. Updated Dreepy line spawns.

See merge request cable-mc/cobblemon!1980
2025-11-15 10:45:18 +00:00
Carmendar 1526c2f037 Merge branch 'main' into implement_pokemon 2025-11-15 04:30:45 -06:00
Carmendar 408cf8c5ca One last poser tweak for the night. 2025-11-15 04:29:59 -06:00
Hiroku 895f8877b1 Merge branch 'neo-fixes-sometimes' into 'main'
Handful of bug fixes, probably more to come.

Closes #1215, #1341, #1719, and #1740

See merge request cable-mc/cobblemon!1975
2025-11-15 10:18:40 +00:00
Neovitalism aab4f3c7aa I like my kneecaps. 2025-11-15 03:31:28 -06:00
violet ceb70dbf2d Merge remote-tracking branch 'origin/implement_pokemon' into implement_pokemon 2025-11-15 04:26:14 -05:00
Carmendar 6d46992ad7 More poser tweaks. 2025-11-15 03:25:53 -06:00
violet 84242194ba fixed drampa look 2025-11-15 04:25:52 -05:00
violet 529e4bef46 fixed espurr line posers 2025-11-15 04:07:10 -05:00
violet aa1658bb5d fixed alolan muk's portrait 2025-11-15 03:55:16 -05:00
violet 068df2b138 added eelektross and eelektrik placeholder animations + fixed look animations 2025-11-15 03:47:56 -05:00
Veraxiel 6fe68e117f Fix to Cursola spawn. Updated Dreepy line spawns. 2025-11-15 03:33:21 -05:00
Neovitalism 0724c21509 initialize instead 2025-11-15 01:56:38 -06:00
Carmendar 3499758203 Darmanitan Zen poser fix. 2025-11-15 00:29:54 -06:00
Landon 330f60f2d9 Merge branch 'slowpoke-snip' into 'main'
Slowpoke tail snip snip

See merge request cable-mc/cobblemon!1973
2025-11-15 06:28:09 +00:00
RedGenesectNinja 7d97df3407 Fixed Shiny Spring, Summer and Winter Sawsbuck using the wrong models 2025-11-15 00:17:06 -06:00
Paul dfb8ff5aa2 Removed time check that should not be there 2025-11-15 16:11:24 +10:00
Carmendar 22b0e0612a Vanillite line shiny textures for real. 2025-11-14 23:57:48 -06:00
Carmendar e52c63d565 Metagross jump stat adjustment. 2025-11-14 23:52:45 -06:00
Carmendar fe7f72cb3d Merge remote-tracking branch 'origin/implement_pokemon' into implement_pokemon 2025-11-14 23:51:50 -06:00
Carmendar 8187905987 Adjusted walk speed for Gogoat. 2025-11-14 23:51:04 -06:00
RedGenesectNinja 11b3043e6c Merge remote-tracking branch 'origin/implement_pokemon' into implement_pokemon 2025-11-14 22:47:24 -06:00
RedGenesectNinja 8d871ac949 Fixed Dragonair's shiny not working 2025-11-14 22:47:04 -06:00
Carmendar 8f7a523404 stat tweaks. 2025-11-14 22:40:22 -06:00
jackowes 7a74c72df2 - Fix hover not being able to be mounted on the ground and autodismounting you when you touch ground. Theres more changes tatn I thought it would have needed here... so hopefully nothing breaks. 2025-11-14 21:19:14 -06:00
Hiroku 31b136af05 Merge branch 'minor-code-cleanup' into 'main'
Attempted to fix stuff that failed, but at least I did some house cleaning.

See merge request cable-mc/cobblemon!1977
2025-11-15 02:50:07 +00:00
Hiroku 592e438c56 Merge branch 'pokedex-zoom' into 'main'
Fix pokedex zooming sensitivity.

See merge request cable-mc/cobblemon!1976
2025-11-15 02:47:22 +00:00
Carmendar bb98992635 Surface mount tweaks. 2025-11-14 20:02:34 -06:00
JPAKx4 abdc03be8c Fix pokedex zooming sensitivity. 2025-11-14 20:02:27 -06:00
JPAKx4 bfcc4516ff Attempted to fix stuff that failed, but at least I did some house cleaning. 2025-11-14 19:50:42 -06:00
Paul a4a46d20cd missed a lil sumtin [skip-ci] 2025-11-15 11:17:36 +10:00
Paul 12ec7b1e3d Merge remote-tracking branch 'origin/main' 2025-11-15 11:16:24 +10:00
Paul 6fcbbb1e73 Removed tooltip for mob effect values since it's meant to be a secret 2025-11-15 11:16:16 +10:00
Landon Wills d3984843e2 Run scraper 2025-11-14 19:32:31 -05:00
Carmendar 7a14c51df2 Merge remote-tracking branch 'origin/implement_pokemon' into implement_pokemon 2025-11-14 18:05:45 -06:00
Carmendar a7b023203f Merge branch 'main' into implement_pokemon 2025-11-14 18:04:18 -06:00
jackowes 81a241d4a1 - Make in_air more sophisticated to allow for jump animations to start more in line with when the vehicle actually jumps.
- Allow player head rotations on UFO/hover, jet, dolphin, and submarine.
2025-11-14 16:41:21 -06:00
jackowes 7ccb05fcb9 - Fixed incorrect hover transition velocity handoff.
- Fixed metagross walking in air
2025-11-14 16:06:48 -06:00
jackowes 32e81eff4e - Adjust jet running out of stamina to be more forgiving and graceful. Also remove the accidental ability to hover in air sort of after stamina drains.
- Change getRenderOrientation to return true orientation so that when you are the driver of the entity then it mirrors orientation. This is because you are the client that sets the rotation and interoplation is not needed.
2025-11-14 12:39:57 -06:00
jackowes 4ea704bd95 - Make remember ride camera default to false. 2025-11-14 11:07:39 -06:00
jackowes 497a686599 - make the motion sick camera have 0 roll. 2025-11-14 10:54:35 -06:00
jackowes b986823b2c - Fix rocket transition when in water.
- Fix transitions to water for all styles. (Was previously not allowing land to transition to if it was in water but its head was out of water)
2025-11-14 10:39:26 -06:00
Neovitalism 534a7e67e1 Merge branch 'main' into neo-fixes-sometimes 2025-11-14 10:20:02 -06:00
Neovitalism e47f014ebd Anti Team Rocket
Fixes two old bugs to stop players from stealing NPC pokémon.

For some reason, even though pokemon are added to an NPCPartyStore, their storeCoordinates are completely unset, acting as if nobody owns it. This is a good enough solution until it can be further looked into where the party is built, I'm just not knowledgeable enough in that department currently.

Fixes https://gitlab.com/cable-mc/cobblemon/-/issues/1215 and https://gitlab.com/cable-mc/cobblemon/-/issues/1341
2025-11-14 10:18:41 -06:00
Polymeta 651ba5b9ba move vanilla fix into fabric mixin as it breaks neoforge
Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-11-14 16:12:45 +00:00
Paul 74435945e9 Removed tooltip for food values since it's a bit redundant 2025-11-14 23:20:42 +10:00
Paul 6bf5e1491d Removed poke puffs access until it can be rebalanced 2025-11-14 23:14:22 +10:00
Hiroku 488f38c690 Merge branch 'removable-features' into 'main'
Adds the ability to hide certain features from rendering in the StatsWidget.

See merge request cable-mc/cobblemon!1914
2025-11-14 12:39:40 +00:00
violet dbbca02619 centiskorch texture tweaks 2025-11-14 05:52:46 -05:00
violet c50d5841d8 Merge remote-tracking branch 'origin/implement_pokemon' into implement_pokemon 2025-11-14 05:51:05 -05:00
violet 5489cfb4b0 fixed bellibolt's look anims 2025-11-14 05:39:07 -05:00
violet e421de547f SLOWPOKE TAILS NOW DROP WHEN YOU KILL THEM 2025-11-14 05:30:24 -05:00
violet 075dcdb9e9 BRAND NEW COBBLEMON EXCLUSIVE FURFROU FORMS PROPERLY IMPLEMENTED 2025-11-14 04:53:22 -05:00
Carmendar 2ebe8d6434 breach jump for Dragapult 2025-11-14 02:53:18 -06:00
Carmendar d7c77f5f3f a few ride stats adjusted ahead of scraper 2025-11-14 02:50:10 -06:00
Carmendar 572682a23a Merge branch 'main' into implement_pokemon 2025-11-14 01:36:27 -06:00
Carmendar 6241865f95 Grounded again 2025-11-14 01:34:02 -06:00
Carmendar c50d3183e6 Submarine expression tweak 2025-11-14 01:22:35 -06:00
Landon d1b7dc6934 Merge branch 'making-pi-equal-3' into 'main'
Fix major camera issues.

See merge request cable-mc/cobblemon!1972
2025-11-14 06:58:05 +00:00
Neovitalism e2fdf3cffc Change Species#create() to use the species identifier.
Uses the identifier for the species in the name when using Species#create to avoid discrepancies between the name and identifier causing issues. (Like in the case of Type: Null, Farfetch'd, Ho-oh, and many others.)

Fixes https://gitlab.com/cable-mc/cobblemon/-/issues/1740 - thanks for finding this one!
2025-11-14 00:49:31 -06:00
Paul 4a68e53968 Slowpoke tail snip snip 2025-11-14 16:44:09 +10:00
JPAKx4 282bb4784e Accessor grabs the wrong forwards (FORWARDS vs forwards, what is this VIM?) so make it not do that. Fixes the major camera issues from the last two days. 2025-11-14 00:10:24 -06:00
Hiroku a8267b8ee0 Merge branch 'molang-oh-molang' into 'main'
Removed the additional DoubleValue in seen_credits and is_in_dialogue

See merge request cable-mc/cobblemon!1971
2025-11-14 05:00:28 +00:00
Spicy 81f36b2b15 Removed the additional DoubleValue in seen_credits and is_in_dialogue 2025-11-13 22:49:10 -06:00
Hiroku 73e96740d6 Merge branch 'something-funny-and-creative-dot-mp4' into 'main'
Add 180deg rotation, I should test better for sure.

See merge request cable-mc/cobblemon!1970
2025-11-14 04:06:23 +00:00
JPAKx4 d53f9e5c63 Add 180deg rotation, I should test better for sure. 2025-11-13 21:20:11 -06:00
Hiroku 560bd75fd0 Merge branch 'fix/vanilla-connection' into 'main'
fix: fix vanilla connection with the cobblemon mods

See merge request cable-mc/cobblemon!1969
2025-11-14 02:30:25 +00:00
Paul 8850d38820 Rescraped behaviours to amend swim ability 2025-11-14 11:18:23 +10:00
Carmendar 8284b04426 Merge branch 'main' into implement_pokemon
# Conflicts:
#	common/src/main/resources/data/cobblemon/species/generation1/rattata.json
#	common/src/main/resources/data/cobblemon/species/generation2/unown.json
#	common/src/main/resources/data/cobblemon/species/generation3/latias.json
#	common/src/main/resources/data/cobblemon/species/generation3/latios.json
#	common/src/main/resources/data/cobblemon/species/generation3/shuppet.json
#	common/src/main/resources/data/cobblemon/species/generation5/hydreigon.json
#	common/src/main/resources/data/cobblemon/species/generation5/volcarona.json
#	common/src/main/resources/data/cobblemon/species/generation9/wiglett.json
2025-11-13 18:16:41 -06:00
Neovitalism ca91d42ddf Shuffle around PlayerMixin#getDataFromShoulderPokemon
Fixes https://gitlab.com/cable-mc/cobblemon/-/issues/1719
Removes unnecessary logic from the server by putting it into the clientside block.
2025-11-13 18:06:47 -06:00
terrainwax 34232b33c7 fix: fix vanilla connection with the cobblemon mods 2025-11-13 22:30:12 +01:00
Landon 03c5a34fc8 Merge branch 'mixin-fix' into 'main'
Avoid relying on local player in common mixin

See merge request cable-mc/cobblemon!1968
2025-11-13 17:29:19 +00:00
Landon Wills 866db3d350 Avoid relying on local player in common mixin 2025-11-13 11:44:02 -05:00
Landon ee51a8a34b Merge branch 'more-misc-additions' into 'main'
More misc additions

See merge request cable-mc/cobblemon!1950
2025-11-13 13:18:32 +00:00
DeltricandLandon 2769733c51 More misc additions 2025-11-13 13:18:32 +00:00
Landon 8ae79d8e44 Merge branch 'jackowes-riding-fixes' into 'main'
various riding bug fixes

See merge request cable-mc/cobblemon!1966
2025-11-13 09:28:17 +00:00
violet 2237e1eeca added missing emissive textures for magmar, magmortar, torracat, incineroar, sizzlipede, & centiskorch 2025-11-13 04:24:36 -05:00
Hiroku 6f08d610eb Merge branch 'we-dont-hang-anymore' into 'main'
Fixes Fabric server hanging on shutdown while players are logged in

See merge request cable-mc/cobblemon!1964
2025-11-13 09:19:04 +00:00
Hiroku 75f3db16aa Merge branch 'more-poke-snack-stuff' into 'main'
More Poké Snack stuff

Closes #1761

See merge request cable-mc/cobblemon!1931
2025-11-13 09:11:53 +00:00
Hiroku e4ee6b29ab Merge branch 'remove-shadow-people' into 'main'
Remove shadow people from appearing on mounts

See merge request cable-mc/cobblemon!1967
2025-11-13 09:08:42 +00:00
Watuneni iteiteandWeblate cb6b2b9ec5 Translated using Weblate (Japanese)
Currently translated at 94.3% (8447 of 8957 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-11-13 09:07:00 +00:00
geumuandWeblate 8eafe14f66 Translated using Weblate (Korean)
Currently translated at 61.5% (5513 of 8957 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ko/
2025-11-13 09:07:00 +00:00
Paul 8176e14981 Merge remote-tracking branch 'weblate/lang-updates' 2025-11-13 19:05:24 +10:00
Paul 7d956500f2 Scraped behaviours 2025-11-13 19:04:55 +10:00
Landon Wills c6853b84a6 Remove shadow people from appearing on mounts 2025-11-13 03:58:59 -05:00
Carmendar 99c7d39705 Grounded. 2025-11-13 01:42:08 -06:00
Polymeta 3cb4984d51 Merge branch 'shine-bright-like-an-evo-stone' into 'main'
Update Lighting Values

See merge request cable-mc/cobblemon!1951
2025-11-13 07:30:10 +00:00
dhi_holoandPolymeta 930ed59234 Update Lighting Values 2025-11-13 07:30:10 +00:00
jackowes 3ea1918bc2 - Fix hand rotations on mount. The mixin that fixes it wasn't adjusted for the orientation refactor. 2025-11-13 00:55:11 -06:00
Carmendar bdd27078b5 Merge branch 'main' into implement_pokemon 2025-11-13 00:33:06 -06:00
jackowes 1dee9bc630 - Move game pause orientation protections to only the lerp factor. This is to prevent camera lerping while the game is paused. It was previously at the top of the setRotations CameraMixin function which would convert you back to vanilla rotations when paused.
- clamp local rideXrotations
- Fix player head rotations while riding.
- Lessen upwards boost on takeoff
2025-11-12 23:09:06 -06:00
Landon d761f2b4dc Merge branch 'riding-go-brr' into 'main'
Many Riding Fixes

See merge request cable-mc/cobblemon!1963
2025-11-13 04:56:11 +00:00
Test 0d6028706d Merge branch 'main' of https://gitlab.com/cable-mc/cobblemon 2025-11-12 23:15:25 -05:00
Test 63d6851482 disable sacch dispenser interaction for now 2025-11-12 23:15:04 -05:00
RedGenesectNinja 9596f08957 Fixed Dusknoir's shiny not working and Updated Bronzong's textures 2025-11-12 21:12:00 -06:00
Carmendar 57a19909aa Merge branch 'main' into implement_pokemon 2025-11-12 19:32:00 -06:00
Carmendar ee20986ee0 Merge remote-tracking branch 'origin/implement_pokemon' into implement_pokemon 2025-11-12 19:23:57 -06:00
RedGenesectNinja 436aa5ea75 Updated textures for a handful of Pokemon 2025-11-12 19:14:19 -06:00
Carmendar e49f761417 Poser fixes and cries added. 2025-11-12 19:09:38 -06:00
Carmendar 95e3ab213a anim fixes for Scorbunny and Sneasler 2025-11-12 18:48:14 -06:00
Apion 7c3158c63b Merge branch 'particle-sounds-1.7' into 'main'
Refactored move sound file names, added all new move sounds

See merge request cable-mc/cobblemon!1965
2025-11-13 00:35:43 +00:00
TeggyandWeblate e9e41933fe Translated using Weblate (Spanish)
Currently translated at 84.6% (7578 of 8957 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/es/
2025-11-13 00:30:11 +00:00
Nico MerenqandWeblate 7c7fd6c982 Translated using Weblate (Russian)
Currently translated at 75.4% (6757 of 8957 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-11-13 00:30:09 +00:00
geumuandWeblate 6ec2820dd8 Translated using Weblate (Korean)
Currently translated at 59.9% (5367 of 8957 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ko/
2025-11-13 00:30:07 +00:00
321retrogamer b1054bdf11 Various move-related Sound and Action effect tweaks.
Fixes timing for various Action Effects to better fit their sound design. Additionally, updates sounds for Infestation and Ice Beam and re-adds Ember and Flamethrower sound cues to their respective Action Effects.
2025-11-12 17:49:38 -06:00
Neovitalism 3b227ba3a2 Fixes fabric server hanging on shutdown 2025-11-12 16:01:01 -06:00
JPAKx4 96049abb98 Fix Merge issues 2025-11-12 15:20:36 -06:00
JPAKx4 d661e88a96 Merge branch 'main' into riding-go-brr 2025-11-12 15:19:25 -06:00
Apion 8510e05177 Remove redundant local field in MountedCameraRenderer.kt 2025-11-12 16:13:56 -05:00
JPAKx4 af4fe4d09d Merge branch 'main' into riding-go-brr
# Conflicts:
#	common/src/main/java/com/cobblemon/mod/common/mixin/client/CameraMixin.java
#	common/src/main/kotlin/com/cobblemon/mod/common/client/render/camera/MountedCameraRenderer.kt
2025-11-12 14:09:14 -06:00
Apion 8b2ffd0f29 Merge branch 'apion-bugfix' into 'main'
Fix bug with camera mixin on NeoForge

See merge request cable-mc/cobblemon!1956
2025-11-12 19:57:34 +00:00
Apion 18cebc794b Clean up variable names in CameraMixin 2025-11-12 14:11:14 -05:00
Apion 64e84dab64 Merge remote-tracking branch 'origin/main' into apion-bugfix
# Conflicts:
#	common/src/main/java/com/cobblemon/mod/common/mixin/client/CameraMixin.java
#	common/src/main/kotlin/com/cobblemon/mod/common/client/render/camera/MountedCameraRenderer.kt
2025-11-12 13:21:18 -05:00
JPAKx4 9c5535a014 Fix offsets being rotated and offsets being applied twice. Changed default third person offset (negotiable, no idea good values). Fix no view bobbing. Add dismount location logic from horses, might need more testing or accounting for other mount types. 2025-11-12 12:02:03 -06:00
Nico MerenqandWeblate 5993c1e588 Translated using Weblate (Russian)
Currently translated at 71.8% (6433 of 8957 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-11-12 16:40:16 +00:00
geumuandWeblate e8f7983dd2 Translated using Weblate (Korean)
Currently translated at 59.5% (5338 of 8957 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ko/
2025-11-12 16:40:14 +00:00
Watuneni iteiteandWeblate bdd172bd2d Translated using Weblate (Japanese)
Currently translated at 94.2% (8446 of 8957 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-11-12 16:40:12 +00:00
Paul 13842de7d6 Merge remote-tracking branch 'origin/main' 2025-11-12 23:26:31 +10:00
Paul f05e059445 Lil fixes oopsy 2025-11-12 23:26:22 +10:00
Polymeta 038d9e858c Merge branch 'mechanics-sync' into 'main'
Mechanics sync

See merge request cable-mc/cobblemon!1960
2025-11-12 13:12:49 +00:00
lionandPolymeta 9913826e24 Mechanics sync 2025-11-12 13:12:49 +00:00
Polymeta 8f971cc3d6 Merge branch '1.7-spawns-update' into 'main'
Updated all spawn files. Changed dead_coral preset into a block tag.

See merge request cable-mc/cobblemon!1962
2025-11-12 11:38:03 +00:00
Veraxiel 33c74372a4 Updated all spawn files. Changed dead_coral preset into a block tag. 2025-11-12 05:48:29 -05:00
Polymeta 5f11f4bdd6 Merge branch 'Saccharine-Tree-Biome-List-Update' into 'main'
Updated biome list for saccharine tree

See merge request cable-mc/cobblemon!1959
2025-11-12 09:55:01 +00:00
Polymeta 13b4bdc204 Merge branch 'SaccHiveGenerationRebalance' into 'main'
SaccHiveGenerationRebalance

See merge request cable-mc/cobblemon!1961
2025-11-12 09:54:49 +00:00
Paul 451ae00da1 Drops scrape 2025-11-12 19:11:39 +10:00
Carmendar 0c33de61b9 Species file updates for Tauros, Salamence, Latias, Latios and Staraptor. 2025-11-12 03:05:12 -06:00
Carmendar 91a3fb5031 Removed Kilowattrel mounted run. 2025-11-12 03:04:32 -06:00
Carmendar 3a46b2c218 Updated look posing for Tropius, Garchomp and Pidove. 2025-11-12 03:03:28 -06:00
Carmendar 2f631ddc64 Ursaring texture fix 2025-11-12 03:02:39 -06:00
Paul a8cc8278d3 Liechi berry should target the right biome 2025-11-12 18:57:03 +10:00
Carmendar 2a2ef6ff7d Removed mount 2025-11-12 02:42:32 -06:00
Carmendar d3d94a3614 Adjusted Dragonite flying pose when mounted. 2025-11-12 02:42:03 -06:00
Carmendar f34cc3072b Cutiefly Shoulder poses. 2025-11-12 02:41:12 -06:00
Carmendar 68bff6a40b Jet Handling expression tweak. 2025-11-12 00:45:26 -06:00
Landon 58c0136ad1 Merge branch 'quick-misc-additions' into 'main'
Misc Changes

See merge request cable-mc/cobblemon!1941
2025-11-12 06:39:48 +00:00
DeltricandLandon 45238058cb Misc Changes 2025-11-12 06:39:47 +00:00
JPAKx4 a326befcef Fix offsets being rotated and offsets being applied twice 2025-11-11 22:38:43 -06:00
JazzMcNade 52d8887514 Natural trees increased to 50% hives, Grown trees increased to 10% hives 2025-11-11 20:45:24 -06:00
Test 02ae8065ac Set duration for displaying ride controls in config to 0 by default 2025-11-12 01:43:01 +00:00
Slippy c37c608010 Updated biome list for saccharine tree 2025-11-11 18:27:42 -06:00
Carmendar a7e7c2e814 Merge branch 'main' into implement_pokemon 2025-11-11 17:52:15 -06:00
Nico MerenqandWeblate 09c4ae96bf Translated using Weblate (Russian)
Currently translated at 70.9% (6352 of 8957 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-11-11 22:50:22 +00:00
Nick be466d1610 Merge branch 'aprijuice-neoforge-crash-fix' into 'main'
Fix Aprijuices crashing on Neoforge

See merge request cable-mc/cobblemon!1957
2025-11-11 11:18:42 -08:00
lionandNick d75faae1a0 Fix Aprijuices crashing on Neoforge 2025-11-11 11:18:42 -08:00
Guilherme Pereira 367264b06e Merge branch 'main' of gitlab.com:cable-mc/cobblemon into more-poke-snack-stuff 2025-11-11 14:52:37 -03:00
Guilherme Pereira 3631fa909d Merge branch 'more-poke-snack-stuff' of gitlab.com:cable-mc/cobblemon into more-poke-snack-stuff 2025-11-11 14:51:41 -03:00
Guilherme Pereira fc29826bc7 fix cakes not being rendered properly on multiplayer 2025-11-11 14:51:18 -03:00
Polymeta 202bee5690 Merge branch 'do-you-get-the-joke' into 'main'
🍆

See merge request cable-mc/cobblemon!1777
2025-11-11 17:03:40 +00:00
Landon 730dc88ede Merge branch 'small-rides-sprint-issue' into 'main'
fix the stuttery walk on large mons when ridden

See merge request cable-mc/cobblemon!1953
2025-11-11 15:17:21 +00:00
Landon 4f0a667f23 Merge branch 'riding-air-transition-improvement' into 'main'
Improve air transition so you can consistently get off the ground

See merge request cable-mc/cobblemon!1954
2025-11-11 15:17:01 +00:00
Landon f1186f469c Merge branch 'motion-sick-camera-changes' into 'main'
Motion Sick Cam

See merge request cable-mc/cobblemon!1948
2025-11-11 15:11:45 +00:00
Jackson BowesandLandon 91eeecf6e4 Motion Sick Cam 2025-11-11 15:11:45 +00:00
Polymeta f6cae9d52e Edit eggantberry.js 2025-11-11 15:08:04 +00:00
Polymeta ed94d76e98 Merge branch '1.7-spawns' into 'main'
Added and updated spawns and tags. Edited berry data scraper.

See merge request cable-mc/cobblemon!1937
2025-11-11 15:04:46 +00:00
Polymeta 6e2b76d6a1 Merge branch 'its-not-bait' into 'main'
Bait Seasoning Correction

See merge request cable-mc/cobblemon!1955
2025-11-11 15:03:28 +00:00
Landon 2b70b222df Merge branch 'non-rolling-block-placement-fix' into 'main'
Fix non rollables arrow spawning and block picking. (building should be much better now)

See merge request cable-mc/cobblemon!1943
2025-11-11 14:51:18 +00:00
Landon e9f0ef6497 Merge branch 'camera-fixes' into 'main'
Camera fixes

See merge request cable-mc/cobblemon!1944
2025-11-11 14:41:24 +00:00
Carmendar 00be470281 Alolan Rattata fix. 2025-11-11 02:58:28 -06:00
geumuandWeblate 8fb93dd488 Translated using Weblate (Korean)
Currently translated at 55.2% (4949 of 8957 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ko/
2025-11-11 08:19:44 +00:00
Carmendar 57afbe79c2 Orthworm and Honedge line texture fixes. 2025-11-11 00:49:30 -06:00
Carmendar d5f336ce73 Merge branch 'main' into implement_pokemon 2025-11-11 00:48:17 -06:00
Neovitalism b863554c84 Changed to use the aspects of the pokémon instead of a new field. 2025-11-11 00:14:48 -06:00
Neovitalism 699d6fea17 Revert "Removable Feature Rendering"
This reverts commit d117d79d28.
2025-11-11 00:08:34 -06:00
dhi_holo a4dd34235a Bait Seasonings are now also Baits
Added Apple, Gapple, EGapples, Golden Carrots, and Glistering Melon Slices to the bait types
2025-11-11 15:37:08 +10:00
dhi_holo 8501fd3b18 Delete nether_star.json
Dev tester or something?
2025-11-11 14:36:19 +10:00
dhi_holo 52896b208e Bait Seasoning Correction
You can no longer cook Nether Stars into food, but you can Apples!
2025-11-11 14:28:43 +10:00
jackowes 6ad6487dbe Gave a bit more time to double jump and now boost the y velocity to a minimum of 0.4 on transition. 2025-11-10 21:30:37 -06:00
Nico MerenqandWeblate 2cd066a4c1 Translated using Weblate (Russian)
Currently translated at 69.5% (6233 of 8957 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-11-11 03:11:09 +00:00
jackowes 703ccb9d8e revert uneeded stuff 2025-11-10 19:34:53 -06:00
jackowes c33d4b591e fix the stuttery walk on large mons when ridden. The ridevelocity keeps going to zero at some point and I have no idea why. 2025-11-10 18:32:55 -06:00
Landon e31f2a2598 Merge branch 'small-rides-sprint-issue' into 'main'
Fix small mounts erratically stopping their sprints

See merge request cable-mc/cobblemon!1952
2025-11-10 23:37:03 +00:00
Nico MerenqandWeblate 68b44db35c Translated using Weblate (Russian)
Currently translated at 67.3% (6032 of 8957 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-11-10 22:22:58 +00:00
jackowes 513c958da1 Move sprint logic to custom tracking rather than using player sprint flag (odd interactions with short mounts) 2025-11-10 15:47:39 -06:00
Nico MerenqandWeblate 18d3fb288a Translated using Weblate (Russian)
Currently translated at 65.7% (5885 of 8957 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-11-10 19:28:47 +00:00
Weblate 725b4b7e48 Update translation files
Updated by "Remove blank strings" add-on in Weblate.

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/
2025-11-10 18:19:35 +00:00
geumuandWeblate 28ae27b926 Translated using Weblate (Korean)
Currently translated at 55.2% (4949 of 8957 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ko/
2025-11-10 18:19:31 +00:00
Watuneni iteiteandWeblate 21e9e73eee Translated using Weblate (Japanese)
Currently translated at 94.2% (8446 of 8957 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-11-10 18:19:29 +00:00
Nico MerenqandWeblate 6bfb318e2d Translated using Weblate (Russian)
Currently translated at 65.6% (5882 of 8957 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-11-10 18:19:28 +00:00
Polymeta 9e1fde04ef Merge branch 'mopping-up-tags' into 'main'
Tags and Seasonings Improvement

Closes #1765 and #1764

See merge request cable-mc/cobblemon!1949
2025-11-10 09:30:10 +00:00
violet b79a0b1b6f various animation fixes 2025-11-10 03:17:58 -05:00
dhi_holo 6e4565d49b Update eggant_sprout.json
Missed a spot that didn't show up properly
2025-11-10 16:10:13 +10:00
dhi_holo 91f1523ef5 Update eggant_sprout.json
apparently the model didn't get updated properly
2025-11-10 15:59:09 +10:00
dhi_holo e949626f06 Update eggant_sprout.png
Mipmap Fix Compat
2025-11-10 15:26:32 +10:00
dhi_holo 9678fcc009 Merge branch 'main' into do-you-get-the-joke 2025-11-10 15:24:38 +10:00
dhi_holo 4fbe3e406d Merge branch 'main' into mopping-up-tags 2025-11-10 15:22:21 +10:00
dhi_holo 00a1e77a9f Update pitcher_plant.json
Buffed it
2025-11-10 15:20:28 +10:00
dhi_holo e055dede73 Number fix
Forgot it's in ticks not seconds.
2025-11-10 15:14:14 +10:00
Test b7550f7699 overlay texture 2025-11-09 23:36:55 -05:00
violet 57721d1696 Merge remote-tracking branch 'origin/implement_pokemon' into implement_pokemon 2025-11-09 22:51:33 -05:00
violet b0711528d6 tiny tweaks :3 2025-11-09 22:51:19 -05:00
violet 7e968fcff9 Murdered Shulker Forretress 2025-11-09 22:50:41 -05:00
Test 98cfa0ac91 Merge branch 'mip-map-fix' into 'main'
Mip map fix

See merge request cable-mc/cobblemon!1707
2025-11-10 03:47:48 +00:00
DeltricandTest f2441e7b27 Mip map fix 2025-11-10 03:47:48 +00:00
dhi_holo 46c247c742 Merge branch 'main' into mopping-up-tags 2025-11-10 13:28:49 +10:00
Guilherme Pereira 9770d8ca6b Merge branch 'main' of gitlab.com:cable-mc/cobblemon into more-poke-snack-stuff 2025-11-10 00:28:24 -03:00
Watuneni iteiteandWeblate 04c3e182e7 Translated using Weblate (Japanese)
Currently translated at 93.5% (8376 of 8957 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-11-10 02:50:43 +00:00
Paul 3d99db64b9 Double the spawning speed for poke snack blocks 2025-11-10 12:39:10 +10:00
Test bbcfe95bac cake block, tinting updates 2025-11-09 21:03:50 -05:00
Paul 4f07746355 Fix poor failure handling in behaviours on NPCs. Closes #1772 2025-11-10 11:58:00 +10:00
Watuneni iteiteandWeblate 82088651c2 Translated using Weblate (Japanese)
Currently translated at 92.7% (8312 of 8957 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-11-10 01:39:38 +00:00
Carmendar e399130fda forgor one last change 2025-11-09 18:45:12 -06:00
Carmendar 0083e54f6a Galar Weezing crash fix 2025-11-09 18:27:38 -06:00
Hiroku 2f0a201cf1 Merge branch 'aprijuice-color-crash' into 'main'
Aprijuice Color Crash

See merge request cable-mc/cobblemon!1946
2025-11-09 22:46:23 +00:00
Gertimoshka 778f24acf1 Fixed a bug where if there is no flavours in aprijuice, it would crash when rendered 2025-11-09 22:32:07 +02:00
Carmendar 9512252b72 ^ 2025-11-09 14:24:41 -06:00
Carmendar 73028d4c2a Gave Dondozo basic land & fixed pivot issues with Bramblin. 2025-11-09 14:20:58 -06:00
geumuandWeblate e3ead8e3e5 Translated using Weblate (Korean)
Currently translated at 50.4% (4515 of 8957 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ko/
2025-11-09 19:29:48 +00:00
Nico MerenqandWeblate 9c4b9b35ab Translated using Weblate (Russian)
Currently translated at 65.6% (5880 of 8957 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-11-09 19:29:46 +00:00
jackowes aa9c7b4f55 Fix non rollables arrow spawning and block picking. (building should be much better now) 2025-11-09 10:39:13 -06:00
JPAKx4 96e2e4a6fe Merge remote-tracking branch 'origin/camera-fixes' into pivot
# Conflicts:
#	common/src/main/kotlin/com/cobblemon/mod/common/client/render/camera/MountedCameraRenderer.kt
2025-11-09 06:58:34 -06:00
JPAKx4 20d903cffe Fix some camera code that got yeeted in the cleanup. 2025-11-09 06:57:33 -06:00
JPAKx4 d4383fa317 Fix some camera code that got yeeted in the cleanup. 2025-11-09 06:47:41 -06:00
Paul 1687fa12db Changelog [skip-ci] 2025-11-09 22:11:19 +10:00
Hiroku cf599de339 Merge branch 'YetMorePathingImprovement' into 'main'
YetMorePathingImprovements

Closes #1754

See merge request cable-mc/cobblemon!1942
2025-11-09 12:09:38 +00:00
Hiroku c5f92c1ad4 Merge branch 'party-ui-overhaul' into 'main'
Implementation of Party Overlay UI Animations for different Events

See merge request cable-mc/cobblemon!1939
2025-11-09 12:08:38 +00:00
Paul 1d99da78e0 Updated the behaviour scraper 2025-11-09 21:35:33 +10:00
Carmendar 2f5910c436 Merge branch 'main' into implement_pokemon 2025-11-09 03:09:26 -06:00
Carmendar d1197cbc0b Updated Kangaskhan poser & added held item condition. 2025-11-09 02:30:09 -06:00
Carmendar 2ccf699a86 Merge remote-tracking branch 'origin/implement_pokemon' into implement_pokemon 2025-11-09 01:37:47 -06:00
Carmendar d767420814 Wiglett lost floating privileges. 2025-11-09 01:37:08 -06:00
Carmendar 77100300b1 Fixed Luxray feet textures. 2025-11-09 01:35:05 -06:00
Carmendar 5c80fc03e2 Toxicroak remodel 2025-11-09 01:33:55 -06:00
Carmendar aa39bb84fe Fixed Lanturn t-posing on land. 2025-11-09 00:50:19 -06:00
violet a767b3d0fe Merge remote-tracking branch 'origin/implement_pokemon' into implement_pokemon 2025-11-09 01:28:31 -05:00
violet 3dbcbc34d0 ICE CREAM 2025-11-09 01:28:17 -05:00
violet 0bdadb3794 altered posers for solosis line 2025-11-09 01:20:50 -05:00
dhi_holo 050a2a6a4b Seasoning Fixes
Resolves #1765
Partially Addresses #1766
2025-11-09 15:25:02 +10:00
dhi_holo c80e7f4a51 Update leaves.json
Corrects IDs
Resolves #1764
2025-11-09 15:11:51 +10:00
dhi_holo f4fbdf8735 Block Tag Improvements
Added some overlooked pieces to certain tags
2025-11-09 15:03:43 +10:00
JPAKx4 ae6091fc01 Pull code out of the mixins. 2025-11-08 22:51:31 -06:00
dhi_holo f2aa4141c0 Merge branch 'main' into do-you-get-the-joke 2025-11-09 14:04:39 +10:00
Landon aeded69b25 Merge branch 'implement_pokemon' into 'main'
Merge species updates

See merge request cable-mc/cobblemon!1940
2025-11-09 02:59:41 +00:00
dhi_holo 16b25a2e6e Tag Updates
Now matches to main
2025-11-09 12:57:52 +10:00
dhi_holo e66ebfb7a8 Merge branch 'main' into do-you-get-the-joke 2025-11-09 12:56:25 +10:00
JazzMcNade 70e79e6fe4 Fix a case in which trimpath would result in a mon pathing into a solid block. Fixed NPCs getting stuck on specific upward diagonal formations 2025-11-08 20:20:47 -06:00
Tyzillion b905888a0b Gust more like fart. 2025-11-08 20:17:23 -05:00
Tyzillion 5917e52ffc >.> 2025-11-08 20:01:05 -05:00
Tyzillion deb20cb418 Refactored move sound file names to match repo, Implemented Gust,
Added sounds to:
acid, aerialace, bodyslam, bubble, bubblebeam, bulldoze, bulletpunch, closecombat, eruption, gust, icebeam, infestation, lavaplume, magicalleaf, mist, mudbomb, powdersnow, razorleaf, shadowball, sludgebomb, thunder, thunderbolt, thundershock, watergun, waterpulse, and willowisp.
2025-11-08 19:53:02 -05:00
Hiroku 797e0704e9 Merge branch 'new-aprijuice-point-formula' into 'main'
Aprijuice formula rework and don't allow poke bait to stack otherwise fishing combines baits and that's bad

See merge request cable-mc/cobblemon!1938
2025-11-09 00:24:56 +00:00
Carmendar 0b184a722b Cutiefly and Ribombee scale adjustments. 2025-11-08 18:17:35 -06:00
Carmendar 1a34c2942f Cutiefly line remodels and Charizard zfighting fix. 2025-11-08 17:29:16 -06:00
Carmendar 2a20398b42 Merge remote-tracking branch 'origin/implement_pokemon' into implement_pokemon 2025-11-08 15:25:42 -06:00
Apion 929e4b2391 Licenses 2025-11-08 15:43:50 -05:00
Carmendar 3931295086 Merge branch 'main' into implement_pokemon 2025-11-08 14:18:46 -06:00
Apion c593a8b7e6 Fixed CameraMixin on neoforge 2025-11-08 15:00:22 -05:00
Apion d0fc166e09 Fix SoundEngineMixin on neoforge 2025-11-08 14:44:33 -05:00
geumuandWeblate 78f752b4a1 Translated using Weblate (Korean)
Currently translated at 48.7% (4366 of 8957 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ko/
2025-11-08 19:29:08 +00:00
Apion b4c971398d Fix BrewingStandMenuMixin on neoforge 2025-11-08 14:01:02 -05:00
geumuandWeblate f0f78a01e0 Translated using Weblate (Korean)
Currently translated at 48.7% (4366 of 8957 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ko/
2025-11-08 18:16:24 +00:00
geumuandWeblate 8c36ee15cd Translated using Weblate (Korean)
Currently translated at 48.6% (4355 of 8957 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ko/
2025-11-08 16:54:27 +00:00
阿鱼andWeblate 3231d97cd3 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 100.0% (8957 of 8957 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-11-08 16:54:26 +00:00
Nico MerenqandWeblate 9fce4d3b6b Translated using Weblate (Russian)
Currently translated at 64.7% (5801 of 8957 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-11-08 16:54:25 +00:00
violet 550e579190 e 2025-11-08 06:03:40 -05:00
violet e7d710e0a3 implemented poltchageist & sinistcha remodels (+ tweaks to polteageist) 2025-11-08 06:02:08 -05:00
violet acb86b1935 implemented dratini, dragonair, and dragonite remodels 2025-11-08 05:50:42 -05:00
Carmendar fd8e9b49b5 Adjusted some ride stats. 2025-11-08 03:07:34 -06:00
阿鱼andWeblate 0f031545c1 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.1% (8877 of 8957 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-11-08 08:30:14 +00:00
Landon Wills 1fdbee91df Run scraper 2025-11-08 03:10:01 -05:00
geumuandWeblate 2b80189a79 Translated using Weblate (Korean)
Currently translated at 46.9% (4208 of 8957 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ko/
2025-11-08 07:59:51 +00:00
geumuandWeblate 2e88b0194e Translated using Weblate (Korean)
Currently translated at 46.6% (4176 of 8957 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ko/
2025-11-08 06:51:21 +00:00
Nico MerenqandWeblate b0e278d1a7 Translated using Weblate (Russian)
Currently translated at 63.3% (5674 of 8957 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-11-08 06:51:12 +00:00
geumuandWeblate 9c646d9d53 Translated using Weblate (Korean)
Currently translated at 46.6% (4174 of 8957 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ko/
2025-11-08 06:51:10 +00:00
Gertimoshka bfab1d7070 Actually Fix the Merge Conflicts 2025-11-07 16:41:39 +02:00
Gertimoshka e61e1390cb Fix Merge Conflicts 2025-11-07 14:26:09 +00:00
Gertimoshka 18151ff2f0 Implemented Levelup Sounds 2025-11-07 16:04:17 +02:00
Guilherme Pereira dd19140a83 change mark chance effect to drops reroll 2025-11-07 10:33:54 -03:00
Paul d5b1dfa9da no wait don't do that 2025-11-07 22:34:26 +10:00
Paul 9f0ddf4dd3 Put the bucket multiplication back onto fishing since I think I forgor to put this back on 2025-11-07 22:07:41 +10:00
Paul ef3ea62ae0 Aprijuice formula rework and don't allow poke bait to stack otherwise fishing combines baits and that's bad 2025-11-07 21:46:20 +10:00
Polymeta 6b43bf9f48 Merge branch 'main' into '1.7-spawns'
# Conflicts:
#   common/src/main/resources/data/cobblemon/spawn_pool_world/0194_wooper.json
#   common/src/main/resources/data/cobblemon/tags/worldgen/biome/is_mirage_island.json
#   utilityscripts/cobblemon_spawn_csv_to_json.py
2025-11-07 11:13:38 +00:00
Veraxiel a4012895f3 Added and updated spawns and tags. Edited berry data scraper. 2025-11-07 04:32:20 -05:00
FrankTheFarmer 7f6a3e8e87 Retweaked Alolan Golem's profile because the profile's respect aspects again. Yippee 2025-11-07 19:06:56 +10:00
FrankTheFarmer 7a84ea723f Merge branch 'main' into implement_pokemon 2025-11-07 18:53:53 +10:00
FrankTheFarmer 2aad33ded5 Merge remote-tracking branch 'origin/implement_pokemon' into implement_pokemon 2025-11-07 18:45:53 +10:00
Carmendar 254c95fa15 Rocket Expression changes. 2025-11-07 02:14:07 -06:00
Carmendar 5aab7f67e1 Ride anims for Lapras and Glide/Dive anims for Salamence. - surfacewater poser tweaks for some pokemon. - Tyrantrum crash fix. 2025-11-07 02:12:46 -06:00
Polymeta ae4decacc7 Merge branch 'bottle-o-knowledge' into 'main'
Added Unlock Condition

See merge request cable-mc/cobblemon!1936
2025-11-07 07:01:59 +00:00
dhi_holo ae5a9be626 Added Unlock Condition
Elixirs, Ethers, Potions, Super Potions, and Hyper Potions now unlock from having the berry or Medicinal Brew, rather than just the berry
2025-11-07 16:11:11 +10:00
Landon 05faea4ec8 Merge branch 'no-riding-suffocation' into 'main'
Prevent suffocation when riding a pokemon

See merge request cable-mc/cobblemon!1935
2025-11-07 05:09:05 +00:00
Landon Wills 05edd34db6 Prevent suffocation when riding a pokemon 2025-11-06 10:54:39 -05:00
Landon c198f8fccd Merge branch 'implement_pokemon' into 'main'
A more polished world...

See merge request cable-mc/cobblemon!1930
2025-11-06 14:37:53 +00:00
Landon Wills 521f9aaafa Scrape files 2025-11-06 08:52:29 -05:00
Hiroku 8d38505993 Merge branch 'SaccTreeFixes' into 'main'
SaccTreeFixes

See merge request cable-mc/cobblemon!1932
2025-11-06 12:20:44 +00:00
Carmendar 7c5fab02a8 Merge remote-tracking branch 'origin/implement_pokemon' into implement_pokemon 2025-11-06 01:53:24 -06:00
Carmendar 7e5a267c89 Dolphins & Submarines ready for business. - Mime Jr shoulder mount anims. - Various seats and poser tweaks. 2025-11-06 01:52:51 -06:00
Landon 5b23b0cfbe Merge branch 'pondering-my-orb-and-not-crashing' into 'main'
Fix a crash with Ponder and likely others in CameraMixin

See merge request cable-mc/cobblemon!1933
2025-11-05 13:52:17 +00:00
Nadja Reitzenstein 778ceff183 Fix a crash with Ponder and likely others in CameraMixin
Our setRotation mixin assumes the camera to be attached to an entity. It's not always, and it's not for Ponder Scenes specifically.
2025-11-05 13:57:36 +01:00
Paul f32050c8b5 Added setter to player spawner mixin and opened PlayerSpawner 2025-11-05 21:40:09 +10:00
Hiroku 3522bac72a Merge branch 'smeargle-paint-me-like-one-of-your-french-mooshtanks' into 'main'
Smeargle paint me like one of your french mooshtanks

See merge request cable-mc/cobblemon!1746
2025-11-05 11:24:27 +00:00
Paul ecf037666f Merge remote-tracking branch 'weblate/lang-updates' 2025-11-05 21:13:23 +10:00
Watuneni iteiteandWeblate 618d062ca9 Translated using Weblate (Japanese)
Currently translated at 93.5% (8334 of 8908 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-11-05 11:13:04 +00:00
Paul 49841b40ec Merge remote-tracking branch 'weblate/lang-updates' 2025-11-05 21:10:49 +10:00
Paul 87141e1137 Variable naming cleanup 2025-11-05 21:09:18 +10:00
Paul 1f962d664f Removed inaccurate comment 2025-11-05 21:08:50 +10:00
Paul 09797f25b1 Added characteristic_rainbow molang function to pokemon behaviour object 2025-11-05 21:08:31 +10:00
Paul 3911413c69 Removed unused lang function 2025-11-05 21:08:09 +10:00
violet e075e60231 tea time 2025-11-05 05:35:57 -05:00
violet acdd98573b Merge remote-tracking branch 'origin/implement_pokemon' into implement_pokemon 2025-11-05 05:27:35 -05:00
Paul 12f3e7b78b Fix party renders not respecting aspects 2025-11-05 19:01:24 +10:00
violet a462fe5efc added raboot.json poser 2025-11-05 03:43:26 -05:00
Carmendar 2390662fc8 A few submarines and poser/anim tweaks for Dusknoir, Bastiodon and Magnezone. Added surface water ride sounds for Aqua Tauros. 2025-11-05 02:33:26 -06:00
Carmendar 1bd5d2372f Merge branch 'refs/heads/main' into implement_pokemon
# Conflicts:
#	common/src/main/resources/data/cobblemon/species/generation4/garchomp.json
2025-11-05 01:20:44 -06:00
Landon Wills 12f6bb55c2 Fix goof 2025-11-05 02:05:32 -05:00
Landon fdb37ba5e8 Merge branch 'dolphin-sub-noPuke' into 'main'
submarine, dolphin rework, projectile support, view vector fix, and motion sick cam

See merge request cable-mc/cobblemon!1929
2025-11-05 06:56:07 +00:00
Jackson BowesandLandon 7a99845d0f submarine, dolphin rework, projectile support, view vector fix, and motion sick cam 2025-11-05 06:56:06 +00:00
JazzMcNade 54d183c8d3 Merge branch 'main' into SaccTreeFixes 2025-11-04 23:08:44 -06:00
JazzMcNade 29713bbe1f Update SaccharineTreeFeature.kt
natural sacc trees have 20% chance to generate a hive.
post generation sacc trees with nearby flowers have 5% chance to generate a hive.
Hives now always generate adjacent to a log block.
No longer records flower positions.
2025-11-04 22:56:43 -06:00
Landon 247052ee67 Merge branch 'moonrise-compat' into 'main'
Retain moonrise compatibility for Cobblemon 1.7

See merge request cable-mc/cobblemon!1926
2025-11-05 03:11:05 +00:00
FrankTheFarmer 14b7e93965 Tweaked Geodude's look range + poser tweaks 2025-11-05 09:24:32 +10:00
FrankTheFarmer 85a4793a1e formatting and cry fix for Graveler and Golem posers 2025-11-05 09:23:32 +10:00
Veraxiel 29f6524c49 Fix to formatting in TimeRange.kt 2025-11-04 17:50:24 -05:00
Veraxiel 1e617a684b Minor edit to a time range in TimeRange.kt 2025-11-04 17:49:42 -05:00
Paul c9a0352a7c Nerfed aprijuice stat point gain, tweak saccharine tree top leaf gen 2025-11-05 06:40:51 +10:00
Gertimoshka 1a5808e5a6 Update Licenses 2025-11-04 21:57:53 +02:00
Gertimoshka f14d242907 Fix a crash in code for party overlay 2025-11-04 21:52:50 +02:00
Sterrezo 4998ee2c5b Added levelup sounds 2025-11-04 20:25:19 +01:00
Guilherme Pereira be96e45c4e change colors variable name 2025-11-04 08:41:42 -03:00
violet 015402d54b Merge remote-tracking branch 'origin/implement_pokemon' into implement_pokemon 2025-11-04 05:24:23 -05:00
violet 6f697d2b9a solosis line poser tweaks 2025-11-04 05:23:29 -05:00
violet f18752d484 haxorus model + poser tweaks 2025-11-04 04:53:53 -05:00
violet 5876c02d44 unown animations 2025-11-04 04:28:56 -05:00
violet c890f6910c a lot of poser alterations 2025-11-04 04:27:24 -05:00
Paul d157536e1e party pokemon walk again woops 2025-11-04 18:54:29 +10:00
Carmendar dac2d9e96e Mimikyu animations & ride style changes. - Updated changelog 2025-11-04 01:59:01 -06:00
Landon Wills 5c71680db9 Run scraper 2025-11-04 00:26:13 -05:00
Carmendar 5f5c036f8d Merge branch 'main' into implement_pokemon 2025-11-03 23:14:21 -06:00
Carmendar 1f16c2d542 Updated dewgong anim file. 2025-11-03 23:12:50 -06:00
JazzMcNade 2da9dc50f7 Fixed creative duped beehives creating combees with duplicate UUIDs 2025-11-03 21:30:57 -06:00
Carmendar 092f9ef9f9 Updated Gyarados fly pose. 2025-11-03 20:03:18 -06:00
Landon Wills 2f12b05d43 Run scraper 2025-11-03 19:48:32 -05:00
Guilherme Pereira 42eb08e715 Merge branch 'main' into more-poke-snack-stuff 2025-11-03 18:08:10 -03:00
Guilherme Pereira 03470aa623 add poke snack spawn pokemon pre and post events 2025-11-03 17:58:14 -03:00
Sterrezo 4299aff1bf Added water ride loop sounds and updated the wind loop 2025-11-03 16:57:05 +01:00
Paul fb90ccb86e Fixed dismount not working for non-owner passengers if they have no Pokemon 2025-11-03 22:08:12 +10:00
Paul c112f9615c Merge remote-tracking branch 'origin/main' 2025-11-03 21:42:57 +10:00
Paul fc882190fe /ride no longer works on seatless pokemon, closes #1750 2025-11-03 21:39:48 +10:00
Paul 15d7cd815d Only handle mount transition camera logic for the actual client player. Probably doesn't fix anything? 2025-11-03 21:23:35 +10:00
violet 6b5969fff6 Merge remote-tracking branch 'origin/implement_pokemon' into implement_pokemon 2025-11-03 03:33:13 -05:00
Carmendar 5053c633b7 Grafaiai paint/saliva colors 2025-11-03 02:22:33 -06:00
violet c4294697e6 implemented remodels for scorbunny, raboot, and cinderace 2025-11-03 03:16:37 -05:00
Carmendar dfa1c5e369 Orthworm sand_idle fix 2025-11-03 01:59:46 -06:00
Carmendar 51f3b4357d Implemented Remodels for Steelix and Shroodle line. 2025-11-03 01:59:08 -06:00
Carmendar 220a9741ae Implemented Mime Jr animations. 2025-11-03 01:58:15 -06:00
Carmendar 48a9446f73 Implemented the Vanillite line. 2025-11-03 01:56:52 -06:00
violet f1edfc453e minor adjustments to shuppet's poser 2025-11-03 01:18:40 -05:00
FrankTheFarmer 8d612ec395 Changelog of hatred and anguish 2025-11-03 15:01:03 +10:00
FrankTheFarmer 6d9daf3cf6 Stupid fish's mama 🔴⚪ 2025-11-03 15:00:26 +10:00
FrankTheFarmer c7ecfc74de Stupid fish 🔴🔵⚪ 2025-11-03 14:26:02 +10:00
Hiroku fefdfd877b Merge branch 'let-me-/ride' into 'main'
Fix /ride

Closes #1751

See merge request cable-mc/cobblemon!1927
2025-11-03 02:35:18 +00:00
Landon Wills 35fb170225 Fix /ride 2025-11-02 20:50:39 -05:00
Paul d2e405131f Fixed speculative cast in pokedex FOV multiplier. Closes #1756 2025-11-03 11:37:00 +10:00
Paul b6ec0205ef Fixed NPC gibber sounds playing even when text was skipped. Closes #1755 2025-11-03 11:36:20 +10:00
Paul e57a42e755 Fixed immobile pokemon walking to follow the player. Closes #1757 2025-11-03 11:25:46 +10:00
Carmendar f34a03c8d6 Implemented Carvanha and Sharpedo animations - removed surfacewater swimming from Charizard and Arcanine. 2025-11-02 17:28:22 -06:00
Carmendar 8b1599705f Merge remote-tracking branch 'origin/implement_pokemon' into implement_pokemon 2025-11-02 13:35:26 -06:00
Carmendar e7f6fc32c4 Implemented Arcanine Animations! 2025-11-02 13:34:39 -06:00
Landon Wills 5119617f00 Check for moonrise and disable conflicting mixin if loaded 2025-11-02 09:39:33 -05:00
Paul 6e84efb53c No Packed Up backpacks either. Your move, Monocle 2025-11-02 22:41:11 +10:00
Paul de3191b768 Some english improvements on new NPC Behaviours 2025-11-02 22:06:27 +10:00
Paul 76ec4b4d5a Merge remote-tracking branch 'origin/main' 2025-11-02 21:34:42 +10:00
Hiroku 25702ade61 Merge branch 'main' into 'main'
dialogue selection interaction and name tag display - done properly this time

See merge request cable-mc/cobblemon!1925
2025-11-02 11:34:19 +00:00
Paul c6da88d0b2 Improvements to GUI pokemon animation config options, pokebait effects, setup some berry gen stuff for vera 2025-11-02 21:32:18 +10:00
violet c4acc09fbd Merge remote-tracking branch 'origin/implement_pokemon' into implement_pokemon 2025-11-02 03:49:32 -05:00
violet 53b434906b altered various starter pokemon portraits, profiles, and scales 2025-11-02 03:49:22 -05:00
Jolihan b22a31909d Update file en_us.json 2025-11-02 08:09:19 +00:00
Jolihan cbbbacc215 Edit name_tag_display.json 2025-11-02 07:01:40 +00:00
Jolihan566 d22d81209d dialogue selection interaction and name tag display - done properly this time 2025-11-02 16:59:21 +10:00
Carmendar 89b989c46c Updated Changelog 2025-11-02 01:42:05 -05:00
Carmendar 714d51b26e Implemented Tadbulb and Bellibolt animations 2025-11-02 01:35:27 -05:00
Hiroku 8571d78894 Merge branch 'FixGreedyHoneyEaters' into 'main'
Fixed Greedy Honey Eaters

Closes #1725

See merge request cable-mc/cobblemon!1920
2025-11-02 05:54:22 +00:00
JazzMcNade 72c57fde39 Sacc tree spawned beenests are now populated with either Minecraft bees or combees 2025-11-01 21:58:15 -05:00
Carmendar fc5c479f31 two small fixes 2025-11-01 21:48:58 -05:00
Carmendar d3c54924be no more blinky bronzong 2025-11-01 20:57:25 -05:00
Paul 65c5e95ddf Fixed possible crash from bees putting honey in saccarine leaves 2025-11-02 11:56:27 +10:00
Carmendar fc1dec6b4b Shellos & Gastrodon cries implemented 2025-11-01 20:53:45 -05:00
Carmendar 7604af9308 Shellos & Gastrodon cries 2025-11-01 20:48:16 -05:00
Carmendar ab1e138ace Koffing and Weezing animations. 2025-11-01 19:25:38 -05:00
Carmendar 62ee94c71d Bronzong and Camerupt animations - More poser tweaks. 2025-11-01 19:06:26 -05:00
Nadja Reitzenstein 0fae95aabc Reorder smeargle's tail colours to allow handing them cosmetic dyes
Our aspect system has the limitation that you can not easily have two separate systems add mutually exclusive aspects correctly. This means that for cosmetics to work without much duplication, the characteristic rainbow has to set a different aspect with some (but much more limited) duplication in the assignment of textures.
2025-11-01 19:55:55 +01:00
Nadja Reitzenstein bbfd864b33 Clean up Rainbow Aspect provider 2025-11-01 18:43:31 +01:00
Nadja Reitzenstein b107d76762 Cosmetic Item dye affects smeargle tails now 2025-11-01 17:37:04 +01:00
Nadja Reitzenstein 8d4f10349c Use the easier to understand maxBy call 2025-11-01 17:25:23 +01:00
Nadja Reitzenstein f36787e67f Clean up Characteristic calculation
Also ensures characteristics are recalculated on IV updates.
2025-11-01 16:42:59 +01:00
Nadja Reitzenstein fc198c599e Update CHANGELOG.md 2025-11-01 16:23:12 +01:00
Nadja Reitzenstein 26f753880c Implement rotating a feature on lightning hit more sensibly 2025-11-01 16:23:12 +01:00
Nadja Reitzenstein a9ebb0b6f2 Merge thunderHit method for Pokemon entity 2025-11-01 16:23:12 +01:00
Nadja Reitzenstein a7158ee57a Rainbow aspected Smeargle 2025-11-01 16:23:12 +01:00
Nadja Reitzenstein 06c3fd3f09 Make lightning damage only not apply if there was an actual aspect change. 2025-11-01 16:23:12 +01:00
Nadja Reitzenstein 4e196e8a29 Generalise switching aspect behaviour on lightning hit 2025-11-01 16:23:12 +01:00
Nadja Reitzenstein 871f33f442 Make mooshtank switch colour on lightning hit 2025-11-01 16:23:12 +01:00
Polymeta 21c1f912a7 Merge branch 'typo' into 'main'
Update crops.json

See merge request cable-mc/cobblemon!1924
2025-11-01 10:16:37 +00:00
Carmendar a0d9ce12a6 Implemented animations for Mr. Mime and Relicanth - poser/anim tweaks for Dragonite. 2025-11-01 03:59:05 -05:00
Carmendar c07173fc0f Merge branch 'main' into implement_pokemon 2025-11-01 01:54:43 -05:00
violet 3faf8ac302 Merge remote-tracking branch 'origin/implement_pokemon' into implement_pokemon 2025-11-01 01:21:23 -04:00
violet e85b3f3cc5 implemented shuppet and banette 2025-11-01 01:19:52 -04:00
RedGenesectNinja 251a09f78c Implemented Stunfisk and Galarian Stunfisk 2025-10-31 23:43:46 -05:00
dhi_holo 776fb5413f Update crops.json
Apparently missed this file while updating stuff? I swear I didn't but it must not've commited
2025-11-01 14:36:45 +10:00
Paul f645fd9b60 Added support for species-specific move action effects 2025-11-01 11:44:05 +10:00
Landon ac161ae5b4 Merge branch 'orientation-refactor' into 'main'
Refactor orientation to better allow for passengers on rolling rides.

See merge request cable-mc/cobblemon!1910
2025-11-01 01:19:29 +00:00
Jackson BowesandLandon fc3542e3eb Refactor orientation to better allow for passengers on rolling rides. 2025-11-01 01:19:28 +00:00
Gertimoshka 7c44dd204e Remove Old Notifications of Level Up, EXP Gained, and Moves Learned 2025-10-31 15:13:53 +02:00
Hiroku 88932c8c41 Merge branch 'poke-snack-spawner' into 'main'
Makes Poké Snacks act as spawners

See merge request cable-mc/cobblemon!1915
2025-10-31 12:10:36 +00:00
lionandHiroku 411f98d0ae Makes Poké Snacks act as spawners 2025-10-31 12:10:36 +00:00
Polymeta 02a1929ede Merge branch 'fix-pick-block' into 'main'
Fix picking blocks while riding mounts

Closes #1698

See merge request cable-mc/cobblemon!1922
2025-10-31 12:00:14 +00:00
JordanandPolymeta ff90059eec Fix picking blocks while riding mounts 2025-10-31 12:00:13 +00:00
Carmendar eca14f61ac Various mount style changes - prep work for Submarine, and removed mountability from 5 pokemon. 2025-10-31 02:35:15 -05:00
Carmendar 9ccf2bb9ad Heracross anims, poser fixes, removed land mount style from select pokemon. 2025-10-31 02:33:30 -05:00
Guilherme Pereira d09d636113 add facing direction to snacks 2025-10-30 16:54:45 -03:00
Guilherme Pereira ff335f779f improve color mixing of snacks 2025-10-30 13:25:37 -03:00
Guilherme Pereira b70316e347 switch the snacks’ colors to be based on food colors again 2025-10-30 10:05:30 -03:00
Kenji_64 eacb0fe587 Forgot the changelog 2025-10-30 13:27:23 +01:00
Kenji_64 1752588cbc New scales for Dreepy and Drakloak 2025-10-30 13:22:48 +01:00
Kenji_64 9e09ac52fc Added animations + ride stats to Dragapult! 2025-10-30 13:22:25 +01:00
Kenji_64 845ade1aeb Added cries to Alolan Vulpix and Ninetales 2025-10-30 11:28:53 +01:00
Carmendar f6bd04f016 Implemented Darmanitan, Gastrodon, Orthworm & Salamence anims - Switched Tentacruel to json poser - fixed minor camera and poser issues. 2025-10-30 02:41:42 -05:00
Landon Wills afa1d9af8b Update riding scraper, scrape pokemon 2025-10-30 03:15:02 -04:00
Landon Wills bf6db8b745 Merge branch 'main' into implement_pokemon 2025-10-30 00:58:03 -04:00
Guilherme Pereira a352e67c1b lots of bugs and rowap berry effect 2025-10-29 21:42:55 -03:00
Guilherme Pereira 71297dfb3a fix nearby check for poke snack 2025-10-29 18:46:08 -03:00
Guilherme Pereira 9141694c2a Merge branch 'main' of gitlab.com:cable-mc/cobblemon into poke-snack-spawner 2025-10-29 18:00:30 -03:00
Gertimoshka 9aef7b9c3b Party Notifications Will Override and Stack if triggered too fast (feeding exp candy as an example) and now pokemon level text will change during animation instead instantly 2025-10-29 16:28:00 +02:00
Carmendar c5bebb1abb Hydreigon geo fix
(I goofed up)
2025-10-29 03:03:12 -05:00
Carmendar 990fed2fe0 The great Camera polishing event of '25. 2025-10-29 02:51:02 -05:00
Polymeta 4a30bb3b04 Merge branch 'seasoning-filters' into 'main'
Cooking Pot Recipes now have filtered

See merge request cable-mc/cobblemon!1919
2025-10-29 07:45:59 +00:00
Carmendar fe77a3cd30 Implemented new Charizard, Staraptor, Dusknoir & Forretress animations, fixed Altaria not using some anims, adjusted floating seat locators.
Also fixed Will O' Wisp particle.
2025-10-29 02:34:02 -05:00
Gertimoshka de9e1949fe Do actually implement all of the animations for party overlay level up 2025-10-29 08:06:14 +02:00
Polymeta fac8c5f510 Merge branch 'party-overlay-config-fix' into 'main'
Party overlay config fix

See merge request cable-mc/cobblemon!1921
2025-10-28 14:41:22 +00:00
lionandPolymeta 2d077c607a Party overlay config fix 2025-10-28 14:41:21 +00:00
Nico MerenqandWeblate f75e3d11da Translated using Weblate (Russian)
Currently translated at 63.6% (5669 of 8908 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-10-28 08:50:20 +00:00
Gertimoshka f46968f878 Remove Unnecesary Comments 2025-10-28 07:20:54 +02:00
Nico MerenqandWeblate 3439aeff1e Translated using Weblate (Russian)
Currently translated at 63.5% (5662 of 8908 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-10-27 21:50:57 +00:00
Paul 1f8fa8cae3 Prevent snacks from spawning pokemon if no players are nearby 2025-10-27 13:50:33 +10:00
Paul 42e405530c Major rework of Spawner hierarchy, removed SpawnerManagers, moved pokesnacks to be manually ticked 2025-10-27 13:40:52 +10:00
Nico MerenqandWeblate 2ada7e0b68 Translated using Weblate (Russian)
Currently translated at 63.5% (5659 of 8908 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-10-26 06:57:00 +00: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
JazzMcNade 7f6197ab8b Honey slathered logs no longer activated multiple time on the same pokemon, and ignore pokemon that already have their hidden ability. 2025-10-25 14:52:51 -05: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
Gertimoshka e197287775 Fixed preview item still using seasoning items even if its invalid by tag 2025-10-25 22:04:47 +03:00
dhi_holo be019c79df Update poke_cake.json
Sadly, Poke Cakes do not get tinted by non-flavour colours, so despite my attempt to allow it, it just doesn't work
2025-10-25 20:45:47 +10:00
dhi_holo 73fe851c58 Merge branch 'seasoning-filters' of https://gitlab.com/cable-mc/cobblemon into seasoning-filters 2025-10-25 20:20:09 +10:00
dhi_holo 8544744530 Tags in Recipes 2025-10-25 20:19:37 +10:00
Gertimoshka 32d7bfcef3 Recipes no longer need to define seasoning tag and will assume it as cobblemon:empty 2025-10-25 12:53:25 +03:00
Gertimoshka 27263cd057 JEI is now filtering seasoning slots additionally based berries 2025-10-25 12:22:08 +03:00
Gertimoshka 55f0962205 Recipes will now not consume seasoning items that are not in seasoning filter of recipe and slots will highlight red if seasoning item does not apply to current recipe 2025-10-25 12:02:22 +03:00
Carmendar 63143832e0 Chinchilla implementation. 2025-10-25 02:53:59 -05:00
Carmendar 29215f5c0c Merge branch 'refs/heads/main' into implement_pokemon 2025-10-25 02:48:22 -05:00
dhi_holo 70bf3e7805 Merge branch 'main' into do-you-get-the-joke 2025-10-25 17:12:40 +10: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
Gertimoshka b4d9d1b963 First working itteration of Popups and EXP Bar animations for level up, new moves and new evos 2025-10-25 09:42:26 +03:00
dhi_holo e753c75c31 Merge branch 'seasoning-filters' of https://gitlab.com/cable-mc/cobblemon into seasoning-filters 2025-10-25 15:52:35 +10:00
dhi_holo 4e96222a4d Tags
Renamed a tag and fixed errors it caused, as well as adding the current 6 Filter tags requested for system upgrades
2025-10-25 15:52:09 +10:00
Paul 4ee90d4cfb Removed unneeded comment 2025-10-25 15:22:29 +10:00
Paul 540cd612c1 Added seasoning tag filter to cooking pot recipes 2025-10-25 14:22:47 +10:00
Guilherme Pereira c76dfc3130 refactor poke snacks to use random ticks 2025-10-25 00:29:06 -03: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
Carmendar cf5e1bf142 ride stat adjustments and Blastoise anim implementation. 2025-10-24 02:20:43 -05:00
Nico MerenqandWeblate 4b8196685a Translated using Weblate (Russian)
Currently translated at 63.4% (5653 of 8908 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-10-24 04:12:32 +00:00
Carmendar d1053468bf Adjusted first person mount view for the paldean tauros variants. 2025-10-23 19:22:54 -05:00
Carmendar f0c41865db Adjusted first person mount view for most mons. 2025-10-23 19:19:36 -05:00
Guilherme Pereira cca9de04a7 avoid poke snack spawners behaving weirdly 2025-10-22 21:39:08 -03:00
Carmendar 2b2264bdca Updated Boat expressions 2: Electric Boogaloo 2025-10-22 19:13:09 -05:00
Guilherme Pereira 78d47004bf remove dead code 2025-10-22 21:12:19 -03:00
Guilherme Pereira 30f97e6243 move poke snack spawner creation to poke snack spawner manager 2025-10-22 21:00:35 -03:00
Neovitalism d117d79d28 Removable Feature Rendering 2025-10-22 18:56:26 -05:00
Carmendar 1e32f7b80a Updated Boat expressions 2025-10-22 17:19:52 -05:00
Guilherme Pereira 3d4d797e7f add bite time effect to poke snacks 2025-10-22 15:08:58 -03:00
Guilherme Pereira 39feb9cf6c hook POI system to poke snacks 2025-10-22 13:53:48 -03:00
Guilherme Pereira 8f53757879 allow poke snacks to override the default pokemon per chunk spawn limit 2025-10-22 10:30:46 -03:00
Guilherme Pereira e1d2f125d6 add bucket multiplying influence to poke snacks 2025-10-22 10:00:59 -03:00
Carmendar cfc8edfa9e Ride stats. 2025-10-22 01:40:12 -05:00
Guilherme Pereira fa3ed69ee2 move poke snack spawner to block entity 2025-10-22 03:38:07 -03:00
Carmendar 417b49beda Hover speed expression increase and updated Metagross Poser. 2025-10-22 01:21:41 -05:00
FrankTheFarmer a2f6a35227 Changelog 2025-10-22 11:11:02 +10:00
FrankTheFarmer b9f1cc5883 Added handmade placeholders for ❤Corphish💖 and 🤷‍♂️Crawdaunt🦞 2025-10-22 11:07:02 +10:00
FrankTheFarmer ad132fe729 Made Corphish and Crawdaunt sink and walk in water 2025-10-22 11:03:29 +10:00
FrankTheFarmer f33892fcd1 Merge branch 'main' into implement_pokemon 2025-10-22 11:01:54 +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
Carmendar 2a56709395 Merge branch 'main' into implement_pokemon 2025-10-21 17:57:11 -05:00
Polymeta fc135faf57 revert pokemon number range 2025-10-21 22:48:59 +00:00
Guilherme Pereira 8c02ca3576 create poke snack spawner 2025-10-21 19:45:20 -03: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
TeggyandWeblate 08c2a0d07b Translated using Weblate (Spanish)
Currently translated at 85.0% (7578 of 8908 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/es/
2025-10-20 20:24:26 +00:00
Nico MerenqandWeblate 1f68fdac8c Translated using Weblate (Russian)
Currently translated at 63.4% (5649 of 8908 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-10-20 17:26:47 +00:00
TeggyandWeblate e8d4f0fcf4 Translated using Weblate (Spanish)
Currently translated at 84.7% (7546 of 8908 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/es/
2025-10-20 17:26:45 +00:00
Guilherme Pereira 36a93bda5a refactor poke snack 2025-10-20 03:10:09 -03:00
阿鱼andWeblate 5d522bd608 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 100.0% (8908 of 8908 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-10-20 05:04:02 +00: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
Carmendar 35436c1d09 Dewott no longer sleeps in the void. 2025-10-19 23:26:07 -05: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
Carmendar d66793d186 Merge branch 'main' into implement_pokemon 2025-10-18 16:03:03 -05:00
Carmendar cc00962752 Swadloon do be schmoovin (properly this time) 2025-10-18 15:58:41 -05: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
Watuneni iteiteandWeblate 3894a99bc4 Translated using Weblate (Japanese)
Currently translated at 93.5% (8334 of 8908 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-10-17 18:40:49 +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
Carmendar 3a83ed424f Swadloon do be schmoovin. 2025-10-17 01:46:39 -05: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
Carmendar cbccc612a4 Spewpa learned how to walk. 2025-10-16 02:07:51 -05:00
Carmendar 63fd5d90c1 Merge branch 'main' into implement_pokemon 2025-10-15 23:42:59 -05:00
Carmendar 92336d6107 Implemented Aerodactyl remodel. 2025-10-15 23:37:00 -05: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
Carmendar f3f29ca0ea sky protector remodel. 2025-10-15 02:02:01 -05: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
Carmendar 2544cbc252 Cosmetics for Alola-bias Pichu and Pikachu, and cosmetics for Alolan Raichu. 2025-10-14 23:53:32 -05: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
阿鱼andWeblate 9036a2f317 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 100.0% (8908 of 8908 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-10-13 12:31:47 +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
阿鱼andWeblate c75ab28002 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.3% (8853 of 8908 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-10-13 06:00:42 +00: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
Nico MerenqandWeblate 62a8320068 Translated using Weblate (Russian)
Currently translated at 63.2% (5635 of 8908 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-10-11 20:53:16 +00:00
Watuneni iteiteandWeblate f21b38f66a Translated using Weblate (Japanese)
Currently translated at 93.1% (8300 of 8908 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-10-11 20:53:15 +00:00
Paul 76fdd1fa98 No more tricky riding pokemon after battles start 2025-10-11 21:04:59 +10:00
阿鱼andWeblate 596765bb52 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 98.6% (8791 of 8908 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-10-11 06:00:06 +00:00
Watuneni iteiteandWeblate 297aafba45 Translated using Weblate (Japanese)
Currently translated at 92.9% (8282 of 8908 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-10-11 06:00:04 +00: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
Hiroku 28887d9116 Merge branch 'do-you-get-the-joke' into 'do-you-get-the-joke'
Eggant Effect Data Pack

See merge request cable-mc/cobblemon!1893
2025-10-08 13:02:28 +00:00
KyozennoandHiroku 6ef1bac1d7 Eggant Effect Data Pack 2025-10-08 13:02:27 +00: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
Watuneni iteiteandWeblate a0a682e224 Translated using Weblate (Japanese)
Currently translated at 92.3% (8227 of 8908 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-10-06 12:15:07 +00: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
Nico MerenqandWeblate d161b11892 Translated using Weblate (Russian)
Currently translated at 63.1% (5627 of 8908 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-10-04 22:39:35 +00: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
YasitoandWeblate d70bb243b2 Translated using Weblate (French)
Currently translated at 100.0% (8908 of 8908 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-10-02 18:49:12 +00:00
YasitoandWeblate 301a3efb7c Translated using Weblate (French (Canada))
Currently translated at 100.0% (8908 of 8908 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-10-02 18:49:11 +00:00
YasitoandWeblate 05b7cbe20a Translated using Weblate (French)
Currently translated at 100.0% (8908 of 8908 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-10-02 18:38:58 +00:00
YasitoandWeblate 48cbbc1bef Translated using Weblate (French (Canada))
Currently translated at 100.0% (8908 of 8908 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-10-02 18:38:57 +00:00
YasitoandWeblate f8f7c28274 Translated using Weblate (French)
Currently translated at 99.8% (8895 of 8908 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-10-02 17:13:57 +00:00
YasitoandWeblate 0ebb53888a Translated using Weblate (French (Canada))
Currently translated at 99.8% (8891 of 8908 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-10-02 17:13:56 +00:00
Nadja Reitzenstein 83aba7e4a6 Make RideSettingsSyncHandler be correctly sided 2025-10-02 18:57:37 +02:00
Landon db10ae2183 Merge branch 'riding-behaviour-network-fixes' into 'main'
Make RidingBehaviourSettings::encode/decode symmetric

See merge request cable-mc/cobblemon!1888
2025-10-02 15:39:53 +00:00
YasitoandWeblate c0071c1525 Translated using Weblate (French)
Currently translated at 99.5% (8868 of 8908 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-10-02 14:53:46 +00:00
YasitoandWeblate 71f7b3b3d8 Translated using Weblate (French (Canada))
Currently translated at 99.2% (8841 of 8908 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-10-02 14:53:45 +00:00
Nadja Reitzenstein 548b8522a8 Make RidingBehaviourSettings::encode/decode symmetric
Having the encode/decode functionality symmetric is the expected behaviour and not doing so will introduce a lot of accidental bugs when people assume them to be. Case in point: `RideSettingsSyncPacket.kt` (which this commit notably *does not touch*) expected them to be and was thus entirely broken.
2025-10-02 16:02:24 +02:00
Polymeta 4791b146dc Merge branch 'hotfix-BufferUtils-NPE' into 'main'
Fix a logic error in write-/readNullable resulting in NPE on server joins.

See merge request cable-mc/cobblemon!1886
2025-10-02 13:43:18 +00:00
Nadja Reitzenstein b7a9931393 Fix a logic error in write-/readNullable resulting in NPE on server joins.
This error occurs because `writeNullable` will write `true` if the encoded value is `null` while `readNullable` will treat a `true` value as a value being present. Since it makes more sense to have a true value as a go-ahead this commit changes the behaviour of `writeNullable` to write `true` if a value is present and `false` if a value is `null`
2025-10-02 15:20:33 +02:00
Polymeta 9a35a11440 Merge branch 'the-case-of-disappearing-cubes' into 'main'
The Case of Disappearing Cubes

See merge request cable-mc/cobblemon!1883
2025-10-02 10:46:15 +00:00
Polymeta 6d4a50cee2 Merge branch 'cooking-pot-hopper-bugfix' into 'main'
Fixed bug with seasonings and hoppers in the campfire cooking pot

See merge request cable-mc/cobblemon!1885
2025-10-02 08:16:43 +00:00
PieDuck 818a637897 Merge branch cobblemon:main into cooking-pot-hopper-bugfix 2025-10-01 22:34:45 +01:00
Polymeta 4c96ab9b28 Merge branch 'Carm-Signfix' into 'main'
Added missing Saccharine sign loot table.

See merge request cable-mc/cobblemon!1884
2025-10-01 17:12:08 +00:00
PieDuck d5a316b9ae Fixed bug with seasonings and hoppers in the campfire cooking pot 2025-10-01 17:29:29 +01:00
Carmendar 87e32f0e9b Added missing Saccharine sign loot table. 2025-09-30 23:59:15 -05:00
Watuneni iteiteandWeblate bd6d7b7149 Translated using Weblate (Japanese)
Currently translated at 91.1% (8116 of 8908 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-10-01 00:25:05 +00: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
Alexis SalgueiroandWeblate 63de8fe44a Translated using Weblate (French)
Currently translated at 99.5% (8868 of 8908 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-09-29 18:00:45 +00:00
Gertimoshka 53372e5400 Fixed a very specific case of how a model was made causing dissapearing cubes ingame 2025-09-29 20:15:14 +03:00
Polymeta 2fbb1f354c Merge branch '#1568-npcdelete' into 'main'
changes to /npcdelete uuid prameter and console support

Closes #1568

See merge request cable-mc/cobblemon!1851
2025-09-29 13:13:46 +00:00
CyrusandPolymeta bf06476558 changes to /npcdelete uuid prameter and console support 2025-09-29 13:13:46 +00:00
Paul 2e3a742477 Merge remote-tracking branch 'origin/lang-updates' 2025-09-29 19:45:46 +10:00
Watuneni iteiteandWeblate 94c7542d2c Translated using Weblate (Japanese)
Currently translated at 86.7% (7693 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-09-29 09:27:58 +00:00
Polymeta fa2b6b5996 Merge branch 'regional-food-use-fix' into 'main'
Small fixes

Closes #1708, #1689, #1696, #1710, and #1711

See merge request cable-mc/cobblemon!1877
2025-09-29 08:13:44 +00:00
Watuneni iteiteandWeblate 8e77dc70f6 Translated using Weblate (Japanese)
Currently translated at 86.7% (7692 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-09-29 07:04:26 +00:00
Hiroku 51e3748adb Merge branch 'NoMoreAwkwardSurfaceSwimmingPlz' into 'main'
Fix Awkward water swimming

See merge request cable-mc/cobblemon!1882
2025-09-29 05:50:14 +00:00
Hiroku d8cf2701c7 Merge branch 'sterr/sigh-need-a-new-branch-for-this' into 'main'
Remove an unused sound from sounds.json

See merge request cable-mc/cobblemon!1881
2025-09-29 05:07:36 +00:00
Carmendar 4450164d9c Garchomp can swim in liquid water now. 2025-09-28 23:56:10 -05:00
JazzMcNade 31b7c83369 Merge branch 'main' into NoMoreAwkwardSurfaceSwimmingPlz 2025-09-28 22:50:07 -05:00
JazzMcNade a170123e2c Enforce minimum depth requirement for swim wander, fix mistake in omnipathnav 2025-09-28 22:43:15 -05:00
Carmendar b99899353c Merge branch 'main' into implement_pokemon 2025-09-28 22:39:22 -05:00
Hiroku c3c17a228e Merge branch 'riding-work-hiro' into 'main'
Riding setting and stamina changes

See merge request cable-mc/cobblemon!1880
2025-09-29 02:13:24 +00:00
Paul 41d607ad56 Remember the last camera type used for a mount type and switch to it if the config is enabled 2025-09-29 11:05:41 +10:00
Hiroku 58b3596948 Wait that wasn't meant to still be in there 2025-09-28 11:12:33 +00:00
Paul ed4456d756 API and config and controller options for infinite stamina 2025-09-28 15:47:17 +10: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
Test 481734e6b1 Merge branch 'main' of https://gitlab.com/cable-mc/cobblemon 2025-09-27 20:44:47 -04:00
Test 636792fa1f rm unused function 2025-09-27 20:44:40 -04:00
Test ad65002b19 fix stat color 2025-09-27 20:43:44 -04:00
Sterrezo 903f3b6d5a Removed an unused sound from sounds.json 2025-09-27 12:15:22 +02:00
Paul 4456743e97 Merge remote-tracking branch 'origin/main' into riding-work-hiro
# Conflicts:
#	common/src/main/kotlin/com/cobblemon/mod/common/CobblemonNetwork.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/data/CobblemonDataProvider.kt
2025-09-27 18:41:27 +10:00
Paul d0989e5ece Migrated all the other controllers to support the global config 2025-09-27 18:40:57 +10:00
Hiroku ce3f703de2 Merge branch 'matrix-reloaded' into 'main'
Allow reload of some registries

See merge request cable-mc/cobblemon!1878
2025-09-27 08:31:10 +00:00
Carmendar 03edb5a385 Merge branch 'main' into implement_pokemon 2025-09-27 02:47:44 -05:00
Paul 180229db61 Merge remote-tracking branch 'origin/main' into riding-work-hiro 2025-09-27 16:18:31 +10:00
Carmendar cf77713860 No more Hydreigon quirks while flying. 2025-09-27 01:08:41 -05:00
Paul b6e10c016e Migrate global ride controller settings to use a different solution 2025-09-27 16:06:13 +10:00
Hiroku 8ed68742df Merge branch 'exp-actionbar-fix' into 'main'
Fixes EXP gained actionbar not using the AddExperienceResult.

See merge request cable-mc/cobblemon!1875
2025-09-27 05:53:33 +00: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
Paul ce09236dab Added global controller settings for riding, moved jet over to it 2025-09-27 12:39:17 +10:00
Guilherme Pereira 0bb968dd73 add pokémon fullness to pokémon properties 2025-09-26 11:42:58 -03:00
Guilherme Pereira f3d4cb34e0 fix poke puff tooltip and mild multiplier #1711 #1710 2025-09-26 10:41:17 -03: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
Landon 16aa930735 Merge branch 'boat-tweaks' into 'main'
Boat tweaks

See merge request cable-mc/cobblemon!1879
2025-09-26 03:41:03 +00:00
Landon Wills 55733e8ad5 Add offset setting for determining surface level 2025-09-25 22:52:18 -04:00
Landon Wills 67591efdad Change sprint modifier expression, adjust acceleration formula 2025-09-25 22:26:15 -04:00
Paul 5d300c8157 Change how reloadability is checked for /reload, maybe this will fix server stuff 2025-09-26 11:46:25 +10:00
Paul 3b6e1bd429 Persist stamina between dismount and mount 2025-09-26 11:24:44 +10:00
Test c77198a845 rm unused imports 2025-09-25 20:00:02 -04:00
Test bd32c07cc1 fix ride stat percentage 2025-09-25 19:59:23 -04:00
Guilherme Pereira 1eb7354fc0 update CHANGELOG.md 2025-09-25 16:49:59 -03:00
Guilherme Pereira 52ad6a3250 fix mochi tooltips #1689 2025-09-25 16:24:15 -03:00
Guilherme Pereira aa57bbbf34 fix glint on enchanted pokémon item models #1696 2025-09-25 16:20:17 -03:00
Guilherme Pereira 26278eeb46 fix regional food items not usable on pokémon #1708 2025-09-25 14:55:41 -03:00
Hiroku 99cfc4f147 Merge branch 'stat' into 'main'
🏇🏻

Closes #1687 and #1684

See merge request cable-mc/cobblemon!1870
2025-09-25 12:38:18 +00:00
Paul 89281a1f6d Experimental reload support for various datapack folders 2025-09-25 21:31:42 +10:00
Paul ad044fb05c Aprijuice back to flat boost mechanics, UI corrections 2025-09-25 20:38:00 +10:00
Polymeta 7088ce3828 Merge branch 'fix-scanner-sensitivity' into 'main'
Fix the scanner sensitivity I broke a few hours ago.

See merge request cable-mc/cobblemon!1876
2025-09-25 06:08:39 +00:00
JazzMcNade a9ceddd94a Clean up, disabled hive storage for non-wild bees 2025-09-25 00:50:04 -05:00
JPAKx4 fc6a712906 Fix the scanner sensitivity I broke a few hours ago. 2025-09-24 21:51:41 -05:00
Neovitalism 1d0397c399 Update Pokemon.kt 2025-09-24 21:13:14 -05:00
Polymeta 8ad443a4c5 Merge branch 'riding-behaviour-tweaks-four' into 'main'
Quick riding tweaks

See merge request cable-mc/cobblemon!1873
2025-09-24 21:31:07 +00:00
Jackson BowesandPolymeta 0d1f9a0093 Quick riding tweaks 2025-09-24 21:31:07 +00:00
Polymeta 7587344cb4 Merge branch 'NavigationAndWanderTargetImprovements' into 'main'
NavigationAndWanderTargetImprovements

Closes #1693

See merge request cable-mc/cobblemon!1872
2025-09-24 21:24:48 +00:00
Polymeta f0926d7524 Merge branch 'scan-ride-crash' into 'main'
Fix crash when you zoom in using a pokedex and begin rolling

See merge request cable-mc/cobblemon!1874
2025-09-24 21:16:53 +00:00
JPAKx4 7c3b17d841 Fix crash when you zoom in using a pokedex and begin rolling 2025-09-24 14:27:11 -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
Polymeta 263e3cd79f Merge branch 'caring-farmer' into 'main'
Tag Support for Interactions

See merge request cable-mc/cobblemon!1871
2025-09-23 06:37:15 +00:00
JazzMcNade 2ba8062915 clean up 2025-09-23 01:36:14 -05:00
JazzMcNade edc298bf64 Fixed water walkers targeting lava surfaces and vice versa 2025-09-23 01:32:57 -05:00
JazzMcNade aa1158fcfe Fixed null exception , fixed water walkers being unable to rise up in water. 2025-09-23 01:01:48 -05:00
JazzMcNade ab40ae81c4 Merge branch 'main' into NavigationAndWanderTargetImprovements 2025-09-22 20:37:21 -05:00
dhi_holo b5df1878ed Update furfrou.json
Now can use shears from anything
2025-09-22 21:30:43 +10:00
dhi_holo 800965cb40 Tag!
Added support for the Brushes and Fertilizer item tags in the Interactions (brushes interaction tested with More Brushes and a small datapack to confirm correct behaviours)
2025-09-22 21:20:43 +10:00
Polymeta b00f1d9352 fix typo in pokemon interactions
Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-09-22 10:53:31 +01:00
Polymeta a588cfadf8 Merge branch 'riding-scrape' into 'main'
Riding scrape

See merge request cable-mc/cobblemon!1869
2025-09-22 09:29:38 +00:00
Polymeta 2eb4062f67 [skip-ci] re-add client config for consistency
Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-09-22 10:23:14 +01:00
Polymeta 43321d8872 licenses
Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-09-22 10:07:19 +01:00
Hiroku a5ea584b75 Merge branch 'held-item-datapack' into 'main'
Implemented user-driven held item effects

See merge request cable-mc/cobblemon!1811
2025-09-22 08:10:13 +00:00
CraterandHiroku 6a9edc2e67 Implemented user-driven held item effects 2025-09-22 08:10:13 +00:00
Test 12377deff7 Merge branch 'dynlight-refactor' into 'main'
Number pushing and Dynlight betterments

See merge request cable-mc/cobblemon!1864
2025-09-22 07:47:42 +00:00
Test 583377d39b Merge branch 'main' of https://gitlab.com/cable-mc/cobblemon into stat 2025-09-22 01:31:33 -04:00
Test 2c1da8df06 license 2025-09-22 01:31:21 -04:00
Paul 737ddd973b Tiny cleanup stuff dw about it [skip-ci] 2025-09-22 15:16:25 +10:00
Test d749b04261 fix cyclizar mount idle 2025-09-22 05:14:50 +00:00
Test 93deb3a669 fix stat bar 2025-09-22 00:33:30 -04:00
Test dca45a95e9 Merge branch 'main' of https://gitlab.com/cable-mc/cobblemon into stat
# Conflicts:
#	common/src/main/kotlin/com/cobblemon/mod/common/api/riding/behaviour/RidingBehaviourSettings.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/api/riding/behaviour/types/air/GliderBehaviour.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/entity/pokemon/PokemonEntity.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/item/group/CobblemonItemGroups.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/pokemon/Pokemon.kt
#	common/src/main/resources/data/cobblemon/recipe/campfire_pot/black_aprijuice.json
#	common/src/main/resources/data/cobblemon/recipe/campfire_pot/blue_aprijuice.json
#	common/src/main/resources/data/cobblemon/recipe/campfire_pot/green_aprijuice.json
#	common/src/main/resources/data/cobblemon/recipe/campfire_pot/pink_aprijuice.json
#	common/src/main/resources/data/cobblemon/recipe/campfire_pot/red_aprijuice.json
#	common/src/main/resources/data/cobblemon/recipe/campfire_pot/white_aprijuice.json
#	common/src/main/resources/data/cobblemon/recipe/campfire_pot/yellow_aprijuice.json
2025-09-21 21:42:19 -04:00
Test 0412f16460 ride stat 2025-09-21 20:20:45 -04:00
Nico MerenqandWeblate efd4a72287 Translated using Weblate (Russian)
Currently translated at 63.1% (5598 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-09-21 23:09:39 +00:00
violet 5088497575 MANECTRIC. 2025-09-21 18:55:04 -04:00
Landon Wills a62e5a6571 Revert Golurk changes 2025-09-21 18:54:27 -04:00
Landon Wills 0ec337ee6c Scrape riding updates 2025-09-21 18:20:32 -04:00
Carmendar 76df0a429d changelog 2025-09-21 16:58:50 -05:00
Carmendar 08ea9378de Dewgong ready to scrape. 2025-09-21 16:57:07 -05:00
Carmendar c2bd21ab96 Merge branch 'main' into implement_pokemon 2025-09-21 11:42:32 -05:00
Paul 5db8ccfad4 Fixed various things about aprijuice ride boosts 2025-09-21 22:39:55 +10:00
Polymeta aa206d386a Merge branch 'stop-the-disco-spin' into 'main'
Fixed Pokémon spinning a bunch when re-calculating a path to a moving target, closes #1703

Closes #1703

See merge request cable-mc/cobblemon!1868
2025-09-21 10:11:11 +00:00
Watuneni iteiteandWeblate bba8a12a2a Translated using Weblate (Japanese)
Currently translated at 85.7% (7608 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-09-21 10:00:32 +00:00
Paul a235af6c01 Fixed fliers taking fall damage upon landing without a passenger, fixed rarely flying pokemon joining a herd and launching into space 2025-09-21 19:24:23 +10:00
Carmendar a666a74a32 Slaking jump seat fix. 2025-09-21 03:22:51 -05:00
Carmendar c285120ff4 Merge branch 'main' into implement_pokemon 2025-09-21 03:17:33 -05:00
Paul dbd2890120 oop 2025-09-21 18:09:17 +10:00
Carmendar a5db46cdc5 Rhyhorn line ready for scrape & ride overlays for Slaking. 2025-09-21 01:17:58 -05:00
Carmendar 765cf9b96a Send in the bulls. (Tauros is ready to scrape.) 2025-09-21 01:12:38 -05:00
Paul efe7952869 Fixed Pokémon spinning a bunch when re-calculating a path to a moving target, closes #1703 2025-09-21 14:29:30 +10:00
Carmendar 9e434de285 Implemented spicy chicken legs animations. 2025-09-20 22:11:22 -05:00
Carmendar 712fe2c250 Merge branch 'main' into implement_pokemon 2025-09-20 22:09:16 -05:00
Hiroku 5db5a2ed35 Merge branch 'root-bone-animations-in-riding' into 'main'
Root bone animations in riding

See merge request cable-mc/cobblemon!1866
2025-09-21 02:15:02 +00:00
Paul 49c96e6fc8 Merge remote-tracking branch 'origin/main' 2025-09-21 10:46:21 +10:00
JazzMcNade 31129ef14d Merge branch 'main' into Bee-Polite-Bee-Efficient 2025-09-20 19:44:59 -05:00
Paul d56c9a3f5a put da aprijuice recipes back 2025-09-21 10:42:53 +10:00
JazzMcNade 6c4c973ed8 Fixed large mobs unable to climb blocks. Enabled wandering for seafloor, water surface, and lava surface walkers. 2025-09-20 18:10:55 -05:00
Carmendar a117303147 Merge branch 'main' into implement_pokemon 2025-09-20 17:50:10 -05:00
Landon dbf248a508 Merge branch 'riding-behaviour-tweaks-03' into 'main'
ride tweaks extended cut

See merge request cable-mc/cobblemon!1865
2025-09-20 17:40:28 +00:00
Jackson BowesandLandon 56d75b14fa ride tweaks extended cut 2025-09-20 17:40:27 +00:00
Paul 87311e2d7d Added default ride pose and use that instead of letting minecraft animate them 2025-09-20 22:03:44 +10:00
Hiroku 1b525ca3a5 Merge branch 'the-curse-of-gradle-island' into 'main'
Stop using Architectury Runtime Transfomers implicitly

See merge request cable-mc/cobblemon!1867
2025-09-20 10:27:52 +00:00
Nadja Reitzenstein 78ec9d3723 Stop using Architectury Runtime Transfomers implicitly
We don't use the Architectury Runtime Transformers in any of our direct code, so there is no downside for setting compile_only and entirely dropping them.
This necessitates the other implemented changes to our build system though as the transformers also inject code and resources from the :common project into the platform-specific ones in dev-env runs. Production jars use compile-time transformed and remapped jar shadowing for the same purpose so they are wholly unaffected by this removal.
Removing ART has several upsides: For one their dev-env injections have proven very unreliable so with this change a lot of caching issues have been fundamentally removed. They also inject deep into different parts of the JVM, making hot code reloads almost impossible to function so with this change reloads should be able to apply more often.
2025-09-20 11:42:14 +02:00
Paul afa5d22c8e Re-enabled aprijuice and made creative menu aprijuice 10 in all flavours because w/e 2025-09-20 18:50:02 +10:00
阿鱼andWeblate 1cdf664dce Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.5% (8833 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-09-20 07:30:00 +00:00
Paul bd63fb686d Support marking some seats as making the hands busy 2025-09-20 17:00:35 +10:00
Carmendar 0f9a422d44 no more garchomp quirks while mount flying. 2025-09-20 00:52:41 -05:00
Paul 32d18b47f9 Positional scaling fix for root-based ride player animation 2025-09-20 15:46:11 +10:00
Paul c618bf95fa Merge remote-tracking branch 'origin/main' into root-bone-animations-in-riding
# Conflicts:
#	common/src/main/java/com/cobblemon/mod/common/mixin/client/HumanoidModelMixin.java
#	common/src/main/kotlin/com/cobblemon/mod/common/client/render/player/MountedPlayerRenderer.kt
#	common/src/main/resources/mixins.cobblemon-common.json
2025-09-20 14:46:37 +10:00
Paul 18a8aa12d1 Release the held pokemon before sorting, closes #1663 2025-09-20 14:16:21 +10:00
Paul 308ca6369d Fixed persistence issues for pokemon item pickup behaviours 2025-09-20 12:44:17 +10:00
Paul 79fd9f4e04 Fixed pokemon having the NPC dialogues memory 2025-09-20 12:28:06 +10:00
Paul 38219bbca2 Fixed pokemon in the party following and looking around while asleep, closes #1668 2025-09-20 12:27:48 +10:00
Paul 87de288777 Fixed crash when adding stationary Behaviour without a movement providing behaviour. Closes #1678 2025-09-20 11:25:04 +10:00
Paul b6f1d6c62e Fixed terralith:shrubland not counting as plains for pokemon spawning, closes #1685 2025-09-20 10:44:36 +10:00
Nadja Reitzenstein a7bd70e334 Make only held Pokedexes cast light 2025-09-19 13:10:12 +02:00
Polymeta 43310d3a3b tweak default stat ranges for some flying behaviours
Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-09-19 10:29:34 +01:00
GenotypeXD-Dev d12bdc3745 Merge remote-tracking branch 'origin/implement_pokemon' into implement_pokemon 2025-09-18 21:53:03 -05:00
GenotypeXD-Dev 08c8623951 Flygon Size Fix 2025-09-18 21:38:51 -05:00
Paul 6ae375cf4e Added math.sign and math.copy_sigh molang dep update 2025-09-19 10:34:19 +10:00
Polymeta 29c65c18ff Merge branch 'what-a-grain' into 'main'
Grain Improvements

Closes #1702

See merge request cable-mc/cobblemon!1863
2025-09-18 17:10:08 +00:00
dhi_holoandPolymeta b90384fe08 Grain Improvements 2025-09-18 17:10:08 +00:00
Nadja Reitzenstein d2ff7e3748 Make Charmander glow 2025-09-18 17:48:30 +02:00
Nadja Reitzenstein ea6452287b Refactor dynamic light support to be future-proof 2025-09-18 17:48:28 +02:00
Nadja Reitzenstein b1f7731563 Update dependencies all around 2025-09-18 17:47:39 +02:00
Test 5ad881235f update fabric-permissions-api to 0.3.1 2025-09-18 04:53:02 +00:00
Landon 05796998e8 Merge branch 'riding-behaviour-tweaks-02' into 'main'
Behaviour tweaks

See merge request cable-mc/cobblemon!1862
2025-09-17 18:36:53 +00:00
Jackson BowesandLandon aaf1aad9a4 Behaviour tweaks 2025-09-17 18:36:53 +00:00
Polymeta b315fdcadc Merge branch 'sand-witches' into 'main'
Small Data Changes

See merge request cable-mc/cobblemon!1861
2025-09-17 18:23:42 +00:00
dhi_holo 5b95f0a1c7 Update mochis.json
Added missing and reorganised
2025-09-18 00:01:56 +10:00
dhi_holo 7641a839c2 Merge branch 'main' into sand-witches 2025-09-17 23:33:08 +10:00
dhi_holo 6ed6ca6937 IV Drip
Added new candy tags for IV Candies (additive, subtractive, general, and general candy that includes Exp Candies)
Added Vivichoke, Cobblemon Apples, and Beetroots to Sandwich Vegetable tag
Added advancement for using IV candy
2025-09-17 23:28:18 +10:00
Landon be106a465e Merge branch 'riding-debug-ui-tweaks-02' into 'main'
Ride settings editor

See merge request cable-mc/cobblemon!1858
2025-09-17 12:53:24 +00:00
Jackson BowesandLandon e7c0374c83 Ride settings editor 2025-09-17 12:53:24 +00:00
Polymeta 7fd1a443ac Merge branch 'riding-fix-air-dismount' into 'main'
Fix in air dismount

See merge request cable-mc/cobblemon!1831
2025-09-17 06:22:21 +00:00
Jackson BowesandPolymeta 31359077ed Fix in air dismount 2025-09-17 06:22:20 +00:00
Polymeta 7f683bd618 Merge branch 'riding-fix-waterwalk' into 'main'
Fix riding waterwalk

See merge request cable-mc/cobblemon!1838
2025-09-17 06:21:36 +00:00
Jackson BowesandPolymeta 012f15878e Fix riding waterwalk 2025-09-17 06:21:36 +00:00
Watuneni iteiteandWeblate 2ea5eb2823 Translated using Weblate (Japanese)
Currently translated at 85.7% (7602 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-09-16 18:48:56 +00:00
Polymeta f406b9695d Merge branch 'main' into 'main'
Skip battle check if the mobTargetInBattle game rule is set to false

See merge request cable-mc/cobblemon!1857
2025-09-16 08:17:01 +00:00
Polymeta f6dbe40246 Merge branch 'implement_pokemon' into 'main'
lots o' implementing, animating and fixing.

See merge request cable-mc/cobblemon!1846
2025-09-16 08:15:52 +00:00
Polymeta a1f6e47f42 Merge branch 'fix-cooking-pot-button-color' into 'main'
Fix Campfire Pot Lid Button Sprite

See merge request cable-mc/cobblemon!1859
2025-09-16 08:15:13 +00:00
Polymeta 04f5dbfca0 swap out textures
Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-09-16 09:11:38 +01:00
martin fd940b5549 Remove unnecessary check on resource 2025-09-15 16:12:36 +08:00
Hiroku 3e37c1af32 Merge branch 'animation-scale-shenanigan' into 'main'
Removed Animators/Engineer Frame Ghost Scale Jumpscare

See merge request cable-mc/cobblemon!1855
2025-09-15 01:15:16 +00:00
Paul 8b6b9ffede Changelog [skip-ci] 2025-09-15 10:07:03 +10:00
Hiroku 329a13867c Merge branch 'implemented-patch' into 'main'
Fixes PokemonSpecies.implemented not containing pokémon marked implemented via species additions.

See merge request cable-mc/cobblemon!1835
2025-09-15 00:02:47 +00:00
Nico MerenqandWeblate e109b0fc9f Translated using Weblate (Russian)
Currently translated at 63.0% (5595 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-09-14 14:39:57 +00:00
Watuneni iteiteandWeblate 5de7f96fef Translated using Weblate (Japanese)
Currently translated at 85.6% (7595 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-09-14 14:39:56 +00:00
Carmendar 5c6632c3fb Forgor camera offsets for extra seats 2025-09-14 03:20:07 -05:00
Carmendar ebde125895 Bronzong ready to scrape. 2025-09-14 03:18:17 -05:00
martin c45c74c508 Fix double lid on campfire pot open sprites 2025-09-14 14:31:13 +08:00
martin cd6bc23825 Rename CookingPotColor to CampfirePotColor 2025-09-14 06:16:57 +00:00
martin 3df95df1f9 Add color property in CampfirePotItem
To make it really easy to get it in the future
2025-09-14 06:16:57 +00:00
martin ad3ee75c22 Sync cooking pot button color with open / closed state 2025-09-14 06:16:57 +00:00
martin ce3935950a Add cooking pot open sprites 2025-09-14 06:16:57 +00:00
Paul e1380df7d1 Fixed herd counts exceeding the max, smooth the following timing so it's less robotic 2025-09-14 14:03:13 +10:00
Carmendar cf8cfb8dad Nickel no longer defies gravity when sleeping & corrected underwater behaviors on wiglett line. 2025-09-13 18:52:42 -05:00
Instrafe 3729728124 Implemented locators for Omanyte & Omastar 2025-09-13 17:16:41 -04:00
Nico MerenqandWeblate 1f62f447b5 Translated using Weblate (Russian)
Currently translated at 62.8% (5572 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-09-13 18:04:21 +00:00
MemencioPerez 3092abfdd0 Inline mobTargetInBattle game rule check in TargetingConditions mixin 2025-09-12 15:07:30 -04:00
Carmendar 3150f33e9e underwater walkers now walk underwater, and some swimmers now avoid land. (Crabrawler line avoids water entirely.) 2025-09-12 01:27:34 -05:00
Carmendar 40d7e7bccb Merge branch 'main' into implement_pokemon 2025-09-12 01:27:10 -05:00
MemencioPerez cdbe61843f Skip battle check if the mobTargetInBattle game rule is set to false 2025-09-11 23:00:53 -04:00
Paul b13c168347 Increased default PC box count from 30 to 40 2025-09-12 12:12:39 +10:00
Carmendar f77fa82e4f Implemented finalized Mochi sprites. 2025-09-11 19:02:26 -05:00
Konoha 2e2b10311d Implement Unown ! and ? lang 2025-09-11 17:36:42 -04:00
Gertimoshka 2af5de8ce4 Fixed issue where Animation Transition has a frame non zero scale render on a part that is scale 0 for both animations 2025-09-12 00:02:56 +03:00
Nico MerenqandWeblate 674e1df96d Translated using Weblate (Russian)
Currently translated at 62.8% (5571 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-09-11 17:08:21 +00:00
Watuneni iteiteandWeblate a4a2ae6133 Translated using Weblate (Japanese)
Currently translated at 85.6% (7595 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-09-11 17:08:20 +00:00
Jerzykv 66eea576f3 comma 2025-09-11 10:45:55 +02:00
Carmendar 53a516266f Annihilape anims and particle! -- jump anims for Garchomp and Ursaring + jump fixes for a few other mons. 2025-09-11 02:43:41 -05:00
Carmendar f732442133 Merge remote-tracking branch 'origin/implement_pokemon' into implement_pokemon 2025-09-11 02:41:16 -05:00
GenotypeXD-Dev 34cad13f57 Pachirisu scale fix 2025-09-11 02:19:23 -05:00
GenotypeXD-Dev e879a755a4 Implemented Mew and Pachirisu Remodels, Updated gengars uv/textures 2025-09-11 02:16:58 -05:00
Carmendar 2ac9c827d4 Merge branch 'refs/heads/main' into implement_pokemon 2025-09-10 23:02:07 -05:00
Test a0ef46a18c Merge branch 'main' of https://gitlab.com/cable-mc/cobblemon 2025-09-10 21:09:09 -04:00
Test 9dc15c9096 fix pasture scroll crash 2025-09-10 21:08:49 -04:00
Landon 346e2cd094 Merge branch 'horse-stepup-tweak' into 'main'
Vanilla-Like Horse Ride Style Stepup

See merge request cable-mc/cobblemon!1854
2025-09-10 20:08:24 +00:00
Konoha f7794d50dd Import for cleanliness 2025-09-10 15:24:04 -04:00
Konoha 3b8d67ce64 Tweak the Horse Ride-style "StepUp" to check for the ground similar to vanilla horses. 2025-09-10 14:52:57 -04:00
Test 105d3a7d90 Merge branch 'main' of https://gitlab.com/cable-mc/cobblemon 2025-09-09 20:15:56 -04:00
Tyzillion 8a685cefc0 Poodle trimmin tweaks. 2025-09-09 13:35:09 -04:00
Tyzillion 3ff536dc02 Updated Changelog. 2025-09-09 11:16:56 -04:00
Tyzillion 638ec03244 The trimming particles no longer glow. 2025-09-09 11:14:00 -04:00
Tyzillion 37438c9fdd CYAN AND LIGHT BLUE ARE NOT THE SAME. WAAAAAAAAAH 2025-09-09 09:58:30 -04:00
Tyzillion cbc4b52193 Finishing touches on Furfrou. 2025-09-09 09:48:18 -04:00
Tyzillion 9a760d8eae Merge remote-tracking branch 'origin/implement_pokemon' into implement_pokemon 2025-09-09 08:36:17 -04:00
Tyzillion b7d26d99cd Merge remote-tracking branch 'origin/implement_pokemon' into implement_pokemon
# Conflicts:
#	common/src/main/resources/data/cobblemon/cosmetic_items/dyes.json
2025-09-09 08:33:02 -04:00
Tyzillion 04c8b1e95b Let me pet dat dawg! Can I pet dat dawg? 2025-09-09 08:32:21 -04:00
Tyzillion e4149b2a5e Merge branch 'main' of https://gitlab.com/cable-mc/cobblemon into implement_pokemon 2025-09-09 08:29:44 -04:00
HirokuandGitLab b446af166d Merge branch 'ImproveHoverWander' into 'main'
Improvements to hover (air) wandering

See merge request cable-mc/cobblemon!1845
2025-09-09 11:50:00 +00:00
Carmendar 3cdaa513f8 Lickilicky ready for scrape with placeholder controller, and various other small fixes and tweaks. 2025-09-09 03:09:19 -05:00
PolymetaandGitLab 75e0da38c4 Merge branch 'pot-jei-catalysts' into 'main'
Added JEI recipe catalysts for campfire pots

See merge request cable-mc/cobblemon!1848
2025-09-09 08:06:53 +00:00
GenotypeXD-Dev ca43fcf3a2 Implemented New cosmetics [Watermelon Electrodes, Pokemopolis alakazam, gengar, and jigglypuff, Dots Tinkatink, Tinkatuff, and Tinkaton, Golden Sudowoodo] 2025-09-09 01:39:33 -05:00
gruxor 4f71e11383 Added JEI recipe catalysts for campfire pots 2025-09-09 01:48:58 -04:00
Tyzillion 5b56a5758a Drednaw, more like, DredMAH THERE'S A WEIRD MF CAT OUTSIDE. 2025-09-08 21:54:46 -04:00
Tyzillion 424889e820 You know what, screw you. *Downgrades your Chewtle* 2025-09-08 21:24:10 -04:00
Tyzillion 6d3f00cd58 Merge branch 'main' of https://gitlab.com/cable-mc/cobblemon into implement_pokemon 2025-09-08 21:07:08 -04:00
Carmendar 1d375bdffa Last Bouffalant fix I swear... also Garchomp head fix in sand. 2025-09-08 19:23:24 -05:00
Carmendar e563bbee49 bouff blink fix 2025-09-08 18:05:22 -05:00
PolymetaandGitLab e2ccb20402 Merge branch 'hydrophobic-gates' into 'main'
Removed Hydrophobia from cobblemon gates + consistency changes

See merge request cable-mc/cobblemon!1847
2025-09-08 21:30:49 +00:00
Sterrezo 8fe2dc8304 Restored Golurk's ride sounds 2025-09-08 22:27:49 +02:00
Gertimoshka 4ddc167254 Gates no longer self destruct then open and near water at random rate, also can be ingited by lava 2025-09-08 23:22:16 +03:00
Lennie e3502ec320 Added wing flap sounds to updated noivern & volcarona animations, adjusted noivern's portrait 2025-09-08 10:20:00 +02:00
Carmendar d8d0ade350 luigi and netherite hoe controller updates. 2025-09-08 02:34:31 -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
GenotypeXD-Dev e2ac4449b3 Implemented Seedot line Remodels 2025-09-07 22:15:30 -05:00
GenotypeXD-Dev ecec7ccee3 Merge remote-tracking branch 'origin/implement_pokemon' into implement_pokemon 2025-09-07 21:16:30 -05:00
GenotypeXD-Dev 228282f083 Added regional caps for raichu and pichu, added ukulele pichu, and fixes for pikachu cap cosmetics 2025-09-07 21:15:25 -05:00
Carmendar 3bc7d39800 Forgor changelog 2025-09-07 21:06:30 -05:00
Carmendar 3dc5873642 Nickel line remodels, Garchomp anims, fixed Bouffalant battle_idle, fixed Noivern clipping, updated Volcarona anim file, implemented Chewtle line cries and Axew cry, removed reference to clobbopus cry anim (it doesn't have one), and fixed third person camera offset for some mons. 2025-09-07 21:03:52 -05:00
Veraxiel a5b6a954fd Added "Mansion Dining" preset tag. Updated is_overworld tag. 2025-09-07 20:42:53 -04:00
Nico MerenqandWeblate a5c3d2f800 Translated using Weblate (Russian)
Currently translated at 62.5% (5549 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-09-07 20:08:56 +00:00
TeggyandWeblate 00d2bbbe42 Translated using Weblate (Spanish)
Currently translated at 85.5% (7586 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/es/
2025-09-07 20:08:55 +00:00
Lennie 8d6291c4c2 Fixed a crash due to a poser issue 2025-09-07 13:36:37 +02:00
Jerzykv 2b77d030e8 You can drive now! (Implemented Varoom & Revavroom remodels + placeholder ride data) 2025-09-07 11:45:27 +02:00
Carmendar 029927af6a Merge branch 'main' into implement_pokemon 2025-09-07 04:12:19 -05:00
Carmendar bf791dc4d1 Bouffalant can eepy. 2025-09-07 04:08:13 -05:00
PolymetaandGitLab 56ad481304 Merge branch 'implement_pokemon' into 'main'
Implement pokemon

See merge request cable-mc/cobblemon!1842
2025-09-07 09:04:19 +00:00
PolymetaandGitLab cc7a9ae44a Merge branch 'Move-Particles-1.7' into 'main'
YOU GET PARTICLES, YOU GET PARTICLES, AND YOU GET PARTICLES. SO MANY MOVES WITH PARTICLES.

See merge request cable-mc/cobblemon!1839
2025-09-07 09:02:16 +00:00
TyzillionandGitLab 664f79f3a7 YOU GET PARTICLES, YOU GET PARTICLES, AND YOU GET PARTICLES. SO MANY MOVES WITH PARTICLES. 2025-09-07 09:02:16 +00:00
JazzMcNade 2a295a8796 Merge branch 'main' into Bee-Polite-Bee-Efficient 2025-09-07 03:55:50 -05:00
JazzMcNade 9a2ed78b0d Improve air wanders 2025-09-07 03:54:55 -05:00
Carmendar 558907eb5c Drednaw cry and sobble also smol 2025-09-07 03:31:26 -05:00
Carmendar 370b689ab4 Merge remote-tracking branch 'origin/implement_pokemon' into implement_pokemon 2025-09-07 03:21:59 -05:00
Carmendar e2740babc5 Togetic smol 2025-09-07 03:21:15 -05:00
Lennie 3393ab17d8 Merge remote-tracking branch 'origin/implement_pokemon' into implement_pokemon 2025-09-07 09:06:05 +02:00
Lennie 645029a9c7 Fixed wings being invisible for wattrel in its battle stance 2025-09-07 09:05:41 +02:00
Carmendar f168744ccd Merge branch 'main' into implement_pokemon 2025-09-06 23:49:08 -05:00
Carmendar 67210cb5f9 Fixed Parasect crash. 2025-09-06 23:15:44 -05:00
Carmendar 779fbb4f38 Removed walking privileges from Hydreigon and Volcarona, and fixed Magnezone's magnets being too spinny. 2025-09-06 21:01:31 -05:00
Carmendar 2ee556dc31 Updated Bastiodon third person camera. 2025-09-06 18:21:05 -05:00
Carmendar 4457df9aba Updated Bastiodon ride overlays and fixed Magnezone portrait. 2025-09-06 18:15:47 -05:00
Jakotens e1bd0d688f Merge remote-tracking branch 'origin/implement_pokemon' into implement_pokemon 2025-09-06 17:00:23 -06:00
Jakotens 0bce2d8645 Fix third-person camera positions for most rideable Pokemon. 2025-09-06 17:00:14 -06:00
Carmendar beddea1ecb Merge branch 'main' into implement_pokemon 2025-09-06 16:08:48 -05:00
TeggyandWeblate 40b351a303 Translated using Weblate (Spanish)
Currently translated at 85.5% (7586 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/es/
2025-09-06 12:01:45 +00:00
Not telling you thatandWeblate dc32bd1845 Translated using Weblate (Spanish)
Currently translated at 85.5% (7586 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/es/
2025-09-06 12:01:45 +00:00
Nico MerenqandWeblate a096485155 Translated using Weblate (Russian)
Currently translated at 62.0% (5508 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-09-06 11:58:11 +00:00
TeggyandWeblate f1ae7c4476 Translated using Weblate (Spanish)
Currently translated at 85.4% (7579 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/es/
2025-09-06 11:58:10 +00:00
Not telling you thatandWeblate bcfac2f68a Translated using Weblate (Spanish)
Currently translated at 85.4% (7579 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/es/
2025-09-06 11:58:10 +00:00
Nico MerenqandWeblate ff1902770c Translated using Weblate (Russian)
Currently translated at 62.0% (5503 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-09-06 11:52:11 +00:00
Not telling you thatandWeblate ebb01d4fcc Translated using Weblate (Spanish)
Currently translated at 85.3% (7571 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/es/
2025-09-06 11:52:11 +00:00
Neovitalism 2a62b49eab Update PokemonSpecies.kt 2025-09-04 21:10:49 -05:00
阿鱼andWeblate 0b392c66eb Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.5% (8833 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-09-04 12:47:12 +00:00
Nico MerenqandWeblate 5733074bd8 Translated using Weblate (Russian)
Currently translated at 61.5% (5460 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-09-04 12:47:11 +00:00
阿鱼andWeblate 88ff4e37b8 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.5% (8833 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-09-03 03:48:57 +00:00
JazzMcNade 245226f4f6 Refresh/delete hive memory on exiting a hive 2025-09-02 20:31:13 -05:00
Nico MerenqandWeblate 35b7a80501 Translated using Weblate (Russian)
Currently translated at 61.4% (5455 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-09-02 12:29:43 +00:00
Watuneni iteiteandWeblate 91949414cc Translated using Weblate (Japanese)
Currently translated at 85.6% (7595 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-09-02 12:29:42 +00:00
JazzMcNade d3e1c2c79d Merge branch 'main' into Bee-Polite-Bee-Efficient 2025-09-02 01:34:58 -05:00
Test 43dbfc772e Merge branch 'main' of https://gitlab.com/cable-mc/cobblemon 2025-08-30 22:06:27 -04:00
washashu0905andWeblate 10bfe3b29d Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 96.8% (8593 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hant/
2025-08-30 11:18:38 +00:00
阿鱼andWeblate ff88a3c756 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.5% (8832 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-08-30 11:18:38 +00:00
washashu0905andWeblate 4d47cb8385 Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 96.7% (8582 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hant/
2025-08-30 00:42:40 +00:00
washashu0905andWeblate 8aba2bc279 Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 96.1% (8530 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hant/
2025-08-29 23:50:13 +00:00
Nico MerenqandWeblate fe91e912d0 Translated using Weblate (Russian)
Currently translated at 59.5% (5284 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-08-29 13:16:35 +00:00
Alexis SalgueiroandWeblate 680bc1d205 Translated using Weblate (French)
Currently translated at 100.0% (8870 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-08-28 20:17:51 +00:00
Tyzillion eee3296120 Merge branch 'main' of https://gitlab.com/cable-mc/cobblemon into implement_pokemon 2025-08-27 09:54:51 -04:00
JazzMcNade e04e82c6de Added combee aggression for defending hives, more refactoring 2025-08-27 00:45:12 -05:00
阿鱼andWeblate d0c4bd5a16 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.5% (8832 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-08-26 20:41:46 +00:00
Watuneni iteiteandWeblate 500069e5d8 Translated using Weblate (Japanese)
Currently translated at 85.2% (7561 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-08-26 20:41:45 +00:00
Nico MerenqandWeblate 13ae174c66 Translated using Weblate (Russian)
Currently translated at 58.0% (5148 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-08-25 21:25:28 +00: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
Nico MerenqandWeblate 3bf777c2a9 Translated using Weblate (Russian)
Currently translated at 58.0% (5147 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-08-23 10:45:45 +00:00
Nico MerenqandWeblate b5174686b4 Translated using Weblate (Russian)
Currently translated at 57.9% (5138 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-08-22 06:04:58 +00:00
Watuneni iteiteandWeblate 26a7bc29b3 Translated using Weblate (Japanese)
Currently translated at 85.1% (7555 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-08-22 06:04:57 +00:00
Nico MerenqandWeblate 05cd37eb38 Translated using Weblate (Russian)
Currently translated at 57.9% (5136 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-08-20 23:46:22 +00:00
JazzMcNade 3f18e7c0bf Combees may pass through leaves to deposit honey in saccharine leaves. 2025-08-19 23:37:24 -05:00
Nico MerenqandWeblate 3ac3fcbcda Translated using Weblate (Russian)
Currently translated at 57.4% (5092 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-08-18 18:30:18 +00:00
Weblate 27b3884f27 Update translation files
Updated by "Remove blank strings" add-on in Weblate.

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/
2025-08-16 21:52:57 +00:00
dhi_holoandWeblate 15e8f46702 Translated using Weblate (English (en_PT))
Currently translated at 24.6% (2189 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/en_PT/
2025-08-16 21:52:53 +00:00
dhi_holoandWeblate e91b1061d3 Translated using Weblate (English (United Kingdom))
Currently translated at 0.8% (71 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/en_GB/
2025-08-16 21:52:51 +00: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
dhi_holo 95399a32a8 Tweaks
Fixed the advancements breaking (whoops) and lowered the berry in soil
2025-08-16 18:10:11 +10:00
dhi_holo 7089ff68d4 🍆
That's it, that's the addition

Things that need finishing:
- Bait/Cooking Effects
- Battle Effects (Eggant Berry doesn't exist within our Showdown repo, which it seems to need)
2025-08-16 17:09:02 +10: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
阿鱼andWeblate f042d167d1 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.5% (8832 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-08-14 07:35:19 +00:00
Watuneni iteiteandWeblate eff3bd91d7 Translated using Weblate (Japanese)
Currently translated at 84.9% (7538 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-08-13 11:19:51 +00: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
Nico MerenqandWeblate 1391bfee01 Translated using Weblate (Russian)
Currently translated at 56.9% (5054 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-08-10 10:56:14 +00: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
Watuneni iteiteandWeblate e8b6bee139 Translated using Weblate (Japanese)
Currently translated at 84.9% (7538 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-08-09 09:35:43 +00:00
Nico MerenqandWeblate a98bc80005 Translated using Weblate (Russian)
Currently translated at 56.9% (5052 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-08-08 15:26:11 +00:00
Zack the GhastandWeblate 06d25a043c Translated using Weblate (Portuguese (Portugal))
Currently translated at 68.7% (6097 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/pt_PT/
2025-08-08 02:52:08 +00:00
Zack the GhastandWeblate 6aa3b8b92f Translated using Weblate (Portuguese (Portugal))
Currently translated at 68.5% (6082 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/pt_PT/
2025-08-08 00:40:47 +00:00
Nico MerenqandWeblate 7381b47830 Translated using Weblate (Russian)
Currently translated at 56.1% (4981 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-08-07 13:28:54 +00:00
Watuneni iteiteandWeblate b2a704fa12 Translated using Weblate (Japanese)
Currently translated at 84.8% (7528 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-08-07 13:28:52 +00:00
Zack the GhastandWeblate 41ed476c00 Translated using Weblate (Portuguese (Portugal))
Currently translated at 68.4% (6072 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/pt_PT/
2025-08-07 04:26:31 +00:00
Nico MerenqandWeblate 44ddf097d6 Translated using Weblate (Russian)
Currently translated at 55.7% (4948 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-08-06 20:04:57 +00:00
Zack the GhastandWeblate cb1386fdb3 Translated using Weblate (Portuguese (Portugal))
Currently translated at 68.2% (6051 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/pt_PT/
2025-08-06 20:04:56 +00:00
Nico MerenqandWeblate 0dafe79032 Translated using Weblate (Russian)
Currently translated at 55.3% (4911 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-08-06 14:49:22 +00:00
Nico MerenqandWeblate 51cd929d1c Translated using Weblate (Russian)
Currently translated at 55.3% (4911 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-08-06 12:06:36 +00:00
Nico MerenqandWeblate 5468d5e888 Translated using Weblate (Russian)
Currently translated at 54.6% (4851 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-08-06 11:23:20 +00:00
Nico MerenqandWeblate 0174b8bc67 Translated using Weblate (Russian)
Currently translated at 54.5% (4840 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-08-06 11:18:06 +00:00
Watuneni iteiteandWeblate e3b8fbb973 Translated using Weblate (Japanese)
Currently translated at 84.8% (7527 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-08-06 11:18:05 +00:00
Nico MerenqandWeblate 7103df0116 Translated using Weblate (Russian)
Currently translated at 53.5% (4752 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-08-06 10:25:46 +00:00
Zack the GhastandWeblate 42fba85241 Translated using Weblate (Portuguese (Portugal))
Currently translated at 68.2% (6050 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/pt_PT/
2025-08-06 10:25:45 +00:00
Watuneni iteiteandWeblate f9f11c7137 Translated using Weblate (Japanese)
Currently translated at 84.0% (7452 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-08-06 10:25:45 +00:00
Zack the GhastandWeblate a51acead21 Translated using Weblate (Portuguese (Portugal))
Currently translated at 68.1% (6048 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/pt_PT/
2025-08-06 08:53:38 +00:00
Watuneni iteiteandWeblate 7a3ab17e57 Translated using Weblate (Japanese)
Currently translated at 82.0% (7280 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-08-06 08:53:37 +00:00
Watuneni iteiteandWeblate d4e741c614 Translated using Weblate (Japanese)
Currently translated at 81.7% (7248 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-08-06 08:11:59 +00:00
Watuneni iteiteandWeblate bee1797ff5 Translated using Weblate (Japanese)
Currently translated at 81.7% (7247 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-08-06 08:06:41 +00:00
Watuneni iteiteandWeblate 72fa7d42d5 Translated using Weblate (Japanese)
Currently translated at 81.6% (7243 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-08-06 07:47:36 +00:00
Zack the GhastandWeblate 7a4bf4cc5d Translated using Weblate (Portuguese (Portugal))
Currently translated at 68.1% (6046 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/pt_PT/
2025-08-06 01:23:25 +00:00
Zack the GhastandWeblate ab66e13c8c Translated using Weblate (Portuguese (Portugal))
Currently translated at 68.0% (6038 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/pt_PT/
2025-08-06 00:45:38 +00:00
Zack the GhastandWeblate eaeea493a1 Translated using Weblate (Portuguese (Portugal))
Currently translated at 67.8% (6022 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/pt_PT/
2025-08-05 23:49:36 +00:00
Nico MerenqandWeblate 0bfaedbf6e Translated using Weblate (Russian)
Currently translated at 53.5% (4752 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-08-05 20:57:37 +00:00
Zack the GhastandWeblate 52f9f45608 Translated using Weblate (Portuguese (Portugal))
Currently translated at 67.8% (6016 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/pt_PT/
2025-08-05 20:57:36 +00:00
Zack the GhastandWeblate dfa9dc1e2b Translated using Weblate (Portuguese (Portugal))
Currently translated at 67.5% (5992 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/pt_PT/
2025-08-05 12:37:13 +00:00
Nico MerenqandWeblate c8f5538ae8 Translated using Weblate (Russian)
Currently translated at 53.3% (4728 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-08-05 12:12:59 +00:00
Nico MerenqandWeblate 5af5a59ff1 Translated using Weblate (Russian)
Currently translated at 52.7% (4679 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-08-05 10:18:42 +00:00
Zack the GhastandWeblate eb37ecbe56 Translated using Weblate (Portuguese (Portugal))
Currently translated at 67.5% (5991 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/pt_PT/
2025-08-05 03:22:34 +00:00
Zack the GhastandWeblate d7b528aef1 Translated using Weblate (Portuguese (Portugal))
Currently translated at 67.4% (5981 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/pt_PT/
2025-08-05 02:27:49 +00:00
Nico MerenqandWeblate 2908ca3a89 Translated using Weblate (Russian)
Currently translated at 52.5% (4660 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-08-04 23:50:47 +00:00
Nico MerenqandWeblate aa04dc077b Translated using Weblate (Russian)
Currently translated at 52.5% (4657 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-08-04 21:31:48 +00:00
Nico MerenqandWeblate c1c064e657 Translated using Weblate (Russian)
Currently translated at 52.4% (4653 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-08-04 20:35:53 +00:00
washashu0905andWeblate c0a509820f Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 95.8% (8498 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hant/
2025-08-04 20:30:32 +00:00
Nico MerenqandWeblate aa0b71aad7 Translated using Weblate (Russian)
Currently translated at 52.4% (4651 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-08-04 20:30:31 +00:00
Nico MerenqandWeblate 55c5dfddc4 Translated using Weblate (Russian)
Currently translated at 51.9% (4610 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-08-04 16:16:22 +00:00
Nico MerenqandWeblate b40c69a1d9 Translated using Weblate (Russian)
Currently translated at 51.9% (4610 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-08-04 16:15:06 +00:00
Watuneni iteiteandWeblate ca20f432b3 Translated using Weblate (Japanese)
Currently translated at 81.6% (7238 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-08-04 16:15:05 +00:00
Watuneni iteiteandWeblate 63fe61b913 Translated using Weblate (Japanese)
Currently translated at 80.9% (7177 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-08-04 15:53:50 +00:00
Nico MerenqandWeblate 7605b526c8 Translated using Weblate (Russian)
Currently translated at 51.9% (4606 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-08-04 15:53:34 +00:00
Watuneni iteiteandWeblate 189f39f1c1 Translated using Weblate (Japanese)
Currently translated at 80.9% (7176 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-08-04 15:53:33 +00:00
Nico MerenqandWeblate 8c718069c7 Translated using Weblate (Russian)
Currently translated at 51.7% (4586 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-08-04 14:15:27 +00:00
Nico MerenqandWeblate c2facdf5ce Translated using Weblate (Russian)
Currently translated at 51.1% (4539 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-08-04 10:23:03 +00:00
Watuneni iteiteandWeblate 0c5dcb26f6 Translated using Weblate (Japanese)
Currently translated at 79.8% (7084 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-08-04 10:23:02 +00:00
Watuneni iteiteandWeblate b88634691b Translated using Weblate (Japanese)
Currently translated at 79.8% (7082 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-08-04 08:28:46 +00:00
Watuneni iteiteandWeblate df9dcdd622 Translated using Weblate (Japanese)
Currently translated at 79.7% (7070 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-08-04 07:51:11 +00:00
Watuneni iteiteandWeblate 15943fae47 Translated using Weblate (Japanese)
Currently translated at 79.6% (7069 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-08-04 07:50:58 +00:00
Watuneni iteiteandWeblate 78a71ba252 Translated using Weblate (Japanese)
Currently translated at 79.6% (7064 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-08-04 07:46:32 +00:00
Watuneni iteiteandWeblate 7f1acd16b5 Translated using Weblate (Japanese)
Currently translated at 79.5% (7060 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-08-04 07:43:04 +00:00
Watuneni iteiteandWeblate be038d2348 Translated using Weblate (Japanese)
Currently translated at 78.9% (7004 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-08-04 06:54:08 +00:00
阿鱼andWeblate b3b11012f4 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.5% (8832 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-08-04 03:55:56 +00:00
Watuneni iteiteandWeblate 095c466b89 Translated using Weblate (Japanese)
Currently translated at 78.8% (6992 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-08-03 19:29:01 +00:00
Watuneni iteiteandWeblate 4c3cd6fdc4 Translated using Weblate (Japanese)
Currently translated at 78.2% (6943 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-08-03 17:05:25 +00:00
Watuneni iteiteandWeblate 2379b22135 Translated using Weblate (Japanese)
Currently translated at 77.7% (6893 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-08-03 16:18:02 +00:00
Watuneni iteiteandWeblate f36fa861da Translated using Weblate (Japanese)
Currently translated at 77.5% (6876 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-08-03 16:12:31 +00:00
Watuneni iteiteandWeblate 3b4f9d0fba Translated using Weblate (Japanese)
Currently translated at 77.0% (6838 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-08-03 15:47:39 +00:00
Watuneni iteiteandWeblate 42dabbf16a Translated using Weblate (Japanese)
Currently translated at 75.6% (6714 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-08-03 14:46:18 +00:00
Watuneni iteiteandWeblate 07abff7583 Translated using Weblate (Japanese)
Currently translated at 75.1% (6665 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-08-03 13:05:07 +00:00
Nico MerenqandWeblate dbd9bfacc5 Translated using Weblate (Russian)
Currently translated at 50.5% (4486 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-08-03 11:59:16 +00:00
Nico MerenqandWeblate 6ed1ea0cad Translated using Weblate (Russian)
Currently translated at 50.5% (4486 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-08-03 11:33:17 +00:00
YasitoandWeblate 5384fec57e Translated using Weblate (French)
Currently translated at 100.0% (8870 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-08-03 04:33:05 +00:00
YasitoandWeblate 1868bcf4d7 Translated using Weblate (French (Canada))
Currently translated at 100.0% (8870 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-08-03 04:33:04 +00:00
YasitoandWeblate 42059b9931 Translated using Weblate (French)
Currently translated at 100.0% (8870 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-08-03 04:02:52 +00:00
YasitoandWeblate 24890225a2 Translated using Weblate (French (Canada))
Currently translated at 100.0% (8870 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-08-03 04:02:52 +00:00
YasitoandWeblate e4e32769dc Translated using Weblate (French)
Currently translated at 100.0% (8870 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-08-03 03:50:45 +00:00
YasitoandWeblate 3420422a4b Translated using Weblate (French (Canada))
Currently translated at 100.0% (8870 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-08-03 03:50:44 +00:00
YasitoandWeblate 18564baec7 Translated using Weblate (French)
Currently translated at 100.0% (8870 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-08-03 03:43:40 +00:00
YasitoandWeblate b0c6d83913 Translated using Weblate (French (Canada))
Currently translated at 100.0% (8870 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-08-03 03:43:39 +00:00
YasitoandWeblate 5016b2b227 Translated using Weblate (French)
Currently translated at 99.8% (8860 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-08-03 03:38:25 +00:00
YasitoandWeblate 4727321d47 Translated using Weblate (French)
Currently translated at 99.8% (8857 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-08-03 03:37:46 +00:00
YasitoandWeblate 6e96e92d33 Translated using Weblate (French (Canada))
Currently translated at 100.0% (8870 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-08-03 03:37:45 +00:00
YasitoandWeblate a8c92ce641 Translated using Weblate (French)
Currently translated at 99.8% (8854 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-08-03 03:32:47 +00:00
YasitoandWeblate 032d2e5c95 Translated using Weblate (French (Canada))
Currently translated at 100.0% (8870 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-08-03 03:32:46 +00:00
YasitoandWeblate ec9d7d9dae Translated using Weblate (French)
Currently translated at 99.8% (8853 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-08-03 03:26:48 +00:00
YasitoandWeblate 217dab4dea Translated using Weblate (French (Canada))
Currently translated at 100.0% (8870 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-08-03 03:26:47 +00:00
YasitoandWeblate 452a92daa9 Translated using Weblate (French (Canada))
Currently translated at 99.9% (8862 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-08-03 03:12:08 +00:00
YasitoandWeblate fb364deff9 Translated using Weblate (French)
Currently translated at 99.5% (8831 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-08-03 03:06:55 +00:00
YasitoandWeblate ac824ce39c Translated using Weblate (French (Canada))
Currently translated at 99.8% (8859 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-08-03 03:06:54 +00:00
Nico MerenqandWeblate fa74a1c45a Translated using Weblate (Russian)
Currently translated at 50.5% (4480 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-08-02 13:19:58 +00:00
Nico MerenqandWeblate 1cce1d1a44 Translated using Weblate (Russian)
Currently translated at 50.1% (4451 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-08-02 12:39:24 +00:00
YasitoandWeblate b7f537e34c Translated using Weblate (French)
Currently translated at 99.5% (8830 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-07-31 04:25:44 +00:00
YasitoandWeblate 0311a8a4ef Translated using Weblate (French (Canada))
Currently translated at 99.5% (8830 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-07-31 04:25:43 +00:00
YasitoandWeblate 14ecc13cb3 Translated using Weblate (French)
Currently translated at 99.5% (8830 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-07-31 03:53:38 +00:00
YasitoandWeblate 5baca56d6d Translated using Weblate (French (Canada))
Currently translated at 99.5% (8830 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-07-31 03:53:37 +00:00
YasitoandWeblate 91c9692db1 Translated using Weblate (French)
Currently translated at 99.5% (8830 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-07-31 03:52:50 +00:00
YasitoandWeblate bb7b1a8dee Translated using Weblate (French (Canada))
Currently translated at 99.5% (8830 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-07-31 03:52:49 +00:00
YasitoandWeblate e6322e5fb7 Translated using Weblate (French)
Currently translated at 99.1% (8798 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-07-31 03:42:06 +00:00
YasitoandWeblate 3c5f04b52a Translated using Weblate (French (Canada))
Currently translated at 99.4% (8825 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-07-31 03:42:05 +00:00
YasitoandWeblate 5d78a5b573 Translated using Weblate (French)
Currently translated at 99.1% (8796 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-07-31 03:39:37 +00:00
YasitoandWeblate 4f58615065 Translated using Weblate (French (Canada))
Currently translated at 99.4% (8823 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-07-31 03:39:36 +00:00
YasitoandWeblate 32a4161a69 Translated using Weblate (French)
Currently translated at 99.1% (8793 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-07-30 16:09:48 +00:00
YasitoandWeblate c5708145cd Translated using Weblate (French (Canada))
Currently translated at 99.1% (8793 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-07-30 16:09:47 +00:00
KakunoandWeblate 118f207adb Translated using Weblate (French)
Currently translated at 98.7% (8762 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-07-30 03:59:57 +00:00
YasitoandWeblate a5826028b3 Translated using Weblate (French)
Currently translated at 98.7% (8762 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-07-30 03:59:57 +00:00
YasitoandWeblate fa3f6053c3 Translated using Weblate (French (Canada))
Currently translated at 98.7% (8762 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-07-30 03:59:56 +00:00
KakunoandWeblate bc60fe58b1 Translated using Weblate (French)
Currently translated at 98.7% (8756 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-07-30 03:51:13 +00:00
YasitoandWeblate f9a5e9a9e4 Translated using Weblate (French)
Currently translated at 98.7% (8756 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-07-30 03:51:13 +00:00
YasitoandWeblate 6f6ee6f160 Translated using Weblate (French (Canada))
Currently translated at 98.7% (8755 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-07-30 03:51:12 +00:00
KakunoandWeblate 8a3dbd5e4a Translated using Weblate (French)
Currently translated at 98.6% (8754 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-07-30 03:48:18 +00:00
YasitoandWeblate e052ad2281 Translated using Weblate (French)
Currently translated at 98.6% (8754 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-07-30 03:48:17 +00:00
YasitoandWeblate 8938ea13a4 Translated using Weblate (French (Canada))
Currently translated at 98.6% (8753 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-07-30 03:48:17 +00:00
YasitoandWeblate 907aed4c63 Translated using Weblate (French)
Currently translated at 98.6% (8752 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-07-30 03:45:17 +00:00
KakunoandWeblate 60798aae03 Translated using Weblate (French)
Currently translated at 98.6% (8752 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-07-30 03:45:16 +00:00
YasitoandWeblate 6f09957fbf Translated using Weblate (French (Canada))
Currently translated at 98.6% (8751 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-07-30 03:45:16 +00:00
KakunoandWeblate 6fc2344473 Translated using Weblate (French)
Currently translated at 98.5% (8741 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-07-30 03:38:53 +00:00
YasitoandWeblate c82059ae72 Translated using Weblate (French)
Currently translated at 98.5% (8741 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-07-30 03:38:53 +00:00
YasitoandWeblate a080db690f Translated using Weblate (French (Canada))
Currently translated at 98.5% (8740 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-07-30 03:38:53 +00:00
KakunoandWeblate d82849ddd3 Translated using Weblate (French)
Currently translated at 98.5% (8740 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-07-30 03:36:11 +00:00
YasitoandWeblate 71a3fe6e48 Translated using Weblate (French)
Currently translated at 98.5% (8740 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-07-30 03:36:11 +00:00
YasitoandWeblate 5e934ac7a6 Translated using Weblate (French (Canada))
Currently translated at 98.5% (8739 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-07-30 03:36:10 +00:00
Natchakot ChuchokjatupornandWeblate 6aa5bde424 Translated using Weblate (Thai)
Currently translated at 54.3% (4818 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/th/
2025-07-30 03:22:26 +00:00
KakunoandWeblate fee7488090 Translated using Weblate (French)
Currently translated at 98.3% (8726 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-07-30 03:22:25 +00:00
YasitoandWeblate f5e5e3411e Translated using Weblate (French (Canada))
Currently translated at 98.3% (8725 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-07-30 03:22:24 +00:00
Natchakot ChuchokjatupornandWeblate 818f9365ec Translated using Weblate (Thai)
Currently translated at 52.6% (4669 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/th/
2025-07-29 03:34:54 +00:00
KakunoandWeblate f81db9df3d Translated using Weblate (French)
Currently translated at 98.3% (8722 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-07-29 03:34:52 +00:00
YasitoandWeblate 8162e3a30d Translated using Weblate (French)
Currently translated at 98.3% (8722 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-07-29 03:34:52 +00:00
YasitoandWeblate 5a00bbf02d Translated using Weblate (French (Canada))
Currently translated at 98.3% (8722 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-07-29 03:34:50 +00:00
Natchakot ChuchokjatupornandWeblate ff7fff52ec Translated using Weblate (Thai)
Currently translated at 52.0% (4620 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/th/
2025-07-29 03:23:48 +00:00
KakunoandWeblate 087fab4065 Translated using Weblate (French)
Currently translated at 98.2% (8719 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-07-29 03:23:48 +00:00
YasitoandWeblate bed2897950 Translated using Weblate (French)
Currently translated at 98.2% (8719 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-07-29 03:23:47 +00:00
YasitoandWeblate d51f0711b7 Translated using Weblate (French (Canada))
Currently translated at 98.2% (8719 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-07-29 03:23:46 +00:00
Felipe Bermudes OrmeñoandWeblate 728860332d Translated using Weblate (Spanish (Mexico))
Currently translated at 26.9% (2390 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/es_MX/
2025-07-29 03:23:45 +00:00
Felipe Bermudes OrmeñoandWeblate fe0ca14b3b Translated using Weblate (Spanish (Mexico))
Currently translated at 26.2% (2330 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/es_MX/
2025-07-28 23:07:55 +00:00
YasitoandWeblate 7e57c3c862 Translated using Weblate (French)
Currently translated at 96.7% (8586 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-07-28 17:41:18 +00:00
YasitoandWeblate 0f4fdfcedd Translated using Weblate (French (Canada))
Currently translated at 96.7% (8586 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-07-28 17:41:17 +00:00
Felipe Bermudes OrmeñoandWeblate 1cb77f35b5 Translated using Weblate (Spanish (Mexico))
Currently translated at 25.3% (2247 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/es_MX/
2025-07-28 17:41:16 +00:00
阿鱼andWeblate 9ac23be59b Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.5% (8832 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-07-28 01:58:42 +00:00
KakunoandWeblate e469409a22 Translated using Weblate (French)
Currently translated at 96.6% (8572 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-07-28 01:58:41 +00:00
YasitoandWeblate 28db8e98d7 Translated using Weblate (French)
Currently translated at 96.6% (8572 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-07-28 01:58:41 +00:00
YasitoandWeblate 08bf3d4f8f Translated using Weblate (French (Canada))
Currently translated at 96.6% (8572 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-07-28 01:58:39 +00:00
Felipe Bermudes OrmeñoandWeblate 88380bfb76 Translated using Weblate (Spanish (Mexico))
Currently translated at 25.2% (2240 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/es_MX/
2025-07-28 01:58:38 +00:00
KakunoandWeblate 83d7cbbefa Translated using Weblate (French)
Currently translated at 96.0% (8524 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-07-27 23:23:04 +00:00
YasitoandWeblate 426d7c8e5e Translated using Weblate (French)
Currently translated at 96.0% (8524 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-07-27 23:23:04 +00:00
YasitoandWeblate 602d88db5e Translated using Weblate (French (Canada))
Currently translated at 95.8% (8506 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-07-27 23:23:03 +00:00
Felipe Bermudes OrmeñoandWeblate 751d3be872 Translated using Weblate (Spanish (Mexico))
Currently translated at 25.0% (2220 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/es_MX/
2025-07-27 23:23:00 +00:00
KakunoandWeblate 358a62d5b1 Translated using Weblate (French)
Currently translated at 96.0% (8521 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-07-27 22:45:12 +00:00
YasitoandWeblate 409814823b Translated using Weblate (French (Canada))
Currently translated at 95.7% (8490 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-07-27 22:45:11 +00:00
KakunoandWeblate 5d8f45b058 Translated using Weblate (French)
Currently translated at 96.0% (8520 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-07-27 22:42:03 +00:00
YasitoandWeblate 3001e8bf84 Translated using Weblate (French (Canada))
Currently translated at 95.6% (8488 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-07-27 22:42:02 +00:00
阿鱼andWeblate 80de268987 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.5% (8832 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-07-27 22:40:38 +00:00
KakunoandWeblate b08004b6c6 Translated using Weblate (French)
Currently translated at 96.0% (8519 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-07-27 22:40:37 +00:00
YasitoandWeblate 2783a52495 Translated using Weblate (French)
Currently translated at 96.0% (8519 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-07-27 22:40:36 +00:00
YasitoandWeblate 3ae3f0db95 Translated using Weblate (French (Canada))
Currently translated at 95.6% (8486 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-07-27 22:40:35 +00:00
阿鱼andWeblate a15f026739 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.5% (8832 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-07-27 18:38:05 +00:00
阿鱼andWeblate bc8ed8bb38 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 98.9% (8776 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-07-27 16:54:12 +00:00
阿鱼andWeblate efa246272b Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 98.7% (8758 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-07-27 05:55:51 +00:00
阿鱼andWeblate e29d84a71a Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 97.1% (8617 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-07-26 18:52:35 +00:00
阿鱼andWeblate 6c671b5e08 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 96.9% (8598 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-07-25 22:35:43 +00:00
Weblate 3ffd9ecc28 Update translation files
Updated by "Remove blank strings" add-on in Weblate.

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/
2025-07-25 07:41:41 +00:00
阿鱼andWeblate 281131f5b3 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 96.3% (8543 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-07-25 07:41:37 +00:00
Nico MerenqandWeblate 3c67cd2a59 Translated using Weblate (Russian)
Currently translated at 49.7% (4411 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-07-25 07:41:36 +00:00
阿鱼andWeblate 74f5c69bb5 Translated using Weblate (French)
Currently translated at 95.9% (8513 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-07-25 07:41:35 +00:00
TeggyandWeblate 8f82e1d960 Translated using Weblate (Spanish)
Currently translated at 85.3% (7567 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/es/
2025-07-25 07:41:34 +00:00
Nico MerenqandWeblate c5497cfb2b Translated using Weblate (Russian)
Currently translated at 49.6% (4406 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-07-22 22:10:58 +00:00
Nico MerenqandWeblate 94b6b3b948 Translated using Weblate (Russian)
Currently translated at 49.6% (4405 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-07-22 21:58:42 +00:00
KakunoandWeblate 8855c5ad7f Translated using Weblate (French)
Currently translated at 95.9% (8513 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-07-22 15:14:45 +00:00
Alexis SalgueiroandWeblate 5015a0a56c Translated using Weblate (French)
Currently translated at 95.9% (8513 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-07-22 15:14:44 +00:00
KakunoandWeblate ec51fc0701 Translated using Weblate (French)
Currently translated at 95.9% (8512 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-07-22 14:33:22 +00:00
Alexis SalgueiroandWeblate 13287e6f76 Translated using Weblate (French)
Currently translated at 95.9% (8512 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-07-22 14:33:22 +00:00
KakunoandWeblate a65dfcd3cd Translated using Weblate (French)
Currently translated at 95.9% (8509 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-07-22 14:28:56 +00:00
KakunoandWeblate 18183dd649 Translated using Weblate (French)
Currently translated at 95.9% (8508 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-07-22 14:26:11 +00:00
Alexis SalgueiroandWeblate 40c1f074bb Translated using Weblate (French)
Currently translated at 95.9% (8508 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-07-22 14:26:10 +00:00
KakunoandWeblate 5d1219e467 Translated using Weblate (French)
Currently translated at 95.6% (8482 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-07-22 14:18:30 +00:00
KakunoandWeblate 568773f1a8 Translated using Weblate (French)
Currently translated at 95.6% (8481 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-07-22 14:18:08 +00:00
Alexis SalgueiroandWeblate f0c3cde213 Translated using Weblate (French)
Currently translated at 95.6% (8481 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-07-22 14:18:08 +00:00
Tobias (Targ)andWeblate def5d09903 Translated using Weblate (German)
Currently translated at 58.8% (5218 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/de/
2025-07-18 13:37:42 +00:00
Watuneni iteiteandWeblate ad5e2ddc41 Translated using Weblate (Japanese)
Currently translated at 75.0% (6661 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-07-16 08:59:20 +00:00
TeggyandWeblate 2d2f92c7a7 Translated using Weblate (Spanish)
Currently translated at 84.2% (7470 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/es/
2025-07-15 18:19:05 +00:00
Watuneni iteiteandWeblate 2bd4d1fb08 Translated using Weblate (Japanese)
Currently translated at 74.0% (6565 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-07-13 18:01:49 +00:00
TeggyandWeblate 4c342c2047 Translated using Weblate (Spanish)
Currently translated at 83.1% (7373 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/es/
2025-07-13 18:01:48 +00:00
Watuneni iteiteandWeblate 24cee748d5 Translated using Weblate (Japanese)
Currently translated at 73.8% (6548 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-07-10 18:47:55 +00:00
TeggyandWeblate fbec6f03e7 Translated using Weblate (Spanish)
Currently translated at 81.1% (7199 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/es/
2025-07-10 18:47:52 +00:00
TeggyandWeblate 8ab0288ab2 Translated using Weblate (Spanish)
Currently translated at 79.7% (7072 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/es/
2025-07-10 06:04:53 +00:00
Nico MerenqandWeblate cc426a5ca9 Translated using Weblate (Russian)
Currently translated at 49.6% (4403 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-07-08 22:17:00 +00:00
TeggyandWeblate e4f04b605a Translated using Weblate (Spanish)
Currently translated at 79.1% (7025 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/es/
2025-07-08 22:16:58 +00:00
TeggyandWeblate 48441b1232 Translated using Weblate (Spanish)
Currently translated at 76.0% (6748 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/es/
2025-07-06 09:38:57 +00:00
Watuneni iteiteandWeblate 589d3614b8 Translated using Weblate (Japanese)
Currently translated at 68.7% (6099 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-07-05 04:12:04 +00:00
TeggyandWeblate fe386095de Translated using Weblate (Spanish)
Currently translated at 75.3% (6687 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/es/
2025-07-04 22:04:28 +00:00
Watuneni iteiteandWeblate 5640177c99 Translated using Weblate (Japanese)
Currently translated at 68.7% (6097 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-07-04 11:45:00 +00:00
Zack the GhastandWeblate ff8c8b1bfa Translated using Weblate (Portuguese (Portugal))
Currently translated at 67.3% (5973 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/pt_PT/
2025-07-04 05:53:12 +00:00
Watuneni iteiteandWeblate 4bccd9b5aa Translated using Weblate (Japanese)
Currently translated at 64.2% (5702 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-07-04 05:53:11 +00:00
阿鱼andWeblate 8c1c5ac957 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 95.8% (8498 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-07-03 05:30:56 +00:00
Watuneni iteiteandWeblate a20ec4d1c5 Translated using Weblate (Japanese)
Currently translated at 64.1% (5694 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-07-03 05:30:55 +00:00
TeggyandWeblate 12b4e58dea Translated using Weblate (Spanish)
Currently translated at 75.1% (6669 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/es/
2025-07-03 05:30:53 +00:00
JazzMcNade be8dfd7fa2 Utilize setPositionSafely in breakFree() 2025-07-01 22:04:20 -05:00
Zack the GhastandWeblate 940ec82182 Translated using Weblate (Portuguese (Portugal))
Currently translated at 67.1% (5952 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/pt_PT/
2025-07-02 02:26:55 +00:00
KyoandWeblate 67c01ce5f2 Translated using Weblate (Vietnamese)
Currently translated at 65.8% (5842 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/vi/
2025-07-01 12:38:56 +00:00
washashu0905andWeblate e603325eef Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 94.6% (8398 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hant/
2025-07-01 12:38:54 +00:00
阿鱼andWeblate afd09e93eb Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 95.7% (8497 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-07-01 12:38:53 +00:00
Zack the GhastandWeblate 92775a4b8a Translated using Weblate (Portuguese (Portugal))
Currently translated at 66.2% (5877 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/pt_PT/
2025-07-01 12:38:52 +00:00
Watuneni iteiteandWeblate 6a2668171e Translated using Weblate (Japanese)
Currently translated at 63.2% (5607 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-07-01 12:38:50 +00:00
TeggyandWeblate 5b7dc9f8f4 Translated using Weblate (Spanish)
Currently translated at 74.2% (6583 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/es/
2025-07-01 12:38:47 +00:00
washashu0905andWeblate 75dc76020f Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 92.5% (8209 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hant/
2025-06-29 06:11:55 +00:00
阿鱼andWeblate 56289ce5bf Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 95.7% (8496 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-06-29 06:11:53 +00:00
Zack the GhastandWeblate e4ec7b0ae7 Translated using Weblate (Portuguese (Portugal))
Currently translated at 60.7% (5387 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/pt_PT/
2025-06-29 06:11:52 +00:00
Anonymous f38ef0b6b9 Translated using Weblate (Vietnamese)
Currently translated at 63.0% (5592 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/vi/
2025-06-29 01:50:06 +00:00
阿鱼andWeblate d5bb3e2d97 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 95.3% (8458 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-06-29 01:50:04 +00:00
Zack the GhastandWeblate 66f6555711 Translated using Weblate (Portuguese (Portugal))
Currently translated at 60.4% (5362 of 8870 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/pt_PT/
2025-06-29 01:50:00 +00:00
Zack the GhastandWeblate 472ca9c748 Translated using Weblate (Portuguese (Portugal))
Currently translated at 63.4% (5398 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/pt_PT/
2025-06-29 00:30:29 +00:00
阿鱼andWeblate 054e4dffdc Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 98.2% (8358 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-06-29 00:30:29 +00:00
Paul be5ee8a6a3 Potentially got root bone animation working for players on pokes 2025-05-16 22:22:05 +10:00
4672 changed files with 380595 additions and 73556 deletions
+2 -1
View File
@@ -12,7 +12,8 @@ out
*.ipr
*.iws
*.iml
.idea
.idea/*
!.idea/icon.png
# gradle
build
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

+3
View File
@@ -15,6 +15,9 @@
- baseScale in NPCs has been removed from classes and presets, and in the entity it is replaced with hitboxScale and renderScale.
- Added `EntityCallbacks` to `NPCEntity` and `PokemonEntity`. You can trigger custom callback types by using `[Entity].callbacks.process(...)`
### Fixes
- Fixed Pokémon with a moving walk target frequently spinning in place as they re-calculate their path.
### MoLang & Datapacks
- Added a `behaviours` datapack folder which motivates the Behaviour Editor screen on NPCs and Pokémon.
- Added "callback" support on PokemonEntity and NPCEntity that allows MoLang scripts to be executed in response to certain scenarios.
+1
View File
@@ -22,6 +22,7 @@
### Changes
- Slots in pastures will now have darker backgrounds and italicised Pokémon names if the Pokémon is not owned by the player.
- The pasture slot will show the name of the Pokémon owner when hovered if the Pokémon is not owned.
- Increased the default PC box count from 30 to 40 to accommodate the fact that we have way more Pokémon now. If you've changed this config option then you'll need to edit it again after starting up with 1.7!
### Developer
- Added `RenamePCBoxEvent.Pre` and `RenamePCBoxEvent.Post` events to prevent players from renaming a box or changing their input.
+10 -1
View File
@@ -4,6 +4,7 @@
### Fixes
- Fixed the "enabled" property in spawn files not actually being respected. Where do they find these devs?
- Fixed Terralith's shrubland not counting as plains for spawning purposes the way it was intended to.
### Developer
- Spawning Influences now have the context of what the other buckets are when adjusting bucket weights. This will break existing influences that do bucket weight adjustment.
@@ -11,6 +12,14 @@
- SpawningContext is now SpawnablePosition
- WorldSlice is SpawningZone
- SpawningProspector is now SpawningZoneGenerator
- Majorly refactored the hierarchy of Spawner
- The base Spawner interface provides more functions to allow single-point and area spawning given appropriate inputs.
- TickingSpawner is removed in favour of outside code handling ticking logic.
- AreaSpawner is removed.
- BasicSpawner is the first implementation of Spawner which can be used for any purpose.
- PlayerSpawners are now mixin'd into ServerPlayer and ticked from ServerPlayer#tick.
- A hierarchy diagram can be found at `./docs/spawner-hierarchy.png` in the mod repository.
- The SpawnerManager class has been removed as its functionality is all now handled elsewhere.
- Renamed things in Spawn Rules to go with the other renames:
- contextSelector is now spawnablePositionSelector
- contextSelector is now spawnablePositionSelector
- context is now spawnable_position
+245 -4
View File
@@ -2,6 +2,7 @@
## [1.7.0 (Month xth, 2025)](#1-7-0)
### Additions
- Added `/npcdelete` uuid parameter support and usuable to console
- Added `/spectateBattle <player>` command to spectate battles without having to manually walk up to the target.
- Added an in-game configuration screen, allowing all settings from `main.json` to be edited directly in-game.
- Added `/cobblemonconfig reload` command to reload `main.json` configuration. **Note:** Some settings require a server restart to take effect; use this command cautiously.
@@ -33,10 +34,11 @@
- 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
- Pokémon with the ability Volt Absorb are immune to lightning damage and receive Regeneration II for a short duration
- Pokémon with the ability Volt Absorb are immune to lightning damage and receive Instant Health II for a short duration
- Ground type Pokémon are immune to lightning damage
- Added functionality to Everstone when held by a Pokémon; suppresses evolution notification and hides evolve button in summary interface.
- Added optional `filePath` parameter to MoLang functions to allow for global stores (ex. `../global/`). Path must end in a forward slash.
@@ -47,11 +49,19 @@
- Berries can now be smelted into their respective dyes.
- Added Syrupy Apples.
- Added `/runmolang <molang> [<npc>|<player>|<pokemon>]` command that executes a MoLang expression with the provided options as environment variables, as well as the entity (as `q.entity`) that executed the command.
- Added new 69th berry, Eggant.
- Added bubble quirk to Kingler; like Krabby, Kingler will blows bubbles during dusk.
- Added `.Pre` and `.Post` to the following events:
- `PokemonRecallEvent`
- `TradeEvent`
- Added a new gamerule, 'healerHealsPC', when set to true a successful use of a healer will also heal all of the Pokemon in that player's PC.
- Mooshtanks will switch between their red and brown variant when hit by lightning
- Smeargle spawns with differing tail colour depending on its [Characteristic](https://bulbapedia.bulbagarden.net/wiki/Characteristic) stat
- Added smooth level-up animations to the party overlay to replace chat messages.
- Added `min_perfect_ivs` property to PokemonProperties to specify the minimum number of perfect IVs of the Pokemon.
- Added `defaultKeyItems` config option to specify which key items players always have.
- Added `scale_modifier` property to PokemonProperties to modify the scale of the Pokemon.
- Added Tasty Tail which you can get from Slowpokes if you happen to have a pair of shears. They don't mind, we asked.
### Pokémon Added
@@ -83,6 +93,8 @@
- Altaria
- Snorunt
- Glalie
- Shuppet
- Banette
- Latias
- Latios
@@ -131,6 +143,11 @@
- Swadloon
- Leavanny
- Druddigon
- Minccino
- Cinccino
- Vanillite
- Vanillish
- Vanilluxe
#### Gen 6
- Skiddo
@@ -143,6 +160,8 @@
- Dedenne
- Noibat
- Noivern
- Furfrou
- You can change Furfrou's form by using shears on it while it holds a certain dye in its cosmetic slot.
#### Gen 7
- Yungoos
@@ -277,6 +296,36 @@
- Parasect
- Bastiodon
- Amaura
- Varoom
- Revavroom
- Bouffalant
- Lickilicky
- Blaziken
- Rhyhorn
- Rhydon
- Rhyperior
- Tauros
- Tauros - Paldea Aqua
- Tauros - Paldea Blaze
- Tauros - Paldea Combat
- Dewgong
- Corphish (updated placeholders for crustaceous tripod gait legs)
- Crawdaunt (updated placeholders for crustaceous bipedal legs)
- Dragapult
- Camerupt
- Relicanth
- Heracross
- Salamence
- Staraptor
- Dusknoir
- Arcanine
- Carvanha
- Sharpedo
- Mimikyu
- Dewgong
- Mime Jr
- Gyarados
- Lapras
### Model updates for the following Pokémon
- Cleffa
@@ -304,6 +353,8 @@
- Nosepass
- Probopass
- Kangaskhan
- Scorbunny
- Raboot
- Cinderace
- Magnemite
- Magneton
@@ -383,6 +434,25 @@
- Starly
- Staravia
- Staraptor
- Varoom
- Revavroom
- Nickit
- Thievul
- Litwick
- Lampent
- Chandelure
- Rayquaza
- Aerodactyl
- Basculin
- Basculegion
- Shroodle
- Grafaiai
- Steelix
- Dratini
- Dragonair
- Dragonite
- Cutiefly
- Ribombee
### Changes
- Changed pokemon caught and seen count to update based on the current pokedex being looked
@@ -396,14 +466,15 @@
- 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.
- When using the `cobblemon` or `generation_9` capture calculators a critical capture with a single shake will always play for successful captures when you've already registered the Pokémon as caught in your Pokédex.
- Improved the performance of saving Pokédex and player data.
- Pokémon hitbox now scales with entity attribute `generic.scale`.
- Removed Shulker aspect and replaced it with cosmetic_item-shulker_shell.
- Shulker shell Forretress is now a cosmetic rather than a special evo and thus all shulker Forretress will revert back to normal until a shulker shell is put in their cosmetic slot.
- Removed Shulker shell Forretress.
- Updated `doPokemonSpawning` gamerule to support per-dimension configurations.
- The Pokedex now displays a form name of a "normal" Pokémon for when the base form is still a named form.
- Improved the zoom functionality of the Pokédex Scanner by giving the levels logarithmic scaling.
@@ -446,6 +517,11 @@
- Updated `EvolutionCompleteEvent` parameters to include the Source Pokemon that evolved.
- 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 AND Packed Up backpacks can no longer be held by Pokémon. Thanks Monocle ;) You could re-enable this with our datapack (but you'd be crazy).
- Moomoo Milk now clears Pokémon stat changes when used in battle.
- Updated Evolution Stone Block light levels
- Added light levels to Evolution Stone Ores. These levels are reduced versions of the full blocks light levels
### Fixes
- Fixed game crashing when removing national pokedex using datapacks
@@ -528,6 +604,16 @@
- Fixed Pokémon with alternate forms being created with an incorrect 'forced' tag on their ability.
- Fixed busted abilities and moves in Pokémon data due to removed datapacks etc. causing storage corruption. It now just rerolls their ability / uses Tackle.
- 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.
- The Corphish line will now sink in water.
- Fixed the "use all berry bait" achievement not being progressed
- Fixed bobber hook and berry sprouts texture sizes causing mipmap issues.
- Fixed head locator not taking into account scale for positioning.
- Fixed NPC pokémon not being linked to their NPC, which previously caused NPC pokémon to be catchable.
- Fixed an uncommon error caused by scanning a pokémon on a player's shoulder.
- Fixed a case where spawning could fail and log warnings when nothing wrong was happening.
### Developer
- A finished battle now has winners and losers set inside of `PokemonBattle` instead of them always being empty.
@@ -565,10 +651,35 @@
- Added a `hoverText` option to PartySelectCallback, to display a tooltip on hovering over a Pokémon in the selection screen.
- `PokemonEntity` instances spawned into the world now appropriately finalize the spawn for mod compatibility.
- Added PokedexManager.obtain as a replacement for .catch which is not a friendly function name in Java.
- Added `Pokemon#hyperTrainIV()` and `IVs#setHyperTrainedIV(Stat, Int)`
- `ElementalType` now implements `ShowdownIdentifiable` to ensure the communcation with showdown stays consistent (also in regards to TeraTypes)
- Pokemon no longer have a change observable
- Pokémon can now have a behaviour changing the value of a species feature on lightning hit:
```JSON
{
"behaviour": {
"lightningHit": {
"rotateFeatures": [
{
"key": "mooshtank",
"chain": ["red", "brown"]
}
]
}
}
}
```
This will change the value of `mooshtank` from `red` to `brown` and vice versa when a lightning strikes this Pokémon. Only chains of which a value is the current value will be considered, so multiple entries for the same key with different chains can be added.
- Removed Npc interface from NPCEntity, the interface is unused and in vanilla is only implemented by VillagerEntity as a means to disable villagers with the `spawn-npcs` server property.
- Added new `Observable#subscribe` methods that take Java Consumers to make usage in Java a little cleaner.
- Annotated a bunch of Kotlin methods and fields for cleaner Java names.
- Added `PartyStore#isEmpty()`.
- Added `ElementalTypes#getRandomType()`.
- Added `IVs#getEffectiveBattleTotal()`.
- Added `IVs.MAX_TOTAL` constant.
- Added `PokemonStats#total()`.
- Add `NatureAdapter` for serializing and deserializing Natures using Gson.
- Fixed `Species#create` using the species name instead of identifier, which had led to certain mismatches generating random pokémon.
### MoLang & Datapacks
- The following usages for item predicates can now use item conditions like advancements do, you can learn about them in the [Minecraft wiki](https://minecraft.wiki/w/Advancement_definition#minecraft:filled_bucket)
@@ -658,6 +769,135 @@
- Added `q.pokemon.is_busy` Returns whether the Pokémon is busy.
- Added `q.pokemon.is_rideable` Returns whether the Pokémon is rideable.
- Fixed `background` field and added `textColor` field for dialogues.
- Added support to reload some data registries:
- MoLang scripts
- Callbacks
- Spawn Detail Presets
- Spawn Pools
- Spawn Rules
- Cosmetic Items
- Dialogues
- Fossils
- Natural Materials
- Action Effects
- 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
- Added support for species-specific move action effects, using the format `{move_id}_{species}.json`.
- Added `look_at_entity_types` variable for look_at_entities to specify what entity type or entity tag to look at.
- Added `Looks At Players` behaviour preset that only sets the look target to players.
### Particles
Added new/updated particles for the following moves:
- Absorb
- Acid
- Acid Spray
- Aerial Ace
- Amnesia
- Aurora Beam
- Bite
- Body Slam
- Bubble
- Bubble Beam
- Bulldoze
- Bullet Punch
- Close Combat
- Confusion
- Crunch
- Cotton Guard
- Double Team
- Dragon Claw
- Egg Bomb
- Ember
- Eruption
- Explosion
- Fire Blast
- Fire Punch
- Fire Spin
- Flame Burst
- Flame Charge
- Flamethrower
- Flame Wheel
- Frost Breath
- Frustration
- Giga Drain
- Growl
- Haze
- Hidden Power
- Horn Attack
- Hyper Fang
- Hypnosis
- Ice Beam
- Ice Punch
- Ice Shard
- Icy Wind
- Infestation
- Kinesis
- Lava Plume
- Leech Life
- Leech Seed
- Leer
- Lick
- Magical Leaf
- Mega Drain
- Minimize
- Mist
- Mud Bomb
- MudSport
- Mystical Fire
- Nasty Plot
- Poison Fang
- Poison Gas
- Poison Powder
- Population Bomb
- Pound
- Powder
- Powder Snow
- Present
- Protect
- Psybeam
- Psychic
- Pursuit
- Quick Attack
- Rage Powder
- Razor Leaf
- Return
- Rock Throw
- Sand Attack
- Scary Face
- Scratch
- Seed Bomb
- Seismic Toss
- Self Destruct
- Shadow Ball
- Shadow Claw
- Sing
- Sleep Powder
- Sludge Bomb
- Smokescreen
- Spike
- Spore
- Stomp
- String Shot
- Stun Spore
- Super Fang
- Swords Dance
- Tackle
- Tail Whip
- Thunder
- Thunder Punch
- Thunderbolt
- Thunder Shock
- Thunder Wave
- Toxic
- Water Gun
- Water Pulse
- Water Sport
- Will-O-Wisp
- Withdraw
## [1.6.1 (January 26th, 2025)](#1-6-1)
@@ -844,6 +1084,7 @@
- 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.
+8 -1
View File
@@ -31,6 +31,7 @@ repositories {
maven(url = "${rootProject.projectDir}/deps")
maven(url = "https://api.modrinth.com/maven")
maven(url = "https://maven.neoforged.net/releases")
maven(url = "https://maven.gegy.dev")
mavenLocal()
}
@@ -44,6 +45,12 @@ dependencies {
modCompileOnly(libs.bundles.common.integrations.compileOnly) {
isTransitive = false
}
// LambDynamicLights is handled differently because we need the Mojang-mappings version of it.
modCompileOnly(libs.lambDynamicLights) {
capabilities {
requireCapability("dev.lambdaurora.lambdynamiclights:api-mojmap")
}
}
// Flywheel has no common dep so just pick one and don't use any platform specific code in common
// modCompileOnly(libs.flywheelFabric)
@@ -94,4 +101,4 @@ sourceSets {
}
}
}
}
}
@@ -0,0 +1,23 @@
/*
* 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;
import com.cobblemon.mod.common.api.spawning.spawner.PlayerSpawner;
/**
* Used for mixin shenanigans. ServerPlayers now store their Cobblemon spawner
* inside, so this interface helps execute that.
*
* @author Hiroku
* @since October 27th, 2025
*/
public interface PlayerSpawnerAccessor {
PlayerSpawner getPlayerSpawner();
void setPlayerSpawner(PlayerSpawner spawner);
}
@@ -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.compat;
import com.cobblemon.mod.common.CobblemonEntities;
import com.cobblemon.mod.common.client.render.layer.PokemonOnShoulderRenderer;
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity;
import com.cobblemon.mod.common.item.PokedexItem;
import com.cobblemon.mod.common.pokemon.FormData;
import com.cobblemon.mod.common.pokemon.lighthing.LightingData;
import dev.lambdaurora.lambdynlights.LambDynLights;
import dev.lambdaurora.lambdynlights.api.DynamicLightHandler;
import dev.lambdaurora.lambdynlights.api.DynamicLightHandlers;
import net.minecraft.core.BlockPos;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.item.ItemStack;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.Optional;
import net.minecraft.world.entity.player.Player;
// Java class due to relying on entrypoint on Fabric side
public class LambDynamicLightsCompat {
// This is all called on client side
// These things are checked every tick so try to keep it as free as possible
// That being said it's unlikely school Toshiba person is running dynamic lighting and shaders to enjoy this
// Make sure not to call anything Fabric specific :)
public static void hookCompat() {
// Pokémon entities
DynamicLightHandlers.registerDynamicLightHandler(
CobblemonEntities.POKEMON,
DynamicLightHandler.makeHandler(
LambDynamicLightsCompat::resolvedPokemonLightLevel,
pokemon -> false
)
);
// Shouldered Pokémon
DynamicLightHandlers.registerDynamicLightHandler(
EntityType.PLAYER,
DynamicLightHandler.makeHandler(
LambDynamicLightsCompat::resolvedPlayerLightLevel,
player -> false
)
);
}
private static int resolvedPokemonLightLevel(PokemonEntity pokemon) {
var underwater = !pokemon.level().getFluidState(BlockPos.containing(pokemon.getX(), pokemon.getEyeY(), pokemon.getZ())).isEmpty();
ItemStack item = pokemon.getShownItem();
int itemLightLevel = item.isEmpty()?0:LambDynLights.getLuminanceFromItemStack(item, underwater);
int formLightLevel = extractFormLightLevel(pokemon.getForm(), underwater).orElse(0);
return Math.max(itemLightLevel, formLightLevel);
}
private static int resolvedPlayerLightLevel(Player player) {
var underwater = !player.level().getFluidState(BlockPos.containing(player.getX(), player.getEyeY(), player.getZ())).isEmpty();
final int leftShoulderLightLevel = extractShoulderLightLevel(PokemonOnShoulderRenderer.shoulderDataFrom(player.getShoulderEntityLeft()), underwater);
final int rightShoulderLightLevel = extractShoulderLightLevel(PokemonOnShoulderRenderer.shoulderDataFrom(player.getShoulderEntityRight()), underwater);
final int itemLightLevel = customHeldItemLightLevel(player.getMainHandItem(), player.getOffhandItem());
return Math.max(itemLightLevel, Math.max(leftShoulderLightLevel, rightShoulderLightLevel));
}
private static Optional<Integer> extractFormLightLevel(@NotNull FormData form, boolean underwater) {
if (form.getLightingData() == null || !liquidGlowModeSupport(form.getLightingData().getLiquidGlowMode(), underwater)) {
return Optional.empty();
}
return Optional.of(form.getLightingData().getLightLevel());
}
private static int extractShoulderLightLevel(@Nullable PokemonOnShoulderRenderer.ShoulderData shoulderData, boolean underwater) {
if (shoulderData == null) {
return 0;
}
ItemStack item = shoulderData.getShownItem();
int itemLightLevel = item.isEmpty() ? 0 :LambDynLights.getLuminanceFromItemStack(item, underwater);
int formLightLevel = extractFormLightLevel(shoulderData.getForm(), underwater).orElse(0);
return Math.max(itemLightLevel, formLightLevel);
}
private static int customHeldItemLightLevel(ItemStack mainhand, ItemStack offhand) {
return (mainhand.getItem() instanceof PokedexItem || offhand.getItem() instanceof PokedexItem) ? 13 : 0;
}
private static boolean liquidGlowModeSupport(@NotNull LightingData.LiquidGlowMode liquidGlowMode, boolean underwater) {
return underwater ? liquidGlowMode.getGlowsUnderwater() : liquidGlowMode.getGlowsInLand();
}
}
@@ -0,0 +1,28 @@
/*
* Copyright (C) 2023 Cobblemon Contributors
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
package com.cobblemon.mod.common.compat.lambdynamiclights;
import com.cobblemon.mod.common.pokemon.FormData;
import com.cobblemon.mod.common.pokemon.lighthing.LightingData;
import org.jetbrains.annotations.NotNull;
import java.util.Optional;
public abstract class CustomLuminance {
protected static Optional<Integer> extractFormLightLevel(@NotNull FormData form, boolean underwater) {
if (form.getLightingData() == null || !liquidGlowModeSupport(form.getLightingData().getLiquidGlowMode(), underwater)) {
return Optional.empty();
}
return Optional.of(form.getLightingData().getLightLevel());
}
protected static boolean liquidGlowModeSupport(@NotNull LightingData.LiquidGlowMode liquidGlowMode, boolean underwater) {
return underwater ? liquidGlowMode.getGlowsUnderwater() : liquidGlowMode.getGlowsInLand();
}
}
@@ -0,0 +1,42 @@
/*
* 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.compat.lambdynamiclights;
import com.cobblemon.mod.common.Cobblemon;
import dev.lambdaurora.lambdynlights.api.DynamicLightsContext;
import dev.lambdaurora.lambdynlights.api.DynamicLightsInitializer;
import dev.lambdaurora.lambdynlights.api.entity.luminance.EntityLuminance;
import dev.lambdaurora.lambdynlights.api.item.ItemLightSourceManager;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.entity.EntityType;
public class LambDynamicLightsInitializer implements DynamicLightsInitializer {
public static final EntityLuminance.Type POKEMON_LUMINANCE = EntityLuminance.Type.registerSimple(
ResourceLocation.fromNamespaceAndPath(Cobblemon.MODID, "pokemon"),
PokemonLuminance.INSTANCE
);
public static final EntityLuminance.Type PLAYER_LUMINANCE = EntityLuminance.Type.registerSimple(
ResourceLocation.fromNamespaceAndPath(Cobblemon.MODID, "shoulder"),
PlayerLuminance.INSTANCE
);
@Override
public void onInitializeDynamicLights(DynamicLightsContext context) {
Cobblemon.LOGGER.info("Lamb Dynamic Lights compatibility enabled");
context.entityLightSourceManager().onRegisterEvent().register(ctx -> {
ctx.register(EntityType.PLAYER, PlayerLuminance.INSTANCE);
});
}
@SuppressWarnings({"removal", "UnstableApiUsage"})
@Override
public void onInitializeDynamicLights(ItemLightSourceManager itemLightSourceManager) {}
}
@@ -0,0 +1,72 @@
/*
* 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.compat.lambdynamiclights;
import com.cobblemon.mod.common.Cobblemon;
import com.cobblemon.mod.common.client.render.layer.PokemonOnShoulderRenderer;
import dev.lambdaurora.lambdynlights.api.entity.luminance.EntityLuminance;
import dev.lambdaurora.lambdynlights.api.item.ItemLightSourceManager;
import net.minecraft.core.registries.Registries;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.tags.TagKey;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.annotations.Range;
public final class PlayerLuminance extends CustomLuminance implements EntityLuminance {
public static final PlayerLuminance INSTANCE = new PlayerLuminance();
private static final TagKey<Item> POKEDEX = TagKey.create(Registries.ITEM, ResourceLocation.fromNamespaceAndPath(Cobblemon.MODID, "pokedex"));
@Override
public @NotNull Type type() {
return LambDynamicLightsInitializer.PLAYER_LUMINANCE;
}
@Override
public @Range(from = 0L, to = 15L) int getLuminance(@NotNull ItemLightSourceManager itemLightSourceManager, @NotNull Entity entity) {
if (entity instanceof Player player) {
final int shoulderLightLevel = shoulderLuminance(itemLightSourceManager, player);
final int itemLightLevel = player.isHolding(stack -> stack.is(POKEDEX)) ? 13 : 0;
return Math.max(shoulderLightLevel, itemLightLevel);
} else {
return 0;
}
}
private @Range(from = 0L, to = 15L) static int shoulderLuminance(@NotNull ItemLightSourceManager itemLightSourceManager, @NotNull Player player) {
final var leftShoulder = PokemonOnShoulderRenderer.shoulderDataFrom(player.getShoulderEntityLeft());
final var rightShoulder = PokemonOnShoulderRenderer.shoulderDataFrom(player.getShoulderEntityRight());
if (leftShoulder == null && rightShoulder == null) {
return 0;
}
final int leftShoulderLightLevel = extractShoulderLightLevel(leftShoulder, itemLightSourceManager, player.isUnderWater());
final int rightShoulderLightLevel = extractShoulderLightLevel(rightShoulder, itemLightSourceManager, player.isUnderWater());
return Math.max(leftShoulderLightLevel, rightShoulderLightLevel);
}
private static int extractShoulderLightLevel(@Nullable PokemonOnShoulderRenderer.ShoulderData shoulderData, @NotNull ItemLightSourceManager itemLightSourceManager, boolean underwater) {
if (shoulderData == null) {
return 0;
}
ItemStack item = shoulderData.getShownItem();
int itemLightLevel = item.isEmpty() ? 0 : itemLightSourceManager.getLuminance(item, underwater);
int formLightLevel = extractFormLightLevel(shoulderData.getForm(), underwater).orElse(0);
return Math.max(itemLightLevel, formLightLevel);
}
}
@@ -0,0 +1,45 @@
/*
* 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.compat.lambdynamiclights;
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity;
import dev.lambdaurora.lambdynlights.api.entity.luminance.EntityLuminance;
import dev.lambdaurora.lambdynlights.api.item.ItemLightSourceManager;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.item.ItemStack;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Range;
public final class PokemonLuminance extends CustomLuminance implements EntityLuminance {
public static final PokemonLuminance INSTANCE = new PokemonLuminance();
private PokemonLuminance() {}
@Override
public @NotNull Type type() {
return LambDynamicLightsInitializer.POKEMON_LUMINANCE;
}
@Override
public @Range(from = 0L, to = 15L) int getLuminance(
@NotNull ItemLightSourceManager itemLightSourceManager,
@NotNull Entity entity
) {
if (entity instanceof PokemonEntity pokemon) {
boolean underwater = pokemon.isUnderWater();
ItemStack item = pokemon.getShownItem();
int itemLightLevel = item.isEmpty() ? 0 : itemLightSourceManager.getLuminance(item, underwater);
int formLightLevel = extractFormLightLevel(pokemon.getForm(), underwater).orElse(0);
return Math.max(itemLightLevel, formLightLevel);
} else {
return 0;
}
}
}
@@ -0,0 +1,33 @@
/*
* Copyright (C) 2023 Cobblemon Contributors
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
package com.cobblemon.mod.common.duck;
import com.mongodb.lang.Nullable;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.level.BlockGetter;
import org.joml.Vector3f;
public interface CameraDuck {
BlockGetter cobblemon$getLevel();
@Nullable
Entity cobblemon$getEntity();
Vector3f cobblemon$getForwards();
Vector3f cobblemon$getUp();
Vector3f cobblemon$getLeft();
float cobblemon$getXRot();
void cobblemon$setXRot(float xRot);
float cobblemon$getYRot();
void cobblemon$setYRot(float yRot);
}
@@ -0,0 +1,20 @@
/*
* 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.duck;
import net.minecraft.world.phys.Vec3;
public interface RidePassenger {
void cobblemon$setRideXRot(float rideXRot);
float cobblemon$getRideXRot();
void cobblemon$setRideYRot(float rideYRot);
float cobblemon$getRideYRot();
void cobblemon$setRideEyePos(Vec3 rideEyePos);
Vec3 cobblemon$getRideEyePos();
}
@@ -0,0 +1,51 @@
/*
* 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.OrientationControllable;
import com.cobblemon.mod.common.duck.RidePassenger;
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.projectile.AbstractArrow;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.Level;
import org.jetbrains.annotations.Nullable;
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.CallbackInfo;
@Mixin(AbstractArrow.class)
public abstract class AbstractArrowMixin {
@Inject(
method = "<init>(Lnet/minecraft/world/entity/EntityType;Lnet/minecraft/world/entity/LivingEntity;Lnet/minecraft/world/level/Level;Lnet/minecraft/world/item/ItemStack;Lnet/minecraft/world/item/ItemStack;)V",
at = @At("TAIL")
)
private void cobblemon$adjustSpawnPosition(
EntityType<? extends AbstractArrow> entityType,
LivingEntity owner,
Level level,
ItemStack pickupItemStack,
@Nullable ItemStack firedFromWeapon,
CallbackInfo ci
) {
AbstractArrow arrow = (AbstractArrow)(Object)this;
if(!(owner.getVehicle() instanceof OrientationControllable vehicle)) return;
if(!(vehicle instanceof PokemonEntity)) return;
var vehicleController = vehicle.getOrientationController();
// If this is a pokemon ride passenger then use the rider eye position to set the arrow spawn position.
if (owner instanceof RidePassenger ridePassenger && vehicleController != null ) {
var eyePos = ridePassenger.cobblemon$getRideEyePos(); //.add(0.0, -2.0, 0.0);
arrow.setPos(eyePos);
}
}
}
@@ -0,0 +1,106 @@
/*
* 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;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
@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.HIVE_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.HIVE_LOCATION);
}
entity.yRotO = newYaw;
entity.setPos(newPos);
// Do honey logic
var hasNectar = brain.getMemory(CobblemonMemories.HAS_NECTAR).orElse(false);
if (hasNectar) {
// Remove nectar and reset got to hive cooldown
brain.eraseMemory(CobblemonMemories.HAS_NECTAR);
brain.setMemoryWithExpiry(CobblemonMemories.HIVE_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) {
List<String> IGNORED_BEE_TAGS = Arrays.asList("Air", "ArmorDropChances", "ArmorItems", "Brain", "CanPickUpLoot", "DeathTime", "FallDistance", "FallFlying", "Fire", "HandDropChances", "HandItems", "HurtByTimestamp", "HurtTime", "LeftHanded", "Motion", "NoGravity", "OnGround", "PortalCooldown", "Pos", "Rotation", "Passengers", "leash", "UUID");
CompoundTag compoundTag = new CompoundTag();
entity.save(compoundTag);
Objects.requireNonNull(compoundTag);
IGNORED_BEE_TAGS.forEach(compoundTag::remove);
Boolean hasNectar = pokemonEntity.getBrain().getMemory(CobblemonMemories.HAS_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);
}
}
@@ -7,6 +7,7 @@
*/
package com.cobblemon.mod.common.mixin;
import com.cobblemon.mod.common.duck.ChannelDuck;
import com.mojang.blaze3d.audio.Channel;
import org.lwjgl.openal.AL10;
@@ -8,18 +8,25 @@
package com.cobblemon.mod.common.mixin;
import com.cobblemon.mod.common.CobblemonNetwork;
import com.cobblemon.mod.common.OrientationControllable;
import com.cobblemon.mod.common.api.orientation.OrientationController;
import com.cobblemon.mod.common.api.pokemon.effect.ShoulderEffectRegistry;
import com.cobblemon.mod.common.api.riding.RidingStyle;
import com.cobblemon.mod.common.api.riding.Seat;
import com.cobblemon.mod.common.api.riding.behaviour.types.liquid.SubmarineBehaviour;
import com.cobblemon.mod.common.client.entity.PokemonClientDelegate;
import com.cobblemon.mod.common.client.render.MatrixWrapper;
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity;
import com.cobblemon.mod.common.net.messages.server.orientation.ServerboundUpdateOrientationPacket;
import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.world.effect.MobEffectInstance;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.level.ClipContext;
import net.minecraft.world.level.Level;
import net.minecraft.world.phys.HitResult;
@@ -32,6 +39,7 @@ import org.spongepowered.asm.mixin.Unique;
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.CallbackInfoReturnable;
@Mixin(LivingEntity.class)
public abstract class LivingEntityMixin extends Entity implements OrientationControllable {
@@ -55,6 +63,14 @@ public abstract class LivingEntityMixin extends Entity implements OrientationCon
}
}
@WrapOperation(method = "baseTick", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/entity/LivingEntity;isInWall()Z"))
public boolean cobblemon$preventMountSuffocation(LivingEntity instance, Operation<Boolean> original) {
if (instance.getVehicle() instanceof PokemonEntity) {
return false;
}
return original.call(instance);
}
@Override
public @NotNull HitResult pick(double hitDistance, float partialTicks, boolean hitFluids) {
Entity vehicle = this.getVehicle();
@@ -116,4 +132,31 @@ public abstract class LivingEntityMixin extends Entity implements OrientationCon
}
}
@Inject(method = "decreaseAirSupply", at = @At("HEAD"), cancellable = true)
private void cobblemon$conditionalWaterBreathing(
int currentAir,
CallbackInfoReturnable<Integer> cir
) {
var entity = (LivingEntity) (Object) this;
if (!(entity instanceof Player player)) return;
if (!(player.getVehicle() instanceof PokemonEntity vehicle)) return;
var ridingController = vehicle.getRidingController();
if (ridingController == null) return;
var activeContext = ridingController.getContext();
if (activeContext == null) return;
// If the rider is currently on a submarine and the ride still has stamina.
var stamina = activeContext.getState().getStamina().get();
if (
activeContext.getStyle() == RidingStyle.LIQUID &&
activeContext.getBehaviour().equals(SubmarineBehaviour.Companion.getKEY()) &&
stamina > 0.0f
) {
cir.setReturnValue(currentAir);
cir.cancel();
}
}
}
@@ -19,6 +19,7 @@ import com.cobblemon.mod.common.api.storage.party.PartyStore;
import com.cobblemon.mod.common.api.storage.party.PlayerPartyStore;
import com.cobblemon.mod.common.api.tags.CobblemonItemTags;
import com.cobblemon.mod.common.duck.PlayerDuck;
import com.cobblemon.mod.common.duck.RidePassenger;
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity;
import com.cobblemon.mod.common.pokedex.scanner.PokedexEntityData;
import com.cobblemon.mod.common.pokedex.scanner.ScannableEntity;
@@ -37,6 +38,7 @@ import net.minecraft.nbt.Tag;
import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.util.Mth;
import net.minecraft.world.damagesource.DamageSource;
import net.minecraft.world.entity.EntityDimensions;
import net.minecraft.world.entity.EntityType;
@@ -47,6 +49,7 @@ import net.minecraft.world.entity.player.Player;
import net.minecraft.world.food.FoodProperties;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.Level;
import net.minecraft.world.phys.Vec3;
import org.jetbrains.annotations.Nullable;
import org.joml.Vector3f;
import org.objectweb.asm.Opcodes;
@@ -63,7 +66,7 @@ import java.util.*;
import java.util.stream.Collectors;
@Mixin(Player.class)
public abstract class PlayerMixin extends LivingEntity implements ScannableEntity, OrientationControllable, PlayerDuck {
public abstract class PlayerMixin extends LivingEntity implements ScannableEntity, OrientationControllable, PlayerDuck, RidePassenger {
@Unique
private Vector3f cobblemon$driverInput;
@@ -91,6 +94,12 @@ public abstract class PlayerMixin extends LivingEntity implements ScannableEntit
@Shadow protected int jumpTriggerTime;
@Unique private final OrientationController cobblemon$orientationController = new OrientationController(this);
@Unique private float cobblemon$rideXRot = 0.0f;
@Unique private float cobblemon$rideYRot = 0.0f;
@Unique private Vec3 cobblemon$rideEyePos = Vec3.ZERO;
protected PlayerMixin(EntityType<? extends LivingEntity> p_20966_, Level p_20967_) {
super(p_20966_, p_20967_);
}
@@ -117,11 +126,6 @@ public abstract class PlayerMixin extends LivingEntity implements ScannableEntit
}
}
@Inject(method = "tick", at = @At("HEAD"))
private void cobblemon$updateRenderOrientation(CallbackInfo ci) {
this.cobblemon$orientationController.tick();
}
@Override
public EntityDimensions getDefaultDimensions(Pose pose) {
if (this.getVehicle() instanceof PokemonEntity) {
@@ -218,24 +222,25 @@ public abstract class PlayerMixin extends LivingEntity implements ScannableEntit
@Nullable @Unique
private PokedexEntityData getDataFromShoulderPokemon(CompoundTag shoulderTag) {
CompoundTag pokemonTag = shoulderTag.getCompound(DataKeys.POKEMON);
if (pokemonTag.isEmpty()) return null;
Species species = PokemonSpecies.INSTANCE.getByIdentifier(ResourceLocation.parse(pokemonTag.getString(DataKeys.POKEMON_SPECIES_IDENTIFIER)));
if (species == null) return null;
String formId = pokemonTag.getString(DataKeys.POKEMON_FORM_ID);
FormData form = species.getStandardForm();
List<FormData> formList = species.getForms().stream().filter(it -> it.formOnlyShowdownId().equals(formId)).toList();
if (!formList.isEmpty()) form = formList.getFirst();
if (form == null) return null;
String genderString = pokemonTag.getString(DataKeys.POKEMON_GENDER);
if (genderString.isEmpty()) return null;
Gender gender = Gender.valueOf(genderString);
boolean shiny = pokemonTag.getBoolean(DataKeys.POKEMON_SHINY);
int level = pokemonTag.getInt(DataKeys.POKEMON_LEVEL);
Set<String> aspects = shoulderTag.getList(DataKeys.SHOULDER_ASPECTS, Tag.TAG_STRING).stream().map(Tag::getAsString).collect(Collectors.toSet());
Pokemon pokemon = new Pokemon();
Pokemon pokemon;
if (level().isClientSide) {
CompoundTag pokemonTag = shoulderTag.getCompound(DataKeys.POKEMON);
if (pokemonTag.isEmpty()) return null;
Species species = PokemonSpecies.getByIdentifier(ResourceLocation.parse(pokemonTag.getString(DataKeys.POKEMON_SPECIES_IDENTIFIER)));
if (species == null) return null;
String formId = pokemonTag.getString(DataKeys.POKEMON_FORM_ID);
FormData form = species.getStandardForm();
List<FormData> formList = species.getForms().stream().filter(it -> it.formOnlyShowdownId().equals(formId)).toList();
if (!formList.isEmpty()) form = formList.getFirst();
if (form == null) return null;
String genderString = pokemonTag.getString(DataKeys.POKEMON_GENDER);
if (genderString.isEmpty()) return null;
Gender gender = Gender.valueOf(genderString);
boolean shiny = pokemonTag.getBoolean(DataKeys.POKEMON_SHINY);
int level = pokemonTag.getInt(DataKeys.POKEMON_LEVEL);
Set<String> aspects = shoulderTag.getList(DataKeys.SHOULDER_ASPECTS, Tag.TAG_STRING).stream().map(Tag::getAsString).collect(Collectors.toSet());
pokemon = new Pokemon();
pokemon.setSpecies(species);
pokemon.setForm(form);
pokemon.setGender(gender);
@@ -246,7 +251,7 @@ public abstract class PlayerMixin extends LivingEntity implements ScannableEntit
PlayerPartyStore party = Cobblemon.INSTANCE.getStorage().getParty(this.getUUID(), this.registryAccess());
pokemon = party.get(shoulderTag.getUUID(DataKeys.SHOULDER_UUID));
}
return new PokedexEntityData(pokemon, null);
return (pokemon == null) ? null : new PokedexEntityData(pokemon, null);
}
@Override
@@ -307,4 +312,34 @@ public abstract class PlayerMixin extends LivingEntity implements ScannableEntit
return cobblemon$lastSentDriverInput;
}
@Override
public float cobblemon$getRideXRot() {
return this.cobblemon$rideXRot;
}
@Override
public void cobblemon$setRideXRot(float rideXRot) {
this.cobblemon$rideXRot = Mth.wrapDegrees(rideXRot);
}
@Override
public float cobblemon$getRideYRot() {
return this.cobblemon$rideYRot;
}
@Override
public void cobblemon$setRideYRot(float rideYRot) {
this.cobblemon$rideYRot = Mth.wrapDegrees(rideYRot);
}
@Override
public Vec3 cobblemon$getRideEyePos() {
return this.cobblemon$rideEyePos;
}
@Override
public void cobblemon$setRideEyePos(Vec3 rideEyePos) {
this.cobblemon$rideEyePos = rideEyePos;
}
}
@@ -29,5 +29,4 @@ public class RecipeBookSettingsMixin {
private void cobblemon$init(CallbackInfo ci) {
states.put(RecipeBookType.valueOf("COOKING_POT"), new RecipeBookSettings.TypeSettings(true, true));
}
}
@@ -8,33 +8,70 @@
package com.cobblemon.mod.common.mixin;
import com.cobblemon.mod.common.Cobblemon;
import com.cobblemon.mod.common.OrientationControllable;
import com.cobblemon.mod.common.PlayerSpawnerAccessor;
import com.cobblemon.mod.common.api.spawning.spawner.PlayerSpawner;
import com.cobblemon.mod.common.api.spawning.spawner.PlayerSpawnerFactory;
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity;
import com.cobblemon.mod.common.world.gamerules.CobblemonGameRules;
import com.llamalad7.mixinextras.injector.ModifyExpressionValue;
import com.llamalad7.mixinextras.sugar.Local;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.world.entity.Entity;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.Unique;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(ServerPlayer.class)
public abstract class ServerPlayerMixin {
public abstract class ServerPlayerMixin implements PlayerSpawnerAccessor {
@Shadow
public abstract ServerLevel serverLevel();
@Unique
public PlayerSpawner cobblemon$spawner;
@Override
public PlayerSpawner getPlayerSpawner() {
ServerPlayer player = (ServerPlayer)(Object)this;
if (cobblemon$spawner == null) {
cobblemon$spawner = PlayerSpawnerFactory.INSTANCE.create(player);
}
return cobblemon$spawner;
}
@Override
public void setPlayerSpawner(PlayerSpawner spawner) {
this.cobblemon$spawner = spawner;
}
@Inject(method = "tick", at = @At("TAIL"))
private void cobblemon$tickSpawner(CallbackInfo ci) {
if (!Cobblemon.config.getEnableSpawning()) {
return;
} else if (!serverLevel().getGameRules().getBoolean(CobblemonGameRules.DO_POKEMON_SPAWNING)) {
return;
}
getPlayerSpawner().tick();
}
@Inject(method = "rideTick", at = @At("HEAD"))
private void cobblemon$updateOrientationControllerRideTick(CallbackInfo ci) {
if (!(this instanceof OrientationControllable controllable)) return;
var shouldUseCustomOrientation = cobblemon$shouldUseCustomOrientation((ServerPlayer)(Object)this);
controllable.getOrientationController().setActive(shouldUseCustomOrientation);
ServerPlayer player = (ServerPlayer)(Object)this;
Entity vehicle = player.getVehicle();
if (!(vehicle instanceof OrientationControllable controllableVehicle)) return;
var shouldUseCustomOrientation = cobblemon$shouldUseCustomOrientation(vehicle);
controllableVehicle.getOrientationController().setActive(shouldUseCustomOrientation);
}
@Unique
private boolean cobblemon$shouldUseCustomOrientation(ServerPlayer player) {
var playerVehicle = player.getVehicle();
if (playerVehicle == null) return false;
if (!(playerVehicle instanceof PokemonEntity pokemonEntity)) return false;
private boolean cobblemon$shouldUseCustomOrientation(Entity entity) {
if (entity == null) return false;
if (!(entity instanceof PokemonEntity pokemonEntity)) return false;
return pokemonEntity.ifRidingAvailableSupply(false, (behaviour, settings, state) -> {
return behaviour.shouldRoll(settings, state, pokemonEntity);
});
@@ -42,8 +79,9 @@ public abstract class ServerPlayerMixin {
@Inject(method = "stopRiding", at = @At("HEAD"))
public void cobblemon$resetOrientationOnDismount(CallbackInfo ci) {
if (!(this instanceof OrientationControllable controllable)) return;
controllable.getOrientationController().setActive(false);
ServerPlayer player = (ServerPlayer)(Object)this;
if (!(player.getVehicle() instanceof OrientationControllable controllableVehicle)) return;
controllableVehicle.getOrientationController().setActive(false);
}
//TODO: Switch to sending out on load instead of preventing saving
@@ -51,5 +89,4 @@ public abstract class ServerPlayerMixin {
private boolean cobblemon$cancelSavingPokemonMounts(boolean original, @Local(ordinal=0) Entity entity) {
return original && !(entity instanceof PokemonEntity);
}
}
@@ -55,86 +55,6 @@ public abstract class SoundEngineMixin implements SoundEngineDuck {
@Shadow
public abstract boolean isActive(SoundInstance sound);
@Inject(method = "play",
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/client/sounds/ChannelAccess$ChannelHandle;execute(Ljava/util/function/Consumer;)V"
),
cancellable = true
)
private void cobblemon$overrideChannelExecute(
SoundInstance sound,
CallbackInfo ci,
@Local(name = "h") float h,
@Local(name = "i") float i,
@Local(name = "g") float g,
@Local(name = "bl2") boolean bl2,
@Local(name = "bl3") boolean bl3,
@Local(name = "bl") boolean bl,
@Local(name = "vec3") Vec3 vec3,
@Local(name = "channelHandle") ChannelAccess.ChannelHandle handle
) {
if (!(sound instanceof RideLoopSound rideSound)) return;
if (handle == null) return;
handle.execute((channel) -> {
channel.setPitch(i);
channel.setVolume(h);
if (rideSound.getRideAttenuation() == RideAttenuationModel.LINEAR) {
channel.linearAttenuation(g);
} else if (rideSound.getRideAttenuation() == RideAttenuationModel.EXPONENTIAL){
((ChannelDuck) channel).cobblemon$inverseAttenuation(g);
} else {
channel.disableAttenuation();
}
// Apply low pass filter if the rideSound dictate that it should be muffled
if (rideSound.getShouldMuffle()) {
((ChannelDuck) channel).cobblemon$applyLowPassFilter(1.0f, rideSound.getMuffleAmount());
} else {
((ChannelDuck) channel).cobblemon$clearFilters();
}
channel.setLooping(bl2 && !bl3);
channel.setSelfPosition(vec3);
channel.setRelative(bl);
});
}
@Inject(
method = "tickNonPaused",
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/client/sounds/ChannelAccess$ChannelHandle;execute(Ljava/util/function/Consumer;)V",
ordinal = 0
)
)
private void cobblemon$tickableSoundTick(
CallbackInfo ci,
@Local(name = "tickableSoundInstance") TickableSoundInstance instance,
@Local(name = "channelHandle", ordinal = 0) ChannelAccess.ChannelHandle handle,
@Local(name = "f", ordinal = 0) float volume,
@Local(name = "g", ordinal = 0) float pitch,
@Local(name = "vec3", ordinal = 0) Vec3 vec3
) {
if (!(instance instanceof RideLoopSound rideSound)) return;
handle.execute(channel -> {
channel.setVolume(volume);
channel.setPitch(pitch);
channel.setSelfPosition(vec3);
// Apply low pass filter if the rideSound dictate that it should be muffled
if (rideSound.getShouldMuffle()) {
((ChannelDuck) channel).cobblemon$applyLowPassFilter(1.0f, rideSound.getMuffleAmount());
} else {
((ChannelDuck) channel).cobblemon$clearFilters();
}
});
}
/** Resumes the Source belonging to the queried SoundInstance. */
private void resume(SoundInstance sound) {
ChannelAccess.ChannelHandle sourceManager = this.instanceToChannel.get(sound);
@@ -25,9 +25,9 @@ public class TargetingConditionsMixin {
@Inject(method = "test", at = @At("HEAD"), cancellable = true)
public void test(@Nullable LivingEntity baseEntity, LivingEntity targetEntity, CallbackInfoReturnable<Boolean> ci) {
if (targetEntity instanceof ServerPlayer player) {
boolean canTargetInBattle = player.level().getGameRules().getBoolean(CobblemonGameRules.MOB_TARGET_IN_BATTLE);
if (player.level().getGameRules().getBoolean(CobblemonGameRules.MOB_TARGET_IN_BATTLE)) return;
boolean targetInBattle = Cobblemon.INSTANCE.getBattleRegistry().getBattleByParticipatingPlayer(player) != null;
if (!canTargetInBattle && targetInBattle) ci.setReturnValue(false);
if (targetInBattle) ci.setReturnValue(false);
}
}
}
@@ -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
}
}
@@ -8,13 +8,14 @@
package com.cobblemon.mod.common.mixin.accessor;
import net.minecraft.client.Camera;
import net.minecraft.world.level.BlockGetter;
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(Camera.class)
public interface CameraAccessor {
@Accessor("level")
BlockGetter getLevel();
}
@Mixin(BlockEntity.class)
public interface BlockEntityAccessor {
@Accessor("level") Level getLevel();
@Accessor("worldPosition") BlockPos getWorldPosition();
}
@@ -27,7 +27,6 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(BrewingStandMenu.class)
public abstract class BrewingStandMenuMixin {
@Inject(method = "<init>(ILnet/minecraft/world/entity/player/Inventory;Lnet/minecraft/world/Container;Lnet/minecraft/world/inventory/ContainerData;)V", at = @At("TAIL"))
private void captureLevel(int containerId, Inventory playerInventory, Container brewingStandContainer, ContainerData brewingStandData, CallbackInfo ci) {
var recipeManager = playerInventory.player.level().getRecipeManager();
@@ -37,9 +36,4 @@ public abstract class BrewingStandMenuMixin {
}
}
}
@WrapOperation(method = "quickMoveStack", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/inventory/BrewingStandMenu$PotionSlot;mayPlaceItem(Lnet/minecraft/world/item/ItemStack;)Z"))
private boolean cobblemon$isPotionBottle(ItemStack stack, Operation<Boolean> original, @Local(argsOnly = true) Player player) {
return BrewingStandRecipe.Companion.isBottle(stack, player.level().getRecipeManager()) || original.call(stack);
}
}
@@ -31,14 +31,16 @@ public class AbstractClientPlayerMixin {
PokedexUsageContext usageContext = CobblemonClient.INSTANCE.getPokedexUsageContext();
if (usageContext.getScanningGuiOpen()) {
cir.setReturnValue(usageContext.getFovMultiplier());
}
} else {
// Only modify fov through riding if the pokedex is not open
LocalPlayer player = (LocalPlayer) (Object) this;
// Only modify fov for the driver and not the passengers
if (player != null && player.isPassenger() && player.getVehicle() instanceof PokemonEntity && player.getVehicle().getControllingPassenger() == player) {
PokemonEntity ride = (PokemonEntity) player.getVehicle();
LocalPlayer player = (LocalPlayer) (Object) this;
if (player != null && player.isPassenger() && player.getVehicle() instanceof PokemonEntity) {
PokemonEntity ride = (PokemonEntity) player.getVehicle();
//Return custom fov mult
cir.setReturnValue(ride.rideFovMult());
// Return custom fov mult for riding
cir.setReturnValue(ride.rideFovMult());
}
}
}
}
@@ -0,0 +1,46 @@
/*
* 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.client;
import com.cobblemon.mod.common.client.render.player.MountedPlayerRenderer;
import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.blaze3d.vertex.VertexConsumer;
import net.minecraft.client.model.AgeableListModel;
import net.minecraft.client.model.HumanoidModel;
import net.minecraft.client.model.Model;
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.CallbackInfo;
/**
* This mixin adds to the head of the renderToBuffer function and allows us to detect if it is a HumanoidModel and
* is being rendered as part of a player in the world who is riding a PokemonEntity. If so we need to obey any
* root animations that have been applied earlier.
*
* @author Hiroku
* @since May 16, 2025
*/
@Mixin(AgeableListModel.class)
public class AgeableListModelMixin {
@Inject(method = "renderToBuffer", at = @At("HEAD"))
private void cobblemon$renderToBuffer(
PoseStack poseStack,
VertexConsumer vertexConsumer,
int packedLight,
int packedOverlay,
int colour,
CallbackInfo ci
) {
Model model = (Model) (Object) this;
if (model instanceof HumanoidModel<?> && MountedPlayerRenderer.shouldApplyRootAnimation) {
MountedPlayerRenderer.INSTANCE.animateRoot(poseStack);
}
}
}
@@ -8,87 +8,58 @@
package com.cobblemon.mod.common.mixin.client;
import com.cobblemon.mod.common.Cobblemon;
import com.cobblemon.mod.common.OrientationControllable;
import com.cobblemon.mod.common.api.orientation.OrientationController;
import com.cobblemon.mod.common.api.riding.Rideable;
import com.cobblemon.mod.common.client.MountedPokemonAnimationRenderController;
import com.cobblemon.mod.common.client.render.camera.MountedCameraRenderer;
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity;
import com.cobblemon.mod.common.duck.CameraDuck;
import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
import com.llamalad7.mixinextras.sugar.Local;
import net.minecraft.client.Camera;
import net.minecraft.client.Minecraft;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.level.BlockGetter;
import net.minecraft.world.phys.Vec3;
import org.joml.Matrix3f;
import org.joml.Quaternionf;
import org.joml.Vector3f;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.Unique;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(Camera.class)
public abstract class CameraMixin {
@Shadow private Entity entity;
@Shadow @Final private Quaternionf rotation;
@Shadow @Final private Vector3f forwards;
@Shadow @Final private Vector3f up;
@Shadow @Final private Vector3f left;
@Shadow private float xRot;
@Shadow private float yRot;
public abstract class CameraMixin implements CameraDuck {
@Shadow private float eyeHeight;
@Shadow private float eyeHeightOld;
@Shadow private BlockGetter level;
@Shadow private Entity entity;
@Final @Shadow private Vector3f forwards;
@Final @Shadow private Vector3f up;
@Final @Shadow private Vector3f left;
@Shadow private float yRot;
@Shadow private float xRot;
@Shadow protected abstract void setPosition(Vec3 pos);
@Unique private float returnTimer = 0;
@Unique private float rollAngleStart = 0;
@Unique Minecraft minecraft = Minecraft.getInstance();
@Inject(method = "setRotation", at = @At("HEAD"), cancellable = true)
public void cobblemon$setRotation(float f, float g, CallbackInfo ci) {
if (!(this.entity instanceof OrientationControllable controllable)) return;
var controller = controllable.getOrientationController();
if (!controller.isActive() && controller.getOrientation() != null) {
if(this.returnTimer < 1) {
//Rotation is taken from entity since we no longer handle mouse ourselves
//Stops a period of time when you can't input anything.
controller.getOrientation().set(
new Matrix3f()
.rotateY((float) Math.toRadians(180 - this.entity.getYRot()))
.rotateX((float) Math.toRadians(-this.entity.getXRot()))
);
if(rollAngleStart == 0){
this.returnTimer = 1;
controller.reset();
return;
}
controller.getOrientation().rotateZ((float) Math.toRadians(-rollAngleStart*(1-returnTimer)));
cobblemon$applyRotation();
this.returnTimer += .05F;
ci.cancel();
} else {
this.returnTimer = 1;
controller.reset();
}
return;
}
if (controller.getOrientation() == null) return;
cobblemon$applyRotation();
this.returnTimer = 0;
this.rollAngleStart = controller.getRoll();
ci.cancel();
@Override public BlockGetter cobblemon$getLevel() {
return level;
}
@Override public Entity cobblemon$getEntity() {
return entity;
}
@Override public Vector3f cobblemon$getForwards() { return forwards; }
@Override public Vector3f cobblemon$getUp() { return up; }
@Override public Vector3f cobblemon$getLeft() { return left; }
@Override public float cobblemon$getXRot() { return xRot; }
@Override public void cobblemon$setXRot(float xRot) { this.xRot = xRot; }
@Override public float cobblemon$getYRot() { return yRot; }
@Override public void cobblemon$setYRot(float yRot) { this.yRot = yRot; }
@WrapOperation(method = "setup", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/Camera;setPosition(DDD)V"))
public void cobblemon$positionCamera(Camera instance, double x, double y, double z, Operation<Void> original, @Local(ordinal = 1, argsOnly = true) boolean thirdPersonReverse) {
Entity entity = instance.getEntity();
@@ -97,49 +68,22 @@ public abstract class CameraMixin {
if(vehicle instanceof Rideable){
Vec3 position = MountedCameraRenderer.INSTANCE.getCameraPosition(
instance,
entity,
vehicle,
x,
y,
z,
thirdPersonReverse,
eyeHeightOld,
eyeHeight
instance,
entity,
vehicle,
thirdPersonReverse,
eyeHeight,
eyeHeightOld
);
if(position != null){
if(position != null) {
setPosition(position);
return;
}
}
// reset the rotation values if it is now not being ridden.
MountedCameraRenderer.INSTANCE.setSmoothRotation(null);
original.call(instance, x, y, z);
}
@Unique
private void cobblemon$applyRotation(){
if (!(this.entity instanceof OrientationControllable controllable) || controllable.getOrientationController().getOrientation() == null) return;
var controller = controllable.getOrientationController();
var newRotation = controller.getOrientation().normal(new Matrix3f()).getNormalizedRotation(new Quaternionf());
if (this.minecraft.options.getCameraType().isMirrored()) {
newRotation.rotateY((float)Math.toRadians(180));
}
this.rotation.set(newRotation);
this.xRot = controller.getPitch();
this.yRot = controller.getYaw();
OrientationController.Companion.getFORWARDS().rotate(this.rotation, this.forwards);
OrientationController.Companion.getUP().rotate(this.rotation, this.up);
OrientationController.Companion.getLEFT().rotate(this.rotation, this.left);
}
@WrapOperation(method = "setup", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/Camera;move(FFF)V", ordinal = 0))
public void stopMoveIfRolling(Camera instance, float zoom, float dy, float dx, Operation<Void> original) {
Entity entity = instance.getEntity();
Entity vehicle = entity.getVehicle();
if (!(vehicle instanceof PokemonEntity) || Cobblemon.config.getThirdPersonViewBobbing()) {
original.call(instance, zoom, dy, dx);
}
}
}
@@ -9,15 +9,21 @@
package com.cobblemon.mod.common.mixin.client;
import com.cobblemon.mod.common.api.scheduling.ClientTaskTracker;
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity;
import com.llamalad7.mixinextras.sugar.Local;
import net.minecraft.client.DeltaTracker;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.GameRenderer;
import net.minecraft.world.entity.Entity;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Unique;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.ModifyArg;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import java.util.function.Predicate;
@Mixin(GameRenderer.class)
public class GameRendererMixin {
@Unique
@@ -42,4 +48,16 @@ public class GameRendererMixin {
lastTime = newTime;
}
@ModifyArg(
method = "pick(Lnet/minecraft/world/entity/Entity;DDF)Lnet/minecraft/world/phys/HitResult;",
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/world/entity/projectile/ProjectileUtil;getEntityHitResult(Lnet/minecraft/world/entity/Entity;Lnet/minecraft/world/phys/Vec3;Lnet/minecraft/world/phys/Vec3;Lnet/minecraft/world/phys/AABB;Ljava/util/function/Predicate;D)Lnet/minecraft/world/phys/EntityHitResult;"
),
index = 4
)
private Predicate<Entity> filterPokemonVehicle(Predicate<Entity> original, @Local(ordinal = 0, argsOnly = true) Entity entity) {
return (entityX) -> !(entity.getVehicle() == entityX && entityX instanceof PokemonEntity) && original.test(entityX);
}
}
@@ -10,6 +10,7 @@ package com.cobblemon.mod.common.mixin.client;
import com.cobblemon.mod.common.OrientationControllable;
import com.cobblemon.mod.common.client.render.player.MountedPlayerRenderer;
import com.cobblemon.mod.common.duck.RidePassenger;
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity;
import net.minecraft.client.model.HumanoidModel;
import net.minecraft.client.model.geom.ModelPart;
@@ -19,20 +20,17 @@ import net.minecraft.world.entity.LivingEntity;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.Unique;
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.HashMap;
@Mixin(HumanoidModel.class)
public class HumanoidModelMixin {
@Unique HashMap<String, ModelPart> relevantPartsByName = new HashMap<>();
@Shadow @Final
public ModelPart head;
@Shadow @Final
public ModelPart hat;
@Shadow @Final
public ModelPart rightArm;
@Shadow @Final
public ModelPart leftArm;
@@ -40,6 +38,8 @@ public class HumanoidModelMixin {
public ModelPart rightLeg;
@Shadow @Final
public ModelPart leftLeg;
@Shadow @Final
public ModelPart body;
@Inject(method = "setupAnim*", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/model/geom/ModelPart;copyFrom(Lnet/minecraft/client/model/geom/ModelPart;)V", shift = At.Shift.BEFORE))
public void cobblemon$animateRiders(
@@ -51,19 +51,34 @@ public class HumanoidModelMixin {
float headPitch,
CallbackInfo ci
) {
if (relevantPartsByName.isEmpty()) {
relevantPartsByName.put("arm_left", leftArm);
relevantPartsByName.put("arm_right", rightArm);
relevantPartsByName.put("leg_left", leftLeg);
relevantPartsByName.put("leg_right", rightLeg);
relevantPartsByName.put("head", head);
MountedPlayerRenderer.shouldApplyRootAnimation = false;
if (MountedPlayerRenderer.relevantPartsByName.size() <= 1) {
MountedPlayerRenderer.relevantPartsByName.put("arm_left", leftArm);
MountedPlayerRenderer.relevantPartsByName.put("arm_right", rightArm);
MountedPlayerRenderer.relevantPartsByName.put("leg_left", leftLeg);
MountedPlayerRenderer.relevantPartsByName.put("leg_right", rightLeg);
MountedPlayerRenderer.relevantPartsByName.put("head", head);
MountedPlayerRenderer.relevantPartsByName.put("hat", hat);
MountedPlayerRenderer.relevantPartsByName.put("torso", body);
}
Entity vehicle = entity.getVehicle();
if (vehicle instanceof PokemonEntity pokemonEntity && entity instanceof OrientationControllable) {
var shouldRotatePlayerHead = pokemonEntity.ifRidingAvailableSupply(false, (behaviour, settings, state) -> {
return behaviour.shouldRotateRiderHead(settings, state, pokemonEntity);
});
var shouldRotatePlayerHead = pokemonEntity.ifRidingAvailableSupply(false, (behaviour, settings, state) ->
behaviour.shouldRotateRiderHead(settings, state, pokemonEntity)
);
// If the player is on a rollable ride then use the ride local rotations to rotate the head
// This is to allow the player head to face the correct direction when "freelooking"
if (entity instanceof RidePassenger playerRotater &&
vehicle instanceof OrientationControllable controller &&
controller.getOrientationController().isActive()) {
this.head.xRot = playerRotater.cobblemon$getRideXRot();
headPitch = playerRotater.cobblemon$getRideXRot();
this.head.yRot = playerRotater.cobblemon$getRideYRot();
netHeadYaw = playerRotater.cobblemon$getRideYRot();
}
if (!shouldRotatePlayerHead) {
netHeadYaw = 0f;
@@ -76,7 +91,8 @@ public class HumanoidModelMixin {
if (!(entity instanceof AbstractClientPlayer player)) return;
MountedPlayerRenderer.INSTANCE.animate(pokemonEntity, player, relevantPartsByName, netHeadYaw, headPitch, ageInTicks, limbSwing, limbSwingAmount);
MountedPlayerRenderer.shouldApplyRootAnimation = true;
MountedPlayerRenderer.INSTANCE.animate((HumanoidModel<AbstractClientPlayer>)(Object)this, pokemonEntity, player, netHeadYaw, headPitch, ageInTicks, limbSwing, limbSwingAmount);
}
}
}
@@ -36,9 +36,9 @@ public class ItemInHandRendererMixin {
}
}
@Redirect(method = "renderHandsWithItems", at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/vertex/PoseStack;mulPose(Lorg/joml/Quaternionf;)V", ordinal = 1))
@Redirect(method = "renderHandsWithItems", at = @At(value = "INVOKE", target = "Lcom/mojang/blaze3d/vertex/PoseStack;mulPose(Lorg/joml/Quaternionf;)V"))
private void cobblemon$renderHandswithItems(PoseStack instance, Quaternionf quaternion) {
if (!(Minecraft.getInstance().player instanceof OrientationControllable controllable && controllable.getOrientationController().isActive())) {
if (!(Minecraft.getInstance().player != null && Minecraft.getInstance().player.getVehicle() instanceof OrientationControllable controllable && controllable.getOrientationController().isActive())) {
instance.mulPose(quaternion);
}
}
@@ -19,9 +19,11 @@ import com.cobblemon.mod.common.client.render.models.blockbench.FloatingState;
import com.cobblemon.mod.common.client.render.models.blockbench.PosableModel;
import com.cobblemon.mod.common.client.render.models.blockbench.repository.VaryingModelRepository;
import com.cobblemon.mod.common.duck.PlayerDuck;
import com.cobblemon.mod.common.duck.RidePassenger;
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity;
import com.cobblemon.mod.common.net.messages.server.orientation.ServerboundUpdateOrientationPacket;
import com.cobblemon.mod.common.net.messages.server.riding.ServerboundUpdateDriverInputPacket;
import com.cobblemon.mod.common.net.messages.server.riding.ServerboundUpdateRiderRotationPacket;
import com.mojang.authlib.GameProfile;
import net.minecraft.client.CameraType;
import net.minecraft.client.Minecraft;
@@ -29,12 +31,10 @@ import net.minecraft.client.multiplayer.ClientLevel;
import net.minecraft.client.player.AbstractClientPlayer;
import net.minecraft.client.player.Input;
import net.minecraft.client.player.LocalPlayer;
import net.minecraft.util.Mth;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.level.ClipContext;
import net.minecraft.world.level.Level;
import net.minecraft.world.phys.HitResult;
import net.minecraft.world.phys.Vec3;
import org.jetbrains.annotations.NotNull;
@@ -55,6 +55,10 @@ public abstract class LocalPlayerMixin extends AbstractClientPlayer implements O
@Unique Matrix3f cobblemon$lastOrientation;
@Unique float cobblemon$lastRideXRot;
@Unique float cobblemon$lastRideYRot;
@Unique Vec3 cobblemon$lastRideEyePos;
@Unique boolean cobblemon$isDoubleJumping = false;
@Shadow
@@ -72,30 +76,35 @@ public abstract class LocalPlayerMixin extends AbstractClientPlayer implements O
super(clientLevel, gameProfile);
}
// @Inject(method = "sendPosition", at = @At("TAIL"))
// private void cobblemon$updateRotationMatrix(CallbackInfo ci) {
// if (!(this instanceof OrientationControllable controllable)) return;
// var controller = controllable.getOrientationController();
// if (!controller.isActive() || controller.getOrientation() == cobblemon$lastOrientation) return;
// cobblemon$lastOrientation = controller.getOrientation() != null ? new Matrix3f(controller.getOrientation()) : null;
// CobblemonNetwork.INSTANCE.sendToServer(new ServerboundUpdateOrientationPacket(controller.getOrientation()));
// }
@Inject(method = "tick", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/multiplayer/ClientPacketListener;send(Lnet/minecraft/network/protocol/Packet;)V"))
private void cobblemon$updateRotationMatrixPassenger(CallbackInfo ci) {
if (!(this instanceof OrientationControllable controllable)) return;
var controller = controllable.getOrientationController();
if (!controller.isActive() || controller.getOrientation() == cobblemon$lastOrientation) return;
cobblemon$lastOrientation = controller.getOrientation() != null ? new Matrix3f(controller.getOrientation()) : null;
CobblemonNetwork.INSTANCE.sendToServer(new ServerboundUpdateOrientationPacket(controller.getOrientation()));
if (!(this.getVehicle() instanceof OrientationControllable controllableVehicle)) return;
var vehicleController = controllableVehicle.getOrientationController();
if (!vehicleController.isActive() || vehicleController.getOrientation() == cobblemon$lastOrientation) return;
cobblemon$lastOrientation = vehicleController.getOrientation() != null ? new Matrix3f(vehicleController.getOrientation()) : null;
CobblemonNetwork.INSTANCE.sendToServer(new ServerboundUpdateOrientationPacket(this.getVehicle().getId(), vehicleController.getOrientation()));
}
@Inject(method = "rideTick", at = @At("HEAD"))
private void cobblemon$updateOrientationControllerRideTick(CallbackInfo ci) {
if (Minecraft.getInstance().player != (Object)this) return;
if (!(this instanceof OrientationControllable controllable)) return;
var driver = (LocalPlayer)(Object)this;
var vehicle = driver.getVehicle();
if (!(this.getVehicle() instanceof OrientationControllable controllableVehicle)) return;
var shouldUseCustomOrientation = cobblemon$shouldUseCustomOrientation((LocalPlayer)(Object)this);
controllable.getOrientationController().setActive(shouldUseCustomOrientation);
var vehicleController = controllableVehicle.getOrientationController();
// If the player has just switched to riding a custom orientation ride then set their
// x and y rots local to the vehicle rots(if the controller wasn't active and will now be active)
// This ensures that on transition your camera stays in the same spot
if (!vehicleController.isActive() && shouldUseCustomOrientation) {
// Set local to the vehicle x and yrot so
var playerRotater = (RidePassenger)driver;
playerRotater.cobblemon$setRideXRot(Mth.wrapDegrees(driver.getXRot() - vehicle.getXRot()));
playerRotater.cobblemon$setRideYRot(Mth.wrapDegrees(driver.getYRot() - vehicle.getYRot()));
}
vehicleController.setActive(shouldUseCustomOrientation);
}
@Inject(method = "rideTick", at = @At("HEAD"))
@@ -115,6 +124,36 @@ public abstract class LocalPlayerMixin extends AbstractClientPlayer implements O
CobblemonNetwork.INSTANCE.sendToServer(new ServerboundUpdateDriverInputPacket(driverInput));
}
@Inject(method = "rideTick", at = @At("HEAD"))
private void cobblemon$updateRiderRotationsRideTick(CallbackInfo ci) {
if (Minecraft.getInstance().player != (Object)this) return;
if (!(this.getVehicle() instanceof PokemonEntity pokemonEntity)) return;
var passenger = (LocalPlayer)(Object)this;
var playerRotater = (RidePassenger)passenger;
// Gather Rider Rotation info
var rideXRot = playerRotater.cobblemon$getRideXRot();
var rideYRot = playerRotater.cobblemon$getRideYRot();
var rideEyePos = playerRotater.cobblemon$getRideEyePos();
// Check for a change in the values before sending them.
if (cobblemon$lastRideXRot != rideXRot ||
cobblemon$lastRideYRot != rideYRot ||
cobblemon$lastRideEyePos != rideEyePos
) {
// Update 'last' values
cobblemon$lastRideXRot = rideXRot;
cobblemon$lastRideYRot = rideYRot;
cobblemon$lastRideEyePos = rideEyePos;
CobblemonNetwork.INSTANCE.sendToServer(new ServerboundUpdateRiderRotationPacket(rideXRot, rideYRot, rideEyePos));
}
}
@Unique
private boolean cobblemon$shouldUseCustomOrientation(LocalPlayer player) {
var playerVehicle = player.getVehicle();
@@ -129,8 +168,8 @@ public abstract class LocalPlayerMixin extends AbstractClientPlayer implements O
public void stopRiding() {
super.stopRiding();
if (Minecraft.getInstance().player != (Object)this) return;
if (!(this instanceof OrientationControllable controllable)) return;
controllable.getOrientationController().setActive(false);
if (!(this instanceof OrientationControllable controllableVehicle)) return;
controllableVehicle.getOrientationController().setActive(false);
}
@Inject(method = "getJumpRidingScale", at = @At("HEAD"), cancellable = true)
@@ -161,7 +200,7 @@ public abstract class LocalPlayerMixin extends AbstractClientPlayer implements O
this.cobblemon$survivalJumpTriggerTime = 0;
}
else {
this.cobblemon$survivalJumpTriggerTime = 7;
this.cobblemon$survivalJumpTriggerTime = 12;
}
}
else if (this.cobblemon$survivalJumpTriggerTime > 0) {
@@ -174,37 +213,31 @@ public abstract class LocalPlayerMixin extends AbstractClientPlayer implements O
return this.cobblemon$isDoubleJumping;
}
@Inject(method = "isHandsBusy", at = @At("HEAD"), cancellable = true)
private void cobblemon$isHandsBusy(CallbackInfoReturnable<Boolean> cir) {
Entity vehicle = this.getVehicle();
if (vehicle instanceof PokemonEntity pokemonEntity) {
int seatIndex = pokemonEntity.getPassengers().indexOf(this);
Seat seat = pokemonEntity.getSeats().get(seatIndex);
cir.setReturnValue(seat.getHandsBusy());
}
}
@Override
public HitResult pick(double hitDistance, float partialTicks, boolean hitFluids) {
Entity vehicle = this.getVehicle();
if (vehicle instanceof PokemonEntity pokemonEntity) {
PokemonClientDelegate delegate = (PokemonClientDelegate) pokemonEntity.getDelegate();
String locatorName = delegate.getSeatLocator(this);
MatrixWrapper locator = delegate.getLocatorStates().get(locatorName);
if (locator == null) {
return super.pick(hitDistance, partialTicks, hitFluids);
}
// Get player object
var passenger = (LocalPlayer)(Object)this;
var playerRotater = (RidePassenger)passenger;
Vec3 locatorOffset = locator != null ? new Vec3(locator.getMatrix().getTranslation(new Vector3f())) : Vec3.ZERO;
OrientationController controller = this.getOrientationController();
float currEyeHeight = this.getEyeHeight();
Vector3f offset = new Vector3f(new Vector3f(0f, currEyeHeight - (this.getBbHeight() / 2), 0f));
if (Minecraft.getInstance().options.getCameraType() == CameraType.FIRST_PERSON) {
PosableModel model = VaryingModelRepository.INSTANCE.getPoser(pokemonEntity.getPokemon().getSpecies().getResourceIdentifier(), new FloatingState());
offset.add(cobblemon$getFirstPersonOffset(model, locatorName));
}
Matrix3f orientation = controller.isActive() && controller.getOrientation() != null ? controller.getOrientation() : new Matrix3f();
Vec3 rotatedEyeHeight = new Vec3(orientation.transform(offset));
Vec3 eyePosition = locatorOffset.add(pokemonEntity.position()).add(rotatedEyeHeight);
// Gather eye position from stored 1st person camera position calculation
var eyePosition = playerRotater.cobblemon$getRideEyePos();
Vec3 viewVector = this.getViewVector(partialTicks);
Vec3 viewDistanceVector = eyePosition.add(viewVector.x * hitDistance, viewVector.y * hitDistance, viewVector.z * hitDistance);
return this.level()
.clip(
new ClipContext(
@@ -10,13 +10,16 @@ package com.cobblemon.mod.common.mixin.client;
import com.cobblemon.mod.common.Cobblemon;
import com.cobblemon.mod.common.OrientationControllable;
import com.cobblemon.mod.common.api.orientation.OrientationController;
import com.cobblemon.mod.common.client.CobblemonClient;
import com.cobblemon.mod.common.client.keybind.keybinds.PartySendBinding;
import com.cobblemon.mod.common.duck.RidePassenger;
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity;
import com.cobblemon.mod.common.pokedex.scanner.PokedexUsageContext;
import com.llamalad7.mixinextras.injector.v2.WrapWithCondition;
import com.llamalad7.mixinextras.sugar.Local;
import com.mojang.blaze3d.Blaze3D;
import kotlin.Pair;
import net.minecraft.client.Minecraft;
import net.minecraft.client.MouseHandler;
import net.minecraft.client.player.LocalPlayer;
@@ -32,6 +35,9 @@ import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import static com.google.common.primitives.Floats.min;
import static net.minecraft.util.Mth.lerp;
@Mixin(MouseHandler.class)
public abstract class MouseHandlerMixin {
@Shadow private double accumulatedScrollY;
@@ -116,65 +122,108 @@ public abstract class MouseHandlerMixin {
double cursorDeltaY,
@Local(argsOnly = true) double d,
@Local(argsOnly = true) double movementTime
) {
) {
PokedexUsageContext usageContext = CobblemonClient.INSTANCE.getPokedexUsageContext();
boolean returnValue = true;
if (usageContext.getScanningGuiOpen()) {
this.smoothTurnY.reset();
this.smoothTurnX.reset();
var defaultSensitivity = this.minecraft.options.sensitivity().get() * 0.6 + 0.2;
var spyglassSensitivity = Math.pow(defaultSensitivity, 3);
var lookSensitivity = spyglassSensitivity * 8.0;
var sensitivity = Mth.lerp(usageContext.getFovMultiplier(), spyglassSensitivity, lookSensitivity);
var sensitivity = lerp(usageContext.getFovMultiplier(), spyglassSensitivity, lookSensitivity);
var yRotationFlip = this.minecraft.options.invertYMouse().get() ? -1 : 1;
player.turn(this.accumulatedDX * sensitivity, (this.accumulatedDY * sensitivity * yRotationFlip));
return false;
returnValue = false;
}
var vehicle = player.getVehicle();
if (!(vehicle instanceof PokemonEntity)) return returnValue;
// Clamp player rotation if riding and the vehicle demands it
if (player.isPassenger() && player.getVehicle() instanceof PokemonEntity vehicle) {
vehicle.clampPassengerRotation(player);
if (player.isPassenger() && vehicle instanceof PokemonEntity pokeVehicle) {
pokeVehicle.clampPassengerRotation(player);
}
if (!(player instanceof OrientationControllable controllable)) return true;
if (!controllable.getOrientationController().isActive()) {
// If the ride is not orientation controllable then return and perform the normal turnPlayer logic
if (!(vehicle instanceof OrientationControllable controllableVehicle) || !controllableVehicle.getOrientationController().isActive()) {
xMouseSmoother.reset();
yMouseSmoother.reset();
pitchSmoother.reset();
rollSmoother.reset();
yawSmoother.reset();
return true;
return returnValue;
}
//Send mouse input to be interpreted into rotation
//deltas by the ride controller
var vehicleController = controllableVehicle.getOrientationController();
var lookaroundButtonPressed = Minecraft.getInstance().mouseHandler.isMiddlePressed();
Pair<Boolean, Boolean> mouseShouldModifyDriver = ((PokemonEntity) vehicle).ifRidingAvailableSupply(new Pair(false, false), (behaviour, settings, state) -> {
return behaviour.mouseModifiesDriverRotation(
settings,
state,
(PokemonEntity) vehicle
);
});
//-------------------------------------------------------------------------
// If looking around then modify the players orientation instead and zero the mouse deltas so the mouse doesn't
// affect the vehicle orientation when looking around.
// If the client is a passenger it will modify these rotations and return
//-------------------------------------------------------------------------
if (lookaroundButtonPressed || player.getControlledVehicle() == null) {
// Modify driver rotations
cobblemon$setDriverRotations(player, cursorDeltaX, cursorDeltaY);
// If the player/passenger is not the driver then return and ignore all vehicle rotation logic
if (player.getControlledVehicle() == null) return false;
// Set to zero so that vehicle rotations don't also get affected by movement.
cursorDeltaX = 0.0;
cursorDeltaY = 0.0;
} else if (mouseShouldModifyDriver.getFirst()) { // If not freelooking then check modification per mouse input dimension
cobblemon$setDriverRotations(player, cursorDeltaX, 0.0);
cursorDeltaX = 0.0;
} else if (mouseShouldModifyDriver.getSecond()) {
cobblemon$setDriverRotations(player, 0.0, cursorDeltaY);
cursorDeltaY = 0.0;
}
//-------------------------------------------------------------------------
// Smoothly return driver rotations to zero when needed
//-------------------------------------------------------------------------
var playerRotater = (RidePassenger)player;
if( !lookaroundButtonPressed && !mouseShouldModifyDriver.getFirst()){
playerRotater.cobblemon$setRideYRot(lerp(min(5.0f * (float)movementTime, 1.0f), Mth.wrapDegrees(playerRotater.cobblemon$getRideYRot()), 0.0f));
}
if( !lookaroundButtonPressed && !mouseShouldModifyDriver.getSecond()) {
playerRotater.cobblemon$setRideXRot(lerp(min(5.0f * (float)movementTime, 1.0f), Mth.wrapDegrees(playerRotater.cobblemon$getRideXRot()), 0.0f));
}
// Send mouse input to be interpreted into rotation deltas by the ride controller
Vec3 angVecMouse = cobblemon$getRideMouseRotation(cursorDeltaX, cursorDeltaY, movementTime);
//Perform Rotation using mouse influenced rotation deltas.
controllable.getOrientationController().rotate(
// Perform Rotation using mouse influenced rotation deltas.
vehicleController.rotate(
(float) angVecMouse.x,
(float) angVecMouse.y,
(float) angVecMouse.z
);
//Gather and apply the current rotation deltas
// Gather and apply the current rotation deltas
var angRot = cobblemon$getAngularVelocity(movementTime);
//Apply smoothing if requested by the controller.
//This Might be best if done by the controller itself?
if(cobblemon$shouldUseAngVelSmoothing())
{
// Apply smoothing if requested by the controller.
if(cobblemon$shouldUseAngVelSmoothing()) {
var yaw = yawSmoother.getNewDeltaValue(angRot.x * 0.5f, d);
var pitch = pitchSmoother.getNewDeltaValue(angRot.y * 0.5f, d);
var roll = rollSmoother.getNewDeltaValue(angRot.z * 0.5f, d);
controllable.getOrientationController().rotate((float) yaw, (float) pitch, (float) roll);
vehicleController.rotate((float) yaw, (float) pitch, (float) roll);
}
//Otherwise simply apply the smoothing
else
{
controllable.getOrientationController().rotate((float) (angRot.x * 10 * d), (float) (angRot.y * 10 * d), (float) (angRot.z * 10 * d));
else {
vehicleController.rotate((float) (angRot.x * 10 * d), (float) (angRot.y * 10 * d), (float) (angRot.z * 10 * d));
}
return false;
return returnValue;
}
@Inject(method = "handleAccumulatedMovement", at = @At("HEAD"))
@@ -186,10 +235,11 @@ public abstract class MouseHandlerMixin {
@Inject(method = "handleAccumulatedMovement", at = @At("TAIL"))
private void cobblemon$maintainMovementWhenInScreens(CallbackInfo ci) {
if (minecraft.player == null) return;
if (!(minecraft.player instanceof OrientationControllable controllable)) return;
if (!controllable.getOrientationController().isActive()) return;
if (!(minecraft.player.getVehicle() instanceof OrientationControllable vehicleControllable)) return;
if (!(vehicleControllable.getOrientationController() instanceof OrientationController vehicleController)) return;
if (vehicleController.getOrientation() == null) return;
if (minecraft.isPaused()) return;
if (isMouseGrabbed()) return;
if (this.isMouseGrabbed()) return; // return if turnPlayer() has already run this pass
this.turnPlayer(cobblemon$timeDelta);
}
@@ -251,6 +301,21 @@ public abstract class MouseHandlerMixin {
return Math.pow(sensitivity, 3);
}
@Unique
private void cobblemon$setDriverRotations(LocalPlayer player, double cursorDeltaX, double cursorDeltaY) {
// the vanilla turn() method redone so that it uses rideRotations.
float f = (float)cursorDeltaY * 0.15F; // Note: turn() uses xRot for pitch (up/down)
float g = (float)cursorDeltaX * 0.15F; // Note: turn() uses yRot for yaw (left/right)
var playerRotater = (RidePassenger)player;
playerRotater.cobblemon$setRideXRot(playerRotater.cobblemon$getRideXRot() + f);
playerRotater.cobblemon$setRideYRot(playerRotater.cobblemon$getRideYRot() + g);
playerRotater.cobblemon$setRideXRot(Mth.clamp(playerRotater.cobblemon$getRideXRot(), -90.0F, 90.0F));
playerRotater.cobblemon$setRideYRot(Mth.clamp(playerRotater.cobblemon$getRideYRot(), -105.0F, 105.0F));
if (player.getVehicle() != null) {
player.getVehicle().onPassengerTurned(player);
}
}
@Unique
private boolean cobblemon$shouldUseAngVelSmoothing() {
var player = minecraft.player;
@@ -0,0 +1,45 @@
/*
* 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.client;
import com.cobblemon.mod.common.Cobblemon;
import com.cobblemon.mod.common.OrientationControllable;
import net.minecraft.client.CameraType;
import net.minecraft.client.Minecraft;
import net.minecraft.client.Options;
import net.minecraft.world.entity.player.Player;
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(Options.class)
public abstract class OptionsMixin {
/**
* Only allow third person on rollables when motion sick cam is enabled
*/
@Inject(
method = "getCameraType",
at = @At("HEAD"),
cancellable = true
)
private void cobblemon$forceThirdPerson(CallbackInfoReturnable<CameraType> cir) {
var mc = Minecraft.getInstance();
if(!(mc.player instanceof Player player)) return;
if(!(player.getVehicle() instanceof OrientationControllable vehicle)) return;
if(vehicle.getOrientationController() == null) return;
// Force third person if on an active rollable vehicle and roll is disabled.
if (Cobblemon.config.getDisableRoll() && vehicle.getOrientationController().isActive()) {
cir.setReturnValue(CameraType.THIRD_PERSON_BACK);
cir.cancel();
}
}
}
@@ -10,8 +10,7 @@ package com.cobblemon.mod.common.mixin.client.snapshots;
import com.cobblemon.mod.common.CobblemonBuildDetails;
import com.cobblemon.mod.common.client.gui.snapshots.SnapshotWarningScreen;
import com.cobblemon.mod.common.client.snapshots.SnapshotAcknowledgementData;
import com.cobblemon.mod.common.client.snapshots.SnapshotAcknowledgementReader;
import com.cobblemon.mod.common.client.persisted.ClientPersistedData;
import kotlin.Unit;
import net.minecraft.SharedConstants;
import net.minecraft.client.Minecraft;
@@ -42,7 +41,7 @@ public final class SnapshotWarningMixin {
return Unit.INSTANCE;
}
SnapshotAcknowledgementReader.INSTANCE.write(new SnapshotAcknowledgementData(CobblemonBuildDetails.VERSION, dsa));
ClientPersistedData.INSTANCE.writeSnapshotsData(new ClientPersistedData.SnapshotAcknowledgementData(CobblemonBuildDetails.VERSION, dsa));
runnable.run();
return Unit.INSTANCE;
@@ -54,7 +53,7 @@ public final class SnapshotWarningMixin {
@Unique
@SuppressWarnings("ResultOfMethodCallIgnored")
private boolean cobblemon$isAcknowledged() {
SnapshotAcknowledgementData data = SnapshotAcknowledgementReader.INSTANCE.read();
ClientPersistedData.SnapshotAcknowledgementData data = ClientPersistedData.INSTANCE.readSnapshotsData();
if (data == null) {
return false;
}
@@ -8,17 +8,25 @@
package com.cobblemon.mod.common.mixin.entity;
import com.cobblemon.mod.common.OrientationControllable;
import com.cobblemon.mod.common.duck.RidePassenger;
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity;
import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
import net.minecraft.client.player.LocalPlayer;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.level.Level;
import net.minecraft.world.phys.Vec3;
import org.jetbrains.annotations.Nullable;
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.Redirect;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
@Mixin(Entity.class)
public abstract class EntityMixin {
@@ -39,13 +47,58 @@ public abstract class EntityMixin {
target = "Lnet/minecraft/world/entity/Entity;onGround()Z"
)
)
public boolean cobblemon$forceOnGroundForStepUp(Entity entity, Operation<Boolean> original)
{
public boolean cobblemon$forceOnGroundForStepUp(Entity entity, Operation<Boolean> original) {
if (entity instanceof PokemonEntity && entity.hasControllingPassenger()) {
return true;
BlockPos below = entity.blockPosition().below();
Level level = entity.level();
var blockStateBelow = level.getBlockState(below);
boolean isAirOrLiquid = blockStateBelow.isAir() || !blockStateBelow.getFluidState().isEmpty();
boolean canSupportEntity = blockStateBelow.isFaceSturdy(level, below, Direction.UP);
boolean standingOnSolid = canSupportEntity && !isAirOrLiquid;
if (standingOnSolid) {
return true;
}
}
return original.call(entity);
}
@Inject(
method = "getEyePosition(F)Lnet/minecraft/world/phys/Vec3;",
at = @At("HEAD"),
cancellable = true
)
private void cobblemon$modifyEyePosition_partial(float partialTicks, CallbackInfoReturnable<Vec3> cir) {
var entity = (Entity)(Object)this;
if (entity.level().isClientSide) return;
if (!(entity instanceof Player player)) return;
if (!(player instanceof RidePassenger ridePassenger)) return;
if (!(player.getVehicle() instanceof OrientationControllable vehicle)) return;
var vehicleController = vehicle.getOrientationController();
if (vehicleController == null) return;
// TODO: Determine if it needs partialtick involved.
Vec3 customEyePos = ridePassenger.cobblemon$getRideEyePos();
cir.setReturnValue(customEyePos);
}
@Inject(
method = "getEyePosition()Lnet/minecraft/world/phys/Vec3;",
at = @At("HEAD"),
cancellable = true
)
private void cobblemon$modifyEyePosition_noPartial(CallbackInfoReturnable<Vec3> cir) {
var entity = (Entity)(Object)this;
if (entity.level().isClientSide) return;
if (!(entity instanceof Player player)) return;
if (!(player instanceof RidePassenger ridePassenger)) return;
if (!(player.getVehicle() instanceof OrientationControllable vehicle)) return;
var vehicleController = vehicle.getOrientationController();
if (vehicleController == null) return;
// TODO: Determine if it needs partialtick involved.
Vec3 customEyePos = ridePassenger.cobblemon$getRideEyePos();
cir.setReturnValue(customEyePos);
}
}
@@ -83,10 +83,13 @@ import com.cobblemon.mod.common.net.messages.client.settings.ServerSettingsPacke
import com.cobblemon.mod.common.permission.LaxPermissionValidator
import com.cobblemon.mod.common.platform.events.PlatformEvents
import com.cobblemon.mod.common.pokemon.Pokemon
import com.cobblemon.mod.common.pokemon.aspects.CHARACTERISTIC_RAINBOW_ASPECT
import com.cobblemon.mod.common.pokemon.aspects.COSMETIC_SLOT_ASPECT
import com.cobblemon.mod.common.pokemon.aspects.GENDER_ASPECT
import com.cobblemon.mod.common.pokemon.aspects.SHINY_ASPECT
import com.cobblemon.mod.common.pokemon.evolution.variants.BlockClickEvolution
import com.cobblemon.mod.common.pokemon.feature.SlowpokeTailRegrowthSpeciesFeature
import com.cobblemon.mod.common.pokemon.feature.SlowpokeTailRegrowthSpeciesFeatureProvider
import com.cobblemon.mod.common.pokemon.feature.TagSeasonResolver
import com.cobblemon.mod.common.pokemon.helditem.CobblemonHeldItemManager
import com.cobblemon.mod.common.pokemon.properties.*
@@ -293,6 +296,7 @@ object Cobblemon {
SHINY_ASPECT.register()
GENDER_ASPECT.register()
COSMETIC_SLOT_ASPECT.register()
CHARACTERISTIC_RAINBOW_ASPECT.register()
SpeciesFeatures.types["choice"] = ChoiceSpeciesFeatureProvider::class.java
SpeciesFeatures.types["flag"] = FlagSpeciesFeatureProvider::class.java
@@ -300,7 +304,13 @@ object Cobblemon {
SpeciesFeatures.register(
DataKeys.HAS_BEEN_SHEARED,
FlagSpeciesFeatureProvider(keys = listOf(DataKeys.HAS_BEEN_SHEARED), default = false))
FlagSpeciesFeatureProvider(keys = listOf(DataKeys.HAS_BEEN_SHEARED), default = false)
)
SpeciesFeatures.register(
SlowpokeTailRegrowthSpeciesFeature.NAME,
SlowpokeTailRegrowthSpeciesFeatureProvider
)
CustomPokemonProperty.register(UncatchableProperty)
CustomPokemonProperty.register(BattleCloneProperty)
@@ -11,16 +11,26 @@ package com.cobblemon.mod.common
import net.minecraft.world.entity.schedule.Activity
object CobblemonActivities {
@JvmField
val activities = mutableListOf<Activity>()
@JvmField
val BATTLING = register(Activity("battling"))
@JvmField
val ACTION_EFFECT = register(Activity("action_effect"))
@JvmField
val NPC_CHATTING = register(Activity("npc_chatting"))
@JvmField
val POKEMON_SLEEPING_ACTIVITY = register(Activity("pokemon_sleeping"))
@JvmField
val POKEMON_GROW_CROP = register(Activity("pokemon_grow_crop"))
@JvmField
val POKEMON_SLEEP_ON_TRAINER_BED = register(Activity("pokemon_sleep_on_trainer_bed"))
@JvmField
val POKEMON_HERD = register(Activity("pokemon_herd"))
@JvmField
val POKEMON_POLLINATION = register(Activity("pokemon_pollination"))
@JvmStatic
fun register(activity: Activity): Activity {
activities.add(activity)
return activity
@@ -60,13 +60,13 @@ object CobblemonBlocks : PlatformRegistry<Registry<Block>, ResourceKey<Registry<
// Evolution Ores
@JvmField
val DAWN_STONE_ORE = evolutionStoneOre("dawn_stone_ore")
val DAWN_STONE_ORE = evolutionStoneOre("dawn_stone_ore", 7)
@JvmField
val DUSK_STONE_ORE = evolutionStoneOre("dusk_stone_ore")
@JvmField
val FIRE_STONE_ORE = evolutionStoneOre("fire_stone_ore")
val FIRE_STONE_ORE = evolutionStoneOre("fire_stone_ore", 10)
@JvmField
val NETHER_FIRE_STONE_ORE = evolutionStoneOre("nether_fire_stone_ore")
val NETHER_FIRE_STONE_ORE = this.create("nether_fire_stone_ore", DropExperienceBlock(UniformInt.of(1, 2), BlockBehaviour.Properties.of().mapColor(MapColor.NETHER).instrument(NoteBlockInstrument.BASEDRUM).requiresCorrectToolForDrops().strength(3.0F, 3.0F).sound(SoundType.NETHER_ORE).lightLevel{10}))
@JvmField
val ICE_STONE_ORE = evolutionStoneOre("ice_stone_ore")
@JvmField
@@ -74,24 +74,24 @@ object CobblemonBlocks : PlatformRegistry<Registry<Block>, ResourceKey<Registry<
@JvmField
val MOON_STONE_ORE = evolutionStoneOre("moon_stone_ore")
@JvmField
val DRIPSTONE_MOON_STONE_ORE = evolutionStoneOre("dripstone_moon_stone_ore")
val DRIPSTONE_MOON_STONE_ORE = this.create("dripstone_moon_stone_ore", DropExperienceBlock(UniformInt.of(1, 2), BlockBehaviour.Properties.of().mapColor(MapColor.TERRACOTTA_BROWN).instrument(NoteBlockInstrument.BASEDRUM).requiresCorrectToolForDrops().strength(3.0F, 3.0F).sound(SoundType.DRIPSTONE_BLOCK)))
@JvmField
val SHINY_STONE_ORE = evolutionStoneOre("shiny_stone_ore")
val SHINY_STONE_ORE = evolutionStoneOre("shiny_stone_ore", 12)
@JvmField
val SUN_STONE_ORE = evolutionStoneOre("sun_stone_ore")
val SUN_STONE_ORE = evolutionStoneOre("sun_stone_ore", 2)
@JvmField
val TERRACOTTA_SUN_STONE_ORE = evolutionStoneOre("terracotta_sun_stone_ore")
val TERRACOTTA_SUN_STONE_ORE = this.create("terracotta_sun_stone_ore", DropExperienceBlock(UniformInt.of(1, 2), BlockBehaviour.Properties.of().mapColor(MapColor.COLOR_ORANGE).instrument(NoteBlockInstrument.BASEDRUM).requiresCorrectToolForDrops().strength(3.0F, 3.0F).lightLevel{2}))
@JvmField
val THUNDER_STONE_ORE = evolutionStoneOre("thunder_stone_ore")
val THUNDER_STONE_ORE = evolutionStoneOre("thunder_stone_ore", 6)
@JvmField
val WATER_STONE_ORE = evolutionStoneOre("water_stone_ore")
@JvmField
val DEEPSLATE_DAWN_STONE_ORE = this.deepslateEvolutionStoneOre("deepslate_dawn_stone_ore")
val DEEPSLATE_DAWN_STONE_ORE = this.deepslateEvolutionStoneOre("deepslate_dawn_stone_ore", 7)
@JvmField
val DEEPSLATE_DUSK_STONE_ORE = this.deepslateEvolutionStoneOre("deepslate_dusk_stone_ore")
@JvmField
val DEEPSLATE_FIRE_STONE_ORE = this.deepslateEvolutionStoneOre("deepslate_fire_stone_ore")
val DEEPSLATE_FIRE_STONE_ORE = this.deepslateEvolutionStoneOre("deepslate_fire_stone_ore", 10)
@JvmField
val DEEPSLATE_ICE_STONE_ORE = this.deepslateEvolutionStoneOre("deepslate_ice_stone_ore")
@JvmField
@@ -99,11 +99,11 @@ object CobblemonBlocks : PlatformRegistry<Registry<Block>, ResourceKey<Registry<
@JvmField
val DEEPSLATE_MOON_STONE_ORE = this.deepslateEvolutionStoneOre("deepslate_moon_stone_ore")
@JvmField
val DEEPSLATE_SHINY_STONE_ORE = this.deepslateEvolutionStoneOre("deepslate_shiny_stone_ore")
val DEEPSLATE_SHINY_STONE_ORE = this.deepslateEvolutionStoneOre("deepslate_shiny_stone_ore", 12)
@JvmField
val DEEPSLATE_SUN_STONE_ORE = this.deepslateEvolutionStoneOre("deepslate_sun_stone_ore")
val DEEPSLATE_SUN_STONE_ORE = this.deepslateEvolutionStoneOre("deepslate_sun_stone_ore", 2)
@JvmField
val DEEPSLATE_THUNDER_STONE_ORE = this.deepslateEvolutionStoneOre("deepslate_thunder_stone_ore")
val DEEPSLATE_THUNDER_STONE_ORE = this.deepslateEvolutionStoneOre("deepslate_thunder_stone_ore", 6)
@JvmField
val DEEPSLATE_WATER_STONE_ORE = this.deepslateEvolutionStoneOre("deepslate_water_stone_ore")
@@ -128,7 +128,7 @@ object CobblemonBlocks : PlatformRegistry<Registry<Block>, ResourceKey<Registry<
@JvmField
val APRICORN_FENCE = this.create("apricorn_fence", FenceBlock(BlockBehaviour.Properties.of().mapColor(APRICORN_PLANKS.defaultMapColor()).instrument(NoteBlockInstrument.BASS).strength(2.0f, 3.0f).sound(SoundType.WOOD)))
@JvmField
val APRICORN_FENCE_GATE = this.create("apricorn_fence_gate", FenceGateBlock(APRICORN_WOOD_TYPE, BlockBehaviour.Properties.of().mapColor(APRICORN_PLANKS.defaultMapColor()).strength(2.0f, 3.0f).sound(SoundType.WOOD)))
val APRICORN_FENCE_GATE = this.create("apricorn_fence_gate", FenceGateBlock(APRICORN_WOOD_TYPE, BlockBehaviour.Properties.of().mapColor(APRICORN_PLANKS.defaultMapColor()).strength(2.0f, 3.0f).sound(SoundType.WOOD).ignitedByLava().forceSolidOn()))
@JvmField
val APRICORN_BUTTON = this.create("apricorn_button", BlocksInvoker.createWoodenButtonBlock(APRICORN_BLOCK_SET_TYPE))
@JvmField
@@ -205,7 +205,7 @@ object CobblemonBlocks : PlatformRegistry<Registry<Block>, ResourceKey<Registry<
@JvmField
val SACCHARINE_FENCE = this.create("saccharine_fence", FenceBlock(BlockBehaviour.Properties.of().mapColor(SACCHARINE_PLANKS.defaultMapColor()).instrument(NoteBlockInstrument.BASS).strength(2.0f, 3.0f).sound(SoundType.WOOD)))
@JvmField
val SACCHARINE_FENCE_GATE = this.create("saccharine_fence_gate", FenceGateBlock(SACCHARINE_WOOD_TYPE, BlockBehaviour.Properties.of().mapColor(SACCHARINE_PLANKS.defaultMapColor()).instrument(NoteBlockInstrument.BASS).strength(2.0f, 3.0f).sound(SoundType.WOOD)))
val SACCHARINE_FENCE_GATE = this.create("saccharine_fence_gate", FenceGateBlock(SACCHARINE_WOOD_TYPE, BlockBehaviour.Properties.of().mapColor(SACCHARINE_PLANKS.defaultMapColor()).instrument(NoteBlockInstrument.BASS).strength(2.0f, 3.0f).sound(SoundType.WOOD).ignitedByLava().forceSolidOn()))
@JvmField
val SACCHARINE_BUTTON = this.create("saccharine_button", BlocksInvoker.createWoodenButtonBlock(BlockSetType.OAK))
@JvmField
@@ -213,7 +213,7 @@ object CobblemonBlocks : PlatformRegistry<Registry<Block>, ResourceKey<Registry<
@JvmField
val SACCHARINE_SIGN = this.create("saccharine_sign", CobblemonSignBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.OAK_SIGN), SACCHARINE_WOOD_TYPE))
@JvmField
val SACCHARINE_WALL_SIGN = this.create("saccharine_wall_sign", CobblemonWallSignBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.OAK_WALL_SIGN), SACCHARINE_WOOD_TYPE))
val SACCHARINE_WALL_SIGN = this.create("saccharine_wall_sign", CobblemonWallSignBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.OAK_SIGN), SACCHARINE_WOOD_TYPE))
@JvmField
val SACCHARINE_HANGING_SIGN = this.create("saccharine_hanging_sign", CobblemonHangingSignBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.OAK_WALL_HANGING_SIGN), SACCHARINE_WOOD_TYPE))
@JvmField
@@ -454,7 +454,7 @@ object CobblemonBlocks : PlatformRegistry<Registry<Block>, ResourceKey<Registry<
@JvmField
val SOUL_CAMPFIRE = create("soul_campfire", CampfireBlock(BlockBehaviour.Properties.of().sound(SoundType.WOOD).noOcclusion().pushReaction(PushReaction.BLOCK).mapColor(MapColor.PODZOL).strength(2.0F).lightLevel{9}, true))
@JvmField
val RELIC_COIN_POUCH = create("relic_coin_pouch", CoinPouchBlock(BlockBehaviour.Properties.of().sound(CobblemonSounds.RELIC_COIN_POUCH_SOUNDS).pushReaction(PushReaction.DESTROY).noOcclusion(), true))
@JvmField
@@ -577,74 +577,145 @@ object CobblemonBlocks : PlatformRegistry<Registry<Block>, ResourceKey<Registry<
private val berries = mutableMapOf<ResourceLocation, BerryBlock>()
@JvmField
val AGUAV_BERRY = this.berryBlock("aguav")
@JvmField
val APICOT_BERRY = this.berryBlock("apicot")
@JvmField
val ASPEAR_BERRY = this.berryBlock("aspear")
@JvmField
val BABIRI_BERRY = this.berryBlock("babiri")
@JvmField
val BELUE_BERRY = this.berryBlock("belue")
@JvmField
val BLUK_BERRY = this.berryBlock("bluk")
@JvmField
val CHARTI_BERRY = this.berryBlock("charti")
@JvmField
val CHERI_BERRY = this.berryBlock("cheri")
@JvmField
val CHESTO_BERRY = this.berryBlock("chesto")
@JvmField
val CHILAN_BERRY = this.berryBlock("chilan")
@JvmField
val CHOPLE_BERRY = this.berryBlock("chople")
@JvmField
val COBA_BERRY = this.berryBlock("coba")
@JvmField
val COLBUR_BERRY = this.berryBlock("colbur")
@JvmField
val CORNN_BERRY = this.berryBlock("cornn")
@JvmField
val CUSTAP_BERRY = this.berryBlock("custap")
@JvmField
val DURIN_BERRY = this.berryBlock("durin")
@JvmField
val EGGANT_BERRY = this.berryBlock("eggant")
@JvmField
val ENIGMA_BERRY = this.berryBlock("enigma")
@JvmField
val FIGY_BERRY = this.berryBlock("figy")
@JvmField
val GANLON_BERRY = this.berryBlock("ganlon")
@JvmField
val GREPA_BERRY = this.berryBlock("grepa")
@JvmField
val HABAN_BERRY = this.berryBlock("haban")
@JvmField
val HONDEW_BERRY = this.berryBlock("hondew")
@JvmField
val HOPO_BERRY = this.berryBlock("hopo")
@JvmField
val IAPAPA_BERRY = this.berryBlock("iapapa")
@JvmField
val JABOCA_BERRY = this.berryBlock("jaboca")
@JvmField
val KASIB_BERRY = this.berryBlock("kasib")
@JvmField
val KEBIA_BERRY = this.berryBlock("kebia")
@JvmField
val KEE_BERRY = this.berryBlock("kee")
@JvmField
val KELPSY_BERRY = this.berryBlock("kelpsy")
@JvmField
val LANSAT_BERRY = this.berryBlock("lansat")
@JvmField
val LEPPA_BERRY = this.berryBlock("leppa")
@JvmField
val LIECHI_BERRY = this.berryBlock("liechi")
@JvmField
val LUM_BERRY = this.berryBlock("lum")
@JvmField
val MAGO_BERRY = this.berryBlock("mago")
@JvmField
val MAGOST_BERRY = this.berryBlock("magost")
@JvmField
val MARANGA_BERRY = this.berryBlock("maranga")
@JvmField
val MICLE_BERRY = this.berryBlock("micle")
@JvmField
val NANAB_BERRY = this.berryBlock("nanab")
@JvmField
val NOMEL_BERRY = this.berryBlock("nomel")
@JvmField
val OCCA_BERRY = this.berryBlock("occa")
@JvmField
val ORAN_BERRY = this.berryBlock("oran")
@JvmField
val PAMTRE_BERRY = this.berryBlock("pamtre")
@JvmField
val PASSHO_BERRY = this.berryBlock("passho")
@JvmField
val PAYAPA_BERRY = this.berryBlock("payapa")
@JvmField
val PECHA_BERRY = this.berryBlock("pecha")
@JvmField
val PERSIM_BERRY = this.berryBlock("persim")
@JvmField
val PETAYA_BERRY = this.berryBlock("petaya")
@JvmField
val PINAP_BERRY = this.berryBlock("pinap")
@JvmField
val POMEG_BERRY = this.berryBlock("pomeg")
@JvmField
val QUALOT_BERRY = this.berryBlock("qualot")
@JvmField
val RABUTA_BERRY = this.berryBlock("rabuta")
@JvmField
val RAWST_BERRY = this.berryBlock("rawst")
@JvmField
val RAZZ_BERRY = this.berryBlock("razz")
@JvmField
val RINDO_BERRY = this.berryBlock("rindo")
@JvmField
val ROSELI_BERRY = this.berryBlock("roseli")
@JvmField
val ROWAP_BERRY = this.berryBlock("rowap")
@JvmField
val SALAC_BERRY = this.berryBlock("salac")
@JvmField
val SHUCA_BERRY = this.berryBlock("shuca")
@JvmField
val SITRUS_BERRY = this.berryBlock("sitrus")
@JvmField
val SPELON_BERRY = this.berryBlock("spelon")
@JvmField
val STARF_BERRY = this.berryBlock("starf")
@JvmField
val TAMATO_BERRY = this.berryBlock("tamato")
@JvmField
val TANGA_BERRY = this.berryBlock("tanga")
@JvmField
val TOUGA_BERRY = this.berryBlock("touga")
@JvmField
val WACAN_BERRY = this.berryBlock("wacan")
@JvmField
val WATMEL_BERRY = this.berryBlock("watmel")
@JvmField
val WEPEAR_BERRY = this.berryBlock("wepear")
@JvmField
val WIKI_BERRY = this.berryBlock("wiki")
@JvmField
val YACHE_BERRY = this.berryBlock("yache")
//val BINDING_SOIL = this.create("binding_soil", BindingSoilBlock(BlockBehaviour.Properties.of()))
@@ -712,8 +783,10 @@ object CobblemonBlocks : PlatformRegistry<Registry<Block>, ResourceKey<Registry<
}
private fun evolutionStoneOre(name: String) = this.create(name, DropExperienceBlock(UniformInt.of(1, 2), BlockBehaviour.Properties.ofFullCopy(Blocks.IRON_ORE)))
private fun evolutionStoneOre(name: String, lightLevel: Int) = this.create(name, DropExperienceBlock(UniformInt.of(1, 2), BlockBehaviour.Properties.ofFullCopy(Blocks.IRON_ORE).lightLevel { lightLevel }))
private fun deepslateEvolutionStoneOre(name: String) = this.create(name, DropExperienceBlock(UniformInt.of(1, 2), BlockBehaviour.Properties.ofFullCopy(Blocks.DEEPSLATE_IRON_ORE)))
private fun deepslateEvolutionStoneOre(name: String, lightLevel: Int) = this.create(name, DropExperienceBlock(UniformInt.of(1, 2), BlockBehaviour.Properties.ofFullCopy(Blocks.DEEPSLATE_IRON_ORE).lightLevel { lightLevel }))
/**
* Helper method for creating leaves
@@ -43,6 +43,7 @@ object CobblemonCosmeticItems : JsonDataRegistry<CosmeticItemAssignment> {
.registerTypeAdapter(ResourceLocation::class.java, IdentifierAdapter)
.create()
@JvmField
val cosmeticItems = mutableListOf<CosmeticItemAssignment>()
override fun reload(data: Map<ResourceLocation, CosmeticItemAssignment>) {
@@ -55,7 +56,9 @@ object CobblemonCosmeticItems : JsonDataRegistry<CosmeticItemAssignment> {
CosmeticItemAssignmentSyncPacket(cosmeticItems).sendToPlayer(player)
}
@JvmStatic
fun findValidForPokemon(pokemon: Pokemon) = cosmeticItems.filter { it.pokemon.any { it.matches(pokemon) } }
@JvmStatic
fun findValidCosmeticForPokemonAndItem(registryAccess: RegistryAccess, pokemon: Pokemon, itemStack: ItemStack) = cosmeticItems
.filter { it.pokemon.any { it.matches(pokemon) } }
.flatMap { it.cosmeticItems }
@@ -21,56 +21,73 @@ import net.minecraft.resources.ResourceLocation
object CobblemonItemComponents : PlatformRegistry<Registry<DataComponentType<*>>, ResourceKey<Registry<DataComponentType<*>>>, DataComponentType<*>>() {
@JvmField
val POKEMON_ITEM: DataComponentType<PokemonItemComponent> = create("pokemon_item", DataComponentType.builder<PokemonItemComponent>()
.persistent(PokemonItemComponent.CODEC)
.networkSynchronized(PokemonItemComponent.PACKET_CODEC)
.build())
val HELD_ITEM_REP: DataComponentType<HeldItemCapableComponent> = DataComponentType.builder<HeldItemCapableComponent>()
.persistent(HeldItemCapableComponent.CODEC)
.networkSynchronized(HeldItemCapableComponent.PACKET_CODEC)
.build()
@JvmField
val HELD_ITEM_EFFECT: DataComponentType<HeldItemEffectComponent> = create("held_item_effect", DataComponentType.builder<HeldItemEffectComponent>()
.persistent(HeldItemEffectComponent.CODEC)
.networkSynchronized(HeldItemEffectComponent.PACKET_CODEC)
.build())
@JvmField
val BAIT: DataComponentType<RodBaitComponent> = create("bait", DataComponentType.builder<RodBaitComponent>()
.persistent(RodBaitComponent.CODEC)
.networkSynchronized(RodBaitComponent.PACKET_CODEC)
.build())
@JvmField
val POT_DATA: DataComponentType<PotComponent> = create("cooking_pot_item", DataComponentType.builder<PotComponent>()
.persistent(PotComponent.CODEC)
.networkSynchronized(PotComponent.PACKET_CODEC)
.build())
@JvmField
val BAIT_EFFECTS: DataComponentType<BaitEffectsComponent> = create("bait_effects", DataComponentType.builder<BaitEffectsComponent>()
.persistent(BaitEffectsComponent.CODEC)
.networkSynchronized(BaitEffectsComponent.PACKET_CODEC)
.build())
@JvmField
val FLAVOUR: DataComponentType<FlavourComponent> = create("flavour", DataComponentType.builder<FlavourComponent>()
.persistent(FlavourComponent.CODEC)
.networkSynchronized(FlavourComponent.PACKET_CODEC)
.build())
@JvmField
val RIDE_BOOST: DataComponentType<RideBoostsComponent> = create("ride_boosts", DataComponentType.builder<RideBoostsComponent>()
.persistent(RideBoostsComponent.CODEC)
.networkSynchronized(RideBoostsComponent.PACKET_CODEC)
.build())
@JvmField
val FOOD_COLOUR: DataComponentType<FoodColourComponent> = create("food_colour", DataComponentType.builder<FoodColourComponent>()
.persistent(FoodColourComponent.CODEC)
.networkSynchronized(FoodColourComponent.PACKET_CODEC)
.build())
@JvmField
val INGREDIENT: DataComponentType<IngredientComponent> = create("ingredient", DataComponentType.builder<IngredientComponent>()
.persistent(IngredientComponent.CODEC)
.networkSynchronized(IngredientComponent.PACKET_CODEC)
.build())
@JvmField
val FOOD: DataComponentType<FoodComponent> = create("food", DataComponentType.builder<FoodComponent>()
.persistent(FoodComponent.CODEC)
.networkSynchronized(FoodComponent.PACKET_CODEC)
.build())
@JvmField
val MOB_EFFECTS: DataComponentType<MobEffectsComponent> = create("mob_effects", DataComponentType.builder<MobEffectsComponent>()
.persistent(MobEffectsComponent.CODEC)
.networkSynchronized(MobEffectsComponent.PACKET_CODEC)
.build())
@JvmField
val CRAFTED: DataComponentType<Boolean> = create("crafted", DataComponentType.builder<Boolean>()
.persistent(Codec.BOOL)
.networkSynchronized(ByteBufCodecs.BOOL)
@@ -82,10 +99,12 @@ object CobblemonItemComponents : PlatformRegistry<Registry<DataComponentType<*>>
Registry.register(BuiltInRegistries.DATA_COMPONENT_TYPE, ResourceLocation.parse("cobblemon:cooking_pot_item"), POT_DATA)
Registry.register(BuiltInRegistries.DATA_COMPONENT_TYPE, ResourceLocation.parse("cobblemon:bait_effects"), BAIT_EFFECTS)
Registry.register(BuiltInRegistries.DATA_COMPONENT_TYPE, ResourceLocation.parse("cobblemon:flavour"), FLAVOUR)
Registry.register(BuiltInRegistries.DATA_COMPONENT_TYPE, ResourceLocation.parse("cobblemon:ride_boosts"), RIDE_BOOST)
Registry.register(BuiltInRegistries.DATA_COMPONENT_TYPE, ResourceLocation.parse("cobblemon:food_colour"), FOOD_COLOUR)
Registry.register(BuiltInRegistries.DATA_COMPONENT_TYPE, ResourceLocation.parse("cobblemon:ingredient"), INGREDIENT)
Registry.register(BuiltInRegistries.DATA_COMPONENT_TYPE, ResourceLocation.parse("cobblemon:food"), FOOD)
Registry.register(BuiltInRegistries.DATA_COMPONENT_TYPE, ResourceLocation.parse("cobblemon:mob_effects"), MOB_EFFECTS)
Registry.register(BuiltInRegistries.DATA_COMPONENT_TYPE, ResourceLocation.parse("cobblemon:held_item_effect"), HELD_ITEM_EFFECT)
}
override val registry = BuiltInRegistries.DATA_COMPONENT_TYPE
@@ -22,6 +22,7 @@ import com.cobblemon.mod.common.block.BerryBlock
import com.cobblemon.mod.common.block.MintBlock
import com.cobblemon.mod.common.block.MintBlock.MintType
import com.cobblemon.mod.common.client.pokedex.PokedexType
import com.cobblemon.mod.common.block.campfirepot.CampfirePotColor
import com.cobblemon.mod.common.entity.boat.CobblemonBoatType
import com.cobblemon.mod.common.item.*
import com.cobblemon.mod.common.item.armor.CobblemonArmorTrims
@@ -35,7 +36,7 @@ import com.cobblemon.mod.common.item.berry.PPRestoringBerryItem
import com.cobblemon.mod.common.item.berry.PortionHealingBerryItem
import com.cobblemon.mod.common.item.berry.StatusCuringBerryItem
import com.cobblemon.mod.common.item.berry.VolatileCuringBerryItem
import com.cobblemon.mod.common.item.food.PonigiriItem
import com.cobblemon.mod.common.item.interactive.PonigiriItem
import com.cobblemon.mod.common.item.food.SinisterTeaItem
import com.cobblemon.mod.common.item.interactive.*
import com.cobblemon.mod.common.item.interactive.ability.AbilityChangeItem
@@ -192,19 +193,19 @@ object CobblemonItems : PlatformRegistry<Registry<Item>, ResourceKey<Registry<It
val campfire_pots = mutableListOf<CampfirePotItem>()
@JvmField
val CAMPFIRE_POT_RED = campfirePotItem(CobblemonBlocks.RED_CAMPFIRE_POT, "red")
val CAMPFIRE_POT_RED = campfirePotItem(CobblemonBlocks.RED_CAMPFIRE_POT, CampfirePotColor.RED)
@JvmField
val CAMPFIRE_POT_YELLOW = campfirePotItem(CobblemonBlocks.YELLOW_CAMPFIRE_POT, "yellow")
val CAMPFIRE_POT_YELLOW = campfirePotItem(CobblemonBlocks.YELLOW_CAMPFIRE_POT, CampfirePotColor.YELLOW)
@JvmField
val CAMPFIRE_POT_GREEN = campfirePotItem(CobblemonBlocks.GREEN_CAMPFIRE_POT, "green")
val CAMPFIRE_POT_GREEN = campfirePotItem(CobblemonBlocks.GREEN_CAMPFIRE_POT, CampfirePotColor.GREEN)
@JvmField
val CAMPFIRE_POT_BLUE = campfirePotItem(CobblemonBlocks.BLUE_CAMPFIRE_POT, "blue")
val CAMPFIRE_POT_BLUE = campfirePotItem(CobblemonBlocks.BLUE_CAMPFIRE_POT, CampfirePotColor.BLUE)
@JvmField
val CAMPFIRE_POT_PINK = campfirePotItem(CobblemonBlocks.PINK_CAMPFIRE_POT, "pink")
val CAMPFIRE_POT_PINK = campfirePotItem(CobblemonBlocks.PINK_CAMPFIRE_POT, CampfirePotColor.PINK)
@JvmField
val CAMPFIRE_POT_BLACK = campfirePotItem(CobblemonBlocks.BLACK_CAMPFIRE_POT, "black")
val CAMPFIRE_POT_BLACK = campfirePotItem(CobblemonBlocks.BLACK_CAMPFIRE_POT, CampfirePotColor.BLACK)
@JvmField
val CAMPFIRE_POT_WHITE = campfirePotItem(CobblemonBlocks.WHITE_CAMPFIRE_POT, "white")
val CAMPFIRE_POT_WHITE = campfirePotItem(CobblemonBlocks.WHITE_CAMPFIRE_POT, CampfirePotColor.WHITE)
@JvmField
val HEARTY_GRAINS = compostableItem("hearty_grains", ItemNameBlockItem(CobblemonBlocks.HEARTY_GRAINS, Properties().rarity(Rarity.COMMON)))
@@ -516,6 +517,7 @@ object CobblemonItems : PlatformRegistry<Registry<Item>, ResourceKey<Registry<It
@JvmField val RAWST_BERRY = berryItem("rawst", StatusCuringBerryItem(CobblemonBlocks.RAWST_BERRY, Statuses.BURN))
@JvmField val ASPEAR_BERRY = berryItem("aspear", StatusCuringBerryItem(CobblemonBlocks.ASPEAR_BERRY, Statuses.FROZEN))
@JvmField val PERSIM_BERRY = berryItem("persim", VolatileCuringBerryItem(CobblemonBlocks.PERSIM_BERRY, "confusion"))
@JvmField val EGGANT_BERRY = berryItem("eggant", VolatileCuringBerryItem(CobblemonBlocks.EGGANT_BERRY, "attract"))
@JvmField val RAZZ_BERRY = berryItem("razz", CobblemonBlocks.RAZZ_BERRY)
@JvmField val BLUK_BERRY = berryItem("bluk", CobblemonBlocks.BLUK_BERRY)
@JvmField val NANAB_BERRY = berryItem("nanab", CobblemonBlocks.NANAB_BERRY)
@@ -695,7 +697,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))
@@ -1500,8 +1502,8 @@ object CobblemonItems : PlatformRegistry<Registry<Item>, ResourceKey<Registry<It
}
)
private fun campfirePotItem(block: Block, type: String): CampfirePotItem {
val item = create("campfire_pot_${type}", CampfirePotItem(block))
private fun campfirePotItem(block: Block, color: CampfirePotColor): CampfirePotItem {
val item = create("campfire_pot_${color.suffix}", CampfirePotItem(block, color))
campfire_pots.add(item)
return item
}
@@ -1648,4 +1650,4 @@ object CobblemonItems : PlatformRegistry<Registry<Item>, ResourceKey<Registry<It
private fun foodItem(nutrition: Int, saturationModifier: Float): Item {
return CobblemonItem(Item.Properties().food(FoodProperties.Builder().nutrition(nutrition).saturationModifier(saturationModifier).build()))
}
}
}
@@ -12,9 +12,12 @@ import com.bedrockk.molang.Expression
import com.cobblemon.mod.common.api.data.DataRegistry
import com.cobblemon.mod.common.api.molang.ExpressionLike
import com.cobblemon.mod.common.api.reactive.SimpleObservable
import com.cobblemon.mod.common.mechanics.AprijuicesMechanic
import com.cobblemon.mod.common.mechanics.BerriesMechanic
import com.cobblemon.mod.common.mechanics.PotionsMechanic
import com.cobblemon.mod.common.mechanics.RemediesMechanic
import com.cobblemon.mod.common.mechanics.SlowpokeTailsMechanic
import com.cobblemon.mod.common.net.messages.client.data.CobblemonMechanicsSyncPacket
import com.cobblemon.mod.common.util.adapters.ExpressionAdapter
import com.cobblemon.mod.common.util.adapters.ExpressionLikeAdapter
import com.cobblemon.mod.common.util.cobblemonResource
@@ -37,12 +40,25 @@ object CobblemonMechanics : DataRegistry {
var remedies = RemediesMechanic()
var berries = BerriesMechanic()
var potions = PotionsMechanic()
var aprijuices = AprijuicesMechanic()
var slowpokeTails = SlowpokeTailsMechanic()
override fun sync(player: ServerPlayer) {
CobblemonMechanicsSyncPacket(
this.remedies,
this.berries,
this.potions,
this.aprijuices,
this.slowpokeTails
).sendToPlayer(player)
}
override fun sync(player: ServerPlayer) {}
override fun reload(manager: ResourceManager) {
remedies = loadMechanic(manager, "remedies", RemediesMechanic::class.java)
berries = loadMechanic(manager, "berries", BerriesMechanic::class.java)
potions = loadMechanic(manager, "potions", PotionsMechanic::class.java)
aprijuices = loadMechanic(manager, "aprijuices", AprijuicesMechanic::class.java)
slowpokeTails = loadMechanic(manager, "slowpoke_tails", SlowpokeTailsMechanic::class.java)
}
private fun <T> loadMechanic(manager: ResourceManager, name: String, clazz: Class<T>): T {
@@ -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<*>>()
@@ -30,46 +30,80 @@ object CobblemonMemories {
* get serialized during relogs. This makes sense for things like battles which
* do not survive a relog therefore any memory of it should be temporary.
*/
@JvmField
val BATTLING_POKEMON = register("battling_pokemon", ListCodec(UUIDUtil.CODEC, 0, 31))
@JvmField
val NPC_BATTLING = register("npc_battling", PrimitiveCodec.BOOL)
@JvmField
val DIALOGUES = register<List<ActiveDialogue>>("npc_dialogues")
@JvmField
val ACTIVE_ACTION_EFFECT = register<ActionEffectContext>("active_action_effect")
@JvmField
val POKEMON_FLYING = register("pokemon_flying", PrimitiveCodec.BOOL)
@JvmField
val POKEMON_DROWSY = register("pokemon_drowsy", PrimitiveCodec.BOOL)
@JvmField
val POKEMON_SLEEPING = register("pokemon_sleeping", PrimitiveCodec.BOOL)
@JvmField
val POKEMON_BATTLE = register<UUID>("pokemon_battle")
@JvmField
val PATH_COOLDOWN = register<Boolean>("path_cooldown")
@JvmField
val TARGETED_BATTLE_POKEMON = register<UUID>("targeted_battle_pokemon")
@JvmField
val NEAREST_VISIBLE_ATTACKER = register<LivingEntity>("nearest_visible_attacker")
@JvmField
val NEARBY_GROWABLE_CROPS = register<BlockPos>("nearby_growable_crops")
@JvmField
val NEARBY_SWEET_BERRY_BUSH = register<BlockPos>("nearest_sweet_berry_bush")
@JvmField
val DISABLE_WALK_TO_BERRY_BUSH = register<Boolean>("disable_walk_to_berry_bush")
@JvmField
val TIME_TRYING_TO_REACH_BERRY_BUSH = register<Int>("time_trying_to_reach_berry_bush")
@JvmField
val IS_CONSUMING_ITEM = register<Boolean>("is_consuming_item")
@JvmField
val RECENTLY_ATE_GRASS = register<Boolean>("recently_ate_grass")
val HIVE_LOCATION = register<BlockPos>("hive_location")
@JvmField
val HIVE_LOCATION = register<BlockPos>("hive_location", BlockPos.CODEC)
@JvmField
val HIVE_BLACKLIST = register<List<BlockPos>>("hive_blacklist")
@JvmField
val HIVE_COOLDOWN = register<Boolean>("hive_cooldown")
val NEARBY_FLOWERS = register<List<BlockPos>>("nearby_flower")
val POLLINATED = register<Boolean>("pollinated", PrimitiveCodec.BOOL)
@JvmField
val NEARBY_FLOWER = register<BlockPos>("nearby_flower", BlockPos.CODEC)
@JvmField
val PATH_TO_NEARBY_FLOWER_COOLDOWN = register<Boolean>("path_to_nearby_flower_cooldown")
@JvmField
val HAS_NECTAR = register<Boolean>("has_nectar", PrimitiveCodec.BOOL)
@JvmField
val NEARBY_SACC_LEAVES = register<BlockPos>("nearby_sacc_leaves", BlockPos.CODEC)
/** who am i following rn? */
@JvmField
val HERD_LEADER = register<String>("herd_leader", PrimitiveCodec.STRING)
/** how many are following me rn? */
@JvmField
val HERD_SIZE = register<Int>("herd_size") // Don't bother saving it, we'll try to keep count roughly.
@JvmField
val ATTACK_TARGET_DATA = register<CobblemonAttackTargetData>("attack_target_data") // This is used to store additional information about the attack target, such as when to give up pursuit.
@JvmField
val WANDER_CONTROL = register<CobblemonWanderControl>("wander_control")
@JvmField
val DISABLE_WALK_TO_WANTED_ITEM = register<Boolean>("disable_walk_to_wanted_item")
@JvmField
val TIME_TRYING_TO_REACH_WANTED_ITEM = register<Int>("time_trying_to_wanted_item")
@JvmStatic
fun <U> register(id: String, codec: Codec<U>): MemoryModuleType<U> {
val memoryModule = MemoryModuleType(Optional.of(codec))
memories[id] = memoryModule
return memoryModule
}
@JvmStatic
fun <U> register(id: String): MemoryModuleType<U> {
val memoryModule = MemoryModuleType<U>(Optional.empty())
memories[id] = memoryModule
return memoryModule
}
}
}
@@ -9,8 +9,8 @@
package com.cobblemon.mod.common
import com.cobblemon.mod.common.api.net.NetworkPacket
import com.cobblemon.mod.common.client.net.OpenBehaviourEditorHandler
import com.cobblemon.mod.common.client.net.CalculateSeatPositionsHandler
import com.cobblemon.mod.common.client.net.OpenBehaviourEditorHandler
import com.cobblemon.mod.common.client.net.PlayerInteractOptionsHandler
import com.cobblemon.mod.common.client.net.SetClientPlayerDataHandler
import com.cobblemon.mod.common.client.net.animation.PlayPosableAnimationHandler
@@ -19,8 +19,9 @@ import com.cobblemon.mod.common.client.net.callback.move.OpenMoveCallbackHandler
import com.cobblemon.mod.common.client.net.callback.party.OpenPartyCallbackHandler
import com.cobblemon.mod.common.client.net.callback.partymove.OpenPartyMoveCallbackHandler
import com.cobblemon.mod.common.client.net.cooking.ToggleCookingPotLidHandler
import com.cobblemon.mod.common.client.net.data.CobblemonMechanicsSyncHandler
import com.cobblemon.mod.common.client.net.data.DataRegistrySyncPacketHandler
import com.cobblemon.mod.common.client.net.data.UnlockReloadPacketHandler
import com.cobblemon.mod.common.client.net.data.RideSettingsSyncHandler
import com.cobblemon.mod.common.client.net.dialogue.DialogueClosedHandler
import com.cobblemon.mod.common.client.net.dialogue.DialogueOpenedHandler
import com.cobblemon.mod.common.client.net.effect.PokeSnackBlockParticlesHandler
@@ -28,12 +29,13 @@ import com.cobblemon.mod.common.client.net.effect.RunPosableMoLangHandler
import com.cobblemon.mod.common.client.net.effect.SaccharineLogBlockParticlesHandler
import com.cobblemon.mod.common.client.net.effect.SpawnSnowstormEntityParticleHandler
import com.cobblemon.mod.common.client.net.effect.SpawnSnowstormParticleHandler
import com.cobblemon.mod.common.client.net.gui.ExpGainedDataPacketHandler
import com.cobblemon.mod.common.client.net.gui.InteractPokemonUIPacketHandler
import com.cobblemon.mod.common.client.net.gui.PokedexUIPacketHandler
import com.cobblemon.mod.common.client.net.gui.SummaryUIPacketHandler
import com.cobblemon.mod.common.client.net.npc.CloseNPCEditorHandler
import com.cobblemon.mod.common.client.net.npc.OpenNPCEditorHandler
import com.cobblemon.mod.common.client.net.orientation.S2CUpdateOrientationHandler
import com.cobblemon.mod.common.client.net.orientation.ClientboundUpdateOrientationHandler
import com.cobblemon.mod.common.client.net.pasture.ClosePastureHandler
import com.cobblemon.mod.common.client.net.pasture.OpenPastureHandler
import com.cobblemon.mod.common.client.net.pasture.PokemonPasturedHandler
@@ -65,8 +67,8 @@ import com.cobblemon.mod.common.client.net.trade.TradeProcessStartedHandler
import com.cobblemon.mod.common.client.net.trade.TradeStartedHandler
import com.cobblemon.mod.common.client.net.trade.TradeUpdatedHandler
import com.cobblemon.mod.common.net.PacketRegisterInfo
import com.cobblemon.mod.common.net.messages.client.OpenBehaviourEditorPacket
import com.cobblemon.mod.common.net.messages.client.CalculateSeatPositionsPacket
import com.cobblemon.mod.common.net.messages.client.OpenBehaviourEditorPacket
import com.cobblemon.mod.common.net.messages.client.PlayerInteractOptionsPacket
import com.cobblemon.mod.common.net.messages.client.SetClientPlayerDataPacket
import com.cobblemon.mod.common.net.messages.client.animation.PlayPosableAnimationPacket
@@ -132,6 +134,7 @@ import com.cobblemon.mod.common.net.messages.client.trade.TradeOfferNotification
import com.cobblemon.mod.common.net.messages.client.trade.TradeProcessStartedPacket
import com.cobblemon.mod.common.net.messages.client.trade.TradeStartedPacket
import com.cobblemon.mod.common.net.messages.client.trade.TradeUpdatedPacket
import com.cobblemon.mod.common.net.messages.client.ui.ExpGainedDataPacket
import com.cobblemon.mod.common.net.messages.client.ui.InteractPokemonUIPacket
import com.cobblemon.mod.common.net.messages.client.ui.PokedexUIPacket
import com.cobblemon.mod.common.net.messages.client.ui.SummaryUIPacket
@@ -157,6 +160,7 @@ import com.cobblemon.mod.common.net.messages.server.callback.party.PartyPokemonS
import com.cobblemon.mod.common.net.messages.server.callback.party.PartySelectCancelledPacket
import com.cobblemon.mod.common.net.messages.server.callback.partymove.PartyMoveSelectCancelledPacket
import com.cobblemon.mod.common.net.messages.server.callback.partymove.PartyPokemonMoveSelectedPacket
import com.cobblemon.mod.common.net.messages.server.debug.ServerboundUpdateRidingSettingsPacket
import com.cobblemon.mod.common.net.messages.server.debug.ServerboundUpdateRidingStatRangePacket
import com.cobblemon.mod.common.net.messages.server.debug.ServerboundUpdateRidingStatsPacket
import com.cobblemon.mod.common.net.messages.server.dialogue.EscapeDialoguePacket
@@ -170,14 +174,15 @@ import com.cobblemon.mod.common.net.messages.server.pasture.UnpasturePokemonPack
import com.cobblemon.mod.common.net.messages.server.pokedex.scanner.FinishScanningPacket
import com.cobblemon.mod.common.net.messages.server.pokedex.scanner.StartScanningPacket
import com.cobblemon.mod.common.net.messages.server.pokemon.interact.InteractPokemonPacket
import com.cobblemon.mod.common.net.messages.server.pokemon.update.SetItemHiddenPacket
import com.cobblemon.mod.common.net.messages.server.pokemon.update.SetNicknamePacket
import com.cobblemon.mod.common.net.messages.server.pokemon.update.SetActiveMarkPacket
import com.cobblemon.mod.common.net.messages.server.pokemon.update.SetMarkingsPacket
import com.cobblemon.mod.common.net.messages.server.pokemon.update.ServerboundUpdateRidingStatePacket
import com.cobblemon.mod.common.net.messages.server.pokemon.update.SetActiveMarkPacket
import com.cobblemon.mod.common.net.messages.server.pokemon.update.SetItemHiddenPacket
import com.cobblemon.mod.common.net.messages.server.pokemon.update.SetMarkingsPacket
import com.cobblemon.mod.common.net.messages.server.pokemon.update.SetNicknamePacket
import com.cobblemon.mod.common.net.messages.server.pokemon.update.evolution.AcceptEvolutionPacket
import com.cobblemon.mod.common.net.messages.server.riding.DismountPokemonPacket
import com.cobblemon.mod.common.net.messages.server.riding.ServerboundUpdateDriverInputPacket
import com.cobblemon.mod.common.net.messages.server.riding.ServerboundUpdateRiderRotationPacket
import com.cobblemon.mod.common.net.messages.server.starter.RequestStarterScreenPacket
import com.cobblemon.mod.common.net.messages.server.storage.SwapPCPartyPokemonPacket
import com.cobblemon.mod.common.net.messages.server.storage.party.MovePartyPokemonPacket
@@ -208,13 +213,14 @@ import com.cobblemon.mod.common.net.serverhandling.callback.party.PartyPokemonSe
import com.cobblemon.mod.common.net.serverhandling.callback.party.PartySelectCancelledHandler
import com.cobblemon.mod.common.net.serverhandling.callback.partymove.PartyMoveSelectCancelledHandler
import com.cobblemon.mod.common.net.serverhandling.callback.partymove.PartyPokemonMoveSelectedHandler
import com.cobblemon.mod.common.net.serverhandling.debug.ServerboundUpdateRidingSettingsHandler
import com.cobblemon.mod.common.net.serverhandling.debug.ServerboundUpdateRidingStatRangeHandler
import com.cobblemon.mod.common.net.serverhandling.debug.ServerboundUpdateRidingStatsHandler
import com.cobblemon.mod.common.net.serverhandling.dialogue.EscapeDialogueHandler
import com.cobblemon.mod.common.net.serverhandling.dialogue.InputToDialogueHandler
import com.cobblemon.mod.common.net.serverhandling.evolution.AcceptEvolutionHandler
import com.cobblemon.mod.common.net.serverhandling.npc.SaveNPCHandler
import com.cobblemon.mod.common.net.serverhandling.orientation.OrientationPacketHandler
import com.cobblemon.mod.common.net.serverhandling.orientation.ServerboundUpdateOrientationHandler
import com.cobblemon.mod.common.net.serverhandling.pasture.PasturePokemonHandler
import com.cobblemon.mod.common.net.serverhandling.pasture.SetPastureConflictHandler
import com.cobblemon.mod.common.net.serverhandling.pasture.UnpastureAllPokemonHandler
@@ -222,13 +228,14 @@ import com.cobblemon.mod.common.net.serverhandling.pasture.UnpasturePokemonHandl
import com.cobblemon.mod.common.net.serverhandling.pokedex.scanner.FinishScanningHandler
import com.cobblemon.mod.common.net.serverhandling.pokedex.scanner.StartScanningHandler
import com.cobblemon.mod.common.net.serverhandling.pokemon.interact.InteractPokemonHandler
import com.cobblemon.mod.common.net.serverhandling.pokemon.update.SetItemHiddenHandler
import com.cobblemon.mod.common.net.serverhandling.pokemon.update.SetNicknameHandler
import com.cobblemon.mod.common.net.serverhandling.pokemon.update.SetActiveMarkHandler
import com.cobblemon.mod.common.net.serverhandling.pokemon.update.SetMarkingsHandler
import com.cobblemon.mod.common.net.serverhandling.pokemon.update.ServerboundUpdateRidingStateHandler
import com.cobblemon.mod.common.net.serverhandling.pokemon.update.SetActiveMarkHandler
import com.cobblemon.mod.common.net.serverhandling.pokemon.update.SetItemHiddenHandler
import com.cobblemon.mod.common.net.serverhandling.pokemon.update.SetMarkingsHandler
import com.cobblemon.mod.common.net.serverhandling.pokemon.update.SetNicknameHandler
import com.cobblemon.mod.common.net.serverhandling.riding.DismountPokemonPacketHandler
import com.cobblemon.mod.common.net.serverhandling.riding.DriverInputPacketHandler
import com.cobblemon.mod.common.net.serverhandling.riding.ServerboundUpdateRiderRotationHandler
import com.cobblemon.mod.common.net.serverhandling.starter.RequestStarterScreenHandler
import com.cobblemon.mod.common.net.serverhandling.starter.SelectStarterPacketHandler
import com.cobblemon.mod.common.net.serverhandling.storage.BenchMoveHandler
@@ -261,10 +268,13 @@ object CobblemonNetwork {
fun ServerPlayer.sendPacket(packet: NetworkPacket<*>) {
sendPacketToPlayer(this, packet)
}
@JvmStatic
fun sendToServer(packet: NetworkPacket<*>) {
Cobblemon.implementation.networkManager.sendToServer(packet)
}
@JvmStatic
fun sendToAllPlayers(packet: NetworkPacket<*>) = sendPacketToPlayers(server()!!.playerList.players, packet)
@JvmStatic
fun sendPacketToPlayers(players: Iterable<ServerPlayer>, packet: NetworkPacket<*>) = players.forEach { sendPacketToPlayer(it, packet) }
val s2cPayloads = generateS2CPacketInfoList()
@@ -310,6 +320,7 @@ object CobblemonNetwork {
list.add(PacketRegisterInfo(MarksPotentialUpdatePacket.ID, MarksPotentialUpdatePacket::decode, PokemonUpdatePacketHandler()))
list.add(PacketRegisterInfo(MarkingsUpdatePacket.ID, MarkingsUpdatePacket::decode, PokemonUpdatePacketHandler()))
list.add(PacketRegisterInfo(RideBoostsUpdatePacket.ID, RideBoostsUpdatePacket::decode, PokemonUpdatePacketHandler()))
list.add(PacketRegisterInfo(RideStaminaUpdatePacket.ID, RideStaminaUpdatePacket::decode, PokemonUpdatePacketHandler()))
// Evolution start
list.add(PacketRegisterInfo(AddEvolutionPacket.ID, AddEvolutionPacket::decode, PokemonUpdatePacketHandler()))
@@ -342,6 +353,7 @@ object CobblemonNetwork {
list.add(PacketRegisterInfo(InteractPokemonUIPacket.ID, InteractPokemonUIPacket::decode, InteractPokemonUIPacketHandler))
list.add(PacketRegisterInfo(PlayerInteractOptionsPacket.ID, PlayerInteractOptionsPacket::decode, PlayerInteractOptionsHandler))
list.add(PacketRegisterInfo(PokedexUIPacket.ID, PokedexUIPacket::decode, PokedexUIPacketHandler))
list.add(PacketRegisterInfo(ExpGainedDataPacket.ID, ExpGainedDataPacket::decode, ExpGainedDataPacketHandler))
// Starter packets
list.add(PacketRegisterInfo(OpenStarterUIPacket.ID, OpenStarterUIPacket::decode, StarterUIPacketHandler))
@@ -384,11 +396,11 @@ object CobblemonNetwork {
// Data registries
list.add(PacketRegisterInfo(AbilityRegistrySyncPacket.ID, AbilityRegistrySyncPacket::decode, DataRegistrySyncPacketHandler()))
list.add(PacketRegisterInfo(CobblemonMechanicsSyncPacket.ID, CobblemonMechanicsSyncPacket::decode, CobblemonMechanicsSyncHandler))
list.add(PacketRegisterInfo(MovesRegistrySyncPacket.ID, MovesRegistrySyncPacket::decode, DataRegistrySyncPacketHandler()))
list.add(PacketRegisterInfo(BerryRegistrySyncPacket.ID, BerryRegistrySyncPacket::decode, DataRegistrySyncPacketHandler()))
list.add(PacketRegisterInfo(SpeciesRegistrySyncPacket.ID, SpeciesRegistrySyncPacket::decode, DataRegistrySyncPacketHandler()))
list.add(PacketRegisterInfo(PropertiesCompletionRegistrySyncPacket.ID, PropertiesCompletionRegistrySyncPacket::decode, DataRegistrySyncPacketHandler()))
list.add(PacketRegisterInfo(UnlockReloadPacket.ID, UnlockReloadPacket::decode, UnlockReloadPacketHandler))
list.add(PacketRegisterInfo(StandardSpeciesFeatureSyncPacket.ID, StandardSpeciesFeatureSyncPacket::decode, DataRegistrySyncPacketHandler()))
list.add(PacketRegisterInfo(GlobalSpeciesFeatureSyncPacket.ID, GlobalSpeciesFeatureSyncPacket::decode, DataRegistrySyncPacketHandler()))
list.add(PacketRegisterInfo(SpeciesFeatureAssignmentSyncPacket.ID, SpeciesFeatureAssignmentSyncPacket::decode, DataRegistrySyncPacketHandler()))
@@ -405,6 +417,7 @@ object CobblemonNetwork {
list.add(PacketRegisterInfo(CosmeticItemAssignmentSyncPacket.ID, CosmeticItemAssignmentSyncPacket::decode, DataRegistrySyncPacketHandler()))
list.add(PacketRegisterInfo(BehaviourSyncPacket.ID, BehaviourSyncPacket::decode, DataRegistrySyncPacketHandler()))
list.add(PacketRegisterInfo(MarkRegistrySyncPacket.ID, MarkRegistrySyncPacket::decode, DataRegistrySyncPacketHandler()))
list.add(PacketRegisterInfo(RideSettingsSyncPacket.ID, RideSettingsSyncPacket::decode, RideSettingsSyncHandler))
// Effects
list.add(PacketRegisterInfo(SpawnSnowstormParticlePacket.ID, SpawnSnowstormParticlePacket::decode, SpawnSnowstormParticleHandler))
@@ -439,7 +452,7 @@ object CobblemonNetwork {
list.add(PacketRegisterInfo(UpdatePastureConflictFlagPacket.ID, UpdatePastureConflictFlagPacket::decode, UpdatePastureConflictFlagHandler))
// Orientation
list.add(PacketRegisterInfo(ClientboundUpdateOrientationPacket.ID, ClientboundUpdateOrientationPacket::decode, S2CUpdateOrientationHandler))
list.add(PacketRegisterInfo(ClientboundUpdateOrientationPacket.ID, ClientboundUpdateOrientationPacket::decode, ClientboundUpdateOrientationHandler))
// Behaviours
list.add(PacketRegisterInfo(PlayPosableAnimationPacket.ID, PlayPosableAnimationPacket::decode, PlayPosableAnimationHandler))
@@ -574,12 +587,14 @@ object CobblemonNetwork {
list.add(PacketRegisterInfo(SaveNPCPacket.ID, SaveNPCPacket::decode, SaveNPCHandler))
// Riding packet(s)
list.add(PacketRegisterInfo(ServerboundUpdateOrientationPacket.ID, ServerboundUpdateOrientationPacket::decode, OrientationPacketHandler))
list.add(PacketRegisterInfo(ServerboundUpdateOrientationPacket.ID, ServerboundUpdateOrientationPacket::decode, ServerboundUpdateOrientationHandler))
list.add(PacketRegisterInfo(ServerboundUpdateRidingStatePacket.ID, ServerboundUpdateRidingStatePacket::decode, ServerboundUpdateRidingStateHandler))
list.add(PacketRegisterInfo(ServerboundUpdateRidingStatsPacket.ID, ServerboundUpdateRidingStatsPacket::decode, ServerboundUpdateRidingStatsHandler))
list.add(PacketRegisterInfo(ServerboundUpdateRidingStatRangePacket.ID, ServerboundUpdateRidingStatRangePacket::decode, ServerboundUpdateRidingStatRangeHandler))
list.add(PacketRegisterInfo(ServerboundUpdateRidingSettingsPacket.ID, ServerboundUpdateRidingSettingsPacket::decode, ServerboundUpdateRidingSettingsHandler))
list.add(PacketRegisterInfo(DismountPokemonPacket.ID, DismountPokemonPacket::decode, DismountPokemonPacketHandler))
list.add(PacketRegisterInfo(ServerboundUpdateDriverInputPacket.ID, ServerboundUpdateDriverInputPacket::decode, DriverInputPacketHandler))
list.add(PacketRegisterInfo(ServerboundUpdateRiderRotationPacket.ID, ServerboundUpdateRiderRotationPacket::decode, ServerboundUpdateRiderRotationHandler))
// Cooking
list.add(PacketRegisterInfo(ToggleCookingPotLidPacket.ID, ToggleCookingPotLidPacket::decode, ToggleCookingPotLidHandler))
@@ -594,4 +609,4 @@ object CobblemonNetwork {
fun sendPacketToPlayer(player: ServerPlayer, packet: NetworkPacket<*>) {
Cobblemon.implementation.networkManager.sendPacketToPlayer(player, packet)
}
}
}
@@ -26,8 +26,6 @@ object CobblemonPoiTypes: PlatformRegistry<Registry<PoiType>, ResourceKey<Regist
@JvmField
val NURSE_KEY = createKey("nurse", CobblemonBlocks.HEALING_MACHINE, 1, 1)
@JvmField
val POKE_SNACK_KEY = createKey("poke_snack", CobblemonBlocks.POKE_SNACK, 0, 1)
@JvmField
val SACCHARINE_LOG_SLATHERED_KEY = createKey("saccharine_log_slathered", CobblemonBlocks.SACCHARINE_LOG_SLATHERED, 0, 1)
// TODO after 1.7
// @JvmField
@@ -0,0 +1,110 @@
/*
* 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
import com.bedrockk.molang.Expression
import com.cobblemon.mod.common.CobblemonNetwork.sendPacket
import com.cobblemon.mod.common.api.data.DataRegistry
import com.cobblemon.mod.common.api.molang.ExpressionLike
import com.cobblemon.mod.common.api.reactive.SimpleObservable
import com.cobblemon.mod.common.api.riding.behaviour.RidingBehaviourSettings
import com.cobblemon.mod.common.api.riding.behaviour.types.air.BirdSettings
import com.cobblemon.mod.common.api.riding.behaviour.types.air.GliderSettings
import com.cobblemon.mod.common.api.riding.behaviour.types.air.HelicopterSettings
import com.cobblemon.mod.common.api.riding.behaviour.types.air.HoverSettings
import com.cobblemon.mod.common.api.riding.behaviour.types.air.JetSettings
import com.cobblemon.mod.common.api.riding.behaviour.types.air.RocketSettings
import com.cobblemon.mod.common.api.riding.behaviour.types.land.HorseSettings
import com.cobblemon.mod.common.api.riding.behaviour.types.land.MinekartSettings
import com.cobblemon.mod.common.api.riding.behaviour.types.land.VehicleSettings
import com.cobblemon.mod.common.api.riding.behaviour.types.liquid.BoatSettings
import com.cobblemon.mod.common.api.riding.behaviour.types.liquid.BurstSettings
import com.cobblemon.mod.common.api.riding.behaviour.types.liquid.DolphinSettings
import com.cobblemon.mod.common.api.riding.behaviour.types.liquid.SubmarineSettings
import com.cobblemon.mod.common.net.messages.client.data.RideSettingsSyncPacket
import com.cobblemon.mod.common.util.adapters.ExpressionAdapter
import com.cobblemon.mod.common.util.adapters.ExpressionLikeAdapter
import com.cobblemon.mod.common.util.adapters.FloatNumberRangeAdapter
import com.cobblemon.mod.common.util.cobblemonResource
import com.google.gson.GsonBuilder
import net.minecraft.advancements.critereon.MinMaxBounds
import net.minecraft.resources.ResourceLocation
import net.minecraft.server.level.ServerPlayer
import net.minecraft.server.packs.PackType
import net.minecraft.server.packs.resources.ResourceManager
object CobblemonRideSettings : DataRegistry {
override val id: ResourceLocation = cobblemonResource("ride_settings")
override val type = PackType.SERVER_DATA
override val observable = SimpleObservable<CobblemonRideSettings>()
val gson = GsonBuilder()
.setPrettyPrinting()
.registerTypeAdapter(Expression::class.java, ExpressionAdapter)
.registerTypeAdapter(ExpressionLike::class.java, ExpressionLikeAdapter)
.registerTypeAdapter(MinMaxBounds.Doubles::class.java, FloatNumberRangeAdapter)
.create()
var bird = BirdSettings()
var glider = GliderSettings()
var helicopter = HelicopterSettings()
var hover = HoverSettings()
var jet = JetSettings()
var rocket = RocketSettings()
var horse = HorseSettings()
var minekart = MinekartSettings()
var vehicle = VehicleSettings()
var boat = BoatSettings()
var burst = BurstSettings()
var dolphin = DolphinSettings()
var submarine = SubmarineSettings()
override fun sync(player: ServerPlayer) {
player.sendPacket(
RideSettingsSyncPacket(
bird = bird,
glider = glider,
helicopter = helicopter,
hover = hover,
jet = jet,
rocket = rocket,
horse = horse,
minekart = minekart,
vehicle = vehicle,
boat = boat,
burst = burst,
dolphin = dolphin,
submarine = submarine
)
)
}
override fun reload(manager: ResourceManager) {
bird = loadStyle(manager, "bird", BirdSettings::class.java)
glider = loadStyle(manager, "glider", GliderSettings::class.java)
helicopter = loadStyle(manager, "helicopter", HelicopterSettings::class.java)
hover = loadStyle(manager, "hover", HoverSettings::class.java)
jet = loadStyle(manager, "jet", JetSettings::class.java)
rocket = loadStyle(manager, "rocket", RocketSettings::class.java)
horse = loadStyle(manager, "horse", HorseSettings::class.java)
minekart = loadStyle(manager, "minekart", MinekartSettings::class.java)
vehicle = loadStyle(manager, "vehicle", VehicleSettings::class.java)
boat = loadStyle(manager, "boat", BoatSettings::class.java)
burst = loadStyle(manager, "burst", BurstSettings::class.java)
dolphin = loadStyle(manager, "dolphin", DolphinSettings::class.java)
submarine = loadStyle(manager, "submarine", SubmarineSettings::class.java)
}
private fun <T : RidingBehaviourSettings> loadStyle(manager: ResourceManager, name: String, clazz: Class<T>): T {
manager.getResourceOrThrow(cobblemonResource("ride_settings/$name.json")).open().use {
return gson.fromJson(it.reader(), clazz)
}
}
}
@@ -20,30 +20,45 @@ import net.minecraft.world.entity.ai.sensing.SensorType
object CobblemonSensors {
val sensors = mutableMapOf<String, SensorType<*>>()
@JvmField
val NPC_BATTLING = register("npc_battling", ::NPCBattlingSensor)
@JvmField
val BATTLING_POKEMON = register("battling_pokemon", ::BattlingPokemonSensor)
// val NPC_BATTLING = register("npc_battling", ::NPCBattlingSensor)
@JvmField
val POKEMON_DROWSY = register("pokemon_drowsy", ::DrowsySensor)
@JvmField
val POKEMON_ADULT = register("pokemon_adult_sensor", ::PokemonAdultSensor)
@JvmField
val POKEMON_DISTURBANCE = register("pokemon_disturbance_sensor", ::PokemonDisturbancesSensor)
@JvmField
val POKEMON_DEFEND_OWNER = register("pokemon_owner_under_attack", ::DefendOwnerSensor)
@JvmField
val NEARBY_GROWABLE_CROPS = register("nearby_growable_crops", ::PokemonGrowableCropSensor)
@JvmField
val NEARBY_BEE_HIVE = register("nearby_bee_hive", ::BeeHiveSensor)
@JvmField
val NEARBY_FLOWER = register("nearby_flower", ::FlowerSensor)
@JvmField
val NEARBY_SWEET_BERRY_BUSH = register("nearby_sweet_berry_bush", ::SweetBerryBushSensor)
@JvmField
val POKEMON_NEARBY_WANTED_ITEM = register("pokemon_nearby_wanted_item", ::PokemonItemSensor)
@JvmField
val NEARBY_SACC_LEAVES = register("nearby_sacc_leaves", ::SacLeavesSensor)
@JvmStatic
fun <E : Entity, U : Sensor<E>> register(id: String, supplier: Supplier<U>): SensorType<U> {
val sensor = SensorType(supplier)
sensors[id] = sensor
return sensor
}
}
}
@@ -103,6 +103,11 @@ object CobblemonSounds : PlatformRegistry<Registry<SoundEvent>, ResourceKey<Regi
@JvmField
val EVOLUTION = this.create("evolution.full")
@JvmField
val LEVELUP_START = this.create("gui.levelup_start")
@JvmField
val LEVELUP = this.create("gui.levelup")
@JvmField
val PVN_BATTLE = this.create("battle.pvn.default")
@JvmField
@@ -23,43 +23,61 @@ import net.minecraft.resources.ResourceKey
* @since October 26th, 2022
*/
object CobblemonCriteria : PlatformRegistry<Registry<CriterionTrigger<*>>, ResourceKey<Registry<CriterionTrigger<*>>>, CriterionTrigger<*>>(){
@JvmField
val PICK_STARTER = this.create("pick_starter", SimpleCriterionTrigger(PokemonCriterion.CODEC))
@JvmField
val CATCH_POKEMON = this.create("catch_pokemon", SimpleCriterionTrigger(CaughtPokemonCriterion.CODEC))
@JvmField
val CATCH_SHINY_POKEMON = this.create("catch_shiny_pokemon", SimpleCriterionTrigger(CountableCriterion.CODEC))
@JvmField
val EGG_COLLECT = this.create("eggs_collected", SimpleCriterionTrigger(CountableCriterion.CODEC))
@JvmField
val EGG_HATCH = this.create("eggs_hatched", SimpleCriterionTrigger(CountableCriterion.CODEC))
@JvmField
val EVOLVE_POKEMON = this.create("pokemon_evolved", SimpleCriterionTrigger(EvolvePokemonCriterion.CODEC))
@JvmField
val WIN_BATTLE = this.create("battles_won", SimpleCriterionTrigger(BattleCountableCriterion.CODEC))
@JvmField
val DEFEAT_POKEMON = this.create("pokemon_defeated", SimpleCriterionTrigger(CountableCriterion.CODEC))
@JvmField
val COLLECT_ASPECT = this.create("aspects_collected", SimpleCriterionTrigger(AspectCriterion.CODEC))
@JvmField
val POKEMON_INTERACT = this.create("pokemon_interact", SimpleCriterionTrigger(PokemonInteractCriterion.CODEC))
@JvmField
val PARTY_CHECK = this.create("party", SimpleCriterionTrigger(PartyCheckCriterion.CODEC))
@JvmField
val LEVEL_UP = this.create("level_up", SimpleCriterionTrigger(LevelUpCriterion.CODEC))
@JvmField
val PASTURE_USE = this.create("pasture_use", SimpleCriterionTrigger(PokemonCriterion.CODEC))
@JvmField
val RESURRECT_POKEMON = this.create("resurrect_pokemon", SimpleCriterionTrigger(PokemonCriterion.CODEC))
@JvmField
val TRADE_POKEMON = this.create("trade_pokemon", SimpleCriterionTrigger(TradePokemonCriterion.CODEC))
@JvmField
val CAST_POKE_ROD = this.create("cast_poke_rod", SimpleCriterionTrigger(CastPokeRodCriterionCondition.CODEC))
@JvmField
val REEL_IN_POKEMON = this.create("reel_in_pokemon", SimpleCriterionTrigger(ReelInPokemonCriterionCondition.CODEC))
// Advancement criteria for [grow_tumblestone.json]
@JvmField
val PLANT_TUMBLESTONE = this.create("plant_tumblestone", SimpleCriterionTrigger(PlantTumblestoneCriterion.CODEC))
override val registry = BuiltInRegistries.TRIGGER_TYPES
override val resourceKey = Registries.TRIGGER_TYPE
}
}
@@ -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")
}
}
@@ -70,16 +70,23 @@ object Abilities : DataRegistry {
AbilityRegistrySyncPacket(all()).sendToPlayer(player)
}
@JvmStatic
fun register(ability: AbilityTemplate): AbilityTemplate {
this.abilityMap[ability.name.lowercase()] = ability
return ability
}
@JvmStatic
fun all() = this.abilityMap.values.toList()
@JvmStatic
fun first() = this.abilityMap.values.first()
@JvmStatic
fun get(name: String) = abilityMap[name.lowercase()]
@JvmStatic
fun getOrDummy(name: String) = get(name) ?: DUMMY
@JvmStatic
fun getOrException(name: String) = get(name) ?: throw IllegalArgumentException("Unable to find ability of name: $name")
@JvmStatic
fun count() = this.abilityMap.size
internal fun receiveSyncPacket(abilities: Collection<AbilityTemplate>) {
@@ -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))
}
}
@@ -47,12 +47,23 @@ class ApplyBehaviours : BehaviourConfig {
override fun configure(entity: LivingEntity, behaviourConfigurationContext: BehaviourConfigurationContext) {
if (!checkCondition(behaviourConfigurationContext, condition)) return
val configurations = behaviours.map { CobblemonBehaviours.behaviours[it]?.takeIf { it.canBeApplied(entity) } ?: return Cobblemon.LOGGER.warn("Behaviour $it not found") }
val applicableBehaviours = behaviours.mapNotNull {
val resolvedBehaviour = CobblemonBehaviours.behaviours[it]
if (resolvedBehaviour == null) {
Cobblemon.LOGGER.warn("Behaviour $it not found while configuring entity of type ${entity.type}")
} else if (!resolvedBehaviour.canBeApplied(entity)) {
Cobblemon.LOGGER.warn("Behaviour $it cannot be applied to entity ${entity.id}")
} else {
return@mapNotNull resolvedBehaviour
}
null
}
// Why not just add the presets to the context directly?
// Nested preset application is a thing, and I only want to track the top level presets.
// i.e. if a preset applies another preset, I don't want to track the inner preset, since it's redundant if we track the top one.
val originalContextBehaviours = behaviourConfigurationContext.appliedBehaviours.toMutableSet()
configurations.forEach {
applicableBehaviours.forEach {
it.configure(entity, behaviourConfigurationContext)
}
originalContextBehaviours.addAll(behaviours)
@@ -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()
@@ -12,11 +12,9 @@ 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.api.molang.MoLangFunctions.asMostSpecificMoLangValue
import com.cobblemon.mod.common.api.npc.configuration.MoLangConfigVariable
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity
import com.cobblemon.mod.common.util.asExpression
import com.cobblemon.mod.common.util.withQueryValue
import com.mojang.datafixers.util.Either
import kotlin.jvm.optionals.getOrNull
import net.minecraft.world.entity.LivingEntity
@@ -27,7 +25,9 @@ import net.minecraft.world.entity.ai.memory.MemoryModuleType
import net.minecraft.world.entity.ai.sensing.SensorType
/**
* Checks nearby entities and counts how many have nominated this entity as their leader.
* Checks nearby entities and counts how many have nominated this entity as their leader. We normally update this
* as people join and leave the herd, but this is a fallback to make sure we don't get stuck with an incorrect value
* like if the entities die or whatever.
*
* @author Hiroku
* @since June 17th, 2025
@@ -53,7 +53,7 @@ class FindAirTaskConfig : SingleTaskConfig {
it.absent(CobblemonMemories.PATH_COOLDOWN)
).apply(it) { walkTarget, pathCooldown ->
Trigger { world, entity, time ->
if (!entity.getIsSubmerged()) {
if (!entity.getIsSubmerged() || entity.isInLava) {
return@Trigger false
}
@@ -8,17 +8,16 @@
package com.cobblemon.mod.common.api.ai.config.task
import com.cobblemon.mod.common.Cobblemon
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.api.molang.MoLangFunctions.asMostSpecificMoLangValue
import com.cobblemon.mod.common.api.npc.configuration.MoLangConfigVariable
import com.cobblemon.mod.common.api.storage.party.PartyStore
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity
import com.cobblemon.mod.common.pokemon.ai.ToleratedHerdLeader
import com.cobblemon.mod.common.util.asExpression
import com.cobblemon.mod.common.util.withQueryValue
import com.mojang.datafixers.util.Either
import net.minecraft.world.entity.LivingEntity
import net.minecraft.world.entity.ai.behavior.BehaviorControl
@@ -57,21 +56,21 @@ class FindHerdLeaderTaskConfig : SingleTaskConfig {
!it.brain.hasMemoryValue(CobblemonMemories.POKEMON_DROWSY)
}.forEach { possibleLeader ->
possibleLeader as PokemonEntity
val matchingHerdLeader = entity.behaviour.herd.bestMatchLeader(entity, possibleLeader) ?: return@forEach
val alreadyIsALeader = possibleLeader.brain.hasMemoryValue(CobblemonMemories.HERD_SIZE)
val nestedHerdTier = currentLeaderEntity?.getHerdTier() ?: 0
if (nestedHerdTier >= matchingHerdLeader.tier) {
val bestMatchingHerdLeader = entity.behaviour.herd.bestMatchLeader(entity, possibleLeader) ?: return@forEach
val possibleLeaderIsAlreadyALeader = possibleLeader.brain.hasMemoryValue(CobblemonMemories.HERD_SIZE)
val currentLeaderHerdTier = currentLeaderEntity?.getHerdTier() ?: entity.getHerdTier()
if (currentLeaderHerdTier >= bestMatchingHerdLeader.tier) {
return@forEach // This leader is following a leader of a higher tier, we can't replace them
}
val distance = entity.distanceTo(possibleLeader)
if (matchingHerdLeader.tier < bestTier) {
if (bestMatchingHerdLeader.tier < bestTier) {
return@forEach // No need to check further if this leader is worse than the best found so far
} else if ((distance > bestDistance && !alreadyIsALeader) && matchingHerdLeader.tier == bestTier) {
} else if ((distance > bestDistance && !possibleLeaderIsAlreadyALeader) && bestMatchingHerdLeader.tier == bestTier) {
return@forEach // No need to check further if this leader is farther than the best found so far, unless they are already a leader - I'd prefer to join a pack
} else {
bestLeader = possibleLeader
bestDistance = distance
bestTier = matchingHerdLeader.tier
bestTier = bestMatchingHerdLeader.tier
}
}
return bestLeader ?: currentLeaderEntity
@@ -119,6 +118,7 @@ class FindHerdLeaderTaskConfig : SingleTaskConfig {
herdLeader.set(bestLeader.uuid.toString())
bestLeader.brain.eraseMemory(CobblemonMemories.HERD_LEADER)
bestLeader.adjustHerdSize(1)
return@Trigger true
}
}
@@ -14,15 +14,19 @@ import com.cobblemon.mod.common.api.ai.BehaviourConfigurationContext
import com.cobblemon.mod.common.api.ai.ExpressionOrEntityVariable
import com.cobblemon.mod.common.api.ai.WrapperLivingEntityTask
import com.cobblemon.mod.common.api.ai.asVariables
import com.cobblemon.mod.common.api.molang.ExpressionLike
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity
import com.cobblemon.mod.common.entity.pokemon.ai.tasks.FindRestingPlaceTask
import com.cobblemon.mod.common.util.asExpression
import com.cobblemon.mod.common.util.asExpressionLike
import com.cobblemon.mod.common.util.resolveBoolean
import com.mojang.datafixers.util.Either
import net.minecraft.world.entity.LivingEntity
import net.minecraft.world.entity.ai.behavior.BehaviorControl
import net.minecraft.world.entity.ai.memory.MemoryModuleType
class FindRestingPlaceTaskConfig : SingleTaskConfig {
val condition: ExpressionLike = "true".asExpressionLike()
val horizontalSearchDistance: ExpressionOrEntityVariable = Either.left("16".asExpression())
val verticalSearchDistance: ExpressionOrEntityVariable = Either.left("5".asExpression())
@@ -31,6 +35,13 @@ class FindRestingPlaceTaskConfig : SingleTaskConfig {
entity: LivingEntity,
behaviourConfigurationContext: BehaviourConfigurationContext
): BehaviorControl<in LivingEntity>? {
if (entity !is PokemonEntity) {
return null
}
if (!behaviourConfigurationContext.runtime.resolveBoolean(condition)) {
return null
}
behaviourConfigurationContext.addMemories(
CobblemonMemories.PATH_COOLDOWN,
CobblemonMemories.POKEMON_DROWSY,
@@ -57,7 +57,7 @@ class GoToLandTaskConfig : SingleTaskConfig {
it.absent(CobblemonMemories.PATH_COOLDOWN)
).apply(it) { walkTarget, pathCooldown ->
Trigger { world, entity, time ->
if (!entity.isInLiquid) {
if (!entity.isInWater) {
return@Trigger false
}
@@ -11,15 +11,20 @@ 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.ExpressionOrEntityVariable
import com.cobblemon.mod.common.api.ai.WrapperLivingEntityTask
import com.cobblemon.mod.common.api.npc.configuration.MoLangConfigVariable
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity
import com.cobblemon.mod.common.entity.pokemon.ai.tasks.GoToSleepTask
import com.cobblemon.mod.common.util.asExpression
import com.cobblemon.mod.common.util.resolveBoolean
import com.mojang.datafixers.util.Either
import net.minecraft.world.entity.LivingEntity
import net.minecraft.world.entity.ai.behavior.BehaviorControl
import net.minecraft.world.entity.ai.memory.MemoryModuleType
class GoToSleepTaskConfig : SingleTaskConfig {
var onlyFromStatus: ExpressionOrEntityVariable = Either.left("false".asExpression())
override fun getVariables(entity: LivingEntity, behaviourConfigurationContext: BehaviourConfigurationContext) = emptyList<MoLangConfigVariable>()
override fun createTask(
entity: LivingEntity,
@@ -34,6 +39,6 @@ class GoToSleepTaskConfig : SingleTaskConfig {
CobblemonMemories.POKEMON_SLEEPING
)
behaviourConfigurationContext.addSensors(CobblemonSensors.POKEMON_DROWSY)
return WrapperLivingEntityTask(GoToSleepTask.create(), PokemonEntity::class.java)
return WrapperLivingEntityTask(GoToSleepTask.create(onlyFromStatus.resolveBoolean(behaviourConfigurationContext.runtime)), PokemonEntity::class.java)
}
}
@@ -11,8 +11,7 @@ package com.cobblemon.mod.common.api.ai.config.task
import com.cobblemon.mod.common.api.ai.BehaviourConfigurationContext
import com.cobblemon.mod.common.api.ai.asVariables
import com.cobblemon.mod.common.api.ai.config.task.SharedEntityVariables.SEE_DISTANCE
import com.cobblemon.mod.common.api.molang.MoLangFunctions.asMostSpecificMoLangValue
import com.cobblemon.mod.common.util.withQueryValue
import com.cobblemon.mod.common.util.resolveEntityTypes
import net.minecraft.world.entity.LivingEntity
import net.minecraft.world.entity.ai.behavior.BehaviorControl
import net.minecraft.world.entity.ai.behavior.SetEntityLookTarget
@@ -22,13 +21,16 @@ import net.minecraft.world.entity.ai.sensing.SensorType
class LookAtEntitiesTaskConfig : SingleTaskConfig {
companion object {
const val LOOK_AT_ENTITIES = "look_at_entities"
const val LOOK_AT_ENTITY_TYPES = "look_at_entity_types"
}
val condition = booleanVariable(SharedEntityVariables.LOOKING_CATEGORY, LOOK_AT_ENTITIES, true).asExpressible()
val maxDistance = numberVariable(SharedEntityVariables.LOOKING_CATEGORY, SEE_DISTANCE, 15).asExpressible()
val entityTypes = stringVariable(SharedEntityVariables.LOOKING_CATEGORY, LOOK_AT_ENTITY_TYPES, "").asExpressible()
override fun getVariables(entity: LivingEntity, behaviourConfigurationContext: BehaviourConfigurationContext) = listOf(
condition,
entityTypes,
maxDistance
).asVariables()
@@ -39,6 +41,18 @@ class LookAtEntitiesTaskConfig : SingleTaskConfig {
if (!condition.resolveBoolean(behaviourConfigurationContext.runtime)) return null
behaviourConfigurationContext.addMemories(MemoryModuleType.NEAREST_VISIBLE_LIVING_ENTITIES, MemoryModuleType.LOOK_TARGET)
behaviourConfigurationContext.addSensors(SensorType.NEAREST_LIVING_ENTITIES)
return SetEntityLookTarget.create(maxDistance.resolveFloat(behaviourConfigurationContext.runtime))
val lookDistance = maxDistance.resolveFloat(behaviourConfigurationContext.runtime)
val lookAtTypesText = entityTypes.resolveString(behaviourConfigurationContext.runtime)
if (lookAtTypesText.isBlank()) {
return SetEntityLookTarget.create(lookDistance)
}
val lookAtTypes = resolveEntityTypes(entity.registryAccess(), lookAtTypesText)
return if (lookAtTypes.isNotEmpty()) {
SetEntityLookTarget.create({ lookAtTypes.contains(it.type) }, lookDistance)
} else {
null
}
}
}
@@ -10,17 +10,28 @@ package com.cobblemon.mod.common.api.ai.config.task
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.npc.configuration.MoLangConfigVariable
import com.cobblemon.mod.common.entity.npc.ai.LookAtSpeakerTask
import com.cobblemon.mod.common.util.asExpression
import com.mojang.datafixers.util.Either
import net.minecraft.world.entity.LivingEntity
import net.minecraft.world.entity.ai.behavior.BehaviorControl
import net.minecraft.world.entity.ai.memory.MemoryModuleType
class LookAtSpeakerTaskConfig : SingleTaskConfig {
val condition: ExpressionOrEntityVariable = Either.left("true".asExpression())
override fun getVariables(entity: LivingEntity, behaviourConfigurationContext: BehaviourConfigurationContext) = emptyList<MoLangConfigVariable>()
override fun createTask(
entity: LivingEntity,
behaviourConfigurationContext: BehaviourConfigurationContext
) = LookAtSpeakerTask.create().also {
behaviourConfigurationContext.addMemories(MemoryModuleType.LOOK_TARGET, CobblemonMemories.DIALOGUES)
): BehaviorControl<in LivingEntity>? {
if (!condition.resolveBoolean(behaviourConfigurationContext.runtime)) {
return null
}
return LookAtSpeakerTask.create().also {
behaviourConfigurationContext.addMemories(MemoryModuleType.LOOK_TARGET, CobblemonMemories.DIALOGUES)
}
}
}
@@ -8,15 +8,14 @@
package com.cobblemon.mod.common.api.ai.config.task
import com.cobblemon.mod.common.Cobblemon
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.api.molang.MoLangFunctions.asMostSpecificMoLangValue
import com.cobblemon.mod.common.api.npc.configuration.MoLangConfigVariable
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity
import com.cobblemon.mod.common.util.asExpression
import com.cobblemon.mod.common.util.withQueryValue
import com.mojang.datafixers.util.Either
import java.util.UUID
import net.minecraft.world.entity.LivingEntity
@@ -82,6 +81,8 @@ class MaintainHerdLeaderTaskConfig : SingleTaskConfig {
if (bestLeader != null && bestLeader != leader) {
bestLeader.brain.eraseMemory(CobblemonMemories.HERD_LEADER)
entity.brain.setMemory(CobblemonMemories.HERD_LEADER, bestLeader.uuid.toString())
bestLeader.adjustHerdSize(1)
leader.adjustHerdSize(-1)
}
}
return@Trigger true
@@ -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
@@ -38,7 +38,7 @@ class MoveToOwnerTaskConfig : SingleTaskConfig {
override fun createTask(
entity: LivingEntity,
behaviourConfigurationContext: BehaviourConfigurationContext
): BehaviorControl<in LivingEntity>? {
): BehaviorControl<in LivingEntity> {
behaviourConfigurationContext.addMemories(
MemoryModuleType.WALK_TARGET,
MemoryModuleType.LOOK_TARGET
@@ -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,
@@ -14,6 +14,8 @@ import com.cobblemon.mod.common.api.ai.CobblemonWanderControl
import com.cobblemon.mod.common.api.ai.ExpressionOrEntityVariable
import com.cobblemon.mod.common.api.ai.asVariables
import com.cobblemon.mod.common.api.molang.MoLangFunctions.asMostSpecificMoLangValue
import com.cobblemon.mod.common.entity.OmniPathingEntity
import com.cobblemon.mod.common.entity.ai.CobblemonRandomSurfacePos
import com.cobblemon.mod.common.entity.ai.CobblemonWalkTarget
import com.cobblemon.mod.common.util.asExpression
import com.cobblemon.mod.common.util.mainThreadRuntime
@@ -26,6 +28,7 @@ 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.BehaviorControl
import net.minecraft.world.entity.ai.behavior.BehaviorUtils
import net.minecraft.world.entity.ai.behavior.BlockPosTracker
import net.minecraft.world.entity.ai.behavior.declarative.BehaviorBuilder
import net.minecraft.world.entity.ai.behavior.declarative.Trigger
@@ -37,27 +40,31 @@ import net.minecraft.world.level.pathfinder.PathType
class WanderTaskConfig : SingleTaskConfig {
companion object {
const val WANDER = "wander" // Category
const val MAX_LOOK_DOWN_DISTANCE = 64
}
val condition = booleanVariable(WANDER, "wanders", true).asExpressible()
val wanderChance = numberVariable(WANDER, "wander_chance", 1/(20 * 6F)).asExpressible()
val wanderChance = numberVariable(WANDER, "wander_chance", 1 / (20 * 6F)).asExpressible()
val horizontalRange = numberVariable(WANDER, "horizontal_wander_range", 10).asExpressible()
val verticalRange = numberVariable(WANDER, "vertical_wander_range", 5).asExpressible()
val speedMultiplier = numberVariable(SharedEntityVariables.MOVEMENT_CATEGORY, SharedEntityVariables.WALK_SPEED, 0.35).asExpressible()
val avoidTargetingAir: ExpressionOrEntityVariable = Either.left("true".asExpression()) // Whether to avoid air blocks when wandering
val speedMultiplier =
numberVariable(SharedEntityVariables.MOVEMENT_CATEGORY, SharedEntityVariables.WALK_SPEED, 0.35).asExpressible()
val avoidTargetingAir: ExpressionOrEntityVariable =
Either.left("true".asExpression()) // Whether to avoid air blocks when wandering
val minimumHeight: ExpressionOrEntityVariable = Either.left("0".asExpression()) // Height off the ground
val maximumHeight: ExpressionOrEntityVariable = Either.left("-1".asExpression()) // Height off the ground
override fun getVariables(entity: LivingEntity, behaviourConfigurationContext: BehaviourConfigurationContext) = listOf(
condition,
wanderChance,
horizontalRange,
verticalRange,
speedMultiplier,
avoidTargetingAir,
minimumHeight,
maximumHeight
).asVariables()
override fun getVariables(entity: LivingEntity, behaviourConfigurationContext: BehaviourConfigurationContext) =
listOf(
condition,
wanderChance,
horizontalRange,
verticalRange,
speedMultiplier,
avoidTargetingAir,
minimumHeight,
maximumHeight
).asVariables()
private fun applyHeightConstraints(
pos: BlockPos,
@@ -73,10 +80,18 @@ class WanderTaskConfig : SingleTaskConfig {
val altitude = if (!block.isAir) {
0
} else {
(1..64).firstOrNull {
(1..MAX_LOOK_DOWN_DISTANCE).firstOrNull {
val newPos = pos.below(it)
return@firstOrNull !world.getBlockState(newPos).isAir
} ?: Int.MAX_VALUE
if (!world.getBlockState(newPos).isAir) {
return@firstOrNull true
} else if (newPos.y <= world.minBuildHeight) {
// Don't adjust downward into the void (Mostly if we're in the end)
// This doesn't stop fliers from wandering off end islands,
// but it does stop them from diving directly into the void.
return pos
}
return@firstOrNull false
} ?: MAX_LOOK_DOWN_DISTANCE
}
if (altitude > maximumHeight && maximumHeight >= 0) {
@@ -117,7 +132,7 @@ class WanderTaskConfig : SingleTaskConfig {
it.registered(CobblemonMemories.WANDER_CONTROL)
).apply(it) { walkTarget, lookTarget, pathCooldown, wanderControl ->
Trigger { world, entity, time ->
if (entity !is PathfinderMob || entity.isUnderWater) {
if (entity !is PathfinderMob || (entity.isUnderWater && !(entity.canBreatheUnderwater() && !((entity as OmniPathingEntity).canSwimInWater())))) {
return@Trigger false
}
@@ -125,10 +140,9 @@ class WanderTaskConfig : SingleTaskConfig {
mainThreadRuntime.withQueryValue("entity", entity.asMostSpecificMoLangValue())
val avoidsTargetingAir = avoidTargetingAir.resolveBoolean(mainThreadRuntime)
val wanderChance = mainThreadRuntime.resolveFloat(wanderChanceExpression)
if (wanderChance <= 0 || world.random.nextFloat() > wanderChance || !wanderControl.allowLand) {
if (wanderChance <= 0 || world.random.nextFloat() > wanderChance) {
return@Trigger false
}
pathCooldown.setWithExpiry(true, wanderControl.pathCooldownTicks.toLong())
val minimumHeight = minimumHeight.resolveInt(mainThreadRuntime)
val maximumHeight = maximumHeight.resolveInt(mainThreadRuntime)
@@ -141,21 +155,35 @@ class WanderTaskConfig : SingleTaskConfig {
HoverRandomPos.getPos(
entity,
horizontalRange.resolveInt(mainThreadRuntime),
maxOf(verticalRange.resolveInt(mainThreadRuntime), maximumHeight), // In case they fly up pretty high and need to find a way down
verticalRange.resolveInt(mainThreadRuntime),
entity.random.nextFloat() - 0.5,
entity.random.nextFloat() - 0.5,
Math.PI.toFloat(),
maximumHeight,
minimumHeight
)
} else if (entity.isUnderWater && entity.canBreatheUnderwater() && !((entity as OmniPathingEntity).canSwimInWater())) {
BehaviorUtils.getRandomSwimmablePos(
entity,
horizontalRange.resolveInt(mainThreadRuntime),
verticalRange.resolveInt(mainThreadRuntime)
)
} else if (entity is OmniPathingEntity && (entity.canWalkOnWater() || entity.canWalkOnLava())) {
CobblemonRandomSurfacePos.getPos(
entity,
horizontalRange.resolveInt(mainThreadRuntime),
verticalRange.resolveInt(mainThreadRuntime)
)
} else {
LandRandomPos.getPos(
entity,
horizontalRange.resolveInt(mainThreadRuntime),
verticalRange.resolveInt(mainThreadRuntime)
)
LandRandomPos.getPos(
entity,
horizontalRange.resolveInt(mainThreadRuntime),
verticalRange.resolveInt(mainThreadRuntime)
)
} ?: continue
if (targetVec == null) continue
pos = applyHeightConstraints(
pos = BlockPos.containing(targetVec),
minimumHeight = minimumHeight,
@@ -173,8 +201,17 @@ class WanderTaskConfig : SingleTaskConfig {
pos = pos,
speedModifier = speedMultiplier.resolveFloat(mainThreadRuntime),
completionRange = 0,
nodeTypeFilter = { nodeType -> nodeType !in listOf(PathType.WATER, PathType.WATER_BORDER) },
destinationNodeTypeFilter = { nodeType -> !avoidsTargetingAir || nodeType !in listOf(PathType.OPEN) }
nodeTypeFilter = { nodeType ->
entity.canBreatheUnderwater() || nodeType !in listOf(
PathType.WATER,
PathType.WATER_BORDER
)
},
destinationNodeTypeFilter = { nodeType ->
!avoidsTargetingAir || nodeType !in listOf(
PathType.OPEN
)
}
)
)
lookTarget.set(BlockPosTracker(pos.toVec3d().add(0.0, entity.eyeHeight.toDouble(), 0.0)))
@@ -31,8 +31,10 @@ import net.minecraft.world.entity.ai.behavior.BlockPosTracker
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.level.material.Fluids
import net.minecraft.world.level.pathfinder.PathType
import net.minecraft.world.phys.Vec3
import kotlin.math.ceil
class WaterWanderTaskConfig : SingleTaskConfig {
val condition = booleanVariable(WANDER, "water_wanders", true).asExpressible()
@@ -100,6 +102,33 @@ class WaterWanderTaskConfig : SingleTaskConfig {
return@Trigger false
}
// Move target pos down so that we don't move out of water too much
val requiredDepth = ceil(0.5 + entity.eyeHeight)
// Get the current depth of the block
var depth = 1
var testPos = pos.above()
var blockState = entity.level().getBlockState(testPos)
while (blockState.fluidState.type == Fluids.WATER) {
depth++
testPos = testPos!!.above()
blockState = entity.level().getBlockState(testPos)
}
if (depth < requiredDepth) {
// Iterate down until we reach the desired min depth or we reach a non water block
pos = pos.below()
blockState = entity.level().getBlockState(pos)
while (blockState.fluidState.type == Fluids.WATER && depth < requiredDepth) {
depth ++
pos = pos!!.below()
blockState = entity.level().getBlockState(pos)
}
}
if (depth < requiredDepth) {
return@Trigger false
}
walkTarget.set(
CobblemonWalkTarget(
pos = pos,
@@ -10,7 +10,6 @@ package com.cobblemon.mod.common.api.apricorn
import com.cobblemon.mod.common.CobblemonBlocks
import com.cobblemon.mod.common.CobblemonItems
import com.cobblemon.mod.common.api.cooking.Flavour
import com.cobblemon.mod.common.block.ApricornBlock
import com.cobblemon.mod.common.block.ApricornSaplingBlock
import com.cobblemon.mod.common.item.ApricornItem
@@ -28,43 +27,14 @@ import net.minecraft.world.level.material.MapColor
* @author Licious
* @since October 29th, 2022
*/
enum class Apricorn(
/** A value of true means it buffs that flavour, a value of false means it weakens that flavour. */
val flavourStrength: Map<Flavour, Boolean> = emptyMap()
) : StringRepresentable {
enum class Apricorn : StringRepresentable {
BLACK,
BLUE(
mapOf(
Flavour.DRY to true,
Flavour.BITTER to false
)
),
GREEN(
mapOf(
Flavour.BITTER to true,
Flavour.SWEET to false
)
),
PINK(
mapOf(
Flavour.SWEET to true,
Flavour.SPICY to false
)
),
RED(
mapOf(
Flavour.SPICY to true,
Flavour.SOUR to false
)
),
BLUE,
GREEN,
PINK,
RED,
WHITE,
YELLOW(
mapOf(
Flavour.SOUR to true,
Flavour.DRY to false
)
);
YELLOW;
fun item(): ApricornItem = when(this) {
BLACK -> CobblemonItems.BLACK_APRICORN
@@ -131,5 +101,4 @@ enum class Apricorn(
companion object {
val CODEC: Codec<Apricorn> = StringRepresentable.fromValues(::values)
}
}
@@ -85,6 +85,7 @@ object Berries : JsonDataRegistry<Berry> {
BerryRegistrySyncPacket(this.all()).sendToPlayer(player)
}
@JvmStatic
fun all() = this.berries.values.toList()
/**
@@ -93,6 +94,7 @@ object Berries : JsonDataRegistry<Berry> {
* @param identifier The identifier of the berry.
* @return The [Berry] if loaded otherwise null.
*/
@JvmStatic
fun getByIdentifier(identifier: ResourceLocation): Berry? = this.berries[identifier]
/**
@@ -101,6 +103,7 @@ object Berries : JsonDataRegistry<Berry> {
* @param name The path of the identifier of the berry under the [Cobblemon.MODID] namespace.
* @return The [Berry] if loaded otherwise null.
*/
@JvmStatic
fun getByName(name: String): Berry? = this.getByIdentifier(cobblemonResource(name))
}
@@ -0,0 +1,29 @@
/*
* 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.berry.spawncondition
import com.cobblemon.mod.common.api.berry.Berry
import com.cobblemon.mod.common.util.cobblemonResource
import net.minecraft.core.Holder
import net.minecraft.tags.TagKey
import net.minecraft.util.RandomSource
import net.minecraft.world.level.biome.Biome
class SpecificBiomeCondition : BerrySpawnCondition {
lateinit var biome: TagKey<Biome>
val minGroveSize: Int = 1
val maxGroveSize: Int = 1
override fun canSpawn(berry: Berry, biome: Holder<Biome>) = biome.`is`(this.biome)
override fun getGroveSize(random: RandomSource) = random.nextIntBetweenInclusive(minGroveSize, maxGroveSize)
companion object {
val ID = cobblemonResource("specific_biome")
}
}
@@ -8,7 +8,6 @@
package com.cobblemon.mod.common.api.cooking
import net.minecraft.ChatFormatting
import net.minecraft.util.StringRepresentable
/**
@@ -18,16 +17,16 @@ import net.minecraft.util.StringRepresentable
* @author Licious
* @since November 28th, 2022
*/
enum class Flavour(val colour: Int, val chatFormatting: ChatFormatting): StringRepresentable {
SPICY(0x00FF00, ChatFormatting.RED),
DRY(0xFF0000, ChatFormatting.DARK_AQUA),
SWEET(0x0000FF, ChatFormatting.LIGHT_PURPLE),
BITTER(0xFFFF00, ChatFormatting.GREEN),
SOUR(0xFF00FF, ChatFormatting.YELLOW),
MILD(0xFF00FF, ChatFormatting.DARK_PURPLE);
enum class Flavour(val colour: Int): StringRepresentable {
SPICY(0xFA795E),
DRY(0x65AFF3),
SWEET(0xFF82CF),
BITTER(0x77C96A),
SOUR(0xF3D465),
MILD(0x9D99BF);
override fun getSerializedName() = name
companion object {
val CODEC = StringRepresentable.fromEnum<Flavour> { Flavour.entries.toTypedArray() }
}
}
}
@@ -8,8 +8,14 @@
package com.cobblemon.mod.common.api.cooking
import com.cobblemon.mod.common.api.riding.stats.RidingStat
import com.cobblemon.mod.common.util.math.geometry.toDegrees
import com.cobblemon.mod.common.util.math.geometry.toRadians
import net.minecraft.util.FastColor
import net.minecraft.world.item.ItemStack
import kotlin.math.atan2
import kotlin.math.cos
import kotlin.math.sin
private val colourMap = mapOf(
Flavour.SPICY to 0xFEB37D,
@@ -49,37 +55,111 @@ fun getColourMixFromFlavours(dominantFlavours: List<Flavour>, forBubbles: Boolea
if (colors.isEmpty()) return null
val (alphaSum, redSum, greenSum, blueSum) = colors.fold(IntArray(4)) { acc, color ->
acc[0] += FastColor.ARGB32.alpha(color)
acc[1] += FastColor.ARGB32.red(color)
acc[2] += FastColor.ARGB32.green(color)
acc[3] += FastColor.ARGB32.blue(color)
acc
}
return FastColor.ARGB32.color(
alphaSum / colors.size,
redSum / colors.size,
greenSum / colors.size,
blueSum / colors.size
)
return getColourMixFromColors(colors)
}
fun getColourMixFromRideStatBoosts(dominantBoosts: Iterable<RidingStat>, forBubbles: Boolean = false): Int? {
return getColourMixFromFlavours(dominantBoosts.map { it.flavour }, forBubbles)
}
// Mixing RGB colors directly often gives poor results
// Converting them to HSL and averaging hues circularly produces more natural blends
fun getColourMixFromColors(colors: List<Int>): Int? {
if (colors.isEmpty()) return null
if (colors.size == 1) return colors[0]
val (alphaSum, redSum, greenSum, blueSum) = colors.fold(IntArray(4)) { acc, color ->
acc[0] += FastColor.ARGB32.alpha(color)
acc[1] += FastColor.ARGB32.red(color)
acc[2] += FastColor.ARGB32.green(color)
acc[3] += FastColor.ARGB32.blue(color)
acc
val hslColors = colors.map {
val red = FastColor.ARGB32.red(it)
val green = FastColor.ARGB32.green(it)
val blue = FastColor.ARGB32.blue(it)
rgbToHsl(red, green, blue)
}
return FastColor.ARGB32.color(
alphaSum / colors.size,
redSum / colors.size,
greenSum / colors.size,
blueSum / colors.size
val hues = hslColors.map { it.h.toDouble() }
val huesAverage = hueAverage(hues).toFloat()
val saturations = hslColors.map { it.s }
val saturationsAverage = average(saturations)
val lightness = hslColors.map { it.l }
val lightnessAverage = average(lightness)
val rgbColor = hslToRgb(huesAverage, saturationsAverage, lightnessAverage)
return FastColor.ARGB32.color(rgbColor.r, rgbColor.g, rgbColor.b)
}
// Based on https://iter.ca/post/hue-avg
fun hueAverage(hues: List<Double>): Float {
val points = hues.map { hue ->
val rad = hue.toRadians()
Pair(cos(rad), sin(rad))
}
val avgX = points.sumOf { it.first.toDouble() } / points.size
val avgY = points.sumOf { it.second.toDouble() } / points.size
var degrees = atan2(avgY, avgX).toDegrees()
if (degrees < 0) {
degrees += 360f
} else if (degrees > 360) {
degrees -= 360f
}
return degrees
}
fun average(values: List<Float>): Float {
if (values.isEmpty()) return 0f
return values.sum() / values.size
}
data class HSL(val h: Float, val s: Float, val l: Float)
fun rgbToHsl(r: Int, g: Int, b: Int): HSL {
val rf = r / 255f
val gf = g / 255f
val bf = b / 255f
val max = maxOf(rf, gf, bf)
val min = minOf(rf, gf, bf)
val delta = max - min
var h = 0f
val l = (max + min) / 2f
val s = if (delta == 0f) 0f else delta / (1f - kotlin.math.abs(2f * l - 1f))
if (delta != 0f) {
h = when (max) {
rf -> ((gf - bf) / delta) % 6f
gf -> ((bf - rf) / delta) + 2f
else -> ((rf - gf) / delta) + 4f
}
h *= 60f
if (h < 0) h += 360f
}
return HSL(h, s, l)
}
data class RGB(val r: Int, val g: Int, val b: Int)
fun hslToRgb(h: Float, s: Float, l: Float): RGB {
val c = (1f - kotlin.math.abs(2f * l - 1f)) * s
val x = c * (1f - kotlin.math.abs((h / 60f) % 2f - 1f))
val m = l - c / 2f
val (rf, gf, bf) = when {
h < 60f -> Triple(c, x, 0f)
h < 120f -> Triple(x, c, 0f)
h < 180f -> Triple(0f, c, x)
h < 240f -> Triple(0f, x, c)
h < 300f -> Triple(x, 0f, c)
else -> Triple(c, 0f, x)
}
return RGB(
((rf + m) * 255).toInt().coerceIn(0, 255),
((gf + m) * 255).toInt().coerceIn(0, 255),
((bf + m) * 255).toInt().coerceIn(0, 255)
)
}
@@ -9,13 +9,11 @@
package com.cobblemon.mod.common.api.cooking
import com.cobblemon.mod.common.CobblemonItemComponents
import com.cobblemon.mod.common.item.PokePuffItem
import com.cobblemon.mod.common.item.PokePuffItem.Companion.DISLIKED_FLAVOR_MULTIPLIER
import com.cobblemon.mod.common.item.PokePuffItem.Companion.LIKED_FLAVOR_MULTIPLIER
import com.cobblemon.mod.common.pokemon.Nature
import net.minecraft.resources.ResourceLocation
import net.minecraft.world.item.ItemStack
import net.minecraft.core.registries.BuiltInRegistries
import net.minecraft.world.item.ItemStack
object PokePuffUtils {
@@ -25,11 +23,12 @@ object PokePuffUtils {
val (baseFriendship) = calculateBaseFriendship(stack)
return when {
dominantFlavour == nature.favouriteFlavour -> (baseFriendship / LIKED_FLAVOR_MULTIPLIER).toInt()
dominantFlavour == Flavour.MILD && isNeutralNature -> (baseFriendship / 2.0).coerceAtLeast(1.0).toInt()
else -> (-baseFriendship / DISLIKED_FLAVOR_MULTIPLIER).toInt()
}
val multiplier = if (
dominantFlavour == nature.favouriteFlavour ||
(dominantFlavour == Flavour.MILD && isNeutralNature)
) LIKED_FLAVOR_MULTIPLIER else -DISLIKED_FLAVOR_MULTIPLIER
return (baseFriendship / multiplier).toInt()
}
fun calculateBaseFriendship(stack: ItemStack): Pair<Double, Double> {
@@ -77,8 +76,8 @@ object PokePuffUtils {
Flavour.SPICY -> "attack"
Flavour.DRY -> "special_attack"
Flavour.SWEET -> "speed"
Flavour.BITTER -> "special_defense"
Flavour.SOUR -> "defense"
Flavour.BITTER -> "special_defence"
Flavour.SOUR -> "defence"
Flavour.MILD -> "neutral"
}
}
@@ -18,14 +18,13 @@ import net.minecraft.resources.ResourceLocation
* @since August 5th, 2022
*/
interface DataProvider {
/**
* Registers a [DataRegistry] to listen for updates.
* The updates will automatically happen on the correct sides based on [DataRegistry.type].
*
* @param registry The [DataRegistry] being registered.
*/
fun <T : DataRegistry> register(registry: T): T
fun <T : DataRegistry> register(registry: T, reloadable: Boolean): T
/**
* Attempts to find a [DataRegistry] with the given [ResourceLocation].
@@ -28,12 +28,14 @@ import net.minecraft.server.level.ServerPlayer
object DialogueManager {
val activeDialogues = mutableMapOf<UUID, ActiveDialogue>()
@JvmStatic
fun startDialogue(playerEntity: ServerPlayer, dialogue: Dialogue): ActiveDialogue {
val activeDialogue = ActiveDialogue(playerEntity, dialogue)
startDialogue(activeDialogue)
return activeDialogue
}
@JvmStatic
fun startDialogue(playerEntity: ServerPlayer, npcEntity: NPCEntity, dialogue: Dialogue): ActiveDialogue {
val activeDialogue = ActiveDialogue(playerEntity, dialogue)
activeDialogue.runtime.withNPCValue("npc", npcEntity)
@@ -42,6 +44,7 @@ object DialogueManager {
return activeDialogue
}
@JvmStatic
fun startDialogue(activeDialogue: ActiveDialogue) {
activeDialogue.initialize()
if (!activeDialogue.completion.isDone) {
@@ -49,6 +52,7 @@ object DialogueManager {
}
}
@JvmStatic
fun stopDialogue(playerEntity: ServerPlayer) {
val activeDialogue = playerEntity.activeDialogue ?: return
DialogueClosedPacket(activeDialogue.dialogueId).sendToPlayer(playerEntity)
@@ -10,14 +10,12 @@ package com.cobblemon.mod.common.api.drop
import com.cobblemon.mod.common.api.events.CobblemonEvents.LOOT_DROPPED
import com.cobblemon.mod.common.api.events.drops.LootDroppedEvent
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity
import com.cobblemon.mod.common.pokemon.Pokemon
import kotlin.random.Random
import net.minecraft.network.RegistryFriendlyByteBuf
import net.minecraft.server.level.ServerLevel
import net.minecraft.server.level.ServerPlayer
import net.minecraft.world.entity.LivingEntity
import net.minecraft.world.item.ItemStack
import net.minecraft.world.phys.Vec3
/**
@@ -95,6 +93,16 @@ class DropTable {
pokemon: Pokemon? = null,
) {
val drops = getDrops(amount, pokemon).toMutableList()
postLootDroppedEvent(drops, entity, world, pos, player)
}
fun postLootDroppedEvent(
drops: MutableList<DropEntry>,
entity: LivingEntity?,
world: ServerLevel,
pos: Vec3,
player: ServerPlayer?,
) {
LOOT_DROPPED.postThen(
event = LootDroppedEvent(this, player, entity, drops),
ifSucceeded = { it.drops.forEach { it.drop(entity, world, pos, player) } }
@@ -110,4 +118,4 @@ class DropTable {
val entries = buffer.readInt()
repeat(entries) { this.entries.add(ItemDropEntry().decode(buffer)) }
}
}
}
@@ -22,6 +22,7 @@ interface PokemonSideDelegate : EntitySideDelegate<PokemonEntity> {
fun handleStatus(status: Byte) {}
fun spawnShinyParticle(player: Player) {}
fun spawnAspectParticle() {}
fun applyRenderRotation(partialTick: Float) {}
fun positionRider(passenger: Entity, positionUpdater: MoveFunction)
fun updateAge(age: Int) {}
}
@@ -20,6 +20,7 @@ import com.cobblemon.mod.common.api.events.berry.BerryHarvestEvent
import com.cobblemon.mod.common.api.events.berry.BerryMutationOfferEvent
import com.cobblemon.mod.common.api.events.berry.BerryMutationResultEvent
import com.cobblemon.mod.common.api.events.berry.BerryYieldCalculationEvent
import com.cobblemon.mod.common.api.events.cooking.PokeSnackSpawnPokemonEvent
import com.cobblemon.mod.common.api.events.drops.LootDroppedEvent
import com.cobblemon.mod.common.api.events.entity.*
import com.cobblemon.mod.common.api.events.farming.ApricornHarvestEvent
@@ -152,6 +153,9 @@ object CobblemonEvents {
@JvmField
val RIDE_EVENT_PRE = CancelableObservable<RidePokemonEvent.Pre>()
@JvmField
val RIDE_EVENT_APPLY_STAMINA = EventObservable<RidePokemonEvent.ApplyStamina>()
@JvmField
val RIDE_EVENT_POST = EventObservable<RidePokemonEvent.Post>()
@@ -324,6 +328,12 @@ object CobblemonEvents {
@JvmField
val BOBBER_SPAWN_POKEMON_POST = EventObservable<BobberSpawnPokemonEvent.Post>()
@JvmField
val POKE_SNACK_SPAWN_POKEMON_PRE = CancelableObservable<PokeSnackSpawnPokemonEvent.Pre>()
@JvmField
val POKE_SNACK_SPAWN_POKEMON_POST = EventObservable<PokeSnackSpawnPokemonEvent.Post>()
@JvmField
val BAIT_EFFECT_REGISTRATION = EventObservable<BaitEffectFunctionRegistryEvent>()
@@ -0,0 +1,38 @@
/*
* 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.events.cooking
import com.bedrockk.molang.runtime.value.MoValue
import com.cobblemon.mod.common.api.events.Cancelable
import com.cobblemon.mod.common.api.molang.MoLangFunctions.moLangFunctionMap
import com.cobblemon.mod.common.api.spawning.detail.SpawnAction
import com.cobblemon.mod.common.block.entity.PokeSnackBlockEntity
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity
interface PokeSnackSpawnPokemonEvent {
data class Pre(
val pokeSnackBlockEntity: PokeSnackBlockEntity,
val spawnAction: SpawnAction<*>,
) : Cancelable(), PokeSnackSpawnPokemonEvent {
val context = mapOf<String, MoValue>()
val functions = moLangFunctionMap(
cancelFunc
)
}
data class Post(
val pokeSnackBlockEntity: PokeSnackBlockEntity,
val spawnAction: SpawnAction<*>,
val pokemonEntity: PokemonEntity,
) : PokeSnackSpawnPokemonEvent {
val context = mapOf<String, MoValue>()
}
}
@@ -8,9 +8,7 @@
package com.cobblemon.mod.common.api.events.pokemon
import com.cobblemon.mod.common.util.server
import com.bedrockk.molang.runtime.value.DoubleValue
import com.bedrockk.molang.runtime.value.MoValue
import com.cobblemon.mod.common.api.events.Cancelable
import com.cobblemon.mod.common.api.molang.MoLangFunctions.asMoLangValue
import com.cobblemon.mod.common.api.molang.MoLangFunctions.moLangFunctionMap
@@ -49,4 +47,36 @@ interface RidePokemonEvent {
"pokemon" to pokemon.struct
)
}
/**
* Event published when stamina is being applied. At this point you can modify the stamina that will get used on the
* mount or you can make the stamina infinite. Handy hey.
*/
class ApplyStamina(
override val player: ServerPlayer,
override val pokemon: PokemonEntity,
var rideStamina: Float
) : RidePokemonEvent {
val context = mutableMapOf(
"player" to player.asMoLangValue(),
"pokemon" to pokemon.struct,
"ride_stamina" to DoubleValue(rideStamina)
)
val functions = moLangFunctionMap(
"set_ride_stamina" to { params ->
rideStamina = params.getDouble(0).toFloat().coerceIn(0F, 1F)
DoubleValue.ONE
},
"set_infinite_stamina" to { _ ->
rideStamina = -1F
DoubleValue.ONE
},
)
fun setInfiniteStamina() {
rideStamina = -1F
}
fun isInfiniteStamina() = rideStamina == -1F
}
}
@@ -57,6 +57,7 @@ object PokeRods : JsonDataRegistry<PokeRod> {
* Gets a Pokerod from registry name.
* @return the pokerod object if found otherwise null.
*/
@JvmStatic
fun getPokeRod(name : ResourceLocation): PokeRod? = rods[name]
}
@@ -68,6 +68,7 @@ class SpawnBait(
val TYPING = cobblemonResource("typing")
val EGG_GROUP = cobblemonResource("egg_group")
val SHINY_REROLL = cobblemonResource("shiny_reroll")
val DROPS_REROLL = cobblemonResource("drops_reroll")
val HIDDEN_ABILITY_CHANCE = cobblemonResource("ha_chance")
val POKEMON_CHANCE = cobblemonResource("pokemon_chance")
val FRIENDSHIP = cobblemonResource("friendship")
@@ -85,6 +86,7 @@ class SpawnBait(
registerEffect(NATURE) { entity, effect -> FishingSpawnCause.alterNatureAttempt(entity, effect) }
registerEffect(IV) { entity, effect -> FishingSpawnCause.alterIVAttempt(entity, effect) }
registerEffect(SHINY_REROLL) { entity, effect -> FishingSpawnCause.shinyReroll(entity, effect) }
registerEffect(DROPS_REROLL) { entity, effect -> FishingSpawnCause.saveDropsReroll(entity, effect) }
registerEffect(GENDER_CHANCE) { entity, effect -> FishingSpawnCause.alterGenderAttempt(entity, effect) }
registerEffect(LEVEL_RAISE) { entity, effect -> FishingSpawnCause.alterLevelAttempt(entity, effect) }
registerEffect(HIDDEN_ABILITY_CHANCE) { entity, _ -> FishingSpawnCause.alterHAAttempt(entity) }
@@ -53,20 +53,24 @@ object SpawnBaitEffects : JsonDataRegistry<SpawnBait> {
}
}
@JvmStatic
fun getEffectsFromRodItemStack(stack: ItemStack): List<SpawnBait.Effect> {
return getEffectsFromItemStack(stack.components.get(CobblemonItemComponents.BAIT)?.stack ?: ItemStack.EMPTY)
}
@JvmStatic
fun getEffectsFromItemStack(stack: ItemStack): List<SpawnBait.Effect> {
val componentEffects = stack.get(CobblemonItemComponents.BAIT_EFFECTS)?.effects ?: emptyList()
return componentEffects.mapNotNull(::getFromIdentifier).flatMap { it.effects } +
getEffectsFromItem(stack.itemHolder)
}
@JvmStatic
fun getBaitIdentifiersFromItem(holder: Holder<Item>): List<ResourceLocation> {
return effectsMap.entries.filter { it.value.item.fits(holder) }.map { it.key }
}
@JvmStatic
fun getBaitFromItemStack(holder: Holder<Item>): List<SpawnBait> {
return effectsMap.values.filter { it.item.fits(holder) }
}
@@ -75,6 +79,7 @@ object SpawnBaitEffects : JsonDataRegistry<SpawnBait> {
return getBaitFromItemStack(holder).flatMap { it.effects }
}
@JvmStatic
fun getFromIdentifier(identifier: ResourceLocation): SpawnBait? {
// Check normal spawn bait registry
effectsMap[identifier]?.let { return it }
@@ -98,6 +103,7 @@ object SpawnBaitEffects : JsonDataRegistry<SpawnBait> {
}
// if it has bait effects and is not listed as a seasoning then it is a bait
@JvmStatic
fun isFishingBait(stack: ItemStack): Boolean {
val holder = stack.itemHolder
return effectsMap.values.any { it.item.fits(holder) }
@@ -11,24 +11,18 @@ package com.cobblemon.mod.common.api.fishing
import kotlin.math.ceil
object SpawnBaitUtils {
@JvmStatic
fun mergeEffects(effects: List<SpawnBait.Effect>): List<SpawnBait.Effect> {
val grouped = effects.groupBy { Pair(it.type, it.subcategory) }
return grouped.map { (key, groupEffects) ->
val (type, subcategory) = key
val count = groupEffects.size
val totalChance = groupEffects.sumOf { it.chance }
val totalValue = groupEffects.sumOf { it.value }
val multiplier = when (count) {
2 -> 0.8
3 -> 0.6
else -> 1.0
}
val adjustedChance = (totalChance * multiplier).coerceAtMost(1.0)
val adjustedValue = ceil(totalValue * multiplier)
val adjustedChance = totalChance.coerceAtMost(1.0)
val adjustedValue = ceil(totalValue)
SpawnBait.Effect(type, subcategory, adjustedChance, adjustedValue)
}
@@ -69,6 +69,7 @@ object Fossils: JsonDataRegistry<Fossil> {
/**
* Gets all loaded [Fossil]s.
*/
@JvmStatic
fun all() = this.fossils.values.toList()
/**
@@ -76,6 +77,7 @@ object Fossils: JsonDataRegistry<Fossil> {
* @param identifier The identifier of the fossil.
* @return The [Fossil] if loaded, otherwise null.
*/
@JvmStatic
fun getByIdentifier(identifier: ResourceLocation): Fossil? = this.fossils[identifier]
/**
@@ -83,6 +85,7 @@ object Fossils: JsonDataRegistry<Fossil> {
* @param fossilStacks The fossil [ItemStack]'s.
* @return The [Fossil] if found, otherwise null.
*/
@JvmStatic
fun getFossilByItemStacks(fossilStacks: List<ItemStack>): Fossil? {
return this.all().firstOrNull { it.matchesIngredients(fossilStacks) }
}
@@ -92,6 +95,7 @@ object Fossils: JsonDataRegistry<Fossil> {
* @param fossilStacks The fossil [ItemStack]'s.
* @return The [Fossil] if found to be a superset, otherwise null.
*/
@JvmStatic
fun getSubFossilByItemStacks(fossilStacks: List<ItemStack>): Fossil? {
return this.all().firstOrNull { it.matchesIngredientsSubSet(fossilStacks) }
}
@@ -100,6 +104,7 @@ object Fossils: JsonDataRegistry<Fossil> {
* @param itemStack The ingredient [ItemStack].
* @return true if it's a fossil ingredient, otherwise false.
*/
@JvmStatic
fun isFossilIngredient(itemStack: ItemStack): Boolean {
return this.all().any { it.isIngredient(itemStack) }
}
@@ -57,6 +57,7 @@ object NaturalMaterials : JsonDataRegistry<List<NaturalMaterial>>{
}
}
@JvmStatic
fun isNaturalMaterial(item: ItemStack): Boolean {
val itemId = BuiltInRegistries.ITEM.getKey(item.item)
return itemId in itemMap.keys || tagMap.keys.any {
@@ -64,6 +65,7 @@ object NaturalMaterials : JsonDataRegistry<List<NaturalMaterial>>{
}
}
@JvmStatic
fun getContent(item: ItemStack): Int? {
val itemId = BuiltInRegistries.ITEM.getKey(item.item)
if (itemId in itemMap.keys) {
@@ -76,6 +78,7 @@ object NaturalMaterials : JsonDataRegistry<List<NaturalMaterial>>{
return null
}
@JvmStatic
fun getReturnItem(item: ItemStack): ResourceLocation? {
val itemId = BuiltInRegistries.ITEM.getKey(item.item)
if (itemId in itemMap.keys) {
@@ -87,4 +90,4 @@ object NaturalMaterials : JsonDataRegistry<List<NaturalMaterial>>{
}
return null
}
}
}
@@ -0,0 +1,57 @@
/*
* 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.item
import com.cobblemon.mod.common.api.data.DataRegistry
import com.cobblemon.mod.common.api.reactive.SimpleObservable
import com.cobblemon.mod.common.battles.runner.ShowdownService
import com.cobblemon.mod.common.pokemon.helditem.CobblemonHeldItemManager
import com.cobblemon.mod.common.util.cobblemonResource
import net.minecraft.resources.ResourceLocation
import net.minecraft.server.level.ServerPlayer
import net.minecraft.server.packs.PackType
import net.minecraft.server.packs.resources.ResourceManager
import java.io.File
object HeldItems : DataRegistry {
override val id = cobblemonResource("held_items")
override val type = PackType.SERVER_DATA
override val observable = SimpleObservable<HeldItems>()
override fun sync(player: ServerPlayer) {}
// val heldItems = PrioritizedList<BagItemLike>()
internal val heldItemsScripts = mutableMapOf<String, String>() // showdown item ID to JavaScript
val showdownItems = hashSetOf<String>()
override fun reload(manager: ResourceManager) {
heldItemsScripts.clear()
ShowdownService.service.resetRegistryData("heldItem")
manager.listResources("held_items") { it.path.endsWith(".js") }.forEach { (identifier, resource) ->
resource.open().use { stream ->
stream.bufferedReader().use { reader ->
val resolvedIdentifier = ResourceLocation.fromNamespaceAndPath(identifier.namespace, File(identifier.path).nameWithoutExtension)
val js = reader.readText()
heldItemsScripts[resolvedIdentifier.path] = js
}
}
}
ShowdownService.service.sendRegistryData(heldItemsScripts, "heldItem")
val itemsJson = ShowdownService.service.getRegistryData("heldItem")
for (i in 0 until itemsJson.size()) {
val jsItem = itemsJson[i].asJsonObject
showdownItems += jsItem.get("id").asString
}
CobblemonHeldItemManager.load()
this.observable.emit(this)
}
}

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