9
0
mirror of https://github.com/VolmitSoftware/Iris.git synced 2025-12-21 16:09:29 +00:00

Compare commits

..

290 Commits

Author SHA1 Message Date
Brian Neumann-Fopiano
93db7ee0ee coco's other pr 2023-06-11 14:09:15 -04:00
Brian Fopiano
9ba4dd4099 Merge pull request #995 from CocoTheOwner/printWrongSpawner
Better print information about wrong spawner on marker
2023-06-11 14:00:09 -04:00
Brian Neumann-Fopiano
36efacf43c inc dim 2023-06-11 13:36:35 -04:00
Brian Neumann-Fopiano
d9bf91afa5 1.20 2023-06-11 13:05:23 -04:00
Brian Neumann-Fopiano
b0c96be841 1.20 Baseline 2023-06-07 16:50:44 -04:00
Sjoerd van de Goor
673b08f174 Merge branch 'master' into printWrongSpawner 2023-06-06 19:19:47 +02:00
Sjoerd van de Goor
989778af26 print in case a wrong spawner is specified 2023-06-06 19:18:47 +02:00
Brian Neumann-Fopiano
f5a3a7eb1a wm 2023-06-01 14:11:41 -04:00
Brian Neumann-Fopiano
7a97928c21 added a configurable 2023-05-31 12:19:32 -04:00
Brian Neumann-Fopiano
12a6d022cf other updates! 2023-05-16 23:38:37 -04:00
Brian Neumann-Fopiano
e3d2dfa99e Merge remote-tracking branch 'origin/master' 2023-05-16 23:32:12 -04:00
Brian Neumann-Fopiano
35cc39e9e2 cleanup plugin 2023-05-16 23:32:01 -04:00
Brian Fopiano
006b0b4a03 Update README.md 2023-04-29 18:52:20 -04:00
Brian Neumann-Fopiano
ec939b9f78 updated dependencies 2023-04-25 12:21:11 -04:00
Brian Neumann-Fopiano
7a94f53735 V+ 2023-04-20 00:12:20 -04:00
Brian Neumann-Fopiano
a9efe146ba Probably fixed * 2023-04-13 21:28:46 -04:00
Vatuu
956e2f6b06 Fixed Oraxen integration. 2023-04-13 23:24:12 +02:00
Brian Neumann-Fopiano
72623e0acf V+ 2023-04-12 18:05:47 -04:00
Brian Neumann-Fopiano
e0f673bc3c Overworld Tag update to 3001 2023-04-12 18:05:08 -04:00
Brian Neumann-Fopiano
fe40f12d2e Merge remote-tracking branch 'origin/master' 2023-04-12 18:02:18 -04:00
Brian Fopiano
0fda7a8506 Merge pull request #990 from CrazyDev05/oraxen_implementation_fix 2023-04-11 00:06:06 -04:00
Brian Neumann-Fopiano
22887da769 Added IPECTER's nms line
should fix compiling
2023-04-10 18:14:57 -04:00
Vatuu
a1e0a8ffc1 Fixed ItemsAdder integration. 2023-04-10 19:26:29 +02:00
CrazyDev22
62010116d7 change split limit from '1' to '2' 2023-04-10 13:05:09 +02:00
Brian Neumann-Fopiano
6ebcd02ae6 Fixed the pregen error! 2023-04-08 00:26:05 -04:00
Brian Fopiano
051015656a Merge pull request #986 from CocoTheOwner/re-slope-condition
Patches an issue with slope conditions when placing with commands
2023-04-04 14:00:19 -04:00
Sjoerd van de Goor
ee082762c6 Update object placer to ignore some stuff when using commands 2023-04-03 21:22:08 +02:00
Brian Fopiano
e967b5e052 Merge pull request #982 from CocoTheOwner/re-slope-condition
Reimplement slope condition
2023-04-02 15:39:42 -04:00
Brian Neumann-Fopiano
36505e2fa1 forgot v+ 2023-04-02 15:19:58 -04:00
Vatuu
502aa054f6 🧌 Fixed Color and Seed Issue. 2023-04-02 21:10:44 +02:00
Sjoerd van de Goor
cc5a880fd7 reimplement slope condition 2023-03-29 21:36:18 +02:00
Vatuu
6f9ad8b0eb Update to 1.19.4 2023-03-27 23:24:58 +02:00
Vatuu
ac6ab74d48 🧌 CustomItems support is pretty scuffed. Make it a gradle dependency already. 2023-03-27 23:22:15 +02:00
Brian Neumann-Fopiano
807ed2b247 gradelized patch
I'm not including this until it can be gradle-ized for sake of public compilation
2023-03-16 14:10:32 -04:00
Brian Neumann-Fopiano
367de5a8fd v+ 2023-03-16 14:03:54 -04:00
Vatuu
5bf2da714a Whoops. 2023-03-13 19:28:02 +01:00
Vatuu
cc90f42deb Implement CustomItems support. 2023-03-13 13:19:37 +01:00
Vatuu
20ceaead09 Fixed Oraxen and IA Integration. 2023-03-10 19:08:46 +01:00
Brian Fopiano
3ec2f8fb7b Merge pull request #962 from CocoTheOwner/render-continent-v2
Replace continent renderer with biomeStream
2023-03-05 19:18:54 -05:00
Brian Fopiano
6c5fac154e Merge pull request #975 from CocoTheOwner/mm-fix
Fixed mythicmobs and implements it properly.
2023-03-05 19:18:10 -05:00
Sjoerd van de Goor
540ab8f0d2 If special then unknown default should still be skipped 2023-03-03 23:57:37 +01:00
Brian Fopiano
17d2ac8d70 Merge pull request #973 from CocoTheOwner/spawn-entity
Entity spawn command for testing
2023-03-03 14:38:23 -08:00
Brian Fopiano
a6ebdead19 Merge pull request #966 from CocoTheOwner/update-world-nice
nicer command :)
2023-03-03 14:37:31 -08:00
Brian Fopiano
aa7631ecd0 Merge pull request #974 from CocoTheOwner/copypastafix
Fix copy paste of string gone wrong
2023-03-03 14:37:04 -08:00
Sjoerd van de Goor
4e138cad9f Why 2023-03-03 23:23:19 +01:00
Sjoerd van de Goor
7e55b5fcee Import MM 2023-03-03 23:23:15 +01:00
Sjoerd van de Goor
e19e5278b4 shouldve seen that, oops. 2023-03-03 23:01:09 +01:00
Sjoerd van de Goor
dfcd2dc83e lol 2023-03-03 21:59:42 +01:00
Sjoerd van de Goor
8775f842e6 Spawn command 2023-03-03 21:57:13 +01:00
Sjoerd van de Goor
7b07a4ba6c Location context needed to spawn entities 2023-03-03 21:56:33 +01:00
Sjoerd van de Goor
d78e5973e9 nicer command :) 2023-02-23 19:13:14 +01:00
CocoTheOwner
110d296184 Replace bridge with stream used in /ir what biome 2023-02-17 11:51:27 +01:00
CocoTheOwner
23cd5c117b Replace continent renderer with bridgeStream 2023-02-17 11:25:26 +01:00
CocoTheOwner
131c4692bc Remove DEFER from InferredType
Unused
2023-02-17 11:25:10 +01:00
Brian Neumann-Fopiano
f6571367db v+ oops 2023-02-15 18:41:17 -05:00
Brian Fopiano
f5c64c7480 Merge pull request #960 from CocoTheOwner/render-continent
Continent (i.e. heightmap + ocean/land division) render
2023-02-15 14:47:14 -08:00
Brian Fopiano
085f63a915 Merge pull request #961 from CocoTheOwner/slopes-rotation
Implements slope rotation
2023-02-15 14:46:48 -08:00
Brian Fopiano
3e022e1931 Merge pull request #954 from CocoTheOwner/slopes
Slope condition
2023-02-15 14:46:28 -08:00
Brian Fopiano
0dba3725ae Merge pull request #953 from CocoTheOwner/mm-set-stuff
MM should set its own stuff
2023-02-15 14:44:42 -08:00
Brian Fopiano
8bb409df4e Merge pull request #952 from CocoTheOwner/fix-image-math
Fix image mapping math
2023-02-15 14:44:09 -08:00
Brian Fopiano
603168a147 Merge pull request #951 from CocoTheOwner/fix-decree-conv
Actually check for origin on command invoke
2023-02-15 14:42:57 -08:00
Sjoerd van de Goor
2a95edd860 further documentation and cleaner code 2023-02-15 14:14:26 +01:00
Sjoerd van de Goor
e94406fb45 Implement rotation, remove precise rotation. 2023-02-15 14:05:34 +01:00
Sjoerd van de Goor
e5a7b5d0c6 Reformulate todo 2023-02-15 13:12:34 +01:00
Sjoerd van de Goor
d6f816fe2f Flipped water / land 2023-02-15 13:00:13 +01:00
Sjoerd van de Goor
c15d4a349f map to 255 range 2023-02-15 12:55:43 +01:00
Sjoerd van de Goor
3ce832583c Continent (i.e. heightmap + ocean/land division) render 2023-02-15 12:49:20 +01:00
Sjoerd van de Goor
5514fd2645 Proper ordering 2023-02-08 01:51:39 +01:00
Sjoerd van de Goor
66d07dcaca Revert "Slope condition"
This reverts commit d4c0e07b1d.
2023-02-08 01:35:18 +01:00
Sjoerd van de Goor
c1cf8e88ee That is pretty necessary 2023-02-08 01:33:31 +01:00
Sjoerd van de Goor
684bd739b9 Slope rotation (unfinished) 2023-02-08 01:30:12 +01:00
Sjoerd van de Goor
d4c0e07b1d Slope condition 2023-02-08 01:29:30 +01:00
Sjoerd van de Goor
a6ea6fcfb2 better 2023-02-07 17:39:44 +01:00
Sjoerd van de Goor
c366ec0c40 MM should set its own stuff 2023-02-07 17:26:06 +01:00
CocoTheOwner
8d715e2e4e x != z 2023-02-06 15:43:27 +01:00
CocoTheOwner
dea3ec80ac Fix image mapping math
Fixes snippet code, prevents an NPE, fixes centered for coordinateScale scaled image noises, fixes tiling on negative numbers (-1 % 2 = -1, a free fuck you from java)
2023-02-06 15:39:28 +01:00
CocoTheOwner
4053f05ba9 Actually check for origin on command invoke 2023-02-06 14:58:17 +01:00
Brian Neumann-Fopiano
ef07ec2c62 Datapack Shenanigans 2023-02-04 14:38:30 -05:00
Brian Neumann-Fopiano
0ffc64231b V+ 2023-01-17 12:38:32 -05:00
Brian Neumann-Fopiano
fe112c3ba5 Actuator Cleanup 2023-01-17 12:35:40 -05:00
Brian Neumann-Fopiano
2fa03aac3b Tweaked Min/Max Values 2023-01-17 12:35:26 -05:00
Brian Neumann-Fopiano
6ac5ad880d Simplified 2023-01-17 12:35:13 -05:00
Brian Neumann-Fopiano
54f14392d9 Removed Redundant World Init 2023-01-17 12:35:03 -05:00
Brian Fopiano
c7ecdaf8a8 Merge pull request #944 from ColorsWind/Development
fix issue with `bukkit.yml` world-container option
2023-01-15 12:02:28 -08:00
ColorsWind
497c24a3b6 fix issue with bukkit.yml world-container option 2023-01-05 15:58:57 +08:00
Brian Fopiano
00aa26e602 oops 2022-12-28 13:27:24 -05:00
Brian Fopiano
3796381156 Merge remote-tracking branch 'origin/Development' into Development 2022-12-28 13:23:05 -05:00
Brian Fopiano
b0c5700cf5 Experimental Speedy things with New java 2022-12-28 13:23:00 -05:00
Brian Fopiano
78a4b1d2ce Clean 2022-12-28 13:05:32 -05:00
Brian Fopiano
e5e6b9848f Merge pull request #943 from simon44556/master
- Update ender eye usage to ignore portal frame clicks
2022-12-25 18:06:14 -05:00
simon44556
3e36f57f14 - Update ender eye usage to ignore portal frame clicks 2022-12-25 18:00:17 +01:00
Brian Fopiano
d794ede4d8 Vwoop 2022-12-22 15:09:37 -05:00
Brian Fopiano
7a4d97d76a Version Check? 2022-12-22 14:38:20 -05:00
Brian Fopiano
e76ab1d367 . 2022-12-22 14:23:52 -05:00
Brian Fopiano
9731feff7f hmmm 2022-12-19 20:36:36 -05:00
cyberpwn
4ce790082d Gource is cool 2022-12-11 12:32:05 -05:00
Brian Fopiano
065b748036 Merge pull request #938 from VolmitSoftware/Development
Development
2022-12-09 18:09:21 -08:00
Brian Neumann-Fopiano
76891d246f HUGE changes 2022-12-09 18:05:47 -08:00
Brian Neumann-Fopiano
0832007991 it compiles, not working 2022-12-08 19:40:13 -08:00
Brian Fopiano
87302a046c Merge pull request #933 from VolmitSoftware/Development
Development
2022-11-30 10:07:07 -08:00
Brian Neumann-Fopiano
f0f7453b32 V+ 2022-11-30 10:05:34 -08:00
Brian Neumann-Fopiano
2991bea248 updated pack 2022-11-30 10:04:25 -08:00
Brian Neumann-Fopiano
673b42c2f5 Papi and Biome location better 2022-11-30 08:55:27 -08:00
Brian Neumann-Fopiano
7d994e27e3 "A Biome" changed to be more desctiptive 2022-11-30 08:55:05 -08:00
Brian Fopiano
5f2b82aac7 Merge pull request #926 from VolmitSoftware/Development
Development
2022-11-12 13:34:06 -08:00
Brian Neumann-Fopiano
af1a03cb67 Optimization Overhaul 2022-11-12 13:31:39 -08:00
Vatuu
85fbbeca9d Preparing the POI System. 2022-11-05 15:12:17 +01:00
Brian Fopiano
a64272620f Merge pull request #920 from VolmitSoftware/Development
Development
2022-10-28 13:14:47 -07:00
Brian Neumann-Fopiano
ef9966d02b V+ 2022-10-28 13:07:11 -07:00
Vatuu
a28e5bb38a Updated overworld version. 2022-10-28 22:03:23 +02:00
Vatuu
34670759e9 Fixed eyes of enders not properly targeting strongholds. 2022-10-28 22:02:05 +02:00
Vatuu
7dd1d3881a Fixed strongholds not generating properly. 2022-10-28 22:01:23 +02:00
Brian Fopiano
7b93542014 Merge pull request #916 from VolmitSoftware/Development
Grad
2022-10-21 02:01:15 -07:00
Vatuu
ea1ac0a154 V+ 2022-10-21 08:38:56 +02:00
Vatuu
35c7068fa6 Merge remote-tracking branch 'origin/master' 2022-10-21 08:36:36 +02:00
Vatuu
db4cbb2ea6 Updated overworld tag. 2022-10-21 08:36:11 +02:00
Brian Neumann-Fopiano
fa7c073999 Grad 2022-10-12 03:13:25 -07:00
Brian Fopiano
72a077662d Merge pull request #915 from VolmitSoftware/Development
V+
2022-10-12 02:54:10 -07:00
Brian Neumann-Fopiano
137abb04b2 V+ 2022-10-12 02:52:49 -07:00
Vatuu
211b15332d Code Cleanup, the second. 2022-10-12 07:13:03 +02:00
Brian Fopiano
f6fbcade17 Merge pull request #913 from VolmitSoftware/Development
Development
2022-10-07 18:58:13 -07:00
Brian Fopiano
1ef115fee8 V+ 2022-10-07 18:51:45 -07:00
Vatuu
7973444fc5 Code Cleanup. 2022-10-07 23:58:21 +02:00
Vatuu
2bdb0bfa69 Fixed #901: Longs are now properly parsed by decree. 2022-10-05 04:20:08 +02:00
Vatuu
bfb6f82ea3 Fixed /iris create not installing datapacks. 2022-10-05 04:16:50 +02:00
Brian Fopiano
7729ce3753 Merge pull request #911 from VolmitSoftware/Development
Development
2022-09-30 21:19:06 -07:00
Brian Fopiano
f6ea171669 V+ 2022-09-30 21:18:58 -07:00
tanticle
ff081ebc11 Merge remote-tracking branch 'origin/Development' into Development 2022-09-28 02:41:14 +02:00
tanticle
0818f971fe Added #816: Whitelist and blacklist for decorators. 2022-09-28 02:40:52 +02:00
tanticle
27070f44c7 Fixed block drops. 2022-09-28 02:00:34 +02:00
Brian Fopiano
8331cbe375 Merge pull request #910 from VolmitSoftware/Development
Hotfix
2022-09-25 16:43:11 -07:00
Vatuu
f533ec34b0 Hotfix 2022-09-25 16:42:36 -07:00
Vatuu
23d4fcb827 Hotfix because Brian did a bad 2022-09-26 01:09:08 +02:00
Brian Fopiano
a248962f1b Merge pull request #909 from VolmitSoftware/Development
Development
2022-09-23 20:03:37 -07:00
Vatuu
afa8fad8e9 V+ 2022-09-24 04:54:32 +02:00
Vatuu
4c423bb493 Resolved #878: Certain values in settings are no longer ignored. 2022-09-24 04:52:42 +02:00
Vatuu
e660fe9e1e Resolved #892: Snow no longer replaces objects. 2022-09-24 04:43:47 +02:00
Vatuu
23c1d12e73 Removed deprecated repository. 2022-09-23 14:58:39 +02:00
Brian Fopiano
9cf2785626 Merge pull request #908 from VolmitSoftware/iris-go-fast-but-not-stable
Pregen improvements
2022-09-21 07:27:20 -07:00
Brian Fopiano
b8b65c7e3e Merge pull request #907 from VolmitSoftware/Development
Development
2022-09-21 07:13:01 -07:00
Vatuu
dcb467280a V+ 2022-09-21 01:52:20 +02:00
Vatuu
6aa802b42d Merge remote-tracking branch 'origin/Development' into Development 2022-09-21 01:49:58 +02:00
Vatuu
d78f6ca589 Resolved #900: Remaining time in days corrected. 2022-09-21 01:48:53 +02:00
Vatuu
493f8e0cc0 Resolved #897: Adjusted Y-Offset 2022-09-21 01:12:35 +02:00
Vatuu
119563c553 Resolved #871: Removed /iris std clean 2022-09-20 23:55:18 +02:00
cyberpwn
2d61e6af66 Pregen improvements 2022-09-16 09:09:23 -04:00
Brian Fopiano
aa1be934a9 Merge pull request #899 from VolmitSoftware/iris-go-fast-but-not-stable
Jesus Fucking Christ
2022-09-16 02:05:01 -07:00
Brian Fopiano
f9c98b0a60 Needs to be Sync now 2022-09-16 01:52:17 -07:00
Brian Fopiano
bd66fa3bf5 Tag Bump 2022-09-16 00:50:38 -07:00
Brian Fopiano
380f191f6a V+ 2022-09-16 00:48:27 -07:00
cyberpwn
7e217b5fba More permits 2022-09-16 03:40:31 -04:00
cyberpwn
c4a516a858 f 2022-09-16 03:37:36 -04:00
cyberpwn
bdf181e348 ff 2022-09-16 03:28:47 -04:00
cyberpwn
f4ea1343b4 m 2022-09-16 03:27:32 -04:00
cyberpwn
a37ccddd38 f 2022-09-16 03:26:23 -04:00
cyberpwn
243ef8c0be f 2022-09-16 03:24:56 -04:00
cyberpwn
00d099383b Fix 2022-09-16 03:22:56 -04:00
cyberpwn
dda3f0b8e9 Mhmmmmm 2022-09-16 03:16:57 -04:00
cyberpwn
00f4d8b1ee Hmm? 2022-09-16 03:16:04 -04:00
cyberpwn
2f5198d533 Safe 2022-09-15 02:35:34 -04:00
cyberpwn
148261f876 Dirrrrrrrrrrrrty 2022-09-15 02:32:29 -04:00
cyberpwn
60843b3bb9 f 2022-09-14 13:30:39 -04:00
DanMB
2ad9a525bd Biome holder injection post gen 2022-09-14 03:56:06 -04:00
DanMB
78e9f21439 f 2022-09-13 23:32:11 -04:00
DanMB
a66d60eaea woah 2022-09-13 23:06:52 -04:00
DanMB
3aa3c13477 Test speed 2022-09-13 22:55:26 -04:00
cyberpwn
cc850522e6 BRRRRRRRRRRRRRRRRRRR 2022-09-13 09:29:07 -04:00
Brian Fopiano
6d28f57f88 Merge pull request #894 from VolmitSoftware/master
d
2022-09-12 16:00:36 -07:00
Brian Fopiano
563e0a7cd4 V+ 2022-09-12 16:00:14 -07:00
Brian Fopiano
2f2f857e98 Merge pull request #893 from VolmitSoftware/Development
Development
2022-09-12 15:59:20 -07:00
cyberpwn
251c52a2ee Fix cave mod engine npe 2022-09-12 17:26:14 -04:00
cyberpwn
7528bd343b 3x 2022-09-12 07:06:45 -04:00
cyberpwn
06d9f279ac f 2022-09-11 23:00:15 -04:00
cyberpwn
044403b829 Fix incorrect object positions 2022-09-11 21:31:21 -04:00
Brian Fopiano
5a24dd3b49 Revert "Revert "Eat me""
This reverts commit 3189b3c7a5.
2022-09-11 21:00:55 -04:00
Brian Fopiano
3189b3c7a5 Revert "Eat me"
This reverts commit da777da476.
2022-09-11 21:00:38 -04:00
cyberpwn
3bf1c6a282 Merge remote-tracking branch 'origin/Development' into Development 2022-09-11 20:59:04 -04:00
cyberpwn
7c7309c3ab Unload mantle when not generating 2022-09-11 20:58:58 -04:00
Brian Fopiano
da777da476 Eat me 2022-09-11 17:57:08 -07:00
cyberpwn
3d0c0a11ed Merge remote-tracking branch 'origin/Development' into Development 2022-09-10 02:04:58 -04:00
cyberpwn
e545269b93 Even less waste work & prefetch caching 2022-09-10 02:03:59 -04:00
Brian Fopiano
141ca76647 Merge pull request #890 from VolmitSoftware/Development
Development
2022-09-09 18:05:56 -07:00
Brian Fopiano
94557830f5 v+ 2022-09-09 18:02:21 -07:00
Vatuu
49acb7faba Merge remote-tracking branch 'origin/Development' into Development 2022-09-09 21:42:53 +02:00
Vatuu
1904f67662 Fixed Issue #864: Mantle not retaining object placements. 2022-09-09 19:48:23 +02:00
Vatuu
5b2bf38344 Fixed Issue #884: Cache freaking out on global override. 2022-09-09 18:10:52 +02:00
cyberpwn
494c38a153 Merge remote-tracking branch 'origin/Development' into Development 2022-09-09 01:25:16 -04:00
cyberpwn
dd4b85cbfe Fixes 2022-09-09 01:24:20 -04:00
Brian Fopiano
8f7b54a5a4 Merge pull request #889 from VolmitSoftware/Development
Development
2022-09-08 17:26:41 -07:00
Vatuu
cec502340e V+ 2022-09-09 01:15:53 +02:00
Vatuu
64e27c7fb0 Disabled blockdrops as hotfix. 2022-09-09 01:15:07 +02:00
cyberpwn
b2bbd31548 Disable multicore chunks 2022-09-07 17:07:34 -04:00
Brian Fopiano
17df92a07c Merge pull request #887 from VolmitSoftware/Development
Development
2022-09-06 20:55:18 -07:00
Brian Fopiano
2b749b5ab7 NMS update / Compile 2022-09-06 20:51:59 -07:00
cyberpwn
28e3402d88 r 2022-09-05 14:17:56 -04:00
cyberpwn
d96bb061e0 Update repo 2022-09-05 14:14:50 -04:00
Brian Fopiano
e6def804f8 Merge pull request #883 from VolmitSoftware/Development
Development
2022-09-02 17:48:22 -07:00
Vatuu
a5be48c07c V+ 2022-09-02 23:35:38 +02:00
Vatuu
fe3909f594 Fixed block drops not firing for biomes. 2022-09-02 23:32:51 +02:00
Vatuu
f37d91a530 Fixed loot table object override not working. 2022-09-02 23:26:47 +02:00
Vatuu
614ef78771 Fixed reliance on outdated spigot api version. 2022-09-02 20:32:17 +02:00
Brian Fopiano
fb294fc03c Merge pull request #879 from VolmitSoftware/Development
Changelog:

