Compare commits

...

1236 Commits

Author SHA1 Message Date
dfsek e6300df185 implement a bunch of function utils 2026-01-03 15:53:13 -07:00
dfsek 65eb66c3ca add curry and uncurry functions 2026-01-03 04:13:21 -07:00
dfsek aa3fe18339 rename palette-block-shortcut to shortcut-block-palette 2026-01-02 22:26:33 -07:00
dfsek 6a6a3928cd rename structure-block-shortcut to shortcut-block-structure 2026-01-02 22:25:23 -07:00
dfsek ac1258d233 rename library-image to api-image 2026-01-02 22:24:42 -07:00
dfsek b6d42fdcc1 rename biome-query-api to api-biome-query 2026-01-02 22:22:14 -07:00
dfsek a9251fa228 rename api-addon-loader addon-loader-api 2026-01-02 22:20:44 -07:00
dfsek 38a1571941 fix RegistryTest 2026-01-02 22:19:05 -07:00
dfsek b9af66848a rename manifest-addon-loader to addon-loader-manifest 2026-01-02 22:15:14 -07:00
dfsek e9d30b8794 rename Lazy to Memo 2026-01-02 21:13:24 -07:00
dfsek 53dafa4a2c rename IntToBooleanFunction to IntPredicate 2026-01-02 20:04:26 -07:00
dfsek df46c617f2 move Construct to FunctionUtils 2026-01-02 20:04:00 -07:00
dfsek e706ef89fc implement faster map on Lazy 2026-01-02 17:23:03 -07:00
dfsek a66c2a0749 Implement Monad Lazy 2026-01-02 17:12:30 -07:00
dfsek a5fe4d7928 Add annotations 2026-01-02 17:12:20 -07:00
dfsek 966bcab370 add more linkedlist methods 2026-01-02 03:04:19 -07:00
dfsek eae5a60cf9 remove useless methods from Pair 2026-01-01 22:31:44 -07:00
dfsek 9357b18964 refactor some static methods to generic versions in BiFunctor 2026-01-01 22:30:10 -07:00
dfsek 86bb4d5a1a implement Bifunctor Pair 2026-01-01 20:15:05 -07:00
dfsek 47bdd66fe7 Make Pair a record 2026-01-01 20:10:15 -07:00
dfsek eb6b3704d0 add linkedlist 2026-01-01 20:09:06 -07:00
dfsek 8eb5a70d4d fallback to base loader if shortcut doesnt exist 2025-12-30 12:01:40 -07:00
dfsek 5dc9f419ac only apply shortcut if loaded config is a string 2025-12-30 11:58:48 -07:00
dfsek 2215ea8336 tinker with cloud 2025-12-30 01:43:13 -07:00
dfsek 998b6478f3 add more api helpers 2025-12-30 01:27:41 -07:00
dfsek efa4bf5bb4 Generify shortcut configs to work on any type 2025-12-30 00:23:44 -07:00
dfsek 2ad05cbbb6 back ShortcutHolder with generic TypeLoader 2025-12-29 23:21:31 -07:00
dfsek 1bbedf51b5 fix refactor in mixin 2025-12-29 22:48:10 -07:00
dfsek bdcd93f164 refactor some stuff to use new errors 2025-12-29 22:47:59 -07:00
dfsek c4a366112e refactor createBlockState to use new error API 2025-12-29 22:33:07 -07:00
dfsek cb08401536 start working on error handling stuff 2025-12-29 22:18:44 -07:00
dfsek 9a16336f53 convert a bunch of stuff to new APIs 2025-12-29 21:11:11 -07:00
dfsek 16705057e0 update most things to use new maybe and either 2025-12-29 18:59:57 -07:00
dfsek d52cd0d7cf finish maybe 2025-12-29 18:23:42 -07:00
dfsek 7d3382e623 more either stuff 2025-12-29 18:18:14 -07:00
dfsek 87e437f889 finish either 2025-12-29 18:06:16 -07:00
dfsek 292be6bcec add bifunctor 2025-12-29 17:08:40 -07:00
dfsek f03f39f1d7 implement Monad (Maybe a) 2025-12-29 17:05:18 -07:00
dfsek 8bfff6b010 redo maybe 2025-12-29 16:58:37 -07:00
dfsek e5d30183ef fix functional utils 2025-12-29 16:57:29 -07:00
dfsek 3777fda641 Add 2-argument higher-order type and move kinds to their own package
I don't think that we will have higher-order types with more than 2 parameters, so I only made K and K2
2025-12-29 16:07:36 -07:00
dfsek f684c60039 experimenting with kinds and higher order types, not done yet 2025-12-29 16:02:18 -07:00
dfsek ef088dd3f7 add basic functional types again 2025-12-28 23:59:46 -07:00
dfsek 4f672dfb7b make either not bad 2025-12-28 22:27:08 -07:00
dfsek b851b2f881 start addon impl 2025-12-28 22:03:03 -07:00
dfsek 9c64353111 rename MaterialSetLoader 2025-12-28 20:54:16 -07:00
dfsek c537605880 rename MaterialSet 2025-12-28 20:53:51 -07:00
Zoe Gidiere c6eb2f49f3 Revert "Merge pull request #538 from ryzech/fix/caffeine-relocate"
This reverts commit 6929de7b61, reversing
changes made to a159debe3e.
2025-12-17 01:20:33 -07:00
Zoë Gidiere 6929de7b61 Merge pull request #538 from ryzech/fix/caffeine-relocate
Relocate caffeine to fix conflicts with other mods/plugins
2025-12-14 16:11:16 +00:00
Zoe Gidiere a159debe3e update publishing config 2025-12-13 17:55:17 -07:00
Zoe Gidiere 99e2907b2d add java doc build 2025-12-13 17:45:47 -07:00
Zoe Gidiere ac71b3ec0c Fix java doc dir 2025-12-13 17:41:21 -07:00
Zoe Gidiere e184937743 WIP Jenkinsfile 2025-12-13 17:34:13 -07:00
Zoe Gidiere 8c155c78eb step arg as min res 2025-12-13 11:35:39 -07:00
Zoe Gidiere fc779e1120 Auto-mode 2025-12-13 11:32:29 -07:00
Zoe Gidiere be964da4fa paper async 2025-12-13 10:48:18 -07:00
Zoe Gidiere 6ca401413b Terra Search Command 2025-12-13 10:34:01 -07:00
Zoe Gidiere e556e2bca1 Update Seismic 2025-12-13 10:33:18 -07:00
Zoe Gidiere 1fc97a480a Small biomechunk allocation opt 2025-12-11 14:44:32 -07:00
Zoe Gidiere bba55f2669 Align TriStateIntCache 2025-12-11 01:56:20 -07:00
Zoe Gidiere 97b4ea6d94 Improve PaddedGridDistributor Performance 2025-12-10 23:17:06 -07:00
Zoe Gidiere cf4f7822e2 Download JavaDocs and Sources in Idea 2025-12-10 23:16:39 -07:00
Zoe Gidiere d6285a5901 Improve TriStateintCache with Unsafe 2025-12-10 22:33:49 -07:00
Zoe Gidiere 8b933b0d5c Merge remote-tracking branch 'origin/master' 2025-12-10 19:28:43 -07:00
Zoe Gidiere f9a5dfbfce Update seismic 2025-12-10 19:28:39 -07:00
Zoë Gidiere 24bca3ed98 Merge pull request #542 from everbuild-org/fix/minestom-nbt-additions
Minestom Nbt Support
2025-12-10 18:57:19 -07:00
Zoe Gidiere f8f6b0b4bc Reformat 2025-12-10 18:52:00 -07:00
Zoe Gidiere dd2f0365b0 More Extrusion Opts 2025-12-10 18:49:03 -07:00
Christian Bergschneider ae2d801be0 perf: reduce object churn by swapping to long keys in GeneratedChunkCache 2025-12-11 02:33:40 +01:00
Christian Bergschneider 8578bba7b9 perf: reduce object churn by using minestom block states 2025-12-11 02:00:13 +01:00
Christian Bergschneider d262831107 feat: add basic minestom NBT additions and improve block state parser performance 2025-12-11 01:30:40 +01:00
Zoe Gidiere ddc8cc7db5 Reformat 2025-12-10 02:55:26 -07:00
Zoe Gidiere 12f1b3f8fc Use ASM to to compile extrusion pipelines 2025-12-10 02:54:44 -07:00
Zoe Gidiere dc7c57d1a3 Update seismic 2 2025-12-10 02:18:10 -07:00
Zoe Gidiere 309fb5af96 Update Seismic 2025-12-08 13:29:10 -07:00
RyzechDev 9d747aed71 Relocate caffeine to fix conflicts with other mods/plugins 2025-11-19 10:14:22 -06:00
Zoë Gidiere 3cf11a9ad4 Merge pull request #534 from AllayMC/feat/meta-pack
feat: add support for meta pack in allay platform
2025-10-14 13:34:24 -06:00
Zoë Gidiere 9f766b0647 Merge pull request #535 from PolyhedralDev/dev/1.21.10
Cleaned up Bukkit NMS bindings and marked 1.21.10 as supported
2025-10-14 13:33:51 -06:00
daoge_cmd 8fa3978dc8 feat: update resource files 2025-10-14 22:10:35 +08:00
OakLoaf c282e55f90 Adjusted paper dependency 2025-10-13 12:16:43 +01:00
OakLoaf 8b62badbdb Moved nms packages directly into the nms gradle module 2025-10-13 10:49:06 +01:00
OakLoaf 8bceb255c0 Corrected version formatting in supported versions list 2025-10-13 10:40:40 +01:00
OakLoaf ad80769d67 Removed version specific bindings 2025-10-12 22:48:41 +01:00
daoge_cmd 9d0fa0a7c4 Merge branch 'master' into feat/meta-pack 2025-10-10 10:04:15 +08:00
daoge_cmd 8c532ede8e fix: ignore the block when out of bounds 2025-10-10 10:03:01 +08:00
Zoë Gidiere c3d26527a7 parallel pack loading 2025-10-09 17:55:29 -06:00
Zoë Gidiere 1fe56335c8 Remove bufferedimage 2025-10-09 17:38:08 -06:00
Zoë Gidiere 3b377d91ee fix concurrency issues in openregistryimpl 2025-10-09 17:34:06 -06:00
daoge_cmd 0144200ec9 doc: update comment 2025-10-10 00:46:55 +08:00
daoge_cmd d1ad3d04e1 feat: add support for meta pack 2025-10-10 00:30:38 +08:00
Zoë Gidiere d640b49ded Merge pull request #533 from everbuild-org/fix/minestom-platform-fixes
Minestom 1.21.8/9/10 & Metapack support
2025-10-07 23:49:46 -06:00
Zoë Gidiere ecbfd1740c Fabric 1.21.10 2025-10-07 17:55:37 -06:00
Zoe Gidiere dc5952add7 WIP 1.21.10 2025-10-07 17:15:07 -06:00
Christian Bergschneider 1b6ebeb05f fix: improve particle handling and block state retrieval 2025-10-07 23:32:30 +02:00
Christian Bergschneider 234ff3e49c feat: actually do biome preloading 2025-10-07 23:23:54 +02:00
Christian Bergschneider 243c523b57 feat: pre-add biomes to registry to prevent future modifications 2025-10-07 23:06:58 +02:00
Christian Bergschneider 1700650753 feat: add methods to pack by meta and default meta in TerraMinestomWorldBuilder 2025-10-07 22:54:15 +02:00
Christian Bergschneider 12d2221d49 fix: ignore and warn on snbt on particles 2025-10-07 21:38:49 +02:00
Christian Bergschneider 42e1adfc3a chore: update minestom dependency 2025-10-07 21:38:26 +02:00
Zoë Gidiere 4ff91c9fea Revert "Update gradle"
This reverts commit 81bc51f5a1.
2025-10-07 12:53:36 -06:00
Zoe Gidiere 81bc51f5a1 Update gradle 2025-10-07 11:54:36 -06:00
Zoë Gidiere ac98726f81 Cleanup Fabric BlockState and EntityType Extended implementation 2025-10-06 18:12:42 -06:00
Zoë Gidiere 1d2c6d4294 Synchronize pack loading 2025-10-05 23:58:53 -06:00
Zoë Gidiere 9ca7014344 Entity SNBT Support and Cleanup 2025-10-05 23:50:29 -06:00
Zoë Gidiere 8d153998fa Reformat Code 2025-10-05 21:55:16 -06:00
Zoë Gidiere 2b09ed8fd9 Simplify mixin implementations
Refactors mixin implementations to remove unnecessary casting.

