Commit a1d74b7
authored
Add CubicChunks support (#1031)
* Make Region an interface, add MCRegion for vanilla regions
* World now handles creation of region objects, Region now handles parsing datastream into NBT data
* Add yMin variable to the map view
* Create region package ready for additional region formats
* Add min and max Y to getChunkData requests.
Added bonus of speeding up chunk parsing, in addition to being required for CubicChunks
* Add min and max Y parameters to Region#parse
* Add cubic chunks support
* Fix incorrectly reparsing an imposter even if the regions haven't changed
(led to continually refreshing map view)
* Correct using incorrect header size for checks
* Lots of javadoc. Renaming and refactoring for readability. No impactful code changes
* Use Log.warn instead of err.print in region parsing, remove dead code
* Use Log.warnf instead of Log.warn(String.format)
* Add CubicRegionChangeWatcher to track CubicRegion updates
* prevent weird race condition if map view is still loading regions when loading chunks into scene
* optimise getRegion for map view and region parser to avoid extremely slow iteration over all files in region dir
* implement suggestions1 parent b34ca16 commit a1d74b7
25 files changed
Lines changed: 1291 additions & 187 deletions
File tree
- chunky/src
- java/se/llbit/chunky
- map
- renderer/scene
- ui
- world
- region
- res/se/llbit/chunky/ui
- lib/src/se/llbit/util
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | | - | |
| 76 | + | |
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
| 79 | + | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
| 98 | + | |
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
142 | | - | |
| 142 | + | |
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
146 | 162 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
53 | | - | |
| 53 | + | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
30 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| 49 | + | |
48 | 50 | | |
49 | 51 | | |
50 | 52 | | |
| |||
55 | 57 | | |
56 | 58 | | |
57 | 59 | | |
| 60 | + | |
58 | 61 | | |
59 | | - | |
60 | 62 | | |
61 | 63 | | |
62 | 64 | | |
| |||
65 | 67 | | |
66 | 68 | | |
67 | 69 | | |
68 | | - | |
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
| |||
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
| 85 | + | |
| 86 | + | |
84 | 87 | | |
85 | 88 | | |
86 | 89 | | |
| |||
144 | 147 | | |
145 | 148 | | |
146 | 149 | | |
| 150 | + | |
147 | 151 | | |
148 | 152 | | |
149 | 153 | | |
150 | 154 | | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
151 | 164 | | |
152 | 165 | | |
153 | 166 | | |
| |||
Lines changed: 10 additions & 25 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
853 | 853 | | |
854 | 854 | | |
855 | 855 | | |
856 | | - | |
857 | | - | |
858 | | - | |
859 | | - | |
860 | | - | |
861 | | - | |
862 | | - | |
863 | | - | |
864 | | - | |
865 | | - | |
| 856 | + | |
| 857 | + | |
866 | 858 | | |
867 | 859 | | |
868 | 860 | | |
| |||
894 | 886 | | |
895 | 887 | | |
896 | 888 | | |
897 | | - | |
| 889 | + | |
898 | 890 | | |
899 | 891 | | |
900 | 892 | | |
| |||
940 | 932 | | |
941 | 933 | | |
942 | 934 | | |
943 | | - | |
944 | | - | |
945 | | - | |
946 | | - | |
947 | | - | |
948 | | - | |
949 | | - | |
950 | | - | |
951 | | - | |
| 935 | + | |
| 936 | + | |
952 | 937 | | |
953 | 938 | | |
954 | 939 | | |
| |||
963 | 948 | | |
964 | 949 | | |
965 | 950 | | |
966 | | - | |
| 951 | + | |
967 | 952 | | |
968 | 953 | | |
969 | 954 | | |
| |||
987 | 972 | | |
988 | 973 | | |
989 | 974 | | |
990 | | - | |
| 975 | + | |
991 | 976 | | |
992 | 977 | | |
993 | | - | |
| 978 | + | |
994 | 979 | | |
995 | 980 | | |
996 | 981 | | |
| |||
1010 | 995 | | |
1011 | 996 | | |
1012 | 997 | | |
1013 | | - | |
1014 | | - | |
| 998 | + | |
| 999 | + | |
1015 | 1000 | | |
1016 | 1001 | | |
1017 | 1002 | | |
| |||
Lines changed: 17 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
| 125 | + | |
125 | 126 | | |
126 | 127 | | |
127 | 128 | | |
| |||
393 | 394 | | |
394 | 395 | | |
395 | 396 | | |
396 | | - | |
| 397 | + | |
397 | 398 | | |
398 | 399 | | |
399 | 400 | | |
| |||
409 | 410 | | |
410 | 411 | | |
411 | 412 | | |
412 | | - | |
| 413 | + | |
413 | 414 | | |
| 415 | + | |
| 416 | + | |
414 | 417 | | |
415 | 418 | | |
416 | 419 | | |
| 420 | + | |
| 421 | + | |
417 | 422 | | |
418 | 423 | | |
419 | 424 | | |
420 | | - | |
| 425 | + | |
421 | 426 | | |
422 | 427 | | |
423 | 428 | | |
| |||
485 | 490 | | |
486 | 491 | | |
487 | 492 | | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
488 | 499 | | |
489 | | - | |
| 500 | + | |
490 | 501 | | |
491 | 502 | | |
492 | 503 | | |
| |||
655 | 666 | | |
656 | 667 | | |
657 | 668 | | |
| 669 | + | |
658 | 670 | | |
659 | 671 | | |
| 672 | + | |
660 | 673 | | |
661 | 674 | | |
662 | 675 | | |
| |||
0 commit comments