- Fixed Vines, Again! for Floors
- Merged stability changes
- Made the folder checking system recursive
2022-08-30 10:20:38 -07:00
Vatuu
8c7e7c3d48 Merge remote-tracking branch 'origin/Development' into Development 2022-08-30 19:15:16 +02:00
Vatuu
98b6280652 V+ 2022-08-30 19:15:05 +02:00
Vatuu
7c4c2d6382 Fixed autocomplete only going two dirs deep. 2022-08-30 19:14:28 +02:00
Vatuu
1a29ea302e Fixed vines not properly generating using decorators. 2022-08-30 18:06:17 +02:00
Brian Fopiano
be39fce741 Merge pull request #876 from VolmitSoftware/Development
Changelog:

Fixed Versioning compilation issues
Forceblock nolonger Crashes
Forceblock Works now (as intended, as far as we can tell)
2022-08-26 16:10:38 -07:00
Brian Fopiano
4fed2e6e5f Merge branch 'master' into Development 2022-08-26 16:10:26 -07:00
Vatuu
14ae5809b0 Forceblock now properly works. 2022-08-26 19:05:33 +02:00
Vatuu
0f66aa47c9 Reverted generator change 2022-08-26 18:36:09 +02:00
Vatuu
cf85d300f4 Solving seed collisions on generators? 2022-08-26 17:54:56 +02:00
Vatuu
91d60e56df Fixed jar using the wrong version. 2022-08-26 17:27:49 +02:00
Brian Fopiano
1d3681beb4 Merge pull request #872 from VolmitSoftware/Development
Development
2022-08-23 18:51:22 -04:00
Vatuu
0b403cf329 Merge remote-tracking branch 'origin/Development' into Development 2022-08-23 17:22:17 +02:00
Vatuu
8ba75899e3 Fixed block drops. 2022-08-23 17:21:54 +02:00
Vatuu
4d4ed72159 _Maybe_ fixed mantle not retaining after restart? 2022-08-23 17:19:16 +02:00
Vatuu
b72bf072b3 _Maybe_ fixed mantle not retaining after restart? 2022-08-23 17:11:28 +02:00
Vatuu
4edcb54b31 Fixed /iris what biome not working. 2022-08-23 15:51:04 +02:00
Brian Fopiano
eae7fc0e53 V+ 2022-08-18 19:00:47 -07:00
Brian Fopiano
fddacd4410 Merge pull request #863 from VolmitSoftware/Development
Development Update
2022-08-18 19:00:04 -07:00
Brian Fopiano
de6c4b9a30 Merge remote-tracking branch 'origin/Development' into Development 2022-08-17 20:22:04 -07:00
Brian Fopiano
6990e34138 Removed SoftDepends, Fixed Auth 2022-08-17 20:21:59 -07:00
DanMB
d9883697ef Change dep to match nms version var 2022-08-16 19:14:35 -07:00
Brian Fopiano
05a26ff8b2 Revert "helping with version Nomners"
This reverts commit 0765c21cef.
2022-08-16 16:01:36 -07:00
Brian Fopiano
84bb082d44 Merge pull request #856 from VolmitSoftware/Development
Development
2022-08-16 13:06:00 -07:00
Brian Fopiano
a0db94d84f Merge branch 'master' into Development 2022-08-16 13:05:54 -07:00
Brian Fopiano
0367b4ecd7 v+ 2022-08-16 13:04:27 -07:00
Vatuu
dbc425dce6 Added autocomplete for enchantment types. 2022-08-16 16:08:25 +02:00
Vatuu
116c017c6d Fixed enchantments not applying to loot. 2022-08-16 15:45:48 +02:00
Vatuu
9c387475f0 Cleaned up IrisLoot. 2022-08-16 15:21:18 +02:00
Brian Fopiano
0765c21cef helping with version Nomners 2022-08-13 03:20:42 -07:00
Brian Fopiano
2871038584 v+ 2022-08-12 15:43:39 -07:00
Brian Fopiano
340885f939 Merge pull request #849 from VolmitSoftware/Development
Development
2022-08-12 15:43:09 -07:00
Vatuu
1e32e47f54 Merge remote-tracking branch 'origin/Development' into Development 2022-08-13 00:37:59 +02:00
Vatuu
3c759f3b01 Kinda fixed vine issues with PAINT. 2022-08-13 00:37:42 +02:00
DanMB
6615f34d20 Merge remote-tracking branch 'origin/Development' into Development 2022-08-12 08:05:53 -07:00
DanMB
3a4aac1ee4 Get all 2022-08-12 08:05:48 -07:00
Brian Fopiano
4d6c092615 Performance... 2022-08-11 18:34:38 -07:00
DanMB
93421a1dc9 An attempt 2022-08-11 18:18:00 -07:00
Brian Fopiano
209458a856 Merge pull request #847 from VolmitSoftware/Development
Development update
2022-08-09 13:50:26 -07:00
DanMB
82bd94620e Lock biomes first before generating to help cache 2022-08-07 16:10:49 -07:00
DanMB
af9f017871 Hold your horses pregenerator 2022-08-07 16:09:36 -07:00
Brian Fopiano
2f8922ea87 Updating Version and NMS 2022-08-07 14:14:39 -07:00
Brian Fopiano
0ea936f3fe Merge pull request #845 from VolmitSoftware/Development
Development
2022-08-04 08:50:17 -07:00
Brian Fopiano
d1870ee0a8 V+ 2022-08-04 08:43:03 -07:00
Vatuu
d2151690ad Fixed pregen memory leak. 2022-08-04 00:27:33 +02:00
Brian Fopiano
dff373e7d5 Merge pull request #843 from CocoTheOwner/sortedNoise
sort noise
2022-07-30 16:23:45 -07:00
CocoTheOwner
0aec2a664f sort noise 2022-07-30 22:19:02 +01:00
Brian Fopiano
723b696393 Merge pull request #838 from VolmitSoftware/Development
Development
2022-07-29 10:04:58 -07:00
Brian Fopiano
f5f89eb4e4 Merge branch 'master' into Development 2022-07-29 10:04:53 -07:00
Brian Fopiano
df15332c7f Merge pull request #832 from CocoTheOwner/noWarn
Remove warning on create
2022-07-29 10:04:22 -07:00
Vatuu
61d9e5a869 V+ 2022-07-29 19:03:18 +02:00
Brian Fopiano
9628b66a97 Merge pull request #837 from VolmitSoftware/Development
Development Update
2022-07-29 10:02:04 -07:00
Vatuu
5e041366d4 Update to 1.19.1 2022-07-28 18:29:01 +02:00
Vatuu
3ecae8d72c Removed debug printout. 2022-07-28 17:45:51 +02:00
Vatuu
5709ce9d82 Fixed the QOL command being a bitch. 2022-07-28 15:54:31 +02:00
Vatuu
ce3c334ac5 Fixed vines and derivatives not placing properly in objects. 2022-07-27 19:35:18 +02:00
Vatuu
2ed5aa8730 Removed leftover debug message. 2022-07-26 21:41:06 +02:00
Vatuu
8480a63dda Fixed sculk veins not being recognized as vines. 2022-07-26 21:40:28 +02:00
CocoTheOwner
132a1695f3 Bey 2022-07-24 14:20:12 +01:00
Brian Fopiano
21775630c3 Merge pull request #830 from VolmitSoftware/Development
Development
2022-07-21 19:38:44 -07:00
Brian Fopiano
eac2ef7c6d V+ 2022-07-21 19:38:14 -07:00
Vatuu
386997f646 Added forceBlock field for surface decorator. 2022-07-22 02:18:37 +02:00
Vatuu
637b90ad62 Fixed stilted facing blocks not rotating. 2022-07-22 02:06:44 +02:00
Vatuu
95d755c2ec Fixed underwater structures not being waterlogged. 2022-07-22 02:06:00 +02:00
Brian Fopiano
781aeebef6 Merge pull request #826 from CDFN/patch-1
Update bug template for 1.19
2022-07-17 13:17:56 -07:00
Brian Fopiano
5e133fd51a Merge pull request #827 from CocoTheOwner/commands
Add /iris remove command
2022-07-17 13:03:58 -07:00
Brian Fopiano
85f62a3b9d we really cant do this override 2022-07-17 11:08:02 -07:00
DanMB
a32de58c8b Lazy pregen 2022-07-17 08:52:56 -07:00
Brian Fopiano
1cb2ea6c17 Merge pull request #829 from VolmitSoftware/Development
Development
2022-07-16 15:46:30 -07:00
CocoTheOwner
6a37ab7af2 sync world unload 2022-07-16 12:39:42 +02:00
CocoTheOwner
e0f0aaf767 Add remove command 2022-07-16 12:36:28 +02:00
Vatuu
3d7c5b050a Revert "Revert "Added convenience command.""
This reverts commit 6bc57c255f.
2022-07-16 12:33:39 +02:00
Vatuu
6bc57c255f Revert "Added convenience command."
This reverts commit 6b32eb3441.
2022-07-16 11:53:40 +02:00
Vatuu
b82edfe688 V+ 2022-07-16 02:55:59 +02:00
Vatuu
6b32eb3441 Added convenience command. 2022-07-16 02:52:06 +02:00
Vatuu
23a07fa8a5 Fixed vines and glow lichen not generating properly. 2022-07-16 02:41:03 +02:00
Vatuu
b019faedd2 Made the creator not error without a sender. 2022-07-15 20:02:26 +02:00
Bartosz Stefańczyk
4430433a10 Update bug template for 1.19 2022-07-15 16:05:15 +02:00
Brian Fopiano
f52cd29e7b Merge pull request #821 from VolmitSoftware/Development
Development
2022-07-07 14:23:57 -07:00
Vatuu
6a44e593a6 V+ 2022-07-07 23:04:32 +02:00
Vatuu
f7065fe034 Datenpackete werden nun in allen registrierten Welten generiert. 2022-07-07 22:54:54 +02:00
Vatuu
0a247956f7 Fixed colour and printout. 2022-07-07 22:28:59 +02:00
DanMB
03836acded ffff 2022-07-07 13:12:59 -07:00
Brian Fopiano
b5fb277982 Merge pull request #819 from VolmitSoftware/Development
Development update 2.2.2
2022-07-01 16:11:20 -07:00
Vatuu
e523d3c166 V+ 2022-07-02 01:04:39 +02:00
Vatuu
41477e4aa6 Made the overworld use releases instead. (Hack) 2022-07-02 01:03:18 +02:00
Vatuu
fbaf42a8c4 Merge remote-tracking branch 'origin/Development' into Development 2022-07-01 21:00:17 +02:00
Vatuu
1c3668047b Fixed PlaceholderAPI issues. 2022-07-01 20:59:54 +02:00
Vatuu
7d78c69b6e /iris create now registers to bukkit.yml 2022-07-01 18:40:13 +02:00
991 changed files with 125447 additions and 4380 deletions

64
.github/ISSUE_TEMPLATE/bug.yml vendored Normal file
View File