This change improves code readability and reduces redundancy by directly accessing methods and fields within the mixin context, rather than relying on casting to the target class.
2025-10-05 21:51:40 -06:00
Zoë Gidiere 96493ede15 Merge remote-tracking branch 'origin/master' 2025-10-05 20:24:25 -06:00
Zoë Gidiere 48586eb523 Fix SNBT writing 2025-10-05 20:23:54 -06:00
Zoë Gidiere a80b94ad45 Unwrap BlockState in Chunk Gen 2025-10-05 17:03:51 -06:00
Zoë Gidiere 089850d633 Support for SNBT in structures 2025-10-05 17:03:45 -06:00
Zoë Gidiere 42f3c56b71 Extended BlockState API 2025-10-05 16:47:12 -06:00
Zoë Gidiere 874ef56025 Update seismic 2025-10-05 16:44:49 -06:00
Zoë Gidiere 06f04005ea Merge pull request #526 from AllayMC/feat/allay-update
feat: update allay-api and resource files
2025-10-04 13:55:02 -06:00
daoge_cmd 774d076f77 build: enable build for allay platform 2025-10-04 17:21:22 +08:00
daoge_cmd e4561bd48f Merge branch 'master' into feat/allay-update
# Conflicts:
#	platforms/allay/src/main/java/com/dfsek/terra/allay/Mapping.java
#	platforms/allay/src/main/java/com/dfsek/terra/allay/handle/AllayItemHandle.java
2025-10-04 17:19:01 +08:00
daoge_cmd 550a037661 chore: remove unused okaeri maven repo 2025-10-04 17:14:49 +08:00
daoge_cmd 3b25e82a73 feat: use allay-api 0.12.0 2025-10-04 17:14:06 +08:00
Zoë Gidiere 9b3a105672 Fix game metapack loading 2025-10-03 19:07:00 -06:00
Zoë Gidiere 10558b5446 fix typo 2025-10-03 18:24:00 -06:00
Zoë Gidiere 326300bcce update resource logic for metapacks 2025-10-03 18:10:45 -06:00
Zoë Gidiere a7826dec49 add metapacks to default commented ingore list 2025-10-03 17:29:30 -06:00
Zoë Gidiere fd3d1ce830 Change ConstantRage check to only check if greater than 2025-10-03 17:11:12 -06:00
Zoë Gidiere 84a6cd0c26 fix bukkit spawning consistency 2025-10-03 15:49:55 -06:00
Zoë Gidiere d1faac8b96 Pull in remaining packs 2025-10-03 15:27:48 -06:00
Zoë Gidiere de4656d01f new pack name 2025-10-03 14:39:27 -06:00
Zoë Gidiere 6dba2e9394 Use latest OW 2025-10-03 13:59:54 -06:00
Zoë Gidiere 8a8db4a9b8 Merge pull request #445 from PolyhedralDev/dev/7.0-2
Dev/7.0
2025-10-03 01:01:49 -06:00
Zoë Gidiere c1a00ca5c7 reformat 2025-10-03 00:59:43 -06:00
Zoë Gidiere 2b5d613aef fix up 2025-10-03 00:54:53 -06:00
Zoë Gidiere 8bea1d23e0 Merge branch 'master' into dev/7.0-2 2025-10-03 00:51:05 -06:00
Zoë Gidiere fb5e597a11 Merge pull request #532 from PolyhedralDev/dev/1.21.9
Updated to 1.21.9
2025-10-03 00:49:23 -06:00
Zoë Gidiere 0990df0620 Merge branch 'master' into dev/1.21.9 2025-10-03 00:48:43 -06:00
Zoë Gidiere 451683aff5 spooky month (bump version to 6.6.6) 2025-10-03 00:35:24 -06:00
OakLoaf 41e9c2f55f Disabled AllayMC platform 2025-10-02 17:45:21 -06:00
Zoë Gidiere 4873b321cb update fabric build version 2025-10-02 17:33:31 -06:00
OakLoaf 64546bb154 Migrated to modern PaperCommandManager 2025-09-30 19:36:50 +01:00
OakLoaf d97478d2c4 Added separate version definition for runPaper task 2025-09-30 19:36:24 +01:00
OakLoaf 359b4826bc Corrected version in fabric.mod.json 2025-09-30 19:31:34 +01:00
OakLoaf 4b218a65f6 Refactored bukkit nms package 2025-09-30 19:00:36 +01:00
OakLoaf b88712e569 Fixed compilation errors 2025-09-30 18:51:25 +01:00
OakLoaf af509ebc3b Disabled AllayMC platform 2025-09-30 18:43:11 +01:00
OakLoaf a5c3733568 Updated dependencies for 1.21.9 2025-09-30 18:42:58 +01:00
daoge_cmd 3ef60f4b33 feat: adapt allay api 0.12.0-SHAPSHOT (waiting for 0.12.0 release) 2025-09-30 23:12:12 +08:00
daoge_cmd b7864bb6fb feat: use https://github.com/misode/mcmeta to replace the old je_block_default_states.json file (it's renamed to je_blocks.json now). 2025-08-21 11:51:17 +08:00
daoge_cmd 757ed6ad4d feat: update allay-api and mapping files 2025-08-21 00:11:36 +08:00
Zoë Gidiere 1ef12fdec0 Merge pull request #525 from PolyhedralDev/dev/wolves
More wolf fixes
2025-08-13 14:36:50 -06:00
OakLoaf 4e890f96e4 Corrected wolf variant spawn reasons list 2025-08-13 20:22:25 +01:00
OakLoaf 4e70ee99c9 Adjusted log scope 2025-08-13 20:22:03 +01:00
Zoë Gidiere b149497c60 Merge pull request #521 from PolyhedralDev/deps/cloud
Updated cloud-paper to resolve warning message
2025-08-11 21:34:11 -06:00
Zoë Gidiere d9f591bdb4 Merge pull request #524 from PolyhedralDev/dev/wolves
Made wolves generated with chunks correctly inherit variants
2025-08-11 21:34:01 -06:00
Zoë Gidiere a4b74e2e7f Merge pull request #522 from PolyhedralDev/dev/1.21.8
Added 1.21.8 support
2025-08-11 21:33:51 -06:00
OakLoaf b53d475f42 Made wolves generated with chunks correctly inherit variants 2025-08-01 16:53:32 +01:00
OakLoaf 4ddb741d0d Refactored packages for 1.21.8 2025-07-19 18:23:32 +01:00
OakLoaf 852f5aa610 Bumped dependencies 2025-07-18 16:02:54 +01:00
OakLoaf 953895a8d4 Bumped dependencies 2025-07-18 16:00:58 +01:00
OakLoaf 8788eab839 Added 1.21.8 bukkit support 2025-07-17 15:13:01 +01:00
Oak 2b62473372 Update Versions.kt 2025-07-17 14:13:40 +01:00
Zoë Gidiere b9187248c3 Merge remote-tracking branch 'origin/master' into dev/7.0-2 2025-07-13 17:03:38 -06:00
Zoë Gidiere 2d42810ba3 Merge pull request #513 from everbuild-org/fix/minestom-fine-grained-biome
minestom: remove fine-grained biome control from minestom
2025-07-13 16:44:25 -06:00
Zoë Gidiere 9f546370cd Merge pull request #519 from PolyhedralDev/feat/nmsplatform
Fixed NMSPlatform implementation
2025-07-13 16:44:10 -06:00
Zoë Gidiere 428bf341ef Better handling of internal addon 2025-07-13 15:47:48 -06:00
OakLoaf 8a61571ceb Fixed biome registering 2025-07-13 14:48:56 +01:00
OakLoaf b669f87b79 Merge branch 'refs/heads/master' into feat/nmsplatform 2025-07-13 14:22:00 +01:00
OakLoaf e507675ef6 Removed unused import 2025-07-13 14:21:45 +01:00
Zoë Gidiere 0fc2105ee6 update seismic version 2025-07-11 02:10:02 -06:00
Zoë Gidiere 77b077dd47 update seismic to snaphsot 2025-07-10 23:45:05 -06:00
Zoë Gidiere f38fcd03b0 Reformat 2025-07-10 21:53:17 -06:00
Zoë Gidiere af1e9de474 Merge branch 'master' into dev/7.0-2 2025-07-10 19:51:17 -06:00
Zoë Gidiere 3322a16f09 Fix particle releated crash on bukkit 2025-07-10 19:50:54 -06:00
Zoë Gidiere 78707468c5 Merge branch 'master' into dev/7.0-2 2025-07-10 19:44:30 -06:00
Zoë Gidiere c658d1a81b Merge remote-tracking branch 'origin/master' 2025-07-10 19:42:38 -06:00
Zoë Gidiere 56a7234494 Merge pull request #518 from PolyhedralDev/feat/nmsplatform
Implemented vanilla biome config options
2025-07-10 19:40:22 -06:00
Zoë Gidiere 217b708177 Update NMSPlatform.java 2025-07-10 19:40:05 -06:00
OakLoaf 7d86a41f65 Updates to particles 2025-07-10 11:29:31 +01:00
OakLoaf 753574fc9b Implemented vanilla biome config options 2025-07-10 11:14:22 +01:00
Zoë Gidiere 95f89ed2b6 reformat tesf test 2025-07-09 21:59:13 -06:00
Zoë Gidiere cb8aefe8d2 updates to particles 2025-07-09 19:31:48 -06:00
Zoë Gidiere cd8d6f0da3 fix build 2025-07-09 18:02:59 -06:00
Zoë Gidiere d33b75b77b Merge branch 'master' into dev/7.0-2 2025-07-09 16:48:22 -06:00
Zoë Gidiere 79f9488380 Merge pull request #515 from PolyhedralDev/dev/1.21.7
Bumped Cloud for Paper and Fabric version
2025-07-09 16:42:23 -06:00
Zoë Gidiere 4c2ce65cdc Some fixes to biome config 2025-07-09 16:41:53 -06:00
Zoë Gidiere 70c448dd0d Fix particles 2025-07-09 15:06:40 -06:00
Zoë Gidiere 3ad0ef8501 Update Seismic + paralihtic 2025-07-09 14:06:01 -06:00
OakLoaf 060bda2ec1 Bumped cloud-fabric version 2025-07-03 18:21:41 +01:00
Zoë Gidiere 6b60246694 Merge pull request #514 from PolyhedralDev/dev/1.21.7
Update to 1.21.7
2025-06-30 11:13:24 -06:00
OakLoaf 1a1f461550 Corrected version in fabric.mod.json 2025-06-30 17:57:19 +01:00
OakLoaf da20e282ce Updated Fabric to 1.21.7 2025-06-30 17:53:50 +01:00
OakLoaf 9b14b0ee96 Updated Bukkit to 1.21.7 2025-06-30 16:47:29 +01:00
Christian Bergschneider 89cbab071f refactor: remove fine-grained biome controls and adjust biome handling
Removed the deprecated `doFineGrainedBiomes` option from `TerraMinestomWorldBuilder` and associated classes. Updated biome management to use `IdentityHashMap` and added additional tracking for created biomes. Upgraded Minestom version to `1_21_6-a40d7115d4`.
2025-06-30 00:33:42 +02:00
Zoë Gidiere 71953c90a2 optimize imports 2025-06-28 19:05:20 -06:00
Zoë Gidiere 923cb08b37 fix build 2025-06-28 15:52:19 -06:00
Zoë Gidiere 21ef8c0dc4 Update Seismic 2025-06-28 15:47:08 -06:00
Zoë Gidiere 77b1960757 Use seismic func for perf 2 2025-06-28 15:47:02 -06:00
Zoë Gidiere a06c6fd980 Use Seismic function for perf 2025-06-28 15:46:28 -06:00
Zoë Gidiere 46f533ca9d Perf opts 2025-06-25 00:38:24 -06:00
Zoë Gidiere 9a61334f5a Merge branch 'master' into dev/7.0-2 2025-06-24 18:06:02 -06:00
Zoë Gidiere 118aeb872f Merge pull request #511 from PolyhedralDev/dev/wolves
Fixed wolf variant support for Paper platform
2025-06-23 13:17:18 -06:00
OakLoaf 5446b729f9 Finalised wolves 2025-06-19 21:44:24 +01:00
Oak d71c6bb25f Corrected checks 2025-06-19 21:22:06 +01:00
Oak d8524603c6 Implemented wolf variant support 2025-06-19 21:12:24 +01:00
OakLoaf 85234ddc39 Progress on wolves 2025-06-19 20:50:31 +01:00
OakLoaf 78162eaafe Added vanilla biome key to biome context 2025-06-19 20:49:57 +01:00
OakLoaf 7a041d8a63 Removed unused import 2025-06-19 20:49:37 +01:00
Zoë Gidiere 8cfa2e1467 bump version 2025-06-19 12:23:59 -06:00
Zoë Gidiere 5f367c0f2c Merge pull request #510 from PolyhedralDev/dev/multiverse-fix
Fixed issues causing plugin to fail to load if Multiverse is not present
2025-06-19 12:00:07 -06:00
OakLoaf f4db7fc507 Added initial wolf variant support (not functional) 2025-06-19 15:46:46 +01:00
OakLoaf ad9d16f48c Updated biome collection 2025-06-19 15:46:18 +01:00
OakLoaf 85b6dcc891 Moved all code that requires Multiverse imports into MultiverseGeneratorPluginHook 2025-06-19 14:24:04 +01:00
Zoë Gidiere 29691dfb4d Merge pull request #509 from everbuild-org/master
feat: backport latest minestom support from 7.0 branch
2025-06-18 17:49:21 -06:00
Christian Bergschneider 81eab13ce1 feat: backport latest minestom support from 7.0 branch 2025-06-19 01:42:31 +02:00
Zoë Gidiere a79a347765 temp fix tesf test file 2025-06-18 13:10:38 -06:00
Zoë Gidiere 46e603d681 Reformat 2025-06-18 11:43:35 -06:00
Zoë Gidiere 3f77b4a975 Minor cleanup 2025-06-18 11:37:50 -06:00
Zoë Gidiere 16755fa049 Merge branch 'master' into dev/7.0-2 2025-06-18 11:20:58 -06:00
Zoë Gidiere 68d5b22ca4 bump fabric dep version 2025-06-17 19:08:14 -06:00
Zoë Gidiere 40b8c85c75 Cleanup 2025-06-17 18:50:24 -06:00
Zoë Gidiere 63367e5f03 Final changes 2025-06-17 18:41:09 -06:00
Zoë Gidiere 1d95e7a87d Merge pull request #506 from benwoo1110/feat/multiverse-hook
Implement multiverse generator plugin hook
2025-06-17 16:23:19 -06:00
Zoë Gidiere a25e3cd5a5 Merge branch 'master' into dev/7.0-2 2025-06-17 16:16:41 -06:00
Zoë Gidiere b2e21d8b70 Merge pull request #508 from PolyhedralDev/dev/1.21.6
Dev/1.21.6
2025-06-17 15:34:38 -06:00
Zoë Gidiere 4041239b03 fix build 2025-06-17 15:28:47 -06:00
Zoë Gidiere 280699bbce Update to 1.21.6 and fix a lot of bugs in fabric impl 2025-06-17 15:21:21 -06:00
Zoë Gidiere c4dfdafce8 Merge pull request #507 from everbuild-org/dev/7.0-2
Update Minestom to latest version
2025-06-16 20:02:42 -06:00
Christian Bergschneider 3fe79338db refactor: replace DynamicRegistry.Key with RegistryKey across Minestom components
Updated all references from `DynamicRegistry.Key` to `RegistryKey` to align with the updated Minestom API. Adjusted relevant classes, methods, and object interactions to ensure compatibility and maintain consistency. Updated `Versions.kt` to the latest Minestom version.
2025-06-17 00:10:08 +02:00
Zoë Gidiere 6984dc29d0 Fix fabric 2025-06-14 00:45:32 -06:00
Zoë Gidiere bd253ea5d2 Merge branch 'master' into dev/1.21.6 2025-06-13 22:08:53 -06:00
OakLoaf d743d7d1df Updated fabric to rc1 2025-06-13 22:50:55 +01:00
OakLoaf 238a7954a7 Added paperweight to bukkit platform for runDevBundleServer task 2025-06-13 21:56:54 +01:00
OakLoaf c2319ca4ab Updated to 1.21.6-rc.1 2025-06-13 20:17:56 +01:00
Ben Woo 95172bfa7e Fix checkstyle for catch 2025-06-13 22:33:41 +08:00
Ben Woo 124dbc8836 Improve error checking for multiverse hook 2025-06-13 19:13:57 +08:00
Zoë Gidiere 8706340584 Fix wolves 2025-06-12 16:25:14 -06:00
OakLoaf 9a9f90aa0d Updated fabric platform to 1.21.6 2025-06-10 12:01:17 +01:00
OakLoaf 20a5bfdd0f Updated bukkit platform to 1.21.6 2025-06-10 11:44:10 +01:00
Ben Woo 4fee8cdb24 More example usages by iterating config pack 2025-06-10 12:06:24 +08:00
Ben Woo 70de38ffcb Fix exception variable name 2025-06-10 12:05:59 +08:00
Ben Woo 6722d22f72 Fix onarandombox repo url 2025-06-10 12:05:46 +08:00
Ben Woo c5526c86a2 Implement multiverse plugin hook 2025-06-09 22:58:41 +08:00
Zoë Gidiere 84fa72f96c Catch all runtime errors when loading packs 2025-06-07 22:14:36 -06:00
Zoë Gidiere cc5258ce73 bump version 2025-06-07 21:12:26 -06:00
Christian Bergschneider 7f324bd72b fix: remove unused player configuration phase in biome preload
The loop triggering the player configuration phase was removed as it is unnecessary and unrelated to biome preloading. This streamlines the function and avoids redundant operations during biome initialization.
2025-06-07 16:28:50 +02:00
Zoë Gidiere 748e027282 Merge pull request #505 from HaHaWTH/master
Identify Moonrise worker threads correctly
2025-06-07 07:18:45 +00:00
HaHaWTH bf6612edd0 Identify Moonrise worker threads correctly 2025-06-07 00:17:51 +14:00
Zoë Gidiere 4eace9e7fb Merge remote-tracking branch 'origin/master' into dev/7.0-2 2025-06-05 21:03:58 -06:00
Zoë Gidiere d90a4200fe Update gradle-build.yml 2025-06-05 19:19:43 -06:00
Zoë Gidiere 39ae1fdf93 Merge branch 'master' into dev/7.0-2 2025-06-05 17:51:01 -06:00
Zoë Gidiere af9fb211a8 bump fabric minecraft dep 2025-06-05 17:50:44 -06:00
Zoë Gidiere e9d1add6af Merge branch 'master' into dev/7.0-2 2025-06-05 17:21:00 -06:00
Zoë Gidiere e4395cec83 bump version 2025-06-05 17:18:55 -06:00
Christian Bergschneider 94d135c66c Refactor MinestomBiomeLoader to use DynamicRegistry directly
Simplified biome loading by removing dependency on MinecraftServer and using DynamicRegistry.Key directly. This improves code maintainability and aligns with updated API usage.
2025-06-05 17:04:37 -06:00
Zoë Gidiere 1881051191 Merge pull request #504 from everbuild-org/dev/7.0-2
Apply biomes to minestom instances
2025-06-05 08:16:00 +00:00
Christian Bergschneider 28132e0f13 resolve merge conflicts 2025-06-05 10:08:58 +02:00
Christian Bergschneider 1ef34469cb Merge remote-tracking branch 'ckyuri/dev/7.0-2' into dev/7.0-2 2025-06-05 10:03:50 +02:00
kyuri e79ea4ab82 Minestom Latest - Update (#499)
* Bukkit Build Fix

* remove comments

* remove papermc repo from gradle settings

* add back gradle shasum

* fix formatting, update gradle hash

* Minestom Updated to latest version as of now 4/12/2025

Updated method names to new documentation and changed minestom versioning.

- Paper Build version was changed as I had issues building at all with the snapshot version. So it was changed to a generic version but everything still builds fine.

* Bug Fix - Entity Type was parsing a value that was incorrect and causing issues to load the world.

EntityType.fromId(Integer.parseInt(id));
to
delegate = EntityType.fromKey(id);

* Reverted changes to comply with build version requirements and avoiding pulling functionality out of a common existing function

---------

Co-authored-by: Peter Pan <peter@never.lan>
Co-authored-by: Zoë Gidiere <duplexsys@protonmail.com>
2025-06-04 23:38:42 -06:00
Zoë Gidiere 4450a56ef0 Merge branch 'dev/7.0-2' into dev/7.0-2 2025-06-05 05:38:32 +00:00
Christian Bergschneider a061660e46 chore: Update Minestom version to 1_21_5-4d91778331
This commit updates the Minestom dependency to the latest tagged version. Ensures compatibility with new features and fixes in the updated Minestom release.
2025-06-04 21:52:46 +02:00
Christian Bergschneider abdff16a0a Merge remote-tracking branch 'origin/dev/7.0-2' into dev/7.0-2
# Conflicts:
#	buildSrc/src/main/kotlin/Versions.kt
2025-06-04 21:43:33 +02:00
Christian Bergschneider c08e973e3e feat: provide default MinestomBlockEntity implementation
Introduce the `MinestomBlockEntity` class to represent block entities and hook into the block system. Update `DefaultBlockEntityFactory` to create `MinestomBlockEntity` instances and adjust `TerraMinestomWorldBuilder` initialization for factory injection. These changes improve extensibility and block entity management.
2025-06-04 21:34:04 +02:00
Christian Bergschneider b12fe77f32 feat: add fine-grained biome control to Minestom world builder
Introduced a `doFineGrainedBiomes` flag to allow fine-grained biome control per chunk. This helps mitigate client disconnection issues caused by a Minestom biome encoding bug, with a plan to deprecate once the bug is resolved. Adjusted relevant classes and the example implementation to support this feature.
2025-06-04 21:25:35 +02:00
Zoë Gidiere bab8923f1e update overworld version 2025-06-04 00:21:14 -06:00
Zoë Gidiere 28d93d158e fix up 2025-06-03 22:52:26 -06:00
Zoë Gidiere 118dc32d64 Merge branch 'master' into dev/7.0-2 2025-06-03 22:38:32 -06:00
Zoë Gidiere b4068e6c59 Merge branch 'dev/1.21.5' 2025-06-03 22:28:48 -06:00
Zoë Gidiere b143c72d0e Dev/1.21.5 (#495)
* Bukkit Build Fix (#494)

* Bukkit Build Fix

* remove comments

* remove papermc repo from gradle settings

* add back gradle shasum

* fix formatting, update gradle hash

* Initial Fabric 1.21.5

* Updated dependencies

* Updated SpawnerData with backwards compat

* Updated dependencies

* Updated setBlockState usage - needs verifying as flags are confusing

* Refactored Bukkit NMS packages

* Initial attempt at updating mixin-commons

* Continue fabric 1.21.5 WIP

* Some additional logging

* Update deps

* Build fixes and update allay

* Add oak to authors

---------

Co-authored-by: Mikal <Ifiht@users.noreply.github.com>
Co-authored-by: OakLoaf <oak@beaconstudios.org>
2025-06-03 22:20:23 -06:00
Zoë Gidiere 5f5e70970b Add oak to authors 2025-06-03 21:40:14 -06:00
Zoë Gidiere ec812ef5fb Build fixes and update allay 2025-06-03 21:33:56 -06:00
Zoë Gidiere 85826071cb Update deps 2025-06-03 20:25:55 -06:00
Christian Bergschneider d9a4d64b17 Merge remote-tracking branch 'origin/dev/7.0-2' into dev/7.0-2 2025-06-04 00:05:56 +02:00
Christian Bergschneider 56a1feb708 refactor: move biomes to use user-defined naming conventions.
Replaced "Custom" with "UserDefined" in biome classes, factories, and references for consistency and clarity. Updated relevant imports, method signatures, and internal logic to align with the new terminology. This change improves readability and better represents the purpose of these biome-related components.
2025-06-04 00:05:15 +02:00
Zoë Gidiere c4f093210a Some additional logging 2025-06-03 15:15:07 -06:00
Christian Bergschneider 858adfe866 feat: initial custom biome implementation 2025-06-03 22:41:31 +02:00
Zoë Gidiere f14d22b264 Continue fabric 1.21.5 WIP 2025-06-03 13:59:11 -06:00
Zoë Gidiere bdd80d7832 Merge branch 'dev/seismic' into dev/7.0-2 2025-06-03 04:37:11 -06:00
Zoë Gidiere adfdb8d63c update versions 2025-06-03 04:37:03 -06:00
Zoë Gidiere ef10081bcd Merge branch 'dev/7.0-2' into dev/seismic 2025-06-02 17:34:30 -06:00
Zoë Gidiere dc8492a6cb Merge remote-tracking branch 'origin/dev/6.6.2' into dev/7.0-2 2025-06-02 17:34:18 -06:00
Christian Bergschneider 5e1c9d8ebe fix: generation stages not being able to reference eachother 2025-06-02 00:34:48 +02:00
Christian Bergschneider 5dff25670c refactor: minestom chunk storage to improve memory efficiency
Replaced 3D array with a 1D array for chunk block storage and adjusted related logic to use calculated indices. Updated block type comparison to use state IDs instead of block IDs for consistency and correctness.
2025-05-30 09:13:04 +02:00
Christian Bergschneider 089b25dea4 feat: update Minestom version and replace deprecated ItemComponent API
Updated the Minestom library to version 1_21_5-69b9a5d844 and migrated from the deprecated `ItemComponent` API to `DataComponents`. This ensures compatibility with the latest changes and improves maintainability.
2025-05-27 23:25:34 +02:00
Christian Bergschneider 1dd59c378e refactor(minestom): replace static singleton access to platform with dependency injection for better modularity
Renamed `MinestomPlatform` to `TerraMinestomPlatform` and updated `TerraMinestomWorldBuilder` to utilize the platform instance directly. Simplified world builder initialization and improved code clarity.
2025-05-27 22:58:16 +02:00
Christian Bergschneider d97fb4ff7b chore: update paper version 2025-05-27 22:50:03 +02:00
OakLoaf 016961c19c Initial attempt at updating mixin-commons 2025-04-17 17:41:45 +01:00
OakLoaf 9f3e225b62 Refactored Bukkit NMS packages 2025-04-17 16:32:59 +01:00
ckyuri 761a014ea5 Reverted changes to comply with build version requirements and avoiding pulling functionality out of a common existing function 2025-04-16 15:54:20 +01:00
ckyuri 9749eecd87 Merge remote-tracking branch 'origin/dev/7.0-2' into dev/7.0-2 2025-04-12 14:11:07 +01:00
ckyuri 32cc4976c8 Bug Fix - Entity Type was parsing a value that was incorrect and causing issues to load the world.
EntityType.fromId(Integer.parseInt(id));
to
delegate = EntityType.fromKey(id);
2025-04-12 14:10:54 +01:00
kyuri e2e0e292b7 Merge branch 'dev/7.0-2' into dev/7.0-2 2025-04-12 12:22:00 +01:00
ckyuri 227bfe7b29 Minestom Updated to latest version as of now 4/12/2025
Updated method names to new documentation and changed minestom versioning.

- Paper Build version was changed as I had issues building at all with the snapshot version. So it was changed to a generic version but everything still builds fine.
2025-04-12 11:54:48 +01:00
OakLoaf c95df25d30 Updated setBlockState usage - needs verifying as flags are confusing 2025-03-27 20:22:35 +00:00
OakLoaf 0adca3c227 Updated dependencies 2025-03-27 20:21:13 +00:00
OakLoaf 782b300d1f Updated SpawnerData with backwards compat 2025-03-27 19:22:34 +00:00
OakLoaf 967a4a0b2b Updated dependencies 2025-03-27 19:22:23 +00:00
Zoë Gidiere d3df5e56c3 Initial Fabric 1.21.5 2025-03-25 16:26:43 -06:00
Mikal dabc2359b3 Bukkit Build Fix (#494)
* Bukkit Build Fix

* remove comments

* remove papermc repo from gradle settings

* add back gradle shasum

* fix formatting, update gradle hash
2025-03-25 16:25:51 -06:00
solo 1d658bd52d Remove Allay Mappings Submodules (#493)
* Download allay mappings from github instead of using git submodules

Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>

* Remove allay gitignore

Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>

* Use the same dependency notation as the rest of the project

---------

Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
2025-03-25 15:14:51 -06:00
Mikal 52dc690243 Bukkit Build Fix (#494)
* Bukkit Build Fix

* remove comments

* remove papermc repo from gradle settings

* add back gradle shasum

* fix formatting, update gradle hash
2025-03-22 07:15:43 +00:00
Peter Pan d33d4af296 fix formatting, update gradle hash 2025-03-20 14:51:12 -04:00
Peter Pan fb0dbda296 add back gradle shasum 2025-03-20 11:01:41 -04:00
Peter Pan 4c860ca4ae remove papermc repo from gradle settings 2025-03-20 10:53:49 -04:00
Peter Pan b6e4543625 remove comments 2025-03-20 10:43:29 -04:00
Peter Pan 0921dfb204 Bukkit Build Fix 2025-03-19 15:54:11 -04:00
Zoë Gidiere 4bef2f5a7f Merge pull request #491 from PolyhedralDev/duplexsystem-patch-1
Update Mapping.java
2025-03-06 21:45:41 +00:00
Zoë Gidiere 18cb08b622 Update Mapping.java 2025-03-06 21:45:23 +00:00
Zoë Gidiere 1b15694878 Merge pull request #490 from AllayMC/dev/allay-api-0.2.0
feat: adapt allay-api 0.2.0
2025-03-06 21:32:44 +00:00
Dmitry Luk 267994427e fix: .gitignore 2025-03-07 01:05:15 +04:00
Dmitry Luk 248eb174d8 refactor: use submodules 2025-03-07 01:02:32 +04:00
Dmitry Luk 0a93b0fac3 fix: apply project code style 2025-03-07 00:39:22 +04:00
Dmitry Luk 03124cb008 refactor: mappings loading
docs: add how to use in README.md
2025-03-06 15:22:04 +04:00
Dmitry Luk 14a07602ee fix: correct bundle mapping [
6808d0e](https://github.com/GeyserMC/mappings/commit/6808d0e16a85e5e569d9d7f89ace59c73196c1f4)
chores: sort je default states and add new
2025-03-03 16:23:54 +04:00
daoge_cmd 167a712c0e feat: adapt allay-api 0.2.0 2025-03-03 19:52:25 +08:00
Zoë Gidiere 83bc2c9022 Bump Version 2025-03-02 06:42:12 -07:00
Zoë Gidiere 06a60b3db4 Merge pull request #489 from RitaSister/patch-1
fix crash chunk generate column in generate chunk process
2025-03-02 06:41:41 -07:00
Mirai 1b4824c5db fix crash chunk generate column in generate chunk process
The change removes the subtraction of one from properties.getMinHeight(), fixing a crash on version 1.21.4.
2025-03-02 09:57:48 +02:00
Zoë Gidiere 5892464a1d WIP Seismic Integration 2025-03-01 21:32:39 -07:00
Zoë Gidiere 8366a5288b fix minestom build 2025-03-01 15:45:30 -07:00
Zoë Gidiere d2b7384639 Merge branch 'master' into dev/7.0-2 2025-03-01 14:36:04 -07:00
Zoë Gidiere 49c6e70037 try catch downloading packs for offline usage 2025-03-01 10:48:58 -07:00
Zoë Gidiere c36b12e657 Fix Vanilla Features Spawning in Terra Biomes 2025-03-01 10:48:42 -07:00
Zoë Gidiere 8ffb09db36 Merge branch 'master' into dev/7.0-2 2025-02-28 11:36:23 -07:00
Zoë Gidiere 9906771fbc Merge pull request #472 from PolyhedralDev/ver/6.6.0
Ver/6.6.0
2025-02-28 04:31:06 +00:00
Zoe Gidiere e0a26046a0 Update Fabric version info 2025-02-27 19:51:18 -07:00
Zoe Gidiere 8bad33ef22 fabric 1.21.4 2025-02-27 19:33:51 -07:00
Zoë Gidiere f278ae7ab5 update licence 2025-02-26 22:34:41 -07:00
Zoë Gidiere a61c6b8a97 Merge remote-tracking branch 'everbuild-org/feat/platform/minestom' into ver/6.6.0 2025-02-26 10:22:37 -07:00
Zoë Gidiere 830ede9272 Merge pull request #484 from AllayMC/dev/allay-update
fix: adapt allay update
2025-02-26 10:20:43 -07:00
Zoë Gidiere 8e544a68d4 Merge pull request #483 from PolyhedralDev/dev/1.21.4
Add support for 1.21.4 on Paper
2025-02-26 10:20:25 -07:00
daoge_cmd e8e9f69fac feat: use allay-api 0.1.3 2025-01-26 19:48:23 +08:00
Christian Bergschneider 3a7d1a69d0 feat: use system property for configurable data folder path
Updated `getDataFolder` to allow customization via the `terra.datafolder` system property. This ensures greater flexibility for specifying the data folder location, while maintaining the default path if the property is not set.
2025-01-25 04:42:52 +01:00
Christian Bergschneider 7b29d25847 fix: remove unused application plugin from Minestom platform build script 2025-01-05 17:04:27 +01:00
Christian Bergschneider 810d10ac0a fix: move minestom example to own module 2025-01-05 16:58:28 +01:00
Christian Bergschneider aecc003f23 fix: minestom and slf4j as transitive dependencies 2025-01-05 16:49:20 +01:00
Christian Bergschneider d0bc006faa chore: reformat 2025-01-04 20:42:54 +01:00
daoge 98aadc816b feat: use allay-api 0.1.2 2025-01-04 17:49:38 +08:00
Christian Bergschneider 992ae592fd fix: Implement GeneratorWrapper interface in Minestom wrapper 2025-01-04 00:14:32 +01:00
Christian Bergschneider 7711e67999 feat: support reload 2025-01-04 00:10:35 +01:00
Christian Bergschneider 35bdc99873 build: make available via maven repo 2025-01-03 23:52:31 +01:00
Christian Bergschneider 5ba5d6efdd revert: block type implementation hint 2025-01-03 22:19:08 +01:00
Christian Bergschneider c848c33bc0 fix: add lighting engine to test server 2025-01-03 17:28:47 +01:00
Christian Bergschneider ff153ddc21 feat: allow external block entity implementations 2025-01-02 23:22:44 +01:00
Christian Bergschneider cb2841ed4f fix: Adjust progress bar update interval to every 60 ticks. 2025-01-02 20:54:56 +01:00
Christian Bergschneider 4f668adb67 feat: add chunk filtering for debugging and remove feature caching
Removed Feature caching since it was buggy asf
2025-01-02 20:49:07 +01:00
Christian Bergschneider 1d8a208d10 feat: implement platform enchantments 2025-01-02 19:32:14 +01:00
Christian Bergschneider 6279638363 feat: implement platform biome 2025-01-02 12:27:40 +01:00
Christian Bergschneider 23b846eca9 feat: get faster generation times 2025-01-02 00:48:26 +01:00
Christian Bergschneider d1f881ca2c feat: minestom entities 2025-01-01 20:39:09 +01:00
Christian Bergschneider b4ab3769b0 Merge branch 'ver/6.6.0' into feat/platform/minestom 2025-01-01 18:48:48 +01:00
Christian Bergschneider d5ab3e23f5 feat: better example server 2025-01-01 18:41:33 +01:00
Christian Bergschneider 3a28551e97 fix: generate populators in every chunk 2024-12-29 18:55:47 +01:00
Christian Bergschneider ac66fc7d69 fix: different populators now know about each other 2024-12-29 15:51:05 +01:00
Christian Bergschneider bfc1c32d46 feat: surface decoration generation but only in even chunks 2024-12-29 15:17:35 +01:00
Christian Bergschneider fa6e0e0ae4 feat: feature generation but only in even chunks 2024-12-28 21:41:51 +01:00
Christian Bergschneider f953c5085d feat: start generating features 2024-12-28 20:05:50 +01:00
Christian Bergschneider 7288373dbc feat: cache generated chunks
This commit is in preparation of multi-layered worldgen with minestom
2024-12-28 18:18:17 +01:00
Christian Bergschneider 983cb1f012 feat: base terrain generation with minestom 2024-12-28 12:22:07 +01:00
daoge_cmd 944c04b9b8 feat: use allay-api 0.1.0 2024-12-23 00:43:51 +08:00
Dmitry Luk 73a2c70794 chores: pretty-print biomes.json 2024-12-17 13:53:18 +04:00
daoge_cmd 088523222d chores: remove unrelated code reformatting 2024-12-17 13:17:11 +08:00
daoge_cmd 6badce6bc7 chores: use pretty print for je_block_default_states.json 2024-12-17 12:48:24 +08:00
daoge_cmd 92a5134458 revert: revert code format related changes 2024-12-17 12:43:46 +08:00
daoge_cmd 4222eef531 deps: use specified allay-api version 2024-12-17 12:31:03 +08:00
Dmitry Luk 9b6a503f31 fix: adapt allay update
* feat: update mapping files to latest
2024-12-16 23:28:19 +04:00
OakLoaf 82a9ecf736 Fixed typo 2024-12-12 15:24:38 +00:00
OakLoaf eec4db43b2 Added support for 1.21.4 2024-12-12 12:40:33 +00:00
OakLoaf 1d3c380784 Reverted to old methods grass and foliage color methods 2024-11-05 16:50:04 +00:00
OakLoaf 65e4c9a149 Removed comment 2024-11-01 19:46:34 +00:00
OakLoaf d4549643fc The definition of AwfulBukkitHacks 2024-11-01 16:46:33 +00:00
OakLoaf a87ad8c966 Bumped Paper version 2024-11-01 16:10:36 +00:00
OakLoaf 153f6e5a87 Recreated old reset tags method 2024-11-01 13:36:41 +00:00
OakLoaf a385a43250 Moved registry unfreeze 2024-11-01 12:02:49 +00:00
OakLoaf 3cd6aead64 Changed biome registry casting 2024-11-01 12:02:32 +00:00
OakLoaf 4f33b11828 Fixed issue with RegistryFetcher 2024-11-01 12:02:09 +00:00
OakLoaf f5bbaa3c3a Corrected class proxy 2024-11-01 11:57:35 +00:00
Zoe Gidiere 4fd84a3f2d Fix paralithic relocating 2024-10-31 13:42:41 -06:00
Zoë Gidiere bed67c211d Merge pull request #478 from PolyhedralDev/dev/let-expression
Add let expression support
2024-10-30 18:51:05 +00:00
Astrash 2c8d3416ab Load parse options before registering metaconfig 2024-10-30 14:04:40 +11:00
Astrash 5e43f0afef Add support for Paralithic let expressions 2024-10-30 14:04:40 +11:00
Zoe Gidiere ecbca608a5 Merge branch 'ver/6.6.0' into dev/7.0-2 2024-10-29 20:24:38 -06:00
Zoe Gidiere 02fdcee705 Fix fabric 2024-10-29 20:24:32 -06:00
Zoe Gidiere b4ab88a02e Fix allay reload 2024-10-29 16:13:29 -06:00
Zoe Gidiere ef1c9c125f Merge branch 'ver/6.6.0' into dev/7.0-2 2024-10-29 16:05:01 -06:00
Zoe Gidiere 4165224c51 Mark Cache Sampler Experimental 2024-10-29 16:04:55 -06:00
Zoe Gidiere e665e187c1 Fix up merge 2024-10-29 16:00:39 -06:00
Zoe Gidiere bd28d8170c Merge branch 'ver/6.6.0' into dev/7.0-2 2024-10-29 15:56:30 -06:00
Zoe Gidiere 710bbc33c9 Refractor bukkit to v1_21_3 2024-10-29 15:53:48 -06:00
Zoë Gidiere 1929239015 Merge pull request #473 from PolyhedralDev/dev/biomes3
Some refractors and updates to platofrm biomes
2024-10-29 20:27:42 +00:00
Zoe Gidiere 3ca90808f0 Fix up 2024-10-29 14:23:45 -06:00
Zoe Gidiere 9d91440997 fixup 2024-10-29 14:14:25 -06:00
Zoe Gidiere f98062d417 Merge remote-tracking branch 'origin/dev/bukkit/biome-settings' into dev/biomes3 2024-10-29 13:53:08 -06:00
OakLoaf 8df3a4dd02 Added NMSAddon override for BukkitAddon 2024-10-29 19:38:59 +00:00
OakLoaf afd2c81b19 Made grass colour use default if none is defined 2024-10-29 18:31:37 +00:00
Zoë Gidiere 4432ae4867 Merge pull request #476 from AllayMC/dev/support-world-unload
feat: support world unloading
2024-10-28 18:18:23 +00:00
daoge_cmd 16c951838b feat: support world unloading 2024-10-28 17:39:25 +08:00
OakLoaf 8de4f1198a Started adding more biome settings to bukkit 2024-10-26 10:02:32 +01:00
Zoe Gidiere d91e531fa5 fix allay 2024-10-25 16:28:00 -06:00
Zoe Gidiere 2a40f4af1e Merge branch 'ver/6.6.0' into dev/7.0-2 2024-10-25 16:14:54 -06:00
Zoe Gidiere 144c932703 mixin tweak 2024-10-25 16:09:42 -06:00
Zoë Gidiere e56b8856fa Merge pull request #474 from AllayMC/allay
feat: add support for allay platform
2024-10-25 16:05:58 -06:00
Zoe Gidiere d088d2f5a8 InlineVar 2024-10-25 15:59:38 -06:00
Zoe Gidiere 3d66386f99 Populate packs in a metapack under extended 2024-10-25 15:58:15 -06:00
Zoe Gidiere 1912d8e34c Fixup 2024-10-25 15:44:51 -06:00
Zoe Gidiere d48b610b39 Merge remote-tracking branch 'origin/ver/6.6.0' into dev/7.0-2 2024-10-25 15:21:47 -06:00
Zoë Gidiere 04f6d18198 Merge pull request #470 from PolyhedralDev/dev/1.21.2
Dev/1.21.2
2024-10-25 14:09:16 -06:00
Zoe Gidiere 640645b96b fix version 2024-10-25 14:03:27 -06:00
Zoe Gidiere a70738eda5 Version updates 2024-10-25 13:58:33 -06:00
OakLoaf 62756d2784 Updated Bukkit to support 1.21.3 2024-10-25 19:36:18 +01:00
Zoe Gidiere 32f8907cb1 Merge branch 'ver/6.6.0' into dev/1.21.2 2024-10-25 12:28:03 -06:00
Astrash b75e9c152e Refactor palette addon 2024-10-18 19:29:48 +11:00
Astrash c190485dbe Use more appropriate names in probability collection loader 2024-10-18 17:50:41 +11:00
Astrash e756953828 Use singleton impl for map based probability collections 2024-10-18 17:49:07 +11:00
daoge 071f9d39af docs: fix a typo in README.md 2024-10-15 10:03:54 +08:00
daoge_cmd d2107fd258 fix: chunkGenerator should be overwritten after reloading 2024-10-14 22:37:09 +08:00
daoge_cmd df3e623530 feat: implement config pack reloading 2024-10-14 22:13:54 +08:00
daoge_cmd f0d03d4538 feat: fallback to FLAT generator if config pack name is missing 2024-10-14 21:34:23 +08:00
daoge_cmd 84fe8792d6 fix: fix entrance in plugin.json 2024-10-14 21:33:59 +08:00
daoge_cmd 67fc2ba4dc docs: remove useless TODOs 2024-10-14 21:21:54 +08:00
daoge_cmd 8d63c40e2f refactor: replace 'var' with explicit type 2024-10-14 21:13:00 +08:00
daoge_cmd b0bc37c34d refactor: remove version info in mapping files 2024-10-14 21:05:06 +08:00
daoge_cmd f2c5c15650 refactor: use com.dfsek as the new package name 2024-10-14 21:02:07 +08:00
daoge_cmd f5de88215c build: use fixed allay api version 2024-10-14 21:00:15 +08:00
daoge_cmd 8a6ad95947 refactor: delombok and move version info to Versions.kt 2024-10-14 20:55:11 +08:00
daoge_cmd cc14c716bf build: move repo declaration to DependencyConfig.kt 2024-10-14 20:36:40 +08:00
daoge_cmd ece5213a87 feat: use macro in plugin.json and update author list 2024-10-14 11:33:40 +08:00
daoge_cmd a01f700653 build: rollback github action file changes 2024-10-14 11:24:54 +08:00
daoge_cmd 0ca7171bae docs: add README.md to allay platform 2024-10-14 11:23:59 +08:00
daoge_cmd 6261f0849c feat: remove java version declaration in allay platform as all platforms are in java 21 now 2024-10-14 11:23:27 +08:00
daoge 4fc24f022f Merge branch 'PolyhedralDev:master' into allay 2024-10-14 11:07:34 +08:00
daoge_cmd 61ed302137 feat: adapting terra 6.5.1 (WIP) 2024-10-14 11:07:12 +08:00
Zoe Gidiere 053ec39b7b Merge branch 'master' into ver/6.6.0 2024-10-13 16:32:26 -06:00
Zoe Gidiere 0a952cff4c bump build number 2024-10-13 16:06:35 -06:00
Zoe Gidiere 12faae8fd5 Use reflection remapper for worldGenContext on bukkit
How this even worked before astounds me
2024-10-13 15:55:29 -06:00
daoge_cmd 1496f2c929 build: update jitpack repo link 2024-10-13 15:41:03 +08:00
Zoe Gidiere 40a938be19 Merge branch 'ver/6.6.0' into dev/biomes3 2024-10-12 15:44:19 -06:00
Zoe Gidiere dc6cfb4187 Merge branch 'ver/6.6.0' into dev/7.0-2 2024-10-12 15:43:58 -06:00
Zoe Gidiere 4be2390294 Small cache fix 2024-10-12 15:43:23 -06:00
Zoe Gidiere cd2421bb49 Merge branch 'ver/6.6.0' into dev/7.0-2 2024-10-12 15:42:47 -06:00
Zoe Gidiere da16f65ea2 Merge branch 'ver/6.6.0' into dev/biomes3 2024-10-12 15:39:03 -06:00
Zoe Gidiere 65d026a130 Fix Cache Deadlock 2024-10-12 15:38:51 -06:00
Zoe Gidiere d45256b2f7 Another merge fixup 2024-10-12 14:52:11 -06:00
Zoe Gidiere 16d8e8f29d Fix up merge 2024-10-12 14:49:53 -06:00
Zoe Gidiere a58b2a5193 Merge remote-tracking branch 'origin/dev/biome2' into ver/6.6.0 2024-10-12 14:40:33 -06:00
Zoe Gidiere 1e5a1e20c2 Merge remote-tracking branch 'origin/master' into ver/6.6.0 2024-10-12 14:29:42 -06:00
Zoë Gidiere 592788450c Update CODEOWNERS 2024-10-12 13:45:55 -06:00
Zoë Gidiere 060cbfd0c4 Update CODEOWNERS 2024-10-12 13:44:02 -06:00
Zoe Gidiere b9c2f4e63b Update Licence year 2024-10-12 02:03:43 -06:00
Zoe Gidiere 87674aa0ba fix cellular sampler 2024-10-12 02:02:28 -06:00
Zoe Gidiere 40ccf80c7f Optimization when Terra Profiler is not running
Do not set Profiler SAFE Threadlocal var when profiler is not running but ensure it is set to false after the profiler stops to ensure consistent behavior
2024-10-12 00:58:08 -06:00
Zoe Gidiere 6946755e31 Minor Cellular opt 2024-10-12 00:56:37 -06:00
Zoë Gidiere 3b9962662e Merge pull request #471 from PolyhedralDev/dev/caching
Dev/caching
2024-10-12 00:22:43 -06:00
Zoe Gidiere 7ca61f82b2 Some API clean up 2024-10-12 00:22:18 -06:00
Zoe Gidiere 6851999926 Some refactoring 2024-10-11 19:45:12 -06:00
Zoe Gidiere 585967157d 1.21.2-pre3 2024-10-11 18:40:59 -06:00
Zoe Gidiere 305255511d More cache improvements 2024-10-11 18:27:37 -06:00
Zoe Gidiere 819be16d83 Merge branch 'dev/cli' into dev/caching 2024-10-11 16:40:26 -06:00
Zoe Gidiere 8a028b193a Add no save option 2024-10-11 16:35:26 -06:00
Zoe Gidiere d31679e6be remove stuff from example 2024-10-11 16:06:40 -06:00
Zoe Gidiere 9d328b12b3 More cache improvements 2024-10-11 16:06:23 -06:00
Zoe Gidiere a743e9c015 Merge branch 'dev/cli' into dev/caching 2024-10-11 15:16:20 -06:00
Zoe Gidiere 43d52e4bc1 CLI Improvements 2024-10-11 15:16:04 -06:00
Zoe Gidiere accc07fa07 Bump Version 2024-10-11 15:15:38 -06:00
Zoe Gidiere c1d3155ddd Cache Improvements 2024-10-11 15:15:10 -06:00
Zoe Gidiere 9a01a6c6a0 more WIP on cache 2024-10-11 00:20:46 -06:00
Zoe Gidiere 3033fbbf29 Fix a ton of fabric impl bugs 2024-10-10 16:49:40 -06:00
Zoe Gidiere c78a984a11 Update to pre2 2024-10-10 14:02:53 -06:00
Zoe Gidiere 1ae0d1f867 WIP Caching Hints and Caching Sampler 2024-10-09 23:36:12 -06:00
Zoe Gidiere be7e10c30c Fix runtime errors 2024-10-09 16:41:04 -06:00
Zoe Gidiere 2ccf8a8805 1.21.2-pre1 builds 2024-10-09 16:18:47 -06:00
Zoe Gidiere 197cb12be2 Update fabric versions to 1.21.2-pre1 2024-10-09 15:28:52 -06:00
Zoe Gidiere adb43dcaa8 Gradle update 2024-10-09 15:17:09 -06:00
Zoe Gidiere b03d128913 Addon dependency updates 2024-10-09 14:01:24 -06:00
Zoe Gidiere 725fa88466 Remap fabric 2024-10-09 14:01:12 -06:00
Zoe Gidiere a82dcd579c Merge branch 'ver/6.6.0' into dev/7.0-2 2024-10-09 13:02:07 -06:00
Zoe Gidiere 370b2e0122 Fix import 2024-10-09 13:01:54 -06:00
Zoe Gidiere 331075e54d Refractor name 2024-10-09 12:59:19 -06:00
Zoe Gidiere a20d2c1f60 Merge branch 'ver/6.6.0' into dev/7.0-2 2024-10-09 12:53:46 -06:00
Zoë Gidiere 973590f5fd Add parameter to turn off salting cellular lookup
another updated astrash commit
2024-10-09 12:42:24 -06:00
Astrash 1a5ab6b505 Add meta annotations 2024-10-09 12:42:13 -06:00
Astrash 14732328cd Add default 'from' values for linear map template 2024-10-09 12:41:55 -06:00
Zoë Gidiere 6c7974c302 Implement linear map normalizer
Updated astrash commit
2024-10-09 12:41:40 -06:00
Zoe Gidiere 1204b7a8c1 ArithmeticSampler Derivatives 2024-10-09 12:37:50 -06:00
Astrash fbe1c76e26 Forgot to include 4th derivative array index for 3D FBM 2024-10-09 21:50:08 +11:00
Astrash add7803e65 Simplify isDifferentiable static method impl 2024-10-09 20:56:37 +11:00
Astrash 4393a16b2f Use proper static isDifferentiable method 2024-10-09 20:56:11 +11:00
Astrash b4fa635455 Ensure throw with incorrect use of SimplexStyle derivatives
This should ensure that in the case an implementation fails to correctly
check isDifferentiable then performs a subsequent derivative based sample,
an error is thrown, rather than potentially missing a logic bug due to
noise of 0 and derivative of 0 being returned which could otherwise be
hard to narrow down.
2024-10-09 20:45:25 +11:00
Astrash 9f425c6159 Add support for derivatives in FBM 2024-10-09 20:39:45 +11:00
Astrash 158ffba2a5 Make FractalNoiseFunction impls support derivatives 2024-10-09 20:39:13 +11:00
Zoe Gidiere f5f3725dba Addon dependency updates 2024-09-25 15:47:19 -06:00
Zoe Gidiere a7a7354c40 remove 7.0 todo 2024-09-24 23:30:04 -06:00
Zoe Gidiere 42dcc9d9bd Merge remote-tracking branch 'origin/master' into dev/7.0-2 2024-09-24 23:29:52 -06:00
Zoë Gidiere b7326c0ff6 Merge pull request #469 from PolyhedralDev/dev/fix-bukkit-spawner
fix spawners on bukkit
2024-09-24 23:27:44 -06:00
Zoe Gidiere f70a83aec3 fix spawners on bukkit 2024-09-24 23:26:49 -06:00
astrsh 589cf83c38 Flip comparison
As per request from @duplexsystem
2024-09-25 14:08:19 +10:00
Zoe Gidiere 581651e83b reformat 2024-09-24 10:06:57 -06:00
Zoe Gidiere a95a1284a4 reformat 2024-09-24 09:54:53 -06:00
Zoe Gidiere c95b3c09a8 Merge branch 'ver/6.5.0' into dev/7.0-2 2024-09-24 09:44:35 -06:00
Zoë Gidiere c374c2d5ef Merge pull request #467 from PolyhedralDev/ver/6.5.0
Ver/6.5.0
2024-09-24 09:41:58 -06:00
Zoe Gidiere 13782bb51e Remforamt 2024-09-24 09:11:43 -06:00
Zoe Gidiere 1aa3ef813c add default sampler to pseudoerosion 2024-09-24 09:05:33 -06:00
Zoe Gidiere 6cc53beecb Fix Sin/Cos 2024-09-23 23:14:35 -06:00
Zoe Gidiere 2c45ba91aa Fix up commit 2024-09-23 22:40:37 -06:00
Zoe Gidiere 6244ffca63 Revert "Sin/Cos Opts"
This reverts commit 1d05f95f74.
2024-09-23 22:38:45 -06:00
Zoe Gidiere 59d943b3ea Revert "Fix build"
This reverts commit 10d723372d.
2024-09-23 22:38:17 -06:00
Zoe Gidiere f605ee1937 Remove Final from psuedoerosion template 2024-09-23 22:35:01 -06:00
Zoe Gidiere f87b7c07d9 Reformat 2024-09-23 22:27:53 -06:00
Zoe Gidiere f1124aae6b Update platform mod file versions and authors 2024-09-23 21:18:47 -06:00
Zoe Gidiere 9c8298fe53 convert pseudoerosion to double 2024-09-23 21:09:19 -06:00
Zoe Gidiere d69b0dba90 reformat 2 2024-09-23 21:06:07 -06:00
Zoe Gidiere 42166d5239 bump version number 2024-09-23 20:59:02 -06:00
Zoe Gidiere d6772f51ea Reformat 2024-09-23 20:56:13 -06:00
Zoe Gidiere f469193909 Make seed affect pseudoerosion hasing 2024-09-23 20:51:00 -06:00
Zoe Gidiere 10d723372d Fix build 2024-09-23 20:45:47 -06:00
Zoe Gidiere 1d05f95f74 Sin/Cos Opts 2024-09-23 20:38:22 -06:00
Zoe Gidiere bd73427072 OpenSimplex 2 Derivative Impl 2024-09-23 20:29:41 -06:00
Zoe Gidiere 017b4608bc Fix build 2024-09-23 19:49:16 -06:00
Zoe Gidiere 5f340f8ffd slight open simplex 2s op\pt 2024-09-23 19:48:22 -06:00
Zoe Gidiere 5b35eb041b Remove temp DerivativeFractl nose 2024-09-23 19:43:56 -06:00
Zoe Gidiere 699d5d1d62 Derivable OpenSimplex2S Impl
baased on https://gist.github.com/KdotJPG/882f36b2ae5ae56a8fc91627ec1c87f4
2024-09-23 19:42:50 -06:00
Zoe Gidiere 07e3d0058d Refractor PseudoErosion 2024-09-23 16:46:48 -06:00
Zoe Gidiere b1ad820e1c Move pseudoerosion to NoiseFunction 2024-09-23 16:37:42 -06:00
Zoe Gidiere 3644ee7fca Implement DerivateNoiseFunction 2024-09-23 16:28:34 -06:00
Zoe Gidiere b14b355c6f Merge branch 'dev/fractal-gavoro-pseudoerosion' into ver/6.5.0 2024-09-21 17:22:47 -06:00
Zoe Gidiere 2df2755631 small opt 2024-09-21 17:20:28 -06:00
Zoe Gidiere ddb131d413 Merge remote-tracking branch 'origin/ver/6.5.0' into dev/7.0-2 2024-09-20 16:42:39 -06:00
daoge_cmd 6042f1c036 build: update build.gradle.kts 2024-09-21 00:57:18 +08:00
daoge_cmd af2ac64cd4 feat: using the new safe getter api 2024-09-20 19:47:49 +08:00
Zoe Gidiere 06457bf3ce some fixes 2024-09-18 15:43:31 -06:00
Zoe Gidiere b63f5f4a8f Reformat 2024-09-18 12:43:41 -06:00
daoge_cmd 4bad8f702c docs: format javadoc 2024-09-18 13:02:16 +08:00
daoge_cmd 76f12e0cb8 build: prepare for merging 2024-09-18 12:59:30 +08:00
Zoe Gidiere 2e145ccd0a Merge branch 'ver/6.5.0' into dev/7.0-2 2024-09-17 22:10:23 -06:00
Zoë Gidiere 8cf766e77b Merge pull request #455 from pumken/seasoned-samplers-2
Add salted version of sampler functions in EXPRESSION samplers
2024-09-17 17:59:26 -06:00
Zoe Gidiere 0731d781d5 fix-up 2024-09-17 17:54:19 -06:00
Zoe Gidiere 5bc73dec37 Merge branch 'ver/6.5.0' into dev/7.0-2 2024-09-17 17:46:33 -06:00
Zoe Gidiere a23d624ab9 Merge branch 'dev/1.21.1' into ver/6.5.0 2024-09-17 17:41:25 -06:00
Zoe Gidiere 15a298304e working 1.21.1 2024-09-17 17:40:56 -06:00
Zoe Gidiere 664d1a3191 working 1.20.6 2024-09-17 16:34:30 -06:00
Zoë Gidiere 73047284c8 Merge pull request #461 from OakLoaf/dev/1.21/bukkit
Updated Bukkit to 1.21/1.21.1
2024-09-17 09:43:05 -06:00
daoge_cmd ce9fb53df4 build: disable useless modules 2024-09-17 22:28:04 +08:00
daoge 1f01b99d29 ci: should check allay branch 2024-09-17 20:40:24 +08:00
daoge 18a24562ec ci: upload jar 2024-09-17 20:39:49 +08:00
daoge 2f2d43e1b8 build: disable mixin platform 2024-09-17 20:00:42 +08:00
daoge 6c8a7da254 build: disable mixin platform 2024-09-17 19:59:43 +08:00
daoge ca4461ba2a build: disable bukkit platform 2024-09-17 19:56:45 +08:00
daoge c6df3c302b build: disable fabric platform 2024-09-17 19:56:03 +08:00
daoge 328ebf5aa9 build: disable cli platform 2024-09-17 19:55:20 +08:00
daoge 2c476a25d9 build: fix build for allay platform 2024-09-17 19:45:26 +08:00
daoge b432a4e01d build: use jdk21 for allay platform 2024-09-17 19:39:01 +08:00
daoge f73eadda76 ci: use jdk 21 2024-09-17 19:18:08 +08:00
daoge 1acdad5c6b ci: run github action when pushing 2024-09-17 19:01:41 +08:00
daoge 732a894945 ci: trigger github action 2024-09-17 18:59:53 +08:00
daoge_cmd bbf0915bc9 build: use org.allaymc.allay as the group id 2024-09-07 19:47:19 +08:00
daoge_cmd 5f70ecb943 feat: use jitpack 2024-09-04 23:55:24 +08:00
daoge_cmd 2e709dace6 feat: sync allay 2024-08-27 19:15:42 +08:00
OakLoaf 3bef7d8572 Resolved errors when tab completing 2024-08-26 12:34:08 +01:00
OakLoaf 08df5fc278 Added 1.21.1 support 2024-08-26 11:24:04 +01:00
daoge_cmd c97f25cb95 feat: support 1.21.20 and newer versions 2024-08-23 20:18:45 +08:00
daoge_cmd 28c689d16f feat: fetch allay's changes 2024-08-19 01:36:32 +08:00
daoge_cmd a34946cece feat: return air if block type not found 2024-08-18 19:39:23 +08:00
OakLoaf 922cd35e84 Updated Cloud dependency to v2 2024-08-16 11:07:03 +01:00
daoge_cmd 4acd0de6fa feat: fetch allay's changes 2024-07-24 20:30:24 +08:00
Oak 44d23573b3 Updated dependencies to Paper 1.21 snapshot 2024-07-20 20:17:25 +01:00
daoge_cmd 2443fff0a4 feat: fetch allay's changes 2024-07-17 01:32:01 +08:00
daoge_cmd cd767a648c feat: fetch allay's changes 2024-07-17 01:27:56 +08:00
Oak e7cc275340 Corrected issues with worldGenContext not correctly being set (Ref: https://stackoverflow.com/questions/56039341/get-declared-fields-of-java-lang-reflect-fields-in-jdk12/56043252#56043252) 2024-06-23 14:16:50 +01:00
Oak fddc9a52b9 Temporarily disabled commands whilst awaiting Cloud Framework update 2024-06-19 13:34:35 +01:00
Oak 0758e13bc7 Made patch version optional as not all Minecraft versions have a patch number 2024-06-19 13:33:55 +01:00
daoge_cmd d490324bfc feat: support waterlogged 2024-06-19 18:09:31 +08:00
daoge_cmd 5fa7007d45 fix: fix a typo 2024-06-19 17:19:17 +08:00
daoge_cmd 2d0e4a83b0 fix: OtherChunkAccessibleContext.get/setBlockState() should use level pos instead of chunk local pos 2024-06-19 01:05:37 +08:00
daoge_cmd e68f928e38 feat: use OtherChunkAccessibleContext directly 2024-06-18 14:59:42 +08:00
daoge_cmd 4a3678cea9 feat: update to 1.21 2024-06-18 03:41:17 +08:00
Oak d810cad8d0 Adjusted code for Spigot compatibility 2024-06-17 15:50:06 +01:00
Oak 4e7de501c0 Updated bukkit platform to 1.21 2024-06-16 19:21:34 +01:00
daoge_cmd 6ff0903d83 fix: fix an mistake 2024-06-17 01:21:14 +08:00
daoge_cmd 133df45968 feat: make it works! 2024-06-17 00:37:16 +08:00
daoge_cmd 1f937a2ae0 feat: fake entity 2024-06-16 15:55:28 +08:00
daoge_cmd d861d3e849 feat: more works 2024-06-16 15:48:18 +08:00
daoge_cmd 3d4aec4abb chores: improve imports 2024-06-16 15:03:19 +08:00
daoge_cmd 62e589870d feat: more works 2024-06-16 15:02:42 +08:00
daoge_cmd 2b125414c9 feat: more works 2024-06-16 06:01:38 +08:00
daoge_cmd 59d7632927 feat: add mapping files 2024-06-16 03:30:50 +08:00
daoge_cmd d81f886e8c feat: more works 2024-06-16 03:29:03 +08:00
daoge_cmd b29ba2db70 feat: more works 2024-06-16 01:33:46 +08:00
daoge_cmd 02a7363f01 feat: init work on allay 2024-06-16 00:07:52 +08:00
Oak 9e60db4b0d Updated MinecraftVersionInfo 2024-06-10 11:07:24 +01:00
Oak 4536767794 Updated to 1.20.6 2024-06-03 11:36:50 +01:00
Oak 3fa4b21247 Attempted to fix paper versions 2024-06-02 21:27:07 +01:00
Oak 17acde09a3 Updated Bukkit to 1.20.6 2024-05-31 12:11:07 +01:00
Zoe Gidiere dd272bce64 WIP 1.20.6 2024-05-01 17:04:34 -06:00
Gavin Tran c20b1eaf10 Apply code style fixes 2024-04-21 15:39:48 -04:00
Gavin Tran 72f761678a Add SaltedNoiseFunctions in sampler conversion 2024-04-21 14:54:45 -04:00
Gavin Tran 62317a2f3f Add SaltedNoiseFunctions 2024-04-21 14:48:46 -04:00
Astrash 823afd592b Reduce number of erosion impulses
A reduction of impulse evaluations from 5^2 to 3^2, original algorithm used exponential falloff function which required evaluating impulses from further away to avoid artifacts. I've changed it to a parabolic falloff function which is exactly 0 at the largest possible distance from a cell origin, meaning any cells further than that will not have an effect, preventing said artifacting from occurring. The parabolic function could be replaced with an exponential function (or any other similar easing function) as long as it has an x-intercept at maxCellDistSq. In addition, an option to control whether averaging impulses has been added as it has more of a visual impact with the aforementioned changes.
2024-04-20 15:55:59 +10:00
Astrash ff03b38b81 Derivative API documentation 2024-04-19 21:25:16 +10:00
Astrash 35246d65b9 Require implementing derivable check 2024-04-19 21:07:53 +10:00
Astrash 41652d29df Use proper check for derivative sampler validation 2024-04-19 21:05:52 +10:00
Astrash 142d364682 WIP fractal-gavoro-pseudoerosion 2024-04-19 20:55:14 +10:00
Zoë Gidiere 01e011a9ed UX tweaks to biome config 2024-03-28 14:47:12 -05:00
duplexsystem b848ddabda Merge remote-tracking branch 'origin/ver/6.5.0' into dev/7.0-2 2024-03-02 22:18:54 -07:00
Zoë 94949c9120 Merge pull request #449 from Browsit/ver/6.5.0
Prevent exception with other world generators
2024-02-23 14:58:51 +00:00
Browsit c52ad56ccc Return null for empty generator IDs 2024-02-02 08:15:37 -05:00
Zoë Gidiere 7214053b9e update fabric loader 2024-01-07 11:57:17 -07:00
Zoë Gidiere da5d0c52f2 Merge remote-tracking branch 'origin/ver/6.5.0' into dev/7.0-2 2024-01-07 10:55:39 -07:00
Astrash f3476c5cc8 Add feature stage blending 2024-01-07 17:02:08 +11:00
Zoë Gidiere cd69c7e77d bump version 2024-01-05 19:49:20 -07:00
Zoë Gidiere 56dd15c9aa clean up flora injection and make it configurable, off by default 2024-01-05 19:44:31 -07:00
Zoë Gidiere 2f470a3720 addon dep 2024-01-05 18:52:10 -07:00
Zoë Gidiere 5350917412 refactor v2 addons 2024-01-05 18:36:01 -07:00
Zoë Gidiere 45528acac8 update v2 addon tag 2024-01-05 18:34:55 -07:00
Zoë Gidiere 921212ccb5 Remove dump-resources and allow for ignoring specific resources 2024-01-05 17:19:27 -07:00
Zoë Gidiere 37641d43d6 Merge remote-tracking branch 'origin/ver/6.5.0' into dev/7.0-2 2024-01-05 15:14:23 -07:00
Astrash 9c181f7ee1 Add ability to disable slant palettes globally 2024-01-06 09:13:02 +11:00
Zoë Gidiere 87ea5ce9e7 remove translation logic 2024-01-05 15:12:35 -07:00
Zoë Gidiere 77f766b8bb remove image and pipeline v1 2024-01-05 15:10:19 -07:00
Zoë Gidiere ecbba57b0a fix enum to uppcases 2024-01-05 15:01:36 -07:00
Zoë Gidiere 839835afd7 Add parameter to turn off salting cellular lookup
another updated astrash commit
2024-01-05 15:00:27 -07:00
Astrash 56941c237c Add meta annotations 2024-01-05 14:58:34 -07:00
Astrash 179a304cd2 Add default 'from' values for linear map template 2024-01-05 14:58:23 -07:00
Zoë Gidiere 4970bf5720 Implement linear map normalizer
Updated astrash commit
2024-01-05 14:58:07 -07:00
Zoë Gidiere f877f861cf use Ranges 2024-01-05 14:47:26 -07:00
Zoë Gidiere d5f0b69bc7 UX tweaks to biome config 2024-01-05 14:46:01 -07:00
Zoë Gidiere b10fd84e00 Merge remote-tracking branch 'origin/ver/6.5.0' into dev/metapacks 2024-01-05 09:11:42 -07:00
Astrash 271e7f3c69 Fix empty slant holders attempting to calculate slant
This occurs when the NoiseChunkGenerator3D#getSlant method is invoked at
a position where the biome has an empty slant holder, currently possible
when using the slant locator addon.

This is fixed by making slant calculation independent of SlantHolders.
Some minor refactoring has also been done as a result of this change.
2024-01-05 18:42:35 +11:00
Zoë 3e04bae828 Merge branch 'ver/6.5.0' into dev/metapacks 2023-12-24 22:39:15 -06:00
Zoë 6681bdfbf2 Merge remote-tracking branch 'origin/master' into ver/6.5.0 2023-12-24 22:39:06 -06:00
dfsek ab60f14ff1 Merge pull request #444 from PolyhedralDev/dev/fix-lerp
6.4.3 - Fix lerp (urgent)
2023-12-24 02:15:54 -07:00
dfsek d8ba9e1016 bump version 2023-12-24 02:06:11 -07:00
dfsek 3622003a39 fix other lerp issues 2023-12-24 02:02:46 -07:00
dfsek 84cd96ecf7 fix BrownianMotionSampler lerp usage 2023-12-24 01:53:05 -07:00
Zoë 82334cfe9e Merge branch 'ver/6.5.0' into dev/metapacks 2023-12-22 15:03:04 -06:00
Zoë 8afda7424c Merge branch 'master' into ver/6.5.0 2023-12-22 15:02:53 -06:00
Zoë Gidiere 50ba1c6eab push changes 2023-12-21 08:47:52 -07:00
Zoë da4ab8b71c Merge pull request #441 from PolyhedralDev/ver/6.4.2
Ver/6.4.2
2023-12-18 13:01:36 -07:00
Zoë Gidiere 3745c3e947 fix typos 2023-12-17 15:32:35 -07:00
Zoë Gidiere fd20837b55 fix error on startup 2023-12-17 15:29:18 -07:00
Zoë Gidiere 27a967f3a6 fix build 2023-12-12 20:17:15 -07:00
Zoë Gidiere 4c71355535 Reformat 2023-12-12 19:07:57 -07:00
Zoë Gidiere e83b70b5ae generation settings 2023-12-12 18:52:31 -07:00
Zoë Gidiere 56b428d501 refactor 2023-12-12 17:19:32 -07:00
Zoë Gidiere 7ca24faad3 fix loading 2023-12-12 17:15:54 -07:00
Zoë Gidiere 9d200565d7 more fixes 2023-12-12 16:54:27 -07:00
Zoë Gidiere f6c2795eaf remove debug loging 2023-12-12 16:12:36 -07:00
Zoë Gidiere 6f03746e41 another fix 2023-12-12 16:09:08 -07:00
Zoë Gidiere 47c8cb3168 Fix up random changes 2023-12-12 16:00:56 -07:00
Zoë Gidiere a9f973cae9 WIP Random Changes 2023-12-12 15:57:04 -07:00
Zoë Gidiere 033181d7c8 more wip changes 2023-12-12 15:48:31 -07:00
Zoë Gidiere e11a235386 WIP Dim opts 2023-12-12 13:55:03 -07:00
Zoë Gidiere db1e924246 more metapack work 2023-12-12 13:35:52 -07:00
Zoë Gidiere c86faa44ec Remove netherfossiloptimization because it's no longer applicable
also it's not needed mc seems to have done this themselves
2023-12-12 13:35:24 -07:00
Zoë Gidiere de91a6facb metapack linking instead of shading 2023-12-11 23:36:05 -07:00
Zoë Gidiere d4a328eb38 who let the datadrive (the dimensions) 2023-12-11 21:14:43 -07:00
Zoë Gidiere b039629b2d WIP meta pack system 2023-12-11 16:25:13 -07:00
Zoë Gidiere d48fa96ec7 opt import 2023-12-11 14:56:07 -07:00
Zoë Gidiere 8dd1f49b88 Merge remote-tracking branch 'origin/dev/remove-loader' into dev/metapacks 2023-12-11 14:54:59 -07:00
Zoë Gidiere 81528915a8 Merge branch 'ver/6.5.0' into dev/metapacks 2023-12-11 14:54:44 -07:00
Zoë Gidiere 5979254808 wip 2023-12-11 14:54:27 -07:00
Zoë Gidiere 0091e5b785 spell check 2023-12-10 18:50:40 -07:00
Zoë Gidiere 41045ae8aa literally forgor the most important part 2023-12-10 18:47:12 -07:00
Zoë Gidiere 4a83f01c1f fix incase mods are used 2023-12-10 18:44:26 -07:00
Zoë Gidiere fc764a0fb3 fix issues with spawners and entity parsing 2023-12-10 18:40:43 -07:00
Zoë Gidiere 22c46f2f80 Pin OWConfig Version 2023-12-10 17:45:52 -07:00
Zoë Gidiere f408faaa80 reformat 2023-12-10 17:07:18 -07:00
Zoë Gidiere 0ad7ee4f9f fix CME 2023-12-10 16:57:27 -07:00
Zoë Gidiere 1e55074cfa Enforce NMS bindings 2023-12-10 15:46:00 -07:00
Zoë 2a92d76276 Merge pull request #437 from PolyhedralDev/dev/1.20.3
Dev/1.20.3
2023-12-09 15:13:11 -07:00
Zoë Gidiere 687ad5db59 Final dep update
confirmed working on paper and fabric
2023-12-09 15:00:46 -07:00
Zoë Gidiere f9c9789016 remove unused maven repo 2023-12-09 01:16:38 -07:00
Zoë Gidiere 3142c2a4f0 update paper to 1.20.4 2023-12-08 22:57:01 -07:00
Zoë Gidiere b5532b7679 Merge branch 'ver/6.4.2' into dev/1.20.3 2023-12-08 22:31:12 -07:00
Zoë Gidiere 8af299d09c fix path of vale ignore 2023-12-08 22:31:04 -07:00
Zoë Gidiere 5cf8a5061d Merge branch 'ver/6.4.2' into dev/1.20.3 2023-12-08 22:11:57 -07:00
Zoë Gidiere 017876475e Add Vale config to gitignore 2023-12-08 22:11:48 -07:00
Zoë Gidiere d88e4f1f9b fix stupid error
thank you caffeine mc peeps
2023-12-08 19:57:05 -07:00
Zoë Gidiere 17eac505a0 Merge branch 'ver/6.4.2' into dev/1.20.3 2023-12-07 11:29:31 -07:00
Zoë Gidiere 8043814138 pull up version range of fabric 2023-12-07 11:29:19 -07:00
Zoë Gidiere 554887ab54 build fabric against 1.20.4 2023-12-07 11:27:06 -07:00
Zoë Gidiere 2f46a01adc Merge remote-tracking branch 'origin/master' into ver/6.4.2 2023-12-07 00:34:00 -07:00
Zoë Gidiere a1db0574e9 Merge branch 'ver/6.4.2' into dev/1.20.3 2023-12-07 00:33:45 -07:00
Zoë fd6decc706 Merge pull request #439 from PolyhedralDev/dev/github-actions
Create gradle-build.yml
2023-12-06 23:11:33 -07:00
Zoë Gidiere 0ba0d472e6 seems arch loom auto uses vineflower now 2023-12-06 22:47:35 -07:00
Zoë Gidiere 11b03eb93d actually bump bukkit version 2023-12-06 22:27:26 -07:00
Zoë Gidiere 46ca45cb1d fix bukkit build 2023-12-06 22:25:53 -07:00
Zoë Gidiere 4e5b066b91 add bukkit grass workaround 2023-12-06 22:24:55 -07:00
Zoë Gidiere db8df9741f bukkit 1.20.3 2023-12-06 22:22:18 -07:00
Zoë Gidiere 80c52870f5 add additional spigot warning 2023-12-06 12:00:03 -07:00
Zoë Gidiere 5048bc8ede Remove folialib 2023-12-06 10:52:31 -07:00
Zoë Gidiere fc0d7374e4 remove old bukkit versions 2023-12-06 10:14:43 -07:00
Zoë Gidiere e4c3affb9f pull up version range 2023-12-05 20:11:00 -07:00
Zoë Gidiere e160cae3d8 reformat 2023-12-05 20:04:08 -07:00
Zoë Gidiere cb9aa4f167 fix permissions 2023-12-05 19:53:05 -07:00
Zoë Gidiere b612d1c7aa fix name 2023-12-05 19:52:50 -07:00
Zoë Gidiere e4df8dce1d proper gradle cache 2023-12-05 19:52:12 -07:00
Zoë Gidiere 601d174720 pin versions and remove dead lines 2023-12-05 19:44:00 -07:00
Zoë 3339d08e11 Create gradle-build.yml 2023-12-05 19:35:23 -07:00
Zoë Gidiere bc65015af0 update gradle 2023-12-05 18:53:19 -07:00
Zoë Gidiere 913637b0a5 update deps 2023-12-05 18:29:43 -07:00
Zoë Gidiere 86f2356cc8 Merge branch 'ver/6.4.2' into ver/6.5.0 2023-11-27 17:55:40 -07:00
Zoë 55d09818f7 Merge pull request #436 from PolyhedralDev/dev/flatten-biome-array
Dev/flatten biome array
2023-11-27 17:54:38 -07:00
Astrash c0aaf6c6e8 Add messages to exceptions 2023-11-28 10:36:30 +11:00
Zoë Gidiere aecdcd578c initial 1.20.3
also disable forge. we're not publishing it anyway
2023-11-27 13:35:48 -07:00
Zoë Gidiere 382069b094 Bump Version to 6.4.2 2023-11-27 11:35:06 -07:00
Zoë Gidiere 734d4bfb94 reformat 2023-11-27 11:31:20 -07:00
Zoë Gidiere c82e015559 flatten array for pipeline biomes 2023-11-27 11:31:11 -07:00
Astrash 1ab3233cba Reformat code 2023-11-25 15:14:16 +11:00
Astrash 59ea5a69d8 Refactor pack loading
- Combine initial load and reload logic together between each platform implementation
- Should prevent pack load errors from blocking other packs from loading.
2023-11-25 15:10:43 +11:00
Astrash 4ba71e9c27 packDirectory -> rootPath 2023-11-25 15:07:45 +11:00
Astrash 5c7441241c Replace Loader with java.nio.files 2023-11-25 13:31:42 +11:00
Astrash ffb1198da2 Merge branch 'master' into ver/6.5.0 2023-11-25 12:33:51 +11:00
Astrash 2c211f0aa6 Merge branch 'master' into ver/6.5.0 2023-11-25 12:29:54 +11:00
Astrashh 3aef977384 Patch version 6.4.1 (#435)
* Bump version to 6.4.1

* fix fabric dev env

* Invert exposed ore logic (#433)

* Invert exposed ore logic

* Bump ore addon version

* Use logger in Gradle over println (#434)

* Log info instead of println in gradle scripts

* Missed buildSrc printlns

---------

Co-authored-by: Zoë <duplexsys@protonmail.com>
2023-11-25 01:02:45 +00:00
Zoë 6060ceae57 Merge pull request #432 from PolyhedralDev/dev/codeowners
update condeowners
2023-11-18 10:05:10 +00:00
Zoë Gidiere 0efb0916e6 Initial Bukkit Biome Config 2023-11-17 16:16:18 -07:00
Zoë Gidiere 82fbf796da Refractor BiomeUtil 2023-11-17 15:26:53 -07:00
Zoë Gidiere 94bf67d09d fix dev env by having fabric api at runtime 2023-11-17 14:57:14 -07:00
Zoë Gidiere e499ddebd4 update condeowners 2023-11-17 13:34:56 -07:00
Zoë Gidiere f86d4bae32 remove old bukkit versions 2023-11-17 13:22:10 -07:00
Zoë Gidiere c7cecaebe6 Merge remote-tracking branch 'origin/dev/biome2' into ver/6.5.0 2023-11-17 13:21:39 -07:00
Zoë Gidiere 866d527d35 bump version 2023-11-17 13:11:28 -07:00
Zoë 4f706f5502 Merge pull request #430 from PolyhedralDev/ver/6.4.0
We've had one, yes. What about second build issue?
2023-11-17 19:12:52 +00:00
Zoë Gidiere fe954a7b2b We've had one, yes. What about second build issue? 2023-11-17 12:12:13 -07:00
Zoë 15e72bae35 Merge pull request #429 from PolyhedralDev/ver/6.4.0
fix building
2023-11-17 18:07:22 +00:00
Zoë Gidiere 513c2df9f9 fix building
for real this time
2023-11-17 11:06:41 -07:00
Zoë aec00d9169 Merge pull request #428 from PolyhedralDev/ver/6.4.0
Ver/6.4.0 2: Electric Boogaloo
2023-11-13 23:07:22 +00:00
Zoë Gidiere 540552d301 Partially Revert "Fix stupid build error and a couple gradle warnings"
This reverts commit 77812545df.
2023-11-13 15:22:09 -07:00
Zoë Gidiere 4dfe2054e9 Revert "Actually fix issue"
This reverts commit 0b1d67b533.
2023-11-13 15:21:17 -07:00
Zoë Gidiere 16e61098d9 depend on fabric api 2023-11-13 15:08:15 -07:00
Zoë Gidiere 8aecf6b97f don't include fabric api 2023-11-13 15:05:21 -07:00
Zoë Gidiere 4788483139 remove gc flags from build 2023-11-13 15:04:44 -07:00
Zoë 9e8aefe7f7 Merge pull request #420 from PolyhedralDev/ver/6.4.0
Terra Version 6.4.0
2023-11-13 04:55:02 +00:00
Zoë Gidiere 272556ed81 final reformat and import optimize 2023-11-12 21:45:47 -07:00
Zoë Gidiere fd0c4df04c Revert "add stub for not physics"
This reverts commit 839bc23a5a.
2023-11-12 21:18:27 -07:00
Astrashh 1c3ee86376 Simplify PR template (#427) 2023-11-13 00:57:27 +00:00
Astrashh defd775f13 Change Java whitespace handling in .editorconfig (#425)
* Change whitespace handling in .editorconfig

* Reformat code

* fix format error

* Reformat code

---------

Co-authored-by: Zoë Gidiere <duplexsys@protonmail.com>
2023-11-13 00:57:01 +00:00
Astrash a73fda7d04 Forgot @Meta 2023-11-13 11:48:06 +11:00
Astrash b8586135b8 Make RangeLoader inner class private
Also removes redundant suppression
2023-11-10 13:34:05 +11:00
Astrashh 4065cfea53 Fix YAML formatting (#426)
* Remove trailing whitespace in YAML formatting

* Reformat YAML files
2023-11-10 00:47:12 +00:00
Zoë Gidiere a117db40be change formatting 2023-11-09 12:47:48 -07:00
Zoë Gidiere 72e0974cc5 fix cli build 2023-11-09 11:40:19 -07:00
Zoë Gidiere d8938c5519 remove comments 2023-11-09 11:37:46 -07:00
Zoë Gidiere acf79f5c53 change class structure of LifecycleEntryPoint 2023-11-09 11:37:01 -07:00
Zoë Gidiere 839bc23a5a add stub for not physics 2023-11-09 11:29:09 -07:00
Zoë Gidiere 852cf0321b Merge remote-tracking branch 'origin/ver/6.4.0' into ver/6.4.0 2023-11-08 21:59:14 -07:00
Zoë Gidiere 89d497d500 Some requested changes 2023-11-08 21:58:57 -07:00
Zoë Gidiere 0df940d688 improve invSqrt formatting
Co-authored-by: solonovamax <solonovamax@12oclockpoint.com>

what the fuck?
2023-11-08 21:20:01 -07:00
Zoë Gidiere dd7bebb27f Update lerp usage and docs 2023-11-08 21:18:35 -07:00
solonovamax 72649d5cf7 Merge remote-tracking branch 'upstream/ver/6.4.0' into ver/6.4.0 2023-11-08 22:42:23 -05:00
solonovamax 7cf87de463 Add TODO to replace FoliaLib when we drop support for 1.18 and 1.19
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
2023-11-08 22:42:14 -05:00
Zoë Gidiere 020033f839 add rsqrt ts function 2023-11-08 19:53:36 -07:00
Zoë Gidiere b3ef4ac79c optimized tan 2023-11-08 19:52:05 -07:00
solonovamax 3f9f2bdce4 Use kotlin's Path extensions rather than Files.whatever
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
2023-11-08 20:38:25 -05:00
Zoë Gidiere 0ab463f34f bukkit clean up 2023-11-05 21:07:25 -07:00
Zoë Gidiere 0b1d67b533 Actually fix issue 2023-11-05 20:51:28 -07:00
Zoë Gidiere c4f665ffc5 fix format error 2023-11-05 20:13:04 -07:00
Zoë Gidiere c00753b0fc let reformat have another go at it 2023-11-05 20:12:57 -07:00
Zoë Gidiere 77812545df Fix stupid build error and a couple gradle warnings
thank you gradle .replaceFirstChar { if (it.isLowerCase()) it.titlecase(Locale.getDefault()) else it.toString() } is clearly better than .capitalize()
2023-11-05 20:07:13 -07:00
Zoë Gidiere ad9bc7f67c fix format error 2023-11-02 18:47:45 -06:00
Zoë Gidiere 81a96d6b76 Reformat code 2023-11-02 18:47:36 -06:00
Zoë Gidiere d696e4fd24 Optimize imports 2023-11-02 18:45:13 -06:00
Zoë Gidiere c98d39c5d7 Update licence year 2023-11-02 18:42:51 -06:00
Zoë a6fe268f79 Merge pull request #422 from PolyhedralDev/dev/image-caching
Improve image caching
2023-11-03 00:10:52 +00:00
Zoë 648da95e7d Scattered ore (#424)
* Scattered Ore Impl

* remove break

* remove another break

* sphereCount -> blockCount

---------

Co-authored-by: Astrash <astrash@protonmail.com>
2023-10-29 17:33:50 -06:00
Zoë Gidiere 5829112a74 Merge branch 'ver/6.4.0' into dev/image-caching 2023-10-26 12:56:17 -06:00
Zoë Gidiere c41bf55b7b implement missing methods from last comit 2023-10-26 12:53:55 -06:00
Zoë Gidiere 5d12a560f1 add zero and unit vectors 2023-10-26 11:08:36 -06:00
Zoë Gidiere 6f08908bb4 merge ovre-v2 into ore(v1) 2023-10-26 10:43:13 -06:00
Zoë Gidiere 9292d3de17 Remove FastMath
hotspot has intrinsics for almost everything we use it for
2023-10-26 10:37:25 -06:00
Astrash 0149a29b04 Load correct path 2023-10-24 14:08:56 +11:00
Astrash cd8605850f Replace unload-on-timeout with timeout > 0 2023-10-24 13:47:25 +11:00
Astrash 148b8dfe35 Bump image lib patch version 2023-10-24 13:34:10 +11:00
Astrash 3f485b1825 Add to unload on timeout description 2023-10-24 13:30:09 +11:00
Astrash cb6ecff113 Remove sout 2023-10-24 13:29:53 +11:00
Astrash e30bcbf1ba Improve image caching options 2023-10-24 13:26:35 +11:00
Astrash 805f99f57a Make ore algorithm readable 2023-10-20 10:55:23 +11:00
Astrash 4e5b02ef42 Pass correct coords for ore block checks 2023-10-20 10:30:25 +11:00
Astrash e80e998cec Only log warnings with debug logging 2023-10-20 10:03:04 +11:00
Zoë fde29220af Merge pull request #419 from PolyhedralDev/dev/disable-quilt
Dev/disable quilt
2023-10-19 17:31:40 +00:00
Zoë Gidiere d3a9b57872 disable quilt 2023-10-18 19:53:59 -06:00
Zoë 4671ec5bd3 Merge pull request #417 from PolyhedralDev/dev/folia
Dev/folia
2023-10-19 01:18:45 +00:00
Zoë 9f4a8e06e1 Update DependencyConfig.kt 2023-10-17 21:00:28 -06:00
Zoë c8f2871aaa Update build.gradle.kts 2023-10-17 20:59:27 -06:00
Zoë 4a537a56aa Merge pull request #415 from PolyhedralDev/dev/ore-v2
Add updated ore-v2
2023-10-18 00:33:15 +00:00
Zoë 4917160123 Update README.md 2023-10-17 18:32:00 -06:00
Zoë b3f80dcb64 Merge pull request #410 from PolyhedralDev/dev/1.20.2
1.20.2 + update libs
2023-10-15 19:45:43 +00:00
Zoë Gidiere d49b9ccad5 Merge branch 'dev/1.20.2' into dev/folia 2023-10-14 16:02:54 -06:00
Zoë Gidiere a8387ce419 Merge remote-tracking branch 'origin/ver/6.4.0' into dev/1.20.2 2023-10-14 16:02:40 -06:00
Zoë Gidiere 94854f2bdb update versions 2023-10-14 15:55:43 -06:00
Astrashh 47f531089e Add slant locator (#413)
* Add slant locator addon

* Bump slant locator noise3d dependency version

* Fix slant locator dependency version range

* Actually fix slant locator dependency version range
2023-10-10 00:35:47 +00:00
Astrashh abd83e8278 Add number predicate addon (#412) 2023-10-10 00:35:26 +00:00
Astrash b5e7c7c112 Fix TOP locator 2023-10-10 09:44:53 +11:00
Zoë Gidiere d71f7d4c36 clarify value and change default 2023-10-03 21:03:44 -06:00
Zoë Gidiere 84898a7a6b fixes 2023-10-03 20:03:46 -06:00
Zoë Gidiere 0c1a6efc72 refractor classes 2023-10-03 19:42:15 -06:00
Zoë Gidiere 200281f140 dep orev1 2023-10-03 11:58:32 -06:00
Zoë Gidiere f1ea8074de config-ore-v2 2023-10-03 11:54:18 -06:00
Astrash f896a9a278 Bump noise3d addon minor version 2023-10-03 11:01:50 +11:00
Astrash 79b3b34669 Add slant API for noise3d 2023-10-03 09:51:39 +11:00
Zoë Gidiere ce2b964ce3 Merge branch 'dev/1.20.2' into dev/folia 2023-10-02 01:38:24 -06:00
Zoë Gidiere 0ee5f49972 quilt 2023-10-02 01:38:01 -06:00
Zoë Gidiere 3bc10cdb6a Merge branch 'dev/1.20.2' into dev/folia 2023-10-02 00:42:11 -06:00
Zoë Gidiere 86ba52850d update strata 2023-10-02 00:41:54 -06:00
Zoë Gidiere 27eebf6a47 Folia support
Co-authored-by: Janet Blackquill <uhhadd@gmail.com>
2023-10-02 00:23:19 -06:00
Zoë Gidiere 2d2bba20b6 found an untrue in read me 2023-10-01 23:22:44 -06:00
Zoë Gidiere eb3994005c fix me being fucking stupid 2023-10-01 22:46:41 -06:00
Zoë Gidiere 0a7cdb82a3 update deps + 1.20.2 2023-10-01 22:18:54 -06:00
Zoë 158deaa971 Merge pull request #408 from PolyhedralDev/dev/physics
Allows you to create a block with physics enabled
2023-10-01 19:07:15 -06:00
Astrash e51e025e9c Implement cubic spline sampler 2023-10-02 11:14:43 +11:00
Zoë Gidiere 70b1c3bbf3 warning 2023-09-30 12:06:21 -06:00
Zoë Gidiere e9b145b6c3 unbreaking via deprecation 2023-09-30 11:50:15 -06:00
Zoë 99d848b394 UX tweaks to biome config 2023-09-30 11:42:05 -06:00
Zoë Gidiere 4828d51da4 Merge branch 'dev/physics' into dev/biome2 2023-09-30 11:38:18 -06:00
Zoë Gidiere 8e0d64dccd Make bukkit work 2023-09-30 10:49:28 -06:00
Zoë Gidiere 23f47de10a fix pack loading error 2023-09-29 23:35:17 -06:00
Zoë Gidiere 89651597c2 default to info logging 2023-09-29 23:32:40 -06:00
Zoë 5c0c833b70 Update LifecycleEntryPoint.java 2023-09-29 23:09:41 -06:00
Zoë Gidiere 33d654dc8e impl fabric 2023-09-29 23:05:05 -06:00
Zoë Gidiere f0c602d7e7 implement physics on the api side
we will see if platform changes are needed
2023-09-29 22:10:03 -06:00
Zoë Gidiere 0e37a839fe We do a little commonifying 2023-09-29 21:44:12 -06:00
Astrash 3f9ead0d66 Remove repeated code in cellular sampler 2023-09-27 13:39:51 +10:00
David W 5eeb5af6c4 Add cell center offset return to CELLULAR sampler (#407)
* Add offset lookup return to cellular sampler

* bump noise function plugin version

* revert version to 1.1.0

* rename OffsetNoiseLookup, switch axis orientation

* rename return type aswell in cellcampler
2023-09-21 22:23:49 +00:00
Astrash 81e354f91c Use tectonic properly 2023-07-18 22:06:08 +10:00
Astrash aab28ff4f9 Bump version to 6.4.0 2023-07-18 14:32:12 +10:00
Astrash 0e3a756011 Bump config-noise-function to v1.1.0 2023-07-18 14:29:54 +10:00
Astrash 02198e1b88 Implement distance sampler 2023-07-18 14:29:28 +10:00
Astrash 00aeb98419 Implement translation sampler 2023-07-18 14:27:36 +10:00
Astrash 1a784b51ac Implement expression normalizer sampler 2023-07-18 14:25:07 +10:00
Astrash 34c0895c1f Make metalist injection error more user friendly 2023-07-16 22:46:23 +10:00
Astrash 379fa601a3 Meta annotate LINEAR_HEIGHTMAP sampler 2023-07-16 17:04:51 +10:00
Astrash fcbf51d80b Allow Range keys to be meta annotated 2023-07-16 11:51:51 +10:00
Astrash 9d83dfd164 Bump version to 6.3.2 2023-07-16 11:49:14 +10:00
Astrashh 72686601ee Merge pull request #406 from PolyhedralDev/ver/6.3.1
Ver/6.3.1
2023-07-15 07:04:10 +10:00
Astrash 73baaec6cd Bump version to 6.3.1 2023-07-11 09:33:57 +10:00
Astrashh 0be7213ee5 Merge pull request #401 from PolyhedralDev/dev/reduce-pipeline-caching
Reduce pipeline v2 caching
2023-06-20 10:10:35 +10:00
Astrash 3f3e2fe97c Reduce pipeline v2 caching 2023-06-20 09:57:43 +10:00
dfsek 549edd11ea update ServerCommandSourceMixin 2023-06-15 17:27:26 -07:00
dfsek 36f89946d4 update SignBlockEntityMixin 2023-06-15 17:26:04 -07:00
dfsek 18644d6100 update fabric dependencies 2023-06-15 17:22:21 -07:00
dfsek 9d38ee4329 repackage NMS 1.20.1 2023-06-15 17:18:36 -07:00
dfsek b75a8f85e4 restore NMSChunkGeneratorDelegate#getBaseColumn 2023-06-15 17:16:20 -07:00
dfsek aad58f5968 update nms imports 2023-06-15 17:14:45 -07:00
dfsek a548c30484 clean up unused bstats relocation 2023-06-15 17:11:53 -07:00
dfsek 9ba46ae3a5 make new bukkit NMS module 2023-06-15 17:11:32 -07:00
dfsek 49efbed6f5 update versions 2023-06-15 17:11:04 -07:00
dfsek 4001a56100 Merge pull request #400 from PolyhedralDev/ver/6.3.0
make forge compile
2023-06-15 15:55:49 -07:00
dfsek f46f35d2ad make forge compile 2023-06-15 15:52:36 -07:00
dfsek 70dbd2f2c0 Merge pull request #399 from PolyhedralDev/ver/6.3.0
Ver/6.3.0
2023-06-15 14:05:02 -07:00
dfsek bf1be62d54 Merge pull request #385 from PolyhedralDev/dev/img-lib
Image library
2023-06-15 14:00:44 -07:00
Astrash a5cbce3667 Optimize cardinal rotations for RotateColorSampler 2023-06-14 12:07:37 +10:00
Astrash d0591f292e Use primitive int over Integer 2023-06-14 11:15:25 +10:00
dfsek 27874ce0a5 Merge pull request #396 from ccorp2002/master
1.19.4 Support...?
2023-06-10 15:55:12 -07:00
dfsek 170687abdb remove unused mixin 2023-06-10 15:53:27 -07:00
dfsek 46b61d841d remove unneeded buildscript 2023-06-10 15:50:45 -07:00
dfsek 41b7021121 fix fabric pack reloading 2023-06-10 15:49:33 -07:00
dfsek 183255140b remove unused RegistrarInstance class 2023-06-10 15:28:46 -07:00
dfsek bea8f97179 fix bukkit pack reloading 2023-06-09 03:33:47 -07:00
dfsek 60fec05e12 Merge remote-tracking branch 'origin/ver/6.3.0'
# Conflicts:
#	build.gradle.kts
#	buildSrc/src/main/kotlin/Versions.kt
#	platforms/bukkit/build.gradle.kts
#	platforms/bukkit/nms/v1_19_R1/build.gradle.kts
#	platforms/bukkit/nms/v1_19_R2/build.gradle.kts
#	platforms/mixin-common/src/main/java/com/dfsek/terra/mod/ModPlatform.java
#	platforms/mixin-common/src/main/java/com/dfsek/terra/mod/generation/TerraBiomeSource.java
#	platforms/mixin-common/src/main/java/com/dfsek/terra/mod/util/PresetUtil.java
#	platforms/mixin-lifecycle/src/main/java/com/dfsek/terra/lifecycle/LifecyclePlatform.java
#	platforms/mixin-lifecycle/src/main/java/com/dfsek/terra/lifecycle/mixin/lifecycle/RegistryLoaderMixin.java
#	platforms/mixin-lifecycle/src/main/java/com/dfsek/terra/lifecycle/util/LifecycleUtil.java
2023-06-09 03:16:18 -07:00
dfsek e79cc21c11 1.19.4 fabric 2023-06-09 03:04:41 -07:00
Astrash 5188477a6d Merge branch 'ver/6.3.0' into dev/img-lib 2023-05-02 14:21:31 +10:00
Astrash 58b743e6e8 Distance transform documentation 2023-05-02 14:15:20 +10:00
Astrash 9fa5307a60 Remove image sampler addon
The image sampler is implemented as the 'CHANNEL' sampler provided
directly by the library-image addon instead.
2023-05-02 13:41:42 +10:00
Astrash b4ea09929c ColorUtil documentation 2023-05-02 13:37:22 +10:00
Astrash 09d847bc5a Add argb method to Channel class 2023-05-02 13:12:23 +10:00
Astrash dacddef5d6 rgb -> argb 2023-05-02 13:04:23 +10:00
Astrash 3c593c7013 Fix method call 2023-05-02 13:03:13 +10:00
Astrash 36d0ef77fb Add image support addon for biome pipeline 2023-05-02 12:58:37 +10:00
Astrash 105be0c346 Implement color parsing from strings 2023-05-02 12:58:29 +10:00
Astrash 39d21fbe08 Implement channel noise sampler 2023-05-01 13:58:56 +10:00
Astrash 50fc589001 Move distance transform to appropriate package 2023-05-01 13:58:18 +10:00
Astrash ffa55cb7a3 Implement premultiplication in ColorUtil 2023-05-01 13:57:07 +10:00
Astrash ff0985bd31 Make imagelib MathUtil 2023-05-01 13:10:58 +10:00
Astrash 622fed96e5 Use colorsampler package name instead of sampler 2023-05-01 12:48:13 +10:00
Astrash c219eff149 Implement distance transform sampler 2023-05-01 12:45:26 +10:00
Astrash 514e7065e2 Update image provider v2 readme 2023-05-01 12:02:53 +10:00
dfsek 0a16453f98 remove devlaunch lazydfu 2023-04-13 18:20:16 -07:00
dfsek ca2fe27fb3 fix preset creation 2023-04-13 18:15:35 -07:00
dfsek 6f2c01ceb3 update biome builder 2023-04-13 17:20:20 -07:00
dfsek 8b74a5dee0 implement biomeStream 2023-04-13 16:45:09 -07:00
dfsek 460a7651bc fix bukkit build 2023-04-13 16:44:01 -07:00
dfsek b7a6b839e6 Merge remote-tracking branch 'origin/dev/1.19.3'
# Conflicts:
#	buildSrc/src/main/kotlin/Versions.kt
#	platforms/bukkit/build.gradle.kts
2023-04-13 16:34:43 -07:00
dfsek 75bff93ecd update mod versions 2023-04-13 16:31:49 -07:00
dfsek 57a45f08f0 re-package bukkit 1.19.4 code 2023-04-13 16:31:41 -07:00
C_Corp2002 ba35b56016 Delete AwfulBukkitHacks.java.txt
Unneeded.
2023-04-13 15:40:13 -07:00
C_Corp2002 8fd10956e4 Update build.gradle.kts 2023-04-12 00:51:49 -07:00
C_Corp2002 9a5c1302ac Fixing...?
We gottem.
2023-04-12 00:51:12 -07:00
C_Corp2002 f918f1ef66 An attempt at 1.19.4 Support
I tried.
2023-04-09 21:08:38 -07:00
Astrash 2afcee28a6 Base key names on internal names 2023-03-01 13:39:09 +11:00
Astrash 6efff02c19 Implement stitched image support 2023-03-01 13:38:36 +11:00
Astrash d3e0831d9e Use config type based image loading
Rename `path` key to `image`
2023-03-01 13:28:45 +11:00
Astrash 345012810a Fix biome-provider-image-v2 addon manifest 2023-03-01 13:22:39 +11:00
Astrash 73e0899e7c Only use WorldEdit relative offset for v2 sponge schematics 2023-02-28 13:05:36 +11:00
Astrash 8deae0480c Add support for WorldEdit schematic relative offsets 2023-02-28 11:58:39 +11:00
Astrash 7b87498751 Don't load same image multiple times 2023-02-07 11:59:03 +11:00
Astrash 33f1aa07d3 Mark BufferedImageLoader as deprecated 2023-02-07 11:38:12 +11:00
Astrash 3ab671827d Re-add old image sampler to config-noise-function w/ deprecation notice 2023-02-07 11:31:23 +11:00
Astrash 4d17edef80 Add deprecation notice for biome-provider-image addon 2023-02-07 11:31:23 +11:00
Astrash 9d5b33f130 Re-add original image biome provider
This is so we aren't breaking existing packs
2023-02-07 11:31:23 +11:00
Astrash 97c0dcad9d Rename image lib biome provider to v2 2023-02-07 11:31:23 +11:00
Astrash ef4fe4eb7a Revert "Bump image provider major version"
This reverts commit f1bf3990c1.
2023-02-07 11:31:23 +11:00
Astrash 9514641e1e Revert "Bump config-noise-function major version"
This reverts commit 68875cc17b.
2023-02-07 11:31:23 +11:00
Astrash e6c51bcfd0 Merge branch 'ver/6.3.0' into dev/img-lib
fogor import
2023-02-07 11:30:54 +11:00
Astrash 084ecb9ad8 Forgot to delet sout 2023-02-06 20:36:28 +11:00
Astrash 5cc58babca Bump version to 6.3.0 2023-02-06 19:18:08 +11:00
Astrash b10130c5c6 Cache loaded BufferedImages 2023-02-06 19:18:08 +11:00
dfsek 5bc34eb626 update version to 6.2.2 2023-02-06 19:18:08 +11:00
dfsek 7d74245109 make forge compile 2023-02-06 19:18:08 +11:00
dfsek 11b6080413 update bukkit to 1.19.3 2023-02-06 19:18:08 +11:00
dfsek 4df23e464b begin working on Forge 2023-02-06 19:18:08 +11:00
dfsek 7ea5747f8e clean up sysout logging 2023-02-06 19:18:08 +11:00
dfsek caad76f6dd add mixin to inject flora 2023-02-06 19:18:08 +11:00
dfsek ba2f24f1f5 1.19.3 launch and enter world 2023-02-06 19:18:08 +11:00
dfsek 57bb6bca94 evil registry hacks 2023-02-06 19:18:08 +11:00
dfsek 4bb09b126a continue registry wrangling 2023-02-06 19:18:08 +11:00
dfsek ae96d8f526 fix inject parameters in NoiseConfigMixin 2023-02-06 19:18:08 +11:00
dfsek 4a918d00a3 allow registry manager to be overwritten 2023-02-06 19:18:08 +11:00
dfsek cd65785de4 fix SaveLoadingMixin 2023-02-06 19:18:08 +11:00
dfsek 51cd4cd4b7 fix RegistryMixin target class 2023-02-06 19:18:08 +11:00
dfsek e7efdd61a6 fabric compiles now 2023-02-06 19:18:08 +11:00
dfsek 0006762ff3 update platform biome delegate logic 2023-02-06 19:18:08 +11:00
dfsek 4e4627d11d update minecraft data config templates 2023-02-06 19:18:08 +11:00
dfsek 228b26f7c4 more work on evil update 2023-02-06 19:18:08 +11:00
dfsek ef846d53ad update MinecraftChunkGeneratorWrapper and its codec 2023-02-06 19:18:08 +11:00
dfsek f6f7529cb5 begin working on fabric 1.19.3 2023-02-06 19:18:08 +11:00
dfsek 606315ea64 update platform versions to 1.19.3 2023-02-06 19:18:08 +11:00
Astrash 46f7c95314 Implement BiomeProvider#getBaseBiome in pipeline v2 2023-01-30 12:57:50 +11:00
dfsek 4d826c880c update version to 6.2.2 2022-12-21 23:49:15 -07:00
dfsek 6da3acc8a1 make forge compile 2022-12-21 23:49:06 -07:00
dfsek 8fff27fddd update bukkit to 1.19.3 2022-12-21 23:00:40 -07:00
dfsek 75673b5b8e begin working on Forge 2022-12-21 21:59:39 -07:00
dfsek 5ded3552d3 clean up sysout logging 2022-12-21 21:38:40 -07:00
dfsek ded308c01c add mixin to inject flora 2022-12-21 21:34:44 -07:00
dfsek ee336b01a6 1.19.3 launch and enter world 2022-12-21 21:14:38 -07:00
dfsek 66465f27ff evil registry hacks 2022-12-21 14:41:43 -07:00
dfsek 764a4fa535 continue registry wrangling 2022-12-19 01:27:35 -07:00
dfsek 5dd5c37055 fix inject parameters in NoiseConfigMixin 2022-12-18 22:54:30 -07:00
dfsek 2e0f892fff allow registry manager to be overwritten 2022-12-18 22:53:10 -07:00
dfsek cad0e4105c fix SaveLoadingMixin 2022-12-18 22:49:59 -07:00
dfsek b10898b837 fix RegistryMixin target class 2022-12-18 22:46:57 -07:00
dfsek 6255ac7379 fabric compiles now 2022-12-18 22:44:53 -07:00
dfsek c90ca076ab update platform biome delegate logic 2022-12-18 22:44:06 -07:00
dfsek 73af05bf09 update minecraft data config templates 2022-12-18 22:39:18 -07:00
dfsek 84eab0de4a more work on evil update 2022-12-18 22:03:00 -07:00
dfsek 393a868e6a update MinecraftChunkGeneratorWrapper and its codec 2022-12-18 20:05:17 -07:00
dfsek 8955e4bb81 begin working on fabric 1.19.3 2022-12-14 19:14:16 -07:00
dfsek bae2af80c8 update platform versions to 1.19.3 2022-12-14 18:28:25 -07:00
Astrashh 6826f44770 Merge pull request #386 from PolyhedralDev/dev/dot-product-slant-again
Refactor Noise3D palettes to optionally use dot product slants
2022-11-29 13:28:23 +11:00
Astrash 1b5095dd36 Refactor Noise3d palettes to support multiple slant methods 2022-11-26 19:18:58 +11:00
Astrash 95992cc49b Don't apply align to single image fallback 2022-11-26 14:43:15 +11:00
Astrash 7b0185ba7c Add translate color sampler 2022-11-26 14:42:12 +11:00
Astrash 6b7fb82202 Put mutator color samplers in their own packages 2022-11-26 14:21:02 +11:00
Astrash f246c8ada3 Put image based color samplers in own packages 2022-11-26 14:14:15 +11:00
Astrash a97273f358 Skip color dist calc if exact match 2022-11-26 14:05:39 +11:00
Astrash 878bede60b Name changes 2022-11-26 13:52:15 +11:00
Astrash b771e108b6 Use color sampler as fallback instead of constant 2022-11-26 13:52:15 +11:00
Astrash 5c916f7758 Add rotate color sampler 2022-11-26 13:52:05 +11:00
Astrash e9db14f52c Wrap BufferedImage access 2022-11-26 13:49:10 +11:00
Astrash b3f072d689 Properly ignore alpha of lookup map 2022-11-25 14:11:16 +11:00
Astrash 4fdef98bd9 Use generic key mapping function 2022-11-25 14:10:07 +11:00
Astrash 8670c4cdf3 ColorPicker -> ColorSampler 2022-11-25 10:17:56 +11:00
Astrash 64c2a41d19 Ignore alpha channel by default with ExactColorConverter 2022-11-24 13:56:11 +11:00
Astrash 4e225a6592 Add utility methods for zero-ing color channels 2022-11-24 13:55:36 +11:00
Astrash c491ac5b24 ColorUtil.Channel getChannel() -> from() 2022-11-24 13:55:16 +11:00
Astrash 68875cc17b Bump config-noise-function major version
* Removed IMAGE sampler
2022-11-24 12:06:51 +11:00
Astrash f1bf3990c1 Bump image provider major version 2022-11-24 12:06:51 +11:00
Astrash 4334b16ded Use color pickers in image sampler 2022-11-24 12:06:51 +11:00
Astrash 274f864d6a Move channels into image lib 2022-11-24 12:06:51 +11:00
Astrash 329d94ba9c Move image sampler to separate addon 2022-11-24 12:06:51 +11:00
Astrash 03ab463723 Rewrite the image biome provider to use the image library 2022-11-24 12:06:51 +11:00
Astrash 3580267532 Image library initial implementation
*Moves the BufferedImage loader into the library, rather than being
a loader implemented in common/implementation
2022-11-24 12:06:51 +11:00
dfsek 358e09d05b Merge pull request #383 from PolyhedralDev/ver/6.2.1
6.2.1 but for real this time
2022-11-16 14:03:21 -07:00
dfsek 1f7c4ee4e7 rename from "2" to "v2" 2022-11-16 14:02:34 -07:00
dfsek b3100e01e2 Merge remote-tracking branch 'origin/master' into ver/6.2.1 2022-11-16 13:49:13 -07:00
Astrash 02d3445dd9 Include deprecation notice for pipeline v1 2022-11-16 16:01:28 +11:00
Astrash c1c85174ed Re-add original pipeline implementation 2022-11-16 16:01:28 +11:00
Astrash 6cdef5d4ad Move pipeline reimplementation to separate addon 2022-11-16 16:01:27 +11:00
Astrash 57cbea4000 Replace sout with logger debug calls 2022-11-16 16:01:27 +11:00
Astrash 3522b5f17c Remove test class from source 2022-11-16 16:01:27 +11:00
Astrash 5c58bd54a3 Ephemeral -> Placeholder 2022-11-16 16:01:27 +11:00
Astrash ee6d475ad0 Move reimplementation classes into main package 2022-11-16 16:01:27 +11:00
Astrash d170b4e0fd Handle resolution and biome blending 2022-11-16 16:01:27 +11:00
Astrash bc324df7ca Working state for pipeline implementation 2022-11-16 16:01:27 +11:00
dfsek 9b75410ea7 configure bukkit resource config properly 2022-11-15 21:09:16 -07:00
dfsek 44550e8d8e Merge pull request #382 from PolyhedralDev/ver/6.2.1
update version
2022-11-15 19:20:18 -07:00
dfsek 12845a6004 update version 2022-11-15 19:17:14 -07:00
dfsek 140295602c Merge pull request #381 from PolyhedralDev/ver/6.2.1
Ver/6.2.1
2022-11-10 01:16:39 -07:00
dfsek 547f4884aa fix beard 2022-11-09 18:52:36 -07:00
dfsek 72e5ac76e6 update paper dev bundle to 1.19.2 2022-11-09 18:48:09 -07:00
dfsek 7d3bdeee8f Merge pull request #379 from PolyhedralDev/fix/ender_crystal
Fix End Crystals on Bukkit
2022-11-09 18:18:57 -07:00
dfsek e471950047 Merge pull request #380 from PolyhedralDev/fix/bukkit-beard
implement beardification on Bukkit (closes #370)
2022-11-09 18:18:42 -07:00
dfsek 1306dad776 implement beardification on Bukkit (closes #370) 2022-11-07 17:49:49 -07:00
dfsek eb9685c734 fix #378 2022-11-07 17:31:41 -07:00
solonovamax e8fa5514cc Clean up language in code of conduct's license & attribution section 2022-09-06 10:42:05 -04:00
solonovamax f1290b36d8 Fix more weird list formatting in code of conduct 2022-09-06 10:40:43 -04:00
solonovamax befc0c6636 Fix an oopsie in the code of conduct with weird list formatting 2022-09-06 10:15:01 -04:00
Zoë f851276fc2 Merge pull request #351 from Browsit/patch-2
Fix type mismatch
2022-08-26 10:56:45 -05:00
Zoë bc334fa214 Merge pull request #350 from Browsit/patch-1
Update BUG_REPORT.md
2022-08-26 10:56:26 -05:00
Browsit 829696ccc8 Use jar URI prefix
Fixes `Path component should be '/'` on Windows
2022-07-21 02:35:38 -04:00
Browsit 43adf056c3 Fix type mismatch
Just pulled the master branch and got the error:

`C:\Users\{owner}\IdeaProjects\Terra\buildSrc\src\main\kotlin\DistributionConfig.kt: (49, 39): Type mismatch: inferred type is Path! but URI! was expected`
2022-07-20 22:27:22 -04:00
Browsit f8a602790a Update BUG_REPORT.md 2022-07-20 08:28:58 -04:00
dfsek a175601424 disable parallel build 2022-07-07 23:27:20 -07:00
Zoë 7d056bd88c try fix packs 2022-07-07 20:35:46 -07:00
dfsek eb79a6f762 create resources dir if not exist 2022-07-07 18:49:33 -07:00
Zoë 59af552be2 fix bukkit 2022-07-07 12:33:15 -07:00
dfsek d63606a9b1 maybe fix bukkit resource manifest building 2022-07-07 09:10:14 -07:00
dfsek fa0fb3cd15 specify exact arch loom version 2022-07-07 07:03:17 -07:00
dfsek 6c8c4f0e01 remove suspect options 2022-07-06 22:55:40 -07:00
dfsek 155349a00c dont run gradle tasks in parallel 2022-07-06 20:03:07 -07:00
dfsek 5f13536dc3 Merge pull request #329 from PolyhedralDev/ver/6.2.0
Minor version 6.2.0
2022-07-06 19:43:00 -07:00
dfsek 75a2dd7b6e revert formatting of PULL_REQUEST_TEMPLATE.md 2022-07-06 19:36:01 -07:00
dfsek 3cec404c6b specify platform in loom builds 2022-07-06 19:32:23 -07:00
dfsek b3a8f375bc reformat all code 2022-07-06 19:28:07 -07:00
Zoë dc5e71e3de fix tooling hell 2022-07-06 17:32:43 -07:00
dfsek 1d5abbcb6b specify mixin refmaps 2022-07-06 17:15:08 -07:00
dfsek a1acfef721 fix remapping 2022-07-06 16:42:32 -07:00
dfsek 7bef490125 increase Gradle memory 2022-07-06 16:10:29 -07:00
dfsek 8a2c54c85b Merge pull request #335 from duplexsystem/dev/enviroment
make villager biome types work and also quilt
2022-07-06 14:55:05 -07:00
Zoë ef4a28fd23 Revert "remove dep because we shade"
This reverts commit 19e46fbe4c.
2022-07-06 13:05:59 -07:00
Zoë 10d44ce217 Expand the AwfulHacks series 2022-07-06 00:51:47 -07:00
Zoë 36ceabd749 Refactor Mixin build setup 2022-07-06 00:26:42 -07:00
Zoë 29e1d05c71 quilt works! 2022-07-05 22:57:03 -07:00
dfsek f92ecb31a7 Merge remote-tracking branch 'Duplex/dev/enviroment' into dev/enviroment 2022-07-05 18:04:53 -07:00
dfsek b7343ca327 fix typo 2022-07-05 18:04:39 -07:00
Zoë b6d8453042 update QSL 2022-07-05 16:36:30 -07:00
Zoë 0ee359b0a3 Git ignore 2022-07-05 14:18:26 -07:00
Zoë 60046c4664 Revert "Quilt progress 2"
This reverts commit 639fc71f7a.
2022-07-05 14:18:01 -07:00
Zoë b31f917acf Fix cloud in dev env 2022-07-05 14:17:44 -07:00
Zoë 639fc71f7a Quilt progress 2 2022-07-05 12:54:27 -07:00
Zoë 8d19368999 quilt progress 2022-07-05 11:24:18 -07:00
Zoë 19e46fbe4c remove dep because we shade 2022-07-05 02:24:25 -07:00
Zoë d280e113e6 Villagers on lifecycle 2022-07-05 01:58:32 -07:00
Zoë 0e9f9bd2b0 Merge remote-tracking branch 'PolyhedralDev/ver/6.2.0' into dev/enviroment 2022-07-05 01:53:05 -07:00
Zoë 7e883ab5ce Villager Types 2022-07-05 01:52:24 -07:00
dfsek 892ba38fec specify fabric mixin in fabric-quilt shared code 2022-07-05 01:20:50 -07:00
dfsek 5da26e2b53 split most fabric and quilt code into common project 2022-07-05 01:11:32 -07:00
dfsek 2edf365781 create mixin-lifecycle project 2022-07-04 21:13:30 -07:00
dfsek 82920e570f add quilt platform implementation 2022-07-04 20:54:07 -07:00
dfsek f5da9d1dfb Merge pull request #330 from duplexsystem/dev/enviroment
moar biome settings 2: electric boogaloo
2022-07-03 22:11:26 -07:00
Zoë cdb957403e Change memory to align to 1024mb 2022-07-03 13:50:16 -07:00
Zoë 21d8be4726 abstract addon id 2022-07-03 13:44:53 -07:00
Zoë 7a4bf38cbc actually version ify burningwave 2022-06-30 22:00:21 -07:00
Zoë 18de2c3f99 Fix dev launch for fabric and forge 2022-06-30 21:58:11 -07:00
Zoë d7be33fa55 Merge remote-tracking branch 'origin/ver/6.2.0' into dev/enviroment 2022-06-29 14:18:00 -07:00
dfsek ca791026bd bump version 2022-06-27 20:20:23 -07:00
Zoë e21bb5c26d Refractor 2022-06-26 23:58:48 -07:00
Zoë 71aa42011f Spawning! 2022-06-26 23:43:15 -07:00
Zoë b0bf9d042e oops 2022-06-26 22:02:18 -07:00
Zoë dbd5edabae Imports 2022-06-26 21:48:38 -07:00
Zoë 4487be03f1 Merge remote-tracking branch 'duplexsystem/dev/enviroment' into ver/6.2.0 2022-06-26 21:46:18 -07:00
dfsek 3610230c71 Merge pull request #328 from PolyhedralDev/dev/architectury
Use Architectury to share mixins and mod code not dependent on mod loader
2022-06-25 13:34:10 -07:00
dfsek 6e6a378225 Merge pull request #326 from Astrashh/patch-1
Use correct dimensions in TS sampler function
2022-06-24 17:58:04 -07:00
dfsek b05852e074 make slf4j testImplementation 2022-06-24 17:50:40 -07:00
dfsek cffdf7aeeb use Fabric Loom 2022-06-24 16:00:47 -07:00
dfsek e4d05312aa ignore mixins from common package in AwfulForgeHacks 2022-06-24 16:00:35 -07:00
Astrashh 0997326aef Use correct dimensions in TS sampler function 2022-06-24 17:53:54 +10:00
dfsek 3139416b35 rename mod-common to mixin-common 2022-06-22 07:23:39 -07:00
dfsek 42cf7b9543 move DataPackContentsMixin to common 2022-06-22 06:31:38 -07:00
dfsek 2ae4f80351 move tagutil into common 2022-06-22 06:10:41 -07:00
dfsek 3b156586dc common-ify LifecycleUtil 2022-06-21 18:21:54 -07:00
dfsek 6ba4a48e29 move biomeutil stuff into common 2022-06-21 18:00:48 -07:00
dfsek 7c2908e5ca move most mod code into mod common 2022-06-21 17:53:46 -07:00
dfsek 2a24fa56d7 move seedhack into common 2022-06-21 16:01:59 -07:00
dfsek 2a6d130d20 move world handle into common module 2022-06-21 15:48:09 -07:00
dfsek 1a1000bbef fix forge build 2022-06-21 15:38:28 -07:00
dfsek e1cbb29ae4 begin splitting mixins into common 2022-06-21 14:46:50 -07:00
dfsek 37c358e3d1 rename all platform references 2022-06-21 11:12:35 -07:00
dfsek 32b2f15f3b fix chunk generator codec name 2022-06-21 10:26:58 -07:00
dfsek 752f57bbea fix addon ID 2022-06-21 10:26:20 -07:00
dfsek e2bb2d8712 refactor handles 2022-06-21 10:25:52 -07:00
dfsek aeb2da4ede refactor chunk generator wrapper name 2022-06-21 10:25:23 -07:00
dfsek 0c02e4cb9a rename architectury implementation util class 2022-06-21 09:59:54 -07:00
dfsek 546431bbef clean up adapter 2022-06-21 09:59:16 -07:00
dfsek 111eb6b593 fix NoiseConfigMixin 2022-06-21 07:22:07 -07:00
dfsek 7c2982aa0a use registerhelper to register biomes 2022-06-20 23:33:14 -07:00
dfsek e1656bac20 create registry sanity check 2022-06-20 23:25:03 -07:00
dfsek a0225d6ece legitimately evil hack to fix forge weirdness 2022-06-20 23:08:22 -07:00
dfsek 13497a02a4 register stuff with events 2022-06-20 21:46:06 -07:00
dfsek c120ab76d0 Revert "remove RegistryMixin"
This reverts commit 14273268
2022-06-20 21:35:32 -07:00
dfsek a47541cfeb use annotation event subscriptions 2022-06-20 21:34:52 -07:00
dfsek 14273268c8 remove RegistryMixin 2022-06-20 21:03:30 -07:00
dfsek cce9b69c45 load terra data on RegisterEvent 2022-06-20 20:05:02 -07:00
dfsek e85afd7dd6 convert most lifecycle mixins to event listeners 2022-06-20 19:37:17 -07:00
dfsek f3329bbff1 rename mixin configs 2022-06-20 18:33:28 -07:00
dfsek c6428cff66 make slf4j compileOnlyAPI 2022-06-20 13:58:45 -07:00
dfsek cb4c8f28ef clean up bukkit buildscript 2022-06-19 23:27:30 -07:00
dfsek 0829960232 simplify Fabric buildscript 2022-06-19 23:08:52 -07:00
dfsek 924783adb2 clean up buildscript 2022-06-19 22:47:06 -07:00
dfsek 86d34347db graceful fallback if resource cannot be loaded 2022-06-19 22:46:46 -07:00
dfsek ccb8adec10 architectury launches now 2022-06-19 22:11:12 -07:00
dfsek 98a9035ae8 begin architectury implementation 2022-06-19 21:24:22 -07:00
dfsek 536733911b meta annotate BiomeExtrusionTemplate 2022-06-19 17:50:47 -07:00
dfsek 865ec58d70 fix Column erroneously caching 2022-06-19 02:05:36 -07:00
dfsek 33ca98ccaf dont shade caffeine into pipeline addon 2022-06-19 01:01:12 -07:00
dfsek 41fc28e1e9 use biome query API in ReplaceExtrusion 2022-06-19 00:34:03 -07:00
dfsek abca785b1e refactor query addon package 2022-06-19 00:25:54 -07:00
dfsek 92d173cb89 rename tag addon to query addon 2022-06-19 00:20:42 -07:00
dfsek dff2388b37 implement biome query API 2022-06-19 00:19:07 -07:00
dfsek 2f2fb54dea create biome tag API module 2022-06-18 23:58:37 -07:00
dfsek 2daac81565 update to cloud 1.7.0 2022-06-18 23:53:48 -07:00
dfsek 901b58f56a use Caffeine cache in SamplerProvider 2022-06-18 23:52:27 -07:00
dfsek 3000547ee9 cache column in ChunkInterpolator 2022-06-18 23:31:52 -07:00
dfsek 15fec550c7 use column in ChunkInterpolator and NoiseChunkGenerator3D 2022-06-18 03:31:23 -07:00
dfsek c49202017f implement BaseBiomeColumn 2022-06-18 03:14:53 -07:00
dfsek 78d34498d9 add caching option to config pack 2022-06-18 02:33:25 -07:00
dfsek 8a2024e8d8 remove BiomeProviderHolder 2022-06-18 02:02:38 -07:00
dfsek 7de66fecf8 remove ChunkLocalCachingBiomeProvider 2022-06-18 02:01:06 -07:00
dfsek 642372eaa1 add caffeine as API 2022-06-18 01:28:48 -07:00
dfsek 6a95810e65 use max-1 as max Y in LazilyEvaluatedInterpolator 2022-06-18 01:16:36 -07:00
dfsek 4c6c284b93 properly clamp max Y in LazilyEvaluatedInterpolator 2022-06-18 01:10:18 -07:00
dfsek 1d8c012ae5 fix MatchPattern 2022-06-18 00:56:58 -07:00
dfsek 522d4e4d3a use vanilla getBaseColumn 2022-06-17 17:51:30 -07:00
dfsek 915dcf9b9b cache biome providers on Bukkit 2022-06-17 17:39:27 -07:00
dfsek 4dd43ea86d collapse single-entry probability collections to singletons 2022-06-17 16:28:32 -07:00
dfsek 21ec335db9 store cache between same column instances with different clamps 2022-06-17 01:44:21 -07:00
dfsek 46c03438b3 add optimization for AdjacentPatternLocator 2022-06-17 01:34:11 -07:00
dfsek 9ced14b813 clean up 2022-06-17 01:22:07 -07:00
dfsek d2055d60fd optimize caching biomes in CLIWorld 2022-06-17 00:53:34 -07:00
dfsek 529cd463de add cli run task 2022-06-17 00:40:49 -07:00
dfsek ab78bea9aa pull CLI versions to Versions.kt 2022-06-17 00:00:46 -07:00
dfsek 5df016e43e pull bukkit versions to Versions.kt 2022-06-16 23:58:25 -07:00
dfsek cacfd66cf7 pull all fabric versions to Versions.kt 2022-06-16 23:55:22 -07:00
dfsek fce8c823be bump fabric api version 2022-06-16 23:53:21 -07:00
dfsek 036a166909 fix ParserTest 2022-06-16 23:40:52 -07:00
dfsek 36682bc04c add biome sound configs 2022-06-16 22:02:08 -07:00
dfsek 7574c356a0 apply particles on Bukkit 2022-06-16 21:58:48 -07:00
dfsek e1ce5e117c apply vanilla biome particle config 2022-06-16 21:57:50 -07:00
dfsek ef0692977c bump terrascript addon version 2022-06-16 20:17:42 -07:00
dfsek cfdce200dd bump feature stage addon version 2022-06-16 20:17:11 -07:00
dfsek 727f7ce2fb bump locator addon version 2022-06-16 20:16:53 -07:00
dfsek bcae15225f fix matchpattern when min >= max 2022-06-16 17:47:54 -07:00
dfsek baccd04c8d use correct y value in LazilyEvaluatedInterpolator 2022-06-16 17:21:46 -07:00
dfsek 34b1aca556 fix Minecraft bee issue 2022-06-16 16:46:44 -07:00
dfsek ba179c0991 add BeeMoveGoalsUnsynchronizedRandomAccessFix 2022-06-16 16:37:14 -07:00
dfsek 01ba75a29b refactor mixins 2022-06-16 16:17:12 -07:00
dfsek c96e908a1e fix Fabric entity spawning 2022-06-16 15:59:25 -07:00
dfsek 355805347b fix feature context registration 2022-06-16 02:04:31 -07:00
dfsek e13f8163a2 simplify ChunkRegionMixin height accessors 2022-06-16 02:01:24 -07:00
dfsek 099d5f60c8 use propertykey for features 2022-06-16 01:56:44 -07:00
dfsek 80583e1596 add alternative methods for interacting with Context 2022-06-16 01:53:02 -07:00
dfsek c83924a7a4 remove unneeded resolution application 2022-06-15 23:38:29 -07:00
dfsek 9081f3a004 use resolution in CachingBiomeProviders 2022-06-15 23:08:12 -07:00
dfsek cfeeb432ea fully implement resolution in BiomeExtrusionProvider 2022-06-15 21:54:47 -07:00
dfsek c31925f383 add default #resolution method in BiomeProvider 2022-06-15 21:49:41 -07:00
dfsek 72ad5b65df remove unneeded floorToInt in BiomePipelineProvider 2022-06-15 21:49:24 -07:00
dfsek b7c381b0f9 dont use column in ChunkInterpolator 2022-06-15 21:46:20 -07:00
dfsek 7b23aa796f fix OOBE in NoiseChunkGenerator3D when using low res palette 2022-06-15 21:43:02 -07:00
dfsek 2c44857575 fix palette fuzz noise config 2022-06-15 20:23:05 -07:00
dfsek 2001b4c6f8 remove TerraScript PerformanceTest 2022-06-15 20:03:32 -07:00
dfsek d73872a1c6 properly access 3d biomes in LazilyEvaluatedInterpolator 2022-06-15 19:55:06 -07:00
dfsek 23a35f8097 implement blockstate cache in Column 2022-06-15 18:59:12 -07:00
dfsek df4636428c remove unneeded fabric permissions API dependency 2022-06-15 00:09:10 -07:00
dfsek 589e46477e fix low res column 2022-06-14 23:56:02 -07:00
dfsek 11cf4c3a95 add NetherFossilOptimization 2022-06-14 23:23:00 -07:00
dfsek 7d92d273cf dont use range iterator in MatchPattern 2022-06-14 22:42:10 -07:00
dfsek e5fa4fd1f1 remove decimal on whole numbers (keeps parity with old scripts) 2022-06-14 22:18:31 -07:00
dfsek 8c9afc4592 recursively update variable table size 2022-06-14 22:01:54 -07:00
dfsek 3122962dc1 fix Function#applyDouble 2022-06-14 21:54:19 -07:00
dfsek 14e035bf2e use applyDouble and applyBoolean in applicable ops 2022-06-14 21:51:05 -07:00
dfsek b2cc0d48aa use local variable table for terrascript 2022-06-14 21:30:58 -07:00
dfsek 613b96288a add primitive overrides to TerraScript items 2022-06-14 19:09:43 -07:00
dfsek 8b12dda604 fix OOBE with low res column 2022-06-14 18:57:01 -07:00
dfsek 61a40b4825 remove unneeded specialised column impl 2022-06-14 18:56:51 -07:00
dfsek eac8d3b4e8 add resolution parameter to Column#forRanges 2022-06-14 18:34:58 -07:00
dfsek 5799b81414 use chunklocal cache for misses in FabricChunkGeneratorWrapper 2022-06-14 18:32:43 -07:00
dfsek 1aa73bf742 optimise equals and hashCode of SeededVector 2022-06-14 09:07:41 -07:00
dfsek 9f6dcfd71b drastically optimize ChunkLocalCachingBiomeProvider 2022-06-13 23:13:41 -07:00
dfsek d80d653d3a optimization for when palette resolution is 1 2022-06-13 22:46:22 -07:00
dfsek 4f92205085 palette blend resolution default to 1 2022-06-13 22:45:31 -07:00
dfsek b62c4d742f drastically optimize ChunkInterpolator 2022-06-13 22:39:39 -07:00
dfsek 012209cfcf implement palette sparse sampling 2022-06-13 15:42:15 -07:00
dfsek 4d6d14a3d8 inject palette resolution options 2022-06-13 13:56:46 -07:00
dfsek 7f05933a1a add palette resolution config options 2022-06-13 13:54:10 -07:00
dfsek 29d8e7eed4 caching biome provider in BukkitProtoWorld 2022-06-13 10:07:08 -07:00
dfsek 3cf680ab88 Merge remote-tracking branch 'origin/ver/6.1.2' into ver/6.2.0
# Conflicts:
#	platforms/fabric/src/main/resources/terra.mixins.json
2022-06-13 09:57:18 -07:00
dfsek 9abac34b83 Merge pull request #323 from PolyhedralDev/ver/6.1.2
Reimplement Cloud and update Bukkit implementation to 1.19 with Paperweight
2022-06-12 22:26:43 -07:00
dfsek 9d6ad582d8 more clear palette level logic 2022-06-12 01:41:39 -07:00
dfsek 0aadfdb356 allow meta on updatePalette 2022-06-12 01:14:35 -07:00
dfsek 7d6746ad47 allow metaconfiguration on PaletteLayerLoader 2022-06-12 01:02:16 -07:00
dfsek 5409725709 fix palette level when caves use palettes 2022-06-12 00:10:44 -07:00
dfsek 779834267e fix BiomeProviderHolder NPE 2022-06-11 23:56:28 -07:00
dfsek a33982a432 add carving.update-palette option 2022-06-11 23:30:53 -07:00
dfsek 881477c42f use ChunkLocalCachingBiomeProvider 2022-06-11 21:50:04 -07:00
dfsek d58eb699f1 create ChunkLocalCachingBiomeProvider 2022-06-11 21:39:15 -07:00
dfsek 1aa0c715b9 properly implement caching getColumn 2022-06-11 21:16:46 -07:00
dfsek db61729e11 pass caching provider through all stages 2022-06-11 21:11:20 -07:00
dfsek dbadef5672 add null check for biome provider 2022-06-11 20:58:41 -07:00
dfsek aac16414d9 attach caching biome provider to protochunk 2022-06-11 20:50:48 -07:00
dfsek 47d2b66046 fix getHeight again 2022-06-11 12:58:49 -07:00
dfsek e2ba671626 add replace extrusion 2022-06-11 02:46:59 -07:00
dfsek 0cb29e471e use column sampler in NoiseChunkGenerator3D 2022-06-11 02:33:51 -07:00
dfsek ad5435f69d use column in ChunkInterpolator 2022-06-11 02:27:45 -07:00
dfsek c9221ca64c implement feature stage resolution 2022-06-11 01:47:32 -07:00
dfsek e5f0e64cf3 fix ChunkInterpolator 3d biome fetching 2022-06-11 00:33:29 -07:00
dfsek 2c5567296d add extruded biomes to provider list 2022-06-10 18:56:00 -07:00
dfsek 2da54b9843 use base biome in ElevationInterpolator 2022-06-10 18:52:21 -07:00
dfsek 8126f3c2be implement getBaseBiome 2022-06-10 18:50:34 -07:00
dfsek 3b2f2ab679 add optional getBaseBiome method 2022-06-10 18:47:22 -07:00
dfsek ee6ecb9613 fix getHeight in air section 2022-06-10 18:33:58 -07:00
dfsek 12d51e3f27 fix extrusion registration 2022-06-10 18:31:10 -07:00
dfsek d71b1ca984 implement ExtrusionColumn 2022-06-10 18:18:31 -07:00
dfsek 37d98df8c3 use extrusions to calculate biomes 2022-06-10 17:36:16 -07:00
dfsek 132a200e43 create and register SetExtrusionTemplate 2022-06-10 17:33:41 -07:00
dfsek aa5947a9bd create BiomeExtrusionTemplate 2022-06-10 17:15:28 -07:00
dfsek deb6de3d6c implement ReplaceableBiome 2022-06-10 17:09:39 -07:00
dfsek b148401f0f null entity 2022-06-10 15:28:48 -07:00
dfsek 33a39cb237 optimize biome pipeline cache for 3 dimensions 2022-06-10 15:23:06 -07:00
dfsek 8f5d2c80f4 cache biome provider in chunkregion 2022-06-10 15:02:46 -07:00
dfsek 50f895c8f4 begin implementing BiomeExtrusionAddon 2022-06-10 14:48:59 -07:00
dfsek dad0a0bd29 create extrusion biome provider project 2022-06-10 14:15:25 -07:00
dfsek 4a3f21f8f7 add loom-quiltflower plugin 2022-06-10 13:51:35 -07:00
dfsek 47d2ec6bb0 update Loom run addon configuration 2022-06-10 13:39:04 -07:00
dfsek 0e815500d0 update Loom 2022-06-10 13:36:43 -07:00
dfsek 6d2a634686 registerChecked config packs 2022-06-09 23:23:44 -07:00
dfsek 158adb55af bound check SurfaceLocator 2022-06-09 16:09:54 -07:00
dfsek dc80fc1ffb fix BiomeProvider#getColumn 2022-06-09 16:09:46 -07:00
dfsek 09e7d58eaf add ColumnTest#testForRangesContiguous 2022-06-09 15:33:35 -07:00
dfsek cc9f9cc8d8 fix Column 2022-06-09 15:28:33 -07:00
dfsek 7ce8dfbc65 add ColumnTest#testForRangesIndividual 2022-06-09 15:24:43 -07:00
dfsek d95e998e5d add test for Column 2022-06-09 15:21:54 -07:00
dfsek 81023e1d67 bounds check 2022-06-09 14:44:21 -07:00
dfsek 6434b6b213 delegate constructor 2022-06-09 13:39:25 -07:00
dfsek 20c7f2f1fb fix SurfaceLocator 2022-06-09 13:21:48 -07:00
dfsek e5e926cf10 fix column iterator 2022-06-09 13:17:36 -07:00
dfsek 544b3767d2 remove column check 2022-06-09 13:04:05 -07:00
dfsek 876e4b86ae add y to exception message 2022-06-09 08:29:08 -07:00
dfsek 089710247b fix range sample 2022-06-09 08:29:00 -07:00
dfsek 0797c113a6 cache columns in BiomeProvider 2022-06-09 08:12:36 -07:00
dfsek 1e3cb91ed2 fix max/min assignment 2022-06-09 07:52:02 -07:00
dfsek dcc6f025a6 fix oobe in ChunkInterpolator 2022-06-08 23:06:01 -07:00
Zoë f23e7f29fd Merge remote-tracking branch 'origin/ver/6.2.0' into biomestuff 2022-06-08 22:18:49 -05:00
Zoë 3c94b5960d More environment settings for fabric 2022-06-08 22:18:21 -05:00
dfsek 245acde336 use 3d biomes in FeatureGenerationStage 2022-06-08 19:17:00 -07:00
dfsek 53df9a47fc add Column#clamp 2022-06-08 19:13:57 -07:00
dfsek f036bddf9e add Column#forRanges 2022-06-08 19:03:52 -07:00
dfsek 3d4e2e4263 use y-level in ChunkInterpolator 2022-06-08 18:53:57 -07:00
dfsek 111470c9f4 bump noise-chunk-generator-3d addon version 2022-06-08 18:39:45 -07:00
dfsek 8a1d329fd9 use biome y-level for palette in NoiseChunkGenerator3D 2022-06-08 18:39:19 -07:00
dfsek 2307138fa8 add IntObjConsumer and forEach implementation in Column 2022-06-08 18:35:49 -07:00
dfsek 84cb428b6c add BiomeProvider#getColumn 2022-06-08 18:33:31 -07:00
dfsek c46f84a00e create Column interface 2022-06-08 18:27:08 -07:00
1167 changed files with 26907 additions and 16378 deletions
+7 -7
View File
@@ -8,7 +8,7 @@ indent_style = space
insert_final_newline = false
max_line_length = 140
tab_width = 4
ij_continuation_indent_size = 8
ij_continuation_indent_size = 4
ij_formatter_off_tag = @formatter:off
ij_formatter_on_tag = @formatter:on
ij_formatter_tags_enabled = false
@@ -25,12 +25,12 @@ ij_java_align_multiline_annotation_parameters = true
ij_java_align_multiline_array_initializer_expression = true
ij_java_align_multiline_assignment = true
ij_java_align_multiline_binary_operation = true
ij_java_align_multiline_chained_methods = true
ij_java_align_multiline_chained_methods = false
ij_java_align_multiline_extends_list = true
ij_java_align_multiline_for = true
ij_java_align_multiline_method_parentheses = true
ij_java_align_multiline_method_parentheses = false
ij_java_align_multiline_parameters = true
ij_java_align_multiline_parameters_in_calls = true
ij_java_align_multiline_parameters_in_calls = false
ij_java_align_multiline_parenthesized_expression = true
ij_java_align_multiline_records = true
ij_java_align_multiline_resources = true
@@ -127,7 +127,7 @@ ij_java_keep_blank_lines_in_declarations = 2
ij_java_keep_builder_methods_indents = true
ij_java_keep_control_statement_in_one_line = true
ij_java_keep_first_column_comment = false
ij_java_keep_indents_on_empty_lines = true
ij_java_keep_indents_on_empty_lines = false
ij_java_keep_line_breaks = true
ij_java_keep_multiple_expressions_in_one_line = false
ij_java_keep_simple_blocks_in_one_line = true
@@ -577,14 +577,14 @@ ij_properties_keep_blank_lines = false
ij_properties_key_value_delimiter = equals
ij_properties_spaces_around_key_value_delimiter = false
[{*.yaml, *.yml}]
[{*.yml, *.yaml}]
indent_size = 2
ij_visual_guides = none
ij_yaml_align_values_properties = do_not_align
ij_yaml_autoinsert_sequence_marker = true
ij_yaml_block_mapping_on_new_line = false
ij_yaml_indent_sequence_value = true
ij_yaml_keep_indents_on_empty_lines = true
ij_yaml_keep_indents_on_empty_lines = false
ij_yaml_keep_line_breaks = true
ij_yaml_sequence_on_new_line = false
ij_yaml_space_before_colon = false
+7 -12
View File
@@ -1,19 +1,14 @@
# Global owners, automatically request review when pull request is submitted
* @dfsek @solonovamax
* @dfsek @solonovamax @duplexsystem @astrsh @justaureus
# Platforms
## dfsek wrote the majority of the platform impls
/platforms/bukkit/ @dfsek
/platforms/fabric/ @dfsek
/platforms/forge/ @dfsek
/platforms/sponge/ @dfsek
## solonovamax is working on the region generator (unless duplexsystem takes it over)
/platforms/region/ @solonovamax
/platforms/ @dfsek @solonovamax @duplexsystem @justaureus
/platforms/bukkit @dfsek @solonovamax @duplexsystem @justaureus @OakLoaf
# Common
/common/ @dfsek @solonovamax
/common/ @dfsek @solonovamax @duplexsystem @astrsh
# Gradle Stuff
## Most gradle stuff was written by solonovamax
/buildSrc/ @solonovamax
*.gradle.kts @solonovamax
/buildSrc/ @dfsek @solonovamax @duplexsystem
*.gradle.kts @dfsek @solonovamax @duplexsystem
/gradle/ @dfsek @solonovamax @duplexsystem
+8 -8
View File
@@ -43,7 +43,7 @@ assignees: ""
is Terra that is causing the issue.
- [ ] I have checked that this is an issue with Terra and not an issue with the
pack I am using.
<!-- If this is an issue with the default Terra pack, please open an issue on the pack repo: https://github.com/PolyhedralDev/TerraDefaultConfig/issues/new -->
<!-- If this is an issue with the default Terra pack, please open an issue on the pack repo: https://github.com/PolyhedralDev/TerraOverworldConfig/issues/new -->
- [ ] I have attached a copy of the `latest.log` file
- [ ] I have filled out and provided all the appropriate information.
@@ -51,13 +51,13 @@ assignees: ""
<!-- You can fill out the different items by putting the correct value beside each cell. -->
| Name | Value |
|------------------------------|-------|
| Terra Version | <!-- Put your Terra version here. (remove the comment) -->
| Platform / Platform Version | <!-- Put your platform and platform version here. (remove the comment) (eg. Spigot, Fabric, Paper, etc.) (If you are using the Region generator, put that here instead) -->
| Any External Plugins or Mods | <!-- Put a list of all the plugins or mods you have installed here. (remove the comment) (Make sure to NOT include any new lines) -->
| Terra Packs In Use | <!-- Put a list of all the Terra packs you have installed here. (remove the comment) (Make sure to NOT include any new lines) (/te packs may be used to get a list) -->
| Terra Addons In Use | <!-- Put a list of all the Terra addons you have installed here. (remove the comment) (Make sure to NOT include any new lines) (/te addons may be used to get a list) -->
| Name | Value |
|------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Terra Version | <!-- Put your Terra version here. (remove the comment) -->
| Platform / Platform Version | <!-- Put your platform and platform version here. (remove the comment) (eg. Spigot, Fabric, Paper, etc.) (If you are using the Region generator, put that here instead) -->
| Any External Plugins or Mods | <!-- Put a list of all the plugins or mods you have installed here. (remove the comment) (Make sure to NOT include any new lines) -->
| Terra Packs In Use | <!-- Put a list of all the Terra packs you have installed here. (remove the comment) (Make sure to NOT include any new lines) (/te packs may be used to get a list) -->
| Terra Addons In Use | <!-- Put a list of all the Terra addons you have installed here. (remove the comment) (Make sure to NOT include any new lines) (/te addons may be used to get a list) -->
## Issue Description
+69 -83
View File
@@ -1,58 +1,19 @@
# Pull Request
## Brief description.
## Description
<!-- Please provide a brief description of the goals of your PR -->
<!-- Include a description of the PR here -->
<!--
###########################################################################
## WARNING! ##
## IGNORING THE FOLLOWING TEMPLATE WILL RESULT IN YOUR PR BEING CLOSED ##
###########################################################################
-->
<!--
Please go through this checklist item by item and make sure you have successfully completed each of these steps.
- Your pull request MUST be either on the latest version of Terra, or on a branch for a future release.
- Make sure that there are no already existing PRs that fix this. If so, it will be closed as a duplicate.
- Make sure that this change is actually within the scope of Terra and is something a terrain generator should be doing.
- Make sure that this is not an issue with a specific Terra *pack*, and instead applies to all of Terra.
- Make sure that you have filled out all the required information and given descriptions of everything.
-->
<!-- You can erase any parts of this template not applicable to your Pull Request. -->
### What Issues Does This Fix?
<!--
Put Fix #XXXX or Closes #XXXX here if there are any open issues that this PR fixes.
This is to automatically close the relevant issues.
You may remove this if there is no issue for this PR.
But unless this is a very small change, you should make an issue for it.
If applicable, include 'Fixes #XXXX' or 'Closes #XXXX' for any related open issues.
This helps us relate, track, and close the relevant issues.
-->
## Licensing
<!-- In order to be accepted, your changes must be under the GPLv3 license. Please check one of the following: -->
- [ ] I am the original author of this code, and I am willing to release it
under [GPLv3](https://www.gnu.org/licenses/gpl-3.0.en.html).
- [ ] I am not the original author of this code, but it is in public domain or
released under [GPLv3](https://www.gnu.org/licenses/gpl-3.0.en.html) or a
compatible license.
<!--
Please provide reliable evidence of this.
NOTE: for compatible licenses, you must make sure to add the included license somewhere in the program, if so required.
(And even if it's not required, it's still nice to do it. Also add attribution somewhere.)
-->
## Goal of the PR
### Changelog
<!--
What is the goal of the PR?
Put a checklist here of what has been done
(and what *hasn't*, but you plan to do),
so we can easily know what was changed.
Note: this is only required for PRs that add new features.
If your PR is not adding new features, only fixing bugs or adding translations, then you may delete this section.
Fill out a changelog below of what has been done, and what might be planned to be done.
You may delete this if your PR is not adding new features, only fixing bugs or adding translations.
-->
- [ ] <!-- First thing -->
@@ -61,47 +22,58 @@
- [ ] <!-- Second thing -->
- [ ] <!-- etc. -->
## Affects of the PR
## Checklist
<!---
What types of changes does your code introduce? (Select any that apply. You may select multiple.)
You must put an x in all the boxes that it applies to. (Like this: [x])
<!--
Select the options below that apply.
You must put an x in all the boxes that it applies to. (Like this: [x])
-->
#### Mandatory checks
- [ ] The base branch of this PR is an unreleased version branch (that has a `ver/` prefix)
or is a branch that is intended to be merged into a version branch.
<!--
This is not applicable if the PR is a version branch itself.
PRs for new versions should use the `master` branch instead.
-->
- [ ] There are no already existing PRs that provide the same changes.
<!-- If this is not applicable, the PR will be removed as a duplicate. -->
- [ ] The PR is within the scope of Terra (i.e. is something a configurable terrain generator should be doing).
- [ ] Changes follow the code style for this project.
<!-- There is an included `.editorconfig` file in the base of the repo. Please use a plugin for your IDE of choice that follows those settings. -->
- [ ] I have read the [`CONTRIBUTING.md`](https://github.com/PolyhedralDev/Terra/blob/master/CONTRIBUTING.md)
document in the root of the git repository.
#### Types of changes
- [ ] Bug Fix <!-- Anything which fixes an issue in Terra. -->
- [ ] Build system <!-- Anything which pretain to the build system. -->
- [ ] Documentation <!-- Anything which adds or improves documentation for existing features. -->
- [ ] New Feature <!-- Anything which adds new functionality to Terra. -->
- [ ] Performance <!-- Anything which is imrpoves the performance of Terra. -->
- [ ] Refactoring <!-- Anything which does not add any new code, only moves code around. -->
- [ ] Repository <!-- Anything which affects the repository. Eg. changes to the `README.md` file. -->
- [ ] Revert <!-- Anything which reverts previous commits. -->
- [ ] Style <!-- Anything which updates style. -->
- [ ] Tests <!-- Anything which adds or updates tests. -->
- [ ] Translation <!-- Anything which is internationalizing the Terra program to other languages. -->
- [ ] Bug Fix <!-- Changes include bug fixes. -->
- [ ] Build system <!-- Changes the build system. -->
- [ ] Documentation <!-- Changes add to or improve documentation. -->
- [ ] New Feature <!-- Changes add new functionality to Terra. -->
- [ ] Performance <!-- Changes improve the performance of Terra. -->
- [ ] Refactoring <!-- Changes do not add any new code, only moves code around. -->
- [ ] Repository <!-- Changes affect the repository. E.g. changes to the `README.md` file. -->
- [ ] Revert <!-- Changes revert previous commits. -->
- [ ] Style <!-- Changes update style, namely the .editorconfig file. -->
- [ ] Tests <!-- Changes add or update tests. -->
- [ ] Translation <!-- Changes include translations to other languages for Terra. -->
#### Compatiblity
#### Compatibility
- [ ] Breaking
change <!-- A fix, or a feature, that breaks some previous functionality to Terra. -->
- [ ] Non-Breaking change.
<!--
A change which does not break *any* previous functionality of Terra.
(ie. is backwards compatible and will work with *any* previously existing supported features.
Note: if a feature is annotated with @Incubating, @Preview, @Experimental,
or is in a package called something similar to the previous annotations,
then you may push breaking changes to only THOSE parts of Terra.)
-->
<!-- The following options determine if the PR pertains to a major, minor, or patch version bump -->
#### Contribution Guidelines.
- [ ] I have read
the [`CONTRIBUTING.md`](https://github.com/PolyhedralDev/Terra/blob/master/CONTRIBUTING.md)
document in the root of the git repository.
- [ ] My code follows the code style for this
project. <!-- There is an included `.editorconfig` file in the base of the repo. Please use a plugin for your IDE of choice that follows those settings. -->
- [ ] Introduces a breaking change
<!--
Breaking changes are any fix or feature that breaks some previous functionality to Terra / is not backwards compatible.
Breaking changes do not include:
- changes that are backwards compatible and will work with *any* previously existing supported features.
- changes to code marked as in a pre-release
state (annotated with @Incubating, @Preview, @Experimental
or in a package called something similar to the previous annotations)
-->
- [ ] Introduces new functionality in a backwards compatible way.
- [ ] Introduces bug fixes
#### Documentation
@@ -112,7 +84,21 @@
- [ ] I have added tests to cover my changes.
- [ ] All new and existing tests passed.
<!--
If it only introduces small changes, you don't need to add tests.
But if you add big changes, you should probably at least write *some* testing, where applicable.
-->
<!--
Tests are typically not necessary for small changes.
Including *some* testing is recommended for large changes where applicable.
-->
#### Licensing
<!-- In order to be accepted, your changes must be under the GPLv3 license. Please check one of the following: -->
- [ ] I am the original author of this code, and I am willing to
release it under [GPLv3](https://www.gnu.org/licenses/gpl-3.0.en.html).
- [ ] I am not the original author of this code, but it is in public domain or
released under [GPLv3](https://www.gnu.org/licenses/gpl-3.0.en.html) or a compatible license.
<!--
Please provide reliable evidence of this.
NOTE: for compatible licenses, you must make sure to add the included license somewhere in the program, if so required.
(And even if it's not required, it's still nice to do it. Also add attribution somewhere.)
-->
+47
View File
@@ -0,0 +1,47 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a package using Gradle and then publish it to GitHub packages when a release is created
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#Publishing-using-gradle
name: Gradle Build
on: [ pull_request ]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4.2.2
- name: Set up JDK 21
uses: actions/setup-java@v4.7.1
with:
java-version: '21'
distribution: 'temurin'
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file
- uses: burrunan/gradle-cache-action@v3.0.1
name: Build Terra
with:
# Specifies arguments for Gradle execution
# If arguments is missing or empty, then Gradle is not executed
arguments: build
# arguments can be multi-line for better readability
# arguments: |
# --no-paralell
# build
# -x test
# Gradle version to use for execution:
# wrapper (default), current, rc, nightly, release-nightly, or
# versions like 6.6 (see https://services.gradle.org/versions/all)
gradle-version: wrapper
# Properties are passed as -Pname=value
properties: |
kotlin.js.compiler=ir
kotlin.parallel.tasks.in.project=true
+6 -1
View File
@@ -245,4 +245,9 @@ nbdist/
/run/
**/testDir/
**/testDir/
platforms/**/run/**
#Vale Config File
**/.vale.ini
+14 -34
View File
@@ -315,19 +315,15 @@ Terra has a global moderation team which is currently comprised of the following
members:
- solonovamax
-
discord: [@solonovamax#6983](https://discord.com/channels/@me/566146322273402881)*
- discord: [@solonovamax#6983](https://discord.com/channels/@me/566146322273402881)*
- github: [@solonovamax](https://github.com/solonovamax)
-
email: [solonovamax@12oclockpoint.com](mailto:solonovamax@12oclockpoint.com)
- email: [solonovamax@12oclockpoint.com](mailto:solonovamax@12oclockpoint.com)
- dfsek
-
discord: [@dfsek#4208](https://discord.com/channels/@me/378350362236682240)*
- discord: [@dfsek#4208](https://discord.com/channels/@me/378350362236682240)*
- github: [@dfsek](https://github.com/dfsek)
- email: [dfsek@protonmail.com](mailto:dfsek@protonmail.com)
- duplex (duplexsystem)
-
discord: [@Duplex#0797](https://discord.com/channels/@me/356822848641171456)*
- discord: [@Duplex#0797](https://discord.com/channels/@me/356822848641171456)*
- github: [@duplexsystem](https://github.com/duplexsystem)
- email: [duplexsys@protonmail.com](mailto:duplexsys@protonmail.com)
@@ -401,32 +397,17 @@ issue on this github repo, or contact a member of the global moderation team.
## License and Attribution
This set of guidelines is distributed under a
[Creative Commons Attribution-ShareAlike license](https://creativecommons.org/licenses/by-sa/3.0/)
.
[Creative Commons Attribution-ShareAlike license](https://creativecommons.org/licenses/by-sa/3.0/).
These guidelines have been adapted from
[Mozilla's Community Participation Guidelines](https://www.mozilla.org/en-US/about/governance/policies/participation/)
, which were adapted from:
These guidelines have been adapted with modifications from the following sources:
- Mozilla's original Community Participation Guidelines
- [Mozilla's Community Participation Guidelines](https://www.mozilla.org/en-US/about/governance/policies/participation/)
- The [Ubuntu Code of Conduct](https://ubuntu.com/community/code-of-conduct)
-
Mozilla's [View Source Conference Code of Conduct](https://viewsourceconf.org/berlin-2016/code-of-conduct/)
- And
the [Rust Language Code of Conduct](https://www.rust-lang.org/policies/code-of-conduct)
which in turn were based
on [Stumptown Syndicate's Citizen Code of Conduct](http://citizencodeofconduct.org/)
, along with some adapted text from
the [LGBTQ in Technology Code of Conduct](https://lgbtq.technology/coc.html) and
the [WisCon code of conduct](http://wiscon.net/policies/anti-harassment/code-of-conduct/)
.
It was then modified by solonovamax with various inclusions from
the [LGBTQ in Technology Code of Conduct](https://lgbtq.technology/coc.html) and
a few other sources.
- Mozilla's [View Source Conference Code of Conduct](https://viewsourceconf.org/berlin-2016/code-of-conduct/)
- The [Rust Language Code of Conduct](https://www.rust-lang.org/policies/code-of-conduct)
- The [Stumptown Syndicate's Citizen Code of Conduct](http://citizencodeofconduct.org/)
- The [LGBTQ in Technology Code of Conduct](https://lgbtq.technology/coc.html)
- The [WisCon code of conduct](http://wiscon.net/policies/anti-harassment/code-of-conduct/)
## Notes
@@ -443,7 +424,6 @@ people are not comfortable
using [neopronouns](https://www.mypronouns.org/neopronouns). But if someone
refuses to use your more common pronouns, you should report them to us.
Additionally, you may not ask people to use unreasonable pronouns, such as '
acab/acabself', 'that/bitch', 'ur/mom', or
'dream/dreamself' (pronouns related to real people, eg. the minecraft youtuber '
dreamwastaken'). Doing so will be considered mockery of individuals who use
acab/acabself', 'that/bitch', 'ur/mom', or anything else that may be considered
disrectful. Doing so will be considered mockery of individuals who use
non-standard pronouns and is very disrespectful.
+5 -2
View File
@@ -63,7 +63,8 @@ to [Terra global moderation team](CODE_OF_CONDUCT.md#Reporting).
## I don't want to read this whole thing I just have a question!!!
> **Note:** Please don't file an issue to ask a question. You'll get faster results by using the resources below.
> **Note:** Please don't file an issue to ask a question. You'll get faster
> results by using the resources below.
We have an official discord server where you can request help from various users
@@ -103,7 +104,9 @@ you don't need to create one. When you are creating a bug report,
please [include as many details as possible](#how-do-i-submit-a-good-bug-report)
.
> **Note:** If you find a **Closed** issue that seems like it is the same thing that you're experiencing, open a new issue and include a link to the original issue in the body of your new one.
> **Note:** If you find a **Closed** issue that seems like it is the same thing
> that you're experiencing, open a new issue and include a link to the original
> issue in the body of your new one.
#### Before Submitting A Bug Report
Vendored
+149
View File
@@ -0,0 +1,149 @@
pipeline {
agent any
tools {
jdk "Temurin Java 21"
}
triggers {
githubPush()
}
environment {
DISCORD_WEBHOOK_URL = credentials('polydev-discord-webhook-url')
}
stages {
stage('Checkout') {
steps {
scmSkip(deleteBuild: true)
}
}
stage('Setup Gradle') {
steps {
sh 'chmod +x gradlew'
}
}
stage('Build') {
steps {
withGradle {
sh './gradlew build --rerun-tasks -x check'
sh './gradlew javadoc'
}
}
post {
success {
archiveArtifacts artifacts: 'platforms/fabric/build/libs/Terra-fabric*.jar,platforms/bukkit/build/libs/Terra-bukkit*-shaded.jar,platforms/allay/build/libs/Terra-allay*.jar,platforms/minestom/build/libs/Terra-minestom*.jar', fingerprint: true, onlyIfSuccessful: true
javadoc javadocDir: 'common/api/build/docs/javadoc', keepAll: true
}
}
}
stage('Tests') {
steps {
withGradle {
sh './gradlew test --rerun-tasks'
}
}
}
// stage('Deploy to snapshots repositories') {
// when {
// allOf {
// not { buildingTag() }
// not { expression { env.TAG_NAME != null && env.TAG_NAME.matches('v\\d+\\.\\d+\\.\\d+') } }
// }
// }
//
// steps {
// withCredentials([
// string(credentialsId: 'maven-signing-key', variable: 'ORG_GRADLE_PROJECT_signingKey'),
// string(credentialsId: 'maven-signing-key-password', variable: 'ORG_GRADLE_PROJECT_signingPassword'),
// usernamePassword(
// credentialsId: 'solo-studios-maven',
// passwordVariable: 'ORG_GRADLE_PROJECT_SoloStudiosSnapshotsPassword',
// usernameVariable: 'ORG_GRADLE_PROJECT_SoloStudiosSnapshotsUsername'
// )
// ]) {
// withGradle {
// sh './gradlew publishAllPublicationsToSoloStudiosSnapshotsRepository'
// }
// }
// }
// }
stage('Deploy to releases repositories') {
// when {
// allOf {
// buildingTag()
// expression { env.TAG_NAME != null && env.TAG_NAME.matches('v\\d+\\.\\d+\\.\\d+') }
// }
// }
steps {
withCredentials([
string(credentialsId: 'maven-signing-key', variable: 'ORG_GRADLE_PROJECT_signingKey'),
string(credentialsId: 'maven-signing-key-password', variable: 'ORG_GRADLE_PROJECT_signingPassword'),
usernamePassword(
credentialsId: 'solo-studios-maven',
passwordVariable: 'ORG_GRADLE_PROJECT_SoloStudiosReleasesPassword',
usernameVariable: 'ORG_GRADLE_PROJECT_SoloStudiosReleasesUsername'
),
// TODO: does not yet exist (uncomment once added)
// usernamePassword(
// credentialsId: 'sonatype-maven-credentials',
// passwordVariable: 'ORG_GRADLE_PROJECT_SonatypePassword',
// usernameVariable: 'ORG_GRADLE_PROJECT_SonatypeUsername'
// ),
// usernamePassword(
// credentialsId: 'codemc-maven-credentials',
// passwordVariable: 'ORG_GRADLE_PROJECT_CodeMCPassword',
// usernameVariable: 'ORG_GRADLE_PROJECT_CodeMCUsername'
// )
]) {
withGradle {
sh './gradlew publish'
//sh './gradlew publishAllPublicationsToSoloStudiosReleasesRepository'
// sh './gradlew publishAllPublicationsToSonatypeRepository'
// sh './gradlew publishAllPublicationsToCodeMCRepository'
}
}
}
}
}
post {
always {
discoverReferenceBuild()
// junit testResults: '**/build/test-results/*/TEST-*.xml'
recordIssues(
aggregatingResults: true,
enabledForFailure: true,
minimumSeverity: 'ERROR',
sourceCodeEncoding: 'UTF-8',
checksAnnotationScope: 'ALL',
sourceCodeRetention: 'LAST_BUILD',
tools: [java(), javaDoc()]
)
discordSend(
title: env.JOB_NAME + ' ' + env.BUILD_DISPLAY_NAME,
showChangeset: true,
enableArtifactsList: true,
link: env.BUILD_URL,
result: currentBuild.currentResult,
customAvatarUrl: 'https://github.com/PolyhedralDev.png',
customUsername: 'Solo Studios Jenkins',
webhookURL: env.DISCORD_WEBHOOK_URL,
)
cleanWs()
}
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
MIT License
Copyright (c) 2020-2021 Polyhedral Development
Copyright (c) 2020-2025 Polyhedral Development
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
+1 -8
View File
@@ -47,14 +47,7 @@ JARs are produced in `platforms/<platform>/build/libs`.
To run Minecraft with Terra in the IDE (for testing) use the following tasks:
* Bukkit
* `installPaper` - Install a [Paper](https://github.com/PaperMC/Paper) test
server. (Only needs to be run once).
* `installPurpur` - Install a [Purpur](https://github.com/pl3xgaming/Purpur)
test server. (Only needs to be run once).
* `runPaper` - Run the Paper test server with Terra (`installPaper` must
have been run previously).
* `runPurpur` - Run the Purpur test server with Terra (`installPurpur` must
have been run previously).
* `runServer` - Run the Paper test server with Terra installed.
* Fabric
* `runClient` - Run a Minecraft Fabric client with Terra installed.
* `runServer` - Run a Minecraft Fabric server with Terra installed.
+16 -13
View File
@@ -1,38 +1,39 @@
preRelease(true)
versionProjects(":common:api", version("6.1.2"))
versionProjects(":common:implementation", version("6.1.2"))
versionProjects(":platforms", version("6.1.2"))
versionProjects(":common:api", version("7.0.0"))
versionProjects(":common:implementation", version("7.0.0"))
versionProjects(":platforms", version("7.0.0"))
allprojects {
group = "com.dfsek.terra"
configureCompilation()
configureDependencies()
configurePublishing()
tasks.withType<JavaCompile>().configureEach {
options.isFork = true
options.isIncremental = true
options.release.set(21)
}
tasks.withType<Test>().configureEach {
useJUnitPlatform()
maxHeapSize = "2G"
ignoreFailures = false
failFast = true
maxParallelForks = (Runtime.getRuntime().availableProcessors() - 1).takeIf { it > 0 } ?: 1
reports.html.required.set(false)
reports.junitXml.required.set(false)
}
tasks.withType<Copy>().configureEach {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
tasks.withType<Jar>().configureEach {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
@@ -42,13 +43,15 @@ afterEvaluate {
forImmediateSubProjects(":platforms") {
configureDistribution()
}
project(":platforms:bukkit:common").configureDistribution()
project(":platforms:minestom:example").configureDistribution()
forSubProjects(":common:addons") {
apply(plugin = "com.github.johnrengelman.shadow")
apply(plugin = "com.gradleup.shadow")
tasks.named("build") {
finalizedBy(tasks.named("shadowJar"))
}
dependencies {
"compileOnly"(project(":common:api"))
"testImplementation"(project(":common:api"))
+18 -18
View File
@@ -3,30 +3,30 @@ plugins {
kotlin("jvm") version embeddedKotlinVersion
}
buildscript {
configurations.all {
resolutionStrategy {
force("org.ow2.asm:asm:9.3") // TODO: remove when ShadowJar updates ASM version
force("org.ow2.asm:asm-commons:9.3")
}
}
}
repositories {
mavenCentral()
gradlePluginPortal()
maven { url = uri("https://repo.codemc.org/repository/maven-public") }
maven("https://papermc.io/repo/repository/maven-public/") {
maven("https://maven.solo-studios.ca/releases") {
name = "Solo Studios"
}
maven("https://maven.solo-studios.ca/snapshots") {
name = "Solo Studios"
}
maven("https://repo.codemc.org/repository/maven-public") {
name = "CodeMC"
}
maven("https://repo.papermc.io/repository/maven-public/") {
name = "PaperMC"
}
}
dependencies {
implementation("gradle.plugin.com.github.jengelman.gradle.plugins:shadow:+")
implementation("io.papermc.paperweight.userdev:io.papermc.paperweight.userdev.gradle.plugin:1.3.5")
implementation("org.ow2.asm:asm:9.3")
implementation("org.ow2.asm:asm-tree:9.3")
implementation("com.dfsek.tectonic:common:4.2.0")
implementation("org.yaml:snakeyaml:1.27")
//TODO Allow pulling from Versions.kt
implementation("com.gradleup.shadow", "shadow-gradle-plugin", "8.3.9")
implementation("io.papermc.paperweight.userdev", "io.papermc.paperweight.userdev.gradle.plugin", "2.0.0-beta.18")
implementation("org.ow2.asm", "asm", "9.9")
implementation("org.ow2.asm", "asm-tree", "9.9")
implementation("com.dfsek.tectonic", "common", "4.3.1")
implementation("org.yaml", "snakeyaml", "2.5")
}
+22 -22
View File
@@ -12,30 +12,30 @@ import kotlin.streams.asStream
*/
fun Project.addonDir(dir: File, task: Task) {
val moveAddons = tasks.register("moveAddons" + task.name) {
dependsOn("compileAddons")
doLast {
dir.parentFile.mkdirs()
matchingAddons(dir) {
it.name.startsWith("Terra-") // Assume everything that starts with Terra- is a core addon.
}.forEach {
println("Deleting old addon: " + it.absolutePath)
it.delete()
}
forSubProjects(":common:addons") {
val jar = tasks.named("shadowJar").get() as ShadowJar
val boot = if (extra.has("bootstrap") && extra.get("bootstrap") as Boolean) "bootstrap/" else ""
val target = File(dir, boot + jar.archiveFileName.get())
val base = "${jar.archiveBaseName.get()}-${version}"
println("Copying addon ${jar.archiveFileName.get()} to ${target.absolutePath}. Base name: $base")
jar.archiveFile.orNull?.asFile?.copyTo(target)
}
dependsOn("compileAddons")
doLast {
dir.parentFile.mkdirs()
matchingAddons(dir) {
it.name.startsWith("Terra-") // Assume everything that starts with Terra- is a core addon.
}.forEach {
logger.info("Deleting old addon: " + it.absolutePath)
it.delete()
}
forSubProjects(":common:addons") {
val jar = tasks.named("shadowJar").get() as ShadowJar
val boot = if (extra.has("bootstrap") && extra.get("bootstrap") as Boolean) "bootstrap/" else ""
val target = File(dir, boot + jar.archiveFileName.get())
val base = "${jar.archiveBaseName.get()}-${version}"
logger.info("Copying addon ${jar.archiveFileName.get()} to ${target.absolutePath}. Base name: $base")
jar.archiveFile.orNull?.asFile?.copyTo(target)
}
}
}
task.dependsOn(moveAddons)
}
+10 -2
View File
@@ -13,6 +13,7 @@ import org.gradle.kotlin.dsl.getByName
import org.gradle.kotlin.dsl.register
import org.gradle.kotlin.dsl.withType
import org.gradle.language.jvm.tasks.ProcessResources
import org.gradle.plugins.ide.idea.model.IdeaModel
fun Project.configureCompilation() {
apply(plugin = "maven-publish")
@@ -21,9 +22,16 @@ fun Project.configureCompilation() {
apply(plugin = "idea")
apply<TectonicDocPlugin>()
configure<IdeaModel> {
module {
isDownloadJavadoc = true
isDownloadSources = true
}
}
configure<JavaPluginExtension> {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
tasks.withType<JavaCompile> {
+36 -10
View File
@@ -30,18 +30,44 @@ fun Project.configureDependencies() {
repositories {
mavenCentral()
gradlePluginPortal()
maven("https://maven.fabricmc.net/")
maven("https://repo.codemc.org/repository/maven-public")
maven("https://repo.codemc.io/repository/nms/")
maven("https://papermc.io/repo/repository/maven-public/")
maven("https://maven.solo-studios.ca/releases") {
name = "Solo Studios"
}
maven("https://maven.solo-studios.ca/snapshots") {
name = "Solo Studios"
}
maven("https://maven.fabricmc.net/") {
name = "FabricMC"
}
maven("https://repo.codemc.org/repository/maven-public") {
name = "CodeMC"
}
maven("https://repo.papermc.io/repository/maven-public/") {
name = "PaperMC"
}
maven("https://files.minecraftforge.net/maven/") {
name = "Forge"
}
maven("https://maven.quiltmc.org/repository/release/") {
name = "Quilt"
}
maven("https://jitpack.io") {
name = "JitPack"
}
maven("https://s01.oss.sonatype.org/content/repositories/snapshots/") {
name = "Sonatype Snapshots"
}
maven("https://repo.onarandombox.com/multiverse-releases") {
name = "onarandombox"
}
}
dependencies {
testImplementation("org.junit.jupiter:junit-jupiter-api:5.7.0")
testImplementation("org.junit.jupiter:junit-jupiter-engine:5.7.0")
compileOnly("org.jetbrains:annotations:23.0.0")
testImplementation("org.junit.jupiter", "junit-jupiter", Versions.Libraries.Internal.junit)
"testRuntimeOnly"("org.junit.platform", "junit-platform-launcher")
compileOnly("org.jetbrains", "annotations", Versions.Libraries.Internal.jetBrainsAnnotations)
compileOnly("com.google.guava:guava:30.0-jre")
testImplementation("com.google.guava:guava:30.0-jre")
compileOnly("com.google.guava", "guava", Versions.Libraries.Internal.guava)
testImplementation("com.google.guava", "guava", Versions.Libraries.Internal.guava)
}
}
}
+76 -34
View File
@@ -1,34 +1,69 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import io.papermc.paperweight.util.path
import java.io.File
import java.io.FileWriter
import java.net.URL
import java.nio.file.FileSystems
import java.nio.file.Files
import java.nio.file.StandardCopyOption
import java.nio.file.Path
import org.gradle.api.DefaultTask
import org.gradle.api.Project
import org.gradle.api.Task
import org.gradle.api.plugins.BasePluginExtension
import org.gradle.jvm.tasks.Jar
import org.gradle.kotlin.dsl.apply
import org.gradle.kotlin.dsl.configure
import org.gradle.kotlin.dsl.creating
import org.gradle.kotlin.dsl.extra
import org.gradle.kotlin.dsl.get
import org.gradle.kotlin.dsl.named
import org.yaml.snakeyaml.DumperOptions
import org.yaml.snakeyaml.Yaml
import kotlin.io.path.copyTo
import kotlin.io.path.createDirectories
import kotlin.io.path.createFile
import kotlin.io.path.exists
private fun Project.installAddonsInto(dest: Path) {
FileSystems.newFileSystem(dest, mapOf("create" to "false"), null).use { fs ->
forSubProjects(":common:addons") {
val jar = getJarTask()
logger.info("Packaging addon ${jar.archiveFileName.get()} to $dest. size: ${jar.archiveFile.get().asFile.length() / 1024}KB")
val boot = if (extra.has("bootstrap") && extra.get("bootstrap") as Boolean) "bootstrap/" else ""
val addonPath = fs.getPath("/addons/$boot${jar.archiveFileName.get()}")
if (!addonPath.exists()) {
addonPath.parent.createDirectories()
addonPath.createFile()
jar.archiveFile.get().asFile.toPath().copyTo(addonPath, overwrite = true)
}
}
}
}
fun Project.configureDistribution() {
apply(plugin = "com.github.johnrengelman.shadow")
apply(plugin = "com.gradleup.shadow")
val downloadDefaultPacks = tasks.create("downloadDefaultPacks") {
group = "terra"
doFirst {
file("${buildDir}/resources/main/packs/").deleteRecursively()
val defaultPackUrl = URL("https://github.com/PolyhedralDev/TerraOverworldConfig/releases/download/latest/default.zip")
downloadPack(defaultPackUrl, project)
try {
file("${buildDir}/resources/main/packs/").deleteRecursively()
file("${buildDir}/resources/main/metapacks/").deleteRecursively()
val overworldPackUrl =
URL("https://github.com/PolyhedralDev/TerraOverworldConfig/releases/download/" + Versions.Terra.overworldConfig + "/Overworld.zip")
val reimagENDPackUrl =
URL("https://github.com/PolyhedralDev/ReimagEND/releases/download/" + Versions.Terra.reimagENDConfig + "/ReimagEND.zip")
val tartarusPackUrl =
URL("https://github.com/PolyhedralDev/Tartarus/releases/download/" + Versions.Terra.tartarusConfig + "/Tartarus.zip")
val defaultPackUrl =
URL("https://github.com/PolyhedralDev/DefaultMetapack/releases/download/" + Versions.Terra.defaultConfig + "/default.zip")
downloadPack(overworldPackUrl, project)
downloadPack(reimagENDPackUrl, project)
downloadPack(tartarusPackUrl, project)
downloadPack(defaultPackUrl, project, true)
} catch (_: Exception) {
}
}
}
@@ -46,31 +81,23 @@ fun Project.configureDistribution() {
doLast {
// https://github.com/johnrengelman/shadow/issues/111
val dest = tasks.named<ShadowJar>("shadowJar").get().archiveFile.get().asFile.toPath()
FileSystems.newFileSystem(dest, mapOf("create" to "false"), null).use { fs ->
forSubProjects(":common:addons") {
val jar = getJarTask()
println("Packaging addon ${jar.archiveFileName.get()} to $dest. size: ${jar.archiveFile.get().asFile.length() / 1024}KB")
val boot = if (extra.has("bootstrap") && extra.get("bootstrap") as Boolean) "bootstrap/" else ""
val addonPath = fs.getPath("/addons/$boot${jar.archiveFileName.get()}");
if (!Files.exists(addonPath)) {
Files.createDirectories(addonPath.parent)
Files.createFile(addonPath)
Files.copy(jar.archiveFile.get().asFile.toPath(), addonPath, StandardCopyOption.REPLACE_EXISTING)
}
}
}
val dest = tasks.named<ShadowJar>("shadowJar").get().archiveFile.get().path
installAddonsInto(dest)
}
}
tasks.create("installAddonsIntoDefaultJar") {
group = "terra"
dependsOn(compileAddons)
doLast {
val dest = tasks.named<Jar>("jar").get().archiveFile.get().path
installAddonsInto(dest)
}
}
val generateResourceManifest = tasks.create("generateResourceManifest") {
group = "terra"
dependsOn(downloadDefaultPacks)
doLast {
val resources = HashMap<String, MutableList<String>>()
val packsDir = File("${project.buildDir}/resources/main/packs/")
@@ -80,6 +107,13 @@ fun Project.configureDistribution() {
resources.computeIfAbsent("packs") { ArrayList() }.add(it.name)
}
val metaPacksDir = File("${project.buildDir}/resources/main/metapacks/")
metaPacksDir.walkTopDown().forEach {
if (it.isDirectory || !it.name.endsWith(".zip")) return@forEach
resources.computeIfAbsent("metapacks") { ArrayList() }.add(it.name)
}
val langDir = File("${project(":common:implementation").buildDir}/resources/main/lang/")
langDir.walkTopDown().forEach {
@@ -108,12 +142,20 @@ fun Project.configureDistribution() {
val manifest = File("${project.buildDir}/resources/main/resources.yml")
if (manifest.exists()) manifest.delete()
manifest.parentFile.mkdirs()
manifest.createNewFile()
yaml.dump(resources, FileWriter(manifest))
FileWriter(manifest).use {
yaml.dump(resources, it)
}
}
}
tasks["processResources"].dependsOn(generateResourceManifest)
tasks.named("processResources") {
generateResourceManifest.mustRunAfter(downloadDefaultPacks)
finalizedBy(downloadDefaultPacks)
finalizedBy(generateResourceManifest)
}
tasks.named<ShadowJar>("shadowJar") {
@@ -121,10 +163,9 @@ fun Project.configureDistribution() {
dependsOn(downloadDefaultPacks)
configurations = listOf(project.configurations["shaded"])
archiveClassifier.set("shaded")
setVersion(project.version)
version = project.version
relocate("org.apache.commons", "com.dfsek.terra.lib.commons")
relocate("org.objectweb.asm", "com.dfsek.terra.lib.asm")
relocate("com.dfsek.paralithic", "com.dfsek.terra.lib.paralithic")
relocate("org.json", "com.dfsek.terra.lib.json")
relocate("org.yaml", "com.dfsek.terra.lib.yaml")
@@ -140,9 +181,10 @@ fun Project.configureDistribution() {
}
}
fun downloadPack(packUrl: URL, project: Project) {
fun downloadPack(packUrl: URL, project: Project, metapack: Boolean = false) {
val fileName = packUrl.file.substring(packUrl.file.lastIndexOf("/"))
val file = File("${project.buildDir}/resources/main/packs/${fileName}")
val resourceType = if (metapack) "metapacks" else "packs"
val file = File("${project.buildDir}/resources/main/${resourceType}/${fileName}")
file.parentFile.mkdirs()
file.outputStream().write(packUrl.readBytes())
}
+7 -6
View File
@@ -16,16 +16,17 @@ fun Project.configurePublishing() {
}
repositories {
val mavenUrl = "https://repo.codemc.io/repository/maven-releases/"
val mavenUrl = "https://maven.solo-studios.ca/releases/"
//val mavenSnapshotUrl = "https://repo.codemc.io/repository/maven-snapshots/"
maven(mavenUrl) {
val mavenUsername: String? by project
val mavenPassword: String? by project
if (mavenUsername != null && mavenPassword != null) {
val SoloStudiosReleasesUsername: String? by project
val SoloStudiosReleasesPassword: String? by project
if (SoloStudiosReleasesUsername != null && SoloStudiosReleasesPassword != null) {
credentials {
username = mavenUsername
password = mavenPassword
username = SoloStudiosReleasesUsername
password = SoloStudiosReleasesPassword
}
}
}
+2 -2
View File
@@ -42,10 +42,10 @@ fun preRelease(preRelease: Boolean) {
fun Project.versionProjects(project: String, version: String) {
forSubProjects(project) {
this.version = version
println("Setting version of $path to $version")
logger.info("Setting version of $path to $version")
}
project(project).version = version
println("Setting version of $project to $version")
logger.info("Setting version of $project to $version")
}
fun Project.version(version: String): String {
+85 -24
View File
@@ -1,40 +1,101 @@
object Versions {
object Terra {
const val overworldConfig = "latest"
const val reimagENDConfig = "latest"
const val tartarusConfig = "latest"
const val defaultConfig = "latest"
}
object Libraries {
const val tectonic = "4.2.0"
const val paralithic = "0.7.0"
const val strata = "1.1.1"
const val tectonic = "4.3.1"
const val paralithic = "2.0.1"
const val strata = "1.3.2"
const val seismic = "2.5.7"
const val cloud = "1.7.0-SNAPSHOT"
const val cloud = "2.0.0"
const val slf4j = "1.7.36"
const val log4j_slf4j_impl = "2.14.1"
const val caffeine = "3.2.2"
const val slf4j = "2.0.17"
object Internal {
const val apacheText = "1.9"
const val jafama = "2.3.2"
const val apacheIO = "2.6"
const val fastutil = "8.5.6"
const val shadow = "8.3.9"
const val apacheText = "1.14.0"
const val apacheIO = "2.20.0"
const val guava = "33.5.0-jre"
const val asm = "9.9"
const val snakeYml = "2.5"
const val jetBrainsAnnotations = "26.0.2-1"
const val junit = "6.0.0"
const val nbt = "6.1"
}
}
object Fabric {
const val fabricLoader = "0.14.2"
const val fabricAPI = "0.55.1+1.19"
const val minecraft = "1.19"
const val yarn = "$minecraft+build.1"
const val permissionsAPI = "0.1-SNAPSHOT"
const val mixin = "0.11.2+mixin.0.8.5"
const val loom = "0.11-SNAPSHOT"
const val fabricAPI = "0.134.1+${Mod.minecraft}"
const val cloud = "2.0.0-beta.13"
}
//
// object Quilt {
// const val quiltLoader = "0.20.2"
// const val fabricApi = "7.3.1+0.89.3-1.20.1"
// }
object Mod {
const val mixin = "0.16.4+mixin.0.8.7"
const val mixinExtras = "0.5.0"
const val minecraft = "1.21.10"
const val yarn = "$minecraft+build.1"
const val fabricLoader = "0.18.2"
const val architecuryLoom = "1.11.451"
const val architecturyPlugin = "3.4.162"
}
//
// object Forge {
// const val forge = "${Mod.minecraft}-48.0.13"
// const val burningwave = "12.63.0"
// }
object Bukkit {
const val paper = "1.18-R0.1-SNAPSHOT"
const val paperLib = "1.0.5"
const val minecraft = "1.21.10"
const val nms = "$minecraft-R0.1"
const val paperBuild = "$nms-20251012.013929-7"
const val paper = paperBuild
const val paperLib = "1.0.8"
const val reflectionRemapper = "0.1.3"
const val paperDevBundle = paperBuild
const val runPaper = "2.3.1"
const val paperWeight = "2.0.0-beta.19"
const val cloud = "2.0.0-beta.12"
const val multiverse = "5.3.0"
}
object Sponge {
const val sponge = "9.0.0-SNAPSHOT"
const val mixin = "0.8.2"
const val minecraft = "1.17.1"
//
// object Sponge {
// const val sponge = "9.0.0-SNAPSHOT"
// const val mixin = "0.8.2"
// const val minecraft = "1.17.1"
// }
//
object CLI {
const val logback = "1.5.19"
const val picocli = "4.7.7"
}
}
object Allay {
const val api = "0.13.0"
const val gson = "2.13.2"
const val mappings = "15398c1"
const val mappingsGenerator = "8fa6058"
const val mcmeta = "e85a17c"
}
object Minestom {
const val minestom = "2025.10.04-1.21.8"
}
}
@@ -82,7 +82,7 @@ abstract class GenerateDocsTask : DefaultTask() {
}
template.add(keyName.toString(), description.toString().ifBlank {
println("No description provided for field " + field.name + " in class " + name)
logger.info("No description provided for field " + field.name + " in class " + name)
"*No description provided.*"
})
}
@@ -1,6 +1,6 @@
MIT License
Copyright (c) 2020-2021 Polyhedral Development
Copyright (c) 2020-2025 Polyhedral Development
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -8,17 +8,17 @@ import com.dfsek.terra.api.addon.BaseAddon;
public class ApiAddon implements BaseAddon {
private final Version version;
private final String id;
public ApiAddon(Version version, String id) {
this.version = version;
this.id = id;
}
@Override
public Version getVersion() {
public Version version() {
return version;
}
@Override
public String getID() {
return id;
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2021 Polyhedral Development
* Copyright (c) 2020-2025 Polyhedral Development
*
* The Terra Core Addons are licensed under the terms of the MIT License. For more details,
* reference the LICENSE file in this module's root directory.
@@ -15,7 +15,7 @@ public class ApiAddonClassLoader extends URLClassLoader {
static {
ClassLoader.registerAsParallelCapable();
}
public ApiAddonClassLoader(URL[] urls, ClassLoader parent) {
super(urls, parent);
}
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2021 Polyhedral Development
* Copyright (c) 2020-2025 Polyhedral Development
*
* The Terra Core Addons are licensed under the terms of the MIT License. For more details,
* reference the LICENSE file in this module's root directory.
@@ -20,20 +20,20 @@ import com.dfsek.terra.api.addon.bootstrap.BootstrapBaseAddon;
public class ApiAddonLoader implements BootstrapBaseAddon<BaseAddon> {
private static final Version VERSION = Versions.getVersion(1, 0, 0);
@Override
public Iterable<BaseAddon> loadAddons(Path addonsFolder, BootstrapAddonClassLoader parent) {
return Collections.emptySet();
}
@Override
public String getID() {
return "API";
}
@Override
public Version getVersion() {
public Version version() {
return VERSION;
}
}
@@ -1,6 +1,6 @@
MIT License
Copyright (c) 2020-2021 Polyhedral Development
Copyright (c) 2020-2025 Polyhedral Development
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@@ -1,8 +1,8 @@
version = version("1.0.0")
dependencies {
api("commons-io:commons-io:2.7")
implementation("com.dfsek.tectonic:yaml:${Versions.Libraries.tectonic}")
api("commons-io", "commons-io", Versions.Libraries.Internal.apacheIO)
implementation("com.dfsek.tectonic", "yaml", Versions.Libraries.tectonic)
}
tasks.withType<Jar> {
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2021 Polyhedral Development
* Copyright (c) 2020-2025 Polyhedral Development
*
* The Terra Core Addons are licensed under the terms of the MIT License. For more details,
* reference the LICENSE file in this module's root directory.
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2021 Polyhedral Development
* Copyright (c) 2020-2025 Polyhedral Development
*
* The Terra Core Addons are licensed under the terms of the MIT License. For more details,
* reference the LICENSE file in this module's root directory.
@@ -29,34 +29,34 @@ public class ManifestAddon implements BaseAddon {
private final List<AddonInitializer> initializers;
@Inject
private Platform platform;
public ManifestAddon(AddonManifest manifest, List<AddonInitializer> initializers) {
this.manifest = manifest;
this.initializers = initializers;
}
public AddonManifest getManifest() {
return manifest;
}
@Override
public String getID() {
return manifest.getID();
}
public void initialize() {
Injector<BaseAddon> addonInjector = Injector.get(this);
addonInjector.addExplicitTarget(BaseAddon.class);
Injector<Platform> platformInjector = Injector.get(platform);
platformInjector.addExplicitTarget(Platform.class);
logger.debug("Initializing addon {}", getID());
initializers.forEach(initializer -> {
Injector<Logger> loggerInjector = Injector.get(LoggerFactory.getLogger(initializer.getClass()));
loggerInjector.addExplicitTarget(Logger.class);
logger.debug("Invoking entry point {}", initializer.getClass());
addonInjector.inject(initializer);
platformInjector.inject(initializer);
@@ -64,14 +64,14 @@ public class ManifestAddon implements BaseAddon {
initializer.initialize();
});
}
@Override
public Map<String, VersionRange> getDependencies() {
public Map<String, VersionRange> dependencies() {
return manifest.getDependencies();
}
@Override
public Version getVersion() {
public Version version() {
return manifest.getVersion();
}
}
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2021 Polyhedral Development
* Copyright (c) 2020-2025 Polyhedral Development
*
* The Terra Core Addons are licensed under the terms of the MIT License. For more details,
* reference the LICENSE file in this module's root directory.
@@ -15,7 +15,7 @@ public class ManifestAddonClassLoader extends URLClassLoader {
static {
ClassLoader.registerAsParallelCapable();
}
public ManifestAddonClassLoader(URL[] urls, ClassLoader parent) {
super(urls, parent);
}
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2021 Polyhedral Development
* Copyright (c) 2020-2025 Polyhedral Development
*
* The Terra Core Addons are licensed under the terms of the MIT License. For more details,
* reference the LICENSE file in this module's root directory.
@@ -44,34 +44,34 @@ import com.dfsek.terra.api.addon.bootstrap.BootstrapBaseAddon;
public class ManifestAddonLoader implements BootstrapBaseAddon<ManifestAddon> {
private static final Logger logger = LoggerFactory.getLogger(ManifestAddonLoader.class);
private static final Version VERSION = Versions.getVersion(1, 0, 0);
private final ConfigLoader manifestLoader = new ConfigLoader()
.registerLoader(Version.class, new VersionLoader())
.registerLoader(VersionRange.class, new VersionRangeLoader())
.registerLoader(WebsiteConfig.class, WebsiteConfig::new);
.registerLoader(Version.class, new VersionLoader())
.registerLoader(VersionRange.class, new VersionRangeLoader())
.registerLoader(WebsiteConfig.class, WebsiteConfig::new);
public ManifestAddon loadAddon(Path addonPath, ClassLoader loader) {
try(JarFile jar = new JarFile(addonPath.toFile())) {
logger.debug("Loading addon from JAR {}", addonPath);
JarEntry manifestEntry = jar.getJarEntry("terra.addon.yml");
if(manifestEntry == null) {
throw new ManifestNotPresentException("Addon " + addonPath + " does not contain addon manifest.");
}
//noinspection NestedTryStatement
try {
AddonManifest manifest = manifestLoader.load(new AddonManifest(),
new YamlConfiguration(jar.getInputStream(manifestEntry),
"terra.addon.yml"));
new YamlConfiguration(jar.getInputStream(manifestEntry),
"terra.addon.yml"));
logger.debug("Loading addon {}@{}", manifest.getID(), manifest.getVersion().getFormatted());
if(manifest.getSchemaVersion() != 1) {
throw new AddonException("Addon " + manifest.getID() + " has unknown schema version: " + manifest.getSchemaVersion());
}
List<AddonInitializer> initializers = manifest.getEntryPoints().stream().map(entryPoint -> {
try {
Object in = loader.loadClass(entryPoint).getConstructor().newInstance();
@@ -87,9 +87,9 @@ public class ManifestAddonLoader implements BootstrapBaseAddon<ManifestAddon> {
throw new AddonException(String.format("Entry point %s not found in JAR.", entryPoint), e);
}
}).collect(Collectors.toList());
return new ManifestAddon(manifest, initializers);
} catch(LoadException e) {
throw new ManifestException("Failed to load addon manifest", e);
}
@@ -97,19 +97,19 @@ public class ManifestAddonLoader implements BootstrapBaseAddon<ManifestAddon> {
throw new AddonException("Failed to load addon from JAR " + addonPath, e);
}
}
@Override
public Iterable<ManifestAddon> loadAddons(Path addonsFolder, BootstrapAddonClassLoader parent) {
logger.debug("Loading addons...");
try(Stream<Path> files = Files.walk(addonsFolder, 1, FileVisitOption.FOLLOW_LINKS)) {
List<Path> addons = files
.filter(path -> path.toFile().isFile())
.filter(path -> path.toFile().canRead())
.filter(path -> !path.getFileName().startsWith(".")) // ignore hidden files.
.filter(path -> path.toString().endsWith(".jar"))
.toList();
.filter(path -> path.toFile().isFile())
.filter(path -> path.toFile().canRead())
.filter(path -> !path.getFileName().startsWith(".")) // ignore hidden files.
.filter(path -> path.toString().endsWith(".jar"))
.toList();
addons.stream().map(path -> {
try {
return path.toUri().toURL();
@@ -117,22 +117,22 @@ public class ManifestAddonLoader implements BootstrapBaseAddon<ManifestAddon> {
throw new UncheckedIOException(e);
}
}).forEach(parent::addURL);
return addons.stream()
.map(jar -> loadAddon(jar, parent))
.collect(Collectors.toList());
.map(jar -> loadAddon(jar, parent))
.collect(Collectors.toList());
} catch(IOException e) {
throw new UncheckedIOException(e);
}
}
@Override
public String getID() {
return "MANIFEST";
}
@Override
public Version getVersion() {
public Version version() {
return VERSION;
}
}
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2021 Polyhedral Development
* Copyright (c) 2020-2025 Polyhedral Development
*
* The Terra Core Addons are licensed under the terms of the MIT License. For more details,
* reference the LICENSE file in this module's root directory.
@@ -24,60 +24,60 @@ import com.dfsek.terra.api.registry.key.StringIdentifiable;
public class AddonManifest implements ConfigTemplate, StringIdentifiable {
@Value("schema-version")
private int schemaVersion;
@Value("id")
private String id;
@Value("version")
private Version version;
@Value("license")
private String license;
@Value("contributors")
@Default
private List<String> contributors = Collections.emptyList();
@Value("entrypoints")
private List<String> entryPoints;
@Value("depends")
@Default
private Map<String, VersionRange> dependencies = Collections.emptyMap();
@Value("website")
@Default
private WebsiteConfig website;
@Override
public String getID() {
return id;
}
public int getSchemaVersion() {
return schemaVersion;
}
public Version getVersion() {
return version;
}
public List<String> getContributors() {
return contributors;
}
public List<String> getEntryPoints() {
return entryPoints;
}
public String getLicense() {
return license;
}
public WebsiteConfig getWebsite() {
return website;
}
public Map<String, VersionRange> getDependencies() {
return dependencies;
}
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2021 Polyhedral Development
* Copyright (c) 2020-2025 Polyhedral Development
*
* The Terra Core Addons are licensed under the terms of the MIT License. For more details,
* reference the LICENSE file in this module's root directory.
@@ -14,25 +14,25 @@ import com.dfsek.tectonic.api.config.template.object.ObjectTemplate;
public class WebsiteConfig implements ObjectTemplate<WebsiteConfig> {
@Value("issues")
private String issues;
@Value("source")
private String source;
@Value("docs")
private String docs;
public String getDocs() {
return docs;
}
public String getIssues() {
return issues;
}
public String getSource() {
return source;
}
@Override
public WebsiteConfig get() {
return this;
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2021 Polyhedral Development
* Copyright (c) 2020-2025 Polyhedral Development
*
* The Terra Core Addons are licensed under the terms of the MIT License. For more details,
* reference the LICENSE file in this module's root directory.
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2021 Polyhedral Development
* Copyright (c) 2020-2025 Polyhedral Development
*
* The Terra Core Addons are licensed under the terms of the MIT License. For more details,
* reference the LICENSE file in this module's root directory.
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2021 Polyhedral Development
* Copyright (c) 2020-2025 Polyhedral Development
*
* The Terra Core Addons are licensed under the terms of the MIT License. For more details,
* reference the LICENSE file in this module's root directory.
@@ -13,11 +13,11 @@ import java.io.Serial;
public class AddonException extends RuntimeException {
@Serial
private static final long serialVersionUID = -4201912399458420090L;
public AddonException(String message) {
super(message);
}
public AddonException(String message, Throwable cause) {
super(message, cause);
}
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2021 Polyhedral Development
* Copyright (c) 2020-2025 Polyhedral Development
*
* The Terra Core Addons are licensed under the terms of the MIT License. For more details,
* reference the LICENSE file in this module's root directory.
@@ -13,11 +13,11 @@ import java.io.Serial;
public class ManifestException extends AddonException {
@Serial
private static final long serialVersionUID = -2458077663176544645L;
public ManifestException(String message) {
super(message);
}
public ManifestException(String message, Throwable cause) {
super(message, cause);
}
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2020-2021 Polyhedral Development
* Copyright (c) 2020-2025 Polyhedral Development
*
* The Terra Core Addons are licensed under the terms of the MIT License. For more details,
* reference the LICENSE file in this module's root directory.
@@ -13,11 +13,11 @@ import java.io.Serial;
public class ManifestNotPresentException extends ManifestException {
@Serial
private static final long serialVersionUID = -2116663180747013810L;
public ManifestNotPresentException(String message) {
super(message);
}
public ManifestNotPresentException(String message, Throwable cause) {
super(message, cause);
}
+4
View File
@@ -0,0 +1,4 @@
# Biome Query API
This addon contains an API to allow other addons to quickly query
Biome data, by baking queries and using Contexts on biomes.
@@ -0,0 +1,5 @@
version = version("1.0.0")
dependencies {
compileOnlyApi(project(":common:addons:addon-loader-manifest"))
}
@@ -0,0 +1,46 @@
package com.dfsek.terra.addons.biome.query;
import java.util.Collection;
import com.dfsek.terra.addons.biome.query.impl.BiomeTagFlattener;
import com.dfsek.terra.addons.biome.query.impl.BiomeTagHolder;
import com.dfsek.terra.addons.manifest.api.AddonInitializer;
import com.dfsek.terra.api.Platform;
import com.dfsek.terra.api.addon.BaseAddon;
import com.dfsek.terra.api.event.events.config.pack.ConfigPackPostLoadEvent;
import com.dfsek.terra.api.event.functional.FunctionalEventHandler;
import com.dfsek.terra.api.inject.annotations.Inject;
import com.dfsek.terra.api.properties.Context;
import com.dfsek.terra.api.properties.PropertyKey;
import com.dfsek.terra.api.world.biome.Biome;
public class BiomeQueryAPIAddon implements AddonInitializer {
public static PropertyKey<BiomeTagHolder> BIOME_TAG_KEY = Context.create(BiomeTagHolder.class);
@Inject
private Platform platform;
@Inject
private BaseAddon addon;
@Override
public void initialize() {
platform.getEventManager()
.getHandler(FunctionalEventHandler.class)
.register(addon, ConfigPackPostLoadEvent.class)
.then(event -> {
Collection<Biome> biomes = event
.getPack()
.getRegistry(Biome.class)
.entries();
BiomeTagFlattener flattener = new BiomeTagFlattener(biomes
.stream()
.flatMap(biome -> biome.getTags().stream())
.toList());
biomes.forEach(biome -> biome.getContext().put(BIOME_TAG_KEY, new BiomeTagHolder(biome, flattener)));
})
.global();
}
}
@@ -0,0 +1,17 @@
package com.dfsek.terra.addons.biome.query.api;
import java.util.function.Predicate;
import com.dfsek.terra.addons.biome.query.impl.SingleTagQuery;
import com.dfsek.terra.api.world.biome.Biome;
public final class BiomeQueries {
private BiomeQueries() {
}
public static Predicate<Biome> has(String tag) {
return new SingleTagQuery(tag);
}
}
@@ -0,0 +1,20 @@
package com.dfsek.terra.addons.biome.query.impl;
import java.util.List;
public class BiomeTagFlattener {
private final List<String> tags;
public BiomeTagFlattener(List<String> tags) {
this.tags = tags;
}
public int index(String tag) {
return tags.indexOf(tag);
}
public int size() {
return tags.size();
}
}
@@ -0,0 +1,26 @@
package com.dfsek.terra.addons.biome.query.impl;
import com.dfsek.terra.api.properties.Properties;
import com.dfsek.terra.api.world.biome.Biome;
public class BiomeTagHolder implements Properties {
private final boolean[] tags;
private final BiomeTagFlattener flattener;
public BiomeTagHolder(Biome biome, BiomeTagFlattener flattener) {
this.tags = new boolean[flattener.size()];
this.flattener = flattener;
for(String tag : biome.getTags()) {
tags[flattener.index(tag)] = true;
}
}
boolean get(int index) {
return tags[index];
}
public BiomeTagFlattener getFlattener() {
return flattener;
}
}
@@ -0,0 +1,31 @@
package com.dfsek.terra.addons.biome.query.impl;
import java.util.function.Predicate;
import com.dfsek.terra.addons.biome.query.BiomeQueryAPIAddon;
import com.dfsek.terra.api.world.biome.Biome;
public class SingleTagQuery implements Predicate<Biome> {
private final String tag;
private int tagIndex = -1;
public SingleTagQuery(String tag) {
this.tag = tag;
}
@Override
public boolean test(Biome biome) {
if(tagIndex < 0) {
tagIndex = biome
.getContext()
.get(BiomeQueryAPIAddon.BIOME_TAG_KEY)
.getFlattener()
.index(tag);
}
return biome
.getContext()
.get(BiomeQueryAPIAddon.BIOME_TAG_KEY)
.get(tagIndex);
}
}
@@ -0,0 +1,12 @@
schema-version: 1
contributors:
- Terra contributors
id: api-biome-query
version: @VERSION@
entrypoints:
- "com.dfsek.terra.addons.biome.query.BiomeQueryAPIAddon"
website:
issues: https://github.com/PolyhedralDev/Terra/issues
source: https://github.com/PolyhedralDev/Terra
docs: https://terra.polydev.org
license: MIT License
+7
View File
@@ -0,0 +1,7 @@
version = version("1.1.0")
dependencies {
compileOnlyApi(project(":common:addons:addon-loader-manifest"))
}
@@ -0,0 +1,89 @@
package com.dfsek.terra.addons.image;
import com.dfsek.seismic.type.sampler.Sampler;
import com.dfsek.tectonic.api.config.template.object.ObjectTemplate;
import java.util.function.Supplier;
import com.dfsek.terra.addons.image.colorsampler.ColorSampler;
import com.dfsek.terra.addons.image.config.ColorLoader;
import com.dfsek.terra.addons.image.config.ColorLoader.ColorString;
import com.dfsek.terra.addons.image.config.ImageLibraryPackConfigTemplate;
import com.dfsek.terra.addons.image.config.colorsampler.ConstantColorSamplerTemplate;
import com.dfsek.terra.addons.image.config.colorsampler.image.SingleImageColorSamplerTemplate;
import com.dfsek.terra.addons.image.config.colorsampler.image.TileImageColorSamplerTemplate;
import com.dfsek.terra.addons.image.config.colorsampler.mutate.RotateColorSamplerTemplate;
import com.dfsek.terra.addons.image.config.colorsampler.mutate.TranslateColorSamplerTemplate;
import com.dfsek.terra.addons.image.config.image.ImageTemplate;
import com.dfsek.terra.addons.image.config.image.StitchedImageTemplate;
import com.dfsek.terra.addons.image.config.sampler.ChannelSamplerTemplate;
import com.dfsek.terra.addons.image.config.sampler.DistanceTransformSamplerTemplate;
import com.dfsek.terra.addons.image.image.Image;
import com.dfsek.terra.addons.image.operator.DistanceTransform;
import com.dfsek.terra.addons.manifest.api.AddonInitializer;
import com.dfsek.terra.api.Platform;
import com.dfsek.terra.api.addon.BaseAddon;
import com.dfsek.terra.api.config.ConfigPack;
import com.dfsek.terra.api.event.events.config.pack.ConfigPackPreLoadEvent;
import com.dfsek.terra.api.event.functional.FunctionalEventHandler;
import com.dfsek.terra.api.inject.annotations.Inject;
import com.dfsek.terra.api.registry.CheckedRegistry;
import com.dfsek.terra.api.util.reflection.TypeKey;
public class ImageLibraryAddon implements AddonInitializer {
public static final TypeKey<Supplier<ObjectTemplate<Image>>> IMAGE_REGISTRY_KEY = new TypeKey<>() {
};
public static final TypeKey<Supplier<ObjectTemplate<ColorSampler>>> COLOR_PICKER_REGISTRY_KEY = new TypeKey<>() {
};
public static final TypeKey<Supplier<ObjectTemplate<Sampler>>> NOISE_SAMPLER_TOKEN = new TypeKey<>() {
};
@Inject
private Platform platform;
@Inject
private BaseAddon addon;
@Override
public void initialize() {
platform.getEventManager()
.getHandler(FunctionalEventHandler.class)
.register(addon, ConfigPackPreLoadEvent.class)
.priority(10)
.then(event -> {
ImageLibraryPackConfigTemplate config = event.loadTemplate(new ImageLibraryPackConfigTemplate());
event.getPack().getContext().put(config);
})
.then(event -> {
ConfigPack pack = event.getPack();
CheckedRegistry<Supplier<ObjectTemplate<Image>>> imageRegistry = pack.getOrCreateRegistry(IMAGE_REGISTRY_KEY);
imageRegistry.register(addon.key("BITMAP"), () -> new ImageTemplate(pack));
imageRegistry.register(addon.key("STITCHED_BITMAP"), () -> new StitchedImageTemplate(pack));
})
.then(event -> {
event.getPack()
.applyLoader(DistanceTransform.CostFunction.class,
(type, o, loader, depthTracker) -> DistanceTransform.CostFunction.valueOf((String) o))
.applyLoader(DistanceTransform.Normalization.class,
(type, o, loader, depthTracker) -> DistanceTransform.Normalization.valueOf((String) o))
.applyLoader(ColorString.class, new ColorLoader());
CheckedRegistry<Supplier<ObjectTemplate<Sampler>>> noiseRegistry = event.getPack().getOrCreateRegistry(
NOISE_SAMPLER_TOKEN);
noiseRegistry.register(addon.key("DISTANCE_TRANSFORM"), DistanceTransformSamplerTemplate::new);
noiseRegistry.register(addon.key("CHANNEL"), ChannelSamplerTemplate::new);
})
.then(event -> {
CheckedRegistry<Supplier<ObjectTemplate<ColorSampler>>> colorSamplerRegistry = event.getPack().getOrCreateRegistry(
COLOR_PICKER_REGISTRY_KEY);
colorSamplerRegistry.register(addon.key("SINGLE_IMAGE"), SingleImageColorSamplerTemplate::new);
colorSamplerRegistry.register(addon.key("TILED_IMAGE"), TileImageColorSamplerTemplate::new);
colorSamplerRegistry.register(addon.key("COLOR"), ConstantColorSamplerTemplate::new);
colorSamplerRegistry.register(addon.key("ROTATE"), RotateColorSamplerTemplate::new);
colorSamplerRegistry.register(addon.key("TRANSLATE"), TranslateColorSamplerTemplate::new);
});
}
}
@@ -0,0 +1,13 @@
package com.dfsek.terra.addons.image.colorsampler;
@FunctionalInterface
public interface ColorSampler {
/**
* @param x World x coordinate
* @param z World z coordinate
*
* @return Integer representing a web color
*/
int apply(int x, int z);
}
@@ -0,0 +1,29 @@
package com.dfsek.terra.addons.image.colorsampler.image;
import com.dfsek.terra.addons.image.colorsampler.ColorSampler;
import com.dfsek.terra.addons.image.colorsampler.image.transform.ImageTransformation;
import com.dfsek.terra.addons.image.image.Image;
public class SingleImageColorSampler implements ColorSampler {
private final Image image;
private final ColorSampler fallback;
private final ImageTransformation transformation;
public SingleImageColorSampler(Image image, ColorSampler fallback, ImageTransformation transformation) {
this.image = image;
this.fallback = fallback;
this.transformation = transformation;
}
@Override
public int apply(int x, int z) {
var nx = transformation.transformX(image, x);
var nz = transformation.transformZ(image, z);
if(nx < 0 || nz < 0 || nx >= image.getWidth() || nz >= image.getHeight()) return fallback.apply(x, z);
return image.getRGB(nx, nz);
}
}
@@ -0,0 +1,25 @@
package com.dfsek.terra.addons.image.colorsampler.image;
import com.dfsek.terra.addons.image.colorsampler.ColorSampler;
import com.dfsek.terra.addons.image.colorsampler.image.transform.ImageTransformation;
import com.dfsek.terra.addons.image.image.Image;
public class TileImageColorSampler implements ColorSampler {
private final Image image;
private final ImageTransformation transformation;
public TileImageColorSampler(Image image, ImageTransformation transformation) {
this.image = image;
this.transformation = transformation;
}
@Override
public int apply(int x, int z) {
x = transformation.transformX(image, x);
z = transformation.transformZ(image, z);
return image.getRGB(Math.floorMod(x, image.getWidth()), Math.floorMod(z, image.getHeight()));
}
}
@@ -0,0 +1,30 @@
package com.dfsek.terra.addons.image.colorsampler.image.transform;
import com.dfsek.terra.addons.image.image.Image;
public enum Alignment implements ImageTransformation {
NONE() {
@Override
public int transformX(Image image, int x) {
return x;
}
@Override
public int transformZ(Image image, int z) {
return z;
}
},
CENTER {
@Override
public int transformX(Image image, int x) {
return x + image.getWidth() / 2;
}
@Override
public int transformZ(Image image, int z) {
return z + image.getHeight() / 2;
}
};
}
@@ -0,0 +1,11 @@
package com.dfsek.terra.addons.image.colorsampler.image.transform;
import com.dfsek.terra.addons.image.image.Image;
public interface ImageTransformation {
int transformX(Image image, int x);
int transformZ(Image image, int z);
}
@@ -0,0 +1,62 @@
package com.dfsek.terra.addons.image.colorsampler.mutate;
import com.dfsek.seismic.math.trigonometry.TrigonometryFunctions;
import com.dfsek.terra.addons.image.colorsampler.ColorSampler;
public class RotateColorSampler implements ColorSampler {
private final ColorSampler sampler;
private final double radians;
private final RotationMethod rotationMethod;
public RotateColorSampler(ColorSampler sampler, double degrees) {
this.sampler = sampler;
double normalizedDegrees = degrees % 360.0;
if(normalizedDegrees < 0) normalizedDegrees += 360.0;
if(normalizedDegrees == 0.0)
rotationMethod = RotationMethod.DEG_0;
else if(normalizedDegrees == 90.0)
rotationMethod = RotationMethod.DEG_90;
else if(normalizedDegrees == 180.0)
rotationMethod = RotationMethod.DEG_180;
else if(normalizedDegrees == 270.0)
rotationMethod = RotationMethod.DEG_270;
else
rotationMethod = RotationMethod.RAD_ANY;
this.radians = Math.toRadians(degrees);
}
@Override
public int apply(int x, int z) {
int rx = switch(rotationMethod) {
case DEG_0 -> x;
case DEG_90 -> -z;
case DEG_180 -> -x;
case DEG_270 -> z;
case RAD_ANY -> (int) (x * TrigonometryFunctions.cos(radians) - z * TrigonometryFunctions.sin(radians));
};
int rz = switch(rotationMethod) {
case DEG_0 -> z;
case DEG_90 -> x;
case DEG_180 -> -z;
case DEG_270 -> -x;
case RAD_ANY -> (int) (z * TrigonometryFunctions.cos(radians) + x * TrigonometryFunctions.sin(radians));
};
return sampler.apply(rx, rz);
}
private enum RotationMethod {
DEG_0,
DEG_90,
DEG_180,
DEG_270,
RAD_ANY,
}
}
@@ -0,0 +1,21 @@
package com.dfsek.terra.addons.image.colorsampler.mutate;
import com.dfsek.terra.addons.image.colorsampler.ColorSampler;
public class TranslateColorSampler implements ColorSampler {
private final ColorSampler sampler;
private final int translateX, translateZ;
public TranslateColorSampler(ColorSampler sampler, int translateX, int translateZ) {
this.sampler = sampler;
this.translateX = translateX;
this.translateZ = translateZ;
}
@Override
public int apply(int x, int z) {
return sampler.apply(x - translateX, z - translateZ);
}
}
@@ -0,0 +1,92 @@
package com.dfsek.terra.addons.image.config;
import com.dfsek.tectonic.api.depth.DepthTracker;
import com.dfsek.tectonic.api.exception.LoadException;
import com.dfsek.tectonic.api.loader.ConfigLoader;
import com.dfsek.tectonic.api.loader.type.TypeLoader;
import org.jetbrains.annotations.NotNull;
import java.lang.reflect.AnnotatedType;
import com.dfsek.terra.addons.image.config.ColorLoader.ColorString;
import com.dfsek.terra.addons.image.util.ColorUtil;
public class ColorLoader implements TypeLoader<ColorString> {
@Override
public ColorString load(@NotNull AnnotatedType annotatedType, @NotNull Object o, @NotNull ConfigLoader configLoader,
DepthTracker depthTracker) throws LoadException {
return new ColorString((String) o);
}
public static class ColorString {
private final int argb;
public ColorString(String string) throws IllegalArgumentException {
this.argb = parse(string);
}
private static int parse(String string) throws IllegalArgumentException {
if(string.length() == 0)
throw new IllegalArgumentException("Empty string cannot be parsed as a valid color");
String[] split = string.split(",");
if(split.length == 1)
return parseHex(string);
else if(split.length == 3)
return parseChannels("255", split[0], split[1], split[2]);
else if(split.length == 4)
return parseChannels(split[0], split[1], split[2], split[3]);
else
throw new IllegalArgumentException("Invalid channels provided, required format RED,GREEN,BLUE or ALPHA,RED,GREEN,BLUE");
}
private static int parseHex(String hex) throws IllegalArgumentException {
if(hex.startsWith("#"))
hex = hex.substring(1);
int alpha = 255;
int red = 0;
int green = 0;
int blue = 0;
try {
if(hex.length() == 8) {
alpha = Integer.parseInt(hex.substring(0, 2), 16);
hex = hex.substring(2);
}
if(hex.length() != 6)
throw new IllegalArgumentException("Invalid color channels, required format AARRGGBB or RRGGBB");
red = Integer.parseInt(hex.substring(0, 2), 16);
green = Integer.parseInt(hex.substring(2, 4), 16);
blue = Integer.parseInt(hex.substring(4, 6), 16);
return ColorUtil.argbValidated(alpha, red, green, blue);
} catch(NumberFormatException e) {
throw new IllegalArgumentException("Failed to parse hex color", e);
}
}
private static int parseChannels(String alpha, String red, String green, String blue) throws IllegalArgumentException {
try {
int a = Integer.decode(alpha);
int r = Integer.decode(red);
int g = Integer.decode(green);
int b = Integer.decode(blue);
return ColorUtil.argbValidated(a, r, g, b);
} catch(NumberFormatException e) {
throw new IllegalArgumentException("Invalid channel value", e);
}
}
public int getColor() {
return argb;
}
}
}
@@ -0,0 +1,39 @@
package com.dfsek.terra.addons.image.config;
import com.dfsek.tectonic.api.config.template.ConfigTemplate;
import com.dfsek.tectonic.api.config.template.annotations.Default;
import com.dfsek.tectonic.api.config.template.annotations.Description;
import com.dfsek.tectonic.api.config.template.annotations.Value;
import com.dfsek.terra.api.properties.Properties;
public class ImageLibraryPackConfigTemplate implements ConfigTemplate, Properties {
// TODO - These would be better as plugin wide config parameters in config.yml
@Value("images.cache.load-on-use")
@Description("If set to true, images will load into memory upon use rather than on pack load.")
@Default
private boolean loadOnUse = false;
@Value("images.cache.timeout")
@Description("How many seconds to keep images loaded in the image cache for. " +
"If set to a number greater than 0, images will be removed from memory if not used after the timeout, otherwise images " +
"will stay loaded in memory. " +
"Setting the timeout to greater than 0 will trade decreased memory consumption when not performing any image reads for a" +
" period of time for extra processing time required to perform cache lookups.")
@Default
private int cacheTimeout = 0;
public boolean loadOnUse() {
return loadOnUse;
}
public boolean unloadOnTimeout() {
return cacheTimeout > 0;
}
public int getCacheTimeout() {
return cacheTimeout;
}
}
@@ -0,0 +1,19 @@
package com.dfsek.terra.addons.image.config.colorsampler;
import com.dfsek.tectonic.api.config.template.annotations.Value;
import com.dfsek.tectonic.api.config.template.object.ObjectTemplate;
import com.dfsek.terra.addons.image.colorsampler.ColorSampler;
import com.dfsek.terra.addons.image.config.ColorLoader.ColorString;
public class ConstantColorSamplerTemplate implements ObjectTemplate<ColorSampler> {
@Value("color")
private ColorString color;
@Override
public ColorSampler get() {
return ((x, z) -> color.getColor());
}
}
@@ -0,0 +1,21 @@
package com.dfsek.terra.addons.image.config.colorsampler.image;
import com.dfsek.tectonic.api.config.template.annotations.Default;
import com.dfsek.tectonic.api.config.template.annotations.Value;
import com.dfsek.tectonic.api.config.template.object.ObjectTemplate;
import com.dfsek.terra.addons.image.colorsampler.ColorSampler;
import com.dfsek.terra.addons.image.colorsampler.image.transform.Alignment;
import com.dfsek.terra.addons.image.image.Image;
public abstract class ImageColorSamplerTemplate implements ObjectTemplate<ColorSampler> {
@Value("image")
protected Image image;
@Value("align")
@Default
protected Alignment alignment = Alignment.NONE;
}
@@ -0,0 +1,17 @@
package com.dfsek.terra.addons.image.config.colorsampler.image;
import com.dfsek.tectonic.api.config.template.annotations.Value;
import com.dfsek.terra.addons.image.colorsampler.ColorSampler;
import com.dfsek.terra.addons.image.colorsampler.image.SingleImageColorSampler;
public class SingleImageColorSamplerTemplate extends ImageColorSamplerTemplate {
@Value("outside-sampler")
private ColorSampler fallback;
@Override
public ColorSampler get() {
return new SingleImageColorSampler(image, fallback, alignment);
}
}
@@ -0,0 +1,13 @@
package com.dfsek.terra.addons.image.config.colorsampler.image;
import com.dfsek.terra.addons.image.colorsampler.ColorSampler;
import com.dfsek.terra.addons.image.colorsampler.image.TileImageColorSampler;
public class TileImageColorSamplerTemplate extends ImageColorSamplerTemplate {
@Override
public ColorSampler get() {
return new TileImageColorSampler(image, alignment);
}
}
@@ -0,0 +1,13 @@
package com.dfsek.terra.addons.image.config.colorsampler.mutate;
import com.dfsek.tectonic.api.config.template.annotations.Value;
import com.dfsek.tectonic.api.config.template.object.ObjectTemplate;
import com.dfsek.terra.addons.image.colorsampler.ColorSampler;
public abstract class MutateColorSamplerTemplate implements ObjectTemplate<ColorSampler> {
@Value("color-sampler")
protected ColorSampler sampler;
}
@@ -0,0 +1,18 @@
package com.dfsek.terra.addons.image.config.colorsampler.mutate;
import com.dfsek.tectonic.api.config.template.annotations.Value;
import com.dfsek.terra.addons.image.colorsampler.ColorSampler;
import com.dfsek.terra.addons.image.colorsampler.mutate.RotateColorSampler;
public class RotateColorSamplerTemplate extends MutateColorSamplerTemplate {
@Value("angle")
private double degrees;
@Override
public ColorSampler get() {
return new RotateColorSampler(sampler, degrees);
}
}
@@ -0,0 +1,21 @@
package com.dfsek.terra.addons.image.config.colorsampler.mutate;
import com.dfsek.tectonic.api.config.template.annotations.Value;
import com.dfsek.terra.addons.image.colorsampler.ColorSampler;
import com.dfsek.terra.addons.image.colorsampler.mutate.TranslateColorSampler;
public class TranslateColorSamplerTemplate extends MutateColorSamplerTemplate {
@Value("x")
private int translateX;
@Value("z")
private int translateZ;
@Override
public ColorSampler get() {
return new TranslateColorSampler(sampler, translateX, translateZ);
}
}
@@ -0,0 +1,16 @@
package com.dfsek.terra.addons.image.config.converter;
import com.dfsek.terra.addons.image.converter.ClosestMatchColorConverter;
import com.dfsek.terra.addons.image.converter.ColorConverter;
import com.dfsek.terra.addons.image.converter.mapping.ColorMapping;
public abstract class ClosestColorConverterTemplate<T> implements ColorConverterTemplate<T> {
protected abstract ColorMapping<T> getMapping();
@Override
public ColorConverter<T> get() {
return new ClosestMatchColorConverter<T>(getMapping().get());
}
}
@@ -0,0 +1,9 @@
package com.dfsek.terra.addons.image.config.converter;
import com.dfsek.tectonic.api.config.template.object.ObjectTemplate;
import com.dfsek.terra.addons.image.converter.ColorConverter;
public interface ColorConverterTemplate<T> extends ObjectTemplate<ColorConverter<T>> {
}
@@ -0,0 +1,20 @@
package com.dfsek.terra.addons.image.config.converter;
import com.dfsek.terra.addons.image.converter.ColorConverter;
import com.dfsek.terra.addons.image.converter.ExactColorConverter;
import com.dfsek.terra.addons.image.converter.mapping.ColorMapping;
public abstract class ExactColorConverterTemplate<T> implements ColorConverterTemplate<T> {
protected abstract ColorMapping<T> getMapping();
protected abstract T getFallback();
protected abstract boolean ignoreAlpha();
@Override
public ColorConverter<T> get() {
return new ExactColorConverter<T>(getMapping().get(), getFallback(), ignoreAlpha());
}
}
@@ -0,0 +1,56 @@
package com.dfsek.terra.addons.image.config.image;
import com.github.benmanes.caffeine.cache.Caffeine;
import com.github.benmanes.caffeine.cache.LoadingCache;
import com.github.benmanes.caffeine.cache.Scheduler;
import javax.imageio.ImageIO;
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.concurrent.TimeUnit;
import com.dfsek.terra.addons.image.config.ImageLibraryPackConfigTemplate;
import com.dfsek.terra.addons.image.image.BufferedImageWrapper;
import com.dfsek.terra.addons.image.image.Image;
import com.dfsek.terra.addons.image.image.SuppliedImage;
import com.dfsek.terra.api.config.ConfigPack;
import com.dfsek.terra.api.properties.Properties;
import com.dfsek.terra.api.util.generic.Memo;
import static com.dfsek.terra.api.util.cache.CacheUtils.CACHE_EXECUTOR;
/*
* Cache prevents configs from loading the same image multiple times into memory
*/
record ImageCache(LoadingCache<String, Image> cache) implements Properties {
public static Image load(String path, ConfigPack pack) throws IOException {
ImageLibraryPackConfigTemplate config = pack.getContext().get(ImageLibraryPackConfigTemplate.class);
ImageCache images;
if(!pack.getContext().has(ImageCache.class)) {
var cacheBuilder = Caffeine.newBuilder().executor(CACHE_EXECUTOR).scheduler(Scheduler.systemScheduler());
if(config.unloadOnTimeout()) cacheBuilder.expireAfterAccess(config.getCacheTimeout(), TimeUnit.SECONDS);
images = new ImageCache(cacheBuilder.build(s -> loadImage(s, pack.getRootPath())));
pack.getContext().put(images);
} else images = pack.getContext().get(ImageCache.class);
if(config.loadOnUse()) {
if(config.unloadOnTimeout()) { // Grab directly from cache if images are to unload on timeout
return new SuppliedImage(() -> images.cache.get(path));
} else {
// If images do not time out, image can be lazily loaded once instead of performing cache lookups for each image operation
Memo<Image> lazyImage = Memo.lazy(() -> images.cache.get(path));
return new SuppliedImage(lazyImage::value);
}
}
return images.cache.get(path);
}
private static Image loadImage(String path, Path directory) throws IOException {
InputStream is = Files.newInputStream(directory.resolve(path));
return new BufferedImageWrapper(ImageIO.read(is));
}
}
@@ -0,0 +1,30 @@
package com.dfsek.terra.addons.image.config.image;
import com.dfsek.tectonic.api.config.template.annotations.Value;
import com.dfsek.tectonic.api.config.template.object.ObjectTemplate;
import java.io.IOException;
import com.dfsek.terra.addons.image.image.Image;
import com.dfsek.terra.api.config.ConfigPack;
public class ImageTemplate implements ObjectTemplate<Image> {
private final ConfigPack pack;
@Value("path")
private String path;
public ImageTemplate(ConfigPack pack) {
this.pack = pack;
}
@Override
public Image get() {
try {
return ImageCache.load(path, pack);
} catch(IOException e) {
throw new RuntimeException(e);
}
}
}
@@ -0,0 +1,68 @@
package com.dfsek.terra.addons.image.config.image;
import com.dfsek.tectonic.api.config.template.ValidatedConfigTemplate;
import com.dfsek.tectonic.api.config.template.annotations.Default;
import com.dfsek.tectonic.api.config.template.annotations.Value;
import com.dfsek.tectonic.api.config.template.object.ObjectTemplate;
import com.dfsek.tectonic.api.exception.ValidationException;
import java.io.IOException;
import com.dfsek.terra.addons.image.image.Image;
import com.dfsek.terra.addons.image.image.StitchedImage;
import com.dfsek.terra.api.config.ConfigPack;
public class StitchedImageTemplate implements ObjectTemplate<Image>, ValidatedConfigTemplate {
private final ConfigPack pack;
@Value("path-format")
private String path;
@Value("rows")
private int rows;
@Value("columns")
private int cols;
@Value("zero-indexed")
@Default
private boolean zeroIndexed = false;
public StitchedImageTemplate(ConfigPack pack) {
this.pack = pack;
}
@Override
public Image get() {
Image[][] grid = new Image[rows][cols];
for(int i = 0; i < rows; i++) {
for(int j = 0; j < cols; j++) {
try {
grid[i][j] = ImageCache.load(getFormattedPath(i, j), pack);
} catch(IOException e) {
throw new RuntimeException(e);
}
}
}
return new StitchedImage(grid, zeroIndexed);
}
private String getFormattedPath(int row, int column) {
if(!zeroIndexed) {
row++;
column++;
}
return path.replaceFirst("\\{row}", String.valueOf(row)).replaceFirst("\\{column}", String.valueOf(column));
}
@Override
public boolean validate() throws ValidationException {
if(!path.contains("{row}"))
throw new ValidationException("Path format does not contain sequence '{row}'");
if(!path.contains("{column}"))
throw new ValidationException("Path format does not contain sequence '{column}'");
if(rows < 1)
throw new ValidationException("Must have at least one row");
if(cols < 1)
throw new ValidationException("Must have at least one column");
return true;
}
}
@@ -0,0 +1,41 @@
package com.dfsek.terra.addons.image.config.sampler;
import com.dfsek.seismic.type.sampler.Sampler;
import com.dfsek.tectonic.api.config.template.annotations.Default;
import com.dfsek.tectonic.api.config.template.annotations.Value;
import com.dfsek.tectonic.api.config.template.object.ObjectTemplate;
import com.dfsek.terra.addons.image.colorsampler.ColorSampler;
import com.dfsek.terra.addons.image.sampler.ChannelSampler;
import com.dfsek.terra.addons.image.util.ColorUtil.Channel;
public class ChannelSamplerTemplate implements ObjectTemplate<Sampler> {
@Value("color-sampler")
private ColorSampler colorSampler;
@Value("channel")
private Channel channel;
/*
* If the channel should be normalized to range [-1, 1] or not
*/
@Value("normalize")
@Default
private boolean normalize = true;
/*
* Whether to multiply color channels by the alpha channel or not. If users
* are expecting pixel transparency to reduce the output value then this should
* be set to true.
*/
@Value("premultiply")
@Default
private boolean premultiply = false;
@Override
public Sampler get() {
return new ChannelSampler(colorSampler, channel, normalize, premultiply);
}
}
@@ -0,0 +1,75 @@
package com.dfsek.terra.addons.image.config.sampler;
import com.dfsek.seismic.type.sampler.Sampler;
import com.dfsek.tectonic.api.config.template.annotations.Default;
import com.dfsek.tectonic.api.config.template.annotations.Value;
import com.dfsek.tectonic.api.config.template.object.ObjectTemplate;
import com.dfsek.terra.addons.image.image.Image;
import com.dfsek.terra.addons.image.operator.DistanceTransform;
import com.dfsek.terra.addons.image.operator.DistanceTransform.CostFunction;
import com.dfsek.terra.addons.image.operator.DistanceTransform.Normalization;
import com.dfsek.terra.addons.image.util.ColorUtil.Channel;
public class DistanceTransformSamplerTemplate implements ObjectTemplate<Sampler> {
@Value("image")
private Image image;
/**
* The threshold value applied to the channel specified in the 'channel' parameter that splits
* the image into a binary image. This parameter is only used for cost functions that utilize
* a binary image.
*/
@Value("threshold")
@Default
private int threshold = 127;
/**
* If set to true, distances calculated will be clamped to stay above the largest
* distance calculated on the edges of the image. This ensures output values do not
* appear to be cut off at the image boundaries. It is recommended to leave padding
* around the image if this is in use, such that larger evaluated distances do not
* get cut out by smaller evaluated distances close to borders. Doing so will yield
* better results.
*/
@Value("clamp-to-max-edge")
@Default
private boolean clampToEdge = false;
/**
* The target channel to run distance calculations on.
*/
@Value("channel")
@Default
private Channel channel = Channel.GRAYSCALE;
/**
* The method of image processing applied to the specified image prior to calculating
* distances.
*/
@Value("cost-function")
@Default
private CostFunction costFunction = CostFunction.Channel;
/**
* Inverts the resulting binary image that may be used as a cost function.
*/
@Value("invert-threshold")
@Default
private boolean invertThreshold = false;
/**
* How the final distance calculation should be redistributed.
*/
@Value("normalization")
@Default
private Normalization normalization = Normalization.None;
@Override
public Sampler get() {
return new DistanceTransform.Noise(new DistanceTransform(image, channel, threshold, clampToEdge, costFunction, invertThreshold),
normalization);
}
}
@@ -0,0 +1,41 @@
package com.dfsek.terra.addons.image.converter;
import java.util.Map;
import com.dfsek.terra.addons.image.util.ColorUtil;
public class ClosestMatchColorConverter<T> implements ColorConverter<T> {
private final Map<Integer, T> map;
private final Integer[] colors;
public ClosestMatchColorConverter(Map<Integer, T> map) {
this.map = map;
this.colors = map.keySet().toArray(new Integer[0]);
}
@Override
public T apply(int color) {
int closest = 0;
int smallestDistance = Integer.MAX_VALUE;
for(int compare : colors) {
if(color == compare) {
closest = compare;
break;
}
int distance = ColorUtil.distance(color, compare);
if(distance < smallestDistance) {
smallestDistance = distance;
closest = compare;
}
}
return map.get(closest);
}
@Override
public Iterable<T> getEntries() {
return map.values();
}
}
@@ -0,0 +1,8 @@
package com.dfsek.terra.addons.image.converter;
public interface ColorConverter<T> {
T apply(int color);
Iterable<T> getEntries();
}
@@ -0,0 +1,42 @@
package com.dfsek.terra.addons.image.converter;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import com.dfsek.terra.addons.image.util.ColorUtil;
import com.dfsek.terra.addons.image.util.MapUtil;
public class ExactColorConverter<T> implements ColorConverter<T> {
private final Map<Integer, T> map;
private final T fallback;
private final boolean ignoreAlpha;
public ExactColorConverter(Map<Integer, T> map, T fallback, boolean ignoreAlpha) {
if(ignoreAlpha) {
map = MapUtil.mapKeys(map, ColorUtil::zeroAlpha);
}
this.map = map;
this.fallback = fallback;
this.ignoreAlpha = ignoreAlpha;
}
@Override
public T apply(int color) {
if(ignoreAlpha) {
color = ColorUtil.zeroAlpha(color);
}
T lookup = map.get(color);
return lookup != null ? lookup : fallback;
}
@Override
public Iterable<T> getEntries() {
Set<T> entries = new HashSet<>(map.values());
entries.add(fallback);
return entries;
}
}
@@ -0,0 +1,39 @@
package com.dfsek.terra.addons.image.converter.mapping;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Map.Entry;
import java.util.function.Function;
import java.util.stream.Collectors;
import com.dfsek.terra.api.registry.Registry;
import com.dfsek.terra.api.world.biome.Biome;
public class BiomeDefinedColorMapping<T> implements ColorMapping<T> {
Registry<Biome> biomeRegistry;
Function<Biome, T> converter;
public BiomeDefinedColorMapping(Registry<Biome> biomeRegistry, Function<Biome, T> converter) {
this.biomeRegistry = biomeRegistry;
this.converter = converter;
}
@Override
public Map<Integer, T> get() {
Map<Biome, Integer> colorMap = new HashSet<>(biomeRegistry.entries()).stream().collect(Collectors.toMap(b -> b, Biome::getColor));
Map<Integer, Biome> output = new HashMap<>();
colorMap.forEach(((biome, color) -> {
if(!output.containsKey(color)) {
output.put(color, biome);
} else {
throw new IllegalArgumentException(
String.format("Biome %s has same color as %s: %x", biome.getID(), output.get(color).getID(), color));
}
}));
return output.entrySet().stream().collect(Collectors.toMap(Entry::getKey, e -> converter.apply(e.getValue())));
}
}
@@ -0,0 +1,8 @@
package com.dfsek.terra.addons.image.converter.mapping;
import java.util.Map;
import java.util.function.Supplier;
public interface ColorMapping<T> extends Supplier<Map<Integer, T>> {
}
@@ -0,0 +1,28 @@
package com.dfsek.terra.addons.image.image;
import java.awt.image.BufferedImage;
public class BufferedImageWrapper implements Image {
private final BufferedImage image;
public BufferedImageWrapper(BufferedImage image) {
this.image = image;
}
@Override
public int getRGB(int x, int y) {
return image.getRGB(x, y);
}
@Override
public int getWidth() {
return image.getWidth();
}
@Override
public int getHeight() {
return image.getHeight();
}
}
@@ -0,0 +1,9 @@
package com.dfsek.terra.addons.image.image;
public interface Image {
int getRGB(int x, int y);
int getWidth();
int getHeight();
}
@@ -0,0 +1,74 @@
package com.dfsek.terra.addons.image.image;
public class StitchedImage implements Image {
private final Image[][] images;
private final int[] rowOffsets, columnOffsets;
private final int width, height;
public StitchedImage(Image[][] images, boolean zeroIndexed) throws IllegalArgumentException {
int width = 0;
int height = 0;
int rows = images.length;
int columns = images[0].length;
this.rowOffsets = new int[rows];
this.columnOffsets = new int[columns];
for(int i = 0; i < rows; i++) {
int rowHeight = images[i][0].getHeight();
rowOffsets[i] = height;
height += rowHeight;
for(int j = 1; j < columns; j++) {
if(images[i][j].getHeight() != rowHeight)
throw new IllegalArgumentException("Image heights in row " + (i + (zeroIndexed ? 0 : 1)) + " do not match");
}
}
for(int i = 0; i < columns; i++) {
int columnWidth = images[0][i].getWidth();
columnOffsets[i] = width;
width += columnWidth;
for(int j = 1; j < rows; j++) {
if(images[i][j].getWidth() != columnWidth)
throw new IllegalArgumentException("Image widths in column " + (i + (zeroIndexed ? 0 : 1)) + " do not match");
}
}
this.width = width;
this.height = height;
this.images = images;
}
private int getColumn(int x) {
for(int i = columnOffsets.length - 1; i > 0; i--) {
if(x >= columnOffsets[i])
return i;
}
return 0;
}
private int getRow(int y) {
for(int i = rowOffsets.length - 1; i > 0; i--) {
if(y >= rowOffsets[i])
return i;
}
return 0;
}
@Override
public int getRGB(int x, int y) {
int row = getRow(y);
int column = getColumn(x);
return images[row][column].getRGB(x - columnOffsets[column], y - rowOffsets[row]);
}
@Override
public int getWidth() {
return width;
}
@Override
public int getHeight() {
return height;
}
}
@@ -0,0 +1,28 @@
package com.dfsek.terra.addons.image.image;
import java.util.function.Supplier;
public class SuppliedImage implements Image {
private final Supplier<Image> imageSupplier;
public SuppliedImage(Supplier<Image> imageSupplier) {
this.imageSupplier = imageSupplier;
}
@Override
public int getRGB(int x, int y) {
return imageSupplier.get().getRGB(x, y);
}
@Override
public int getWidth() {
return imageSupplier.get().getWidth();
}
@Override
public int getHeight() {
return imageSupplier.get().getHeight();
}
}
@@ -0,0 +1,245 @@
package com.dfsek.terra.addons.image.operator;
import com.dfsek.seismic.math.floatingpoint.FloatingPointFunctions;
import com.dfsek.seismic.type.sampler.Sampler;
import com.dfsek.terra.addons.image.image.Image;
import com.dfsek.terra.addons.image.util.ColorUtil;
import com.dfsek.terra.addons.image.util.ColorUtil.Channel;
import static com.dfsek.terra.addons.image.util.MathUtil.lerp;
/**
* Computes a 2D distance transform of a given image and stores the result in a 2D array of distances.
* Implementation based on the algorithm described in the paper
* <a href="https://cs.brown.edu/people/pfelzens/papers/dt-final.pdf">Distance Transforms of Sampled Functions</a>
* by Pedro F. Felzenszwalb and Daniel P. Huttenlocher.
*/
public class DistanceTransform {
private static final double MAX_DISTANCE_CAP = 10_000_000; // Arbitrarily large value, doubtful someone would
private final double[][] distances;
/**
* Size bounds matching the provided image.
*/
private final int width, height;
/**
* Min and max distances of the distance computation. These may change after {@link #normalize(Normalization)} calls.
*/
private double minDistance, maxDistance;
// ever use an image large enough to exceed this.
public DistanceTransform(Image image, Channel channel, int threshold, boolean clampToMaxEdgeDistance, CostFunction costFunction,
boolean invertThreshold) {
// Construct binary image based on threshold value
boolean[][] binaryImage = new boolean[image.getWidth()][image.getHeight()];
for(int x = 0; x < image.getWidth(); x++) {
for(int y = 0; y < image.getHeight(); y++) {
binaryImage[x][y] = ColorUtil.getChannel(image.getRGB(x, y), channel) > threshold ^ invertThreshold;
}
}
// Get edges of binary image
boolean[][] binaryImageEdge = new boolean[image.getWidth()][image.getHeight()];
for(int x = 0; x < image.getWidth(); x++) {
for(int y = 0; y < image.getHeight(); y++) {
if(!binaryImage[x][y])
binaryImageEdge[x][y] = false;
else
// If cell borders any false cell
binaryImageEdge[x][y] = x > 0 && !binaryImage[x - 1][y] ||
y > 0 && !binaryImage[x][y - 1] ||
x < image.getWidth() - 1 && !binaryImage[x + 1][y] ||
y < image.getHeight() - 1 && !binaryImage[x][y + 1];
}
}
double[][] function = new double[image.getWidth()][image.getHeight()];
for(int x = 0; x < image.getWidth(); x++) {
for(int y = 0; y < image.getHeight(); y++) {
function[x][y] = switch(costFunction) {
case Channel -> ColorUtil.getChannel(image.getRGB(x, y), channel);
case Threshold -> binaryImage[x][y] ? MAX_DISTANCE_CAP : 0;
case ThresholdEdge, ThresholdEdgeSigned -> binaryImageEdge[x][y] ? 0 : MAX_DISTANCE_CAP;
};
}
}
distances = calculateDistance2D(function);
if(costFunction == CostFunction.ThresholdEdgeSigned) {
for(int x = 0; x < image.getWidth(); x++) {
for(int y = 0; y < image.getHeight(); y++) {
distances[x][y] *= binaryImage[x][y] ? 1 : -1;
}
}
}
if(clampToMaxEdgeDistance) {
// Find the largest value on the edge of the image
double max = Double.NEGATIVE_INFINITY;
for(int x = 0; x < image.getWidth(); x++) {
max = Math.max(max, distances[x][0]);
max = Math.max(max, distances[x][image.getHeight() - 1]);
}
for(int y = 0; y < image.getHeight(); y++) {
max = Math.max(max, distances[0][y]);
max = Math.max(max, distances[image.getWidth() - 1][y]);
}
// Clamp to that largest value
for(int x = 0; x < image.getWidth(); x++) {
for(int y = 0; y < image.getHeight(); y++) {
distances[x][y] = Math.max(max, distances[x][y]);
}
}
}
this.width = image.getWidth();
this.height = image.getHeight();
setOutputRange();
}
private double[][] calculateDistance2D(double[][] f) {
double[][] d = new double[f.length][f[0].length];
// Distance pass for each column
for(int x = 0; x < f.length; x++) {
d[x] = calculateDistance1D(f[x]);
}
// Distance pass for each row
double[] row = new double[f.length];
for(int y = 0; y < f[0].length; y++) {
for(int x = 0; x < f[0].length; x++)
row[x] = d[x][y];
row = calculateDistance1D(row);
for(int x = 0; x < f[0].length; x++) {
d[x][y] = Math.sqrt(row[x]);
}
}
return d;
}
private double[] calculateDistance1D(double[] f) {
double[] d = new double[f.length];
int[] v = new int[f.length];
double[] z = new double[f.length + 1];
int k = 0;
v[0] = 0;
z[0] = Integer.MIN_VALUE;
z[1] = Integer.MAX_VALUE;
for(int q = 1; q <= f.length - 1; q++) {
double fqPlusQ2 = (f[q] + Math.pow(q, 2));
double twoQ = 2 * q;
double s = (fqPlusQ2 - (f[v[k]] + Math.pow(v[k], 2))) / (twoQ - 2 * v[k]);
while(s <= z[k]) {
k--;
s = (fqPlusQ2 - (f[v[k]] + Math.pow(v[k], 2))) / (twoQ - 2 * v[k]);
}
k++;
v[k] = q;
z[k] = s;
z[k + 1] = Integer.MAX_VALUE;
}
k = 0;
for(int q = 0; q <= f.length - 1; q++) {
while(z[k + 1] < q)
k++;
d[q] = Math.pow(q - v[k], 2) + f[v[k]];
}
return d;
}
/**
* Redistributes the stored distance computation according to the provided {@link Normalization} method.
*/
private void normalize(Normalization normalization) {
for(int x = 0; x < width; x++) {
for(int y = 0; y < height; y++) {
double d = distances[x][y];
distances[x][y] = switch(normalization) {
case None -> distances[x][y];
case Linear -> lerp(d, minDistance, -1, maxDistance, 1);
case SmoothPreserveZero -> {
if(minDistance > 0 || maxDistance < 0) {
// Can't preserve zero if it is not contained in range so just lerp
yield lerp(distances[x][y], minDistance, -1, maxDistance, 1);
} else {
if(d > 0) {
yield Math.pow(d / maxDistance, 2);
} else if(d < 0) {
yield -Math.pow(d / minDistance, 2);
} else {
yield 0;
}
}
}
};
}
}
setOutputRange();
}
private void setOutputRange() {
double minDistance = Double.POSITIVE_INFINITY;
double maxDistance = Double.NEGATIVE_INFINITY;
for(int x = 0; x < width; x++) {
for(int y = 0; y < height; y++) {
minDistance = Math.min(minDistance, distances[x][y]);
maxDistance = Math.max(maxDistance, distances[x][y]);
}
}
this.minDistance = minDistance;
this.maxDistance = maxDistance;
}
public enum CostFunction {
Channel,
Threshold,
ThresholdEdge,
ThresholdEdgeSigned,
}
public enum Normalization {
/**
* Return the raw calculated distances.
*/
None,
/**
* Redistribute the output values to fit in the range [-1, 1]
*/
Linear,
/**
* Redistributes smoothly to the range [-1, 1], such that areas where distance = 0 stay 0.
* This is only really applicable to signed distance calculations, and will fall back to linear
* redistribution if the input range does not contain both positive and negative values.
*/
SmoothPreserveZero,
}
public static class Noise implements Sampler {
private final DistanceTransform transform;
public Noise(DistanceTransform transform, Normalization normalization) {
this.transform = transform;
transform.normalize(normalization);
}
@Override
public double getSample(long seed, double x, double y) {
if(x < 0 || y < 0 || x >= transform.width || y >= transform.height) return transform.minDistance;
return transform.distances[FloatingPointFunctions.floor(x)][FloatingPointFunctions.floor(y)];
}
@Override
public double getSample(long seed, double x, double y, double z) {
return getSample(seed, x, z);
}
}
}
@@ -0,0 +1,41 @@
package com.dfsek.terra.addons.image.sampler;
import com.dfsek.seismic.type.sampler.Sampler;
import com.dfsek.terra.addons.image.colorsampler.ColorSampler;
import com.dfsek.terra.addons.image.util.ColorUtil;
import com.dfsek.terra.addons.image.util.ColorUtil.Channel;
import static com.dfsek.terra.addons.image.util.MathUtil.lerp;
public class ChannelSampler implements Sampler {
private final ColorSampler colorSampler;
private final Channel channel;
private final boolean normalize;
private final boolean premultiply;
public ChannelSampler(ColorSampler colorSampler, Channel channel, boolean normalize, boolean premultiply) {
this.colorSampler = colorSampler;
this.channel = channel;
this.normalize = normalize;
this.premultiply = premultiply;
}
@Override
public double getSample(long seed, double x, double y) {
int sample = colorSampler.apply((int) x, (int) y);
int premultiplied = premultiply ? ColorUtil.premultiply(sample) : sample;
double channelValue = channel.from(premultiplied);
return normalize ? lerp(channelValue, 0, -1, 255, 1) : channelValue;
}
@Override
public double getSample(long seed, double x, double y, double z) {
return getSample(seed, x, z);
}
}
@@ -0,0 +1,340 @@
package com.dfsek.terra.addons.image.util;
/**
* Utility class for manipulating 8 bit ARGB colors
*/
public class ColorUtil {
private ColorUtil() { }
public static int distance(int a, int b) {
return Math.abs(getRed(a) - getRed(b)) +
Math.abs(getGreen(a) - getGreen(b)) +
Math.abs(getBlue(a) - getBlue(b));
}
/**
* Returns the red channel value of a given ARGB color value.
*
* @param argb the ARGB color value to extract the red channel value from
*
* @return the red channel value of the given ARGB color value, in the range 0-255
*/
public static int getRed(int argb) {
return argb >> 16 & 255;
}
/**
* Returns the green channel value of a given ARGB color value.
*
* @param argb the ARGB color value to extract the green channel value from
*
* @return the green channel value of the given ARGB color value, in the range 0-255
*/
public static int getGreen(int argb) {
return argb >> 8 & 255;
}
/**
* Returns the blue channel value of a given ARGB color value.
*
* @param argb the ARGB color value to extract the blue channel value from
*
* @return the blue channel value of the given ARGB color value, in the range 0-255
*/
public static int getBlue(int argb) {
return argb & 255;
}
/**
* Returns the alpha channel value of a given ARGB color value.
*
* @param argb the ARGB color value to extract the blue channel value from
*
* @return the alpha channel value of the given ARGB color value, in the range 0-255
*/
public static int getAlpha(int argb) {
return argb >> 24 & 255;
}
/**
* Returns the grayscale value of a given ARGB color value.
*
* @param argb the ARGB color value to convert to grayscale
*
* @return the grayscale value of the given ARGB color value, in the range 0-255
*/
public static int getGrayscale(int argb) {
return (getRed(argb) + getGreen(argb) + getBlue(argb)) / 3;
}
/**
* Returns the value of the specified channel for a given ARGB color value.
*
* @param argb the ARGB color value to extract the channel value from
* @param channel the channel to extract the value from
*
* @return the value of the specified channel for the given ARGB color value, in the range 0-255
*/
public static int getChannel(int argb, Channel channel) {
return channel.from(argb);
}
/**
* Sets the red channel value of a given ARGB color value to zero.
*
* @param argb the ARGB color value to zero the red channel of
*
* @return the resulting ARGB color value with the red channel set to zero
*/
public static int zeroRed(int argb) {
return argb & ~0x00FF0000;
}
/**
* Sets the green channel value of a given ARGB color value to zero.
*
* @param argb the ARGB color value to zero the green channel of
*
* @return the resulting ARGB color value with the green channel set to zero
*/
public static int zeroGreen(int argb) {
return argb & ~0x0000FF00;
}
/**
* Sets the blue channel value of a given ARGB color value to zero.
*
* @param argb the ARGB color value to zero the blue channel of
*
* @return the resulting ARGB color value with the blue channel set to zero
*/
public static int zeroBlue(int argb) {
return argb & ~0x000000FF;
}
/**
* Sets the alpha channel value of a given ARGB color value to zero.
* This is the same as setting the color to fully transparent.
*
* @param argb the ARGB color value to zero the alpha channel of
*
* @return the resulting ARGB color value with the alpha channel set to zero
*/
public static int zeroAlpha(int argb) {
return argb & ~0xFF000000;
}
/**
* Sets the color channels of a given ARGB color value to zero.
* This is the same as setting the color to black, while preserving the alpha.
*
* @param argb the ARGB color value to zero the color channel of
*
* @return the resulting ARGB color value with the color channels set to zero
*/
public static int zeroGrayscale(int argb) {
return argb & ~0x00FFFFFF;
}
/**
* Sets the specified channel value of a given ARGB color value to zero.
*
* @param argb the ARGB color value to zero the specified channel of
* @param channel the channel to zero the value of
*
* @return the resulting ARGB color value with the specified channel value set to zero
*/
public static int zeroChannel(int argb, Channel channel) {
return channel.zero(argb);
}
/**
* Multiply the RGB channels of a given ARGB color value by its alpha channel value.
*
* @param argb the ARGB color value to premultiply the RGB channels of
*
* @return the resulting premultiplied ARGB color value
*/
public static int premultiply(int argb) {
int alpha = getAlpha(argb);
int red = (getRed(argb) * alpha + 127) / 255;
int green = (getGreen(argb) * alpha + 127) / 255;
int blue = (getBlue(argb) * alpha + 127) / 255;
return argb(alpha, red, green, blue);
}
/**
* Returns an ARGB color value with the specified values for alpha, red, green, and blue channels.
*
* @param alpha the alpha value, between 0 and 255, to set in the ARGB color value
* @param red the red value, between 0 and 255, to set in the ARGB color value
* @param green the green value, between 0 and 255, to set in the ARGB color value
* @param blue the blue value, between 0 and 255, to set in the ARGB color value
*
* @return the resulting ARGB color value with the specified values for alpha, red, green, and blue channels
*/
public static int argb(int alpha, int red, int green, int blue) {
return argbAlpha(alpha) | argbRed(red) | argbGreen(green) | argbBlue(blue);
}
/**
* Returns an ARGB color value with the specified values for alpha, red, green, and blue channels,
* after validating that each channel value is in the range 0-255.
*
* @param alpha the alpha value, between 0 and 255, to set in the ARGB color value
* @param red the red value, between 0 and 255, to set in the ARGB color value
* @param green the green value, between 0 and 255, to set in the ARGB color value
* @param blue the blue value, between 0 and 255, to set in the ARGB color value
*
* @return the resulting ARGB color value with the specified values for alpha, red, green, and blue channels
*
* @throws IllegalArgumentException if any channel value is outside the range 0-255
*/
public static int argbValidated(int alpha, int red, int green, int blue) throws IllegalArgumentException {
if(alpha < 0 || alpha > 255 ||
red < 0 || red > 255 ||
green < 0 || green > 255 ||
blue < 0 || blue > 255
) throw new IllegalArgumentException("Channel values must be in range 0-255");
return argb(alpha, red, green, blue);
}
/**
* Returns the ARGB color value with the specified alpha channel value and zero
* for the red, green, and blue channels.
*
* @param alpha the alpha channel value to set in the ARGB color value
*
* @return the resulting ARGB color value
*/
public static int argbAlpha(int alpha) { return alpha << 24; }
/**
* Returns the ARGB color value with the specified red channel value and zero
* for the alpha, green, and blue channels.
*
* @param red the red channel value to set in the ARGB color value
*
* @return the resulting ARGB color value
*/
public static int argbRed(int red) { return red << 16; }
/**
* Returns the ARGB color value with the specified red channel value and zero
* for the alpha, red, and blue channels.
*
* @param green the green channel value to set in the ARGB color value
*
* @return the resulting ARGB color value
*/
public static int argbGreen(int green) { return green << 8; }
/**
* Returns the ARGB color value with the specified blue channel value and zero
* for the alpha, red, and green channels.
*
* @param blue the blue channel value to set in the ARGB color value
*
* @return the resulting ARGB color value
*/
public static int argbBlue(int blue) { return blue; }
/**
* Returns an ARGB color value with the specified grayscale value for all four channels.
*
* @param value the grayscale value to set in all four channels of the ARGB color value
*
* @return the resulting ARGB color value with the specified grayscale value for all four channels
*/
public static int argbGrayscale(int value) { return argb(value, value, value, value); }
public enum Channel {
RED {
@Override
public int from(int argb) {
return getRed(argb);
}
@Override
public int zero(int argb) {
return zeroRed(argb);
}
@Override
public int argb(int value) {
return argbRed(value);
}
},
GREEN {
@Override
public int from(int argb) {
return getGreen(argb);
}
@Override
public int zero(int argb) {
return zeroGreen(argb);
}
@Override
public int argb(int value) {
return argbGreen(value);
}
},
BLUE {
@Override
public int from(int argb) {
return getBlue(argb);
}
@Override
public int zero(int argb) {
return zeroBlue(argb);
}
@Override
public int argb(int value) {
return argbBlue(value);
}
},
GRAYSCALE {
@Override
public int from(int argb) {
return getGrayscale(argb);
}
@Override
public int zero(int argb) {
return zeroGrayscale(argb);
}
@Override
public int argb(int value) {
return argbAlpha(value);
}
},
ALPHA {
@Override
public int from(int argb) {
return getAlpha(argb);
}
@Override
public int zero(int argb) {
return zeroAlpha(argb);
}
@Override
public int argb(int value) {
return argbAlpha(value);
}
};
public abstract int from(int argb);
public abstract int zero(int argb);
public abstract int argb(int value);
}
}
@@ -0,0 +1,25 @@
package com.dfsek.terra.addons.image.util;
import java.util.Map;
import java.util.Map.Entry;
import java.util.function.Function;
import java.util.stream.Collectors;
public class MapUtil {
private MapUtil() { }
/**
* Utility method for applying transformations on a map's keys.
*/
public static <O, N, T> Map<N, T> mapKeys(Map<O, T> map, Function<O, N> mappingFunction) {
return map
.entrySet()
.stream()
.collect(Collectors.toMap(
e -> mappingFunction.apply(e.getKey()),
Entry::getValue
));
}
}
@@ -0,0 +1,9 @@
package com.dfsek.terra.addons.image.util;
public class MathUtil {
private MathUtil() { }
public static double lerp(double x, double x1, double y1, double x2, double y2) {
return (((y1 - y2) * (x - x1)) / (x1 - x2)) + y1;
}
}
@@ -0,0 +1,12 @@
schema-version: 1
contributors:
- Terra contributors
id: api-image
version: @VERSION@
entrypoints:
- "com.dfsek.terra.addons.image.ImageLibraryAddon"
website:
issues: https://github.com/PolyhedralDev/Terra/issues
source: https://github.com/PolyhedralDev/Terra
docs: https://terra.polydev.org
license: MIT License
@@ -0,0 +1,6 @@
version = version("1.0.0")
dependencies {
compileOnlyApi(project(":common:addons:addon-loader-manifest"))
compileOnlyApi(project(":common:addons:api-biome-query"))
}
@@ -0,0 +1,51 @@
package com.dfsek.terra.addons.biome.extrusion;
import com.dfsek.terra.api.util.Column;
import com.dfsek.terra.api.world.biome.Biome;
class BaseBiomeColumn implements Column<Biome> {
private final BiomeExtrusionProvider biomeProvider;
private final Biome base;
private final int min;
private final int max;
private final int x;
private final int z;
private final long seed;
protected BaseBiomeColumn(BiomeExtrusionProvider biomeProvider, Biome base, int min, int max, int x, int z, long seed) {
this.biomeProvider = biomeProvider;
this.base = base;
this.min = min;
this.max = max;
this.x = x;
this.z = z;
this.seed = seed;
}
@Override
public int getMinY() {
return min;
}
@Override
public int getMaxY() {
return max;
}
@Override
public int getX() {
return x;
}
@Override
public int getZ() {
return z;
}
@Override
public Biome get(int y) {
return biomeProvider.pipeline.extrude(base, x, y, z, seed);
}
}
@@ -0,0 +1,67 @@
package com.dfsek.terra.addons.biome.extrusion;
import com.dfsek.tectonic.api.config.template.object.ObjectTemplate;
import java.util.function.Supplier;
import com.dfsek.terra.addons.biome.extrusion.api.Extrusion;
import com.dfsek.terra.addons.biome.extrusion.api.ReplaceableBiome;
import com.dfsek.terra.addons.biome.extrusion.config.BiomeExtrusionTemplate;
import com.dfsek.terra.addons.biome.extrusion.config.ReplaceableBiomeLoader;
import com.dfsek.terra.addons.biome.extrusion.config.extrusions.ReplaceExtrusionTemplate;
import com.dfsek.terra.addons.biome.extrusion.config.extrusions.SetExtrusionTemplate;
import com.dfsek.terra.addons.manifest.api.AddonInitializer;
import com.dfsek.terra.api.Platform;
import com.dfsek.terra.api.addon.BaseAddon;
import com.dfsek.terra.api.event.events.config.pack.ConfigPackPostLoadEvent;
import com.dfsek.terra.api.event.events.config.pack.ConfigPackPreLoadEvent;
import com.dfsek.terra.api.event.functional.FunctionalEventHandler;
import com.dfsek.terra.api.inject.annotations.Inject;
import com.dfsek.terra.api.registry.CheckedRegistry;
import com.dfsek.terra.api.registry.Registry;
import com.dfsek.terra.api.util.reflection.TypeKey;
import com.dfsek.terra.api.world.biome.Biome;
import com.dfsek.terra.api.world.biome.generation.BiomeProvider;
public class BiomeExtrusionAddon implements AddonInitializer {
public static final TypeKey<Supplier<ObjectTemplate<Extrusion>>> EXTRUSION_REGISTRY_KEY = new TypeKey<>() {
};
public static final TypeKey<Supplier<ObjectTemplate<BiomeProvider>>> PROVIDER_REGISTRY_KEY = new TypeKey<>() {
};
@Inject
private Platform platform;
@Inject
private BaseAddon addon;
@Override
public void initialize() {
platform.getEventManager()
.getHandler(FunctionalEventHandler.class)
.register(addon, ConfigPackPreLoadEvent.class)
.then(event -> {
CheckedRegistry<Supplier<ObjectTemplate<BiomeProvider>>> providerRegistry =
event.getPack()
.getOrCreateRegistry(PROVIDER_REGISTRY_KEY);
providerRegistry.register(addon.key("EXTRUSION"), BiomeExtrusionTemplate::new);
})
.then(event -> {
CheckedRegistry<Supplier<ObjectTemplate<Extrusion>>> extrusionRegistry = event.getPack().getOrCreateRegistry(
EXTRUSION_REGISTRY_KEY);
extrusionRegistry.register(addon.key("SET"), SetExtrusionTemplate::new);
extrusionRegistry.register(addon.key("REPLACE"), ReplaceExtrusionTemplate::new);
})
.failThrough();
platform.getEventManager()
.getHandler(FunctionalEventHandler.class)
.register(addon, ConfigPackPostLoadEvent.class)
.then(event -> {
Registry<Biome> biomeRegistry = event.getPack().getRegistry(Biome.class);
event.getPack().applyLoader(ReplaceableBiome.class, new ReplaceableBiomeLoader(biomeRegistry));
});
}
}
@@ -0,0 +1,64 @@
package com.dfsek.terra.addons.biome.extrusion;
import java.util.List;
import java.util.Optional;
import java.util.Set;
import java.util.stream.Collectors;
import com.dfsek.terra.addons.biome.extrusion.api.Extrusion;
import com.dfsek.terra.addons.biome.extrusion.utils.ExtrusionPipeline;
import com.dfsek.terra.addons.biome.extrusion.utils.ExtrusionPipelineFactory;
import com.dfsek.terra.api.util.Column;
import com.dfsek.terra.api.util.generic.data.types.Maybe;
import com.dfsek.terra.api.world.biome.Biome;
import com.dfsek.terra.api.world.biome.generation.BiomeProvider;
public class BiomeExtrusionProvider implements BiomeProvider {
public final ExtrusionPipeline pipeline;
private final BiomeProvider delegate;
private final Set<Biome> biomes;
private final int resolution;
public BiomeExtrusionProvider(BiomeProvider delegate, List<Extrusion> extrusions, int resolution) {
this.delegate = delegate;
this.biomes = delegate.stream().collect(Collectors.toSet());
extrusions.forEach(e -> biomes.addAll(e.getBiomes()));
this.pipeline = ExtrusionPipelineFactory.create(extrusions);
this.resolution = resolution;
}
@Override
public Biome getBiome(int x, int y, int z, long seed) {
Biome delegated = delegate.getBiome(x, y, z, seed);
return pipeline.extrude(delegated, x, y, z, seed);
}
@Override
public Column<Biome> getColumn(int x, int z, long seed, int min, int max) {
return delegate.getBaseBiome(x, z, seed)
.map(base -> (Column<Biome>) new BaseBiomeColumn(this, base, min, max, x, z, seed))
.get(() -> BiomeProvider.super.getColumn(x, z, seed, min, max));
}
@Override
public Maybe<Biome> getBaseBiome(int x, int z, long seed) {
return delegate.getBaseBiome(x, z, seed);
}
@Override
public Iterable<Biome> getBiomes() {
return biomes;
}
@Override
public int resolution() {
return resolution;
}
public BiomeProvider getDelegate() {
return delegate;
}
}
@@ -0,0 +1,12 @@
package com.dfsek.terra.addons.biome.extrusion.api;
import java.util.Collection;
import com.dfsek.terra.api.world.biome.Biome;
public interface Extrusion {
Biome extrude(Biome original, int x, int y, int z, long seed);
Collection<Biome> getBiomes();
}
@@ -0,0 +1,23 @@
package com.dfsek.terra.addons.biome.extrusion.api;
import com.dfsek.terra.api.world.biome.Biome;
final class PresentBiome implements ReplaceableBiome {
private final Biome biome;
PresentBiome(Biome biome) {
this.biome = biome;
}
@Override
public Biome get(Biome existing) {
return biome;
}
@Override
public boolean isSelf() {
return false;
}
}
@@ -0,0 +1,31 @@
package com.dfsek.terra.addons.biome.extrusion.api;
import java.util.Optional;
import com.dfsek.terra.api.world.biome.Biome;
/**
* Basically just a specialised implementation of {@link Optional} for biomes where a biome may be a "self" reference.
*/
public sealed interface ReplaceableBiome permits PresentBiome, SelfBiome {
static ReplaceableBiome of(Biome biome) {
return new PresentBiome(biome);
}
static ReplaceableBiome self() {
return SelfBiome.INSTANCE;
}
Biome get(Biome existing);
default Biome get() {
if(isSelf()) {
throw new IllegalStateException("Cannot get() self biome!");
}
return get(null);
}
boolean isSelf();
}
@@ -0,0 +1,21 @@
package com.dfsek.terra.addons.biome.extrusion.api;
import java.util.Objects;
import com.dfsek.terra.api.world.biome.Biome;
final class SelfBiome implements ReplaceableBiome {
public static final SelfBiome INSTANCE = new SelfBiome();
@Override
public Biome get(Biome existing) {
return Objects.requireNonNull(existing);
}
@Override
public boolean isSelf() {
return true;
}
}
@@ -0,0 +1,30 @@
package com.dfsek.terra.addons.biome.extrusion.config;
import com.dfsek.tectonic.api.config.template.annotations.Default;
import com.dfsek.tectonic.api.config.template.annotations.Value;
import com.dfsek.tectonic.api.config.template.object.ObjectTemplate;
import java.util.List;
import com.dfsek.terra.addons.biome.extrusion.BiomeExtrusionProvider;
import com.dfsek.terra.addons.biome.extrusion.api.Extrusion;
import com.dfsek.terra.api.config.meta.Meta;
import com.dfsek.terra.api.world.biome.generation.BiomeProvider;
public class BiomeExtrusionTemplate implements ObjectTemplate<BiomeProvider> {
@Value("provider")
private @Meta BiomeProvider provider;
@Value("resolution")
@Default
private @Meta int resolution = 4;
@Value("extrusions")
private @Meta List<@Meta Extrusion> extrusions;
@Override
public BiomeProvider get() {
return new BiomeExtrusionProvider(provider, extrusions, resolution);
}
}
@@ -0,0 +1,32 @@
package com.dfsek.terra.addons.biome.extrusion.config;
import com.dfsek.tectonic.api.depth.DepthTracker;
import com.dfsek.tectonic.api.exception.LoadException;
import com.dfsek.tectonic.api.loader.ConfigLoader;
import com.dfsek.tectonic.api.loader.type.TypeLoader;
import org.jetbrains.annotations.NotNull;
import java.lang.reflect.AnnotatedType;
import com.dfsek.terra.addons.biome.extrusion.api.ReplaceableBiome;
import com.dfsek.terra.api.registry.Registry;
import com.dfsek.terra.api.world.biome.Biome;
public class ReplaceableBiomeLoader implements TypeLoader<ReplaceableBiome> {
private final Registry<Biome> biomeRegistry;
public ReplaceableBiomeLoader(Registry<Biome> biomeRegistry) {
this.biomeRegistry = biomeRegistry;
}
@Override
public ReplaceableBiome load(@NotNull AnnotatedType t, @NotNull Object c, @NotNull ConfigLoader loader, DepthTracker depthTracker)
throws LoadException {
if(c.equals("SELF")) return ReplaceableBiome.self();
return biomeRegistry
.getByID((String) c)
.map(ReplaceableBiome::of)
.collectThrow(left -> new LoadException("No such biome: " + c + ": " + left, depthTracker));
}
}
@@ -0,0 +1,23 @@
package com.dfsek.terra.addons.biome.extrusion.config.extrusions;
import com.dfsek.tectonic.api.config.template.annotations.Value;
import com.dfsek.terra.addons.biome.extrusion.api.Extrusion;
import com.dfsek.terra.addons.biome.extrusion.api.ReplaceableBiome;
import com.dfsek.terra.addons.biome.extrusion.extrusions.ReplaceExtrusion;
import com.dfsek.terra.api.config.meta.Meta;
import com.dfsek.terra.api.util.collection.ProbabilityCollection;
public class ReplaceExtrusionTemplate extends SamplerExtrusionTemplate {
@Value("to")
private @Meta ProbabilityCollection<@Meta ReplaceableBiome> biomes;
@Value("from")
private @Meta String fromTag;
@Override
public Extrusion get() {
return new ReplaceExtrusion(sampler, range, biomes, fromTag);
}
}

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