Compare commits

..

1150 Commits

Author SHA1 Message Date
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 a94c0adeb5 bump versions 2022-06-12 22:22:50 -07:00
dfsek e2088bbbb8 implement stronghold hack on 1.19 bukkit 2022-06-12 22:20:47 -07:00
dfsek 1d7ddc2844 remove ReloadCommandMixin 2022-06-12 21:57:47 -07:00
dfsek 443b372736 reimplement Cloud in Fabric 2022-06-12 21:57:19 -07:00
dfsek 170b3d95ea fix vanilla features generating in terra biomes 2022-06-12 21:57:10 -07:00
dfsek ee88f9e75f apply downfall to 1.19 NMS biomes 2022-06-12 21:36:29 -07:00
dfsek fbc1a38a8d depend on Cloud again in Fabric 2022-06-12 21:33:45 -07:00
dfsek d333b186b1 update cloud to 1.70-SNAPSHOT 2022-06-12 21:31:12 -07:00
dfsek 2363ad8c6c fix reflection proxies 2022-06-12 21:24:19 -07:00
dfsek 55686e2704 shade reflection remapper 2022-06-12 21:20:35 -07:00
dfsek 5a445fefac fix bukkit reobf nms shadow 2022-06-12 20:47:59 -07:00
dfsek 2c85284cfb improve bukkit build 2022-06-12 20:27:14 -07:00
dfsek 0c2a8c6bbc use mapped 1.18 NMS 2022-06-12 18:13:00 -07:00
dfsek b3efaa4f6a use paperweight for 1.18.2 2022-06-12 17:33:14 -07:00
dfsek 69b994df0d 1.19 bukkit compiles now 2022-06-12 17:04:00 -07:00
dfsek 2141e7489e add 1.19 NMS module 2022-06-12 16:12:21 -07:00
dfsek f4f0dca3bd add papermc maven to build setting 2022-06-12 14:33:31 -07:00
dfsek d93f11b5f2 fix resource dumping on windows 2022-06-07 18:39:43 -07:00
dfsek 6f41d16408 bump version 2022-06-07 18:36:41 -07:00
dfsek 0feae25be5 Merge pull request #318 from PolyhedralDev/dev/1.19
Update to 1.19
2022-06-07 15:40:41 -07:00
dfsek d0069ffe83 bump version 2022-06-07 15:13:19 -07:00
dfsek cec83aeb78 Merge pull request #317 from PolyhedralDev/ver/6.0.1
Update addons when new minor and patch versions are available
2022-06-07 15:06:21 -07:00
dfsek c468054bbe spawn entity in serverworld with no world object 2022-06-07 15:05:47 -07:00
dfsek 372931a9c5 fix chunkregion entity spawn crash 2022-06-07 13:56:02 -07:00
dfsek 9a640de8d3 fix file dumping 2022-06-07 11:38:53 -07:00
dfsek f4968e1509 downgrade loom 2022-06-07 11:38:40 -07:00
dfsek 1858bab210 only remove old resources if replacement exists 2022-06-07 11:19:53 -07:00
dfsek c811fd31b1 warn about nonexistent classpath resources 2022-06-07 11:17:07 -07:00
dfsek 098cb740dd fix addon check on fresh install 2022-06-07 11:02:58 -07:00
dfsek 9ac63ce469 fix (??) Loom issues 2022-06-07 11:01:14 -07:00
dfsek db0067a6d9 improve addonDir addon installation 2022-06-07 10:19:42 -07:00
dfsek 5de8df188a specify failed addon path 2022-06-07 08:53:57 -07:00
dfsek fa66bd3c42 create addon dir if it doesn't exist 2022-06-07 08:32:55 -07:00
dfsek e89d473669 update to 1.19 2022-06-07 08:24:58 -07:00
dfsek 90f3138395 Merge remote-tracking branch 'origin/ver/6.0.1' into dev/1.19 2022-06-07 08:18:05 -07:00
dfsek 4e789479e4 update loom 2022-06-07 08:13:59 -07:00
dfsek 3fbb93d157 Merge pull request #312 from duplexsystem/patch-1
Fix fabric config
2022-06-07 00:39:51 -07:00
dfsek 90a48345c2 automatically update addons when minor & patch versions are changed 2022-06-07 00:39:05 -07:00
dfsek 7c00cad4c9 add Pair function API 2022-06-07 00:38:09 -07:00
solo 963e070f92 Merge pull request #313 from duplexsystem/patch-2
fix new lines in PULL_REQUEST_TEMPLATE.md so that check boxes render …
2022-06-06 12:53:05 -04:00
dfsek 908a5dc309 use main executor for generation 2022-06-05 20:59:37 -07:00
dfsek 3adcdb4019 implement air threshold in beardifier 2022-06-05 19:28:08 -07:00
dfsek fbbf09a937 fix beardification 2022-06-05 18:55:43 -07:00
dfsek 254bc93f93 remove unneeded seed from TerraBiomeSource 2022-06-05 17:48:12 -07:00
dfsek ed7bfd2d68 register normal tag to Terra world presets 2022-06-05 17:18:24 -07:00
dfsek 76e8c2d2b1 tag collection util method 2022-06-05 16:57:43 -07:00
dfsek b0aca47e74 registerTags -> registerBiomeTags 2022-06-05 16:56:43 -07:00
dfsek 5d703327db bump versions 2022-06-04 15:11:59 -07:00
dfsek 5ebe09444b Merge pull request #314 from PolyhedralDev/ver/6.0.1
Patch version 6.0.1
2022-06-04 15:05:22 -07:00
dfsek 136ceddff5 getOrDefault with empty list 2022-06-04 14:27:48 -07:00
dfsek b4bee3a65d add ReloadCommandMixin 2022-06-04 01:15:53 -07:00
dfsek f870dab568 correct key used to register world type 2022-06-04 00:36:36 -07:00
dfsek 7027574d35 Merge remote-tracking branch 'origin/ver/6.0.1' into dev/1.19 2022-06-04 00:11:58 -07:00
dfsek c55c19a32e reduce seed hack console spam 2022-06-03 22:36:56 -07:00
dfsek f05e4c1852 register terra world preset 2022-06-03 22:32:30 -07:00
dfsek 1eb2d5c3ac fix mapping change in BeardGenerator 2022-06-03 20:39:14 -07:00
dfsek 3b98f8c0ab add seed hack for biome provider 2022-06-03 20:39:05 -07:00
dfsek 229886d84c update to minecraft 1.19-rc2 2022-06-03 17:24:44 -07:00
dfsek c1dc637eb2 fix run task addon dependency 2022-06-02 22:05:24 -07:00
dfsek a5db29f2ad fix TerraScript EqualsStatement 2022-06-02 22:04:52 -07:00
dfsek 20e6b8bb63 promote terrascript log function to info level 2022-06-02 22:03:36 -07:00
Zoë c7f6e34647 fix new lines in PULL_REQUEST_TEMPLATE.md so that check boxes render correctly on github 2022-06-02 23:44:05 -04:00
Zoë dc59bb5d2e Fix fabric config
the config.yml in the fabric implementation is outdated and presumably unneeded
2022-06-02 23:40:30 -04:00
dfsek 64f66474b1 remove fabric command api dependency 2022-06-02 08:16:25 -07:00
dfsek d4abedaa05 remove cloud Fabric dependency entirely 2022-06-02 08:11:09 -07:00
dfsek 6e18978586 use default block registry 2022-06-02 08:07:21 -07:00
dfsek 5b2e8b7fbd temporarily disable Cloud 2022-06-02 08:05:09 -07:00
dfsek 2608e94980 fix run task addon dependency 2022-06-02 07:47:31 -07:00
dfsek 1d469687cb Merge branch 'master' into dev/1.19 2022-06-02 07:19:14 -07:00
dfsek a9248435a2 Merge pull request #227 from PolyhedralDev/ver/6.0.0
Major Version 6.0 Tracking PR
2022-06-01 11:01:24 -07:00
dfsek b4cdb7f16c yell very loudly if NMS bindings fail to initialize 2022-05-31 23:00:44 -07:00
dfsek 675a4465d7 redo addon bundling 2022-05-31 22:31:51 -07:00
dfsek 839013d89a split NMS away from core bukkit code 2022-05-31 22:31:40 -07:00
dfsek 8e933a1bb4 remove println 2022-05-31 18:41:39 -07:00
dfsek 10308959a1 fix stronghold deadlock 2022-05-31 18:33:39 -07:00
dfsek 68ac277471 clean up 2022-05-31 16:43:43 -07:00
dfsek b93ff99b2e use server structure registry 2022-05-31 15:51:58 -07:00
dfsek 285367f616 dont inject vanilla gen settings in bukkit biome delegate 2022-05-31 15:43:24 -07:00
dfsek e3dd42c856 fix deadlock 2022-05-31 15:20:23 -07:00
dfsek a54b48f68a fix NMSBiomeProvider 2022-05-31 15:12:14 -07:00
dfsek de2d37cdf5 implement more vanilla methods in NMSChunkGeneratorDelegate 2022-05-31 14:54:41 -07:00
dfsek 75b72a500d remove unneeded chunkgenerator overrides 2022-05-31 14:37:30 -07:00
dfsek 7da0580eda Revert "implement hacky Bukkit structure workaround"
This reverts commit 6883151809.
2022-05-31 14:22:36 -07:00
dfsek 6883151809 implement hacky Bukkit structure workaround 2022-05-31 13:23:38 -07:00
dfsek 00e9ab4263 pass seed into NMSChunkGeneratorDelegate 2022-05-31 00:26:05 -07:00
dfsek 2acfada4f8 add core count throttling option to bukkit buildscript 2022-05-30 22:32:17 -07:00
dfsek d07f9fe341 clean up BeardGenerator 2022-05-30 20:44:29 -07:00
dfsek 9c9487ced6 1.19 fabric compiles now 2022-05-30 20:44:04 -07:00
dfsek 9d131a8992 update FabricChunkGeneratorWrapper 2022-05-30 19:55:42 -07:00
dfsek cd57a32f31 update build to support 1.19 2022-05-30 19:48:37 -07:00
dfsek 4c2ece3eb7 dont shade fastmath when it's unneeded 2022-05-30 17:56:13 -07:00
dfsek 59318d75fc use caffeine cache in biome pipeline provider 2022-05-30 17:43:27 -07:00
dfsek d9eef2e5d5 clean up imports 2022-05-30 17:32:05 -07:00
dfsek 2f189d94ac add inject lock 2022-05-30 15:53:37 -07:00
dfsek 223db88462 log when spawn found 2022-05-30 14:05:51 -07:00
dfsek f2d9511f01 implement BukkitChunkGeneratorWrapper#getFixedSpawnLocation 2022-05-30 13:58:09 -07:00
dfsek ef1f1c0af0 fix range bounds check 2022-05-29 23:49:25 -07:00
dfsek da28244f81 typo 2022-05-29 23:46:05 -07:00
dfsek 77ba13ce93 actually fix rangeloader 2022-05-29 23:44:43 -07:00
dfsek eb8bafe5d8 fix rangeloader singleton 2022-05-29 23:37:54 -07:00
dfsek 411ef10c0c fix versioning issues 2022-05-29 21:44:52 -07:00
dfsek 01d4174092 bump all addon versions 2022-05-29 21:33:45 -07:00
dfsek d072e72590 fix bukkit isSolid check 2022-05-29 21:09:02 -07:00
dfsek 38e4e9bc94 simplify NMS impl 2022-05-29 21:04:48 -07:00
dfsek 126ddaf9c7 dont shade unneeded bukkit dependencies 2022-05-29 20:42:11 -07:00
dfsek 4bf5be5734 demote biome registration to debug log 2022-05-29 19:17:23 -07:00
dfsek c8a4f8be6a fix colors 2022-05-29 19:13:00 -07:00
dfsek 049c5cc83a inject tags into Bukkit biome delegates 2022-05-29 18:51:29 -07:00
dfsek ef1f2e882d implement NMS chunk generator on bukkit 2022-05-29 18:35:38 -07:00
dfsek e94d90050a remove unneeded PaperListener 2022-05-29 15:28:06 -07:00
dfsek 8977e82b73 add Bukkit NMS dependency 2022-05-29 15:05:29 -07:00
dfsek dfff178bfe update paper build number 2022-05-29 05:08:24 -07:00
dfsek 4f00dadc22 update purpur URL 2022-05-29 05:06:14 -07:00
dfsek 7b439f005e geerate vanilla structures on bukkit 2022-05-29 05:02:47 -07:00
dfsek 5c165cd40d fix chunk generator wrapper codec 2022-05-29 04:51:25 -07:00
dfsek 43a84cca3d simplify biome tag injection 2022-05-29 03:36:52 -07:00
dfsek a4d87a428c add vanilla bonemeal flowers to Terra biomes 2022-05-29 03:05:01 -07:00
dfsek 414c0b8a38 cache UserDefinedFunctions 2022-05-28 17:39:52 -07:00
dfsek a11e02a84a use paralithic eval in MetaNumberPreprocessor 2022-05-28 17:16:12 -07:00
dfsek 1a08414822 bump paralithic version 2022-05-28 17:11:30 -07:00
dfsek 0b6b66b7e6 apply vanilla biome flower feature supplier to terra biomes 2022-05-28 16:39:10 -07:00
dfsek 278ab648dd fix tag injection logger 2022-05-28 15:56:00 -07:00
dfsek fe101f1221 refactor fabric util methods 2022-05-28 14:05:25 -07:00
dfsek b6b6cb185d implement API for 3d biomes 2022-05-27 14:40:50 -07:00
dfsek ee373bbe4b reformat code 2022-05-26 19:40:41 -07:00
dfsek 49857f6b91 remove Properties 2022-05-26 19:33:37 -07:00
dfsek 8655f7811a remove rotationutil methods 2022-05-26 19:32:20 -07:00
dfsek ce47cd9316 bump fabric API version 2022-05-26 15:23:38 -07:00
dfsek c4c71ac9ef add slant singleton 2022-05-26 14:40:58 -07:00
dfsek eaebc445f6 apply narrowing operation to BinaryColumn#and 2022-05-26 13:18:00 -07:00
dfsek 3ec15960cf reduce overhead of profiler when not profiling 2022-05-26 12:51:18 -07:00
dfsek 5275c40c6a remove some @Shadow methods in favor of casts 2022-05-26 12:16:40 -07:00
dfsek 68ef5a5a32 demote tag log to debug 2022-05-25 23:57:00 -07:00
dfsek 63bfa6bf14 fix NotEqualsStatement 2022-05-25 23:01:14 -07:00
dfsek bce25b8702 fix refactor typo in BUG_REPORT.md 2022-05-25 22:27:52 -07:00
dfsek c88fbc0321 remove unneeded lang file 2022-05-25 22:27:18 -07:00
dfsek 0d1e7fd686 Merge remote-tracking branch 'origin/master' into ver/6.0.0
# Conflicts:
#	build.gradle.kts
#	common/src/main/resources/lang/de_de.yml
#	platforms/bukkit/src/main/java/com/dfsek/terra/bukkit/world/BukkitTree.java
#	platforms/fabric/src/main/java/com/dfsek/terra/fabric/TerraFabricPlugin.java
2022-05-25 22:26:09 -07:00
dfsek bd2ec52832 fix tag registration 2022-05-25 20:44:26 -07:00
dfsek c3b9902c5f remove unneeded jank warning 2022-05-25 19:59:04 -07:00
dfsek 69a5cfecd1 remove println 2022-05-25 17:51:32 -07:00
dfsek 304ae3075b Revert "remove unneeded lifecycle mixins"
This reverts commit af90088505.
2022-05-25 14:48:30 -07:00
dfsek 0550f36447 fix biome provider codec 2022-05-25 14:36:41 -07:00
dfsek b82e84d447 better error message when injecting tags 2022-05-25 12:22:30 -07:00
dfsek 7a59aeb80c add BukkitAdapter util method 2022-05-25 12:22:30 -07:00
dfsek 0228facd71 sort of fix more stuff 2022-05-25 00:43:52 -07:00
dfsek af90088505 remove unneeded lifecycle mixins 2022-05-24 23:53:23 -07:00
dfsek 2ddf620fb8 register biomes to builtin registries 2022-05-24 23:35:28 -07:00
dfsek 0c3d4f4f4e lazily evaluate terrascript binary operations 2022-05-24 18:25:24 -07:00
dfsek e339b26657 remove unused hashmap impl 2022-05-15 22:13:20 -07:00
dfsek cee42ac467 bump fabric loader dependency 2022-05-15 19:22:14 -07:00
dfsek a2b061ce0d fix JIJ 2022-05-15 19:22:05 -07:00
dfsek 7d2c2bb141 use cast for ServerWorldMixin#getSeed 2022-05-15 18:41:10 -07:00
dfsek 8cd31ead99 bump mixin config java version 2022-05-15 18:40:54 -07:00
dfsek 3a8fb37cd6 remove unneeded iface map option 2022-05-15 18:32:40 -07:00
dfsek 2abf809d0f improve constant baking in SamplerFunction 2022-05-14 14:19:49 -07:00
dfsek cc9c7870ba shade api into Fabric 2022-05-14 13:01:33 -07:00
dfsek 2fe04d7f6b Merge remote-tracking branch 'origin/ver/6.0.0' into ver/6.0.0
# Conflicts:
#	build.gradle.kts
#	buildSrc/src/main/kotlin/DependencyConfig.kt
#	buildSrc/src/main/kotlin/DistributionConfig.kt
#	common/addons/biome-provider-image/build.gradle.kts
#	common/addons/biome-provider-pipeline/build.gradle.kts
#	common/addons/biome-provider-single/build.gradle.kts
#	common/addons/chunk-generator-noise-3d/build.gradle.kts
#	common/addons/command-addons/build.gradle.kts
#	common/addons/command-packs/build.gradle.kts
#	common/addons/command-profiler/build.gradle.kts
#	common/addons/command-structures/build.gradle.kts
#	common/addons/config-biome/build.gradle.kts
#	common/addons/config-distributors/build.gradle.kts
#	common/addons/config-feature/build.gradle.kts
#	common/addons/config-flora/build.gradle.kts
#	common/addons/config-locators/build.gradle.kts
#	common/addons/config-noise-function/build.gradle.kts
#	common/addons/config-ore/build.gradle.kts
#	common/addons/config-palette/build.gradle.kts
#	common/addons/config-structure/build.gradle.kts
#	common/addons/generation-stage-feature/build.gradle.kts
#	common/addons/generation-stage-structure/build.gradle.kts
#	common/addons/language-yaml/build.gradle.kts
#	common/addons/manifest-addon-loader/build.gradle.kts
#	common/addons/palette-block-shortcut/build.gradle.kts
#	common/addons/structure-block-shortcut/build.gradle.kts
#	common/addons/structure-mutator/build.gradle.kts
#	common/addons/structure-sponge-loader/build.gradle.kts
#	common/addons/structure-terrascript-loader/build.gradle.kts
#	common/addons/terrascript-function-check-noise-3d/build.gradle.kts
#	common/addons/terrascript-function-sampler/build.gradle.kts
#	common/api/build.gradle.kts
#	common/implementation/base/build.gradle.kts
#	common/implementation/bootstrap-addon-loader/build.gradle.kts
#	platforms/bukkit/build.gradle.kts
#	platforms/cli/build.gradle.kts
#	platforms/merged/build.gradle.kts
2022-05-14 12:03:56 -07:00
dfsek 977316c57f make bukkit warning less obnoxious 2022-05-05 15:25:53 -07:00
dfsek d2c5f711ef Merge remote-tracking branch 'origin/ver/6.0.0' into ver/6.0.0 2022-05-05 15:16:40 -07:00
dfsek b8baa05922 fix bukkit shading 2022-05-05 15:16:27 -07:00
dfsek 98b332fe54 fix shading config 2022-05-05 14:56:51 -07:00
dfsek 6e61154cc5 update paralithic version 2022-05-05 14:47:38 -07:00
dfsek 0a5450a345 shade paralithic in noise addon 2022-05-05 10:16:09 -07:00
dfsek 83baf377e0 fix bootstrap addon class referencing from addons 2022-05-05 09:14:45 -07:00
dfsek ffc884384c create BootstrapAddonClassLoader 2022-05-05 08:56:35 -07:00
dfsek 0c302456a2 use shadowJar for addon packaging 2022-05-05 08:32:48 -07:00
dfsek 41e7ad35bd simplify dependency configuration 2022-05-05 08:25:30 -07:00
dfsek 82b474ead2 Merge pull request #307 from LtPeriwinkle/posterization-normalizer
Implement posterization normalizer
2022-05-03 18:10:14 -07:00
LtPeriwinkle d544e16885 Feat: Implement posterization normalizer
Closes #204
2022-05-03 17:45:19 -07:00
dfsek 4396623420 improve addon dependency system 2022-04-29 23:03:18 -07:00
dfsek d2795bfdb6 replace ChunkInterpolator mod by 4 with and by 3 2022-04-29 22:00:22 -07:00
dfsek 42fb3642f9 update bukkit testing stuff 2022-04-24 23:43:37 -07:00
dfsek 834404c477 remove BiomeEffectsAccessor 2022-04-24 21:57:51 -07:00
dfsek 85d951e367 remove empty FabricTree class 2022-04-24 21:55:36 -07:00
dfsek 5b5a531731 use proper inputFile option for remap task 2022-04-24 21:48:41 -07:00
dfsek 7faadc3529 update Loom 2022-04-24 21:37:53 -07:00
dfsek 2ff456dd45 update slf4j 2022-04-24 21:35:02 -07:00
dfsek 3ac7099db5 update Fabric API and Yarn 2022-04-24 21:32:55 -07:00
dfsek 3b936b68e6 update fabric loader version 2022-04-24 21:29:40 -07:00
dfsek 3034f748df fix slf4j shading 2022-04-24 21:27:29 -07:00
dfsek 4daf2d65ee Merge pull request #304 from PolyhedralDev/dev/1.18.2
Update to 1.18.2
2022-04-17 21:34:13 -07:00
dfsek cccc819fd8 fix reloading 2022-04-17 21:33:38 -07:00
dfsek d4ec346254 fix server initialisation injection point 2022-04-17 21:14:48 -07:00
dfsek b0c6dc612f fix config pack fetching on server 2022-04-17 21:11:30 -07:00
dfsek 78503cf1b7 add jank warning for future me 2022-04-17 20:44:57 -07:00
dfsek eb51a89971 remove location test mixin 2022-04-17 20:42:12 -07:00
dfsek e2350650d0 fix structure location 2022-04-17 20:41:55 -07:00
dfsek b93a6703cb make sure tags are clear 2022-04-17 19:41:34 -07:00
dfsek 83bc8cb026 less jank registration mixin 2022-04-11 09:08:02 -07:00
dfsek 3a89dc8309 remove BiomeRegistrationEvent 2022-04-11 09:03:37 -07:00
dfsek 6d1e592f32 clean up 2022-04-04 18:34:19 -07:00
dfsek 42880e01b9 remove unused FabricUtil method 2022-04-04 18:17:42 -07:00
dfsek e2f38ed577 demote tag log messages to debug 2022-04-04 18:17:22 -07:00
dfsek c62a1cf8b5 register all tags 2022-04-04 18:16:48 -07:00
dfsek ef95b25c2d mark codecs stable 2022-04-04 18:07:45 -07:00
dfsek 4b8efd1a36 biome tagging debugging 2022-04-04 18:04:26 -07:00
dfsek 7d03d5a26b clean up 2022-04-04 17:37:50 -07:00
dfsek 0b49bf4dc9 register some tags 2022-04-04 17:37:43 -07:00
dfsek b4d34589d8 do tag stuff at proper time 2022-04-04 16:31:05 -07:00
dfsek 60ead9f7a0 use only delegate biomes in biome source 2022-04-04 16:10:09 -07:00
dfsek d46de7b324 fix formatting error 2022-03-30 17:56:33 -07:00
dfsek 4a3c22a8d6 reformat all code 2022-03-30 14:43:56 -07:00
dfsek d79c37fc49 bump fabric loader version 2022-03-30 14:36:36 -07:00
dfsek 15107459be move more fabric versions to Versions.kt 2022-03-30 14:35:53 -07:00
dfsek 9fc9688fa6 fix biome registration 2022-03-23 23:52:05 -07:00
dfsek ee3dd1259c remove broken biome registration mixin 2022-03-23 23:38:56 -07:00
dfsek ff16246e42 require non-null biome delegate 2022-03-23 22:36:18 -07:00
dfsek a71da4f4c2 register terra chunk generators alongside vanilla 2022-03-23 22:30:21 -07:00
dfsek 2267759378 fix ServerMainMixin 2022-03-23 22:22:51 -07:00
dfsek 2b0b06e14f better codec names 2022-03-23 22:18:16 -07:00
dfsek 518eda919d fix access widener 2022-03-23 22:16:42 -07:00
dfsek c8a58ce702 fix codecs 2022-03-23 22:14:40 -07:00
dfsek 61797170b6 fix BeardGenerator 2022-03-23 22:07:28 -07:00
dfsek 480bc738dd fix MinecraftServer_BiomeRegistrationMixin 2022-03-23 22:01:47 -07:00
dfsek 2075ed101b fix GeneratorOptionsMixin 2022-03-23 21:51:42 -07:00
dfsek e771588647 clean up ServerWorldMixin 2022-03-23 21:46:36 -07:00
dfsek 0529a5017e remove static world registration 2022-03-23 21:44:54 -07:00
dfsek f16bd6cc61 fix ServerWorldMixin 2022-03-23 21:42:37 -07:00
dfsek 2a8b9b1c35 fix MinecraftServerMixin 2022-03-23 21:41:40 -07:00
dfsek f507ba5474 remove ConfiguredStructureFeaturesMixin 2022-03-23 21:40:40 -07:00
dfsek 422de4eea1 fix biome creation method 2022-03-23 21:38:57 -07:00
dfsek c6e745c796 apply access widener to Biome#getCategory 2022-03-23 21:31:45 -07:00
dfsek c7437f8fb7 fix withSeed method in FabricChunkGeneratorWrapper 2022-03-23 21:18:59 -07:00
dfsek f7b5ca5690 remove unneeded cast in GeneratorOptionsMixin 2022-03-23 21:17:42 -07:00
dfsek 05a0c28a1c fix references in TerraBiomeSource 2022-03-23 21:17:24 -07:00
dfsek 09416bc34c use noise registry in wrapper instantiation 2022-03-23 21:11:43 -07:00
dfsek d188a79ed7 pass noise registry into FabricChunkGeneratorWrapper 2022-03-23 21:10:34 -07:00
dfsek a9372553f5 use zero multinoise 2022-03-23 21:03:18 -07:00
dfsek c81e4f4b40 update minecraft version 2022-03-23 11:05:12 -07:00
dfsek 55bcad82d2 update cloud version 2022-03-23 11:01:25 -07:00
dfsek 21136f4c3c update gradle version 2022-03-07 15:03:03 -07:00
dfsek aeadfb21dd create basic terrascript performance test 2022-02-22 09:42:52 -07:00
dfsek a02847e3ed drastically optimise terrascript scoping 2022-02-16 15:55:46 -07:00
dfsek aa39dc4b81 optimise BinaryColumn get 2022-02-15 10:55:09 -07:00
dfsek f13d66d095 calculate locator positions before application 2022-02-15 09:12:30 -07:00
dfsek b99085b49f fix pattern locator range 2022-02-14 09:33:37 -07:00
dfsek 68f8c8cea8 short-circuit locators 2022-02-14 09:30:45 -07:00
dfsek 0f767c6896 fix ClassCastException in ChunkRegionMixin due to assumption of terra chunk generator 2022-01-31 10:07:29 -07:00
dfsek 862d008f4c join resource reload in fabric impl 2022-01-31 10:01:17 -07:00
dfsek 1a105b3417 Merge remote-tracking branch 'origin/ver/6.0.0' into ver/6.0.0 2022-01-28 22:54:08 -07:00
dfsek fb2cc99382 add ALL tag to ephemeral biome 2022-01-28 22:53:27 -07:00
dfsek 6bd0efbcf0 perform null check on biome in BorderMutator 2022-01-28 22:49:40 -07:00
dfsek 9fe8ac7b32 implement spawnEntity in ChunkRegionMixin 2022-01-28 22:46:24 -07:00
dfsek c131d81686 soft-implement proper method in ServerWorldMixin 2022-01-28 22:45:56 -07:00
dfsek 5ab0e0d6c5 Merge remote-tracking branch 'origin/ver/6.0.0' into ver/6.0.0 2022-01-22 22:52:23 -07:00
dfsek 5cbd815092 ignore meta string templates in MetaValuePreprocessor 2022-01-22 22:52:14 -07:00
dfsek c051040b12 equation -> expression 2022-01-20 14:02:43 -07:00
dfsek 17d903ff32 add pow2 terrascript function 2022-01-18 23:38:18 -07:00
dfsek 2c1f599abf dynamically fetch pack in ServerWorldMixin 2022-01-18 22:21:57 -07:00
dfsek 754b06881d add error messages for invalid noise functions 2022-01-18 21:39:22 -07:00
dfsek eea72a8470 correct 2d sampler function index 2022-01-18 21:33:10 -07:00
dfsek fdbf2b2f58 fix sampler addon dependency 2022-01-18 21:31:51 -07:00
dfsek cc769fa871 fix missing dep error message 2022-01-18 21:30:45 -07:00
dfsek aa605b7402 add SamplerFunction 2022-01-18 21:22:34 -07:00
dfsek bef81d2704 adjust TerraScriptAddon event priority 2022-01-18 20:51:57 -07:00
dfsek 42e357892f create TerraScriptSamplerFunctionAddon 2022-01-18 20:51:46 -07:00
dfsek 44595a861a put NoiseConfigPackTemplate in config context 2022-01-18 20:51:32 -07:00
dfsek 14e406c45b create sampler function addon module 2022-01-18 20:14:34 -07:00
dfsek 003f6c7e74 remove bukkit soft depend on worldedit 2022-01-17 11:22:55 -07:00
dfsek 57c38307f5 remove terra command from plugin.yml 2022-01-17 11:22:41 -07:00
dfsek f6fd338bd7 remove unused world.yml file 2022-01-17 11:22:16 -07:00
dfsek fc10d0c303 ignore hidden files when loading addons 2022-01-15 19:01:24 -07:00
dfsek 7939005428 clean up SurfaceLocatorTemplate 2022-01-15 01:44:54 -07:00
dfsek 072ce5b03e add TopLocator 2022-01-15 01:44:45 -07:00
dfsek 9794bf3565 add match-all option to AdjacentPatternLocator 2022-01-15 01:41:26 -07:00
dfsek 37d80b63d9 Merge remote-tracking branch 'origin/ver/6.0.0' into ver/6.0.0 2022-01-14 23:24:13 -07:00
dfsek 077b14a998 add ALL tag 2022-01-14 23:24:05 -07:00
dfsek c6458c901d eliminate boxing in BinaryColumn boolean ops 2022-01-11 08:58:38 -07:00
dfsek 52b6de12ae correct BinaryColumn logic for boolean ops on columns with differeny min Y 2022-01-08 11:32:37 -07:00
dfsek 03671ad209 fix binary column point selection 2022-01-08 11:10:21 -07:00
dfsek b99980e5c0 correct BinaryColumn boolean combination indices 2022-01-08 10:56:33 -07:00
dfsek 5e0a6b9472 correct OrDistributorTemplate error message 2022-01-08 10:49:57 -07:00
dfsek 3540753ff8 add XOR distributor 2022-01-08 10:49:40 -07:00
dfsek 2b3cee6b7c add Distributor#xor 2022-01-08 10:45:27 -07:00
dfsek 5881e4465f add XOR pattern 2022-01-08 10:40:57 -07:00
dfsek 48c7e4ab40 add Pattern#xor 2022-01-08 10:40:09 -07:00
dfsek 9bcf06e1b2 register XOR locator 2022-01-08 10:39:18 -07:00
dfsek 0bfa6f4b04 correct OrLocatorTemplate error message 2022-01-08 10:38:25 -07:00
dfsek 0bf8d54598 add XorLocatorTemplate 2022-01-08 10:36:28 -07:00
dfsek 0c43cfcc5f add Locator#xor 2022-01-08 10:36:01 -07:00
dfsek 2ea66cd295 add BinaryColumn#xor 2022-01-08 10:34:41 -07:00
dfsek a7d0d52dfb abstract BinaryColumn boolean operators 2022-01-08 10:28:49 -07:00
dfsek 8a35e3f21d make BinaryColumn#or able to OR columns of different size 2022-01-08 10:25:53 -07:00
dfsek 9c024df9e5 use search range for binary column in pattern locator 2022-01-08 10:20:06 -07:00
dfsek bde7760634 make color modifier default to vanilla 2022-01-07 14:04:51 -07:00
dfsek ed986ddcb8 fix biome fog 2022-01-07 14:00:57 -07:00
dfsek b6aae73ef6 remove color map from BiomeTemplate 2022-01-07 13:38:18 -07:00
dfsek 7883a39375 add more vanilla biome properties 2022-01-07 13:09:01 -07:00
dfsek f0a71b3ad0 remove unused shadow method 2022-01-07 10:01:52 -07:00
dfsek 5e77878427 fix buffered world offset 2022-01-05 13:51:52 -07:00
dfsek 7b9891150d create and register mutated structure config 2022-01-05 08:12:00 -07:00
dfsek e5d5a88cbe increase feature priority 2022-01-04 14:33:31 -07:00
dfsek 3c3e3dafb5 create MutatedStructure 2022-01-04 14:32:46 -07:00
dfsek cb3ec5f300 add probability collection vector methods 2022-01-04 14:32:37 -07:00
dfsek 2a08645265 increase biome priority 2022-01-04 14:32:24 -07:00
dfsek 6b060a1ff6 buffered world builder api 2022-01-04 09:37:06 -07:00
dfsek 1d6eb0c48f create structure-mutator module 2022-01-04 08:55:21 -07:00
dfsek 42c407698d configurable beard threshold 2022-01-04 08:24:32 -07:00
dfsek 3fd5aaf56c load addons in separate method 2022-01-02 01:25:33 -07:00
dfsek b4a4d7e377 dump resources in separate method 2022-01-02 01:24:10 -07:00
dfsek f7d53c9db3 add vanilla biomes option on fabric 2022-01-02 00:46:13 -07:00
dfsek 3dc98a2bc2 create AdjacentPatternLocator 2022-01-01 22:48:34 -07:00
dfsek f393f76a87 add WritableWorld#column 2022-01-01 22:48:26 -07:00
dfsek a00dfac937 move column impl to main api 2022-01-01 22:48:02 -07:00
dfsek 999e09a653 optimize ElevationInterpolator 2022-01-01 22:14:48 -07:00
dfsek 29580e125d uninclude fastutil 2022-01-01 21:40:46 -07:00
dfsek c3e083607d add default int noise methods 2022-01-01 20:12:30 -07:00
dfsek 463c323f0a depend on fastutil 2022-01-01 20:12:21 -07:00
dfsek d13c0dd198 Revert "optimize ElevationInterpolator"
This reverts commit 74237e7568.
2022-01-01 19:58:06 -07:00
dfsek aa5ccd0196 make ocean palette optional 2021-12-31 23:46:44 -07:00
dfsek 039e45ef97 implement biome colors on fabric 2021-12-31 23:43:32 -07:00
dfsek 3a626d9101 remove unneeded access widener 2021-12-31 23:22:54 -07:00
dfsek 069b0d425a add beardification support 2021-12-31 23:19:21 -07:00
dfsek 83029989b9 clean up AddonsCommandAddon 2021-12-31 18:21:02 -07:00
dfsek edac8953c1 move profiler command to separate addon 2021-12-31 18:20:44 -07:00
dfsek 012a01da71 move addons command into separate addon 2021-12-31 18:16:50 -07:00
dfsek 17470fd74b create PacksCommandAddon 2021-12-31 18:12:56 -07:00
dfsek 43235f2fc8 add yourkit info to README.md 2021-12-31 13:20:20 -07:00
dfsek 3c58d6decd fix shaded jar resources config 2021-12-31 13:11:22 -07:00
dfsek 8560438bac implement reloads on bukkit 2021-12-30 17:39:50 -07:00
dfsek c6f42da61b create MaterialSet$Singleton class 2021-12-30 16:35:51 -07:00
dfsek 121dd16652 use caching provider in getBlock 2021-12-30 16:28:45 -07:00
dfsek d36fc7dec1 implement caching biome provider 2021-12-30 16:01:19 -07:00
dfsek 74237e7568 optimize ElevationInterpolator 2021-12-30 15:20:02 -07:00
dfsek 53cc36c879 fix profiler fetch concurrency issues 2021-12-30 15:05:24 -07:00
dfsek fc50f53944 synchronize profiler queries 2021-12-30 01:47:47 -07:00
dfsek 570a3bccc5 manually specify shadowjar task on shaded addons 2021-12-30 01:22:50 -07:00
dfsek 7039a28326 fix sponge structure generation 2021-12-30 01:11:25 -07:00
dfsek ca52a3e740 seed differently for every unique coordinate pair 2021-12-30 00:56:38 -07:00
dfsek 1801c831ba dont set failed pack 2021-12-29 02:21:35 -07:00
dfsek e72669354a provide platform with server instance to redeclare platform biomes 2021-12-29 02:07:29 -07:00
dfsek 0ce072a2ca dont crash on minecraft:reload 2021-12-29 00:08:12 -07:00
dfsek 62b3f47fa7 correctly clear registry 2021-12-28 23:28:07 -07:00
dfsek cd018fb970 clear registry before reload 2021-12-28 23:23:08 -07:00
dfsek 8e2683c165 use properties for compat options 2021-12-28 23:22:57 -07:00
dfsek b6abe0e7ac implement propertyholder in ConfigPack 2021-12-28 23:22:40 -07:00
dfsek f6ee8a3a1d dont retain references to config packs 2021-12-28 23:22:19 -07:00
dfsek f07519565b add max slant depth option 2021-12-28 22:30:32 -07:00
dfsek ffedfcc781 make exposed value a double 2021-12-28 21:55:10 -07:00
dfsek fb7c827e15 implement structure command 2021-12-28 21:46:06 -07:00
dfsek f921e22b5c add Vector3#toInt 2021-12-28 21:45:57 -07:00
dfsek 719260e3da add api for RegistryArgument to get registry at runtime 2021-12-28 21:45:44 -07:00
dfsek 34c83e87c4 improve CommandSender API 2021-12-28 21:44:58 -07:00
dfsek 70b0c55a39 create command-structures addon 2021-12-28 20:14:42 -07:00
dfsek c926625090 hash PaddedGridDistributor seed 2021-12-28 20:00:20 -07:00
dfsek ea7e78c498 xor world seed into PaddedGridDistributor seed 2021-12-28 19:12:06 -07:00
dfsek 36d417d3db implement padded grid distributor 2021-12-28 17:46:40 -07:00
dfsek ecc4504f00 add ore exposed option 2021-12-28 17:04:47 -07:00
dfsek ddebb8fec1 remove unused class 2021-12-28 16:57:57 -07:00
dfsek 7852165907 fix depth tracker from MetaListLikePreprocessor 2021-12-27 23:16:50 -07:00
dfsek ea5dd297cb implement new tectonic depthtracker API 2021-12-27 23:01:48 -07:00
dfsek 8d7468457f bump tectonic version 2021-12-27 20:34:54 -07:00
dfsek eb29da7639 fix potential cme in fabric biome source 2021-12-27 17:35:11 -07:00
dfsek ad7d173b7e make StructureScript properly return registry key 2021-12-27 15:59:51 -07:00
dfsek 287c029bda create GeometryUtil 2021-12-27 14:45:37 -07:00
dfsek 4be63b8c65 add Registry#getAllWithID method 2021-12-26 20:31:09 -07:00
dfsek 6d844c2d3a use single-parameter Keyed registration 2021-12-26 19:27:12 -07:00
dfsek 1c93c2bbb4 implement single-parameter Keyed registration methods 2021-12-26 19:26:23 -07:00
dfsek 3792a1ab05 make Keyed generic 2021-12-26 19:26:09 -07:00
dfsek 9c5b789aa2 unimplement Keyed in Structure 2021-12-26 19:26:02 -07:00
dfsek 1ac3964589 make Keyed generic 2021-12-26 15:11:04 -07:00
dfsek 5e3f310154 make WebsiteConfig optional 2021-12-25 16:33:51 -07:00
dfsek d10a1d1660 maybe fix empty jar issue 2021-12-25 12:56:57 -07:00
dfsek a0a05436a0 pull getOrCreateRegistry methods to RegistryProvider interface 2021-12-25 11:38:59 -07:00
dfsek c8d24f1694 clean up TypeKey 2021-12-25 11:01:48 -07:00
dfsek 7c32626bc0 add Registry#getRawType 2021-12-25 11:00:10 -07:00
dfsek 46e7bd917a getFromID -> getByID 2021-12-25 01:10:49 -07:00
dfsek dc688e49ce add registry tests 2021-12-25 01:10:29 -07:00
dfsek e1a6cdb484 tryGet -> getFromID 2021-12-25 01:06:20 -07:00
dfsek 2b92e2e73b getKey -> key 2021-12-25 01:04:19 -07:00
dfsek 8467a19781 implement namespaced registries 2021-12-25 01:01:32 -07:00
dfsek bb87bfa1de implement Namespaced in BaseAddon 2021-12-24 22:59:52 -07:00
dfsek c07d5052b2 implement Namespaced in ConfigPack 2021-12-24 22:58:57 -07:00
dfsek f7eba23081 inject logger into ManifestAddons 2021-12-24 11:33:00 -07:00
dfsek 6729565a59 remove world instance from BukkitChunkGeneratorWrapper 2021-12-24 00:08:45 -07:00
dfsek 5da0a861b6 synchronize BukkitWorldHandle#createBlockState 2021-12-24 00:03:58 -07:00
dfsek 9ae259f1ed add Namespaced and RegistryKey interfaces 2021-12-24 00:00:50 -07:00
dfsek a092dfdc3b document a bunch of stuff 2021-12-23 14:43:43 -07:00
dfsek f353d1686c Merge pull request #292 from PolyhedralDev/dev/cli
CLI generator & performance improvements
2021-12-23 13:53:46 -07:00
dfsek 0f50b29c4e Move API to one package 2021-12-23 13:51:21 -07:00
dfsek 3d9d0d46fb remove world field from FabricChunkGeneratorWrapper 2021-12-22 23:41:00 -07:00
dfsek b4e6f2775e make getBlock accept WorldProperties 2021-12-22 23:07:01 -07:00
dfsek 631c8b705a move world property access to WorldProperties 2021-12-22 23:04:54 -07:00
dfsek d2b52e486a remove access to world field from FabricChunkGeneratorWrapper 2021-12-22 23:02:43 -07:00
dfsek fd3335508b include generator settings in FabricChunkGeneratorWrapper codec 2021-12-22 17:53:12 -07:00
dfsek 26dd7e1eea use generator field for column sample 2021-12-22 17:42:27 -07:00
dfsek 4000899d6d lazily create chunks to improve memory usage 2021-12-22 16:23:03 -07:00
dfsek 17e2bdc6f7 fix region overlap 2021-12-22 16:11:56 -07:00
dfsek 737f95e458 dont set unneeded blocks 2021-12-22 15:02:40 -07:00
dfsek 51c8da51d3 throw informative exception 2021-12-22 13:58:15 -07:00
dfsek ffb93d0a6f dont redundantly evaluate expressions 2021-12-22 13:34:21 -07:00
dfsek 086d944f10 parse TerraScripts in parallel 2021-12-22 13:34:08 -07:00
dfsek a461a57f0d dont evaluate derivatives for empty slant palettes 2021-12-22 02:55:56 -07:00
dfsek 7307b58696 increase default chunk cache size 2021-12-22 02:45:37 -07:00
dfsek 0f9592a508 parallel config loading 2021-12-22 02:31:40 -07:00
dfsek fb13ab40ca fix region serialization 2021-12-22 01:15:08 -07:00
dfsek 6b26cfc964 set main class of cli implementation 2021-12-22 01:14:50 -07:00
dfsek 4646fdee89 increase biome cache size 2021-12-22 01:14:28 -07:00
dfsek 27561931cc resolve circular dependency issue in cli build 2021-12-21 23:13:49 -07:00
dfsek 13c696b392 add biome cache to ChunkInterpolator 2021-12-21 23:13:34 -07:00
dfsek 849b3116c9 add hashCode to Vector2Int 2021-12-21 23:10:35 -07:00
dfsek 0e87da2eff use record for SeededVector 2021-12-21 22:37:20 -07:00
dfsek 4c9cfbfdf9 cli serialization 2021-12-21 22:35:07 -07:00
dfsek d49ee4f3fc implement CLI world & chunk 2021-12-21 20:54:39 -07:00
dfsek 5ea6f44a96 implement block data stuff 2021-12-21 20:24:54 -07:00
dfsek 71620c2b29 create basic CLI impl 2021-12-21 20:04:28 -07:00
dfsek fa3849b85e remove region implementation 2021-12-21 19:56:42 -07:00
dfsek 49211bf6e0 Merge pull request #291 from Astrashh/optional-gen-stages
Make pack manifest `stages` key optional
2021-12-21 19:45:30 -07:00
Astrash 5df7dc7590 Make pack manifest stages key optional 2021-12-22 13:42:12 +11:00
dfsek 9ed4375165 Merge pull request #290 from Astrashh/optional-global-samplers
Make pack manifest `samplers` key optional
2021-12-21 19:37:19 -07:00
Astrash de68334249 Make pack manifest samplers key optional 2021-12-22 13:32:55 +11:00
dfsek c21ebddfb6 inject biomes when datapack resources are loaded 2021-12-21 18:51:03 -07:00
dfsek 5f993cca57 fix task name in assemble dependency 2021-12-21 16:37:01 -07:00
dfsek 3caf3a9380 correctly jar-in-jar dependencies 2021-12-21 16:33:49 -07:00
dfsek 5dbc2c2895 implement BlockState with mixin on Fabric 2021-12-21 13:09:40 -07:00
dfsek 1a1016bdf8 mark Properties as deprecated 2021-12-21 11:43:08 -07:00
dfsek b5047fc5ab implement Handle interface in single mixin 2021-12-21 01:26:36 -07:00
dfsek a199ea2c20 remove unneeded equals override in ServerWorldMixin 2021-12-21 01:15:28 -07:00
dfsek dc8a5933bf remove unneeded hashCode and equals override in ChunkRegionMixin 2021-12-21 01:14:26 -07:00
dfsek 9d832391e4 dont use world as cache parameter 2021-12-21 01:13:48 -07:00
dfsek 78c3e14086 refactor integer vectors 2021-12-20 00:38:27 -07:00
dfsek b9965bdbc5 make Vector3 immutable by default 2021-12-20 00:37:54 -07:00
dfsek 961a42d1cb make vector2 immutable by default 2021-12-20 00:19:09 -07:00
dfsek 026547bdfc make Vector2 constructor private 2021-12-20 00:08:30 -07:00
dfsek fb6c86801e make Vector3 constructor private 2021-12-20 00:06:35 -07:00
dfsek 007c761537 remove buffer items 2021-12-20 00:04:08 -07:00
dfsek 4db94e50e5 remove StructureBuffer 2021-12-20 00:02:10 -07:00
dfsek 7a9ea7f281 remove DirectBuffer 2021-12-20 00:01:54 -07:00
dfsek 62d0f109b4 remove buffer api 2021-12-20 00:01:04 -07:00
dfsek f088928483 clean up Structure API 2021-12-19 23:14:02 -07:00
dfsek 30b02a03c4 add permissions to commands 2021-12-19 22:43:12 -07:00
dfsek cfc7960c70 remove old command API 2021-12-19 19:57:19 -07:00
dfsek 4c01cb4b8d remove old structure commands 2021-12-19 19:54:34 -07:00
dfsek 03e8d0f381 remove biome commands 2021-12-19 19:53:21 -07:00
dfsek a8f12ae847 implement profiler command 2021-12-19 19:52:25 -07:00
dfsek 81b2f352de remove old main commands 2021-12-19 19:52:19 -07:00
dfsek 2ad8e381fd start removing old commands 2021-12-19 19:43:41 -07:00
dfsek d5da0e4002 implement reload and packs commands 2021-12-19 19:27:49 -07:00
dfsek 46153cb358 begin implementing commands with Cloud 2021-12-19 19:09:08 -07:00
dfsek ea3f8096fd fix StructureScript 2021-12-19 18:39:28 -07:00
dfsek 9872d22c06 implement getType method in registries 2021-12-19 17:41:04 -07:00
dfsek aeb0372d59 pull versions out to Versions config 2021-12-19 15:30:50 -07:00
dfsek 2a965e847f refactor buildSrc scripts to root directory 2021-12-19 15:02:41 -07:00
dfsek 626c65fc3e begin pulling versions into buildSrc/Versions 2021-12-19 14:56:52 -07:00
dfsek fb1ebd0e11 add dependency on cloud 2021-12-19 14:22:35 -07:00
dfsek 30f7f002d5 warn at out-of-bounds access rather than crash on Bukkit. 2021-12-19 13:48:51 -07:00
dfsek 77d341ebab update fabric versions 2021-12-18 23:59:38 -07:00
dfsek 0a896862fe Merge pull request #285 from Astrashh/key-name-refactor
Key name refactor
2021-12-17 19:37:51 -07:00
Astrash 68d262b6b6 Noise3DLocator -> Sampler3DLocator 2021-12-18 10:11:40 +11:00
Astrash ebba3472e2 NoiseLocator -> SamplerLocator 2021-12-18 10:09:52 +11:00
Astrash 7ccb126571 NoiseDistributor -> SamplerDistributor 2021-12-18 10:05:59 +11:00
Astrash d3ea370b74 BiomeNoiseConfigTemplate key name changes 2021-12-18 09:32:09 +11:00
Astrash 58fcf0b808 Pipeline NoiseSource -> SamplerSource 2021-12-18 09:32:09 +11:00
Astrash decd99a15c StageTemplate noise -> sampler 2021-12-18 09:32:09 +11:00
Astrash a4764d3158 Biome provider blend.noise -> blend.sampler 2021-12-18 09:32:09 +11:00
Astrash 3225746940 noise -> sampler in palette configs 2021-12-18 09:32:09 +11:00
Astrash df8489c1af function -> sampler in various sampler templates 2021-12-18 09:32:09 +11:00
Astrash 2a2db4bc52 noise -> samplers in pack manifest 2021-12-18 09:32:09 +11:00
dfsek 8ff6c3e65c create structure-block-shortcut addon 2021-12-17 09:48:06 -07:00
dfsek df0a2f29d1 repair ServerWorldMixin 2021-12-17 09:15:14 -07:00
dfsek e94d1cb98c repair ChunkRegionMixin 2021-12-17 09:14:47 -07:00
dfsek fa098666f1 repair BlockEntityMixin 2021-12-17 08:43:07 -07:00
dfsek 9f1e97d9a2 repair BlockMixin 2021-12-17 08:40:53 -07:00
dfsek 31e20b12c0 setBlockData -> setBlockState 2021-12-17 08:40:02 -07:00
dfsek 23fcd4a651 getBlockData -> getBlockState 2021-12-17 08:38:28 -07:00
dfsek 7da87c27ee getBlockState -> getBlockEntity 2021-12-17 08:37:51 -07:00
dfsek 5401917703 createBlockData -> createBlockState 2021-12-17 08:36:43 -07:00
dfsek 2c12892111 getBlockData -> getBlockState 2021-12-17 08:36:03 -07:00
dfsek e5eaba9150 getDefaultData -> getDefaultState 2021-12-17 08:35:29 -07:00
dfsek 27d12efb31 relocate ShortcutLoader 2021-12-17 08:32:36 -07:00
dfsek 6a4f6c509b LoaderHolder -> ConfigLoadingDelegate 2021-12-17 08:32:08 -07:00
dfsek 1004eefbf6 use formatted version 2021-12-16 22:59:38 -07:00
dfsek ff40bf5a3a create and register VersionLoader 2021-12-16 22:58:21 -07:00
dfsek bcdfb42fa1 update ConfigPack#getVersion to use Strata version 2021-12-16 22:52:36 -07:00
dfsek 8773c414c5 remove vanilla methods from ConfigPack 2021-12-16 22:50:48 -07:00
dfsek 1852d9103f remove RegistryFactory 2021-12-16 22:14:23 -07:00
dfsek fb1b440e72 remove ConfigPack#getRegistryFactory 2021-12-16 22:13:34 -07:00
dfsek 0ad3867a91 remove registry provider from ConfigType 2021-12-16 22:12:42 -07:00
dfsek 011a915d38 implement PaletteBlockShortcutAddon 2021-12-16 22:07:53 -07:00
dfsek 5726a07249 create palette-block-shortcut addon 2021-12-16 22:02:27 -07:00
dfsek b3a75b3738 clean up palette addon 2021-12-16 22:00:07 -07:00
dfsek 888cecdc16 clean up Palette API 2021-12-16 21:57:18 -07:00
dfsek 28b16943f7 implement shortcut API 2021-12-16 21:54:49 -07:00
dfsek a0c46aaf7a remove unused lang stuff 2021-12-16 19:51:29 -07:00
dfsek 89c43e98b9 use UnsupportedOperationException if cannot get checked registry 2021-12-16 19:49:34 -07:00
dfsek 7a238f833b dont use shadow in BlockEntityMixin 2021-12-16 16:21:08 -07:00
dfsek 909de9409b dont shadow fields in BlockMixin 2021-12-16 16:17:20 -07:00
dfsek 0aa10a631a ignore out of bounds values in RandomLocator 2021-12-16 10:46:54 -07:00
dfsek 6c8b8a3d51 add meta annotation to ScaleNormalizerTemplate 2021-12-16 09:43:44 -07:00
dfsek b73cbdd8a2 add meta annotations to BinaryArithmeticTemplate 2021-12-16 09:43:18 -07:00
dfsek e0f5d51b71 Merge remote-tracking branch 'origin/ver/6.0.0' into ver/6.0.0 2021-12-16 09:38:43 -07:00
dfsek e76e17439f reinclude sponge project 2021-12-16 09:34:35 -07:00
dfsek d1140556c7 Merge pull request #283 from Astrashh/locator-fix-meta
Add missing meta annotations to locators
2021-12-16 09:33:05 -07:00
Astrash e34a788353 Add missing meta annotation to random locator 2021-12-16 20:10:29 +11:00
Astrash ca3f39c2a2 Add missing meta annotations to gaussian locator 2021-12-16 20:09:57 +11:00
dfsek 5cf1b56782 temporarily disable Sponge submodule 2021-12-15 22:03:49 -07:00
dfsek 305c29dad2 salt RandomLocator and GaussianRandomLocator 2021-12-15 22:03:19 -07:00
dfsek 1fc139cc8c create and register GaussianRandomLocatorTemplate 2021-12-15 21:59:32 -07:00
dfsek 7305236724 create GaussianRandomLocator 2021-12-15 21:22:41 -07:00
dfsek 353f5a1f26 register min sampler 2021-12-15 20:54:59 -07:00
dfsek ad3bcf5a98 register max sampler 2021-12-15 20:54:39 -07:00
dfsek cfa1c39889 register division sampler 2021-12-15 20:54:21 -07:00
dfsek 72d4c0a0c1 register multiplication sampler 2021-12-15 20:54:09 -07:00
dfsek 5ce87b0e35 register subtraction sampler 2021-12-15 20:53:32 -07:00
dfsek 4c43b35e0e register addition sampelr 2021-12-15 20:53:07 -07:00
dfsek 650892f340 create BinaryArithmeticTemplate 2021-12-15 20:51:59 -07:00
dfsek 33cdc55e21 create and register ScaleNormalizerTemplate 2021-12-15 20:49:10 -07:00
dfsek 90aa1e1dce create ScaleNormalizer 2021-12-15 20:48:07 -07:00
dfsek 907c1519bd create MinSampler 2021-12-15 20:46:08 -07:00
dfsek 0228761452 create MaxSampler 2021-12-15 20:45:48 -07:00
dfsek a01bfe35e8 create DivisionSampler 2021-12-15 20:45:22 -07:00
dfsek a193d7534f create MultiplicationSampler 2021-12-15 20:45:05 -07:00
dfsek c1e6a3d7d8 create SubtractionSampler 2021-12-15 20:44:43 -07:00
dfsek 3f0b4131be create AdditionSampler 2021-12-15 20:44:36 -07:00
dfsek 6a2fedb773 create BinaryArithmeticSampler 2021-12-15 20:43:42 -07:00
dfsek 177cc512fa create and register LinearHeightmapSamplerTemplate 2021-12-15 20:41:42 -07:00
dfsek 8579b6f6eb implement LinearHeightmapSampler 2021-12-15 20:38:22 -07:00
dfsek bce7481290 register PositiveWhiteNoiseSampler 2021-12-15 19:53:27 -07:00
dfsek 7a935e10f0 create PositiveWhiteNoiseSampler 2021-12-15 19:52:36 -07:00
dfsek 3d5b23d0f5 create and register ProbabilityNormalizerTemplate 2021-12-15 19:50:43 -07:00
dfsek 1e0ffd10c6 add ProbabilityNormalizer 2021-12-15 19:49:29 -07:00
dfsek 799e1c9bf3 reverse NoiseDistributor threshold 2021-12-15 19:37:38 -07:00
dfsek d92a68e3f2 remove pointless override 2021-12-15 16:39:47 -07:00
dfsek 039d004fa5 remove unused BiomeConfigType registry override 2021-12-14 21:51:48 -07:00
dfsek 5d2e3f03fa fix NoiseLocator coordinates 2021-12-14 20:09:13 -07:00
dfsek 9cb0f1aeb8 automatically remove "Template" from end of config templates in docs 2021-12-14 19:50:27 -07:00
dfsek 2f19a95437 properly handle generic types 2021-12-14 17:56:30 -07:00
dfsek 04b748979e dont use full name in docs 2021-12-14 17:35:03 -07:00
dfsek 4247f85f70 cleanup 2021-12-14 17:33:00 -07:00
dfsek 0e3b40564b use config key instead of field name 2021-12-14 17:22:08 -07:00
dfsek ddd5dbaeed clean up buildscripts and apply doc plugin 2021-12-14 17:19:08 -07:00
dfsek 3c3b24fc03 basic automatic documentation 2021-12-14 17:18:32 -07:00
dfsek f6d5295980 Merge pull request #280 from PolyhedralDev/dev/feature-stages
refactor stages & introduce new cellular return type
2021-12-14 15:30:48 -07:00
solonovamax 39160f9ff8 use #getFormatted to print the string when loading addons
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
2021-12-14 17:17:06 -05:00
dfsek f87540472a document StageTemplate 2021-12-14 14:00:16 -07:00
dfsek e8e80c9a7a document biome pipeline 2021-12-14 13:55:39 -07:00
dfsek e39730c238 document ImageProviderTemplate 2021-12-14 13:45:33 -07:00
dfsek 58acca3078 reformat 2021-12-14 11:01:28 -07:00
dfsek bf5e7f589d fix frequency calculation in angle return 2021-12-13 18:44:13 -07:00
dfsek da5a7a7856 add cellular return type Angle 2021-12-13 18:16:11 -07:00
dfsek 1c78c4a80e finalize FeatureGenerationAddon 2021-12-13 17:29:44 -07:00
dfsek 05064861a6 implement features using dynamic templates 2021-12-13 17:29:10 -07:00
dfsek 3296120a2a update to tectonic 3.1.0 2021-12-13 17:02:35 -07:00
dfsek 69b1c86055 update to tectonic 3.0.1 2021-12-13 16:47:21 -07:00
dfsek b1945d1593 use GenerationStage, not specific FeatureGenerationStage 2021-12-13 14:25:36 -07:00
dfsek 56214bf03f finish feature stage impl 2021-12-12 21:42:25 -07:00
dfsek c804947923 feature addon registry configuration 2021-12-12 20:50:55 -07:00
dfsek 480bb84d9c move stages to ConfigPack instance 2021-12-12 16:09:40 -07:00
dfsek e45b44c0aa remove unused OreTemplate options 2021-12-12 13:33:38 -07:00
dfsek e0ec34c638 implement ore addon 2021-12-12 13:32:47 -07:00
dfsek bf4b5a94a4 update to 1.18.1 2021-12-10 19:12:51 -07:00
dfsek 7ddb2346f1 allow metaconfiguration of biome colors keys 2021-12-09 20:43:19 -07:00
dfsek 0603d58f6b remove unused variables key 2021-12-09 20:43:03 -07:00
dfsek 07e8360c90 clean up BiomeTemplate 2021-12-09 17:13:10 -07:00
dfsek 41be7598ea remove unused biome blend values 2021-12-09 17:11:49 -07:00
dfsek c4fd4fa9d3 remove unused biome noise value 2021-12-09 17:11:26 -07:00
dfsek 00578c55c2 remove unused biome elevation values 2021-12-09 17:11:07 -07:00
dfsek f8a366308a remove unused original carving equation 2021-12-09 17:10:36 -07:00
dfsek 52e269dbe9 remove unused biome noise config value 2021-12-09 17:10:18 -07:00
dfsek 86af411991 make slant palettes metaconfigurable 2021-12-09 16:20:46 -07:00
dfsek 41aeafe54c move palette loading to BiomePaletteTemplate 2021-12-09 16:08:38 -07:00
dfsek 39a62edc7d original map keys take priority over metamap 2021-12-09 15:56:43 -07:00
dfsek 15b0e265cc fix y index out of range in carver 2021-12-09 14:58:10 -07:00
dfsek e1e851d6f3 sort biomes in pipeline leakage error message 2021-12-08 21:36:58 -07:00
dfsek 7dea8b143f fix DelegatedBiome hashCode & equals 2021-12-08 21:28:35 -07:00
dfsek 0e6b93023c fix EphemeralBiomeDelegate hashCode & equals 2021-12-08 21:26:59 -07:00
dfsek 66126067c0 remove unused parameter in BiomePipelineProvider constructor 2021-12-08 08:06:18 -07:00
dfsek c08f779171 increase pipeline cache size 2021-12-07 21:31:36 -07:00
dfsek 8ca4e380fa optimize kernel sampler when kernel values are zero 2021-12-07 21:25:49 -07:00
dfsek 81900d80b5 fix biome delegate loading 2021-12-07 21:05:54 -07:00
dfsek ac9ab133a9 improve biome error message 2021-12-07 21:01:52 -07:00
dfsek f0385e4096 implement SELF biome without horrible null impl 2021-12-07 20:51:56 -07:00
dfsek 163129e245 refactor biome pipeline api 2021-12-05 18:33:07 -07:00
dfsek e60a8a109b implement biome delegates in pipeline 2021-12-05 17:26:32 -07:00
dfsek 9416e2fbaa make BiomeSource use biome delegates 2021-12-05 17:07:23 -07:00
dfsek 3afc9d2c5d remove unused config loader 2021-12-05 17:07:12 -07:00
dfsek 66555b21a6 register BiomeDelegate loader 2021-12-05 17:04:35 -07:00
dfsek f93842dc94 create BiomeDelegateLoader 2021-12-05 17:02:27 -07:00
dfsek 3bb52b5cfe create pipeline BiomeDelegate 2021-12-05 16:58:03 -07:00
dfsek 95c5e7022e remove bstats 2021-12-05 12:36:59 -07:00
dfsek b0adc47907 remove bstats dependency 2021-12-05 12:32:52 -07:00
dfsek 508fc17d05 update paper api dependency 2021-12-05 12:31:52 -07:00
dfsek f90a1c7883 update paper download url 2021-12-05 12:29:23 -07:00
dfsek c1f8be668c fix vanilla structure gen 2021-12-05 12:25:50 -07:00
dfsek 1442660e49 register structures to Terra biomes 2021-12-05 12:20:04 -07:00
dfsek 95749bea5d generate vanilla structures 2021-12-05 10:16:04 -07:00
dfsek f46e285bc9 switch x and z ChunkGenerator params 2021-12-04 23:34:18 -07:00
dfsek 2fa8831c63 add carver resolution config to pack.yml 2021-12-04 23:33:36 -07:00
dfsek 86336eea01 create lazily evaluated carver 2021-12-04 23:29:38 -07:00
dfsek 71bd433442 remove unneeded RegistrationEvent 2021-12-04 20:41:09 -07:00
dfsek 99a2f1af3a fix yaml addon 2021-12-04 20:40:14 -07:00
dfsek 72488c9d18 move config discovery to separate method 2021-12-04 20:40:07 -07:00
dfsek cb90563519 format 2021-12-04 20:34:17 -07:00
dfsek bf9fcc37cb make EventManager#callEvent return event 2021-12-04 20:32:40 -07:00
dfsek 4dcd013db4 move meta registration to separate method 2021-12-04 20:31:12 -07:00
dfsek 6c69e3fad1 create RegistrationEvent 2021-12-04 20:29:38 -07:00
dfsek 709b41aceb move unneeded fields to local constructor vars 2021-12-04 20:21:53 -07:00
dfsek 845b932451 remove unused load method 2021-12-04 20:18:58 -07:00
dfsek 3215c17609 clean up ConfigPackImpl constructors 2021-12-04 20:18:31 -07:00
dfsek 8a6e61469b refactor configs 2021-12-04 19:51:42 -07:00
dfsek ec77519923 convert PaletteInfo to record 2021-12-04 19:51:03 -07:00
dfsek b52e00a842 move NoiseChunkGenerator3D 2021-12-04 19:48:53 -07:00
dfsek edb9b13bd1 correct carving logic 2021-12-04 19:39:35 -07:00
dfsek 1eb515e751 nested user defined functions 2021-12-04 19:34:24 -07:00
dfsek 4083597f23 remove unneeded ChunkInterpolator interface 2021-12-04 19:07:39 -07:00
dfsek 48f799e1c5 remove unneeded Sampler interface 2021-12-04 19:06:04 -07:00
dfsek f08f79f754 rename SamplerProviderImpl to SamplerProvider 2021-12-04 19:04:42 -07:00
dfsek 672cf59972 move Sampler to chunk generator addon 2021-12-04 19:04:11 -07:00
dfsek dc88c322fb move derivative method to PaletteUtil 2021-12-04 19:03:25 -07:00
dfsek df16edac7f implement carving 2021-12-04 19:01:48 -07:00
dfsek 0c8aedd972 load biome noise templates 2021-12-04 18:52:50 -07:00
dfsek 3da2565f57 remove GenerationSettings 2021-12-04 18:49:43 -07:00
dfsek ca84628eb9 remove Biome#getGenerator 2021-12-04 18:48:47 -07:00
dfsek 88adbb16d2 move generator options to addon 2021-12-04 18:48:25 -07:00
dfsek 0912b8b161 remove unused class 2021-12-04 18:19:37 -07:00
dfsek af53987fbd move ChunkInterpolator to noise chunk generator addon 2021-12-04 18:19:03 -07:00
dfsek 0818f943b1 make platform biome return singular 2021-12-04 18:17:32 -07:00
dfsek 2ef2b61cc5 TerraBiome -> Biome 2021-12-04 17:47:41 -07:00
dfsek 16c80a0976 Biome -> PlatformBiome 2021-12-04 17:46:26 -07:00
dfsek 4d2639207d fix terrascript loading on windows 2021-12-03 15:55:56 -07:00
dfsek fe57ae2471 actually implement getheight methods 2021-12-03 09:46:37 -07:00
dfsek c09231b039 updade fabric entity generation 2021-12-03 09:39:30 -07:00
dfsek f7ccb00bbe remove unused configpack methods 2021-12-03 09:38:11 -07:00
dfsek b925fe8ff5 create parent classloader for addons 2021-12-02 21:10:05 -07:00
dfsek 275320af0b use decimal for CheckFunction 2021-12-02 20:45:27 -07:00
dfsek 9bee597cb9 fix addon ID 2021-12-02 19:49:21 -07:00
dfsek 50c1e8f1a7 add todo for removing jank hashcode 2021-12-02 19:47:49 -07:00
dfsek 2c963e14d5 remove WorldConfig 2021-12-02 19:46:35 -07:00
dfsek a2a8f6e471 remove ConfigPack#toWorldConfig 2021-12-02 19:45:55 -07:00
dfsek e533555b52 drastically simplify generator API 2021-12-02 19:45:22 -07:00
dfsek 71a39ba05b unimplement PropertyHolder 2021-12-02 18:08:08 -07:00
dfsek 1c7c7af105 implement PropertyHolder in ChunkGenerator 2021-12-02 18:05:52 -07:00
dfsek ad66fa8022 implement TerraScriptCheckFunctionAddon 2021-12-02 18:04:16 -07:00
dfsek b222129478 terrascript check function addon depends on terrascript addon 2021-12-02 17:47:02 -07:00
dfsek c6eeb9a3ea remove layer addon for now 2021-12-02 17:45:08 -07:00
dfsek b9c77fbdfa move elevation interpolation to new addon 2021-12-02 17:44:30 -07:00
dfsek c68d092814 clean up chunkgenerator stuff 2021-12-02 17:43:44 -07:00
dfsek 4a8d19cbf2 remove unused methods from WorldConfig 2021-12-02 09:42:38 -07:00
dfsek fab02d4d16 remove ChunkGenerator#getPack 2021-12-02 09:23:34 -07:00
dfsek fc073325fb remove ChunkGenerator#getPlatform 2021-12-02 09:12:16 -07:00
dfsek f8d270540e start implementing LayeredChunkGeneratorAddon 2021-12-02 09:12:02 -07:00
dfsek 69ec02341f create base LayerChunkGeneratorAddon 2021-12-02 08:13:22 -07:00
dfsek e10948a7cf fix RegistryTest 2021-12-01 21:15:36 -07:00
dfsek ed2e56c776 fix bukkit impl 2021-12-01 21:14:22 -07:00
dfsek 4db469199c fix duplicate mixin method 2021-12-01 21:10:18 -07:00
dfsek a69be58b58 make registry return optional for get operations 2021-12-01 17:48:41 -07:00
dfsek 4cc07a7b02 update to latest Tectonic version 2021-12-01 10:21:20 -07:00
dfsek 8214b17a4e update to latest Paralithic 2021-12-01 10:17:33 -07:00
dfsek 7a665d6f9c annotate Registry methods with nullability and contract 2021-12-01 10:15:02 -07:00
dfsek 2d7cf5151f annotate WorldHandle methods with nullability and contract 2021-12-01 08:29:14 -07:00
dfsek 65d8dc803d annotate Platform methods with nullability and contract 2021-12-01 08:26:30 -07:00
dfsek 5749af4bb2 update to 1.18 release 2021-11-30 20:06:37 -07:00
dfsek d0872f42da fix project versioning 2021-11-29 16:17:24 -07:00
dfsek 8b7cf2a74c fix publishing config 2021-11-29 16:07:25 -07:00
dfsek 7dc1f2fe92 add info comment to config.yml 2021-11-28 21:55:40 -07:00
dfsek ffe05bc7f9 clean up config.yml 2021-11-28 21:53:42 -07:00
dfsek 135e8269fa remove unused language stuff 2021-11-28 21:52:15 -07:00
dfsek 1832e58498 move StructureAccessorAccessor to accessor package 2021-11-28 19:56:43 -07:00
dfsek b4408f048c cleanup generic type 2021-11-28 16:52:59 -07:00
dfsek 397c464fb2 finish refactoring world api 2021-11-28 16:51:04 -07:00
dfsek 6b9dfc5d43 refactor world classes 2021-11-28 16:43:27 -07:00
dfsek b882e5e62b remove unused generator classes 2021-11-28 16:42:08 -07:00
dfsek 2d5b384ae4 pull members of WritableWorld up 2021-11-28 16:42:00 -07:00
dfsek 86dee3bb29 create base World interface 2021-11-28 16:36:57 -07:00
dfsek 4287ff8a3c World -> ServerWorld 2021-11-28 16:36:29 -07:00
dfsek da34aeed42 create readable and writable world interfaces 2021-11-28 16:35:13 -07:00
dfsek 402ac166ff worldaccess -> WritableWorld 2021-11-28 16:32:59 -07:00
dfsek 27f472dd57 for some reason we were shading all of SpongeAPI 2021-11-28 13:52:01 -07:00
dfsek 64d9eca618 update paper 2021-11-28 13:40:50 -07:00
dfsek 6f88519df8 reimplement strata 2021-11-28 13:09:30 -07:00
dfsek 2325886adb biome determinism 2021-11-28 12:58:26 -07:00
dfsek a5947be122 fix fabric protoworld impl 2021-11-28 12:26:01 -07:00
dfsek 1e9e1dce75 implement world api changes 2021-11-28 12:19:10 -07:00
dfsek 01f6df4a19 pull more methods to WorldAccess 2021-11-28 12:01:12 -07:00
dfsek 5ed7733320 add ProtoWorld#getWorld 2021-11-28 11:36:29 -07:00
dfsek b880b6592b move spawnEntity to WorldAccess 2021-11-28 11:35:12 -07:00
dfsek a52271dfb9 implement BukkitProtoWorld 2021-11-27 17:25:55 -07:00
dfsek bf0ac5afe2 refactor world API 2021-11-27 17:15:20 -07:00
dfsek a30451597c create ProtoWorld 2021-11-27 17:13:26 -07:00
dfsek d8d9d99598 pull World methods up to WorldAccess 2021-11-27 17:13:04 -07:00
dfsek 381cf0a6ee run server with nogui 2021-11-27 17:08:21 -07:00
dfsek 45dec188a6 fix Paper launch 2021-11-27 16:51:59 -07:00
dfsek fda30ff76d getBiomeProviderBuilder -> getBiomeProvider 2021-11-27 15:44:52 -07:00
dfsek 429c9a5d33 update paper API to 1.18 snapshot 2021-11-27 15:42:44 -07:00
dfsek 51df2daaa8 dont include Minecraft or Java in Fabric mod injection 2021-11-27 11:26:23 -07:00
dfsek 73c210a1bf sort addons before listing 2021-11-27 11:10:40 -07:00
dfsek 85206d5239 implement ephemeral addons for platform version comparison 2021-11-27 11:08:01 -07:00
dfsek e3f7e7b246 update to RC3 2021-11-27 10:21:54 -07:00
dfsek 7376533027 dont check addon versions until Strata is fixed 2021-11-27 09:58:01 -07:00
dfsek baf7230b1b remove Tree 2021-11-27 09:55:31 -07:00
dfsek e616d21bea refactor generation stuff 2021-11-27 09:52:41 -07:00
dfsek 7aaa94dedc start updating to new bukkit world generation API 2021-11-27 09:36:54 -07:00
dfsek 50da6d9d9b clean up ChunkGenerator 2021-11-27 08:55:40 -07:00
dfsek 7a3597a722 remove BiomeGrid 2021-11-27 08:46:59 -07:00
dfsek ac50f23090 remove unused code 2021-11-27 08:40:40 -07:00
dfsek 2307897b31 use pattern variables 2021-11-27 08:34:03 -07:00
dfsek 2d316fa042 buidscript cleanup 2021-11-27 08:30:05 -07:00
dfsek 2aa9c86499 getNoiseSeeded -> noise 2021-11-27 08:25:14 -07:00
dfsek bfee773229 add intvector default getNoise methods 2021-11-27 08:23:49 -07:00
dfsek 0441760cae clean up gradle 2021-11-25 11:27:33 -07:00
dfsek 35194fc09c update description 2021-11-25 09:40:37 -07:00
dfsek 6c0628ddcb reorganize Fabric buildscript 2021-11-25 09:38:41 -07:00
dfsek 9e1ab776cf remove redundant Fabric relocation config 2021-11-25 09:38:00 -07:00
dfsek 034b01a04c run shaded remapped JAR task automatically on Fabric 2021-11-25 09:37:08 -07:00
dfsek a2dcbf69c7 suppress unused variable warnings for dependency configs 2021-11-25 09:33:52 -07:00
dfsek f761559e6e addon versioning 2021-11-25 09:32:43 -07:00
dfsek 017a4f8e08 redo how prereleases are configured 2021-11-25 09:01:06 -07:00
dfsek 2018e3aa9f dont change version quite yet 2021-11-24 20:40:21 -07:00
dfsek 7cf51356a6 update to 1.18 prerelease 8 2021-11-24 20:26:17 -07:00
dfsek 0001c20eea redo how versioning works 2021-11-24 20:20:55 -07:00
dfsek 0940611b89 make version a function, not class 2021-11-24 19:25:49 -07:00
dfsek 05911027bd annotate experimental API @Experimental 2021-11-24 15:25:48 -07:00
dfsek c57e55c286 update JetBrains annotations 2021-11-24 15:22:50 -07:00
dfsek 8f4818709a remove unused code 2021-11-24 15:19:32 -07:00
dfsek b04f7cfc55 start moving to int vector impls where possible 2021-11-24 13:54:43 -07:00
dfsek ba7722ce45 create biome structure config 2021-11-24 13:28:47 -07:00
dfsek 5e5ce0722f create StructureGenerationAddon 2021-11-24 13:01:07 -07:00
dfsek 325035822f somehow intellij forgot about this stuff 2021-11-23 21:09:42 -07:00
dfsek 3557536968 clean up unused stuff 2021-11-23 21:04:18 -07:00
dfsek 07520b9014 refactor Pairs 2021-11-23 21:00:35 -07:00
dfsek d17dcc17b0 demote dead entry messages to debug level 2021-11-23 20:57:52 -07:00
dfsek 8b4e51b876 dont dual-write getHandle 2021-11-23 20:55:34 -07:00
dfsek 65ec50577d Bootstrap-Addon-Entry-Point to Terra-Bootstrap-Addon-Entry-Point 2021-11-23 20:53:28 -07:00
dfsek 516c19c312 remove unused exceptions 2021-11-23 20:48:38 -07:00
dfsek dcee8b8e8b remove unused BootstrapAddonLoader constructor parameter 2021-11-23 20:47:36 -07:00
dfsek a1306c88c0 Merge remote-tracking branch 'origin/ver/6.0.0' into ver/6.0.0 2021-11-23 20:41:33 -07:00
dfsek e4fd2d1d48 update modrinth publishing task 2021-11-23 20:41:27 -07:00
solonovamax 711451a4b3 Minor code refactors, clean up logging significantly, and close resources
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
2021-11-23 17:13:04 -05:00
solonovamax 2d4e46a43f Fix logging in a dev environment
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
2021-11-23 16:30:32 -05:00
solonovamax 2b2255a590 Optimize logging statements to avoid string concatenation
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
2021-11-23 15:13:50 -05:00
solonovamax 92046fe345 Update purpur url
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
2021-11-23 15:09:50 -05:00
solonovamax 7a53175a5f fix: slf4j not working properly when used in prod
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
2021-11-23 14:54:37 -05:00
solonovamax 5a35d8b40e fix: shadedImplementation configuration not actually being shaded
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
2021-11-23 14:54:37 -05:00
dfsek 596262bd64 pre7 2021-11-23 12:43:05 -07:00
dfsek 37ef406a78 update to pre6 2021-11-23 10:09:17 -07:00
dfsek 2a4e6830e1 update README.md 2021-11-22 18:11:33 -07:00
solonovamax 8ffa931a2f Sort repositories by what should be resolved first.
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
2021-11-22 14:05:05 -05:00
solonovamax 8bfb69baee Update dependencies so that logging *actually* works this time
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
2021-11-22 14:04:45 -05:00
dfsek 45c682c595 fix mixin remap issue 2021-11-22 09:03:02 -07:00
dfsek 1c9724c232 fix bootstrap addon packaging 2021-11-22 09:02:54 -07:00
dfsek c29dac9847 remove unused WorldEditUtil 2021-11-22 07:48:46 -07:00
dfsek 42ea10f72c fix builds 2021-11-22 07:48:37 -07:00
dfsek 7bc42e07c4 add licensing information to README.md 2021-11-21 22:01:29 -07:00
solonovamax dc07b60688 Use latest fancy gradle features to not do that dumb string bullshit from before
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
2021-11-21 23:58:24 -05:00
dfsek 7e0fa4854f reconfigure implementation projects 2021-11-21 21:41:19 -07:00
solonovamax 22eae6d515 Fix compile error with bukkit platform impl
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
2021-11-21 23:29:42 -05:00
dfsek d8ad9e043e accidentally committed this script 2021-11-21 21:25:48 -07:00
dfsek 5e3efc8cae finalize licensing changes 2021-11-21 21:22:34 -07:00
dfsek 02bf258d9b remove empty gitmodules file 2021-11-21 21:18:38 -07:00
dfsek b07aaa5bb5 Merge submodule contents for common/addons/structure-terrascript-loader/master 2021-11-21 21:15:13 -07:00
dfsek f70f353329 Remove submodule common/addons/structure-terrascript-loader 2021-11-21 21:15:00 -07:00
dfsek 1e16c9a7c3 Merge submodule contents for common/addons/structure-sponge-loader/master 2021-11-21 21:14:57 -07:00
dfsek ec42ffbf60 Remove submodule common/addons/structure-sponge-loader 2021-11-21 21:14:45 -07:00
dfsek 0de7a437bb Merge submodule contents for common/addons/manifest-addon-loader/master 2021-11-21 21:14:38 -07:00
dfsek 09b751243a Remove submodule common/addons/manifest-addon-loader 2021-11-21 21:14:25 -07:00
dfsek 3a0b20a5bd Merge submodule contents for common/addons/language-yaml/master 2021-11-21 21:14:21 -07:00
dfsek 478416aedd Remove submodule common/addons/language-yaml 2021-11-21 21:14:09 -07:00
dfsek 677da12d1e Merge submodule contents for common/addons/generation-stage-structure/master 2021-11-21 21:14:03 -07:00
dfsek b23c7c33aa Remove submodule common/addons/generation-stage-structure 2021-11-21 21:13:51 -07:00
dfsek a0816e2edc Merge submodule contents for common/addons/generation-stage-feature/master 2021-11-21 21:13:48 -07:00
dfsek 460b5f0fa5 Remove submodule common/addons/generation-stage-feature 2021-11-21 21:13:36 -07:00
dfsek a18610d07d Merge submodule contents for common/addons/config-structure/master 2021-11-21 21:13:29 -07:00
dfsek b434036684 Remove submodule common/addons/config-structure 2021-11-21 21:13:17 -07:00
dfsek 8637992b56 Merge submodule contents for common/addons/config-palette/master 2021-11-21 21:13:11 -07:00
dfsek 4ca4b40053 Remove submodule common/addons/config-palette 2021-11-21 21:12:59 -07:00
dfsek 17634f0fb5 Merge submodule contents for common/addons/config-ore/master 2021-11-21 21:12:55 -07:00
dfsek c86b84832d Remove submodule common/addons/config-ore 2021-11-21 21:12:43 -07:00
dfsek eaeab7adaf Merge submodule contents for common/addons/config-noise-function/master 2021-11-21 21:12:37 -07:00
dfsek a2d64499e1 Remove submodule common/addons/config-noise-function 2021-11-21 21:12:25 -07:00
dfsek 0958f29e6e Merge submodule contents for common/addons/config-locators/master 2021-11-21 21:11:59 -07:00
dfsek a12fe99ad7 Remove submodule common/addons/config-locators 2021-11-21 21:11:46 -07:00
dfsek 5b1ebf1d61 Merge submodule contents for common/addons/config-flora/master 2021-11-21 21:11:40 -07:00
dfsek 9fe6c2b137 Remove submodule common/addons/config-flora 2021-11-21 21:11:28 -07:00
dfsek 6ad29f5002 Merge submodule contents for common/addons/config-feature/master 2021-11-21 21:11:23 -07:00
dfsek 190e4a7702 Remove submodule common/addons/config-feature 2021-11-21 21:11:11 -07:00
dfsek efe5564b6f Merge submodule contents for common/addons/config-distributors/master 2021-11-21 21:11:04 -07:00
dfsek 082946936f Remove submodule common/addons/config-distributors 2021-11-21 21:10:52 -07:00
dfsek 1fd1dd92d3 Merge submodule contents for common/addons/config-carver/master 2021-11-21 21:10:44 -07:00
dfsek 1633eacd67 Remove submodule common/addons/config-carver 2021-11-21 21:10:32 -07:00
dfsek b8f00dd20b Merge submodule contents for common/addons/config-biome/master 2021-11-21 21:10:27 -07:00
dfsek c1ddc70a53 Remove submodule common/addons/config-biome 2021-11-21 21:10:14 -07:00
dfsek eb34d30b00 Merge submodule contents for common/addons/chunk-generator-noise-3d/master 2021-11-21 21:10:07 -07:00
dfsek fba5fc05d1 Remove submodule common/addons/chunk-generator-noise-3d 2021-11-21 21:09:55 -07:00
dfsek 8a38377443 Merge submodule contents for common/addons/biome-provider-single/master 2021-11-21 21:09:35 -07:00
dfsek cca697a272 Remove submodule common/addons/biome-provider-single 2021-11-21 21:09:23 -07:00
dfsek 11c37b087d Merge submodule contents for common/addons/biome-provider-pipeline/master 2021-11-21 21:09:17 -07:00
dfsek 085bfc5533 Remove submodule common/addons/biome-provider-pipeline 2021-11-21 21:09:05 -07:00
dfsek 34b7c8f098 Merge submodule contents for common/addons/biome-provider-image/master 2021-11-21 21:08:44 -07:00
dfsek 20d25ffbba Remove submodule common/addons/biome-provider-image 2021-11-21 21:08:32 -07:00
dfsek 10dbc97bea Merge submodule contents for common/addons/api-addon-loader/master 2021-11-21 21:08:00 -07:00
dfsek 9089703c1d Remove submodule common/addons/api-addon-loader 2021-11-21 21:07:48 -07:00
dfsek 7ca02a945d cleanup 2021-11-21 20:17:12 -07:00
dfsek 75bd324897 Merge remote-tracking branch 'origin/ver/6.0.0' into ver/6.0.0 2021-11-21 19:54:00 -07:00
dfsek 1a9fdabc4a clean up FunctionalEventHandlerImpl 2021-11-21 18:47:23 -07:00
dfsek f1fbe8e55c Merge pull request #279 from solonovamax/chore/remove-debug-logging
Remove debug logging config value
2021-11-21 18:38:58 -07:00
solonovamax e60dfe0242 Remove debug logging config value
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
2021-11-21 20:13:06 -05:00
dfsek ee9c60b127 point to new config repo 2021-11-21 17:57:49 -07:00
dfsek ac7a7f3129 Merge pull request #274 from NeumimTo/ver/6.0.0
fix win loading
2021-11-21 17:47:07 -07:00
dfsek c4d15aa64a update logging 2021-11-21 17:39:08 -07:00
dfsek 3b07aece86 update logging 2021-11-21 17:39:03 -07:00
dfsek e3be3d2453 update logging 2021-11-21 17:39:03 -07:00
dfsek 966d48241b update logging 2021-11-21 17:39:03 -07:00
dfsek bedde0d061 update logging 2021-11-21 17:39:03 -07:00
dfsek b50330df93 update logging 2021-11-21 17:39:02 -07:00
dfsek 023ae3e269 Merge remote-tracking branch 'origin/ver/6.0.0' into ver/6.0.0 2021-11-21 17:22:54 -07:00
dfsek 97fb779b19 Merge pull request #269 from solonovamax/architecture/slf4j-logging
Improve logging and migrate to SLF4J for logging instead of internal logging classes.
2021-11-21 17:22:23 -07:00
dfsek 8010e64ecc package bootstrap addons correctly 2021-11-21 17:19:37 -07:00
solonovamax dd259c4d8f Make logging actually work
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
2021-11-21 19:18:00 -05:00
solonovamax 9d30130f85 Merge remote-tracking branch 'upstream/ver/6.0.0' into architecture/slf4j-logging 2021-11-21 17:57:56 -05:00
dfsek 42cd6d82ca Merge remote-tracking branch 'origin/ver/6.0.0' into ver/6.0.0 2021-11-21 14:13:13 -07:00
dfsek e227095319 update to 1.18 prerelease 5 & Java 17 2021-11-21 14:12:51 -07:00
solo dfcf8c6185 Update gitignore file to ignore a few things that annoyed me (#278)
* Update gitignore file to ignore a few things that annoyed me

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

* Remove .conf because hocon uses it.

Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
2021-11-21 13:47:44 -07:00
solonovamax d2d96813ad Have your newline back
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
2021-11-21 01:25:06 -05:00
solonovamax 7fee2b9718 Actually include git submodules this time
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
2021-11-21 01:23:43 -05:00
solonovamax 1c97ec10e1 Don't remove all the addons, thanks
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
2021-11-21 01:14:54 -05:00
solonovamax 28eed33e40 Merge remote-tracking branch 'upstream/ver/6.0.0' into architecture/slf4j-logging
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
2021-11-21 00:52:05 -05:00
dfsek bb515444c6 fix BinaryColumn 2021-11-20 22:34:46 -07:00
dfsek de267a8251 fix BinaryColumn 2021-11-20 22:34:40 -07:00
dfsek d506f5f3a3 fix BinaryColumn 2021-11-20 22:34:40 -07:00
dfsek 40ef026f82 launch on 1.18 2021-11-20 20:56:57 -07:00
dfsek a447be3c50 launch on 1.18 2021-11-20 20:56:57 -07:00
dfsek a6edb6aef6 pre5 2021-11-20 18:37:33 -07:00
dfsek 4b944ee2fe update tooling for 1.18 2021-11-20 18:09:40 -07:00
dfsek da4d6b26d8 pass structure id into TerraStructure 2021-11-20 17:30:04 -07:00
dfsek 733e6282a8 pass structure id into TerraStructure 2021-11-20 13:35:57 -07:00
dfsek c79ce49e4d structure configtype impl 2021-11-20 12:47:29 -07:00
dfsek 94ee2c27eb structure configtype impl 2021-11-20 12:47:20 -07:00
dfsek 1267661819 default impl of ConfigType#registrySupplier 2021-11-20 12:44:32 -07:00
dfsek a59763da64 default impl of ConfigType#registrySupplier 2021-11-20 12:44:32 -07:00
dfsek e5ab20e167 default impl of ConfigType#registrySupplier 2021-11-20 12:44:32 -07:00
dfsek b3a14432ce clean up NoiseChunkGenerator3D 2021-11-20 12:38:57 -07:00
dfsek 5d3afcc82c add license headers 2021-11-19 15:42:34 -07:00
dfsek 6a0f026cc1 add license headers 2021-11-19 15:42:26 -07:00
dfsek 9b723888ab add license headers 2021-11-19 15:42:26 -07:00
dfsek f25f3053cd add license headers 2021-11-19 15:42:25 -07:00
dfsek 932da70534 add license headers 2021-11-19 15:42:25 -07:00
dfsek f0c343e6fa add license headers 2021-11-19 15:42:25 -07:00
dfsek 9545ba3801 add license headers 2021-11-19 15:42:25 -07:00
dfsek 51ea7a11e0 add license headers 2021-11-19 15:42:25 -07:00
dfsek 7a15b150eb add license headers 2021-11-19 15:42:25 -07:00
dfsek 43426ea084 add license headers 2021-11-19 15:42:25 -07:00
dfsek e1dadaca6a add license headers 2021-11-19 15:42:25 -07:00
dfsek d8f948919d add license headers 2021-11-19 15:42:25 -07:00
dfsek c55c404973 add license headers 2021-11-19 15:42:25 -07:00
dfsek ade6a7685b add license headers 2021-11-19 15:42:24 -07:00
dfsek ca0e93d61b add license headers 2021-11-19 15:42:24 -07:00
dfsek d276514305 add license headers 2021-11-19 15:42:24 -07:00
dfsek 6579df929b add license headers 2021-11-19 15:42:24 -07:00
dfsek 3cec0aa9ce add license headers 2021-11-19 15:42:24 -07:00
dfsek 323d58aeb0 add license headers 2021-11-19 15:42:24 -07:00
dfsek 320279f9a6 add license headers 2021-11-19 15:42:24 -07:00
dfsek 4f873f7730 add license headers 2021-11-19 15:42:24 -07:00
dfsek c52d8b3804 relicense addons under MIT license 2021-11-19 08:47:24 -07:00
dfsek 9f52c9e055 relicense addons under MIT license 2021-11-19 08:47:17 -07:00
dfsek 610336e868 relicense addons under MIT license 2021-11-19 08:47:17 -07:00
dfsek b89df817ff relicense addons under MIT license 2021-11-19 08:47:17 -07:00
dfsek 1ccc2e477f relicense addons under MIT license 2021-11-19 08:47:17 -07:00
dfsek 13a5d15139 relicense addons under MIT license 2021-11-19 08:47:17 -07:00
dfsek 6e06bfa86d relicense addons under MIT license 2021-11-19 08:47:17 -07:00
dfsek 1c3148d96b relicense addons under MIT license 2021-11-19 08:47:17 -07:00
dfsek 5d1c3b16e6 relicense addons under MIT license 2021-11-19 08:47:17 -07:00
dfsek a2907e5808 relicense addons under MIT license 2021-11-19 08:47:17 -07:00
dfsek 28373086ad relicense addons under MIT license 2021-11-19 08:47:16 -07:00
dfsek 16159c9723 relicense addons under MIT license 2021-11-19 08:47:16 -07:00
dfsek 1d341b6a00 relicense addons under MIT license 2021-11-19 08:47:16 -07:00
dfsek 691d8ff6f1 relicense addons under MIT license 2021-11-19 08:47:16 -07:00
dfsek 532138b71e relicense addons under MIT license 2021-11-19 08:47:16 -07:00
dfsek 06493819a6 relicense addons under MIT license 2021-11-19 08:47:16 -07:00
dfsek f4e6259a44 relicense addons under MIT license 2021-11-19 08:47:15 -07:00
dfsek c03c230e70 relicense addons under MIT license 2021-11-19 08:47:15 -07:00
dfsek 4535151d0d relicense addons under MIT license 2021-11-19 08:47:15 -07:00
dfsek 68e7631a3b relicense addons under MIT license 2021-11-19 08:47:15 -07:00
dfsek 6a235e66a0 relicense addons under MIT license 2021-11-19 08:47:15 -07:00
dfsek 61d0daf9c7 relicense addons under MIT license 2021-11-19 08:47:15 -07:00
dfsek 03e58f48a9 update README 2021-11-18 22:04:10 -07:00
dfsek 1028ed0989 delete old addon system 2021-11-18 21:50:41 -07:00
dfsek 7bf1ba13c8 fix circular dependency checking 2021-11-18 21:45:12 -07:00
dfsek 869edff873 add feature dependencies 2021-11-18 21:38:46 -07:00
dfsek b2a50e6141 add feature dependencies 2021-11-18 21:38:46 -07:00
dfsek 6bb0f29433 add feature dependencies 2021-11-18 21:38:46 -07:00
dfsek 84537e2f99 fix dependency sorting 2021-11-18 21:38:33 -07:00
dfsek c53aa12377 addon dependency sorting 2021-11-18 21:13:33 -07:00
dfsek a6440187ed addon dependency sorting 2021-11-18 21:13:32 -07:00
dfsek 83126454ea addon dependency sorting 2021-11-18 21:13:32 -07:00
dfsek ceeb59301e remove unused gradle enterprise stuff 2021-11-17 19:22:27 -07:00
dfsek 46b918f9be load platform addons 2021-11-17 18:00:23 -07:00
dfsek 8fc3977236 remove AddonRegistry 2021-11-17 17:23:27 -07:00
dfsek 79dcc63152 addon initialization 2021-11-17 17:22:29 -07:00
dfsek 208cbbd8e0 addon initialization 2021-11-17 17:22:29 -07:00
dfsek 243a7fd8d1 format 2021-11-17 16:28:40 -07:00
dfsek 76f8af1b64 format 2021-11-17 16:28:40 -07:00
dfsek c406bfd63f format 2021-11-17 16:28:40 -07:00
dfsek da3a5f67fa format 2021-11-17 16:28:40 -07:00
dfsek 184bce293f format 2021-11-17 16:28:40 -07:00
dfsek 34acf03564 format 2021-11-17 16:28:40 -07:00
dfsek 3737e3510d format 2021-11-17 16:28:40 -07:00
dfsek d0e20ea6ca format 2021-11-17 16:28:39 -07:00
dfsek 062f5a5152 format 2021-11-17 16:28:39 -07:00
dfsek 8207d55848 format 2021-11-17 16:28:39 -07:00
dfsek 44e0a8452f format 2021-11-17 16:28:39 -07:00
dfsek ad7cc4fce0 format 2021-11-17 16:28:39 -07:00
dfsek 1a733d10c0 format 2021-11-17 16:28:39 -07:00
dfsek 7c30ab095e format 2021-11-17 16:28:38 -07:00
dfsek 2e60de8916 format 2021-11-17 16:28:38 -07:00
dfsek 20992e4334 format 2021-11-17 16:28:38 -07:00
dfsek 0e059f7000 format 2021-11-17 16:28:38 -07:00
dfsek 20a9c0d718 format 2021-11-17 16:28:38 -07:00
dfsek 9b30d11791 format 2021-11-17 16:28:38 -07:00
dfsek 8c721bc0b0 format 2021-11-17 16:28:38 -07:00
dfsek 172006f2f6 initialize manifest addons 2021-11-17 16:22:14 -07:00
dfsek a5d9fca932 initialize manifest addons 2021-11-17 16:22:14 -07:00
dfsek 174b23c8ef add logging 2021-11-17 15:29:28 -07:00
dfsek 42ece3f27a add logging 2021-11-17 15:29:28 -07:00
dfsek a76e583c51 manifest addon loading 2021-11-17 15:22:12 -07:00
dfsek 939b528d11 manifest addon loading 2021-11-17 15:22:12 -07:00
dfsek e1feb9bc5e manifest addon loading 2021-11-17 15:22:12 -07:00
dfsek 226420b1d2 api addon bootstrap config 2021-11-17 12:39:44 -07:00
dfsek 8eaf0e1880 api addon bootstrap config 2021-11-17 12:39:44 -07:00
dfsek 26e5e4c0c8 create addon manifests 2021-11-17 12:39:24 -07:00
dfsek db20ad5539 create addon manifests 2021-11-17 12:39:24 -07:00
dfsek 4ba759c374 create addon manifests 2021-11-17 12:39:24 -07:00
dfsek eb9f484863 create addon manifests 2021-11-17 12:39:24 -07:00
dfsek a2a3dbbc87 create addon manifests 2021-11-17 12:39:24 -07:00
dfsek dbfd354338 create addon manifests 2021-11-17 12:39:24 -07:00
dfsek 217bfb4565 create addon manifests 2021-11-17 12:39:24 -07:00
dfsek 3cffdf54d8 create addon manifests 2021-11-17 12:39:23 -07:00
dfsek bfa4a062c4 create addon manifests 2021-11-17 12:39:23 -07:00
dfsek 424cceef03 create addon manifests 2021-11-17 12:39:23 -07:00
dfsek 8de78ef5f2 create addon manifests 2021-11-17 12:39:23 -07:00
dfsek 927273511c create addon manifests 2021-11-17 12:39:23 -07:00
dfsek 712ec7b74c create addon manifests 2021-11-17 12:39:23 -07:00
dfsek 146afbece6 create addon manifests 2021-11-17 12:39:23 -07:00
dfsek af1c04ebdc create addon manifests 2021-11-17 12:39:23 -07:00
dfsek 626f5c4471 create addon manifests 2021-11-17 12:39:23 -07:00
dfsek 43510c20de create addon manifests 2021-11-17 12:39:23 -07:00
dfsek c0392b206b create addon manifests 2021-11-17 12:39:23 -07:00
dfsek 408cfceb92 create addon manifests 2021-11-17 12:39:23 -07:00
dfsek e96f43f3b0 depend on manifest addons in core addon modules 2021-11-17 12:20:18 -07:00
dfsek 0205b7ac55 depend on manifest addons in core addon modules 2021-11-17 12:20:18 -07:00
dfsek 7736b7b73d depend on manifest addons in core addon modules 2021-11-17 12:20:18 -07:00
dfsek 416be81124 depend on manifest addons in core addon modules 2021-11-17 12:20:18 -07:00
dfsek 317ba915e7 depend on manifest addons in core addon modules 2021-11-17 12:20:18 -07:00
dfsek 4fc1605c8d depend on manifest addons in core addon modules 2021-11-17 12:20:18 -07:00
dfsek b1f69203eb depend on manifest addons in core addon modules 2021-11-17 12:20:18 -07:00
dfsek 790aa540f8 depend on manifest addons in core addon modules 2021-11-17 12:20:17 -07:00
dfsek a902798c7c depend on manifest addons in core addon modules 2021-11-17 12:20:17 -07:00
dfsek 07a145d3c3 depend on manifest addons in core addon modules 2021-11-17 12:20:17 -07:00
dfsek b36f9fda45 depend on manifest addons in core addon modules 2021-11-17 12:20:17 -07:00
dfsek b9dd1e007c depend on manifest addons in core addon modules 2021-11-17 12:20:17 -07:00
dfsek c207f51bfc depend on manifest addons in core addon modules 2021-11-17 12:20:17 -07:00
dfsek b06e04e306 depend on manifest addons in core addon modules 2021-11-17 12:20:17 -07:00
dfsek 6cf8cec2c3 depend on manifest addons in core addon modules 2021-11-17 12:20:17 -07:00
dfsek 1f27a6e735 depend on manifest addons in core addon modules 2021-11-17 12:20:17 -07:00
dfsek ce5e691851 depend on manifest addons in core addon modules 2021-11-17 12:20:17 -07:00
dfsek b9b49508b9 depend on manifest addons in core addon modules 2021-11-17 12:20:17 -07:00
dfsek 158cb1d08e depend on manifest addons in core addon modules 2021-11-17 12:20:17 -07:00
dfsek 368be1d112 depend on manifest addons in core addon modules 2021-11-17 12:20:17 -07:00
dfsek 81bc6b90fe create addon manifests 2021-11-17 10:20:06 -07:00
dfsek f6af478765 create addon manifests 2021-11-17 10:20:06 -07:00
dfsek eda6afa79b create addon manifests 2021-11-17 10:20:06 -07:00
dfsek 2afd8b9b8d create addon manifests 2021-11-17 10:20:06 -07:00
dfsek f6cc6d682f create addon manifests 2021-11-17 10:20:05 -07:00
dfsek ed35d62b8b create addon manifests 2021-11-17 10:20:05 -07:00
dfsek d7a131b733 create addon manifests 2021-11-17 10:20:05 -07:00
dfsek 2a8a11b035 create addon manifests 2021-11-17 10:20:05 -07:00
dfsek 0e7f323036 create addon manifests 2021-11-17 10:20:05 -07:00
dfsek d2b6963763 create addon manifests 2021-11-17 10:20:05 -07:00
dfsek 0259b620e4 create addon manifests 2021-11-17 10:20:05 -07:00
dfsek 16bcc12ccb create addon manifests 2021-11-17 10:20:04 -07:00
dfsek 98a708ceae create addon manifests 2021-11-17 10:20:04 -07:00
dfsek 5586cc99b0 create addon manifests 2021-11-17 10:20:04 -07:00
dfsek fdf112b0b2 create addon manifests 2021-11-17 10:20:04 -07:00
dfsek 628f695abb create addon manifests 2021-11-17 10:20:04 -07:00
dfsek 5a8ca230c0 create addon manifests 2021-11-17 10:20:04 -07:00
dfsek a3aa6d49cf create addon manifests 2021-11-17 10:20:04 -07:00
dfsek bf78577d26 create addon manifests 2021-11-17 10:20:04 -07:00
dfsek 38a3936938 create addon manifests 2021-11-17 10:20:04 -07:00
dfsek da8c62d961 create addon manifests 2021-11-17 10:20:03 -07:00
dfsek fb93d417ee bootstrap addon dumping 2021-11-17 09:22:45 -07:00
dfsek b9a6f11245 bootstrap addon dumping 2021-11-17 09:22:45 -07:00
dfsek c0bcc40f6a load bootstrap addons 2021-11-17 08:52:23 -07:00
dfsek c6e6478043 load bootstrap addons 2021-11-17 08:52:23 -07:00
dfsek 92341751fc fix TerraAddon -> BaseAddon 2021-11-17 08:38:51 -07:00
dfsek 71b053bee6 implement addon loading 2021-11-17 08:35:00 -07:00
dfsek 9840bf09fa generify BootstrapBaseAddon 2021-11-17 08:22:06 -07:00
dfsek 4f4dc45a48 generify BootstrapBaseAddon 2021-11-17 08:22:06 -07:00
dfsek e3b00d45ec manifest addon loading 2021-11-16 10:11:44 -07:00
dfsek e211b27a80 manifest addon loading 2021-11-16 10:11:44 -07:00
dfsek 491b6aa96d strata version loading 2021-11-16 09:17:43 -07:00
dfsek 06d09bc422 strata version loading 2021-11-16 09:17:36 -07:00
dfsek c4171f1a26 manifest addon config stuff 2021-11-16 08:56:41 -07:00
dfsek fd22dca0fa work on addon bootstrapping 2021-11-15 18:23:23 -07:00
dfsek 9d2b354a33 work on addon bootstrapping 2021-11-15 18:23:23 -07:00
dfsek b4e9ad0412 work on addon bootstrapping 2021-11-15 18:23:23 -07:00
dfsek aa3991592c create api-addon-loader module 2021-11-12 17:11:39 -07:00
dfsek ec17781f4a create api-addon-loader module 2021-11-12 17:11:39 -07:00
dfsek 72bf8da59d add api addon loader module 2021-11-10 12:18:49 -07:00
dfsek 7a37e3044c Create LICENSE 2021-11-10 12:12:50 -07:00
dfsek 4fa8e7f17a create RegistryTest 2021-11-09 23:59:54 -07:00
dfsek eb50b29e95 clean up tests 2021-11-09 23:54:46 -07:00
dfsek 3d141fc47f move registry api to new module 2021-11-09 23:49:49 -07:00
dfsek 9715171aba move registry api to new module 2021-11-09 23:49:49 -07:00
NeumimTo 8a5666227d fix win loading 2021-10-22 22:53:55 +02:00
NeumimTo 614431af2f fix win build (#272) 2021-10-18 11:00:34 -07:00
dfsek 48d9b44344 add terrascript addon as submodule 2021-10-17 15:42:00 -07:00
dfsek aff3e474af remove terrascript addon from main repo 2021-10-17 15:41:48 -07:00
dfsek ddf9ed86a7 Initial commit 2021-10-17 15:41:05 -07:00
dfsek 9cd45686d3 add sponge loader addon as submodule 2021-10-17 15:39:35 -07:00
dfsek 76d165e21b remove sponge loader addon from main repo 2021-10-17 15:39:24 -07:00
dfsek 6002620d4d Initial commit 2021-10-17 15:38:31 -07:00
dfsek 3f1cbc9095 add manifest addon loader as submodule 2021-10-17 15:37:18 -07:00
dfsek fa2a25b7c6 remove manifest loader addon from main repo 2021-10-17 15:36:51 -07:00
dfsek 9b3e64a595 Initial commit 2021-10-17 15:36:22 -07:00
dfsek 63cb98a327 add YAML addon as submodule 2021-10-17 15:32:42 -07:00
dfsek f4fa8c861e remove YAML addon from main repo 2021-10-17 15:32:12 -07:00
dfsek 8c577c39ab Initial commit 2021-10-17 15:31:43 -07:00
dfsek c3487f95ec add structure gen addon as submodule 2021-10-17 15:30:11 -07:00
dfsek 427e20a4dc remove structure gen addon from main repo 2021-10-17 15:29:44 -07:00
dfsek 5b0617888c Initial commit 2021-10-17 15:28:56 -07:00
dfsek 25d6f1debf add feature gen addon as submodule 2021-10-17 15:26:45 -07:00
dfsek ce2807b1f6 remove feature gen addon from main repo 2021-10-17 15:26:22 -07:00
dfsek d0f3ae6581 Initial commit 2021-10-17 15:25:45 -07:00
dfsek 7de4d84c39 add structure config addon as submodule 2021-10-17 15:24:42 -07:00
dfsek 48abed87db remove structure addon from main repo 2021-10-17 15:24:27 -07:00
dfsek 65b52e76ec Initial commit 2021-10-17 15:23:38 -07:00
dfsek c3a90b2022 add palette addon as submodule 2021-10-17 15:22:42 -07:00
dfsek 67e30df22b remove palette addon from main repo 2021-10-17 15:22:27 -07:00
dfsek 3d6e9f69de Initial commit 2021-10-17 15:21:51 -07:00
dfsek 75209dc6eb add ore addon as submodule 2021-10-17 15:20:34 -07:00
dfsek 097d33a056 remove ore addon from main repo 2021-10-17 15:20:14 -07:00
dfsek f044b25769 Initial commit 2021-10-17 15:19:41 -07:00
dfsek 76f6184640 add noise addon as submodule 2021-10-17 15:18:50 -07:00
dfsek 6e3c09d081 remove noise addon from main repo 2021-10-17 15:18:00 -07:00
dfsek 7e0fd93708 Initial commit 2021-10-17 15:07:58 -07:00
dfsek eb1df32714 add locators addon as submodule 2021-10-17 15:06:54 -07:00
dfsek e32d9433d5 remove locators addon from main repo 2021-10-17 15:06:44 -07:00
dfsek 41e6b7f243 Initial commit 2021-10-17 15:05:52 -07:00
dfsek 6f5de4d0b4 add flora addon as submodule 2021-10-17 15:04:37 -07:00
dfsek c2c67fbe72 remove flora addon from main repo 2021-10-17 15:04:27 -07:00
dfsek 6ef6e39128 Initial commit 2021-10-17 15:03:26 -07:00
dfsek 914f0bd862 add feature addon as submodule 2021-10-17 14:45:09 -07:00
dfsek 4d0ca617a0 remove feature addon from main repo 2021-10-17 14:44:41 -07:00
dfsek 72e9e0cf9a Initial commit 2021-10-17 14:44:13 -07:00
dfsek d143ff87fb add distributor addon as submodule 2021-10-17 14:38:44 -07:00
dfsek db8c15b49c remove distributors addon from main repo 2021-10-17 14:38:29 -07:00
dfsek 2368763d74 Initial commit 2021-10-17 14:37:50 -07:00
dfsek 476828985e add carver addon as submodule 2021-10-17 14:34:46 -07:00
dfsek 8df87df374 remove carver addon from main repo 2021-10-17 14:34:34 -07:00
dfsek cb2e4da32c Initial commit 2021-10-17 14:29:15 -07:00
dfsek 765322ef57 add biome config addon as submodule 2021-10-17 14:25:43 -07:00
dfsek 720295650b remove biome config addon from main repo 2021-10-17 14:25:17 -07:00
dfsek d37fad80b6 Initial commit 2021-10-17 14:24:31 -07:00
dfsek 50637f03d6 add chunk generator addon as submodule 2021-10-17 14:19:54 -07:00
dfsek 37a70891f3 remove chunk generator addon from main repo 2021-10-17 14:19:21 -07:00
dfsek 16b0ea2c13 Initial commit 2021-10-17 14:18:48 -07:00
dfsek f1bcd5fd79 remove single biome provider from main repo 2021-10-17 14:15:38 -07:00
dfsek bdcf3099b1 Initial commit 2021-10-17 14:13:51 -07:00
dfsek 445b87f1fa add biome pipeline addon as submodule 2021-10-17 14:10:40 -07:00
dfsek 61600c96c4 remove biome pipeline addon from main repo 2021-10-17 14:10:02 -07:00
dfsek b25878414f Initial commit 2021-10-17 14:08:44 -07:00
dfsek 09031d5c90 add image provider addon as submodule 2021-10-17 14:05:49 -07:00
dfsek e56cf9f36e Remove image provider addon from main repo 2021-10-17 14:04:46 -07:00
dfsek 8998d46f20 Initial commit 2021-10-17 14:03:11 -07:00
dfsek 901ec1cda3 fix /te reload 2021-10-17 12:16:33 -07:00
dfsek c93dd19678 enforce registry IDs to be alphanumeric with hyphens & underscores 2021-10-17 11:35:39 -07:00
dfsek 56170d8392 remove CheckedRegistry#registerUnchecked 2021-10-17 11:27:33 -07:00
dfsek f5fdb6cb30 sort registry items in error message 2021-10-17 11:27:05 -07:00
dfsek 1892dd1c37 improve registry load error message 2021-10-17 11:22:23 -07:00
dfsek d7811959fa include script path in script compile errors 2021-10-17 11:16:41 -07:00
dfsek 18bc083431 remove TerraScript ID keyword in favor of file name 2021-10-17 11:16:24 -07:00
dfsek ab100c85a1 finish sponge schematic addon 2021-10-15 22:44:37 -07:00
dfsek e971223e4f implement SpongeStructure 2021-10-15 22:15:35 -07:00
dfsek 56651a6307 make RotationUtil#rotateVector return vector 2021-10-15 22:15:20 -07:00
dfsek cd4ccc993b refactor buffers 2021-10-15 22:05:29 -07:00
dfsek 7c5b7e5b45 refactor BufferedBlock 2021-10-15 22:04:01 -07:00
dfsek cc660e820d create SpongeSchematicAddon 2021-10-15 22:02:51 -07:00
dfsek b8a841f88e create sponge loader project 2021-10-15 21:31:52 -07:00
dfsek a1a043c296 refactor FabricEntryPoint#getPlatform 2021-10-15 21:26:06 -07:00
solo e3df44e16f Add String#strip to AddonRegistry to remove trialing newline 2021-09-27 10:57:06 -04:00
solo 764f93f40f Add String#strip invocations to SpigotListener to remove trailing newline 2021-09-27 10:56:10 -04:00
dfsek 9bcdc40eb5 implement global and local functions in expression samplers 2021-09-26 23:41:00 -07:00
dfsek 10f62b75b6 resolve conflicts 2021-09-26 22:49:47 -07:00
dfsek 0a6a3268da Merge remote-tracking branch 'origin/ver/6.0.0' into architecture/slf4j-logging
# Conflicts:
#	common/addons/chunk-generator-noise-3d/src/main/java/com/dfsek/terra/addons/chunkgenerator/generation/generators/NoiseChunkGenerator3D.java
#	common/addons/config-structure/src/main/java/com/dfsek/terra/addons/structure/command/structure/StructureExportCommand.java
#	common/addons/config-structure/src/main/java/com/dfsek/terra/addons/structure/structures/loot/functions/EnchantFunction.java
#	common/addons/language-yaml/src/main/java/com/dfsek/terra/addons/yaml/YamlAddon.java
#	common/addons/structure-terrascript-loader/src/main/java/com/dfsek/terra/addons/terrascript/buffer/items/BufferedBlock.java
#	common/addons/structure-terrascript-loader/src/main/java/com/dfsek/terra/addons/terrascript/buffer/items/BufferedLootApplication.java
#	common/addons/structure-terrascript-loader/src/main/java/com/dfsek/terra/addons/terrascript/buffer/items/BufferedStateManipulator.java
#	common/addons/structure-terrascript-loader/src/main/java/com/dfsek/terra/addons/terrascript/script/StructureScript.java
#	common/addons/structure-terrascript-loader/src/main/java/com/dfsek/terra/addons/terrascript/script/functions/LootFunction.java
#	common/addons/structure-terrascript-loader/src/main/java/com/dfsek/terra/addons/terrascript/script/functions/StructureFunction.java
#	common/api/core/src/main/java/com/dfsek/terra/api/Platform.java
#	common/implementation/src/main/java/com/dfsek/terra/AbstractPlatform.java
#	common/implementation/src/main/java/com/dfsek/terra/InternalAddon.java
#	common/implementation/src/main/java/com/dfsek/terra/commands/AddonsCommand.java
#	common/implementation/src/main/java/com/dfsek/terra/commands/ReloadCommand.java
#	common/implementation/src/main/java/com/dfsek/terra/commands/profiler/ProfileQueryCommand.java
#	common/implementation/src/main/java/com/dfsek/terra/config/PluginConfigImpl.java
#	common/implementation/src/main/java/com/dfsek/terra/config/lang/LangUtil.java
#	common/implementation/src/main/java/com/dfsek/terra/config/pack/ConfigPackImpl.java
#	common/implementation/src/main/java/com/dfsek/terra/event/FunctionalEventHandlerImpl.java
#	common/implementation/src/main/java/com/dfsek/terra/registry/config/ConfigTypeRegistry.java
#	common/implementation/src/main/java/com/dfsek/terra/registry/master/AddonRegistry.java
#	common/implementation/src/main/java/com/dfsek/terra/registry/master/ConfigRegistry.java
#	platforms/bukkit/src/main/java/com/dfsek/terra/bukkit/BukkitAddon.java
#	platforms/bukkit/src/main/java/com/dfsek/terra/bukkit/PlatformImpl.java
#	platforms/bukkit/src/main/java/com/dfsek/terra/bukkit/listeners/SpigotListener.java
#	platforms/fabric/src/main/java/com/dfsek/terra/fabric/FabricAddon.java
#	platforms/fabric/src/main/java/com/dfsek/terra/fabric/FabricEntryPoint.java
#	platforms/fabric/src/main/java/com/dfsek/terra/fabric/PlatformImpl.java
#	platforms/fabric/src/main/java/com/dfsek/terra/fabric/generation/FabricChunkGeneratorWrapper.java
#	platforms/sponge/src/main/java/com/dfsek/terra/sponge/PlatformImpl.java
2021-09-26 22:46:54 -07:00
dfsek 0e88d95ed5 properly disable the plugin 2021-09-26 15:11:42 -07:00
dfsek 2dc2d00c0c remove unneeded toString 2021-09-26 15:08:43 -07:00
dfsek 6cde584dd9 better server brand check 2021-09-26 15:06:42 -07:00
dfsek 13cfb3adc6 we run on 1.13-1.17 2021-09-26 15:05:15 -07:00
dfsek bb463dae7e remove VersionUtil bloat 2021-09-26 15:04:58 -07:00
dfsek 98d147a304 depend on Strata 2021-09-26 14:40:41 -07:00
dfsek 4d8d8f656a make ParseException unchecked 2021-09-26 13:35:54 -07:00
dfsek 89d53d0ea3 cleanup 2021-09-26 13:24:42 -07:00
dfsek 4945a3bbfa rename main parameters/fields to platform 2021-09-26 13:22:45 -07:00
dfsek 8f51707505 use expression switches 2021-09-26 13:16:43 -07:00
dfsek 3de02c5d63 rename TerraPlugin to Platform 2021-09-26 13:02:19 -07:00
solonovamax ca55f06853 Forgot to invoke doVersionCheck lol
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
2021-09-25 01:25:28 -04:00
solonovamax 33276f1cf3 Forgot space lol
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
2021-09-25 01:19:08 -04:00
dfsek e7b13d2063 register YES and NO distributors 2021-09-24 22:15:42 -07:00
dfsek 1fc16772af create NoDistributorTemplate 2021-09-24 22:15:07 -07:00
dfsek 318aede719 create YesDistributorTemplate 2021-09-24 22:14:29 -07:00
dfsek cc55588967 more Distributor API 2021-09-24 22:14:17 -07:00
solonovamax 53296b2367 Remap log4j-slf4j-impl
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
2021-09-25 01:12:35 -04:00
solonovamax 9eef2599b9 Finish up merge into ver/6.0.0, as there were still some errors.
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
2021-09-25 01:12:06 -04:00
dfsek 6a1ac49e54 register Noise3DLocator 2021-09-24 22:09:36 -07:00
dfsek 1c06a39df3 create Noise3DLocatorTemplate 2021-09-24 22:09:07 -07:00
dfsek 4778149c50 create Noise3DLocator 2021-09-24 22:08:01 -07:00
dfsek c928a1a806 more Column API 2021-09-24 22:06:26 -07:00
solonovamax 4c1ac827ad Merge remote-tracking branch 'upstream/ver/6.0.0' into architecture/slf4j-logging
# Conflicts:
#	common/api/util/src/main/java/com/dfsek/terra/api/util/Logger.java
#	common/implementation/src/main/java/com/dfsek/terra/AbstractTerraPlugin.java
#	common/implementation/src/main/java/com/dfsek/terra/config/PluginConfigImpl.java
#	common/implementation/src/main/java/com/dfsek/terra/config/lang/LangUtil.java
#	common/implementation/src/main/java/com/dfsek/terra/registry/master/AddonRegistry.java
#	common/implementation/src/main/java/com/dfsek/terra/util/logging/DebugLogger.java
#	common/implementation/src/main/java/com/dfsek/terra/util/logging/JavaLogger.java
#	platforms/bukkit/src/main/java/com/dfsek/terra/bukkit/TerraPluginImpl.java
#	platforms/fabric/src/main/java/com/dfsek/terra/fabric/TerraPluginImpl.java
#	platforms/sponge/src/main/java/com/dfsek/terra/sponge/TerraPluginImpl.java
2021-09-25 00:42:09 -04:00
dfsek 687efb7444 make InjectionException unchecked 2021-09-24 12:35:20 -07:00
dfsek 09b4da7974 move DI stuff to new subproject 2021-09-24 12:31:08 -07:00
dfsek 1dc2f2c23c create separate subproject for DI 2021-09-24 12:29:21 -07:00
dfsek ed1eb02256 move NoiseSampler to noise project 2021-09-24 12:24:06 -07:00
dfsek dda2ed955d move vectors to util project 2021-09-24 12:22:44 -07:00
dfsek b3503026b4 create noise project 2021-09-24 12:20:57 -07:00
dfsek 328bdee602 move MathUtil to util project 2021-09-24 12:19:37 -07:00
dfsek 988579b708 move Sampler to util package 2021-09-24 12:18:57 -07:00
dfsek a7d0e7f49b base API project 2021-09-24 12:06:06 -07:00
solonovamax b03c8b4a11 Merge remote-tracking branch 'upstream/ver/6.0.0' into architecture/slf4j-logging
# Conflicts:
#	common/api/core/src/main/java/com/dfsek/terra/api/Logger.java
2021-09-24 13:50:21 -04:00
dfsek c35d1acbbf refactor StringIdentifiable and Logger 2021-09-24 07:57:49 -07:00
dfsek 016fbaf468 create config api subproject 2021-09-24 07:54:57 -07:00
dfsek 0a6cde69d6 move mutable utils 2021-09-19 11:32:24 -07:00
dfsek 05cd7084ef move reflection utils 2021-09-19 11:31:59 -07:00
dfsek 33ab4c5bfd move generic utils to util project 2021-09-19 11:30:49 -07:00
dfsek 554369be31 create util api package 2021-09-19 11:23:17 -07:00
dfsek acf3844139 move API project 2021-09-19 11:20:50 -07:00
dfsek c6bdf2e37a start addon API 2021-09-19 11:09:48 -07:00
dfsek 06ab30339d create manifest-addon-loader module 2021-09-19 10:56:38 -07:00
dfsek 3c354df5d8 remove unused api-features core addon 2021-09-19 10:51:37 -07:00
dfsek a2a8728203 feature after flora 2021-09-19 00:33:57 -07:00
dfsek 0366e2e33c registry merge debug message 2021-09-19 00:33:49 -07:00
dfsek 5919bdac50 remove flora generation addon 2021-09-19 00:22:41 -07:00
dfsek c4415c6fd2 convert TerraFlora to structure 2021-09-19 00:17:28 -07:00
dfsek 1968bdf88d fix final config template values 2021-09-18 23:43:00 -07:00
dfsek 13ffb0ace1 fix sponge build 2021-09-18 23:30:19 -07:00
dfsek 471059a03e update paralithic api 2021-09-18 23:30:11 -07:00
dfsek 02be2969a2 remove unused class 2021-09-18 23:29:59 -07:00
dfsek c8bb538c36 fix final variable in config template 2021-09-18 23:29:52 -07:00
dfsek 4c12483a57 bump paralithic to 0.5.0 2021-09-18 23:06:40 -07:00
dfsek e445fd986d Bump version 2021-09-06 12:45:53 -07:00
Cubxity d7bb818f51 Mitigate issues with tree generation in paper (#260)
* fix: mitigate cocoa tree generation crash

* chore: suppress warnings

* chore: fix formatting

* refactor: catch specific exception

* chore: added reference to PaperMC/Paper#6028
2021-09-06 12:44:43 -07:00
dfsek eef0e04682 Merge pull request #238 from pavog/patch-1
Fix spelling issues / typos in german translation
2021-09-06 12:44:24 -07:00
dfsek 9c857bf86b Merge pull request #255 from uRyanxD/master
Addition: Portuguese translation.
2021-09-06 12:44:13 -07:00
dfsek d440dacf30 Merge pull request #233 from ishland/fix/devlaunch
Fix fabric development environment launch
2021-09-06 12:43:58 -07:00
solonovamax b6c40302b6 Improve logging
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
2021-08-30 22:04:17 -04:00
solonovamax 7b9c88f8a6 Improve bukkit logging
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
2021-08-30 20:35:18 -04:00
solonovamax a776ecfc2b Migrate logging to SLF4J
Signed-off-by: solonovamax <solonovamax@12oclockpoint.com>
2021-08-30 19:53:35 -04:00
uRyanxD ffbc253477 Addition: Portuguese translation. 2021-08-12 20:48:27 -03:00
Paul Vogel b4ed874043 Fix spelling issues / typos in german translation 2021-07-07 23:10:43 +02:00
ishland f1845b1ecd Made requested changes 2021-07-04 13:41:56 +08:00
ishland f2946d85aa Fix fabric development environment launch 2021-07-04 00:15:53 +08:00
1081 changed files with 25021 additions and 18405 deletions
+6 -3
View File
@@ -37,9 +37,12 @@ assignees: ""
-->
- [ ] I have checked that I am on the latest version of Terra.
- [ ] I have searched the github issue tracker for similar issues, including closed ones.
- [ ] I have made sure that this is not a bug with another mod or plugin, and it 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.
- [ ] I have searched the github issue tracker for similar issues, including
closed ones.
- [ ] I have made sure that this is not a bug with another mod or plugin, and it
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 -->
- [ ] I have attached a copy of the `latest.log` file
- [ ] I have filled out and provided all the appropriate information.
+4 -2
View File
@@ -31,9 +31,11 @@ assignees: ""
-->
- [ ] I have checked that I am on the latest version of Terra.
- [ ] I have searched github for similar features requests, including closed ones, and found none.
- [ ] I have searched github for similar features requests, including closed
ones, and found none.
- [ ] I believe this is within the scope of Terra.
- [ ] This feature request is for *all* of Terra, and isn't something that should be implemented by a pack or addon.
- [ ] This feature request is for *all* of Terra, and isn't something that
should be implemented by a pack or addon.
## Feature Description
+2 -1
View File
@@ -1,6 +1,7 @@
---
name: "Other Issue"
about: "Use this template if your issue doesn't accurately fit into any of the other categories."
about: "Use this template if your issue doesn't accurately fit into any of the
other categories."
title: ""
labels: "Type: Question, Status: Pending"
assignees: ""
+11 -7
View File
@@ -33,9 +33,11 @@
<!-- 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.
- [ ] 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.
@@ -82,7 +84,8 @@
#### Compatiblity
- [ ] Breaking change <!-- A fix, or a feature, that breaks some previous functionality to Terra. -->
- [ ] 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.
@@ -94,8 +97,9 @@
#### 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.
- [ ] 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. -->
@@ -111,4 +115,4 @@
<!--
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.
-->
-->
+115 -10
View File
@@ -65,6 +65,8 @@ hs_err_pid*
.idea/**/dictionaries
.idea/**/shelf
.idea/
# Generated files
.idea/**/contentModel.xml
@@ -127,17 +129,120 @@ fabric.properties
# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser
# Ignore Gradle build output directory
build
/target/
### Windows template
# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db
.idea/sonarlint/**
.idea/codeStyles/**
.idea/**.xml
.idea/modules/**.iml
# Dump file
*.stackdump
# Folder config file
[Dd]esktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp
# Windows shortcuts
*.lnk
### macOS template
# General
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
### Linux template
*~
# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*
# KDE directory preferences
.directory
# Linux trash folder which might appear on any partition or disk
.Trash-*
# .nfs files are created when an open file is removed but is still being accessed
.nfs*
### Application
# Archive love files
*.log.gz
# binary files
*.bin
# Database files
*.db
# Cache files
*.meta
*.data
### JEnv template
# JEnv local Java version configuration file
.java-version
# Used by previous versions of JEnv
.jenv-version
### VisualStudioCode template
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace
# Local History for Visual Studio Code
.history/
### NetBeans template
**/nbproject/private/
**/nbproject/Makefile-*.mk
**/nbproject/Package-*.bash
build/
nbbuild/
dist/
nbdist/
.nb-gradle/
###
**/target/
!lib/*.jar
/run/
idea/**
testDir/
**/testDir/
+4 -4
View File
@@ -27,8 +27,8 @@ for everyone. We do not tolerate harassment of participants in any form.
## When and How to Use These Guidelines
This code of conduct applies to all Terra community spaces, both online and off.
This applies to the github discussion tab, the
[Polyhedral Development community discord server](https://discord.gg/PXUEbbF),
This applies to the github discussion tab, the
[Polyhedral Development community discord server](https://discord.gg/PXUEbbF),
and any other Terra community. In addition, we may choose to invoke them in
instances of harassment outside the Terra communities, and we will punish the
responsible individuals appropriately. We will not tolerate harassment in any
@@ -58,8 +58,8 @@ listen carefully, apologize sincerely, and correct the behavior going forward.
Any member of the Terra community should always be open to new ideas and must
always be open to the possibility of being wrong. Nobody can always be right,
and we are only human; we are
[fallible](https://www.merriam-webster.com/dictionary/fallible) by nature.
It is okay to make mistakes, but we must be willing to admit when we make one.
[fallible](https://www.merriam-webster.com/dictionary/fallible) by nature. It is
okay to make mistakes, but we must be willing to admit when we make one.
### Be Direct but Professional
+10 -9
View File
@@ -77,9 +77,9 @@ Unsure where to begin contributing to Terra? You can start by looking through "
beginner" and "help wanted" issues:
- [Beginner issues](https://github.com/PolyhedralDev/Terra/labels/Note%3A%20Good%20First%20Issue)
- issues which should be friendly to anyone new to terra.
- issues which should be friendly to anyone new to terra.
- [Help wanted issues](https://github.com/PolyhedralDev/Terra/labels/Note%3A%20Help%20Wanted)
- issues which should be a bit more involved than "beginner" issues.
- issues which should be a bit more involved than "beginner" issues.
New to github? Working on your first Pull Request? Check
out [How to Contribute to an Open Source Project on GitHub](https://app.egghead.io/playlists/how-to-contribute-to-an-open-source-project-on-github)
@@ -114,9 +114,9 @@ please [include as many details as possible](#how-do-i-submit-a-good-bug-report)
- Make sure that this is not a *specific* compatibility issue with another
terrain generation mod. Do not request *specific* compatibility with mods or
plugins (e.g. "Compatibility with TechCraft v7"). That should be implemented
in an addon, **not** in the main project.
in an addon, **not** in the platform project.
*General* compatibility (e.g. "Ability to pull Vanilla/Modded features from
parent biomes") will be considered in the main project.
parent biomes") will be considered in the platform project.
- Search for
any [already existing issues](https://github.com/PolyhedralDev/Terra/issues?q=is%3Aissue+)
open with your problem. If you open a duplicate, it will be closed as such.
@@ -200,7 +200,7 @@ please [include as many details as possible](#how-do-i-submit-a-good-enhancement
Enhancement suggestions are tracked
as [GitHub issues](https://guides.github.com/features/issues/). Create an issue
on our main repository and provide the following information:
on our platform repository and provide the following information:
- **Use a clear and descriptive title** for the issue to identify the
suggestion.
@@ -243,7 +243,7 @@ accepted.
Pull Requests are tracked
as [GitHub Pull Requests](https://guides.github.com/activities/forking/#making-a-pull-request)
. Create a pr on our main repository and provide the following information:
. Create a pr on our platform repository and provide the following information:
- **Use a clear and descriptive title** to identify the pull request.
- **State what this pull request adds/fixes**.
@@ -347,7 +347,7 @@ TODO
#### General Compatibility
General compatibility (example: injection of Vanilla structures/features/carvers
into packs) is acceptable in the main project.
into packs) is acceptable in the platform project.
- General compatibility features should be *disabled by default*. Having things
auto-injected causes unpredictable behaviour that is annoying to diagnose.
@@ -365,8 +365,9 @@ into packs) is acceptable in the main project.
#### Specific Compatibility
Specific compatibility should *not* be put in the main project. (Example: Adding
the ability to generate TechCraft v7's doo-dads with a TerraScript function)
Specific compatibility should *not* be put in the platform project. (Example:
Adding the ability to generate TechCraft v7's doo-dads with a TerraScript
function)
Having specific compatibilities leads to tons of extra dependencies to keep
track of, as well as adding lots of additional stuff to maintain. It quickly
+21 -674
View File
@@ -1,674 +1,21 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.
MIT License
Copyright (c) 2020-2021 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
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+56 -6
View File
@@ -1,15 +1,30 @@
<img align="left" width="64" height="64" src="https://raw.githubusercontent.com/wiki/PolyhedralDev/Terra/images/terra_logo.png" alt="Terra Logo">
# Terra
Terra is an incredibly powerful free & open-source data-driven,
platform-agnostic world generator. It allows you to create a world exactly to
your specifications, with no knowledge of Java required.
Terra is a modern world generation modding platform, primarily for Minecraft.
Terra allows complete customization of world generation with an advanced API,
tightly integrated with a powerful configuration system.
Terra consists of several parts:
* A voxel world generation API with emphasis on configuration and extensibility
* Several platform implementations, the layer between the API and the platform
it's running on.
* An addon loader, which allows addons to interface with the Terra API in a
platform-agnostic setting
* Several "core addons," which implement the "default" configurations of Terra.
These addons can be thought of as the config "standard library"
Terra currently officially supports the Fabric mod loader and the Bukkit API
(Paper and friends). We welcome Pull Requests implementing additional platforms!
## Downloads:
* Paper+ servers (Paper, Tuinity, Purpur,
etc): [SpigotMC](https://www.spigotmc.org/resources/85151/)
* Fabric: [Modrinth](https://modrinth.com/mod/terra)
/ [CurseForge](https://www.curseforge.com/minecraft/mc-mods/terra-world-generator)
* Paper+ servers (Paper, Tuinity, Purpur,
etc): [SpigotMC](https://www.spigotmc.org/resources/85151/)
## Building and Running Terra
@@ -44,7 +59,6 @@ To run Minecraft with Terra in the IDE (for testing) use the following tasks:
* `runClient` - Run a Minecraft Fabric client with Terra installed.
* `runServer` - Run a Minecraft Fabric server with Terra installed.
## Contributing
Contributions are welcome! If you want to see a feature in Terra, please, open
@@ -52,7 +66,43 @@ an issue, or implement it yourself and submit a PR!
Join the discord [here](https://discord.gg/PXUEbbF) if you would like to talk
more about the project!
## Licensing
Parts of Terra are licensed under either the MIT License or the GNU General
Public License, version 3.0.
* Our API is licensed under the [MIT License](LICENSE), to ensure that everyone
is able to freely use it however they want.
* Our core addons are also licensed under the [MIT License](LICENSE), to ensure
that people can freely use code from them to learn and make their own addons,
without worrying about GPL infection.
* Our platform-agnostic implementations and platform implementations are
licensed under
the [GNU General Public License, version 3.0](common/implementation/LICENSE),
to ensure that they remain free software wherever they are used.
If you're not sure which license a particular file is under, check:
* The file's header
* The LICENSE file in the closest parent folder of the file in question
## Beta
Terra is still in beta! While it is stable, it is not feature-complete. There is
a lot to be added!
## Special Thanks
[![YourKit-Logo](https://www.yourkit.com/images/yklogo.png)](https://www.yourkit.com/)
YourKit has granted Polyhedral Development an open-source license to their
outstanding Java profiler, allowing us to make our software as performant as it
can be!
YourKit supports open source projects with innovative and intelligent tools for
monitoring and profiling Java and .NET applications. YourKit is the creator of
the
[YourKit Java Profiler](https://www.yourkit.com/java/profiler/),
[YourKit .NET Profiler](https://www.yourkit.com/.net/profiler/),
and [YourKit YouMonitor](https://www.yourkit.com/youmonitor/).
+28 -24
View File
@@ -1,17 +1,15 @@
import com.dfsek.terra.configureCompilation
import com.dfsek.terra.configureDependencies
import com.dfsek.terra.configureDistribution
import com.dfsek.terra.configurePublishing
import com.dfsek.terra.getGitHash
preRelease(true)
versionProjects(":common:api", version("6.1.2"))
versionProjects(":common:implementation", version("6.1.2"))
versionProjects(":platforms", version("6.1.2"))
val versionObj = Version("6", "0", "0", true)
allprojects {
version = versionObj
group = "com.dfsek.terra"
configureDependencies()
configureCompilation()
configureDependencies()
configurePublishing()
tasks.withType<JavaCompile>().configureEach {
@@ -30,24 +28,30 @@ allprojects {
reports.html.required.set(false)
reports.junitXml.required.set(false)
}
tasks.withType<Copy>().configureEach {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
tasks.withType<Jar>().configureEach {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
}
}
afterEvaluate {
project(":platforms").subprojects.forEach { // Platform projects are where distribution happens
it.configureDistribution()
}
}
/**
* Version class that does version stuff.
*/
@Suppress("MemberVisibilityCanBePrivate")
class Version(val major: String, val minor: String, val revision: String, val preRelease: Boolean = false) {
override fun toString(): String {
return if (!preRelease)
"$major.$minor.$revision"
else //Only use git hash if it's a prerelease.
"$major.$minor.$revision-BETA+${getGitHash()}"
forImmediateSubProjects(":platforms") {
configureDistribution()
}
forSubProjects(":common:addons") {
apply(plugin = "com.github.johnrengelman.shadow")
tasks.named("build") {
finalizedBy(tasks.named("shadowJar"))
}
dependencies {
"compileOnly"(project(":common:api"))
"testImplementation"(project(":common:api"))
}
}
}
+20 -2
View File
@@ -3,12 +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/") {
name = "PaperMC"
}
}
dependencies {
"implementation"("com.github.jengelman.gradle.plugins:shadow:+")
"implementation"("org.yaml:snakeyaml:1.27")
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")
}
+47
View File
@@ -0,0 +1,47 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import java.io.File
import java.util.function.Predicate
import org.gradle.api.Project
import org.gradle.api.Task
import org.gradle.kotlin.dsl.extra
import kotlin.streams.asStream
/**
* Configures a directory where addons will be put.
*/
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)
}
}
}
task.dependsOn(moveAddons)
}
fun matchingAddons(dir: File, matcher: Predicate<File>): Set<File> {
val matching = HashSet<File>()
dir.walk().asStream().filter(matcher).forEach(matching::add)
return matching
}
@@ -1,5 +1,5 @@
package com.dfsek.terra
import com.dfsek.terra.tectonicdoc.TectonicDocPlugin
import org.apache.tools.ant.filters.ReplaceTokens
import org.gradle.api.JavaVersion
import org.gradle.api.Project
import org.gradle.api.plugins.JavaPluginExtension
@@ -19,10 +19,11 @@ fun Project.configureCompilation() {
apply(plugin = "java")
apply(plugin = "java-library")
apply(plugin = "idea")
apply<TectonicDocPlugin>()
configure<JavaPluginExtension> {
sourceCompatibility = JavaVersion.VERSION_16
targetCompatibility = JavaVersion.VERSION_16
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
tasks.withType<JavaCompile> {
@@ -34,16 +35,26 @@ fun Project.configureCompilation() {
tasks.withType<ProcessResources> {
include("**/*.*")
filter<org.apache.tools.ant.filters.ReplaceTokens>(
filter<ReplaceTokens>(
"tokens" to mapOf(
"VERSION" to project.version.toString(),
"DESCRIPTION" to project.properties["terra.description"],
"WIKI" to project.properties["terra.wiki"],
"SOURCE" to project.properties["terra.source"],
"ISSUES" to project.properties["terra.issues"],
"LICENSE" to project.properties["terra.license"]
"DESCRIPTION" to properties["terra.description"],
"WIKI" to properties["terra.wiki"],
"SOURCE" to properties["terra.source"],
"ISSUES" to properties["terra.issues"],
"LICENSE" to properties["terra.license"]
)
)
)
}
afterEvaluate {
tasks.withType<ProcessResources> {
include("**/*.*")
filter<ReplaceTokens>(
"tokens" to mapOf(
"VERSION" to version.toString()
)
)
}
}
tasks.withType<Javadoc> {
@@ -0,0 +1,47 @@
import org.gradle.api.Project
import org.gradle.kotlin.dsl.creating
import org.gradle.kotlin.dsl.dependencies
import org.gradle.kotlin.dsl.getValue
import org.gradle.kotlin.dsl.getting
import org.gradle.kotlin.dsl.maven
import org.gradle.kotlin.dsl.repositories
fun Project.configureDependencies() {
val testImplementation by configurations.getting
val compileOnly by configurations.getting
val api by configurations.getting
val implementation by configurations.getting
val shaded by configurations.creating
@Suppress("UNUSED_VARIABLE")
val shadedApi by configurations.creating {
shaded.extendsFrom(this)
api.extendsFrom(this)
}
@Suppress("UNUSED_VARIABLE")
val shadedImplementation by configurations.creating {
shaded.extendsFrom(this)
implementation.extendsFrom(this)
}
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/")
}
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")
compileOnly("com.google.guava:guava:30.0-jre")
testImplementation("com.google.guava:guava:30.0-jre")
}
}
@@ -1,24 +1,25 @@
package com.dfsek.terra
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import java.io.File
import java.io.FileInputStream
import java.io.FileOutputStream
import java.io.FileWriter
import java.net.URL
import java.util.zip.ZipEntry
import java.util.zip.ZipOutputStream
import java.nio.file.FileSystems
import java.nio.file.Files
import java.nio.file.StandardCopyOption
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
fun Project.configureDistribution() {
apply(plugin = "com.github.johnrengelman.shadow")
@@ -26,53 +27,51 @@ fun Project.configureDistribution() {
group = "terra"
doFirst {
file("${buildDir}/resources/main/packs/").deleteRecursively()
val defaultPackUrl = URL("https://github.com/PolyhedralDev/TerraDefaultConfig/releases/download/latest/default.zip")
val defaultPackUrl = URL("https://github.com/PolyhedralDev/TerraOverworldConfig/releases/download/latest/default.zip")
downloadPack(defaultPackUrl, project)
val netherPackUrl = URL("https://github.com/PolyhedralDev/TerraDefaultConfig/releases/download/latest/nether.zip")
downloadPack(netherPackUrl, project)
}
}
val compileAddons = tasks.create("compileAddons") {
forSubProjects(":common:addons") {
afterEvaluate {
dependsOn(getJarTask())
}
}
}
val installAddons = tasks.create("installAddons") {
group = "terra"
project(":common:addons").subprojects.forEach {
it.afterEvaluate {
dependsOn(it.tasks.getByName("build")) // Depend on addon JARs
}
}
dependsOn(compileAddons)
doFirst {
// The addons are copied into a JAR because of a ShadowJar bug
// which expands *all* JARs, even resource ones, into the fat JAR.
// To get around this, we copy all addon JARs into a *new* JAR,
// then, ShadowJar expands the newly created JAR, putting the original
// JARs where they should go.
//
doLast {
// https://github.com/johnrengelman/shadow/issues/111
val dest = File(buildDir, "/resources/main/addons.jar")
dest.parentFile.mkdirs()
val dest = tasks.named<ShadowJar>("shadowJar").get().archiveFile.get().asFile.toPath()
val zip = ZipOutputStream(FileOutputStream(dest))
project(":common:addons").subprojects.forEach { addonProject ->
val jar = (addonProject.tasks.named("jar").get() as Jar)
println("Packaging addon ${jar.archiveFileName.get()} to ${dest.absolutePath}.")
val entry = ZipEntry("addons/${jar.archiveFileName.get()}")
zip.putNextEntry(entry)
FileInputStream(jar.archiveFile.get().asFile).copyTo(zip)
zip.closeEntry()
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)
}
}
}
zip.close()
}
}
val generateResourceManifest = tasks.create("generateResourceManifest") {
group = "terra"
dependsOn(downloadDefaultPacks)
dependsOn(installAddons)
doFirst {
doLast {
val resources = HashMap<String, MutableList<String>>()
val packsDir = File("${project.buildDir}/resources/main/packs/")
@@ -88,9 +87,12 @@ fun Project.configureDistribution() {
resources.computeIfAbsent("lang") { ArrayList() }.add(it.name)
}
project(":common:addons").subprojects.forEach { addonProject ->
val jar = (addonProject.tasks.named("jar").get() as Jar).archiveFileName.get()
resources.computeIfAbsent("addons") { ArrayList() }.add(jar)
forSubProjects(":common:addons") {
val jar = getJarTask().archiveFileName.get()
resources.computeIfAbsent(
if (extra.has("bootstrap") && extra.get("bootstrap") as Boolean) "addons/bootstrap"
else "addons"
) { ArrayList() }.add(jar)
}
val options = DumperOptions()
@@ -113,18 +115,20 @@ fun Project.configureDistribution() {
tasks["processResources"].dependsOn(generateResourceManifest)
tasks.named<ShadowJar>("shadowJar") {
// Tell shadow to download the packs
dependsOn(downloadDefaultPacks)
configurations = listOf(project.configurations["shaded"])
archiveClassifier.set("shaded")
setVersion(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")
finalizedBy(installAddons)
}
configure<BasePluginExtension> {
@@ -141,4 +145,6 @@ fun downloadPack(packUrl: URL, project: Project) {
val file = File("${project.buildDir}/resources/main/packs/${fileName}")
file.parentFile.mkdirs()
file.outputStream().write(packUrl.readBytes())
}
}
fun Project.getJarTask() = tasks.named("shadowJar").get() as ShadowJar
@@ -1,5 +1,3 @@
package com.dfsek.terra
import org.gradle.api.Project
import org.gradle.api.publish.PublishingExtension
import org.gradle.api.publish.maven.MavenPublication
@@ -13,8 +11,7 @@ fun Project.configurePublishing() {
configure<PublishingExtension> {
publications {
create<MavenPublication>("mavenJava") {
artifact(tasks["sourcesJar"])
artifact(tasks["jar"])
from(components["java"])
}
}
+56
View File
@@ -0,0 +1,56 @@
import java.io.ByteArrayOutputStream
import org.gradle.api.Action
import org.gradle.api.Project
var isPrerelease = false
fun Project.getGitHash(): String {
val stdout = ByteArrayOutputStream()
exec {
commandLine = mutableListOf("git", "rev-parse", "--short", "HEAD")
standardOutput = stdout
}
return stdout.toString().trim()
}
fun Project.gitClone(name: String) {
val stdout = ByteArrayOutputStream()
exec {
commandLine = mutableListOf("git", "clone", name)
standardOutput = stdout
}
}
fun Project.forSubProjects(project: String, action: Action<Project>) {
project(project).subprojects.forEach {
action.execute(it)
}
}
fun Project.forImmediateSubProjects(project: String, action: Action<Project>) {
project(project).childProjects.forEach {
action.execute(it.value)
}
}
fun preRelease(preRelease: Boolean) {
isPrerelease = preRelease
}
fun Project.versionProjects(project: String, version: String) {
forSubProjects(project) {
this.version = version
println("Setting version of $path to $version")
}
project(project).version = version
println("Setting version of $project to $version")
}
fun Project.version(version: String): String {
return if (!isPrerelease)
version
else //Only use git hash if it's a prerelease.
"$version-BETA+${getGitHash()}"
}
+40
View File
@@ -0,0 +1,40 @@
object Versions {
object Libraries {
const val tectonic = "4.2.0"
const val paralithic = "0.7.0"
const val strata = "1.1.1"
const val cloud = "1.7.0-SNAPSHOT"
const val slf4j = "1.7.36"
const val log4j_slf4j_impl = "2.14.1"
object Internal {
const val apacheText = "1.9"
const val jafama = "2.3.2"
const val apacheIO = "2.6"
const val fastutil = "8.5.6"
}
}
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"
}
object Bukkit {
const val paper = "1.18-R0.1-SNAPSHOT"
const val paperLib = "1.0.5"
}
object Sponge {
const val sponge = "9.0.0-SNAPSHOT"
const val mixin = "0.8.2"
const val minecraft = "1.17.1"
}
}
@@ -1,41 +0,0 @@
package com.dfsek.terra
import java.io.File
import java.util.function.Predicate
import org.gradle.api.Project
import org.gradle.api.Task
import org.gradle.jvm.tasks.Jar
import kotlin.streams.asStream
/**
* Configures a directory where addons will be put.
*/
fun Project.addonDir(dir: File, task: Task) {
task.doFirst {
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()
}
project(":common:addons").subprojects.forEach { addonProject ->
val jar = (addonProject.tasks.named("jar").get() as Jar)
val target = File(dir, jar.archiveFileName.get())
val base = "${jar.archiveBaseName.get()}-${project.version}"
println("Copying addon ${jar.archiveFileName.get()} to ${target.absolutePath}. Base name: $base")
jar.archiveFile.orNull?.asFile?.copyTo(target)
}
}
}
fun matchingAddons(dir: File, matcher: Predicate<File>): Set<File> {
val matching = HashSet<File>()
dir.walk().maxDepth(1).asStream().filter(matcher).forEach(matching::add)
return matching
}
@@ -1,21 +0,0 @@
package com.dfsek.terra
import java.io.ByteArrayOutputStream
import org.gradle.api.Project
fun Project.getGitHash(): String {
val stdout = ByteArrayOutputStream()
exec {
commandLine = mutableListOf("git", "rev-parse", "--short", "HEAD")
standardOutput = stdout
}
return stdout.toString().trim()
}
fun Project.gitClone(name: String) {
val stdout = ByteArrayOutputStream()
exec {
commandLine = mutableListOf("git", "clone", name)
standardOutput = stdout
}
}
@@ -1,48 +0,0 @@
package com.dfsek.terra
import org.gradle.api.Project
import org.gradle.kotlin.dsl.apply
import org.gradle.kotlin.dsl.dependencies
import org.gradle.kotlin.dsl.invoke
import org.gradle.kotlin.dsl.project
import org.gradle.kotlin.dsl.repositories
fun Project.configureDependencies() {
apply(plugin = "java")
apply(plugin = "java-library")
configurations {
val shaded = create("shaded")
val shadedApi = create("shadedApi")
shaded.extendsFrom(shadedApi)
getByName("api").extendsFrom(shadedApi)
val shadedImplementation = create("shadedImplementation")
shaded.extendsFrom(shadedImplementation)
getByName("implementation").extendsFrom(shadedImplementation)
}
repositories {
maven { url = uri("https://maven.enginehub.org/repo/") }
maven { url = uri("https://repo.codemc.org/repository/maven-public") }
maven { url = uri("https://papermc.io/repo/repository/maven-public/") }
maven { url = uri("https://maven.fabricmc.net/") }
gradlePluginPortal()
mavenCentral()
}
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:20.1.0")
"compileOnly"("com.google.guava:guava:30.0-jre")
"testImplementation"("com.google.guava:guava:30.0-jre")
}
if (project(":common:addons").subprojects.contains(this)) { // If this is an addon project, depend on the API.
dependencies {
"compileOnly"(project(":common:api"))
"testImplementation"(project(":common:api"))
}
}
}
@@ -0,0 +1,20 @@
package com.dfsek.terra.tectonicdoc
class DocumentedTemplate(private val name: String) {
private val template = HashMap<String, String>()
fun add(name: String, content: String) {
template[name] = content
}
fun format(): String {
val builder = StringBuilder("# ").append(name).append("\n\n")
template.forEach { name, content ->
builder
.append("### $name\n\n")
.append(content)
.append("\n\n")
}
return builder.toString()
}
}
@@ -0,0 +1,150 @@
package com.dfsek.terra.tectonicdoc
import com.dfsek.tectonic.api.config.template.annotations.Description
import com.dfsek.tectonic.api.config.template.annotations.Final
import com.dfsek.tectonic.api.config.template.annotations.Value
import java.io.File
import java.io.FileInputStream
import java.io.InputStream
import org.gradle.api.DefaultTask
import org.gradle.api.plugins.JavaPluginExtension
import org.gradle.api.tasks.TaskAction
import org.objectweb.asm.ClassReader
import org.objectweb.asm.tree.ClassNode
import org.objectweb.asm.tree.FieldNode
abstract class GenerateDocsTask : DefaultTask() {
@TaskAction
fun generateDocs() {
project.extensions.getByType(JavaPluginExtension::class.java).sourceSets.forEach { sources ->
val classes = HashMap<String, ClassNode>()
sources.java.classesDirectory.get().asFileTree.forEach { file ->
if (file.name.endsWith(".class")) {
val node = createClassNode(FileInputStream(file))
if (node.fields.stream().anyMatch { field ->
field.visibleAnnotations?.stream()?.anyMatch {
it.desc.equals(descriptor(Value::class.java.canonicalName))
} == true
}) {
var name = sources
.java
.classesDirectory
.get()
.asFile
.toPath()
.relativize(file.toPath())
.toString()
.substringBeforeLast('.')
if (name.endsWith("Template")) {
name = name.substringBeforeLast("Template")
}
classes[name] = node
}
}
}
val docsDir = File(project.buildDir, "tectonic")
docsDir.mkdirs()
classes.forEach { (name, clazz) ->
val template = DocumentedTemplate(name.substringAfterLast('/'))
clazz.fields
.stream()
.filter { field ->
field.visibleAnnotations?.stream()?.anyMatch {
it.desc.equals(descriptor(Value::class.java.canonicalName))
} == true
}.forEach { field ->
val annotations = field.visibleAnnotations
val description = StringBuilder()
annotations.stream().filter {
it.desc.equals(descriptor(Description::class.java.canonicalName))
}.forEach {
description.append(it.values[1])
}
val keyName = StringBuilder()
if (annotations.stream().anyMatch { it.desc.equals(descriptor(Final::class.java.canonicalName)) }) {
keyName.append("final ")
}
keyName.append(getType(field))
.append(" ")
annotations.stream().filter {
it.desc.equals(descriptor(Value::class.java.canonicalName))
}.forEach {
keyName.append(it.values[1])
}
template.add(keyName.toString(), description.toString().ifBlank {
println("No description provided for field " + field.name + " in class " + name)
"*No description provided.*"
})
}
val save = File(docsDir, "$name.md")
if (save.exists()) save.delete()
save.parentFile.mkdirs()
save.createNewFile()
save.writeText(template.format())
}
}
}
private fun getType(node: FieldNode): String {
if (node.signature != null) {
return generic(node.signature)
}
return descriptorToHumanReadable(node.desc).substringAfterLast('.')
}
private fun generic(type: String): String {
val clean = descriptorToHumanReadable(type)
if (clean.contains('<')) {
val typeIndex = clean.indexOf('<')
return clean.substring(0, typeIndex + 1).substringAfterLast('.') + generic(clean.substring(typeIndex + 1)) + "\\>"
}
return clean.substringAfterLast('.')
}
private fun createClassNode(input: InputStream): ClassNode {
val reader = ClassReader(input)
val node = ClassNode()
try {
reader.accept(node, ClassReader.EXPAND_FRAMES)
} catch (e: Exception) {
reader.accept(node, ClassReader.SKIP_FRAMES or ClassReader.SKIP_DEBUG)
}
return node
}
private fun descriptorToHumanReadable(descriptor: String): String {
if (descriptor.startsWith('L')) {
return descriptor.substring(1).substringBeforeLast(';').replace('/', '.')
}
if (descriptor.startsWith("[")) {
return "${descriptorToHumanReadable(descriptor.substring(1))}[]"
}
return when (descriptor) {
"B" -> "byte"
"C" -> "char"
"I" -> "int"
"D" -> "double"
"F" -> "float"
"J" -> "long"
"S" -> "short"
"Z" -> "boolean"
else -> descriptor
}
}
private fun descriptor(name: String): String = "L${name.replace('.', '/')};"
}
@@ -0,0 +1,10 @@
package com.dfsek.terra.tectonicdoc
import org.gradle.api.Plugin
import org.gradle.api.Project
class TectonicDocPlugin : Plugin<Project> {
override fun apply(project: Project) {
project.tasks.create("generateDocs", GenerateDocsTask::class.java)
}
}
+21
View File
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2020-2021 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
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+3
View File
@@ -0,0 +1,3 @@
# api addon loader
Loads dependencies as addons
@@ -0,0 +1,12 @@
version = version("0.1.0")
dependencies {
}
tasks.withType<Jar> {
manifest {
attributes("Terra-Bootstrap-Addon-Entry-Point" to "com.dfsek.terra.addon.loader.ApiAddonLoader")
}
}
project.extra.set("bootstrap", true)
@@ -0,0 +1,26 @@
package com.dfsek.terra.addon.loader;
import ca.solostudios.strata.version.Version;
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() {
return version;
}
@Override
public String getID() {
return id;
}
}
@@ -0,0 +1,22 @@
/*
* Copyright (c) 2020-2021 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.
*/
package com.dfsek.terra.addon.loader;
import java.net.URL;
import java.net.URLClassLoader;
public class ApiAddonClassLoader extends URLClassLoader {
static {
ClassLoader.registerAsParallelCapable();
}
public ApiAddonClassLoader(URL[] urls, ClassLoader parent) {
super(urls, parent);
}
}
@@ -0,0 +1,39 @@
/*
* Copyright (c) 2020-2021 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.
*/
package com.dfsek.terra.addon.loader;
import ca.solostudios.strata.Versions;
import ca.solostudios.strata.version.Version;
import java.nio.file.Path;
import java.util.Collections;
import com.dfsek.terra.api.addon.BaseAddon;
import com.dfsek.terra.api.addon.bootstrap.BootstrapAddonClassLoader;
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() {
return VERSION;
}
}
-10
View File
@@ -1,10 +0,0 @@
# api-features
Contains the API for feature generation.
This API implemented in:
* `config-feature`
* `generation-stage-feature`
* `config-locators`
* `config-distributors`
@@ -1,2 +0,0 @@
dependencies {
}
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2020-2021 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
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
@@ -1,2 +1,11 @@
version = version("1.0.0")
dependencies {
compileOnlyApi(project(":common:addons:manifest-addon-loader"))
implementation("net.jafama", "jafama", Versions.Libraries.Internal.jafama)
testImplementation("net.jafama", "jafama", Versions.Libraries.Internal.jafama)
}
tasks.named<com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar>("shadowJar") {
relocate("net.jafama", "com.dfsek.terra.addons.biome.image.lib.jafama")
}
@@ -1,3 +1,10 @@
/*
* Copyright (c) 2020-2021 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.
*/
package com.dfsek.terra.addons.biome.image;
import net.jafama.FastMath;
@@ -8,17 +15,17 @@ import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import com.dfsek.terra.api.world.biome.TerraBiome;
import com.dfsek.terra.api.world.biome.Biome;
import com.dfsek.terra.api.world.biome.generation.BiomeProvider;
public class ImageBiomeProvider implements BiomeProvider {
private final Map<Color, TerraBiome> colorBiomeMap = new HashMap<>();
private final Map<Color, Biome> colorBiomeMap = new HashMap<>();
private final BufferedImage image;
private final int resolution;
private final Align align;
public ImageBiomeProvider(Set<TerraBiome> registry, BufferedImage image, int resolution, Align align) {
public ImageBiomeProvider(Set<Biome> registry, BufferedImage image, int resolution, Align align) {
this.image = image;
this.resolution = resolution;
this.align = align;
@@ -30,7 +37,7 @@ public class ImageBiomeProvider implements BiomeProvider {
}
@Override
public TerraBiome getBiome(int x, int z, long seed) {
public Biome getBiome(int x, int y, int z, long seed) {
x /= resolution;
z /= resolution;
Color color = align.getColor(image, x, z);
@@ -44,6 +51,11 @@ public class ImageBiomeProvider implements BiomeProvider {
}));
}
@Override
public Iterable<Biome> getBiomes() {
return colorBiomeMap.values();
}
public enum Align {
CENTER {
@Override
@@ -1,43 +1,49 @@
/*
* Copyright (c) 2020-2021 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.
*/
package com.dfsek.terra.addons.biome.image;
import com.dfsek.tectonic.loading.object.ObjectTemplate;
import com.dfsek.tectonic.api.config.template.object.ObjectTemplate;
import java.util.function.Supplier;
import com.dfsek.terra.api.TerraPlugin;
import com.dfsek.terra.api.addon.TerraAddon;
import com.dfsek.terra.api.addon.annotations.Addon;
import com.dfsek.terra.api.addon.annotations.Author;
import com.dfsek.terra.api.addon.annotations.Version;
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.ConfigPackPreLoadEvent;
import com.dfsek.terra.api.event.functional.FunctionalEventHandler;
import com.dfsek.terra.api.injection.annotations.Inject;
import com.dfsek.terra.api.inject.annotations.Inject;
import com.dfsek.terra.api.registry.CheckedRegistry;
import com.dfsek.terra.api.util.reflection.TypeKey;
import com.dfsek.terra.api.world.biome.TerraBiome;
import com.dfsek.terra.api.world.biome.Biome;
import com.dfsek.terra.api.world.biome.generation.BiomeProvider;
@Addon("biome-provider-image")
@Author("Terra")
@Version("1.0.0")
public class ImageBiomeProviderAddon extends TerraAddon {
public class ImageBiomeProviderAddon implements AddonInitializer {
public static final TypeKey<Supplier<ObjectTemplate<BiomeProvider>>> PROVIDER_REGISTRY_KEY = new TypeKey<>() {
};
@Inject
private TerraPlugin main;
private Platform platform;
@Inject
private BaseAddon addon;
@Override
public void initialize() {
main.getEventManager()
.getHandler(FunctionalEventHandler.class)
.register(this, ConfigPackPreLoadEvent.class)
.then(event -> {
CheckedRegistry<Supplier<ObjectTemplate<BiomeProvider>>> providerRegistry = event.getPack().getOrCreateRegistry(
PROVIDER_REGISTRY_KEY);
providerRegistry.register("IMAGE", () -> new ImageProviderTemplate(event.getPack().getRegistry(TerraBiome.class)));
})
.failThrough();
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("IMAGE"),
() -> new ImageProviderTemplate(event.getPack().getRegistry(Biome.class)));
})
.failThrough();
}
}
@@ -1,28 +1,40 @@
/*
* Copyright (c) 2020-2021 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.
*/
package com.dfsek.terra.addons.biome.image;
import com.dfsek.tectonic.annotations.Default;
import com.dfsek.tectonic.annotations.Value;
import com.dfsek.tectonic.loading.object.ObjectTemplate;
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.tectonic.api.config.template.object.ObjectTemplate;
import java.awt.image.BufferedImage;
import java.util.HashSet;
import com.dfsek.terra.api.registry.Registry;
import com.dfsek.terra.api.world.biome.TerraBiome;
import com.dfsek.terra.api.world.biome.Biome;
import com.dfsek.terra.api.world.biome.generation.BiomeProvider;
@SuppressWarnings("FieldMayBeFinal")
public class ImageProviderTemplate implements ObjectTemplate<BiomeProvider> {
private final Registry<TerraBiome> biomes;
private final Registry<Biome> biomes;
@Value("resolution")
@Default
private final int resolution = 1;
@Description("Sets the resolution at which to sample the image.")
private int resolution = 1;
@Value("image.name")
@Description("Sets the location of the image on the filesystem, relative to the pack root.")
private BufferedImage image;
@Value("image.align")
@Description("Sets the alignment style to use for the image.")
private ImageBiomeProvider.Align align;
public ImageProviderTemplate(Registry<TerraBiome> set) {
public ImageProviderTemplate(Registry<Biome> set) {
this.biomes = set;
}
@@ -0,0 +1,12 @@
schema-version: 1
contributors:
- Terra contributors
id: biome-provider-image
version: @VERSION@
entrypoints:
- "com.dfsek.terra.addons.biome.image.ImageBiomeProviderAddon"
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,21 @@
MIT License
Copyright (c) 2020-2021 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
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
@@ -1,2 +1,14 @@
version = version("1.0.0")
dependencies {
compileOnlyApi(project(":common:addons:manifest-addon-loader"))
implementation("com.github.ben-manes.caffeine:caffeine:3.1.0")
implementation("net.jafama", "jafama", Versions.Libraries.Internal.jafama)
testImplementation("net.jafama", "jafama", Versions.Libraries.Internal.jafama)
}
tasks.named<com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar>("shadowJar") {
relocate("com.github.benmanes.caffeine", "com.dfsek.terra.addons.biome.pipeline.lib.caffeine")
relocate("net.jafama", "com.dfsek.terra.addons.biome.pipeline.lib.jafama")
}
@@ -1,28 +1,35 @@
/*
* Copyright (c) 2020-2021 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.
*/
package com.dfsek.terra.addons.biome.pipeline;
import com.dfsek.terra.addons.biome.pipeline.api.BiomeExpander;
import com.dfsek.terra.addons.biome.pipeline.api.BiomeHolder;
import com.dfsek.terra.addons.biome.pipeline.api.BiomeMutator;
import com.dfsek.terra.addons.biome.pipeline.api.delegate.BiomeDelegate;
import com.dfsek.terra.addons.biome.pipeline.api.stage.type.BiomeExpander;
import com.dfsek.terra.addons.biome.pipeline.api.stage.type.BiomeMutator;
import com.dfsek.terra.addons.biome.pipeline.source.BiomeSource;
import com.dfsek.terra.api.vector.Vector2;
import com.dfsek.terra.api.world.biome.TerraBiome;
import com.dfsek.terra.api.util.vector.Vector2;
public class BiomeHolderImpl implements BiomeHolder {
private final Vector2 origin;
private final Vector2.Mutable origin;
private final int width;
private final int offset;
private TerraBiome[][] biomes;
private BiomeDelegate[][] biomes;
public BiomeHolderImpl(int width, Vector2 origin) {
public BiomeHolderImpl(int width, Vector2.Mutable origin) {
width += 4;
this.width = width;
biomes = new TerraBiome[width][width];
biomes = new BiomeDelegate[width][width];
this.origin = origin;
this.offset = 2;
}
private BiomeHolderImpl(TerraBiome[][] biomes, Vector2 origin, int width, int offset) {
private BiomeHolderImpl(BiomeDelegate[][] biomes, Vector2.Mutable origin, int width, int offset) {
this.biomes = biomes;
this.origin = origin;
this.width = width;
@@ -31,10 +38,10 @@ public class BiomeHolderImpl implements BiomeHolder {
@Override
public BiomeHolder expand(BiomeExpander expander, long seed) {
TerraBiome[][] old = biomes;
BiomeDelegate[][] old = biomes;
int newWidth = width * 2 - 1;
biomes = new TerraBiome[newWidth][newWidth];
biomes = new BiomeDelegate[newWidth][newWidth];
for(int x = 0; x < width; x++) {
for(int z = 0; z < width; z++) {
@@ -73,14 +80,14 @@ public class BiomeHolderImpl implements BiomeHolder {
}
@Override
public TerraBiome getBiome(int x, int z) {
public BiomeDelegate getBiome(int x, int z) {
x += offset;
z += offset;
return getBiomeRaw(x, z);
}
@Override
public TerraBiome getBiomeRaw(int x, int z) {
public BiomeDelegate getBiomeRaw(int x, int z) {
if(x >= width || z >= width || x < 0 || z < 0) return null;
return biomes[x][z];
}
@@ -1,12 +1,20 @@
/*
* Copyright (c) 2020-2021 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.
*/
package com.dfsek.terra.addons.biome.pipeline;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import com.dfsek.terra.addons.biome.pipeline.api.BiomeHolder;
import com.dfsek.terra.addons.biome.pipeline.api.Stage;
import com.dfsek.terra.addons.biome.pipeline.api.stage.Stage;
import com.dfsek.terra.addons.biome.pipeline.source.BiomeSource;
import com.dfsek.terra.api.vector.Vector2;
import com.dfsek.terra.api.util.vector.Vector2;
public class BiomePipeline {
@@ -31,19 +39,27 @@ public class BiomePipeline {
* @return BiomeHolder containing biomes.
*/
public BiomeHolder getBiomes(int x, int z, long seed) {
BiomeHolder holder = new BiomeHolderImpl(init, new Vector2(x * (init - 1), z * (init - 1)));
BiomeHolder holder = new BiomeHolderImpl(init, Vector2.of(x * (init - 1), z * (init - 1)).mutable());
holder.fill(source, seed);
for(Stage stage : stages) holder = stage.apply(holder, seed);
return holder;
}
public BiomeSource getSource() {
return source;
}
public List<Stage> getStages() {
return Collections.unmodifiableList(stages);
}
public int getSize() {
return size;
}
public static final class BiomePipelineBuilder {
private final int init;
List<Stage> stages = new ArrayList<>();
private final List<Stage> stages = new ArrayList<>();
private int expand;
public BiomePipelineBuilder(int init) {
@@ -1,12 +1,21 @@
/*
* Copyright (c) 2020-2021 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.
*/
package com.dfsek.terra.addons.biome.pipeline;
import com.dfsek.tectonic.loading.object.ObjectTemplate;
import com.dfsek.tectonic.api.config.template.object.ObjectTemplate;
import java.util.function.Supplier;
import com.dfsek.terra.addons.biome.pipeline.api.Stage;
import com.dfsek.terra.addons.biome.pipeline.api.delegate.BiomeDelegate;
import com.dfsek.terra.addons.biome.pipeline.api.stage.Stage;
import com.dfsek.terra.addons.biome.pipeline.config.BiomeDelegateLoader;
import com.dfsek.terra.addons.biome.pipeline.config.BiomePipelineTemplate;
import com.dfsek.terra.addons.biome.pipeline.config.NoiseSourceTemplate;
import com.dfsek.terra.addons.biome.pipeline.config.SamplerSourceTemplate;
import com.dfsek.terra.addons.biome.pipeline.config.stage.expander.ExpanderStageTemplate;
import com.dfsek.terra.addons.biome.pipeline.config.stage.mutator.BorderListMutatorTemplate;
import com.dfsek.terra.addons.biome.pipeline.config.stage.mutator.BorderMutatorTemplate;
@@ -14,23 +23,21 @@ import com.dfsek.terra.addons.biome.pipeline.config.stage.mutator.ReplaceListMut
import com.dfsek.terra.addons.biome.pipeline.config.stage.mutator.ReplaceMutatorTemplate;
import com.dfsek.terra.addons.biome.pipeline.config.stage.mutator.SmoothMutatorTemplate;
import com.dfsek.terra.addons.biome.pipeline.source.BiomeSource;
import com.dfsek.terra.api.TerraPlugin;
import com.dfsek.terra.api.addon.TerraAddon;
import com.dfsek.terra.api.addon.annotations.Addon;
import com.dfsek.terra.api.addon.annotations.Author;
import com.dfsek.terra.api.addon.annotations.Version;
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.injection.annotations.Inject;
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;
@Addon("biome-provider-pipeline")
@Author("Terra")
@Version("1.0.0")
public class BiomePipelineAddon extends TerraAddon {
public class BiomePipelineAddon implements AddonInitializer {
public static final TypeKey<Supplier<ObjectTemplate<BiomeSource>>> SOURCE_REGISTRY_KEY = new TypeKey<>() {
};
@@ -40,32 +47,43 @@ public class BiomePipelineAddon extends TerraAddon {
public static final TypeKey<Supplier<ObjectTemplate<BiomeProvider>>> PROVIDER_REGISTRY_KEY = new TypeKey<>() {
};
@Inject
private TerraPlugin main;
private Platform platform;
@Inject
private BaseAddon addon;
@Override
public void initialize() {
main.getEventManager()
.getHandler(FunctionalEventHandler.class)
.register(this, ConfigPackPreLoadEvent.class)
.then(event -> {
CheckedRegistry<Supplier<ObjectTemplate<BiomeProvider>>> providerRegistry = event.getPack().getOrCreateRegistry(
PROVIDER_REGISTRY_KEY);
providerRegistry.register("PIPELINE", () -> new BiomePipelineTemplate(main));
})
.then(event -> {
CheckedRegistry<Supplier<ObjectTemplate<BiomeSource>>> sourceRegistry = event.getPack().getOrCreateRegistry(
SOURCE_REGISTRY_KEY);
sourceRegistry.register("NOISE", NoiseSourceTemplate::new);
})
.then(event -> {
CheckedRegistry<Supplier<ObjectTemplate<Stage>>> stageRegistry = event.getPack().getOrCreateRegistry(STAGE_REGISTRY_KEY);
stageRegistry.register("FRACTAL_EXPAND", ExpanderStageTemplate::new);
stageRegistry.register("SMOOTH", SmoothMutatorTemplate::new);
stageRegistry.register("REPLACE", ReplaceMutatorTemplate::new);
stageRegistry.register("REPLACE_LIST", ReplaceListMutatorTemplate::new);
stageRegistry.register("BORDER", BorderMutatorTemplate::new);
stageRegistry.register("BORDER_LIST", BorderListMutatorTemplate::new);
})
.failThrough();
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("PIPELINE"), BiomePipelineTemplate::new);
})
.then(event -> {
CheckedRegistry<Supplier<ObjectTemplate<BiomeSource>>> sourceRegistry = event.getPack().getOrCreateRegistry(
SOURCE_REGISTRY_KEY);
sourceRegistry.register(addon.key("SAMPLER"), SamplerSourceTemplate::new);
})
.then(event -> {
CheckedRegistry<Supplier<ObjectTemplate<Stage>>> stageRegistry = event.getPack().getOrCreateRegistry(
STAGE_REGISTRY_KEY);
stageRegistry.register(addon.key("FRACTAL_EXPAND"), ExpanderStageTemplate::new);
stageRegistry.register(addon.key("SMOOTH"), SmoothMutatorTemplate::new);
stageRegistry.register(addon.key("REPLACE"), ReplaceMutatorTemplate::new);
stageRegistry.register(addon.key("REPLACE_LIST"), ReplaceListMutatorTemplate::new);
stageRegistry.register(addon.key("BORDER"), BorderMutatorTemplate::new);
stageRegistry.register(addon.key("BORDER_LIST"), BorderListMutatorTemplate::new);
})
.failThrough();
platform.getEventManager()
.getHandler(FunctionalEventHandler.class)
.register(addon, ConfigPackPostLoadEvent.class)
.then(event -> {
Registry<Biome> biomeRegistry = event.getPack().getRegistry(Biome.class);
event.getPack().applyLoader(BiomeDelegate.class, new BiomeDelegateLoader(biomeRegistry));
});
}
}
@@ -1,15 +1,27 @@
/*
* Copyright (c) 2020-2021 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.
*/
package com.dfsek.terra.addons.biome.pipeline;
import com.google.common.cache.CacheBuilder;
import com.google.common.cache.CacheLoader;
import com.google.common.cache.LoadingCache;
import com.github.benmanes.caffeine.cache.Caffeine;
import com.github.benmanes.caffeine.cache.LoadingCache;
import net.jafama.FastMath;
import org.jetbrains.annotations.NotNull;
import java.util.Comparator;
import java.util.HashSet;
import java.util.Set;
import java.util.stream.StreamSupport;
import com.dfsek.terra.addons.biome.pipeline.api.BiomeHolder;
import com.dfsek.terra.api.TerraPlugin;
import com.dfsek.terra.addons.biome.pipeline.api.delegate.BiomeDelegate;
import com.dfsek.terra.addons.biome.pipeline.api.stage.Stage;
import com.dfsek.terra.api.noise.NoiseSampler;
import com.dfsek.terra.api.world.biome.TerraBiome;
import com.dfsek.terra.api.registry.key.StringIdentifiable;
import com.dfsek.terra.api.world.biome.Biome;
import com.dfsek.terra.api.world.biome.generation.BiomeProvider;
@@ -20,27 +32,49 @@ public class BiomePipelineProvider implements BiomeProvider {
private final NoiseSampler mutator;
private final double noiseAmp;
public BiomePipelineProvider(BiomePipeline pipeline, TerraPlugin main, int resolution, NoiseSampler mutator, double noiseAmp) {
private final Set<Biome> biomes;
public BiomePipelineProvider(BiomePipeline pipeline, int resolution, NoiseSampler mutator, double noiseAmp) {
this.resolution = resolution;
this.mutator = mutator;
this.noiseAmp = noiseAmp;
holderCache = CacheBuilder.newBuilder()
.maximumSize(main == null ? 32 : main.getTerraConfig().getProviderCache())
.build(
new CacheLoader<SeededVector, BiomeHolder>() {
@Override
public BiomeHolder load(@NotNull SeededVector key) {
return pipeline.getBiomes(key.x, key.z, key.seed);
}
}
);
holderCache = Caffeine.newBuilder()
.maximumSize(1024)
.build(key -> pipeline.getBiomes(key.x, key.z, key.seed));
this.pipeline = pipeline;
Set<BiomeDelegate> biomeSet = new HashSet<>();
pipeline.getSource().getBiomes().forEach(biomeSet::add);
Iterable<BiomeDelegate> result = biomeSet;
for(Stage stage : pipeline.getStages()) {
result = stage.getBiomes(result); // pass through all stages
}
this.biomes = new HashSet<>();
Iterable<BiomeDelegate> finalResult = result;
result.forEach(biomeDelegate -> {
if(biomeDelegate.isEphemeral()) {
StringBuilder biomeList = new StringBuilder("\n");
StreamSupport.stream(finalResult.spliterator(), false)
.sorted(Comparator.comparing(StringIdentifiable::getID))
.forEach(delegate -> biomeList
.append(" - ")
.append(delegate.getID())
.append(':')
.append(delegate.getClass().getCanonicalName())
.append('\n'));
throw new IllegalArgumentException("Biome Pipeline leaks ephemeral biome \"" + biomeDelegate.getID() +
"\". Ensure there is a stage to guarantee replacement of the ephemeral biome. Biomes: " +
biomeList);
}
this.biomes.add(biomeDelegate.getBiome());
});
}
@Override
public TerraBiome getBiome(int x, int z, long seed) {
x += mutator.getNoiseSeeded(seed + 1, x, z) * noiseAmp;
z += mutator.getNoiseSeeded(seed + 2, x, z) * noiseAmp;
public Biome getBiome(int x, int y, int z, long seed) {
x += mutator.noise(seed + 1, x, z) * noiseAmp;
z += mutator.noise(seed + 2, x, z) * noiseAmp;
x = FastMath.floorToInt(FastMath.floorDiv(x, resolution));
@@ -49,36 +83,15 @@ public class BiomePipelineProvider implements BiomeProvider {
int fdX = FastMath.floorDiv(x, pipeline.getSize());
int fdZ = FastMath.floorDiv(z, pipeline.getSize());
return holderCache.getUnchecked(new SeededVector(fdX, fdZ, seed)).getBiome(x - fdX * pipeline.getSize(),
z - fdZ * pipeline.getSize());
return holderCache.get(new SeededVector(fdX, fdZ, seed)).getBiome(x - fdX * pipeline.getSize(),
z - fdZ * pipeline.getSize()).getBiome();
}
private static final class SeededVector {
private final int x;
private final int z;
private final long seed;
private SeededVector(int x, int z, long seed) {
this.x = x;
this.z = z;
this.seed = seed;
}
@Override
public int hashCode() {
int result = 0;
result = 31 * result + ((int) (seed ^ (seed >>> 32)));
result = 31 * result + x;
result = 31 * result + z;
return result;
}
@Override
public boolean equals(Object obj) {
if(!(obj instanceof SeededVector)) return false;
SeededVector that = (SeededVector) obj;
return this.seed == that.seed && this.x == that.x && this.z == that.z;
}
@Override
public Iterable<Biome> getBiomes() {
return biomes;
}
private record SeededVector(int x, int z, long seed) {
}
}
@@ -1,8 +0,0 @@
package com.dfsek.terra.addons.biome.pipeline.api;
import com.dfsek.terra.api.world.biome.TerraBiome;
public interface BiomeExpander {
TerraBiome getBetween(double x, double z, long seed, TerraBiome... others);
}
@@ -1,7 +1,16 @@
/*
* Copyright (c) 2020-2021 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.
*/
package com.dfsek.terra.addons.biome.pipeline.api;
import com.dfsek.terra.addons.biome.pipeline.api.delegate.BiomeDelegate;
import com.dfsek.terra.addons.biome.pipeline.api.stage.type.BiomeExpander;
import com.dfsek.terra.addons.biome.pipeline.api.stage.type.BiomeMutator;
import com.dfsek.terra.addons.biome.pipeline.source.BiomeSource;
import com.dfsek.terra.api.world.biome.TerraBiome;
public interface BiomeHolder {
@@ -11,7 +20,7 @@ public interface BiomeHolder {
void fill(BiomeSource source, long seed);
TerraBiome getBiome(int x, int z);
BiomeDelegate getBiome(int x, int z);
TerraBiome getBiomeRaw(int x, int z);
BiomeDelegate getBiomeRaw(int x, int z);
}
@@ -1,25 +0,0 @@
package com.dfsek.terra.addons.biome.pipeline.api;
import com.dfsek.terra.api.world.biome.TerraBiome;
public interface BiomeMutator {
TerraBiome mutate(ViewPoint viewPoint, double x, double z, long seed);
class ViewPoint {
private final BiomeHolder biomes;
private final int offX;
private final int offZ;
public ViewPoint(BiomeHolder biomes, int offX, int offZ) {
this.biomes = biomes;
this.offX = offX;
this.offZ = offZ;
}
public TerraBiome getBiome(int x, int z) {
return biomes.getBiomeRaw(x + offX, z + offZ);
}
}
}
@@ -1,8 +0,0 @@
package com.dfsek.terra.addons.biome.pipeline.api;
public interface Stage {
BiomeHolder apply(BiomeHolder in, long seed);
boolean isExpansion();
}
@@ -0,0 +1,35 @@
package com.dfsek.terra.addons.biome.pipeline.api.delegate;
import java.util.Set;
import com.dfsek.terra.api.registry.key.StringIdentifiable;
import com.dfsek.terra.api.world.biome.Biome;
public interface BiomeDelegate extends StringIdentifiable {
static BiomeDelegate ephemeral(String id) {
return new EphemeralBiomeDelegate(id);
}
static BiomeDelegate from(Biome biome) {
return new DelegatedBiome(biome);
}
static BiomeDelegate self() {
return SelfDelegate.INSTANCE;
}
Biome getBiome();
Set<String> getTags();
default boolean isEphemeral() {
return false;
}
default boolean isSelf() {
return false;
}
}
@@ -0,0 +1,40 @@
package com.dfsek.terra.addons.biome.pipeline.api.delegate;
import java.util.Set;
import com.dfsek.terra.api.world.biome.Biome;
final class DelegatedBiome implements BiomeDelegate {
private final Biome biome;
public DelegatedBiome(Biome biome) {
this.biome = biome;
}
@Override
public Biome getBiome() {
return biome;
}
@Override
public int hashCode() {
return biome.hashCode();
}
@Override
public boolean equals(Object obj) {
if(!(obj instanceof DelegatedBiome that)) return false;
return that.biome.equals(this.biome);
}
@Override
public Set<String> getTags() {
return biome.getTags();
}
@Override
public String getID() {
return biome.getID();
}
}
@@ -0,0 +1,51 @@
package com.dfsek.terra.addons.biome.pipeline.api.delegate;
import java.util.HashSet;
import java.util.Set;
import com.dfsek.terra.api.world.biome.Biome;
final class EphemeralBiomeDelegate implements BiomeDelegate {
private final Set<String> tags;
private final String id;
public EphemeralBiomeDelegate(String id) {
this.id = id;
tags = new HashSet<>();
tags.add(id);
tags.add("ALL");
}
@Override
public Biome getBiome() {
throw new UnsupportedOperationException("Cannot get biome from ephemeral delegate");
}
@Override
public Set<String> getTags() {
return tags;
}
@Override
public String getID() {
return id;
}
@Override
public boolean isEphemeral() {
return true;
}
@Override
public int hashCode() {
return id.hashCode();
}
@Override
public boolean equals(Object obj) {
if(!(obj instanceof EphemeralBiomeDelegate that)) return false;
return this.id.equals(that.id);
}
}
@@ -0,0 +1,40 @@
package com.dfsek.terra.addons.biome.pipeline.api.delegate;
import java.util.Collections;
import java.util.Set;
import com.dfsek.terra.api.world.biome.Biome;
final class SelfDelegate implements BiomeDelegate {
public static final SelfDelegate INSTANCE = new SelfDelegate();
private SelfDelegate() {
}
@Override
public Biome getBiome() {
throw new UnsupportedOperationException("Cannot get biome from self delegate");
}
@Override
public boolean isSelf() {
return true;
}
@Override
public boolean isEphemeral() {
return true;
}
@Override
public Set<String> getTags() {
return Collections.emptySet();
}
@Override
public String getID() {
return "SELF";
}
}
@@ -0,0 +1,20 @@
/*
* Copyright (c) 2020-2021 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.
*/
package com.dfsek.terra.addons.biome.pipeline.api.stage;
import com.dfsek.terra.addons.biome.pipeline.api.BiomeHolder;
import com.dfsek.terra.addons.biome.pipeline.api.delegate.BiomeDelegate;
public interface Stage {
BiomeHolder apply(BiomeHolder in, long seed);
boolean isExpansion();
Iterable<BiomeDelegate> getBiomes(Iterable<BiomeDelegate> biomes);
}
@@ -0,0 +1,15 @@
/*
* Copyright (c) 2020-2021 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.
*/
package com.dfsek.terra.addons.biome.pipeline.api.stage.type;
import com.dfsek.terra.addons.biome.pipeline.api.delegate.BiomeDelegate;
public interface BiomeExpander {
BiomeDelegate getBetween(double x, double z, long seed, BiomeDelegate... others);
}
@@ -0,0 +1,37 @@
/*
* Copyright (c) 2020-2021 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.
*/
package com.dfsek.terra.addons.biome.pipeline.api.stage.type;
import com.dfsek.terra.addons.biome.pipeline.api.BiomeHolder;
import com.dfsek.terra.addons.biome.pipeline.api.delegate.BiomeDelegate;
public interface BiomeMutator {
BiomeDelegate mutate(ViewPoint viewPoint, double x, double z, long seed);
default Iterable<BiomeDelegate> getBiomes(Iterable<BiomeDelegate> biomes) {
return biomes;
}
class ViewPoint {
private final BiomeHolder biomes;
private final int offX;
private final int offZ;
public ViewPoint(BiomeHolder biomes, int offX, int offZ) {
this.biomes = biomes;
this.offX = offX;
this.offZ = offZ;
}
public BiomeDelegate getBiome(int x, int z) {
return biomes.getBiomeRaw(x + offX, z + offZ);
}
}
}
@@ -0,0 +1,32 @@
package com.dfsek.terra.addons.biome.pipeline.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.pipeline.api.delegate.BiomeDelegate;
import com.dfsek.terra.api.registry.Registry;
import com.dfsek.terra.api.world.biome.Biome;
public class BiomeDelegateLoader implements TypeLoader<BiomeDelegate> {
private final Registry<Biome> biomeRegistry;
public BiomeDelegateLoader(Registry<Biome> biomeRegistry) {
this.biomeRegistry = biomeRegistry;
}
@Override
public BiomeDelegate load(@NotNull AnnotatedType t, @NotNull Object c, @NotNull ConfigLoader loader, DepthTracker depthTracker)
throws LoadException {
if(c.equals("SELF")) return BiomeDelegate.self();
return biomeRegistry
.getByID((String) c)
.map(BiomeDelegate::from)
.orElseGet(() -> BiomeDelegate.ephemeral((String) c));
}
}
@@ -1,41 +1,54 @@
/*
* Copyright (c) 2020-2021 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.
*/
package com.dfsek.terra.addons.biome.pipeline.config;
import com.dfsek.tectonic.annotations.Default;
import com.dfsek.tectonic.annotations.Value;
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 java.util.List;
import com.dfsek.terra.addons.biome.pipeline.BiomePipeline;
import com.dfsek.terra.addons.biome.pipeline.BiomePipelineProvider;
import com.dfsek.terra.addons.biome.pipeline.api.Stage;
import com.dfsek.terra.addons.biome.pipeline.api.stage.Stage;
import com.dfsek.terra.addons.biome.pipeline.source.BiomeSource;
import com.dfsek.terra.api.TerraPlugin;
import com.dfsek.terra.api.config.meta.Meta;
import com.dfsek.terra.api.world.biome.generation.BiomeProvider;
@SuppressWarnings({ "FieldMayBeFinal", "unused" })
public class BiomePipelineTemplate extends BiomeProviderTemplate {
private final TerraPlugin main;
@Value("pipeline.initial-size")
@Default
@Description("""
The initial size of biome chunks. This value must be at least 2.
<b>This is not the final size of biome chunks. Final chunks will be much larger</b>.
It is recommended to keep biome chunks' final size in the range of [50, 300]
to prevent performance issues. To calculate the size of biome chunks, simply
take initial-size and for each expand stage, multiply the running value by 2
and subtract 1. (The size is also printed to the server console if you
have debug mode enabled)""")
private @Meta int initialSize = 2;
@Value("pipeline.stages")
private @Meta List<@Meta Stage> stages;
@Value("pipeline.source")
@Description("The Biome Source to use for initial population of biomes.")
private @Meta BiomeSource source;
public BiomePipelineTemplate(TerraPlugin main) {
this.main = main;
}
@Value("pipeline.stages")
@Description("A list of pipeline stages to apply to the result of #source")
private @Meta List<@Meta Stage> stages;
@Override
public BiomeProvider get() {
BiomePipeline.BiomePipelineBuilder biomePipelineBuilder = new BiomePipeline.BiomePipelineBuilder(initialSize);
stages.forEach(biomePipelineBuilder::addStage);
BiomePipeline pipeline = biomePipelineBuilder.build(source);
return new BiomePipelineProvider(pipeline, main, resolution, blend, blendAmp);
return new BiomePipelineProvider(pipeline, resolution, blend, blendAmp);
}
}
@@ -1,18 +0,0 @@
package com.dfsek.terra.addons.biome.pipeline.config;
import com.dfsek.tectonic.exception.LoadException;
import com.dfsek.tectonic.loading.ConfigLoader;
import com.dfsek.tectonic.loading.TypeLoader;
import java.lang.reflect.AnnotatedType;
import com.dfsek.terra.addons.biome.pipeline.BiomePipelineProvider;
import com.dfsek.terra.api.world.biome.generation.BiomeProvider;
public class BiomeProviderLoader implements TypeLoader<BiomeProvider> {
@Override
public BiomeProvider load(AnnotatedType t, Object c, ConfigLoader loader) throws LoadException {
return loader.loadType(BiomePipelineProvider.class, c); // TODO: actually implement this lol
}
}
@@ -1,8 +1,16 @@
/*
* Copyright (c) 2020-2021 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.
*/
package com.dfsek.terra.addons.biome.pipeline.config;
import com.dfsek.tectonic.annotations.Default;
import com.dfsek.tectonic.annotations.Value;
import com.dfsek.tectonic.loading.object.ObjectTemplate;
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.tectonic.api.config.template.object.ObjectTemplate;
import com.dfsek.terra.api.config.meta.Meta;
import com.dfsek.terra.api.noise.NoiseSampler;
@@ -12,11 +20,18 @@ import com.dfsek.terra.api.world.biome.generation.BiomeProvider;
public abstract class BiomeProviderTemplate implements ObjectTemplate<BiomeProvider> {
@Value("resolution")
@Default
@Description("""
The resolution at which to sample biomes.
Larger values are quadratically faster, but produce lower quality results.
For example, a value of 3 would sample every 3 blocks.""")
protected @Meta int resolution = 1;
@Value("blend.noise")
@Value("blend.sampler")
@Default
@Description("A sampler to use for blending the edges of biomes via domain warping.")
protected @Meta NoiseSampler blend = NoiseSampler.zero();
@Value("blend.amplitude")
@Default
@Description("The amplitude at which to perform blending.")
protected @Meta double blendAmp = 0d;
}
@@ -1,24 +0,0 @@
package com.dfsek.terra.addons.biome.pipeline.config;
import com.dfsek.tectonic.annotations.Value;
import com.dfsek.terra.addons.biome.pipeline.source.BiomeSource;
import com.dfsek.terra.addons.biome.pipeline.source.NoiseSource;
import com.dfsek.terra.api.config.meta.Meta;
import com.dfsek.terra.api.noise.NoiseSampler;
import com.dfsek.terra.api.util.collection.ProbabilityCollection;
import com.dfsek.terra.api.world.biome.TerraBiome;
public class NoiseSourceTemplate extends SourceTemplate {
@Value("noise")
private @Meta NoiseSampler noise;
@Value("biomes")
private @Meta ProbabilityCollection<@Meta TerraBiome> biomes;
@Override
public BiomeSource get() {
return new NoiseSource(biomes, noise);
}
}
@@ -0,0 +1,34 @@
/*
* Copyright (c) 2020-2021 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.
*/
package com.dfsek.terra.addons.biome.pipeline.config;
import com.dfsek.tectonic.api.config.template.annotations.Description;
import com.dfsek.tectonic.api.config.template.annotations.Value;
import com.dfsek.terra.addons.biome.pipeline.api.delegate.BiomeDelegate;
import com.dfsek.terra.addons.biome.pipeline.source.BiomeSource;
import com.dfsek.terra.addons.biome.pipeline.source.SamplerSource;
import com.dfsek.terra.api.config.meta.Meta;
import com.dfsek.terra.api.noise.NoiseSampler;
import com.dfsek.terra.api.util.collection.ProbabilityCollection;
public class SamplerSourceTemplate extends SourceTemplate {
@Value("sampler")
@Description("The sampler used to distribute biomes.")
private @Meta NoiseSampler noise;
@Value("biomes")
@Description("The biomes to be distributed.")
private @Meta ProbabilityCollection<@Meta BiomeDelegate> biomes;
@Override
public BiomeSource get() {
return new SamplerSource(biomes, noise);
}
}
@@ -1,6 +1,13 @@
/*
* Copyright (c) 2020-2021 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.
*/
package com.dfsek.terra.addons.biome.pipeline.config;
import com.dfsek.tectonic.loading.object.ObjectTemplate;
import com.dfsek.tectonic.api.config.template.object.ObjectTemplate;
import com.dfsek.terra.addons.biome.pipeline.source.BiomeSource;
@@ -1,14 +1,23 @@
/*
* Copyright (c) 2020-2021 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.
*/
package com.dfsek.terra.addons.biome.pipeline.config.stage;
import com.dfsek.tectonic.annotations.Value;
import com.dfsek.tectonic.loading.object.ObjectTemplate;
import com.dfsek.tectonic.api.config.template.annotations.Description;
import com.dfsek.tectonic.api.config.template.annotations.Value;
import com.dfsek.tectonic.api.config.template.object.ObjectTemplate;
import com.dfsek.terra.addons.biome.pipeline.api.Stage;
import com.dfsek.terra.addons.biome.pipeline.api.stage.Stage;
import com.dfsek.terra.api.config.meta.Meta;
import com.dfsek.terra.api.noise.NoiseSampler;
public abstract class StageTemplate implements ObjectTemplate<Stage> {
@Value("noise")
@Value("sampler")
@Description("Sampler to use for stage distribution.")
protected @Meta NoiseSampler noise;
}
@@ -1,6 +1,13 @@
/*
* Copyright (c) 2020-2021 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.
*/
package com.dfsek.terra.addons.biome.pipeline.config.stage.expander;
import com.dfsek.terra.addons.biome.pipeline.api.Stage;
import com.dfsek.terra.addons.biome.pipeline.api.stage.Stage;
import com.dfsek.terra.addons.biome.pipeline.config.stage.StageTemplate;
import com.dfsek.terra.addons.biome.pipeline.expand.FractalExpander;
import com.dfsek.terra.addons.biome.pipeline.stages.ExpanderStage;
@@ -1,16 +1,23 @@
/*
* Copyright (c) 2020-2021 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.
*/
package com.dfsek.terra.addons.biome.pipeline.config.stage.mutator;
import com.dfsek.tectonic.annotations.Value;
import com.dfsek.tectonic.api.config.template.annotations.Value;
import java.util.Map;
import com.dfsek.terra.addons.biome.pipeline.api.Stage;
import com.dfsek.terra.addons.biome.pipeline.api.delegate.BiomeDelegate;
import com.dfsek.terra.addons.biome.pipeline.api.stage.Stage;
import com.dfsek.terra.addons.biome.pipeline.config.stage.StageTemplate;
import com.dfsek.terra.addons.biome.pipeline.mutator.BorderListMutator;
import com.dfsek.terra.addons.biome.pipeline.stages.MutatorStage;
import com.dfsek.terra.api.config.meta.Meta;
import com.dfsek.terra.api.util.collection.ProbabilityCollection;
import com.dfsek.terra.api.world.biome.TerraBiome;
@SuppressWarnings("unused")
@@ -22,10 +29,10 @@ public class BorderListMutatorTemplate extends StageTemplate {
private @Meta String defaultReplace;
@Value("default-to")
private @Meta ProbabilityCollection<@Meta TerraBiome> defaultTo;
private @Meta ProbabilityCollection<@Meta BiomeDelegate> defaultTo;
@Value("replace")
private @Meta Map<@Meta TerraBiome, @Meta ProbabilityCollection<@Meta TerraBiome>> replace;
private @Meta Map<@Meta BiomeDelegate, @Meta ProbabilityCollection<@Meta BiomeDelegate>> replace;
@Override
@@ -1,14 +1,21 @@
/*
* Copyright (c) 2020-2021 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.
*/
package com.dfsek.terra.addons.biome.pipeline.config.stage.mutator;
import com.dfsek.tectonic.annotations.Value;
import com.dfsek.tectonic.api.config.template.annotations.Value;
import com.dfsek.terra.addons.biome.pipeline.api.Stage;
import com.dfsek.terra.addons.biome.pipeline.api.delegate.BiomeDelegate;
import com.dfsek.terra.addons.biome.pipeline.api.stage.Stage;
import com.dfsek.terra.addons.biome.pipeline.config.stage.StageTemplate;
import com.dfsek.terra.addons.biome.pipeline.mutator.BorderMutator;
import com.dfsek.terra.addons.biome.pipeline.stages.MutatorStage;
import com.dfsek.terra.api.config.meta.Meta;
import com.dfsek.terra.api.util.collection.ProbabilityCollection;
import com.dfsek.terra.api.world.biome.TerraBiome;
@SuppressWarnings("unused")
@@ -20,7 +27,7 @@ public class BorderMutatorTemplate extends StageTemplate {
private @Meta String replace;
@Value("to")
private @Meta ProbabilityCollection<@Meta TerraBiome> to;
private @Meta ProbabilityCollection<@Meta BiomeDelegate> to;
@Override
public Stage get() {
@@ -1,16 +1,23 @@
/*
* Copyright (c) 2020-2021 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.
*/
package com.dfsek.terra.addons.biome.pipeline.config.stage.mutator;
import com.dfsek.tectonic.annotations.Value;
import com.dfsek.tectonic.api.config.template.annotations.Value;
import java.util.Map;
import com.dfsek.terra.addons.biome.pipeline.api.Stage;
import com.dfsek.terra.addons.biome.pipeline.api.delegate.BiomeDelegate;
import com.dfsek.terra.addons.biome.pipeline.api.stage.Stage;
import com.dfsek.terra.addons.biome.pipeline.config.stage.StageTemplate;
import com.dfsek.terra.addons.biome.pipeline.mutator.ReplaceListMutator;
import com.dfsek.terra.addons.biome.pipeline.stages.MutatorStage;
import com.dfsek.terra.api.config.meta.Meta;
import com.dfsek.terra.api.util.collection.ProbabilityCollection;
import com.dfsek.terra.api.world.biome.TerraBiome;
@SuppressWarnings("unused")
@@ -19,10 +26,10 @@ public class ReplaceListMutatorTemplate extends StageTemplate {
private @Meta String defaultFrom;
@Value("default-to")
private @Meta ProbabilityCollection<@Meta TerraBiome> defaultTo;
private @Meta ProbabilityCollection<@Meta BiomeDelegate> defaultTo;
@Value("to")
private @Meta Map<@Meta TerraBiome, @Meta ProbabilityCollection<@Meta TerraBiome>> replace;
private @Meta Map<@Meta BiomeDelegate, @Meta ProbabilityCollection<@Meta BiomeDelegate>> replace;
@Override
public Stage get() {
@@ -1,14 +1,21 @@
/*
* Copyright (c) 2020-2021 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.
*/
package com.dfsek.terra.addons.biome.pipeline.config.stage.mutator;
import com.dfsek.tectonic.annotations.Value;
import com.dfsek.tectonic.api.config.template.annotations.Value;
import com.dfsek.terra.addons.biome.pipeline.api.Stage;
import com.dfsek.terra.addons.biome.pipeline.api.delegate.BiomeDelegate;
import com.dfsek.terra.addons.biome.pipeline.api.stage.Stage;
import com.dfsek.terra.addons.biome.pipeline.config.stage.StageTemplate;
import com.dfsek.terra.addons.biome.pipeline.mutator.ReplaceMutator;
import com.dfsek.terra.addons.biome.pipeline.stages.MutatorStage;
import com.dfsek.terra.api.config.meta.Meta;
import com.dfsek.terra.api.util.collection.ProbabilityCollection;
import com.dfsek.terra.api.world.biome.TerraBiome;
@SuppressWarnings("unused")
@@ -17,7 +24,7 @@ public class ReplaceMutatorTemplate extends StageTemplate {
private @Meta String from;
@Value("to")
private @Meta ProbabilityCollection<@Meta TerraBiome> to;
private @Meta ProbabilityCollection<@Meta BiomeDelegate> to;
@Override
public Stage get() {
@@ -1,6 +1,13 @@
/*
* Copyright (c) 2020-2021 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.
*/
package com.dfsek.terra.addons.biome.pipeline.config.stage.mutator;
import com.dfsek.terra.addons.biome.pipeline.api.Stage;
import com.dfsek.terra.addons.biome.pipeline.api.stage.Stage;
import com.dfsek.terra.addons.biome.pipeline.config.stage.StageTemplate;
import com.dfsek.terra.addons.biome.pipeline.mutator.SmoothMutator;
import com.dfsek.terra.addons.biome.pipeline.stages.MutatorStage;
@@ -1,9 +1,16 @@
/*
* Copyright (c) 2020-2021 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.
*/
package com.dfsek.terra.addons.biome.pipeline.expand;
import com.dfsek.terra.addons.biome.pipeline.api.BiomeExpander;
import com.dfsek.terra.addons.biome.pipeline.api.delegate.BiomeDelegate;
import com.dfsek.terra.addons.biome.pipeline.api.stage.type.BiomeExpander;
import com.dfsek.terra.api.noise.NoiseSampler;
import com.dfsek.terra.api.util.MathUtil;
import com.dfsek.terra.api.world.biome.TerraBiome;
public class FractalExpander implements BiomeExpander {
@@ -14,7 +21,7 @@ public class FractalExpander implements BiomeExpander {
}
@Override
public TerraBiome getBetween(double x, double z, long seed, TerraBiome... others) {
return others[MathUtil.normalizeIndex(sampler.getNoiseSeeded(seed, x, z), others.length)];
public BiomeDelegate getBetween(double x, double z, long seed, BiomeDelegate... others) {
return others[MathUtil.normalizeIndex(sampler.noise(seed, x, z), others.length)];
}
}
@@ -1,22 +1,32 @@
/*
* Copyright (c) 2020-2021 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.
*/
package com.dfsek.terra.addons.biome.pipeline.mutator;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.function.Predicate;
import com.dfsek.terra.addons.biome.pipeline.api.BiomeMutator;
import com.dfsek.terra.addons.biome.pipeline.api.delegate.BiomeDelegate;
import com.dfsek.terra.addons.biome.pipeline.api.stage.type.BiomeMutator;
import com.dfsek.terra.api.noise.NoiseSampler;
import com.dfsek.terra.api.util.collection.ProbabilityCollection;
import com.dfsek.terra.api.world.biome.TerraBiome;
public class BorderListMutator implements BiomeMutator {
private final String border;
private final NoiseSampler noiseSampler;
private final ProbabilityCollection<TerraBiome> replaceDefault;
private final ProbabilityCollection<BiomeDelegate> replaceDefault;
private final String defaultReplace;
private final Map<TerraBiome, ProbabilityCollection<TerraBiome>> replace;
private final Map<BiomeDelegate, ProbabilityCollection<BiomeDelegate>> replace;
public BorderListMutator(Map<TerraBiome, ProbabilityCollection<TerraBiome>> replace, String border, String defaultReplace,
NoiseSampler noiseSampler, ProbabilityCollection<TerraBiome> replaceDefault) {
public BorderListMutator(Map<BiomeDelegate, ProbabilityCollection<BiomeDelegate>> replace, String border, String defaultReplace,
NoiseSampler noiseSampler, ProbabilityCollection<BiomeDelegate> replaceDefault) {
this.border = border;
this.noiseSampler = noiseSampler;
this.replaceDefault = replaceDefault;
@@ -25,25 +35,33 @@ public class BorderListMutator implements BiomeMutator {
}
@Override
public TerraBiome mutate(ViewPoint viewPoint, double x, double z, long seed) {
TerraBiome origin = viewPoint.getBiome(0, 0);
public BiomeDelegate mutate(ViewPoint viewPoint, double x, double z, long seed) {
BiomeDelegate origin = viewPoint.getBiome(0, 0);
if(origin.getTags().contains(defaultReplace)) {
for(int xi = -1; xi <= 1; xi++) {
for(int zi = -1; zi <= 1; zi++) {
if(xi == 0 && zi == 0) continue;
TerraBiome current = viewPoint.getBiome(xi, zi);
if(current == null) continue;
if(current.getTags().contains(border)) {
BiomeDelegate current = viewPoint.getBiome(xi, zi);
if(current != null && current.getTags().contains(border)) {
if(replace.containsKey(origin)) {
TerraBiome biome = replace.get(origin).get(noiseSampler, x, z, seed);
return biome == null ? origin : biome;
BiomeDelegate biome = replace.get(origin).get(noiseSampler, x, z, seed);
return biome.isSelf() ? origin : biome;
}
TerraBiome biome = replaceDefault.get(noiseSampler, x, z, seed);
return biome == null ? origin : biome;
BiomeDelegate biome = replaceDefault.get(noiseSampler, x, z, seed);
return biome.isSelf() ? origin : biome;
}
}
}
}
return origin;
}
@Override
public Iterable<BiomeDelegate> getBiomes(Iterable<BiomeDelegate> biomes) {
Set<BiomeDelegate> biomeSet = new HashSet<>();
biomes.forEach(biomeSet::add);
biomeSet.addAll(replaceDefault.getContents().stream().filter(Predicate.not(BiomeDelegate::isSelf)).toList());
replace.forEach((biome, collection) -> biomeSet.addAll(collection.getContents()));
return biomeSet;
}
}
@@ -1,18 +1,29 @@
/*
* Copyright (c) 2020-2021 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.
*/
package com.dfsek.terra.addons.biome.pipeline.mutator;
import com.dfsek.terra.addons.biome.pipeline.api.BiomeMutator;
import java.util.HashSet;
import java.util.Set;
import java.util.function.Predicate;
import com.dfsek.terra.addons.biome.pipeline.api.delegate.BiomeDelegate;
import com.dfsek.terra.addons.biome.pipeline.api.stage.type.BiomeMutator;
import com.dfsek.terra.api.noise.NoiseSampler;
import com.dfsek.terra.api.util.collection.ProbabilityCollection;
import com.dfsek.terra.api.world.biome.TerraBiome;
public class BorderMutator implements BiomeMutator {
private final String border;
private final NoiseSampler noiseSampler;
private final ProbabilityCollection<TerraBiome> replace;
private final ProbabilityCollection<BiomeDelegate> replace;
private final String replaceTag;
public BorderMutator(String border, String replaceTag, NoiseSampler noiseSampler, ProbabilityCollection<TerraBiome> replace) {
public BorderMutator(String border, String replaceTag, NoiseSampler noiseSampler, ProbabilityCollection<BiomeDelegate> replace) {
this.border = border;
this.noiseSampler = noiseSampler;
this.replace = replace;
@@ -20,21 +31,36 @@ public class BorderMutator implements BiomeMutator {
}
@Override
public TerraBiome mutate(ViewPoint viewPoint, double x, double z, long seed) {
TerraBiome origin = viewPoint.getBiome(0, 0);
public BiomeDelegate mutate(ViewPoint viewPoint, double x, double z, long seed) {
BiomeDelegate origin = viewPoint.getBiome(0, 0);
if(origin.getTags().contains(replaceTag)) {
for(int xi = -1; xi <= 1; xi++) {
for(int zi = -1; zi <= 1; zi++) {
if(xi == 0 && zi == 0) continue;
TerraBiome current = viewPoint.getBiome(xi, zi);
if(current == null) continue;
if(current.getTags().contains(border)) {
TerraBiome biome = replace.get(noiseSampler, x, z, seed);
return biome == null ? origin : biome;
BiomeDelegate current = viewPoint.getBiome(xi, zi);
if(current != null && current.getTags().contains(border)) {
BiomeDelegate biome = replace.get(noiseSampler, x, z, seed);
return biome.isSelf() ? origin : biome;
}
}
}
}
return origin;
}
@Override
public Iterable<BiomeDelegate> getBiomes(Iterable<BiomeDelegate> biomes) {
Set<BiomeDelegate> biomeSet = new HashSet<>();
biomes.forEach(biomeSet::add);
biomeSet.addAll(
replace
.getContents()
.stream()
.filter(
Predicate.not(BiomeDelegate::isSelf)
)
.toList()
);
return biomeSet;
}
}
@@ -1,21 +1,31 @@
/*
* Copyright (c) 2020-2021 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.
*/
package com.dfsek.terra.addons.biome.pipeline.mutator;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.stream.Stream;
import com.dfsek.terra.addons.biome.pipeline.api.BiomeMutator;
import com.dfsek.terra.addons.biome.pipeline.api.delegate.BiomeDelegate;
import com.dfsek.terra.addons.biome.pipeline.api.stage.type.BiomeMutator;
import com.dfsek.terra.api.noise.NoiseSampler;
import com.dfsek.terra.api.util.collection.ProbabilityCollection;
import com.dfsek.terra.api.world.biome.TerraBiome;
public class ReplaceListMutator implements BiomeMutator {
private final Map<TerraBiome, ProbabilityCollection<TerraBiome>> replace;
private final Map<BiomeDelegate, ProbabilityCollection<BiomeDelegate>> replace;
private final NoiseSampler sampler;
private final ProbabilityCollection<TerraBiome> replaceDefault;
private final ProbabilityCollection<BiomeDelegate> replaceDefault;
private final String defaultTag;
public ReplaceListMutator(Map<TerraBiome, ProbabilityCollection<TerraBiome>> replace, String defaultTag,
ProbabilityCollection<TerraBiome> replaceDefault, NoiseSampler sampler) {
public ReplaceListMutator(Map<BiomeDelegate, ProbabilityCollection<BiomeDelegate>> replace, String defaultTag,
ProbabilityCollection<BiomeDelegate> replaceDefault, NoiseSampler sampler) {
this.replace = replace;
this.sampler = sampler;
this.defaultTag = defaultTag;
@@ -23,16 +33,40 @@ public class ReplaceListMutator implements BiomeMutator {
}
@Override
public TerraBiome mutate(ViewPoint viewPoint, double x, double z, long seed) {
TerraBiome center = viewPoint.getBiome(0, 0);
public BiomeDelegate mutate(ViewPoint viewPoint, double x, double z, long seed) {
BiomeDelegate center = viewPoint.getBiome(0, 0);
if(replace.containsKey(center)) {
TerraBiome biome = replace.get(center).get(sampler, x, z, seed);
return biome == null ? viewPoint.getBiome(0, 0) : biome;
BiomeDelegate biome = replace.get(center).get(sampler, x, z, seed);
return biome.isSelf() ? viewPoint.getBiome(0, 0) : biome;
}
if(viewPoint.getBiome(0, 0).getTags().contains(defaultTag)) {
TerraBiome biome = replaceDefault.get(sampler, x, z, seed);
return biome == null ? viewPoint.getBiome(0, 0) : biome;
BiomeDelegate biome = replaceDefault.get(sampler, x, z, seed);
return biome.isSelf() ? viewPoint.getBiome(0, 0) : biome;
}
return center;
}
@Override
public Iterable<BiomeDelegate> getBiomes(Iterable<BiomeDelegate> biomes) {
Set<BiomeDelegate> biomeSet = new HashSet<>();
Set<BiomeDelegate> reject = new HashSet<>();
biomes.forEach(biome -> {
if(!biome.getTags().contains(defaultTag) && !replace.containsKey(biome)) {
biomeSet.add(biome);
} else {
reject.add(biome);
}
});
biomeSet.addAll(replaceDefault.getContents().stream().flatMap(terraBiome -> {
if(terraBiome.isSelf()) return reject.stream();
return Stream.of(terraBiome);
}).toList());
replace.forEach((biome, collection) -> biomeSet.addAll(collection.getContents().stream().map(terraBiome -> {
if(terraBiome.isSelf()) return biome;
return terraBiome;
}).toList()));
return biomeSet;
}
}
@@ -1,28 +1,57 @@
/*
* Copyright (c) 2020-2021 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.
*/
package com.dfsek.terra.addons.biome.pipeline.mutator;
import com.dfsek.terra.addons.biome.pipeline.api.BiomeMutator;
import java.util.HashSet;
import java.util.Set;
import java.util.stream.Stream;
import com.dfsek.terra.addons.biome.pipeline.api.delegate.BiomeDelegate;
import com.dfsek.terra.addons.biome.pipeline.api.stage.type.BiomeMutator;
import com.dfsek.terra.api.noise.NoiseSampler;
import com.dfsek.terra.api.util.collection.ProbabilityCollection;
import com.dfsek.terra.api.world.biome.TerraBiome;
public class ReplaceMutator implements BiomeMutator {
private final String replaceableTag;
private final ProbabilityCollection<TerraBiome> replace;
private final ProbabilityCollection<BiomeDelegate> replace;
private final NoiseSampler sampler;
public ReplaceMutator(String replaceable, ProbabilityCollection<TerraBiome> replace, NoiseSampler sampler) {
public ReplaceMutator(String replaceable, ProbabilityCollection<BiomeDelegate> replace, NoiseSampler sampler) {
this.replaceableTag = replaceable;
this.replace = replace;
this.sampler = sampler;
}
@Override
public TerraBiome mutate(ViewPoint viewPoint, double x, double z, long seed) {
public BiomeDelegate mutate(ViewPoint viewPoint, double x, double z, long seed) {
if(viewPoint.getBiome(0, 0).getTags().contains(replaceableTag)) {
TerraBiome biome = replace.get(sampler, x, z, seed);
return biome == null ? viewPoint.getBiome(0, 0) : biome;
BiomeDelegate biome = replace.get(sampler, x, z, seed);
return biome.isSelf() ? viewPoint.getBiome(0, 0) : biome;
}
return viewPoint.getBiome(0, 0);
}
@Override
public Iterable<BiomeDelegate> getBiomes(Iterable<BiomeDelegate> biomes) {
Set<BiomeDelegate> biomeSet = new HashSet<>();
Set<BiomeDelegate> reject = new HashSet<>();
biomes.forEach(biome -> {
if(!biome.getTags().contains(replaceableTag)) {
biomeSet.add(biome);
} else {
reject.add(biome);
}
});
biomeSet.addAll(replace.getContents().stream().flatMap(terraBiome -> {
if(terraBiome.isSelf()) return reject.stream();
return Stream.of(terraBiome);
}).toList());
return biomeSet;
}
}
@@ -1,11 +1,18 @@
/*
* Copyright (c) 2020-2021 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.
*/
package com.dfsek.terra.addons.biome.pipeline.mutator;
import java.util.Objects;
import com.dfsek.terra.addons.biome.pipeline.api.BiomeMutator;
import com.dfsek.terra.addons.biome.pipeline.api.delegate.BiomeDelegate;
import com.dfsek.terra.addons.biome.pipeline.api.stage.type.BiomeMutator;
import com.dfsek.terra.api.noise.NoiseSampler;
import com.dfsek.terra.api.util.MathUtil;
import com.dfsek.terra.api.world.biome.TerraBiome;
public class SmoothMutator implements BiomeMutator {
@@ -17,18 +24,18 @@ public class SmoothMutator implements BiomeMutator {
}
@Override
public TerraBiome mutate(ViewPoint viewPoint, double x, double z, long seed) {
TerraBiome top = viewPoint.getBiome(1, 0);
TerraBiome bottom = viewPoint.getBiome(-1, 0);
TerraBiome left = viewPoint.getBiome(0, 1);
TerraBiome right = viewPoint.getBiome(0, -1);
public BiomeDelegate mutate(ViewPoint viewPoint, double x, double z, long seed) {
BiomeDelegate top = viewPoint.getBiome(1, 0);
BiomeDelegate bottom = viewPoint.getBiome(-1, 0);
BiomeDelegate left = viewPoint.getBiome(0, 1);
BiomeDelegate right = viewPoint.getBiome(0, -1);
boolean vert = Objects.equals(top, bottom) && top != null;
boolean horiz = Objects.equals(left, right) && left != null;
if(vert && horiz) {
return MathUtil.normalizeIndex(sampler.getNoiseSeeded(seed, x, z), 2) == 0 ? left : top;
return MathUtil.normalizeIndex(sampler.noise(seed, x, z), 2) == 0 ? left : top;
}
if(vert) return top;
@@ -1,8 +1,17 @@
/*
* Copyright (c) 2020-2021 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.
*/
package com.dfsek.terra.addons.biome.pipeline.source;
import com.dfsek.terra.api.world.biome.TerraBiome;
import com.dfsek.terra.addons.biome.pipeline.api.delegate.BiomeDelegate;
public interface BiomeSource {
TerraBiome getBiome(double x, double z, long seed);
BiomeDelegate getBiome(double x, double z, long seed);
Iterable<BiomeDelegate> getBiomes();
}
@@ -1,21 +0,0 @@
package com.dfsek.terra.addons.biome.pipeline.source;
import com.dfsek.terra.api.noise.NoiseSampler;
import com.dfsek.terra.api.util.collection.ProbabilityCollection;
import com.dfsek.terra.api.world.biome.TerraBiome;
public class NoiseSource implements BiomeSource {
private final ProbabilityCollection<TerraBiome> biomes;
private final NoiseSampler sampler;
public NoiseSource(ProbabilityCollection<TerraBiome> biomes, NoiseSampler sampler) {
this.biomes = biomes;
this.sampler = sampler;
}
@Override
public TerraBiome getBiome(double x, double z, long seed) {
return biomes.get(sampler, x, z, seed);
}
}
@@ -0,0 +1,33 @@
/*
* Copyright (c) 2020-2021 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.
*/
package com.dfsek.terra.addons.biome.pipeline.source;
import com.dfsek.terra.addons.biome.pipeline.api.delegate.BiomeDelegate;
import com.dfsek.terra.api.noise.NoiseSampler;
import com.dfsek.terra.api.util.collection.ProbabilityCollection;
public class SamplerSource implements BiomeSource {
private final ProbabilityCollection<BiomeDelegate> biomes;
private final NoiseSampler sampler;
public SamplerSource(ProbabilityCollection<BiomeDelegate> biomes, NoiseSampler sampler) {
this.biomes = biomes;
this.sampler = sampler;
}
@Override
public BiomeDelegate getBiome(double x, double z, long seed) {
return biomes.get(sampler, x, z, seed);
}
@Override
public Iterable<BiomeDelegate> getBiomes() {
return biomes.getContents();
}
}
@@ -1,8 +1,16 @@
/*
* Copyright (c) 2020-2021 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.
*/
package com.dfsek.terra.addons.biome.pipeline.stages;
import com.dfsek.terra.addons.biome.pipeline.api.BiomeExpander;
import com.dfsek.terra.addons.biome.pipeline.api.BiomeHolder;
import com.dfsek.terra.addons.biome.pipeline.api.Stage;
import com.dfsek.terra.addons.biome.pipeline.api.delegate.BiomeDelegate;
import com.dfsek.terra.addons.biome.pipeline.api.stage.Stage;
import com.dfsek.terra.addons.biome.pipeline.api.stage.type.BiomeExpander;
public class ExpanderStage implements Stage {
@@ -22,7 +30,8 @@ public class ExpanderStage implements Stage {
return true;
}
public enum Type {
FRACTAL
@Override
public Iterable<BiomeDelegate> getBiomes(Iterable<BiomeDelegate> biomes) {
return biomes;
}
}
@@ -1,8 +1,16 @@
/*
* Copyright (c) 2020-2021 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.
*/
package com.dfsek.terra.addons.biome.pipeline.stages;
import com.dfsek.terra.addons.biome.pipeline.api.BiomeHolder;
import com.dfsek.terra.addons.biome.pipeline.api.BiomeMutator;
import com.dfsek.terra.addons.biome.pipeline.api.Stage;
import com.dfsek.terra.addons.biome.pipeline.api.delegate.BiomeDelegate;
import com.dfsek.terra.addons.biome.pipeline.api.stage.Stage;
import com.dfsek.terra.addons.biome.pipeline.api.stage.type.BiomeMutator;
public class MutatorStage implements Stage {
@@ -23,6 +31,11 @@ public class MutatorStage implements Stage {
return false;
}
@Override
public Iterable<BiomeDelegate> getBiomes(Iterable<BiomeDelegate> biomes) {
return mutator.getBiomes(biomes);
}
public enum Type {
REPLACE,
REPLACE_LIST,
@@ -0,0 +1,12 @@
schema-version: 1
contributors:
- Terra contributors
id: biome-provider-pipeline
version: @VERSION@
entrypoints:
- "com.dfsek.terra.addons.biome.pipeline.BiomePipelineAddon"
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,21 @@
MIT License
Copyright (c) 2020-2021 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
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
@@ -1,2 +1,5 @@
version = version("1.0.0")
dependencies {
compileOnlyApi(project(":common:addons:manifest-addon-loader"))
}
@@ -1,18 +1,32 @@
/*
* Copyright (c) 2020-2021 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.
*/
package com.dfsek.terra.addons.biome.single;
import com.dfsek.terra.api.world.biome.TerraBiome;
import java.util.Collections;
import com.dfsek.terra.api.world.biome.Biome;
import com.dfsek.terra.api.world.biome.generation.BiomeProvider;
public class SingleBiomeProvider implements BiomeProvider {
private final TerraBiome biome;
private final Biome biome;
public SingleBiomeProvider(TerraBiome biome) {
public SingleBiomeProvider(Biome biome) {
this.biome = biome;
}
@Override
public TerraBiome getBiome(int x, int z, long seed) {
public Biome getBiome(int x, int y, int z, long seed) {
return biome;
}
@Override
public Iterable<Biome> getBiomes() {
return Collections.singleton(biome);
}
}
@@ -1,42 +1,47 @@
/*
* Copyright (c) 2020-2021 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.
*/
package com.dfsek.terra.addons.biome.single;
import com.dfsek.tectonic.loading.object.ObjectTemplate;
import com.dfsek.tectonic.api.config.template.object.ObjectTemplate;
import java.util.function.Supplier;
import com.dfsek.terra.api.TerraPlugin;
import com.dfsek.terra.api.addon.TerraAddon;
import com.dfsek.terra.api.addon.annotations.Addon;
import com.dfsek.terra.api.addon.annotations.Author;
import com.dfsek.terra.api.addon.annotations.Version;
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.ConfigPackPreLoadEvent;
import com.dfsek.terra.api.event.functional.FunctionalEventHandler;
import com.dfsek.terra.api.injection.annotations.Inject;
import com.dfsek.terra.api.inject.annotations.Inject;
import com.dfsek.terra.api.registry.CheckedRegistry;
import com.dfsek.terra.api.util.reflection.TypeKey;
import com.dfsek.terra.api.world.biome.generation.BiomeProvider;
@Addon("biome-provider-single")
@Author("Terra")
@Version("1.0.0")
public class SingleBiomeProviderAddon extends TerraAddon {
public class SingleBiomeProviderAddon implements AddonInitializer {
public static final TypeKey<Supplier<ObjectTemplate<BiomeProvider>>> PROVIDER_REGISTRY_KEY = new TypeKey<>() {
};
@Inject
private TerraPlugin main;
private Platform platform;
@Inject
private BaseAddon addon;
@Override
public void initialize() {
main.getEventManager()
.getHandler(FunctionalEventHandler.class)
.register(this, ConfigPackPreLoadEvent.class)
.then(event -> {
CheckedRegistry<Supplier<ObjectTemplate<BiomeProvider>>> providerRegistry = event.getPack().getOrCreateRegistry(
PROVIDER_REGISTRY_KEY);
providerRegistry.register("SINGLE", SingleBiomeProviderTemplate::new);
})
.failThrough();
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("SINGLE"), SingleBiomeProviderTemplate::new);
})
.failThrough();
}
}
@@ -1,16 +1,23 @@
/*
* Copyright (c) 2020-2021 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.
*/
package com.dfsek.terra.addons.biome.single;
import com.dfsek.tectonic.annotations.Value;
import com.dfsek.tectonic.loading.object.ObjectTemplate;
import com.dfsek.tectonic.api.config.template.annotations.Value;
import com.dfsek.tectonic.api.config.template.object.ObjectTemplate;
import com.dfsek.terra.api.config.meta.Meta;
import com.dfsek.terra.api.world.biome.TerraBiome;
import com.dfsek.terra.api.world.biome.Biome;
import com.dfsek.terra.api.world.biome.generation.BiomeProvider;
public class SingleBiomeProviderTemplate implements ObjectTemplate<BiomeProvider> {
@Value("biome")
private @Meta TerraBiome biome;
private @Meta Biome biome;
@Override
public BiomeProvider get() {
@@ -0,0 +1,12 @@
schema-version: 1
contributors:
- Terra contributors
id: biome-provider-single
version: @VERSION@
entrypoints:
- "com.dfsek.terra.addons.biome.single.SingleBiomeProviderAddon"
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,21 @@
MIT License
Copyright (c) 2020-2021 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
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
@@ -1,2 +1,12 @@
version = version("1.0.0")
dependencies {
compileOnlyApi(project(":common:addons:manifest-addon-loader"))
implementation("net.jafama", "jafama", Versions.Libraries.Internal.jafama)
testImplementation("net.jafama", "jafama", Versions.Libraries.Internal.jafama)
}
tasks.named<com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar>("shadowJar") {
relocate("net.jafama", "com.dfsek.terra.addons.chunkgenerator.lib.jafama")
}
@@ -1,30 +0,0 @@
package com.dfsek.terra.addons.chunkgenerator;
import com.dfsek.tectonic.annotations.Default;
import com.dfsek.tectonic.annotations.Value;
import com.dfsek.tectonic.loading.object.ObjectTemplate;
import com.dfsek.terra.addons.chunkgenerator.palette.PaletteHolder;
import com.dfsek.terra.addons.chunkgenerator.palette.PaletteInfo;
import com.dfsek.terra.addons.chunkgenerator.palette.SlantHolder;
import com.dfsek.terra.api.config.meta.Meta;
import com.dfsek.terra.api.world.generator.Palette;
public class BiomePaletteTemplate implements ObjectTemplate<PaletteInfo> {
@Value("slant")
@Default
private final @Meta SlantHolder slant;
@Value("palette")
private @Meta PaletteHolder palette;
@Value("ocean.level")
private @Meta int seaLevel;
@Value("ocean.palette")
private @Meta Palette oceanPalette;
@Override
public PaletteInfo get() {
return new PaletteInfo(palette, slant, oceanPalette, seaLevel);
}
}
@@ -1,52 +1,62 @@
/*
* Copyright (c) 2020-2021 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.
*/
package com.dfsek.terra.addons.chunkgenerator;
import com.dfsek.terra.addons.chunkgenerator.generation.generators.NoiseChunkGenerator3D;
import com.dfsek.terra.addons.chunkgenerator.palette.PaletteHolder;
import com.dfsek.terra.addons.chunkgenerator.palette.PaletteHolderLoader;
import com.dfsek.terra.addons.chunkgenerator.palette.SlantHolder;
import com.dfsek.terra.addons.chunkgenerator.palette.SlantHolderLoader;
import com.dfsek.terra.api.TerraPlugin;
import com.dfsek.terra.api.addon.TerraAddon;
import com.dfsek.terra.api.addon.annotations.Addon;
import com.dfsek.terra.api.addon.annotations.Author;
import com.dfsek.terra.api.addon.annotations.Version;
import com.dfsek.terra.addons.chunkgenerator.config.NoiseChunkGeneratorPackConfigTemplate;
import com.dfsek.terra.addons.chunkgenerator.config.noise.BiomeNoiseConfigTemplate;
import com.dfsek.terra.addons.chunkgenerator.config.palette.BiomePaletteTemplate;
import com.dfsek.terra.addons.chunkgenerator.config.palette.SlantLayer;
import com.dfsek.terra.addons.chunkgenerator.generation.NoiseChunkGenerator3D;
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.ConfigurationLoadEvent;
import com.dfsek.terra.api.event.events.config.pack.ConfigPackPreLoadEvent;
import com.dfsek.terra.api.event.functional.FunctionalEventHandler;
import com.dfsek.terra.api.injection.annotations.Inject;
import com.dfsek.terra.api.world.biome.TerraBiome;
import com.dfsek.terra.api.world.generator.ChunkGeneratorProvider;
import com.dfsek.terra.api.inject.annotations.Inject;
import com.dfsek.terra.api.world.biome.Biome;
import com.dfsek.terra.api.world.chunk.generation.util.provider.ChunkGeneratorProvider;
@Addon("chunk-generator-noise-3d")
@Author("Terra")
@Version("1.0.0")
public class NoiseChunkGenerator3DAddon extends TerraAddon {
public class NoiseChunkGenerator3DAddon implements AddonInitializer {
@Inject
private TerraPlugin main;
private Platform platform;
@Inject
private BaseAddon addon;
@Override
public void initialize() {
main.getEventManager()
.getHandler(FunctionalEventHandler.class)
.register(this, ConfigPackPreLoadEvent.class)
.then(event -> {
event.getPack().getOrCreateRegistry(ChunkGeneratorProvider.class).register("NOISE_3D",
pack -> new NoiseChunkGenerator3D(pack, main));
event.getPack()
.applyLoader(SlantHolder.class, new SlantHolderLoader())
.applyLoader(PaletteHolder.class, new PaletteHolderLoader());
})
.failThrough();
platform.getEventManager()
.getHandler(FunctionalEventHandler.class)
.register(addon, ConfigPackPreLoadEvent.class)
.then(event -> {
NoiseChunkGeneratorPackConfigTemplate config = event.loadTemplate(new NoiseChunkGeneratorPackConfigTemplate());
event.getPack()
.getOrCreateRegistry(ChunkGeneratorProvider.class)
.register(addon.key("NOISE_3D"),
pack -> new NoiseChunkGenerator3D(platform, config.getElevationBlend(), config.getHorizontalRes(),
config.getVerticalRes()));
event.getPack()
.applyLoader(SlantLayer.class, SlantLayer::new);
})
.failThrough();
main.getEventManager()
.getHandler(FunctionalEventHandler.class)
.register(this, ConfigurationLoadEvent.class)
.then(event -> {
if(event.is(TerraBiome.class)) {
event.getLoadedObject(TerraBiome.class).getContext().put(event.load(new BiomePaletteTemplate()).get());
}
})
.failThrough();
platform.getEventManager()
.getHandler(FunctionalEventHandler.class)
.register(addon, ConfigurationLoadEvent.class)
.then(event -> {
if(event.is(Biome.class)) {
event.getLoadedObject(Biome.class).getContext().put(event.load(new BiomePaletteTemplate(platform)).get());
event.getLoadedObject(Biome.class).getContext().put(event.load(new BiomeNoiseConfigTemplate()).get());
}
})
.failThrough();
}
}
@@ -1,23 +0,0 @@
package com.dfsek.terra.addons.chunkgenerator;
import com.dfsek.terra.addons.chunkgenerator.palette.PaletteInfo;
import com.dfsek.terra.addons.chunkgenerator.palette.SlantHolder;
import com.dfsek.terra.api.util.MathUtil;
import com.dfsek.terra.api.world.biome.GenerationSettings;
import com.dfsek.terra.api.world.generator.Palette;
import com.dfsek.terra.api.world.generator.Sampler;
public final class PaletteUtil {
public static Palette getPalette(int x, int y, int z, GenerationSettings c, Sampler sampler, PaletteInfo paletteInfo) {
SlantHolder slant = paletteInfo.getSlantHolder();
if(slant != null) {
double slope = MathUtil.derivative(sampler, x, y, z);
if(slope > slant.getMinSlope()) {
return slant.getPalette(slope).getPalette(y);
}
}
return paletteInfo.getPaletteHolder().getPalette(y);
}
}
@@ -0,0 +1,34 @@
package com.dfsek.terra.addons.chunkgenerator.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.Value;
import com.dfsek.terra.api.config.meta.Meta;
public class NoiseChunkGeneratorPackConfigTemplate implements ConfigTemplate {
@Value("blend.terrain.elevation")
@Default
private @Meta int elevationBlend = 4;
@Value("carving.resolution.horizontal")
@Default
private @Meta int horizontalRes = 4;
@Value("carving.resolution.vertical")
@Default
private @Meta int verticalRes = 2;
public int getElevationBlend() {
return elevationBlend;
}
public int getHorizontalRes() {
return horizontalRes;
}
public int getVerticalRes() {
return verticalRes;
}
}
@@ -0,0 +1,44 @@
package com.dfsek.terra.addons.chunkgenerator.config.noise;
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.api.config.meta.Meta;
import com.dfsek.terra.api.noise.NoiseSampler;
public class BiomeNoiseConfigTemplate implements ObjectTemplate<BiomeNoiseProperties> {
@Value("terrain.sampler")
private @Meta NoiseSampler baseSampler;
@Value("terrain.sampler-2d")
@Default
private @Meta NoiseSampler elevationSampler = NoiseSampler.zero();
@Value("carving.sampler")
@Default
private @Meta NoiseSampler carvingSampler = NoiseSampler.zero();
@Value("terrain.blend.distance")
@Default
private @Meta int blendDistance = 3;
@Value("terrain.blend.weight")
@Default
private @Meta double blendWeight = 1;
@Value("terrain.blend.step")
@Default
private @Meta int blendStep = 4;
@Value("terrain.blend.weight-2d")
@Default
private @Meta double elevationWeight = 1;
@Override
public BiomeNoiseProperties get() {
return new BiomeNoiseProperties(baseSampler, elevationSampler, carvingSampler, blendDistance, blendStep, blendWeight,
elevationWeight);
}
}
@@ -0,0 +1,15 @@
package com.dfsek.terra.addons.chunkgenerator.config.noise;
import com.dfsek.terra.api.noise.NoiseSampler;
import com.dfsek.terra.api.properties.Properties;
public record BiomeNoiseProperties(NoiseSampler base,
NoiseSampler elevation,
NoiseSampler carving,
int blendDistance,
int blendStep,
double blendWeight,
double elevationWeight) implements Properties {
}
@@ -0,0 +1,84 @@
/*
* Copyright (c) 2020-2021 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.
*/
package com.dfsek.terra.addons.chunkgenerator.config.palette;
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.tectonic.api.config.template.object.ObjectTemplate;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.TreeMap;
import com.dfsek.terra.addons.chunkgenerator.palette.PaletteHolder;
import com.dfsek.terra.addons.chunkgenerator.palette.PaletteHolderBuilder;
import com.dfsek.terra.addons.chunkgenerator.palette.SlantHolder;
import com.dfsek.terra.api.Platform;
import com.dfsek.terra.api.block.state.BlockState;
import com.dfsek.terra.api.config.meta.Meta;
import com.dfsek.terra.api.world.chunk.generation.util.Palette;
public class BiomePaletteTemplate implements ObjectTemplate<PaletteInfo> {
private final Platform platform;
@Value("slant")
@Default
@Description("The slant palettes to use in this biome.")
private @Meta List<@Meta SlantLayer> slant = Collections.emptyList();
@Value("slant-depth")
@Default
@Description("The maximum depth at which to apply a slant palette.")
private @Meta int slantDepth = Integer.MAX_VALUE;
@Value("palette")
@Description("The palettes to use in this biome.")
private @Meta List<@Meta Map<@Meta Palette, @Meta Integer>> palettes;
@Value("ocean.level")
@Description("Sea level in this biome. Defaults to zero")
@Default
private @Meta int seaLevel = 0;
@Value("ocean.palette")
@Description("The palette to use for the ocean in this biome. Defaults to a blank palette.")
@Default
private @Meta Palette oceanPalette = new Palette() {
@Override
public BlockState get(int layer, double x, double y, double z, long seed) {
return platform.getWorldHandle().air();
}
};
public BiomePaletteTemplate(Platform platform) { this.platform = platform; }
@Override
public PaletteInfo get() {
PaletteHolderBuilder builder = new PaletteHolderBuilder();
for(Map<Palette, Integer> layer : palettes) {
for(Entry<Palette, Integer> entry : layer.entrySet()) {
builder.add(entry.getValue(), entry.getKey());
}
}
TreeMap<Double, PaletteHolder> slantLayers = new TreeMap<>();
double minThreshold = Double.MAX_VALUE;
for(SlantLayer layer : slant) {
double threshold = layer.getThreshold();
if(threshold < minThreshold) minThreshold = threshold;
slantLayers.put(threshold, layer.getPalette());
}
return new PaletteInfo(builder.build(), SlantHolder.of(slantLayers, minThreshold), oceanPalette, seaLevel, slantDepth);
}
}
@@ -0,0 +1,21 @@
/*
* Copyright (c) 2020-2021 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.
*/
package com.dfsek.terra.addons.chunkgenerator.config.palette;
import com.dfsek.terra.addons.chunkgenerator.palette.PaletteHolder;
import com.dfsek.terra.addons.chunkgenerator.palette.SlantHolder;
import com.dfsek.terra.api.properties.Properties;
import com.dfsek.terra.api.world.chunk.generation.util.Palette;
public record PaletteInfo(PaletteHolder paletteHolder,
SlantHolder slantHolder,
Palette ocean,
int seaLevel,
int maxSlantDepth) implements Properties {
}
@@ -0,0 +1,42 @@
package com.dfsek.terra.addons.chunkgenerator.config.palette;
import com.dfsek.tectonic.api.config.template.annotations.Value;
import com.dfsek.tectonic.api.config.template.object.ObjectTemplate;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import com.dfsek.terra.addons.chunkgenerator.palette.PaletteHolder;
import com.dfsek.terra.addons.chunkgenerator.palette.PaletteHolderBuilder;
import com.dfsek.terra.api.config.meta.Meta;
import com.dfsek.terra.api.world.chunk.generation.util.Palette;
public class SlantLayer implements ObjectTemplate<SlantLayer> {
@Value("threshold")
private @Meta double threshold;
@Value("palette")
private @Meta List<@Meta Map<@Meta Palette, @Meta Integer>> palettes;
@Override
public SlantLayer get() {
return this;
}
public double getThreshold() {
return threshold;
}
public PaletteHolder getPalette() {
PaletteHolderBuilder builder = new PaletteHolderBuilder();
for(Map<Palette, Integer> layer : palettes) {
for(Entry<Palette, Integer> entry : layer.entrySet()) {
builder.add(entry.getValue(), entry.getKey());
}
}
return builder.build();
}
}
@@ -0,0 +1,137 @@
/*
* Copyright (c) 2020-2021 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.
*/
package com.dfsek.terra.addons.chunkgenerator.generation;
import net.jafama.FastMath;
import org.jetbrains.annotations.NotNull;
import com.dfsek.terra.addons.chunkgenerator.config.palette.PaletteInfo;
import com.dfsek.terra.addons.chunkgenerator.generation.math.PaletteUtil;
import com.dfsek.terra.addons.chunkgenerator.generation.math.interpolation.LazilyEvaluatedInterpolator;
import com.dfsek.terra.addons.chunkgenerator.generation.math.samplers.Sampler3D;
import com.dfsek.terra.addons.chunkgenerator.generation.math.samplers.SamplerProvider;
import com.dfsek.terra.api.Platform;
import com.dfsek.terra.api.block.state.BlockState;
import com.dfsek.terra.api.world.biome.Biome;
import com.dfsek.terra.api.world.biome.generation.BiomeProvider;
import com.dfsek.terra.api.world.chunk.generation.ChunkGenerator;
import com.dfsek.terra.api.world.chunk.generation.ProtoChunk;
import com.dfsek.terra.api.world.chunk.generation.util.Palette;
import com.dfsek.terra.api.world.info.WorldProperties;
public class NoiseChunkGenerator3D implements ChunkGenerator {
private final Platform platform;
private final SamplerProvider samplerCache;
private final BlockState air;
private final int carverHorizontalResolution;
private final int carverVerticalResolution;
public NoiseChunkGenerator3D(Platform platform, int elevationBlend, int carverHorizontalResolution,
int carverVerticalResolution) {
this.platform = platform;
this.air = platform.getWorldHandle().air();
this.carverHorizontalResolution = carverHorizontalResolution;
this.carverVerticalResolution = carverVerticalResolution;
this.samplerCache = new SamplerProvider(platform, elevationBlend);
}
@Override
@SuppressWarnings("try")
public void generateChunkData(@NotNull ProtoChunk chunk, @NotNull WorldProperties world,
@NotNull BiomeProvider biomeProvider,
int chunkX, int chunkZ) {
platform.getProfiler().push("chunk_base_3d");
int xOrig = (chunkX << 4);
int zOrig = (chunkZ << 4);
Sampler3D sampler = samplerCache.getChunk(chunkX, chunkZ, world, biomeProvider);
long seed = world.getSeed();
LazilyEvaluatedInterpolator carver = new LazilyEvaluatedInterpolator(biomeProvider,
chunkX,
chunkZ,
world.getMaxHeight(),
world.getMinHeight(),
carverHorizontalResolution,
carverVerticalResolution,
seed);
for(int x = 0; x < 16; x++) {
for(int z = 0; z < 16; z++) {
int paletteLevel = 0;
int cx = xOrig + x;
int cz = zOrig + z;
Biome biome = biomeProvider.getBiome(cx, 0, cz, seed);
PaletteInfo paletteInfo = biome.getContext().get(PaletteInfo.class);
int sea = paletteInfo.seaLevel();
Palette seaPalette = paletteInfo.ocean();
BlockState data;
for(int y = world.getMaxHeight() - 1; y >= world.getMinHeight(); y--) {
if(sampler.sample(x, y, z) > 0) {
if(carver.sample(x, y, z) <= 0) {
data = PaletteUtil.getPalette(x, y, z, sampler, paletteInfo, paletteLevel).get(paletteLevel, cx, y, cz,
seed);
chunk.setBlock(x, y, z, data);
}
paletteLevel++;
} else if(y <= sea) {
chunk.setBlock(x, y, z, seaPalette.get(sea - y, x + xOrig, y, z + zOrig, seed));
paletteLevel = 0;
} else {
paletteLevel = 0;
}
}
}
}
platform.getProfiler().pop("chunk_base_3d");
}
@Override
public BlockState getBlock(WorldProperties world, int x, int y, int z, BiomeProvider biomeProvider) {
Biome biome = biomeProvider.getBiome(x, y, z, world.getSeed());
Sampler3D sampler = samplerCache.get(x, z, world, biomeProvider);
PaletteInfo paletteInfo = biome.getContext().get(PaletteInfo.class);
int fdX = FastMath.floorMod(x, 16);
int fdZ = FastMath.floorMod(z, 16);
Palette palette = PaletteUtil.getPalette(fdX, y, fdZ, sampler, paletteInfo, 0);
double noise = sampler.sample(fdX, y, fdZ);
if(noise > 0) {
int level = 0;
for(int yi = world.getMaxHeight() - 1; yi > y; yi--) {
if(sampler.sample(fdX, yi, fdZ) > 0) level++;
else level = 0;
}
return palette.get(level, x, y, z, world.getSeed());
} else if(y <= paletteInfo.seaLevel()) {
return paletteInfo.ocean().get(paletteInfo.seaLevel() - y, x, y, z, world.getSeed());
} else return air;
}
@Override
public Palette getPalette(int x, int y, int z, WorldProperties world, BiomeProvider biomeProvider) {
return biomeProvider.getBiome(x, y, z, world.getSeed()).getContext().get(PaletteInfo.class).paletteHolder().getPalette(y);
}
public SamplerProvider samplerProvider() {
return samplerCache;
}
}
@@ -1,192 +0,0 @@
package com.dfsek.terra.addons.chunkgenerator.generation.generators;
import net.jafama.FastMath;
import org.jetbrains.annotations.NotNull;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import com.dfsek.terra.addons.chunkgenerator.PaletteUtil;
import com.dfsek.terra.addons.chunkgenerator.generation.math.samplers.Sampler3D;
import com.dfsek.terra.addons.chunkgenerator.palette.PaletteInfo;
import com.dfsek.terra.api.TerraPlugin;
import com.dfsek.terra.api.block.state.BlockState;
import com.dfsek.terra.api.block.state.properties.base.Properties;
import com.dfsek.terra.api.block.state.properties.enums.Direction;
import com.dfsek.terra.api.config.ConfigPack;
import com.dfsek.terra.api.profiler.ProfileFrame;
import com.dfsek.terra.api.vector.Vector3;
import com.dfsek.terra.api.world.BiomeGrid;
import com.dfsek.terra.api.world.World;
import com.dfsek.terra.api.world.biome.GenerationSettings;
import com.dfsek.terra.api.world.biome.TerraBiome;
import com.dfsek.terra.api.world.biome.generation.BiomeProvider;
import com.dfsek.terra.api.world.generator.ChunkData;
import com.dfsek.terra.api.world.generator.ChunkGenerator;
import com.dfsek.terra.api.world.generator.GenerationStage;
import com.dfsek.terra.api.world.generator.Palette;
import com.dfsek.terra.api.world.generator.Sampler;
public class NoiseChunkGenerator3D implements ChunkGenerator {
private final ConfigPack configPack;
private final TerraPlugin main;
private final List<GenerationStage> generationStages = new ArrayList<>();
private final BlockState air;
public NoiseChunkGenerator3D(ConfigPack c, TerraPlugin main) {
this.configPack = c;
this.main = main;
this.air = main.getWorldHandle().air();
c.getStages().forEach(stage -> generationStages.add(stage.newInstance(c)));
}
@SuppressWarnings("try")
static void biomes(@NotNull World world, int chunkX, int chunkZ, @NotNull BiomeGrid biome, TerraPlugin main) {
try(ProfileFrame ignore = main.getProfiler().profile("biomes")) {
int xOrig = (chunkX << 4);
int zOrig = (chunkZ << 4);
long seed = world.getSeed();
BiomeProvider grid = world.getBiomeProvider();
for(int x = 0; x < 4; x++) {
for(int z = 0; z < 4; z++) {
int cx = xOrig + (x << 2);
int cz = zOrig + (z << 2);
TerraBiome b = grid.getBiome(cx, cz, seed);
biome.setBiome(cx, cz, b.getVanillaBiomes().get(b.getGenerator().getBiomeNoise(), cx, 0, cz, world.getSeed()));
}
}
}
}
@Override
@SuppressWarnings("try")
public ChunkData generateChunkData(@NotNull World world, Random random, int chunkX, int chunkZ, ChunkData chunk) {
try(ProfileFrame ignore = main.getProfiler().profile("chunk_base_3d")) {
BiomeProvider grid = world.getBiomeProvider();
int xOrig = (chunkX << 4);
int zOrig = (chunkZ << 4);
Sampler sampler = world.getConfig().getSamplerCache().getChunk(chunkX, chunkZ);
long seed = world.getSeed();
for(int x = 0; x < 16; x++) {
for(int z = 0; z < 16; z++) {
int paletteLevel = 0;
int cx = xOrig + x;
int cz = zOrig + z;
TerraBiome biome = grid.getBiome(cx, cz, seed);
PaletteInfo paletteInfo = biome.getContext().get(PaletteInfo.class);
if(paletteInfo == null) {
main.logger().info("null palette: " + biome.getID());
}
GenerationSettings generationSettings = biome.getGenerator();
int sea = paletteInfo.getSeaLevel();
Palette seaPalette = paletteInfo.getOcean();
boolean justSet = false;
BlockState data = null;
for(int y = world.getMaxHeight() - 1; y >= world.getMinHeight(); y--) {
if(sampler.sample(x, y, z) > 0) {
justSet = true;
data = PaletteUtil.getPalette(x, y, z, generationSettings, sampler, paletteInfo).get(paletteLevel, cx, y, cz,
seed);
chunk.setBlock(x, y, z, data);
paletteLevel++;
} else if(y <= sea) {
chunk.setBlock(x, y, z, seaPalette.get(sea - y, x + xOrig, y, z + zOrig, seed));
justSet = false;
paletteLevel = 0;
} else {
justSet = false;
paletteLevel = 0;
}
}
}
}
return chunk;
}
}
@Override
public void generateBiomes(@NotNull World world, @NotNull Random random, int chunkX, int chunkZ, @NotNull BiomeGrid biome) {
biomes(world, chunkX, chunkZ, biome, main);
}
@Override
public Sampler createSampler(int chunkX, int chunkZ, BiomeProvider provider, World world, int elevationSmooth) {
return new Sampler3D(chunkX, chunkZ, provider, world, elevationSmooth);
}
@Override
public ConfigPack getConfigPack() {
return configPack;
}
@Override
public TerraPlugin getMain() {
return main;
}
@Override
public List<GenerationStage> getGenerationStages() {
return generationStages;
}
@Override
public BlockState getBlock(World world, int x, int y, int z) {
BiomeProvider provider = world.getBiomeProvider();
TerraBiome biome = provider.getBiome(x, z, world.getSeed());
Sampler sampler = world.getConfig().getSamplerCache().get(x, z);
PaletteInfo paletteInfo = biome.getContext().get(PaletteInfo.class);
Palette palette = PaletteUtil.getPalette(x, y, z, biome.getGenerator(), sampler, paletteInfo);
int fdX = FastMath.floorMod(x, 16);
int fdZ = FastMath.floorMod(z, 16);
double noise = sampler.sample(fdX, y, fdZ);
if(noise > 0) {
int level = 0;
for(int yi = world.getMaxHeight() - 1; yi > y; yi--) {
if(sampler.sample(fdX, yi, fdZ) > 0) level++;
else level = 0;
}
return palette.get(level, x, y, z, world.getSeed());
} else if(y <= paletteInfo.getSeaLevel()) {
return paletteInfo.getOcean().get(paletteInfo.getSeaLevel() - y, x, y, z, world.getSeed());
} else return air;
}
private boolean placeStair(BlockState orig, ChunkData chunk, Vector3 block, double thresh, Sampler sampler, BlockState stairNew) {
if(sampler.sample(block.getBlockX() - 0.55, block.getY(), block.getZ()) > thresh) {
stairNew.set(Properties.DIRECTION, Direction.WEST);
} else if(sampler.sample(block.getBlockX(), block.getY(), block.getZ() - 0.55) > thresh) {
stairNew.set(Properties.DIRECTION, Direction.NORTH);
} else if(sampler.sample(block.getBlockX(), block.getY(), block.getZ() + 0.55) > thresh) {
stairNew.set(Properties.DIRECTION, Direction.SOUTH);
} else if(sampler.sample(block.getX() + 0.55, block.getY(), block.getZ()) > thresh) {
stairNew.set(Properties.DIRECTION, Direction.EAST);
} else stairNew = null;
if(stairNew != null) {
stairNew.setIfPresent(Properties.WATERLOGGED, orig.getBlockType().isWater());
chunk.setBlock(block.getBlockX(), block.getBlockY(), block.getBlockZ(), stairNew);
return true;
}
return false;
}
}

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