@@ -0,0 +1,64 @@
name: Iris Bug Report
description: File a bug report for Iris
labels: [ bug ]
body:
- type: markdown
attributes:
value: |
Thank you for taking the time to fill this out!
If this does not work for you, feel free to use the [blank](https://github.com/VolmitSoftware/Iris/issues/new) format.
- type: textarea
id: how
attributes:
label: Problem
description: Please give a text description of how you reached the problem
value: |
1. Install Iris...
2. Do this...
3. Do that...
4. Observe the error...
validations:
required: true
- type: textarea
id: what
attributes:
label: Solution
description: Explain where you think the problem comes from (optional)
placeholder: The code to place a is missing b and c...
validations:
required: false
- type: dropdown
id: mcversion
attributes:
label: Minecraft Version
description: What version of Minecraft is the server on?
options:
- 1.14.X
- 1.15.X
- 1.16.X
- 1.17
- 1.17.1
- 1.18
- 1.19
validations:
required: true
- type: input
id: irisversion
attributes:
label: Iris Version
description: What version of Iris are you running? (see console)
placeholder: DO NOT SAY "LATEST"
validations:
required: true
- type: input
id: logs
attributes:
label: Log
description: Paste a full log. Always use [mclogs](https://mclo.gs) Or [Pastebin](https://pastebin.com/). Must not be a crash report. Must be a full log. Must not be a screenshot of a log.
placeholder: https://mslog.gs/...
validations:
required: true
- type: markdown
id: thanks
attributes:
value: "Thank you for filling out the form! We will be with you soon. Please do not ask support to review your report."

46
.github/ISSUE_TEMPLATE/feature.yml vendored Normal file
View File

@@ -0,0 +1,46 @@
name: Iris Feature Request
description: File a feature request for Iris. If you want to report a bug this is not the place.
labels: [ feature ]
body:
- type: markdown
attributes:
value: |
Thank you for taking the time to fill this out!
If this does not work for you, feel free to use the [blank](https://github.com/VolmitSoftware/Iris/issues/new) format.
- type: dropdown
id: arc
attributes:
label: Adding, Removing, or Changing
description: What are you doing
options:
- Adding
- Removing
- Changing
validations:
required: true
- type: input
id: atype
attributes:
label: Type of Modification
description: What is it for?
value: I want to ...
validations:
required: true
- type: textarea
id: desc
attributes:
label: What are you trying to modify
description: Give as detailed of a description as you can for the modification that you want done (include pictures if applicable)
value: The way I would implement this is ...
validations:
required: true
- type: textarea
id: alternative
attributes:
label: Alternatives
description: What alternatives have you considered?
value: If this could not be implemented I would ...
- type: markdown
id: thanks
attributes:
value: "Thank you for filling out the form! We will be with you soon. Please do not ask support to review your report."

1
.gitignore vendored
View File

@@ -1,5 +1,6 @@
build/
libs/
.gradle/

BIN
IRIS.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

518
LICENSE.md Normal file
View File

@@ -0,0 +1,518 @@
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>.

View File

@@ -1,18 +1,17 @@
# IrisBukkit
# Iris
The master branch is for the latest version of minecraft.
# [Support](https://discord.gg/3xxPTpT) **|** [Documentation](https://docs.volmit.com/iris/) **
|** [Git](https://github.com/IrisDimensions)
# [Support](https://discord.gg/3xxPTpT) **|** [Documentation](https://docs.volmit.com/iris/) **|** [Git](https://github.com/IrisDimensions)
# Building
Building IrisBukkit is fairly simple, though you will need to setup a few things if your system has never been used for
java
Building Iris is fairly simple, though you will need to setup a few things if your system has never been used for java
development.
Consider supporting our development by buying IrisBukkit on spigot! We work hard to make IrisBukkit the best it can be
for everyone.
Consider supporting our development by buying Iris on spigot! We work hard to make Iris the best it can be for everyone.
## Preface: if you need help compiling and you are a developer / intend to help out in the community or with development we would love to help you regardless in the discord! however do not come to the discord asking for free copies, or a tutorial on how to compile.
### Command Line Builds
@@ -31,23 +30,20 @@ for everyone.
3. Add `export JAVA_HOME=$(/usr/libexec/java_home)` as a new line
4. Use `CTRL + X`, then Press `Y`, Then `ENTER`
5. Quit & Reopen Terminal and verify with `echo $JAVA_HOME`. It should print a directory
3. If this is your first time building IrisBukkit for MC 1.18+ run `gradlew setup` inside the root IrisBukkit project
folder.
3. If this is your first time building Iris for MC 1.18+ run `gradlew setup` inside the root Iris project folder.
Otherwise, skip this step. Grab a coffee, this may take up to 5 minutes depending on your cpu & internet connection.
4. Once the project has setup, run `gradlew iris`
5. The IrisBukkit jar will be placed in `IrisBukkit/build/IrisBukkit-XXX-XXX.jar` Enjoy! Consider supporting us by
buying it on spigot!
5. The Iris jar will be placed in `Iris/build/Iris-XXX-XXX.jar` Enjoy! Consider supporting us by buying it on spigot!
### IDE Builds (for development)
* Run `gradlew setup` any time you get dependency issues with craftbukkit
* Configure ITJ Gradle to use JDK 17 (in settings, search for gradle)
* Add a build line in the build.gradle for your own build task to directly compile IrisBukkit into your plugins folder
if you
* Add a build line in the build.gradle for your own build task to directly compile Iris into your plugins folder if you
prefer.
* Resync the project & run your newly created task (under the development folder in gradle tasks!)
# IrisBukkit Toolbelt
# Iris Toolbelt
Everyone needs a tool-belt.

View File

@@ -1,41 +1,332 @@
plugins {
id 'java'
id "io.freefair.lombok" version "6.3.0"
}
group 'com.volmit.iris'
version '1.0-SNAPSHOT'
jar {
manifest {
attributes('Contains-Sources': 'java,class')
}
}
allprojects {
apply plugin: 'java'
repositories {
maven { url "https://arcanearts.jfrog.io/artifactory/archives" }
mavenCentral()
}
dependencies {
compileOnly 'org.projectlombok:lombok:1.18.24'
annotationProcessor 'org.projectlombok:lombok:1.18.24'
annotationProcessor 'systems.manifold:manifold-ext:2022.1.19'
implementation 'art.arcane:Source:22.9.3'
implementation 'art.arcane:Cram:22.9.3'
implementation 'art.arcane:Amulet:22.9.5'
implementation 'com.google.code.gson:gson:2.9.0'
implementation 'com.github.ben-manes.caffeine:caffeine:3.1.1'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.2'
testAnnotationProcessor 'systems.manifold:manifold-ext:2022.1.19'
}
}
dependencies {
}
/*
* Iris is a World Generator for Minecraft Bukkit Servers
* Copyright (c) 2021 Arcane Arts (Volmit Software)
*
* 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/>.
*/
plugins {
id 'java'
id 'java-library'
id "io.freefair.lombok" version "6.3.0"
id "com.github.johnrengelman.shadow" version "7.1.2"
id "de.undercouch.download" version "5.0.1"
}
version '2.7.0-1.20.0'
def nmsVersion = '1.20' //[NMS]
def apiVersion = '1.20'
def specialSourceVersion = '1.11.0' //[NMS]
def spigotJarVersion = '1.20-R0.1-SNAPSHOT' //[NMS]
def name = getRootProject().getName() // Defined in settings.gradle
def main = 'com.volmit.iris.Iris'
// ADD YOURSELF AS A NEW LINE IF YOU WANT YOUR OWN BUILD TASK GENERATED
// ======================== WINDOWS =============================
registerCustomOutputTask('Cyberpwn', 'C://Users/cyberpwn/Documents/development/server/plugins')
registerCustomOutputTask('Psycho', 'C://Dan/MinecraftDevelopment/Server/plugins')
registerCustomOutputTask('ArcaneArts', 'C://Users/arcane/Documents/development/server/plugins')
registerCustomOutputTask('Coco', 'D://mcsm/plugins')
registerCustomOutputTask('Strange', 'D://Servers/1.17 Test Server/plugins')
registerCustomOutputTask('Vatuu', 'D://Minecraft/Servers/1.19.4/plugins')
// ========================== UNIX ==============================
registerCustomOutputTaskUnix('CyberpwnLT', '/Users/danielmills/development/server/plugins')
registerCustomOutputTaskUnix('PsychoLT', '/Users/brianfopiano/Desktop/REMOTES/RemoteMinecraft/plugins')
// ==============================================================
/**
* Gradle is weird sometimes, we need to delete the plugin yml from the build folder to actually filter properly.
*/
file(jar.archiveFile.get().getAsFile().getParentFile().getParentFile().getParentFile().getAbsolutePath() + '/build/resources/main/plugin.yml').delete()
/**
* Expand properties into plugin yml
*/
processResources {
filesMatching('**/plugin.yml') {
expand(
'name': name.toString(),
'version': version.toString(),
'main': main.toString(),
'apiversion': apiVersion.toString()
)
}
}
/**
* Unified repo
*/
repositories {
mavenLocal {
content {
includeGroup("org.bukkit")
includeGroup("org.spigotmc")
}
}
mavenCentral()
maven { url "https://arcanearts.jfrog.io/artifactory/archives" }
maven { url "https://mvn.lumine.io/repository/maven-public/" }
maven { url "https://jitpack.io"}
maven { url "https://s01.oss.sonatype.org/content/repositories/snapshots" }
maven { url "https://mvn.lumine.io/repository/maven/" }
maven { url "https://repo.triumphteam.dev/snapshots" }
maven { url "https://repo.mineinabyss.com/releases" }
}
/**
* We need parameter meta for the decree command system
*/
compileJava {
options.compilerArgs << '-parameters'
}
/**
* Configure Iris for shading
*/
shadowJar {
//minimize()
append("plugin.yml")
relocate 'com.dfsek.paralithic', 'com.volmit.iris.util.paralithic'
relocate 'io.papermc.lib', 'com.volmit.iris.util.paper'
relocate 'net.kyori', 'com.volmit.iris.util.kyori'
dependencies {
include(dependency('io.papermc:paperlib'))
include(dependency('com.dfsek:Paralithic'))
include(dependency('net.kyori:'))
}
}
configurations.all {
resolutionStrategy.cacheChangingModulesFor 60, 'minutes'
resolutionStrategy.cacheDynamicVersionsFor 60, 'minutes'
}
/**
* Dependencies.
*
* Provided or classpath dependencies are not shaded and are available on the runtime classpath
*
* Shaded dependencies are not available at runtime, nor are they available on mvn central so they
* need to be shaded into the jar (increasing binary size)
*
* Dynamically loaded dependencies are defined in the plugin.yml (updating these must be updated in the
* plugin.yml also, otherwise they wont be available). These do not increase binary size). Only declare
* these dependencies if they are available on mvn central.
*/
dependencies {
// Provided or Classpath
compileOnly 'org.projectlombok:lombok:1.18.24'
annotationProcessor 'org.projectlombok:lombok:1.18.24'
implementation 'org.spigotmc:spigot-api:1.20-R0.1-SNAPSHOT'
implementation 'org.bukkit:craftbukkit:1.20-R0.1-SNAPSHOT:remapped-mojang' //[NMS]
// Third Party Integrations
implementation 'com.github.oraxen:oraxen:1.152.5'
implementation 'com.github.LoneDev6:api-itemsadder:3.4.1-r4'
implementation 'me.clip:placeholderapi:2.11.3'
//implementation files('libs/CustomItems.jar')
// Shaded
implementation 'com.dfsek:Paralithic:0.4.0'
implementation 'io.papermc:paperlib:1.0.5'
implementation "net.kyori:adventure-text-minimessage:4.13.1"
implementation 'net.kyori:adventure-platform-bukkit:4.3.0'
implementation 'net.kyori:adventure-api:4.13.1'
implementation 'io.lumine:Mythic-Dist:5.2.1'
// Dynamically Loaded
implementation 'io.timeandspace:smoothie-map:2.0.2'
implementation 'it.unimi.dsi:fastutil:8.5.8'
implementation 'com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:1.4.2'
implementation 'org.zeroturnaround:zt-zip:1.14'
implementation 'com.google.code.gson:gson:2.9.0'
implementation 'org.ow2.asm:asm:9.2'
implementation 'com.google.guava:guava:31.1-jre'
implementation 'bsf:bsf:2.4.0'
implementation 'rhino:js:1.7R2'
implementation 'com.github.ben-manes.caffeine:caffeine:3.0.6'
implementation 'org.apache.commons:commons-lang3:3.12.0'
}
if (JavaVersion.current().toString() != "17") {
System.err.println()
System.err.println("=========================================================================================================")
System.err.println("You must run gradle on Java 17. You are using " + JavaVersion.current())
System.err.println()
System.err.println("=== For IDEs ===")
System.err.println("1. Configure the project for Java 17")
System.err.println("2. Configure the bundled gradle to use Java 17 in settings")
System.err.println()
System.err.println("=== For Command Line (gradlew) ===")
System.err.println("1. Install JDK 17 from https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html")
System.err.println("2. Set JAVA_HOME environment variable to the new jdk installation folder such as C:\\Program Files\\Java\\jdk-17.0.1")
System.err.println("3. Open a new command prompt window to get the new environment variables if need be.")
System.err.println("=========================================================================================================")
System.err.println()
System.exit(69);
}
def buildToolsJar = new File(buildDir, "buildtools/BuildTools.jar");
def specialSourceJar = new File(buildDir, "specialsource/SpecialSource.jar");
def buildToolsFolder = new File(buildDir, "buildtools");
def specialSourceFolder = new File(buildDir, "specialsource");
def buildToolsHint = new File(buildDir, "buildtools/craftbukkit-" + nmsVersion + ".jar");
def outputShadeJar = new File(buildDir, "libs/Iris-" + version + "-all.jar");
def ssiJar = new File(buildDir, "specialsource/Iris-" + version + "-all.jar");
def ssobfJar = new File(buildDir, "specialsource/Iris-" + version + "-rmo.jar");
def ssJar = new File(buildDir, "specialsource/Iris-" + version + "-rma.jar");
def homePath = System.properties['user.home']
def m2 = new File(homePath + "/.m2/repository")
def m2s = m2.getAbsolutePath();
// ======================== Building Mapped Jars =============================
task downloadBuildtools(type: Download) {
group "remapping"
src 'https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar'
dest buildToolsJar
onlyIf {
!buildToolsJar.exists()
}
}
task downloadSpecialSource(type: Download) {
group "remapping"
src 'https://repo.maven.apache.org/maven2/net/md-5/SpecialSource/' + specialSourceVersion + '/SpecialSource-'+specialSourceVersion+'-shaded.jar'
dest specialSourceJar
onlyIf {
!specialSourceJar.exists()
}
}
task executeBuildTools(dependsOn: downloadBuildtools, type: JavaExec)
{
group "remapping"
classpath = files(buildToolsJar)
workingDir = buildToolsFolder
args = [
"--rev",
nmsVersion,
"--compile",
"craftbukkit",
"--remap"
]
onlyIf {
!buildToolsHint.exists()
}
}
task copyBuildToSpecialSource(type: Copy)
{
group "remapping"
from outputShadeJar
into specialSourceFolder
dependsOn(downloadSpecialSource, shadowJar)
}
task specialSourceRemapObfuscate(type: JavaExec)
{
group "remapping"
dependsOn(copyBuildToSpecialSource, downloadSpecialSource, shadowJar)
workingDir = specialSourceFolder
classpath = files(specialSourceJar,
new File(m2s + "/org/spigotmc/spigot/" + spigotJarVersion + "/spigot-" + spigotJarVersion + "-remapped-mojang.jar"))
mainClass = "net.md_5.specialsource.SpecialSource"
args = [
"--live",
"-i",
ssiJar.getName(),
"-o",
ssobfJar.getName(),
"-m",
m2s + "/org/spigotmc/minecraft-server/" + spigotJarVersion + "/minecraft-server-" + spigotJarVersion + "-maps-mojang.txt",
"--reverse",
]
}
task specialSourceRemap(type: JavaExec)
{
group "remapping"
dependsOn(specialSourceRemapObfuscate)
workingDir = specialSourceFolder
classpath = files(specialSourceJar,
new File(m2s + "/org/spigotmc/spigot/" + spigotJarVersion + "/spigot-" + spigotJarVersion + "-remapped-obf.jar"))
mainClass = "net.md_5.specialsource.SpecialSource"
args = [
"--live",
"-i",
ssobfJar.getName(),
"-o",
ssJar.getName(),
"-m",
m2s + "/org/spigotmc/minecraft-server/" + spigotJarVersion + "/minecraft-server-" + spigotJarVersion + "-maps-spigot.csrg"
]
}
tasks.compileJava.dependsOn(executeBuildTools)
compileJava {
options.encoding = "UTF-8"
}
task setup()
{
group("iris")
dependsOn(clean, executeBuildTools)
}
task iris(type: Copy)
{
group "iris"
from ssJar
into buildDir
rename { String fileName ->
fileName.replace('Iris-' + version + '-rma.jar', "Iris-" + version + ".jar")
}
dependsOn(specialSourceRemap)
}
def registerCustomOutputTask(name, path) {
if (!System.properties['os.name'].toLowerCase().contains('windows')) {
return;
}
tasks.register('build' + name, Copy) {
group('development')
outputs.upToDateWhen { false }
dependsOn(iris)
from(new File(buildDir, "Iris-" + version + ".jar"))
into(file(path))
rename { String fileName ->
fileName.replace("Iris-" + version + ".jar", "Iris.jar")
}
}
}
def registerCustomOutputTaskUnix(name, path) {
if (System.properties['os.name'].toLowerCase().contains('windows')) {
return;
}
tasks.register('build' + name, Copy) {
group('development')
outputs.upToDateWhen { false }
dependsOn(iris)
from(new File(buildDir, "Iris-" + version + ".jar"))
into(file(path))
rename { String fileName ->
fileName.replace("Iris-" + version + ".jar", "Iris.jar")
}
}
}

View File

@@ -1,290 +0,0 @@
plugins {
id 'java'
id "io.freefair.lombok" version "6.3.0"
id "com.github.johnrengelman.shadow" version "7.1.2"
id "de.undercouch.download" version "5.0.1"
}
group rootProject.group
version rootProject.version
def nmsVersion = "1.19"
def apiVersion = '1.19'
def spigotJarVersion = '1.19-R0.1-SNAPSHOT'
def name = getRootProject().getName() // Defined in settings.gradle
def main = 'com.volmit.iris.platform.bukkit.IrisBukkit'
// ADD YOURSELF AS A NEW LINE IF YOU WANT YOUR OWN BUILD TASK GENERATED
// ======================== WINDOWS =============================
registerCustomOutputTask('Cyberpwn', 'C://Users/cyberpwn/Documents/development/server/plugins')
registerCustomOutputTask('Psycho', 'D://Dan/MinecraftDevelopment/server/plugins')
registerCustomOutputTask('ArcaneArts', 'C://Users/arcane/Documents/development/server/plugins')
registerCustomOutputTask('Coco', 'D://Documents/MC/plugins')
registerCustomOutputTask('Strange', 'D://Servers/1.17 Test Server/plugins')
registerCustomOutputTask('Vatuu', 'D://Minecraft/Servers/1.19/plugins')
// ========================== UNIX ==============================
registerCustomOutputTaskUnix('CyberpwnLT', '/Users/danielmills/development/server/plugins')
registerCustomOutputTaskUnix('PsychoLT', '/Users/brianfopiano/Desktop/REMOTES/RemoteMinecraft/plugins')
// ==============================================================
/**
* Gradle is weird sometimes, we need to delete the plugin yml from the build folder to actually filter properly.
*/
file(jar.archiveFile.get().getAsFile().getParentFile().getParentFile().getParentFile().getAbsolutePath() + '/build/resources/main/plugin.yml').delete()
/**
* Expand properties into plugin yml
*/
processResources {
filesMatching('**/plugin.yml') {
expand(
'name': name.toString(),
'version': version.toString(),
'main': main.toString(),
'apiversion': apiVersion.toString()
)
}
}
/**
* We need parameter meta for the decree command system
*/
compileJava {
options.compilerArgs << '-parameters'
}
/**
* Configure Iris for shading
*/
shadowJar {
//minimize()
append("plugin.yml")
relocate 'com.dfsek.paralithic', 'com.volmit.iris.util.paralithic'
relocate 'art.arcane', 'com.volmit.iris.util.arcane'
relocate 'manifold', 'com.volmit.iris.util.manifold'
relocate 'art.arcane.source', 'com.volmit.iris.util.source'
relocate 'ChumBukkit.extensions', 'com.volmit.iris.util.extensions'
relocate 'IrisBukkit.extensions', 'com.volmit.iris.util.extensions'
relocate 'Fukkit.extensions', 'com.volmit.iris.util.extensions'
relocate 'Amulet.extensions', 'com.volmit.iris.util.extensions'
relocate 'Iris.extensions', 'com.volmit.iris.util.extensions'
dependencies {
include(dependency('art.arcane:'))
include(dependency('systems.manifold:'))
include(dependency("com.dfsek:Paralithic:"))
include(dependency(":engine"))
}
}
/**
* Faster dependency caches
*/
configurations.all {
resolutionStrategy.cacheChangingModulesFor 60, 'minutes'
resolutionStrategy.cacheDynamicVersionsFor 60, 'minutes'
}
configurations {
testImplementation.extendsFrom annotationProcessor
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
repositories {
maven { url "https://arcanearts.jfrog.io/artifactory/archives" }
mavenCentral()
}
dependencies {
implementation 'org.spigotmc:spigot-api:1.19-R0.1-SNAPSHOT'
implementation 'art.arcane:Fukkit:22.9.2'
implementation project(":engine")
}
if (JavaVersion.current() != JavaVersion.VERSION_1_8 &&
sourceSets.main.allJava.files.any { it.name == "module-info.java" }) {
tasks.withType(JavaCompile) {
options.compilerArgs += ['-Xplugin:Manifold', '--module-path', it.classpath.asPath]
}
} else {
tasks.withType(JavaCompile) {
options.compilerArgs += ['-Xplugin:Manifold']
}
}
if (JavaVersion.current().toString() != "17") {
System.err.println()
System.err.println("=========================================================================================================")
System.err.println("You must run gradle on Java 17. You are using " + JavaVersion.current())
System.err.println()
System.err.println("=== For IDEs ===")
System.err.println("1. Configure the project for Java 17")
System.err.println("2. Configure the bundled gradle to use Java 17 in settings")
System.err.println()
System.err.println("=== For Command Line (gradlew) ===")
System.err.println("1. Install JDK 17 from https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html")
System.err.println("2. Set JAVA_HOME environment variable to the new jdk installation folder such as C:\\Program Files\\Java\\jdk-17.0.1")
System.err.println("3. Open a new command prompt window to get the new environment variables if need be.")
System.err.println("=========================================================================================================")
System.err.println()
System.exit(69);
}
System.out.println(buildDir);
def buildToolsJar = new File(buildDir, "buildtools/BuildTools.jar");
def specialSourceJar = new File(buildDir, "specialsource/SpecialSource.jar");
def buildToolsFolder = new File(buildDir, "buildtools");
def specialSourceFolder = new File(buildDir, "specialsource");
def buildToolsHint = new File(buildDir, "buildtools/craftbukkit-" + nmsVersion + ".jar");
def outputShadeJar = new File(buildDir, "libs/bukkit-" + version + "-all.jar");
def ssiJar = new File(buildDir, "specialsource/bukkit-" + version + "-all.jar");
def ssobfJar = new File(buildDir, "specialsource/Iris-" + version + "-rmo.jar");
def ssJar = new File(buildDir, "specialsource/Iris-" + version + "-rma.jar");
def homePath = System.properties['user.home']
def m2 = new File(homePath + "/.m2/repository")
def m2s = m2.getAbsolutePath();
// ======================== Building Mapped Jars =============================
task downloadBuildtools(type: Download) {
group "remapping"
src 'https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar'
dest buildToolsJar
onlyIf {
!buildToolsJar.exists()
}
}
task downloadSpecialSource(type: Download) {
group "remapping"
src 'https://repo.maven.apache.org/maven2/net/md-5/SpecialSource/1.10.0/SpecialSource-1.10.0-shaded.jar'
dest specialSourceJar
onlyIf {
!specialSourceJar.exists()
}
}
task executeBuildTools(dependsOn: downloadBuildtools, type: JavaExec)
{
group "remapping"
classpath = files(buildToolsJar)
workingDir = buildToolsFolder
args = [
"--rev",
nmsVersion,
"--compile",
"craftbukkit",
"--remap"
]
onlyIf {
!buildToolsHint.exists()
}
}
task copyBuildToSpecialSource(type: Copy)
{
group "remapping"
from outputShadeJar
into specialSourceFolder
dependsOn(downloadSpecialSource, shadowJar)
}
task specialSourceRemapObfuscate(type: JavaExec)
{
group "remapping"
dependsOn(copyBuildToSpecialSource, downloadSpecialSource, shadowJar)
workingDir = specialSourceFolder
classpath = files(specialSourceJar,
new File(m2s + "/org/spigotmc/spigot/" + spigotJarVersion + "/spigot-" + spigotJarVersion + "-remapped-mojang.jar"))
mainClass = "net.md_5.specialsource.SpecialSource"
args = [
"--live",
"-i",
ssiJar.getName(),
"-o",
ssobfJar.getName(),
"-m",
m2s + "/org/spigotmc/minecraft-server/" + spigotJarVersion + "/minecraft-server-" + spigotJarVersion + "-maps-mojang.txt",
"--reverse",
]
}
task specialSourceRemap(type: JavaExec)
{
group "remapping"
dependsOn(specialSourceRemapObfuscate)
workingDir = specialSourceFolder
classpath = files(specialSourceJar,
new File(m2s + "/org/spigotmc/spigot/" + spigotJarVersion + "/spigot-" + spigotJarVersion + "-remapped-obf.jar"))
mainClass = "net.md_5.specialsource.SpecialSource"
args = [
"--live",
"-i",
ssobfJar.getName(),
"-o",
ssJar.getName(),
"-m",
m2s + "/org/spigotmc/minecraft-server/" + spigotJarVersion + "/minecraft-server-" + spigotJarVersion + "-maps-spigot.csrg"
]
}
tasks.compileJava.dependsOn(executeBuildTools)
compileJava {
options.encoding = "UTF-8"
}
task setup()
{
group("iris")
dependsOn(clean, executeBuildTools)
}
task iris(type: Copy)
{
group "iris"
from ssJar
into buildDir
rename { String fileName ->
fileName.replace('Iris-' + version + '-rma.jar', "Iris-" + version + ".jar")
}
dependsOn(specialSourceRemap)
}
def registerCustomOutputTask(name, path) {
if (!System.properties['os.name'].toLowerCase().contains('windows')) {
return;
}
tasks.register('build' + name, Copy) {
group('development')
outputs.upToDateWhen { false }
dependsOn(iris)
from(new File(buildDir, "Iris-" + version + ".jar"))
into(file(path))
rename { String fileName ->
fileName.replace("Iris-" + version + ".jar", "Iris.jar")
}
}
}
def registerCustomOutputTaskUnix(name, path) {
if (System.properties['os.name'].toLowerCase().contains('windows')) {
return;
}
tasks.register('build' + name, Copy) {
group('development')
outputs.upToDateWhen { false }
dependsOn(iris)
from(new File(buildDir, "Iris-" + version + ".jar"))
into(file(path))
rename { String fileName ->
fileName.replace("Iris-" + version + ".jar", "Iris.jar")
}
}
}

View File

@@ -1,217 +0,0 @@
package com.volmit.iris.platform.bukkit;
import art.arcane.amulet.io.IO;
import art.arcane.amulet.logging.LogListener;
import com.volmit.iris.engine.EngineConfiguration;
import com.volmit.iris.platform.IrisPlatform;
import com.volmit.iris.platform.PlatformBiome;
import com.volmit.iris.platform.block.PlatformBlock;
import com.volmit.iris.platform.PlatformNamespaceKey;
import com.volmit.iris.platform.PlatformWorld;
import com.volmit.iris.platform.bukkit.wrapper.BukkitBiome;
import com.volmit.iris.platform.bukkit.wrapper.BukkitBlock;
import com.volmit.iris.platform.bukkit.wrapper.BukkitKey;
import com.volmit.iris.platform.bukkit.wrapper.BukkitWorld;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.Material;
import org.bukkit.Warning;
import org.bukkit.World;
import org.bukkit.WorldCreator;
import org.bukkit.block.Biome;
import org.bukkit.command.ConsoleCommandSender;
import org.bukkit.entity.Player;
import org.bukkit.generator.ChunkGenerator;
import org.bukkit.plugin.java.JavaPlugin;
import java.io.Closeable;
import java.io.File;
import java.io.IOException;
import java.util.Arrays;
import java.util.UUID;
import java.util.stream.Stream;
public class IrisBukkit extends JavaPlugin implements IrisPlatform, LogListener {
private static final String TAG = ChatColor.DARK_GRAY + "[" + ChatColor.GREEN + "Iris" + ChatColor.DARK_GREEN + "/";
private static final String TAG_STRIPPED = ChatColor.stripColor(TAG);
private static IrisBukkit instance;
private ConsoleCommandSender consoleSender;
public void onEnable() {
instance = this;
consoleSender = Bukkit.getConsoleSender();
LogListener.listener.set(this);
getServer().getScheduler().scheduleSyncDelayedTask(this, () -> {
World world = Bukkit.createWorld(new WorldCreator("iristests/" + UUID.randomUUID()).generator(new IrisBukkitChunkGenerator(this, EngineConfiguration.builder()
.timings(true).mutable(true)
.build())));
for(Player i : Bukkit.getOnlinePlayers())
{
i.teleport(world.getSpawnLocation());
}
}, 10);
}
public void onDisable() {
World w = null;
for(World i : Bukkit.getWorlds()) {
if(!i.getName().startsWith("iristest")) {
w = i;
break;
}
}
for(World i : Bukkit.getWorlds()) {
if(i.getName().startsWith("iristest"))
{
for(Player j : i.getPlayers())
{
j.teleport(w.getSpawnLocation());
}
if(i.getGenerator() instanceof Closeable c)
{
try {
c.close();
} catch(IOException e) {
throw new RuntimeException(e);
}
}
BukkitWorld.of(i).unloadChunks(false, true);
File folder = i.getWorldFolder();
Bukkit.unloadWorld(i, false);
IO.delete(folder);
}
}
}
public static IrisBukkit getInstance() {
return instance;
}
private void messageConsole(String color, String key, Object o) {
try {
consoleSender.sendMessage(TAG + key + ChatColor.DARK_GRAY + "]: " + color + o.toString());
}
catch(Throwable e) {
System.out.println(TAG_STRIPPED + key + "]: " + o.toString());
}
}
@Override
public void logError(String k, Object o) {
messageConsole(ChatColor.RED.toString(), k, o);
}
@Override
public void logInfo(String k, Object o) {
messageConsole(ChatColor.WHITE.toString(), k, o);
}
@Override
public void logWarning(String k, Object o) {
messageConsole(ChatColor.YELLOW.toString(), k, o);
}
@Override
public void logDebug(String k, Object o) {
messageConsole(ChatColor.GRAY.toString(), k, o);
}
@Override
public String getPlatformName() {
return "Bukkit";
}
@Override
public Stream<PlatformBlock> getBlocks() {
//This is because it's a method extension
//noinspection Convert2MethodRef
return Arrays.stream(Material.values())
.filter(i -> !i.isLegacy())
.filter(Material::isBlock)
.map(Material::createBlockData).map(i -> BukkitBlock.of(i));
}
@Override
public Stream<PlatformBiome> getBiomes() {
//This is because it's a method extension
//noinspection Convert2MethodRef
return Arrays.stream(Biome.values()).parallel().filter((i) -> i != Biome.CUSTOM).map(i -> BukkitBiome.of(i));
}
@Override
public boolean isWorldLoaded(String name) {
return Bukkit.getWorlds().keepWhere(i -> i.getName().equals(name)).isNotEmpty();
}
@Override
public PlatformWorld getWorld(String name) {
World w = Bukkit.getWorld(name);
if(w == null)
{
return null;
}
return BukkitWorld.of(w);
}
@Override
public PlatformBlock parseBlock(String raw) {
return BukkitBlock.of(Bukkit.createBlockData(raw));
}
@Override
public PlatformNamespaceKey key(String namespace, String key) {
return BukkitKey.of(namespace, key);
}
@Override
public File getStudioFolder(String dimension) {
File f = new File(getDataFolder(), "packs/" + dimension);
f.mkdirs();
return f;
}
@Override
public File getStudioFolder() {
File f = new File(getDataFolder(), "packs/");
f.mkdirs();
return f;
}
@Override
public ChunkGenerator getDefaultWorldGenerator(String worldName, String id) {
return new IrisBukkitChunkGenerator(this, EngineConfiguration.builder()
.threads(4)
.mutable(true)
.timings(true)
.build());
}
@Override
public void i(String s, Object o) {
logInfo(s, o);
}
@Override
public void f(String s, Object o) {
logError(s, o);
}
@Override
public void w(String s, Object o) {
logWarning(s, o);
}
@Override
public void d(String s, Object o) {
logDebug(s, o);
}
}

View File

@@ -1,147 +0,0 @@
package com.volmit.iris.platform.bukkit;
import art.arcane.chrono.Average;
import art.arcane.chrono.PrecisionStopwatch;
import art.arcane.spatial.hunk.Hunk;
import com.volmit.iris.engine.EngineConfiguration;
import com.volmit.iris.engine.Engine;
import com.volmit.iris.engine.feature.FeatureSizedTarget;
import com.volmit.iris.engine.feature.FeatureTarget;
import com.volmit.iris.engine.pipeline.PipedHunkStack;
import com.volmit.iris.platform.IrisPlatform;
import com.volmit.iris.platform.block.PlatformBlock;
import com.volmit.iris.platform.bukkit.util.StaticBiomeProvider;
import com.volmit.iris.platform.bukkit.wrapper.BukkitWorld;
import org.bukkit.Bukkit;
import org.bukkit.World;
import org.bukkit.block.Biome;
import org.bukkit.generator.BiomeProvider;
import org.bukkit.generator.ChunkGenerator;
import com.volmit.iris.platform.bukkit.util.ChunkDataHunkView;
import org.bukkit.generator.WorldInfo;
import java.io.Closeable;
import java.io.IOException;
import java.util.Random;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicReference;
import java.util.concurrent.locks.ReentrantLock;
public class IrisBukkitChunkGenerator extends ChunkGenerator implements Closeable {
private final IrisPlatform platform;
private final EngineConfiguration configuration;
private final AtomicReference<Engine> engine;
private final ReentrantLock engineLock;
private final AtomicInteger perSecond;
private final PrecisionStopwatch p = PrecisionStopwatch.start();
private final Average a = new Average(128);
private final StaticBiomeProvider staticBiomeProvider;
public IrisBukkitChunkGenerator(IrisPlatform platform, EngineConfiguration configuration) {
this.perSecond = new AtomicInteger(0);
this.platform = platform;
this.configuration = configuration;
this.staticBiomeProvider = new StaticBiomeProvider(Biome.PLAINS);
this.engine = new AtomicReference<>();
this.engineLock = new ReentrantLock();
}
@Override
public ChunkData generateChunkData(World world, Random random, int x, int z, BiomeGrid biome) {
PrecisionStopwatch pp = PrecisionStopwatch.start();
initEngine(world);
ChunkData data = Bukkit.createChunkData(world);
Hunk<PlatformBlock> chunk = new ChunkDataHunkView(data);
FeatureSizedTarget targetSize = FeatureSizedTarget.builder()
.width(chunk.getWidth())
.height(chunk.getHeight())
.depth(chunk.getDepth())
.offsetX(x << 4)
.offsetZ(z << 4)
.offsetY(0)
.build();
FeatureTarget<PlatformBlock> blockTarget = new FeatureTarget<>(chunk, targetSize);
PipedHunkStack stack = new PipedHunkStack();
stack.register(PlatformBlock.class, blockTarget);
engine.get().getPlumbing().generate(engine.get(), targetSize, stack);
perSecond.incrementAndGet();
a.put(pp.getMilliseconds());
if(p.getMilliseconds() > 1000)
{
p.reset();
p.begin();
System.out.println("PERSECOND: " + perSecond.getAndSet(0) + " AMS: " + ((int)Math.round(a.getAverage())) + "ms");
}
return data;
}
private void initEngine(World world) {
if(engine.get() == null)
{
engineLock.lock();
if(engine.get() == null)
{
try {
engine.set(new Engine(platform, BukkitWorld.of(world), configuration));
} catch (IOException e) {
throw new RuntimeException(e);
}
}
engineLock.unlock();
}
}
@Override
public boolean canSpawn(World world, int x, int z) {
return false;
}
@Override
public BiomeProvider getDefaultBiomeProvider(WorldInfo worldInfo) {
return staticBiomeProvider;
}
@Override
public void close() throws IOException {
engine.get().close();
}
@Override
public boolean shouldGenerateNoise() {
return super.shouldGenerateNoise();
}
@Override
public boolean shouldGenerateSurface() {
return super.shouldGenerateSurface();
}
@Override
public boolean shouldGenerateBedrock() {
return super.shouldGenerateBedrock();
}
@Override
public boolean shouldGenerateCaves() {
return super.shouldGenerateCaves();
}
@Override
public boolean shouldGenerateDecorations() {
return super.shouldGenerateDecorations();
}
@Override
public boolean shouldGenerateMobs() {
return super.shouldGenerateMobs();
}
@Override
public boolean shouldGenerateStructures() {
return super.shouldGenerateStructures();
}
}

View File

@@ -1,53 +0,0 @@
package com.volmit.iris.platform.bukkit.util;
import art.arcane.spatial.hunk.Hunk;
import com.volmit.iris.platform.block.PlatformBlock;
import com.volmit.iris.platform.bukkit.wrapper.BukkitBlock;
import org.bukkit.generator.ChunkGenerator;
@SuppressWarnings("ClassCanBeRecord")
public class ChunkDataHunkView implements Hunk<PlatformBlock> {
private final ChunkGenerator.ChunkData chunk;
public ChunkDataHunkView(ChunkGenerator.ChunkData chunk) {
this.chunk = chunk;
}
@Override
public int getWidth() {
return 16;
}
@Override
public int getDepth() {
return 16;
}
@Override
public int getHeight() {
return chunk.getMaxHeight() - chunk.getMinHeight();
}
@Override
public synchronized void set(int x1, int y1, int z1, int x2, int y2, int z2, PlatformBlock t) {
if(t == null) {
return;
}
chunk.setRegion(x1, y1 + chunk.getMinHeight(), z1, x2, y2 + chunk.getMinHeight(), z2, ((BukkitBlock)t).getDelegate());
}
@Override
public synchronized void setRaw(int x, int y, int z, PlatformBlock t) {
if(t == null) {
return;
}
chunk.setBlock(x, y + chunk.getMinHeight(), z, ((BukkitBlock)t).getDelegate());
}
@Override
public PlatformBlock getRaw(int x, int y, int z) {
return BukkitBlock.of(chunk.getBlockData(x, y + chunk.getMinHeight(), z));
}
}

View File

@@ -1,27 +0,0 @@
package com.volmit.iris.platform.bukkit.util;
import org.bukkit.block.Biome;
import org.bukkit.generator.BiomeProvider;
import org.bukkit.generator.WorldInfo;
import java.util.Arrays;
import java.util.List;
public class StaticBiomeProvider extends BiomeProvider {
private static final List<Biome> ALL_BIOMES = Arrays.stream(Biome.values()).without((i) -> i.equals(Biome.CUSTOM)).toList().unmodifiable();
private final Biome defaultBiome;
public StaticBiomeProvider(Biome defaultBiome) {
this.defaultBiome = defaultBiome;
}
@Override
public Biome getBiome(WorldInfo worldInfo, int x, int y, int z) {
return defaultBiome;
}
@Override
public List<Biome> getBiomes(WorldInfo worldInfo) {
return ALL_BIOMES;
}
}

View File

@@ -1,24 +0,0 @@
package com.volmit.iris.platform.bukkit.wrapper;
import com.volmit.iris.platform.PlatformBiome;
import com.volmit.iris.platform.PlatformNamespaceKey;
import lombok.Data;
import org.bukkit.block.Biome;
@Data
public class BukkitBiome implements PlatformBiome {
private final Biome delegate;
private BukkitBiome(Biome delegate) {
this.delegate = delegate;
}
@Override
public PlatformNamespaceKey getKey() {
return BukkitKey.of(delegate.getKey());
}
public static BukkitBiome of(Biome biome) {
return new BukkitBiome(biome);
}
}

View File

@@ -1,71 +0,0 @@
package com.volmit.iris.platform.bukkit.wrapper;
import com.volmit.iris.platform.block.PlatformBlock;
import com.volmit.iris.platform.PlatformNamespaceKey;
import com.volmit.iris.platform.block.PlatformBlock;
import lombok.Data;
import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.block.data.Ageable;
import org.bukkit.block.data.BlockData;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
@Data
public class BukkitBlock implements PlatformBlock {
private final BlockData delegate;
private final Map<String, String> properties;
private BukkitBlock(BlockData delegate, Map<String, String> properties) {
this.delegate = delegate;
this.properties = properties;
}
private BukkitBlock(BlockData delegate) {
this.delegate = delegate;
String s = delegate.getAsString(true);
if(s.contains("[")) {
Map<String, String> properties = new HashMap<>();
String[] props = new String[] {s.split("\\Q[\\E")[1].split("\\Q]\\E")[0]};
String[] p;
if(props[0].contains(",")) {
for(String i : props[0].split("\\Q,\\E")) {
p = i.split("\\Q=\\E");
properties.put(p[0], p[1]);
}
} else {
p = props[0].split("\\Q=\\E");
properties.put(p[0], p[1]);
}
this.properties = Collections.unmodifiableMap(properties);
} else {
this.properties = Map.of();
}
}
@Override
public Map<String, String> getProperties() {
return null;
}
@Override
public PlatformNamespaceKey getKey() {
return BukkitKey.of(delegate.getMaterial().getKey());
}
public static BukkitBlock of(BlockData blockData) {
return new BukkitBlock(blockData);
}
public static BukkitBlock of(Material material) {
return of(material.createBlockData());
}
public static BukkitBlock of(String raw) {
return of(Bukkit.createBlockData(raw));
}
}

View File

@@ -1,35 +0,0 @@
package com.volmit.iris.platform.bukkit.wrapper;
import com.volmit.iris.platform.PlatformChunk;
import org.bukkit.Chunk;
public class BukkitChunk implements PlatformChunk {
private final Chunk delegate;
private BukkitChunk(Chunk delegate) {
this.delegate = delegate;
}
@Override
public int getX() {
return delegate.getX();
}
@Override
public int getZ() {
return delegate.getZ();
}
@Override
public void unload(boolean save, boolean force) {
if(force) {
delegate.getPluginChunkTickets().forEach(delegate::removePluginChunkTicket);
}
delegate.unload(save);
}
public static BukkitChunk of(Chunk chunk) {
return new BukkitChunk(chunk);
}
}

View File

@@ -1,45 +0,0 @@
package com.volmit.iris.platform.bukkit.wrapper;
import com.volmit.iris.platform.PlatformNamespaceKey;
import lombok.Data;
import org.bukkit.NamespacedKey;
@Data
public class BukkitKey implements PlatformNamespaceKey {
private final NamespacedKey delegate;
private BukkitKey(NamespacedKey delegate) {
this.delegate = delegate;
}
@Override
public String getNamespace() {
return delegate.getNamespace();
}
@Override
public String getKey() {
return delegate.getKey();
}
public String toString() {
return delegate.toString();
}
public static BukkitKey of(String nsk) {
if(nsk.contains(":")) {
String[] f = nsk.split("\\Q:\\E");
return of(f[0], f[1]);
}
return of("minecraft", nsk);
}
public static BukkitKey of(String namespace, String key) {
return of(new NamespacedKey(namespace, key));
}
public static BukkitKey of(NamespacedKey key) {
return new BukkitKey(key);
}
}

View File

@@ -1,60 +0,0 @@
package com.volmit.iris.platform.bukkit.wrapper;
import art.arcane.amulet.geometry.Vec;
import com.volmit.iris.platform.PlatformPlayer;
import com.volmit.iris.platform.PlatformWorld;
import org.bukkit.entity.Player;
import java.util.UUID;
public class BukkitPlayer implements PlatformPlayer {
private final Player delegate;
private BukkitPlayer(Player delegate) {
this.delegate = delegate;
}
@Override
public UUID getUUID() {
return delegate.getUniqueId();
}
@Override
public String getName() {
return delegate.getName();
}
@Override
public Vec getLocation() {
return delegate.getLocation().vec();
}
@Override
public PlatformWorld getWorld() {
return BukkitWorld.of(delegate.getWorld());
}
@Override
public boolean canUseIris() {
return delegate.isOp();
}
@Override
public void sendMessage(String message) {
delegate.sendMessage(message);
}
@Override
public void sendActionBar(String message) {
throw new UnsupportedOperationException();
}
@Override
public void sendTitleMessage(String title, String subtitle, int in, int stay, int out) {
throw new UnsupportedOperationException();
}
public static BukkitPlayer of(Player player) {
return new BukkitPlayer(player);
}
}

View File

@@ -1,91 +0,0 @@
package com.volmit.iris.platform.bukkit.wrapper;
import com.volmit.iris.platform.PlatformBiome;
import com.volmit.iris.platform.block.PlatformBlock;
import com.volmit.iris.platform.PlatformChunk;
import com.volmit.iris.platform.PlatformPlayer;
import com.volmit.iris.platform.PlatformWorld;
import com.volmit.iris.util.WorldHeight;
import lombok.Data;
import org.bukkit.World;
import java.io.File;
import java.util.Arrays;
import java.util.stream.Collectors;
@Data
public class BukkitWorld implements PlatformWorld {
private final World delegate;
private final WorldHeight worldHeight;
private BukkitWorld(World delegate) {
this.delegate = delegate;
this.worldHeight = new WorldHeight(delegate.getMinHeight(), delegate.getMaxHeight());
}
@Override
public WorldHeight getHeight() {
return worldHeight;
}
@Override
public String getName() {
return delegate.getName();
}
@Override
public File getFolder() {
return delegate.getWorldFolder();
}
@Override
public Iterable<PlatformPlayer> getPlayers() {
//noinspection Convert2MethodRef
return delegate.getPlayers().stream().map(i -> BukkitPlayer.of(i)).collect(Collectors.toList());
}
@Override
public Iterable<PlatformChunk> getLoadedChunks() {
//noinspection Convert2MethodRef
return Arrays.stream(delegate.getLoadedChunks()).map(i -> BukkitChunk.of(i)).collect(Collectors.toList());
}
@Override
public PlatformChunk getOrLoadChunk(int x, int z) {
return BukkitChunk.of(delegate.getChunkAt(x, z));
}
@Override
public PlatformBlock getBlock(int x, int y, int z) {
return BukkitBlock.of(delegate.getBlockAt(x, y, z).getBlockData());
}
@Override
public PlatformBiome getBiome(int x, int y, int z) {
return BukkitBiome.of(delegate.getBiome(x, y, z));
}
@Override
public long getSeed() {
return delegate.getSeed();
}
@Override
public boolean isChunkLoaded(int x, int z) {
return delegate.isChunkLoaded(x, z);
}
@Override
public void setBlock(int x, int y, int z, PlatformBlock block) {
delegate.setBlockData(x, y, z, ((BukkitBlock) block).getDelegate());
}
@Override
public void setBiome(int x, int y, int z, PlatformBiome biome) {
delegate.setBiome(x, y, z, ((BukkitBiome) biome).getDelegate());
}
public static BukkitWorld of(World world) {
return new BukkitWorld(world);
}
}

View File

@@ -1,8 +0,0 @@
name: Iris
main: com.volmit.iris.platform.bukkit.IrisBukkit
version: 1.0.0
api-version: 1.19
libraries:
- org.apache-extras.beanshell:bsh:2.0b6
- com.google.code.gson:gson:2.8.9
- com.github.ben-manes.caffeine:caffeine:3.1.1

View File

@@ -1,34 +0,0 @@
plugins {
id 'java'
id "io.freefair.lombok" version "6.3.0"
}
group rootProject.group
version rootProject.version
jar {
manifest {
attributes('Contains-Sources': 'java,class')
}
}
configurations {
testImplementation.extendsFrom annotationProcessor
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
if (JavaVersion.current() != JavaVersion.VERSION_1_8 &&
sourceSets.main.allJava.files.any { it.name == "module-info.java" }) {
tasks.withType(JavaCompile) {
options.compilerArgs += ['-Xplugin:Manifold', '--module-path', it.classpath.asPath]
}
} else {
tasks.withType(JavaCompile) {
options.compilerArgs += ['-Xplugin:Manifold']
}
}

View File

@@ -1,91 +0,0 @@
package com.volmit.iris.engine;
import com.volmit.iris.engine.feature.features.FeatureError;
import com.volmit.iris.engine.feature.features.FeatureTerrain;
import com.volmit.iris.engine.pipeline.EnginePipeline;
import com.volmit.iris.engine.pipeline.EnginePlumbing;
import com.volmit.iris.engine.pipeline.PipelinePhase;
import com.volmit.iris.engine.pipeline.PipelineTask;
import com.volmit.iris.platform.IrisPlatform;
import com.volmit.iris.platform.block.PlatformBlock;
import com.volmit.iris.platform.PlatformNamespaceKey;
import com.volmit.iris.platform.PlatformRegistry;
import com.volmit.iris.platform.PlatformWorld;
import lombok.Data;
import manifold.util.concurrent.ConcurrentWeakHashMap;
import java.io.Closeable;
import java.io.IOException;
import java.lang.ref.WeakReference;
import java.util.Map;
import java.util.Optional;
@Data
public class Engine implements Closeable {
private static final Map<Thread, WeakReference<Engine>> engineContext = new ConcurrentWeakHashMap<>();
private final IrisPlatform platform;
private final EngineRegistry registry;
private final EngineConfiguration configuration;
private final PlatformWorld world;
private final EngineBlockCache blockCache;
private final EngineExecutor executor;
private final EnginePlumbing plumbing;
private final EngineSeedManager seedManager;
private final EngineData data;
public Engine(IrisPlatform platform, PlatformWorld world, EngineConfiguration configuration) throws IOException {
this.configuration = configuration.validate();
this.platform = platform;
this.world = world;
i("Initializing Iris Engine for " + platform.getPlatformName() + " in " + world.getName()
+ " with " + configuration.getThreads() + " priority " + configuration.getThreadPriority()
+ " threads in " + (configuration.isMutable() ? "edit mode" : "production mode"));
this.blockCache = new EngineBlockCache(this);
this.registry = EngineRegistry.builder()
.blockRegistry(new PlatformRegistry<>("Block", platform.getBlocks()))
.biomeRegistry(new PlatformRegistry<>("Biome", platform.getBiomes()))
.build();
this.data = new EngineData(this).loadData(
getConfiguration().isMutable()
? getPlatform().getStudioFolder()
: getWorld().getIrisDataFolder(), getConfiguration().getDimension());
this.seedManager = getSeedManager();
this.executor = new EngineExecutor(this);
this.plumbing = EnginePlumbing.builder().engine(this)
.errorPipeline(EnginePipeline.builder()
.phase(PipelinePhase.builder()
.task(new PipelineTask<>(new FeatureError(this), PlatformBlock.class))
.build())
.build())
.pipeline(EnginePipeline.builder()
.phase(PipelinePhase.builder()
.task(new PipelineTask<>(new FeatureTerrain(this), PlatformBlock.class))
.build())
.build())
.build();
}
public PlatformBlock block(String block) {
return blockCache.get(block);
}
public PlatformNamespaceKey key(String nsk) {
return getPlatform().key(nsk);
}
public static Optional<Engine> context() {
WeakReference<Engine> reference = engineContext.get(Thread.currentThread());
if(reference != null)
{
return Optional.ofNullable(reference.get());
}
return Optional.empty();
}
@Override
public void close() throws IOException {
getExecutor().close();
}
}

View File

@@ -1,23 +0,0 @@
package com.volmit.iris.engine;
import com.volmit.iris.platform.block.PlatformBlock;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
public class EngineBlockCache
{
private final Engine engine;
private final Map<String, PlatformBlock> cache;
public EngineBlockCache(Engine engine)
{
this.engine = engine;
this.cache = new ConcurrentHashMap<>();
}
public PlatformBlock get(String t)
{
return cache.computeIfAbsent(t, (key) -> engine.getPlatform().parseBlock(key));
}
}

View File

@@ -1,61 +0,0 @@
package com.volmit.iris.engine;
import com.volmit.iris.platform.PlatformNamespaceKey;
import com.volmit.iris.platform.PlatformWorld;
import com.volmit.iris.util.NSK;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@Builder
@Data
@NoArgsConstructor
@AllArgsConstructor
public class EngineConfiguration {
@Builder.Default
private int chunkSize = 16;
@Builder.Default
private boolean mutable = false;
@Builder.Default
private boolean timings = false;
@Builder.Default
private int threads = Runtime.getRuntime().availableProcessors();
@Builder.Default
private int threadPriority = 3;
@Builder.Default
private PlatformNamespaceKey dimension = new NSK("overworld", "main");
public EngineConfiguration validate() throws IOException {
validateChunkSize();
return this;
}
private void validateChunkSize() throws IOException {
if(Arrays.binarySearch(allowedChunkSizes, chunkSize) < 0) {
throw new IOException("Invalid Chunk Size: " + chunkSize + " Allowed Chunk Sizes are: " + Arrays.toString(allowedChunkSizes));
}
}
private static final int[] allowedChunkSizes;
static {
allowedChunkSizes = new int[16];
for(int i = 0; i < allowedChunkSizes.length; i++) {
allowedChunkSizes[i] = (int) Math.pow(2, i+1);
}
Arrays.sort(allowedChunkSizes); // for binary sorting
}
}

View File

@@ -1,276 +0,0 @@
package com.volmit.iris.engine;
import art.arcane.amulet.concurrent.J;
import art.arcane.amulet.io.IO;
import art.arcane.amulet.io.JarLoader;
import art.arcane.cram.PakFile;
import art.arcane.cram.PakKey;
import art.arcane.cram.PakResource;
import com.google.gson.*;
import com.google.gson.reflect.TypeToken;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonToken;
import com.google.gson.stream.JsonWriter;
import com.volmit.iris.engine.dimension.IrisDimension;
import com.volmit.iris.engine.dimension.IrisGenerator;
import com.volmit.iris.engine.dimension.IrisRange;
import com.volmit.iris.engine.resolver.*;
import com.volmit.iris.platform.PlatformNamespaceKey;
import com.volmit.iris.util.NSK;
import lombok.Data;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.*;
@Data
public class EngineData implements TypeAdapterFactory {
private final Engine engine;
private final Gson gson;
private List<Resolvable> resolvableTypes;
private final Map<Class<?>, Resolver<?>> resolvers;
public EngineData(Engine engine) throws IOException {
this.engine = engine;
this.resolvers = new HashMap<>();
this.resolvableTypes = J.attempt(() -> new JarLoader(getClass()).all().parallel()
.filter(Objects::nonNull)
.filter(i -> !i.isInterface() && !i.isEnum())
.filter(i -> i.isAssignableFrom(Resolvable.class) || Resolvable.class.isAssignableFrom(i))
.filter(i -> !i.equals(EngineResolvable.class))
.map(i -> J.attempt(() -> (Resolvable) i.getDeclaredConstructor().newInstance(), null)).toList(), List.of());
GsonBuilder gsonBuilder = new GsonBuilder().registerTypeAdapterFactory(this);
resolvableTypes.forEach(i -> i.apply(gsonBuilder));
this.gson = gsonBuilder.setPrettyPrinting().create();
i("Registered " + resolvableTypes.size() + " Mutators with " + resolvableTypes.stream().filter(i -> i instanceof TypeAdapterFactory).count() + " Type Adapter Factories");
}
public void generateSchemas(File folder) throws IOException {
folder.mkdirs();
for(Resolvable i : resolvableTypes) {
IO.writeAll(new File(folder, i.entity().getId() + ".json"), i.generateSchema(this).toString());
}
}
public <T extends Resolvable> T resolve(Class<T> clazz, PlatformNamespaceKey key)
{
Resolver<?> r = resolvers.get(clazz);
if(r == null) {
return null;
}
return (T) r.resolve(key);
}
public void registerResolver(Class<?> type, Resolver<?> resolver, String namespace)
{
if(resolvers.containsKey(type)) {
Resolver r = resolvers.get(type);
resolvers.put(type, r.and(namespace, r));
}
else {
resolvers.put(type, resolver);
}
}
public EngineData loadData(File folder, PlatformNamespaceKey dimension) throws IOException {
i("Loading Data in " + folder.getPath());
for(File i : folder.listFiles()) {
if(i.isDirectory() && i.getName().equals(dimension.getNamespace())) {
loadDataNamespaced(i, i.getName());
if(getEngine().getConfiguration().isMutable()) {
generateSchemas(new File(i, ".iris/schema"));
i("Generated " + new File(i, ".iris/schema").listFiles().length + " Schemas");
generateCodeWorkspace(new File(i, dimension.getNamespace() + ".code-workspace"));
i("Generated Code Workspace");
}
}
else if(i.getName().equals(dimension.getNamespace() + ".dat")) {
loadPakFile(folder, i.getName().split("\\Q.\\E")[0]);
}
}
IrisDimension dim = resolve(IrisDimension.class, dimension);
if(dim == null) {
f("Failed to load dimension " + dimension);
}
return this;
}
private void generateCodeWorkspace(File file) throws IOException {
file.getParentFile().mkdirs();
JsonObject ws = new JsonObject();
JsonArray folders = new JsonArray();
JsonObject folder = new JsonObject();
folder.add("path", new JsonPrimitive("."));
folders.add(folder);
ws.add("folders", folders);
JsonObject settings = new JsonObject();
settings.add("workbench.colorTheme", new JsonPrimitive("Monokai"));
settings.add("workbench.preferredDarkColorTheme", new JsonPrimitive("Solarized Dark"));
settings.add("workbench.tips.enabled", new JsonPrimitive(false));
settings.add("workbench.tree.indent", new JsonPrimitive(24));
settings.add("files.autoSave", new JsonPrimitive("onFocusChange"));
JsonObject jc = new JsonObject();
jc.add("editor.autoIndent", new JsonPrimitive("brackets"));
jc.add("editor.acceptSuggestionOnEnter", new JsonPrimitive("smart"));
jc.add("editor.cursorSmoothCaretAnimation", new JsonPrimitive(true));
jc.add("editor.dragAndDrop", new JsonPrimitive(false));
jc.add("files.trimTrailingWhitespace", new JsonPrimitive(true));
jc.add("diffEditor.ignoreTrimWhitespace", new JsonPrimitive(true));
jc.add("files.trimFinalNewlines", new JsonPrimitive(true));
jc.add("editor.suggest.showKeywords", new JsonPrimitive(false));
jc.add("editor.suggest.showSnippets", new JsonPrimitive(false));
jc.add("editor.suggest.showWords", new JsonPrimitive(false));
JsonObject st = new JsonObject();
st.add("strings", new JsonPrimitive(true));
jc.add("editor.quickSuggestions", st);
jc.add("editor.suggest.insertMode", new JsonPrimitive("replace"));
settings.add("[json]", jc);
settings.add("json.maxItemsComputed", new JsonPrimitive(30000));
JsonArray schemas = new JsonArray();
for(Resolvable i : resolvableTypes) {
String id = i.entity().getId();
JsonObject o = new JsonObject();
JsonArray fileMatch = new JsonArray();
fileMatch.add("/" + id + "/*.json");
o.add("fileMatch", fileMatch);
o.add("url", new JsonPrimitive(".iris/schema/" + id + ".json"));
schemas.add(o);
}
settings.add("json.schemas", schemas);
ws.add("settings", settings);
IO.writeAll(file, ws.toString());
}
public void loadDataNamespaced(File folder, String namespace) throws IOException {
i("Loading Namespace " + namespace + " in " + folder.getPath());
for(Resolvable i : resolvableTypes)
{
new File(folder, i.entity().getId()).mkdirs();
IO.writeAll(new File(new File(folder, i.entity().getId()), "example.json"), gson.toJson(i));
}
for(File i : folder.listFiles())
{
if(i.isDirectory()) {
loadDataFolder(i, namespace);
}
}
}
public void loadDataFolder(File folder, String namespace) {
for(Resolvable i : resolvableTypes)
{
if(!folder.getName().equals(i.entity().getId())) {
continue;
}
registerResolver(i.getClass(), Resolver.hotDirectoryJson(namespace, i.getClass(), folder, gson), namespace);
}
}
public void loadPakFile(File folder, String name) throws IOException {
PakFile pakFile = new PakFile(folder, name);
Map<PakKey, PakResource> resources = pakFile.getAllResources();
for(Resolvable i : resolvableTypes)
{
Class<? extends Resolvable> resolvableClass = i.getClass();
CompositeResolver<?> composite = Resolver.frozen(resources, (p) -> p.getClass().equals(resolvableClass));
for(String j : composite.getResolvers().keySet())
{
Resolver<? extends Resolvable> resolver = composite.getResolvers().get(i);
this.registerResolver(i.getClass(), resolver, j);
}
}
}
public void printResolvers() {
resolvers.forEach((k, i) -> i.print(k.simpleName(), this));
}
private <T> void writeSafeJson(TypeAdapter<T> delegate, JsonWriter out, T value) {
try {
delegate.write(out, value);
} catch (IOException e) {
try {
delegate.write(out, null);
} catch(IOException ex) {
throw new RuntimeException(ex);
}
}
}
@Override
public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) {
final TypeAdapter<T> delegate = gson.getDelegateAdapter(this, type);
for(Resolvable i : resolvableTypes) {
if(type.getRawType().equals(i.getClass())) {
return new TypeAdapter<>() {
public void write(JsonWriter out, T value) {writeSafeJson(delegate, out, value);}
@SuppressWarnings("unchecked")
public T read(JsonReader in) throws IOException {
JsonToken token = in.peek();
if(token == JsonToken.STRING) {
Resolver<?> resolver = getResolvers().get(i.getClass());
String key = in.nextString();
if(resolver == null) {
w("Unable to find a resolver for " + i.getClass() + " received " + key);
return null;
}
T t = (T) resolver.resolve(new NSK(key));
if(t == null) {
w("Unable to resolve " + i.getClass() + " " + key);
}
return t;
}
return delegate.read(in);
}
};
}
}
return null;
}
public Resolvable getInstance(Class<?> type) {
for(Resolvable i : resolvableTypes) {
if(i.getClass().equals(type)) {
return i;
}
}
return null;
}
public List<PlatformNamespaceKey> getAllKeys(Class<?> type) {
List<PlatformNamespaceKey> keys = new ArrayList<>();
Resolver<?> resolver = resolvers.get(type);
if(resolver != null) {
resolver.addAllKeys(keys);
}
return keys;
}
}

View File

@@ -1,51 +0,0 @@
package com.volmit.iris.engine;
import art.arcane.amulet.concurrent.J;
import lombok.Data;
import java.io.Closeable;
import java.io.IOException;
import java.util.concurrent.ForkJoinPool;
import java.util.concurrent.ForkJoinWorkerThread;
@Data
public class EngineExecutor implements ForkJoinPool.ForkJoinWorkerThreadFactory, Thread.UncaughtExceptionHandler, Closeable {
private final Engine engine;
private final ForkJoinPool forks;
public EngineExecutor(Engine engine)
{
this.engine = engine;
forks = new ForkJoinPool(engine.getConfiguration().getThreads(), this, this, true);
i("Started Pool with " + engine.getConfiguration().getThreads() + " priority " + engine.getConfiguration().getThreadPriority() + " threads.");
}
@Override
public void uncaughtException(Thread t, Throwable e) {
e.printStackTrace();
}
@Override
public ForkJoinWorkerThread newThread(ForkJoinPool pool) {
final ForkJoinWorkerThread worker = ForkJoinPool.defaultForkJoinWorkerThreadFactory.newThread(pool);
worker.setName("Iris " + engine.getWorld().getName() + " Executor " + worker.getPoolIndex());
return worker;
}
@Override
public void close() throws IOException {
i("Shutting down generator pool");
forks.shutdownNow().forEach((i) -> {
try
{
i.run();
}
catch(Throwable e)
{
e.printStackTrace();
}
});
i("Generator pool shutdown");
}
}

View File

@@ -1,14 +0,0 @@
package com.volmit.iris.engine;
import com.volmit.iris.platform.PlatformBiome;
import com.volmit.iris.platform.block.PlatformBlock;
import com.volmit.iris.platform.PlatformRegistry;
import lombok.Builder;
import lombok.Data;
@Builder
@Data
public class EngineRegistry {
private final PlatformRegistry<PlatformBlock> blockRegistry;
private final PlatformRegistry<PlatformBiome> biomeRegistry;
}

View File

@@ -1,16 +0,0 @@
package com.volmit.iris.engine;
import lombok.AllArgsConstructor;
import lombok.Data;
@Data
public class EngineSeedManager {
private final Engine engine;
private final long worldSeed;
public EngineSeedManager(Engine engine)
{
this.engine = engine;
this.worldSeed = engine.getWorld().getSeed();
}
}

View File

@@ -1,25 +0,0 @@
package com.volmit.iris.engine.dimension;
import com.volmit.iris.engine.resolver.EngineResolvable;
import com.volmit.iris.engine.resolver.Resolvable;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import java.util.Map;
@Data
@NoArgsConstructor
@Builder
@AllArgsConstructor
@EqualsAndHashCode(callSuper=false)
@Accessors(fluent = true, chain = true)
@Resolvable.Entity(id = "author")
public class IrisAuthor extends EngineResolvable
{
private String name;
private Map<String, String> social;
}

View File

@@ -1,33 +0,0 @@
package com.volmit.iris.engine.dimension;
import com.volmit.iris.engine.resolver.EngineResolvable;
import com.volmit.iris.engine.resolver.Resolvable;
import com.volmit.iris.platform.PlatformBiome;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper=false)
@Accessors(fluent = true, chain = true)
@Resolvable.Entity(id = "biome")
public class IrisBiome extends EngineResolvable {
private String name;
@Builder.Default
private IrisSurface surface = new IrisSurface();
@Builder.Default
private IrisRange height = IrisRange.flat(1);
public PlatformBiome toPlatformBiome()
{
return null;
}
}

View File

@@ -1,74 +0,0 @@
package com.volmit.iris.engine.dimension;
import com.google.gson.Gson;
import com.google.gson.TypeAdapter;
import com.google.gson.TypeAdapterFactory;
import com.google.gson.reflect.TypeToken;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonToken;
import com.google.gson.stream.JsonWriter;
import com.volmit.iris.engine.resolver.EngineResolvable;
import com.volmit.iris.engine.resolver.Resolvable;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import java.io.IOException;
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper=false)
@Accessors(fluent = true, chain = true)
@Resolvable.Entity(id = "chance", jsonTypes = {JsonToken.STRING, JsonToken.BEGIN_OBJECT})
public class IrisChance extends EngineResolvable implements TypeAdapterFactory {
@Builder.Default
@TokenConstructor(JsonToken.NUMBER)
private double threshold = 0.5;
@TokenConstructor(JsonToken.STRING)
@Builder.Default
private IrisGenerator generator = IrisGenerator.WHITE;
@Override
public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) {
final TypeAdapter<T> delegate = gson.getDelegateAdapter(this, type);
if(!type.getRawType().equals(getClass())) {
return null;
}
return new TypeAdapter<>() {
public void write(JsonWriter out, T value) {writeSafeJson(delegate, out, value);}
@SuppressWarnings("unchecked")
public T read(JsonReader in) throws IOException {
JsonToken token = in.peek();
if(token == JsonToken.STRING) {
return (T) IrisChance.half(gson.fromJson(in.nextString(), IrisGenerator.class));
}
return delegate.read(in);
}
};
}
public static IrisChance half(IrisGenerator generator) {
return IrisChance.builder()
.threshold(0.5)
.generator(generator)
.build();
}
public static IrisChance white(double chance) {
return IrisChance.builder()
.threshold(chance)
.generator(IrisGenerator.WHITE)
.build();
}
}

View File

@@ -1,25 +0,0 @@
package com.volmit.iris.engine.dimension;
import com.volmit.iris.engine.resolver.EngineResolvable;
import com.volmit.iris.engine.resolver.Resolvable;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper=false)
@Accessors(fluent = true, chain = true)
@Resolvable.Entity(id = "decorator")
public class IrisDecorator extends EngineResolvable {
@Builder.Default
private IrisPalette palette = IrisPalette.flat("minecraft:grass");
@Builder.Default
private IrisChance chance = IrisChance.white(0.25);
}

View File

@@ -1,30 +0,0 @@
package com.volmit.iris.engine.dimension;
import com.volmit.iris.engine.resolver.EngineResolvable;
import com.volmit.iris.engine.resolver.Resolvable;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.Singular;
import lombok.experimental.Accessors;
import java.util.ArrayList;
import java.util.List;
@Data
@NoArgsConstructor
@Builder
@AllArgsConstructor
@EqualsAndHashCode(callSuper=false)
@Accessors(fluent = true, chain = true)
@Resolvable.Entity(id = "dimension")
public class IrisDimension extends EngineResolvable {
@Builder.Default
private IrisDimensionMeta meta = new IrisDimensionMeta();
@Singular
@Type(IrisBiome.class)
private List<IrisBiome> biomes = new ArrayList<>();
}

View File

@@ -1,31 +0,0 @@
package com.volmit.iris.engine.dimension;
import com.volmit.iris.engine.resolver.EngineResolvable;
import com.volmit.iris.engine.resolver.Resolvable;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.Singular;
import lombok.experimental.Accessors;
import java.util.ArrayList;
import java.util.List;
@Data
@NoArgsConstructor
@Builder
@AllArgsConstructor
@EqualsAndHashCode(callSuper=false)
@Accessors(fluent = true, chain = true)
@Resolvable.Entity(id = "dimension-meta")
public class IrisDimensionMeta extends EngineResolvable
{
private String name;
private String description;
private String version;
@Singular
@Resolvable.Type(IrisAuthor.class)
private List<IrisAuthor> authors = new ArrayList<>();
}

View File

@@ -1,76 +0,0 @@
package com.volmit.iris.engine.dimension;
import art.arcane.source.NoisePlane;
import art.arcane.source.script.NoisePlaneConstructor;
import art.arcane.source.util.NoisePreset;
import com.google.gson.Gson;
import com.google.gson.TypeAdapter;
import com.google.gson.TypeAdapterFactory;
import com.google.gson.reflect.TypeToken;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonToken;
import com.google.gson.stream.JsonWriter;
import com.volmit.iris.engine.resolver.EngineResolvable;
import com.volmit.iris.engine.resolver.Resolvable;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import javax.script.ScriptException;
import java.io.IOException;
@Data
@NoArgsConstructor
@Builder
@AllArgsConstructor
@EqualsAndHashCode(callSuper=false)
@Accessors(fluent = true, chain = true)
@Resolvable.Entity(id = "generator", jsonTypes = {JsonToken.STRING, JsonToken.BEGIN_OBJECT})
public class IrisGenerator extends EngineResolvable implements TypeAdapterFactory {
public static final IrisGenerator NATURAL = IrisGenerator.builder().java("art.arcane.source.api.util.NoisePreset.NATURAL.create(seed)").build();
public static final IrisGenerator WHITE = IrisGenerator.builder().java("Noise.white(seed)").build();
public static final IrisGenerator FLAT = IrisGenerator.builder().java("Noise.flat(seed)").build();
@Builder.Default
private String java = "art.arcane.source.api.util.NoisePreset.NATURAL.create(seed)";
@Builder.Default
private IrisSeed seed = new IrisSeed();
public NoisePlane getNoisePlane(long seed)
{
try {
return NoisePlaneConstructor.execute(seed, java);
} catch(ScriptException e) {
e.printStackTrace();
return NoisePreset.NATURAL.create(seed);
}
}
@Override
public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) {
final TypeAdapter<T> delegate = gson.getDelegateAdapter(this, type);
if(!type.getRawType().equals(getClass())) {
return null;
}
return new TypeAdapter<>() {
public void write(JsonWriter out, T value) {writeSafeJson(delegate, out, value);}
@SuppressWarnings("unchecked")
public T read(JsonReader in) throws IOException {
JsonToken token = in.peek();
if(token == JsonToken.STRING) {
return (T) IrisGenerator.builder().java(in.nextString()).build();
}
return delegate.read(in);
}
};
}
}

