Compare commits

..
Author SHA1 Message Date
Segfault Guy 5661ae2cb0 Command and showdown service update for testing team validation. 2025-09-22 10:09:56 -04:00
Segfault Guy 9e9603d60d Merge remote-tracking branch 'origin/main' into experimental_showdown_changes 2025-08-20 23:39:03 -04:00
Polymeta 5b90a4d894 prevent clientActions inside dialogues being executed twice
Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-08-21 00:06:31 +01:00
Polymeta 69d3ef23ef fix pokedex lookup during battle causing crashes with namespaced species
Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-08-20 21:50:03 +01:00
Landon ca8bcd966f Merge branch 'playericonfix' into 'main'
don't touch my mixins if you're not going to bother testing your changes

See merge request cable-mc/cobblemon!1789
2025-08-19 19:06:49 +00:00
Segfault Guy 12c7318625 don't touch my mixins if you're not going to bother testing your changes 2025-08-19 09:42:44 -04:00
Hiroku 4f917b94e8 Merge branch 'narrator-dev-fix' into 'main'
Fixed narrator-related GUI crashes on NeoForge

See merge request cable-mc/cobblemon!1788
2025-08-19 12:03:57 +00:00
gruxor 9e82cb2516 Fixed narrator-related GUI crashes on NeoForge 2025-08-19 07:37:27 -04:00
Polymeta bbf85d5804 Merge branch 'riding-fix-failing-asserts' into 'main'
Move and rename the scaleToRange function and place it in the RidingBehaviour...

See merge request cable-mc/cobblemon!1783
2025-08-19 09:20:17 +00:00
Jackson BowesandPolymeta 9daa85750b Move and rename the scaleToRange function and place it in the RidingBehaviour... 2025-08-19 09:20:17 +00:00
Polymeta 6f7c3b0681 Merge branch 'riding-species-sprint-and-jet-crash-fix' into 'main'
Add ability to disable sprinting per species for horse and fix unneeded assert in a Jet function.

See merge request cable-mc/cobblemon!1780
2025-08-19 08:38:00 +00:00
Polymeta d262bb6136 Merge branch 'sound' into 'main'
Tatami, Hearty Grains and cooking sounds

See merge request cable-mc/cobblemon!1784
2025-08-19 08:37:18 +00:00
Polymeta 7509934394 Merge branch 'cooking-pot-ui-tweaks' into 'main'
Cooking Pot UI Tweaks + Bugfix

See merge request cable-mc/cobblemon!1785
2025-08-19 08:35:32 +00:00
GertimoshkaandPolymeta a0ae226506 Cooking Pot UI Tweaks + Bugfix 2025-08-19 08:35:32 +00:00
Hiroku 0dde8d27e6 Merge branch 'ihatebugtypes' into 'main'
kill all bug type pokemon

Closes #1541

See merge request cable-mc/cobblemon!1786
2025-08-18 05:32:06 +00:00
Segfault Guy 559e728bc3 Deprecate ContextManager. 2025-08-18 00:34:12 -04:00
Segfault Guy dcea1bc67f Merge remote-tracking branch 'origin/main' into ihatebugtypes 2025-08-18 00:29:52 -04:00
Sterrezo 7dc451f344 Ambient sound now stops when broken, volume adjustments 2025-08-17 23:28:53 +02:00
Sterrezo b6ea6a6850 Merge branch 'main' into sound 2025-08-17 22:37:13 +02:00
Segfault Guy 7fe91f7ad0 Original natures for flavor-bias berries 2025-08-17 14:29:18 -04:00
Hiroku 768a6df247 Merge branch 'target-selection-fixes' into 'main'
Fix target selection for gimmick moves

See merge request cable-mc/cobblemon!1781
2025-08-17 08:14:39 +00:00
Landon Wills 5c9c8b0b3b Fix target selection for gimmick moves 2025-08-17 03:34:20 -04:00
jackowes 085972f2d3 Add ability to disable sprinting per species for horse and fix unneeded assert in a Jet function. 2025-08-17 01:51:35 -05:00
Landon ddefd1aa24 Merge branch 'booooooo' into 'main'
Fix ghost pokemon that occur due to riding

See merge request cable-mc/cobblemon!1779
2025-08-17 06:04:58 +00:00
JPAKx4 53f441884e Fix ghost pokemon that occur due to riding 2025-08-16 23:47:46 -05:00
Landon 954c5a1027 Merge branch 'riding-transition-changes' into 'main'
Riding transition changes

See merge request cable-mc/cobblemon!1778
2025-08-17 04:35:10 +00:00
Landon Wills c26ab8ff60 Add license 2025-08-17 00:12:39 -04:00
Landon Wills 9ea9f9b307 Fix issue with passenger ejection and survival double jump 2025-08-16 23:29:24 -04:00
Paul fc5ba24e76 removed some debug printlns 2025-08-17 10:07:59 +10:00
Landon Wills 0fe496a290 Fix up outstanding TODOs 2025-08-16 04:43:06 -04:00
Landon Wills df0eb21a9e Change some of the json files to new system 2025-08-16 04:36:52 -04:00
Landon Wills 79ed7da316 Sync behavours between client and server 2025-08-16 04:15:30 -04:00
Landon Wills 908a8b89a6 Add logic for if pokemon is always hovering 2025-08-16 03:34:35 -04:00
Landon Wills 83d4d6f7e9 Change logic for transitions 2025-08-16 03:20:56 -04:00
Hiroku a588906f43 Merge branch 'showdown-datapack' into 'main'
Datapackable abilities/moves; refactoring

See merge request cable-mc/cobblemon!1686
2025-08-15 22:10:03 +00:00
Polymeta e890fd3e9e adjust mochi EV increase per previous discussion
Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-08-15 21:16:46 +01:00
Test e7c95ac72c Merge branch 'main' of https://gitlab.com/cable-mc/cobblemon 2025-08-15 13:15:08 -04:00
Test 245765c6af fix partial match filtering, +lang support in PC 2025-08-15 13:14:51 -04:00
Paul f8ae4dcecd Removed battler_cooldown stuff since it was not really fully implemented, fixed NPCs getting autoconfigured with pokemon behaviours 2025-08-15 21:12:54 +10:00
Test f694c7c821 Merge branch 'whispering-whismur' into 'main'
Implement a vibration-dampening behaviour for Pokémon living in the Deep Dark

See merge request cable-mc/cobblemon!1745
2025-08-15 03:26:36 +00:00
Test a4824b6766 Merge branch 'riding-fix-reverse-animation-input' into 'main'
amend what has been broken :(

See merge request cable-mc/cobblemon!1775
2025-08-15 03:22:15 +00:00
Test 834533aa6a Merge branch 'main' of https://gitlab.com/cable-mc/cobblemon 2025-08-14 23:04:05 -04:00
Test 0c9cf2c83d update snack POI key 2025-08-14 23:03:33 -04:00
jackowes fbffeff8dc amend what has been broken :( 2025-08-14 21:39:51 -05:00
Paul 8532ca2d38 Added fluid sleeping, fixed non-water sleepers sleeping in water 2025-08-15 11:38:27 +10:00
Paul 722bf5ba7b Added q.delete_variable(struct, name) and q.delete_variables(struct) 2025-08-15 10:07:21 +10:00
gruxor ca1cf72d86 semicolon 2025-08-14 08:24:52 -04:00
gruxor e12936fb66 Refactoring; review resolution 2025-08-14 08:24:52 -04:00
gruxor 9b85742c00 Datapackable abilities/moves; refactoring 2025-08-14 08:24:52 -04:00
Hiroku aceaef14c5 Merge branch 'tag-im-it' into 'main'
Errors Be Gone

See merge request cable-mc/cobblemon!1774
2025-08-14 11:28:17 +00:00
dhi_holo c168364ca4 Errors Be Gone
Fixed an error I made in a previous branch
Fixed some tag names erroring on NeoForge
Fixed some items not being properly scrubbed from the mod
Fixed some tags not having translations, causing errors in the log
2025-08-14 20:45:45 +10:00
Polymeta db6533795b Merge branch 'Adjust-Generation-of-New-Flora-1.7' into 'main'
Adjusted generation chances/rates for all new 1.7 flora

See merge request cable-mc/cobblemon!1773
2025-08-13 22:45:52 +00:00
Slippy 596c0cd8c3 Adjusted generation chances/rates for all new 1.7 flora 2025-08-13 15:55:40 -05:00
Polymeta b65cec2916 fix codec error
Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-08-13 16:39:42 +01:00
Polymeta 63ef406058 Merge branch 'cooking-still-needs-fixes' into 'main'
Even More Cooking Fixes

See merge request cable-mc/cobblemon!1771
2025-08-13 13:42:14 +00:00
GertimoshkaandPolymeta 4856e9feee Even More Cooking Fixes 2025-08-13 13:42:14 +00:00
Polymeta e839813c2a Merge branch 'food-check' into 'main'
Food Balancing Tweaks and Asset Updates

See merge request cable-mc/cobblemon!1772
2025-08-13 11:05:29 +00:00
dhi_holoandPolymeta c70f2a6684 Food Balancing Tweaks and Asset Updates 2025-08-13 11:05:28 +00:00
Paul 860ec50071 Fixed the lerping between poses for pitch tilting 2025-08-13 20:44:54 +10:00
Polymeta 93e26fb31f Merge branch 'snack' into 'main'
🍰

See merge request cable-mc/cobblemon!1768
2025-08-13 06:09:45 +00:00
TestandPolymeta 23e2e18019 🍰 2025-08-13 06:09:45 +00:00
Polymeta a0d5a1fbad Merge branch 'flx-the-big-oops' into 'main'
Fix the oopsie

See merge request cable-mc/cobblemon!1770
2025-08-13 06:08:27 +00:00
JPAKx4 b1b5ef7236 Fix the oopsie 2025-08-12 22:30:00 -05:00
Polymeta 6ab2aa3413 fix game crashes if lure enchantment is not present
Closes #1646

Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-08-12 21:51:33 +01:00
Polymeta 16819bb0e7 * Updated Ponigiri Textures
* Updated Sinister Tea Textures, as well as added alternate recipes with altered component outputs (does encounter a slight bug with Minecraft's inherent behaviour, will be fixed naturally when we upgrade versions)
* Cleaned up a lot of recipe files
* Tweaked some food colours
* Made berries smeltable into their various dyes
* Updated the Apricorn crop models and hitboxes
* New Campfire Pot advancement
* Hearty Rice now has variable growth from bone meal
2025-08-12 20:17:45 +00:00
dhi_holoandPolymeta 0bf3488a01 Foods 2025-08-12 20:17:44 +00:00
Polymeta 1f3d3e90cf Merge branch 'even-more-cooking-fixes' into 'main'
Additional Fixes to Cooking Pots

See merge request cable-mc/cobblemon!1763
2025-08-12 20:16:09 +00:00
Polymeta d141e6b46d Merge branch 'riding-controllers-expanded' into 'main'
Controller additions as well as many controller fixes and polish

See merge request cable-mc/cobblemon!1762
2025-08-12 15:13:04 +00:00
jackowes e683dedc2a rename rotateheadFunctions to unbreak 2025-08-12 09:25:16 -05:00
jackowes c7d6107cea Merge branch 'main' into riding-controllers-expanded 2025-08-11 22:52:55 -05:00
jackowes ef7e76dc07 move driverInput over to Player and check if input has changed before sending driverInput to the server. 2025-08-11 22:50:53 -05:00
jackowes 5697fa53f0 move driverInput over to ServerPlayer 2025-08-11 21:35:53 -05:00
Gertimoshka 59d3475b31 Recalculate then Seasoning Slots also change 2025-08-11 17:09:58 +03:00
Polymeta 2e87894dac Merge branch 'molang-commands' into 'main'
Add command to run MoLang expressions as well as add `entity` to RunMolangScriptCommand.kt.

See merge request cable-mc/cobblemon!1743
2025-08-11 13:46:05 +00:00
JordanandPolymeta 2dd4373890 Add command to run MoLang expressions as well as add entity to RunMolangScriptCommand.kt. 2025-08-11 13:46:05 +00:00
Test e33587fefc pc walls 2025-08-10 23:50:02 -04:00
Polymeta 1089fb2571 various fixes for suspicious stew (specifically pep up flower ingredient too) interactions with mooshtanks
Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-08-11 00:57:22 +01:00
Polymeta db777381e7 Merge branch 'josh/locator-flip-fix' into 'main'
Only flip locators Z axis if model is attached to an entity

See merge request cable-mc/cobblemon!1767
2025-08-10 21:48:32 +00:00
Polymeta 8fee43c0b8 Merge branch 'orientable-entities' into 'main'
Orientation now works for Living Entities

See merge request cable-mc/cobblemon!1601
2025-08-10 21:37:48 +00:00
JordanandPolymeta d7160948cd Orientation now works for Living Entities 2025-08-10 21:37:48 +00:00
Polymeta 868b8ae662 Merge branch 'neva-enough-molang' into 'main'
Neva enough molang

See merge request cable-mc/cobblemon!1755
2025-08-10 21:31:29 +00:00
JordanandPolymeta d65884de5b Neva enough molang 2025-08-10 21:31:29 +00:00
Josh 7714d60b2e Only flip locators Z axis if model is attached to an entity 2025-08-10 16:52:08 -04:00
jackowes f4f6cbee38 Address MR comments 2025-08-10 02:02:49 -05:00
Hiroku 09883fd239 Merge branch 'pitch-tilting' into 'main'
Added pitch tilting animation for fishies and birds, implemented for magikarp and pidgey

See merge request cable-mc/cobblemon!1766
2025-08-09 05:25:38 +00:00
Paul 50cea69dfb Added delta_movement query function to entities 2025-08-09 15:12:08 +10:00
Paul 583892364d Added pitch tilting animation for fishies and birds, implemented for magikarp and pidgey 2025-08-09 13:02:34 +10:00
Paul 325d1af484 Fixed swim wanders not working 2025-08-09 10:44:55 +10:00
Polymeta 6ae71f28e6 Merge branch 'spicy-molang' into 'main'
Added string utility related MoLang functions

See merge request cable-mc/cobblemon!1754
2025-08-08 23:29:38 +00:00
SpicyandPolymeta 5687a71de4 Added string utility related MoLang functions 2025-08-08 23:29:38 +00:00
jackowes 1664b917f8 Dolphin time 2025-08-08 16:48:07 -05:00
Polymeta 8199f8d7c2 Merge branch 'josh/helditem-render-fix' into 'main'
Fixed locators being flipped for shoulder mounts and model widgets

See merge request cable-mc/cobblemon!1764
2025-08-08 21:41:09 +00:00
Polymeta 6b39251d65 Merge branch 'Shipwreck-Loot-Table-Adjustments' into 'main'
Shipwreck loot table adjustments

See merge request cable-mc/cobblemon!1765
2025-08-08 21:40:50 +00:00
Slippy cd03e6f8c4 Replaced the Phantoms with Breezes in the Lush Shipwreck Cove 2025-08-08 00:48:19 -05:00
Slippy a1b53f90ad Adjusting the loot table to trial spawners in shipwreck coves a little bit. 2025-08-08 00:40:54 -05:00
Test 55587908a2 update state icons/ride controls overlay 2025-08-07 22:05:09 -04:00
jackowes e1ed483d67 Remove altitude limits on rides 2025-08-07 11:49:59 -05:00
jackowes c460bac177 Accessibility rides for jet and bird. Need hooked up to cobble settings/config and auto changed out if accessibility rides are enabled. Further refinement needed but waiting for the rolling counterparts to be polished first. 2025-08-06 20:29:08 -05:00
jackowes ad6771f8f4 minekart improvements 2025-08-05 21:34:52 -05:00
jackowes ad1a68cefe Add base of minekart behaviour and fix player head movement flag for a few rides 2025-08-05 16:19:18 -05:00
Josh c0677c6353 Fixed item rendering being flipped for shoulder mounts and model widgets 2025-08-05 13:11:14 -04:00
jackowes e8ab8fda71 Fix sound attenuation, inverse input_right() animation data, and properly destroy sounds after dismounting a pokmeon. 2025-08-05 10:09:00 -05:00
jackowes 7def27e437 dupe function from merge 2025-08-04 20:37:24 -05:00
jackowes f3db0ed61d hover anim tests 2025-08-04 20:29:10 -05:00
jackowes fdcff83a2d Merge branch 'main' into riding-controllers-expanded
# Conflicts:
#	common/src/main/kotlin/com/cobblemon/mod/common/api/riding/behaviour/types/land/VehicleBehaviour.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/api/riding/behaviour/types/liquid/BoatBehaviour.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/entity/pokemon/PokemonEntity.kt
#	common/src/main/resources/assets/cobblemon/sounds.json
#	common/src/main/resources/data/cobblemon/species/generation1/charizard.json
2025-08-04 20:11:56 -05:00
jackowes 8815758bc0 Adjust all ride params after double tick error. Mirror deltamovement scale to ridevel to fix the catching on terrain issue. Scale smoothly between sprinting turn rate and walking turn rate on horse. 2025-08-04 20:00:34 -05:00
Gertimoshka ea49ea7818 Made Cooking pot drop/put crafting remainder items from pots facing direction, as well as unhardcoded the remainder item calculation 2025-08-04 21:18:54 +03:00
Paul 756989b0c0 Fixed storages not saving (OOPS) 2025-08-04 21:26:01 +10:00
Paul 58a4267f42 Added a living entity look_at_position function so we can make funny battle effects 2025-08-04 21:25:54 +10:00
Hiroku e8826a3d0e Merge branch 'trigger-behaviour' into 'main'
EntityCallbacks

See merge request cable-mc/cobblemon!1757
2025-08-04 07:58:43 +00:00
Veraxiel 0606d57ef1 Edit README.md 2025-08-04 03:50:21 -04:00
Veraxiel ef2578c1a7 Fixed typo on tag readme 2025-08-04 03:49:26 -04:00
Veraxiel 3812de7558 Edit README.md 2025-08-04 03:46:47 -04:00
Hiroku ef558981c2 Add readme 2025-08-04 06:18:14 +00:00
Paul e4f928bce1 Revert "Removed #c:is_cold from #cobblemon:is_cold to prevent pokes in the end that should not be in the end"
This reverts commit 6090fce254.
2025-08-04 15:55:43 +10:00
Paul 6090fce254 Removed #c:is_cold from #cobblemon:is_cold to prevent pokes in the end that should not be in the end 2025-08-04 14:29:20 +10:00
Hiroku 5a5d43404f Merge branch 'safer-change-detection' into 'main'
Removed observable use from Pokemon to better secure saving from rollback issues

See merge request cable-mc/cobblemon!1759
2025-08-04 00:52:56 +00:00
Paul 931c3a7e6c Removed observable use from Pokemon to better secure saving from rollback issues 2025-08-04 10:09:16 +10:00
Paul d5a6e0dffd Ohhh, THAT's why it was written that way 2025-08-03 15:40:56 +10:00
Polymeta f56c357e4e Merge branch 'retype' into 'main'
Small Asset Updates

See merge request cable-mc/cobblemon!1758
2025-08-02 21:16:38 +00:00
dhi_holoandPolymeta 4bfca0da43 Small Asset Updates 2025-08-02 21:16:38 +00:00
jackowes 1aaea961fb Fix cursed golurk jsons 2025-08-02 02:59:52 -05:00
jackowes 8253b96a67 Add multiplayer support for driver input tracking 2025-08-02 01:42:15 -05:00
Paul 52cff2e99d prepare_{id}, damage_{id} hooks for action effects, q.has_argument for battle messages, added q.hit_count to move action effects 2025-08-02 13:11:20 +10:00
Gertimoshka 725b8bc614 Made client not calculate preview item every render, and instead on crafting slot changes 2025-08-01 20:58:12 +03:00
Paul 52f21ffc82 License and registration please 2025-08-01 20:38:14 +10:00
Paul 9c31899f3c Fixed up some missing lang for behaviours 2025-08-01 20:32:17 +10:00
Polymeta 9a5172f1cc fix encoding issue with boat ride style
Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-08-01 10:48:23 +01:00
Polymeta 11051f2b54 Merge branch 'riding-looping-sound' into 'main'
Ride specific sound implementation

See merge request cable-mc/cobblemon!1641
2025-08-01 08:12:32 +00:00
Jackson BowesandPolymeta 8b48cfaa50 Ride specific sound implementation 2025-08-01 08:12:32 +00:00
jackowes 6593fcc250 fix jittery mons 2025-08-01 00:59:09 -05:00
jackowes f51376f9c3 quick fixes 2025-07-31 21:58:23 -05:00
jackowes 23ecc3dd05 Merge branch 'main' into riding-controllers-expanded
# Conflicts:
#	common/src/main/kotlin/com/cobblemon/mod/common/api/riding/behaviour/RidingBehaviour.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/api/riding/behaviour/RidingController.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/api/riding/behaviour/types/GenericSwimBehaviour.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/api/riding/behaviour/types/air/BirdBehaviour.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/api/riding/behaviour/types/air/GliderBehaviour.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/api/riding/behaviour/types/air/JetBehaviour.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/api/riding/behaviour/types/land/HorseBehaviour.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/api/riding/behaviour/types/land/VehicleBehaviour.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/api/riding/behaviour/types/liquid/BurstBehaviour.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/entity/pokemon/PokemonEntity.kt
#	common/src/main/resources/assets/cobblemon/bedrock/pokemon/animations/0967_cyclizar/cyclizar.animation.json
#	common/src/main/resources/assets/cobblemon/bedrock/pokemon/models/0967_cyclizar/cyclizar.geo.json
#	common/src/main/resources/assets/cobblemon/bedrock/pokemon/posers/0967_cyclizar/cyclizar.json
#	common/src/main/resources/data/cobblemon/species/generation1/charizard.json
#	common/src/main/resources/data/cobblemon/species/generation9/cyclizar.json
2025-07-31 21:25:01 -05:00
jackowes 9e6f27162e quick tweak 2025-07-31 21:13:06 -05:00
jackowes 6c279e0986 vehicle tweaks 2025-07-31 21:13:06 -05:00
jackowes 76d1291180 vehicle v3 becoming 2025-07-31 21:13:06 -05:00
jackowes 627f09010b Start of vehicle v3 2025-07-31 21:13:03 -05:00
jackowes 9afd0e6fc3 nope 2025-07-31 21:11:28 -05:00
jackowes 1ea361cce9 I cannot for fine the culprit of this increase in vertical impulse when moving as opposed to standing still. :(. Also rocket improvements. 2025-07-31 21:11:28 -05:00
jackowes 41bf22c43a More rocket improvements
# Conflicts:
#	common/src/main/kotlin/com/cobblemon/mod/common/api/riding/behaviour/types/GenericSwimBehaviour.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/api/riding/behaviour/types/RocketBehaviour.kt
2025-07-31 21:11:24 -05:00
jackowes 71989292d3 Various rocket improvements including: lower boost turning speed, turn momentum, behaviour switch time decrease, temp golurk flight animation tweaks for fluidity (need to check with gingle), also tweaked the feel and air resistance of the ride as a whole 2025-07-31 21:10:35 -05:00
jackowes f46b13da6a Quick fix to velocity zeroing for dimensions that horse and rocket don't care about. 2025-07-31 21:10:35 -05:00
Gertimoshka 875cd2c1b9 Remove Depriciated CookingPotPreviewSlot class 2025-07-31 22:26:18 +03:00
Gertimoshka db972aba4a Fixed Preview Slot being dropped on breaking and showing by removing the fake slot and remaking how fake item render works 2025-07-31 21:36:24 +03:00
Polymeta 50c3ffc774 Merge branch 'bugfix-entity-health' into 'main'
Couple Pokémon HP / Entity health in a more sensible way.

See merge request cable-mc/cobblemon!1750
2025-07-28 08:58:23 +00:00
Polymeta daf32a5cf3 Merge branch 'food-tweaks' into 'main'
Eat your, well, lots of things

Closes #1616

See merge request cable-mc/cobblemon!1756
2025-07-28 08:56:41 +00:00
dhi_holoandPolymeta af4d2077ae Eat your, well, lots of things 2025-07-28 08:56:41 +00:00
Paul 3f090ce691 Merge remote-tracking branch 'origin/main' into trigger-behaviour 2025-07-28 11:34:37 +10:00
Polymeta b1a3cbf29d Merge branch 'cleanup-crew' into 'main'
Small Fixes

Closes #1640 and #1199

See merge request cable-mc/cobblemon!1753
2025-07-27 21:08:36 +00:00
dhi_holoandPolymeta 130c50a2d6 Small Fixes 2025-07-27 21:08:35 +00:00
Hiroku 0b65259ee7 Merge branch 'let-me-break-it-down-for-you-mark-we-can-bee-bees' into 'main'
Species JSON dictates if something acts like a bee (pollinates flowers and delivers to hive/nest)

See merge request cable-mc/cobblemon!1709
2025-07-27 12:16:12 +00:00
Paul 53897a2613 Removed debug code 2025-07-27 22:04:17 +10:00
Paul 8e6681b3aa Introduced EntityCallbacks 2025-07-27 22:02:30 +10:00
Paul 50427965ab Merge remote-tracking branch 'origin/main' into trigger-behaviour 2025-07-26 21:41:09 +10:00
Hiroku 3318ee801a Merge branch 'extra_flows' into 'main'
Many more Pokemon function refinements and Molang Flows

See merge request cable-mc/cobblemon!1710
2025-07-26 11:04:31 +00:00
Hiroku 0b97d139af Edit CobblemonFlows.kt 2025-07-26 10:51:35 +00:00
Paul 3966607373 Tidy up the script actions for adding/removing a Behaviour on an entity 2025-07-26 18:34:40 +10:00
Paul b7c5f489fd More cleanup 2025-07-26 14:31:57 +10:00
Paul 39ec6187b5 Various cleanup items and important fixes for wandering caused by bee stuff 2025-07-26 14:29:05 +10:00
Paul b7681b43f9 Merge remote-tracking branch 'origin/main' into let-me-break-it-down-for-you-mark-we-can-bee-bees 2025-07-26 13:26:19 +10:00
Konoha ae594a0790 Merge branch 'main' into extra_flows
# Conflicts:
#	common/src/main/kotlin/com/cobblemon/mod/common/api/molang/MoLangFunctions.kt
2025-07-24 08:04:14 -04:00
Konoha 6af299406d Merge remote-tracking branch 'origin/main' 2025-07-24 07:57:51 -04:00
Nadja Reitzenstein 29833df50e Couple Pokémon HP / Entity health in a more sensible way.
Specifically, don't touch Battle HP for wild Pokémon so that you can't hurt a Pokémon down out of battle for an easier catch, and always round entity health up so that only a HP of 0 is a health of 0
2025-07-24 13:09:33 +02:00
Paul 01d42abdb2 look_at_target requires nearest living entities memory and sensor 2025-07-23 23:16:32 +10:00
Paul baa3f47769 Removed unused memory 2025-07-23 19:11:19 +10:00
Paul 16e716411a Merge remote-tracking branch 'origin/main' into let-me-break-it-down-for-you-mark-we-can-bee-bees
# Conflicts:
#	common/src/main/kotlin/com/cobblemon/mod/common/entity/npc/NPCBrain.kt
2025-07-23 18:58:19 +10:00
Paul 3bbc551fd7 Wander controls supporting keeping wanderers around a point, bees stay around their hive 2025-07-23 18:55:52 +10:00
Polymeta 74381d8e3c move mixin away from ModifyConstant to improve compatibility with other mods
Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-07-22 23:48:21 +01:00
Polymeta 6688c32a1d Merge branch 'smashling' into 'main'
Create saccharine_sapling.json

See merge request cable-mc/cobblemon!1749
2025-07-22 21:39:24 +00:00
dhi_holo 45dcf6f23b Create saccharine_sapling.json 2025-07-22 17:02:54 +10:00
Polymeta e4d92ead6a Merge branch 'log-spawn' into 'main'
Update saccharine log spawning

See merge request cable-mc/cobblemon!1742
2025-07-19 20:11:01 +00:00
TestandPolymeta 9631f3c9d5 Update saccharine log spawning 2025-07-19 20:11:01 +00:00
Polymeta 0787f2772d Merge branch '1.7-Tree-and-Crop-Generation' into 'main'
SaccharineTreeFeature to consider #cobblemon:has_feature/saccharine_tree

See merge request cable-mc/cobblemon!1748
2025-07-19 19:24:00 +00:00
Polymeta 4011502e54 changelog and license
Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-07-19 08:35:51 +01:00
Polymeta 06855f6404 adding placed features for grains and galarica nuts
Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-07-19 08:17:37 +01:00
Slippy 815955b904 Hearty Grains, Galarica Nut Bushes, and Saccharine Trees now generate with appropriate rates and locations. Just need Poly to do the mixin work 2025-07-19 01:50:24 -05:00
Polymeta df9eed0da3 Merge branch '1,21-Gigawatts' into 'main'
Lightning Interactions with Pokemon

See merge request cable-mc/cobblemon!1733
2025-07-19 06:08:35 +00:00
JazzMcNadeandPolymeta 99b73aa8dd Lightning Interactions with Pokemon 2025-07-19 06:08:34 +00:00
Polymeta f2d5073c7c enforce fabric versions to match what cobblemon is built against for consistency
Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-07-19 00:02:49 +01:00
Paul 3fda5f7c7a give all NPCs the dialogues and battling memories 2025-07-18 18:18:44 +10:00
Hiroku 9b81666437 Merge branch 'pokedex-percentage-command' into 'main'
Fix Pokedex Percentage Command

Closes #1525

See merge request cable-mc/cobblemon!1692
2025-07-18 04:58:34 +00:00
CeejayandHiroku b43f969c02 Fix Pokedex Percentage Command 2025-07-18 04:58:34 +00:00
Polymeta 02c4947513 fixed some typos in pokemon interactions
Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-07-17 23:10:07 +01:00
Nadja Reitzenstein 714412246b Implement a vibration-dampening behaviour for Pokémon living in the Deep Dark 2025-07-17 20:01:27 +02:00
Slippy 6158b36103 Saccharine trees are now rarer and generate in the correct biomes 2025-07-16 12:18:39 -05:00
Polymeta 2e14f8f8e8 hearty grains will generate with both blocks when of the right age
Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-07-16 10:22:48 +01:00
Polymeta bc80d6a171 SaccharineTreeFeature to consider #cobblemon:has_feature/saccharine_tree
Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-07-16 08:30:32 +01:00
Konoha 65a7fc6fd7 Implement includeLegacy parameters 2025-07-15 22:11:47 -04:00
Konoha ce019631ce Merge branch 'main' into extra_flows 2025-07-15 21:58:19 -04:00
Konoha 0534e0d201 Merge remote-tracking branch 'origin/main' 2025-07-15 21:51:31 -04:00
Konoha 895e3ca378 Update Benched Moves after teachLearnableMoves call 2025-07-15 21:51:14 -04:00
Test 3048e3d81d fix data for variations and species features 2025-07-15 02:14:53 -04:00
Polymeta 77fb94d9ef Merge branch 'fix-x-axis-offsets' into 'main'
Fix X-axis being a different direction than Blockbench and addded new property attachment_options

See merge request cable-mc/cobblemon!1730
2025-07-13 23:25:25 +00:00
JordanandPolymeta 9078ee2191 Fix X-axis being a different direction than Blockbench and addded new property attachment_options 2025-07-13 23:25:24 +00:00
Polymeta 06edc2810e Merge branch 'cooking-fixes-gert' into 'main'
Plefora of Cooking related fixes/implementations

See merge request cable-mc/cobblemon!1739
2025-07-13 22:56:49 +00:00
GertimoshkaandPolymeta 81b83aabc1 Plefora of Cooking related fixes/implementations 2025-07-13 22:56:49 +00:00
Polymeta 6e7895c3b3 Merge branch 'PhantomsFearTheFurySwipes' into 'main'
Implement avoidedByPhantom behavior

See merge request cable-mc/cobblemon!1737
2025-07-12 20:26:33 +00:00
JazzMcNade c69de804b9 Merge branch 'main' into PhantomsFearTheFurySwipes 2025-07-12 11:15:39 -05:00
JazzMcNade fbbed7b20a More license 2025-07-12 11:15:27 -05:00
Polymeta a1b5f0a567 Merge branch 'i-cant-take-it-anymore' into 'main'
Block Texture Clean Up

See merge request cable-mc/cobblemon!1738
2025-07-12 12:07:01 +00:00
Polymeta e42e06781d Merge branch 'flora-heals-an-aching-soul' into 'main'
Design Meeting Changes - Recipe/Loot Table Tweaks

See merge request cable-mc/cobblemon!1740
2025-07-12 12:03:35 +00:00
Konoha 6a7b71d5a7 Cleanup 2025-07-11 22:30:30 -04:00
dhi_holo 0a48014931 Design Meeting Changes
- Healing Machine recipe rebalanced
- Vivichoke Crops now drop one seed at full grown stage as well as the crop
- Vivichoke now can only be crafted into one seed, rather than two, to compensate for the above
2025-07-12 11:23:21 +10:00
Polymeta a70fed25c5 Merge branch 'feature/type-madness' into 'main'
make elementaltypes showdown identifiable for consistency

See merge request cable-mc/cobblemon!1688
2025-07-11 21:01:59 +00:00
Polymeta c2daed803f make elementaltypes showdown identifiable for consistency 2025-07-11 21:01:58 +00:00
Konoha a56ffe1742 Merge remote-tracking branch 'origin/main' 2025-07-11 11:04:14 -04:00
dhi_holo 658fed638d Update saccharine_log_slathered.json
Should remove errors from that blockstate too
2025-07-11 19:39:10 +10:00
dhi_holo 3faa2a0467 Saccharine and Candles
Fixed all Saccharine wood recipes missing advancements, and the log spamming Candle Poké Cake Blockstate being missin
2025-07-11 19:05:32 +10:00
dhi_holo 77788a91b7 Merge branch 'main' into i-cant-take-it-anymore 2025-07-11 19:01:21 +10:00
Hiroku 6d1570302d Merge branch 'unbreak-servers' into 'main'
Random bullshit go!

See merge request cable-mc/cobblemon!1736
2025-07-09 11:35:21 +00:00
Nadja Reitzenstein 811e9d3352 Don't return items after battles that weren't actually used. 2025-07-09 12:48:41 +02:00
dhi_holo 745b48e77b Update CHANGELOG.md
Changelog.
2025-07-09 15:06:40 +10:00
dhi_holo 9a4815f453 Block Texture Clean Up
Re-organised all the Block textures to match how the Item textures are sorted

Also did a very minor clean up of the item texture folder to just keep it clean.
2025-07-09 15:06:09 +10:00
JazzMcNade 2ff41cdf9b Updated Cresselia to scare off phantoms 2025-07-08 23:35:08 -05:00
JazzMcNade d5268e8751 Added TODO for should mount cries 2025-07-08 21:40:46 -05:00
JazzMcNade 518799ee25 Updated Changelog 2025-07-08 21:38:07 -05:00
JazzMcNade b597bb0818 Clean up multiple entity searches. 2025-07-08 21:31:42 -05:00
JazzMcNade 1b39a64927 Added check for shoulder mounted phantom feared pokemon 2025-07-08 21:01:45 -05:00
Nadja Reitzenstein e610aa18d7 Clean up imports and other assorted compiler warnings 2025-07-09 00:56:02 +02:00
Nadja Reitzenstein 42ecd3e813 Replace if-creative-then-stack.shrink with the proper stack.consume method.
This is both nicer to read and also reduces our code by a few lines. Additionally, this replaces all player.isCreative checks with the more appropriate player.hasInfiniteMaterials one.
2025-07-09 00:44:33 +02:00
Nadja Reitzenstein 1299b8fee8 Fix an ExceptionInInitializer error on specifically dedicated servers. 2025-07-08 23:53:35 +02:00
Landon a12cf17cfa Merge branch 'hotfix-infinite-falldamage' into 'main'
Correctly reset a ridden Pokémon's fall damage server-side

See merge request cable-mc/cobblemon!1735
2025-07-08 21:52:22 +00:00
Nadja Reitzenstein 74faca60f2 Correctly reset a ridden Pokémon's fall damage server-side 2025-07-08 23:12:15 +02:00
Landon 6420176787 Merge branch 'change-a-few-numbers-nothing-to-see-here' into 'main'
Change a few numbers here and there, nothing to see here :)

See merge request cable-mc/cobblemon!1734
2025-07-08 20:37:39 +00:00
Nadja Reitzenstein 6ee81fe2ab Fix a fun build error 2025-07-08 22:24:37 +02:00
Nadja Reitzenstein 96f4f988f8 Update dependencies chore 2025-07-08 21:31:56 +02:00
Sterrezo db37721e9f Merge branch 'main' into sound 2025-07-08 17:18:03 +02:00
Sterrezo c373d24fe1 Campfire Pot now plays the break sound when the campfire is broken 2025-07-08 17:17:50 +02:00
Sterrezo 2770cbbe35 Added Campfire Pot sounds 2025-07-08 17:09:26 +02:00
Hiroku 4ccfbbcb37 Merge branch '1622-fix-battle-screen-closing' into 'main'
Fix battle GUI not closing

Closes #1622

See merge request cable-mc/cobblemon!1723
2025-07-08 14:02:38 +00:00
Hiroku ed0aa83013 Merge branch 'light' into 'main'
Update block lighting + lambdynamiclights compat items

See merge request cable-mc/cobblemon!1731
2025-07-08 12:42:22 +00:00
Hiroku b94394f8d1 Merge branch 'forever-rock' into 'main'
suppress evolution notification and hide evolve button if holding everstone

See merge request cable-mc/cobblemon!1732
2025-07-08 12:39:45 +00:00
Hiroku b16687c132 Merge branch 'evolution-concurrent-hotpatch' into 'main'
Make Evolution more resilient against concurrent modification exceptions.

Closes #1536

See merge request cable-mc/cobblemon!1725
2025-07-08 10:31:50 +00:00
Hiroku 56767b3e31 Merge branch 'jet-momentum-damage' into 'main'
Jet behaviour momentum damage logic

Closes #1555

See merge request cable-mc/cobblemon!1715
2025-07-08 10:31:05 +00:00
AramandHiroku 67eb3e1046 Jet behaviour momentum damage logic 2025-07-08 10:31:04 +00:00
JazzMcNade dda128e9e3 implemented mixin for avoidedByPhantom behavior flag 2025-07-08 02:42:24 -05:00
Test 952ea8d3b7 suppress evolution notification and hides evolve button in summary interface if Pokémon is holding Everstone 2025-07-07 22:27:37 -04:00
Test cc764ff9db add farmland to water plantable for hearty 2025-07-07 18:51:22 -04:00
Nadja Reitzenstein 2e1f8af700 Make Evolution more resilient against concurrent modification exceptions.
BenchedMoves is quite vulnerable to concurrent modifications as it does no internal locking. The code changed in this commit showcases that issue extremely well: As `pokemon.benchedMoves` was updated one-by-one and each update send a separate BenchedMovesUpdatePacket which would all be handled in parallel by the Client evolving a Pokémon which lears a bunch of moves on evolution was an almost sure-fire way to crash the game.

This *isn't a fix* for that! It's merely a hotpatch to make sure this common a crash doesn't sneak itself into the next release.

Fixes: #1536
2025-07-07 18:16:24 +02:00
Test 6c6a8e4679 indents 2025-07-06 16:12:28 -04:00
Test 9e9a22eb14 Update block lighting, add lambdynamiclights support for items 2025-07-06 16:08:14 -04:00
Sterrezo 699a47c633 Updated Hearty Grains sounds and added Hearty Grain Bale sounds 2025-07-06 17:51:45 +02:00
Sterrezo 47ebc6c6ca Merge branch 'main' into sound 2025-07-06 17:37:57 +02:00
Test 32bfaf152d +vibrance galarica, fix hearty stage + allow planting on dry farmland 2025-07-06 04:59:25 -04:00
Hiroku d1b947b264 Merge branch 'blox' into 'main'
update sacch/crops/blocks, consolidate POI registration

See merge request cable-mc/cobblemon!1729
2025-07-06 05:29:46 +00:00
Test 6122fb6107 disallow honey on leaves if waterlogged 2025-07-06 00:49:29 -04:00
Paul 14c7ee3216 Added PokedexManager.obtain as a replacement for catch (java interop) 2025-07-06 14:04:59 +10:00
Hiroku 1a00ae7fb8 Merge branch 'particle-fix' into 'main'
Fixed rotation of locators relative to entities.

Closes #1573

See merge request cable-mc/cobblemon!1726
2025-07-06 01:45:57 +00:00
JPAKx4 36b3cbe3b8 Fix Formatting. 2025-07-05 20:03:18 -05:00
JPAKx4 49686a1670 Merge remote-tracking branch 'origin/particle-fix' into particle-fix 2025-07-05 20:00:53 -05:00
JPAKx4andJordan 2354888a73 Cleanup some now unused code and comment out some debug code. 2025-07-06 00:09:33 +00:00
JPAKx4andJordan f64065d54f this suckssssss 2025-07-06 00:09:33 +00:00
JPAKandJordan 005ab0ca74 Locator Debug Code 2025-07-06 00:09:33 +00:00
JPAKandJordan c13307e931 temp commit 2025-07-06 00:09:33 +00:00
JPAKx4andJordan bd21a6e1ca Fixed the root locator losing rotation and removed unnecessary scaling. 2025-07-06 00:09:33 +00:00
JPAKx4 94ea15b9c5 Cleanup some now unused code and comment out some debug code. 2025-07-05 19:08:41 -05:00
Test bc6c9def56 Merge branch 'main' of https://gitlab.com/cable-mc/cobblemon into blox 2025-07-05 17:50:12 -04:00
Test 9ca6a2e461 fix block drop, prevent smearing honey in water, +log cosmetics 2025-07-05 15:26:09 -04:00
Sterrezo bdb47532b9 let's not import everything there is 2025-07-05 18:50:31 +02:00
Sterrezo b5a40adcdf Merge branch 'main' into sound 2025-07-05 18:12:18 +02:00
Sterrezo 955422aab7 Updated Hearty Grains sounds and added water variation 2025-07-05 17:55:30 +02:00
Paul 599603501a Combee should fly instead of walk, and not fly crazy fast 2025-07-05 22:42:30 +10:00
Paul 891ed6045d This is good news 2025-07-05 22:30:07 +10:00
Test f7560a12ad update sacch/crops/blocks, consolidate POI registration 2025-07-05 04:12:58 -04:00
Test 8bc1767917 Merge branch 'we-must-defend-our-way-of-life' into 'main'
Pokemon can be made to hunt from the pasture block

See merge request cable-mc/cobblemon!1728
2025-07-05 06:45:27 +00:00
Test 8b29d3a533 Merge branch '1603-out-of-sync-guis' into 'main'
Resolve "Staying on party screen while a Pokémon evolves causes temporary weirdness."

Closes #1603

See merge request cable-mc/cobblemon!1717
2025-07-05 06:44:33 +00:00
JPAKx4 de1248b97e this suckssssss 2025-07-04 21:36:44 -05:00
Paul a654225ed5 Improve handling of pasture conflict behaviour flag 2025-07-05 11:31:29 +10:00
JPAK 2d18113e27 Locator Debug Code 2025-07-04 20:21:57 -05:00
JPAK cdadc6fa67 temp commit 2025-07-04 20:21:40 -05:00
Paul a15aa86c66 Merge remote-tracking branch 'origin/we-must-defend-our-way-of-life' into let-me-break-it-down-for-you-mark-we-can-bee-bees
# Conflicts:
#	common/src/main/kotlin/com/cobblemon/mod/common/api/ai/config/task/TaskConfig.kt
2025-07-05 10:14:41 +10:00
JPAKx4 ff7ef1b67e Merge remote-tracking branch 'origin/particle-fix' into particle-fix 2025-07-04 16:45:34 -05:00
JPAKx4 d91c819700 Fixed the root locator losing rotation and removed unnecessary scaling. 2025-07-04 16:45:19 -05:00
Josh 259e1d05cb Changing nickname no longer causes ModelWidget state to updated 2025-07-04 04:35:05 -04:00
Paul 549b88a4c2 Removed unnecessary thing 2025-07-04 14:43:24 +10:00
Hiroku 68b60e7d50 Merge branch 'wheel' into 'main'
Tetragon ➜ Octagon

See merge request cable-mc/cobblemon!1727
2025-07-04 03:33:42 +00:00
Test a7787707f2 changelog 2025-07-03 22:52:50 -04:00
Test 539097e681 Merge branch 'main' of https://gitlab.com/cable-mc/cobblemon into wheel
# Conflicts:
#	common/src/main/kotlin/com/cobblemon/mod/common/client/gui/interact/wheel/InteractWheelGUI.kt
2025-07-03 22:39:06 -04:00
Test 8b70a4124d Interact Tetragon ➜ Interact Octagon 2025-07-03 22:38:49 -04:00
Test 7e8b000311 Merge branch 'bugfix/fix-interact-wheel-issues' into 'main'
Fix minor bugs related to the Pokemon interaction wheel

See merge request cable-mc/cobblemon!1722
2025-07-04 02:30:58 +00:00
StarliteHeartandTest 00c86b89cb Fix minor bugs related to the Pokemon interaction wheel 2025-07-04 02:30:57 +00:00
JPAKx4 b2c9d96829 Fixed the root locator losing rotation. 2025-07-03 20:35:49 -05:00
Hiroku 8ea5ea6804 changelog [skip-ci] 2025-07-03 11:15:23 +00:00
Hiroku 1305e8a11d Merge branch 'level-rng-fixes' into 'main'
Rewrite potentially sketchy uses of randomness.

Closes #1560

See merge request cable-mc/cobblemon!1724
2025-07-03 11:14:09 +00:00
Nadja Reitzenstein 909cd8a6eb Adds the Concurrent Chunk Management Engine (C2ME) to runtime dependencies.
While no code relies on any internals or even features of C2ME that mod increases performance massively, especially on servers. This means it's reasonably often used and compatability with it is a reasonable goal to have.

Additionally, it helps to detect multithreading bugs by distributing workload over more threads than vanilla and thus making it much more likely to hit those bugs.
2025-07-03 12:53:29 +02:00
Nadja Reitzenstein d60abdc940 Rewrite potentially sketchy uses of randomness.
Using the random source stored in `Level` from a different thread can lead to hard-to-debug ConcurrentAccessExceptions. A common source for these problems is using level randomness in networking code such as synced data.

This commit rewrites three potentially sketchy usages of level randomness into a form that I think is safe from this particular problem.

Fixes: #1560
2025-07-03 12:53:29 +02:00
Paul ec8e6f58c8 Merge remote-tracking branch 'origin/we-must-defend-our-way-of-life' into we-must-defend-our-way-of-life 2025-07-03 18:35:15 +10:00
Paul 12967e4813 Bits of AI cleanup and fixed non-look pokemon still looking 2025-07-03 18:35:08 +10:00
Paul d754cc69fe Merge remote-tracking branch 'origin/main' into we-must-defend-our-way-of-life 2025-07-03 18:29:10 +10:00
Charzard4261 a2b54643fe Remove fake PartySendBinding press on BattleGUI close 2025-07-03 00:09:12 +01:00
Test 896c195dd9 reverse pc scroll direction 2025-07-02 18:59:47 -04:00
Landon 206bfacba0 Merge branch 'multi-seat-mounts' into 'main'
Multi seat mounts

See merge request cable-mc/cobblemon!1721
2025-07-02 18:07:40 +00:00
Landon Wills b6ffbd1ed8 Update licenses 2025-07-02 13:55:11 -04:00
Landon Wills 829900fb58 Prevent seat shifts when passengers dismount 2025-07-02 02:13:26 -04:00
Test be3066f7b2 rm commented 2025-07-02 00:07:57 -04:00
Test fb56ab5865 update pc, pasture slots 2025-07-01 23:40:54 -04:00
Test a3f02a8a7c Merge branch 'main' of https://gitlab.com/cable-mc/cobblemon into we-must-defend-our-way-of-life 2025-07-01 19:42:09 -04:00
Paul 6c2757b94b Fixed issues with sending out pokes 2025-07-01 21:33:05 +10:00
Test 139ef56fdf account for users putting in negative numbers for control overlay duration 2025-06-30 23:32:22 +00:00
Sterrezo cfa55095aa Added sounds for Hearty Grains, updated Tatami sounds 2025-06-30 19:41:26 +02:00
Paul d3e473ff85 Merge remote-tracking branch 'origin/main' into we-must-defend-our-way-of-life 2025-06-30 20:05:40 +10:00
Paul fdebc5987e Merge remote-tracking branch 'origin/main' 2025-06-30 19:53:09 +10:00
Paul caeeb756fe Fixed crash with several pokemon due to particle locators not being there at the time effects played 2025-06-30 19:52:47 +10:00
Polymeta 67b5e5c6a8 fixes for scanner overlay and display case block
Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-06-30 10:45:02 +01:00
Paul 720eef5e75 finalizeSpawn for PokemonEntity's 2025-06-30 16:33:04 +10:00
Landon ebc7f67655 Merge branch 'snapshot-warnings' into 'main'
Prepare for displaying a snapshot warning to users

See merge request cable-mc/cobblemon!1706
2025-06-30 06:10:47 +00:00
NickandLandon 3c508c5bd1 Prepare for displaying a snapshot warning to users 2025-06-30 06:10:46 +00:00
Landon c7052d295c Merge branch 'controls-overlay' into 'main'
Ride Controls Overlay

See merge request cable-mc/cobblemon!1720
2025-06-30 05:52:31 +00:00
Landon Wills 9193e9a372 Reduce default display second config value slightly 2025-06-30 01:07:44 -04:00
Test f6244cbe12 controls overlay 2025-06-30 00:11:35 -04:00
Paul 5743a04db7 Fixed sleeping pokemon outside of battle never waking up (DUN DUNNN) 2025-06-30 10:40:27 +10:00
Paul 439a5077c2 Merge remote-tracking branch 'origin/main' into we-must-defend-our-way-of-life
# Conflicts:
#	common/src/main/kotlin/com/cobblemon/mod/common/api/ai/config/task/TaskConfig.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/pokemon/ai/CombatBehaviour.kt
#	common/src/main/resources/data/cobblemon/species/generation1/charizard.json
2025-06-30 10:16:59 +10:00
Polymeta a8a028bb7a Merge branch 'more-ai' into 'main'
Lots more brain work and some fixes

See merge request cable-mc/cobblemon!1719
2025-06-29 23:12:56 +00:00
Konoha 1984990a7e Array Utilities 2025-06-29 08:42:28 -04:00
Paul 984e10a780 Prototype for behaviour scraper 2025-06-29 18:51:38 +10:00
Paul ad0571a782 lil renames and stuff 2025-06-29 18:37:59 +10:00
Paul a18581ae1c Merge remote-tracking branch 'origin/lang-updates' 2025-06-29 10:29:50 +10:00
Konoha 49e2e635db Ability Pokemon Function 2025-06-28 19:09:37 -04:00
Zack the GhastandWeblate 177ad70172 Translated using Weblate (Portuguese (Portugal))
Currently translated at 63.0% (5365 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/pt_PT/
2025-06-28 18:20:05 +00:00
washashu0905andWeblate 98fb731270 Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 94.7% (8062 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hant/
2025-06-28 18:20:04 +00:00
阿鱼andWeblate a98dbcf267 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 87.9% (7480 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-06-28 18:20:02 +00:00
Konoha 62e9294c8a Merge remote-tracking branch 'origin/main' 2025-06-28 11:41:40 -04:00
Paul 314bd19dc6 Fixed clicking on combat icon in pasture block 'selecting' the entry, also licenses 2025-06-28 10:23:55 +10:00
Paul c0344f5604 Fixed entity lookup for pasture S2C packet 2025-06-28 10:09:35 +10:00
Konoha d795dca4fa Inventory player function 2025-06-27 16:02:18 -04:00
Konoha 503511e0ae teach_move, can_learn_move, set_iv, set_ev` Pokemon functions 2025-06-27 14:39:04 -04:00
Paul 2f8a9f207c Removed unnecessary fields from cosmetic item definitions 2025-06-27 22:22:54 +10:00
Paul 8c1416514c Merge remote-tracking branch 'weblate/lang-updates' 2025-06-27 22:08:55 +10:00
washashu0905andWeblate 575c33612d Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 94.1% (8009 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hant/
2025-06-27 12:08:24 +00:00
Paul 889d193ad1 Shouldn't have vi.json, only vi_vn.json 2025-06-27 22:07:19 +10:00
Paul 57ef37099e Merge remote-tracking branch 'weblate/lang-updates' 2025-06-27 22:05:04 +10:00
Paul d7d311764d Fixed a few brain memory crashes, made herds more complicated with tiers of leaders 2025-06-27 22:04:06 +10:00
Zack the GhastandWeblate d7fb65d23b Translated using Weblate (Portuguese (Portugal))
Currently translated at 62.1% (5285 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/pt_PT/
2025-06-27 12:01:01 +00:00
washashu0905andWeblate 3e4449aed1 Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 94.0% (7999 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hant/
2025-06-27 12:01:00 +00:00
plastered_crab 55aa50654c Safer getPokemon on pasture block 2025-06-27 03:03:54 -07:00
plastered_crab 489170cf00 DTO FAFO 2025-06-27 02:32:17 -07:00
Polymeta 930eb42e76 Merge branch '1594-sounds-while-capturing' into 'main'
Resolve "[1.7] Wing flap sounds continue to play while target is struggling inside of a pokeball."

Closes #1594

See merge request cable-mc/cobblemon!1718
2025-06-27 09:19:49 +00:00
plastered_crab 87d76e8788 Trying to get the Pokemon DTO to load on the pasture UI properly to reflect behavior flags on the entity 2025-06-27 01:55:00 -07:00
Landon Wills 6d8bf59eee Add dedicated dismount packet, clear up dismount logic, recall all pokemon on mount 2025-06-27 03:58:50 -04:00
Paul a8f431868a Merge remote-tracking branch 'origin/main' into more-ai 2025-06-27 17:26:39 +10:00
Landon Wills 0c6e355c6b Merge branch 'main' into multi-seat-mounts 2025-06-27 00:38:00 -04:00
Josh a2f6ab0ea4 Silence pokemon while in ball 2025-06-26 09:36:22 -04:00
Paul 719a56e7c3 Remove all that is unnecessary and you will come to know true peace 2025-06-26 20:52:29 +10:00
Konoha bd4397ec55 Merge remote-tracking branch 'origin/main' 2025-06-25 21:11:08 -04:00
Konoha d5e3781fc5 Merge remote-tracking branch 'origin/legacy_and_event_moves' 2025-06-25 21:10:53 -04:00
Josh 776ab05ac1 nickname widget now updates properly 2025-06-25 21:06:45 -04:00
Konoha a7f8a281a8 Minor comment fix 2025-06-25 19:53:54 -04:00
Konoha 5ba6679a84 Changelog 2025-06-25 19:49:17 -04:00
Konoha 4ecd64bdf6 Set Level and clone party for NPC / MoLang battles 2025-06-25 19:46:51 -04:00
Josh 0da5d27851 Added observer to Summary UI with clean up 2025-06-25 18:22:51 -04:00
Josh 48b28bc509 Removed observer from RenderablePokemon 2025-06-25 18:22:10 -04:00
Josh 5547326798 Updated RenderablePokemon to have an option to sync to a Pokemon so the render updates automatically 2025-06-25 14:06:39 -04:00
Josh bcf730a07f updated PokemonProperties to use swapHeldItem() rather then setting directly in order to sync client and server mons 2025-06-25 14:04:44 -04:00
washashu0905andWeblate 8be1e78fee Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 93.1% (7924 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hant/
2025-06-25 17:32:15 +00:00
Zack the GhastandWeblate c463c99b0f Translated using Weblate (Portuguese (Portugal))
Currently translated at 60.8% (5178 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/pt_PT/
2025-06-25 17:32:13 +00:00
Polymeta 255829a9f8 Merge branch '1604-1-7-flying-crashes-the-game-if-pokeedit-is-used-on-the-specified-pokemon-beforehand-2' into 'main'
Resolve "[1.7] Flying crashes the game if /pokeedit is used on the specified Pokémon beforehand."

Closes #1575

See merge request cable-mc/cobblemon!1716
2025-06-25 14:43:18 +00:00
Josh 46758b7ab0 added ejectPassengers() to PokemonEntity#refreshRiding() 2025-06-25 09:57:14 -04:00
Polymeta aebcf42df8 Merge branch 'car-please-stop' into 'main'
Car please stop (Bug Fixes)

Closes #1584 and #1586

See merge request cable-mc/cobblemon!1698
2025-06-25 13:32:05 +00:00
AramandPolymeta 2268640dbc Car please stop (Bug Fixes) 2025-06-25 13:32:05 +00:00
Polymeta bf3739c598 Merge branch '1602-1-7-visible-held-items-appearing-on-unsupported-pokemon-through-pokeedit-command' into 'main'
Resolve "[1.7] Visible held items appearing on unsupported Pokémon through /pokeedit command."

Closes #1602

See merge request cable-mc/cobblemon!1714
2025-06-25 13:04:18 +00:00
Paul 9c4ae189a1 Optimize scriptable AI entities by only registering memories and sensors that are used by the task list 2025-06-25 22:29:16 +10:00
Zack the GhastandWeblate 502a314a6c Translated using Weblate (Portuguese (Portugal))
Currently translated at 60.6% (5159 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/pt_PT/
2025-06-25 03:50:36 +00:00
washashu0905andWeblate ca1ea6385d Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 89.3% (7598 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hant/
2025-06-25 03:50:36 +00:00
Konoha 6863cd0602 Battle Format Parameters 2025-06-24 22:03:49 -04:00
plastered_crab 9749acbb0c Fixes for behavior assignment of attacking hostile mobs 2025-06-24 08:29:17 -07:00
Josh 81d4e4ded1 refreshing riding settings in the ServerDelegate when the species is updated 2025-06-24 11:18:08 -04:00
Josh 3e5ab4328b locatorStates are now cleared when the species updates to remove non-existent locators 2025-06-24 10:50:55 -04:00
plastered_crab d1993574f6 some cleanup 2025-06-24 07:33:12 -07:00
plastered_crab 2b531ec32f Mons set to defend a Pasture are visually shown in the UI now 2025-06-24 06:28:34 -07:00
Paul a9985bbea8 Some pokemon have generational beef 2025-06-24 20:23:45 +10:00
plastered_crab 8d00da2c57 comma was missing for some reason 2025-06-24 00:45:50 -07:00
Zack the GhastandWeblate f4d866537a Translated using Weblate (Portuguese (Portugal))
Currently translated at 59.9% (5096 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/pt_PT/
2025-06-24 02:15:25 +00:00
Zack the GhastandWeblate e9f942687f Translated using Weblate (Portuguese (Portugal))
Currently translated at 59.8% (5092 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/pt_PT/
2025-06-23 23:36:40 +00:00
Josh d67d73351d updated LocatorAccess#update to remove locators that no longer exists 2025-06-23 16:03:26 -04:00
Josh 74d3ce793d removed the model argument for HeldItemRenderer since it is not really necessary 2025-06-23 16:00:19 -04:00
Polymeta 3223c8dfeb Merge branch 'Air-Ballon-Battle-Text-Fix' into 'main'
Fixed air balloon battle text not displaying the Pokemon or item name

See merge request cable-mc/cobblemon!1713
2025-06-23 13:03:56 +00:00
washashu0905andWeblate a84a897e84 Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 88.2% (7505 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hant/
2025-06-23 12:08:59 +00:00
Sterrezo bcac005fb1 Merge branch 'main' into sound 2025-06-23 14:03:31 +02:00
Sterrezo aa6536b57c Added sounds for Tatami blocks and mats 2025-06-23 12:22:06 +02:00
Landon Wills 92bf3ba2a2 Prevent players from mounting other players pokemon when owner is not mounted 2025-06-23 01:36:34 -04:00
Landon Wills 84f79c89c5 Dismount all passengers if driver dismounts 2025-06-22 23:16:35 -04:00
Landon Wills 248967256b Use bottom of pokemon hitbox for dismount position 2025-06-22 23:12:46 -04:00
Landon Wills ea19721998 Merge branch 'main' into multi-seat-mounts
# Conflicts:
#	common/src/main/resources/assets/cobblemon/bedrock/pokemon/models/0750_mudsdale/mudsdale.geo.json
2025-06-22 23:05:18 -04:00
Landon Wills e9408db7a1 Fix seat locator name always defaulting to seat_1 2025-06-22 23:03:54 -04:00
Konoha b9e6d63049 Extra Battle Format MoLang parameters 2025-06-22 21:52:34 -04:00
JazzMcNade 15ab84297d Update Changelog 2025-06-22 15:51:44 -05:00
JazzMcNade 94cfb23e66 Fixed air balloon battle text not displaying the pokemon or item name 2025-06-22 15:42:39 -05:00
Konoha cb002ff530 Battle Format and Rule Selection via MoLang Test 2025-06-22 13:34:50 -04:00
Konoha 19da349e78 Merge AI Shenanigans 2025-06-22 11:25:28 -04:00
Konoha 30c3b605a3 Merge branch 'refs/heads/feature/ai-shenanigans' into extra_flows
# Conflicts:
#	common/src/main/kotlin/com/cobblemon/mod/common/entity/npc/NPCServerDelegate.kt
2025-06-22 11:23:06 -04:00
Paul 2fbffa5b66 Birds will fly if it gets them out of water faster 2025-06-22 21:23:44 +10:00
washashu0905andWeblate 108b769928 Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 84.0% (7145 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hant/
2025-06-22 06:31:58 +00:00
washashu0905andWeblate 3db39547f0 Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 82.9% (7057 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hant/
2025-06-22 02:53:26 +00:00
Konoha b8e79d2d3e Attempt to not publish HELD_ITEM_PRE on the client (spoilers, it doesn't work :[ ) 2025-06-21 22:27:02 -04:00
washashu0905andWeblate c4688c5db9 Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 81.9% (6969 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hant/
2025-06-22 02:11:11 +00:00
Paul b0385fc37f Added behaviour for NPC scale configuration 2025-06-22 11:59:36 +10:00
Konoha 60c2721b53 Cleanup LootDroppedEvent Flow 2025-06-21 20:50:46 -04:00
Konoha b6f2ab25e1 Fix berry in BerryHarvestEvent 2025-06-21 20:49:07 -04:00
Konoha 6417f8cfa8 Cleanup 2025-06-21 20:45:18 -04:00
Konoha 1d473437de MoLang moveset queries
Viewable Hyper Trained IVs in PC
2025-06-21 20:19:41 -04:00
Konoha c24b60785f Player battle function and battle format setting parameters. 2025-06-21 14:17:31 -04:00
Konoha 08df2fef6c Molang setter functions for Party & PC 2025-06-21 12:13:07 -04:00
washashu0905andWeblate e491e7de81 Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 81.3% (6922 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hant/
2025-06-21 15:11:30 +00:00
Tobias (Targ)andWeblate f7974767d1 Translated using Weblate (German)
Currently translated at 61.4% (5225 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/de/
2025-06-21 15:11:29 +00:00
Hiroku d41e89ddbd Merge branch 'we-arent-pushovers-anymore' into 'main'
Species JSON dictates if a species fights back or runs away from player that hurts it

See merge request cable-mc/cobblemon!1708
2025-06-21 03:44:48 +00:00
Hiroku 37293d396a Pastured pokemon react to damage too 2025-06-21 03:04:43 +00:00
Hiroku d598335112 Merge branch 'implement_pokemon' into 'main'
Implementation merge request, your majesty.

See merge request cable-mc/cobblemon!1711
2025-06-21 00:54:10 +00:00
Hiroku b3b63941e7 Add Mienfoo and Mienshao to changelog 2025-06-21 00:13:20 +00:00
Sterrezo 596122ecf0 Merge branch 'main' into implement_pokemon 2025-06-20 21:44:30 +02:00
Sterrezo e934ebf781 Merge branch 'main' into implement_pokemon 2025-06-20 21:43:03 +02:00
Polymeta 3b7bd22567 put gitCommit in maven pom file... this will be useful for later
Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-06-20 14:26:13 +01:00
plastered_crab bae3da9411 Merge branch 'refs/heads/main' into let-me-break-it-down-for-you-mark-we-can-bee-bees
# Conflicts:
#	common/src/main/kotlin/com/cobblemon/mod/common/CobblemonMemories.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/api/ai/config/task/TaskConfig.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/pokemon/ai/PokemonBrain.kt
2025-06-20 06:07:01 -07:00
plastered_crab a30ca92f0a Merge branch 'refs/heads/main' into we-must-defend-our-way-of-life
# Conflicts:
#	common/src/main/kotlin/com/cobblemon/mod/common/api/ai/config/task/TaskConfig.kt
2025-06-20 06:05:25 -07:00
plastered_crab dd5ec25345 Merge branch 'refs/heads/main' into we-arent-pushovers-anymore
# Conflicts:
#	common/src/main/resources/data/cobblemon/behaviours/pokemon/auto/pokemon_non_party.json
2025-06-20 06:03:58 -07:00
Polymeta 40309e9913 Merge branch 'more-ai' into 'main'
More AI tasks, AI fixes

See merge request cable-mc/cobblemon!1704
2025-06-20 12:52:48 +00:00
Paul 5346f0f864 ok i admit i have ocd 2025-06-20 21:46:25 +10:00
Paul c4e0d19613 Merge remote-tracking branch 'origin/main' into more-ai
# Conflicts:
#	common/src/main/kotlin/com/cobblemon/mod/common/pokemon/ai/OmniPathNodeMaker.kt
2025-06-20 21:36:43 +10:00
Paul de9fe73a31 Added more variables to move_into_fluid, added moves_to_lava preset, some lang 2025-06-20 21:30:02 +10:00
Paul 47fd191fea Fixed lava pathing not working properly 2025-06-20 20:32:20 +10:00
plastered_crab e3f3f4e1b7 fix rretaliation against attacking players 2025-06-19 21:45:34 -07:00
plastered_crab 004890d050 fix application of behavior 2025-06-19 21:39:27 -07:00
plastered_crab e690a0ed92 fix species json 2025-06-19 21:19:37 -07:00
plastered_crab 1e240d879f fix logic and species json 2025-06-19 21:04:26 -07:00
Konoha db7745589a Cleanup 2025-06-19 21:27:55 -04:00
Konoha 65f0f69726 Teach All Learnable Moves MoLang Function 2025-06-19 21:25:26 -04:00
Konoha 19263ddec6 Minor fix 2025-06-19 17:29:40 -04:00
Konoha dde4680ce0 Refactor Client Context on HeldItemEvent 2025-06-19 16:13:36 -04:00
Konoha a2939e34a0 Cosmetic Item Property, MoLang functions for fullness, unlearning moves. 2025-06-19 14:25:20 -04:00
plastered_crab 6a937492dd Licenses 2025-06-19 07:37:53 -07:00
plastered_crab 5f52625b05 PasturePos is saved on tethering object. and make sure pasture mons don't defend areas too far away 2025-06-19 07:13:51 -07:00
Paul a64f201fd2 Fixed is_wild not working properly for brain stuff 2025-06-19 21:17:03 +10:00
plastered_crab 10746bea10 These darn u letters man 2025-06-19 03:29:39 -07:00
plastered_crab af1f607994 is_wild is now a pokemon entity Molang variable 2025-06-19 03:26:07 -07:00
plastered_crab db9cefc8ba is_wild is now a pokemon entity Molang variable 2025-06-19 03:14:17 -07:00
Polymeta 952eee67a6 Merge branch 'PathingForDummies' into 'main'
Pathing improvements

Closes #1480

See merge request cable-mc/cobblemon!1705
2025-06-19 09:35:30 +00:00
JazzMcNadeandPolymeta 87d7049a64 Pathing improvements 2025-06-19 09:35:29 +00:00
plastered_crab c467f9cad2 They call it AU because they add a u to everything 2025-06-19 01:53:34 -07:00
plastered_crab 5f7fa85b58 fix bool 2025-06-18 23:57:50 -07:00
plastered_crab eb3ffdfbd4 fix typos lol 2025-06-18 23:45:44 -07:00
阿鱼andWeblate c7e512bc32 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 87.9% (7479 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-06-18 10:11:29 +00:00
Watuneni iteiteandWeblate 6889cb7936 Translated using Weblate (Japanese)
Currently translated at 59.7% (5078 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-06-18 10:11:26 +00:00
plastered_crab b4af502997 testing with Charizard 2025-06-17 19:39:46 -07:00
plastered_crab 9bffdf8df4 testing with Charizard and Wimpod 2025-06-17 19:38:08 -07:00
plastered_crab 8dbdd78c86 testing with Charizard 2025-06-17 19:33:26 -07:00
Konoha d13e456d17 Minor Optimization ft. landon 2025-06-17 22:08:29 -04:00
Konoha e36de84927 1.7: The Flowing Mapmaker's Update (Friendship, Fullness, AspectChanged, CatchRate, PokeRod, ShoulderMount event flows) 2025-06-17 22:05:44 -04:00
plastered_crab e6812891b5 species json to allow for deciding if mons will defend their owner if in their party 2025-06-17 18:43:34 -07:00
plastered_crab 6a3c98ed1c species json to allow for deciding if mons will defend their owner if in their party 2025-06-17 18:42:34 -07:00
plastered_crab 991ec7cc1a species json to allow for deciding if mons flee or fight back when attacked 2025-06-17 18:06:36 -07:00
Konoha 54cbaa9a10 Flows for PokemonHealed, PokemonSent, and ChangePCBoxWallpaper. 2025-06-17 12:43:24 -04:00
Paul 1eaca5110b Polymeta has OCD :sadge: 2025-06-17 23:01:06 +10:00
Paul d7f2b1dce1 Fixed dangling herd leaders after they're dead 2025-06-17 22:59:46 +10:00
Paul 4952b3bda7 Remove println 2025-06-17 22:54:59 +10:00
Konoha dbe743b50a Do not publish HelpItemEvent if it's running on client. 2025-06-17 08:47:38 -04:00
Paul 82acd07ea5 Keep count of herd size 2025-06-17 21:45:20 +10:00
Konoha 7d26870a13 Pokemon Scanned, Loot Dropped, Berry Harvest Flows 2025-06-16 14:50:53 -04:00
Konoha a418cbd118 Pokemon Seen Flow 2025-06-16 12:03:00 -04:00
Konoha e45af26af3 Split Cosmetic Item Event from HeldItemEvent. 2025-06-16 10:08:52 -04:00
Paul bcb1d412b1 Leader maintenance for pokemon in herds 2025-06-16 20:28:56 +10:00
RedGenesectNinja c4a21c19ea Implemented Mienfoo and Mienshao 2025-06-16 01:19:35 -05:00
RedGenesectNinja 5d86d03a13 Adjusted Drampa's size 2025-06-16 01:04:26 -05:00
Paul 867eb5f0d9 Rudimentary herding for karps 2025-06-16 14:29:42 +10:00
plastered_crab e59f4e7891 Guards find new targets once their first one dies 2025-06-15 21:03:57 -07:00
Konoha bdc260abca Aspects MoLang function for Pokemon 2025-06-15 21:54:39 -04:00
Konoha d9e5e52d9f Flows for ExperienceGainedEvent, CollectEggEvent, HatchEggEvent. MoLang functions to add exp, initialize a Pokemon's moveset, and validate an existing moveset. 2025-06-15 21:31:10 -04:00
plastered_crab a481bde4f5 The guards are on active duty 2025-06-15 09:59:57 -07:00
阿鱼andWeblate 787faf38e7 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 82.9% (7051 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-06-15 14:09:31 +00:00
Watuneni iteiteandWeblate 9a42c82a37 Translated using Weblate (Japanese)
Currently translated at 57.6% (4907 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-06-15 14:09:29 +00:00
plastered_crab 654d0f8975 You've never seen guard dogs like these before 2025-06-15 06:43:15 -07:00
plastered_crab 66b3c4a4c6 Scott has pooped so I must go 2025-06-15 04:57:53 -07:00
Paul 77333d9a13 Burnout 3 is one of the most impressive racing games of its era and holds up very well for a PS2 game 2025-06-15 16:09:47 +10:00
Paul 045613ef79 Fixed PokemonEntity#struct pokemonFunctions coming from a random pokemon on reload, causing the wrong AI to apply 2025-06-15 16:05:51 +10:00
Paul d78963daf3 Fish return to water when they get the chance 2025-06-15 15:29:39 +10:00
plastered_crab 2fc2f24dee yay it compiles. time for sleep finally. testing later 2025-06-14 16:57:50 -07:00
plastered_crab 0988411e13 Nothing to see here just some AI upgrade stuff 2025-06-14 14:52:56 -07:00
plastered_crab b39fadcde8 Nothing to see here just some AI upgrade stuff 2025-06-14 07:04:17 -07:00
Hiroku 61cfdd485e Merge branch 'extra_flows' into 'main'
Additional Flows

See merge request cable-mc/cobblemon!1685
2025-06-14 04:47:55 +00:00
Konoha 6f263845a0 Gee I sure hope these MoLang functions help somebody! 2025-06-14 00:36:06 -04:00
Paul 51720489ae Improved hovering, fixed magikarp, tatsu, and wailord not being able to sink from the surface 2025-06-14 13:59:42 +10:00
Polymeta c12f991b18 testing round no1
Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-06-13 01:20:15 +01:00
Polymeta 977d66dafd fixing some errors
Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-06-13 01:05:55 +01:00
Polymeta f0b1843b71 StrongBattleAI without build errors
Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-06-13 01:05:54 +01:00
Polymeta 785e63c7d4 rafactoring of the ActiveTracker to be on a "seen" basis with opposing pokemon
Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-06-13 01:05:54 +01:00
Polymeta 61c3c995aa tidying up
Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-06-13 01:05:43 +01:00
阿鱼andWeblate 8221386767 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 79.0% (6722 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-06-11 18:24:33 +00:00
Polymeta 8d2cf1ad81 Merge branch 'harvester' into 'main'
Small Fixes

See merge request cable-mc/cobblemon!1703
2025-06-11 12:21:31 +00:00
dhi_holoandPolymeta e230d6fda5 Small Fixes 2025-06-11 12:21:31 +00:00
plastered_crab 5dc56bd4fc Merge branch 'refs/heads/main' into let-me-break-it-down-for-you-mark-we-can-bee-bees
# Conflicts:
#	common/src/main/kotlin/com/cobblemon/mod/common/api/ai/config/task/TaskConfig.kt
2025-06-10 18:11:57 -07:00
Nick 274f7e6c81 Merge branch 'monster-milker-2000' into 'main'
Datapackable Pokemon Item Interactions

See merge request cable-mc/cobblemon!1683
2025-06-10 14:22:44 -07:00
Plastered_CrabandNick 664f8e4484 Datapackable Pokemon Item Interactions 2025-06-10 14:22:43 -07:00
Paul d4700bcbd3 Circle banking fishies and birds, regular wander avoids targeting air as a final position 2025-06-10 20:59:50 +10:00
plastered_crab f9afd1d3e6 My kid pooped his pants and fell back asleep so let's code real fast 2025-06-10 02:46:26 -07:00
Polymeta 9d7198e4cd prevent pokemon crashing when 3rd party mods try to tame them
Closes #1513

Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-06-09 21:27:48 +01:00
Nico MerenqandWeblate 311a3e1005 Translated using Weblate (Russian)
Currently translated at 51.9% (4417 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-06-09 15:14:52 +00:00
阿鱼andWeblate aeb6bddba6 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 64.9% (5521 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-06-09 15:14:52 +00:00
阿鱼andWeblate e11d1cb77c Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 63.9% (5436 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-06-09 14:54:27 +00:00
阿鱼andWeblate 774e62bb4b Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 55.1% (4691 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-06-09 14:46:08 +00:00
阿鱼andWeblate 716ab4fb95 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 50.5% (4296 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-06-09 14:39:15 +00:00
阿鱼andWeblate 766625bf31 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 81.2% (6912 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-06-09 14:23:36 +00:00
Nico MerenqandWeblate 14cde609c6 Translated using Weblate (Russian)
Currently translated at 51.9% (4416 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-06-09 14:23:35 +00:00
Polymeta 199128bb0d allow berries to be planted on FD rich soil
Closes #785

Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-06-09 00:04:58 +01:00
Polymeta 4d2b7f319c Merge branch 'bugfix-dex-removal-error' into 'main'
Bugfix dex removal error

Closes #1564

See merge request cable-mc/cobblemon!1694
2025-06-08 22:18:51 +00:00
Leandro M.andPolymeta 698cc5218d Bugfix dex removal error 2025-06-08 22:18:50 +00:00
Nico MerenqandWeblate da6ac4b8d6 Translated using Weblate (Russian)
Currently translated at 51.9% (4416 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-06-08 20:39:07 +00:00
Polymeta 804dfe9131 Merge branch 'nutty' into 'main'
Nutty!

See merge request cable-mc/cobblemon!1701
2025-06-08 00:20:16 +00:00
dhi_holoandPolymeta afd007856e Nutty! 2025-06-08 00:20:16 +00:00
Nico MerenqandWeblate 43ef224444 Translated using Weblate (Russian)
Currently translated at 51.8% (4410 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-06-07 13:22:58 +00:00
Polymeta c99bf99052 correct pokemon model item offset and GUI lighting
Closes #1597

Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-06-07 00:40:52 +01:00
Polymeta e8019a0623 make model loading not crash the game if a non-cobblemon model gets caught up in the parsing
Closes #1593

Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-06-06 17:05:29 +01:00
Polymeta 4c95cfc1b3 some neoforge fixes
Closes #1437

Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-06-06 16:19:54 +01:00
Polymeta 51a096913d simplify HeartyGrainsItem logic and update survival conditions for HeartyGrainsBlock to use tags
Closes #1591

Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-06-06 11:58:23 +01:00
Polymeta 980d95819e make DrowsySensor consider sleep status to allow it to wake/sleep during battles no matter the time
Closes #1554
Closes #1596

Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-06-06 01:19:34 +01:00
Polymeta 24aa65b2f1 Merge branch 'POLISH-POLISH' into 'main'
Little bit of refactoring

See merge request cable-mc/cobblemon!1699
2025-06-05 15:45:40 +00:00
Polymeta 19f33fe530 small cleanup and move component to correct place
Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-06-05 16:02:32 +01:00
Polymeta bbe8a6948a fix license, refactor saplingblock and make falldamagemultiplier configurable
Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-06-05 14:32:52 +01:00
Hiroku e46aaa5725 Merge branch 'party-select-tooltips' into 'main'
Adds a hoverText option to Party Select Callbacks.

See merge request cable-mc/cobblemon!1700
2025-06-05 11:08:34 +00:00
DeltricandHiroku fc6c302c71 Adds a hoverText option to Party Select Callbacks. 2025-06-05 11:08:34 +00:00
dhi_holo 76cf856907 Update CobblemonBlocks.kt
Didn't work properly, damn private classes
2025-06-05 20:46:43 +10:00
dhi_holo 145d56e205 Resolves Threads
I'm not done though, reverting the bale to a separate class makes me want to try learning something, if I can't work it out then no more commits
2025-06-05 20:10:20 +10:00
dhi_holo 969b070300 Very minor fix to kings rock model 2025-06-05 20:02:51 +10:00
阿鱼andWeblate d65d23ad02 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 78.4% (6671 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-06-05 09:16:15 +00:00
Polymeta e474ef607c Ignore vitalspirit activation message
Closes #1595

Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-06-04 14:29:24 +01:00
Polymeta a2ecccfac4 Merge branch 'Saccharine-Tree-Bee-Nest-Orientation-Fix' into 'main'
Saccharine tree bee nest orientation fix

See merge request cable-mc/cobblemon!1695
2025-06-04 13:15:39 +00:00
Polymeta 1a475bff87 fix two mons using old behaviour keys
Closes #1598

Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-06-04 13:43:43 +01:00
Polymeta 8b6f5f55e6 Merge branch 'RaftsAndFlyingForSmartererPokemon' into 'main'
Battle flight migrated to brains, fixed illusion mobility for brains, fixed...

Closes #1496

See merge request cable-mc/cobblemon!1696
2025-06-04 10:43:47 +00:00
Polymeta 39ed65e8ca Merge branch 'main' into 'RaftsAndFlyingForSmartererPokemon'
# Conflicts:
#   common/src/main/kotlin/com/cobblemon/mod/common/entity/pokemon/PokemonEntity.kt
2025-06-04 10:43:06 +00:00
dhi_holo 35dab86ef4 Kings Rock Model Switch
Changing to the original model, rather than the newer one that causes more problems
2025-06-04 20:27:14 +10:00
Konoha 3ad609b63e Oodles more species-related Pokemon MoLang Functions. 2025-06-04 05:02:14 -04:00
FrankTheFarmer 765a9e83ec Wailord model updated with locators 2025-06-04 18:57:45 +10:00
FrankTheFarmer ec8373ed04 Mudsdale model updated with locators 2025-06-04 18:53:59 +10:00
FrankTheFarmer 2a7c663071 Goldeen models updated with locators 2025-06-04 18:50:13 +10:00
dhi_holo 2cc14d26b1 leftover files
damn refactors missed a bit
2025-06-04 18:31:31 +10:00
dhi_holo c29da11541 Modern Major General
I prefer `general` as a term for block classes that exist to be a baseline for many blocks (in theory) to `varied`, so swapping that over
2025-06-04 18:29:08 +10:00
dhi_holo 8188ce0ed2 The Beningging
Refactoring some stuff to simplify down
2025-06-04 18:22:28 +10:00
JazzMcNade 301de140e3 canStandOnFluid now looks at the exposed form of the pokemon 2025-06-03 23:26:32 -05:00
FrankTheFarmer 1b78cae080 Merge branch 'main' into implement_pokemon 2025-06-04 12:46:57 +10:00
Konoha 4cf0dda554 Update and resolve conflicts 2025-06-03 21:59:33 -04:00
Polymeta ac55636c51 small recipe fix for loaded dice
Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-06-03 23:31:49 +01:00
Polymeta 18eb50d4d2 Merge branch 'data-driven-brewing' into 'main'
Wrapped the Brewing Stand to allow Data Driven Recipes

See merge request cable-mc/cobblemon!1667
2025-06-03 13:22:44 +00:00
Aram 87276de14d Update CHANGELOG.md 2025-06-03 14:42:22 +02:00
Aram b7dc9ea6f6 Removed Unneccerry files 2025-06-03 14:30:34 +02:00
Aram ff59604526 Merge branch 'main' into data-driven-brewing 2025-06-03 14:27:40 +02:00
Polymeta b620ad27b6 rename OmniPathingEntity#isOnGround > entityOnGround to get around yarn mapping conflict
Fixes #1590

Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-06-03 11:32:28 +01:00
Polymeta 5565f22610 Merge branch 'hyper_trained_ivs' into 'main'
Hyper Training Event and MoLang Functions

See merge request cable-mc/cobblemon!1689
2025-06-03 06:22:07 +00:00
Konoha DandPolymeta 7582b08d56 Hyper Training Event and MoLang Functions 2025-06-03 06:22:07 +00:00
Polymeta 2e101f023f Merge branch 'cleanup' into 'main'
Crash Fix

See merge request cable-mc/cobblemon!1697
2025-06-03 06:19:26 +00:00
dhi_holo d98cccfc0f Edit evolution_items.json 2025-06-03 16:12:46 +10:00
dhi_holo f83bde399c no crash
Removed some duplicates
2025-06-03 14:20:32 +10:00
JazzMcNade af77534b96 Removed escaped quotation marks 2025-06-02 20:01:30 -05:00
Karl Martin fa5193a3db Fix for bee nest entrances being blocked on saccharine trees 2025-06-02 22:06:10 +01:00
Polymeta e3c95aa4a5 Merge branch 'cooking-redstone' into 'main'
A ton of Redstone Compatibility inside the Cooking System

See merge request cable-mc/cobblemon!1640
2025-06-02 13:57:10 +00:00
AramandPolymeta 72740fb418 A ton of Redstone Compatibility inside the Cooking System 2025-06-02 13:57:10 +00:00
Watuneni iteiteandWeblate e32b540deb Translated using Weblate (Japanese)
Currently translated at 56.9% (4847 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-06-02 12:09:39 +00:00
Tobias (Targ)andWeblate f416567005 Translated using Weblate (German)
Currently translated at 61.3% (5217 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/de/
2025-06-02 12:09:37 +00:00
queao dda0c08fae Merge remote-tracking branch 'origin/implement_pokemon' into implement_pokemon 2025-06-02 22:05:41 +10:00
queao d5e0364372 ow! that's sharp! (remodels for honedge line) 2025-06-02 22:05:00 +10:00
Paul 250f9e3cec Cleanup 2025-06-02 20:15:03 +10:00
Paul 26078ec29d Merge remote-tracking branch 'origin/main' 2025-06-02 20:09:11 +10:00
Paul 5b68889689 Fixed non-walking fliers not being able to wander 2025-06-02 20:09:00 +10:00
Paul bb3e86ac02 Fixed wander not being added to flying non-walkers 2025-06-02 20:08:21 +10:00
Polymeta b96a6282d8 Merge branch 'implement_pokemon' into 'main'
Fruity Implementation Merge to Main

See merge request cable-mc/cobblemon!1691
2025-06-02 08:18:00 +00:00
Frank The FarmerandPolymeta 14ee3cd754 Fruity Implementation Merge to Main 2025-06-02 08:17:59 +00:00
Paul 9c66c65b9e Merge remote-tracking branch 'origin/main' 2025-06-02 16:06:13 +10:00
Paul 9ffbd14a81 The wiki says it's called "artificial" 2025-06-02 16:06:03 +10:00
FrankTheFarmer fb36ba9720 Changelog where i log the changes i just made 2025-06-02 14:47:20 +10:00
FrankTheFarmer 87c2ce8f1a Floragato and Meowscarada swapped to json posers 2025-06-02 14:43:53 +10:00
FrankTheFarmer bb128fa7e1 Merged Floragato's battle cry with idle as a primary animation as a solution to its messed up battle cry 2025-06-02 14:43:27 +10:00
FrankTheFarmer dfcc6f2243 Uh oh spaghettio's portrait update 2025-06-02 14:42:40 +10:00
JazzMcNade 5053c765fb Merge branch 'main' into RaftsAndFlyingForSmartererPokemon 2025-06-01 17:20:39 -05:00
JazzMcNade bfe8d41102 Refactored BattleFlight as a OneShot Task, removed unnecessary memory flag. 2025-06-01 17:20:28 -05:00
plastered_crab ad3cfe3708 You'll be a pet 2025-06-01 14:14:31 -07:00
JazzMcNade a4a094a624 spawnallpokemon no longer calls sendOut() 2025-05-31 21:29:13 -05:00
plastered_crab 109895c0ff Mark this is good news 2025-05-31 17:13:36 -07:00
plastered_crab 96bcffcc84 We can finally be bees Mark 2025-05-31 14:29:35 -07:00
plastered_crab dc4f204db6 This is not our home 2025-05-31 01:11:50 -07:00
plastered_crab c07c78c331 You'll live for 30 years 2025-05-31 00:39:00 -07:00
Plastered_Crab e902e034ad This is good news 2025-05-30 14:19:31 -07:00
Plastered_Crab 77218f5250 Mark, we can BEE bees 2025-05-30 13:23:16 -07:00
JazzMcNade 0215a30c8d Battle flight migrated to brains, fixed illusion mobility for brains, fixed pokemon spawning with rafts outside of battle, 2025-05-30 01:17:56 -05:00
Konoha a0283b890b Changelog 2025-05-29 22:44:33 -04:00
FrankTheFarmer 0b4d0d3e2e Tweaks to Quaxly poser. Mind your camel cases 2025-05-30 12:41:23 +10:00
Konoha 4bca5dc092 Cleanup redundant held_item MoLang function and Registry Access 2025-05-29 22:40:57 -04:00
Konoha b4ce5f0ee6 Cleanup. Fix MoLang variable conventions and questionable player owner assertions. 2025-05-29 22:39:44 -04:00
FrankTheFarmer 561b5f25bb Merge branch 'main' into implement_pokemon 2025-05-30 12:33:50 +10:00
Konoha 603bf45998 Merge branch 'main' into extra_flows 2025-05-29 20:49:35 -04:00
Polymeta 4f5799e5df yet another seasoning codec tweak
Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-05-30 00:39:13 +01:00
Polymeta 54ea4903ba Merge branch 'cooking-tooltip-overhaul' into 'main'
Cooking tooltip overhaul

See merge request cable-mc/cobblemon!1687
2025-05-29 22:07:13 +00:00
Plastered_CrabandPolymeta 28ad0cce83 Cooking tooltip overhaul 2025-05-29 22:07:13 +00:00
washashu0905andWeblate 1daf931a49 Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 80.7% (6870 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hant/
2025-05-29 20:29:11 +00:00
Polymeta 7fe1929609 Merge branch 'hyper_trained_ivs' into 'main'
Hyper Trained Stat IVs

See merge request cable-mc/cobblemon!1614
2025-05-29 15:53:12 +00:00
Konoha DandPolymeta e03082a75e Hyper Trained Stat IVs 2025-05-29 15:53:11 +00:00
Polymeta 8d0c27f0e4 [skip-ci] changelog
Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-05-29 16:47:14 +01:00
Polymeta 91fc2dc896 Merge branch 'spawn-rules-npc-gisketch' into 'main'
Make Spawn Rules affect NPC spawns

See merge request cable-mc/cobblemon!1682
2025-05-29 15:43:12 +00:00
Ghegi Jimenez ab1ca295a3 Make Spawn Rules affect NPC spawns
- Update NPCSpawnDetail to have autoLabel() function similar to
  PokemonSpawnDetail to support spawn rules

Ref: https://gitlab.com/cable-mc/cobblemon/-/issues/1559
2025-05-29 09:36:37 +08:00
Konoha d12003cc7d Held Item Flow 2025-05-28 20:03:22 -04:00
Konoha 4723d26c13 Starter Chosen Event flow
Add nickname context to Pokemon Nicknamed flow
2025-05-28 18:12:13 -04:00
Konoha 664da45376 Pokemon EV Gained Flow
Minor comment fix on ReleasePokemonEvent
2025-05-28 17:02:59 -04:00
Konoha d8d017b7b3 Pokemon Nicknamed flow 2025-05-28 13:50:29 -04:00
Konoha f7acc73482 Trade Completed flow 2025-05-28 13:12:28 -04:00
Konoha a15d413ce8 Release Pokemon flow 2025-05-28 12:30:25 -04:00
Polymeta 5cbe937e23 Merge branch 'tatami' into 'main'
Tatami Mats

See merge request cable-mc/cobblemon!1684
2025-05-28 09:27:00 +00:00
dhi_holoandPolymeta 4fa196da94 Tatami Mats 2025-05-28 09:27:00 +00:00
Weblate 6bcbc58b0a 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-05-27 00:09:40 +00:00
Watuneni iteiteandWeblate a1218f6c1e Translated using Weblate (Japanese)
Currently translated at 55.6% (4731 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-05-27 00:09:36 +00:00
Tobias (Targ)andWeblate b1eb21150b Translated using Weblate (German)
Currently translated at 61.2% (5212 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/de/
2025-05-27 00:09:35 +00:00
Polymeta 43aa0ec04a oop this is not needed anymore
Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-05-27 00:54:28 +01:00
Polymeta b4bf044f76 small refactors in mixins and JEI integration
Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-05-27 00:49:26 +01:00
Carmendar a062b64588 Seel and Dewgong are now crying :( 2025-05-26 17:40:01 -05:00
Polymeta d35db46c1b Merge branch 'Add-pc-take-and-search-commands' into 'main'
Add PC Search and PC Take Commands

See merge request cable-mc/cobblemon!1677
2025-05-26 21:25:15 +00:00
GenotypeXD-Dev ee01ad20d9 Merge remote-tracking branch 'origin/implement_pokemon' into implement_pokemon 2025-05-26 12:15:00 -06:00
GenotypeXD-Dev b0b5aa4169 Seel and Dewgong Remodel Texture fixes 2025-05-26 12:14:44 -06:00
Sterrezo 6b042cea47 Updated sounds.json and empty cries with the latest Pokémon 2025-05-26 12:03:15 +02:00
Carmendar 1461b7231a Added/Updated cries for many Pocket Monsters. 2025-05-26 04:18:34 -05:00
GenotypeXD-Dev f115443bea Added implemented tag to Hawlucha 2025-05-25 12:57:41 -06:00
GenotypeXD-Dev 3bd946fb6b Added implemented tag to Noibat and Noivern 2025-05-25 12:56:20 -06:00
GenotypeXD-Dev 10818d4578 Implemented Clobbopus, Grapploct, Bramblin, Brambleghast, Rellor, and Rabsca 2025-05-25 12:40:42 -06:00
Polymeta b8a6c94fcb Merge branch 'boat-behaviour' into 'main'
Add boat water behaviour

See merge request cable-mc/cobblemon!1638
2025-05-25 00:26:09 +00:00
Ghegi Jimenez b069e448c1 Add PC Search and PC Take Commands
- Add pcsearch command to search through target's PC and display pokemon info with box slots
- Add pctake command to take pokemon from target's box slot
- Pokemon are removed when using pctake on self or as server
2025-05-25 08:07:17 +08:00
Polymeta 18f41407c8 fix merge conflicts
Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-05-25 00:46:35 +01:00
Polymeta b659a662a2 Merge branch 'refs/heads/main' into boat-behaviour
# Conflicts:
#	common/src/main/kotlin/com/cobblemon/mod/common/entity/pokemon/PokemonEntity.kt
2025-05-25 00:23:15 +01:00
Polymeta dbb2e45e14 Merge branch 'spicy-molang' into 'main'
Added `play_sound_on_server` and `run_molang_after` as available MoLang functions

See merge request cable-mc/cobblemon!1615
2025-05-24 23:20:14 +00:00
SpicyandPolymeta da491015a6 Added play_sound_on_server and run_molang_after as available MoLang functions 2025-05-24 23:20:14 +00:00
Polymeta 55db0d8af1 Merge branch 'battle-side-start-lang-position' into 'main'
Update battle sidestart langkeys formatting

See merge request cable-mc/cobblemon!1678
2025-05-24 23:11:38 +00:00
Ghegi Jimenez 211821bc0f Update battle sidestart langkeys formatting
This commit updates the SideStartInstruction.kt and
SideEndInstruction.kt files to use
position-specific language keys for battle side effects,
improving grammatical consistency.

**The changes**:

1. Modified SideStartInstruction.kt to use separate
language keys for ally and opponent sides

2. Updated en_us.json with new position-specific language keys
for all side effects

3. Added changelog entry documenting the improvement

This approach eliminates grammatical issues that occurred with the
previous implementation where "%1$s" was used in different positions
in sentences, making translations awkward.

The new format uses "sidestart.ally.[effect]" and
"sidestart.opponent.[effect]" keys, allowing for more natural language
in all cases.

Ref: https://gitlab.com/cable-mc/cobblemon/-/issues/984
2025-05-25 06:58:36 +08:00
Konoha 0cda6d13b7 Merge branch 'implement_pokemon' into legacy_and_event_moves 2025-05-24 09:05:18 -04:00
Polymeta 16a21f9d2e Merge branch 'remedying-remedies' into 'main'
Remedy Rebalance

Closes #1570

See merge request cable-mc/cobblemon!1680
2025-05-24 07:46:50 +00:00
Polymeta e69060bde6 Merge branch 'fossilized-improvement' into 'main'
Fossilized Improvement (with major tangents)

Closes #1548

See merge request cable-mc/cobblemon!1673
2025-05-24 07:45:15 +00:00
dhi_holo ebdbbd5176 Indentation fixed
Looks identical to me in IntelliJ, but it's apparently different
2025-05-24 15:28:46 +10:00
dhi_holo 6e163d08f0 Merge branch 'main' into fossilized-improvement 2025-05-24 15:19:30 +10:00
Zack the GhastandWeblate 56d4a18474 Translated using Weblate (Portuguese (Portugal))
Currently translated at 59.5% (5062 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/pt_PT/
2025-05-24 03:06:49 +00:00
dhi_holo 13c7b75b19 finished
That's the whole thing done!
2025-05-24 11:03:43 +10:00
Polymeta 1ad36e39c5 change the remedies.json layout to accommodate for individual friendshipDrops
Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-05-23 23:43:58 +01:00
Zack the GhastandWeblate f13b6ddde7 Translated using Weblate (Portuguese (Portugal))
Currently translated at 59.3% (5051 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/pt_PT/
2025-05-23 22:41:49 +00:00
MiaandWeblate c3d119c197 Translated using Weblate (German)
Currently translated at 61.2% (5206 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/de/
2025-05-23 22:41:48 +00:00
Tobias (Targ)andWeblate eb7527c26c Translated using Weblate (German)
Currently translated at 61.2% (5206 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/de/
2025-05-23 22:41:48 +00:00
Polymeta f4d67b9b64 some rootblock fixes (energy root is shearable now) and energy roots run through same spreading RNG as big roots
Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-05-23 22:40:16 +01:00
Polymeta 3c84afb95d Merge branch 'RestorationTankHopperFix' into 'main'
Restoration tank hopper fix

Closes #1569

See merge request cable-mc/cobblemon!1679
2025-05-23 20:43:26 +00:00
Aram 2e615800ae Update RecipeAwareSlot.java 2025-05-23 20:48:33 +02:00
JazzMcNade 0fc1239c77 Update CHANGELOG.md 2025-05-23 13:19:40 -05:00
JazzMcNade 38a0d149c5 Update RestorationTankBlockEntity.kt 2025-05-23 13:17:42 -05:00
Polymeta 4a4aaf3a94 fix mixin target for menu
Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-05-23 17:03:33 +01:00
Aram 53ca8f009d Tried to Resolve getting the Level, sadly it checks twice, Server and Client, and Server is Null 2025-05-23 17:20:52 +02:00
Aram 5b5c756d3c Merge branch 'main' into data-driven-brewing 2025-05-23 14:24:38 +02:00
Aram 75410c3a72 Update BrewingStandBlockEntityMixin.java 2025-05-23 12:48:03 +02:00
Aram 87d001da80 Removed Client stuff from the server 2025-05-23 12:37:29 +02:00
dhi_holo 8fee0e7f91 Begun Rebalance
Relevant conversation: https://discord.com/channels/725110639554592879/725619428384964678/1375306792523005962

Resolves #1570 indirectly
2025-05-23 13:13:07 +10:00
dhi_holo 7985aed6bf Update en_us.json
Added the three newest tags to the lang file
2025-05-23 11:02:58 +10:00
dhi_holo 5543b8a660 Merge branch 'main' into fossilized-improvement 2025-05-23 10:45:28 +10:00
GenotypeXD-Dev 33ceb6ce32 Merge remote-tracking branch 'origin/implement_pokemon' into implement_pokemon 2025-05-22 00:59:49 -06:00
GenotypeXD-Dev be97509127 Tea Size changes+animation fix 2025-05-22 00:59:33 -06:00
Kenji_64 508e9dc923 Turned Quaxly's poser into JSON. Still needs some fixes. Frank save me 2025-05-22 03:28:52 +02:00
Kenji_64 f3565e2ab7 Updated Dunsparce line scales 2025-05-21 23:46:02 +02:00
Kenji_64 b1facea991 Fixed Quaxwell's icon position 2025-05-21 23:39:06 +02:00
Kenji_64 7b4f7b06ed Changed Milcery's scale (0.5 > 0.9) 2025-05-21 23:38:37 +02:00
Polymeta d7d855adc2 small cleanup for structure mixin
Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-05-21 14:17:06 +01:00
Hiroku 4fd50b8d2b Merge branch 'y-limit-structures' into 'main'
On request of Slippy, I created a check to make sure certain structures will not spawn below the Sea Level

See merge request cable-mc/cobblemon!1672
2025-05-21 12:28:53 +00:00
Aram be466ad252 Oops 2025-05-21 12:23:13 +02:00
Aram 53749e014b License 2025-05-21 12:22:02 +02:00
Aram b4cdf371fe It now checks for Sea Level in stead of hardcoded 65 2025-05-21 12:22:02 +02:00
Aram e0e30e7e11 Updated the Structure Check to also take StructurePieces into account 2025-05-21 12:22:02 +02:00
Aram cfec4e10cb Created a Mixin that prevents certain Structures from generating below a specific Y Level 2025-05-21 12:22:02 +02:00
Polymeta 614799cfcb Merge branch 'feature/improved-filters' into 'main'
improved filter by Name

See merge request cable-mc/cobblemon!1670
2025-05-21 09:06:34 +00:00
DavidandPolymeta ec367fd4df improved filter by Name 2025-05-21 09:06:34 +00:00
GenotypeXD-Dev 8ab0534482 Merge remote-tracking branch 'origin/implement_pokemon' into implement_pokemon 2025-05-21 02:10:55 -06:00
GenotypeXD-Dev a00ab40c82 The Boston tea party update 2025-05-21 02:10:34 -06:00
JacksonB ab1f169fcc add forgotten rocket loop 2025-05-20 22:35:59 -05:00
JacksonB ce5928e783 Add rocket sounds 2025-05-20 22:35:15 -05:00
washashu0905andWeblate b6bc03d2b7 Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 79.1% (6731 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hant/
2025-05-20 19:53:05 +00:00
Zack the GhastandWeblate 029a338aaf Translated using Weblate (Portuguese (Portugal))
Currently translated at 59.0% (5026 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/pt_PT/
2025-05-20 19:53:04 +00:00
dhi_holo e415b281ee Merge branch 'main' into fossilized-improvement 2025-05-20 22:14:12 +10:00
Polymeta 265aa6e124 Merge branch 'advancing' into 'main'
forgot the optional any check

See merge request cable-mc/cobblemon!1671
2025-05-20 07:16:56 +00:00
MoeBoy76 2765a5584f forgot the optional any check 2025-05-20 14:16:29 +10:00
FrankTheFarmer 46cba69ab7 The Wiglett line will now sink in water again. 2025-05-20 11:02:40 +10:00
dhi_holo d77cb36149 Merge branch 'main' into fossilized-improvement 2025-05-20 08:37:01 +10:00
FrankTheFarmer b1ed170f99 Merge branch 'main' into implement_pokemon 2025-05-20 08:30:41 +10:00
washashu0905andWeblate b3f794ddaa Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 78.8% (6704 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hant/
2025-05-19 21:15:54 +00:00
Aram d37d95ee70 Fixed the Build Error 2025-05-19 19:32:52 +02:00
Zack the GhastandWeblate 1c95686bf9 Translated using Weblate (Portuguese (Portugal))
Currently translated at 59.0% (5021 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/pt_PT/
2025-05-19 11:32:46 +00:00
Polymeta 63f8e6251e fix for wild pokemon getting jumbled up
Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-05-19 11:22:49 +01:00
Polymeta 5a3e9bb236 some tidying up and fixing upper half of rice block not growing with the lower half
Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-05-19 11:17:56 +01:00
dhi_holo 2fce916f05 >:D
I feel like rice isn't as good at absorbing a fall's energy, so I think this is a fun little tweak to it
2025-05-19 16:31:29 +10:00
dhi_holo 52c4c35c0d Who up Hearting they Grains
Gotta get the top half growing in sync with the bottom half (currently doesn't grow at all once it spawns in), but progress is progress
2025-05-19 15:14:44 +10:00
dhi_holo 40f4f80d6e we're graining now
hearty grains block assets all nice and pretty
2025-05-19 12:20:33 +10:00
Zack the GhastandWeblate 55b1e7c672 Translated using Weblate (Portuguese (Portugal))
Currently translated at 58.3% (4965 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/pt_PT/
2025-05-18 19:03:26 +00:00
dhi_holo 721025281f Tags+ 2025-05-18 20:31:56 +10:00
dhi_holo 08e6f68693 Merge branch 'main' into fossilized-improvement 2025-05-18 19:55:42 +10:00
dhi_holo 1e3fcf3e84 Update hearty_grains.json 2025-05-18 19:43:47 +10:00
dhi_holo 92a67ca0ca Grain Bale
Hearty Grain Bale implemented fully
2025-05-18 19:27:58 +10:00
dhi_holo 42600fc840 Graining
Attempted to improve hearty grain for the purposes of adding the assets. Top state isn't working properly, not aging, not bonemealable, etc, but it has the right state count now!
2025-05-18 16:23:13 +10:00
GenotypeXD-Dev 3867738d11 Added a Head_ai bone to dewgong for proper head turning 2025-05-17 23:50:12 -06:00
GenotypeXD-Dev 00e4864507 Merge remote-tracking branch 'origin/implement_pokemon' into implement_pokemon 2025-05-17 23:35:55 -06:00
GenotypeXD-Dev c46403268b Implemented Seel and Dewgong Remodels 2025-05-17 23:35:18 -06:00
FrankTheFarmer c2dab93619 Merge branch 'main' into implement_pokemon 2025-05-18 15:17:02 +10:00
Polymeta 9917b57e1a fix for pokemon getting lost in the void after using /data commands on them
Closes #1551

Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-05-18 00:59:28 +01:00
dhi_holo b5e2f69207 Update candied_apple_from_cooking_pot.json
I can see things I swear
2025-05-17 18:16:08 +10:00
dhi_holo c6c83c065b Update candied_apple_from_cooking_pot.json
forgot a thing
2025-05-17 18:03:31 +10:00
dhi_holo 687381dc1b Stick it to the fruit
Candied Apples and Berries are now held by their sticks
2025-05-17 17:23:39 +10:00
dhi_holo f088dd62bc Bands (plus tweak)
Focus, Choice, and Muscle Bands now use an optimised model and new textures, and EXP Share animated texture is now a bit stronger
2025-05-17 16:45:57 +10:00
dhi_holo 3d1f9458f6 Campfire Pot Recipies
I dislike how these items are named but I'm not about to go around dealing with renaming them to the standard format of `COLOUR_campfire_pot`
2025-05-17 13:46:40 +10:00
dhi_holo 470d3807f1 Wearable Upgrades
Glasses, EXP Share, and Rocky Helmet improved upon
2025-05-17 13:35:53 +10:00
JacksonB e3e40627e8 Beginnings of rocket controller (for real this time) 2025-05-16 21:41:20 -05:00
washashu0905andWeblate e532fbf2ae Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 78.3% (6666 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hant/
2025-05-17 01:44:11 +00:00
Zack the GhastandWeblate c7348d3dba Translated using Weblate (Portuguese (Portugal))
Currently translated at 57.9% (4928 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/pt_PT/
2025-05-17 01:44:10 +00:00
Watuneni iteiteandWeblate b978bbe60e Translated using Weblate (Japanese)
Currently translated at 54.8% (4663 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-05-17 01:44:09 +00:00
Polymeta 1c74d498e6 Merge branch 'full_bellies_1.6' into 'main'
Full bellies 1.6 branch merge

See merge request cable-mc/cobblemon!1663
2025-05-16 20:38:57 +00:00
Polymeta 4d3c46acc4 smol cleanup and prevent remove double sounds in battleApply
Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-05-16 21:26:17 +01:00
Plastered_Crab fbec87d2e0 Teehee whoopsies 2025-05-16 12:25:07 -07:00
Plastered_Crab 397f8db5a0 Can feed when in battle and still affect Fullness 2025-05-16 12:21:23 -07:00
Plastered_Crab 36cd5f3894 Merge remote-tracking branch 'origin/data-driven-brewing' into data-driven-brewing 2025-05-16 10:05:17 -07:00
Plastered_Crab b86f08b069 Merge branch 'main' into data-driven-brewing
# Conflicts:
#	common/src/main/kotlin/com/cobblemon/mod/common/CobblemonRecipeCategories.kt
2025-05-16 10:04:03 -07:00
Polymeta 026897719d Merge branch 'cooking-pot-recipes' into 'main'
We somehow forgot to add recipes to craft the campfire pot.... Now people can!

See merge request cable-mc/cobblemon!1669
2025-05-16 16:05:57 +00:00
Polymeta c4451ffb4f cleanup and licenses
Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-05-16 17:04:58 +01:00
Plastered_Crab 710b6404e7 We somehow forgot to add recipes to craft the campfire pot.... Now people testing this in survival can do so. 2025-05-16 08:31:45 -07:00
Polymeta b8f59110f0 properly detect tags inside entity.find_nearby_block molang
Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-05-16 16:04:45 +01:00
plastered_crab 75927fc1a9 licenses 2025-05-16 06:34:03 -07:00
Polymeta 0a0c1edffc Merge branch 'cooking-pot-recipe-category-tweak' into 'main'
Tweaks to Category names of recipes that accept Seasoning data + tab icons

See merge request cable-mc/cobblemon!1668
2025-05-16 09:20:35 +00:00
plastered_crab 18403c833d Merge remote-tracking branch 'origin/full_bellies_1.6' into full_bellies_1.6 2025-05-16 00:07:50 -07:00
plastered_crab b9824e5708 Remove redundant coerce 2025-05-15 23:30:11 -07:00
dhi_holo 57c1201ad0 a p p l e (and tagging)
Improved tagging for a couple things, made Candied Apples able to leave Leftovers
2025-05-16 15:18:10 +10:00
dhi_holo 4637bef5d2 Recipes and Tabs
Revised type boosting item recipes, and added some cooking items to relevant creative tabs
2025-05-16 14:19:30 +10:00
RedGenesectNinja e49dd8eb54 Added Drilbur and Excadrill to changelog 2025-05-15 23:07:48 -05:00
RedGenesectNinja bf0c47c377 Implemented Drilbur and Excadrill 2025-05-15 22:17:58 -05:00
Plastered_Crab 37e0030d08 Tweaks to Category names of recipes that accept Seasoning data as well as Category icons for each tab 2025-05-15 18:56:54 -07:00
Aram 628db514b3 Fixed JEI With Data Driven Brewing Stand Recipe 2025-05-16 03:29:44 +02:00
dhi_holo 6207a01ae3 Merge branch 'main' into fossilized-improvement 2025-05-16 10:49:21 +10:00
Aram 9046217867 Fixed the Recipe + Shift Clicking Items 2025-05-16 02:07:44 +02:00
Plastered_Crab 40aaef68f9 Fixes for full bellies MR 2025-05-15 15:49:18 -07:00
Aram 09c7bd8e61 Added Last Recipe 2025-05-15 23:43:26 +02:00
Aram 8df8cb9cfe Added All Recipe 2025-05-15 23:38:52 +02:00
Aram c048e5752b Updated Recipes to allow Tags AND Item IDs 2025-05-15 23:33:57 +02:00
Aram e8aa06d633 Update super_potion_brewing_stand.json 2025-05-15 22:16:23 +02:00
Aram 64979ff742 Merge branch 'main' into data-driven-brewing 2025-05-15 22:14:55 +02:00
Aram 0163619e87 Made Potion Brewing Recipes, gotta get the Tags from Main 2025-05-15 22:14:48 +02:00
Aram 258ffd25ea Nuked the old Brewing Stand code, time to Refactor 2025-05-15 21:47:52 +02:00
Polymeta 2dd0d3dcf1 Merge branch 'cooking-recipe-overhaul' into 'main'
Vera's Crafting and Cooking recipe overhaul (with some fixes)

See merge request cable-mc/cobblemon!1665
2025-05-15 19:34:43 +00:00
Plastered_Crab cc5b65a1dd Fix some things 2025-05-15 12:33:38 -07:00
Aram b7de250457 Merge branch 'data-mixin-brewing' into 'data-driven-brewing'
Rewrote Data Driven to Mixin

See merge request cable-mc/cobblemon!1666
2025-05-15 21:12:46 +02:00
Aram 8d0c5bc05c Rewrote Data Driven to Mixin 2025-05-15 21:12:45 +02:00
plastered_crab f4e242a270 clean up some todos and CobblemonItems a bit 2025-05-15 10:15:14 -07:00
plastered_crab da3a513905 Merge remote-tracking branch 'origin/cooking-recipe-overhaul' into cooking-recipe-overhaul 2025-05-15 09:39:33 -07:00
plastered_crab 33af6a1557 Fixing Shapeless Recipes not detecting multiple of a single item 2025-05-15 09:39:18 -07:00
dhi_holo 62b07f7f8a whoopsies
typos revoked
2025-05-15 23:35:22 +10:00
dhi_holo 7bddbcfc67 YAY! MURDAH!
Removed unneeded recipes, fixed ordering in the rabbit stew recipe, fixed broken zinc recipe
2025-05-15 23:06:09 +10:00
dhi_holo 993c7a5cf0 Recipe Advancements
Added advancements for all Campfire Pot recipes, to make them unlockable during gameplay
Began cleaning up now redundant recipes/advancements due to cooking pot overwriting older recipes
2025-05-15 22:25:31 +10:00
dhi_holo 44da19f3e0 Translations Added
Tags added, and new foods that I'm fairly sure don't have translation strings elsewhere (if I'm wrong that can be fixed later, only ones I think are at risk are candied apple and fried rice)
2025-05-15 20:21:32 +10:00
dhi_holo 6d97c6ea34 Update rabbit_stew_from_cooking_pot.json
Removed unnecessary bowl from recipe (mushroom stew bowl gets consumed in the cook)
2025-05-15 19:44:00 +10:00
plastered_crab 2a55ef114d Regional Foods starting to work! 2025-05-15 01:49:40 -07:00
plastered_crab c236d8147a MORE MORE MORE changes to cooking recipes >:D 2025-05-14 23:54:38 -07:00
dhi_holo cf90bf0b0f Pots!
+ Allowed all 7 Apricorn Sprouts and Saccharine Sapling to be put in Flower Pots
+ Added all 9 of our potted blocks to the `#minecraft:flower_pots` block tag
+ Minor fix to the Potted Pep-Up Flower loot table
+ Fixed the texture name for Pep-Up Flower block
2025-05-15 16:44:34 +10:00
dhi_holo b109ff6edf Merge branch 'main' into fossilized-improvement 2025-05-15 14:45:42 +10:00
washashu0905andWeblate 31c492c032 Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 77.7% (6612 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hant/
2025-05-15 02:48:34 +00:00
阿鱼andWeblate 85a2142319 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 78.4% (6671 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-05-15 02:48:33 +00:00
Zack the GhastandWeblate 83e3d65918 Translated using Weblate (Portuguese (Portugal))
Currently translated at 56.6% (4818 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/pt_PT/
2025-05-15 02:48:32 +00:00
Watuneni iteiteandWeblate 9b053bef90 Translated using Weblate (Japanese)
Currently translated at 54.3% (4621 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-05-15 02:48:30 +00:00
plastered_crab 4ea288cc34 MORE changes to cooking recipes >:D 2025-05-14 19:08:23 -07:00
plastered_crab 98540294b1 Start of big rework to all cooking recipes >:D 2025-05-14 16:20:52 -07:00
Polymeta 5535a6a7cb Merge branch 'cooking-fixes' into 'main'
Fixes for merged bait effects and Flavor tooltips showing on every item

See merge request cable-mc/cobblemon!1664
2025-05-14 22:00:01 +00:00
plastered_crab dd426423a1 Remove Mild flavor on tooltips 2025-05-14 12:29:56 -07:00
plastered_crab 6237e44e7c Fix Seasoning tooltip showing on every item 2025-05-14 12:08:32 -07:00
plastered_crab 09561f736a Rarity Bucket tiers can stack (with diminished returns) 2025-05-14 11:53:21 -07:00
FrankTheFarmer 21d1ae4eb5 Merge branch 'main' into implement_pokemon 2025-05-14 14:40:11 +10:00
FrankTheFarmer 3fd18319ee Somebody forgot the portrait and profile for the birds smh 2025-05-14 14:39:25 +10:00
plastered_crab 14e4fe66ac Add new item tags 2025-05-13 20:20:33 -07:00
plastered_crab 975c68cea0 Add new item tags 2025-05-13 20:17:44 -07:00
plastered_crab 6b77adbcef Remove Milking stuff to new branch, metabolism gets ticked from Party and Pasture 2025-05-13 19:55:40 -07:00
Kenji_64 4d2b3697cc Shiny Glimmora texture fix 2025-05-14 03:37:57 +02:00
Kenji_64 a9166bbf13 Implemented the Eon Duo: Latias and Latios! Added Jet controls to both of them 2025-05-14 03:28:10 +02:00
GenotypeXD-Dev c7b2155a7c Merge remote-tracking branch 'origin/implement_pokemon' into implement_pokemon 2025-05-13 18:58:14 -06:00
GenotypeXD-Dev f8cec9843f Implemented Inkay line and Dedenne 2025-05-13 18:57:48 -06:00
plastered_crab d12a8704a9 Merge branch 'refs/heads/main' into full_bellies_1.6 2025-05-13 17:48:48 -07:00
Apion 52fc6b2575 Merge branch 'Lure-Cake-Crash-Fix' into 'main'
Lure cake crash fix

See merge request cable-mc/cobblemon!1662
2025-05-14 00:42:12 +00:00
Plastered_CrabandApion 68ffe0bdbc Lure cake crash fix 2025-05-14 00:42:12 +00:00
FrankTheFarmer d417f95da7 Changelog of dungeon prevention 2025-05-14 09:23:59 +10:00
FrankTheFarmer d9b9b75e0e Swellow remodel 2025-05-14 09:22:14 +10:00
FrankTheFarmer 48e91bcb72 Taillow remodel with some z fighting for now 2025-05-14 09:22:03 +10:00
FrankTheFarmer b4e3072020 Merge branch 'main' into implement_pokemon 2025-05-14 07:52:27 +10:00
Plastered_Crab 4734c0a3cb Changes to Shuckle giving berry juice 2025-05-13 14:28:29 -07:00
Aram 1ed4d9ff9a Shift Clicking items into the brewing stand is almost perfect! 2025-05-13 21:07:24 +02:00
Aram 8d0fc77be2 Update BrewingStandBlockMixin.java 2025-05-13 20:42:59 +02:00
Aram c45ef65645 Hard Coded Recipes still work to remain compatible with mods 2025-05-13 20:30:40 +02:00
Aram 0adfc64e35 DATAPACK BREWING STAND RECIPE HERE WE GO 2025-05-13 19:56:12 +02:00
Aram 80b4238c7e DATA DRIVEN RECIPE IN BREWING STAND 2025-05-13 19:55:55 +02:00
Plastered_Crab e16ae2544c Fix sounds on fullness branch 2025-05-13 10:05:21 -07:00
Aram f182cf4335 Update CobblemonRecipeCategories.kt 2025-05-13 17:38:51 +02:00
Aram f5840c4794 Nuked the Recipe Book 2025-05-13 17:38:45 +02:00
Plastered_Crab cff65ab22e Merge branch 'main' into full_bellies_1.6 2025-05-13 08:33:15 -07:00
Polymeta 1d550b2cac mixin cleanup
Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-05-13 16:27:07 +01:00
Polymeta c859cbae76 small seasoning codec change to fix errors when logging into servers
Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-05-13 16:26:35 +01:00
Aram 10e7962d85 Merge branch 'main' into data-driven-brewing 2025-05-13 14:39:59 +02:00
Polymeta 767f820b7a Merge branch 'food-fix' into 'main'
Allow for Food and Mob effects to be optional (fixes crash)

See merge request cable-mc/cobblemon!1661
2025-05-13 06:19:57 +00:00
dhi_holo 06e4783f16 Update resurrect_pokemon.json 2025-05-13 16:11:40 +10:00
dhi_holo fe83b9d58e Merge branch 'main' into fossilized-improvement 2025-05-13 13:26:11 +10:00
Plastered_Crab 709e6f4a63 Allow for Food and Mob effects to be optional 2025-05-12 17:13:56 -07:00
Plastered_Crab 17f686488e Added fullness values to new Poke Foods 2025-05-12 16:52:17 -07:00
FrankTheFarmer 4d1fe48e99 Merge branch 'main' into implement_pokemon 2025-05-13 09:32:21 +10:00
Plastered_Crab db574332e5 Merge branch 'main' into full_bellies_1.6 2025-05-12 15:55:10 -07:00
Nick 73b72ff19d Merge branch 'ponigiri' into 'main'
Adds Ponigiri, Poke Puffs, Sinister Tea, and berry data changes and tool tip changes

See merge request cable-mc/cobblemon!1658
2025-05-12 15:22:58 -07:00
Plastered_CrabandNick 15aac5e20a Adds Ponigiri, Poke Puffs, Sinister Tea, and berry data changes and tool tip changes 2025-05-12 15:22:58 -07:00
Plastered_Crab b88f4335ee Fullness now saves on exit and displays in Summary "Other" menu 2025-05-12 15:08:39 -07:00
Zack the GhastandWeblate 76211e81ff Translated using Weblate (Portuguese (Portugal))
Currently translated at 55.0% (4682 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/pt_PT/
2025-05-12 18:01:03 +00:00
Polymeta 6916cd51f7 Merge branch 'feature/datapack-starters' into 'main'
Add datapack-driven starter menu categories

See merge request cable-mc/cobblemon!1653
2025-05-12 12:11:37 +00:00
Winter b2ebfcc3b0 Simplify category validation 2025-05-12 12:15:13 +01:00
washashu0905andWeblate 2cace9d153 Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 76.5% (6510 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hant/
2025-05-12 04:29:57 +00:00
Zack the GhastandWeblate 33ad8ca12b Translated using Weblate (Portuguese (Portugal))
Currently translated at 54.4% (4633 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/pt_PT/
2025-05-12 04:29:56 +00:00
JacksonB 140158f5bb Default riding sounds to only be heard by passengers and default sounds to not muffle or reduce in volume when behind a block. Also move the attenuation logic out of RideLoopSound and have openAL handle all attenuation models. 2025-05-11 19:33:00 -05:00
washashu0905andWeblate 8cce2c59b9 Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 75.8% (6455 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hant/
2025-05-11 16:29:39 +00:00
阿鱼andWeblate bdcb8da6b7 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 77.0% (6553 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-05-11 16:29:38 +00:00
Zack the GhastandWeblate d0cfae8713 Translated using Weblate (Portuguese (Portugal))
Currently translated at 53.1% (4519 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/pt_PT/
2025-05-11 16:29:37 +00:00
Hiroku 3b73493801 Merge branch 'spawning-upgrades' into 'main'
Major spawning revamp with herds and rapid spawning and refactored spawn terms

See merge request cable-mc/cobblemon!1634
2025-05-11 10:29:42 +00:00
Polymeta bfb48e8583 Merge branch 'particle-fixes' into 'main'
Particle fixes

See merge request cable-mc/cobblemon!1660
2025-05-11 09:14:23 +00:00
plastered_crab 1bfe5e2044 Fix Item Tags after merge 2025-05-10 23:33:40 -07:00
plastered_crab ace65eda66 Merge branch 'refs/heads/main' into full_bellies_1.6
# Conflicts:
#	common/src/main/kotlin/com/cobblemon/mod/common/Cobblemon.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/CobblemonSounds.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/api/tags/CobblemonItemTags.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/item/berry/FriendshipRaisingBerryItem.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/item/berry/HealingBerryItem.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/item/berry/PortionHealingBerryItem.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/item/berry/StatusCuringBerryItem.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/item/interactive/BerryJuiceItem.kt
#	common/src/main/resources/assets/cobblemon/lang/en_us.json
#	common/src/main/resources/assets/cobblemon/sounds.json
2025-05-10 22:44:39 -07:00
Apion 01c44537d0 Fix naked Gastly 2025-05-10 22:56:16 -04:00
Hiroku e414dd94c3 Merge branch 'main' into 'spawning-upgrades'
# Conflicts:
#   common/src/main/kotlin/com/cobblemon/mod/common/api/spawning/condition/SpawningCondition.kt
2025-05-11 02:34:59 +00:00
Apion 2d4800a733 Fix issue where locator X axis was not aligned with blockbench. 2025-05-10 21:50:52 -04:00
Paul 90e193e5a0 Added more information about what was renamed in spawning system 2025-05-11 10:33:18 +10:00
Hiroku c7e86cf767 Merge branch 'fix-dimension-condition' into 'main'
Fixes dimension condition using the wrong ResourceLocation.

See merge request cable-mc/cobblemon!1659
2025-05-11 00:20:00 +00:00
Paul d8906992a3 Scraper for spawns now exports 'spawnablePositionType' instead of 'context' which is the modern name 2025-05-11 10:18:33 +10:00
Neovitalism 972c259f6d changelog so hiro doesn't send a guy to break my legs 2025-05-10 19:17:46 -05:00
Paul 8228424191 Merge remote-tracking branch 'origin/spawning-upgrades' into spawning-upgrades 2025-05-11 10:14:03 +10:00
Paul 9bb67087b3 Merge remote-tracking branch 'origin/main' into spawning-upgrades 2025-05-11 10:11:25 +10:00
Neovitalism 0f08446732 Moves the imports back 2025-05-10 19:03:53 -05:00
Neovitalism af09a6a0c7 Fixes dimension condition using the wrong ResourceLocation 2025-05-10 18:55:14 -05:00
Winter b4d2f39c48 Remove unused StarterDataLoader import 2025-05-10 16:16:16 +01:00
阿鱼andWeblate 693b53704d Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 76.9% (6543 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-05-10 12:55:19 +00:00
阿鱼andWeblate 3c46e3b5b9 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 72.8% (6194 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-05-10 12:52:03 +00:00
阿鱼andWeblate 5dec5ed008 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 72.8% (6194 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-05-10 12:52:00 +00:00
阿鱼andWeblate 22a479633e Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 72.8% (6194 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-05-10 12:51:57 +00:00
阿鱼andWeblate 1d93df56ae Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 72.8% (6194 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-05-10 12:51:53 +00:00
阿鱼andWeblate 136d47bd2f Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 72.8% (6194 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-05-10 12:51:51 +00:00
阿鱼andWeblate 8ded0af5e9 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 72.8% (6194 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-05-10 12:51:47 +00:00
阿鱼andWeblate 36462b0a85 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 72.8% (6194 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-05-10 12:51:44 +00:00
阿鱼andWeblate 8a447a2487 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 72.8% (6194 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-05-10 12:51:41 +00:00
阿鱼andWeblate bdc2c4d9de Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 72.8% (6194 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-05-10 12:51:38 +00:00
阿鱼andWeblate 8d9a7d67b5 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 72.8% (6194 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-05-10 12:51:35 +00:00
阿鱼andWeblate e1d9b2780a Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 72.8% (6194 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-05-10 12:51:32 +00:00
阿鱼andWeblate fafee79da9 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 72.8% (6194 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-05-10 12:51:29 +00:00
阿鱼andWeblate 71c6c12656 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 72.8% (6194 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-05-10 12:51:26 +00:00
阿鱼andWeblate 4e07128c80 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 72.8% (6194 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-05-10 12:51:23 +00:00
north_82andWeblate df8640ce48 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 72.8% (6194 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-05-10 12:51:20 +00:00
阿鱼andWeblate 59e0a6369d Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 72.8% (6194 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-05-10 12:51:19 +00:00
Zack the GhastandWeblate 8913252b79 Translated using Weblate (Portuguese (Portugal))
Currently translated at 51.1% (4353 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/pt_PT/
2025-05-10 12:51:17 +00:00
Zack the GhastandWeblate f7bedc9866 Translated using Weblate (Portuguese (Portugal))
Currently translated at 50.4% (4288 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/pt_PT/
2025-05-10 01:05:34 +00:00
washashu0905andWeblate e47529c10a Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 74.3% (6324 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hant/
2025-05-09 23:42:48 +00:00
Zack the GhastandWeblate 3e6c6c21a6 Translated using Weblate (Portuguese (Portugal))
Currently translated at 50.1% (4267 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/pt_PT/
2025-05-09 23:42:47 +00:00
Winter 1a12bbd493 Ignore unused exception 2025-05-10 00:09:45 +01:00
Winter 8a24f635cf Undo reformat 2025-05-10 00:05:43 +01:00
Winter d6e066ddcd Validate starter categories 2025-05-10 00:03:35 +01:00
Polymeta 50335135c9 Merge branch '603.5' into 'main'
Half resolved 1207, hence the branch name

See merge request cable-mc/cobblemon!1652
2025-05-09 22:48:28 +00:00
AramandPolymeta 1ee6f83a5b Half resolved 1207, hence the branch name 2025-05-09 22:48:28 +00:00
Landon e8b747a432 Merge branch 'gibber-no-crash' into 'main'
Fix dialogue gibber not being read as nullable for "artificial" and null speaker faces

See merge request cable-mc/cobblemon!1657
2025-05-09 21:44:17 +00:00
FrankTheFarmer 2b59276384 Merge branch 'main' into implement_pokemon 2025-05-10 07:13:04 +10:00
Dani Voort 8f8804f3f4 Fix dialogue gibber not being read as nullable for "artificial" and null speaker faces 2025-05-09 22:59:42 +02:00
washashu0905andWeblate d4f13b9435 Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 73.0% (6216 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hant/
2025-05-09 12:41:51 +00:00
Zack the GhastandWeblate e7b60abe2d Translated using Weblate (Portuguese (Portugal))
Currently translated at 48.6% (4134 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/pt_PT/
2025-05-09 12:41:50 +00:00
TeggyandWeblate 85da2bd0cc Translated using Weblate (Spanish)
Currently translated at 77.0% (6554 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/es/
2025-05-09 12:41:48 +00:00
Hiroku ef826158ce Merge branch 'spicy-spicy-molang' into 'main'
Added `labels` and `has_label` as available MoLang functions

See merge request cable-mc/cobblemon!1656
2025-05-09 03:29:17 +00:00
SpicyandHiroku d32314742d Added labels and has_label as available MoLang functions 2025-05-09 03:29:16 +00:00
Hiroku e8e0ca47dd Merge branch 'issue-#1543-fix' into 'main'
Fixed typo while saving/loading NPCEntity causes data loss

Closes #1543

See merge request cable-mc/cobblemon!1655
2025-05-08 23:23:49 +00:00
Bluedude ebcac6e782 Edit CHANGELOG.md 2025-05-08 17:28:28 +00:00
Dan 63bfa634ae Fixed typo while saving/loading NPCEntity causes data loss 2025-05-08 18:26:05 +02:00
Aram c3d482c78f Recipe Book is workingggg!!!!!!!!! 2025-05-08 17:47:43 +02:00
Winter 7ea85dbd1e Update CHANGELOG.md 2025-05-08 15:10:05 +01:00
Winter 6cdb14d2f8 Rely on JsonDataRegistry to auto register 2025-05-08 15:07:59 +01:00
Winter f041049576 Register StarterDataLoader 2025-05-08 15:07:23 +01:00
Winter e1aa6445fa Switch to JsonDataRegistry<StarterCategory> to be consistent with other registries 2025-05-08 15:06:51 +01:00
Winter f1b7ee5b9c Revert to original implementation 2025-05-08 15:03:35 +01:00
Polymeta 9ea0f7e4f8 Merge branch 'aprijuice-visual-tweaks' into 'main'
Aprijuice visual tweaks

See merge request cable-mc/cobblemon!1654
2025-05-08 08:46:51 +00:00
Plastered_CrabandPolymeta d0edd6ecbc Aprijuice visual tweaks 2025-05-08 08:46:51 +00:00
queao b6188af659 changelog for solosis line 2025-05-08 17:19:28 +10:00
queao f0a2f55054 cats n dogs in the changelog?! 2025-05-08 17:17:24 +10:00
queao fe27cbf56a Phantoms hate this 1 simple trick! 2025-05-08 16:48:53 +10:00
queao ea273d6466 meow meow 2025-05-08 16:46:08 +10:00
queao 3da96ccaaa bark bark 2025-05-08 16:06:57 +10:00
FrankTheFarmer 37c9a903a1 Merge branch 'main' into implement_pokemon 2025-05-08 12:20:56 +10:00
Winter 1372505486 Add license header 2025-05-07 22:46:18 +01:00
Winter a4ce4bf99b Add datapack starter categories with fallback support 2025-05-07 20:33:26 +01:00
Aram 7effc4c853 NON FUNCTIONAL: Finally added the Recipe Book, 2025-05-07 20:17:41 +02:00
Aram 4cd504126b BROKEN: Started adding the Recipe Book 2025-05-07 17:18:30 +02:00
Aram 60ee7b819c Created the Recipe 2025-05-07 12:48:06 +02:00
Aram 28548d5b19 Small rename? 2025-05-07 12:47:46 +02:00
Aram e6ec690811 Wrapped the Brewing Stand to allow Data Driven Recipes Soon!!!
Check previous commit
2025-05-07 01:42:51 +02:00
Aram dac49c2f42 Wrapped the Brewing Stand to allow Data Driven Recipes Soon!!!
Some small issues
* Right clicking Brewing stand first time converts it and wont open gui, so fix that
* The entire code is a Copy Paste of Vanilla ATM, need to start modifying the shit out of it
2025-05-07 01:41:30 +02:00
Polymeta d72dad355c Merge branch '1544' into 'main'
1544, Add Pokemon Despawner to Config!

See merge request cable-mc/cobblemon!1650
2025-05-06 16:10:27 +00:00
AramandPolymeta 40b5726c5b 1544, Add Pokemon Despawner to Config! 2025-05-06 16:10:27 +00:00
Kenji_64 7d57c1450e Translated Dratini line posers to .json, added their cries and water_sleep anims 2025-05-06 15:02:38 +02:00
washashu0905andWeblate b7af57f6e1 Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 72.7% (6187 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hant/
2025-05-06 09:41:57 +00:00
Aiser(CCHusky)andWeblate ca5b7e1aec Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 68.7% (5843 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-05-06 09:41:56 +00:00
阿鱼andWeblate 2ec81679e4 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 68.7% (5843 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-05-06 09:41:56 +00:00
Zack the GhastandWeblate 08c048f4ba Translated using Weblate (Portuguese (Portugal))
Currently translated at 41.2% (3508 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/pt_PT/
2025-05-06 09:41:55 +00:00
Watuneni iteiteandWeblate 6589279339 Translated using Weblate (Japanese)
Currently translated at 53.7% (4573 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-05-06 09:41:53 +00:00
Alexis SalgueiroandWeblate 4465e47f2e Translated using Weblate (French)
Currently translated at 100.0% (8505 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-05-06 09:41:52 +00:00
YasitoandWeblate 570d42df7a Translated using Weblate (French)
Currently translated at 100.0% (8505 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-05-06 09:41:52 +00:00
YasitoandWeblate 044e83449d Translated using Weblate (French (Canada))
Currently translated at 100.0% (8505 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-05-06 09:41:50 +00:00
Felipe Bermudes OrmeñoandWeblate 6617558e71 Translated using Weblate (Spanish (Mexico))
Currently translated at 26.4% (2252 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/es_MX/
2025-05-06 09:41:49 +00:00
TeggyandWeblate eff410b714 Translated using Weblate (Spanish)
Currently translated at 76.4% (6504 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/es/
2025-05-06 09:41:48 +00:00
Polymeta d32aa46832 init PokemonProperties with basefriendship is none is explicitly set
Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-05-06 00:00:24 +01:00
FrankTheFarmer 4aee0b291c Merge branch 'main' into implement_pokemon 2025-05-05 20:55:15 +10:00
FrankTheFarmer bcff96013e Merge remote-tracking branch 'origin/implement_pokemon' into implement_pokemon 2025-05-05 20:54:50 +10:00
FrankTheFarmer be46c59934 Restored sigilyph's ability to move, adjusted its hitbox and scale, and tweaked its poser 2025-05-05 20:54:41 +10:00
violet 73c1a92a17 Merge remote-tracking branch 'origin/implement_pokemon' into implement_pokemon 2025-05-05 06:07:14 -04:00
violet 04a773d35c BLOBS 2025-05-05 06:06:33 -04:00
Polymeta 5068e66fa7 Merge branch 'advancing' into 'main'
corrected logic that was incorrectly checking the ResourceLocation of the species

See merge request cable-mc/cobblemon!1649
2025-05-05 09:53:56 +00:00
FrankTheFarmer 01a7461a9a Merge branch 'main' into implement_pokemon 2025-05-05 15:23:40 +10:00
MoeBoy76 482b682595 corrected logic that was incorrectly checking the ResourceLocation of the species 2025-05-05 12:31:57 +10:00
Paul ffecc58979 Fixed gibber click interactions not being as intended 2025-05-04 13:17:39 +10:00
Paul eaaf2ca05c Added unset_interaction to NPC structs 2025-05-04 12:16:16 +10:00
Paul e91651553b Added set_dialogue_interaction to NPC structs 2025-05-04 12:14:32 +10:00
Zack the GhastandWeblate 482a7d9493 Translated using Weblate (Portuguese (Portugal))
Currently translated at 35.9% (3058 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/pt_PT/
2025-05-03 09:32:24 +00:00
YasitoandWeblate 430891971c Translated using Weblate (French)
Currently translated at 97.2% (8275 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-05-03 09:32:24 +00:00
YasitoandWeblate d88f2d80a3 Translated using Weblate (French (Canada))
Currently translated at 100.0% (8505 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-05-03 09:32:23 +00:00
dhi_holo 874a5d2e8f Update CHANGELOG.md
forgot one sentence, whoopsie daisies
2025-05-03 16:37:08 +10:00
dhi_holo 70e49bbbdb More Tweaks
Eject Pack was fixed at some point, so I readded the recipe, loaded dice was tweaked, and started tweaking the consumed tags
2025-05-03 16:06:42 +10:00
dhi_holo 39fce8ca06 Cupping
Cups are now craftable for real, too, praise the drinkingssiah
2025-05-03 15:21:50 +10:00
dhi_holo d288fe46da Replace Pot Recipes
They were weird, now they're slightly less weird and feel more reasonable imo
2025-05-03 14:47:16 +10:00
dhi_holo cefc97320a Merge branch 'main' into fossilized-improvement 2025-05-03 14:38:35 +10:00
Test a2094677cd update pot cook button 2025-05-03 00:12:26 -04:00
washashu0905andWeblate 2a3d74bd85 Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 71.9% (6117 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hant/
2025-05-03 02:45:17 +00:00
Zack the GhastandWeblate de94986156 Translated using Weblate (Portuguese (Portugal))
Currently translated at 33.6% (2865 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/pt_PT/
2025-05-03 02:45:17 +00:00
YasitoandWeblate f8afcb6a8f Translated using Weblate (French)
Currently translated at 97.0% (8255 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-05-03 02:45:15 +00:00
YasitoandWeblate 3c0cf1dc5b Translated using Weblate (French (Canada))
Currently translated at 95.9% (8158 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-05-03 02:45:14 +00:00
Polymeta eae4eb5121 Merge branch 'E' into 'main'
🇪

See merge request cable-mc/cobblemon!1646
2025-05-02 08:33:44 +00:00
TestandPolymeta ed3a008515 🇪 2025-05-02 08:33:43 +00:00
Polymeta 462074ce43 Merge branch 'sketch-copy-move-fix' into 'main'
Sketch copy move fix

Closes #1503

See merge request cable-mc/cobblemon!1645
2025-05-02 08:32:33 +00:00
Polymeta d54a85aa68 Merge branch 'aprijuice-visual-tweaks' into 'main'
Aprijuice visual tweaks

See merge request cable-mc/cobblemon!1647
2025-05-02 08:32:14 +00:00
Plastered_CrabandPolymeta bf8433f6e9 Aprijuice visual tweaks 2025-05-02 08:32:13 +00:00
dhi_holo 374fc44089 Fossil Analyzer Visual Tweak
the top texture is now good
2025-05-02 18:30:30 +10:00
Zack the GhastandWeblate 8225898a66 Translated using Weblate (Portuguese (Portugal))
Currently translated at 26.8% (2283 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/pt_PT/
2025-05-02 07:52:09 +00:00
washashu0905andWeblate 49faf60ea1 Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 70.2% (5976 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hant/
2025-05-02 07:52:09 +00:00
dhi_holo f7664a04db L-L-L-Lava
Wrong brainrot, ah well, funny achievement as it should be

Also changed the advancement icon for the galar fossils so it isn't just the same as the regular fossil resurrection advancement
2025-05-02 17:47:25 +10:00
Segfault Guy 58a5412602 Shift arbitrary battle lead to front of party while preserving order. 2025-05-02 00:48:05 -04:00
CeeJay 51b0f768a0 looks better capitalized 2025-05-01 21:52:10 -04:00
CeeJay 106e487035 changelog for sketch fix 2025-05-01 21:51:08 -04:00
dhi_holo 2d772f5bf7 Update resurrect_galar_fossil.json
Should make one issue of the advancement no longer present, but the advancement itself doesn't work, pls fix Moe
2025-05-02 09:26:23 +10:00
Weblate 71bd4fb610 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-05-01 21:54:39 +00:00
Felipe Bermudes OrmeñoandWeblate 509feae420 Translated using Weblate (Spanish (Mexico))
Currently translated at 24.7% (2103 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/es_MX/
2025-05-01 21:54:34 +00:00
washashu0905andWeblate 5045a95cd0 Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 69.9% (5946 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hant/
2025-05-01 21:54:33 +00:00
TeggyandWeblate 07dfc89f63 Translated using Weblate (Spanish)
Currently translated at 72.8% (6196 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/es/
2025-05-01 21:54:30 +00:00
Zack the GhastandWeblate 34b6a3cc47 Translated using Weblate (Portuguese (Portugal))
Currently translated at 26.6% (2266 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/pt_PT/
2025-05-01 21:54:29 +00:00
FrankTheFarmer c56529030b Merge branch 'main' into implement_pokemon 2025-05-01 18:26:08 +10:00
FrankTheFarmer bd81f84643 Changelog of Cacti and Spiders 2025-05-01 18:25:36 +10:00
FrankTheFarmer e840eb6e70 Merge remote-tracking branch 'origin/implement_pokemon' into implement_pokemon 2025-05-01 18:23:10 +10:00
FrankTheFarmer ed64b0cbc6 Cacturne remodel and json poser 2025-05-01 18:22:59 +10:00
FrankTheFarmer d821677411 Cacnea given a json poser 2025-05-01 18:22:30 +10:00
FrankTheFarmer c42d090862 Garchomp model updated so it can wear hats 2025-05-01 18:22:10 +10:00
RedGenesectNinja 2b85024b75 Implemented Tarountula and Spidops, and also adjusted Joltik's eye height. I love arachnids 2025-05-01 02:12:13 -05:00
dhi_holo 63af1713b9 Merge branch 'main' into fossilized-improvement 2025-05-01 15:39:28 +10:00
dhi_holo 8fecb12829 Three and a fix or two
Added Metal Alloy, Scroll of Darkness, and Scroll of Waters
Changed instances of `Hearty_Grains` to `HEARTY_GRAINS` to match conventions
Changed the Kings Rock wearable model to Gest's plane version
2025-05-01 15:15:26 +10:00
dhi_holo d0b50a1ee0 Sprites!
Clear Amulet, Grip Claw, Lagging Tail, and Luminous Moss now have sprites! Praise Vera!
2025-05-01 13:45:41 +10:00
plastered_crab 07497d653e More data, models, etc for Ponigiri 2025-04-30 19:08:44 -07:00
CeeJay 2ecbe28c87 remove extra line Fixes #1503 2025-04-30 21:48:12 -04:00
Polymeta 80112e0b70 pokemon can use flying pose again
Closes #1553
2025-05-01 00:05:38 +00:00
plastered_crab dfb28ed185 langs for Base, Frosted, Fancy, and Deluxe Poke Puffs 2025-04-30 14:54:08 -07:00
plastered_crab 0cc9a75255 Rough draft on Poke Puff tooltips 2025-04-30 12:59:14 -07:00
plastered_crab abfd718681 Poke Puffs are starting to work great now (visually) 2025-04-30 12:00:32 -07:00
FrankTheFarmer ab6d08ad14 Changelog of pain and suffering 2025-04-30 20:03:21 +10:00
FrankTheFarmer fa64eb7333 Scizor remodel with locators 2025-04-30 20:01:48 +10:00
FrankTheFarmer 5dd17752b6 Scyther remodel with locators 2025-04-30 20:01:29 +10:00
FrankTheFarmer 3a351a3195 Clodsire is now 15% larger❗ 2025-04-30 20:00:35 +10:00
FrankTheFarmer 81922a8d2c Merge branch 'main' into implement_pokemon 2025-04-30 19:58:34 +10:00
plastered_crab 8271b7a979 I am so close but I must sleep 2025-04-30 01:42:12 -07:00
plastered_crab 251c2df78e tweak parent of first predicate 2025-04-29 23:03:38 -07:00
plastered_crab c03e30bd9c Test poke puff predicate stuff 2025-04-29 21:32:24 -07:00
CeeJay f776542365 regex to capture special characters along with spaces in sketch copying move 2025-04-29 23:39:41 -04:00
Plastered_Crab ecc793350a New experimental food stuff 2025-04-29 16:33:50 -07:00
YasitoandWeblate 98fd61ec29 Translated using Weblate (French (Canada))
Currently translated at 92.5% (7875 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-04-29 16:26:11 +00:00
washashu0905andWeblate e1e545dd05 Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 58.5% (4979 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hant/
2025-04-29 16:26:07 +00:00
Zack the GhastandWeblate c403103018 Translated using Weblate (Portuguese (Portugal))
Currently translated at 21.2% (1811 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/pt_PT/
2025-04-29 16:26:05 +00:00
Alexis SalgueiroandWeblate d6a1d3f2bd Translated using Weblate (French)
Currently translated at 95.3% (8110 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-04-29 16:26:05 +00:00
YasitoandWeblate 87edf2bfd6 Translated using Weblate (French)
Currently translated at 95.3% (8110 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-04-29 16:26:04 +00:00
阿鱼andWeblate 7711535a26 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 67.3% (5731 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-04-29 16:26:02 +00:00
Polymeta 045ca3a07f Merge branch 'sterr/silence' into 'main'
Pokemon no longer make sounds as they're being sent out and now respect silent nbt

See merge request cable-mc/cobblemon!1644
2025-04-29 16:04:25 +00:00
dhi_holo a71bad07bd One. Year. Later.
Re-enabled the commented out held items, which almost resolves #1548, as they are still awaiting textures. But, I wanted to work with jsons, so this commit was made.
I also cleaned up/improved some recipe advancement jsons to be more accurate when reasonable
2025-04-29 20:37:22 +10:00
Sterrezo 2085f12fef Pokemon no longer make sounds as they're being sent out and now respect silent nbt 2025-04-29 02:08:17 +02:00
FrankTheFarmer f819909446 Merge branch 'main' into implement_pokemon 2025-04-29 07:20:21 +10:00
Sterrezo dd195317f9 Turned sound keyframes into scripts for Pidgey, Pidgeotto, Pidgeot, Golbat, Aerodactyl, Dragonite 2025-04-28 17:12:54 +02:00
Sterrezo ab00285a4c Added wing flaps to Butterfree 2025-04-28 17:00:49 +02:00
Sterrezo 953d724c87 Updated animation sounds, added more variation and chitin wing sounds 2025-04-28 16:33:08 +02:00
Polymeta 36c4ea3b1a Merge branch 'advancing' into 'main'
Advancement conformity and clarity

See merge request cable-mc/cobblemon!1642
2025-04-28 14:25:26 +00:00
MoeBoy76 804ad75ede migrate missed advancements to use species tag 2025-04-28 22:40:52 +10:00
MoeBoy76 be11568041 fixed broken advancement and exta criterion that was missed, corrected changelog typo 2025-04-28 20:50:54 +10:00
Hiroku 863b43f902 Debug code that you never saw shush 2025-04-28 10:25:32 +00:00
YasitoandWeblate f65f6fd2c9 Translated using Weblate (French (Canada))
Currently translated at 89.0% (7575 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-04-28 07:11:57 +00:00
YasitoandWeblate a4e144854d Translated using Weblate (French)
Currently translated at 93.8% (7981 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-04-28 07:11:56 +00:00
Weblate d6f7cd4b83 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-04-28 06:06:01 +00:00
YasitoandWeblate 36cf258410 Translated using Weblate (French)
Currently translated at 92.6% (7876 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-04-28 06:05:56 +00:00
YasitoandWeblate 89df2a01e2 Translated using Weblate (French)
Currently translated at 86.8% (7387 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-04-28 05:33:24 +00:00
YasitoandWeblate 0a930cb54f Translated using Weblate (French)
Currently translated at 86.8% (7386 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-04-28 05:07:13 +00:00
YasitoandWeblate 2448fec2c4 Translated using Weblate (French (Canada))
Currently translated at 88.9% (7568 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-04-28 05:07:13 +00:00
YasitoandWeblate ea2071b644 Translated using Weblate (French)
Currently translated at 86.8% (7386 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-04-28 04:50:27 +00:00
YasitoandWeblate bae0d77699 Translated using Weblate (French (Canada))
Currently translated at 88.9% (7564 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-04-28 04:50:27 +00:00
YasitoandWeblate f5f5cb19bc Translated using Weblate (French (Canada))
Currently translated at 88.5% (7527 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-04-28 04:41:03 +00:00
YasitoandWeblate 9aa7c65279 Translated using Weblate (French (Canada))
Currently translated at 87.6% (7451 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-04-28 04:21:08 +00:00
JacksonB aeec991e7b add license 2025-04-27 22:44:06 -05:00
YasitoandWeblate 8f4071e181 Translated using Weblate (French (Canada))
Currently translated at 83.6% (7114 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-04-28 03:12:58 +00:00
YasitoandWeblate 9c4470bc51 Translated using Weblate (French (Canada))
Currently translated at 82.8% (7043 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-04-28 02:57:15 +00:00
YasitoandWeblate c785480c32 Translated using Weblate (French (Canada))
Currently translated at 82.7% (7034 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-04-28 02:55:09 +00:00
YasitoandWeblate 4a50700bb9 Translated using Weblate (French (Canada))
Currently translated at 82.4% (7014 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-04-28 02:31:04 +00:00
YasitoandWeblate 0ad2ff552b Translated using Weblate (French)
Currently translated at 86.8% (7386 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-04-28 02:31:03 +00:00
YasitoandWeblate 44c5d4ea2e Translated using Weblate (French)
Currently translated at 86.8% (7386 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-04-28 02:07:34 +00:00
YasitoandWeblate 46661908e0 Translated using Weblate (French (Canada))
Currently translated at 82.4% (7013 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-04-28 02:07:33 +00:00
YasitoandWeblate 01372f2850 Translated using Weblate (French)
Currently translated at 86.8% (7386 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-04-28 01:26:15 +00:00
YasitoandWeblate 204ce8f003 Translated using Weblate (French (Canada))
Currently translated at 81.7% (6954 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-04-28 01:26:15 +00:00
Zack the GhastandWeblate 784ddcb19a Translated using Weblate (Portuguese (Portugal))
Currently translated at 20.9% (1785 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/pt_PT/
2025-04-28 01:26:13 +00:00
Zack the GhastandWeblate 11d7cbfa46 Translated using Weblate (Portuguese (Portugal))
Currently translated at 20.9% (1785 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/pt_PT/
2025-04-28 00:34:45 +00:00
YasitoandWeblate f3325caaea Translated using Weblate (French)
Currently translated at 86.8% (7386 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-04-28 00:34:44 +00:00
YasitoandWeblate 123c348f73 Translated using Weblate (French (Canada))
Currently translated at 81.2% (6910 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-04-28 00:34:43 +00:00
Zack the GhastandWeblate 29aae87f01 Translated using Weblate (Portuguese (Portugal))
Currently translated at 20.9% (1785 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/pt_PT/
2025-04-27 23:55:57 +00:00
JacksonB 7751b13611 merge main 2025-04-27 18:50:35 -05:00
YasitoandWeblate 9f6ad98acb Translated using Weblate (French)
Currently translated at 86.8% (7386 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-04-27 23:45:29 +00:00
YasitoandWeblate cecd291566 Translated using Weblate (French (Canada))
Currently translated at 81.1% (6905 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-04-27 23:45:28 +00:00
YasitoandWeblate 2f9d6a9f83 Translated using Weblate (French)
Currently translated at 86.8% (7386 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-04-27 22:59:22 +00:00
YasitoandWeblate 1e9ccbddcb Translated using Weblate (French (Canada))
Currently translated at 81.0% (6893 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-04-27 22:59:21 +00:00
MoeBoy76 8ad54287e4 advancement changes changelog 2025-04-28 08:55:02 +10:00
YasitoandWeblate 9b5a381436 Translated using Weblate (French (Canada))
Currently translated at 81.0% (6891 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-04-27 22:53:05 +00:00
YasitoandWeblate ed5bd7e899 Translated using Weblate (French)
Currently translated at 86.8% (7386 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-04-27 22:53:04 +00:00
MoeBoy76 179d90d482 Merge branch 'main' of https://gitlab.com/cable-mc/cobblemon into advancing
# Conflicts:
#	common/src/main/kotlin/com/cobblemon/mod/common/advancement/criterion/CastPokeRodCriterionCondition.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/advancement/criterion/ReelInPokemonCriterionCondition.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/entity/fishing/PokeRodFishingBobberEntity.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/item/interactive/PokerodItem.kt
#	common/src/main/resources/assets/cobblemon/lang/en_us.json
2025-04-28 08:43:07 +10:00
YasitoandWeblate 587a90bb70 Translated using Weblate (French)
Currently translated at 86.8% (7386 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-04-27 22:24:54 +00:00
YasitoandWeblate f883578046 Translated using Weblate (French (Canada))
Currently translated at 80.8% (6873 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-04-27 22:24:48 +00:00
JacksonB e0cbc0bdc3 Riding Sound refactor to support and arbitrary number of sounds per behaviour per species. Implemented a fade in and out for any rideSound instance and added support for a handful of configurations when specifying the sound. 2025-04-27 16:52:04 -05:00
YasitoandWeblate b5d348eba6 Translated using Weblate (French (Canada))
Currently translated at 80.3% (6830 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-04-27 21:40:48 +00:00
YasitoandWeblate fce389edfd Translated using Weblate (French (Canada))
Currently translated at 77.5% (6594 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-04-27 19:59:05 +00:00
YasitoandWeblate b6954b4e07 Translated using Weblate (French (Canada))
Currently translated at 76.6% (6523 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-04-27 19:31:52 +00:00
YasitoandWeblate f28a16c7cc Translated using Weblate (French (Canada))
Currently translated at 76.2% (6488 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-04-27 19:17:12 +00:00
YasitoandWeblate 230071a773 Translated using Weblate (French (Canada))
Currently translated at 75.9% (6456 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-04-27 18:59:21 +00:00
YasitoandWeblate 63534a242c Translated using Weblate (French (Canada))
Currently translated at 75.8% (6449 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-04-27 18:54:07 +00:00
YasitoandWeblate 1afb574aec Translated using Weblate (French (Canada))
Currently translated at 75.5% (6427 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-04-27 17:58:35 +00:00
YasitoandWeblate ac9adb03cd Translated using Weblate (French)
Currently translated at 81.5% (6938 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-04-27 17:58:34 +00:00
YasitoandWeblate f3a22b19b3 Translated using Weblate (French (Canada))
Currently translated at 75.5% (6427 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-04-27 17:23:59 +00:00
Hiroku c3fb661f49 Merge branch 'smarterer-pokemons' into 'main'
What if Pokémon had brains?

See merge request cable-mc/cobblemon!1611
2025-04-27 09:47:35 +00:00
Paul dccffe311f Cleanup in a few task configs 2025-04-27 19:06:39 +10:00
Hiroku 1769af7385 Merge branch 'main' into 'boat-behaviour'
# Conflicts:
#   common/src/main/kotlin/com/cobblemon/mod/common/util/adapters/RidingBehaviourSettingsAdapter.kt
2025-04-27 08:54:17 +00:00
YasitoandWeblate 572e77c4f5 Translated using Weblate (French (Canada))
Currently translated at 75.5% (6426 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-04-27 08:45:10 +00:00
YasitoandWeblate 889a012932 Translated using Weblate (French)
Currently translated at 81.5% (6938 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-04-27 08:45:09 +00:00
YasitoandWeblate eca4c6cd4c Translated using Weblate (French)
Currently translated at 81.5% (6938 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-04-27 08:29:53 +00:00
YasitoandWeblate b570a6ec8b Translated using Weblate (French (Canada))
Currently translated at 75.5% (6426 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-04-27 08:29:52 +00:00
YasitoandWeblate 1f1c302bc9 Translated using Weblate (French (Canada))
Currently translated at 75.5% (6426 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-04-27 08:13:24 +00:00
YasitoandWeblate adc1fa0063 Translated using Weblate (French)
Currently translated at 81.5% (6938 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-04-27 08:13:23 +00:00
Paul d7d8d766d1 Improved starting checks on wander tasks when the wander chance is a constant or variable reference 2025-04-27 17:01:45 +10:00
Paul 54b2cc0a59 Added permission node for seeing hidden NPCs 2025-04-27 17:01:19 +10:00
Paul 62696931df Fixed implemented list being doubled up 2025-04-27 16:57:45 +10:00
YasitoandWeblate ddc3a781a0 Translated using Weblate (French)
Currently translated at 81.4% (6930 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-04-27 06:49:52 +00:00
YasitoandWeblate 9eb3281c6f Translated using Weblate (French)
Currently translated at 79.8% (6793 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-04-27 06:26:21 +00:00
YasitoandWeblate 0cd5804e67 Translated using Weblate (French)
Currently translated at 77.0% (6549 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-04-27 05:59:16 +00:00
YasitoandWeblate 7000d0d82a Translated using Weblate (French)
Currently translated at 74.8% (6369 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-04-27 05:26:22 +00:00
YasitoandWeblate b7695e55ea Translated using Weblate (French)
Currently translated at 68.5% (5829 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-04-27 04:36:54 +00:00
YasitoandWeblate bea3ebe62b Translated using Weblate (French)
Currently translated at 68.4% (5825 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-04-27 04:35:43 +00:00
Paul bfc7f83e07 Merge remote-tracking branch 'origin/main' into smarterer-pokemons
# Conflicts:
#	common/src/main/kotlin/com/cobblemon/mod/common/entity/npc/NPCEntity.kt
2025-04-27 14:16:02 +10:00
YasitoandWeblate 73cf736077 Translated using Weblate (French (Canada))
Currently translated at 75.4% (6413 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-04-27 04:05:10 +00:00
YasitoandWeblate d31f8f0eff Translated using Weblate (French)
Currently translated at 68.1% (5797 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-04-27 04:05:09 +00:00
YasitoandWeblate 88dca4d7b1 Translated using Weblate (French (Canada))
Currently translated at 75.3% (6410 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-04-27 03:22:47 +00:00
YasitoandWeblate 27db85ee32 Translated using Weblate (French (Canada))
Currently translated at 75.3% (6406 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-04-27 03:09:50 +00:00
YasitoandWeblate 5e3561eba5 Translated using Weblate (French (Canada))
Currently translated at 75.2% (6400 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-04-27 03:02:48 +00:00
YasitoandWeblate 9dfa8a323e Translated using Weblate (French)
Currently translated at 68.1% (5797 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-04-27 02:21:41 +00:00
YasitoandWeblate 15c0d86996 Translated using Weblate (French (Canada))
Currently translated at 74.9% (6371 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-04-27 02:21:37 +00:00
Weblate 0fbb5e7d95 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-04-27 00:08:16 +00:00
YasitoandWeblate 5e8d27779c Translated using Weblate (French (Canada))
Currently translated at 73.6% (6265 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-04-27 00:08:12 +00:00
阿鱼andWeblate a4fabcd45d Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 66.3% (5647 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-04-27 00:08:10 +00:00
YasitoandWeblate 5259b8c93d Translated using Weblate (French)
Currently translated at 68.1% (5797 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-04-27 00:08:09 +00:00
Hiroku db573455ea Merge branch 'cross-dimensional-packets' into 'main'
Prevent Cross Dimensional Packets

See merge request cable-mc/cobblemon!1630
2025-04-27 00:06:22 +00:00
Hiroku 3af002a39c Changelog 2025-04-26 23:55:04 +00:00
JacksonB 2f64ab1018 merge main 2025-04-26 17:33:09 -05:00
JacksonB 6c74d30ce8 Fix some filter issues and add saucer noise for magnezone 2025-04-26 17:26:35 -05:00
Polymeta a15c44325d Merge branch 'riding-error-handling' into 'main'
Fail gracefully on riding deserialization errors

See merge request cable-mc/cobblemon!1639
2025-04-26 22:07:06 +00:00
FrankTheFarmer 41b1e25816 Merge branch 'main' into implement_pokemon 2025-04-27 07:37:37 +10:00
Apion 33fc67ed58 Merge branch 'npc-gibberspeak' into 'main'
NPC gibberish

See merge request cable-mc/cobblemon!1616
2025-04-26 21:22:22 +00:00
Apion b9f2bcc3a3 Fix missing import causing compile error 2025-04-26 17:10:59 -04:00
Apion 8a5a88b4f1 Merge branch 'particle-reorg' into 'main'
𝕿𝖍𝖊 𝕲𝖗𝖊𝖆𝖙 𝕻𝖆𝖗𝖙𝖎𝖈𝖑𝖊 𝕽𝖊𝖔𝖗𝖌 𝖔𝖋 2025

See merge request cable-mc/cobblemon!1627
2025-04-26 21:01:01 +00:00
Apion af6b1190c1 Merge branch 'main' into npc-gibberspeak
# Conflicts:
#	common/src/main/resources/cobblemon-common.accesswidener
#	common/src/main/resources/mixins.cobblemon-common.json
2025-04-26 16:37:58 -04:00
Apion 7f0a6d4d48 Merge branch 'no-rolling' into 'main'
Option to disable rolling is now functional. I would not use this on anything...

See merge request cable-mc/cobblemon!1592
2025-04-26 20:22:15 +00:00
Apion d7e4298a91 Fix compile error from flashback MR 2025-04-26 15:42:44 -04:00
FrankTheFarmer 7c9490db2a Merge branch 'main' into implement_pokemon 2025-04-27 03:28:14 +10:00
Landon Wills 923b4e4266 Change from throwing exception to logging warning when we fail to deserialize riding behaviour 2025-04-26 12:08:33 -04:00
Landon Wills 88e38bfa1a Remove additional references to submarine behaviour 2025-04-26 11:48:09 -04:00
Landon Wills 507a9a54b5 Remove submarine behaviour 2025-04-26 11:47:20 -04:00
Landon Wills 0b72a072bd Fix merge issues 2025-04-26 11:40:44 -04:00
Landon Wills c927cae609 Merge branch 'refs/heads/main' into water-mount-behaviours
# Conflicts:
#	common/src/main/java/com/cobblemon/mod/common/mixin/client/CameraMixin.java
#	common/src/main/kotlin/com/cobblemon/mod/common/api/riding/behaviour/types/GenericSwimBehaviour.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/api/riding/behaviour/types/air/BirdBehaviour.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/api/riding/behaviour/types/air/GliderBehaviour.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/api/riding/behaviour/types/air/JetBehaviour.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/api/riding/behaviour/types/land/HorseBehaviour.kt
2025-04-26 11:21:33 -04:00
Paul 474918e414 Reimplemented lure cake nomnoms 2025-04-26 20:14:52 +10:00
Hiroku 30f82bbad6 Merge branch 'flashback-compat' into 'main'
Fix flashback crash

See merge request cable-mc/cobblemon!1629
2025-04-26 07:45:13 +00:00
Paul 0e93383c90 Fixed up saccharine honey tree spawning stuff 2025-04-26 17:41:04 +10:00
Hiroku 1823eb4979 Merge branch 'npc-stealth' into 'main'
[molang] easy access npc hiding

See merge request cable-mc/cobblemon!1573
2025-04-26 04:09:36 +00:00
Paul abb44cf696 Testo fixo 2025-04-26 12:22:55 +10:00
Apion ae4af68797 Fix compile errors 2025-04-25 21:55:26 -04:00
Paul e6bd7cad72 Brought fishing in line with new spawning bucket normalizing 2025-04-26 11:41:19 +10:00
FrankTheFarmer e53b4fc36b Changelog 2025-04-26 11:27:10 +10:00
FrankTheFarmer 5eef6628c3 🌵Maractus💚 remodel 2025-04-26 11:26:46 +10:00
FrankTheFarmer 509f44dca0 Forgot Sigilyph portrait and profile 2025-04-26 11:26:22 +10:00
FrankTheFarmer 2e3db889a3 Merge branch 'main' into implement_pokemon 2025-04-26 10:29:52 +10:00
FrankTheFarmer 4c81e244e3 Sharpedo on the changelog 2025-04-26 10:28:55 +10:00
FrankTheFarmer cc4a381956 Locators added to Sharpedo 2025-04-26 10:21:49 +10:00
Polymeta da7f4a2682 Merge branch 'oopsies-fix-cake-texture' into 'main'
Add new cooking pot recipes, fix EV yield berry effects, fix other recipes,...

See merge request cable-mc/cobblemon!1637
2025-04-25 22:27:50 +00:00
Polymeta 73c4762801 Merge branch 'new-recipes-fix-recipes-fix-baits-color-cakes' into 'main'
Add new cooking pot recipes, fix EV yield berry effects, fix other recipes,...

See merge request cable-mc/cobblemon!1636
2025-04-25 21:21:49 +00:00
Plastered_Crab 43abfa3c17 New Lure/Poke Cake item sprites for tinting 2025-04-25 14:20:07 -07:00
JacksonB 25956d5f23 temp commit for sound fixes 2025-04-25 16:16:15 -05:00
Plastered_Crab fb87220fe9 Add new cooking pot recipes, fix EV yield berry effects, fix other recipes, add color to Lure/Poke Cake item texture 2025-04-25 13:33:59 -07:00
FrankTheFarmer a4ee09f4f7 Quick Corviknight asset push 2025-04-26 06:18:16 +10:00
FrankTheFarmer c3a13e35a0 Changelog moment 2025-04-26 05:09:53 +10:00
FrankTheFarmer 1897992093 Sigilyph remodel 2025-04-26 05:05:51 +10:00
FrankTheFarmer 4dfed5ffcf Merge branch 'main' into implement_pokemon 2025-04-26 04:08:40 +10:00
FrankTheFarmer 150ebff24f Merge remote-tracking branch 'origin/implement_pokemon' into implement_pokemon 2025-04-26 04:07:51 +10:00
FrankTheFarmer 40721c1ce5 Gabite model tweaks with locators added 2025-04-26 04:07:37 +10:00
FrankTheFarmer 89fbf299d2 Gible model tweaks with locators added 2025-04-26 04:07:27 +10:00
Sterrezo 07bba37c03 Restored and relocated assets 2025-04-25 20:00:00 +02:00
QriviateA 83961e80a3 Forgor to give blinks to Gothita Line + reduced gothita head clipping into bowtie when looking down 2025-04-25 18:32:41 +01:00
Sterrezo 5896a74d1f Added generic gibber sound 2025-04-25 19:14:45 +02:00
Landon 2a0de32854 Merge branch 'fix-species-config' into 'main'
Fix misconfigured riding behaviours preventing world load

See merge request cable-mc/cobblemon!1635
2025-04-25 17:07:45 +00:00
JacksonB f6832cd44c temp commit for cone raycasting 2025-04-25 11:46:33 -05:00
Landon Wills 406097c1ff Fix misconfigured riding behaviours preventing world load 2025-04-25 12:27:28 -04:00
Landon 14ec3c00e6 Merge branch 'cleanup-camera-mixin' into 'main'
Cleanup camera mixin

See merge request cable-mc/cobblemon!1633
2025-04-25 16:26:09 +00:00
Landon 18b17b0638 Merge branch 'riding-behaviour-additions-01' into 'main'
Refine air behaviour controls. rideAltPose now returns a ResourceLocation for unique pose control. Update...

See merge request cable-mc/cobblemon!1626
2025-04-25 16:09:33 +00:00
Jackson Bowes 59c96fe30d Merge branch 'main' into 'riding-behaviour-additions-01'
# Conflicts:
#   common/src/main/kotlin/com/cobblemon/mod/common/api/riding/behaviour/types/GliderAirBehaviour.kt
2025-04-25 09:34:23 -05:00
JacksonB 565667aa1c Address MR comments 2025-04-25 09:29:17 -05:00
JacksonB 313e9dadb6 Add soundOcclusion, doppler effect, and custom non linear sound attenuation. 2025-04-25 09:05:43 -05:00
Polymeta 3955283425 Merge branch 'treeafying-saccharine' into 'main'
Tree-afying the Saccharine Tree to reflect vanilla tree behaviour

See merge request cable-mc/cobblemon!1631
2025-04-25 12:50:31 +00:00
AramandPolymeta beee02033c Tree-afying the Saccharine Tree to reflect vanilla tree behaviour 2025-04-25 12:50:30 +00:00
Paul e2db59c837 Oop fixed zone influences not being packed into contexts 2025-04-25 18:10:54 +10:00
dhi_holo 10bf69a79b Minor Ball Recipe Tweaks
Just cleans up three recipes
2025-04-25 17:11:16 +10:00
dhi_holo 172293c813 Merge branch 'main' into fossilized-improvement 2025-04-25 17:08:43 +10:00
dhi_holo 9bb653b8b7 Update resurrect_galar_fossil.json
should match upcoming clean up
2025-04-25 17:08:28 +10:00
Paul 7d06f1e2cd Major spawning revamp with herds and rapid spawning and refactored spawn terms 2025-04-25 14:39:33 +10:00
YasitoandWeblate 397c2decbf Translated using Weblate (French)
Currently translated at 67.8% (5772 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-04-25 04:29:11 +00:00
Felipe Bermudes OrmeñoandWeblate 12b6e7e49c Translated using Weblate (Spanish (Mexico))
Currently translated at 24.6% (2098 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/es_MX/
2025-04-25 04:29:10 +00:00
YasitoandWeblate 242c1b01af Translated using Weblate (French (Canada))
Currently translated at 69.4% (5906 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-04-25 04:29:09 +00:00
FrankTheFarmer 7b992802ce Metang model updated with locators 2025-04-25 14:00:22 +10:00
FrankTheFarmer ba12ed5f98 Beldum model updated with locators 2025-04-25 14:00:12 +10:00
FrankTheFarmer 56f68ff0a9 Merge branch 'main' into implement_pokemon 2025-04-25 11:12:58 +10:00
FrankTheFarmer e7d27686e8 Logged Changes 2025-04-25 11:12:27 +10:00
FrankTheFarmer 3592ef4150 Magneton remodel 🧲⚪⚪⚪🧲 2025-04-25 11:10:28 +10:00
FrankTheFarmer dd76a16e08 Magnemite remodel 🧲⚪🧲 2025-04-25 11:08:27 +10:00
Paul 74d2f4f700 Minor changelog and consistency 2025-04-25 10:52:57 +10:00
Paul 6ed4504273 Removed debug logging line in PokemonAdultSensor 2025-04-25 10:48:33 +10:00
Paul 8ee6799653 Fixed being unable to save behaviours on pokemon using the editor 2025-04-25 10:46:16 +10:00
Paul 96cbc4eca6 Merge corrections and replaced string types with resource locations for taskconfig and behaviourconfig 2025-04-25 10:34:04 +10:00
Paul ad24e529f5 Merge remote-tracking branch 'origin/main' into smarterer-pokemons
# Conflicts:
#	common/src/main/kotlin/com/cobblemon/mod/common/entity/pokemon/PokemonEntity.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/pokemon/ai/FormPokemonBehaviour.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/pokemon/ai/OmniPathNodeMaker.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/pokemon/ai/PokemonBehaviour.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/pokemon/ai/SwimBehaviour.kt
#	common/src/main/resources/cobblemon-common.accesswidener
2025-04-25 09:36:45 +10:00
Polymeta 86902b69e1 fix duplicate mixin entry and server error when unlocking wallpapers
Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-04-25 00:29:24 +01:00
FrankTheFarmer f882c89485 Merge branch 'main' into implement_pokemon 2025-04-25 09:18:51 +10:00
JPAK 2ac102a3b6 Fix issue with pivot offset & update licenses. 2025-04-24 16:23:04 -05:00
Polymeta a54ff5f0a7 Merge branch 'fix-server-crash' into 'main'
Move client code in PlayerMixin to LocalPlayerMixin to fix crash.

See merge request cable-mc/cobblemon!1632
2025-04-24 19:53:36 +00:00
JPAK edc5ae741c Move large amounts of render code from CameraMixin to new MountedCameraRenderer.kt 2025-04-24 14:50:29 -05:00
JPAK 70bed4f299 Move client code in PlayerMixin to LocalPlayerMixin to fix crash. 2025-04-24 14:10:41 -05:00
Polymeta e24b20546d Merge branch 'first_person_poser' into 'main'
Add poser option to offset first person camera while riding. This is in...

See merge request cable-mc/cobblemon!1600
2025-04-24 11:54:47 +00:00
Polymeta eb071d4d01 Merge branch 'we_are_cooking_now' into 'main'
Cooking

See merge request cable-mc/cobblemon!1535
2025-04-24 11:42:56 +00:00
FrankTheFarmer 06a989df5e Oh no i forgot the changelog 2025-04-24 21:15:02 +10:00
FrankTheFarmer def77d197f Bouffalant Remodel 🟫 2025-04-24 21:13:25 +10:00
FrankTheFarmer 382b740505 💖Heatmor✨ Remodel 😹👉🐜🚫 2025-04-24 21:12:44 +10:00
Polymeta 625a31e7e8 fix another server-side error
Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-04-24 11:41:52 +01:00
Polymeta 2b14931709 licenses
Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-04-24 11:15:32 +01:00
Polymeta 2c32b50182 fix server crash and small cleanup
Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-04-24 11:12:41 +01:00
Plastered_Crab b5230a8d3c Merge with main and register IncenseSweetProspector 2025-04-23 16:39:14 -07:00
Plastered_Crab 5ff3d163c0 Merge branch 'main' into we_are_cooking_now
# Conflicts:
#	common/src/main/kotlin/com/cobblemon/mod/common/entity/pokemon/PokemonEntity.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/net/messages/client/spawn/SpawnPokemonPacket.kt
#	common/src/main/resources/mixins.cobblemon-common.json
2025-04-23 16:06:41 -07:00
Plastered_Crab 82e6e01978 Add Sweet Incense to the POI system and add Prospector and Influence 2025-04-23 16:01:10 -07:00
JPAK a6b5f2d64c Add thirdPersonPivotOffset to posers. Meant to be the player's location relative to the base of the pokemon when the pokemon's center is too far from the player. 2025-04-23 14:44:48 -05:00
JPAK 6408b60dde Merge branch 'main' into riding-render-and-stuff 2025-04-23 13:59:56 -05:00
FrankTheFarmer 7a65ec3602 Frog on da changelog 2025-04-23 20:42:31 +10:00
FrankTheFarmer 57abb2b020 Finally added Toxicroak 🐸 2025-04-23 20:40:53 +10:00
FrankTheFarmer 4decbe421b Small portrait tweak for croagunk 2025-04-23 20:29:24 +10:00
Landon Wills a7b55e5d03 Add submarine behaviour 2025-04-23 05:47:56 -04:00
Landon Wills 28db655376 Fix issues with third person camera offsets 2025-04-23 05:47:40 -04:00
Landon Wills 006736cd71 Refactor behaviour names, hook up max up step to riding controller 2025-04-23 03:09:57 -04:00
FrankTheFarmer e7746e2fa4 Realigned croagunk posers 2025-04-23 15:38:18 +10:00
FrankTheFarmer 862dc0176c Removed isBattle condition in croagunk poser 2025-04-23 15:34:19 +10:00
JacksonB 1d171268ed Behaviours can specify a looping ride sound and control its volume and pitch dynamically. Still need to allow multiple sound instances and also clean up my wip code 2025-04-23 00:34:13 -05:00
FrankTheFarmer 7123d40084 Specified missing rootbone in croagunk's poser 2025-04-23 15:32:35 +10:00
FrankTheFarmer cd21e0faf8 Fixed broken charizard sleep animation data 2025-04-23 14:41:45 +10:00
FrankTheFarmer 26586599a7 Added custom placeholder walk to Ursaluna 2025-04-23 13:09:21 +10:00
MoeBoy76 2f4bdb336b advancement cleanup 2025-04-23 10:10:57 +10:00
QriviateA d153dd49b7 Added Gothitelle 🎀 2025-04-22 20:18:04 +01:00
QriviateA 6e3cc5054a Added Gothorita 🎀 2025-04-22 20:17:45 +01:00
QriviateA c06969815a Added Gothita 🎀 2025-04-22 20:17:32 +01:00
QriviateA 502bd38aa7 Added Purugly 😼 2025-04-22 20:16:50 +01:00
QriviateA 11071eb44a Added Glameow 😼 2025-04-22 20:16:15 +01:00
QriviateA dd6ca6c803 Added Cyclizar 🚲 2025-04-22 20:15:07 +01:00
QriviateA 3ebba90f98 Updated Changelog 2025-04-22 20:12:56 +01:00
Landon Wills f240dc1963 Prevent auto step for boat behaviour 2025-04-22 10:46:20 -04:00
Polymeta b6308e6c6c rideable pokemon are also allowed to turn their heads if no one is actually riding them
Closes #1530

Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-04-22 15:28:54 +01:00
Landon Wills 535c5f2e67 Rename to boat behaviour 2025-04-22 09:55:39 -04:00
Landon Wills 8b209e081b Hook up skill and stamina 2025-04-22 09:29:26 -04:00
Landon Wills f7f276ecfb Clean things up, add acceleration logic 2025-04-22 08:37:32 -04:00
FrankTheFarmer 889ace7632 Merge branch 'main' into implement_pokemon 2025-04-22 19:16:07 +10:00
Felipe Bermudes OrmeñoandWeblate ee76e19b85 Translated using Weblate (Spanish (Mexico))
Currently translated at 23.7% (2017 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/es_MX/
2025-04-22 09:14:36 +00:00
YasitoandWeblate 2aac6cc9e7 Translated using Weblate (French)
Currently translated at 67.6% (5754 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-04-22 09:14:35 +00:00
YasitoandWeblate 3faa305f09 Translated using Weblate (French (Canada))
Currently translated at 59.0% (5026 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-04-22 09:14:34 +00:00
CeeJay da7dbeaaec add check for player dimension 2025-04-22 00:26:37 -04:00
YasitoandWeblate d1bbf5f079 Translated using Weblate (French)
Currently translated at 67.1% (5715 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-04-21 23:59:12 +00:00
YasitoandWeblate 52fa646420 Translated using Weblate (French (Canada))
Currently translated at 56.5% (4813 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-04-21 23:59:11 +00:00
Apion 84a0ceb7e1 Remove flashback dep (again) 2025-04-21 17:45:05 -04:00
Apion ccde7ffbb1 Merge branch 'main' into flashback-compat 2025-04-21 17:41:35 -04:00
apionandApion 4e79ed9f7e Remove flashback dep 2025-04-21 17:41:09 -04:00
Alexis SalgueiroandWeblate f7c47d46cf Translated using Weblate (French)
Currently translated at 66.5% (5658 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-04-21 14:21:10 +00:00
YasitoandWeblate e82c361bcb Translated using Weblate (French)
Currently translated at 66.5% (5658 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-04-21 14:21:10 +00:00
TeggyandWeblate fa6d8e0f08 Translated using Weblate (Spanish)
Currently translated at 72.5% (6168 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/es/
2025-04-21 14:21:06 +00:00
阿鱼andWeblate 7eea6c8b49 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 66.3% (5643 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-04-21 14:21:03 +00:00
YasitoandWeblate c537ca438b Translated using Weblate (French (Canada))
Currently translated at 55.4% (4720 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr_CA/
2025-04-21 14:21:01 +00:00
washashu0905andWeblate d5cea9b9ad Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 53.1% (4518 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hant/
2025-04-21 14:20:57 +00:00
321retrogamer dea2ad4b12 𝕿𝖍𝖊 𝕲𝖗𝖊𝖆𝖙 𝕻𝖆𝖗𝖙𝖎𝖈𝖑𝖊 𝕽𝖊𝖔𝖗𝖌 𝖔𝖋 2025
Completely reworks particle texture pathways and alters particles to direct to those pathways. All existing 1.6.1 particles (as well as the new Protect activation particles, which are also here) have been altered to fit this reorganization effort.

All particle textures have also been renamed to match the guidelines of the reorg, as they are now seen in the assets repo.
2025-04-20 23:28:39 -05:00
JacksonB ecefea005d Merge branch 'main' into riding-behaviour-additions-01 2025-04-20 23:13:46 -05:00
JacksonB 4c787f547c Bird is finally feeling how it was always meant to feel!! 2025-04-20 22:27:36 -05:00
JacksonB f0755cc73f Merge branch 'riding-debug-ui' into riding-behaviour-additions-01 2025-04-20 22:27:04 -05:00
Hiroku e215d751c4 Merge branch 'ouch_fire_blocks' into 'main'
Floating Pokemon really float, and Fire Immunity attribute

See merge request cable-mc/cobblemon!1612
2025-04-21 02:05:29 +00:00
CeejayandHiroku aac4669ec1 Floating Pokemon really float, and Fire Immunity attribute 2025-04-21 02:05:28 +00:00
Landon 7b0b41d192 Merge branch 'riding-debug-ui' into 'main'
Riding Debug UI

See merge request cable-mc/cobblemon!1623
2025-04-21 01:33:18 +00:00
JacksonB 7e38fefa14 various controller tweaks 2025-04-20 17:00:21 -05:00
dhi_holo fc0cd0dac4 improvement phase 1
new advancement to trigger when reviving galar hybrid fossils, to help inform players of the combinations needed for it
It doesn't work yet, as the conditions don't actually exist, but I'm just making a commit for it to complain using
2025-04-21 07:46:41 +10:00
plastered_crab c1491daf63 Placing honey on Saccharine Logs now gives higher chance of Hidden Abilities nearby 2025-04-20 11:09:58 -07:00
Polymeta 068b55be7b Merge branch 'josh/dynamic-light-integration' into 'main'
Josh/dynamic light integration

See merge request cable-mc/cobblemon!1621
2025-04-20 13:52:34 +00:00
JoshandPolymeta 3f6bd52d43 Josh/dynamic light integration 2025-04-20 13:52:34 +00:00
Landon Wills 019245472f Add riding stat calcs for jump and speed, some experimenting with fov 2025-04-20 07:55:14 -04:00
Landon Wills cefb502f10 Prevent 360 look on boat controller, add jump, add momentum logic when transitioning from forward/backwards input 2025-04-20 07:11:37 -04:00
Polymeta 4ca3f25ab2 Merge branch 'translucent-culling' into 'main'
Translucent Culling Parameter

See merge request cable-mc/cobblemon!1606
2025-04-20 09:47:02 +00:00
GertimoshkaandPolymeta 70e81f1cbe Translucent Culling Parameter 2025-04-20 09:47:02 +00:00
Polymeta df8abf4ddb Merge branch 'josh/left-handed-item-fix' into 'main'
Item position adjustment to perfectly line up hand-held items

See merge request cable-mc/cobblemon!1610
2025-04-20 09:46:28 +00:00
JoshandPolymeta 26dd0b9d42 Item position adjustment to perfectly line up hand-held items 2025-04-20 09:46:28 +00:00
plastered_crab 307d8bad1d Added new Honey Log and Lure Cakes can have more bites 2025-04-20 00:16:07 -07:00
Landon Wills 866332e62c Remove composite logic from debug gui 2025-04-19 23:17:59 -04:00
Landon Wills c54466f6b1 Merge branch 'refs/heads/main' into riding-debug-ui 2025-04-19 23:14:18 -04:00
Landon Wills ee5e4d33b2 Fix merge issues 2025-04-19 23:14:08 -04:00
Landon Wills 0fd954ffa5 Merge branch 'refs/heads/riding-debug-ui' into water-mount-behaviours 2025-04-19 23:10:49 -04:00
Landon Wills 60d3d737f9 Merge branch 'refs/heads/main' into water-mount-behaviours 2025-04-19 23:10:36 -04:00
Landon Wills fb570404c0 Update licenses 2025-04-19 22:29:34 -04:00
Landon Wills d22602dac5 Update visibility of debug variables 2025-04-19 22:26:27 -04:00
Aram 63da8fed2d Removed the Sweet Sap item 2025-04-20 02:42:43 +02:00
Paul 2f16ba5470 Don't play quirks in battle GUI 2025-04-20 08:53:39 +10:00
Aram af36d4a365 Saccharine Log now has code for when you use items on it 2025-04-20 00:52:58 +02:00
Aram d153ec155b Beehive only generates in Saccharine tree if theres a flower when it grows up 2025-04-20 00:31:59 +02:00
Aram 7ca7cc089a Removed the Age in the Saccharine Stripped Log 2025-04-19 23:36:48 +02:00
TeggyandWeblate 6c2494b7ab Translated using Weblate (Spanish)
Currently translated at 68.2% (5806 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/es/
2025-04-19 19:31:37 +00:00
Landon cbdfbc9745 Merge branch 'pc-box-name-limit' into 'main'
Adds name character length restriction to PC box name.

See merge request cable-mc/cobblemon!1620
2025-04-19 11:28:15 +00:00
Hiroku ac210e027b Merge branch 'windows-12' into 'main'
more pc stat displays

See merge request cable-mc/cobblemon!1617
2025-04-19 11:04:57 +00:00
TestandHiroku 1fc91a794f more pc stat displays 2025-04-19 11:04:57 +00:00
Landon f78b289171 Merge branch 'riding-dismount' into 'main'
Created the Pokemon Dismount Logic

See merge request cable-mc/cobblemon!1613
2025-04-19 10:47:16 +00:00
AramandLandon c46461c843 Created the Pokemon Dismount Logic 2025-04-19 10:47:16 +00:00
Deltric 386a897295 Adds name character length restriction to PC box name. 2025-04-19 05:46:22 -05:00
Hiroku 8328f741d8 Merge branch 'spawn-pool-observable' into 'main'
Observable in SpawnPool was not emitted on reload.

See merge request cable-mc/cobblemon!1618
2025-04-19 09:07:56 +00:00
Deltric 2b19943416 Observable in SpawnPool was not emitted on reload. 2025-04-19 03:30:50 -05:00
Fiestorra ISVandWeblate a5ab523ac1 Translated using Weblate (Spanish)
Currently translated at 66.6% (5672 of 8505 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/es/
2025-04-19 06:05:19 +00:00
Paul 7dd38bf043 Ratified dialogue gibberish with cool toys 2025-04-19 14:29:47 +10:00
Test 4caba2fbeb gibber sounds 2025-04-19 03:58:20 +00:00
Konoha bd493a147c Merge remote-tracking branch 'origin/implement_pokemon' into implement_pokemon 2025-04-18 20:39:14 -04:00
Konoha 1e4665d600 Toxel Low Key evolution fix
Distinguishes the evolution ids for Toxel to the Low Key form Toxtricity so that natures other than Lonely can function.
2025-04-18 20:38:54 -04:00
plastered_crab 5239de2cea Merge branch 'refs/heads/we_are_cooking_now(Seasoning-Bait-Testing)' into we_are_cooking_now 2025-04-18 17:13:13 -07:00
Weblate 847ae12ad5 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-04-18 21:50:21 +00:00
TeggyandWeblate cece9e051b Translated using Weblate (Spanish)
Currently translated at 98.9% (6948 of 7021 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/es/
2025-04-18 21:50:21 +00:00
Fiestorra ISVandWeblate 02141ccd3e Translated using Weblate (Spanish)
Currently translated at 98.9% (6948 of 7021 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/es/
2025-04-18 21:50:21 +00:00
MiaandWeblate 1dc3acc47d Translated using Weblate (German)
Currently translated at 87.2% (6124 of 7021 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/de/
2025-04-18 21:50:21 +00:00
JacksonB 296355f744 Ride stat reversions 2025-04-18 12:04:38 -05:00
JacksonB e9d9a109c0 Squashed commit of the following:
commit 8960c6dddc
Author: Landon Wills <landonjwdev@gmail.com>
Date:   Fri Apr 18 03:11:19 2025 -0400

    Fix issue with ride stat calc

commit bc1f9f8cb4
Author: Landon Wills <landonjwdev@gmail.com>
Date:   Fri Apr 18 02:54:42 2025 -0400

    Add riding debug UI
2025-04-18 10:49:50 -05:00
JacksonB 8a3789fc35 Merge branch 'main' into riding-behaviour-additions-01 2025-04-18 10:45:36 -05:00
JacksonB 05fd7bec36 Line up land walk with animation walk speed 2025-04-18 10:36:21 -05:00
Paul e6b1529f27 Gradual reveal of text while gibbering 2025-04-18 22:16:53 +10:00
Paul 550b99be36 Merge remote-tracking branch 'origin/main' into lang-updates 2025-04-18 22:01:33 +10:00
Landon Wills a42ba8de43 Make dialogues play gibberish as a NPC POC 2025-04-18 06:07:18 -04:00
FrankTheFarmer 03374c5c78 Merge branch 'main' into implement_pokemon 2025-04-18 20:04:52 +10:00
FrankTheFarmer 594eca13d3 Changelogs 2025-04-18 20:03:43 +10:00
FrankTheFarmer bf1bdc2475 Ursaluna remodel 🐻 2025-04-18 20:02:53 +10:00
FrankTheFarmer 6f6f9b088e Ursaring remodel, locators, and temp animations i stole from charizard 2025-04-18 19:40:03 +10:00
Paul 078c961090 Removed unused stuff, changelog 2025-04-18 18:58:18 +10:00
Landon Wills 8960c6dddc Fix issue with ride stat calc 2025-04-18 03:11:19 -04:00
Polymeta bfbee7b1d7 Merge branch 'loot-fix' into 'main'
Improved parity with vanilla mobs' drop behavior

See merge request cable-mc/cobblemon!1576
2025-04-18 07:02:45 +00:00
Landon Wills bc1f9f8cb4 Add riding debug UI 2025-04-18 02:54:42 -04:00
FrankTheFarmer 2bbc00022b Teddiursa remodel and locators 🧸 2025-04-18 16:47:03 +10:00
Paul 676342348a Renames in documentation 2025-04-18 16:02:14 +10:00
Paul 97442cb880 More refactoring 2025-04-18 15:54:36 +10:00
Paul 478804f652 en_gb has behaviour 2025-04-18 15:44:25 +10:00
Paul 55dc5c6760 Major rename brain preset -> behaviour, added behaviour for player textured NPCs 2025-04-18 15:41:22 +10:00
Test f5d71390dd Merge branch 'dex-zoom' into 'main'
A few dex scanner fixes/improvements, closes #1328

Closes #1328

See merge request cable-mc/cobblemon!1608
2025-04-18 05:06:31 +00:00
CraterandTest 6ff5d3df06 A few dex scanner fixes/improvements, closes #1328 2025-04-18 05:06:30 +00:00
gruxor 988766894a Review resolutions 2025-04-18 00:08:43 -04:00
Paul 0d3b89828a Conflicts and also randomly fixed moonstone dripstone interactions 2025-04-18 11:02:26 +10:00
Paul fab1bc6f80 Merge remote-tracking branch 'origin/main' into smarterer-pokemons
# Conflicts:
#	common/src/main/kotlin/com/cobblemon/mod/common/entity/pokemon/PokemonEntity.kt
#	common/src/main/resources/assets/cobblemon/lang/en_us.json
#	common/src/main/resources/mixins.cobblemon-common.json
2025-04-18 10:47:06 +10:00
Paul 6b4ff0ac84 Migrated NPCEntity to the omni path navigator 2025-04-18 10:45:00 +10:00
Polymeta 34805ea496 oop typo - allow dragon breath to be used in a restoration tank
Closes #1539

Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-04-18 00:25:39 +01:00
Polymeta b670d44e21 reorder delegate molang functions to be added first so they are overridden by more specific functions
Also allow PoseableState sound molang to play without an entity present (in UIs)

Closes #1529

Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-04-18 00:08:59 +01:00
Polymeta 159905eb3b Merge branch 'josh/left-handed-item-fix' into 'main'
Corrected item rotation for left hand display context

See merge request cable-mc/cobblemon!1609
2025-04-17 20:32:11 +00:00
Josh c10213480b Flip rotations when display context is left hand 2025-04-17 15:22:11 -04:00
gruxor 3d5a365a6e Added a configuration option for drops' behavior upon Pokémon death 2025-04-17 14:06:33 -04:00
gruxor 4b64b4307a Changelog update 2025-04-17 14:04:16 -04:00
gruxor 382f741db8 Improved parity with vanilla mobs' drop behavior 2025-04-17 14:04:16 -04:00
Paul 193daed8ff Lots more polishing of brain AI stuff, undo functionality in brain presets, NPC party functions (not what you think) 2025-04-17 22:00:57 +10:00
TeggyandWeblate 6d62d911d6 Translated using Weblate (Spanish)
Currently translated at 96.6% (6787 of 7021 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/es/
2025-04-17 11:38:28 +00:00
Sterrezo 14f4e04a86 Added animation sounds to Pidgey, Pidgeotto and Golbat 2025-04-17 13:36:53 +02:00
Sterrezo 944d342d36 Updated Ceruledge's cries 2025-04-17 12:33:59 +02:00
Alexis SalgueiroandWeblate a1d40084c5 Translated using Weblate (French)
Currently translated at 92.2% (6479 of 7021 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-04-17 04:04:45 +00:00
TeggyandWeblate 8b1b63e110 Translated using Weblate (Spanish)
Currently translated at 96.4% (6775 of 7021 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/es/
2025-04-17 04:04:44 +00:00
FrankTheFarmer 638524f7f7 Changelog moment 2025-04-17 13:57:37 +10:00
FrankTheFarmer 47750e894b Noctowl model updated with open and closed wings🦉 2025-04-17 13:56:22 +10:00
FrankTheFarmer 9e31d8e1e1 Hoothoot model update 🦉 2025-04-17 13:55:55 +10:00
FrankTheFarmer 59d8adc48d Merge branch 'main' into implement_pokemon 2025-04-17 13:55:06 +10:00
JacksonB a7956531ff Forgot this 2025-04-16 18:04:54 -05:00
JacksonB 4b0919223b rideAltPose now returns a ResourceLocation for unique pose control. Update molang function naming issues. Add transformToTick field in poser jsons so that a pose can specify the transformTick of any pose transitioning to the given one. 2025-04-16 18:03:10 -05:00
QriviateA f4ab23c167 Merge remote-tracking branch 'origin/implement_pokemon' into implement_pokemon 2025-04-16 21:28:50 +01:00
QriviateA b7a8582ae8 Updated Wailmer anims 2025-04-16 21:28:26 +01:00
QriviateA b68910897c Updated Stonjourner texture + anims 2025-04-16 21:28:10 +01:00
QriviateA 7204ea828f Updated Lechonk line anims 2025-04-16 21:26:52 +01:00
QriviateA 0a4a71123c Updated Gossifleur line anims 2025-04-16 21:25:57 +01:00
QriviateA ec385b9963 Updated Changelog 2025-04-16 21:24:49 +01:00
TeggyandWeblate 9e2e95e287 Translated using Weblate (Spanish)
Currently translated at 96.0% (6744 of 7021 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/es/
2025-04-16 09:42:42 +00:00
Konoha 1d40d424d0 Update changelog 2025-04-15 10:31:32 -04:00
Konoha 938721c0bb Merge branch 'implement_pokemon' into legacy_and_event_moves 2025-04-15 09:11:50 -04:00
TeggyandWeblate 6694680c50 Translated using Weblate (Spanish)
Currently translated at 95.9% (6735 of 7021 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/es/
2025-04-15 05:11:49 +00:00
FrankTheFarmer 8aa37fda9d Merge branch 'main' into implement_pokemon 2025-04-15 13:40:25 +10:00
Konoha 52533236ca Merge branch 'implement_pokemon' into legacy_and_event_moves 2025-04-14 07:56:05 -04:00
TeggyandWeblate 8cafce0a4a Translated using Weblate (Spanish)
Currently translated at 95.7% (6724 of 7021 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/es/
2025-04-14 10:33:04 +00:00
Watuneni iteiteandWeblate de271f81b1 Translated using Weblate (Japanese)
Currently translated at 76.4% (5365 of 7021 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-04-14 06:50:20 +00:00
TeggyandWeblate feb78c5c58 Translated using Weblate (Spanish)
Currently translated at 95.3% (6698 of 7021 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/es/
2025-04-14 06:50:19 +00:00
JacksonB 8aedac3474 More gyarados tests 2025-04-14 00:05:25 -05:00
Landon Wills 1caf963323 Start implementing boat behaviour 2025-04-14 00:43:47 -04:00
Landon Wills bb94f872a9 Fix player shrinking when riding pokemon that's getting retrieved to pokeball 2025-04-13 21:44:06 -04:00
JacksonB ca133a20c0 Jet input decay, new wip behaviour, gyarados ride body tests. 2025-04-13 17:57:06 -05:00
JPAK acc601d414 Add poser option to offset first person camera while riding. This is in addition to the locator and shouldn't need to be used often. 2025-04-12 17:12:20 -05:00
Paul 628c8f6093 Added custom_script brain config, improved NPC wandering (imperfect still) 2025-04-12 22:15:05 +10:00
MiaandWeblate e5d052a6bf Translated using Weblate (German)
Currently translated at 86.7% (6090 of 7021 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/de/
2025-04-12 10:41:09 +00:00
Paul eac0f209ce Fixed singleplayer having blank brain presets for NPCs 2025-04-12 16:00:10 +10:00
Paul 9ac0fc1b36 Fixed brain stuff not restoring after reloads, fixed NPCs not being able to wander 2025-04-12 15:59:58 +10:00
Hiroku 2e05b25061 Merge branch 'main' into 'no-rolling'
# Conflicts:
#   common/src/main/java/com/cobblemon/mod/common/mixin/client/CameraMixin.java
2025-04-12 02:01:46 +00:00
Paul 60fc0c1959 Implemented invisible brain presets, fixed type conditions on brain presets, reworked how base pokemon brain presets are implemented and how addons can add more 2025-04-11 22:02:53 +10:00
Paul 1cd112ac74 Behaviour options list should show description on hover, not name 2025-04-11 16:09:31 +10:00
Paul 4fe54d3dba I demand you compile x2 2025-04-11 12:30:12 +10:00
Paul cb11c2b964 Merge remote-tracking branch 'origin/main' into smarterer-pokemons
# Conflicts:
#	common/src/main/kotlin/com/cobblemon/mod/common/entity/pokemon/PokemonEntity.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/entity/pokemon/PokemonServerDelegate.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/pokemon/Pokemon.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/util/EntityExtensions.kt
2025-04-11 12:19:14 +10:00
Paul cf9d794fe1 I demand you compile 2025-04-11 11:57:23 +10:00
Paul 14a3e7afb1 Merge remote-tracking branch 'origin/main' into we_are_cooking_now
# Conflicts:
#	common/src/main/kotlin/com/cobblemon/mod/common/CobblemonItems.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/CobblemonNetwork.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/api/riding/RidingManager.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/client/render/models/blockbench/PosableState.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/entity/pokemon/PokemonEntity.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/net/messages/client/spawn/SpawnPokemonPacket.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/pokemon/riding/controllers/GliderAirController.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/pokemon/riding/controllers/VehicleLandController.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/util/DataKeys.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/util/codec/internal/ClientPokemonP3.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/util/codec/internal/PokemonP3.kt
#	common/src/main/resources/mixins.cobblemon-common.json
2025-04-11 10:08:28 +10:00
JPAK 8aeb7a43c8 Option to disable rolling is now functional. I would not use this on anything and do flips as the camera does not handle it well.
Also fixed issue where camera Forward and Left would be improperly set in third person reverse.
2025-04-09 22:52:00 -05:00
TeggyandWeblate 0ea4641536 Translated using Weblate (Spanish)
Currently translated at 95.3% (6696 of 7021 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/es/
2025-04-08 10:41:46 +00:00
Paul cd575e6b7d Lil conflict resolution stuff it's ok relax chill 2025-04-06 14:32:30 +10:00
Paul 39dbf78ed2 Merge remote-tracking branch 'origin/main' into smarterer-pokemons
# Conflicts:
#	common/src/main/kotlin/com/cobblemon/mod/common/CobblemonCommands.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/CobblemonNetwork.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/api/molang/MoLangFunctions.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/api/riding/RidingManager.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/client/render/models/blockbench/PosableModel.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/entity/pokemon/PokemonEntity.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/entity/pokemon/PokemonServerDelegate.kt
2025-04-06 14:20:42 +10:00
plastered_crab 4de32b8bf4 Tweak rarity bucket calculating 2025-04-05 21:19:40 -07:00
plastered_crab 9d6447af9a Rarity bucket bait effect combines with Luck of the Sea 2025-04-05 20:39:17 -07:00
plastered_crab 7eb5f93595 Added bait effects for enchanted gold apple, gold carrot, and glistening melon slice 2025-04-05 12:47:20 -07:00
plastered_crab 3b54fa488e Added bait effects for enchanted gold apple, gold carrot, and glistening melon slice 2025-04-05 12:43:05 -07:00
plastered_crab 69e9cb3f22 Tweaks to the Rarity Bucket effect on Gapple item 2025-04-05 12:31:33 -07:00
plastered_crab 4eb268c4af More tweaks to the rarity bucket effect 2025-04-05 12:23:02 -07:00
plastered_crab 909b5b7f7f Alter Rarity Bucket Effects and block merging of rarity bucket effects 2025-04-05 12:01:30 -07:00
plastered_crab e2c28ab5a0 Merge branch 'refs/heads/we_are_cooking_now' into we_are_cooking_now(Seasoning-Bait-Testing)
# Conflicts:
#	common/src/main/kotlin/com/cobblemon/mod/common/api/spawning/influence/SpawnBaitInfluence.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/client/tooltips/FishingBaitTooltipGenerator.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/item/crafting/BaitSeasoningProcessor.kt
2025-04-05 11:09:08 -07:00
plastered_crab 890d0a2099 New Rarity Bucket bait effect can cooked into Lures/Bait + tooltips 2025-04-05 01:58:13 -07:00
plastered_crab 74075e6be9 Merge remote-tracking branch 'origin/we_are_cooking_now(Seasoning-Bait-Testing)' into we_are_cooking_now(Seasoning-Bait-Testing)
# Conflicts:
#	common/src/main/kotlin/com/cobblemon/mod/common/api/spawning/spawner/TickingSpawner.kt
2025-04-05 00:45:17 -07:00
plastered_crab b8ae6aa889 Ground work for testing a new bait type that can affect rarity of spawn buckets 2025-04-05 00:43:23 -07:00
plastered_crab a499e8593a Cooking now combines similar bait effects, letting you make some effects more powerful 2025-04-04 22:10:42 -07:00
Plastered_Crab 08633c223e Example code for combining similar bait effects. Needs review if we want to do this. 2025-04-04 15:50:56 -07:00
Test 7806503ea7 behavio(u)r screen 2025-04-03 21:06:59 -04:00
TeggyandWeblate bc4699e354 Translated using Weblate (Spanish)
Currently translated at 95.1% (6683 of 7021 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/es/
2025-04-02 11:09:46 +00:00
Plastered_Crab c50b149e83 Add some notes to TickingSpawner to where we might want to alter rarity buckets if we added an effect for that 2025-04-01 16:19:53 -07:00
Plastered_Crab 63252f4d35 Swap placeholder sugar Seasoning Item with Golden Apple 2025-04-01 15:10:42 -07:00
Plastered_Crab 1c024f881e Swap placeholder sugar Seasoning Item with Golden Apple 2025-04-01 14:49:57 -07:00
Plastered_Crab 93f0337399 Got Seasoning-only Bait effects working 2025-04-01 14:44:33 -07:00
Plastered_Crab 7e8fb07f55 Clean up doo doo commented out code 2025-04-01 12:13:53 -07:00
Plastered_Crab 7a8856c34c Fix Poke Bait fishing bait losing their Component data upon getting a bite 2025-04-01 12:12:19 -07:00
Guilherme Pereira 63d516953a fix cakes not loading additional data upon reentering the world 2025-04-01 10:33:14 -03:00
Konoha d560918b55 Merge branch 'main' into legacy_and_event_moves
# Conflicts:
#	common/src/main/resources/data/cobblemon/species/generation1/farfetchd.json
#	common/src/main/resources/data/cobblemon/species/generation7/oricorio.json
#	common/src/main/resources/data/cobblemon/species/generation8/sirfetchd.json
2025-04-01 08:05:27 -04:00
plastered_crab 07faf6600f Just some testing with some Seasoning-Only bait effects items (items that can't go on rod but can cook for bait effects) 2025-04-01 01:56:01 -07:00
Plastered_Crab 08e79d71bf Added in code to trigger bites on a Lure Cake if it's effects are used to spawn something 2025-03-31 17:11:14 -07:00
TeggyandWeblate 9270119675 Translated using Weblate (Spanish)
Currently translated at 95.1% (6682 of 7021 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/es/
2025-03-31 15:23:52 +00:00
TeggyandWeblate 0058906022 Translated using Weblate (Spanish)
Currently translated at 95.1% (6678 of 7021 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/es/
2025-03-31 00:16:23 +00:00
plastered_crab 6c836663f4 Cakes now get bites taken out of them when their influence gets used for spawning 2025-03-29 18:24:03 -07:00
Guilherme Pereira eeae26492e Merge branch 'we_are_cooking_now' into candle-cake 2025-03-28 07:25:47 -03:00
Guilherme Pereira 9e67a82816 Merge branch 'we_are_cooking_now' into cooking-pot-jei 2025-03-28 06:56:21 -03:00
Guilherme Pereira c09295231c remove dead code and print statements 2025-03-28 06:19:03 -03:00
Guilherme Pereira 6c7d61c9f2 prevent cooking pot cooked items stacking above their stack limit 2025-03-28 06:12:55 -03:00
Guilherme Pereira 01f8a5c6d7 fix some cooking pot crashes 2025-03-28 06:12:15 -03:00
KyoandWeblate 14d2a76211 Translated using Weblate (Vietnamese)
Currently translated at 100.0% (7021 of 7021 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/vi/
2025-03-27 12:41:50 +00:00
Watuneni iteiteandWeblate 7669000962 Translated using Weblate (Japanese)
Currently translated at 76.3% (5358 of 7021 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-03-27 12:41:46 +00:00
amo f11f88c71a npc hide logic 2025-03-26 02:07:10 +00:00
Paul 7e4054ad8f Improved land wandering, added path type filtering to pokemon pathing 2025-03-24 16:15:57 +10:00
Paul 9d38ad78bf Merge remote-tracking branch 'origin/main' into smarterer-pokemons
# Conflicts:
#	common/src/main/kotlin/com/cobblemon/mod/common/CobblemonNetwork.kt
2025-03-24 14:20:12 +10:00
Paul b59483e52f Added water avoidance tasks so land pokemon don't mindlessly drown 2025-03-24 08:57:57 +10:00
Paul 2058184da2 Sheep eat grass again 2025-03-22 16:35:08 +10:00
Paul 9c861392f8 Nosepass points at spawn again 2025-03-22 13:48:01 +10:00
Paul d3717fb222 Reimplemented sleeping on trainer beds 2025-03-22 13:17:05 +10:00
TeggyandWeblate 8912911800 Translated using Weblate (Spanish)
Currently translated at 94.3% (6621 of 7021 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/es/
2025-03-22 01:16:22 +00:00
Paul 660be08eea Overhauled cooking and fishing baits, added ride boosts, added aprijuice stat handling, probably added lots of bugs 2025-03-21 14:28:22 +10:00
阿鱼andWeblate 62ecfaf54a Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 100.0% (7021 of 7021 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-03-20 23:47:02 +00:00
TeggyandWeblate 6684177236 Translated using Weblate (Spanish)
Currently translated at 94.2% (6615 of 7021 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/es/
2025-03-20 23:47:00 +00:00
Watuneni iteiteandWeblate deca5cf55b Translated using Weblate (Japanese)
Currently translated at 76.1% (5350 of 7021 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-03-20 23:46:59 +00:00
Paul 769a9ac845 Merge remote-tracking branch 'origin/we_are_cooking_now' into we_are_cooking_now 2025-03-18 15:11:46 +10:00
阿鱼andWeblate 0f75797759 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 100.0% (7021 of 7021 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-03-17 21:03:49 +00:00
Alexis SalgueiroandWeblate c194aefce5 Translated using Weblate (French)
Currently translated at 91.5% (6425 of 7021 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-03-15 14:17:58 +00:00
Aiser(CCHusky)andWeblate f4798c8783 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 100.0% (7021 of 7021 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-03-15 14:17:57 +00:00
chronicenandWeblate 2178a5f10e Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 100.0% (7021 of 7021 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-03-15 14:17:57 +00:00
Gertimoshka f5e3945cf6 Spawning Influence Prospector can now have 2 methods of providing data 2025-03-15 14:00:03 +02:00
BuildTools bb121cbee7 Made Lure Cakes use Poi System to allow better range of effect 2025-03-15 12:40:39 +02:00
Paul cee9adc782 Merge remote-tracking branch 'origin/main' into we_are_cooking_now
# Conflicts:
#	common/src/main/kotlin/com/cobblemon/mod/common/CobblemonNetwork.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/client/particle/ParticleStorm.kt
2025-03-15 13:37:59 +10:00
TeggyandWeblate bc145a56d5 Translated using Weblate (Spanish)
Currently translated at 93.6% (6575 of 7021 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/es/
2025-03-14 17:00:49 +00:00
Nico MerenqandWeblate 476ef3bb2f Translated using Weblate (Russian)
Currently translated at 73.9% (5189 of 7021 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-03-12 13:19:09 +00:00
Paul 54c7e05c8f Compilation error fix 2025-03-12 14:53:14 +10:00
Paul 7148f9d954 Merge remote-tracking branch 'origin/main' into smarterer-pokemons
# Conflicts:
#	common/src/main/kotlin/com/cobblemon/mod/common/CobblemonCommands.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/api/molang/MoLangFunctions.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/api/permission/CobblemonPermissions.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/pokemon/Pokemon.kt
2025-03-12 13:33:05 +10:00
Alexis SalgueiroandWeblate 460050289b Translated using Weblate (French)
Currently translated at 90.7% (6373 of 7021 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-03-10 15:04:25 +00:00
Paul 3b9a8c8492 Merge remote-tracking branch 'origin/main' into smarterer-pokemons
# Conflicts:
#	common/src/main/kotlin/com/cobblemon/mod/common/entity/pokemon/PokemonEntity.kt
2025-03-10 21:02:50 +10:00
Paul 0a2e9f6530 Removed some unused stuff 2025-03-10 17:37:17 +10:00
Nico MerenqandWeblate 01fd4dcc68 Translated using Weblate (Russian)
Currently translated at 73.8% (5182 of 7021 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-03-09 18:06:58 +00:00
Nico MerenqandWeblate 0392eb3b7e Translated using Weblate (Russian)
Currently translated at 73.6% (5172 of 7021 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-03-09 15:29:58 +00:00
Paul 038a21556e Merge remote-tracking branch 'origin/main' into we_are_cooking_now 2025-03-09 21:01:24 +10:00
阿鱼andWeblate 493f423a2f Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 100.0% (7021 of 7021 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-03-09 10:54:04 +00:00
阿鱼andWeblate cbcfa1bbfb Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 100.0% (7021 of 7021 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-03-09 10:45:17 +00:00
Nico MerenqandWeblate 17a3ff15db Translated using Weblate (Russian)
Currently translated at 73.6% (5171 of 7021 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-03-09 10:30:06 +00:00
阿鱼andWeblate 9c14cccc98 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 99.9% (7017 of 7021 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-03-09 10:30:05 +00:00
Paul 57539775e0 A lot of bait and cake cleanup, implemented world sliced spawning influences and made the lure cake block apply them 2025-03-09 20:08:44 +10:00
Paul eb71a20a19 Merge remote-tracking branch 'origin/main' into we_are_cooking_now
# Conflicts:
#	common/src/main/resources/cobblemon-common.accesswidener
2025-03-09 17:56:20 +10:00
Weblate 850cfbe755 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-03-08 22:51:12 +00:00
TeggyandWeblate 28afa6a9e8 Translated using Weblate (Spanish)
Currently translated at 93.1% (6538 of 7021 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/es/
2025-03-08 22:51:08 +00:00
阿鱼andWeblate 7a76d95ce7 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 98.7% (6936 of 7021 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-03-08 22:51:07 +00:00
TeggyandWeblate 54707d0618 Translated using Weblate (Spanish)
Currently translated at 92.1% (6470 of 7021 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/es/
2025-03-08 15:08:19 +00:00
Aiser(CCHusky)andWeblate 307c400e28 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 98.6% (6929 of 7021 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-03-08 15:08:18 +00:00
阿鱼andWeblate 5c9b3ab25d Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 98.6% (6929 of 7021 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-03-08 15:08:18 +00:00
阿鱼andWeblate 532e991fb2 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 98.1% (6890 of 7021 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-03-08 11:31:35 +00:00
Nico MerenqandWeblate b1bf817329 Translated using Weblate (Russian)
Currently translated at 73.6% (5171 of 7021 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ru/
2025-03-08 11:31:34 +00:00
TeggyandWeblate c091f90487 Translated using Weblate (Spanish)
Currently translated at 91.7% (6445 of 7021 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/es/
2025-03-08 08:23:13 +00:00
阿鱼andWeblate a49d4715ff Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 97.0% (6816 of 7021 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-03-08 08:23:12 +00:00
阿鱼andWeblate 652b15532e Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 96.9% (6807 of 7021 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-03-07 04:18:30 +00:00
TeggyandWeblate e4064897b0 Translated using Weblate (Spanish)
Currently translated at 91.5% (6430 of 7021 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/es/
2025-03-07 04:18:29 +00:00
阿鱼andWeblate f9ca8222da Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 96.7% (6793 of 7021 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-03-06 12:30:15 +00:00
阿鱼andWeblate 67480a945f Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 95.5% (6708 of 7021 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-03-06 06:42:04 +00:00
Alexis SalgueiroandWeblate e6e811e6e6 Translated using Weblate (French)
Currently translated at 90.0% (6320 of 7021 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-03-06 06:41:58 +00:00
Watuneni iteiteandWeblate 4635c531b9 Translated using Weblate (Japanese)
Currently translated at 73.7% (5178 of 7021 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-03-06 06:41:56 +00:00
Watuneni iteiteandWeblate 3bdfac9a46 Translated using Weblate (Japanese)
Currently translated at 71.7% (5039 of 7021 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-03-05 13:53:19 +00:00
chronicenandWeblate 2b7a71cb1c Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 91.4% (6424 of 7021 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-03-05 13:53:19 +00:00
阿鱼andWeblate d47a500a0e Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 91.4% (6424 of 7021 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-03-05 13:53:19 +00:00
Paul b7446fa029 Make add-tasks-to-activity take a list of activities (optionally) 2025-03-05 14:17:09 +10:00
阿鱼andWeblate 33e6dbb4c1 Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 87.4% (6143 of 7021 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/zh_Hans/
2025-03-04 15:50:25 +00:00
Alexis SalgueiroandWeblate 482c57dd2e Translated using Weblate (French)
Currently translated at 89.1% (6259 of 7021 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-03-03 19:14:47 +00:00
Alexis SalgueiroandWeblate 503c62d78d Translated using Weblate (French)
Currently translated at 87.8% (6169 of 7021 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-03-03 09:30:43 +00:00
Seonho LeeandWeblate 708d0ab6d3 Translated using Weblate (Korean)
Currently translated at 70.0% (4915 of 7021 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ko/
2025-03-03 09:30:42 +00:00
Paul 9123cc3a2c Oop nothing to see here 2025-03-03 09:19:44 +10:00
Paul f0dc9be471 Fixes to run_script & add_variables, disable air wandering for now, fixed head turning 2025-03-03 09:12:43 +10:00
Paul 819635f457 Conflicto fixo 2025-03-02 16:07:58 +10:00
Paul d3a2a5827e Merge remote-tracking branch 'origin/main' into smarterer-pokemons
# Conflicts:
#	common/src/main/kotlin/com/cobblemon/mod/common/CobblemonCommands.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/CobblemonNetwork.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/api/pokemon/PokemonSpecies.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/client/render/models/blockbench/repository/VaryingModelRepository.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/entity/pokemon/PokemonEntity.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/pokemon/FormData.kt
#	common/src/main/resources/cobblemon-common.accesswidener
2025-03-02 15:54:58 +10:00
TeggyandWeblate 19727542bd Translated using Weblate (Spanish)
Currently translated at 91.4% (6424 of 7021 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/es/
2025-02-28 22:02:07 +00:00
Alexis SalgueiroandWeblate c4e6714a95 Translated using Weblate (French)
Currently translated at 87.6% (6153 of 7021 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/fr/
2025-02-28 02:41:41 +00:00
TeggyandWeblate c116e612c6 Translated using Weblate (Spanish)
Currently translated at 90.4% (6354 of 7021 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/es/
2025-02-28 02:41:41 +00:00
Fiestorra ISVandWeblate 215a055ce6 Translated using Weblate (Spanish)
Currently translated at 90.4% (6354 of 7021 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/es/
2025-02-28 02:41:40 +00:00
Fiestorra ISVandWeblate 9c0b6b8d26 Translated using Weblate (Spanish)
Currently translated at 87.3% (6134 of 7021 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/es/
2025-02-25 22:27:22 +00:00
Fiestorra ISVandWeblate 5c4462ee94 Translated using Weblate (Spanish)
Currently translated at 100.0% (6391 of 6391 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/es/
2025-02-25 18:48:01 +00:00
TeggyandWeblate 04edd6f9e2 Translated using Weblate (Spanish)
Currently translated at 100.0% (6391 of 6391 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/es/
2025-02-25 18:48:01 +00:00
Polymeta 52821cc051 Merge branch 'main' into lang-updates 2025-02-25 18:38:33 +00:00
Watuneni iteiteandWeblate 0029deb029 Translated using Weblate (Japanese)
Currently translated at 81.6% (5218 of 6391 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-02-23 23:03:25 +00:00
TeggyandWeblate c6360e2a36 Translated using Weblate (Spanish)
Currently translated at 100.0% (6391 of 6391 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/es/
2025-02-23 23:03:24 +00:00
Fiestorra ISVandWeblate 2e77c647b6 Translated using Weblate (Spanish)
Currently translated at 100.0% (6391 of 6391 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/es/
2025-02-23 23:03:22 +00:00
Guilherme Pereira ee28cf554a add cooking progress sprite to campfire pot jei 2025-02-23 08:18:34 -03:00
Polymeta 30dcb9a4da initial mixin sorting
Signed-off-by: Polymeta <40173118+Polymeta@users.noreply.github.com>
2025-02-21 23:15:14 +00:00
Polymeta ffc9fdfa6d Merge branch 'refs/heads/main' into we_are_cooking_now
# Conflicts:
#	common/src/main/kotlin/com/cobblemon/mod/common/CobblemonNetwork.kt
#	common/src/main/resources/cobblemon-common.accesswidener
#	common/src/main/resources/mixins.cobblemon-common.json
2025-02-21 23:02:08 +00:00
Watuneni iteiteandWeblate c3d3b19788 Translated using Weblate (Japanese)
Currently translated at 81.3% (5200 of 6391 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-02-21 08:11:08 +00:00
Fiestorra ISVandWeblate 219cd61beb Translated using Weblate (Spanish)
Currently translated at 100.0% (6391 of 6391 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/es/
2025-02-21 08:11:07 +00:00
TeggyandWeblate 207e5a9142 Translated using Weblate (Spanish)
Currently translated at 100.0% (6391 of 6391 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/es/
2025-02-19 13:03:51 +00:00
apion 4f86c6f322 Flashback no longer crashes the game 2025-02-18 20:02:36 -05:00
Watuneni iteiteandWeblate c721fb534d Translated using Weblate (Japanese)
Currently translated at 81.2% (5191 of 6391 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/ja/
2025-02-18 15:00:29 +00:00
iván SeguraandWeblate dba2622fd7 Translated using Weblate (Spanish)
Currently translated at 100.0% (6391 of 6391 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/es/
2025-02-18 15:00:28 +00:00
Guilherme Pereira 33c8ecd908 add seasonings to cooking pot jei integration 2025-02-18 01:51:49 -03:00
Guilherme Pereira 93367fb0e8 add jei integration to cooking pot 2025-02-17 23:18:06 -03:00
Guilherme Pereira 694f74be13 add candle cake 2025-02-17 17:11:49 -03:00
Guilherme Pereira 79d097b17c add support for diferent cake variants 2025-02-16 19:14:50 -03:00
Guilherme Pereira 7ef30653bb refactor cake rendering 2025-02-16 17:14:35 -03:00
Guilherme Pereira 1ecb13f7fc Merge branch 'main' into we_are_cooking_now 2025-02-16 13:14:27 -03:00
iván SeguraandWeblate da68675133 Translated using Weblate (Spanish)
Currently translated at 100.0% (6391 of 6391 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/es/
2025-02-16 12:57:27 +00:00
iván SeguraandWeblate 9aea5a7daf Translated using Weblate (Spanish)
Currently translated at 100.0% (6391 of 6391 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/es/
2025-02-15 13:26:10 +00:00
Test d19878edf6 refactor pot 2025-02-14 16:00:56 -05:00
Test 4f98d1e054 Merge branch 'we_are_cooking_now' of https://gitlab.com/cable-mc/cobblemon into we_are_cooking_now
# Conflicts:
#	common/src/main/kotlin/com/cobblemon/mod/common/CobblemonItems.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/api/cooking/CookingComponentColorHelper.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/client/render/block/CampfireBlockEntityRenderer.kt
2025-02-13 18:54:15 -05:00
Test 7b8e07aef3 refactor pot 2025-02-13 18:44:11 -05:00
Gustavo PuerariandWeblate 10402575fb Translated using Weblate (Portuguese (Brazil))
Currently translated at 68.3% (4369 of 6391 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/pt_BR/
2025-02-13 23:43:36 +00:00
João Pedro Silva AfonsoandWeblate 0f82ade57c Translated using Weblate (Portuguese (Brazil))
Currently translated at 68.3% (4369 of 6391 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/pt_BR/
2025-02-13 23:43:35 +00:00
Konoha 427bf34a56 Add Legal move query 2025-02-12 20:15:39 -05:00
Konoha 479daa49ce Merge branch 'implement_pokemon' into legacy_and_event_moves 2025-02-12 20:10:03 -05:00
Konoha 729156924d Fix post-processing errors and Genesect form conventions 2025-02-12 20:09:33 -05:00
Gustavo PuerariandWeblate 450b041118 Translated using Weblate (Portuguese (Brazil))
Currently translated at 65.1% (4166 of 6391 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/pt_BR/
2025-02-11 21:12:32 +00:00
Weblate 770c349ac4 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-02-10 00:41:50 +00:00
Gustavo PuerariandWeblate f76648b6f2 Translated using Weblate (Portuguese (Brazil))
Currently translated at 59.8% (3826 of 6391 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/pt_BR/
2025-02-10 00:41:46 +00:00
Gustavo PuerariandWeblate 56e60667db Translated using Weblate (Portuguese (Brazil))
Currently translated at 51.5% (3297 of 6391 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/pt_BR/
2025-02-07 00:29:47 +00:00
Guilherme Pereira 1442bf5c34 fix merge 2025-02-06 03:47:13 -03:00
Guilherme Pereira 2ac37f6c4d Merge branch 'main' into we_are_cooking_now 2025-02-06 03:46:51 -03:00
Guilherme Pereira 9795dce227 remove campfire pot trap 2025-02-06 03:34:02 -03:00
Gustavo PuerariandWeblate c4a60951c5 Translated using Weblate (Portuguese (Brazil))
Currently translated at 49.7% (3178 of 6391 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/pt_BR/
2025-02-05 07:22:58 +00:00
KyoandWeblate 814eee8125 Translated using Weblate (Vietnamese)
Currently translated at 100.0% (6391 of 6391 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/vi/
2025-02-03 09:44:44 +00:00
Gustavo PuerariandWeblate 2a9ff3bfbd Translated using Weblate (Portuguese (Brazil))
Currently translated at 47.9% (3064 of 6391 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/pt_BR/
2025-02-03 09:44:43 +00:00
Konoha a34db1dc1b Legacy and event move support 2025-02-01 09:37:12 -05:00
Weblate 83350cb0db 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-01-31 22:57:44 +00:00
Patch Notes GuyandWeblate 778761dbee Translated using Weblate (Vietnamese)
Currently translated at 99.1% (6335 of 6391 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/vi/
2025-01-31 22:57:39 +00:00
Gustavo PuerariandWeblate e9881b748a Translated using Weblate (Portuguese (Brazil))
Currently translated at 46.4% (2971 of 6391 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/pt_BR/
2025-01-31 22:57:25 +00:00
Guilherme Pereira d9cf802a9e fix saccharine trees natural world generation 2025-01-31 11:27:59 -03:00
Paul a9ed3750ad Added the wisdom of broccoli to the new water and air wander tasks 2025-01-31 20:48:35 +10:00
Paul 24fdae725e Merge branch 'main' into smarterer-pokemons 2025-01-31 20:10:17 +10:00
Weblate dabaeefa23 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-01-31 09:41:51 +00:00
Patch Notes GuyandWeblate 0e0bec2712 Added translation using Weblate (Vietnamese) 2025-01-31 09:41:47 +00:00
Gustavo PuerariandWeblate 48fe160334 Translated using Weblate (Portuguese (Brazil))
Currently translated at 45.1% (2887 of 6391 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/pt_BR/
2025-01-31 03:10:48 +00:00
Paul 71fc844905 Wander water, air wander 2025-01-31 08:28:55 +10:00
Gustavo PuerariandWeblate 7d599e12d0 Translated using Weblate (Portuguese (Brazil))
Currently translated at 42.7% (2731 of 6391 strings)

Translation: Cobblemon/Mod
Translate-URL: http://lang.cobblemon.com/projects/cobblemon/mod/pt_BR/
2025-01-27 23:30:11 +00:00
Paul 24910778d4 Shoved molang structs in more places, you can't stop me 2025-01-27 16:53:44 +10:00
Paul 363c3e5f0a Merge remote-tracking branch 'origin/main' into smarterer-pokemons 2025-01-27 16:36:52 +10:00
Guilherme Pereira 3fbf2595cc add wool particles to cake breaking 2025-01-26 13:58:57 -03:00
Guilherme Pereira 6665285253 refactor cakes 2025-01-25 19:06:11 -03:00
Paul 8d336fca3e Merge remote-tracking branch 'origin/main' into smarterer-pokemons
# Conflicts:
#	common/src/main/kotlin/com/cobblemon/mod/common/pokemon/FormData.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/pokemon/Species.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/util/EntityExtensions.kt
#	common/src/main/resources/data/cobblemon/flows/battle_victory/npc_battle_end_scripts.molang
#	common/src/main/resources/data/cobblemon/species/generation1/growlithe.json
#	common/src/main/resources/data/cobblemon/species/generation1/raticate.json
#	common/src/main/resources/data/cobblemon/species/generation3/zigzagoon.json
2025-01-25 11:25:57 +10:00
Paul ff27676187 Started playing around with more generalised wandering through mediums 2025-01-25 09:48:23 +10:00
Paul 1fd5d0ff4b Added following owner, resting to Brain AI, restructured base Species AI definitions, fixed DrowsySensor not modulo'ing time 2025-01-24 09:24:15 +10:00
Guilherme Pereira 61ae29b745 add candied apple, fried rice and potato mochi 2025-01-21 18:29:15 -03:00
Guilherme Pereira a17bf5eeeb update licenses 2025-01-21 17:42:03 -03:00
Guilherme Pereira c71d91a46d add mochis 2025-01-21 17:40:44 -03:00
Guilherme Pereira c86103fd31 add player edible cake 2025-01-20 18:49:18 -03:00
Paul 46752a3911 Pokemon pausing in battles (like the good old days) 2025-01-19 20:31:37 +10:00
Plastered_Crab 5190bbe723 Prep for adding new cooking recipe items 2025-01-18 22:08:16 -08:00
Plastered_Crab 3663ce2555 Merge remote-tracking branch 'origin/we_are_cooking_now' into we_are_cooking_now 2025-01-18 15:00:46 -08:00
Plastered_Crab b5fc52d9b1 Merge branch 'main' into we_are_cooking_now
# Conflicts:
#	common/src/main/kotlin/com/cobblemon/mod/common/api/tags/CobblemonBlockTags.kt
#	common/src/main/resources/data/cobblemon/recipe/cooking_pot/whipped_dream_from_cooking_pot.json
#	common/src/main/resources/data/minecraft/tags/block/logs.json
#	common/src/main/resources/data/minecraft/tags/item/logs.json
#	common/src/main/resources/data/minecraft/tags/item/logs_that_burn.json
2025-01-18 14:59:52 -08:00
Paul 76ad22b53d License and registration please 2025-01-18 10:01:10 +10:00
Paul a2ddcaebf8 Minor refactors for Pokemon brains to use brain configs rather than pure presets, translated sleep tasks to data 2025-01-18 09:59:28 +10:00
Guilherme Pereira ca79b70815 add shapes to lure cakes 2025-01-17 13:05:37 -03:00
Guilherme Pereira 898c956f17 add rendering for the inner part of the cake 2025-01-16 17:01:37 -03:00
Guilherme Pereira 2ce48c9dff add custom lure cake color based on seasonings 2025-01-16 10:36:33 -03:00
Guilherme Pereira f64ec12a6a update licenses 2025-01-15 19:55:56 -03:00
Guilherme Pereira 474d3f3b55 add campfire pot bubbles color 2025-01-15 19:54:26 -03:00
Guilherme Pereira c87e6a391d refactor cooking pot renderer 2025-01-15 18:34:43 -03:00
Guilherme Pereira 192fd4dba7 make campfire pot bubbles disapear on lid close 2025-01-15 17:22:10 -03:00
Paul 6fc725b6ff Fixed wandering being busted due to the pathfinding malus override (will make fliers less keen to land) 2025-01-15 20:49:58 +10:00
plastered_crab c26786c644 Put water back to how it was 2025-01-14 21:19:22 -08:00
Plastered_Crab ebb0277d80 Merge remote-tracking branch 'origin/we_are_cooking_now' into we_are_cooking_now
# Conflicts:
#	common/src/main/kotlin/com/cobblemon/mod/common/client/render/block/CampfireBlockEntityRenderer.kt
2025-01-14 17:20:34 -08:00
Plastered_Crab 2a73efa479 Create custom render type to allow Cooking Pot water pane to show particles through it (wip) 2025-01-14 17:19:53 -08:00
Guilherme Pereira 6e68d22d4a update campfire pot models (again) 2025-01-14 20:39:49 -03:00
Guilherme Pereira dee08e6572 fix cooking pot rotation 2025-01-14 18:38:34 -03:00
Guilherme Pereira 2383686e42 update campfire pot models 2025-01-14 17:54:16 -03:00
Guilherme Pereira b8de9c415e Merge branch 'we_are_cooking_now' of gitlab.com:cable-mc/cobblemon into we_are_cooking_now 2025-01-14 16:59:09 -03:00
Guilherme Pereira f0269a3638 fix cooking pot items not being properly synched with the client 2025-01-14 16:58:54 -03:00
Plastered_Crab dbbbd309dc Added TransparentColorMixer method 2025-01-14 11:06:07 -08:00
plastered_crab b7a905ad79 Remove old bubbles 2025-01-14 06:59:23 -08:00
plastered_crab 60c8049459 More water bubble changes for cooking pot 2025-01-14 06:13:50 -08:00
Paul 01efc8d9e0 Task and brain configs are able to check the entity when providing variable list 2025-01-14 22:19:12 +10:00
plastered_crab 8c395b6fee Reduce and raise the particles for bubbling water in cooking pot 2025-01-13 22:21:14 -08:00
plastered_crab e9935a41e3 Start to add particles for bubbling water in cooking pot 2025-01-13 21:45:14 -08:00
Guilherme Pereira f0ecd4d50d add seasoning color to cooking pot water 2025-01-13 23:30:07 -03:00
Guilherme Pereira c0661022ab i hate bubbles 2025-01-13 21:50:30 -03:00
Guilherme Pereira e7305a3dfb improve seasonings spin on the cooking pot 2025-01-13 20:24:41 -03:00
Guilherme Pereira 86f52f176a make cooking pot seasonings spin 2025-01-13 20:01:25 -03:00
Guilherme Pereira beb9796e75 add water liquid to open cooking pot 2025-01-13 19:20:20 -03:00
Guilherme Pereira 6bb55adebc add campfire pot open/close variants 2025-01-13 13:41:37 -03:00
Guilherme Pereira 011bc85d18 Merge branch 'main' into we_are_cooking_now 2025-01-12 19:44:19 -03:00
Guilherme Pereira fad75c498b make cooking pot drop items on remove 2025-01-10 14:22:00 -03:00
Guilherme Pereira 915c69b443 improve cooking pot sounds 2025-01-10 11:06:49 -03:00
Guilherme Pereira 05b574543c add more constants to cooking pot 2025-01-10 10:30:01 -03:00
Guilherme Pereira 5198b2a709 render preview item on cooking pot 2025-01-10 09:35:14 -03:00
Guilherme Pereira 509973a027 add button to open/close the cooking pot lid 2025-01-10 07:58:58 -03:00
Guilherme Pereira 0253475f50 make cooking pot work similar to a furnace 2025-01-09 14:00:25 -03:00
Guilherme Pereira 6961c92c8d fix container data of cooking pot 2025-01-08 17:41:43 -03:00
Paul 3a05bd5e2e Updating variables now reinitializes brains, fixed too-low default on float chance in StayAfloat tasks 2025-01-08 20:10:32 +10:00
Plastered_Crab 906d7b361d Lure Cakes now show their Bait Effects on their tooltip 2025-01-07 15:45:32 -08:00
Plastered_Crab 54121199b6 Merge remote-tracking branch 'origin/we_are_cooking_now' into we_are_cooking_now 2025-01-07 15:29:39 -08:00
Plastered_Crab 78b3e0a1aa Lure Cakes now are grey (colors coming later) and get eaten in bits as pokemon spawn 2025-01-07 15:29:17 -08:00
Guilherme Pereira aa45795944 add cooking pot sounds 2025-01-07 19:55:57 -03:00
Guilherme Pereira 353209c72c Merge branch 'we_are_cooking_now' of gitlab.com:cable-mc/cobblemon into we_are_cooking_now 2025-01-07 18:28:39 -03:00
Guilherme Pereira d07eaefdd4 lil cooking pot refactoring 2025-01-07 18:28:21 -03:00
Sterrezo 2ead9f6f02 Added campfire pot sounds 2025-01-07 21:58:05 +01:00
Plastered_Crab 472a349709 Merge remote-tracking branch 'origin/we_are_cooking_now' into we_are_cooking_now 2025-01-07 12:40:06 -08:00
Plastered_Crab 9043520364 Lure Cakes now store CookingComponent data, render, and can use BaitEffects 2025-01-07 12:39:41 -08:00
Guilherme Pereira 88ea77e2f3 ad quality tooltip to aprijuices 2025-01-07 15:56:49 -03:00
Guilherme Pereira a609e2d561 add separate aprijuice tooltip generator 2025-01-07 15:28:52 -03:00
Guilherme Pereira 6f1c791df4 add shift click functionality to cooking pot 2025-01-07 08:47:53 -03:00
plastered_crab dc41e7b50f Lure cakes work now with new (maybe temporary) spawn context "bait" 2025-01-06 23:00:33 -08:00
Plastered_Crab 1b22da8bd9 Merge remote-tracking branch 'origin/we_are_cooking_now' into we_are_cooking_now 2025-01-06 17:27:28 -08:00
Plastered_Crab 773eb9e1c3 So close to having Lure Cakes spawning pokemon 2025-01-06 17:27:07 -08:00
Guilherme Pereira 87deea9748 make cooking pot items persistent 2025-01-06 21:13:47 -03:00
Guilherme Pereira 556636f41e Merge branch 'we_are_cooking_now' of gitlab.com:cable-mc/cobblemon into we_are_cooking_now 2025-01-06 20:48:27 -03:00
Guilherme Pereira daab3dd3dd fix bait vanishing 2025-01-06 20:48:17 -03:00
Plastered_Crab 5535390298 Lure Cakes are real!! 2025-01-06 15:13:19 -08:00
Guilherme Pereira f54eaf3101 make baits update sprite and tooltip while crafting on the cooking pot 2025-01-06 19:18:57 -03:00
Guilherme Pereira 1d86ace385 no more food waste 2025-01-06 18:32:49 -03:00
Guilherme Pereira 4a02a0a67d add leaf color based on quality to aprijuices 2025-01-06 17:33:14 -03:00
Guilherme Pereira 7f193c11e1 add flavor tooltip to aprijuices 2025-01-06 16:26:44 -03:00
plastered_crab 9f90a08276 Added preliminary foundation for Lure/Bait spawns 2025-01-06 09:58:30 -08:00
Guilherme Pereira f49a114f0f make aprijuice mix colors base on flavors 2025-01-06 14:00:30 -03:00
Guilherme Pereira 281fc300a6 fix merge 2025-01-06 14:00:20 -03:00
plastered_crab ea7078b749 Merge branch 'refs/heads/main' into we_are_cooking_now
# Conflicts:
#	common/src/main/kotlin/com/cobblemon/mod/common/CobblemonItems.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/CobblemonNetwork.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/client/CobblemonBakingOverrides.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/item/interactive/PokerodItem.kt
#	common/src/main/resources/assets/cobblemon/lang/en_us.json
#	common/src/main/resources/data/cobblemon/tags/block/flowers.json
#	common/src/main/resources/data/minecraft/tags/block/flowers.json
#	fabric/src/main/kotlin/com/cobblemon/mod/fabric/CobblemonFabric.kt
2025-01-06 08:03:32 -08:00
plastered_crab 03aabb55ca Merge remote-tracking branch 'origin/we_are_cooking_now' into we_are_cooking_now 2025-01-06 07:33:30 -08:00
plastered_crab 078da5b213 Adjust tooltip info for "seasoning" ingredients 2025-01-06 07:33:19 -08:00
Guilherme Pereira 22af77c7e6 add aprijuice item color provider 2025-01-06 12:21:32 -03:00
Guilherme Pereira 7ee7a6624f add dynamic rendering for poke baits based on seasonings 2025-01-06 10:19:43 -03:00
plastered_crab 85c9fcd28e Added test tooltip info for "seasoning" ingredients to show flavor data (thank you Tim) 2025-01-05 23:16:51 -08:00
plastered_crab 619da2e19a All berry seasoning files are done now! So many flavors! 2025-01-05 21:49:06 -08:00
Paul 439c9647ca Moved Pokémon more properly to the data driven AI, with basic defaults so far, added /brainedit to debug pokemon brains 2025-01-06 14:17:46 +10:00
plastered_crab c457cdfe5e Edit the seasoning files to include accurate berry flavors 2025-01-05 18:19:24 -08:00
plastered_crab a87c319d10 Fishing Bait combining works now! Fish be warned! 2025-01-04 23:53:18 -08:00
plastered_crab db5bdb0ef1 You can now combine fishing bait! (kind of) 2025-01-04 18:38:20 -08:00
plastered_crab adc79a34d1 Gordon Ramsey is with me like the movie Ghost 2025-01-04 02:52:00 -08:00
plastered_crab 8776dffed4 What's that? are we close to cooking with Seasoning Slots?? I think so! 2025-01-04 01:49:57 -08:00
plastered_crab 77f5434b78 Started work on potential CookingComponent 2025-01-04 00:49:41 -08:00
Paul eb952319e0 Major refactor of data-driven AI, added variables declarations to task configs, GUI for editing brain presets 2025-01-04 16:26:48 +10:00
plastered_crab 0191373ff5 Slight tweak to RICE placement in shallow water 🌾 2025-01-03 12:09:41 -08:00
plastered_crab 0daf995c70 The RICE it grooooooows in water babyyy 🌾 2025-01-03 09:13:29 -08:00
plastered_crab dd9437c663 Fix the bounding box shape of the RICE and allow it to be waterlogged🌾 2025-01-03 01:29:17 -08:00
plastered_crab 752675ffb0 Can you smell what the RICE is cooking?!? 🌾🌾🍚🍙🌾🌾 2025-01-03 00:24:50 -08:00
Plastered_Crab 5bcc0fb343 Alcremie Sweets are cookable + honey bottles return glass bottles when cooked with 2025-01-02 16:34:59 -08:00
Plastered_Crab 2cd726c003 Aprijuice is coming (for real this time) 2025-01-02 16:12:00 -08:00
Plastered_Crab f911ad57b9 Aprijuice is coming 🚨🚨🚨 2025-01-02 16:10:21 -08:00
Plastered_Crab bc2a547b86 Yeah boi we cooking with some recipes now 🧑🏻‍🍳 2025-01-02 13:53:48 -08:00
Plastered_Crab d5ba9bc3f5 Shapeless recipes go brrrr 🧑🏻‍🍳 2025-01-02 11:37:32 -08:00
plastered_crab 3dc8493b76 Start to getting Cooking Pot Shapeless recipes working 2025-01-01 20:13:56 -08:00
Plastered_Crab 0b991c4ae3 Let's gooooooo! Cooking Pot seasoning slots and renderer working so good now 🧑🏻‍🍳 2025-01-01 13:14:17 -08:00
Plastered_Crab 1352508070 Yeah baby CookingPot stays rendered now and Components work properly now 😎 2025-01-01 12:49:58 -08:00
plastered_crab 87d467ec67 My God I'm dumb. It works now lmao 2025-01-01 00:37:17 -08:00
plastered_crab c020deb728 Please god end this suffering. Why won't this work 💀 2024-12-31 23:15:39 -08:00
plastered_crab d5e15f7bf2 Attempting to store data on Campfire Block Entity via Components 2024-12-30 17:04:09 -08:00
plastered_crab 59622a1bfb Additional fixes for crafting grid syncing 2024-12-30 10:50:12 -08:00
plastered_crab 1c237503a0 Cooking Pot syncs with crafting slots finally 2024-12-29 22:22:43 -08:00
plastered_crab 138a83c844 More fixes and syncing 2024-12-29 16:57:39 -08:00
plastered_crab e8c86f4b4e Cooking Pot clears crafting slots when result item is taken 2024-12-29 16:45:16 -08:00
plastered_crab 344d2ae3e6 plz pot 2024-12-29 16:08:58 -08:00
plastered_crab 19a571147b I hate this pot 2024-12-29 14:59:34 -08:00
plastered_crab 2f369fb6ee More work trying to get the Cooking Pot to behave 2024-12-29 14:24:31 -08:00
plastered_crab c1d16f5185 Redo how crafting slots are initialized for Cooking Pot (result = 0 crafting 1-9) and add more debug 2024-12-28 22:36:11 -08:00
plastered_crab 2382895a42 Add minecraft:potion id for crafting medicinal brew 2024-12-27 18:09:39 -08:00
plastered_crab 68adae082b Additional recipes for the Cooking Pot 2024-12-27 17:12:49 -08:00
Erusel eac1b573c9 trying to debugs these ***** slots (i think ?) 2024-12-27 22:42:38 +01:00
Paul 4787c1d35b Merge remote-tracking branch 'origin/main' into smarterer-pokemons 2024-12-25 15:04:33 +10:00
Paul 98394333da More variable conversions for the task configs 2024-12-16 19:04:56 +10:00
Paul 653b9be4a3 Merge remote-tracking branch 'origin/main' into smarterer-pokemons
# Conflicts:
#	common/src/main/kotlin/com/cobblemon/mod/common/client/gui/npc/widgets/ConfigVariableList.kt
2024-12-16 10:03:13 +10:00
Paul a3460a4b8f Merge remote-tracking branch 'origin/main' into smarterer-pokemons
# Conflicts:
#	common/src/main/kotlin/com/cobblemon/mod/common/client/gui/npc/widgets/ConfigVariableList.kt
#	common/src/main/resources/assets/cobblemon/lang/en_us.json
2024-12-15 20:50:05 +10:00
MoeBoy76 71024481f4 missing licence 2024-12-15 19:53:11 +11:00
MoeBoy76 7c191981bd fixed up fishing advancement criterion to match the existing criterion except for the addition of empty_bait 2024-12-15 19:41:54 +11:00
MoeBoy76 0be9ac9f59 Merge branch 'main' of https://gitlab.com/cable-mc/cobblemon into advancing 2024-12-15 19:38:41 +11:00
dhi_holo c69f1e6adc Removed temp advancement
No further communication was had, so deeming it not approved, time to merge
2024-12-15 11:19:54 +10:00
dhi_holo a26a07337a Merge branch 'main' into advancing 2024-12-15 11:18:05 +10:00
Paul fd74f157a8 Work on generalised entity brain configurations to apply to pokemon 2024-12-14 10:06:39 +10:00
Erusel a29a17a28b Added Cooking Pot ( globally ) 2024-12-13 00:09:33 +01:00
Paul 885cde045a Merge remote-tracking branch 'origin/main' into smarterer-pokemons 2024-12-09 11:32:36 +10:00
Paul bfcaa4bda4 pokemon AI tweaking 2024-12-07 12:23:13 +10:00
Paul 7370841e62 Ported up to latest main 2024-12-06 20:23:28 +10:00
Paul 3c347214a8 Merge remote-tracking branch 'origin/main' into smarterer-pokemons
# Conflicts:
#	common/src/main/kotlin/com/cobblemon/mod/common/CobblemonActivities.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/command/GiveAllPokemon.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/entity/ai/AttackAngryAtTask.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/entity/ai/MoveToAttackTargetTask.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/entity/npc/NPCEntity.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/entity/pokemon/PokemonEntity.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/entity/pokemon/ai/PokemonMoveControl.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/util/WorldExtensions.kt
2024-12-06 20:12:55 +10:00
Erusel 4805659a68 Started furnace like crafting 2024-12-03 09:42:54 +01:00
Erusel fbdcfb20ed Cooking Pot now keep items inside 2024-11-30 12:11:28 +01:00
Erusel 4a2b186ef7 Merge remote-tracking branch 'origin/we_are_cooking_now' into we_are_cooking_now 2024-11-30 12:10:48 +01:00
dhi_holo 91f9af1bed Merge branch 'main' into advancing 2024-11-30 16:55:07 +10:00
dhi_holo b32c2e1274 Clean Up
Removes proof of trigger advancement, perhaps a copy should be uploaded to the wiki but it'll exist in the commit history atleast, and started cleaning up a couple things missing from the lang
2024-11-30 14:31:13 +10:00
dhi_holo 400f764054 Merge branch 'main' into advancing 2024-11-30 13:18:03 +10:00
Plastered_Crab 5b6900b74a Merge remote-tracking branch 'origin/advancing' into advancing 2024-11-29 19:15:41 -08:00
Plastered_Crab 05d0adc947 Fix Event for Advancement Criteria 2024-11-29 19:15:14 -08:00
Plastered_Crab fa41b30a4c Add 2 test overlays for Poke Bait 2024-11-29 18:42:38 -08:00
Plastered_Crab 505282986e Add better texture for Poke Bait 2024-11-29 17:13:15 -08:00
Plastered_Crab 9e6e74db7c Add test recipe for Poke Bait 2024-11-29 14:03:01 -08:00
Plastered_Crab cf68e88103 Add test Poke Bait sprite for testing new combining bait system 2024-11-29 12:44:59 -08:00
Plastered_Crab 84ae73d0d1 Add test Pokepuff sprites for testing 2024-11-29 12:35:38 -08:00
Erusel 9bb0f13793 Added cooking pot to the block group 2024-11-29 16:51:16 +01:00
Erusel 912485067b Working cooking pot recipe book 2024-11-29 12:10:59 +01:00
Plastered_Crab 128f7c15a6 Add debug chaos to try to help see why registering recipes doesnt work 2024-11-28 00:44:05 -08:00
dhi_holo 24c2ac116a Update use_all_berry_bait.json
Now using the other trigger, just pushing so it's not entirely local
2024-11-28 16:30:35 +10:00
dhi_holo 4f558d36e6 Merge branch 'main' into advancing 2024-11-28 15:36:21 +10:00
Erusel 5d67d0fdfc - i want to die 2024-11-28 03:12:45 +01:00
Plastered_Crab 38218e4001 Add bait to condition for advancement of reel in 2024-11-27 17:08:34 -08:00
Erusel 3f90d19801 - Added Cooking Pot block
- Added Sweety things
- Started cooking pot handled things
2024-11-26 22:28:05 +01:00
dhi_holo bd8e533bbd typo
damn ie ei o's
2024-11-26 16:48:00 +10:00
dhi_holo 52b756c33d what a lure
Finished "Some Berry Good Lures" advancement (may get further tweaks, but the current state is complete enough for release purposes)
Added in Reel In Feebas advancement (replaces Reel In Magikarp test advancement), may be removed or modified before release depending on Design opinions
2024-11-26 16:29:42 +10:00
Plastered_Crab 91ce0d9eab Merge branch 'bait-advancements' into advancing
# Conflicts:
#	common/src/main/resources/assets/cobblemon/lang/en_us.json
2024-11-25 20:28:23 -08:00
Plastered_Crab 17ea2bb80f Add add placeholder advancements for bait 2024-11-25 20:22:46 -08:00
dhi_holo e76b047ed3 Challenge Fix
Added the reward to the challenges so I don't forget later.
2024-11-20 15:22:50 +10:00
dhi_holo 33be35f27b Part 2
Moved the location of the fishing advancements
2024-11-20 12:07:54 +10:00
dhi_holo ea73382ea3 1.6 Advancement Reworks Part 1
Updated translated name and description for craft_rod
Added advancement craft_pokedex
Tweaked location in advancement tree for craft_master_rod
Begun reworking using bait advancement from using any bait to using all berries as bait (needs code support to continue work)
2024-11-20 11:37:42 +10:00
Plastered_Crab 897e1651c5 Remove unneeded file 2024-11-05 14:49:17 -08:00
Plastered_Crab 9c5bb2fcdb Start to implementing Sweet Incense block 2024-11-05 12:14:47 -08:00
Plastered_Crab 8ee8d84c8b Add missing bugwort textures and blockstates 2024-11-04 15:43:56 -08:00
Plastered_Crab b25fbf42ab Bugwort plants now grow and behave properly 2024-11-04 15:40:23 -08:00
Plastered_Crab f9f3392901 Leaves drip honey down below to other leaves more often 2024-11-04 11:33:14 -08:00
Plastered_Crab 35249f5804 Stripped Saccharine Logs now give Sweet Sap again 2024-11-03 23:34:12 -08:00
Plastered_Crab b32fdeda9c Merge remote-tracking branch 'origin/we_are_cooking_now' into we_are_cooking_now 2024-11-03 23:07:07 -08:00
tmetcalfe89 1d033701ed fix leaf block
keys in the ignition, bonemeal on, redundant props removed
2024-11-03 22:53:31 -08:00
Plastered_Crab 6422cffde3 Merge branch 'main' into we_are_cooking_now 2024-11-03 14:35:58 -08:00
Plastered_Crab e8588370e5 Remove not needed tag additions for leaves 2024-11-03 13:39:11 -08:00
Plastered_Crab a96692e5cf Bees now like the Saccharine Leaves again and added more old files back that were missing 2024-11-03 13:24:58 -08:00
Nick 81c272778f Merge branch 'we_are_cooking_now' of gitlab.com:cable-mc/pokemon-cobbled into we_are_cooking_now 2024-11-02 01:11:33 -07:00
Nick 31351116b5 Include a configuration for maxShiftBy 2024-11-02 01:11:18 -07:00
Plastered_Crab fd18e4d7f1 Remove unneeded tags in saccharine_leaves json block tag 2024-11-02 00:35:32 -07:00
Plastered_Crab 7eb5364ba7 Add BeeEntityMixin to mixins.cobblemon-common json file 2024-11-02 00:10:03 -07:00
Plastered_Crab 97b679bbe0 Add saccharine_leaves block tags 2024-11-01 23:32:14 -07:00
Plastered_Crab 85dc3ad1d7 Add Saccharine Trees to bee_growables list 2024-11-01 23:18:40 -07:00
Plastered_Crab a90e9544be More remappings and trying to get Bees to fertilize Saccharine Leaves again 2024-11-01 17:14:46 -07:00
Plastered_Crab 6261163728 Add old Abstract CookingPot ScreenHandler to new branch to be remapped 2024-10-31 16:42:52 -07:00
Plastered_Crab 9288ae8776 More work fixing up some remappings 2024-10-31 16:35:13 -07:00
Plastered_Crab f887f678f1 - Add back more missing files from old branch that need re-mapped 2024-10-28 12:20:26 -07:00
Plastered_Crab 59ba74606e - Add textures for real real this time 2024-10-25 14:44:44 -07:00
Plastered_Crab 130b1c99db - Add textures for missing Saccharine items and add missing recipes for Saccharine items. Set stage for re-adding bugwort, saccharine saplings, cooking pot, etc 2024-10-25 14:24:00 -07:00
Plastered_Crab adc4b424c5 Merge branch 'main' into we_are_cooking_now 2024-10-25 12:22:57 -07:00
Paul 592b4276c8 Added some combat behaviour and reworked activity swapping logic for pokemon brains 2024-10-05 10:47:42 +10:00
Paul a73cdfbb4f Removed duplicate class (baffling) 2024-09-29 18:57:36 +10:00
Paul 770a2e52f6 Pokemon but dangerous 2024-09-29 11:41:01 +10:00
Paul 6629b27f33 Fixed issues from merging main 2024-09-29 10:08:06 +10:00
Paul 73b06d2f99 Merge remote-tracking branch 'origin/main' into smarterer-pokemons
# Conflicts:
#	common/src/main/kotlin/com/cobblemon/mod/common/CobblemonActivities.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/CobblemonMemories.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/entity/npc/NPCEntity.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/entity/pokemon/PokemonEntity.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/util/WorldExtensions.kt
2024-09-29 09:28:03 +10:00
Erusel 4ad140f7a3 saccharines bases blocks 2024-09-06 20:48:52 +02:00
Paul a07a9a75c0 Ported to mojmaps 2024-08-17 19:19:20 +10:00
Paul d6fdb4c6da Merge branch 'sega_bass_pro_fishing_2' into smarterer-pokemons
# Conflicts:
#	common/src/main/java/com/cobblemon/mod/common/GenericsCheatClass.java
#	common/src/main/kotlin/com/cobblemon/mod/common/CobblemonActivities.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/CobblemonMemories.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/CobblemonSensors.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/battles/interpreter/instructions/MoveInstruction.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/entity/ai/AttackAngryAtTask.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/entity/ai/FollowWalkTargetTask.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/entity/ai/GetAngryAtAttackerTask.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/entity/ai/MoveToAttackTargetTask.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/entity/ai/StayAfloatTask.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/entity/pokemon/PokemonEntity.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/entity/pokemon/PokemonServerDelegate.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/entity/pokemon/ai/PokemonMoveControl.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/entity/pokemon/ai/PokemonNavigation.kt
#	common/src/main/kotlin/com/cobblemon/mod/common/util/WorldExtensions.kt
#	common/src/main/resources/cobblemon-common.accesswidener
#	fabric/src/main/kotlin/com/cobblemon/mod/fabric/CobblemonFabric.kt
#	forge/src/main/kotlin/com/cobblemon/mod/forge/CobblemonForge.kt
2024-08-17 10:57:53 +10:00
plastered_crab 65ab0f48e4 - ported over Fullness Mechanics from 1.20.1 to 1.21 2024-07-28 15:07:39 -07:00
JazzMcNade c5e036934a Added Logic to allow specific pokemon to cause Creepers and Skeletons to flee 2024-07-14 21:18:49 -05:00
JazzMcNade d9938a5cfd Added flee on failed capture behavior, prevented sleepwalking, wake up and attack if harmed while sleeping 2024-07-06 03:27:52 -05:00
Tyzillion fc5d9615fc Moved the bonemeal detection out of the task and put it in its own sensor. 2024-06-27 14:59:21 -04:00
Tyzillion e160a42b83 Fixed pokemon class not passing the correct pokemon to the brain upon Pokemon Entity initialization. 2024-06-21 11:32:11 -04:00
Plastered_Crab fa68aa44c5 - commented out 1 brain task to test other tasks 2024-05-24 09:18:40 -07:00
Plastered_Crab f3de9840b5 - party pokemon will try to defend their owners better (still wip) 2024-05-23 22:17:00 -07:00
Plastered_Crab 64e3909cea - party pokemon will try to defend their owners (still wip) 2024-05-22 23:30:16 -07:00
Plastered_Crab 735c4b910e - pokemon are kill (almost still) 2024-05-22 15:43:02 -07:00
Plastered_Crab 26a9a1f9e1 - pokemon is kill (almost) 2024-05-21 18:02:18 -07:00
amo 832ab8db95 RANDOM BULLSHIT GO 2024-05-20 02:46:43 +01:00
broccoli 1d9029ef51 feature: add fertilizing task 2024-05-16 19:05:07 +01:00
broccoli a875ba7536 remove comment 2024-05-16 00:22:39 +01:00
broccoli 93de4785b4 use resourceIdentifier instead of pokedex id 2024-05-16 00:22:12 +01:00
broccoli 765f0e5494 feature: make baby pokemon follow more evolved pokemon 2024-05-16 00:13:42 +01:00
broccoli 4fc232ff31 fix: resolve mapping issues by downgrading loom
fixes regression in fd7b82dbe3
2024-05-14 23:28:33 +01:00
broccoli a4d75e9f32 refactor: split brain out of entity 2024-05-13 17:38:08 +01:00
broccoli a86ae09dc9 Merge branch 'main' into smarterer-pokemons 2024-05-12 15:18:56 +01:00
Paul a5fbafe64d Import corrections 2024-04-11 12:48:43 +10:00
Paul 1de93b4933 Merge remote-tracking branch 'origin/main' into smarterer-pokemons
# Conflicts:
#	common/src/main/kotlin/com/cobblemon/mod/common/entity/pokemon/PokemonEntity.kt
2024-04-11 12:46:21 +10:00
Paul f8dfc7c6cc Implemented owner following on Brain pokemon AI 2024-04-11 11:58:46 +10:00
Paul accbed9c2b Set up entity AI for battles on Brain system 2024-04-08 13:15:33 +10:00
Paul 8b0e615777 Merge remote-tracking branch 'origin/main' into smarterer-pokemons
# Conflicts:
#	common/src/main/kotlin/com/cobblemon/mod/common/entity/pokemon/PokemonEntity.kt
2024-04-08 11:13:12 +10:00
Paul 746f12c724 Migrated the eat grass goal to the brain system 2024-04-06 21:22:26 +10:00
Paul a11d306a1b Merge remote-tracking branch 'origin/main' into smarterer-pokemons
# Conflicts:
#	common/src/main/kotlin/com/cobblemon/mod/common/entity/pokemon/PokemonEntity.kt
2024-04-06 17:49:24 +10:00
Paul 40d140e84d Added find resting place AI task 2024-03-25 10:08:55 +10:00
Paul ffdb4842ac Merge remote-tracking branch 'origin/main' into smarterer-pokemons 2024-03-18 15:48:32 +10:00
Paul 6baf60d07c Added CobblemonMemories and Sensors from NPC branch (merge conflicts are future me's problem) 2024-03-18 10:04:43 +10:00
Paul cb3b7784b0 Fixed pokemon speeds on new brain 2024-03-18 10:04:20 +10:00
Paul ee4f3b1629 Started giving pokemon brains 2024-03-17 16:43:32 +10:00
Paul 518a7daa0e Reverted partial run change 2024-03-17 12:46:08 +10:00
6255 changed files with 217504 additions and 58367 deletions
+22
View File
@@ -0,0 +1,22 @@
### Additions
- Rebuilt Pokémon AI to use Minecraft's Brain system, allowing for more complex behaviours and interactions.
- As an early pass of this, pastured Pokémon will now sleep when appropriate, and may come up to you when they see you.
- Probably also added a whole bunch of bugs.
- Dog Pokémon (Growlithe, Arcanine, etc.) intimidate Skeletons.
- Cat Pokémon (Meowth, Persian, etc.) intimidate Creepers and Phantoms.
- Sleep-related Pokémon (Munsharna, Komala, etc.) intimidate Phantoms.
- Some Pokémon naturally hunt each other.
- Added a Behaviour Editor to the NPC editing screen.
- Added /behaviouredit command for opening the Behaviour Editor on Pokémon and NPCs.
- Editing variables for Pokémon is not yet supported.
### Developer
- 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(...)`
### 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.
- Added very many behaviours to choose from.
- Removed many NPC presets that now exist as behaviours. This is a breaking change if you are using NPCs with these presets.
- NPCs with these presets should be modified to instead list under `"behaviours"` all the equivalent behaviours.
+35
View File
@@ -0,0 +1,35 @@
### Additions
- Added the Campfire Pot, made from apricorns and placed onto campfires.
- This pot can be used to make bait for fishing, Poké Cakes, Lure Cakes, local specialties, and potions (less efficiently than a brewing stand).
- There is a different pot for each apricorn colour because at this point I think we may have an addiction.
- Added Aprijuice, made from the Campfire Pot using apricorns with seasoning to give flavours.
- Aprijuice can be fed to ride-able Pokémon to improve their riding characteristics, depending on the flavour and the Pokémon's nature.
- Added Lure Cakes, made from the Campfire Pot using honey and berries.
- Lure Cakes can be used to modify the spawn rate of Pokémon in the wild.
- Added the Saccharine Tree, which can be found in the wild and is used to obtain Honey Bottles.
- The leaves of the tree can be harvested to obtain honey, which can be used in the Campfire Pot to make Lure Cakes.
- The Log of the tree can be interacted with using a honey bottle to create a Honey-Slathered Saccharine Log, which increases the change of spawning a Pokémon with a Hidden Ability.
- Added Hearty Grains
- Clicking on the Progress Arrow will show the JEI Recipe Book for the Campfire Pot, which will show all recipes that can be made with it.
- Added a Ton of Redstone Compatibility.
- Dispenser can now Honey and Unhoney:
- Saccharine Log
- Saccharine Leaves
- Redstone can Close and Open the Lid of a Cooking Pot
- Powered = Closed
- Unpowered = Open
- Hoppers can be used to insert items into a Cooking pot
- Top = Seasonals
- All Sides = Crafting
- Bottom = Extract the Result
- Observer will recognise when a Cooking pot is Closed or Opened
- Comparator Calculates a Signal Strength depending on the items inside the cooking pot
- Sculk Sensor
- Saccharine Leaves
- Opening and Closing the Cooking Pot
- Saccharine Log
### Datapack and Addon Changes
- Renamed the fishing_baits datapack folder to spawn_bait_effects.
- Added `seasonings` datapack folder for controlling usable items in the campfire pot and what colour and flavour they apply.
- Added campfire pot recipe type, which you could use to make anything work as fishing bait.
+8
View File
@@ -4,8 +4,16 @@
- The button on the right allows for changing the box wallpaper.
- The option buttons on the left side allow for sorting the box by name, level, Pokédex number, gender, and type. Shift clicking allows for sorting in reverse order.
- Added filter functionality in PC UI, which supports `PokemonProperties` (e.g. `shiny=yes` shows all shiny Pokémon).
- Names can be filtered by exact or partial matches, e.g. entering "cha" will show Charmander, Charmeleon, etc.
- Added `/changewallpaper <player> <boxNumber> <wallpaper>` command to change a box wallpaper through commands.
- Added `/renamebox <player> <boxNumber> <name>` command to rename a PC box through commands.
- Added IVs and EVs stat displays in PC.
- Added ability to change boxes by scrolling.
- PC will now open to last box viewed within a session.
### 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.
### Developer
- Added `RenamePCBoxEvent.Pre` and `RenamePCBoxEvent.Post` events to prevent players from renaming a box or changing their input.
+16
View File
@@ -0,0 +1,16 @@
### Additions
- Pokémon can now spawn in herds, either as distinct herd groupings or simply several Pokémon spawning at once.
### Fixes
- Fixed the "enabled" property in spawn files not actually being respected. Where do they find these devs?
### 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.
- Renamed heaps of things in the spawning system to make more sense.
- SpawningContext is now SpawnablePosition
- WorldSlice is SpawningZone
- SpawningProspector is now SpawningZoneGenerator
- Renamed things in Spawn Rules to go with the other renames:
- contextSelector is now spawnablePositionSelector
- context is now spawnable_position
+225 -5
View File
@@ -7,6 +7,7 @@
- Added `/cobblemonconfig reload` command to reload `main.json` configuration. **Note:** Some settings require a server restart to take effect; use this command cautiously.
- Added `blacklisted_items_to_hold` and `whitelisted_items_to_hold` tags to allow for controlling which items players can give to their Pokémon. If the whitelist is empty, it will consider all item as allowed (unless they are in the blacklist).
- Pokémon now follow the mouse cursor on the Summary screen, with an option to disable this in the settings.
- Added Datapackable Item interactions with Pokemon
- Pokémon's held items can now be rendered, with a visibility toggle in the Summary screen.
- Added cosmetic item functionality for Pokémon. Certain cosmetic items can be given to applicable Pokémon via the interact menu.
- Added the various log blocks as cosmetic items for Timburr and Komala.
@@ -17,8 +18,33 @@
- Added cosmetics for Gurdurr, Conkeldurr, Squirtle Line, Sneasler, Sandle line, Treecko line, Braixen, Delphox, and Dragonite.
- Added `/transformmodelpart (position|rotation|scale) <modelPart> <transform: x y z>` command that can add transformations to a pokemon's model part.
- The player executing the command must be facing the target pokemon entity. Transformations are not persistent and will revert when resources are reloaded.
- Added `legacy` and `special` sourced moves to Pokémon.
- Added lang keys for all moves and abilities up to Generation 9.
- Fixed Moon Ball moon phase logic to actually work correctly
- Added `translucent_cull` boolean option into resolver's layer to allow for translucent textures with culling
- Added [LambDynamicLights](https://modrinth.com/mod/lambdynamiclights) support for items held by Pokémon, evolution stone blocks, evolution stone items, Pokédex, Luminous Moss, Flame Orb, and Magmarizer.
- Added the Clear Amulet, Grip Claw, Lagging Tail, Luminous Moss, Metal Alloy, Scroll of Darkness, Scroll of Waters
- Added Recipes for Masterpiece Cup, Eject Pack
- Added modification to Minecraft Creative Inventory search to account for item names that contain `poké` when input contains `poke`.
- Added Campfire Pot as well as loads of new food items (Poke Puffs, Ponigiri, Sinister Tea, etc)
- Added Hearty Grains, a new crop used in the new cooking mechanic
- Added Tatami blocks and Tatami Mat blocks, made from Hearty Grain, for decorating builds
- Added `/pcsearch <player> <pokemonProperties>` command that searches for a specific Pokémon within a player's PC.
- Added `/pctake <player> <box> <slot>` command that takes a specific Pokémon from a player's PC. Removes the pokemon if target is self or ran from the server.
- 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
- 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
- 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 new optional property `attachment_options` for most EmitterShapes to be attached to the locator/entities scale, rotation, and/or position. Position is true by default.
- Galarica Nut bushes now generate on beaches.
- Some Pokémon now pitch their bodies in the direction they're moving.
- Added new advancements Didn't Stop To Think, We Need To Cook, and Pokémon Jockey!.
- Berries can now be smelted into their respective dyes.
- 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.
### Pokémon Added
@@ -30,12 +56,17 @@
- Grumpig
- Snorunt
- Glalie
- Latias
- Latios
#### Gen 4
- Bronzor
- Bronzong
- Croagunk
- Toxicroak
- Froslass
- Glameow
- Purugly
#### Gen 5
- Pansage
@@ -48,10 +79,24 @@
- Musharna
- Blitzle
- Zebstrika
- Drilbur
- Excadrill
- Trubbish
- Garbodor
- Gothita
- Gothorita
- Gothitelle
- Solosis
- Duosion
- Reuniclus
- Mienfoo
- Mienshao
#### Gen 6
- Inkay
- Malamar
- Hawlucha
- Dedenne
- Noibat
- Noivern
@@ -61,13 +106,20 @@
#### Gen 8
- Silicobra
- Sandaconda
- Sinistea
- Polteageist
#### Gen 9
- Smoliv
- Dolliv
- Arboliva
- Tarountula
- Spidops
- Orthworm
- Dudunsparce
- Cyclizar
- Poltchageist
- Sinistcha
### Animation updates for the following Pokémon
- Garchomp
@@ -80,6 +132,15 @@
- Delphox
- Cinderace
- Kangaskhan
- Gossifleur
- Eldegoss
- Stonjourner
- Wailmer
- Lechonk
- Oinkologne
- Dratini
- Dragonair
- Dragonite
### Model updates for the following Pokémon
- Gyarados
@@ -97,27 +158,56 @@
- Grovyle
- Sceptile
- Honchkrow
- Gible
- Gabite
- Garchomp
- Pidgeot
- Nosepass
- Probopass
- Kangaskhan
- Cinderace
- Magnemite
- Magneton
- Magnezone
- Beldum
- Metang
- Metagross
- Hoothoot
- Noctowl
- Teddiursa
- Ursaring
- Ursaluna
- Heatmor
- Bouffalant
- Sigilyph
- Sharpedo
- Maractus
- Clodsire
- Scyther
- Scizor
- Cacturne
- Taillow
- Swellow
- Added Syrupy Apples.
- Seel
- Dewgong
- Honedge
- Doublade
- Aegislash
### Changes
- Changed pokemon caught and seen count to update based on the current pokedex being looked
- Renamed `chargeGainedPerTick` config to `secondsToChargeHealingMachine`.
- Made Blocks of Gold count as Big Nuggets when held by a Pokémon (for Fling functionality)
- Players can now eat Sweet and Tart Apples, Whipped Dreams, and the Alcremie Sweets.
- Updated Sweet and Tart Apple sprites
- Updated the following recipes: Air Balloon, Assault Vest, Binding Band, Black Belt, Blunder Policy, Choice Band, Choice Scarf, Cleanse Tag, Covert Cloak, Destiny Knot, Eject Button, Expert Belt, Focus Band, Focus Sash, Magnet, Metronome, Muscle Band, Power Anklet, Power Band, Power Belt, Power Bracer, Power Lens, Power Weight, Protective Pads, Protein, Punching Glove, Reaper Cloth, Rocky Helmet, Room Service, Sachet, Safety Goggles, Silk Scarf, Spell Tag, Utility Umbrella, Weakness Policy, Zinc
- Added alternate ingredient options to the following recipes: Cell Battery, Charcoal Stick, Dragon Fang, Miracle Seed, Mystic Water, Never Melt Ice, Twisted Spoon, Damp Rock, Heat Rock, Icy Rock, Smooth Rock
- Updated the following recipes: Air Balloon, Assault Vest, Binding Band, Black Belt, Blunder Policy, Choice Band, Choice Scarf, Cleanse Tag, Covert Cloak, Destiny Knot, Eject Button, Expert Belt, Focus Band, Focus Sash, Magnet, Metronome, Muscle Band, Power Anklet, Power Band, Power Belt, Power Bracer, Power Lens, Power Weight, Protective Pads, Protein, Punching Glove, Reaper Cloth, Rocky Helmet, Room Service, Sachet, Safety Goggles, Silk Scarf, Spell Tag, Utility Umbrella, Weakness Policy, Zinc, Chipped Pot, Cracked Pot, Unremarkable Cup, Loaded Dice, Charcoal Stick, Dragon Fang, Miracle Seed, Mystic Water, Never Melt Ice, Twisted Spoon, Black Glasses, Fairy Feather, Hard Stone, Silver Powder, Soft Sand
- Added alternate ingredient options to the following recipes: Cell Battery, Damp Rock, Heat Rock, Icy Rock, Smooth Rock
- Grouped together some recipes within the Recipe Book. Groups include: the seven basic Poké Balls, the seven basic Ancient Poké Balls, Gilded Chests, Pokedexes, and the Weather Rocks.
- 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.
- Added our seeds tag into `#c:seeds`, which is now made use of for the Miracle Seed recipe.
- 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.
@@ -127,8 +217,41 @@
- 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.
- 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.
- Added a subtle rotation effect to the Pokédex Scanner's wheel when zooming.
- Improved parity with vanilla mobs' drop behavior; loot and XP drop on death instead of after the entire death sequence finishes.
- Quirk animations no longer play in the battle GUI since they were pretty distracting.
- A number of Pokemon that float above the ground visually (Gastly, Klingklang, etc.) are no longer considered to be touching the ground
- Changed the recipes for Level, Lure, and Moon Balls to be cleaner
- Renamed `pokemonId` and `type` to `species` in relevant Advancement triggers for conformity, this is a breaking change.
- Added a separate `species` argument to the `pick_starter`, `pasture_use` and `resurrect_pokemon` Advancement triggers.
- Made `CobblemonAgingDespawner` thresholds configurable via the config file.
- Tweaked Berry flavor data to balance cooking pot mechanics
- Made Red, Yellow, Green, Blue, Pink, Black, and White Apricorn Sprout and Saccharine Sapling able to be placed into flower pots.
- Added all Potted Apricorn Sprouts, Potted Saccharine Saplings, and Potted Pep-Up Flowers to the `#minecraft:flower_pots` block tag
- Corrected the healing values of the remedies and energy root, and reintroduced the friendship lowering mechanics for them, revivl herb, and heal powder
- Updated battle language keys for side effects to use position-specific formats, improving grammatical consistency
- Saccharine Leaves are now Collectable
- Saccharine Leaves Age 1 or higher will now show Yellow particles when broken
- Destroying a Saccharine Honey Log will now drop a Saccharine Log in stead of nothing
- Reworked some compost chances
- Updated interaction interface to include 4 more option spaces
- Made lecterns that hold a Pokédex emit light.
- Updated light levels for active PC, Pasture, Healing Machine, and Data Monitor.
- Vivichokes now always drop one seed when harvested, and converting a fully grown Vivichoke to seeds via crafting results in 1 seed.
- Healing Machine recipe rebalanced.
- Reorganised the `block` texture folder to be more organised, in line with the `item` texture folder.
- Offset in EmitterShape now ignores scale to be more like Blockbench by default. You can get this behaviour back by adding `"scale": true` in the `attachment_options` property in most EmitterShapes.
- Not specifying a dex in `/pokedex printcalculations {player} {dex}` will now print the National Dex statistics instead of showing all dexes. `/pokedex printcalculations {player} all` is how to view all dex statistics in one command.
- Removed Braised Vivichoke
- Updated Pokémon state icons shown in party interfaces
- MoLang `face` function can now be run on any `PosableEntity` (Like Pokémon!) instead of just NPCs.
- MoLang `run_action_effect` now works on Pokémon.
- Changed MoLang entity function `is_standing_on` to allow for block tags in the list.
- Added entity (as `q.entity`) that executed the command to the `executemolangscript` command.
### Fixes
- Fixed game crashing when removing national pokedex using datapacks
- Fixed Particles sometimes facing the wrong direction (looking at you, Swords Dance)
- Fixed PCs always opening at box 2 instead of box 1.
- Fixed not being able to do complex item requirements aside from just NBT with evolution conditions, requirements and fossil items.
@@ -155,7 +278,46 @@
- Fixed Pokémon marked as silent still playing shiny sounds and effects.
- Fixed an issue with newer versions of Fabric API where underground Pokémon were spawning in The End.
- Fixed spawning not working well when you're at high points surrounded by lower altitude spawning areas, such as flying.
- Fixed some Pokémon having erroneous tutor moves if another move included a valid tutor move as a substring.
- Fixed certain Pokémon with forms not having appropriate stock Pokédex entries.
- Fixed issue with Pokédex Scanner that caused the open/close overlay to have the wrong opacity values
- Fixed dragon's breath not being usable on the restoration tank when it should be
- Fixed Moon Stones not interacting properly with dripstone blocks.
- Fixed some effects like particles from fishing rods appearing for players in the same coordinates in another world.
- Fixed an issue with Sketch where the Pokémon using Sketch would not properly learn moves with special characters in their name (e.g. King's Shield, Baby-Doll Eyes, etc.)
- Fixed wild Pokémon sometimes spawning with incorrect friendship values
- Fixed typo while saving/loading NPCEntity causes data loss
- Fixed an issue where catching a Pokémon while it was leashed to a fence would not update the fence.
- Fixed the `dimensions` spawning condition using the incorrect ResourceLocation, causing it to not function properly.
- Fix issue where locator X axis was not aligned with blockbench.
- Fix issue where particle effects that play on frame 1 on sendout would never play (Gastly)
- The Wiglett line will now sink in water again.
- Fixed the Sprigatito line's portraits being zoomed in too far.
- Fixed Floragato's battle cry animation from breaking.
- Fixed the block texture name for the Pep-Up Flower being inaccurate
- Fixed issue where the restoration tank would not accept valid items from a hopper.
- Fixed energy root not being shearable
- Fixed energy root always spreading into more energy roots instead of by chance (same as big root)
- Fixed issue where Pokémon spawned by the "spawnallpokemon" command potentially receiving a raft.
- Fixed logspam on NeoForge when adorn is not installed
- Fixed Cobblemon crashing if it tries to load a bedrock model not meant for cobblemon (example: Qlipoth Awakening)
- Fixed Berries (and thus mulches) not being plantable on Farmers delight rich soil farmland
- Fixed wild Pokémon vanishing when third party mods try to tame them the "vanilla" way
- Fixed Pokémon not being able to path over skulk veins, pressure plates, fence gates, signs, lanterns, chains, and many other short blocks.
- Fixed some cases in which Pokémon could not path over fence posts situations.
- Fixed flyers not being able to do vertical takeoff if surrounded by blocks.
- Fixed swimming Pokémon attempting to swim up through solid blocks.
- Fixed Pokémon surface swimming diving downward a block for the duration of the swim.
- Improved flyers avoiding getting stuck on fence posts.
- Fixed air balloon battle text not correctly displaying the Pokémon or item name
- Fixed an issue where items retrieved from a Display case would disappear if a player's inventory is full
- Fixed Pokédex Scanner not respecting the "Invert Mouse" option.
- Fixed a crash due to a ConcurrentModificationException that could occur during world generation.
- Fixed Moon Ball moon phase logic to actually work correctly
- Fixed `/pokedex printcalculations` to now show the correct percentage completed of the Pokedex
- Fixed mod incompatibility with the `Raised` mod
- Fixed a vulnerability that could cause party and PC rollbacks under specific circumstances.
- Fixed a rare edge case where sorting your PC could be rolled back later.
### Developer
- A finished battle now has winners and losers set inside of `PokemonBattle` instead of them always being empty.
@@ -174,7 +336,31 @@
- Updated NPCEntity pokeball throw positioning to properly account for the baseScale property.
- Fixed `[Pokemon].copyFrom` error causing forms, IVs, and EVs to not be applied properly when using `[Pokemon].loadFromJSON` or `[Pokemon].loadFromNBT`
- Added new item class, `WearableItem`. Instances of this class should have a corresponding 3D model. These models render when the items display context is `HEAD`.
- Added new LearnsetQuery types:
- `LEGAL` for moves that are innately compatible and learnable by the Pokémon.
- `LEGACY` for moves that were once officially learnable by the Pokémon but aren't due to GameFreak's re-balancing.
- `SPECIAL` for moves that are not learnable by the Pokémon but may have appeared in a special event or distribution.
- Pokemon now have a fireImmune attribute in their behaviour that can be set to true to ignore all fire damage (lava, magma blocks, etc.)
`JSON
{
"behaviour": {
"fireImmune": true
}
}
`
- The IVs class has now been extended to include Hyper Trained values.
- Added `Pokemon#hyperTrainIV()` and `IVs#setHyperTrainedIV(Stat, Int)`.
- Added `HyperTrainedIvEvent.Pre` and `HyperTrainedIvEvent.Post`.
- Added `Pokemon#validateMoveSet()` to validate an existing Pokemon's moveset, clearing illegal moves.
- 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
### 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)
- The `requiredContext` for an item interaction evolution
@@ -192,7 +378,40 @@
- Added `pokemon` as an available Molang function for the `battleActor` functions.
- Fixed `heldItem` property inside spawn files not working and causing crashes
- Fixed `spawn_bedrock_particles` MoLang causing crashes when used in a server environment
- The following move sources are now valid for the `moves` array in species data:
- `legacy:{move}`
- `special:{move}`
- The Pokédex form lang key definition now follows `cobblemon.ui.pokedex.info.form.{species}-{formname}` instead of `cobblemon.ui.pokedex.info.form.{formname}`.
- Added `play_sound_on_server` as an available Molang function for the `worldHolder` & `player` functions.
- Added `run_molang_after` as an available Molang function for the `entity` functions when schedulable.
- Added an optional parameter for `run_molang` to schedule the function.
- Added `labels` & `has_label` as available Molang functions for the `speciesFunctions`
- Added datapack-defined starter categories via `data/<namespace>/starters/*.json`, with built-in fallback and `useConfigStarters` merge option.
- The format of the `remedies.json` file has changed to allow for individual friendshipDrop amounts per remedy
- Fixed `entity.find_nearby_block` causing crashes when attempting to use a block tag
- Spawn Filters can now access `v.spawn.class` to get the identifier of an NPC class for when trying to influence NPC spawns
- Added Molang functions for Party and PC: `set_pokemon`
- Added Molang functions for Pokémon: `pokeball`, `held_item`, `remove_held_item`, `hyper_train_iv`, `validate_moveset`, `initialize_moveset`, and `add_exp`.
- Added Molang functions for Pokémon: `aspects`, `form_aspects`, `unlearn_move`, `teach_learnable_moves`, `cosmetic_item`, and `remove_cosmetic_item`.
- Added Molang functions for Pokémon: `ability`, `set_iv`, `set_ev`, `teach_move`, and `can_learn_move`.
- Added Molang function `q.delete_variable(<struct>, <variable_name>)` to delete a value from a variable structure in MoLang data.
- Added Molang function `q.delete_variables(<struct>)` to delete all values from a variable structure in MoLang data.
- Adds Flows for `STARTER_CHOSEN`, `SHOULDER_MOUNTED`, `EV_GAINED`, `POKEMON_RELEASED`, `POKEMON_NICKNAMED`, `HELD_ITEM`, and `TRADE_COMPLETED` events
- Adds Flows for `POKEMON_HEALED`, `POKEMON_SCANNED`, `BERRY_HARVEST`, `LOOT_DROPPED`, `POKEMON_SEEN`, `COLLECT_EGG`, `HATCH_EGG`, and `EXPERIENCE_GAINED`.
- Adds Flows for `POKEMON_CATCH_RATE`, `BAIT_SET`, `BAIT_SET_PRE`, `BAIT_CONSUMED`, `POKEROD_CAST_PRE`, `POKEROD_CAST_POST`, `POKEROD_REEL`, and `BOBBER_SPAWN_POKEMON_PRE`.
- Adds Flows for `POKEMON_ASPECTS_CHANGED`, `FRIENDSHIP_UPDATED`, `CHANGE_PC_BOX_WALLPAPER_EVENT_PRE`, `CHANGE_PC_BOX_WALLPAPER_EVENT_POST`, and `FULLNESS_UPDATED`.
- MoLang triggered battles may now set the battle format, whether to clone the player's party, set level, or heal prior.
- Added Molang function for Player: `inventory`
- Adds Flows for `STARTER_CHOSEN`, `EV_GAINED`, `POKEMON_RELEASED`, `POKEMON_NICKNAMED`, `HELD_ITEM`, and `TRADE_COMPLETED` events
- Adds Pokemon functions for `pokeball`, `held_item`, `remove_held_item`, `add_aspects`, and `remove_aspects`
- Added `pokemon.hyper_train_iv` as an available Molang function.
- Added `prepare_{effect}` and `damage_{effect}` action effect hooks in battles for more battle particle effects.
- Added `q.has_argument(<argument_name>, [argument_value])` MoLang function to several battle-related action effect contexts.
- Added `q.has_argument_at(<index>, [argument_value])` MoLang function to several battle-related action effect contexts.
- Added `q.hit_count` MoLang function to move action effect contexts.
- Added `is_included`, `to_lower`, `to_upper`, and `string_length` as available Molang functions.
- Fixed a crash that would occur during battles if the opponent wild Pokémon species comes from a namespace other than cobblemon
- Fixed `clientActions` inside Dialogue pages being executed twice
## [1.6.1 (January 26th, 2025)](#1-6-1)
@@ -1007,6 +1226,7 @@
}
`
- Added support for custom stashes, similar to Gimmighoul's coin and scrap stashes.
- Added the ability to create custom brewing stand recipes.
### Localization
- Updated translations for:
@@ -2314,4 +2534,4 @@ Thank you so much to all of our community translators that bring the mod to the
- Added species, ability, and move translations for `ko_ko`, `jp_jp`, `fr_fr`, `es_es`, `it_it`, and `zh_cn`.
## [1.0.0 (November 12th, 2022)](#1-0-0)
- Initial release.
- Initial release.
+9
View File
@@ -0,0 +1,9 @@
- Nodemaker bug, it thinks jumps are possible from water up an entire block - they aint
https://gyazo.com/759b8285e7c07046ff2e54adf0d7a7ac
- Why is magikarp trying to path through ice
https://gyazo.com/ae230758c529f885eeb0dd91e60530d2
- We should use mixins to put the path node filtering from OmniPathNodeMaker in the base classes otherwise
NPC wandering will be jank too.
+1 -2
View File
@@ -1,11 +1,10 @@
plugins {
id("cobblemon.root-conventions")
id ("net.nemerosa.versioning") version "3.1.0"
}
version = "${project.property("mod_version")}+${project.property("mc_version")}"
val isSnapshot = project.property("snapshot")?.equals("true") ?: false
val isSnapshot = project.property("snapshot")?.equals("true") == true
if (isSnapshot) {
val fixedBranchName = versioning.info.branch.substringAfter("/")
version = "$version-${fixedBranchName}-${versioning.info.build}"
+3 -3
View File
@@ -1,8 +1,9 @@
import utilities.isSnapshot
import utilities.version
import java.time.OffsetDateTime
import java.time.ZoneOffset
import java.time.format.DateTimeFormatter
import utilities.isSnapshot
import utilities.version
/*
*
@@ -20,7 +21,6 @@ plugins {
id("net.kyori.blossom")
id("org.jetbrains.gradle.plugin.idea-ext")
id("net.nemerosa.versioning") version "3.1.0"
}
architectury {
@@ -6,3 +6,8 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
package com.cobblemon.mod.common;
public interface DoubleJump {
boolean isDoubleJumping();
}
@@ -9,15 +9,6 @@
package com.cobblemon.mod.common;
import com.cobblemon.mod.common.api.orientation.OrientationController;
import net.minecraft.util.Mth;
import net.minecraft.util.SmoothDouble;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.phys.Vec3;
import org.jetbrains.annotations.Nullable;
import org.joml.Matrix3f;
import org.joml.Vector3f;
import java.util.function.Function;
public interface OrientationControllable {
OrientationController getOrientationController();
@@ -11,12 +11,15 @@ 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;
@@ -34,34 +37,40 @@ public class LambDynamicLightsCompat {
public static void hookCompat() {
// Pokémon entities
DynamicLightHandlers.registerDynamicLightHandler(
CobblemonEntities.POKEMON,
DynamicLightHandler.makeHandler(
LambDynamicLightsCompat::resolvedPokemonLightLevel,
pokemon -> false
)
CobblemonEntities.POKEMON,
DynamicLightHandler.makeHandler(
LambDynamicLightsCompat::resolvedPokemonLightLevel,
pokemon -> false
)
);
// Shouldered Pokémon
DynamicLightHandlers.registerDynamicLightHandler(
EntityType.PLAYER,
DynamicLightHandler.makeHandler(
LambDynamicLightsCompat::resolvedShoulderLightLevel,
player -> false
)
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();
return extractFormLightLevel(pokemon.getForm(), underwater).orElse(0);
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 resolvedShoulderLightLevel(Player player) {
final var shoulderDataPair = PokemonOnShoulderRenderer.shoulderDataOf(player);
private static int resolvedPlayerLightLevel(Player player) {
var underwater = !player.level().getFluidState(BlockPos.containing(player.getX(), player.getEyeY(), player.getZ())).isEmpty();
final Optional<Integer> leftLightLevel = extractShoulderLightLevel(shoulderDataPair.getFirst(), underwater);
final Optional<Integer> rightLightLevel = extractShoulderLightLevel(shoulderDataPair.getSecond(), underwater);
return Math.max(leftLightLevel.orElse(0), rightLightLevel.orElse(0));
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) {
@@ -71,15 +80,23 @@ public class LambDynamicLightsCompat {
return Optional.of(form.getLightingData().getLightLevel());
}
private static Optional<Integer> extractShoulderLightLevel(@Nullable PokemonOnShoulderRenderer.ShoulderData shoulderData, boolean underwater) {
private static int extractShoulderLightLevel(@Nullable PokemonOnShoulderRenderer.ShoulderData shoulderData, boolean underwater) {
if (shoulderData == null) {
return Optional.empty();
return 0;
}
return extractFormLightLevel(shoulderData.getForm(), underwater);
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,17 @@
/*
* Copyright (C) 2023 Cobblemon Contributors
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
package com.cobblemon.mod.common.duck;
public interface ChannelDuck {
void cobblemon$applyLowPassFilter(float gain, float hfGain);
void cobblemon$inverseAttenuation(float rolloffFactor);
void cobblemon$clearFilters();
// void cobblemon$exponentialAttenuation(float rolloff, float refDistance, float maxDistance);
}
@@ -0,0 +1,18 @@
/*
* 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 org.joml.Vector3f;
public interface PlayerDuck {
void setDriverInput(Vector3f driverInput);
Vector3f getDriverInput();
void setLastSentDriverInput(Vector3f driverInput);
Vector3f getLastSentDriverInput();
}
@@ -6,8 +6,10 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
package com.cobblemon.mod.common.item
package com.cobblemon.mod.common.duck;
class GalaricaNutItem : CobblemonItem(Properties()) {
// Eventually, put some logic here for planting it or something
}
import net.minecraft.world.item.crafting.RecipeManager;
public interface RecipeAwareSlot {
void setRecipeManager(RecipeManager recipeManager);
}
@@ -0,0 +1,61 @@
/*
* Copyright (C) 2023 Cobblemon Contributors
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
package com.cobblemon.mod.common.mixin;
import com.cobblemon.mod.common.block.SaccharineLeafBlock;
import net.minecraft.core.BlockPos;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
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.ModifyVariable;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import org.spongepowered.asm.mixin.injection.callback.LocalCapture;
@Mixin(targets = "net.minecraft.world.entity.animal.Bee$BeeGrowCropGoal")
public abstract class BeeEntityMixin {
@Unique
private BlockState cobblemon$result = null;
@Inject(method = "tick()V", at = @At(
value = "INVOKE",
target = "Lnet/minecraft/world/level/block/BonemealableBlock;performBonemeal(Lnet/minecraft/server/level/ServerLevel;Lnet/minecraft/util/RandomSource;Lnet/minecraft/core/BlockPos;Lnet/minecraft/world/level/block/state/BlockState;)V",
shift = At.Shift.BY,
by = 2
),
locals = LocalCapture.CAPTURE_FAILHARD
)
private void injectCustomGrowth(CallbackInfo ci, int i, BlockPos blockPos, BlockState blockState, Block block) {
if (block instanceof SaccharineLeafBlock) {
int age = blockState.getValue(SaccharineLeafBlock.Companion.getAGE());
boolean waterlogged = blockState.getValue(BlockStateProperties.WATERLOGGED);
if (age < 2 && !waterlogged) {
this.cobblemon$result = blockState.setValue(SaccharineLeafBlock.Companion.getAGE(), age + 1);
}
}
}
@ModifyVariable(method = "tick", at = @At(value = "LOAD", ordinal = 0), index = 5)
private BlockState applyCustomBlockState(BlockState before) {
if(this.cobblemon$result != null && before == null) {
BlockState result = this.cobblemon$result;
this.cobblemon$result = null;
return result;
}
return before;
}
}
@@ -0,0 +1,69 @@
/*
* 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.duck.ChannelDuck;
import com.mojang.blaze3d.audio.Channel;
import org.lwjgl.openal.AL10;
import org.lwjgl.openal.EXTEfx;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
@Mixin(Channel.class)
public abstract class ChannelMixin implements ChannelDuck {
@Shadow
private int source;
// Id of filter applied when sound is obstructed
private int cobblemon$lowPassFilterId = 0;
@Override
public void cobblemon$applyLowPassFilter(float gain, float hfGain) {
// Delete old filter if it exists
if (cobblemon$lowPassFilterId != 0) {
AL10.alSourcei(source, EXTEfx.AL_DIRECT_FILTER, 0); // Detach filter from source
EXTEfx.alDeleteFilters(cobblemon$lowPassFilterId); // Delete old filter
cobblemon$lowPassFilterId = 0;
}
// Generate a fresh filter
int filterId = EXTEfx.alGenFilters();
if (!EXTEfx.alIsFilter(filterId)) {
System.err.println("Failed to create OpenAL low-pass filter");
return;
}
EXTEfx.alFilteri(filterId, EXTEfx.AL_FILTER_TYPE, EXTEfx.AL_FILTER_LOWPASS);
EXTEfx.alFilterf(filterId, EXTEfx.AL_LOWPASS_GAIN, gain);
EXTEfx.alFilterf(filterId, EXTEfx.AL_LOWPASS_GAINHF, hfGain);
AL10.alSourcei(source, EXTEfx.AL_DIRECT_FILTER, filterId);
// Save the new filter ID
cobblemon$lowPassFilterId = filterId;
}
@Override
public void cobblemon$inverseAttenuation(float rolloffFactor) {
AL10.alSourcei(source, AL10.AL_DISTANCE_MODEL, AL10.AL_INVERSE_DISTANCE);
AL10.alSourcef(source, AL10.AL_ROLLOFF_FACTOR, rolloffFactor);
AL10.alSourcef(source, AL10.AL_REFERENCE_DISTANCE, 1.0f);
AL10.alSourcef(source, AL10.AL_MAX_DISTANCE, 0.0f);
}
@Override
public void cobblemon$clearFilters() {
AL10.alSourcei(source, EXTEfx.AL_DIRECT_FILTER, 0);
if (EXTEfx.alIsFilter(cobblemon$lowPassFilterId)) {
EXTEfx.alDeleteFilters(cobblemon$lowPassFilterId);
cobblemon$lowPassFilterId = 0;
}
}
}
@@ -0,0 +1,54 @@
/*
* 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 net.minecraft.client.multiplayer.ClientLevel;
import net.minecraft.client.multiplayer.ClientPacketListener;
import net.minecraft.network.protocol.game.ClientboundSetPassengersPacket;
import net.minecraft.world.entity.Entity;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Objects;
@Mixin(ClientPacketListener.class)
public class ClientPacketListenerMixin {
@Shadow private ClientLevel level;
@Inject(method = "handleSetEntityPassengersPacket", at = @At(value = "INVOKE_ASSIGN", target = "Lnet/minecraft/world/entity/Entity;hasIndirectPassenger(Lnet/minecraft/world/entity/Entity;)Z", shift = At.Shift.BEFORE), cancellable = true)
private void cobblemon$handlePokemonPassengers(ClientboundSetPassengersPacket packet, CallbackInfo ci) {
Entity entity = this.level.getEntity(packet.getVehicle());
if (entity instanceof PokemonEntity pokemon) {
var passengers = new ArrayList<Entity>();
for (int passenger : packet.getPassengers()) {
passengers.add(this.level.getEntity(passenger));
}
Arrays
.stream(pokemon.getOccupiedSeats())
.filter(x -> !passengers.contains(x))
.filter(Objects::nonNull)
.forEach(Entity::stopRiding);
var occupiedSeats = Arrays.asList(pokemon.getOccupiedSeats());
passengers.stream()
.filter(x -> !occupiedSeats.contains(x))
.filter(Objects::nonNull)
.forEach(x -> x.startRiding(pokemon, true));
ci.cancel();
}
}
}
@@ -0,0 +1,61 @@
/*
* 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.pokemon.ai.EntityBehaviour;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.world.entity.Mob;
import net.minecraft.world.entity.ai.goal.AvoidEntityGoal;
import net.minecraft.world.entity.monster.Creeper;
import net.minecraft.world.level.Level;
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(Creeper.class)
public class EntityCreeperMixin extends Mob {
private EntityCreeperMixin(net.minecraft.world.entity.EntityType<? extends Creeper> entityType, Level world) {
super(entityType, world);
}
@Inject(method = "registerGoals", at = @At(value = "TAIL"), cancellable = false)
private void cobblemon$initGoals(CallbackInfo callbackInfo) {
final Creeper creeper = (Creeper) (Object) this;
// Pokemon Entities
this.goalSelector.addGoal(
3,
new AvoidEntityGoal<>(
creeper,
PokemonEntity.class,
6.0f,
1.0,
1.2,
entity -> ((PokemonEntity)entity).getBehaviour().getEntityInteract().getAvoidedByCreeper() && ((PokemonEntity)entity).getBeamMode() != 1
)
);
// Players with shoulder mounted Pokemon
this.goalSelector.addGoal(
3,
new AvoidEntityGoal<>(
creeper,
ServerPlayer.class,
6.0f,
1.0,
1.2,
entity -> EntityBehaviour.Companion.hasCreeperFearedShoulderMount((ServerPlayer)entity)
)
);
}
}
@@ -9,20 +9,19 @@
package com.cobblemon.mod.common.mixin;
import com.cobblemon.mod.common.client.CobblemonClient;
import com.cobblemon.mod.common.client.render.MatrixWrapper;
import com.cobblemon.mod.common.client.render.models.blockbench.PosableModel;
import com.cobblemon.mod.common.client.render.models.blockbench.PosableState;
import com.cobblemon.mod.common.entity.PosableEntity;
import com.mojang.blaze3d.vertex.PoseStack;
import com.mojang.blaze3d.vertex.VertexConsumer;
import net.minecraft.client.renderer.LevelRenderer;
import net.minecraft.client.renderer.MultiBufferSource;
import net.minecraft.client.renderer.RenderType;
import net.minecraft.client.renderer.entity.EntityRenderDispatcher;
import net.minecraft.client.renderer.entity.EntityRenderer;
import net.minecraft.client.resources.PlayerSkin;
import net.minecraft.server.packs.resources.ResourceManager;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.phys.AABB;
import net.minecraft.world.phys.Vec3;
import org.joml.Vector3f;
import org.spongepowered.asm.mixin.Debug;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
@@ -30,11 +29,6 @@ import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import java.util.Map;
import net.minecraft.client.renderer.entity.EntityRenderDispatcher;
import net.minecraft.client.renderer.entity.EntityRenderer;
import net.minecraft.client.resources.PlayerSkin;
import net.minecraft.server.packs.resources.ResourceManager;
import net.minecraft.world.entity.player.Player;
@Mixin(EntityRenderDispatcher.class)
public class EntityRenderDispatcherMixin {
@@ -77,6 +71,23 @@ public class EntityRenderDispatcherMixin {
0F,
1F
);
/*if (locator.contains("middle")){
PoseStack.Pose pose = poseStack.last();
Vector3f vec = matrix.getMatrix().getRotation(new AxisAngle4f()).transform(new Vector3f(0, 0, -1));
buffer.addVertex(pose, pos.toVector3f()).setColor(0xffff00ff).setNormal(pose, vec.x, vec.y, vec.z); //Forward, pink
buffer.addVertex(pose, (float)(pos.x() + vec.x), (float)(pos.y() + vec.y), (float)(pos.z() + vec.z)).setColor(0xffff00ff).setNormal(pose, vec.x, vec.y, vec.z);
vec = matrix.getMatrix().getRotation(new AxisAngle4f()).transform(new Vector3f(0, 1, 0));
buffer.addVertex(pose, pos.toVector3f()).setColor(0xffffff00).setNormal(pose, vec.x, vec.y, vec.z); //Up, yellow
buffer.addVertex(pose, (float)(pos.x() + vec.x), (float)(pos.y() + vec.y), (float)(pos.z() + vec.z)).setColor(0xffffff00).setNormal(pose, vec.x, vec.y, vec.z);
vec = matrix.getMatrix().getRotation(new AxisAngle4f()).transform(new Vector3f(-1, 0, 0));
buffer.addVertex(pose, pos.toVector3f()).setColor(0xff00ffff).setNormal(pose, vec.x, vec.y, vec.z); //Left, cyan
buffer.addVertex(pose, (float)(pos.x() + vec.x), (float)(pos.y() + vec.y), (float)(pos.z() + vec.z)).setColor(0xff00ffff).setNormal(pose, vec.x, vec.y, vec.z);
}*/
poseStack.popPose();
});
@@ -0,0 +1,62 @@
/*
* 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.pokemon.ai.EntityBehaviour;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.Mob;
import net.minecraft.world.entity.ai.goal.AvoidEntityGoal;
import net.minecraft.world.entity.monster.AbstractSkeleton;
import net.minecraft.world.level.Level;
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(AbstractSkeleton.class)
public class EntitySkeletonMixin extends Mob {
private EntitySkeletonMixin(EntityType<? extends Mob> entityType, Level world) {
super(entityType, world);
}
@Inject(method = "registerGoals", at = @At(value = "TAIL"))
private void cobblemon$initGoals(CallbackInfo callbackInfo) {
final AbstractSkeleton skeleton = (AbstractSkeleton) (Object) this;
// Pokemon Entities
this.goalSelector.addGoal(
3,
new AvoidEntityGoal<>(
skeleton,
PokemonEntity.class,
6.0f,
1.0,
1.2,
entity -> ((PokemonEntity)entity).getBehaviour().getEntityInteract().getAvoidedBySkeleton() && ((PokemonEntity)entity).getBeamMode() != 1
)
);
// Players with shoulder mounted Pokemon
this.goalSelector.addGoal(
3,
new AvoidEntityGoal<>(
skeleton,
ServerPlayer.class,
6.0f,
1.0,
1.2,
entity -> EntityBehaviour.Companion.hasSkeletonFearedShoulderMount((ServerPlayer)entity)
)
);
}
}
@@ -25,7 +25,7 @@ public abstract class EntityVillagerMixin {
@Inject(method = "wantsToPickUp", at = @At(value = "RETURN"), cancellable = true)
private void cobblemon$canGather(ItemStack stack, CallbackInfoReturnable<Boolean> ci) {
final Villager villager = (Villager) (Object) this;
if(ci.getReturnValue() == false && Objects.equals(villager.getVillagerData().getProfession(), VillagerProfession.FARMER) && villager.getInventory().canAddItem(stack)) {
if (ci.getReturnValue() == false && Objects.equals(villager.getVillagerData().getProfession(), VillagerProfession.FARMER) && villager.getInventory().canAddItem(stack)) {
if(VillagerGatherableItems.INSTANCE.getVillagerGatherableItems().contains(stack.getItem()))
ci.setReturnValue(true);
}
@@ -0,0 +1,44 @@
/*
* Copyright (C) 2023 Cobblemon Contributors
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
package com.cobblemon.mod.common.mixin;
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.LightningBolt;
import net.minecraft.world.phys.AABB;
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;
import java.util.List;
@Mixin(LightningBolt.class)
public abstract class LightningBoltMixin {
@Inject(method = "spawnFire", at = @At(value = "Head"), cancellable = true)
private void cobblemon$spawnFire(int extraIgnitions, CallbackInfo ci) {
// This prevents fire from spawning around Pokemon who otherwise should be immune to lightning and effectively absorb the hit
final LightningBolt lightningBolt = (LightningBolt) (Object) this;
List<Entity> list = lightningBolt.level().getEntities(
lightningBolt,
new AABB(lightningBolt.getX() - 2.0, lightningBolt.getY() - 2.0, lightningBolt.getZ() - 2.0, lightningBolt.getX() + 2.0, lightningBolt.getY() + 2.0, lightningBolt.getZ() + 2.0),
it -> {
if (!it.isAlive() || !(it instanceof PokemonEntity)) {
return false;
}
String abilityName = ((PokemonEntity) it).getPokemon().getAbility().getName();
return abilityName.equals("lightningrod") || abilityName.equals("voltabsorb") || abilityName.equals("motordrive");
});
if (!list.isEmpty()) {
ci.cancel();
}
}
}
@@ -8,17 +8,44 @@
package com.cobblemon.mod.common.mixin;
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.Seat;
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 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.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;
import org.joml.Quaternionf;
import org.joml.Vector3f;
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.callback.CallbackInfo;
@Mixin(LivingEntity.class)
public abstract class LivingEntityMixin {
public abstract class LivingEntityMixin extends Entity implements OrientationControllable {
public LivingEntityMixin(EntityType<?> entityType, Level level) {
super(entityType, level);
}
@Unique
private final OrientationController cobblemon$orientationController = new OrientationController((LivingEntity) (Object) this);
public OrientationController getOrientationController() {
return cobblemon$orientationController;
}
@Inject(method = "onEffectRemoved", at = @At(value = "TAIL"))
private void cobblemon$onEffectRemoved(MobEffectInstance effect, CallbackInfo ci) {
@@ -28,4 +55,67 @@ public abstract class LivingEntityMixin {
}
}
@Override
public @NotNull HitResult pick(double hitDistance, float partialTicks, boolean hitFluids) {
Entity vehicle = this.getVehicle();
if (vehicle instanceof PokemonEntity pokemonEntity) {
int seatIndex = pokemonEntity.getPassengers().indexOf(this);
Seat seat = pokemonEntity.getSeats().get(seatIndex);
PokemonClientDelegate delegate = (PokemonClientDelegate) pokemonEntity.getDelegate();
MatrixWrapper locator = delegate.getLocatorStates().get(seat.getLocator());
Vec3 locatorOffset = new Vec3(locator.getMatrix().getTranslation(new Vector3f()));
Vec3 eyePosition = cobblemon$getEyePosition(partialTicks, pokemonEntity, locatorOffset);
Vec3 viewVector = this.getViewVector(partialTicks);
Vec3 viewDistanceVector = eyePosition.add(viewVector.x * hitDistance, viewVector.y * hitDistance, viewVector.z * hitDistance);
return this.level()
.clip(
new ClipContext(
eyePosition, viewDistanceVector, ClipContext.Block.OUTLINE, hitFluids ? net.minecraft.world.level.ClipContext.Fluid.ANY : net.minecraft.world.level.ClipContext.Fluid.NONE, this
)
);
}
return super.pick(hitDistance, partialTicks, hitFluids);
}
@Unique
private Vec3 cobblemon$getEyePosition(float partialTicks, PokemonEntity pokemonEntity, Vec3 locatorOffset) {
OrientationController controller = this.getOrientationController();
float currEyeHeight = this.getEyeHeight();
Vec3 offset = locatorOffset.add(pokemonEntity.position());
if (controller.isActive() && controller.getOrientation() != null) {
Quaternionf orientation = controller.getRenderOrientation(partialTicks);
Vec3 rotatedEyeHeight = new Vec3(orientation.transform(new Vector3f(0f, currEyeHeight - (this.getBbHeight() / 2), 0f)));
offset.add(rotatedEyeHeight);
}
return offset;
}
@Inject(method = "tick", at = @At("HEAD"))
private void cobblemon$updateRenderOrientation(CallbackInfo ci) {
this.cobblemon$orientationController.tick();
}
@Override
public void absMoveTo(double x, double y, double z, float yaw, float pitch) {
if (cobblemon$orientationController.getActive()) {
this.absMoveTo(x, y, z);
this.setYRot(yaw % 360.0f);
this.setXRot(pitch % 360.0f);
this.yRotO = this.getYRot();
this.xRotO = this.getXRot();
} else {
this.absMoveTo(x, y, z);
this.absRotateTo(yaw, pitch);
}
}
}
@@ -1,37 +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.mixin;
import net.minecraft.client.player.LocalPlayer;
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
@Mixin(LocalPlayer.class)
public abstract class LocalPlayerMixin {
@Shadow
private float jumpRidingScale;
@Inject(method = "getJumpRidingScale", at = @At("HEAD"), cancellable = true)
public void modifyJumpRidingScale(CallbackInfoReturnable<Float> cir) {
LocalPlayer player = (LocalPlayer) (Object) this;
if (player.isPassenger() && player.getVehicle() instanceof PokemonEntity pokemonEntity) {
var rideValue = pokemonEntity.<Float>ifRidingAvailableSupply(null, (behaviour, settings, state) -> {
if (behaviour.canJump(settings, state, pokemonEntity, player)) return null;
return behaviour.setRideBar(settings, state, pokemonEntity, player);
});
if (rideValue != null) {
cir.setReturnValue(rideValue);
}
}
}
}
@@ -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.mixin;
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity;
import com.cobblemon.mod.common.pokemon.ai.EntityBehaviour;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.world.entity.ai.goal.Goal;
import net.minecraft.world.entity.monster.Phantom;
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.callback.CallbackInfo;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
@Mixin(targets = "net.minecraft.world.entity.monster.Phantom$PhantomSweepAttackGoal")
public abstract class PhantomSweepAttackGoalMixin extends Goal {
@Unique
private Phantom phantomSelf; // Allows access to the outer class
@Inject(method = "<init>", at = @At("TAIL"))
private void onInit(Phantom phantom, CallbackInfo ci) {
this.phantomSelf = phantom;
}
@Inject(method = "canContinueToUse", at = @At("RETURN"), cancellable = true)
private void modifyCanContinueToUse(CallbackInfoReturnable<Boolean> cir) {
Phantom phantom = this.phantomSelf; // Outer class instance
if(phantom == null) return;
if (cir.getReturnValue()) {
var nearbyFearedEntities = phantom.level().getEntities(phantom, phantom.getBoundingBox().inflate(16.0),
(entity -> ((entity instanceof PokemonEntity && ((PokemonEntity) entity).getBeamMode() == 0 && ((PokemonEntity) entity).getBehaviour().getEntityInteract().getAvoidedByPhantom())
|| (entity instanceof ServerPlayer && EntityBehaviour.Companion.hasPhantomFearedShoulderMount((ServerPlayer)entity)))));
if (!nearbyFearedEntities.isEmpty()) {
nearbyFearedEntities.forEach(entity -> {
if (entity instanceof PokemonEntity) {
((PokemonEntity) entity).cry();
}
//TODO: Find a way to make shoulder mounted Pokemon cry
});
cir.setReturnValue(false);
}
}
}
}
@@ -22,9 +22,9 @@ public class PiglinBarterMixin {
@Inject(method = "isBarterCurrency", at = @At(value = "RETURN"), cancellable = true)
private static void cobblemon$acceptsForBarter(ItemStack stack, CallbackInfoReturnable<Boolean> ci) {
if(!ci.getReturnValue()) {
if (!ci.getReturnValue()) {
//TODO: Make a tag?
if(stack.is(CobblemonItems.RELIC_COIN_POUCH))
if (stack.is(CobblemonItems.RELIC_COIN_POUCH))
ci.setReturnValue(true);
}
}
@@ -15,12 +15,10 @@ import com.cobblemon.mod.common.api.events.CobblemonEvents;
import com.cobblemon.mod.common.api.events.item.LeftoversCreatedEvent;
import com.cobblemon.mod.common.api.orientation.OrientationController;
import com.cobblemon.mod.common.api.pokemon.PokemonSpecies;
import com.cobblemon.mod.common.api.riding.Seat;
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.client.entity.PokemonClientDelegate;
import com.cobblemon.mod.common.client.render.MatrixWrapper;
import com.cobblemon.mod.common.duck.PlayerDuck;
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity;
import com.cobblemon.mod.common.pokedex.scanner.PokedexEntityData;
import com.cobblemon.mod.common.pokedex.scanner.ScannableEntity;
@@ -40,17 +38,16 @@ import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.server.level.ServerPlayer;
import net.minecraft.world.damagesource.DamageSource;
import net.minecraft.world.entity.*;
import net.minecraft.world.entity.EntityDimensions;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.Pose;
import net.minecraft.world.entity.item.ItemEntity;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.food.FoodProperties;
import net.minecraft.world.item.ItemStack;
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.Nullable;
import org.joml.Matrix3f;
import org.joml.Vector3f;
import org.objectweb.asm.Opcodes;
import org.spongepowered.asm.mixin.Final;
@@ -66,7 +63,12 @@ import java.util.*;
import java.util.stream.Collectors;
@Mixin(Player.class)
public abstract class PlayerMixin extends LivingEntity implements ScannableEntity, OrientationControllable {
public abstract class PlayerMixin extends LivingEntity implements ScannableEntity, OrientationControllable, PlayerDuck {
@Unique
private Vector3f cobblemon$driverInput;
@Unique
private Vector3f cobblemon$lastSentDriverInput;
@Shadow public abstract CompoundTag getShoulderEntityLeft();
@@ -86,8 +88,8 @@ public abstract class PlayerMixin extends LivingEntity implements ScannableEntit
@Shadow @Final private static Map<Pose, EntityDimensions> POSES;
@Shadow @Final public static EntityDimensions STANDING_DIMENSIONS;
@Unique
private final OrientationController cobblemon$orientationController = new OrientationController(this);
@Shadow protected int jumpTriggerTime;
@Unique private final OrientationController cobblemon$orientationController = new OrientationController(this);
protected PlayerMixin(EntityType<? extends LivingEntity> p_20966_, Level p_20967_) {
super(p_20966_, p_20967_);
@@ -286,39 +288,23 @@ public abstract class PlayerMixin extends LivingEntity implements ScannableEntit
}
@Override
public HitResult pick(double hitDistance, float partialTicks, boolean hitFluids) {
Entity vehicle = this.getVehicle();
if (vehicle instanceof PokemonEntity pokemonEntity) {
int seatIndex = pokemonEntity.getPassengers().indexOf(this);
Seat seat = pokemonEntity.getSeats().get(seatIndex);
PokemonClientDelegate delegate = (PokemonClientDelegate) pokemonEntity.getDelegate();
MatrixWrapper locator = delegate.getLocatorStates().get(seat.getLocator());
if (locator == null) {
super.pick(hitDistance, partialTicks, hitFluids);
}
Vec3 locatorOffset = new Vec3(locator.getMatrix().getTranslation(new Vector3f()));
OrientationController controller = this.getOrientationController();
float currEyeHeight = this.getEyeHeight();
Matrix3f orientation = controller.isActive() && controller.getOrientation() != null ? controller.getOrientation() : new Matrix3f();
Vec3 rotatedEyeHeight = new Vec3(orientation.transform(new Vector3f(0f, currEyeHeight - (this.getBbHeight() / 2), 0f)));
Vec3 eyePosition = locatorOffset.add(pokemonEntity.position()).add(rotatedEyeHeight);
Vec3 viewVector = this.getViewVector(partialTicks);
Vec3 viewDistanceVector = eyePosition.add(viewVector.x * hitDistance, viewVector.y * hitDistance, viewVector.z * hitDistance);
return this.level()
.clip(
new ClipContext(
eyePosition, viewDistanceVector, ClipContext.Block.OUTLINE, hitFluids ? net.minecraft.world.level.ClipContext.Fluid.ANY : net.minecraft.world.level.ClipContext.Fluid.NONE, this
)
);
}
return super.pick(hitDistance, partialTicks, hitFluids);
public void setDriverInput(Vector3f driverInput) {
cobblemon$driverInput = driverInput;
}
@Override
public Vector3f getDriverInput() {
return cobblemon$driverInput;
}
@Override
public void setLastSentDriverInput(Vector3f lastSentDriverInput) {
cobblemon$lastSentDriverInput = lastSentDriverInput;
}
@Override
public Vector3f getLastSentDriverInput() {
return cobblemon$lastSentDriverInput;
}
}
@@ -21,9 +21,9 @@ import org.spongepowered.asm.mixin.injection.Slice;
public abstract class PointedDripstoneBlockMixin {
@Redirect(
method = "canTipGrow(Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/server/level/ServerLevel;Lnet/minecraft/core/BlockPos;)Z",
at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/block/state/BlockState;is(Lnet/minecraft/world/level/Block;)Z", ordinal = 0),
slice = @Slice(from = @At(value = "FIELD", target = "Lnet/minecraft/world/level/block/Blocks;DRIPSTONE_BLOCK:Lnet/minecraft/world/level/Block;"))
method = "canGrow(Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/world/level/block/state/BlockState;)Z",
at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/block/state/BlockState;is(Lnet/minecraft/world/level/block/Block;)Z", ordinal = 0),
slice = @Slice(from = @At(value = "FIELD", target = "Lnet/minecraft/world/level/block/Blocks;DRIPSTONE_BLOCK:Lnet/minecraft/world/level/block/Block;"))
)
private static boolean cobblemon$validateMoonStoneDripstone(BlockState instance, Block block) {
return instance.is(CobblemonBlockTags.DRIPSTONE_GROWABLE);
@@ -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.mixin;
import net.minecraft.stats.RecipeBookSettings;
import net.minecraft.world.inventory.RecipeBookType;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import java.util.Map;
@Mixin(RecipeBookSettings.class)
public class RecipeBookSettingsMixin {
@Shadow @Final public Map<RecipeBookType, RecipeBookSettings.TypeSettings> states;
@Inject(method = "<init>", at = @At("TAIL"))
private void cobblemon$init(CallbackInfo ci) {
states.put(RecipeBookType.valueOf("COOKING_POT"), new RecipeBookSettings.TypeSettings(true, true));
}
}
@@ -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;
import net.minecraft.world.inventory.RecipeBookType;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Mutable;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.gen.Invoker;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import java.util.ArrayList;
import java.util.List;
@Mixin(value = RecipeBookType.class)
public class RecipeBookTypeMixin {
@Final
@Mutable
@Shadow
private static RecipeBookType[] $VALUES; // moj
@Invoker("<init>")
private static RecipeBookType cobblemon$createBookType(String name, int ordinal) {
throw new AssertionError();
}
@Inject(
method = "<clinit>",
at = @At("TAIL")
)
private static void cobblemon$addRecipeBookType(CallbackInfo ci) {
ArrayList<RecipeBookType> types = new ArrayList<>(List.of($VALUES));
types.add(cobblemon$createBookType("COOKING_POT", $VALUES.length));
$VALUES = types.toArray(RecipeBookType[]::new);
}
}
@@ -12,9 +12,11 @@ import com.cobblemon.mod.common.CobblemonNetwork;
import com.cobblemon.mod.common.OrientationControllable;
import com.cobblemon.mod.common.api.net.NetworkPacket;
import com.cobblemon.mod.common.api.orientation.OrientationController;
import com.cobblemon.mod.common.duck.PlayerDuck;
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity;
import com.cobblemon.mod.common.mixin.accessor.ChunkMapAccessor;
import com.cobblemon.mod.common.mixin.accessor.TrackedEntityAccessor;
import com.cobblemon.mod.common.net.messages.client.orientation.ClientboundUpdateDriverInputPacket;
import com.cobblemon.mod.common.net.messages.client.orientation.ClientboundUpdateOrientationPacket;
import com.cobblemon.mod.common.net.messages.client.pokemon.update.ClientboundUpdateRidingStatePacket;
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
@@ -26,6 +28,7 @@ import net.minecraft.server.level.ServerPlayer;
import net.minecraft.server.network.ServerPlayerConnection;
import net.minecraft.world.entity.Entity;
import org.joml.Matrix3f;
import org.joml.Vector3f;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
@@ -55,17 +58,20 @@ public abstract class ServerEntityMixin {
private void cobblemon$sendChanges(CallbackInfo ci) {
cobblemon$sendOrientationChanges();
cobblemon$sendRidingStateChanges();
cobblemon$sendDriverInput();
}
private void cobblemon$sendRidingStateChanges() {
if (!(this.entity instanceof PokemonEntity pokemonEntity)) return;
if (pokemonEntity.getRidingState() == null) return;
if (pokemonEntity.getRiding() == null) return;
var ridingBehaviour = pokemonEntity.getRiding();
var ridingState = pokemonEntity.getRidingState();
if (pokemonEntity.getRidingController() == null) return;
var ridingController = pokemonEntity.getRidingController();
if (ridingController.getContext() == null) return;
var context = ridingController.getContext();
var ridingBehaviour = context.getBehaviour();
var ridingState = context.getState();
var previousRidingState = pokemonEntity.getPreviousRidingState();
if (previousRidingState != null && !ridingState.shouldSync(previousRidingState)) return;
cobblemon$broadcast(new ClientboundUpdateRidingStatePacket(pokemonEntity.getId(), ridingBehaviour.getKey(), pokemonEntity.getRidingState(), null));
cobblemon$broadcast(new ClientboundUpdateRidingStatePacket(pokemonEntity.getId(), ridingBehaviour, ridingState, null));
}
private void cobblemon$sendOrientationChanges() {
@@ -82,6 +88,19 @@ public abstract class ServerEntityMixin {
cobblemon$broadcast(new ClientboundUpdateOrientationPacket(currOrientation, currActive, entity.getId()));
}
private void cobblemon$sendDriverInput() {
if (!(this.entity instanceof ServerPlayer serverPlayer)) return;
if(!(serverPlayer.getVehicle() instanceof PokemonEntity)) return;
Vector3f driverInput = ((PlayerDuck)serverPlayer).getDriverInput();
if(driverInput == null) return;
// If no change in input is detected then don't send a new packet
Vector3f lastSentDriverInput = ((PlayerDuck)serverPlayer).getLastSentDriverInput();
if (driverInput.equals(lastSentDriverInput)) return;
((PlayerDuck)serverPlayer).setLastSentDriverInput(driverInput);
cobblemon$broadcast(new ClientboundUpdateDriverInputPacket(driverInput, entity.getId()));
}
private void cobblemon$broadcast(NetworkPacket<?> packet) {
if (!(entity.level() instanceof ServerLevel level)) return;
ChunkMap chunkMap = level.getChunkSource().chunkMap;
@@ -97,5 +116,4 @@ public abstract class ServerEntityMixin {
}
}
}
@@ -0,0 +1,44 @@
/*
* Copyright (C) 2023 Cobblemon Contributors
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
package com.cobblemon.mod.common.mixin;
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity;
import net.minecraft.core.BlockPos;
import net.minecraft.server.level.ServerLevel;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.phys.AABB;
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.List;
import java.util.Optional;
@Mixin(ServerLevel.class)
public abstract class ServerLevelMixin {
@Inject(method = "findLightningRod", at = @At(value = "RETURN"), cancellable = true)
private void cobblemon$findLightningRod(BlockPos blockPos, CallbackInfoReturnable<Optional<BlockPos>> ci) {
final ServerLevel serverLevel = (ServerLevel) (Object) this;
if (ci.getReturnValue().isEmpty()) {
// Search for Pokemon with the ability Lightning Rod and redirect to them
AABB aABB = AABB.encapsulatingFullBlocks(blockPos, new BlockPos(blockPos.atY(serverLevel.getMaxBuildHeight()))).inflate(64.0);
List<LivingEntity> list = serverLevel.getEntitiesOfClass(LivingEntity.class, aABB, (livingEntity) -> livingEntity != null
&& livingEntity.isAlive()
&& livingEntity instanceof PokemonEntity
&& ((PokemonEntity) livingEntity).getBeamMode() == 0
&& ((PokemonEntity) livingEntity).getPokemon().getAbility().getName().equals("lightningrod"));
if (!list.isEmpty()) {
ci.setReturnValue(Optional.of((list.get(serverLevel.random.nextInt(list.size()))).blockPosition()));
}
}
}
}
@@ -10,7 +10,10 @@ package com.cobblemon.mod.common.mixin;
import com.cobblemon.mod.common.OrientationControllable;
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity;
import com.llamalad7.mixinextras.injector.ModifyExpressionValue;
import com.llamalad7.mixinextras.sugar.Local;
import net.minecraft.server.level.ServerPlayer;
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;
@@ -43,4 +46,10 @@ public abstract class ServerPlayerMixin {
controllable.getOrientationController().setActive(false);
}
//TODO: Switch to sending out on load instead of preventing saving
@ModifyExpressionValue(method = "addAdditionalSaveData", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/entity/Entity;hasExactlyOnePlayerPassenger()Z"))
private boolean cobblemon$cancelSavingPokemonMounts(boolean original, @Local(ordinal=0) Entity entity) {
return original && !(entity instanceof PokemonEntity);
}
}
@@ -0,0 +1,50 @@
/*
* Copyright (C) 2023 Cobblemon Contributors
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
package com.cobblemon.mod.common.mixin;
import com.cobblemon.mod.common.block.HeartyGrainsBlock;
import com.llamalad7.mixinextras.sugar.Local;
import net.minecraft.core.BlockPos;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.WorldGenLevel;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.DoublePlantBlock;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.block.state.properties.DoubleBlockHalf;
import net.minecraft.world.level.levelgen.feature.FeaturePlaceContext;
import net.minecraft.world.level.levelgen.feature.SimpleBlockFeature;
import net.minecraft.world.level.levelgen.feature.configurations.SimpleBlockConfiguration;
import org.spongepowered.asm.mixin.Debug;
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(SimpleBlockFeature.class)
@Debug(export = true, print = true)
public class SimpleBlockFeatureMixin {
//this mixin inserts the logic needed to ensure that when hearty grains are of a certain age, they place with the upper block too
//similarly to what the doubleblock logic is here
@Inject(method = "place", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/block/state/BlockState;canSurvive(Lnet/minecraft/world/level/LevelReader;Lnet/minecraft/core/BlockPos;)Z", shift = At.Shift.AFTER), cancellable = true)
public void place(FeaturePlaceContext<SimpleBlockConfiguration> context, CallbackInfoReturnable<Boolean> cir,
@Local BlockState blockState, @Local BlockPos blockPos, @Local WorldGenLevel worldGenLevel) {
if (!(blockState.getBlock() instanceof HeartyGrainsBlock)) {
return;
}
if (blockState.getValue(HeartyGrainsBlock.Companion.getAGE()) <= HeartyGrainsBlock.AGE_AFTER_HARVEST) {
return; //block is too young to be double
}
if (!worldGenLevel.isEmptyBlock(blockPos.above())) {
cir.setReturnValue(false); //no space for the 2nd block above
return;
}
DoublePlantBlock.placeAt(worldGenLevel, blockState, blockPos, Block.UPDATE_CLIENTS);
cir.setReturnValue(true);
}
}
@@ -8,23 +8,33 @@
package com.cobblemon.mod.common.mixin;
import com.cobblemon.mod.common.api.riding.sound.RideAttenuationModel;
import com.cobblemon.mod.common.api.riding.sound.RideLoopSound;
import com.cobblemon.mod.common.client.sound.BattleMusicController;
import com.cobblemon.mod.common.duck.ChannelDuck;
import com.cobblemon.mod.common.duck.SoundEngineDuck;
import com.google.common.collect.Multimap;
import com.llamalad7.mixinextras.sugar.Local;
import com.mojang.blaze3d.audio.Channel;
import net.minecraft.client.resources.sounds.Sound;
import net.minecraft.client.resources.sounds.SoundInstance;
import net.minecraft.client.resources.sounds.TickableSoundInstance;
import net.minecraft.client.sounds.ChannelAccess;
import net.minecraft.client.sounds.SoundEngine;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.sounds.SoundSource;
import net.minecraft.world.phys.Vec3;
import org.jetbrains.annotations.Nullable;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.Redirect;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import org.spongepowered.asm.mixin.injection.callback.LocalCapture;
import java.util.Iterator;
import java.util.Map;
@Mixin(SoundEngine.class)
@@ -45,6 +55,86 @@ 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);
@@ -8,12 +8,10 @@
package com.cobblemon.mod.common.mixin;
import com.cobblemon.mod.common.client.sound.BlockEntitySoundTracker;
import com.cobblemon.mod.common.client.sound.EntitySoundTracker;
import com.cobblemon.mod.common.client.sound.BattleMusicController;
import com.cobblemon.mod.common.client.sound.SoundTracker;
import com.cobblemon.mod.common.duck.SoundManagerDuck;
import com.cobblemon.mod.common.duck.SoundEngineDuck;
import com.cobblemon.mod.common.duck.SoundManagerDuck;
import net.minecraft.client.resources.sounds.BiomeAmbientSoundsHandler;
import net.minecraft.client.resources.sounds.SoundInstance;
import net.minecraft.client.resources.sounds.UnderwaterAmbientSoundInstances;
@@ -0,0 +1,67 @@
/*
* 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.world.CobblemonStructureIDs;
import com.llamalad7.mixinextras.sugar.Local;
import net.minecraft.core.Holder;
import net.minecraft.core.RegistryAccess;
import net.minecraft.core.registries.Registries;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.level.ChunkPos;
import net.minecraft.world.level.LevelHeightAccessor;
import net.minecraft.world.level.biome.Biome;
import net.minecraft.world.level.biome.BiomeSource;
import net.minecraft.world.level.chunk.ChunkGenerator;
import net.minecraft.world.level.levelgen.RandomState;
import net.minecraft.world.level.levelgen.structure.Structure;
import net.minecraft.world.level.levelgen.structure.StructurePiece;
import net.minecraft.world.level.levelgen.structure.StructureStart;
import net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplateManager;
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.callback.CallbackInfoReturnable;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
import java.util.function.Predicate;
@Mixin(Structure.class)
public abstract class StructureMixin {
// Define a set of structures that should not spawn below Sea Level
@Unique
private static final Set<ResourceLocation> RESTRICTED_STRUCTURES = new HashSet<>(Arrays.asList(
CobblemonStructureIDs.STONJOURNER_HENGE,
CobblemonStructureIDs.LUNA_HENGE,
CobblemonStructureIDs.SOL_HENGE
));
@Inject(method = "generate", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/levelgen/structure/StructureStart;isValid()Z"),
cancellable = true)
public void cobblemon$isValid(RegistryAccess registryAccess, ChunkGenerator chunkGenerator, BiomeSource biomeSource,
RandomState randomState, StructureTemplateManager structureTemplateManager, long seed,
ChunkPos chunkPos, int references, LevelHeightAccessor heightAccessor,
Predicate<Holder<Biome>> validBiome,
CallbackInfoReturnable<StructureStart> cir,
@Local StructureStart structureStart) {
ResourceLocation structureKey = registryAccess.registryOrThrow(Registries.STRUCTURE).getKey((Structure) (Object) this);
if(!RESTRICTED_STRUCTURES.contains(structureKey)) {
return;
}
for (StructurePiece piece : structureStart.getPieces()) {
if (piece.getBoundingBox().minY() < chunkGenerator.getSeaLevel()) {
cir.setReturnValue(StructureStart.INVALID_START);
return;
}
}
}
}
@@ -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.mixin.accessor;
import net.minecraft.client.Camera;
import net.minecraft.world.level.BlockGetter;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.gen.Accessor;
@Mixin(Camera.class)
public interface CameraAccessor {
@Accessor("level")
BlockGetter getLevel();
}
@@ -0,0 +1,22 @@
/*
* 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.client.gui.components.StateSwitchingButton;
import net.minecraft.client.gui.screens.recipebook.RecipeBookComponent;
import net.minecraft.network.chat.Component;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Mutable;
import org.spongepowered.asm.mixin.gen.Accessor;
@Mixin(RecipeBookComponent.class)
public interface RecipeBookComponentAccessor {
@Accessor("filterButton")
StateSwitchingButton getFilterButton();
}
@@ -8,6 +8,7 @@
package com.cobblemon.mod.common.mixin.accessor;
import net.minecraft.server.level.ServerEntity;
import net.minecraft.server.network.ServerPlayerConnection;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.gen.Accessor;
@@ -18,4 +19,7 @@ import java.util.Set;
public interface TrackedEntityAccessor {
@Accessor("seenBy")
Set<ServerPlayerConnection> getSeenBy();
@Accessor("serverEntity")
ServerEntity getServerEntity();
}
@@ -0,0 +1,94 @@
/*
* 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.brewing;
import com.cobblemon.mod.common.CobblemonRecipeTypes;
import com.cobblemon.mod.common.item.crafting.brewingstand.BrewingStandInput;
import com.cobblemon.mod.common.item.crafting.brewingstand.BrewingStandRecipe;
import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
import com.llamalad7.mixinextras.sugar.Local;
import net.minecraft.core.BlockPos;
import net.minecraft.core.NonNullList;
import net.minecraft.world.Containers;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.alchemy.PotionBrewing;
import net.minecraft.world.item.crafting.RecipeHolder;
import net.minecraft.world.item.crafting.RecipeManager;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.LevelEvent;
import net.minecraft.world.level.block.entity.BrewingStandBlockEntity;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Unique;
import org.spongepowered.asm.mixin.injection.At;
import java.util.List;
import java.util.Optional;
@Mixin(BrewingStandBlockEntity.class)
public class BrewingStandBlockEntityMixin {
@WrapOperation(method = "serverTick", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/block/entity/BrewingStandBlockEntity;doBrew(Lnet/minecraft/world/level/Level;Lnet/minecraft/core/BlockPos;Lnet/minecraft/core/NonNullList;)V"))
private static void cobblemon$doBrew(Level level, BlockPos pos, NonNullList<ItemStack> slots, Operation<Void> original) {
var recipe = cobblemon$fetchBrewingRecipe(slots, level);
if(recipe == null) {
original.call(level, pos, slots);
return;
}
//copied from vanilla doBrew logic, but slightly tweaked to work for cobblemon, this was needed as replacing the loop was not quite possible inside doBrew
ItemStack itemStack = slots.get(3);
for(int i = 0; i < 3; ++i) {
slots.set(i, recipe.getResult().copy());
}
itemStack.shrink(1);
if (itemStack.getItem().hasCraftingRemainingItem()) {
ItemStack itemStack2 = new ItemStack(itemStack.getItem().getCraftingRemainingItem());
if (itemStack.isEmpty()) {
itemStack = itemStack2;
} else {
Containers.dropItemStack(level, pos.getX(), pos.getY(), pos.getZ(), itemStack2);
}
}
slots.set(3, itemStack);
level.levelEvent(LevelEvent.SOUND_BREWING_STAND_BREW, pos, 0);
}
@WrapOperation(method = "serverTick", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/level/block/entity/BrewingStandBlockEntity;isBrewable(Lnet/minecraft/world/item/alchemy/PotionBrewing;Lnet/minecraft/core/NonNullList;)Z"))
private static boolean cobblemon$isBrewable(PotionBrewing potionBrewing, NonNullList<ItemStack> items, Operation<Boolean> original,
@Local(argsOnly = true) Level level) {
return cobblemon$fetchBrewingRecipe(items, level) != null || original.call(potionBrewing, items);
}
@Unique
private static BrewingStandRecipe cobblemon$fetchBrewingRecipe(NonNullList<ItemStack> items, Level level) {
ItemStack ingredient = items.get(3);
List<ItemStack> bottles = items.subList(0, 3);
boolean allBottlesEmpty = true;
for (ItemStack bottle : bottles) {
if (!bottle.isEmpty()) {
allBottlesEmpty = false;
break;
}
}
if (ingredient.isEmpty() || allBottlesEmpty) {
return null;
}
BrewingStandInput input = new BrewingStandInput(ingredient, bottles);
RecipeManager recipeManager = level.getRecipeManager();
Optional<RecipeHolder<BrewingStandRecipe>> recipeHolder =
recipeManager.getRecipeFor(CobblemonRecipeTypes.INSTANCE.getBREWING_STAND(), input, level);
return recipeHolder.map(RecipeHolder::value).orElse(null);
}
}
@@ -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.brewing;
import com.cobblemon.mod.common.duck.RecipeAwareSlot;
import com.cobblemon.mod.common.item.crafting.brewingstand.BrewingStandRecipe;
import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
import com.llamalad7.mixinextras.sugar.Local;
import net.minecraft.world.Container;
import net.minecraft.world.entity.player.Inventory;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.inventory.BrewingStandMenu;
import net.minecraft.world.inventory.ContainerData;
import net.minecraft.world.inventory.Slot;
import net.minecraft.world.item.ItemStack;
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(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();
for (Slot slot : ((BrewingStandMenu) (Object) this).slots) {
if (slot instanceof RecipeAwareSlot awareSlot) {
awareSlot.setRecipeManager(recipeManager);
}
}
}
@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);
}
}
@@ -0,0 +1,44 @@
/*
* Copyright (C) 2023 Cobblemon Contributors
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
package com.cobblemon.mod.common.mixin.brewing;
import com.cobblemon.mod.common.duck.RecipeAwareSlot;
import com.cobblemon.mod.common.item.crafting.brewingstand.BrewingStandRecipe;
import net.minecraft.world.inventory.BrewingStandMenu;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.crafting.RecipeManager;
import net.minecraft.world.level.Level;
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.callback.CallbackInfoReturnable;
@Mixin(BrewingStandMenu.IngredientsSlot.class)
public class IngredientSlotMixin implements RecipeAwareSlot {
@Unique
private RecipeManager cobblemon$recipeManager;
@Override
public void setRecipeManager(RecipeManager recipeManager) {
this.cobblemon$recipeManager = recipeManager;
}
@Inject(
method = "mayPlace",
at = @At("HEAD"),
cancellable = true
)
private void cobblemon$mayPlace(ItemStack stack, CallbackInfoReturnable<Boolean> cir) {
if (BrewingStandRecipe.Companion.isInput(stack, cobblemon$recipeManager)) {
cir.setReturnValue(true);
}
}
}
@@ -0,0 +1,44 @@
/*
* Copyright (C) 2023 Cobblemon Contributors
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
package com.cobblemon.mod.common.mixin.brewing;
import com.cobblemon.mod.common.duck.RecipeAwareSlot;
import com.cobblemon.mod.common.item.crafting.brewingstand.BrewingStandRecipe;
import net.minecraft.world.inventory.BrewingStandMenu;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.crafting.RecipeManager;
import net.minecraft.world.level.Level;
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.callback.CallbackInfoReturnable;
@Mixin(BrewingStandMenu.PotionSlot.class)
public class PotionSlotMixin implements RecipeAwareSlot {
@Unique
private RecipeManager cobblemon$recipeManager;
@Override
public void setRecipeManager(RecipeManager recipeManager) {
this.cobblemon$recipeManager = recipeManager;
}
@Inject(
method = "mayPlace",
at = @At("HEAD"),
cancellable = true
)
private void cobblemon$mayPlace(ItemStack stack, CallbackInfoReturnable<Boolean> cir) {
if (BrewingStandRecipe.Companion.isBottle(stack, cobblemon$recipeManager)) {
cir.setReturnValue(true);
}
}
}
@@ -12,24 +12,15 @@ 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.api.riding.Seat;
import com.cobblemon.mod.common.client.MountedPokemonAnimationRenderController;
import com.cobblemon.mod.common.client.entity.PokemonClientDelegate;
import com.cobblemon.mod.common.client.render.MatrixWrapper;
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.client.render.camera.MountedCameraRenderer;
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity;
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.util.Mth;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.level.BlockGetter;
import net.minecraft.world.level.ClipContext;
import net.minecraft.world.phys.HitResult;
import net.minecraft.world.phys.Vec3;
import org.joml.Matrix3f;
import org.joml.Quaternionf;
@@ -42,8 +33,6 @@ 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.Map;
@Mixin(Camera.class)
public abstract class CameraMixin {
@Shadow private Entity entity;
@@ -59,19 +48,14 @@ public abstract class CameraMixin {
@Shadow protected abstract void setPosition(Vec3 pos);
@Shadow
private BlockGetter level;
@Shadow private float partialTickTime;
@Unique private float returnTimer = 0;
@Unique private float rollAngleStart = 0;
@Unique Minecraft minecraft = Minecraft.getInstance();
@Unique boolean disableRollableCameraDebug = false;
@Inject(method = "setRotation", at = @At("HEAD"), cancellable = true)
public void cobblemon$setRotation(float f, float g, CallbackInfo ci) {
if (!(this.entity instanceof OrientationControllable controllable) || disableRollableCameraDebug) return;
if (!(this.entity instanceof OrientationControllable controllable) || Cobblemon.config.getDisableRoll()) return;
var controller = controllable.getOrientationController();
if (!controller.isActive() && controller.getOrientation() != null) {
if(this.returnTimer < 1) {
@@ -105,7 +89,6 @@ public abstract class CameraMixin {
ci.cancel();
}
//If you want to move this to a delagate you need an AW for position
@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();
@@ -113,75 +96,25 @@ public abstract class CameraMixin {
MountedPokemonAnimationRenderController.INSTANCE.reset();
if(vehicle instanceof Rideable){
//RidingCameraDelagate.INSTANCE.positionCamera(instance, x, y, z, original);
if (!(vehicle instanceof PokemonEntity pokemon)) {
original.call(instance, x, y, z);
Vec3 position = MountedCameraRenderer.INSTANCE.getCameraPosition(
instance,
entity,
vehicle,
x,
y,
z,
thirdPersonReverse,
eyeHeightOld,
eyeHeight
);
if(position != null){
setPosition(position);
return;
}
PokemonClientDelegate delegate = (PokemonClientDelegate) pokemon.getDelegate();
Vec3 entityPos = new Vec3(
Mth.lerp(instance.getPartialTickTime(), pokemon.xOld, pokemon.getX()),
Mth.lerp(instance.getPartialTickTime(), pokemon.yOld, pokemon.getY()),
Mth.lerp(instance.getPartialTickTime(), pokemon.zOld, pokemon.getZ())
);
MountedPokemonAnimationRenderController.INSTANCE.setup(pokemon, partialTickTime);
int seatIndex = pokemon.getPassengers().indexOf(entity);
Seat seat = pokemon.getSeats().get(seatIndex);
OrientationControllable rollable = (OrientationControllable) entity;
OrientationController controller = rollable.getOrientationController();
if (!instance.isDetached() || Cobblemon.config.getThirdPartyViewBobbing()) {
MatrixWrapper locator = delegate.getLocatorStates().get(seat.getLocator());
if (locator == null) {
original.call(instance, x, y, z);
return;
}
Vec3 locatorOffset = new Vec3(locator.getMatrix().getTranslation(new Vector3f()));
float currEyeHeight = Mth.lerp(instance.getPartialTickTime(), eyeHeightOld, eyeHeight);
var rotatedEyeHeight = new Vector3f(0f, currEyeHeight - (entity.getBbHeight() / 2), 0f);
if (controller.isActive()) {
rotatedEyeHeight = controller.getRenderOrientation(partialTickTime).transform(rotatedEyeHeight);
}
Vec3 position = locatorOffset.add(entityPos).add(new Vec3(rotatedEyeHeight));
setPosition(position);
} else {
Vector3f pos = entityPos.add(new Vec3(0, pokemon.getBbHeight() / 2, 0)).toVector3f();
PosableModel model = VaryingModelRepository.INSTANCE.getPoser(pokemon.getPokemon().getSpecies().getResourceIdentifier(), new FloatingState());
Map<String, Vec3> cameraOffsets = model.getSeatToCameraOffset();
Vec3 cameraOffset;
if (thirdPersonReverse && cameraOffsets.containsKey(seat.getLocator() + "_reverse")) {
cameraOffset = cameraOffsets.get(seat.getLocator() + "_reverse");
} else if (cameraOffsets.containsKey(seat.getLocator())) {
cameraOffset = cameraOffsets.get(seat.getLocator());
} else {
cameraOffset = new Vec3(0f, 2f, 4f);
}
Vector3f offset = cameraOffset.toVector3f();
if (thirdPersonReverse) offset.z *= -1;
float xRot = (float) (-1 * Math.toRadians(instance.getXRot()));
Matrix3f orientation = controller.isActive() && controller.getOrientation() != null ? controller.getOrientation() : new Matrix3f().rotateY((float) Math.toRadians(180f - instance.getYRot())).rotateX(xRot);
Vector3f rotatedOffset = orientation.transform(offset);
float offsetDistance = rotatedOffset.length();
Vector3f offsetDirection = rotatedOffset.mul(1 / offsetDistance);
float maxZoom = cobblemon$getMaxZoom(offsetDistance, offsetDirection, pos);
setPosition(new Vec3(offsetDirection.mul(maxZoom).add(pos)));
}
} else {
original.call(instance, x, y, z);
}
original.call(instance, x, y, z);
}
@Unique
@@ -195,9 +128,9 @@ public abstract class CameraMixin {
this.rotation.set(newRotation);
this.xRot = controller.getPitch();
this.yRot = controller.getYaw();
this.forwards.set(controller.getForwardVector());
this.up.set(controller.getUpVector());
this.left.set(controller.getLeftVector());
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))
@@ -205,30 +138,8 @@ public abstract class CameraMixin {
Entity entity = instance.getEntity();
Entity vehicle = entity.getVehicle();
if (!(vehicle instanceof PokemonEntity) || Cobblemon.config.getThirdPartyViewBobbing()) {
if (!(vehicle instanceof PokemonEntity) || Cobblemon.config.getThirdPersonViewBobbing()) {
original.call(instance, zoom, dy, dx);
}
}
//Modified vanilla code
@Unique
private float cobblemon$getMaxZoom(float maxZoom, Vector3f directionVector, Vector3f positionVector) {
Vec3 pos = new Vec3(positionVector);
for (int i = 0; i < 8; i++) {
float g = (float) ((i & 1) * 2 - 1);
float h = (float) ((i >> 1 & 1) * 2 - 1);
float j = (float) ((i >> 2 & 1) * 2 - 1);
Vec3 vec3 = pos.add(g * 0.1F, h * 0.1F, j * 0.1F);
Vec3 vec32 = vec3.add(new Vec3(directionVector).scale(maxZoom));
HitResult hitResult = this.level.clip(new ClipContext(vec3, vec32, ClipContext.Block.VISUAL, ClipContext.Fluid.NONE, this.entity));
if (hitResult.getType() != HitResult.Type.MISS) {
float k = (float) hitResult.getLocation().distanceToSqr(pos);
if (k < Mth.square(maxZoom)) {
maxZoom = Mth.sqrt(k);
}
}
}
return maxZoom;
}
}
@@ -0,0 +1,85 @@
/*
* 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.CobblemonRecipeCategories;
import com.cobblemon.mod.common.item.crafting.CookingPotBookCategory;
import com.cobblemon.mod.common.item.crafting.CookingPotRecipe;
import com.cobblemon.mod.common.item.crafting.CookingPotRecipeBase;
import com.cobblemon.mod.common.item.crafting.CookingPotShapelessRecipe;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Maps;
import net.minecraft.client.ClientRecipeBook;
import net.minecraft.client.RecipeBookCategories;
import net.minecraft.client.gui.screens.recipebook.RecipeCollection;
import net.minecraft.core.RegistryAccess;
import net.minecraft.world.item.crafting.Recipe;
import net.minecraft.world.item.crafting.RecipeHolder;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
import java.util.List;
import java.util.Map;
@Mixin(ClientRecipeBook.class)
public abstract class ClientRecipeBookMixin {
@Shadow
protected static Map<RecipeBookCategories, List<List<RecipeHolder<?>>>> categorizeAndGroupRecipes(Iterable<RecipeHolder<?>> recipes) {
return null;
}
@Shadow
private Map<RecipeBookCategories, List<RecipeCollection>> collectionsByTab;
@Shadow
private List<RecipeCollection> allCollections;
@Inject(method = "getCategory", at = @At(value = "HEAD"), cancellable = true)
private static void addCustomCategory(RecipeHolder<?> recipe, CallbackInfoReturnable<RecipeBookCategories> cir) {
Recipe<?> recipe2 = recipe.value();
if (recipe2 instanceof CookingPotRecipeBase) {
CookingPotBookCategory category = ((CookingPotRecipeBase) recipe2).getCategory();
RecipeBookCategories var7;
switch (category) {
case MISC -> var7 = CobblemonRecipeCategories.COOKING_POT_MISC.toVanillaCategory();
case FOODS -> var7 = CobblemonRecipeCategories.COOKING_POT_FOODS.toVanillaCategory();
case MEDICINES -> var7 = CobblemonRecipeCategories.COOKING_POT_MEDICINES.toVanillaCategory();
case COMPLEX_DISHES -> var7 = CobblemonRecipeCategories.COOKING_POT_COMPLEX_DISHES.toVanillaCategory();
default -> throw new MatchException(null, null);
}
cir.setReturnValue(var7);
}
}
@Inject(method = "setupCollections", at = @At("RETURN"))
private void addCustomAggregateCategories(Iterable<RecipeHolder<?>> recipes, RegistryAccess registryAccess, CallbackInfo ci) {
Map<RecipeBookCategories, List<List<RecipeHolder<?>>>> map = categorizeAndGroupRecipes(recipes);
Map<RecipeBookCategories, List<RecipeCollection>> map2 = Maps.newHashMap();
ImmutableList.Builder<RecipeCollection> builder = ImmutableList.builder();
map.forEach((recipeBookCategories, list) -> {
List<RecipeCollection> collections = list.stream()
.map(listx -> new RecipeCollection(registryAccess, listx))
.peek(builder::add)
.collect(ImmutableList.toImmutableList());
map2.put(recipeBookCategories, collections);
});
RecipeBookCategories.AGGREGATE_CATEGORIES.forEach((recipeBookCategories, list) -> map2.put(recipeBookCategories, (List) list.stream().flatMap((recipeBookCategoriesx) -> ((List) map2.getOrDefault(recipeBookCategoriesx, ImmutableList.of())).stream()).collect(ImmutableList.toImmutableList())));
CobblemonRecipeCategories.Companion.getCustomAggregateCategories().forEach((recipeBookCategories, list) -> map2.put(recipeBookCategories, (List) list.stream().flatMap((recipeBookCategoriesx) -> ((List) map2.getOrDefault(recipeBookCategoriesx, ImmutableList.of())).stream()).collect(ImmutableList.toImmutableList())));
this.collectionsByTab = ImmutableMap.copyOf(map2);
this.allCollections = builder.build();
}
}
@@ -9,22 +9,21 @@
package com.cobblemon.mod.common.mixin.client;
import com.cobblemon.mod.common.client.gui.ScrollingWidget;
import com.llamalad7.mixinextras.injector.ModifyExpressionValue;
import net.minecraft.client.gui.components.AbstractSelectionList;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.Constant;
import org.spongepowered.asm.mixin.injection.ModifyConstant;
import org.spongepowered.asm.mixin.injection.At;
@Mixin(AbstractSelectionList.class)
public abstract class EntryListWidgetMixin {
@SuppressWarnings("ConstantValue")
@ModifyConstant(method = "getEntryAtPosition", constant = @Constant(intValue = 4))
public int cobblemon$adjustOnlyIfNecessary(int input) {
@ModifyExpressionValue(method = "getEntryAtPosition", at = @At(value = "CONSTANT", args = {"intValue=4"}))
public int cobblemon$adjustOnlyIfNecessary(int original) {
if(ScrollingWidget.class.isInstance(this)) {
return 0;
}
return input;
return original;
}
}
@@ -8,24 +8,11 @@
package com.cobblemon.mod.common.mixin.client;
import com.cobblemon.mod.common.api.orientation.OrientationController;
import com.cobblemon.mod.common.api.scheduling.ClientTaskTracker;
import com.cobblemon.mod.common.stadium.StadiumClientManager;
import com.cobblemon.mod.common.util.CameraExtensionsKt;
import net.minecraft.client.Camera;
import net.minecraft.client.DeltaTracker;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.GameRenderer;
import net.minecraft.client.renderer.LightTexture;
import net.minecraft.util.Mth;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.phys.Vec3;
import org.joml.Matrix4f;
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;
@@ -33,17 +20,6 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(GameRenderer.class)
public class GameRendererMixin {
@Shadow @Final Minecraft minecraft;
@Shadow float renderDistance;
@Shadow @Final private LightTexture lightTexture;
@Shadow private boolean renderHand;
@Shadow private double getFov(Camera activeRenderInfo, float partialTicks, boolean useFOVSetting) { return 0.0; }
@Shadow public void resetProjectionMatrix(Matrix4f matrix) {}
@Shadow public Matrix4f getProjectionMatrix(double fov) { return new Matrix4f(); }
@Shadow private void renderItemInHand(Camera camera, float partialTick, Matrix4f projectionMatrix) {}
@Shadow public void pick(float partialTicks) {}
@Unique
long lastTime = -1;
@@ -66,54 +42,4 @@ public class GameRendererMixin {
lastTime = newTime;
}
@Inject(method = "renderLevel", at = @At(value = "HEAD"), cancellable = true)
public void renderLevel(DeltaTracker deltaTracker, CallbackInfo ci) {
if (StadiumClientManager.INSTANCE.shouldUseStadiumCamera()) {
float f = deltaTracker.getGameTimeDeltaPartialTick(true);
this.lightTexture.updateLightTexture(f);
if (this.minecraft.getCameraEntity() == null) {
this.minecraft.setCameraEntity(this.minecraft.player);
}
this.minecraft.getProfiler().push("camera");
Camera stadiumCamera = new Camera();
Entity entity = (Entity) this.minecraft.player;
stadiumCamera.setup(this.minecraft.level, entity, false, false, 1.0F);
//adjust camera
StadiumClientManager.INSTANCE.updateCameraData(f);
var position = StadiumClientManager.INSTANCE.getCameraPosition();
stadiumCamera.setPosition(position);
Quaternionf rotation = StadiumClientManager.INSTANCE.getCameraRotation();
var forwardVector = rotation.transform(Camera.FORWARDS, new Vector3f());
var upVector = rotation.transform(Camera.UP, new Vector3f());
var leftVector = rotation.transform(Camera.LEFT, new Vector3f());
stadiumCamera.rotation.set(rotation);
stadiumCamera.xRot = (float)Mth.wrapDegrees(-Math.toDegrees(Math.asin(forwardVector.y)));
stadiumCamera.yRot = Mth.wrapDegrees((float)-Math.toDegrees(Camera.FORWARDS.angleSigned(forwardVector, Camera.UP)) + 180);
stadiumCamera.forwards.set(forwardVector);
stadiumCamera.up.set(upVector);
stadiumCamera.left.set(leftVector);
this.renderDistance = (float)(this.minecraft.options.getEffectiveRenderDistance() * 16);
double d = this.getFov(stadiumCamera, f, true);
Matrix4f matrix4f = this.getProjectionMatrix(d);
this.resetProjectionMatrix(matrix4f);
Quaternionf quaternionf = stadiumCamera.rotation().conjugate(new Quaternionf());
Matrix4f matrix4f2 = (new Matrix4f()).rotation(quaternionf);
this.minecraft.levelRenderer.prepareCullFrustum(stadiumCamera.getPosition(), matrix4f2, this.getProjectionMatrix(Math.max(d, (double)(Integer)this.minecraft.options.fov().get())));
this.minecraft.levelRenderer.renderLevel(deltaTracker, false, stadiumCamera, (GameRenderer) (Object) this, this.lightTexture, matrix4f2, matrix4f);
this.minecraft.getProfiler().pop();
ci.cancel();
}
}
@Inject(method = "tick", at = @At(value = "TAIL"))
public void tick(CallbackInfo ci) {
// StadiumClientManager.INSTANCE.tickCameraManager();
}
}
@@ -8,6 +8,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.entity.pokemon.PokemonEntity;
import net.minecraft.client.model.HumanoidModel;
@@ -59,9 +60,9 @@ public class HumanoidModelMixin {
}
Entity vehicle = entity.getVehicle();
if (vehicle instanceof PokemonEntity pokemonEntity && entity instanceof AbstractClientPlayer) {
if (vehicle instanceof PokemonEntity pokemonEntity && entity instanceof OrientationControllable) {
var shouldRotatePlayerHead = pokemonEntity.ifRidingAvailableSupply(false, (behaviour, settings, state) -> {
return behaviour.shouldRotatePlayerHead(settings, state, pokemonEntity);
return behaviour.shouldRotateRiderHead(settings, state, pokemonEntity);
});
if (!shouldRotatePlayerHead) {
@@ -73,7 +74,9 @@ public class HumanoidModelMixin {
}
}
MountedPlayerRenderer.INSTANCE.animate(pokemonEntity, (AbstractClientPlayer) entity, relevantPartsByName, netHeadYaw, headPitch, ageInTicks, limbSwing, limbSwingAmount);
if (!(entity instanceof AbstractClientPlayer player)) return;
MountedPlayerRenderer.INSTANCE.animate(pokemonEntity, player, relevantPartsByName, netHeadYaw, headPitch, ageInTicks, limbSwing, limbSwingAmount);
}
}
}
@@ -0,0 +1,37 @@
/*
* 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.entity.MountedLivingEntityRenderer;
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity;
import com.mojang.blaze3d.vertex.PoseStack;
import net.minecraft.client.model.EntityModel;
import net.minecraft.client.renderer.entity.LivingEntityRenderer;
import net.minecraft.world.entity.LivingEntity;
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(LivingEntityRenderer.class)
public class LivingEntityRendererMixin<T extends LivingEntity, M extends EntityModel<T>> {
@Inject(
method = "setupRotations",
at = @At("HEAD")
)
private void cobblemon$modifyRoll(LivingEntity entity, PoseStack poseStack, float bob, float yBodyRot, float partialTick, float scale, CallbackInfo ci) {
if (entity.isPassenger()) {
var vehicle = entity.getVehicle();
if (vehicle instanceof PokemonEntity pokemonEntity) {
MountedLivingEntityRenderer.INSTANCE.render(entity, pokemonEntity, poseStack, bob, yBodyRot, partialTick, scale);
}
}
}
}
@@ -9,28 +9,67 @@
package com.cobblemon.mod.common.mixin.client;
import com.cobblemon.mod.common.CobblemonNetwork;
import com.cobblemon.mod.common.DoubleJump;
import com.cobblemon.mod.common.OrientationControllable;
import com.cobblemon.mod.common.api.orientation.OrientationController;
import com.cobblemon.mod.common.api.riding.Seat;
import com.cobblemon.mod.common.client.entity.PokemonClientDelegate;
import com.cobblemon.mod.common.client.render.MatrixWrapper;
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.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.mojang.authlib.GameProfile;
import net.minecraft.client.CameraType;
import net.minecraft.client.Minecraft;
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.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;
import org.joml.Matrix3f;
import org.joml.Vector3f;
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 org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
import java.util.Map;
@Mixin(LocalPlayer.class)
public abstract class LocalPlayerMixin extends LivingEntity {
public abstract class LocalPlayerMixin extends AbstractClientPlayer implements OrientationControllable, DoubleJump {
@Unique Matrix3f cobblemon$lastOrientation;
protected LocalPlayerMixin(EntityType<? extends LivingEntity> entityType, Level level) {
super(entityType, level);
@Unique boolean cobblemon$isDoubleJumping = false;
@Shadow
private float jumpRidingScale;
@Shadow public Input input;
@Shadow private int autoJumpTime;
@Unique private int cobblemon$survivalJumpTriggerTime;
@Unique private boolean cobblemon$isJumping;
public LocalPlayerMixin(ClientLevel clientLevel, GameProfile gameProfile) {
super(clientLevel, gameProfile);
}
// @Inject(method = "sendPosition", at = @At("TAIL"))
@@ -59,6 +98,23 @@ public abstract class LocalPlayerMixin extends LivingEntity {
controllable.getOrientationController().setActive(shouldUseCustomOrientation);
}
@Inject(method = "rideTick", at = @At("HEAD"))
private void cobblemon$updateDriverInputRideTick(CallbackInfo ci) {
if (Minecraft.getInstance().player != (Object)this) return;
if (!(this.getVehicle() instanceof PokemonEntity pokemonEntity)) return;
// Gather driver Input
float vertInput = this.jumping ? 1.0f : (((Player)this).isShiftKeyDown() ? -1.0f : 0.0f);
Vector3f driverInput = new Vector3f(Math.signum(this.xxa), vertInput, Math.signum(this.zza));
// Check if player input has changed. If it has then update the last sent and send it
Vector3f lastSentDriverInput = ((PlayerDuck)this).getLastSentDriverInput();
if (driverInput.equals(lastSentDriverInput)) return;
((PlayerDuck)this).setLastSentDriverInput(driverInput);
CobblemonNetwork.INSTANCE.sendToServer(new ServerboundUpdateDriverInputPacket(driverInput));
}
@Unique
private boolean cobblemon$shouldUseCustomOrientation(LocalPlayer player) {
var playerVehicle = player.getVehicle();
@@ -76,4 +132,98 @@ public abstract class LocalPlayerMixin extends LivingEntity {
if (!(this instanceof OrientationControllable controllable)) return;
controllable.getOrientationController().setActive(false);
}
@Inject(method = "getJumpRidingScale", at = @At("HEAD"), cancellable = true)
public void modifyJumpRidingScale(CallbackInfoReturnable<Float> cir) {
LocalPlayer player = (LocalPlayer) (Object) this;
if (player.isPassenger() && player.getVehicle() instanceof PokemonEntity pokemonEntity) {
var rideValue = pokemonEntity.<Float>ifRidingAvailableSupply(null, (behaviour, settings, state) -> {
if (behaviour.canJump(settings, state, pokemonEntity, player)) return null;
return behaviour.setRideBar(settings, state, pokemonEntity, player);
});
if (rideValue != null) {
cir.setReturnValue(rideValue);
}
}
}
@Inject(method = "aiStep", at = @At("HEAD"))
private void cobblemon$aiStep(CallbackInfo ci) {
this.cobblemon$isDoubleJumping = false;
this.cobblemon$isJumping = this.input.jumping;
}
@Inject(method = "aiStep", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/player/LocalPlayer;isSprinting()Z", shift = At.Shift.BEFORE))
private void cobblemon$updateDoubleJumping(CallbackInfo ci) {
if (!this.cobblemon$isJumping && this.input.jumping && this.autoJumpTime <= 0 && !this.isSwimming()) {
if (this.cobblemon$survivalJumpTriggerTime != 0) {
this.cobblemon$isDoubleJumping = true;
this.cobblemon$survivalJumpTriggerTime = 0;
}
else {
this.cobblemon$survivalJumpTriggerTime = 7;
}
}
else if (this.cobblemon$survivalJumpTriggerTime > 0) {
this.cobblemon$survivalJumpTriggerTime--;
}
}
@Override
public boolean isDoubleJumping() {
return this.cobblemon$isDoubleJumping;
}
@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);
}
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);
Vec3 viewVector = this.getViewVector(partialTicks);
Vec3 viewDistanceVector = eyePosition.add(viewVector.x * hitDistance, viewVector.y * hitDistance, viewVector.z * hitDistance);
return this.level()
.clip(
new ClipContext(
eyePosition, viewDistanceVector, ClipContext.Block.OUTLINE, hitFluids ? net.minecraft.world.level.ClipContext.Fluid.ANY : net.minecraft.world.level.ClipContext.Fluid.NONE, this
)
);
}
return super.pick(hitDistance, partialTicks, hitFluids);
}
@Unique
private static @NotNull Vector3f cobblemon$getFirstPersonOffset(PosableModel model, String locatorName) {
Map<String, Vec3> cameraOffsets = model.getFirstPersonCameraOffset();
if (cameraOffsets.containsKey(locatorName)) {
return cameraOffsets.get(locatorName).toVector3f();
} else {
return new Vector3f(0f, 0f, 0f);
}
}
}
@@ -30,7 +30,6 @@ 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.LocalCapture;
@Mixin(MouseHandler.class)
public abstract class MouseHandlerMixin {
@@ -121,11 +120,12 @@ public abstract class MouseHandlerMixin {
if (usageContext.getScanningGuiOpen()) {
this.smoothTurnY.reset();
this.smoothTurnX.reset();
var defaultSensitivity = this.minecraft.options.sensitivity().get() * 0.6000000238418579 + 0.20000000298023224;
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);
player.turn(this.accumulatedDX * sensitivity, (this.accumulatedDY * sensitivity));
var yRotationFlip = this.minecraft.options.invertYMouse().get() ? -1 : 1;
player.turn(this.accumulatedDX * sensitivity, (this.accumulatedDY * sensitivity * yRotationFlip));
return false;
}
@@ -9,20 +9,16 @@
package com.cobblemon.mod.common.mixin.client;
import com.cobblemon.mod.common.client.render.ClientPlayerIcon;
import com.cobblemon.mod.common.client.render.player.MountedPlayerRenderer;
import com.cobblemon.mod.common.entity.pokemon.PokemonEntity;
import com.llamalad7.mixinextras.injector.wrapoperation.Operation;
import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation;
import com.mojang.blaze3d.vertex.PoseStack;
import net.minecraft.client.model.EntityModel;
import net.minecraft.client.model.PlayerModel;
import net.minecraft.client.player.AbstractClientPlayer;
import net.minecraft.client.renderer.MultiBufferSource;
import net.minecraft.client.renderer.entity.EntityRendererProvider;
import net.minecraft.client.renderer.entity.LivingEntityRenderer;
import net.minecraft.client.renderer.entity.player.PlayerRenderer;
import net.minecraft.world.entity.LivingEntity;
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;
@@ -35,9 +31,9 @@ public abstract class PlayerRendererMixin extends LivingEntityRenderer<AbstractC
super(context, model, shadowRadius);
}
@Inject(method = "render(Lnet/minecraft/world/entity/LivingEntity;FFLcom/mojang/blaze3d/vertex/PoseStack;Lnet/minecraft/client/renderer/MultiBufferSource;I)V", at = @At(value = "TAIL"))
public void cobblemon$clientPlayerIcon(LivingEntity entity, float entityYaw, float partialTicks, PoseStack poseStack, MultiBufferSource buffer, int packedLight, CallbackInfo ci) {
ClientPlayerIcon.Companion.onRenderPlayer((Player) entity);
@Inject(method = "render", at = @At(value = "TAIL"))
public void renderPlayer(AbstractClientPlayer player, float f, float g, PoseStack poseStack, MultiBufferSource multiBufferSource, int i, CallbackInfo ci) {
ClientPlayerIcon.Companion.onRenderPlayer(player);
}
@WrapOperation(method = "getRenderOffset(Lnet/minecraft/client/player/AbstractClientPlayer;F)Lnet/minecraft/world/phys/Vec3;", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/player/AbstractClientPlayer;isCrouching()Z"))
@@ -55,17 +51,4 @@ public abstract class PlayerRendererMixin extends LivingEntityRenderer<AbstractC
playerModel.crouching = false;
}
}
@Inject(
method = "setupRotations(Lnet/minecraft/client/player/AbstractClientPlayer;Lcom/mojang/blaze3d/vertex/PoseStack;FFFF)V",
at = @At("HEAD")
)
private void cobblemon$modifyRoll(AbstractClientPlayer player, PoseStack poseStack, float a, float b, float partialTicks, float i, CallbackInfo ci) {
if (player.isPassenger()) {
var vehicle = player.getVehicle();
if (vehicle instanceof PokemonEntity entity) {
MountedPlayerRenderer.INSTANCE.render(player, entity, poseStack, a, b, partialTicks, i);
}
}
}
}
@@ -0,0 +1,73 @@
/*
* 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.CobblemonItems;
import com.cobblemon.mod.common.CobblemonRecipeCategories;
import com.google.common.collect.ImmutableList;
import net.minecraft.client.RecipeBookCategories;
import net.minecraft.world.inventory.RecipeBookType;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Items;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Mutable;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.gen.Invoker;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
import java.util.ArrayList;
import java.util.List;
@Mixin(RecipeBookCategories.class)
public class RecipeBookCategoriesMixin {
@Final
@Mutable
@Shadow
private static RecipeBookCategories[] $VALUES;
@Invoker("<init>")
private static RecipeBookCategories cobblemon$createCategory(String name, int ordinal, ItemStack... icons) {
throw new AssertionError();
}
@Inject(
method = "<clinit>",
at = @At("TAIL")
)
private static void cobblemon$addRecipeBookType(CallbackInfo ci) {
ArrayList<RecipeBookCategories> types = new ArrayList<>(List.of($VALUES));
types.add(cobblemon$createCategory("COOKING_POT_SEARCH", $VALUES.length, new ItemStack(Items.COMPASS)));
types.add(cobblemon$createCategory("COOKING_POT_FOODS", $VALUES.length + 1, new ItemStack(CobblemonItems.LEEK_AND_POTATO_STEW)));
types.add(cobblemon$createCategory("COOKING_POT_MEDICINES", $VALUES.length + 2, new ItemStack(CobblemonItems.POTION)));
types.add(cobblemon$createCategory("COOKING_POT_COMPLEX_DISHES", $VALUES.length + 3, new ItemStack(CobblemonItems.POKE_PUFF)));
types.add(cobblemon$createCategory("COOKING_POT_MISC", $VALUES.length + 4, new ItemStack(CobblemonItems.PROTEIN)));
$VALUES = types.toArray(RecipeBookCategories[]::new);
}
@Inject(method = "getCategories", at = @At("HEAD"), cancellable = true)
private static void modifyCategories(RecipeBookType recipeBookType, CallbackInfoReturnable<List<RecipeBookCategories>> cir) {
if (recipeBookType == RecipeBookType.valueOf("COOKING_POT")) {
List var10000 = ImmutableList.of(
CobblemonRecipeCategories.COOKING_POT_SEARCH.toVanillaCategory(),
CobblemonRecipeCategories.COOKING_POT_FOODS.toVanillaCategory(),
CobblemonRecipeCategories.COOKING_POT_MEDICINES.toVanillaCategory(),
CobblemonRecipeCategories.COOKING_POT_COMPLEX_DISHES.toVanillaCategory(),
CobblemonRecipeCategories.COOKING_POT_MISC.toVanillaCategory());
cir.setReturnValue(var10000);
return;
}
}
}
@@ -0,0 +1,63 @@
/*
* 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.CobblemonRecipeCategories;
import net.minecraft.client.ClientRecipeBook;
import net.minecraft.client.Minecraft;
import net.minecraft.client.RecipeBookCategories;
import net.minecraft.client.gui.screens.recipebook.RecipeBookComponent;
import net.minecraft.client.gui.screens.recipebook.RecipeBookPage;
import net.minecraft.client.gui.screens.recipebook.RecipeBookTabButton;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(RecipeBookComponent.class)
public class RecipeBookComponentMixin {
@Shadow private ClientRecipeBook book;
@Shadow protected Minecraft minecraft;
@Shadow private int width;
@Shadow private int xOffset;
@Shadow private int height;
@Shadow @Final private RecipeBookPage recipeBookPage;
@Inject(method = "updateTabs", at = @At("HEAD"), cancellable = true)
private void customUpdateTabs(CallbackInfo ci) {
RecipeBookComponent instance = (RecipeBookComponent) (Object) this;
int i = (width - 147) / 2 - xOffset - 30;
int j = (height - 166) / 2 + 3;
int k = 27;
int l = 0;
for (RecipeBookTabButton recipeBookTabButton : instance.tabButtons) {
RecipeBookCategories recipeBookCategories = recipeBookTabButton.getCategory();
if (recipeBookCategories != RecipeBookCategories.CRAFTING_SEARCH && recipeBookCategories != RecipeBookCategories.FURNACE_SEARCH && recipeBookCategories != CobblemonRecipeCategories.COOKING_POT_SEARCH.toVanillaCategory()) {
if (recipeBookTabButton.updateVisibility(book)) {
recipeBookTabButton.setPosition(i, j + 27 * l++);
recipeBookTabButton.startAnimation(minecraft);
}
} else {
recipeBookTabButton.visible = true;
recipeBookTabButton.setPosition(i, j + k * l++);
}
}
ci.cancel();
}
}
@@ -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.client;
import net.minecraft.client.ClientRecipeBook;
import net.minecraft.client.gui.screens.recipebook.RecipeBookTabButton;
import net.minecraft.client.gui.screens.recipebook.RecipeCollection;
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.List;
@Mixin(RecipeBookTabButton.class)
public class RecipeBookTabButtonMixin {
@Inject(method = "updateVisibility", at = @At("HEAD"), cancellable = true)
private void customUpdateVisibility(ClientRecipeBook recipeBook, CallbackInfoReturnable<Boolean> cir) {
RecipeBookTabButton instance = (RecipeBookTabButton) (Object) this;
List<RecipeCollection> list = recipeBook.getCollection(instance.getCategory());
boolean visible = false;
if (list != null) {
for (RecipeCollection recipeCollection : list) {
if (recipeCollection.hasKnownRecipes() && recipeCollection.hasFitting()) {
visible = true;
break;
}
}
}
instance.visible = visible;
cir.setReturnValue(visible);
}
}
@@ -0,0 +1,53 @@
/*
* 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 net.minecraft.client.gui.screens.recipebook.RecipeCollection;
import net.minecraft.stats.RecipeBook;
import net.minecraft.world.entity.player.StackedContents;
import net.minecraft.world.item.crafting.RecipeHolder;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import java.util.List;
import java.util.Set;
@Mixin(RecipeCollection.class)
public class RecipeCollectionMixin {
@Shadow @Final private Set<RecipeHolder<?>> fitsDimensions;
@Shadow @Final private Set<RecipeHolder<?>> craftable;
@Shadow @Final private List<RecipeHolder<?>> recipes;
@Inject(method = "canCraft", at = @At("HEAD"), cancellable = true)
private void customCanCraft(StackedContents handler, int width, int height, RecipeBook book, CallbackInfo ci) {
for (RecipeHolder<?> recipeHolder : recipes) {
boolean bl = recipeHolder.value().canCraftInDimensions(width, height) && book.contains(recipeHolder);
if (bl) {
fitsDimensions.add(recipeHolder);
} else {
fitsDimensions.remove(recipeHolder);
}
if (bl && handler.canCraft(recipeHolder.value(), null)) {
craftable.add(recipeHolder);
} else {
craftable.remove(recipeHolder);
}
}
ci.cancel();
}
}
@@ -0,0 +1,60 @@
/*
* 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 net.minecraft.client.searchtree.IdSearchTree;
import net.minecraft.client.searchtree.SearchTree;
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.callback.CallbackInfoReturnable;
import java.util.ArrayList;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
@Mixin(IdSearchTree.class)
public abstract class SearchTreeMixin {
@Unique
private static final ThreadLocal<Boolean> reentryFlag = ThreadLocal.withInitial(() -> false);
/**
* Runs an additional search using the original search term where every instance of 'e' is replaced with 'é'
* Appends additional search results to original search results.
*/
@Inject(method = "search(Ljava/lang/String;)Ljava/util/List;", at = @At("RETURN"), cancellable = true)
private void onSearch(String string, CallbackInfoReturnable<List> cir) {
// If flag is true, skip to avoid infinite loop
if (reentryFlag.get()) {
return;
}
try {
reentryFlag.set(true);
List originalResults = cir.getReturnValue();
if (!string.contains("poke")) {
return;
}
String modifiedString = string.replace("poke", "poké");
List additionalResults = ((SearchTree)this).search(modifiedString);
Set combinedSet = new LinkedHashSet<>();
combinedSet.addAll(originalResults);
combinedSet.addAll(additionalResults);
cir.setReturnValue(new ArrayList<>(combinedSet));
} finally {
reentryFlag.set(false);
}
}
}
@@ -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.TextClipping;
import net.minecraft.client.gui.Font;
import net.minecraft.network.chat.Style;
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;
/**
* This mixin facilitates the gradual reveal of text with NPC dialogue. If there is a better way
* to do this, I'd love to hear it.
*
* The idea is that somewhere static in the mod we have a control for how many characters can be drawn
* and how many have been drawn so far, and this mixin will add to the latter and stop drawing characters
* once it reaches the former.
*
* This relies STRONGLY on the code that sets the character cap to reset it to -1 after the text is rendered,
* otherwise all text in Minecraft will stop drawing.
*
* Sites that take advantage of this mixin will do the following:
* 1: Set the character cap, which resets the drawn counter to zero.
* 2: Call whatever Minecraft function draws your text.
* 3: Reset the character cap to -1, which will allow regular text to draw again.
*
* @author Hiroku
* @since April 18th, 2025
*/
@Mixin(Font.StringRenderOutput.class)
public class StringRenderOutputMixin {
@Inject(method = "accept", at = @At(value = "HEAD"), cancellable = true)
public void onAccept(int i, Style style, int j, CallbackInfoReturnable<Boolean> cir) {
if (!TextClipping.canDrawAnotherCharacter()) {
cir.setReturnValue(true);
}
}
}
@@ -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.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 kotlin.Unit;
import net.minecraft.SharedConstants;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.screens.Screen;
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.callback.CallbackInfo;
import java.util.List;
import java.util.function.Function;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@Mixin(Minecraft.class)
public final class SnapshotWarningMixin {
@Unique
private final Pattern VERSION = Pattern.compile("^(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)$");
@Inject(method = "addInitialScreens", at = @At("TAIL"))
public void cobblemon$addSnapshotWarningScreen(List<Function<Runnable, Screen>> output, CallbackInfo callback) {
if (CobblemonBuildDetails.SNAPSHOT && !this.cobblemon$isAcknowledged() && !SharedConstants.IS_RUNNING_IN_IDE) {
output.add((runnable) -> new SnapshotWarningScreen((acknowledgement, dsa) -> {
if (acknowledgement == SnapshotWarningScreen.Acknowledgement.NO) {
Minecraft.getInstance().stop();
return Unit.INSTANCE;
}
SnapshotAcknowledgementReader.INSTANCE.write(new SnapshotAcknowledgementData(CobblemonBuildDetails.VERSION, dsa));
runnable.run();
return Unit.INSTANCE;
}));
}
}
@Unique
@SuppressWarnings("ResultOfMethodCallIgnored")
private boolean cobblemon$isAcknowledged() {
SnapshotAcknowledgementData data = SnapshotAcknowledgementReader.INSTANCE.read();
if (data == null) {
return false;
}
Matcher current = VERSION.matcher(CobblemonBuildDetails.VERSION);
current.find();
Matcher when = VERSION.matcher(data.getVersion());
when.find();
boolean alert = current.group("minor").compareTo(when.group("minor")) > 0 || current.group("major").compareTo(when.group("major")) > 0;
return !alert && data.getDontShowAgain();
}
}
@@ -40,9 +40,9 @@ import com.cobblemon.mod.common.api.properties.CustomPokemonProperty
import com.cobblemon.mod.common.api.scheduling.ServerRealTimeTaskTracker
import com.cobblemon.mod.common.api.scheduling.ServerTaskTracker
import com.cobblemon.mod.common.api.spawning.BestSpawner
import com.cobblemon.mod.common.api.spawning.CobblemonSpawningProspector
import com.cobblemon.mod.common.api.spawning.context.AreaContextResolver
import com.cobblemon.mod.common.api.spawning.prospecting.SpawningProspector
import com.cobblemon.mod.common.api.spawning.CobblemonSpawningZoneGenerator
import com.cobblemon.mod.common.api.spawning.position.AreaSpawnablePositionResolver
import com.cobblemon.mod.common.api.spawning.SpawningZoneGenerator
import com.cobblemon.mod.common.api.starter.StarterHandler
import com.cobblemon.mod.common.api.storage.PokemonStoreManager
import com.cobblemon.mod.common.api.storage.adapter.conversions.ReforgedConversion
@@ -63,13 +63,10 @@ import com.cobblemon.mod.common.api.storage.player.adapter.PlayerDataMongoBacken
import com.cobblemon.mod.common.api.storage.player.factory.CachedPlayerDataStoreFactory
import com.cobblemon.mod.common.api.tags.CobblemonEntityTypeTags
import com.cobblemon.mod.common.api.tags.CobblemonItemTags
import com.cobblemon.mod.common.battles.BagItems
import com.cobblemon.mod.common.battles.BattleFormat
import com.cobblemon.mod.common.battles.BattleRegistry
import com.cobblemon.mod.common.battles.BattleSide
import com.cobblemon.mod.common.battles.ShowdownThread
import com.cobblemon.mod.common.battles.*
import com.cobblemon.mod.common.battles.actor.PokemonBattleActor
import com.cobblemon.mod.common.battles.pokemon.BattlePokemon
import com.cobblemon.mod.common.block.DispenserBehaviorRegistry
import com.cobblemon.mod.common.client.CobblemonPack
import com.cobblemon.mod.common.command.argument.*
import com.cobblemon.mod.common.config.CobblemonConfig
@@ -78,6 +75,7 @@ import com.cobblemon.mod.common.config.constraint.IntConstraint
import com.cobblemon.mod.common.config.starter.StarterConfig
import com.cobblemon.mod.common.data.CobblemonDataProvider
import com.cobblemon.mod.common.events.AdvancementHandler
import com.cobblemon.mod.common.events.EntityCallbackHandler
import com.cobblemon.mod.common.events.FlowHandler
import com.cobblemon.mod.common.events.PokedexHandler
import com.cobblemon.mod.common.events.ServerTickHandler
@@ -91,23 +89,11 @@ 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.TagSeasonResolver
import com.cobblemon.mod.common.pokemon.helditem.CobblemonHeldItemManager
import com.cobblemon.mod.common.pokemon.properties.AspectPropertyType
import com.cobblemon.mod.common.pokemon.properties.BattleCloneProperty
import com.cobblemon.mod.common.pokemon.properties.FreezeFrameProperty
import com.cobblemon.mod.common.pokemon.properties.HiddenAbilityPropertyType
import com.cobblemon.mod.common.pokemon.properties.NoAIProperty
import com.cobblemon.mod.common.pokemon.properties.UnaspectPropertyType
import com.cobblemon.mod.common.pokemon.properties.UncatchableProperty
import com.cobblemon.mod.common.pokemon.properties.*
import com.cobblemon.mod.common.pokemon.properties.tags.PokemonFlagProperty
import com.cobblemon.mod.common.pokemon.stat.CobblemonStatProvider
import com.cobblemon.mod.common.starter.CobblemonStarterHandler
import com.cobblemon.mod.common.util.DataKeys
import com.cobblemon.mod.common.util.cobblemonResource
import com.cobblemon.mod.common.util.ifDedicatedServer
import com.cobblemon.mod.common.util.isLaterVersion
import com.cobblemon.mod.common.util.party
import com.cobblemon.mod.common.util.requestWallpapers
import com.cobblemon.mod.common.util.server
import com.cobblemon.mod.common.util.*
import com.cobblemon.mod.common.world.feature.CobblemonPlacedFeatures
import com.cobblemon.mod.common.world.feature.ore.CobblemonOrePlacedFeatures
import com.cobblemon.mod.common.world.gamerules.CobblemonGameRules
@@ -115,17 +101,6 @@ import com.mongodb.ConnectionString
import com.mongodb.MongoClientSettings
import com.mongodb.client.MongoClient
import com.mongodb.client.MongoClients
import java.io.File
import java.io.FileReader
import java.io.FileWriter
import java.io.PrintWriter
import java.util.UUID
import java.util.concurrent.TimeUnit
import kotlin.math.roundToInt
import kotlin.properties.Delegates
import kotlin.reflect.full.memberProperties
import kotlin.reflect.jvm.isAccessible
import kotlin.reflect.jvm.javaField
import net.minecraft.client.Minecraft
import net.minecraft.commands.synchronization.SingletonArgumentInfo
import net.minecraft.resources.ResourceKey
@@ -138,6 +113,17 @@ import net.minecraft.world.level.Level
import net.minecraft.world.level.storage.LevelResource
import org.apache.logging.log4j.LogManager
import org.apache.logging.log4j.Logger
import java.io.File
import java.io.FileReader
import java.io.FileWriter
import java.io.PrintWriter
import java.util.*
import java.util.concurrent.TimeUnit
import kotlin.math.roundToInt
import kotlin.properties.Delegates
import kotlin.reflect.full.memberProperties
import kotlin.reflect.jvm.isAccessible
import kotlin.reflect.jvm.javaField
object Cobblemon {
const val MODID = CobblemonBuildDetails.MOD_ID
@@ -159,8 +145,8 @@ object Cobblemon {
var isDedicatedServer = false
val showdownThread = ShowdownThread()
lateinit var config: CobblemonConfig
var prospector: SpawningProspector = CobblemonSpawningProspector
var areaContextResolver: AreaContextResolver = object : AreaContextResolver {}
var spawningZoneGenerator: SpawningZoneGenerator = CobblemonSpawningZoneGenerator
var areaSpawnablePositionResolver: AreaSpawnablePositionResolver = object : AreaSpawnablePositionResolver {}
val bestSpawner = BestSpawner
val battleRegistry = BattleRegistry
var storage = PokemonStoreManager()
@@ -194,6 +180,8 @@ object Cobblemon {
this.LOGGER.info(" - Branch: ${CobblemonBuildDetails.BRANCH}")
}
implementation.registerRecipeSerializers()
implementation.registerRecipeTypes()
implementation.registerPermissionValidator()
implementation.registerSoundEvents()
implementation.registerDataComponents()
@@ -202,12 +190,15 @@ object Cobblemon {
implementation.registerEntityTypes()
implementation.registerEntityAttributes()
implementation.registerBlockEntityTypes()
implementation.registerPoiTypes()
implementation.registerVillagers()
implementation.registerWorldGenFeatures()
implementation.registerParticles()
implementation.registerMenu()
implementation.registerEntityDataSerializers()
implementation.registerCriteria()
implementation.registerEntitySubPredicates()
DispenserBehaviorRegistry.registerDispenserBehaviors()
DropEntry.register("command", CommandDropEntry::class.java)
DropEntry.register("item", ItemDropEntry::class.java, isDefault = true)
@@ -307,9 +298,6 @@ object Cobblemon {
SpeciesFeatures.types["flag"] = FlagSpeciesFeatureProvider::class.java
SpeciesFeatures.types["integer"] = IntSpeciesFeatureProvider::class.java
SpeciesFeatures.register(
DataKeys.CAN_BE_MILKED,
FlagSpeciesFeatureProvider(keys = listOf(DataKeys.CAN_BE_MILKED), default = true))
SpeciesFeatures.register(
DataKeys.HAS_BEEN_SHEARED,
FlagSpeciesFeatureProvider(keys = listOf(DataKeys.HAS_BEEN_SHEARED), default = false))
@@ -326,6 +314,7 @@ object Cobblemon {
CobblemonEvents.POKEMON_PROPERTY_INITIALISED.emit(Unit)
FlowHandler.setup()
EntityCallbackHandler.setup()
ifDedicatedServer {
isDedicatedServer = true
@@ -15,6 +15,11 @@ object CobblemonActivities {
val BATTLING = register(Activity("battling"))
val ACTION_EFFECT = register(Activity("action_effect"))
val NPC_CHATTING = register(Activity("npc_chatting"))
val POKEMON_SLEEPING_ACTIVITY = register(Activity("pokemon_sleeping"))
val POKEMON_GROW_CROP = register(Activity("pokemon_grow_crop"))
val POKEMON_SLEEP_ON_TRAINER_BED = register(Activity("pokemon_sleep_on_trainer_bed"))
val POKEMON_HERD = register(Activity("pokemon_herd"))
val POKEMON_POLLINATION = register(Activity("pokemon_pollination"))
fun register(activity: Activity): Activity {
activities.add(activity)
@@ -0,0 +1,118 @@
/*
* 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.ai.CobblemonBehaviour
import com.cobblemon.mod.common.api.ai.config.BehaviourConfig
import com.cobblemon.mod.common.api.ai.config.task.TaskConfig
import com.cobblemon.mod.common.api.data.JsonDataRegistry
import com.cobblemon.mod.common.api.data.JsonDataRegistry.Companion.JSON_EXTENSION
import com.cobblemon.mod.common.api.molang.ExpressionLike
import com.cobblemon.mod.common.api.npc.configuration.MoLangConfigVariable
import com.cobblemon.mod.common.api.reactive.SimpleObservable
import com.cobblemon.mod.common.net.messages.client.data.BehaviourSyncPacket
import com.cobblemon.mod.common.util.adapters.ActivityAdapter
import com.cobblemon.mod.common.util.adapters.BehaviourConfigAdapter
import com.cobblemon.mod.common.util.adapters.ExpressionAdapter
import com.cobblemon.mod.common.util.adapters.ExpressionLikeAdapter
import com.cobblemon.mod.common.util.adapters.ExpressionOrEntityVariableAdapter
import com.cobblemon.mod.common.util.adapters.IdentifierAdapter
import com.cobblemon.mod.common.util.adapters.MemoryModuleTypeAdapter
import com.cobblemon.mod.common.util.adapters.SensorTypeAdapter
import com.cobblemon.mod.common.util.adapters.TaskConfigAdapter
import com.cobblemon.mod.common.util.adapters.TranslatedTextAdapter
import com.cobblemon.mod.common.util.cobblemonResource
import com.cobblemon.mod.common.util.endsWith
import com.google.gson.Gson
import com.google.gson.GsonBuilder
import com.google.gson.reflect.TypeToken
import com.mojang.datafixers.util.Either
import java.io.File
import net.minecraft.network.chat.Component
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 net.minecraft.world.entity.ai.memory.MemoryModuleType
import net.minecraft.world.entity.ai.sensing.SensorType
import net.minecraft.world.entity.schedule.Activity
object CobblemonBehaviours : JsonDataRegistry<CobblemonBehaviour> {
override val gson: Gson = GsonBuilder()
.setPrettyPrinting()
.registerTypeAdapter(Activity::class.java, ActivityAdapter)
.registerTypeAdapter(Expression::class.java, ExpressionAdapter)
.registerTypeAdapter(ExpressionLike::class.java, ExpressionLikeAdapter)
.registerTypeAdapter(MemoryModuleType::class.java, MemoryModuleTypeAdapter)
.registerTypeAdapter(SensorType::class.java, SensorTypeAdapter)
.registerTypeAdapter(BehaviourConfig::class.java, BehaviourConfigAdapter)
.registerTypeAdapter(TaskConfig::class.java, TaskConfigAdapter)
.registerTypeAdapter(
TypeToken.getParameterized(Either::class.java, Expression::class.java, MoLangConfigVariable::class.java).type,
ExpressionOrEntityVariableAdapter
)
.registerTypeAdapter(Component::class.java, TranslatedTextAdapter)
.registerTypeAdapter(ResourceLocation::class.java, IdentifierAdapter)
.create()
override val typeToken = TypeToken.get(CobblemonBehaviour::class.java)
override val resourcePath = "behaviours"
override val id: ResourceLocation = cobblemonResource("behaviours")
override val type = PackType.SERVER_DATA
override val observable = SimpleObservable<CobblemonBehaviours>()
/**
* Any behaviours that are put into /pokemon/auto will be automatically
* applied to all Pokémon species/forms that don't define a baseAI list of
* behaviour configurations. This is an addon-friendly way of defining the general
* rules of Pokémon AI without it being unavoidable for specific
* species.
*/
val autoPokemonBehaviours = mutableListOf<CobblemonBehaviour>()
/** See [autoPokemonBehaviours] but think npc instead of pokemon*/
val autoNPCBehaviours = mutableListOf<CobblemonBehaviour>()
val behaviours = mutableMapOf<ResourceLocation, CobblemonBehaviour>()
override fun sync(player: ServerPlayer) {
player.sendPacket(BehaviourSyncPacket(behaviours.filter { it.value.visible }))
}
override fun reload(manager: ResourceManager) {
autoPokemonBehaviours.clear()
autoNPCBehaviours.clear()
val data = mutableMapOf<ResourceLocation, CobblemonBehaviour>()
manager.listResources(resourcePath) { path -> path.endsWith(JSON_EXTENSION) }.forEach { (identifier, resource) ->
resource.open().use { stream ->
stream.bufferedReader().use { reader ->
val resolvedIdentifier = ResourceLocation.fromNamespaceAndPath(identifier.namespace, File(identifier.path).nameWithoutExtension)
val behaviour = parse(reader, resolvedIdentifier)
if ("pokemon/auto/" in identifier.path) {
autoPokemonBehaviours.add(behaviour)
} else if ("npc/auto/" in identifier.path) {
autoNPCBehaviours.add(behaviour)
}
data[resolvedIdentifier] = behaviour
}
}
}
reload(data)
Cobblemon.LOGGER.info("Loaded ${behaviours.size} entity behaviours")
observable.emit(this)
}
override fun reload(data: Map<ResourceLocation, CobblemonBehaviour>) {
behaviours.clear()
behaviours.putAll(data)
}
}
@@ -36,9 +36,6 @@ object CobblemonBlockEntities : PlatformRegistry<Registry<BlockEntityType<*>>, R
@JvmField
val PC: BlockEntityType<PCBlockEntity> = this.create("pc", BlockEntityType.Builder.of(::PCBlockEntity, CobblemonBlocks.PC).build(null))
@JvmField
val STADIUM: BlockEntityType<StadiumBlockEntity> = this.create("stadium_terminal", BlockEntityType.Builder.of(::StadiumBlockEntity, CobblemonBlocks.STADIUM).build(null))
@JvmField
val LECTERN: BlockEntityType<LecternBlockEntity> = this.create("lectern", BlockEntityType.Builder.of(::LecternBlockEntity, CobblemonBlocks.LECTERN).build(null))
@@ -48,9 +45,9 @@ object CobblemonBlockEntities : PlatformRegistry<Registry<BlockEntityType<*>>, R
@JvmField
val PASTURE: BlockEntityType<PokemonPastureBlockEntity> = this.create("pasture", BlockEntityType.Builder.of(::PokemonPastureBlockEntity, CobblemonBlocks.PASTURE).build(null))
@JvmField
val SIGN: BlockEntityType<CobblemonSignBlockEntity> = this.create("sign", BlockEntityType.Builder.of(::CobblemonSignBlockEntity, CobblemonBlocks.APRICORN_SIGN, CobblemonBlocks.APRICORN_WALL_SIGN).build(null))
val SIGN: BlockEntityType<CobblemonSignBlockEntity> = this.create("sign", BlockEntityType.Builder.of(::CobblemonSignBlockEntity, CobblemonBlocks.APRICORN_SIGN, CobblemonBlocks.APRICORN_WALL_SIGN, CobblemonBlocks.SACCHARINE_SIGN, CobblemonBlocks.SACCHARINE_WALL_SIGN).build(null))
@JvmField
val HANGING_SIGN: BlockEntityType<CobblemonHangingSignBlockEntity> = this.create("hanging_sign", BlockEntityType.Builder.of(::CobblemonHangingSignBlockEntity, CobblemonBlocks.APRICORN_HANGING_SIGN, CobblemonBlocks.APRICORN_WALL_HANGING_SIGN).build(null))
val HANGING_SIGN: BlockEntityType<CobblemonHangingSignBlockEntity> = this.create("hanging_sign", BlockEntityType.Builder.of(::CobblemonHangingSignBlockEntity, CobblemonBlocks.APRICORN_HANGING_SIGN, CobblemonBlocks.APRICORN_WALL_HANGING_SIGN, CobblemonBlocks.SACCHARINE_HANGING_SIGN, CobblemonBlocks.SACCHARINE_WALL_HANGING_SIGN).build(null))
@JvmField
val GILDED_CHEST: BlockEntityType<GildedChestBlockEntity> = this.create("chest", BlockEntityType.Builder.of(::GildedChestBlockEntity,
@@ -89,4 +86,24 @@ object CobblemonBlockEntities : PlatformRegistry<Registry<BlockEntityType<*>>, R
val DISPLAY_CASE: BlockEntityType<DisplayCaseBlockEntity> = this.create("display_case",
BlockEntityType.Builder.of(::DisplayCaseBlockEntity, CobblemonBlocks.DISPLAY_CASE).build(null)
)
// TODO after 1.7
// @JvmField
// val INCENSE_SWEET: BlockEntityType<SweetIncenseBlockEntity> = this.create("incense_sweet",
// BlockEntityType.Builder.of(::SweetIncenseBlockEntity, CobblemonBlocks.INCENSE_SWEET).build(null)
// )
@JvmField
val CAMPFIRE: BlockEntityType<CampfireBlockEntity> = this.create("campfire_pot",
BlockEntityType.Builder.of(::CampfireBlockEntity,
CobblemonBlocks.CAMPFIRE,
CobblemonBlocks.SOUL_CAMPFIRE
).build(null)
)
@JvmField
val POKE_SNACK: BlockEntityType<PokeSnackBlockEntity> = this.create(
"poke_snack",
BlockEntityType.Builder.of(::PokeSnackBlockEntity, CobblemonBlocks.POKE_SNACK, CobblemonBlocks.POKE_CAKE).build(null)
)
}
@@ -10,16 +10,23 @@ package com.cobblemon.mod.common
import com.cobblemon.mod.common.api.apricorn.Apricorn
import com.cobblemon.mod.common.block.*
import com.cobblemon.mod.common.block.campfirepot.CampfireBlock
import com.cobblemon.mod.common.block.LecternBlock
import com.cobblemon.mod.common.block.MintBlock.MintType
import com.cobblemon.mod.common.block.campfirepot.CampfirePotBlock
import com.cobblemon.mod.common.block.chest.GildedChestBlock
import com.cobblemon.mod.common.block.general.BaleBlock
import com.cobblemon.mod.common.block.grower.SaccharineTreeGrower
import com.cobblemon.mod.common.block.sign.CobblemonHangingSignBlock
import com.cobblemon.mod.common.block.sign.CobblemonSignBlock
import com.cobblemon.mod.common.block.sign.CobblemonWallHangingSignBlock
import com.cobblemon.mod.common.block.sign.CobblemonWallSignBlock
import com.cobblemon.mod.common.block.general.HorizontalRotationCarpetBlock
import com.cobblemon.mod.common.block.general.HorizontalRotationalBlock
import com.cobblemon.mod.common.mixin.invoker.*
import com.cobblemon.mod.common.platform.PlatformRegistry
import com.cobblemon.mod.common.util.cobblemonResource
import net.minecraft.core.BlockPos
import net.minecraft.core.Registry
import net.minecraft.core.registries.BuiltInRegistries
import net.minecraft.core.registries.Registries
@@ -27,9 +34,14 @@ import net.minecraft.resources.ResourceKey
import net.minecraft.resources.ResourceLocation
import net.minecraft.util.valueproviders.UniformInt
import net.minecraft.world.effect.MobEffects
import net.minecraft.world.entity.EntityType
import net.minecraft.world.level.BlockGetter
import net.minecraft.world.level.block.*
import net.minecraft.world.level.block.state.BlockBehaviour
import net.minecraft.world.level.block.state.BlockState
import net.minecraft.world.level.block.state.properties.BlockSetType
import net.minecraft.world.level.block.state.properties.BlockStateProperties
import net.minecraft.world.level.block.state.properties.BlockStateProperties.LIT
import net.minecraft.world.level.block.state.properties.NoteBlockInstrument
import net.minecraft.world.level.block.state.properties.WoodType
import net.minecraft.world.level.material.MapColor
@@ -43,6 +55,8 @@ object CobblemonBlocks : PlatformRegistry<Registry<Block>, ResourceKey<Registry<
val APRICORN_BLOCK_SET_TYPE = BlockSetType("apricorn")
val APRICORN_WOOD_TYPE = WoodType.register(WoodType("apricorn", APRICORN_BLOCK_SET_TYPE))
val SACCHARINE_BLOCK_SET_TYPE = BlockSetType("saccharine")
val SACCHARINE_WOOD_TYPE = WoodType.register(WoodType("saccharine", SACCHARINE_BLOCK_SET_TYPE))
// Evolution Ores
@JvmField
@@ -159,8 +173,68 @@ object CobblemonBlocks : PlatformRegistry<Registry<Block>, ResourceKey<Registry<
@JvmField
val YELLOW_APRICORN_SAPLING = this.create("yellow_apricorn_sapling", ApricornSaplingBlock(PLANT_PROPERTIES, Apricorn.YELLOW))
// Saccharines
@JvmField
val SACCHARINE_LOG = this.create("saccharine_log", SaccharineLogBlock(BlockBehaviour.Properties.of().mapColor(MapColor.COLOR_BLUE).instrument(NoteBlockInstrument.BASS).strength(2.0F).sound(SoundType.WOOD).ignitedByLava()))
@JvmField
val SACCHARINE_LOG_SLATHERED = this.create("saccharine_log_slathered", SaccharineLogSlatheredBlock(BlockBehaviour.Properties.of().mapColor(MapColor.COLOR_BLUE).instrument(NoteBlockInstrument.BASS).strength(2.0F).sound(SoundType.WOOD).ignitedByLava()))
@JvmField
val STRIPPED_SACCHARINE_LOG = this.create("stripped_saccharine_log", RotatedPillarBlock(BlockBehaviour.Properties.of().mapColor(MapColor.COLOR_LIGHT_BLUE).instrument(NoteBlockInstrument.BASS).strength(2.0F).sound(SoundType.WOOD).ignitedByLava())) //log("stripped_saccharine_log")
@JvmField
val SACCHARINE_WOOD = log("saccharine_wood")
@JvmField
val STRIPPED_SACCHARINE_WOOD = this.create("stripped_saccharine_wood", RotatedPillarBlock(BlockBehaviour.Properties.of().mapColor(MapColor.COLOR_LIGHT_BLUE).instrument(NoteBlockInstrument.BASS).strength(2.0F).sound(SoundType.WOOD).ignitedByLava())) //log("stripped_saccharine_log")
@JvmField
val SACCHARINE_PLANKS = this.create("saccharine_planks", Block(BlockBehaviour.Properties.of().mapColor(MapColor.COLOR_LIGHT_BLUE).instrument(NoteBlockInstrument.BASS).strength(2.0f, 3.0f).sound(SoundType.WOOD)))
@JvmField
val SACCHARINE_LEAVES = this.create("saccharine_leaves", SaccharineLeafBlock(
BlockBehaviour.Properties.of().mapColor(
MapColor.PLANT
).strength(0.2f).randomTicks().sound(SoundType.GRASS).noOcclusion()
.isValidSpawn { _: BlockState?, _: BlockGetter?, _: BlockPos?, entity: EntityType<*>? ->
entity === EntityType.OCELOT || entity === EntityType.PARROT
}.isSuffocating { _: BlockState?, _: BlockGetter?, _: BlockPos? ->
false
}.isViewBlocking { _: BlockState?, _: BlockGetter?, _: BlockPos? ->
false
}.ignitedByLava().pushReaction(PushReaction.DESTROY)
.isRedstoneConductor { _: BlockState?, _: BlockGetter?, _: BlockPos? ->
false
}))
@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)))
@JvmField
val SACCHARINE_BUTTON = this.create("saccharine_button", BlocksInvoker.createWoodenButtonBlock(BlockSetType.OAK))
@JvmField
val SACCHARINE_PRESSURE_PLATE = this.create("saccharine_pressure_plate", PressurePlateBlockInvoker.`cobblemon$create`(SACCHARINE_BLOCK_SET_TYPE, BlockBehaviour.Properties.of().mapColor(SACCHARINE_PLANKS.defaultMapColor()).instrument(NoteBlockInstrument.BASS).noCollission().strength(0.5f).sound(SoundType.WOOD)))
@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))
@JvmField
val SACCHARINE_HANGING_SIGN = this.create("saccharine_hanging_sign", CobblemonHangingSignBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.OAK_WALL_HANGING_SIGN), SACCHARINE_WOOD_TYPE))
@JvmField
val SACCHARINE_WALL_HANGING_SIGN = this.create("saccharine_wall_hanging_sign", CobblemonWallHangingSignBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.OAK_HANGING_SIGN), SACCHARINE_WOOD_TYPE))
@JvmField
val SACCHARINE_SLAB = this.create("saccharine_slab", SlabBlock(BlockBehaviour.Properties.of().mapColor(MapColor.WOOD).instrument(NoteBlockInstrument.BASS).strength(2.0f, 3.0f).sound(SoundType.WOOD)))
@JvmField
val SACCHARINE_STAIRS = this.create("saccharine_stairs", StairsBlockInvoker.`cobblemon$create`(SACCHARINE_PLANKS.defaultBlockState(), BlockBehaviour.Properties.ofFullCopy(SACCHARINE_PLANKS)))
@JvmField
val SACCHARINE_DOOR = this.create("saccharine_door", DoorBlockInvoker.`cobblemon$create`(SACCHARINE_BLOCK_SET_TYPE, BlockBehaviour.Properties.of().mapColor(SACCHARINE_PLANKS.defaultMapColor()).instrument(NoteBlockInstrument.BASS).strength(3.0F).sound(SoundType.WOOD).noOcclusion()))
@JvmField
val SACCHARINE_TRAPDOOR = this.create("saccharine_trapdoor", TrapdoorBlockInvoker.`cobblemon$create`(SACCHARINE_BLOCK_SET_TYPE, BlockBehaviour.Properties.of().mapColor(MapColor.WOOD).instrument(NoteBlockInstrument.BASS).strength(3.0F).sound(SoundType.WOOD).noOcclusion()))
@JvmField
val SACCHARINE_SAPLING = this.create("saccharine_sapling", SaplingBlock(SaccharineTreeGrower(), PLANT_PROPERTIES))
@JvmField
val MEDICINAL_LEEK = this.create("medicinal_leek", MedicinalLeekBlock(BlockBehaviour.Properties.of().pushReaction(PushReaction.DESTROY).ignitedByLava().mapColor(MapColor.CRIMSON_NYLIUM).noCollission().randomTicks().instabreak().sound(CobblemonSounds.MEDICINAL_LEEK_SOUNDS)))
// TODO after 1.7
// @JvmField
// val BUGWORT = this.create("bugwort", BugwortBlock(BlockBehaviour.Properties.of().pushReaction(PushReaction.DESTROY).ignitedByLava().mapColor(MapColor.COLOR_PURPLE).noCollission().randomTicks().instabreak().sound(CobblemonSounds.MEDICINAL_LEEK_SOUNDS)))
@JvmField
val ENERGY_ROOT = this.create("energy_root", EnergyRootBlock(BlockBehaviour.Properties.of().pushReaction(PushReaction.DESTROY).ignitedByLava().mapColor(MapColor.DIRT).noCollission().randomTicks().instabreak().sound(CobblemonSounds.ENERGY_ROOT_SOUNDS)))
@JvmField
@@ -168,6 +242,11 @@ object CobblemonBlocks : PlatformRegistry<Registry<Block>, ResourceKey<Registry<
@JvmField
val REVIVAL_HERB = this.create("revival_herb", RevivalHerbBlock(BlockBehaviour.Properties.of().pushReaction(PushReaction.DESTROY).mapColor(MapColor.PLANT).ignitedByLava().noCollission().instabreak().sound(CobblemonSounds.REVIVAL_HERB_SOUNDS)))
@JvmField
val POKE_CAKE = this.create("poke_cake", PokeSnackBlock(BlockBehaviour.Properties.of().forceSolidOn().strength(0.5F).sound(SoundType.WOOL).pushReaction(PushReaction.DESTROY).lightLevel { if (it.getValue(LIT)) 3 else 0 }, false))
@JvmField
val POKE_SNACK = this.create("poke_snack", PokeSnackBlock(BlockBehaviour.Properties.of().forceSolidOn().strength(0.5F).sound(SoundType.WOOL).pushReaction(PushReaction.DESTROY).lightLevel { if (it.getValue(LIT)) 3 else 0 }, true))
@JvmField
val TUMBLESTONE_CLUSTER = tumblestoneBlock("tumblestone_cluster", GrowableStoneBlock.STAGE_3, 7, 3, null)
@JvmField
@@ -319,6 +398,63 @@ object CobblemonBlocks : PlatformRegistry<Registry<Block>, ResourceKey<Registry<
@JvmField
val YELLOW_APRICORN = apricornBlock("yellow_apricorn", Apricorn.YELLOW)
@JvmField
val BLACK_CAMPFIRE_POT = create("campfire_pot_black",
CampfirePotBlock(
BlockBehaviour.Properties.of().mapColor(MapColor.COLOR_BLACK).sound(CobblemonSounds.CAMPFIRE_POT_SOUNDS)
.strength(0.5F).pushReaction(PushReaction.BLOCK).noOcclusion()
)
)
@JvmField
val BLUE_CAMPFIRE_POT = create("campfire_pot_blue",
CampfirePotBlock(
BlockBehaviour.Properties.of().mapColor(MapColor.COLOR_BLUE).sound(CobblemonSounds.CAMPFIRE_POT_SOUNDS)
.strength(0.5F).pushReaction(PushReaction.BLOCK).noOcclusion()
)
)
@JvmField
val GREEN_CAMPFIRE_POT = create("campfire_pot_green",
CampfirePotBlock(
BlockBehaviour.Properties.of().mapColor(MapColor.COLOR_GREEN).sound(CobblemonSounds.CAMPFIRE_POT_SOUNDS)
.strength(0.5F).pushReaction(PushReaction.BLOCK).noOcclusion()
)
)
@JvmField
val PINK_CAMPFIRE_POT = create("campfire_pot_pink",
CampfirePotBlock(
BlockBehaviour.Properties.of().mapColor(MapColor.COLOR_PINK).sound(CobblemonSounds.CAMPFIRE_POT_SOUNDS)
.strength(0.5F).pushReaction(PushReaction.BLOCK).noOcclusion()
)
)
@JvmField
val RED_CAMPFIRE_POT = create("campfire_pot_red",
CampfirePotBlock(
BlockBehaviour.Properties.of().mapColor(MapColor.COLOR_RED).sound(CobblemonSounds.CAMPFIRE_POT_SOUNDS)
.strength(0.5F).pushReaction(PushReaction.BLOCK).noOcclusion()
)
)
@JvmField
val WHITE_CAMPFIRE_POT = create("campfire_pot_white",
CampfirePotBlock(
BlockBehaviour.Properties.of().mapColor(MapColor.COLOR_LIGHT_GRAY)
.sound(CobblemonSounds.CAMPFIRE_POT_SOUNDS).strength(0.5F).pushReaction(PushReaction.BLOCK)
.noOcclusion()
)
)
@JvmField
val YELLOW_CAMPFIRE_POT = create("campfire_pot_yellow",
CampfirePotBlock(
BlockBehaviour.Properties.of().mapColor(MapColor.COLOR_YELLOW).sound(CobblemonSounds.CAMPFIRE_POT_SOUNDS)
.strength(0.5F).pushReaction(PushReaction.BLOCK).noOcclusion()
)
)
@JvmField
val CAMPFIRE = create("campfire", CampfireBlock(BlockBehaviour.Properties.of().sound(SoundType.WOOD).noOcclusion().pushReaction(PushReaction.BLOCK).mapColor(MapColor.PODZOL).strength(2.0F).lightLevel{14}, false))
@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
@@ -342,29 +478,30 @@ object CobblemonBlocks : PlatformRegistry<Registry<Block>, ResourceKey<Registry<
val GIMMIGHOUL_CHEST = create("gimmighoul_chest", GildedChestBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.CHEST).noOcclusion().sound(CobblemonSounds.GILDED_CHEST_SOUNDS), GildedChestBlock.Type.FAKE))
@JvmField
val MONITOR = create("monitor", MonitorBlock(BlockBehaviour.Properties.of().mapColor(MapColor.METAL).sound(SoundType.METAL).pushReaction(PushReaction.BLOCK).requiresCorrectToolForDrops().strength(5.0F, 6.0F).lightLevel { if (it.getValue(MonitorBlock.SCREEN) != MonitorBlock.MonitorScreen.OFF) 15 else 0 }))
val MONITOR = create("monitor", MonitorBlock(BlockBehaviour.Properties.of().mapColor(MapColor.METAL).sound(SoundType.METAL).pushReaction(PushReaction.BLOCK).requiresCorrectToolForDrops().strength(5.0F, 6.0F).lightLevel { if (it.getValue(MonitorBlock.SCREEN) != MonitorBlock.MonitorScreen.OFF) 13 else 0 }))
@JvmField
val FOSSIL_ANALYZER = create("fossil_analyzer", FossilAnalyzerBlock(BlockBehaviour.Properties.of().mapColor(MapColor.METAL).sound(SoundType.METAL).pushReaction(PushReaction.BLOCK).requiresCorrectToolForDrops().strength(5.0F, 6.0F).noOcclusion()))
@JvmField
val RESTORATION_TANK = create("restoration_tank", RestorationTankBlock(BlockBehaviour.Properties.of().mapColor(MapColor.METAL).sound(SoundType.GLASS).pushReaction(PushReaction.BLOCK).requiresCorrectToolForDrops().strength(5.0F, 6.0F).noOcclusion()))
@JvmField
val HEALING_MACHINE = create("healing_machine", HealingMachineBlock(BlockBehaviour.Properties.of().mapColor(MapColor.METAL).sound(SoundType.METAL).pushReaction(PushReaction.BLOCK).strength(2f).noOcclusion().lightLevel { if (it.getValue(HealingMachineBlock.CHARGE_LEVEL) >= HealingMachineBlock.MAX_CHARGE_LEVEL) 7 else 2 }))
val HEALING_MACHINE = create("healing_machine", HealingMachineBlock(BlockBehaviour.Properties.of().mapColor(MapColor.METAL).sound(SoundType.METAL).pushReaction(PushReaction.BLOCK).strength(2f).noOcclusion().lightLevel { if (it.getValue(HealingMachineBlock.CHARGE_LEVEL) >= HealingMachineBlock.MAX_CHARGE_LEVEL) 12 else 5 }))
@JvmField
val PC = create("pc", PCBlock(BlockBehaviour.Properties.of().mapColor(MapColor.METAL).sound(SoundType.METAL).pushReaction(PushReaction.BLOCK).strength(2F).noOcclusion().lightLevel { if ((it.getValue(PCBlock.ON) as Boolean) && (it.getValue(PCBlock.PART) == PCBlock.PCPart.TOP)) 10 else 0 }))
val PC = create("pc", PCBlock(BlockBehaviour.Properties.of().mapColor(MapColor.METAL).sound(SoundType.METAL).pushReaction(PushReaction.BLOCK).strength(2F).noOcclusion().lightLevel { if ((it.getValue(PCBlock.ON) as Boolean) && (it.getValue(PCBlock.PART) == PCBlock.PCPart.TOP)) 13 else 0 }))
@JvmField
val STADIUM = create("stadium_terminal", StadiumBlock(BlockBehaviour.Properties.of().mapColor(MapColor.METAL).sound(SoundType.METAL).pushReaction(PushReaction.BLOCK).strength(2F)))
val LECTERN = create("lectern", LecternBlock(BlockBehaviour.Properties.of().mapColor(MapColor.WOOD).instrument(NoteBlockInstrument.BASS).sound(SoundType.WOOD).strength(2.5F).ignitedByLava().lightLevel { if (it.getValue(LecternBlock.EMIT_LIGHT) as Boolean) 13 else 0 }))
@JvmField
val LECTERN = create("lectern", LecternBlock(BlockBehaviour.Properties.of().mapColor(MapColor.WOOD).instrument(NoteBlockInstrument.BASS).sound(SoundType.WOOD).strength(2.5F).ignitedByLava()))
val DISPLAY_CASE = create("display_case", DisplayCaseBlock(BlockBehaviour.Properties.of().sound(CobblemonSounds.DISPLAY_CASE_SOUNDS).noOcclusion().pushReaction(PushReaction.BLOCK).mapColor(MapColor.STONE).strength(0.3F).requiresCorrectToolForDrops()))
// TODO after 1.7
// @JvmField
// val INCENSE_SWEET = create("incense_sweet", SweetIncenseBlock(BlockBehaviour.Properties.of().sound(CobblemonSounds.DISPLAY_CASE_SOUNDS).noOcclusion().pushReaction(PushReaction.BLOCK).mapColor(MapColor.STONE).strength(0.3f)))
@JvmField
val DISPLAY_CASE = create("display_case", DisplayCaseBlock(BlockBehaviour.Properties.of().sound(CobblemonSounds.DISPLAY_CASE_SOUNDS).noOcclusion().pushReaction(PushReaction.BLOCK).mapColor(MapColor.STONE).strength(0.3F)))
@JvmField
val PASTURE = create("pasture", PastureBlock(BlockBehaviour.Properties.of().mapColor(MapColor.COLOR_BROWN).sound(SoundType.WOOD).strength(2F).noOcclusion().pushReaction(PushReaction.BLOCK).lightLevel { if ((it.getValue(PastureBlock.ON) as Boolean) && (it.getValue(PastureBlock.PART) == PastureBlock.PasturePart.TOP)) 10 else 0 }))
val PASTURE = create("pasture", PastureBlock(BlockBehaviour.Properties.of().mapColor(MapColor.COLOR_BROWN).sound(SoundType.WOOD).strength(2F).noOcclusion().pushReaction(PushReaction.BLOCK).lightLevel { if ((it.getValue(PastureBlock.ON) as Boolean) && (it.getValue(PastureBlock.PART) == PastureBlock.PasturePart.TOP)) 13 else 0 }))
val RED_MINT = create("red_mint", MintBlock(MintType.RED, BlockBehaviour.Properties.of().mapColor(MapColor.COLOR_RED).noCollission().randomTicks().instabreak().sound(CobblemonSounds.MINT_SOUNDS).pushReaction(PushReaction.DESTROY)))
@JvmField
@@ -384,6 +521,35 @@ object CobblemonBlocks : PlatformRegistry<Registry<Block>, ResourceKey<Registry<
val PEP_UP_FLOWER = this.create("pep_up_flower", FlowerBlock(MobEffects.LEVITATION, 10F, BlockBehaviour.Properties.of().mapColor(MapColor.PLANT).noCollission().instabreak().sound(SoundType.GRASS).offsetType(BlockBehaviour.OffsetType.XZ).pushReaction(PushReaction.DESTROY)))
@JvmField
val POTTED_PEP_UP_FLOWER = this.create("potted_pep_up_flower", BlocksInvoker.createFlowerPotBlock(PEP_UP_FLOWER))
@JvmField
val HEARTY_GRAINS = this.create("hearty_grains", HeartyGrainsBlock(BlockBehaviour.Properties.of().pushReaction(PushReaction.DESTROY).ignitedByLava().mapColor(MapColor.PLANT).noCollission().randomTicks().instabreak()))
@JvmField
val GALARICA_NUT_BUSH = this.create("galarica_nut_bush", NutBushBlock(BlockBehaviour.Properties.of().mapColor(MapColor.PLANT).randomTicks().noCollission().sound(SoundType.SWEET_BERRY_BUSH).pushReaction(PushReaction.DESTROY)))
@JvmField
val POTTED_RED_APRICORN_SAPLING = this.create("potted_red_apricorn_sapling", BlocksInvoker.createFlowerPotBlock(RED_APRICORN_SAPLING))
@JvmField
val POTTED_YELLOW_APRICORN_SAPLING = this.create("potted_yellow_apricorn_sapling", BlocksInvoker.createFlowerPotBlock(YELLOW_APRICORN_SAPLING))
@JvmField
val POTTED_GREEN_APRICORN_SAPLING = this.create("potted_green_apricorn_sapling", BlocksInvoker.createFlowerPotBlock(GREEN_APRICORN_SAPLING))
@JvmField
val POTTED_BLUE_APRICORN_SAPLING = this.create("potted_blue_apricorn_sapling", BlocksInvoker.createFlowerPotBlock(BLUE_APRICORN_SAPLING))
@JvmField
val POTTED_PINK_APRICORN_SAPLING = this.create("potted_pink_apricorn_sapling", BlocksInvoker.createFlowerPotBlock(PINK_APRICORN_SAPLING))
@JvmField
val POTTED_BLACK_APRICORN_SAPLING = this.create("potted_black_apricorn_sapling", BlocksInvoker.createFlowerPotBlock(BLACK_APRICORN_SAPLING))
@JvmField
val POTTED_WHITE_APRICORN_SAPLING = this.create("potted_white_apricorn_sapling", BlocksInvoker.createFlowerPotBlock(WHITE_APRICORN_SAPLING))
@JvmField
val POTTED_SACCHARINE_SAPLING = this.create("potted_saccharine_sapling", BlocksInvoker.createFlowerPotBlock(SACCHARINE_SAPLING))
@JvmField
val HEARTY_GRAIN_BALE = this.create("hearty_grain_bale", BaleBlock(BlockBehaviour.Properties.of().mapColor(MapColor.PLANT).instrument(NoteBlockInstrument.BANJO).strength(0.5F).sound(CobblemonSounds.HEARTY_GRAIN_BALE_SOUNDS)))
@JvmField
val TATAMI_BLOCK = this.create("tatami_block", HorizontalRotationalBlock(BlockBehaviour.Properties.of().ignitedByLava().mapColor(MapColor.PLANT).strength(0.1F).sound(CobblemonSounds.TATAMI_BLOCK_SOUNDS)))
@JvmField
val TATAMI_MAT = this.create("tatami_mat", HorizontalRotationCarpetBlock(BlockBehaviour.Properties.of().ignitedByLava().mapColor(MapColor.PLANT).strength(0.1F).sound(CobblemonSounds.TATAMI_MAT_SOUNDS)))
/**
* Returns a map of all the blocks that can be stripped with an axe in the format of input - output.
@@ -392,11 +558,12 @@ object CobblemonBlocks : PlatformRegistry<Registry<Block>, ResourceKey<Registry<
*/
fun strippedBlocks(): Map<Block, Block> = mapOf(
APRICORN_WOOD to STRIPPED_APRICORN_WOOD,
APRICORN_LOG to STRIPPED_APRICORN_LOG
APRICORN_LOG to STRIPPED_APRICORN_LOG,
SACCHARINE_WOOD to STRIPPED_SACCHARINE_WOOD,
SACCHARINE_LOG to STRIPPED_SACCHARINE_LOG,
SACCHARINE_LOG_SLATHERED to STRIPPED_SACCHARINE_LOG
)
private fun apricornBlock(name: String, apricorn: Apricorn): ApricornBlock = this.create(name, ApricornBlock(BlockBehaviour.Properties.of().mapColor(apricorn.mapColor()).randomTicks().strength(Blocks.OAK_LOG.defaultDestroyTime(), Blocks.OAK_LOG.explosionResistance).sound(SoundType.WOOD).noOcclusion(), apricorn))
private fun tumblestoneBlock(name: String, stage: Int, height: Int, xzOffset: Int, nextStage: Block?) : Block {
@@ -496,7 +663,19 @@ object CobblemonBlocks : PlatformRegistry<Registry<Block>, ResourceKey<Registry<
Triple(APRICORN_FENCE, 5, 20),
Triple(APRICORN_FENCE_GATE, 5, 20),
Triple(APRICORN_SLAB, 5, 20),
Triple(APRICORN_STAIRS, 5, 20)
Triple(APRICORN_STAIRS, 5, 20),
Triple(SACCHARINE_LOG, 5, 5),
Triple(SACCHARINE_LOG_SLATHERED, 5, 5),
Triple(STRIPPED_SACCHARINE_LOG, 5, 5),
Triple(SACCHARINE_WOOD, 5, 5),
Triple(STRIPPED_SACCHARINE_WOOD, 5, 5),
Triple(SACCHARINE_PLANKS, 5, 20),
Triple(SACCHARINE_LEAVES, 30, 60),
Triple(SACCHARINE_FENCE, 5, 20),
Triple(SACCHARINE_FENCE_GATE, 5, 20),
Triple(SACCHARINE_SLAB, 5, 20),
Triple(SACCHARINE_STAIRS, 5, 20)
).onEach{ data -> setFlammable(data.first, data.second, data.third) }
}
@@ -1,58 +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
import com.bedrockk.molang.Expression
import com.cobblemon.mod.common.api.ai.config.BrainConfig
import com.cobblemon.mod.common.api.ai.config.task.TaskConfig
import com.cobblemon.mod.common.api.data.DataRegistry
import com.cobblemon.mod.common.api.data.JsonDataRegistry
import com.cobblemon.mod.common.api.molang.ExpressionLike
import com.cobblemon.mod.common.api.reactive.SimpleObservable
import com.cobblemon.mod.common.util.adapters.ActivityAdapter
import com.cobblemon.mod.common.util.adapters.BrainConfigAdapter
import com.cobblemon.mod.common.util.adapters.ExpressionAdapter
import com.cobblemon.mod.common.util.adapters.ExpressionLikeAdapter
import com.cobblemon.mod.common.util.adapters.TaskConfigAdapter
import com.cobblemon.mod.common.util.cobblemonResource
import com.google.gson.Gson
import com.google.gson.GsonBuilder
import com.google.gson.reflect.TypeToken
import net.minecraft.resources.ResourceLocation
import net.minecraft.server.level.ServerPlayer
import net.minecraft.server.packs.PackType
import net.minecraft.world.entity.schedule.Activity
object CobblemonBrainConfigs : JsonDataRegistry<List<BrainConfig>> {
override val gson: Gson = GsonBuilder()
.setPrettyPrinting()
.registerTypeAdapter(Activity::class.java, ActivityAdapter)
.registerTypeAdapter(Expression::class.java, ExpressionAdapter)
.registerTypeAdapter(ExpressionLike::class.java, ExpressionLikeAdapter)
.registerTypeAdapter(BrainConfig::class.java, BrainConfigAdapter)
.registerTypeAdapter(TaskConfig::class.java, TaskConfigAdapter)
.create()
override val typeToken = TypeToken.getParameterized(List::class.java, BrainConfig::class.java) as TypeToken<List<BrainConfig>>
override val resourcePath = "brain_presets"
override val id: ResourceLocation = cobblemonResource("brain_presets")
override val type = PackType.SERVER_DATA
override val observable = SimpleObservable<CobblemonBrainConfigs>()
val presets = mutableMapOf<ResourceLocation, List<BrainConfig>>()
override fun sync(player: ServerPlayer) {
// TODO implement probs ay
}
override fun reload(data: Map<ResourceLocation, List<BrainConfig>>) {
presets.clear()
presets.putAll(data)
}
}
@@ -59,14 +59,19 @@ object CobblemonCommands {
ApplyPlayerTextureCommand.register(dispatcher)
RenameBoxCommand.register(dispatcher)
ChangeBoxWallpaperCommand.register(dispatcher)
RunMolangCommand.register(dispatcher)
RunMolangScriptCommand.register(dispatcher)
SpectateBattleCommand.register(dispatcher)
CobblemonConfigCommand.register(dispatcher)
UnlockPCBoxWallpaperCommand.register(dispatcher)
BehaviourEditCommand.register(dispatcher)
ChangePCBoxesCommand.register(dispatcher)
MarkGiveCommand.register(dispatcher)
MarkTakeCommand.register(dispatcher)
MarkGiveAllCommand.register(dispatcher)
PcSearchCommand.register(dispatcher)
PcTakeCommand.register(dispatcher)
ValidateTeamCommand.register(dispatcher)
// Possibly lock down registration if and only if under dev environment or running in an environment
// with a certain system environment variable set
@@ -93,6 +93,8 @@ object CobblemonFlows : DataRegistry {
functions: Map<String, (MoParams) -> Any> = emptyMap(),
cancelable: Cancelable? = null
) {
if (eventResourceLocation !in flows) return
if (cancelable == null) {
runtime.environment.query.functions.remove("cancel")
} else {
@@ -94,12 +94,17 @@ interface CobblemonImplementation {
*/
fun registerBlockEntityTypes()
fun registerPoiTypes()
/**
* TODO
*
*/
fun registerVillagers()
fun registerRecipeSerializers()
fun registerRecipeTypes()
/**
* TODO
*
@@ -108,6 +113,8 @@ interface CobblemonImplementation {
fun registerParticles()
fun registerMenu()
fun registerEntitySubPredicates()
@@ -8,14 +8,14 @@
package com.cobblemon.mod.common
import com.cobblemon.mod.common.item.components.HeldItemCapableComponent
import com.cobblemon.mod.common.item.components.PokemonItemComponent
import com.cobblemon.mod.common.item.RodBaitComponent
import com.cobblemon.mod.common.item.components.*
import com.cobblemon.mod.common.platform.PlatformRegistry
import com.mojang.serialization.Codec
import net.minecraft.core.Registry
import net.minecraft.core.component.DataComponentType
import net.minecraft.core.registries.BuiltInRegistries
import net.minecraft.core.registries.Registries
import net.minecraft.network.codec.ByteBufCodecs
import net.minecraft.resources.ResourceKey
import net.minecraft.resources.ResourceLocation
@@ -36,11 +36,56 @@ object CobblemonItemComponents : PlatformRegistry<Registry<DataComponentType<*>>
.networkSynchronized(RodBaitComponent.PACKET_CODEC)
.build())
val POT_DATA: DataComponentType<PotComponent> = create("cooking_pot_item", DataComponentType.builder<PotComponent>()
.persistent(PotComponent.CODEC)
.networkSynchronized(PotComponent.PACKET_CODEC)
.build())
val BAIT_EFFECTS: DataComponentType<BaitEffectsComponent> = create("bait_effects", DataComponentType.builder<BaitEffectsComponent>()
.persistent(BaitEffectsComponent.CODEC)
.networkSynchronized(BaitEffectsComponent.PACKET_CODEC)
.build())
val FLAVOUR: DataComponentType<FlavourComponent> = create("flavour", DataComponentType.builder<FlavourComponent>()
.persistent(FlavourComponent.CODEC)
.networkSynchronized(FlavourComponent.PACKET_CODEC)
.build())
val FOOD_COLOUR: DataComponentType<FoodColourComponent> = create("food_colour", DataComponentType.builder<FoodColourComponent>()
.persistent(FoodColourComponent.CODEC)
.networkSynchronized(FoodColourComponent.PACKET_CODEC)
.build())
val INGREDIENT: DataComponentType<IngredientComponent> = create("ingredient", DataComponentType.builder<IngredientComponent>()
.persistent(IngredientComponent.CODEC)
.networkSynchronized(IngredientComponent.PACKET_CODEC)
.build())
val FOOD: DataComponentType<FoodComponent> = create("food", DataComponentType.builder<FoodComponent>()
.persistent(FoodComponent.CODEC)
.networkSynchronized(FoodComponent.PACKET_CODEC)
.build())
val MOB_EFFECTS: DataComponentType<MobEffectsComponent> = create("mob_effects", DataComponentType.builder<MobEffectsComponent>()
.persistent(MobEffectsComponent.CODEC)
.networkSynchronized(MobEffectsComponent.PACKET_CODEC)
.build())
val CRAFTED: DataComponentType<Boolean> = create("crafted", DataComponentType.builder<Boolean>()
.persistent(Codec.BOOL)
.networkSynchronized(ByteBufCodecs.BOOL)
.build())
fun register() {
Registry.register(BuiltInRegistries.DATA_COMPONENT_TYPE, ResourceLocation.parse("cobblemon:pokemon_item"), POKEMON_ITEM)
Registry.register(BuiltInRegistries.DATA_COMPONENT_TYPE, ResourceLocation.parse("cobblemon:bait"), BAIT)
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: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)
}
override val registry = BuiltInRegistries.DATA_COMPONENT_TYPE
@@ -8,10 +8,12 @@
package com.cobblemon.mod.common
import com.cobblemon.mod.common.api.apricorn.Apricorn
import com.cobblemon.mod.common.api.item.ability.AbilityChanger
import com.cobblemon.mod.common.api.mulch.MulchVariant
import com.cobblemon.mod.common.api.pokeball.PokeBalls
import com.cobblemon.mod.common.api.pokemon.Natures
import com.cobblemon.mod.common.api.pokemon.stats.Stat
import com.cobblemon.mod.common.api.pokemon.stats.Stats
import com.cobblemon.mod.common.api.pokemon.status.Statuses
import com.cobblemon.mod.common.api.text.blue
@@ -26,12 +28,20 @@ import com.cobblemon.mod.common.item.armor.CobblemonArmorTrims
import com.cobblemon.mod.common.item.battle.DireHitItem
import com.cobblemon.mod.common.item.battle.GuardSpecItem
import com.cobblemon.mod.common.item.battle.XStatItem
import com.cobblemon.mod.common.item.berry.*
import com.cobblemon.mod.common.item.berry.BerryItem
import com.cobblemon.mod.common.item.berry.FriendshipRaisingBerryItem
import com.cobblemon.mod.common.item.berry.HealingBerryItem
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.food.SinisterTeaItem
import com.cobblemon.mod.common.item.interactive.*
import com.cobblemon.mod.common.item.interactive.PotionItem
import com.cobblemon.mod.common.item.interactive.ability.AbilityChangeItem
import com.cobblemon.mod.common.platform.PlatformRegistry
import com.cobblemon.mod.common.pokeball.PokeBall
import com.cobblemon.mod.common.pokemon.IVs
import com.cobblemon.mod.common.pokemon.helditem.CobblemonHeldItemManager
import com.cobblemon.mod.common.util.cobblemonResource
import net.minecraft.core.Registry
@@ -44,7 +54,16 @@ import net.minecraft.world.effect.MobEffectInstance
import net.minecraft.world.effect.MobEffects
import net.minecraft.world.entity.LivingEntity
import net.minecraft.world.food.FoodProperties
import net.minecraft.world.item.*
import net.minecraft.world.item.BlockItem
import net.minecraft.world.item.HangingSignItem
import net.minecraft.world.item.Item
import net.minecraft.world.item.Item.Properties
import net.minecraft.world.item.ItemNameBlockItem
import net.minecraft.world.item.ItemStack
import net.minecraft.world.item.Items
import net.minecraft.world.item.Rarity
import net.minecraft.world.item.SignItem
import net.minecraft.world.item.SmithingTemplateItem
import net.minecraft.world.level.Level
import net.minecraft.world.level.block.Block
@@ -171,11 +190,37 @@ object CobblemonItems : PlatformRegistry<Registry<Item>, ResourceKey<Registry<It
@JvmField
val POKEDEX_WHITE = pokedexItem(PokedexType.WHITE)
val campfire_pots = mutableListOf<CampfirePotItem>()
@JvmField
val VIVICHOKE = compostableItem("vivichoke")
val CAMPFIRE_POT_RED = campfirePotItem(CobblemonBlocks.RED_CAMPFIRE_POT, "red")
@JvmField
val CAMPFIRE_POT_YELLOW = campfirePotItem(CobblemonBlocks.YELLOW_CAMPFIRE_POT, "yellow")
@JvmField
val CAMPFIRE_POT_GREEN = campfirePotItem(CobblemonBlocks.GREEN_CAMPFIRE_POT, "green")
@JvmField
val CAMPFIRE_POT_BLUE = campfirePotItem(CobblemonBlocks.BLUE_CAMPFIRE_POT, "blue")
@JvmField
val CAMPFIRE_POT_PINK = campfirePotItem(CobblemonBlocks.PINK_CAMPFIRE_POT, "pink")
@JvmField
val CAMPFIRE_POT_BLACK = campfirePotItem(CobblemonBlocks.BLACK_CAMPFIRE_POT, "black")
@JvmField
val CAMPFIRE_POT_WHITE = campfirePotItem(CobblemonBlocks.WHITE_CAMPFIRE_POT, "white")
@JvmField
val VIVICHOKE_SEEDS = compostableItem("vivichoke_seeds", VivichokeItem(CobblemonBlocks.VIVICHOKE_SEEDS))
val HEARTY_GRAINS = compostableItem("hearty_grains", ItemNameBlockItem(CobblemonBlocks.HEARTY_GRAINS, Properties().rarity(Rarity.COMMON)))
@JvmField
val HEARTY_GRAIN_BALE = compostableBlockItem("hearty_grain_bale", CobblemonBlocks.HEARTY_GRAIN_BALE, 0.85f)
@JvmField
val TATAMI_BLOCK = blockItem("tatami_block", CobblemonBlocks.TATAMI_BLOCK)
@JvmField
val TATAMI_MAT = blockItem("tatami_mat", CobblemonBlocks.TATAMI_MAT)
@JvmField
val VIVICHOKE = compostableItem("vivichoke", CobblemonItem(Item.Properties()), 0.80f)
@JvmField
val VIVICHOKE_SEEDS = compostableItem("vivichoke_seeds", VivichokeItem(CobblemonBlocks.VIVICHOKE_SEEDS), 0.30f)
@JvmField
val RED_APRICORN = apricornItem("red", ApricornItem(CobblemonBlocks.RED_APRICORN))
@@ -218,7 +263,7 @@ object CobblemonItems : PlatformRegistry<Registry<Item>, ResourceKey<Registry<It
@JvmField
val APRICORN_PLANKS = blockItem("apricorn_planks", CobblemonBlocks.APRICORN_PLANKS)
@JvmField
val APRICORN_LEAVES = compostableBlockItem("apricorn_leaves", CobblemonBlocks.APRICORN_LEAVES)
val APRICORN_LEAVES = compostableBlockItem("apricorn_leaves", CobblemonBlocks.APRICORN_LEAVES, 0.30f)
@JvmField
val APRICORN_BOAT = create("apricorn_boat", CobblemonBoatItem(CobblemonBoatType.APRICORN, false, Item.Properties().stacksTo(1)))
@JvmField
@@ -261,6 +306,146 @@ object CobblemonItems : PlatformRegistry<Registry<Item>, ResourceKey<Registry<It
@JvmField
val GIMMIGHOUL_CHEST = this.create("gimmighoul_chest", BlockItem(CobblemonBlocks.GIMMIGHOUL_CHEST, Item.Properties()))
// Saccharines
@JvmField
val SACCHARINE_LOG = blockItem("saccharine_log", CobblemonBlocks.SACCHARINE_LOG)
@JvmField
val SACCHARINE_LOG_SLATHERED = blockItem("saccharine_log_slathered", CobblemonBlocks.SACCHARINE_LOG_SLATHERED)
@JvmField
val STRIPPED_SACCHARINE_LOG = blockItem("stripped_saccharine_log", CobblemonBlocks.STRIPPED_SACCHARINE_LOG)
@JvmField
val SACCHARINE_WOOD = blockItem("saccharine_wood", CobblemonBlocks.SACCHARINE_WOOD)
@JvmField
val STRIPPED_SACCHARINE_WOOD = blockItem("stripped_saccharine_wood", CobblemonBlocks.STRIPPED_SACCHARINE_WOOD)
@JvmField
val SACCHARINE_PLANKS = blockItem("saccharine_planks", CobblemonBlocks.SACCHARINE_PLANKS)
@JvmField
val SACCHARINE_LEAVES = compostableBlockItem("saccharine_leaves", CobblemonBlocks.SACCHARINE_LEAVES, 0.35f)
@JvmField
val SACCHARINE_BOAT = create("saccharine_boat", CobblemonBoatItem(CobblemonBoatType.SACCHARINE, false, Item.Properties().stacksTo(1)))
@JvmField
val SACCHARINE_CHEST_BOAT = create("saccharine_chest_boat", CobblemonBoatItem(CobblemonBoatType.SACCHARINE, true, Item.Properties().stacksTo(1)))
@JvmField
val SACCHARINE_DOOR = blockItem("saccharine_door", CobblemonBlocks.SACCHARINE_DOOR)
@JvmField
val SACCHARINE_TRAPDOOR = blockItem("saccharine_trapdoor", CobblemonBlocks.SACCHARINE_TRAPDOOR)
@JvmField
val SACCHARINE_FENCE = blockItem("saccharine_fence", CobblemonBlocks.SACCHARINE_FENCE)
@JvmField
val SACCHARINE_FENCE_GATE = blockItem("saccharine_fence_gate", CobblemonBlocks.SACCHARINE_FENCE_GATE)
@JvmField
val SACCHARINE_BUTTON = blockItem("saccharine_button", CobblemonBlocks.SACCHARINE_BUTTON)
@JvmField
val SACCHARINE_PRESSURE_PLATE = blockItem("saccharine_pressure_plate", CobblemonBlocks.SACCHARINE_PRESSURE_PLATE)
@JvmField
val SACCHARINE_SLAB = blockItem("saccharine_slab", CobblemonBlocks.SACCHARINE_SLAB)
@JvmField
val SACCHARINE_STAIRS = blockItem("saccharine_stairs", CobblemonBlocks.SACCHARINE_STAIRS)
@JvmField
val SACCHARINE_SIGN = this.create("saccharine_sign", SignItem(Item.Properties().stacksTo(16), CobblemonBlocks.SACCHARINE_SIGN, CobblemonBlocks.SACCHARINE_WALL_SIGN))
@JvmField
val SACCHARINE_HANGING_SIGN = this.create("saccharine_hanging_sign", HangingSignItem(CobblemonBlocks.SACCHARINE_HANGING_SIGN, CobblemonBlocks.SACCHARINE_WALL_HANGING_SIGN, Item.Properties().stacksTo(16)))
@JvmField
val SACCHARINE_SAPLING = compostableBlockItem("saccharine_sapling", CobblemonBlocks.SACCHARINE_SAPLING, 0.30f)
// @JvmField
// val BUGWORT = compostableBlockItem("bugwort", CobblemonBlocks.BUGWORT) // TODO after 1.7
@JvmField
val POKE_BAIT = noSettingsItem("poke_bait")
@JvmField
val POKE_CAKE = this.create("poke_cake", BlockItem(CobblemonBlocks.POKE_CAKE, Item.Properties().stacksTo(1)))
@JvmField
val POKE_SNACK = this.create("poke_snack", BlockItem(CobblemonBlocks.POKE_SNACK, Item.Properties().stacksTo(16)))
val aprijuices = mutableListOf<AprijuiceItem>()
@JvmField
val APRIJUICE_RED = aprijuiceItem(Apricorn.RED)
@JvmField
val APRIJUICE_YELLOW = aprijuiceItem(Apricorn.YELLOW)
@JvmField
val APRIJUICE_GREEN = aprijuiceItem(Apricorn.GREEN)
@JvmField
val APRIJUICE_BLUE = aprijuiceItem(Apricorn.BLUE)
@JvmField
val APRIJUICE_PINK = aprijuiceItem(Apricorn.PINK)
@JvmField
val APRIJUICE_BLACK = aprijuiceItem(Apricorn.BLACK)
@JvmField
val APRIJUICE_WHITE = aprijuiceItem(Apricorn.WHITE)
@JvmField
val PONIGIRI = create("ponigiri", PonigiriItem())
@JvmField
val SINISTER_TEA = create("sinister_tea", SinisterTeaItem())
@JvmField
val POKE_PUFF = pokepuffItem("poke_puff")
// FOODS
@JvmField
val SWEET_HEART = noSettingsItem("sweet_heart") // TODO make a SweetHeartItem class for breeding purposes
@JvmField
val TASTY_TAIL = create("tasty_tail", foodItem(3, 0.3f))
@JvmField
val PEWTER_CRUNCHIES = regionalFoodItem("pewter_crunchies", 64, 7, 0.343f, false)
@JvmField
val RAGE_CANDY_BAR = regionalFoodItem("rage_candy_bar", 64, 8, 0.2f, false)
@JvmField
val LAVA_COOKIE = regionalFoodItem("lava_cookie", 64, 2, 0.3f, false)
@JvmField
val OLD_GATEAU = regionalFoodItem("old_gateau", 64, 9, 0.1335f, false)
@JvmField
val CASTELIACONE = regionalFoodItem("casteliacone", 64, 5, .28f, false)
@JvmField
val LUMIOSE_GALETTE = regionalFoodItem("lumiose_galette", 64, 4, 0.4f, false)
@JvmField
val BIG_MALASADA = regionalFoodItem("big_malasada", 64, 7, 0.343f, false)
@JvmField
val SMOKED_TAIL_CURRY = regionalFoodItem("smoked_tail_curry", 64, 10, 0.6f, false, ItemStack(Items.BOWL, 1))
@JvmField
val JUBILIFE_MUFFIN = regionalFoodItem("jubilife_muffin", 64, 8, 0.2f, false)
@JvmField
val OPEN_FACED_SANDWICH = regionalFoodItem("open_faced_sandwich", 64, 13, 0.5f, false)
// todo we might need to wait on these for later? These impact battles and may be harder to do
/*@JvmField
val CHOICE_DUMPLING = noSettingsItem("choice_dumpling") // todo make a ChoiceDumpingItem class for battle purposes
@JvmField
val SWAP_SNACK = noSettingsItem("swap_snack") // todo make a SwapSnackItem class for battle purposes
@JvmField
val TWICE_SPICED_BEETROOT = noSettingsItem("twice_spiced_beetroot") // todo make a TwiceSpiceBeetrootItem class for battle purposes
*/
@JvmField
val POTATO_MOCHI = create("potato_mochi", CobblemonItem(Properties().stacksTo(64)
.food(FoodProperties.Builder()
.nutrition(4)
.saturationModifier(0.4F)
.build())))
@JvmField
val CANDIED_APPLE = create("candied_apple", CobblemonItem(Properties().stacksTo(64)
.food(FoodProperties.Builder()
.nutrition(6)
.saturationModifier(0.2335F)
.usingConvertsTo(Items.STICK)
.build())))
@JvmField
val CANDIED_BERRY = create("candied_berry", CobblemonItem(Properties().stacksTo(64)
.food(FoodProperties.Builder()
.nutrition(5)
.saturationModifier(0.22F)
.usingConvertsTo(Items.STICK)
.build())))
//@JvmField
//val SCATTER_BANG = this.create("scatter_bang", ScatterBangItem(Item.Settings()))
//@JvmField
//val STICKY_GLOB = this.create("sticky_glob", StickyGlobItem(Item.Settings()))
@JvmField
val RESTORATION_TANK = blockItem("restoration_tank", CobblemonBlocks.RESTORATION_TANK)
@JvmField
@@ -272,13 +457,12 @@ object CobblemonItems : PlatformRegistry<Registry<Item>, ResourceKey<Registry<It
@JvmField
val PC = blockItem("pc", CobblemonBlocks.PC)
@JvmField
val STADIUM = blockItem("stadium_terminal", CobblemonBlocks.STADIUM)
@JvmField
val PASTURE = blockItem("pasture", CobblemonBlocks.PASTURE)
@JvmField
val DISPLAY_CASE = blockItem("display_case", CobblemonBlocks.DISPLAY_CASE)
@JvmField
val LECTERN = blockItem("lectern", CobblemonBlocks.LECTERN)
// @JvmField
// val INCENSE_SWEET = blockItem("incense_sweet", CobblemonBlocks.INCENSE_SWEET) // TODO after 1.7
// Evolution items
@JvmField val LINK_CABLE = create("link_cable", LinkCableItem())
@@ -307,9 +491,9 @@ object CobblemonItems : PlatformRegistry<Registry<Item>, ResourceKey<Registry<It
@JvmField val CRACKED_POT = noSettingsItem("cracked_pot")
@JvmField val MASTERPIECE_TEACUP = noSettingsItem("masterpiece_teacup")
@JvmField val UNREMARKABLE_TEACUP = noSettingsItem("unremarkable_teacup")
@JvmField val SWEET_APPLE = create("sweet_apple", foodItem(4, 0.3f))
@JvmField val TART_APPLE = create("tart_apple", foodItem(4, 0.3f))
@JvmField val SYRUPY_APPLE = create("syrupy_apple", foodItem(4, 0.3f))
@JvmField val SWEET_APPLE = compostableItem("sweet_apple", foodItem(4, 0.3f), 0.65f)
@JvmField val TART_APPLE = compostableItem("tart_apple", foodItem(4, 0.3f), 0.65f)
@JvmField val SYRUPY_APPLE = compostableItem("syrupy_apple", foodItem(4, 0.3f), 0.65f)
@JvmField val GALARICA_CUFF = noSettingsItem("galarica_cuff")
@JvmField val GALARICA_WREATH = noSettingsItem("galarica_wreath")
@JvmField val BLACK_AUGURITE = noSettingsItem("black_augurite")
@@ -319,6 +503,9 @@ object CobblemonItems : PlatformRegistry<Registry<Item>, ResourceKey<Registry<It
@JvmField val AUSPICIOUS_ARMOR = heldItem("auspicious_armor")
@JvmField val MALICIOUS_ARMOR = heldItem("malicious_armor")
@JvmField val SHELL_HELMET = heldItem("shell_helmet")
@JvmField val METAL_ALLOY = noSettingsItem("metal_alloy")
@JvmField val SCROLL_OF_DARKNESS = noSettingsItem("scroll_of_darkness")
@JvmField val SCROLL_OF_WATERS = noSettingsItem("scroll_of_waters")
private val berries = mutableMapOf<ResourceLocation, BerryItem>()
// Plants
@@ -395,7 +582,34 @@ object CobblemonItems : PlatformRegistry<Registry<Item>, ResourceKey<Registry<It
@JvmField val BERRY_JUICE = this.create("berry_juice", BerryJuiceItem())
@JvmField
val GALARICA_NUTS = create("galarica_nuts", GalaricaNutItem())
val GALARICA_NUTS = compostableItemNameBlockItem("galarica_nuts", CobblemonBlocks.GALARICA_NUT_BUSH)
// Hyper Training Items
val hyperTrainingItems = mutableListOf<HyperTrainingItem>()
@JvmField
val HEALTH_CANDY = hyperTrainingItem("health_candy", 1, setOf(Stats.HP), 0..IVs.MAX_VALUE)
@JvmField
val MIGHTY_CANDY = hyperTrainingItem("mighty_candy", 1, setOf(Stats.ATTACK), 0..IVs.MAX_VALUE)
@JvmField
val TOUGH_CANDY = hyperTrainingItem("tough_candy", 1, setOf(Stats.DEFENCE), 0..IVs.MAX_VALUE)
@JvmField
val SMART_CANDY = hyperTrainingItem("smart_candy", 1, setOf(Stats.SPECIAL_ATTACK), 0..IVs.MAX_VALUE)
@JvmField
val COURAGE_CANDY = hyperTrainingItem("courage_candy", 1, setOf(Stats.SPECIAL_DEFENCE), 0..IVs.MAX_VALUE)
@JvmField
val QUICK_CANDY = hyperTrainingItem("quick_candy", 1, setOf(Stats.SPEED), 0..IVs.MAX_VALUE)
@JvmField
val SICKLY_CANDY = hyperTrainingItem("sickly_candy", -1, setOf(Stats.HP), 0..IVs.MAX_VALUE)
@JvmField
val WEAK_CANDY = hyperTrainingItem("weak_candy", -1, setOf(Stats.ATTACK), 0..IVs.MAX_VALUE)
@JvmField
val BRITTLE_CANDY = hyperTrainingItem("brittle_candy", -1, setOf(Stats.DEFENCE), 0..IVs.MAX_VALUE)
@JvmField
val NUMB_CANDY = hyperTrainingItem("numb_candy", -1, setOf(Stats.SPECIAL_ATTACK), 0..IVs.MAX_VALUE)
@JvmField
val COWARD_CANDY = hyperTrainingItem("coward_candy", -1, setOf(Stats.SPECIAL_DEFENCE), 0..IVs.MAX_VALUE)
@JvmField
val SLOW_CANDY = hyperTrainingItem("slow_candy", -1, setOf(Stats.SPEED), 0..IVs.MAX_VALUE)
// Medicine
@JvmField
@@ -423,6 +637,20 @@ object CobblemonItems : PlatformRegistry<Registry<Item>, ResourceKey<Registry<It
@JvmField
val ZINC = create("zinc", VitaminItem(Stats.SPECIAL_DEFENCE))
@JvmField
val HEALTH_MOCHI = create("health_mochi", MochiItem(Stats.HP))
@JvmField
val MUSCLE_MOCHI = create("muscle_mochi", MochiItem(Stats.ATTACK))
@JvmField
val RESIST_MOCHI = create("resist_mochi", MochiItem(Stats.DEFENCE))
@JvmField
val GENIUS_MOCHI = create("genius_mochi", MochiItem(Stats.SPECIAL_ATTACK))
@JvmField
val CLEVER_MOCHI = create("clever_mochi", MochiItem(Stats.SPECIAL_DEFENCE))
@JvmField
val SWIFT_MOCHI = create("swift_mochi", MochiItem(Stats.SPEED))
@JvmField
val FRESH_START_MOCHI = create("fresh_start_mochi", FreshStartMochiItem())
@JvmField
val GENIUS_FEATHER = create("genius_feather", FeatherItem(Stats.SPECIAL_ATTACK))
@JvmField
val SWIFT_FEATHER = create("swift_feather", FeatherItem(Stats.SPEED))
@@ -437,14 +665,12 @@ object CobblemonItems : PlatformRegistry<Registry<Item>, ResourceKey<Registry<It
@JvmField
val MEDICINAL_LEEK = heldItem("medicinal_leek", MedicinalLeekItem(CobblemonBlocks.MEDICINAL_LEEK, Item.Properties().food(FoodProperties.Builder().fast().nutrition(1).saturationModifier(0.2f).build())), "leek")
@JvmField
val ROASTED_LEEK = create("roasted_leek", Item(Item.Properties().food(FoodProperties.Builder().fast().nutrition(3).saturationModifier(0.3f).build())))
val ROASTED_LEEK = compostableItem("roasted_leek", CobblemonItem(Item.Properties().food(FoodProperties.Builder().fast().nutrition(3).saturationModifier(0.2f).build())), 0.85f)
@JvmField
val BRAISED_VIVICHOKE = create("braised_vivichoke", Item(Item.Properties().food(FoodProperties.Builder().nutrition(6).saturationModifier(0.6f).build())))
@JvmField
val VIVICHOKE_DIP = create("vivichoke_dip", object : Item(Properties().stacksTo(1)
val VIVICHOKE_DIP = create("vivichoke_dip", object : CobblemonItem(Properties().stacksTo(1)
.food(FoodProperties.Builder()
.nutrition(10)
.saturationModifier(1.2F)
.saturationModifier(0.6F)
.effect(MobEffectInstance(MobEffects.ABSORPTION, 900, 0), 1F)
.alwaysEdible()
.usingConvertsTo(Items.BOWL)
@@ -455,19 +681,21 @@ object CobblemonItems : PlatformRegistry<Registry<Item>, ResourceKey<Registry<It
}
})
@JvmField
val ENERGY_ROOT = compostableItem("energy_root", EnergyRootItem(CobblemonBlocks.ENERGY_ROOT, Item.Properties().food(FoodProperties.Builder().nutrition(1).fast().saturationModifier(0.2f).build())))
val ENERGY_ROOT = compostableItem("energy_root", EnergyRootItem(CobblemonBlocks.ENERGY_ROOT, Properties()), 0.60f)
@JvmField
val REVIVAL_HERB = compostableItem("revival_herb", RevivalHerbItem(CobblemonBlocks.REVIVAL_HERB))
@JvmField
val PEP_UP_FLOWER = compostableBlockItem("pep_up_flower", CobblemonBlocks.PEP_UP_FLOWER)
@JvmField
val MEDICINAL_BREW = create("medicinal_brew", Item(Item.Properties()))
val MEDICINAL_BREW = noSettingsItem("medicinal_brew")
@JvmField
val REMEDY = create("remedy", RemedyItem(RemedyItem.NORMAL))
val REMEDY = compostableItem("remedy", RemedyItem(RemedyItem.NORMAL), 0.65f)
@JvmField
val FINE_REMEDY = create("fine_remedy", RemedyItem(RemedyItem.FINE))
val FINE_REMEDY = compostableItem("fine_remedy", RemedyItem(RemedyItem.FINE), 0.75f)
@JvmField
val SUPERB_REMEDY = create("superb_remedy", RemedyItem(RemedyItem.SUPERB))
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)))
@JvmField
val POTION = create("potion", PotionItem(PotionType.POTION))
@@ -483,7 +711,7 @@ object CobblemonItems : PlatformRegistry<Registry<Item>, ResourceKey<Registry<It
@JvmField
val HEAL_POWDER = create("heal_powder", HealPowderItem())
@JvmField
val LEEK_AND_POTATO_STEW = create("leek_and_potato_stew", Item(Item.Properties().food(FoodProperties.Builder().nutrition(8).saturationModifier(0.6f).usingConvertsTo(Items.BOWL).build()).stacksTo(1)))
val LEEK_AND_POTATO_STEW = create("leek_and_potato_stew", CobblemonItem(Item.Properties().food(FoodProperties.Builder().nutrition(6).saturationModifier(0.6f).usingConvertsTo(Items.BOWL).build()).stacksTo(1)))
@JvmField
val REVIVE = create("revive", ReviveItem(max = false))
@JvmField
@@ -685,7 +913,7 @@ object CobblemonItems : PlatformRegistry<Registry<Item>, ResourceKey<Registry<It
@JvmField
val ASSAULT_VEST = heldItem("assault_vest")
@JvmField
val BIG_ROOT = blockItem("big_root", CobblemonBlocks.BIG_ROOT)
val BIG_ROOT = compostableBlockItem("big_root", CobblemonBlocks.BIG_ROOT, 0.40f)
@JvmField
val BINDING_BAND = heldItem("binding_band")
@JvmField
@@ -702,8 +930,8 @@ object CobblemonItems : PlatformRegistry<Registry<Item>, ResourceKey<Registry<It
val CHOICE_SCARF = heldItem("choice_scarf")
@JvmField
val CLEANSE_TAG = heldItem("cleanse_tag")
// @JvmField
// val CLEAR_AMULET = heldItem("clear_amulet")
@JvmField
val CLEAR_AMULET = heldItem("clear_amulet")
@JvmField
val COVERT_CLOAK = heldItem("covert_cloak")
@JvmField
@@ -732,18 +960,18 @@ object CobblemonItems : PlatformRegistry<Registry<Item>, ResourceKey<Registry<It
val FOCUS_SASH = heldItem("focus_sash")
@JvmField
val GRASSY_SEED = heldItem("grassy_seed")
// @JvmField
// val GRIP_CLAW = heldItem("grip_claw")
@JvmField
val GRIP_CLAW = heldItem("grip_claw")
@JvmField
val HARD_STONE = heldItem("hard_stone")
@JvmField
val HEAVY_DUTY_BOOTS = heldItem("heavy_duty_boots")
@JvmField
val IRON_BALL = heldItem("iron_ball")
// @JvmField
// val LAGGING_TAIL = heldItem("lagging_tail")
@JvmField
val LEFTOVERS = heldItem("leftovers")
val LAGGING_TAIL = heldItem("lagging_tail")
@JvmField
val LEFTOVERS = compostableHeldItem("leftovers", null, 0.50f)
@JvmField
val LIFE_ORB = heldItem("life_orb")
@JvmField
@@ -754,8 +982,8 @@ object CobblemonItems : PlatformRegistry<Registry<Item>, ResourceKey<Registry<It
val LOADED_DICE = heldItem("loaded_dice")
@JvmField
val LUCKY_EGG = heldItem("lucky_egg")
// @JvmField
// val LUMINOUS_MOSS = heldItem("luminous_moss")
@JvmField
val LUMINOUS_MOSS = heldItem("luminous_moss")
@JvmField
val MAGNET = heldItem("magnet")
@JvmField
@@ -1230,6 +1458,8 @@ object CobblemonItems : PlatformRegistry<Registry<Item>, ResourceKey<Registry<It
private fun blockItem(name: String, block: Block, rarity: Rarity = Rarity.COMMON): BlockItem = this.create(name, BlockItem(block, Item.Properties().rarity(rarity)))
private fun itemNameBlockItem(name: String, block: Block, rarity: Rarity = Rarity.COMMON): ItemNameBlockItem = this.create(name, ItemNameBlockItem(block, Item.Properties().rarity(rarity)))
private fun noSettingsItem(name: String): CobblemonItem = this.create(name, CobblemonItem(Item.Properties()))
private fun itemWithRarity(name: String, rarity: Rarity): CobblemonItem = this.create(name, CobblemonItem(Item.Properties().rarity(rarity)))
@@ -1270,6 +1500,50 @@ object CobblemonItems : PlatformRegistry<Registry<Item>, ResourceKey<Registry<It
}
)
private fun campfirePotItem(block: Block, type: String): CampfirePotItem {
val item = create("campfire_pot_${type}", CampfirePotItem(block))
campfire_pots.add(item)
return item
}
private fun aprijuiceItem(type: Apricorn): AprijuiceItem {
val item = create("aprijuice_${type.name.lowercase()}", AprijuiceItem(type))
aprijuices.add(item)
return item
}
private fun pokepuffItem(name: String): PokePuffItem {
val item = create("poke_puff", PokePuffItem())
return item
}
private fun regionalFoodItem(
name: String,
stacksTo: Int,
nutrition: Int,
saturationModifier: Float,
alwaysEdible: Boolean = false,
convertsToOnUse: ItemStack? = null
): RegionalFoodItem {
val foodPropertiesBuilder = FoodProperties.Builder()
.nutrition(nutrition)
.saturationModifier(saturationModifier)
if (alwaysEdible == true) {
foodPropertiesBuilder.alwaysEdible()
}
if (convertsToOnUse != null && !convertsToOnUse.isEmpty) {
foodPropertiesBuilder.usingConvertsTo(convertsToOnUse.item)
}
val properties = Item.Properties()
.stacksTo(stacksTo)
.food(foodPropertiesBuilder.build())
return create(name, RegionalFoodItem(properties))
}
private fun heldItem(name: String, remappedName: String? = null): CobblemonItem = create(
name,
CobblemonItem(Item.Properties()).also {
@@ -1281,11 +1555,8 @@ object CobblemonItems : PlatformRegistry<Registry<Item>, ResourceKey<Registry<It
private fun heldItem(name: String, item: Item, remappedName: String? = null) = create(
name = name,
entry = item.also {
if (remappedName != null) {
remappedName?.let { remappedName ->
CobblemonHeldItemManager.registerRemap(it, remappedName)
CobblemonHeldItemManager.registerRemap(Items.BONE, "thickclub")
CobblemonHeldItemManager.registerRemap(Items.SNOWBALL, "snowball")
CobblemonHeldItemManager.registerRemap(Items.GOLD_BLOCK, "bignugget")
}
}
)
@@ -1311,7 +1582,13 @@ object CobblemonItems : PlatformRegistry<Registry<Item>, ResourceKey<Registry<It
private fun mintItem(name: String, mintItem: MintItem): MintItem {
val item = this.create(name, mintItem)
mints[item.nature.displayName] = item
compostable(item, .65f)
compostable(item, .95f)
return item
}
private fun hyperTrainingItem(name: String, increaseAmount: Int, targetStats: Set<Stat>, validRange: IntRange): HyperTrainingItem {
val item = this.create(name, HyperTrainingItem(increaseAmount, targetStats, validRange))
hyperTrainingItems.add(item)
return item
}
@@ -1325,26 +1602,27 @@ object CobblemonItems : PlatformRegistry<Registry<Item>, ResourceKey<Registry<It
private fun apricornSeedItem(name: String, apricornSeedItem: ApricornSeedItem): ApricornSeedItem {
val finalName = "${name}_apricorn_seed"
val item = this.create(finalName, apricornSeedItem)
compostable(item, .65f)
compostable(item, .30f)
return item
}
private fun mintSeed(name: String, mintBlock: MintBlock): Item {
val finalName = "${name}_mint_seeds"
val item = this.blockItem(finalName, mintBlock)
compostable(item, .65f)
compostable(item, .30f)
return item
}
private fun mintLeaf(name: String, mintLeafItem: MintLeafItem): MintLeafItem {
val finalName = "${name}_mint_leaf"
val item = this.create(finalName, mintLeafItem)
compostable(item, .65f)
compostable(item, .50f)
return item
}
private fun compostableItem(name: String, item: Item? = null, increaseLevelChance: Float = .65f): Item {
val createdItem = this.create(name, item ?: Item(Item.Properties()))
val createdItem = this.create(name, item ?: CobblemonItem(Item.Properties()))
compostable(createdItem, increaseLevelChance)
return createdItem
}
@@ -1355,13 +1633,19 @@ object CobblemonItems : PlatformRegistry<Registry<Item>, ResourceKey<Registry<It
return createdItem
}
private fun compostableBlockItem(name: String, block: Block, increaseLevelChance: Float = .65f): Item {
private fun compostableBlockItem(name: String, block: Block, increaseLevelChance: Float = .85f): Item {
val createdItem = this.blockItem(name, block)
compostable(createdItem, increaseLevelChance)
return createdItem
}
private fun compostableItemNameBlockItem(name: String, block: Block, increaseLevelChance: Float = .30f): Item {
val createdItem = this.itemNameBlockItem(name, block)
compostable(createdItem, increaseLevelChance)
return createdItem
}
private fun foodItem(nutrition: Int, saturationModifier: Float): Item {
return Item(Item.Properties().food(FoodProperties.Builder().nutrition(nutrition).saturationModifier(saturationModifier).build()))
return CobblemonItem(Item.Properties().food(FoodProperties.Builder().nutrition(nutrition).saturationModifier(saturationModifier).build()))
}
}
@@ -8,6 +8,8 @@
package com.cobblemon.mod.common
import com.cobblemon.mod.common.api.ai.CobblemonAttackTargetData
import com.cobblemon.mod.common.api.ai.CobblemonWanderControl
import com.cobblemon.mod.common.api.dialogue.ActiveDialogue
import com.cobblemon.mod.common.api.moves.animations.ActionEffectContext
import com.mojang.serialization.Codec
@@ -16,14 +18,42 @@ 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.world.entity.LivingEntity
object CobblemonMemories {
val memories = mutableMapOf<String, MemoryModuleType<*>>()
/*
* When a memory doesn't have a codec provided, it's because it doesn't
* 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.
*/
val BATTLING_POKEMON = register("battling_pokemon", ListCodec(UUIDUtil.CODEC, 0, 31))
val NPC_BATTLING = register("npc_battling", PrimitiveCodec.BOOL)
val DIALOGUES = register<List<ActiveDialogue>>("npc_dialogues")
val ACTIVE_ACTION_EFFECT = register<ActionEffectContext>("active_action_effect")
val POKEMON_FLYING = register("pokemon_flying", PrimitiveCodec.BOOL)
val POKEMON_DROWSY = register("pokemon_drowsy", PrimitiveCodec.BOOL)
val POKEMON_SLEEPING = register("pokemon_sleeping", PrimitiveCodec.BOOL)
val POKEMON_BATTLE = register<UUID>("pokemon_battle")
val PATH_COOLDOWN = register<Boolean>("path_cooldown")
val TARGETED_BATTLE_POKEMON = register<UUID>("targeted_battle_pokemon")
val NEAREST_VISIBLE_ATTACKER = register<LivingEntity>("nearest_visible_attacker")
val NEARBY_GROWABLE_CROPS = register<BlockPos>("nearby_growable_crops")
val RECENTLY_ATE_GRASS = register<Boolean>("recently_ate_grass")
val HIVE_LOCATION = register<BlockPos>("hive_location")
val HIVE_COOLDOWN = register<Boolean>("hive_cooldown")
val NEARBY_FLOWERS = register<List<BlockPos>>("nearby_flower")
val POLLINATED = register<Boolean>("pollinated", PrimitiveCodec.BOOL)
/** who am i following rn? */
val HERD_LEADER = register<String>("herd_leader", PrimitiveCodec.STRING)
/** how many are following me rn? */
val HERD_SIZE = register<Int>("herd_size") // Don't bother saving it, we'll try to keep count roughly.
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.
val WANDER_CONTROL = register<CobblemonWanderControl>("wander_control")
fun <U> register(id: String, codec: Codec<U>): MemoryModuleType<U> {
val memoryModule = MemoryModuleType(Optional.of(codec))
@@ -36,4 +66,4 @@ object CobblemonMemories {
memories[id] = memoryModule
return memoryModule
}
}
}
@@ -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
import com.cobblemon.mod.common.block.campfirepot.CookingPotMenu
import com.cobblemon.mod.common.platform.PlatformRegistry
import net.minecraft.core.Registry
import net.minecraft.core.registries.BuiltInRegistries
import net.minecraft.core.registries.Registries
import net.minecraft.resources.ResourceKey
import net.minecraft.world.inventory.MenuType
object CobblemonMenuType : PlatformRegistry<Registry<MenuType<*>>, ResourceKey<Registry<MenuType<*>>>, MenuType<*>>() {
val COOKING_POT = MenuType.register("cooking_pot", ::CookingPotMenu)
override val registry: Registry<MenuType<*>>
get() = BuiltInRegistries.MENU
override val resourceKey: ResourceKey<Registry<MenuType<*>>>
get() = Registries.MENU
}
@@ -9,6 +9,7 @@
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.PlayerInteractOptionsHandler
import com.cobblemon.mod.common.client.net.SetClientPlayerDataHandler
@@ -17,11 +18,14 @@ import com.cobblemon.mod.common.client.net.battle.*
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.DataRegistrySyncPacketHandler
import com.cobblemon.mod.common.client.net.data.UnlockReloadPacketHandler
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
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.InteractPokemonUIPacketHandler
@@ -34,9 +38,11 @@ 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
import com.cobblemon.mod.common.client.net.pasture.PokemonUnpasturedHandler
import com.cobblemon.mod.common.client.net.pasture.UpdatePastureConflictFlagHandler
import com.cobblemon.mod.common.client.net.pokedex.ServerConfirmedRegisterHandler
import com.cobblemon.mod.common.client.net.pokemon.update.ClientboundUpdateRidingStateHandler
import com.cobblemon.mod.common.client.net.pokemon.update.PokemonUpdatePacketHandler
import com.cobblemon.mod.common.client.net.riding.ClientboundUpdateDriverInputHandler
import com.cobblemon.mod.common.client.net.settings.OpenCobblemonConfigEditorHandler
import com.cobblemon.mod.common.client.net.settings.ServerSettingsPacketHandler
import com.cobblemon.mod.common.client.net.sound.UnvalidatedPlaySoundS2CPacketHandler
@@ -59,6 +65,7 @@ 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.PlayerInteractOptionsPacket
import com.cobblemon.mod.common.net.messages.client.SetClientPlayerDataPacket
@@ -67,19 +74,25 @@ import com.cobblemon.mod.common.net.messages.client.battle.*
import com.cobblemon.mod.common.net.messages.client.callback.OpenMoveCallbackPacket
import com.cobblemon.mod.common.net.messages.client.callback.OpenPartyCallbackPacket
import com.cobblemon.mod.common.net.messages.client.callback.OpenPartyMoveCallbackPacket
import com.cobblemon.mod.common.net.messages.client.cooking.SeasoningRegistrySyncPacket
import com.cobblemon.mod.common.net.messages.client.cooking.ToggleCookingPotLidPacket
import com.cobblemon.mod.common.net.messages.client.data.*
import com.cobblemon.mod.common.net.messages.client.dialogue.DialogueClosedPacket
import com.cobblemon.mod.common.net.messages.client.dialogue.DialogueOpenedPacket
import com.cobblemon.mod.common.net.messages.client.effect.PokeSnackBlockParticlesPacket
import com.cobblemon.mod.common.net.messages.client.effect.RunPosableMoLangPacket
import com.cobblemon.mod.common.net.messages.client.effect.SaccharineLogBlockParticlesPacket
import com.cobblemon.mod.common.net.messages.client.effect.SpawnSnowstormEntityParticlePacket
import com.cobblemon.mod.common.net.messages.client.effect.SpawnSnowstormParticlePacket
import com.cobblemon.mod.common.net.messages.client.npc.CloseNPCEditorPacket
import com.cobblemon.mod.common.net.messages.client.npc.OpenNPCEditorPacket
import com.cobblemon.mod.common.net.messages.client.orientation.ClientboundUpdateDriverInputPacket
import com.cobblemon.mod.common.net.messages.client.orientation.ClientboundUpdateOrientationPacket
import com.cobblemon.mod.common.net.messages.client.pasture.ClosePasturePacket
import com.cobblemon.mod.common.net.messages.client.pasture.OpenPasturePacket
import com.cobblemon.mod.common.net.messages.client.pasture.PokemonPasturedPacket
import com.cobblemon.mod.common.net.messages.client.pasture.PokemonUnpasturedPacket
import com.cobblemon.mod.common.net.messages.client.pasture.UpdatePastureConflictFlagPacket
import com.cobblemon.mod.common.net.messages.client.pokedex.ServerConfirmedRegisterPacket
import com.cobblemon.mod.common.net.messages.client.pokemon.update.*
import com.cobblemon.mod.common.net.messages.client.pokemon.update.evolution.AddEvolutionPacket
@@ -135,6 +148,8 @@ import com.cobblemon.mod.common.net.messages.server.battle.BattleTeamRequestPack
import com.cobblemon.mod.common.net.messages.server.battle.BattleTeamResponsePacket
import com.cobblemon.mod.common.net.messages.server.battle.RemoveSpectatorPacket
import com.cobblemon.mod.common.net.messages.server.battle.SpectateBattlePacket
import com.cobblemon.mod.common.net.messages.server.behaviour.DamageOnCollisionPacket
import com.cobblemon.mod.common.net.messages.server.behaviour.SetEntityBehaviourPacket
import com.cobblemon.mod.common.net.messages.server.block.AdjustBlockEntityViewerCountPacket
import com.cobblemon.mod.common.net.messages.server.callback.move.MoveSelectCancelledPacket
import com.cobblemon.mod.common.net.messages.server.callback.move.MoveSelectedPacket
@@ -142,11 +157,14 @@ 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.ServerboundUpdateRidingStatRangePacket
import com.cobblemon.mod.common.net.messages.server.debug.ServerboundUpdateRidingStatsPacket
import com.cobblemon.mod.common.net.messages.server.dialogue.EscapeDialoguePacket
import com.cobblemon.mod.common.net.messages.server.dialogue.InputToDialoguePacket
import com.cobblemon.mod.common.net.messages.server.npc.SaveNPCPacket
import com.cobblemon.mod.common.net.messages.server.orientation.ServerboundUpdateOrientationPacket
import com.cobblemon.mod.common.net.messages.server.pasture.PasturePokemonPacket
import com.cobblemon.mod.common.net.messages.server.pasture.SetPastureConflictPacket
import com.cobblemon.mod.common.net.messages.server.pasture.UnpastureAllPokemonPacket
import com.cobblemon.mod.common.net.messages.server.pasture.UnpasturePokemonPacket
import com.cobblemon.mod.common.net.messages.server.pokedex.scanner.FinishScanningPacket
@@ -158,6 +176,8 @@ import com.cobblemon.mod.common.net.messages.server.pokemon.update.SetActiveMark
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.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.starter.RequestStarterScreenPacket
import com.cobblemon.mod.common.net.messages.server.storage.SwapPCPartyPokemonPacket
import com.cobblemon.mod.common.net.messages.server.storage.party.MovePartyPokemonPacket
@@ -179,6 +199,8 @@ import com.cobblemon.mod.common.net.serverhandling.battle.SpectateBattleHandler
import com.cobblemon.mod.common.net.serverhandling.battle.TeamLeaveHandler
import com.cobblemon.mod.common.net.serverhandling.battle.TeamRequestHandler
import com.cobblemon.mod.common.net.serverhandling.battle.TeamRequestResponseHandler
import com.cobblemon.mod.common.net.serverhandling.behaviour.DamageOnCollisionPacketHandler
import com.cobblemon.mod.common.net.serverhandling.behaviour.SetEntityBehaviourHandler
import com.cobblemon.mod.common.net.serverhandling.block.AdjustBlockEntityViewerCountHandler
import com.cobblemon.mod.common.net.serverhandling.callback.move.MoveSelectCancelledHandler
import com.cobblemon.mod.common.net.serverhandling.callback.move.MoveSelectedHandler
@@ -186,12 +208,15 @@ 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.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.pasture.PasturePokemonHandler
import com.cobblemon.mod.common.net.serverhandling.pasture.SetPastureConflictHandler
import com.cobblemon.mod.common.net.serverhandling.pasture.UnpastureAllPokemonHandler
import com.cobblemon.mod.common.net.serverhandling.pasture.UnpasturePokemonHandler
import com.cobblemon.mod.common.net.serverhandling.pokedex.scanner.FinishScanningHandler
@@ -202,6 +227,8 @@ import com.cobblemon.mod.common.net.serverhandling.pokemon.update.SetNicknameHan
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.riding.DismountPokemonPacketHandler
import com.cobblemon.mod.common.net.serverhandling.riding.DriverInputPacketHandler
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
@@ -218,10 +245,6 @@ import com.cobblemon.mod.common.net.serverhandling.trade.ChangeTradeAcceptanceHa
import com.cobblemon.mod.common.net.serverhandling.trade.OfferTradeHandler
import com.cobblemon.mod.common.net.serverhandling.trade.PerformTradeHandler
import com.cobblemon.mod.common.net.serverhandling.trade.UpdateTradeOfferHandler
import com.cobblemon.mod.common.stadium.StadiumCamerasSyncPacket
import com.cobblemon.mod.common.stadium.StadiumJoinHandler
import com.cobblemon.mod.common.stadium.StadiumJoinPacket
import com.cobblemon.mod.common.stadium.StadiumCameraManagersSyncPacket
import com.cobblemon.mod.common.util.server
import net.minecraft.server.level.ServerPlayer
@@ -252,6 +275,7 @@ object CobblemonNetwork {
// Pokemon Update Packets
list.add(PacketRegisterInfo(FriendshipUpdatePacket.ID, FriendshipUpdatePacket::decode, PokemonUpdatePacketHandler()))
list.add(PacketRegisterInfo(FullnessUpdatePacket.ID, FullnessUpdatePacket::decode, PokemonUpdatePacketHandler()))
list.add(PacketRegisterInfo(MoveSetUpdatePacket.ID, MoveSetUpdatePacket::decode, PokemonUpdatePacketHandler()))
list.add(PacketRegisterInfo(NatureUpdatePacket.ID, NatureUpdatePacket::decode, PokemonUpdatePacketHandler()))
list.add(PacketRegisterInfo(ShinyUpdatePacket.ID, ShinyUpdatePacket::decode, PokemonUpdatePacketHandler()))
@@ -285,6 +309,7 @@ object CobblemonNetwork {
list.add(PacketRegisterInfo(MarksUpdatePacket.ID, MarksUpdatePacket::decode, PokemonUpdatePacketHandler()))
list.add(PacketRegisterInfo(MarksPotentialUpdatePacket.ID, MarksPotentialUpdatePacket::decode, PokemonUpdatePacketHandler()))
list.add(PacketRegisterInfo(MarkingsUpdatePacket.ID, MarkingsUpdatePacket::decode, PokemonUpdatePacketHandler()))
list.add(PacketRegisterInfo(RideBoostsUpdatePacket.ID, RideBoostsUpdatePacket::decode, PokemonUpdatePacketHandler()))
// Evolution start
list.add(PacketRegisterInfo(AddEvolutionPacket.ID, AddEvolutionPacket::decode, PokemonUpdatePacketHandler()))
@@ -374,17 +399,19 @@ object CobblemonNetwork {
list.add(PacketRegisterInfo(ScriptRegistrySyncPacket.ID, ScriptRegistrySyncPacket::decode, DataRegistrySyncPacketHandler()))
list.add(PacketRegisterInfo(PokedexDexSyncPacket.ID, PokedexDexSyncPacket::decode, DataRegistrySyncPacketHandler()))
list.add(PacketRegisterInfo(DexEntrySyncPacket.ID, DexEntrySyncPacket::decode, DataRegistrySyncPacketHandler()))
list.add(PacketRegisterInfo(FishingBaitRegistrySyncPacket.ID, FishingBaitRegistrySyncPacket::decode, DataRegistrySyncPacketHandler()))
list.add(PacketRegisterInfo(SpawnBaitRegistrySyncPacket.ID, SpawnBaitRegistrySyncPacket::decode, DataRegistrySyncPacketHandler()))
list.add(PacketRegisterInfo(SeasoningRegistrySyncPacket.ID, SeasoningRegistrySyncPacket::decode, DataRegistrySyncPacketHandler()))
list.add(PacketRegisterInfo(FlowRegistrySyncPacket.ID, FlowRegistrySyncPacket::decode, DataRegistrySyncPacketHandler()))
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(StadiumCamerasSyncPacket.ID, StadiumCamerasSyncPacket::decode, DataRegistrySyncPacketHandler()))
list.add(PacketRegisterInfo(StadiumCameraManagersSyncPacket.ID, StadiumCameraManagersSyncPacket::decode, DataRegistrySyncPacketHandler()))
// Effects
list.add(PacketRegisterInfo(SpawnSnowstormParticlePacket.ID, SpawnSnowstormParticlePacket::decode, SpawnSnowstormParticleHandler))
list.add(PacketRegisterInfo(SpawnSnowstormEntityParticlePacket.ID, SpawnSnowstormEntityParticlePacket::decode, SpawnSnowstormEntityParticleHandler))
list.add(PacketRegisterInfo(RunPosableMoLangPacket.ID, RunPosableMoLangPacket::decode, RunPosableMoLangHandler))
list.add(PacketRegisterInfo(SaccharineLogBlockParticlesPacket.ID, SaccharineLogBlockParticlesPacket::decode, SaccharineLogBlockParticlesHandler))
list.add(PacketRegisterInfo(PokeSnackBlockParticlesPacket.ID, PokeSnackBlockParticlesPacket::decode, PokeSnackBlockParticlesHandler))
// Hax
list.add(PacketRegisterInfo(UnvalidatedPlaySoundS2CPacket.ID, UnvalidatedPlaySoundS2CPacket::decode, UnvalidatedPlaySoundS2CPacketHandler))
@@ -409,6 +436,7 @@ object CobblemonNetwork {
list.add(PacketRegisterInfo(ClosePasturePacket.ID, ClosePasturePacket::decode, ClosePastureHandler))
list.add(PacketRegisterInfo(PokemonPasturedPacket.ID, PokemonPasturedPacket::decode, PokemonPasturedHandler))
list.add(PacketRegisterInfo(PokemonUnpasturedPacket.ID, PokemonUnpasturedPacket::decode, PokemonUnpasturedHandler))
list.add(PacketRegisterInfo(UpdatePastureConflictFlagPacket.ID, UpdatePastureConflictFlagPacket::decode, UpdatePastureConflictFlagHandler))
// Orientation
list.add(PacketRegisterInfo(ClientboundUpdateOrientationPacket.ID, ClientboundUpdateOrientationPacket::decode, S2CUpdateOrientationHandler))
@@ -433,6 +461,9 @@ object CobblemonNetwork {
list.add(PacketRegisterInfo(CloseNPCEditorPacket.ID, CloseNPCEditorPacket::decode, CloseNPCEditorHandler))
list.add(PacketRegisterInfo(OpenNPCEditorPacket.ID, OpenNPCEditorPacket::decode, OpenNPCEditorHandler))
// Behaviours
list.add(PacketRegisterInfo(OpenBehaviourEditorPacket.ID, OpenBehaviourEditorPacket::decode, OpenBehaviourEditorHandler))
// Pokédex scanning
list.add(PacketRegisterInfo(ServerConfirmedRegisterPacket.ID, ServerConfirmedRegisterPacket::decode, ServerConfirmedRegisterHandler))
@@ -441,9 +472,7 @@ object CobblemonNetwork {
// Riding
list.add(PacketRegisterInfo(ClientboundUpdateRidingStatePacket.ID, ClientboundUpdateRidingStatePacket::decode, ClientboundUpdateRidingStateHandler))
// Stadium packets
list.add(PacketRegisterInfo(StadiumJoinPacket.ID, StadiumJoinPacket::decode, StadiumJoinHandler))
list.add(PacketRegisterInfo(ClientboundUpdateDriverInputPacket.ID, ClientboundUpdateDriverInputPacket::decode, ClientboundUpdateDriverInputHandler))
return list
}
@@ -519,6 +548,8 @@ object CobblemonNetwork {
list.add(PacketRegisterInfo(PasturePokemonPacket.ID, PasturePokemonPacket::decode, PasturePokemonHandler))
list.add(PacketRegisterInfo(UnpasturePokemonPacket.ID, UnpasturePokemonPacket::decode, UnpasturePokemonHandler))
list.add(PacketRegisterInfo(UnpastureAllPokemonPacket.ID, UnpastureAllPokemonPacket::decode, UnpastureAllPokemonHandler))
list.add(PacketRegisterInfo(SetPastureConflictPacket.ID, SetPastureConflictPacket::decode, SetPastureConflictHandler))
// Block entity
list.add(PacketRegisterInfo(AdjustBlockEntityViewerCountPacket.ID, AdjustBlockEntityViewerCountPacket::decode, AdjustBlockEntityViewerCountHandler))
@@ -545,6 +576,17 @@ object CobblemonNetwork {
// Riding packet(s)
list.add(PacketRegisterInfo(ServerboundUpdateOrientationPacket.ID, ServerboundUpdateOrientationPacket::decode, OrientationPacketHandler))
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(DismountPokemonPacket.ID, DismountPokemonPacket::decode, DismountPokemonPacketHandler))
list.add(PacketRegisterInfo(ServerboundUpdateDriverInputPacket.ID, ServerboundUpdateDriverInputPacket::decode, DriverInputPacketHandler))
// Cooking
list.add(PacketRegisterInfo(ToggleCookingPotLidPacket.ID, ToggleCookingPotLidPacket::decode, ToggleCookingPotLidHandler))
// Behaviour Packets
list.add(PacketRegisterInfo(SetEntityBehaviourPacket.ID, SetEntityBehaviourPacket::decode, SetEntityBehaviourHandler))
list.add(PacketRegisterInfo(DamageOnCollisionPacket.ID, DamageOnCollisionPacket::decode, DamageOnCollisionPacketHandler))
return list
}
@@ -19,16 +19,24 @@ import net.minecraft.world.entity.ai.village.poi.PoiType
import net.minecraft.world.level.block.Block
import net.minecraft.world.level.block.state.BlockState
object CobblemonVillagerPoiTypes: PlatformRegistry<Registry<PoiType>, ResourceKey<Registry<PoiType>>, PoiType>() {
object CobblemonPoiTypes: PlatformRegistry<Registry<PoiType>, ResourceKey<Registry<PoiType>>, PoiType>() {
override val registry: Registry<PoiType> = BuiltInRegistries.POINT_OF_INTEREST_TYPE
override val resourceKey: ResourceKey<Registry<PoiType>> = Registries.POINT_OF_INTEREST_TYPE
@JvmField
val NURSE_KEY: ResourceKey<PoiType> = createKey("nurse")
val NURSE_KEY = createKey("nurse", CobblemonBlocks.HEALING_MACHINE, 1, 1)
@JvmField
val NURSE = create(NURSE_KEY.location().path, PoiType(getBlockStates(CobblemonBlocks.HEALING_MACHINE), 1, 1))
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
// val INCENSE_SWEET_KEY = createKey("incense_sweet", CobblemonBlocks.INCENSE_SWEET, 0, 1)
private fun createKey(string: String): ResourceKey<PoiType> = ResourceKey.create(Registries.POINT_OF_INTEREST_TYPE, cobblemonResource(string))
private fun createKey(string: String, block: Block, maxTickets: Int, validRange: Int ): ResourceKey<PoiType> =
ResourceKey.create(Registries.POINT_OF_INTEREST_TYPE, cobblemonResource(string)).also { resourceKey ->
create(resourceKey.location().path, PoiType(getBlockStates(block), maxTickets, validRange))
}
private fun getBlockStates(block: Block): Set<BlockState> = ImmutableSet.copyOf(block.stateDefinition.possibleStates)
}
@@ -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
import net.minecraft.client.RecipeBookCategories
enum class CobblemonRecipeCategories {
COOKING_POT_SEARCH("COOKING_POT_SEARCH"),
COOKING_POT_FOODS("COOKING_POT_FOODS"),
COOKING_POT_MEDICINES("COOKING_POT_MEDICINES"),
COOKING_POT_COMPLEX_DISHES("COOKING_POT_COMPLEX_DISHES"),
COOKING_POT_MISC("COOKING_POT_MISC");
companion object {
val customAggregateCategories: Map<RecipeBookCategories, List<RecipeBookCategories>> = mapOf(
COOKING_POT_SEARCH.toVanillaCategory() to listOf(
COOKING_POT_FOODS.toVanillaCategory(), COOKING_POT_MISC.toVanillaCategory(), COOKING_POT_MEDICINES.toVanillaCategory(), COOKING_POT_COMPLEX_DISHES.toVanillaCategory()
)
)
}
var id: String
constructor(id: String) {
this.id = id
}
fun toVanillaCategory(): RecipeBookCategories {
return RecipeBookCategories.valueOf(this.id)
}
}
@@ -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
import com.cobblemon.mod.common.item.crafting.CookingPotRecipe
import com.cobblemon.mod.common.item.crafting.CookingPotShapelessRecipe
import com.cobblemon.mod.common.item.crafting.brewingstand.BrewingStandRecipe
import com.cobblemon.mod.common.platform.PlatformRegistry
import net.minecraft.core.Registry
import net.minecraft.core.registries.BuiltInRegistries
import net.minecraft.core.registries.Registries
import net.minecraft.resources.ResourceKey
import net.minecraft.world.item.crafting.Recipe
import net.minecraft.world.item.crafting.RecipeSerializer
object CobblemonRecipeSerializers : PlatformRegistry<Registry<RecipeSerializer<*>>, ResourceKey<Registry<RecipeSerializer<*>>>, RecipeSerializer<*>>() {
val COOKING_POT_COOKING: RecipeSerializer<*> = register("cobblemon:cooking_pot", CookingPotRecipe.Serializer())
val COOKING_POT_SHAPELESS: RecipeSerializer<*> = register("cobblemon:cooking_pot_shapeless", CookingPotShapelessRecipe.Serializer())
val BREWING_STAND: RecipeSerializer<*> = register("cobblemon:brewing_stand", BrewingStandRecipe.Serializer())
override val registry: Registry<RecipeSerializer<*>>
get() = BuiltInRegistries.RECIPE_SERIALIZER
override val resourceKey: ResourceKey<Registry<RecipeSerializer<*>>>
get() = Registries.RECIPE_SERIALIZER
fun <S : RecipeSerializer<T>, T : Recipe<*>> register(key: String, recipeSerializer: S): S {
return Registry.register(BuiltInRegistries.RECIPE_SERIALIZER, key, recipeSerializer) as S
}
}
@@ -0,0 +1,47 @@
/*
* 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.item.crafting.CookingPotRecipe
import com.cobblemon.mod.common.item.crafting.CookingPotShapelessRecipe
import com.cobblemon.mod.common.item.crafting.brewingstand.BrewingStandRecipe
import com.cobblemon.mod.common.platform.PlatformRegistry
import net.minecraft.core.Registry
import net.minecraft.core.registries.BuiltInRegistries
import net.minecraft.core.registries.Registries
import net.minecraft.resources.ResourceKey
import net.minecraft.world.item.crafting.Recipe
import net.minecraft.world.item.crafting.RecipeType
object CobblemonRecipeTypes : PlatformRegistry<Registry<RecipeType<*>>, ResourceKey<Registry<RecipeType<*>>>, RecipeType<*>>() {
val COOKING_POT_COOKING: RecipeType<CookingPotRecipe> = register("cobblemon:cooking_pot")
val COOKING_POT_SHAPELESS: RecipeType<CookingPotShapelessRecipe> = register("cobblemon:cooking_pot_shapeless")
val BREWING_STAND: RecipeType<BrewingStandRecipe> = register("cobblemon:brewing_stand")
override val registry: Registry<RecipeType<*>>
get() = BuiltInRegistries.RECIPE_TYPE
override val resourceKey: ResourceKey<Registry<RecipeType<*>>>
get() = Registries.RECIPE_TYPE
fun <T : Recipe<*>> register(identifier: String): RecipeType<T> {
return Registry.register(
BuiltInRegistries.RECIPE_TYPE,
identifier,
object : RecipeType<T> {
override fun toString(): String {
return identifier
}
}
)
}
}
@@ -8,6 +8,8 @@
package com.cobblemon.mod.common
import com.cobblemon.mod.common.entity.pokemon.ai.sensors.*
import com.cobblemon.mod.common.pokemon.ai.PokemonDisturbancesSensor
import com.cobblemon.mod.common.entity.sensor.BattlingPokemonSensor
import com.cobblemon.mod.common.entity.sensor.NPCBattlingSensor
import java.util.function.Supplier
@@ -20,10 +22,24 @@ object CobblemonSensors {
val NPC_BATTLING = register("npc_battling", ::NPCBattlingSensor)
val BATTLING_POKEMON = register("battling_pokemon", ::BattlingPokemonSensor)
// val NPC_BATTLING = register("npc_battling", ::NPCBattlingSensor)
val POKEMON_DROWSY = register("pokemon_drowsy", ::DrowsySensor)
val POKEMON_ADULT = register("pokemon_adult_sensor", ::PokemonAdultSensor)
val POKEMON_DISTURBANCE = register("pokemon_disturbance_sensor", ::PokemonDisturbancesSensor)
val POKEMON_DEFEND_OWNER = register("pokemon_owner_under_attack", ::DefendOwnerSensor)
val NEARBY_GROWABLE_CROPS = register("nearby_growable_crops", ::PokemonGrowableCropSensor)
val NEARBY_BEE_HIVE = register("nearby_bee_hive", ::BeeHiveSensor)
val NEARBY_FLOWER = register("nearby_flower", ::FlowerSensor)
fun <E : Entity, U : Sensor<E>> register(id: String, supplier: Supplier<U>): SensorType<U> {
val sensor = SensorType(supplier)
sensors[id] = sensor
return sensor
}
}
}
@@ -43,8 +43,18 @@ object CobblemonSounds : PlatformRegistry<Registry<SoundEvent>, ResourceKey<Regi
@JvmField
val PC_WALLPAPER_UNLOCK = this.create("pc.wallpaper.unlock")
@JvmField
val NPC_GIBBER_GENERIC = this.create("entity.npc.gibber.generic")
@JvmField
val NPC_GIBBER_SPEECH_TYPE_1_1 = this.create("entity.npc.gibber.speech_type_1_1")
@JvmField
val NPC_GIBBER_SPEECH_TYPE_1_2 = this.create("entity.npc.gibber.speech_type_1_2")
@JvmField
val NPC_GIBBER_SPEECH_TYPE_1_3 = this.create("entity.npc.gibber.speech_type_1_3")
@JvmField
val VILLAGER_WORK_NURSE = this.create("entity.villager.work_nurse")
@JvmField
val HEALING_MACHINE_ACTIVE = this.create("block.healing_machine.active")
@@ -112,6 +122,9 @@ object CobblemonSounds : PlatformRegistry<Registry<SoundEvent>, ResourceKey<Regi
val MEDICINE_SPRAY_USE = this.create("item.medicine.spray.use")
@JvmField
val MEDICINE_FEATHER_USE = this.create("item.medicine.feather.use")
@JvmField
val MOCHI_USE = this.create("item.medicine.feather.use")
@JvmField
val MULCH_PLACE = this.create("block.mulch.place")
@@ -191,6 +204,19 @@ object CobblemonSounds : PlatformRegistry<Registry<SoundEvent>, ResourceKey<Regi
@JvmField
val EVOLUTION_STONE_BLOCK_STEP = this.create("block.evolution_stone_block.step")
@JvmField
val TATAMI_BLOCK_BREAK = this.create("block.tatami.break")
@JvmField
val TATAMI_BLOCK_HIT = this.create("block.tatami.hit")
@JvmField
val TATAMI_BLOCK_PLACE = this.create("block.tatami.place")
@JvmField
val TATAMI_BLOCK_STEP = this.create("block.tatami.step")
@JvmField
val TATAMI_MAT_BREAK = this.create("block.tatami_mat.break")
@JvmField
val TATAMI_MAT_PLACE = this.create("block.tatami_mat.place")
@JvmField
val GIMMIGHOUL_GIVE_ITEM = this.create("pokemon.gimmighoul.give_item")
@JvmField
@@ -204,6 +230,8 @@ object CobblemonSounds : PlatformRegistry<Registry<SoundEvent>, ResourceKey<Regi
val BERRY_HARVEST = this.create("block.berry_bush.harvest")
@JvmField
val BERRY_EAT = this.create("item.berry.eat")
@JvmField
val BERRY_EAT_FULL = this.create("item.berry.eat.full")
@JvmField
val BIG_ROOT_BREAK = this.create("block.big_root.break")
@@ -215,6 +243,24 @@ object CobblemonSounds : PlatformRegistry<Registry<SoundEvent>, ResourceKey<Regi
@JvmField
val VIVICHOKE_PLACE = this.create("block.vivichoke.place")
@JvmField
val HEARTY_GRAIN_BALE_BREAK = this.create("block.hearty_grain_bale.break")
@JvmField
val HEARTY_GRAIN_BALE_PLACE = this.create("block.hearty_grain_bale.place")
@JvmField
val HEARTY_GRAIN_BALE_HIT = this.create("block.hearty_grain_bale.hit")
@JvmField
val HEARTY_GRAIN_BALE_STEP = this.create("block.hearty_grain_bale.step")
@JvmField
val HEARTY_GRAINS_BREAK = this.create("block.hearty_grains.break")
@JvmField
val HEARTY_GRAINS_PLACE = this.create("block.hearty_grains.place")
@JvmField
val HEARTY_GRAINS_BREAK_WATER = this.create("block.hearty_grains.break_water")
@JvmField
val HEARTY_GRAINS_PLACE_WATER = this.create("block.hearty_grains.place_water")
@JvmField
val MINT_BREAK = this.create("block.mint.break")
@JvmField
@@ -260,6 +306,11 @@ object CobblemonSounds : PlatformRegistry<Registry<SoundEvent>, ResourceKey<Regi
RELIC_COIN_SACK_STEP
)
@JvmField
val RIDE_LOOP_LEATHER = create("ride.loop.leather")
@JvmField
val RIDE_LOOP_PLUMAGE = create("ride.loop.plumage")
@JvmField
val MOVE_QUICKATTACK_TARGET = this.create("move.quickattack.target")
@JvmField
@@ -304,6 +355,8 @@ object CobblemonSounds : PlatformRegistry<Registry<SoundEvent>, ResourceKey<Regi
@JvmField
val IMPACT_WATER = this.create("impact.water")
// Note to self or whoever's peeking, block sounds have to be at 1.1f pitch
// For some reason, the game pitches them down and compensating for it here returns them to normal
@JvmField
val TUMBLESTONE_SOUNDS = SoundType(1f, 1.1f,
TUMBLESTONE_BREAK,
@@ -321,6 +374,7 @@ object CobblemonSounds : PlatformRegistry<Registry<SoundEvent>, ResourceKey<Regi
TUMBLESTONE_HIT,
TUMBLESTONE_STEP
)
@JvmField
val EVOLUTION_STONE_BLOCK_SOUNDS = SoundType(1f, 1.1f,
EVOLUTION_STONE_BLOCK_BREAK,
@@ -330,6 +384,23 @@ object CobblemonSounds : PlatformRegistry<Registry<SoundEvent>, ResourceKey<Regi
EVOLUTION_STONE_BLOCK_STEP
)
@JvmField
val TATAMI_BLOCK_SOUNDS = SoundType(1f, 1.1f,
TATAMI_BLOCK_BREAK,
TATAMI_BLOCK_STEP,
TATAMI_BLOCK_PLACE,
TATAMI_BLOCK_HIT,
TATAMI_BLOCK_STEP
)
@JvmField
val TATAMI_MAT_SOUNDS = SoundType(1f, 1.1f,
TATAMI_MAT_BREAK,
TATAMI_BLOCK_STEP,
TATAMI_MAT_PLACE,
TATAMI_BLOCK_HIT,
TATAMI_BLOCK_STEP
)
@JvmField
val BERRY_BUSH_SOUNDS = SoundType(0.8f, 1.1f,
@@ -376,6 +447,33 @@ object CobblemonSounds : PlatformRegistry<Registry<SoundEvent>, ResourceKey<Regi
SoundEvents.GRASS_FALL
)
@JvmField
val HEARTY_GRAIN_BALE_SOUNDS = SoundType(0.6f, 1.1f,
HEARTY_GRAIN_BALE_BREAK,
HEARTY_GRAIN_BALE_STEP,
HEARTY_GRAIN_BALE_PLACE,
HEARTY_GRAIN_BALE_HIT,
HEARTY_GRAIN_BALE_STEP
)
@JvmField
val HEARTY_GRAINS_SOUNDS = SoundType(0.6f, 1.1f,
HEARTY_GRAINS_BREAK,
HEARTY_GRAIN_BALE_STEP,
HEARTY_GRAINS_PLACE,
HEARTY_GRAIN_BALE_HIT,
HEARTY_GRAIN_BALE_STEP
)
@JvmField
val HEARTY_GRAINS_WATER_SOUNDS = SoundType(0.6f, 1.1f,
HEARTY_GRAINS_BREAK_WATER,
SoundEvents.GRASS_STEP,
HEARTY_GRAINS_PLACE_WATER,
SoundEvents.GRASS_HIT,
SoundEvents.GRASS_FALL
)
@JvmField
val MINT_SOUNDS = SoundType(0.6f, 1.1f,
MINT_BREAK,
@@ -415,7 +513,6 @@ object CobblemonSounds : PlatformRegistry<Registry<SoundEvent>, ResourceKey<Regi
val DISPLAY_CASE_PLACE = this.create("block.display_case.place")
@JvmField
val DISPLAY_CASE_STEP = this.create("block.display_case.step")
@JvmField
val DISPLAY_CASE_SOUNDS = SoundType(1f, 1f,
DISPLAY_CASE_BREAK,
@@ -425,5 +522,39 @@ object CobblemonSounds : PlatformRegistry<Registry<SoundEvent>, ResourceKey<Regi
DISPLAY_CASE_STEP
)
@JvmField
val CAMPFIRE_POT_SET = this.create("block.campfire_pot.set")
@JvmField
val CAMPFIRE_POT_RETRIEVE = this.create("block.campfire_pot.retrieve")
@JvmField
val CAMPFIRE_POT_OPEN = this.create("block.campfire_pot.open")
@JvmField
val CAMPFIRE_POT_CLOSE = this.create("block.campfire_pot.close")
@JvmField
val CAMPFIRE_POT_TAKE_ITEM = this.create("block.campfire_pot.take_item")
@JvmField
val CAMPFIRE_POT_ACTIVE = this.create("block.campfire_pot.active")
@JvmField
val CAMPFIRE_POT_AMBIENT = this.create("block.campfire_pot.ambient")
@JvmField
val CAMPFIRE_POT_COOK = this.create("block.campfire_pot.cook")
@JvmField
val CAMPFIRE_POT_PLACE = this.create("block.campfire_pot.place")
@JvmField
val CAMPFIRE_POT_BREAK = this.create("block.campfire_pot.break")
@JvmField
val CAMPFIRE_POT_HIT = this.create("block.campfire_pot.hit")
@JvmField
val CAMPFIRE_POT_STEP = this.create("block.campfire_pot.step")
@JvmField
val CAMPFIRE_POT_SOUNDS = SoundType(1f, 1.1f,
CAMPFIRE_POT_BREAK,
CAMPFIRE_POT_STEP,
CAMPFIRE_POT_PLACE,
CAMPFIRE_POT_HIT,
CAMPFIRE_POT_STEP
)
private fun create(name: String): SoundEvent = this.create(name, SoundEvent.createVariableRangeEvent(cobblemonResource(name)))
}
}
@@ -24,7 +24,7 @@ object CobblemonVillagerProfessions: PlatformRegistry<Registry<VillagerProfessio
override val resourceKey: ResourceKey<Registry<VillagerProfession>> = Registries.VILLAGER_PROFESSION
@JvmField
val NURSE = profession(CobblemonVillagerPoiTypes.NURSE_KEY, CobblemonSounds.VILLAGER_WORK_NURSE)
val NURSE = profession(CobblemonPoiTypes.NURSE_KEY, CobblemonSounds.VILLAGER_WORK_NURSE)
/**
* Register a villager profession texture override for Cobblemon villagers of the given [VillagerProfession] for specified names.
@@ -18,7 +18,7 @@ import java.util.Optional
class AspectCriterion(
playerCtx: Optional<ContextAwarePredicate>,
val pokemon: ResourceLocation,
val species: ResourceLocation,
val aspects: List<String>
): SimpleCriterionCondition<MutableMap<ResourceLocation, MutableSet<String>>>(playerCtx) {
@@ -26,42 +26,13 @@ class AspectCriterion(
val CODEC: Codec<AspectCriterion> = RecordCodecBuilder.create { it.group(
//All three of these codecs used to use Codecs.createStrictOptionalFieldCodec, that no longer exists
ContextAwarePredicate.CODEC.optionalFieldOf("player").forGetter(AspectCriterion::playerCtx),
ResourceLocation.CODEC.optionalFieldOf("pokemon", cobblemonResource("pikachu")).forGetter(AspectCriterion::pokemon),
ResourceLocation.CODEC.optionalFieldOf("species", cobblemonResource("pikachu")).forGetter(AspectCriterion::species),
Codec.STRING.listOf().optionalFieldOf("aspects", listOf()).forGetter(AspectCriterion::aspects)
) .apply(it, ::AspectCriterion) }
}
override fun matches(player: ServerPlayer, context: MutableMap<ResourceLocation, MutableSet<String>>): Boolean {
val caughtAspects = context.getOrDefault(pokemon, mutableSetOf())
val caughtAspects = context.getOrDefault(species, mutableSetOf())
return this.aspects.all { it in caughtAspects }
}
}
//open class AspectCriterionTrigger(identifier: Identifier, criterionClass: Class<AspectCriterionCondition>) : SimpleCriterionTrigger<MutableMap<Identifier, MutableSet<String>>, AspectCriterionCondition>(identifier, criterionClass) {
//
//}
//
//class AspectCriterionCondition(id: Identifier, predicate: LootContextPredicate) : SimpleCriterionCondition<MutableMap<Identifier, MutableSet<String>>>(id, predicate) {
// var pokemon = Identifier.of("cobblemon:pikachu")
// var aspects = mutableListOf<String>()
// override fun toJson(json: JsonObject) {
// json.add("aspects", JsonArray(aspects.size).also {
// aspects.forEach { aspect -> it.add(aspect) }
// })
// json.addProperty("pokemon", pokemon.toString())
// }
//
// override fun fromJson(json: JsonObject) {
// aspects.clear()
// json.getAsJsonArray("aspects").forEach { element ->
// aspects.add(element.asString)
// }
// pokemon = json.get("pokemon").asString.asIdentifierDefaultingNamespace()
// }
//
// override fun matches(player: ServerPlayer, context: MutableMap<Identifier, MutableSet<String>>): Boolean {
// val caughtAspects = context.getOrDefault(pokemon, mutableSetOf())
// return this.aspects.all { it in caughtAspects }
// }
//
//}
@@ -20,8 +20,8 @@ import net.minecraft.resources.ResourceLocation
class CastPokeRodContext(val baitId: ResourceLocation)
class CastPokeRodCriterionCondition(
playerCtx: Optional<ContextAwarePredicate>,
val baitId: String
playerCtx: Optional<ContextAwarePredicate>,
val baitId: String
): SimpleCriterionCondition<CastPokeRodContext>(playerCtx) {
companion object {
@@ -21,40 +21,23 @@ import java.util.Optional
* @author Hiroku
* @since November 4th, 2022
*/
open class CountablePokemonTypeContext(times: Int, var type: String) : CountableContext(times)
open class CountablePokemonTypeContext(times: Int, var species: String) : CountableContext(times)
class CaughtPokemonCriterion(
playerCtx: Optional<ContextAwarePredicate>,
val type: String,
val species: String,
count: Int
): CountableCriterion<CountablePokemonTypeContext>(playerCtx, count) {
companion object {
val CODEC: Codec<CaughtPokemonCriterion> = RecordCodecBuilder.create { it.group(
EntityPredicate.ADVANCEMENT_CODEC.optionalFieldOf("player").forGetter(CaughtPokemonCriterion::playerCtx),
Codec.STRING.optionalFieldOf("type", "any").forGetter(CaughtPokemonCriterion::type),
Codec.STRING.optionalFieldOf("species", "any").forGetter(CaughtPokemonCriterion::species),
Codec.INT.optionalFieldOf("count", 0).forGetter(CaughtPokemonCriterion::count)
).apply(it, ::CaughtPokemonCriterion) }
}
override fun matches(player: ServerPlayer, context: CountablePokemonTypeContext): Boolean {
return super.matches(player, context) && (context.type == type || type == "any")
return super.matches(player, context) && (context.species == species || species == "any")
}
}
//class CaughtPokemonCriterionCondition(id: Identifier, predicate: LootContextPredicate) : CountableCriterionCondition<CountablePokemonTypeContext>(id, predicate) {
// var type = "any"
// override fun toJson(json: JsonObject) {
// super.toJson(json)
// json.addProperty("type", type)
// }
//
// override fun fromJson(json: JsonObject) {
// super.fromJson(json)
// type = json.get("type")?.asString ?: "any"
// }
//
// override fun matches(player: ServerPlayer, context: CountablePokemonTypeContext): Boolean {
// return super.matches(player, context) && (context.type == type || type == "any")
// }
//}
@@ -19,17 +19,20 @@ import java.util.Optional
class PokemonCriterion(
playerCtx: Optional<ContextAwarePredicate>,
val species: String,
val properties: PokemonProperties
): SimpleCriterionCondition<Pokemon>(playerCtx) {
companion object {
val CODEC: Codec<PokemonCriterion> = RecordCodecBuilder.create { it.group(
EntityPredicate.ADVANCEMENT_CODEC.optionalFieldOf("player").forGetter(PokemonCriterion::playerCtx),
Codec.STRING.optionalFieldOf("species", "any").forGetter(PokemonCriterion::species),
PokemonProperties.CODEC.optionalFieldOf("properties", PokemonProperties()).forGetter(PokemonCriterion::properties)
).apply(it, ::PokemonCriterion) }
}
override fun matches(player: ServerPlayer, context: Pokemon): Boolean {
return properties.matches(context)
var speciesCheck = (species.equals(context.species.resourceIdentifier.path) || species.equals(context.species.resourceIdentifier.toString())) || species.equals("any")
return speciesCheck && properties.matches(context)
}
}
}
@@ -17,22 +17,22 @@ import net.minecraft.server.level.ServerPlayer
import net.minecraft.resources.ResourceLocation
import java.util.Optional
class PokemonInteractContext(val type: ResourceLocation, val item: ResourceLocation)
class PokemonInteractContext(val species: ResourceLocation, val item: ResourceLocation)
class PokemonInteractCriterion(
playerCtx: Optional<ContextAwarePredicate>,
val type: String,
val species: String,
val item: String
): SimpleCriterionCondition<PokemonInteractContext>(playerCtx) {
companion object {
val CODEC: Codec<PokemonInteractCriterion> = RecordCodecBuilder.create { it.group(
EntityPredicate.ADVANCEMENT_CODEC.optionalFieldOf("player").forGetter(PokemonInteractCriterion::playerCtx),
Codec.STRING.optionalFieldOf("type", "any").forGetter(PokemonInteractCriterion::type),
Codec.STRING.optionalFieldOf("species", "any").forGetter(PokemonInteractCriterion::species),
Codec.STRING.optionalFieldOf("item", "any").forGetter(PokemonInteractCriterion::item)
).apply(it, ::PokemonInteractCriterion) }
}
override fun matches(player: ServerPlayer, context: PokemonInteractContext): Boolean {
return (context.type == this.type.asIdentifierDefaultingNamespace() || this.type == "any") && (context.item == this.item.asIdentifierDefaultingNamespace() || this.item == "any")
return (context.species == this.species.asIdentifierDefaultingNamespace() || this.species == "any") && (context.item == this.item.asIdentifierDefaultingNamespace() || this.item == "any")
}
}
}
@@ -17,23 +17,23 @@ import net.minecraft.advancements.critereon.EntityPredicate
import net.minecraft.server.level.ServerPlayer
import net.minecraft.resources.ResourceLocation
class ReelInPokemonContext(val pokemonId : ResourceLocation, val baitId: ResourceLocation)
class ReelInPokemonContext(val species : ResourceLocation, val baitId: ResourceLocation)
class ReelInPokemonCriterionCondition(
playerCtx: Optional<ContextAwarePredicate>,
val pokemonId: String,
val species: String,
val baitId: String
) : SimpleCriterionCondition<ReelInPokemonContext>(playerCtx) {
companion object {
val CODEC: Codec<ReelInPokemonCriterionCondition> = RecordCodecBuilder.create { it.group(
EntityPredicate.ADVANCEMENT_CODEC.optionalFieldOf("player").forGetter { it.playerCtx },
Codec.STRING.optionalFieldOf("pokemonId", "any").forGetter { it.pokemonId },
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" }) }) }
}
override fun matches(player: ServerPlayer, context: ReelInPokemonContext): Boolean {
return (context.pokemonId == this.pokemonId.asIdentifierDefaultingNamespace() || this.pokemonId == "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 == "empty_bait")
}
}
@@ -15,9 +15,12 @@ import com.cobblemon.mod.common.battles.runner.ShowdownService
import com.cobblemon.mod.common.net.messages.client.data.AbilityRegistrySyncPacket
import com.cobblemon.mod.common.pokemon.abilities.HiddenAbilityType
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
import kotlin.collections.set
/**
* Registry for all known Abilities
@@ -31,15 +34,31 @@ object Abilities : DataRegistry {
val DUMMY = AbilityTemplate(name = "dummy")
private val abilityMap = mutableMapOf<String, AbilityTemplate>()
internal val abilityScripts = mutableMapOf<String, String>() // abilityId to JavaScript
override fun reload(manager: ResourceManager) {
PotentialAbility.types.clear()
PotentialAbility.types.add(CommonAbilityType)
PotentialAbility.types.add(HiddenAbilityType)
this.abilityMap.clear()
val abilitiesJson = ShowdownService.service.getAbilityIds()
this.abilityScripts.clear()
ShowdownService.service.resetRegistryData("ability")
manager.listResources("abilities") { 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()
abilityScripts[resolvedIdentifier.path] = js
}
}
}
ShowdownService.service.sendRegistryData(abilityScripts, "ability")
val abilitiesJson = ShowdownService.service.getRegistryData("ability")
for (i in 0 until abilitiesJson.size()) {
val id = abilitiesJson[i].asString
val jsonAbility = abilitiesJson[i].asJsonObject
val id = jsonAbility.get("id").asString
val ability = AbilityTemplate(id)
this.register(ability)
}
@@ -0,0 +1,95 @@
/*
* 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 com.bedrockk.molang.runtime.MoLangRuntime
import com.cobblemon.mod.common.api.ai.config.BehaviourConfig
import com.cobblemon.mod.common.api.molang.ExpressionLike
import com.cobblemon.mod.common.api.molang.MoLangFunctions.asMostSpecificMoLangValue
import com.cobblemon.mod.common.api.molang.MoLangFunctions.setup
import com.cobblemon.mod.common.api.scripting.CobblemonScripts
import com.cobblemon.mod.common.entity.MoLangScriptingEntity
import com.cobblemon.mod.common.util.resolve
import com.cobblemon.mod.common.util.withQueryValue
import com.mojang.serialization.Dynamic
import net.minecraft.resources.ResourceLocation
import net.minecraft.world.entity.LivingEntity
import net.minecraft.world.entity.ai.memory.MemoryModuleType
import net.minecraft.world.entity.ai.sensing.SensorType
import net.minecraft.world.entity.schedule.Activity
import net.minecraft.world.entity.schedule.Schedule
class BehaviourConfigurationContext {
var appliedBehaviours: Set<ResourceLocation> = setOf()
var defaultActivity = Activity.IDLE
var coreActivities = setOf(Activity.CORE)
val activities = mutableListOf<ActivityConfigurationContext>()
val schedule = Schedule.EMPTY
val memories = mutableSetOf<MemoryModuleType<*>>()
val sensors = mutableSetOf<SensorType<*>>()
val onAddScripts = mutableListOf<ResourceLocation>()
val onAdd = mutableListOf<ExpressionLike>()
fun getOrCreateActivity(activity: Activity): ActivityConfigurationContext {
return activities.firstOrNull { it.activity == activity } ?: ActivityConfigurationContext(activity).also(activities::add)
}
fun addMemories(vararg memory: MemoryModuleType<*>) {
memories.addAll(memory)
}
fun addMemories(memories: Collection<MemoryModuleType<*>>) {
this.memories.addAll(memories)
}
fun addSensors(vararg sensor: SensorType<*>) {
sensors.addAll(sensor)
}
fun addSensors(sensors: Collection<SensorType<*>>) {
this.sensors.addAll(sensors)
}
fun addOnAddScript(script: ResourceLocation) {
onAddScripts.add(script)
}
fun addOnAddScript(script: ExpressionLike) {
onAdd.add(script)
}
fun apply(entity: LivingEntity, behaviourConfigs: List<BehaviourConfig>, dynamic: Dynamic<*>) {
if (entity is MoLangScriptingEntity) {
entity.registerVariables(behaviourConfigs.flatMap { it.getVariables(entity) })
entity.initializeScripting()
}
// Setup the brain config
behaviourConfigs.forEach { it.configure(entity, this) }
var brain = entity.brain
// Apply the brain config
if (entity is MoLangScriptingEntity) {
brain = entity.assignNewBrainWithMemoriesAndSensors(dynamic, memories, sensors)
val runtime = MoLangRuntime().setup()
runtime.withQueryValue("entity", entity.asMostSpecificMoLangValue())
onAddScripts.forEach { CobblemonScripts.run(it, runtime) }
onAdd.forEach { runtime.resolve(it) }
}
activities.forEach { it.apply(entity) }
brain.setCoreActivities(coreActivities)
brain.setDefaultActivity(defaultActivity)
brain.schedule = schedule
brain.setActiveActivityIfPossible(defaultActivity)
}
}
@@ -1,40 +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.api.ai
import com.cobblemon.mod.common.api.ai.config.BrainConfig
import net.minecraft.world.entity.LivingEntity
import net.minecraft.world.entity.schedule.Activity
import net.minecraft.world.entity.schedule.Schedule
class BrainConfigurationContext {
var defaultActivity = Activity.IDLE
var coreActivities = setOf(Activity.CORE)
val activities = mutableListOf<ActivityConfigurationContext>()
val schedule = Schedule.EMPTY
fun getOrCreateActivity(activity: Activity): ActivityConfigurationContext {
return activities.firstOrNull { it.activity == activity } ?: ActivityConfigurationContext(activity).also(activities::add)
}
fun apply(entity: LivingEntity, brainConfigs: List<BrainConfig>) {
val brain = entity.brain
// Setup the brain config
brainConfigs.forEach { it.configure(entity, this) }
// Apply the brain config
activities.forEach { it.apply(entity) }
brain.setCoreActivities(coreActivities)
brain.setDefaultActivity(defaultActivity)
brain.schedule = schedule
brain.setActiveActivityIfPossible(defaultActivity)
}
}
@@ -0,0 +1,71 @@
/*
* 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 com.bedrockk.molang.Expression
import com.bedrockk.molang.runtime.MoLangRuntime
import com.bedrockk.molang.runtime.value.DoubleValue
import com.cobblemon.mod.common.Cobblemon
import com.cobblemon.mod.common.api.molang.MoLangFunctions.asMostSpecificMoLangValue
import com.cobblemon.mod.common.api.molang.MoLangFunctions.setup
import com.cobblemon.mod.common.api.molang.ObjectValue
import com.cobblemon.mod.common.api.scripting.CobblemonScripts
import com.cobblemon.mod.common.util.asExpression
import com.cobblemon.mod.common.util.asIdentifierDefaultingNamespace
import com.cobblemon.mod.common.util.resolve
import net.minecraft.world.entity.Entity
/**
* This is used in the AI system to store optional additional information about the attack target,
* mainly things like when to give up pursuit, what sort of attacks are permitted, whatever. It's
* a temporary memory, same as ATTACK_TARGET, so relogs will clear it and that's why it has no codec.
*
* To help you get a sense of a use case, imagine a Pidgeotto has an AI task that says it should hunt
* Magikarp that are close to the surface. Once they've found one and chosen them as the attack target,
* they should give up the target if the Magikarp goes too deep, but if it's attacking an entity because
* they attacked its owner, it shouldn't give up on the target for that reason. To address this, when
* hunting Magikarp, the Pidgeotto will set this memory to a CobblemonAttackTargetData with some
* [Expression] that encourages the entity to give up the target if the Magikarp goes too deep.
*
* To make this work, any transition from the FIGHT activity will erase this memory.
*
* @author Hiroku
* @since June 23rd, 2025
*/
class CobblemonAttackTargetData(
/** An expression that returns false when the target is no longer worth attacking. */
var shouldContinue: Expression = "true".asExpression(),
var hitsUntilDisengage: Int = -1, // -1 means no limit
var disengageAction: (entity: Entity) -> Unit = {}
) {
val struct = ObjectValue<CobblemonAttackTargetData>(this).also {
it.addFunction("hits_until_disengage") { DoubleValue(hitsUntilDisengage.toDouble()) }
it.addFunction("set_hits_until_disengage") { params ->
val value = params.getDouble(0)
hitsUntilDisengage = value.toInt()
DoubleValue(hitsUntilDisengage.toDouble())
}
it.addFunction("set_disengage_action") { params ->
val script = params.getString(0).asIdentifierDefaultingNamespace()
val function = CobblemonScripts.scripts[script] ?: run {
Cobblemon.LOGGER.warn("set_disengage_action was given script '$script' which does not exist.")
return@addFunction DoubleValue.ZERO
}
disengageAction = { entity ->
val runtime = MoLangRuntime().setup()
runtime.environment.query.addFunction("entity") { entity.asMostSpecificMoLangValue() }
runtime.resolve(function)
}
DoubleValue.ONE
}
it.addFunction("unset_disengage_action") { params ->
disengageAction = {}
}
}
}
@@ -0,0 +1,63 @@
/*
* 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 com.bedrockk.molang.runtime.MoLangRuntime
import com.cobblemon.mod.common.api.ai.config.BehaviourConfig
import com.cobblemon.mod.common.api.molang.ExpressionLike
import com.cobblemon.mod.common.api.molang.MoLangFunctions.asMostSpecificMoLangValue
import com.cobblemon.mod.common.api.molang.MoLangFunctions.setup
import com.cobblemon.mod.common.api.scripting.CobblemonScripts
import com.cobblemon.mod.common.util.asTranslated
import com.cobblemon.mod.common.util.resolve
import com.cobblemon.mod.common.util.withQueryValue
import com.google.gson.annotations.SerializedName
import net.minecraft.network.chat.Component
import net.minecraft.resources.ResourceLocation
import net.minecraft.world.entity.LivingEntity
class CobblemonBehaviour(
val name: Component = "".asTranslated(),
val description: Component = "".asTranslated(),
/** Some behaviours aren't really worth showing on the client, namely ones that are simply conditional bundles of other behaviours. */
val visible: Boolean = true,
val entityType: ResourceLocation? = null,
val configurations: List<BehaviourConfig> = mutableListOf(),
// I feel like the onAdd+onAddScript etc could be merged using some interface and a clever deserializer,
// detect if it's a ResourceLocation and failing that, Expression. The on[..]Script fields are kinda fringe though.
@SerializedName("onRemove", alternate = ["undo"])
val onRemove: ExpressionLike? = null,
@SerializedName("onRemoveScript", alternate = ["undoScript"])
val onRemoveScript: ResourceLocation? = null,
val onAdd: ExpressionLike? = null,
val onAddScript: ResourceLocation? = null,
) {
fun canBeApplied(entity: LivingEntity) = entityType?.let { entityType == entity.type.builtInRegistryHolder().unwrapKey().get().location() } != false
fun configure(entity: LivingEntity, behaviourConfigurationContext: BehaviourConfigurationContext) {
if (onAdd != null) {
behaviourConfigurationContext.addOnAddScript(onAdd)
}
if (onAddScript != null) {
behaviourConfigurationContext.addOnAddScript(onAddScript)
}
configurations.forEach { it.configure(entity, behaviourConfigurationContext) }
}
/** Undoes anything that needs undoing once this configuration is being removed from an entity that had it before. */
fun onRemove(entity: LivingEntity) {
val runtime = MoLangRuntime().setup()
runtime.withQueryValue("entity", entity.asMostSpecificMoLangValue())
if (onRemoveScript != null) {
CobblemonScripts.run(onRemoveScript, runtime)
}
if (onRemove != null) {
runtime.resolve(onRemove)
}
}
}
@@ -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.ai
import net.minecraft.world.entity.ai.behavior.BlockPosTracker
import net.minecraft.world.phys.Vec3
/**
* Wraps around [BlockPosTracker] to add additional flags for Cobblemon-specific behavior.
*
* @author Hiroku
* @since August 4th, 2025
*/
class CobblemonBlockPosTracker(
pos: Vec3,
val flags: Set<String> = emptySet(),
) : BlockPosTracker(pos) {
companion object {
const val BATTLE_LOOK_BYPASS_FLAG = "battle_look_bypass"
}
fun isBattleLookBypass() = flags.contains(BATTLE_LOOK_BYPASS_FLAG)
}
@@ -0,0 +1,91 @@
/*
* 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 com.bedrockk.molang.runtime.struct.QueryStruct
import com.cobblemon.mod.common.util.getBooleanOrNull
import com.cobblemon.mod.common.util.getDoubleOrNull
import kotlin.math.sqrt
import net.minecraft.core.BlockPos
import net.minecraft.world.entity.PathfinderMob
/**
* Used to maintain some settings around how the entity should wander this tick. The idea is you
* reset this with some script task at priority 0 then some number of steps before it gets to the wander
* tasks you can have other conditional tasks jump in to configure parts of this.
*
* @author Hiroku
* @since July 18, 2025
*/
class CobblemonWanderControl(
var center: WanderCenter? = null,
var maxAttempts: Int = 4, // How many times to try to find a suitable point before giving up on that tick.
var allowLand: Boolean = true,
var allowWater: Boolean = false,
var allowAir: Boolean = false,
var pathCooldownTicks: Int = 20 * 5, // Used to mitigate the cost of pathfinding.
var wanderSpeed: Float = 0.35F,
) {
class WanderCenter(val x: Number, val y: Number, val z: Number, val minRange: Float, val maxRange: Float)
@Transient
val struct: QueryStruct = QueryStruct(hashMapOf())
.addFunction("center_x") { center?.x ?: 0.0 }
.addFunction("center_y") { center?.y ?: 0.0 }
.addFunction("center_z") { center?.z ?: 0.0 }
.addFunction("max_attempts") { maxAttempts.toDouble() }
.addFunction("min_range") { center?.minRange ?: 0.0 }
.addFunction("max_range") { center?.maxRange ?: 0.0 }
.addFunction("allow_land") { if (allowLand) 1.0 else 0.0 }
.addFunction("allow_water") { if (allowWater) 1.0 else 0.0 }
.addFunction("allow_air") { if (allowAir) 1.0 else 0.0 }
.addFunction("path_cooldown_ticks") { pathCooldownTicks.toDouble() }
.addFunction("wander_speed") { wanderSpeed }
.addFunction("set_center") { params ->
if (params.params.size < 3) {
throw IllegalArgumentException("set_center requires at least 3 parameters: x, y, z")
}
val x = params.getDouble(0)
val y = params.getDouble(1)
val z = params.getDouble(2)
val minRange = params.getDoubleOrNull(3) ?: 0.0
val maxRange = params.getDoubleOrNull(4) ?: Float.MAX_VALUE.toDouble()
center = WanderCenter(
x = x,
y = y,
z = z,
minRange = minRange.toFloat(),
maxRange = maxRange.toFloat(),
)
}
.addFunction("set_max_attempts") { params -> maxAttempts = params.getDoubleOrNull(0)?.toInt() ?: 4 }
.addFunction("set_allow_land") { params -> allowLand = params.getBooleanOrNull(0) ?: true }
.addFunction("set_allow_water") { params -> allowWater = params.getBooleanOrNull(0) ?: false }
.addFunction("set_allow_air") { params -> allowAir = params.getBooleanOrNull(0) ?: false }
.addFunction("set_path_cooldown_ticks") { params -> pathCooldownTicks = params.getDoubleOrNull(0)?.toInt() ?: (20 * 5) }
.addFunction("set_wander_speed") { params -> wanderSpeed = params.getDoubleOrNull(0)?.toFloat() ?: 0.35F }
.addFunction("reset") {
center = null
allowLand = false
allowWater = false
allowAir = false
pathCooldownTicks = 20 * 5
wanderSpeed = 0.35F
maxAttempts = 4
}
fun isSuitable(position: BlockPos): Boolean {
val center = center ?: return true
val centerPos = BlockPos(center.x.toInt(), center.y.toInt(), center.z.toInt())
val distance = sqrt(centerPos.distSqr(position))
val suitable = distance >= center.minRange && distance <= center.maxRange
return suitable
}
}
@@ -0,0 +1,25 @@
/*
* 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 com.bedrockk.molang.Expression
import com.cobblemon.mod.common.api.npc.configuration.MoLangConfigVariable
import com.mojang.datafixers.util.Either
import kotlin.jvm.optionals.getOrNull
typealias ExpressionOrEntityVariable = Either<Expression, MoLangConfigVariable>
/**
* In the case of [ExpressionOrEntityVariable] the right side is the only one that requires visibility for a user,
* this function is a shorthand for finding all of the values in the list that have something to show the user to
* potentially edit.
*/
fun List<ExpressionOrEntityVariable>.asVariables() = mapNotNull { it.right().getOrNull() }
@@ -12,7 +12,20 @@ import net.minecraft.server.level.ServerLevel
import net.minecraft.world.entity.LivingEntity
import net.minecraft.world.entity.ai.behavior.BehaviorControl
/**
* A wrapper for [BehaviorControl] that allows it to be used with any [LivingEntity]. If the class the task was
* actually intended for is not the same as the entity being passed in, the task will just not run. This is just
* a trick to allow type safety.
*
* @author Hiroku
* @since October 19th, 2024
*/
class WrapperLivingEntityTask<T : LivingEntity>(val task: BehaviorControl<T>, val clazz: Class<T>) : BehaviorControl<LivingEntity> {
companion object {
inline fun <reified E : LivingEntity> BehaviorControl<E>.wrapped(): BehaviorControl<LivingEntity> {
return WrapperLivingEntityTask(this, E::class.java)
}
}
override fun tryStart(level: ServerLevel, entity: LivingEntity, gameTime: Long): Boolean {
if (clazz.isInstance(entity)) {
return task.tryStart(level, entity as T, gameTime)
@@ -0,0 +1,37 @@
/*
* 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
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.util.asExpression
import com.mojang.datafixers.util.Either
import net.minecraft.world.entity.LivingEntity
import net.minecraft.world.entity.ai.memory.MemoryModuleType
import net.minecraft.world.entity.ai.sensing.SensorType
/**
* Does nothing except conditionally add some memories and sensors to the brain of the entity.
*
* @author Hiroku
* @since June 27th, 2025
*/
class AddMemoriesAndSensorsConfig : BehaviourConfig {
val condition: ExpressionOrEntityVariable = Either.left("true".asExpression())
val memories: Set<MemoryModuleType<*>> = emptySet()
val sensors: Set<SensorType<*>> = mutableSetOf()
override fun getVariables(entity: LivingEntity) = listOf(condition).asVariables()
override fun configure(entity: LivingEntity, behaviourConfigurationContext: BehaviourConfigurationContext) {
if (!checkCondition(entity, condition)) return
behaviourConfigurationContext.addMemories(memories)
behaviourConfigurationContext.addSensors(sensors)
}
}
@@ -8,32 +8,34 @@
package com.cobblemon.mod.common.api.ai.config
import com.bedrockk.molang.runtime.MoLangRuntime
import com.bedrockk.molang.runtime.struct.QueryStruct
import com.cobblemon.mod.common.api.ai.BrainConfigurationContext
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.ai.config.task.TaskConfig
import com.cobblemon.mod.common.api.molang.MoLangFunctions.setup
import com.cobblemon.mod.common.entity.PosableEntity
import com.cobblemon.mod.common.util.asExpressionLike
import com.cobblemon.mod.common.util.resolveBoolean
import com.cobblemon.mod.common.util.withQueryValue
import com.cobblemon.mod.common.util.asExpression
import com.mojang.datafixers.util.Either
import net.minecraft.world.entity.LivingEntity
import net.minecraft.world.entity.schedule.Activity
class AddTasksToActivity : BrainConfig {
val activity = Activity.IDLE
val condition = "true".asExpressionLike()
class AddTasksToActivity : BehaviourConfig {
val activity: Activity? = null
// Can be useful to add to multiple activities at once
val activities = mutableListOf<Activity>()
val condition: ExpressionOrEntityVariable = Either.left("true".asExpression())
val tasksByPriority = mutableMapOf<Int, List<TaskConfig>>()
override fun configure(entity: LivingEntity, brainConfigurationContext: BrainConfigurationContext) {
val runtime = MoLangRuntime().setup()
runtime.withQueryValue("entity", (entity as? PosableEntity)?.struct ?: QueryStruct(hashMapOf()))
if (!runtime.resolveBoolean(condition)) return
override fun getVariables(entity: LivingEntity) = tasksByPriority.values.flatten().flatMap { it.getVariables(entity) } + listOf(condition).asVariables()
override fun configure(entity: LivingEntity, behaviourConfigurationContext: BehaviourConfigurationContext) {
if (!checkCondition(entity, condition)) return
val activities = if (activity != null) (activities + activity) else activities
val activity = brainConfigurationContext.getOrCreateActivity(activity)
tasksByPriority.forEach { (priority, taskConfigs) ->
val tasks = taskConfigs.flatMap { it.createTasks(entity, brainConfigurationContext) }
activity.addTasks(priority, *tasks.toTypedArray())
val tasks = taskConfigs.flatMap { it.createTasks(entity, behaviourConfigurationContext) }
for (activity in activities) {
val activityContext = behaviourConfigurationContext.getOrCreateActivity(activity)
activityContext.addTasks(priority, *tasks.toTypedArray())
}
}
}
}
@@ -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.api.ai.config
import com.cobblemon.mod.common.api.ai.BehaviourConfigurationContext
import com.cobblemon.mod.common.api.npc.configuration.MoLangConfigVariable
import net.minecraft.world.entity.LivingEntity
class AddVariablesConfig(val variables: List<MoLangConfigVariable> = emptyList()) : BehaviourConfig {
override fun getVariables(entity: LivingEntity) = variables
// Configuration happens naturally through the override on variables
override fun configure(entity: LivingEntity, behaviourConfigurationContext: BehaviourConfigurationContext) {}
}
@@ -0,0 +1,52 @@
/*
* Copyright (C) 2023 Cobblemon Contributors
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
package com.cobblemon.mod.common.api.ai.config
import com.cobblemon.mod.common.Cobblemon
import com.cobblemon.mod.common.CobblemonBehaviours
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.npc.configuration.MoLangConfigVariable
import com.cobblemon.mod.common.util.asExpression
import com.google.gson.annotations.SerializedName
import com.mojang.datafixers.util.Either
import net.minecraft.resources.ResourceLocation
import net.minecraft.world.entity.LivingEntity
class ApplyBehaviours : BehaviourConfig {
var condition: ExpressionOrEntityVariable = Either.left("true".asExpression())
@SerializedName("behaviours", alternate = ["behaviors"])
val behaviours = mutableListOf<ResourceLocation>()
override fun getVariables(entity: LivingEntity): List<MoLangConfigVariable> {
return if (checkCondition(entity, condition)) {
behaviours.flatMap {
CobblemonBehaviours.behaviours[it]?.configurations?.flatMap { it.getVariables(entity) } ?: emptyList()
} + listOf(condition).asVariables()
} else {
listOf(condition).asVariables()
}
}
override fun configure(entity: LivingEntity, behaviourConfigurationContext: BehaviourConfigurationContext) {
if (!checkCondition(entity, condition)) return
val configurations = behaviours.map { CobblemonBehaviours.behaviours[it]?.takeIf { it.canBeApplied(entity) } ?: return Cobblemon.LOGGER.warn("Behaviour $it not found") }
// 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 {
it.configure(entity, behaviourConfigurationContext)
}
originalContextBehaviours.addAll(behaviours)
behaviourConfigurationContext.appliedBehaviours = originalContextBehaviours
}
}

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