View File

@@ -1,74 +0,0 @@
package com.volmit.iris.engine.dimension;
import com.google.gson.Gson;
import com.google.gson.TypeAdapter;
import com.google.gson.TypeAdapterFactory;
import com.google.gson.reflect.TypeToken;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonToken;
import com.google.gson.stream.JsonWriter;
import com.volmit.iris.engine.resolver.EngineResolvable;
import com.volmit.iris.engine.resolver.Resolvable;
import com.volmit.iris.platform.block.PlatformBlock;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.Singular;
import lombok.experimental.Accessors;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper=false)
@Accessors(fluent = true, chain = true)
@Resolvable.Entity(id = "palette", jsonTypes = {JsonToken.STRING, JsonToken.BEGIN_OBJECT})
public class IrisPalette extends EngineResolvable implements TypeAdapterFactory {
@Singular
@PlatformType(PlatformBlock.class)
@Type(String.class)
@TokenConstructor(JsonToken.STRING)
private List<String> blocks = new ArrayList<>();
@Builder.Default
private IrisGenerator generator = IrisGenerator.WHITE;
@Override
public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) {
final TypeAdapter<T> delegate = gson.getDelegateAdapter(this, type);
if(!type.getRawType().equals(getClass())) {
return null;
}
return new TypeAdapter<>() {
public void write(JsonWriter out, T value) {
writeSafeJson(delegate, out, value);
}
@SuppressWarnings("unchecked")
public T read(JsonReader in) throws IOException {
JsonToken token = in.peek();
if(token == JsonToken.STRING) {
return (T) IrisPalette.flat(in.nextString());
}
return delegate.read(in);
}
};
}
public static IrisPalette flat(String block){
return IrisPalette.builder()
.block(block)
.generator(IrisGenerator.FLAT)
.build();
}
}

View File

@@ -1,71 +0,0 @@
package com.volmit.iris.engine.dimension;
import com.google.gson.Gson;
import com.google.gson.TypeAdapter;
import com.google.gson.TypeAdapterFactory;
import com.google.gson.reflect.TypeToken;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonToken;
import com.google.gson.stream.JsonWriter;
import com.volmit.iris.engine.resolver.EngineResolvable;
import com.volmit.iris.engine.resolver.Resolvable;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import java.io.IOException;
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper=false)
@Accessors(fluent = true, chain = true)
@Resolvable.Entity(id = "range", jsonTypes = {JsonToken.NUMBER, JsonToken.BEGIN_OBJECT})
public class IrisRange extends EngineResolvable implements TypeAdapterFactory {
@Builder.Default
@TokenConstructor(JsonToken.NUMBER)
private double max = 1;
@Builder.Default
private double min = 1;
@Builder.Default
private IrisGenerator generator = IrisGenerator.NATURAL;
@Override
public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) {
final TypeAdapter<T> delegate = gson.getDelegateAdapter(this, type);
if(!type.getRawType().equals(getClass())) {
return null;
}
return new TypeAdapter<>() {
public void write(JsonWriter out, T value) {writeSafeJson(delegate, out, value);}
@SuppressWarnings("unchecked")
public T read(JsonReader in) throws IOException {
JsonToken token = in.peek();
if(token == JsonToken.NUMBER) {
double d = in.nextDouble();
return (T) IrisRange.builder().min(d).max(d).generator(IrisGenerator.FLAT).build();
}
return delegate.read(in);
}
};
}
public static IrisRange flat(double v) {
return IrisRange.builder()
.max(v)
.min(v)
.generator(IrisGenerator.FLAT)
.build();
}
}

View File

@@ -1,87 +0,0 @@
package com.volmit.iris.engine.dimension;
import com.google.gson.Gson;
import com.google.gson.TypeAdapter;
import com.google.gson.TypeAdapterFactory;
import com.google.gson.reflect.TypeToken;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonToken;
import com.google.gson.stream.JsonWriter;
import com.volmit.iris.engine.Engine;
import com.volmit.iris.engine.resolver.EngineResolvable;
import com.volmit.iris.engine.resolver.Resolvable;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import java.io.IOException;
@Data
@NoArgsConstructor
@Builder
@AllArgsConstructor
@EqualsAndHashCode(callSuper=false)
@Accessors(fluent = true, chain = true)
@Resolvable.Entity(id = "seed", jsonTypes = {JsonToken.NUMBER, JsonToken.STRING, JsonToken.BEGIN_OBJECT})
public class IrisSeed extends EngineResolvable implements TypeAdapterFactory {
@Builder.Default
private IrisSeedSetMode mode = IrisSeedSetMode.LOCAL_OFFSET;
@Builder.Default
@TokenConstructor(JsonToken.NUMBER)
private long offset = 0;
@TokenConstructor(JsonToken.STRING)
private String hashOffset;
public long getOffset() {
if(hashOffset != null && hashOffset.isNotEmpty()) {
return hashOffset.hashCode() + offset;
}
return offset;
}
public double getSeed(Engine engine, long localSeed) {
return switch(mode)
{
case WORLD -> engine.getSeedManager().getWorldSeed();
case LOCAL -> localSeed;
case LOCAL_OFFSET -> localSeed + getOffset();
case RAW -> getOffset();
case WORLD_OFFSET -> engine.getSeedManager().getWorldSeed() + getOffset();
case RANDOM -> (Math.random() * Long.MAX_VALUE) + (Math.random() * Long.MAX_VALUE);
};
}
@Override
public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) {
final TypeAdapter<T> delegate = gson.getDelegateAdapter(this, type);
if(!type.getRawType().equals(getClass())) {
return null;
}
return new TypeAdapter<>() {
public void write(JsonWriter out, T value) {writeSafeJson(delegate, out, value);}
@SuppressWarnings("unchecked")
public T read(JsonReader in) throws IOException {
JsonToken token = in.peek();
if(token == JsonToken.STRING) {
return (T) IrisSeed.builder().hashOffset(in.nextString()).build();
}
if(token == JsonToken.NUMBER) {
return (T) IrisSeed.builder().offset(Double.doubleToLongBits(in.nextDouble())).build();
}
return delegate.read(in);
}
};
}
}

View File

@@ -1,11 +0,0 @@
package com.volmit.iris.engine.dimension;
public enum IrisSeedSetMode
{
WORLD,
RAW,
WORLD_OFFSET,
LOCAL,
LOCAL_OFFSET,
RANDOM
}

View File

@@ -1,31 +0,0 @@
package com.volmit.iris.engine.dimension;
import com.volmit.iris.engine.resolver.EngineResolvable;
import com.volmit.iris.engine.resolver.Resolvable;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.Singular;
import lombok.experimental.Accessors;
import java.util.ArrayList;
import java.util.List;
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper=false)
@Accessors(fluent = true, chain = true)
@Resolvable.Entity(id = "surface")
public class IrisSurface extends EngineResolvable {
@Singular
@Type(IrisSurfaceLayer.class)
private List<IrisSurfaceLayer> layers = new ArrayList<>();
@Singular
@Type(IrisDecorator.class)
private List<IrisDecorator> decorators = new ArrayList<>();
}

View File

@@ -1,25 +0,0 @@
package com.volmit.iris.engine.dimension;
import com.volmit.iris.engine.resolver.EngineResolvable;
import com.volmit.iris.engine.resolver.Resolvable;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper=false)
@Accessors(fluent = true, chain = true)
@Resolvable.Entity(id = "surface-layer")
public class IrisSurfaceLayer extends EngineResolvable {
@Builder.Default
private IrisPalette palette = IrisPalette.flat("minecraft:stone");
@Builder.Default
private IrisRange thickness = IrisRange.flat(1);
}

View File

@@ -1,35 +0,0 @@
package com.volmit.iris.engine.feature;
import com.volmit.iris.engine.Engine;
import com.volmit.iris.platform.PlatformNamespaced;
import lombok.Data;
@Data
public abstract class Feature<T extends PlatformNamespaced, S extends FeatureState> {
private final String name;
private final Engine engine;
private boolean optimize;
private boolean heightAgnostic;
public Feature(String name, Engine engine)
{
this.engine = engine;
this.name = name;
this.optimize = true;
this.heightAgnostic = true;
}
public FeatureTask<T, S> task(FeatureSizedTarget target, FeatureTarget<T> origin, FeatureStorage storage, int verticalExecutionSize, int horizontalExecutionSize, FeatureTaskTiming timings)
{
return new FeatureTask<>(engine, this, storage, target, origin, verticalExecutionSize, horizontalExecutionSize, heightAgnostic, timings);
}
public FeatureTask<T, S> task(FeatureSizedTarget target, FeatureTarget<T> origin, FeatureStorage storage, int horizontalExecutionSize, FeatureTaskTiming timings)
{
return new FeatureTask<>(engine, this, storage, target, origin, Integer.MAX_VALUE, horizontalExecutionSize, heightAgnostic, timings);
}
public abstract S prepare(Engine engine, FeatureSizedTarget target, FeatureStorage storage);
public abstract void generate(Engine engine, S state, FeatureTarget<T> target, FeatureStorage storage);
}

View File

@@ -1,159 +0,0 @@
package com.volmit.iris.engine.feature;
import art.arcane.amulet.range.IntegerRange;
import art.arcane.spatial.hunk.storage.ArrayHunk;
import art.arcane.spatial.hunk.view.HunkView;
import art.arcane.spatial.util.Consume;
import com.volmit.iris.platform.PlatformNamespaced;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
import java.util.stream.Stream;
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Data
public class FeatureSizedTarget {
@Builder.Default
private final int width = 16;
@Builder.Default
private final int height = 0;
@Builder.Default
private final int depth = 16;
@Builder.Default
private final int offsetX = 0;
@Builder.Default
private final int offsetY = 0;
@Builder.Default
private final int offsetZ = 0;
public <T extends PlatformNamespaced> FeatureTarget<T> hunked()
{
return new FeatureTarget<>(new ArrayHunk<>(width, height, depth), this);
}
public <T extends PlatformNamespaced> FeatureTarget<T> hunked(FeatureTarget<T> origin)
{
return new FeatureTarget<>(new HunkView<>(origin.getHunk(), width, height, depth, offsetX - origin.getOffsetX(), offsetY - origin.getOffsetY(), offsetZ - origin.getOffsetZ()), this);
}
Stream<FeatureSizedTarget> splitX() {
if(width <= 1) {
return Stream.of(this);
}
int wo2 = width/2;
return Stream.of(FeatureSizedTarget.builder()
.width(wo2).height(height).depth(depth)
.offsetX(offsetX).offsetY(offsetY).offsetZ(offsetZ).build(),
FeatureSizedTarget.builder()
.width(width - wo2).height(height).depth(depth)
.offsetX(offsetX + wo2).offsetY(offsetY).offsetZ(offsetZ).build());
}
Stream<FeatureSizedTarget> splitY() {
if(height <= 1) {
return Stream.of(this);
}
int ho2 = height / 2;
return Stream.of(FeatureSizedTarget.builder()
.width(width).height(ho2).depth(depth)
.offsetX(offsetX).offsetY(offsetY).offsetZ(offsetZ).build(),
FeatureSizedTarget.builder()
.width(width).height(height - ho2).depth(depth)
.offsetX(offsetX).offsetY(offsetY + ho2).offsetZ(offsetZ).build());
}
Stream<FeatureSizedTarget> splitZ() {
if(depth <= 1) {
return Stream.of(this);
}
int do2 = depth / 2;
return Stream.of(FeatureSizedTarget.builder()
.width(width).height(height).depth(do2)
.offsetX(offsetX).offsetY(offsetY).offsetZ(offsetZ).build(),
FeatureSizedTarget.builder()
.width(width).height(height).depth(depth - do2)
.offsetX(offsetX).offsetY(offsetY).offsetZ(offsetZ + do2).build());
}
public int getAbsoluteMaxX()
{
return getOffsetX() + getWidth() - 1;
}
public int getAbsoluteMaxY()
{
return getOffsetY() + getHeight() - 1;
}
public int getAbsoluteMaxZ()
{
return getOffsetZ() + getDepth() - 1;
}
public IntegerRange yCap(int max) {
return new IntegerRange(y().getLeftEndpoint(), Math.min(y().getRightEndpoint(), max));
}
public void forYCap(Consume.One<Integer> consumer, int max) {
for(int y : yCap(max)) {
consumer.accept(y);
}
}
public void forXZ(Consume.Two<Integer, Integer> consumer) {
for(int x : x()) {
for(int z : z()) {
consumer.accept(x, z);
}
}
}
public IntegerRange x()
{
return new IntegerRange(getOffsetX(), getAbsoluteMaxX());
}
public IntegerRange y()
{
return new IntegerRange(getOffsetY(), getAbsoluteMaxY());
}
public IntegerRange z()
{
return new IntegerRange(getOffsetZ(), getAbsoluteMaxZ());
}
public IntegerRange localX()
{
return new IntegerRange(0, getWidth() - 1);
}
public IntegerRange localY()
{
return new IntegerRange(0, getHeight() - 1);
}
public IntegerRange localZ()
{
return new IntegerRange(0, getDepth() - 1);
}
public static FeatureSizedTarget mergedSize(Stream<FeatureSizedTarget> targets, boolean x, boolean y, boolean z) {
List<FeatureSizedTarget> t = targets.toList();
return FeatureSizedTarget.builder()
.width(x ? t.stream().mapToInt(FeatureSizedTarget::getWidth).sum() : t[0].getWidth())
.height(y ? t.stream().mapToInt(FeatureSizedTarget::getHeight).sum() : t[0].getHeight())
.depth(z ? t.stream().mapToInt(FeatureSizedTarget::getDepth).sum() : t[0].getDepth())
.offsetX(x ? t.stream().mapToInt(FeatureSizedTarget::getOffsetX).min().orElse(0) : t[0].getOffsetX())
.offsetY(y ? t.stream().mapToInt(FeatureSizedTarget::getOffsetY).min().orElse(0) : t[0].getOffsetY())
.offsetZ(z ? t.stream().mapToInt(FeatureSizedTarget::getOffsetZ).min().orElse(0) : t[0].getOffsetZ())
.build();
}
}

View File

@@ -1,5 +0,0 @@
package com.volmit.iris.engine.feature;
public interface FeatureState {
}

View File

@@ -1,22 +0,0 @@
package com.volmit.iris.engine.feature;
import com.volmit.iris.engine.dimension.IrisBiome;
import com.volmit.iris.util.NoiseCache;
import com.volmit.iris.util.ShortNoiseCache;
import lombok.Data;
@Data
public class FeatureStorage {
private ShortNoiseCache height;
private NoiseCache<IrisBiome> biome;
private final int w;
private final int h;
public FeatureStorage(int w, int h)
{
this.w = w;
this.h = h;
this.height = new ShortNoiseCache(w, h);
this.biome = new NoiseCache<>(w, h);
}
}

View File

@@ -1,38 +0,0 @@
package com.volmit.iris.engine.feature;
import art.arcane.spatial.hunk.Hunk;
import art.arcane.spatial.hunk.view.HunkView;
import com.volmit.iris.platform.PlatformNamespaced;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.List;
import java.util.stream.Stream;
@Data
@EqualsAndHashCode(callSuper = true)
public class FeatureTarget<T extends PlatformNamespaced> extends FeatureSizedTarget {
private final Hunk<T> hunk;
public FeatureTarget(Hunk<T> hunk, int offsetX, int offsetY, int offsetZ)
{
super(hunk.getWidth(), hunk.getHeight(), hunk.getDepth(), offsetX, offsetY, offsetZ);
this.hunk = hunk;
}
public FeatureTarget(Hunk<T> hunk, FeatureSizedTarget target)
{
this(hunk, target.getOffsetX(), target.getOffsetY(), target.getOffsetZ());
}
public static <V extends PlatformNamespaced> FeatureTarget<V> mergedTarget(Stream<FeatureTarget<V>> targets, FeatureTarget<V> origin, boolean x, boolean y, boolean z)
{
List<FeatureTarget<V>> t = targets.toList();
FeatureSizedTarget mergedSize = FeatureSizedTarget.mergedSize(t.stream().map(i -> i), x, y, z);
Hunk<V> hunk = new HunkView<>(origin.getHunk(), mergedSize.getWidth(), mergedSize.getHeight(), mergedSize.getDepth(),
mergedSize.getOffsetX() - origin.getOffsetX(),
mergedSize.getOffsetY() - origin.getOffsetY(),
mergedSize.getOffsetZ() - origin.getOffsetZ());
return new FeatureTarget<>(hunk, mergedSize);
}
}

View File

@@ -1,78 +0,0 @@
package com.volmit.iris.engine.feature;
import art.arcane.chrono.PrecisionStopwatch;
import com.volmit.iris.engine.Engine;
import com.volmit.iris.platform.PlatformNamespaced;
import lombok.AllArgsConstructor;
import lombok.Builder;
import java.util.concurrent.Callable;
import java.util.concurrent.ForkJoinTask;
import java.util.concurrent.RecursiveTask;
/**
* Continuously splits up a hunk of work in all 3 dimensions until the job size is within the
* specified limits. This allows a single hunk to be split until the ideal amount of tasks can run in parallel.
* @param <T> The namespaced object type
* @param <S> The feature state type
*/
@Builder
@AllArgsConstructor
public class FeatureTask<T extends PlatformNamespaced, S extends FeatureState> extends RecursiveTask<FeatureTarget<T>> implements Callable<FeatureTarget<T>> {
private final Engine engine;
private final Feature<T, S> feature;
private final FeatureStorage storage;
private final FeatureSizedTarget size;
private final FeatureTarget<T> origin;
private final int verticalPrepareSize;
private final int horizontalPrepareSize;
private final boolean heightAgnostic;
private final FeatureTaskTiming timings;
@Override
protected FeatureTarget<T> compute() {
FeatureTarget<T> result;
PrecisionStopwatch p = null;
if(timings != null) {
p = PrecisionStopwatch.start();
}
if(!heightAgnostic && size.getHeight() > verticalPrepareSize * 2) {
result = FeatureTarget.mergedTarget(size.splitY()
.map(i -> engine.getExecutor().getForks().submit((ForkJoinTask<FeatureTarget<T>>) with(i)))
.map(ForkJoinTask::join), origin, false, true, false);
}
else if(size.getWidth() > horizontalPrepareSize * 2) {
result = FeatureTarget.mergedTarget(size.splitX().map(i -> engine.getExecutor().getForks().submit((ForkJoinTask<FeatureTarget<T>>) with(i)))
.map(ForkJoinTask::join), origin, true, false, false);
}
else if(size.getDepth() > horizontalPrepareSize * 2) {
result = FeatureTarget.mergedTarget(size.splitZ().map(i -> engine.getExecutor().getForks().submit((ForkJoinTask<FeatureTarget<T>>) with(i)))
.map(ForkJoinTask::join), origin, false, false, true);
}
else {
IrisPreparedFeature<T, S> preparedFeature = new IrisPreparedFeature<>(engine, feature, size, feature.prepare(engine, size, storage));
result = preparedFeature.generate(origin, storage);
}
if(timings != null) {
timings.onCompleted(p.getMilliseconds());
}
return result;
}
private FeatureTask<T, S> with(FeatureSizedTarget size)
{
return new FeatureTask<>(engine, feature, storage, size, origin, verticalPrepareSize, horizontalPrepareSize, heightAgnostic, null);
}
@Override
public FeatureTarget<T> call() throws Exception {
return compute();
}
}

View File

@@ -1,6 +0,0 @@
package com.volmit.iris.engine.feature;
@FunctionalInterface
public interface FeatureTaskTiming {
void onCompleted(double ms);
}

View File

@@ -1,21 +0,0 @@
package com.volmit.iris.engine.feature;
import com.volmit.iris.engine.Engine;
import com.volmit.iris.platform.PlatformNamespaced;
import lombok.Builder;
import lombok.Data;
@Builder
@Data
public class IrisPreparedFeature<T extends PlatformNamespaced, S extends FeatureState> {
private final Engine engine;
private final Feature<T, S> feature;
private final FeatureSizedTarget size;
private final S state;
public FeatureTarget<T> generate(FeatureTarget<T> origin, FeatureStorage storage) {
FeatureTarget<T> target = size.hunked(origin);
feature.generate(engine, state, target, storage);
return target;
}
}

View File

@@ -1,12 +0,0 @@
package com.volmit.iris.engine.feature;
import com.volmit.iris.engine.Engine;
import com.volmit.iris.engine.feature.FeatureStorage;
import com.volmit.iris.engine.feature.FeatureTarget;
import com.volmit.iris.engine.feature.features.FeatureTerrain;
import com.volmit.iris.engine.resolver.EngineResolvable;
import com.volmit.iris.platform.PlatformNamespaced;
public interface SyntheticFeature<T extends PlatformNamespaced, V extends EngineResolvable, S extends FeatureState> {
void generate(Engine engine, V component, FeatureTarget<T> target, S state);
}

View File

@@ -1,38 +0,0 @@
package com.volmit.iris.engine.feature.features;
import com.volmit.iris.engine.Engine;
import com.volmit.iris.engine.feature.Feature;
import com.volmit.iris.engine.feature.FeatureSizedTarget;
import com.volmit.iris.engine.feature.FeatureState;
import com.volmit.iris.engine.feature.FeatureStorage;
import com.volmit.iris.engine.feature.FeatureTarget;
import com.volmit.iris.platform.block.PlatformBlock;
import lombok.AllArgsConstructor;
import lombok.Data;
public class FeatureError extends Feature<PlatformBlock, FeatureError.State> {
private static final State DEFAULT_STATE = new State();
private final PlatformBlock ERROR_BLOCK;
public FeatureError(Engine engine) {
super("error", engine);
setOptimize(false);
ERROR_BLOCK = engine.block("red_sandstone");
}
@Override
public State prepare(Engine engine, FeatureSizedTarget target, FeatureStorage storage) {
return DEFAULT_STATE;
}
@Override
public void generate(Engine engine, State state, FeatureTarget<PlatformBlock> target, FeatureStorage storage) {
target.forXZ((x, z) -> target.forYCap((y -> target.getHunk().set(x, y, z, ERROR_BLOCK)), 1));
}
@Data
@AllArgsConstructor
public static class State implements FeatureState {
}
}

View File

@@ -1,44 +0,0 @@
package com.volmit.iris.engine.feature.features;
import com.volmit.iris.engine.Engine;
import com.volmit.iris.engine.dimension.IrisBiome;
import com.volmit.iris.engine.feature.*;
import com.volmit.iris.platform.PlatformBiome;
import com.volmit.iris.util.NoiseCache;
import lombok.AllArgsConstructor;
import lombok.Data;
public class FeatureOriginBiome extends Feature<PlatformBiome, FeatureOriginBiome.State> {
public FeatureOriginBiome(Engine engine) {
super("biome-origin", engine);
}
@Override
public State prepare(Engine engine, FeatureSizedTarget target, FeatureStorage storage) {
final NoiseCache<IrisBiome> noise = storage.getBiome();
for(int x : target.x()) {
for(int z : target.z()) {
noise.set(x & storage.getW() - 1, z & storage.getH() - 1, null);
}
}
return new State(noise);
}
@Override
public void generate(Engine engine, State state, FeatureTarget<PlatformBiome> target, FeatureStorage storage) {
for(int x : target.x()) {
for(int z : target.z()) {
IrisBiome b = state.getBiomes().get(x, z);
target.getHunk().set(x, 0, z, b.toPlatformBiome());
}
}
}
@Data
@AllArgsConstructor
public static class State implements FeatureState {
private final NoiseCache<IrisBiome> biomes;
}
}

View File

@@ -1,73 +0,0 @@
package com.volmit.iris.engine.feature.features;
import art.arcane.source.NoisePlane;
import art.arcane.source.interpolator.CubicInterpolator;
import art.arcane.source.interpolator.Interpolator;
import art.arcane.source.interpolator.LinearInterpolator;
import art.arcane.source.interpolator.StarcastInterpolator;
import art.arcane.source.noise.provider.MirroredCacheProvider;
import art.arcane.source.util.NoisePreset;
import art.arcane.spatial.hunk.Hunk;
import art.arcane.spatial.hunk.storage.ArrayHunk;
import com.volmit.iris.engine.Engine;
import com.volmit.iris.engine.feature.*;
import com.volmit.iris.platform.block.PlatformBlock;
import lombok.AllArgsConstructor;
import lombok.Data;
public class FeatureTerrain extends Feature<PlatformBlock, FeatureTerrain.State> {
private final PlatformBlock stone;
private final NoisePlane generator;
private final NoisePlane generator2;
public FeatureTerrain(Engine engine) {
super("terrain", engine);
setOptimize(true);
stone = engine.block("stone");
this.generator = NoisePreset.NATURAL.create(1234);
this.generator2 = NoisePreset.NATURAL.create(6664).fit(0, 1).scale(0.1);
}
@Override
public State prepare(Engine engine, FeatureSizedTarget target, FeatureStorage storage) {
Hunk<Double> snc = new ArrayHunk<>(target.getWidth(), target.getHeight(), target.getDepth());
short n;
int fdx,fdz;
for(int x : target.x()) {
fdx = Math.floorMod(x, target.getWidth());
for(int z : target.z()) {
fdz = Math.floorMod(z, target.getDepth());
n = (short) generator.noise(x, z);
for(int y = 0; y < n; y++) {
if(generator2.noise(x,y,z) > 0.5) {
snc.set(fdx, y, fdz, 1D);
}
}
}
}
return new State(snc);
}
@Override
public void generate(Engine engine, State state, FeatureTarget<PlatformBlock> target, FeatureStorage storage) {
int y;
for(int x : target.localX()) {
for(int z : target.localZ()) {
for(int i = 0; i < target.getHeight(); i++) {
Double v = state.getNoise().get(x, i, z);
v = v == null ? 0f : v;
if(v >= 0.5) {
target.getHunk().set(x,i, z, stone);
}
}
}
}
}
@Data
@AllArgsConstructor
public static class State implements FeatureState {
private final Hunk<Double> noise;
}
}

View File

@@ -1,17 +0,0 @@
package com.volmit.iris.engine.feature.features.synthetic;
import com.volmit.iris.engine.Engine;
import com.volmit.iris.engine.dimension.IrisBiome;
import com.volmit.iris.engine.feature.FeatureStorage;
import com.volmit.iris.engine.feature.FeatureTarget;
import com.volmit.iris.engine.feature.SyntheticFeature;
import com.volmit.iris.engine.feature.features.FeatureTerrain;
import com.volmit.iris.platform.block.PlatformBlock;
public class SyntheticBiomeTerrain implements SyntheticFeature<PlatformBlock, IrisBiome, FeatureTerrain.State>
{
@Override
public void generate(Engine engine, IrisBiome component, FeatureTarget<PlatformBlock> target, FeatureTerrain.State state) {
}
}

View File

@@ -1,4 +0,0 @@
package com.volmit.iris.engine.network;
public class Network {
}

View File

@@ -1,45 +0,0 @@
package com.volmit.iris.engine.network.server;
import com.volmit.iris.engine.Engine;
import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;
import java.net.SocketTimeoutException;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
public class EngineServer extends Thread {
private final Engine engine;
private final ServerSocket server;
private final Map<UUID, EngineServerConnection> connections;
public EngineServer(Engine engine, int bindPort) throws IOException {
this.engine = engine;
this.connections = new HashMap<>();
this.server = new ServerSocket(bindPort);
this.server.setPerformancePreferences(0, 0, 1);
this.server.setSoTimeout(5000);
}
public void run() {
while(!interrupted()) {
try {
Socket socket = server.accept();
EngineServerConnection connection = new EngineServerConnection(this, socket);
connections.put(connection.getConnectionId(), connection);
}
catch(SocketTimeoutException e) {
continue;
} catch (Throwable e) {
throw new RuntimeException(e);
}
}
}
public void close() throws IOException {
this.interrupt();
server.close();
}
}

View File

@@ -1,19 +0,0 @@
package com.volmit.iris.engine.network.server;
import lombok.Getter;
import java.net.Socket;
import java.util.UUID;
@Getter
public class EngineServerConnection extends Thread {
private final EngineServer server;
private final Socket socket;
private final UUID connectionId;
public EngineServerConnection(EngineServer server, Socket socket) {
this.server = server;
this.socket = socket;
this.connectionId = UUID.randomUUID();
}
}

View File

@@ -1,63 +0,0 @@
package com.volmit.iris.engine.optimizer;
import art.arcane.amulet.range.IntegerRange;
import lombok.AllArgsConstructor;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
@Data
@AllArgsConstructor
public class HunkSlizeConfiguration {
private final int verticalSlice;
private final int horizontalSlize;
public String toString()
{
return "H" + horizontalSlize + "" + ((verticalSlice < 8192) ? ("V" + verticalSlice) : "");
}
public static List<HunkSlizeConfiguration> generateConfigurations(IntegerRange vertical, IntegerRange horizontal)
{
List<HunkSlizeConfiguration> configurations = new ArrayList<>();
for(int i : slice(vertical))
{
for(int j : slice(horizontal))
{
configurations.add(new HunkSlizeConfiguration(i, j));
}
}
return configurations;
}
public static List<HunkSlizeConfiguration> generateConfigurations(int vertical, IntegerRange horizontal)
{
List<HunkSlizeConfiguration> configurations = new ArrayList<>();
for(int j : slice(horizontal))
{
configurations.add(new HunkSlizeConfiguration(vertical, j));
}
return configurations;
}
private static List<Integer> slice(IntegerRange range)
{
List<Integer> v = new ArrayList<>();
v.add(range.getRightEndpoint());
v.add(range.getLeftEndpoint());
int i = (int) (range.getRightEndpoint() / 1.25);
while(i > range.getLeftEndpoint() && i >= 1)
{
v.add(i);
i /= 1.25;
}
return v.withoutDuplicates();
}
}

View File

@@ -1,38 +0,0 @@
package com.volmit.iris.engine.optimizer;
import art.arcane.chrono.Average;
import art.arcane.spatial.hunk.storage.AtomicDoubleHunk;
import lombok.Data;
import java.util.concurrent.atomic.AtomicInteger;
@Data
public class IrisOptimizationAttempt<T> {
private double value;
private final AtomicInteger runs;
private final int testRuns;
private final T parameters;
public IrisOptimizationAttempt(T parameters, int testRuns)
{
this.parameters = parameters;
this.testRuns = testRuns;
this.value = 0;
this.runs = new AtomicInteger(0);
}
public double getAverageTime()
{
return value;
}
public boolean isComplete()
{
return runs.get() >= testRuns;
}
public void report(double ms) {
value += ms;
runs.incrementAndGet();
}
}

View File

@@ -1,88 +0,0 @@
package com.volmit.iris.engine.optimizer;
import art.arcane.amulet.format.Form;
import art.arcane.chrono.Average;
import lombok.Builder;
import lombok.Data;
import lombok.Singular;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
@Data
public class IrisOptimizer<T> {
private final String optimizedFeatureName;
private final int testRuns;
private int dummyRuns;
private final List<T> options;
private final Map<T, Double> results;
private final Map<T, IrisOptimizationAttempt<T>> attempts = new ConcurrentHashMap<>();
private T defaultOption;
private final double chanceToTest;
private double bestTime;
public IrisOptimizer(int testRuns, List<T> options, T defaultOption, double chanceToTest, String optimizedFeatureName) {
this.bestTime = Double.MAX_VALUE;
this.dummyRuns = 1024;
this.testRuns = testRuns;
this.results = new HashMap<>();
this.options = options;
this.optimizedFeatureName = optimizedFeatureName;
this.defaultOption = defaultOption;
this.chanceToTest = chanceToTest;
for(T i : options) {
attempts.put(i, new IrisOptimizationAttempt<>(i, testRuns));
}
}
public String toString() {
return "optimizer";
}
public synchronized void report(T parameters, double ms)
{
if(dummyRuns-- > 0)
{
return;
}
IrisOptimizationAttempt<T> attempt = attempts.get(parameters);
if(attempt != null) {
attempt.report(ms);
if(attempt.isComplete()) {
results.put(parameters, attempt.getAverageTime());
attempts.remove(parameters);
double result = attempt.getAverageTime();
if(result < bestTime) {
bestTime = result;
defaultOption = attempt.getParameters();
}
d("Attempted " + optimizedFeatureName + " with " + defaultOption.toString() + " " + Form.duration(attempt.getAverageTime(), 2));
if(attempts.isEmpty()) {
d("Fully Optimized " + optimizedFeatureName + " with " + defaultOption.toString());
for(T i : results.keySet()) {
d(i.toString() + ": " + Form.duration(results.get(i), 2));
}
}
}
}
}
public T nextParameters() {
if(!attempts.isEmpty() && Math.r(chanceToTest)) {
return attempts.k().popRandom();
}
return defaultOption;
}
}

View File

@@ -1,28 +0,0 @@
package com.volmit.iris.engine.pipeline;
import com.volmit.iris.engine.Engine;
import com.volmit.iris.engine.feature.FeatureSizedTarget;
import com.volmit.iris.engine.feature.FeatureStorage;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.Singular;
import java.util.List;
@Data
@AllArgsConstructor
@Builder
public class EnginePipeline
{
@Singular
private final List<PipelinePhase> phases;
public void generate(Engine engine, FeatureSizedTarget target, PipedHunkStack stack) {
FeatureStorage storage = new FeatureStorage(engine.getConfiguration().getChunkSize(), engine.getConfiguration().getChunkSize());
for(PipelinePhase i : phases) {
i.generate(engine, target, stack, storage);
}
}
}

View File

@@ -1,33 +0,0 @@
package com.volmit.iris.engine.pipeline;
import com.volmit.iris.engine.Engine;
import com.volmit.iris.engine.feature.FeatureSizedTarget;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.Singular;
import java.util.List;
@Data
@Builder
@AllArgsConstructor
public class EnginePlumbing {
private final Engine engine;
@Singular
private final List<EnginePipeline> pipelines;
private final EnginePipeline errorPipeline;
public void generate(Engine engine, FeatureSizedTarget target, PipedHunkStack stack) {
for(EnginePipeline i : pipelines) {
i.generate(engine, target, stack);
}
try {
}
catch(Throwable e) {
e.printStackTrace();
getErrorPipeline().generate(engine, target, stack);
}
}
}

View File

@@ -1,27 +0,0 @@
package com.volmit.iris.engine.pipeline;
import com.volmit.iris.engine.feature.FeatureTarget;
import com.volmit.iris.platform.PlatformNamespaced;
import java.util.HashMap;
import java.util.Map;
public class PipedHunkStack {
private final Map<Class<? extends PlatformNamespaced>, FeatureTarget<? extends PlatformNamespaced>> hunks;
public PipedHunkStack()
{
this.hunks = new HashMap<>();
}
public void register(Class<? extends PlatformNamespaced> clazz, FeatureTarget<? extends PlatformNamespaced> hunk)
{
hunks.put(clazz, hunk);
}
@SuppressWarnings("unchecked")
public <T extends PlatformNamespaced> FeatureTarget<T> hunk(Class<?> hunk)
{
return (FeatureTarget<T>) hunks.get(hunk);
}
}

View File

@@ -1,34 +0,0 @@
package com.volmit.iris.engine.pipeline;
import com.volmit.iris.engine.Engine;
import com.volmit.iris.engine.feature.FeatureSizedTarget;
import com.volmit.iris.engine.feature.FeatureStorage;
import com.volmit.iris.engine.feature.FeatureTarget;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.Singular;
import java.util.List;
import java.util.concurrent.ExecutionException;
import java.util.stream.Collectors;
@Data
@Builder
@AllArgsConstructor
public class PipelinePhase
{
@Singular
private final List<PipelineTask<?>> tasks;
public List<FeatureTarget<?>> generate(Engine engine, FeatureSizedTarget target, PipedHunkStack stack, FeatureStorage storage) {
return engine.getExecutor().getForks().invokeAll(tasks.stream().map(i -> i.task(target, stack.hunk(i.getTarget()), storage))
.collect(Collectors.toList())).stream().map(i -> {
try {
return i.get();
} catch(Throwable e) {
throw new RuntimeException(e);
}
}).collect(Collectors.toList());
}
}

View File

@@ -1,44 +0,0 @@
package com.volmit.iris.engine.pipeline;
import art.arcane.amulet.range.IntegerRange;
import com.volmit.iris.engine.feature.*;
import com.volmit.iris.engine.optimizer.HunkSlizeConfiguration;
import com.volmit.iris.engine.optimizer.IrisOptimizer;
import com.volmit.iris.platform.PlatformNamespaced;
import lombok.AllArgsConstructor;
import lombok.Data;
import java.util.List;
import static art.arcane.amulet.MagicalSugar.*;
@AllArgsConstructor
@Data
public class PipelineTask<T extends PlatformNamespaced>
{
private final Feature<T, ?> feature;
private final Class<T> target;
private final IntegerRange verticalEnvelope;
private final IntegerRange horizontalEnvelope;
private final IrisOptimizer<HunkSlizeConfiguration> optimizer;
public PipelineTask(Feature<T, ?> feature, Class<T> target, IntegerRange verticalEnvelope, IntegerRange horizontalEnvelope)
{
this.feature = feature;
this.target = target;
this.verticalEnvelope = verticalEnvelope;
this.horizontalEnvelope = horizontalEnvelope;
List<HunkSlizeConfiguration> configurations = feature.isHeightAgnostic() ? HunkSlizeConfiguration.generateConfigurations(Integer.MAX_VALUE, horizontalEnvelope)
: HunkSlizeConfiguration.generateConfigurations(verticalEnvelope, horizontalEnvelope);
this.optimizer = new IrisOptimizer<>(128, configurations, configurations[0], 1, feature.getName());
}
public PipelineTask(Feature<T, ?> feature, Class<T> target) {
this(feature, target, 1 to 16, 1 to 16);
}
public FeatureTask<T, ?> task(FeatureSizedTarget target, FeatureTarget<T> origin, FeatureStorage storage){
HunkSlizeConfiguration configuration = getFeature().isOptimize() ? optimizer.nextParameters() : optimizer.getDefaultOption();
return feature.task(target, origin, storage, configuration.getVerticalSlice(), configuration.getHorizontalSlize(), (ms) -> optimizer.report(configuration, ms));
}
}

View File

@@ -1,71 +0,0 @@
package com.volmit.iris.engine.resolver;
import art.arcane.amulet.format.Form;
import com.volmit.iris.platform.PlatformNamespaceKey;
import lombok.Data;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
@Data
public class CompositeResolver<T extends Resolvable> implements Resolver<T> {
private final Map<String, Resolver<T>> resolvers;
private final String[] namespaces;
public CompositeResolver(Map<String, Resolver<T>> resolvers)
{
this.resolvers = resolvers;
this.namespaces = resolvers.keySet().toArray(new String[0]);
}
@Override
public boolean hasNamespace(String namespace) {
return resolvers.containsKey(namespace);
}
@Override
public T resolve(PlatformNamespaceKey key) {
return resolvers.get(key.getNamespace()).resolve(key);
}
@Override
public T resolve(String key) {
for(String i : getNamespaces()) {
if(resolvers.get(i).contains(i, key)) {
return resolvers.get(i).resolve(key);
}
}
return null;
}
@Override
public Resolver<T> and(String namespace, Resolver<T> resolver) {
Map<String, Resolver<T>> resolvers = this.resolvers.copy();
if(hasNamespace(namespace)) {
resolvers.put(namespace, resolvers.get(namespace).and(namespace, resolver));
}
else {
resolvers.put(namespace, resolver);
}
return new CompositeResolver<>(resolvers);
}
@Override
public void print(String type, Object printer, int indent) {
printer.i(Form.repeat(" ", indent) + "Composite[" + Arrays.toString(getNamespaces()) + "] " + type);
for(Resolver<T> i : getResolvers().values()) {
i.print(type, printer, indent + 2);
}
}
@Override
public void addAllKeys(List<PlatformNamespaceKey> keys) {
resolvers.forEach((k, v) -> v.addAllKeys(keys));
}
}

View File

@@ -1,9 +0,0 @@
package com.volmit.iris.engine.resolver;
import com.volmit.iris.platform.PlatformNamespaceKey;
import lombok.Data;
@Data
public class EngineResolvable implements Resolvable {
private PlatformNamespaceKey key;
}

View File

@@ -1,55 +0,0 @@
package com.volmit.iris.engine.resolver;
import art.arcane.amulet.format.Form;
import com.volmit.iris.platform.PlatformNamespaceKey;
import com.volmit.iris.util.NSK;
import lombok.Data;
import java.util.Collections;
import java.util.List;
import java.util.Map;
@Data
public class FrozenResolver<T extends Resolvable> implements Resolver<T> {
private final Map<String, T> registry;
private final String namespace;
public FrozenResolver(String namespace, Map<String, T> registry)
{
this.registry = Collections.unmodifiableMap(registry);
this.namespace = namespace;
}
@Override
public boolean hasNamespace(String namespace) {
return this.namespace.equals(namespace);
}
public T resolve(PlatformNamespaceKey key) {
return registry.get(key.getKey());
}
@Override
public T resolve(String key) {
return registry.get(key);
}
@Override
public void print(String type, Object printer, int indent) {
printer.i(Form.repeat(" ", indent) + "Frozen[" + namespace + "] " + type);
}
@Override
public void addAllKeys(List<PlatformNamespaceKey> keys) {
registry.keySet().forEach((k) -> keys.add(new NSK(getNamespace(), k)));
}
@Override
public Resolver<T> and(String namespace, Resolver<T> resolver) {
if(!namespace.equals(getNamespace())) {
return new CompositeResolver<>(Map.of(namespace, resolver, getNamespace(), this));
}
return new MergedNamespaceResolver<>(namespace, this, resolver);
}
}

View File

@@ -1,84 +0,0 @@
package com.volmit.iris.engine.resolver;
import art.arcane.amulet.format.Form;
import com.github.benmanes.caffeine.cache.CacheLoader;
import com.github.benmanes.caffeine.cache.Caffeine;
import com.github.benmanes.caffeine.cache.LoadingCache;
import com.volmit.iris.platform.PlatformNamespaceKey;
import com.volmit.iris.util.NSK;
import lombok.Data;
import org.checkerframework.checker.nullness.qual.Nullable;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.function.Function;
import java.util.function.Supplier;
import java.util.stream.Collectors;
@Data
public class HotResolver<T extends Resolvable> implements Resolver<T>, CacheLoader<String, T> {
private final LoadingCache<String, T> cache;
private final String namespace;
private final Function<String, T> loader;
private final Supplier<List<String>> keyGetter;
public HotResolver(String namespace, Function<String, T> loader, Supplier<List<String>> keyGetter)
{
this.namespace = namespace;
this.keyGetter = keyGetter;
this.loader = loader;
cache = Caffeine.newBuilder().build(this);
}
public T resolve(PlatformNamespaceKey key) {
return cache.get(key.getKey());
}
@Override
public T resolve(String key) {
return cache.get(key);
}
public boolean hasNamespace(String namespace) {
return this.namespace.equals(namespace);
}
public FrozenResolver<T> freeze()
{
cache.cleanUp();
Map<String, T> map = new HashMap<>((int) cache.estimatedSize());
Map<String, T> view = cache.asMap();
for(String i : view.keySet()) {
map.put(i, view.get(i));
}
return new FrozenResolver<>(getNamespace(), Collections.unmodifiableMap(map));
}
@Override
public @Nullable T load(String key) {
return loader.apply(key);
}
@Override
public Resolver<T> and(String namespace, Resolver<T> resolver) {
if(!namespace.equals(getNamespace())) {
return new CompositeResolver<>(Map.of(namespace, resolver, getNamespace(), this));
}
return new MergedNamespaceResolver<>(namespace, this, resolver);
}
@Override
public void print(String type, Object printer, int indent) {
printer.i(Form.repeat(" ", indent) + "Hot[" + namespace + "] " + type);
}
@Override
public void addAllKeys(List<PlatformNamespaceKey> keys) {
keys.addAll(keyGetter.get().stream().map(i -> new NSK(getNamespace(), i)).toList());
}
}

View File

@@ -1,85 +0,0 @@
package com.volmit.iris.engine.resolver;
import art.arcane.amulet.format.Form;
import com.volmit.iris.platform.PlatformNamespaceKey;
import lombok.Data;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
@Data
public class MergedNamespaceResolver<T extends Resolvable> implements Resolver<T> {
private final String namespace;
private final List<Resolver<T>> resolvers;
public MergedNamespaceResolver(String namespace, Resolver<T>... resolvers)
{
this(namespace, Arrays.stream(resolvers).toList());
}
public MergedNamespaceResolver(String namespace, List<Resolver<T>> resolvers)
{
this.namespace = namespace;
this.resolvers = resolvers;
}
@Override
public boolean hasNamespace(String namespace) {
return this.namespace.equals(namespace);
}
@Override
public T resolve(PlatformNamespaceKey key) {
for(Resolver<T> i : resolvers) {
T t = i.resolve(key);
if(t != null)
{
return t;
}
}
return null;
}
@Override
public T resolve(String key) {
for(Resolver<T> i : resolvers) {
T t = i.resolve(key);
if(t != null)
{
return t;
}
}
return null;
}
@Override
public void print(String type, Object printer, int indent) {
printer.i(Form.repeat(" ", indent) + "Merged[" + namespace + "] " + type);
for(Resolver<T> i : getResolvers()) {
i.print(type, printer, indent + 2);
}
}
@Override
public void addAllKeys(List<PlatformNamespaceKey> keys) {
resolvers.forEach(i -> i.addAllKeys(keys));
}
@Override
public Resolver<T> and(String namespace, Resolver<T> resolver) {
if(namespace.equals(getNamespace()))
{
List<Resolver<T>> r = resolvers.copy();
r.add(resolver);
return new MergedNamespaceResolver<>(namespace, r);
}
return new CompositeResolver<>(Map.of(getNamespace(), this, namespace, resolver));
}
}

View File

@@ -1,257 +0,0 @@
package com.volmit.iris.engine.resolver;
import art.arcane.amulet.format.Form;
import art.arcane.cram.PakResource;
import com.google.gson.*;
import com.google.gson.stream.JsonToken;
import com.google.gson.stream.JsonWriter;
import com.volmit.iris.engine.EngineData;
import com.volmit.iris.platform.PlatformBiome;
import com.volmit.iris.platform.block.PlatformBlock;
import com.volmit.iris.platform.PlatformNamespaced;
import com.volmit.iris.platform.PlatformNamespacedMutable;
import lombok.AllArgsConstructor;
import java.io.IOException;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Modifier;
import java.util.Arrays;
import java.util.List;
public interface Resolvable extends PlatformNamespaced, PlatformNamespacedMutable, PakResource {
String SCHEMA = "http://json-schema.org/draft-07/schema#";
default String getSchemaId() {
return "https://art.arcane/iris/schemas/"+entity().getId()+".json";
}
default String getSchemaRefId() {
return entity().getId()+".json";
}
default JsonObject generateSchema(EngineData data) {
JsonObject object = new JsonObject();
Entity.ResolverEntityData entity = entity();
object.add("$schema", new JsonPrimitive(SCHEMA));
object.add("$id", new JsonPrimitive(getSchemaId()));
object.add("type", new JsonPrimitive("object"));
object.add("description", new JsonPrimitive("No Description for " + entity.getName()));
JsonObject properties = new JsonObject();
JsonObject definitions = new JsonObject();
for(Field i : getClass().getDeclaredFields()) {
i.access();
if (Modifier.isStatic(i.getModifiers()) || Modifier.isTransient(i.getModifiers())) {
continue;
}
properties.add(i.getName(), generateSchemaProperty(data, i.getName(), i.getType(), i.getDeclaredAnnotation(Type.class), i.getDeclaredAnnotation(PlatformType.class), definitions));
}
object.add("properties", properties);
object.add("definitions", definitions);
return object;
}
default String getSchemaDefinition(String name) {
return "D" + name.hashCode();
}
default JsonObject generateSchemaProperty(EngineData data, String name, Class<?> type, Type listType, PlatformType platformType, JsonObject definitions) {
JsonObject main = new JsonObject();
JsonArray anyOf = new JsonArray();
JsonObject object = new JsonObject();
anyOf.add(object);
object.add("description", new JsonPrimitive("No Description for field " + name));
if(type.isAssignableFrom(Resolvable.class) || Resolvable.class.isAssignableFrom(type)) {
Resolvable r = data.getInstance(type);
if(r != null) {
String def = getSchemaDefinition(r.getClass().simpleName());
object.add("$ref", new JsonPrimitive(r.getSchemaRefId()));
JsonObject registry = new JsonObject();
registry.add("description", new JsonPrimitive("No Description for field " + name));
String defName = getSchemaDefinition("resolve" + type.getCanonicalName());
registry.add("type", new JsonPrimitive("string"));
registry.add("$ref", new JsonPrimitive("#/definitions/" + defName));
if(!definitions.has(defName)) {
JsonObject enumDef = new JsonObject();
JsonArray enums = new JsonArray();
data.getAllKeys(type).forEach(i -> enums.add(i.toString()));
enumDef.add("enum", enums);
definitions.add(defName, enumDef);
}
anyOf.add(registry);
}
}
else if(type.isAssignableFrom(List.class) || List.class.isAssignableFrom(type)) {
if(listType != null) {
JsonObject internal = generateSchemaProperty(data, "list", listType.value(), null, platformType, definitions);
object.add("items", internal);
}
}
else if(type.isEnum()) {
String defName = getSchemaDefinition(type.getCanonicalName());
object.add("type", new JsonPrimitive("string"));
object.add("$ref", new JsonPrimitive("#/definitions/" + defName));
if(!definitions.has(defName)) {
try {
JsonObject enumDef = new JsonObject();
JsonArray enums = new JsonArray();
Arrays.stream((Enum<?>[])type.getDeclaredMethod("values").invoke(null)).forEach(i -> enums.add(i.name()));
enumDef.add("enum", enums);
definitions.add(defName, enumDef);
} catch (IllegalAccessException | InvocationTargetException | NoSuchMethodException e) {
throw new RuntimeException(e);
}
}
}
else if(type.equals(String.class)) {
object.add("type", new JsonPrimitive("string"));
if(platformType != null) {
String defName = getSchemaDefinition(platformType.value().getCanonicalName());
object.add("$ref", new JsonPrimitive("#/definitions/" + defName));
if(!definitions.has(defName)) {
JsonObject enumDef = new JsonObject();
JsonArray enums = buildSchemaPlatformEnum(data, platformType.value());
enumDef.add("enum", enums);
definitions.add(defName, enumDef);
}
}
}
else if(type.equals(int.class) || type.equals(Integer.class)
|| type.equals(long.class) || type.equals(Long.class)
|| type.equals(byte.class) || type.equals(Byte.class)
|| type.equals(short.class) || type.equals(Short.class))
{
object.add("type", new JsonPrimitive("integer"));
if(type.equals(int.class) || type.equals(Integer.class)) {
object.add("minimum", new JsonPrimitive(Integer.MIN_VALUE));
object.add("maximum", new JsonPrimitive(Integer.MAX_VALUE));
}
else if(type.equals(long.class) || type.equals(Long.class)) {
object.add("minimum", new JsonPrimitive(Long.MIN_VALUE));
object.add("maximum", new JsonPrimitive(Long.MAX_VALUE));
}
else if(type.equals(short.class) || type.equals(Short.class)) {
object.add("minimum", new JsonPrimitive(Short.MIN_VALUE));
object.add("maximum", new JsonPrimitive(Short.MAX_VALUE));
}
else {
object.add("minimum", new JsonPrimitive(Byte.MIN_VALUE));
object.add("maximum", new JsonPrimitive(Byte.MAX_VALUE));
}
}
if(anyOf.size() == 1)
{
return object;
}
main.add("anyOf", anyOf);
return main;
}
default JsonArray buildSchemaPlatformEnum(EngineData data, Class<? extends PlatformNamespaced> value) {
JsonArray a = new JsonArray();
if(value.equals(PlatformBlock.class)) {
data.getEngine().getPlatform().getBlocks().map(i -> i.getKey().toString()).forEach(a::add);
}
else if(value.equals(PlatformBiome.class)) {
data.getEngine().getPlatform().getBiomes().map(i -> i.getKey().toString()).forEach(a::add);
}
return a;
}
default void apply(GsonBuilder builder) {
if(this instanceof TypeAdapterFactory f) {
builder.registerTypeAdapterFactory(f);
}
}
default Entity.ResolverEntityData entity() {
return new Entity.ResolverEntityData(getClass().getDeclaredAnnotation(Resolvable.Entity.class));
}
default <T> void writeSafeJson(TypeAdapter<T> delegate, JsonWriter out, T value) {
try {
delegate.write(out, value);
} catch (IOException e) {
try {
delegate.write(out, null);
} catch(IOException ex) {
throw new RuntimeException(ex);
}
}
}
@Target({ElementType.FIELD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@interface Entity {
String id();
String name() default "";
String namePlural() default "";
JsonToken[] jsonTypes() default JsonToken.BEGIN_OBJECT;
@AllArgsConstructor
@lombok.Data
class ResolverEntityData
{
private final Entity annotation;
public String getId() {
return annotation.id();
}
public String getName() {
return annotation.name().isEmpty() ? Form.capitalizeWords(getId().replaceAll("\\Q-\\E", " ")) : annotation.name();
}
public String getNamePlural() {
return annotation.namePlural().isEmpty() ? getName() + "s" : annotation.namePlural();
}
}
}
@Target({ElementType.FIELD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@interface TokenConstructor {
JsonToken[] value();
}
@Target({ElementType.FIELD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@interface Type {
Class<?> value();
}
@Target({ElementType.FIELD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@interface PlatformType {
Class<? extends PlatformNamespaced> value();
}
}

View File

@@ -1,120 +0,0 @@
package com.volmit.iris.engine.resolver;
import art.arcane.cram.PakKey;
import art.arcane.cram.PakResource;
import com.google.gson.Gson;
import com.volmit.iris.platform.PlatformNamespaceKey;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.function.Predicate;
import java.util.function.Supplier;
public interface Resolver<T extends Resolvable> {
@SuppressWarnings("unchecked")
static <F extends Resolvable> CompositeResolver<F> frozen(Map<PakKey, PakResource> resources, Predicate<PakResource> isTypePredicate) {
Map<String, Map<String, F>> resolvables = new HashMap<>();
Map<String, Resolver<F>> resolvers = new HashMap<>();
for(PakKey i : resources.keySet()) {
PakResource r = resources.get(i);
if(isTypePredicate.test(r)) {
Map<String, F> rs = resolvables.computeIfAbsent(i.getNamespace(), (k) -> new HashMap<>());
rs.put(i.getKey(), (F) i);
}
}
for(String i : resolvables.keySet()) {
resolvers.put(i, frozen(i, resolvables.get(i)));
}
return new CompositeResolver<>(resolvers);
}
static <F extends Resolvable> Resolver<F> frozen(String namespace, Map<String, F> map) {
return new FrozenResolver<>(namespace, map);
}
static <F extends Resolvable> Resolver<F> hot(String namespace, Function<String, F> loader, Supplier<List<String>> keyGetter) {
return new HotResolver<>(namespace, loader, keyGetter);
}
static <F extends Resolvable> Resolver<F> hotDirectoryJson(String namespace, Class<?> resolvableClass, File folder, Gson gson) {
return hotDirectory(namespace, (in) -> (F) gson.fromJson(new InputStreamReader(in), resolvableClass), folder, "json");
}
static <F extends Resolvable> Resolver<F> hotDirectory(String namespace, Function<InputStream, F> loader, File folder, String... extensions) {
return new HotResolver<>(namespace, (key) -> {
for(String i : extensions)
{
File f = new File(folder, key + "." + i);
if(f.exists())
{
try {
FileInputStream in = new FileInputStream(f);
F ff = loader.apply(in);
in.close();
return ff;
} catch(IOException e) {
throw new RuntimeException(e);
}
}
}
return null;
}, () -> {
List<String> s = new ArrayList<>();
for(File i : folder.listFiles())
{
if(i.isFile()) {
for(String j : extensions)
{
if(i.getName().endsWith(j))
{
s.add(i.getName().split("\\Q.\\E")[0]);
break;
}
}
}
}
return s;
});
}
boolean hasNamespace(String namespace);
T resolve(PlatformNamespaceKey key);
T resolve(String key);
default boolean contains(String namespace, String key) {
return hasNamespace(namespace) && resolve(key) != null;
}
default boolean contains(PlatformNamespaceKey key){
return hasNamespace(key.getNamespace()) && resolve(key) != null;
}
Resolver<T> and(String namespace, Resolver<T> resolver);
default void print(String type, Object printer)
{
print(type, printer, 0);
}
void print(String type, Object printer, int index);
void addAllKeys(List<PlatformNamespaceKey> keys);
}

View File

@@ -1,39 +0,0 @@
package com.volmit.iris.platform;
import com.volmit.iris.platform.block.PlatformBlock;
import java.io.File;
import java.util.stream.Stream;
public interface IrisPlatform {
void logError(String k, Object o);
void logInfo(String k, Object o);
void logWarning(String k, Object o);
void logDebug(String k, Object o);
String getPlatformName();
Stream<PlatformBlock> getBlocks();
Stream<PlatformBiome> getBiomes();
boolean isWorldLoaded(String name);
PlatformWorld getWorld(String name);
PlatformBlock parseBlock(String raw);
PlatformNamespaceKey key(String namespace, String key);
default PlatformNamespaceKey key(String nsk)
{
return key("minecraft", nsk);
}
File getStudioFolder();
File getStudioFolder(String dimension);
}

View File

@@ -1,5 +0,0 @@
package com.volmit.iris.platform;
public interface PlatformBiome extends PlatformNamespaced {
}

View File

@@ -1,9 +0,0 @@
package com.volmit.iris.platform;
public interface PlatformChunk {
int getX();
int getZ();
void unload(boolean save, boolean force);
}

View File

@@ -1,16 +0,0 @@
package com.volmit.iris.platform;
import art.arcane.cram.PakKey;
import com.volmit.iris.util.NSK;
public interface PlatformNamespaceKey {
String getNamespace();
String getKey();
String toString();
static PlatformNamespaceKey of(PakKey key) {
return new NSK(key.getNamespace(), key.getKey());
}
}

View File

@@ -1,5 +0,0 @@
package com.volmit.iris.platform;
public interface PlatformNamespaced {
PlatformNamespaceKey getKey();
}

View File

@@ -1,5 +0,0 @@
package com.volmit.iris.platform;
public interface PlatformNamespacedMutable {
void setKey(PlatformNamespaceKey key);
}

View File

@@ -1,23 +0,0 @@
package com.volmit.iris.platform;
import art.arcane.amulet.geometry.Vec;
import java.util.UUID;
public interface PlatformPlayer {
UUID getUUID();
String getName();
Vec getLocation();
PlatformWorld getWorld();
boolean canUseIris();
void sendMessage(String message);
void sendActionBar(String message);
void sendTitleMessage(String title, String subtitle, int in, int stay, int out);
}

View File

@@ -1,37 +0,0 @@
package com.volmit.iris.platform;
import art.arcane.amulet.format.Form;
import lombok.Data;
import java.util.Collections;
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
import java.util.stream.Stream;
@Data
public class PlatformRegistry<T extends PlatformNamespaced> {
private final Map<PlatformNamespaceKey, T> registry;
private final String name;
private final String namePlural;
public PlatformRegistry(String name, String namePlural, Stream<T> stream) {
this.name = name;
this.namePlural = namePlural;
registry = Collections.unmodifiableMap(stream.collect(Collectors.toMap(PlatformNamespaced::getKey, (t) -> t)));
i("Registered " + Form.f(registry.size()) + " " + namePlural);
}
public PlatformRegistry(String name, Stream<T> stream) {
this(name, name + "s", stream);
}
public T get(PlatformNamespaceKey key) {
return registry.get(key);
}
public Set<PlatformNamespaceKey> getKeys() {
return Collections.unmodifiableSet(registry.keySet());
}
}

View File

@@ -1,66 +0,0 @@
package com.volmit.iris.platform;
import com.volmit.iris.platform.block.PlatformBlock;
import com.volmit.iris.util.WorldHeight;
import java.io.File;
public interface PlatformWorld {
WorldHeight getHeight();
String getName();
File getFolder();
Iterable<PlatformPlayer> getPlayers();
Iterable<PlatformChunk> getLoadedChunks();
PlatformChunk getOrLoadChunk(int x, int z);
PlatformBlock getBlock(int x, int y, int z);
PlatformBiome getBiome(int x, int y, int z);
long getSeed();
boolean isChunkLoaded(int x, int z);
void setBlock(int x, int y, int z, PlatformBlock block);
void setBiome(int x, int y, int z, PlatformBiome biome);
default File getWorldFolder(String subfolder) {
return new File(getFolder(), subfolder);
}
default File getRegionFolder() {
return getWorldFolder("region");
}
default File getIrisFolder() {
return getWorldFolder("iris");
}
default File getIrisDataFolder() {
File f = new File(getWorldFolder("iris"), "data");
f.mkdirs();
return f;
}
default boolean isRegionLoaded(int x, int z) {
for(PlatformChunk i : getLoadedChunks()) {
if(i.getX() >> 5 == x && i.getZ() >> 5 == z) {
return true;
}
}
return false;
}
default void unloadChunks(boolean save, boolean force) {
for(PlatformChunk i : getLoadedChunks()) {
i.unload(save, force);
}
}
}

View File

@@ -1,9 +0,0 @@
package com.volmit.iris.platform.block;
import com.volmit.iris.platform.PlatformNamespaced;
import java.util.Map;
public interface PlatformBlock extends PlatformNamespaced {
Map<String, String> getProperties();
}

View File

@@ -1,22 +0,0 @@
package com.volmit.iris.util;
public class FloatNoiseCache {
private final int width;
private final int height;
private final float[] cache;
public FloatNoiseCache(int width, int height)
{
this.width = width;
this.height = height;
cache = new float[width * height];
}
public void set(int x, int y, float v) {
this.cache[y % this.height * this.width + x % this.width] = v;
}
public float get(int x, int y) {
return this.cache[y % this.height * this.width + x % this.width];
}
}

View File

@@ -1,17 +0,0 @@
package com.volmit.iris.util;
import art.arcane.source.NoisePlane;
import art.arcane.spatial.hunk.Hunk;
import lombok.AllArgsConstructor;
@AllArgsConstructor
public class HunkedNoisePlane implements NoisePlane {
private final Hunk<Double> noise;
@Override
public double noise(double x, double y, double z) {
Double d = noise.get(Math.floorMod((int)x, noise.getWidth()), Math.floorMod((int)y, noise.getHeight()), Math.floorMod((int)z, noise.getDepth()));
return d != null ? d : 0;
}
}

View File

@@ -1,32 +0,0 @@
package com.volmit.iris.util;
import com.volmit.iris.platform.PlatformNamespaceKey;
import lombok.AllArgsConstructor;
import lombok.Data;
@Data
@AllArgsConstructor
public class NSK implements PlatformNamespaceKey {
private final String namespace;
private final String key;
public NSK(String namespacedkey)
{
this(namespacedkey.contains(":") ? namespacedkey.split("\\Q:\\E")[0] : "minecraft",
namespacedkey.contains(":") ? namespacedkey.split("\\Q:\\E")[1] : namespacedkey);
}
@Override
public String getNamespace() {
return namespace;
}
@Override
public String getKey() {
return key;
}
public String toString() {
return namespace + ":" + key;
}
}

View File

@@ -1,23 +0,0 @@
package com.volmit.iris.util;
public class NoiseCache<T> {
private final int width;
private final int height;
private final Object[] cache;
public NoiseCache(int width, int height)
{
this.width = width;
this.height = height;
cache = new Object[width * height];
}
public void set(int x, int y, T v) {
this.cache[y % this.height * this.width + x % this.width] = v;
}
@SuppressWarnings("unchecked")
public T get(int x, int y) {
return (T) this.cache[y % this.height * this.width + x % this.width];
}
}

View File

@@ -1,22 +0,0 @@
package com.volmit.iris.util;
public class ShortNoiseCache {
private final int width;
private final int height;
private final short[] cache;
public ShortNoiseCache(int width, int height)
{
this.width = width;
this.height = height;
cache = new short[width * height];
}
public void set(int x, int y, short v) {
this.cache[(Math.floorMod(y,this.height) * this.width) + Math.floorMod(x, this.width)] = v;
}
public short get(int x, int y) {
return this.cache[(Math.floorMod(y,this.height) * this.width) + Math.floorMod(x,this.width)];
}
}

View File

@@ -1,19 +0,0 @@
package com.volmit.iris.util;
import lombok.AllArgsConstructor;
import lombok.Data;
@Data
@AllArgsConstructor
public class WorldHeight {
private final int minHeight;
private final int maxHeight;
public WorldHeight(int maxHeight) {
this(0, maxHeight);
}
public int getTotalHeight() {
return maxHeight - minHeight;
}
}

3
gource.bat Normal file
View File

@@ -0,0 +1,3 @@
@echo off
cd gource
gource -f -a 1 -s 0.01 -t 100000 --colour-images --max-file-lag 35 --title MyGuide --user-scale 1.67 --max-user-speed 725 --filename-time 11 -title Chimera --user-friction 2.5 --padding 1.2 --user-scale 1.25 --filename-time 2 --bloom-intensity 0.1 --bloom-multiplier 3 --hide filenames,dirnames

674
gource/COPYING.txt Normal file
View File

@@ -0,0 +1,674 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://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 <http://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
<http://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
<http://www.gnu.org/philosophy/why-not-lgpl.html>.

298
gource/ChangeLog.txt Normal file
View File

@@ -0,0 +1,298 @@
0.51:
* Fixed --font-file relative path handling.
* Fixed a bug in resolving the repository root directory from a relative path.
0.50:
* Right mouse button rotation now pivots around the camera.
* Added --font-file option.
* Added --enable-font-file option to configure.
* Added --no-time-travel option (Lars Schmertmann).
* Added --dir-name-position option (Lars Schmertmann).
* Added --file-extension-fallback option (Lars Schmertmann).
* Added --user-show-filter option (Victor Lopez).
* Added --disable-input option (Joey Parrish).
* Added --loop-delay-seconds option (Joey Parrish).
* Added --font-scale option.
* Added filename, dirname and user font size options (Carl Colena).
* Added workaround for FFMpeg error parsing Gource PPM video output.
* Fixed a bug in the Mercurial log parser that caused changes to be missed.
* Fixed file removal being cancelled by an action with an earlier timestamp.
* Fixed a bug in the log file format detection that could result in the wrong
first entry being displayed for a custom log.
* Fixed a bug where automatically cycling through a config with multiple
repositories reset settings to their defaults.
0.49:
* Fixed compatibility with GLM 0.9.9.0.
0.48:
* Can now generate logs from git sub module directories.
0.47:
* Fixed low mouse movement speed with some mice while repositioning camera.
0.46:
* Added --screen option.
0.45:
* Added --window-position XxY option.
* Added --frameless option.
* Added --file-show-filter REGEX option (swoogles).
* Added --filename-time and filename-colour options (gh2k).
* Improved handling of very low seconds-per-day values (malengrin).
* Fixed crash when SVN log lacks author information (obarthel).
* Additional git log command validation (cym13).
* Allow lower case hex colours in custom logs (HSorensen).
* Enabled STDOUT support with --output-stream '-' on Windows (circulosmeos).
* Now requires SDL 2 to build (deprecated SDL 1.2 support removed).
0.44:
* Fixed crash when taking a screenshot with an odd resolution.
* Fixed type deduction compilation error with newer versions of GCC.
* Documentation improvements.
0.43:
* Updated boost autoconf macros to fix multi-arch detection.
0.42:
* Fixed bzr log command when no start date was specified (chrisf).
* Fixed hg log commit order when date range specified.
* Fixed hg log command line on Windows.
* Fixed parser bug in date range filtering code.
0.41:
* Multi-monitor support using SDL 2.0 when available.
* SDL 1.2 support is deprecated.
* Full screen mode now uses desktop resolution by default.
* Added --start-date, --stop-date 'YYYY-MM-DD hh:mm:ss' options.
* Added --dir-name-depth option.
* Changed --file-idle-time default value to 0.
* Changed screenshot format to PNG.
0.40:
* Added caption support.
* Improved command line interoperability on Windows.
* Fixed directory deletion short circuiting processing the rest of a commit.
* Fixed issue loading non-ascii user image filenames on windows.
* Ignore UTF-8 byte order mark at the start of lines in custom log files.
* Fix to boost macros for Macs and non-GNU systems (mistydemeo).
* Autotools improvements (flameeyes).
0.39:
* Fixed blurry non power of 2 logos.
* File colour changes now supported in custom logs (rmyorston).
* Fixed building against Boost 1.50 (svenstaro).
* Updated boost autoconf macros (flameeyes).
* Autogen script (matthiaskrgr).
0.38:
* New high quality sprites.
* Fullscreen toggle with alt + enter.
* Window is now resizable. -WIDTHxHEIGHT! creates a non-resizable window.
* Lowered minimum zoom distance.
* Use AM_CPPFLAGS in Makefile.am to allow passing custom CPPFLAGS.
* Don't add files that match the path of a known directory.
* Fixed divide by zero in text shader causing artifacts on some video cards.
* Recursively search for repository directory when log-format not specified
(thanks to Jörg Bachmann for original concept / prototype).
* New dependency on Boost Filesystem.
* Doubled the maximum zoom out distance.
* Allow negative timestamps before 1970 in custom log (artzub).
* Fix for UTF8-CPP checked.h compilation issue (vszakats).
* Fixed bug causing missing characters in text.
* Fixed --highlight-users option not using highlight-colour.
* highlight-colour default changed to white.
* Added --selection-colour option (applied to selected users and files).
* Added --dir-colour option (applied to directories).
0.37:
* Made SVN log GMT timestamp conversion fix portable.
0.36:
* Fixed SVN log GMT timestamp conversion.
* Fixed issue with sub-dirs of deleted dir not being removed in some cases.
0.35:
* Added long file extension truncation handling to file key (--key).
* Treat changes in Mercurial log files with the same time/user as one commit.
* Fixed handling of spaces in directory names with Mercurial.
* Fixed --font-colour option.
0.34:
* Now using VBOs and shaders for faster rendering when OpenGL 2.0 is available.
* Eliminated bloom colour banding artifacts (requires OpenGL 2.0).
* New font rendering library derived from FTGL (FTGL no longer required).
* Single pass font/shadow rendering (with lots of help from Chris Forbes).
* Added --no-vsync option.
* Fixed bug where tree is out of alignment with object positions in windowed
mode due to using the wrong display dimensions internally.
* Removed default max-files limit.
0.33:
* Added --hide root option to not draw branches from the root directory.
* Fixed log parsing of Bazaar merges and tagged commits.
* --output-custom-log now skips unparsed log entries instead of exiting.
0.32:
* Fixed behaviour of user camera tracking.
0.31:
* Added --with-tinyxml option to configure (use the system TinyXML library).
0.30:
* Fixed crash when SVN log entry contains no 'paths' element.
* Handle directory deletion (happens in SVN logs).
0.29:
* SVN built-in support.
* cvs2cl log support (cvs-exp support is now deprecated).
* Made camera behaviour when zooming and selecting objects more intuitive.
* Improved interactive performance.
* Added file extension key (--key or toggled with 'K').
* Added mouse-over tool tips.
* Added --highlight-colour option.
* Added --hash-seed option. The S key now randomizes colours.
* Added --output-custom-log option.
* Exposed --time-scale option (previously only available interactively).
* Removed arbitrary 1024 maximum length limit for log lines.
* Fixed two file colouring bugs (quoted files from git, period in file path).
* Fix handling of avatars for UTF-8 usernames on MACOSX (Christian Köstlin).
* Recover from video mode failing to set due to multi-sampling (Siddhesh Poyarekar).
0.28:
* Bazaar support for merged commits (Nick Moffit).
* C++ efficiency improvements (Oliver Smith).
* Improved cvs-exp log compatibility.
* Re-show name of user when adding a new action if user is idle.
* Added --padding option to control camera view padding.
* More accurate camera tracking (tracks the bounding boxes of objects).
* Improved automatic rotation logic.
0.27:
* Display time stops at the time of the last commit.
* Users fade out when end reached rather than ending abruptly.
* Position slider is now hidden by default if recording a video.
* Automatic camera rotation for better use of screen space.
* Support international keyboards (Peter Kjellerstedt).
* C++ efficiency improvements (Jacob Metcalfe).
* Fixed crash when reading from STDIN.
* Fixed intermittent crash closing Gource when using --output-ppm-stream.
* Added ini style config file support (see --load/save-config).
* Added screenshot button (F12). Screenshots respect the alpha channel.
* Added --transparent to make the background see-through (for screenshots).
* Added --logo and --background-image options.
* Added --dont-stop option for manual exiting when recording videos.
* Added --stop-at-time option to stop Gource after a number of seconds.
* Added --hide 'mouse' option.
* Added --highlight-dirs option.
* Added --file-extensions to show filename extensions only.
* Added --user-filter REGEX option.
* Allow --file-idle-time 0 (files will never expire).
* Allow --start-position 'random' to set a random start position.
* --log-command VCS replaces multiple --log-command-VCS options.
* Replaced --disable-progress and --disable-bloom with arguments to --hide.
0.26a:
* Updated to latest version of GL autoconf macros.
0.26:
* Improved mouse dragging.
* Holding right mouse button and moving the mouse rotates the view.
* The middle mouse button now toggles the camera mode.
* Username positions now scale correctly.
* Simulation time no longer incremented while paused, counting towards file time lag.
* M key now toggles mouse visibility.
* Added --hide option to use instead of multiple --hide-ELEMENT options.
0.25:
* Bazaar support (John Arbash Meinel).
* Dragging the mouse on the background moves the camera.
* Added --camera-mode option (track,overview).
* Support DOS line endings in logs.
* Improved compatibility of hg log command (Brendan Cully).
* Fixed PPM exporter producing blank images on some video cards.
* Fixed parsing of negative timezones from cvs-exp.pl logs.
* Fixed various gdb and compiler warnings.
0.24:
* PPM output speed improvements, including using a second thread (HighlandSun).
* Now using standard autotools (Flameeyes).
* Fixed --max-file-lag not working with some custom log files.
* Gource will stop at the end of the log by default when recording a video.
* Fixed STDIN stopping working after the first lot of records with tail -f.
* Added proper exception handling.
* Print errors to stderr.
0.23:
* Hiding filenames no longer hides directory names.
* Fixed --stop-on-idle option.
* Added --stop-at-end option (more intuitive than --stop-position 1.0).
0.22:
* Fixed Mercurial log order.
0.21b:
* Fixed windows build.
0.21:
* Some documentation fixes.
0.20:
* Added bloom effect (turn off with --disable-bloom).
* Added support for Mercurial (thanks to Justin Love for gource.style).
* --start-position option now works in combination with --disable-progress.
0.19:
* Use time_t instead of long for timestamps.
0.18:
* Fixed camera movement while the simulation is paused.
0.17:
* Show correct month for CVS logs.
* Added time scaling (Bitshifter).
0.16:
* Added --hide-dirnames option.
* Added --user-scale option.
* Added --date-format option (Pat Notz).
* Fix bug when encountering long log lines.
* Fixed incorrect parsing of trivial merges.
* Fixed building issues on OSX.
0.15:
* Added PPM output support for creating videos (Johannes Schindelin).
* Added experimental Apache combined access log support (--log-format apache).
* Added --stop-position and --stop-on-idle options (useful for making videos).
* Added --max-file-lag option to limit how long after a commit file changes can take to appear.
* Added --no-renames to the git log command as they don't display correctly.
* Added --max-user-speed and --user-friction as options.
* Now builds on OSX Leopard (with the required libaries installed).
* Caught raw exception from replace_invalid().
* Added CXXFLAGS. You may want to override the default (eg CXXFLAGS=-O3 ./configure).
0.14:
* Updated SVN instructions.
0.13:
* Removed single quotes from log command (fixes running gource --git-log-command in back ticks)
* Added SVN instructions.
* Fixed manpage hyphens.
0.12:
* Added --enable-ttf-font-dir=DIR option to configure (to specify the ttf-freefont directory).
* UTF-8 support using UTF8-CPP (http://utfcpp.sourceforge.net/).
* Changed the git log command (see --git-log-command) to require less work to parse.
Log files generated with the previous git-log command used by gource should continue to work.
* Allow --seconds-per-day value less than 1.0.
* Added --git-branch command.
* Added --loop command.
* Added --crop command.
0.11:
* Made N key skip to next entry.
* Documented --user-image-dir flag.
* temp file name now uses uid instead of time
0.1:
* First release.

469
gource/README.txt Normal file
View File

@@ -0,0 +1,469 @@
Gource
software version control visualization
Copyright (C) 2009 Andrew Caudwell
http://gource.io
Contents
========
1. Description
2. Requirements
3. Using Gource
4. Copyright
1. Description
==============
OpenGL-based 3D visualisation tool for source control repositories.
The repository is displayed as a tree where the root of the repository is the
centre, directories are branches and files are leaves. Contributors to the
source code appear and disappear as they contribute to specific files and
directories.
2. Requirements
===============
Gource's display is rendered using OpenGL and requires a 3D accelerated video
card to run.
3. Using Gource
===============
gource [options] [path]
options:
-h, --help
Help ('-H' for extended help).
-WIDTHxHEIGHT, --viewport WIDTHxHEIGHT
Set the viewport size. If -f is also supplied, will attempt to set
the video mode to this also. Add ! to make the window non-resizable.
--screen SCREEN
Set the number of the screen to display on.
--window-position XxY
Initial window position on your desktop which may be made up of
multiple monitors.
This will override the screen setting so don't specify both.
--frameless
Frameless window.
-f, --fullscreen
Fullscreen.
-w, --windowed
Windowed.
--transparent
Make the background transparent. Only really useful for screenshots.
--start-date "YYYY-MM-DD hh:mm:ss +tz"
Start with the first entry after the supplied date and optional time.
If a time zone offset isn't specified the local time zone is used.
Example accepted formats:
"2012-06-30"
"2012-06-30 12:00"
"2012-06-30 12:00:00 +12"
--stop-date "YYYY-MM-DD hh:mm:ss +tz"
Stop after the last entry prior to the supplied date and optional time.
Uses the same format as --start-date.
-p, --start-position POSITION
Begin at some position in the log (between 0.0 and 1.0 or 'random').
--stop-position POSITION
Stop (exit) at some position in the log (does not work with STDIN).
-t, --stop-at-time SECONDS
Stop (exit) after a specified number of seconds.
--stop-at-end
Stop (exit) at the end of the log / stream.
--loop
Loop back to the start of the log when the end is reached.
--loop-delay-seconds
Seconds to delay before looping.
-a, --auto-skip-seconds SECONDS
Skip to next entry if nothing happens for a number of seconds.
-s, --seconds-per-day SECONDS
Speed of simulation in seconds per day.
--realtime
Realtime playback speed.
--no-time-travel
Use the time of the last commit if the time of a commit is in the past.
-c, --time-scale SCALE
Change simulation time scale.
-i, --file-idle-time SECONDS
Time in seconds files remain idle before they are removed or 0
for no limit.
-e, --elasticity FLOAT
Elasticity of nodes.
-b, --background-colour FFFFFF
Background colour in hex.
--background-image IMAGE
Set a background image.
--logo IMAGE
Logo to display in the foreground.
--logo-offset XxY
Offset position of the logo.
--title TITLE
Set a title.
--font-file FILE
Specify the font. Should work with most font file formats supported by FreeType, such as TTF and OTF, among others.
--font-scale SCALE
Scale the size of all fonts.
--font-size SIZE
Font size used by the date and title.
--file-font-size SIZE
Font size of filenames.
--dir-font-size SIZE
Font size of directory names
--user-font-size SIZE
Font size of user names.
--font-colour FFFFFF
Font colour used by the date and title in hex.
--key
Show file extension key.
--date-format FORMAT
Specify display date string (strftime format).
--log-command VCS
Show the VCS log command used by gource (git,svn,hg,bzr,cvs2cl).
--log-format VCS
Specify the log format (git,svn,hg,bzr,cvs2cl,custom).
Required when reading from STDIN.
--git-branch
Get the git log of a branch other than the current one.
--follow-user USER
Have the camera automatically follow a particular user.
--highlight-dirs
Highlight the names of all directories.
--highlight-user USER
Highlight the names of a particular user.
--highlight-users
Highlight the names of all users.
--highlight-colour FFFFFF
Font colour for highlighted users in hex.
--selection-colour FFFFFF
Font colour for selected users and files.
--filename-colour FFFFFF
Font colour for filenames.
--dir-colour FFFFFF
Font colour for directories.
--dir-name-depth DEPTH
Draw names of directories down to a specific depth in the tree.
--dir-name-position FLOAT
Position along edge of the directory name
(between 0.1 and 1.0, default is 0.5).
--filename-time SECONDS
Duration to keep filenames on screen (>= 2.0).
--file-extensions
Show filename extensions only.
--file-extension-fallback
Use filename as extension if the extension is missing or empty.
--file-filter REGEX
Filter out file paths matching the specified regular expression.
--file-show-filter REGEX
Show only file paths matching the specified regular expression.
--user-filter REGEX
Filter usernames matching the specified regular expression.
--user-show-filter REGEX
Show only usernames matching the specified regular expression.
--user-image-dir DIRECTORY
Directory containing .jpg or .png images of users
(eg "Full Name.png") to use as avatars.
--default-user-image IMAGE
Path of .jpg or .png to use as the default user image.
--colour-images
Colourize user images.
--crop AXIS
Crop view on an axis (vertical,horizontal).
--padding FLOAT
Camera view padding.
--multi-sampling
Enable multi-sampling.
--no-vsync
Disable vsync.
--bloom-multiplier FLOAT
Adjust the amount of bloom.
--bloom-intensity FLOAT
Adjust the intensity of the bloom.
--max-files NUMBER
Set the maximum number of files or 0 for no limit.
Excess files will be discarded.
--max-file-lag SECONDS
Max time files of a commit can take to appear.
Use -1 for no limit.
--max-user-speed UNITS
Max speed users can travel per second.
--user-friction SECONDS
Time users take to come to a halt.
--user-scale SCALE
Change scale of user avatars.
--camera-mode MODE
Camera mode (overview,track).
--disable-auto-rotate
Disable automatic camera rotation.
--disable-input
Disable keyboard and mouse input.
--hide DISPLAY_ELEMENT
Hide one or more display elements from the list below:
bloom - bloom effect
date - current date
dirnames - names of directories
files - file icons
filenames - names of files
mouse - mouse cursor
progress - progress bar widget
root - root directory of tree
tree - animated tree structure
users - user avatars
usernames - names of users
Separate multiple elements with commas (eg "mouse,progress")
--hash-seed SEED
Change the seed of hash function.
--caption-file FILE
Caption file (see Caption Log Format).
--caption-size SIZE
Caption size.
--caption-colour FFFFFF
Caption colour in hex.
--caption-duration SECONDS
Caption duration.
--caption-offset X
Caption horizontal offset (0 to centre captions).
-o, --output-ppm-stream FILE
Output a PPM image stream to a file ('-' for STDOUT).
This will automatically hide the progress bar initially and
enable 'stop-at-end' unless other behaviour is specified.
-r, --output-framerate FPS
Framerate of output (25,30,60). Used with --output-ppm-stream.
--output-custom-log FILE
Output a custom format log file ('-' for STDOUT).
--load-config CONFIG_FILE
Load a gource conf file.
--save-config CONFIG_FILE
Save a gource conf file with the current options.
--path PATH
path Either a supported version control directory, a pre-generated log
file (see log commands or the custom log format), a Gource conf
file or '-' to read STDIN.
If path is omitted, gource will attempt to read a log from the
current directory.
Git, Bazaar, Mercurial and SVN Examples:
View the log of the repository in the current path:
gource
View the log of a project in the specified directory:
gource my-project-dir
For large projects, generating a log of the project history may take a long
time. For centralized VCS like SVN, generating the log may also put load on
the central VCS server.
In these cases, you may like to save a copy of the log for later use.
You can generate a log in the VCS specific log format using
the --log-command VCS option:
cd my-svn-project
`gource --log-command svn` > my-svn-project.log
gource my-svn-project.log
You can also have Gource write a copy of the log file in its own format:
gource --output-custom-log my-project-custom.log
CVS Support:
Use 'cvs2cl' to generate the log and then pass it to Gource:
cvs2cl --chrono --stdout --xml -g-q > my-cvs-project.log
gource my-cvs-project.log
Custom Log Format:
If you want to use Gource with something other than the supported systems,
there is a pipe ('|') delimited custom log format:
timestamp - A unix timestamp of when the update occured.
username - The name of the user who made the update.
type - initial for the update type - (A)dded, (M)odified or (D)eleted.
file - Path of the file updated.
colour - A colour for the file in hex (FFFFFF) format. Optional.
Caption Log Format:
Gource can display captions along the timeline by specifying a caption file
(using --caption-file) in the pipe ('|') delimited format below:
timestamp - A unix timestamp of when to display the caption.
caption - The caption
Recording Videos:
See the guide on the homepage for examples of recording videos with Gource:
https://github.com/acaudwell/Gource/wiki/Videos
More Information:
Visit the Gource homepage for guides and examples of using Gource with various
version control systems:
http://gource.io
Interface:
The time shown in the top left of the screen is set initially from the first
log entry read and is incremented according to the simulation speed
(--seconds-per-day).
Pressing SPACE at any time will pause/resume the simulation. While paused you
may use the mouse to inspect the detail of individual files and users.
TAB cycles through selecting the current visible users.
The camera mode, either tracking activity or showing the entire code tree, can
be toggled using the Middle mouse button.
You can drag the left mouse button to manually control the camera. The right
mouse button rotates the view.
Interactive keyboard commands:
(V) Toggle camera mode
(C) Displays Gource logo
(K) Toggle file extension key
(M) Toggle mouse visibility
(N) Jump forward in time to next log entry
(S) Randomize colours
(D) Toggle directory name display mode
(F) Toggle file name display mode
(U) Toggle user name display mode
(G) Toggle display of users
(T) Toggle display of directory tree edges
(R) Toggle display of root directory edges
(+-) Adjust simulation speed
(<>) Adjust time scale
(TAB) Cycle through visible users
(F12) Screenshot
(Alt+Enter) Fullscreen toggle
(ESC) Quit
4. Copyright
============
Gource - software version control visualization
Copyright (C) 2009 Andrew Caudwell <acaudwell@gmail.com>
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 <http://www.gnu.org/licenses/>.

BIN
gource/SDL2.dll Normal file

Binary file not shown.

BIN
gource/SDL2_image.dll Normal file

Binary file not shown.

1
gource/THANKS.txt Normal file
View File

@@ -0,0 +1 @@
Cheers to everyone at Catalyst IT for their support and encouragement.

3
gource/cmd/gource Normal file
View File

@@ -0,0 +1,3 @@
#!/bin/sh
GOURCE_CMD_DIR=`dirname "$0"`
"$GOURCE_CMD_DIR/../gource.exe" "$@"

2
gource/cmd/gource.cmd Normal file
View File

@@ -0,0 +1,2 @@
@echo off
"%~dp0\..\gource.exe" %*

BIN
gource/data/beam.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 358 B

BIN
gource/data/bloom.tga Normal file

Binary file not shown.

BIN
gource/data/bloom_alpha.tga Normal file

Binary file not shown.

BIN
gource/data/file.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

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