Compare commits
1136 Commits
BOP-1.9.4-
...
BOP-1.16.4
Author | SHA1 | Date |
---|---|---|
![]() |
5c8dc8f7ec | |
![]() |
94cd26a56d | |
![]() |
0a2ad414ef | |
![]() |
f4a0c274ea | |
![]() |
993a556e93 | |
![]() |
bebe90ee5e | |
![]() |
516879ed8c | |
![]() |
c49a82b9c1 | |
![]() |
df04ab8727 | |
![]() |
c9cfab8065 | |
![]() |
8882a9314c | |
![]() |
1eeca25ed0 | |
![]() |
7f4c3623df | |
![]() |
503cda9ef1 | |
![]() |
35b5b2f340 | |
![]() |
d57bf96802 | |
![]() |
c1615c50ef | |
![]() |
030559a74a | |
![]() |
d5396c0485 | |
![]() |
3a75fde67c | |
![]() |
7e0b396cb6 | |
![]() |
b393c2f109 | |
![]() |
ba0e812ec1 | |
![]() |
3b754115a8 | |
![]() |
22892df504 | |
![]() |
87aa9a03a9 | |
![]() |
3f805e37e1 | |
![]() |
d94e32ee3c | |
![]() |
72d3ea9c8e | |
![]() |
8caa6a9aa2 | |
![]() |
acd9f9db5b | |
![]() |
6f3410f5cd | |
![]() |
ecec6bb865 | |
![]() |
624e5a29d8 | |
![]() |
6434926d54 | |
![]() |
a970db94e9 | |
![]() |
a276d30e1f | |
![]() |
02157af333 | |
![]() |
a68e2a8c3d | |
![]() |
967f4fa5f2 | |
![]() |
22861fdba4 | |
![]() |
cca10ac408 | |
![]() |
51f5cb1b6d | |
![]() |
e7d0561af4 | |
![]() |
f438861cf3 | |
![]() |
8887217790 | |
![]() |
f66a7f349e | |
![]() |
b8bbadd73a | |
![]() |
7a9533387b | |
![]() |
ae366e8877 | |
![]() |
e93b6331f4 | |
![]() |
3ecc927854 | |
![]() |
18f2d5e66a | |
![]() |
c12735accc | |
![]() |
0123ce2257 | |
![]() |
ad1deb9352 | |
![]() |
4fc61b1930 | |
![]() |
f59bc74869 | |
![]() |
8e193fab55 | |
![]() |
80d6bc0769 | |
![]() |
27c59e07eb | |
![]() |
daffd4b951 | |
![]() |
69ad6bfc15 | |
![]() |
61968d1721 | |
![]() |
91c81c38f1 | |
![]() |
49469a9618 | |
![]() |
316600aae7 | |
![]() |
692a20d335 | |
![]() |
9279cc7547 | |
![]() |
1a5742af0f | |
![]() |
5741d6e98b | |
![]() |
f064126e70 | |
![]() |
a7883a194b | |
![]() |
987a45a5c9 | |
![]() |
e3467be773 | |
![]() |
9af3b6f06c | |
![]() |
376348eb9f | |
![]() |
58253db099 | |
![]() |
dfa48edd52 | |
![]() |
70ee37f212 | |
![]() |
39aec91eb2 | |
![]() |
f0663276d3 | |
![]() |
382fc4a90c | |
![]() |
99c204f18b | |
![]() |
3faab8a5dd | |
![]() |
4ec7e4147b | |
![]() |
69f3c81785 | |
![]() |
df13f6756d | |
![]() |
ca237aed5a | |
![]() |
7798e91fa8 | |
![]() |
1ecc8babf3 | |
![]() |
83f0b8d4be | |
![]() |
7970d1bfff | |
![]() |
cc72f61a57 | |
![]() |
95347887f8 | |
![]() |
045c804f14 | |
![]() |
5441279e4c | |
![]() |
ad5259af61 | |
![]() |
2bc36c12ff | |
![]() |
5dcd185f9f | |
![]() |
dd58816617 | |
![]() |
7fc9ffff02 | |
![]() |
c8d26102e3 | |
![]() |
4477af35d6 | |
![]() |
9d8db7917b | |
![]() |
0b1c6fc3a6 | |
![]() |
8f4a43af31 | |
![]() |
b1dd655bb5 | |
![]() |
4aa598b660 | |
![]() |
0a08fa9694 | |
![]() |
18c8392af1 | |
![]() |
acde71c51c | |
![]() |
bcd099261b | |
![]() |
0b54837832 | |
![]() |
ed4257fb70 | |
![]() |
6cfa2afe4b | |
![]() |
99eb540906 | |
![]() |
9f601850fc | |
![]() |
b9fbc0d347 | |
![]() |
ccdbf253bd | |
![]() |
fb1412909f | |
![]() |
bb60c8d49d | |
![]() |
fd099a00d5 | |
![]() |
3156168833 | |
![]() |
3bc5724766 | |
![]() |
5e16d64a0a | |
![]() |
43f17912de | |
![]() |
a0174bf1f5 | |
![]() |
0bb50a2840 | |
![]() |
d504aebb96 | |
![]() |
ff777917a1 | |
![]() |
b51d9a4dce | |
![]() |
94dcd5f2d7 | |
![]() |
29e6569f3c | |
![]() |
6ea9a33bc1 | |
![]() |
dc8964a9fd | |
![]() |
b3931fc24b | |
![]() |
6a95b28bc6 | |
![]() |
563b2857a4 | |
![]() |
be402fba7f | |
![]() |
e33525cd99 | |
![]() |
ac5527fd6c | |
![]() |
24533be7c0 | |
![]() |
2c703ba7b3 | |
![]() |
9281f5df44 | |
![]() |
e31d46c2af | |
![]() |
a2b377f2d5 | |
![]() |
d35095a2d0 | |
![]() |
965aa0551f | |
![]() |
435ee8fbb0 | |
![]() |
8651b778d2 | |
![]() |
4d38d284a3 | |
![]() |
bbcfb5e948 | |
![]() |
907934184b | |
![]() |
ecbeb67551 | |
![]() |
6a7ce041b5 | |
![]() |
a6db9423b9 | |
![]() |
2a246d57bc | |
![]() |
814c9226b1 | |
![]() |
ccf63a6bc0 | |
![]() |
7f721ada2f | |
![]() |
fab38c4c35 | |
![]() |
b6dd8df42d | |
![]() |
5f8430a78d | |
![]() |
b53a98852d | |
![]() |
3321b05f22 | |
![]() |
4919a112be | |
![]() |
e28ab2ca8d | |
![]() |
b2a9ab1bad | |
![]() |
30a3e3fff0 | |
![]() |
4b44cdc955 | |
![]() |
7bca7e9707 | |
![]() |
21ae14f67b | |
![]() |
3d69190338 | |
![]() |
46c9ba2441 | |
![]() |
ae1a2277a7 | |
![]() |
ca41c32588 | |
![]() |
fc61d76d61 | |
![]() |
b7b868bc22 | |
![]() |
b74700e5be | |
![]() |
a2538d105a | |
![]() |
da652d9359 | |
![]() |
3ab58bceb7 | |
![]() |
b58a3ff88e | |
![]() |
c1dc42290e | |
![]() |
7e0f2b8894 | |
![]() |
e1ea75fbaa | |
![]() |
ba648379a6 | |
![]() |
e297832f5e | |
![]() |
38522884f2 | |
![]() |
b591814b1f | |
![]() |
8ef12c9856 | |
![]() |
e9d75a5a4f | |
![]() |
050344333f | |
![]() |
03fa5d5034 | |
![]() |
6500381007 | |
![]() |
12277ce96f | |
![]() |
16d0e0f7a7 | |
![]() |
42680921e5 | |
![]() |
efca80836c | |
![]() |
10d94df8d7 | |
![]() |
fa6dd5f3be | |
![]() |
974a1cc242 | |
![]() |
dea75e0f74 | |
![]() |
e612de9359 | |
![]() |
da86c23c27 | |
![]() |
15078fde5a | |
![]() |
8fbe69e163 | |
![]() |
f2222e3958 | |
![]() |
9190077145 | |
![]() |
ac218d5153 | |
![]() |
2f99887eb7 | |
![]() |
c7ff6cc032 | |
![]() |
aa943081e3 | |
![]() |
9a8f7727b4 | |
![]() |
656399c37d | |
![]() |
5006dc4d99 | |
![]() |
e884a076cc | |
![]() |
3f59e898a8 | |
![]() |
b9aa7d96ca | |
![]() |
a18aeee5c7 | |
![]() |
6f0d4fd3da | |
![]() |
d834a5c637 | |
![]() |
7b0edb129e | |
![]() |
165a8d5e63 | |
![]() |
cf2fa10d2b | |
![]() |
fb6f02dcb6 | |
![]() |
4fff57deff | |
![]() |
e45533ba5b | |
![]() |
4c4d3f7a8b | |
![]() |
f0b00091e7 | |
![]() |
f8f9b3de46 | |
![]() |
d6a1e3aeca | |
![]() |
9d12744124 | |
![]() |
1784846496 | |
![]() |
ea68465148 | |
![]() |
301eed4282 | |
![]() |
acd0a41d1e | |
![]() |
6ea189b002 | |
![]() |
0c87454b31 | |
![]() |
1421f9ef8b | |
![]() |
d116ef13ee | |
![]() |
b64be5a89a | |
![]() |
49e6528ee5 | |
![]() |
eada57a419 | |
![]() |
df98950041 | |
![]() |
9a35bb4915 | |
![]() |
ad525e7987 | |
![]() |
f9d4959bc8 | |
![]() |
01eabf4aab | |
![]() |
883717a7c1 | |
![]() |
b89bf2e58b | |
![]() |
79ff303edc | |
![]() |
fbc3c11a07 | |
![]() |
6fbf2bc527 | |
![]() |
bf9ac947e4 | |
![]() |
ce2a82d860 | |
![]() |
1e519393f1 | |
![]() |
80e1d30c29 | |
![]() |
93aa27cd66 | |
![]() |
a3c211c953 | |
![]() |
62c3a88b65 | |
![]() |
3ae21f3370 | |
![]() |
5d602bcc6b | |
![]() |
6abee962d5 | |
![]() |
e209b53009 | |
![]() |
fda42522f1 | |
![]() |
979b540b8b | |
![]() |
72badaaeff | |
![]() |
29941fa176 | |
![]() |
1fb942549c | |
![]() |
25225a82e7 | |
![]() |
f441328158 | |
![]() |
7b727bfbcf | |
![]() |
cd43eceda6 | |
![]() |
b0d6aaa504 | |
![]() |
cf8c7233d4 | |
![]() |
b6513a05b1 | |
![]() |
c509ad4f73 | |
![]() |
7d8f604f71 | |
![]() |
e7fa9f2959 | |
![]() |
fe14627fc1 | |
![]() |
36189b68e3 | |
![]() |
e99690d60f | |
![]() |
d6ae490f4b | |
![]() |
5bd54e57d3 | |
![]() |
877aa321ac | |
![]() |
1d2a4a57c6 | |
![]() |
ef64a3a2cc | |
![]() |
a8a695afc1 | |
![]() |
ea9e47b29d | |
![]() |
985d240bbe | |
![]() |
1a37569034 | |
![]() |
7c4f41c6db | |
![]() |
7725f26752 | |
![]() |
0c360e4dc5 | |
![]() |
1ad433a6b4 | |
![]() |
55c0743967 | |
![]() |
ebbb29db19 | |
![]() |
13ce1c5193 | |
![]() |
6248e6a7c2 | |
![]() |
a8bbdd108b | |
![]() |
aad0108663 | |
![]() |
c222e051c0 | |
![]() |
ea6b3ed4f8 | |
![]() |
998efb6aa5 | |
![]() |
99648cb276 | |
![]() |
ba79043436 | |
![]() |
7b584af533 | |
![]() |
7e9cdf12c5 | |
![]() |
8cfe54f4f9 | |
![]() |
33d17288e1 | |
![]() |
273953e6e5 | |
![]() |
fed9774a46 | |
![]() |
7ea2605756 | |
![]() |
7c82ce7a42 | |
![]() |
aaa1b7c337 | |
![]() |
da78fdd52d | |
![]() |
48aa602981 | |
![]() |
ed7b19ba9e | |
![]() |
48082e8a54 | |
![]() |
a8ef891b37 | |
![]() |
fa5fbc23c8 | |
![]() |
4fc7f77f34 | |
![]() |
5b025fb267 | |
![]() |
b9dcbf6d08 | |
![]() |
84e8e21297 | |
![]() |
0703f0f63d | |
![]() |
37b8e6615e | |
![]() |
f72b585e2a | |
![]() |
f322a68c92 | |
![]() |
7c3340de32 | |
![]() |
92c5d14a74 | |
![]() |
5f238f2031 | |
![]() |
c3be92173c | |
![]() |
4552aa716d | |
![]() |
378266175a | |
![]() |
f5309bae51 | |
![]() |
552e3511aa | |
![]() |
f8ce3f8055 | |
![]() |
1c6b1f66c4 | |
![]() |
18946ec9ec | |
![]() |
786d0416c3 | |
![]() |
76e1664844 | |
![]() |
a4e70ccc71 | |
![]() |
da98209404 | |
![]() |
cebf4dea75 | |
![]() |
0e19ff4312 | |
![]() |
073cd6fbb3 | |
![]() |
66d0c6e5c5 | |
![]() |
d664cd9e1e | |
![]() |
f51511b738 | |
![]() |
6397ced587 | |
![]() |
f9d74389c1 | |
![]() |
ada8e9df61 | |
![]() |
eef914cbdc | |
![]() |
4f1a1276e4 | |
![]() |
fd082d19c1 | |
![]() |
3450b516c1 | |
![]() |
09040388a0 | |
![]() |
9d79c9a2af | |
![]() |
7688e3ff82 | |
![]() |
f334573f3c | |
![]() |
859d9dd05d | |
![]() |
dffbbc8f1b | |
![]() |
d7e36a8ac0 | |
![]() |
689c3d5f00 | |
![]() |
ec0977da4d | |
![]() |
f303021c7b | |
![]() |
2615f757fc | |
![]() |
4de28da3b0 | |
![]() |
ce1cdff408 | |
![]() |
5193e0e67c | |
![]() |
c341b1d687 | |
![]() |
d7412bb750 | |
![]() |
8c4c64d559 | |
![]() |
184761785c | |
![]() |
c6e1abbe14 | |
![]() |
0fe5beb957 | |
![]() |
5f09ca000d | |
![]() |
1d467724df | |
![]() |
02404340cc | |
![]() |
19c5032dc4 | |
![]() |
3a4458a666 | |
![]() |
7a560a8fd9 | |
![]() |
5ea3b0996e | |
![]() |
4e33f53f8a | |
![]() |
b9eb540c98 | |
![]() |
3efcf8059f | |
![]() |
89783dc592 | |
![]() |
a3e8f1f37b | |
![]() |
0c47a3dac0 | |
![]() |
57d24ab3a6 | |
![]() |
b6f15e77d3 | |
![]() |
6f9d9ffd56 | |
![]() |
20778d8633 | |
![]() |
89cc842ba0 | |
![]() |
5593a6dd75 | |
![]() |
94f768b689 | |
![]() |
1b38a12465 | |
![]() |
e3d20e621b | |
![]() |
a0f2a6fd95 | |
![]() |
ebd9b2c102 | |
![]() |
1e1a23b5cd | |
![]() |
0b8f81b801 | |
![]() |
50b8ac79ca | |
![]() |
93f4005907 | |
![]() |
c0aa1d6709 | |
![]() |
648723ea6b | |
![]() |
1af555f8b2 | |
![]() |
36b2a2170e | |
![]() |
51b1d5dfb1 | |
![]() |
f3be863e22 | |
![]() |
12e55d9983 | |
![]() |
7d459d7cb9 | |
![]() |
8d9cbadd83 | |
![]() |
bab7465770 | |
![]() |
3bc801338a | |
![]() |
9fdd228178 | |
![]() |
47ba320312 | |
![]() |
c54f209808 | |
![]() |
14a709ee00 | |
![]() |
28bf6c0bec | |
![]() |
0f435c7f93 | |
![]() |
e98567ca4f | |
![]() |
c75ac189b0 | |
![]() |
4b8069139c | |
![]() |
567b505439 | |
![]() |
5b42883511 | |
![]() |
9ffb7c5e5f | |
![]() |
cde4ad9871 | |
![]() |
be037ab704 | |
![]() |
23d673cbb0 | |
![]() |
23ad4b22dd | |
![]() |
eb7114b90e | |
![]() |
82f4c5adf6 | |
![]() |
25025fa0ff | |
![]() |
3a8abc08f0 | |
![]() |
b8ea059b65 | |
![]() |
dbfe3a5c74 | |
![]() |
9fa38b93a5 | |
![]() |
55f9e9a1ee | |
![]() |
5fe2002a55 | |
![]() |
6935d814eb | |
![]() |
ee7eb08ce3 | |
![]() |
cd844584af | |
![]() |
56d4fee422 | |
![]() |
cf568cc2ab | |
![]() |
3881e7731a | |
![]() |
be568c0612 | |
![]() |
4370284949 | |
![]() |
545f4bfb6c | |
![]() |
15692a62ce | |
![]() |
8609474464 | |
![]() |
fc5ced7b8e | |
![]() |
744e7533a1 | |
![]() |
fa07ef85d6 | |
![]() |
e0b2228052 | |
![]() |
6e3d1abf0e | |
![]() |
cf097bf273 | |
![]() |
15a9d26d97 | |
![]() |
6be2d7d8b8 | |
![]() |
07e23ec0ff | |
![]() |
a28abaa24b | |
![]() |
8408bf093e | |
![]() |
d9be67967d | |
![]() |
87d4015726 | |
![]() |
1cd07cb9cf | |
![]() |
1cbe6fbfd9 | |
![]() |
264cec0e33 | |
![]() |
ec19709dd6 | |
![]() |
b5318a9126 | |
![]() |
acb363cd40 | |
![]() |
ff0b701098 | |
![]() |
142ff6680f | |
![]() |
71e656536c | |
![]() |
f1ac1e8911 | |
![]() |
5116a18791 | |
![]() |
f6423c90bb | |
![]() |
2811e8f34e | |
![]() |
9f067691c3 | |
![]() |
0a1cc9b45b | |
![]() |
077354255b | |
![]() |
f4432d518c | |
![]() |
a3c914fa48 | |
![]() |
d0caff2385 | |
![]() |
b1bf9fabba | |
![]() |
034ea250af | |
![]() |
ebe61f8930 | |
![]() |
ae14dd18e7 | |
![]() |
43f4c6c2a7 | |
![]() |
cb522f2675 | |
![]() |
a363ea6b59 | |
![]() |
7250c168c6 | |
![]() |
b5e6671d1b | |
![]() |
93dfc32901 | |
![]() |
63389cb46d | |
![]() |
af85dd641b | |
![]() |
a53a6eb2cb | |
![]() |
c7720fffb6 | |
![]() |
f1fe7a745c | |
![]() |
c65d54116c | |
![]() |
44795b0e61 | |
![]() |
bb6f283f41 | |
![]() |
f7e91937d8 | |
![]() |
c739135516 | |
![]() |
5bffc07653 | |
![]() |
b29ab83903 | |
![]() |
b68c9522a6 | |
![]() |
dfe0c2debf | |
![]() |
e3f288ecc6 | |
![]() |
8ba40c27fd | |
![]() |
e004478e3e | |
![]() |
2e9c5178b2 | |
![]() |
0c97c19c1d | |
![]() |
fbd92d83d5 | |
![]() |
92809f3092 | |
![]() |
c0739d8f43 | |
![]() |
fbe6213f7e | |
![]() |
9e8c34618f | |
![]() |
5d0115f05e | |
![]() |
7d8b7b65ce | |
![]() |
91cf57c696 | |
![]() |
66216018e0 | |
![]() |
ca4acfc728 | |
![]() |
dc0cab9228 | |
![]() |
0ff8ae6c7c | |
![]() |
8d11b2cb25 | |
![]() |
6c4a11b15e | |
![]() |
f439032546 | |
![]() |
4c68c40904 | |
![]() |
ada0bd0aa3 | |
![]() |
f04d75739a | |
![]() |
97abc07c4a | |
![]() |
289ddbee5f | |
![]() |
406b6502df | |
![]() |
d34c3ee723 | |
![]() |
efbe076cf0 | |
![]() |
70eaa49128 | |
![]() |
9c8e64dacb | |
![]() |
2733f1aba9 | |
![]() |
d58be03152 | |
![]() |
1b4b8cffe0 | |
![]() |
48a05fb3fe | |
![]() |
35aeb8afdb | |
![]() |
102c5e3453 | |
![]() |
51ff1cc235 | |
![]() |
5d234873c2 | |
![]() |
fd3a0e46b0 | |
![]() |
9f528f4440 | |
![]() |
61cfaca544 | |
![]() |
03687501ea | |
![]() |
ec6d959cfe | |
![]() |
4c312894b5 | |
![]() |
a7db4332eb | |
![]() |
70cfdf7e3a | |
![]() |
ba27feabf7 | |
![]() |
15ca3613dd | |
![]() |
962675faa5 | |
![]() |
0cbed91d11 | |
![]() |
55a938e8b6 | |
![]() |
290533131e | |
![]() |
9f10486989 | |
![]() |
7e662ef79b | |
![]() |
5266a2c112 | |
![]() |
b644b75920 | |
![]() |
10712027c4 | |
![]() |
7e9da5e1a7 | |
![]() |
3eb0516ce1 | |
![]() |
7f1d083a0b | |
![]() |
ac2c70c097 | |
![]() |
072c4c7623 | |
![]() |
de4e309e53 | |
![]() |
fcbdecd4e8 | |
![]() |
4ff264ddfc | |
![]() |
443ef45fbe | |
![]() |
ab667b9513 | |
![]() |
581c541073 | |
![]() |
d39aa6a42b | |
![]() |
2ce1b15a24 | |
![]() |
d9534569d7 | |
![]() |
9e9299b665 | |
![]() |
e791a36e2f | |
![]() |
764a08eff5 | |
![]() |
5a62b79eff | |
![]() |
8e575c0b54 | |
![]() |
2002152d8a | |
![]() |
6770e18d50 | |
![]() |
890f7308db | |
![]() |
d16d851619 | |
![]() |
7f65a68525 | |
![]() |
17dfb6a377 | |
![]() |
7a6abc9022 | |
![]() |
5bb7155286 | |
![]() |
51ac820532 | |
![]() |
e02cffa5fa | |
![]() |
b7b320dfdb | |
![]() |
f268aa8552 | |
![]() |
be1b0fb550 | |
![]() |
ebaa00d0f0 | |
![]() |
90421e3530 | |
![]() |
3ef59f474e | |
![]() |
969c7b39e2 | |
![]() |
26b1db1c25 | |
![]() |
3b076fdc7e | |
![]() |
eef4615a2d | |
![]() |
2d25e3d99b | |
![]() |
518e6ffe47 | |
![]() |
b1d67034dc | |
![]() |
98cba6e62c | |
![]() |
65305344f7 | |
![]() |
cd015346de | |
![]() |
8f611d556c | |
![]() |
7004b689cd | |
![]() |
6801ac63e1 | |
![]() |
728044dfba | |
![]() |
ce4e321475 | |
![]() |
5d1328baf2 | |
![]() |
e8de5e822b | |
![]() |
4ee56a1f0d | |
![]() |
ac5010c1eb | |
![]() |
6548b38ffa | |
![]() |
8d36d9f5d1 | |
![]() |
088195c315 | |
![]() |
b90b472cc3 | |
![]() |
bb27856827 | |
![]() |
f13f692efd | |
![]() |
38a8b79fd6 | |
![]() |
75bf89e31f | |
![]() |
a67b28bbd2 | |
![]() |
aa6a51a2f7 | |
![]() |
7e3850538d | |
![]() |
a975fde9b9 | |
![]() |
e5b2431ffb | |
![]() |
5021731064 | |
![]() |
4ff4ca3508 | |
![]() |
986d6d66f7 | |
![]() |
c970e6673a | |
![]() |
513f7cd049 | |
![]() |
dd140a7dbc | |
![]() |
1cc69438d6 | |
![]() |
771193b7cc | |
![]() |
5f16ea4eaf | |
![]() |
88f6ea79c6 | |
![]() |
2b6b856591 | |
![]() |
e15b139496 | |
![]() |
5faec2839c | |
![]() |
68fa0aad3c | |
![]() |
50cf0f59e1 | |
![]() |
2ef252f106 | |
![]() |
ae5df8f9cd | |
![]() |
ae3bb28a93 | |
![]() |
87c73863f8 | |
![]() |
5d011224b5 | |
![]() |
5f7015aeee | |
![]() |
7f6ace64e9 | |
![]() |
57ac719093 | |
![]() |
58f076007a | |
![]() |
ac3d37bac3 | |
![]() |
1852e82d28 | |
![]() |
8031e86f3a | |
![]() |
ccf44d2636 | |
![]() |
5de9ff775f | |
![]() |
4437557e77 | |
![]() |
8c98ccd80d | |
![]() |
e2eda98f2e | |
![]() |
2f4c74e99f | |
![]() |
e00cd25c0b | |
![]() |
43a5000bd7 | |
![]() |
6f3826a62f | |
![]() |
cf08d7367e | |
![]() |
87b669cc9b | |
![]() |
9e8f943b30 | |
![]() |
eb7e738b55 | |
![]() |
b1de30e5b9 | |
![]() |
f8b9cdd574 | |
![]() |
a0581b5eae | |
![]() |
30e41fb320 | |
![]() |
f6b6a44122 | |
![]() |
03c397026c | |
![]() |
b3b5a635b5 | |
![]() |
880b211dcd | |
![]() |
f2eb0052fe | |
![]() |
e76b5dad2a | |
![]() |
0aafba6424 | |
![]() |
5004b9b311 | |
![]() |
b488980334 | |
![]() |
11e764ce5f | |
![]() |
d8674b1568 | |
![]() |
1b1d78797d | |
![]() |
e85fd1d9f7 | |
![]() |
35bb07618e | |
![]() |
c1b44f73cc | |
![]() |
d1254eab46 | |
![]() |
a9e42935d0 | |
![]() |
ecfc5ea983 | |
![]() |
9d9e912766 | |
![]() |
b62083115e | |
![]() |
5c092bd853 | |
![]() |
433ee183dd | |
![]() |
63de307f82 | |
![]() |
4681b40d52 | |
![]() |
92a52269eb | |
![]() |
8fbc40d7eb | |
![]() |
c91a7f62f7 | |
![]() |
c454d7724f | |
![]() |
2f9c564ccb | |
![]() |
5dbf7f9a04 | |
![]() |
eb0c9c456c | |
![]() |
2791755a37 | |
![]() |
948b53d4a3 | |
![]() |
957fc6ad85 | |
![]() |
96da628dfc | |
![]() |
8079fe3f86 | |
![]() |
de0f1a9576 | |
![]() |
85d6f49aa9 | |
![]() |
6717a9708c | |
![]() |
5d08edd06a | |
![]() |
14fa8b672d | |
![]() |
55e95d5990 | |
![]() |
c4210e46bb | |
![]() |
907fc2f2cc | |
![]() |
6c4ba9eb0b | |
![]() |
266bc2189a | |
![]() |
98f33c225b | |
![]() |
f17f5523be | |
![]() |
6629f386ea | |
![]() |
3154ba0563 | |
![]() |
8811664bf3 | |
![]() |
ec2e483467 | |
![]() |
5e84eafdf4 | |
![]() |
7442feb06c | |
![]() |
dbd1037bac | |
![]() |
a4f650747d | |
![]() |
d2de186f99 | |
![]() |
7a5ffa9d73 | |
![]() |
61dcf6e741 | |
![]() |
17b4731e3e | |
![]() |
9dde633a19 | |
![]() |
66cf539390 | |
![]() |
bdcf18a4e8 | |
![]() |
0996c23544 | |
![]() |
924983649b | |
![]() |
1c6fad26bf | |
![]() |
361d6a5121 | |
![]() |
f65618ce55 | |
![]() |
8db12839d0 | |
![]() |
c2f47957ef | |
![]() |
7912571463 | |
![]() |
24c7daec5f | |
![]() |
314dff5bc4 | |
![]() |
4bac91e0dd | |
![]() |
457bfe3ab4 | |
![]() |
03c2f3dd8b | |
![]() |
8f0e4d375d | |
![]() |
c53b3402e7 | |
![]() |
0093e0189a | |
![]() |
fcd56f0f49 | |
![]() |
c1831cf3df | |
![]() |
436700ac03 | |
![]() |
dd75a92e0a | |
![]() |
bd7cdf2262 | |
![]() |
e7b2cd0396 | |
![]() |
152df7c2bc | |
![]() |
805e0f772d | |
![]() |
953aa894ae | |
![]() |
f9cef50b93 | |
![]() |
9f6502e793 | |
![]() |
6e5fda4882 | |
![]() |
e5b9601d83 | |
![]() |
6d87dc4202 | |
![]() |
4f727b87f0 | |
![]() |
b4cfd02d38 | |
![]() |
d8dde943da | |
![]() |
198d9da3d0 | |
![]() |
d5ceebedab | |
![]() |
cbd1fd69c7 | |
![]() |
3b8604412d | |
![]() |
c96b41702b | |
![]() |
750fc6e94f | |
![]() |
369b05a616 | |
![]() |
5209a366d3 | |
![]() |
55283f6872 | |
![]() |
084d380259 | |
![]() |
f1024b3445 | |
![]() |
b26f2d81fa | |
![]() |
25127ca360 | |
![]() |
af223c39a3 | |
![]() |
e88cc2f8ae | |
![]() |
7dffb4754f | |
![]() |
838d80d4c1 | |
![]() |
dc34f7b5a0 | |
![]() |
e759686e61 | |
![]() |
39640b81ba | |
![]() |
917c075b26 | |
![]() |
37e9ffa51c | |
![]() |
a5c23fa9e1 | |
![]() |
fee7329151 | |
![]() |
7adf0f38e3 | |
![]() |
d595ef77b5 | |
![]() |
8ebeacde42 | |
![]() |
2b22653e8d | |
![]() |
02bef12c47 | |
![]() |
c3a4237b83 | |
![]() |
0e6e960e50 | |
![]() |
ef6561803f | |
![]() |
c4385d995e | |
![]() |
7e7dfe48e8 | |
![]() |
d2a862a516 | |
![]() |
5a2ec05001 | |
![]() |
a008e5f28c | |
![]() |
29a49f8486 | |
![]() |
53eee75917 | |
![]() |
6dc42451c1 | |
![]() |
7c2fc86c72 | |
![]() |
82f31e5da0 | |
![]() |
b630ff1fcf | |
![]() |
8dc8f466d7 | |
![]() |
3bf716cf8a | |
![]() |
8a6426e196 | |
![]() |
d1ec982df9 | |
![]() |
6ea6cde527 | |
![]() |
8aa95d1818 | |
![]() |
05a805eb46 | |
![]() |
124aa77d06 | |
![]() |
3c6ccdd855 | |
![]() |
a0968515cb | |
![]() |
4e19307cbb | |
![]() |
a44ca64e73 | |
![]() |
b8ba633f23 | |
![]() |
c874eb35c7 | |
![]() |
63601b9316 | |
![]() |
1f8783a1cc | |
![]() |
d773808bc1 | |
![]() |
1173bff305 | |
![]() |
39595d0c74 | |
![]() |
33c595f486 | |
![]() |
478130c26a | |
![]() |
00456bd224 | |
![]() |
107285e234 | |
![]() |
b57eb9787e | |
![]() |
3458e1b5f9 | |
![]() |
67fd033e3c | |
![]() |
c57c458e69 | |
![]() |
a1b36bec78 | |
![]() |
5f264c2341 | |
![]() |
064e411d72 | |
![]() |
7767650a93 | |
![]() |
4981ddb3b4 | |
![]() |
6e3ebabde9 | |
![]() |
1b6b5dc0ad | |
![]() |
6a8332f386 | |
![]() |
b931caaca1 | |
![]() |
8faab3f05c | |
![]() |
94f04fa1b3 | |
![]() |
fcdda72f35 | |
![]() |
a5563eec33 | |
![]() |
f32d655af2 | |
![]() |
9d85377265 | |
![]() |
5417e0656b | |
![]() |
93475aafd6 | |
![]() |
962f1d0db5 | |
![]() |
26c88739cb | |
![]() |
023e5e5969 | |
![]() |
70bf47a40d | |
![]() |
11ec1c9c85 | |
![]() |
e37d25b128 | |
![]() |
d6d478b46d | |
![]() |
d7fb9a18f2 | |
![]() |
78881de9f7 | |
![]() |
9498d91de6 | |
![]() |
169ffa6e36 | |
![]() |
aa2848cb9e | |
![]() |
41cdbabdb5 | |
![]() |
570954e7c6 | |
![]() |
bfb1c17ae8 | |
![]() |
23ad88b448 | |
![]() |
25764622dd | |
![]() |
9f6c532e43 | |
![]() |
0f8be0526e | |
![]() |
f8ea5933a2 | |
![]() |
fab275beac | |
![]() |
f27fc3b85b | |
![]() |
0114127565 | |
![]() |
d841c7ca1a | |
![]() |
47f29517cd | |
![]() |
e706e1cdf1 | |
![]() |
9873b7ad56 | |
![]() |
1e6d27672e | |
![]() |
69def48012 | |
![]() |
d019d127f4 | |
![]() |
2a1863cd12 | |
![]() |
a6adb737e6 | |
![]() |
3b318a6060 | |
![]() |
0af17b32fd | |
![]() |
3cebe1d3e6 | |
![]() |
7a6c983667 | |
![]() |
3054a00eb5 | |
![]() |
21dbe55c49 | |
![]() |
bb495471ed | |
![]() |
67901ed0c2 | |
![]() |
d7928f8bb9 | |
![]() |
6f2b55aa47 | |
![]() |
3ab380cd95 | |
![]() |
c44bc02158 | |
![]() |
42f53229e3 | |
![]() |
84e926b5da | |
![]() |
e2820ff066 | |
![]() |
99e342279c | |
![]() |
2513b31d7c | |
![]() |
23bed4eacc | |
![]() |
6486c6be9e | |
![]() |
5a86dca66f | |
![]() |
2e3a09d316 | |
![]() |
7240bbd56d | |
![]() |
ede6a10963 | |
![]() |
6b304bb998 | |
![]() |
bb2c1c3944 | |
![]() |
1324d30ab9 | |
![]() |
591d86586b | |
![]() |
cd5eee7d9b | |
![]() |
553641d9bb | |
![]() |
406dd93a2f | |
![]() |
9e0dc810a4 | |
![]() |
8d89b6ae5a | |
![]() |
840ac96179 | |
![]() |
a3d75ea69e | |
![]() |
6f975cd2c2 | |
![]() |
e5f94ae1a6 | |
![]() |
d52ab2593c | |
![]() |
eb1426660c | |
![]() |
51190a6acf | |
![]() |
f17453b138 | |
![]() |
a7c14693c3 | |
![]() |
87790220e8 | |
![]() |
ab82624c03 | |
![]() |
be43563053 | |
![]() |
5ebee30787 | |
![]() |
7c8751781a | |
![]() |
2859232dbb | |
![]() |
45d9d9a59a | |
![]() |
8ae13abd3d | |
![]() |
4cc31d5088 | |
![]() |
e8deac5d4c | |
![]() |
f1e5fac333 | |
![]() |
fad06e3289 | |
![]() |
24ff101a03 | |
![]() |
95810b636b | |
![]() |
a902dd3a39 | |
![]() |
8f6d19f853 | |
![]() |
765811f989 | |
![]() |
e227dde68e | |
![]() |
984e4e395c | |
![]() |
806e6b5d35 | |
![]() |
bb0f2eb27d | |
![]() |
0cf39d0b33 | |
![]() |
50643ec899 | |
![]() |
fe5df48f1f | |
![]() |
6b886e1ef2 | |
![]() |
bf5424becc | |
![]() |
a71c5ec545 | |
![]() |
8266e14b35 | |
![]() |
1fda3b3b2e | |
![]() |
c35964f8b4 | |
![]() |
a2d4ac5541 | |
![]() |
6fe11a828b | |
![]() |
d961e3ece1 | |
![]() |
bed2b97b1f | |
![]() |
ed934fb8a3 | |
![]() |
31c61e42d5 | |
![]() |
79a0a4aa00 | |
![]() |
bb4be1aeec | |
![]() |
d3d93cf5bf | |
![]() |
6ac5963e9e | |
![]() |
6e69b3ca29 | |
![]() |
73cc849186 | |
![]() |
177de1610e | |
![]() |
99f9ae7a2c | |
![]() |
154a96a413 | |
![]() |
d5f4c73459 | |
![]() |
714f727b2d | |
![]() |
84003cf959 | |
![]() |
d673d9a78d | |
![]() |
d7779e6290 | |
![]() |
90d88e0d46 | |
![]() |
efcefe1c69 | |
![]() |
08de2f7c6a | |
![]() |
7dd3610be8 | |
![]() |
28370f7092 | |
![]() |
6b3344a511 | |
![]() |
38bc788229 | |
![]() |
cbe5d42fcb | |
![]() |
880b49a025 | |
![]() |
b592a98bb5 | |
![]() |
7f7c12fce7 | |
![]() |
35183a893c | |
![]() |
d5306d6d23 | |
![]() |
5317332418 | |
![]() |
7d2845a36e | |
![]() |
0e5bbc753f | |
![]() |
961e57a304 | |
![]() |
486603da72 | |
![]() |
8aaba4e6b1 | |
![]() |
358a40d76a | |
![]() |
dc656422d0 | |
![]() |
46febb809a | |
![]() |
24d8856598 | |
![]() |
b494aeeaea | |
![]() |
2877fc84df | |
![]() |
d26340e109 | |
![]() |
4057201f49 | |
![]() |
db76194689 | |
![]() |
8a8632b04f | |
![]() |
4977b0100c | |
![]() |
39c272cf7c | |
![]() |
c5f4469a21 | |
![]() |
5ac38b686a | |
![]() |
25cb2ee6f4 | |
![]() |
d7f634051d | |
![]() |
c8ab581422 | |
![]() |
6c6a71aae5 | |
![]() |
eb1d359bf4 | |
![]() |
589046124f | |
![]() |
18c3c5c125 | |
![]() |
6258ede756 | |
![]() |
1f0140167f | |
![]() |
8a7c42d024 | |
![]() |
8ecf901112 | |
![]() |
02b48b2e8b | |
![]() |
5791c6dcf2 | |
![]() |
4ad4a82c94 | |
![]() |
4ecfc29aa0 | |
![]() |
c05ba789f5 | |
![]() |
0be9d68225 | |
![]() |
6e7c6ef76b | |
![]() |
a28a7123af | |
![]() |
7eb131681d | |
![]() |
62fd7bf613 | |
![]() |
abfeb8c09c | |
![]() |
2ae4127f3c | |
![]() |
1218bfe35a | |
![]() |
6d9cd6e9a7 | |
![]() |
112018950c | |
![]() |
016ed8241c | |
![]() |
ebedc1806d | |
![]() |
519c1b844b | |
![]() |
522406c2f5 | |
![]() |
5ed194ae20 | |
![]() |
6f5e025e61 | |
![]() |
0641329740 | |
![]() |
6756e4b388 | |
![]() |
44e2f5ef7c | |
![]() |
59cf504d44 | |
![]() |
3515aa1fa7 | |
![]() |
798e18708b | |
![]() |
4f802ca60c | |
![]() |
4956eb5071 | |
![]() |
b42cd57cc9 | |
![]() |
7f19449317 | |
![]() |
fcc7c37195 | |
![]() |
711c696b87 | |
![]() |
82341155b0 | |
![]() |
423303329b | |
![]() |
0dc4ebeba5 | |
![]() |
9b05786710 | |
![]() |
eaa95d0b43 | |
![]() |
dace236373 | |
![]() |
0065c6da75 | |
![]() |
85b4efdbfa | |
![]() |
8daf47a394 | |
![]() |
04276171a6 | |
![]() |
d10ec0909b | |
![]() |
3d0673dfe0 | |
![]() |
cf39e12de8 | |
![]() |
5324cf499d | |
![]() |
61d05ece31 | |
![]() |
178661a900 | |
![]() |
a2d15ca34b | |
![]() |
e053ffde53 | |
![]() |
b9dad9c4ff | |
![]() |
c2a48b1683 | |
![]() |
cdbe8bc336 | |
![]() |
0a8c1600a7 | |
![]() |
526f80d6e2 | |
![]() |
4ff8185573 | |
![]() |
561bb27d4f | |
![]() |
be8b008cba | |
![]() |
fbc1d6b82e | |
![]() |
35c08b622a | |
![]() |
f774e0754a | |
![]() |
8b67b8c196 | |
![]() |
8c092b52ec | |
![]() |
57ca9427f2 | |
![]() |
6c6ab5188a | |
![]() |
d98ec78ccd | |
![]() |
d7ed3a742b | |
![]() |
42199e5ab4 | |
![]() |
1e2191a455 | |
![]() |
aa8ce11031 | |
![]() |
cfcb62fbad | |
![]() |
8f95dcc9c3 | |
![]() |
e3141b45e6 | |
![]() |
eee1a0358a | |
![]() |
4c680f70a3 | |
![]() |
1289bc6552 | |
![]() |
fdc68ca5bb | |
![]() |
796dfad992 | |
![]() |
95d6cc19de | |
![]() |
d8d9d3a222 | |
![]() |
beefbf5fe9 | |
![]() |
f66b63a827 | |
![]() |
2290dcf812 | |
![]() |
149f6992d9 | |
![]() |
fd1180d5dd | |
![]() |
63adef41bf | |
![]() |
36506a0499 | |
![]() |
37fffaf09c | |
![]() |
91dec0647c | |
![]() |
e882c526bb | |
![]() |
b9393fb666 | |
![]() |
7f55c97c7b | |
![]() |
08dc4392b5 | |
![]() |
48ddc0e8c4 | |
![]() |
ace253c59b | |
![]() |
edf48390e1 | |
![]() |
878055bf15 | |
![]() |
d68fe0dfb6 | |
![]() |
845c317937 | |
![]() |
e1361e720e | |
![]() |
3faad69fd3 | |
![]() |
2b44e08389 | |
![]() |
2ab535981b | |
![]() |
a7230f7032 | |
![]() |
6daa914cad | |
![]() |
d5a5954958 | |
![]() |
d9aa7530f0 |
|
@ -1,39 +0,0 @@
|
|||
BEFORE SUBMITTING!
|
||||
----
|
||||
For feature requests, please delete this template and create your own. If this is an issue, ensure the following before reporting:
|
||||
|
||||
- [ ] Biomes O' Plenty is updated to the latest available version
|
||||
- [ ] This issue occurs on either Minecraft 1.9.4 or 1.10
|
||||
- [ ] Forge is updated to the latest available version
|
||||
- [ ] This issue occurs without Optifine, Cauldron or similar mods installed
|
||||
- [ ] All other mods which appear to be involved are updated to their latest versions
|
||||
- [ ] This issue does not occur in a modpack (If it does, please report this to the modpack author)
|
||||
|
||||
Please also test whether this issue occurs with Biomes O' Plenty on its own or with other mods, and make note of this in your issue description. Links
|
||||
should be provided for the logs mentioned below and any screenshots where relevant.
|
||||
|
||||
Once you have read and verified the above, you may delete this section.
|
||||
|
||||
----
|
||||
|
||||
#### Issue Description:
|
||||
|
||||
|
||||
|
||||
#### Steps to reproduce:
|
||||
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
|
||||
#### Additional Information:
|
||||
|
||||
- fml-client-latest.log or fml-server-latest.log:
|
||||
- Screenshots:
|
||||
|
||||
____
|
||||
#### Affected Versions (Exact numbers, do *not* use "latest"):
|
||||
|
||||
- Biomes O' Plenty:
|
||||
- Minecraft:
|
||||
- Forge:
|
|
@ -0,0 +1,27 @@
|
|||
---
|
||||
name: 1.16.3 Standalone Bug
|
||||
about: For bugs that occur with Biomes O' Plenty for 1.16.3. We do not support older versions!
|
||||
title: ''
|
||||
labels: bug-minor
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
## Bug Report
|
||||
|
||||
[ Lines between [ ] (square brackets) should be removed before posting. ]</br>
|
||||
|
||||
### What's the issue you encountered?
|
||||
|
||||
[ Describe the issue in detail and what you were doing beforehand. ]</br>
|
||||
|
||||
### How can the issue be reproduced?
|
||||
|
||||
[ Include a detailed step by step process for recreating your issue with only Biomes O' Plenty installed. ]</br>
|
||||
|
||||
### Logs
|
||||
|
||||
[ Please include any relevant logs here. This can be done by dragging and dropping your log files into the issue. ]</br>
|
||||
|
||||
### Mod Version
|
||||
[ Please put the version of the mod you were using here. ]</br>
|
|
@ -0,0 +1,23 @@
|
|||
---
|
||||
name: 1.16.3 Standalone Crash
|
||||
about: For crashes that occur with Biomes O' Plenty for 1.16.3. We do not support older versions!
|
||||
title: ''
|
||||
labels: crash
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
## Bug Report
|
||||
|
||||
[ Lines between [ ] (square brackets) should be removed before posting. ]</br>
|
||||
|
||||
### How can the crash be reproduced?
|
||||
|
||||
[ Include a detailed step by step process for recreating your crash with only Biomes O' Plenty installed. ]</br>
|
||||
|
||||
### Crash Report and Logs
|
||||
|
||||
[ Please include your crash report and logs here. This can be done by dragging and dropping your log files and crash report files into the issue. ]</br>
|
||||
|
||||
### Mod Version
|
||||
[ Please put the version of the mod you were using here. ]</br>
|
|
@ -0,0 +1,20 @@
|
|||
---
|
||||
name: 1.16.3 Feature Request
|
||||
about: Feature requests for Biomes O' Plenty for 1.16.3. We do not support older versions!
|
||||
title: ''
|
||||
labels: feature
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
## Feature Request
|
||||
|
||||
[ Lines between [ ] (square brackets) should be removed before posting. ]</br>
|
||||
|
||||
### What feature are you suggesting?
|
||||
|
||||
[ Provide an overview of the feature being suggested. ]</br>
|
||||
|
||||
### Why should it be added?
|
||||
|
||||
[ Describe the benefits of implementing this feature. ]</br>
|
|
@ -0,0 +1,5 @@
|
|||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Glitchfiend Discord
|
||||
url: https://discord.gg/GyyzU6T
|
||||
about: Please ask general questions here instead of opening issues for them.
|
|
@ -4,12 +4,25 @@
|
|||
/Mixin/
|
||||
/repo/
|
||||
/run/
|
||||
/logs/
|
||||
.idea/*
|
||||
/.gradle/
|
||||
/.settings/
|
||||
/.classpath
|
||||
/.project
|
||||
|
||||
# OS generated files
|
||||
*.DS_Store
|
||||
BiomesOPlenty.iml
|
||||
BiomesOPlenty.ipr
|
||||
BiomesOPlenty.iws
|
||||
|
||||
# IntelliJ project files
|
||||
*.iml
|
||||
*.ipr
|
||||
*.iws
|
||||
|
||||
*.launch
|
||||
mappings/.gradle/
|
||||
#mappings/mcp/
|
||||
mappings/build/
|
||||
mappings/*.csv
|
||||
mappings/.project
|
||||
mappings/last_updated.json
|
||||
|
|
|
@ -0,0 +1,60 @@
|
|||
@Library('forge-shared-library')_
|
||||
|
||||
pipeline {
|
||||
options {
|
||||
disableConcurrentBuilds()
|
||||
}
|
||||
agent {
|
||||
docker {
|
||||
image 'gradle:jdk8'
|
||||
args '-v forgegc:/home/gradle/.gradle/'
|
||||
}
|
||||
}
|
||||
environment {
|
||||
GRADLE_ARGS = '--no-daemon --console=plain' // No daemon for now as FG3 kinda derps. //'-Dorg.gradle.daemon.idletimeout=5000'
|
||||
JENKINS_HEAD = 'https://wiki.jenkins-ci.org/download/attachments/2916393/headshot.png'
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('fetch') {
|
||||
steps {
|
||||
checkout scm
|
||||
}
|
||||
}
|
||||
stage('setup') {
|
||||
steps {
|
||||
withGradle {
|
||||
sh './gradlew ${GRADLE_ARGS} --refresh-dependencies'
|
||||
}
|
||||
script {
|
||||
env.MYVERSION = sh(returnStdout: true, script: './gradlew :properties -q | grep "^version:" | awk \'{print $2}\'').trim()
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('changelog') {
|
||||
when {
|
||||
not {
|
||||
changeRequest()
|
||||
}
|
||||
}
|
||||
steps {
|
||||
writeChangelog(currentBuild, "build/BiomesOPlenty-${env.MYVERSION}-changelog.txt")
|
||||
}
|
||||
}
|
||||
stage('publish') {
|
||||
when {
|
||||
not {
|
||||
changeRequest()
|
||||
}
|
||||
}
|
||||
environment {
|
||||
CURSE_API_KEY = credentials('curse-api-key')
|
||||
}
|
||||
steps {
|
||||
withGradle {
|
||||
sh './gradlew ${GRADLE_ARGS} :uploadArchives curseforge -PcurseApiKey=${CURSE_API_KEY}'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
24
README.md
24
README.md
|
@ -1,25 +1,17 @@
|
|||
<p align="center"><img src="http://i.imgur.com/wdIIbNr.png"></p>
|
||||
<p align="center"><img src="https://i.imgur.com/HQ2opH6.png"></p>
|
||||
|
||||
**Biomes O' Plenty** is a **Minecraft mod** that adds **over 50 new biomes** to the overworld and Nether. From coral reefs to bamboo forests, all of our biomes are decorated with a slew of **new plants, trees, flowers, and more!**
|
||||
<p align="center"><img src="https://i.imgur.com/CYxKg5M.png"></p>
|
||||
|
||||
<p align="center">https://discord.gg/GyyzU6T</p>
|
||||
|
||||
**Biomes O' Plenty** is a **Minecraft mod** that adds **over 50 new biomes** to the Overworld, Nether, and End. From Lavender Fields to Redwood Forests and many more, all of our biomes are decorated with a variety of **new trees, flowers, and plants!**
|
||||
|
||||
-----------------
|
||||
|
||||
**Note:** To use the mod on a **server**, you must set the **level-type** setting in your server's config file to **BIOMESOP**
|
||||
|
||||
Also, if you want to **disable or add certain world generation features** in certain biomes, check out our guide for creating **biome configuration files**: https://github.com/Glitchfiend/BiomesOPlenty/wiki/Configuring-Biomes
|
||||
**Note:** To use the mod on a **server**, you must set the **level-type** setting in your server's config file to **biomesoplenty**
|
||||
|
||||
-----------------
|
||||
|
||||
**Please note that the 1.9 version is still in development. Whilst it may have many bugs fixed compared to 1.7/1.8.9, there will still be some missing features.**
|
||||
|
||||
-----------------
|
||||
|
||||
[<img src="http://i.creativecommons.org/l/by-nc-nd/3.0/88x31.png">](http://creativecommons.org/licenses/by-nc-nd/4.0/deed.en_US)
|
||||
|
||||
Biomes O' Plenty is licensed under a [Creative Commons Attribution-NonCommercial-NoDerivs 4.0 Unported License](http://creativecommons.org/licenses/by-nc-nd/4.0/deed.en_US).
|
||||
|
||||
-----------------
|
||||
|
||||
We've partnered with **CreeperHost**, and will be launching an **official Glitchfiend server** soon, with all of our mods installed. It won't be happening until they're updated to 1.9, but feel free to use this **promo code** when ordering a server of your own!
|
||||
|
||||
<p align="center"><img src="http://i.imgur.com/rjmyjrV.png"></p>
|
||||
Biomes O' Plenty is licensed under a [Creative Commons Attribution-NonCommercial-NoDerivs 4.0 Unported License](http://creativecommons.org/licenses/by-nc-nd/4.0/deed.en_US).
|
204
build.gradle
204
build.gradle
|
@ -1,99 +1,71 @@
|
|||
buildscript {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
maven { url = 'https://files.minecraftforge.net/maven' }
|
||||
jcenter()
|
||||
maven {
|
||||
name = "forge"
|
||||
url = "http://files.minecraftforge.net/maven"
|
||||
}
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'net.minecraftforge.gradle:ForgeGradle:2.2-SNAPSHOT'
|
||||
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
id "com.matthewprenger.cursegradle" version "1.0.5"
|
||||
id "com.matthewprenger.cursegradle" version "1.4.0"
|
||||
}
|
||||
|
||||
apply plugin: 'net.minecraftforge.gradle.forge'
|
||||
apply plugin: 'net.minecraftforge.gradle'
|
||||
apply plugin: 'eclipse'
|
||||
apply plugin: 'idea'
|
||||
apply plugin: 'maven'
|
||||
|
||||
// define the properties file
|
||||
ext.configFile = file "build.properties"
|
||||
|
||||
configFile.withReader {
|
||||
// read config. it shall from now on be referenced as simply config or as project.config
|
||||
def prop = new Properties()
|
||||
prop.load(it)
|
||||
project.ext.config = new ConfigSlurper().parse prop
|
||||
}
|
||||
repositories { mavenLocal() }
|
||||
|
||||
group = "com.github.glitchfiend.biomesoplenty"
|
||||
// why set the version twice?
|
||||
version = config.mod_version
|
||||
archivesBaseName = "BiomesOPlenty"
|
||||
|
||||
// add some stuff to the version
|
||||
version = "${config.minecraft_version}-${config.mod_version}.${System.getenv().BUILD_NUMBER}"
|
||||
// set this for the version.properties file, or was this broken on purpose?
|
||||
config.build_number = (System.getenv().BUILD_NUMBER) ? System.getenv().BUILD_NUMBER : ""
|
||||
def getGitHash = {
|
||||
def stdout = new ByteArrayOutputStream()
|
||||
exec {
|
||||
commandLine 'git', 'rev-parse', '--short', 'HEAD'
|
||||
standardOutput = stdout
|
||||
}
|
||||
return stdout.toString().trim()
|
||||
}
|
||||
|
||||
version = "${minecraft_version}-${mod_version}.${System.getenv().BUILD_NUMBER}"
|
||||
|
||||
minecraft {
|
||||
version = config.minecraft_version + "-" + config.forge_version // grab latest forge
|
||||
useDepAts = true
|
||||
mappings = project.config.mappings_version
|
||||
//gradle complains if this isn't set when setting up/using IDEA workspace
|
||||
runDir = "run"
|
||||
//set a full version string with appended build number to be used in mod registration
|
||||
def buildnum = (config.build_number!="") ? '.' + config.build_number : ""
|
||||
replace '@MOD_VERSION@', config.mod_version + buildnum
|
||||
replaceIn 'BiomesOPlenty.java'
|
||||
}
|
||||
mappings channel: 'official', version: minecraft_version
|
||||
|
||||
def commonManifest = {
|
||||
attributes 'FMLAT': 'biomesoplenty_at.cfg'
|
||||
}
|
||||
accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
|
||||
|
||||
jar {
|
||||
manifest commonManifest
|
||||
classifier = 'universal'
|
||||
runs {
|
||||
client = {
|
||||
workingDirectory = project.file("run").canonicalPath
|
||||
source sourceSets.main
|
||||
}
|
||||
server = {
|
||||
workingDirectory = project.file("run").canonicalPath
|
||||
source sourceSets.main
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
processResources {
|
||||
from(sourceSets.main.resources.srcDirs) {
|
||||
include '**/*.info'
|
||||
include '**/*.properties'
|
||||
|
||||
// replaces
|
||||
expand ([
|
||||
'modid': project.archivesBaseName,
|
||||
'mod_version': project.config.mod_version,
|
||||
'minecraft_version': project.config.minecraft_version,
|
||||
'build_number': project.config.build_number
|
||||
])
|
||||
}
|
||||
|
||||
from(sourceSets.main.resources.srcDirs) {
|
||||
exclude '**/*.info'
|
||||
exclude '**/*.properties'
|
||||
from (sourceSets.main.resources.srcDirs) {
|
||||
include 'META-INF/mods.toml'
|
||||
expand 'version': project.version
|
||||
}
|
||||
}
|
||||
|
||||
import net.minecraftforge.gradle.tasks.JenkinsChangelog
|
||||
import net.minecraftforge.gradle.common.Constants
|
||||
|
||||
task changelog(type: JenkinsChangelog) {
|
||||
def buildNumber = "${System.getenv().BUILD_NUMBER}"
|
||||
|
||||
serverRoot = 'http://ci.jenkins.minecraftforge.net/'
|
||||
jobName = 'BiomesOPlenty'
|
||||
authName = 'console_script';
|
||||
authPassword = 'dc6d48ca20a474beeac280a9a16a926e';
|
||||
targetBuild = buildNumber.toString();
|
||||
output = 'build/libs/' + project.getName() + '-' + project.version + '-changelog.txt';
|
||||
jar {
|
||||
classifier = 'universal'
|
||||
}
|
||||
|
||||
tasks.build.dependsOn('changelog')
|
||||
dependencies {
|
||||
minecraft 'net.minecraftforge:forge:' + minecraft_version + '-' + forge_version
|
||||
}
|
||||
|
||||
task sourcesJar(type: Jar) {
|
||||
from sourceSets.main.allJava
|
||||
|
@ -106,78 +78,64 @@ task sourcesJar(type: Jar) {
|
|||
|
||||
task deobfJar(type: Jar) {
|
||||
from sourceSets.main.output
|
||||
|
||||
manifest commonManifest
|
||||
classifier = 'deobf'
|
||||
}
|
||||
|
||||
task apiJar(type: Jar) {
|
||||
from(sourceSets.main.allJava) {
|
||||
include 'biomesoplenty/api/**'
|
||||
}
|
||||
from (sourceSets.main.output) {
|
||||
from(sourceSets.main.allJava) {
|
||||
include 'biomesoplenty/api/**'
|
||||
}
|
||||
from (sourceSets.main.output) {
|
||||
include 'LICENSE.txt'
|
||||
include 'biomesoplenty/api/**'
|
||||
}
|
||||
|
||||
classifier = 'api'
|
||||
classifier = 'api'
|
||||
}
|
||||
|
||||
task listOutputs << {
|
||||
//This is needed by the Groovy Postbuild to append labels for each build used in the changelog.
|
||||
println "Output files:"
|
||||
println "--------------------"
|
||||
def list = []
|
||||
|
||||
def dir = new File("build/libs/")
|
||||
|
||||
if (dir.exists()) {
|
||||
dir.eachFileRecurse (FileType.FILES) { file ->
|
||||
//Add each file to the list
|
||||
list << file
|
||||
}
|
||||
|
||||
//Print the names of all of the output files
|
||||
list.each {
|
||||
println it.getName()
|
||||
}
|
||||
}
|
||||
println "--------------------"
|
||||
}
|
||||
|
||||
tasks.build.finalizedBy('listOutputs')
|
||||
|
||||
artifacts {
|
||||
archives changelog.output
|
||||
archives sourcesJar
|
||||
archives deobfJar
|
||||
archives apiJar
|
||||
}
|
||||
def changelog_file = rootProject.file("build/BiomesOPlenty-${version}-changelog.txt")
|
||||
|
||||
curseforge {
|
||||
apiKey = "$System.env.curse_api_key"
|
||||
project {
|
||||
id = '220318'
|
||||
changelog = file('build/libs/' + project.getName() + '-' + project.version + '-changelog.txt');
|
||||
releaseType = 'beta'
|
||||
|
||||
addGameVersion '1.10'
|
||||
addGameVersion '1.10.2'
|
||||
if (project.hasProperty('curseApiKey')) {
|
||||
apiKey = project.getProperty('curseApiKey')
|
||||
project {
|
||||
id = '220318'
|
||||
|
||||
if (changelog_file.exists()) {
|
||||
changelog = changelog_file
|
||||
}
|
||||
|
||||
releaseType = 'beta'
|
||||
|
||||
mainArtifact(jar) {
|
||||
displayName = "Biomes O' Plenty ${version}"
|
||||
}
|
||||
addArtifact sourcesJar
|
||||
addArtifact deobfJar
|
||||
addArtifact apiJar
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
import groovy.io.FileType
|
||||
artifacts {
|
||||
if (changelog_file.exists()) {
|
||||
archives changelog_file
|
||||
}
|
||||
archives jar
|
||||
archives sourcesJar
|
||||
archives deobfJar
|
||||
archives apiJar
|
||||
}
|
||||
|
||||
uploadArchives {
|
||||
repositories {
|
||||
mavenDeployer {
|
||||
if (project.hasProperty('forgeMavenPassword'))
|
||||
{
|
||||
repository(url: "http://files.minecraftforge.net/maven/manage/upload") {
|
||||
if (project.hasProperty('forgeMavenPassword')) {
|
||||
repository(url: "https://files.minecraftforge.net/maven/manage/upload") {
|
||||
authentication(userName: project.getProperty('forgeMavenUsername'), password: project.getProperty('forgeMavenPassword'))
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
// local repo folder. Might wanna juset use gradle install if you wanans end it to maven-local
|
||||
repository(url: 'file://localhost/' + project.file('repo').getAbsolutePath())
|
||||
}
|
||||
|
@ -217,21 +175,11 @@ uploadArchives {
|
|||
name 'Adubbz'
|
||||
roles { role 'developer' }
|
||||
}
|
||||
developer {
|
||||
id 'Amnet'
|
||||
name 'Amnet'
|
||||
roles { role 'developer' }
|
||||
}
|
||||
developer {
|
||||
id 'Forstride'
|
||||
name 'Forstride'
|
||||
roles { role 'developer' }
|
||||
}
|
||||
developer {
|
||||
id 'ted80'
|
||||
name 'ted80'
|
||||
roles { role 'developer' }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
minecraft_version=1.9.4
|
||||
forge_version=12.17.0.1968
|
||||
mod_version=4.1.0
|
||||
mappings_version=snapshot_nodoc_20160519
|
|
@ -0,0 +1,12 @@
|
|||
# Sets default memory used for gradle commands. Can be overridden by user or command line properties.
|
||||
# This is required to provide enough memory for the Minecraft decompilation process.
|
||||
org.gradle.jvmargs=-Xmx3G
|
||||
org.gradle.daemon=false
|
||||
|
||||
mod_version=13.1.0
|
||||
|
||||
minecraft_version=1.16.5
|
||||
minecraft_version_toml=16
|
||||
forge_version=36.1.0
|
||||
forge_version_toml=36
|
||||
forge_group=net.minecraftforge
|
Binary file not shown.
|
@ -1,6 +1,5 @@
|
|||
#Tue Dec 15 20:33:12 AEDT 2015
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.9-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-bin.zip
|
||||
|
|
|
@ -6,47 +6,6 @@
|
|||
##
|
||||
##############################################################################
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS=""
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
|
||||
warn ( ) {
|
||||
echo "$*"
|
||||
}
|
||||
|
||||
die ( ) {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
;;
|
||||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
esac
|
||||
|
||||
# For Cygwin, ensure paths are in UNIX format before anything is touched.
|
||||
if $cygwin ; then
|
||||
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
|
||||
fi
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
# Resolve links: $0 may be a link
|
||||
PRG="$0"
|
||||
|
@ -61,9 +20,49 @@ while [ -h "$PRG" ] ; do
|
|||
fi
|
||||
done
|
||||
SAVED="`pwd`"
|
||||
cd "`dirname \"$PRG\"`/" >&-
|
||||
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||
APP_HOME="`pwd -P`"
|
||||
cd "$SAVED" >&-
|
||||
cd "$SAVED" >/dev/null
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
}
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
;;
|
||||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
NONSTOP* )
|
||||
nonstop=true
|
||||
;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
|
@ -90,7 +89,7 @@ location of your Java installation."
|
|||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
||||
MAX_FD_LIMIT=`ulimit -H -n`
|
||||
if [ $? -eq 0 ] ; then
|
||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||
|
@ -114,6 +113,7 @@ fi
|
|||
if $cygwin ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||
|
||||
# We build the pattern for arguments to be converted via cygpath
|
||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||
|
@ -154,11 +154,19 @@ if $cygwin ; then
|
|||
esac
|
||||
fi
|
||||
|
||||
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
|
||||
function splitJvmOpts() {
|
||||
JVM_OPTS=("$@")
|
||||
# Escape application args
|
||||
save () {
|
||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||
echo " "
|
||||
}
|
||||
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
|
||||
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
|
||||
APP_ARGS=$(save "$@")
|
||||
|
||||
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
|
||||
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||
|
||||
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
|
||||
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
|
||||
cd "$(dirname "$0")"
|
||||
fi
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
|
|
|
@ -1,90 +1,90 @@
|
|||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS=
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:init
|
||||
@rem Get command-line arguments, handling Windowz variants
|
||||
|
||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||
if "%@eval[2+2]" == "4" goto 4NT_args
|
||||
|
||||
:win9xME_args
|
||||
@rem Slurp the command line arguments.
|
||||
set CMD_LINE_ARGS=
|
||||
set _SKIP=2
|
||||
|
||||
:win9xME_args_slurp
|
||||
if "x%~1" == "x" goto execute
|
||||
|
||||
set CMD_LINE_ARGS=%*
|
||||
goto execute
|
||||
|
||||
:4NT_args
|
||||
@rem Get arguments from the 4NT Shell from JP Software
|
||||
set CMD_LINE_ARGS=%$
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS=
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:init
|
||||
@rem Get command-line arguments, handling Windowz variants
|
||||
|
||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||
if "%@eval[2+2]" == "4" goto 4NT_args
|
||||
|
||||
:win9xME_args
|
||||
@rem Slurp the command line arguments.
|
||||
set CMD_LINE_ARGS=
|
||||
set _SKIP=2
|
||||
|
||||
:win9xME_args_slurp
|
||||
if "x%~1" == "x" goto execute
|
||||
|
||||
set CMD_LINE_ARGS=%*
|
||||
goto execute
|
||||
|
||||
:4NT_args
|
||||
@rem Get arguments from the 4NT Shell from JP Software
|
||||
set CMD_LINE_ARGS=%$
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
|
|
|
@ -1,37 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2016, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
package biomesoplenty.api.achievement;
|
||||
|
||||
import net.minecraft.stats.Achievement;
|
||||
|
||||
public class BOPAchievements
|
||||
{
|
||||
public static Achievement obtain_flowers;
|
||||
public static Achievement obtain_berry;
|
||||
public static Achievement obtain_coral;
|
||||
public static Achievement obtain_miners_delight;
|
||||
public static Achievement obtain_wilted_lily;
|
||||
public static Achievement eat_shroom_powder;
|
||||
public static Achievement obtain_thorn;
|
||||
public static Achievement craft_poison_jar;
|
||||
public static Achievement craft_flax_string;
|
||||
public static Achievement craft_muddy_pickaxe;
|
||||
public static Achievement obtain_deathbloom;
|
||||
public static Achievement obtain_turnip;
|
||||
public static Achievement grow_sacred_oak;
|
||||
public static Achievement obtain_honeycomb;
|
||||
public static Achievement obtain_pixie_dust;
|
||||
public static Achievement obtain_soul;
|
||||
public static Achievement obtain_celestial_crystal;
|
||||
public static Achievement craft_terrestrial_artifact;
|
||||
public static Achievement craft_ambrosia;
|
||||
public static Achievement explore_all_biomes;
|
||||
public static Achievement use_enderporter;
|
||||
public static Achievement use_biome_finder;
|
||||
|
||||
}
|
|
@ -1,146 +1,104 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2015-2016, the Biomes O' Plenty Team
|
||||
*
|
||||
* Copyright 2014-2019, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
|
||||
package biomesoplenty.api.biome;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import net.minecraft.world.WorldType;
|
||||
import biomesoplenty.core.BiomesOPlenty;
|
||||
import net.minecraft.util.RegistryKey;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
|
||||
public class BOPBiomes
|
||||
{
|
||||
public static final IBiomeRegistry REG_INSTANCE = createRegistry();
|
||||
|
||||
/**A list of world types where BoP biome decoration does not occur**/
|
||||
public static List<WorldType> excludedDecoratedWorldTypes = Lists.newArrayList();
|
||||
|
||||
// normal biomes which have weights
|
||||
public static Optional<Biome> alps = Optional.absent();
|
||||
public static Optional<Biome> bamboo_forest = Optional.absent();
|
||||
public static Optional<Biome> bayou = Optional.absent();
|
||||
public static Optional<Biome> bog = Optional.absent();
|
||||
public static Optional<Biome> boreal_forest = Optional.absent();
|
||||
public static Optional<Biome> brushland = Optional.absent();
|
||||
public static Optional<Biome> chaparral = Optional.absent();
|
||||
public static Optional<Biome> cherry_blossom_grove = Optional.absent();
|
||||
public static Optional<Biome> cold_desert = Optional.absent();
|
||||
public static Optional<Biome> coniferous_forest = Optional.absent();
|
||||
public static Optional<Biome> crag = Optional.absent();
|
||||
public static Optional<Biome> dead_forest = Optional.absent();
|
||||
public static Optional<Biome> dead_swamp = Optional.absent();
|
||||
public static Optional<Biome> eucalyptus_forest = Optional.absent();
|
||||
public static Optional<Biome> fen = Optional.absent();
|
||||
public static Optional<Biome> flower_field = Optional.absent();
|
||||
public static Optional<Biome> grassland = Optional.absent();
|
||||
public static Optional<Biome> grove = Optional.absent();
|
||||
public static Optional<Biome> heathland = Optional.absent();
|
||||
public static Optional<Biome> highland = Optional.absent();
|
||||
public static Optional<Biome> land_of_lakes = Optional.absent();
|
||||
public static Optional<Biome> lavender_fields = Optional.absent();
|
||||
public static Optional<Biome> lush_desert = Optional.absent();
|
||||
public static Optional<Biome> lush_swamp = Optional.absent();
|
||||
public static Optional<Biome> maple_woods = Optional.absent();
|
||||
public static Optional<Biome> marsh = Optional.absent();
|
||||
public static Optional<Biome> meadow = Optional.absent();
|
||||
public static Optional<Biome> moor = Optional.absent();
|
||||
public static Optional<Biome> mountain = Optional.absent();
|
||||
public static Optional<Biome> mystic_grove = Optional.absent();
|
||||
public static Optional<Biome> ominous_woods = Optional.absent();
|
||||
public static Optional<Biome> orchard = Optional.absent();
|
||||
public static Optional<Biome> outback = Optional.absent();
|
||||
public static Optional<Biome> overgrown_cliffs = Optional.absent();
|
||||
public static Optional<Biome> prairie = Optional.absent();
|
||||
public static Optional<Biome> quagmire = Optional.absent();
|
||||
public static Optional<Biome> rainforest = Optional.absent();
|
||||
public static Optional<Biome> redwood_forest = Optional.absent();
|
||||
public static Optional<Biome> sacred_springs = Optional.absent();
|
||||
public static Optional<Biome> seasonal_forest = Optional.absent();
|
||||
public static Optional<Biome> shield = Optional.absent();
|
||||
public static Optional<Biome> shrubland = Optional.absent();
|
||||
public static Optional<Biome> snowy_coniferous_forest = Optional.absent();
|
||||
public static Optional<Biome> snowy_forest = Optional.absent();
|
||||
public static Optional<Biome> steppe = Optional.absent();
|
||||
public static Optional<Biome> temperate_rainforest = Optional.absent();
|
||||
public static Optional<Biome> tropical_rainforest = Optional.absent();
|
||||
public static Optional<Biome> tundra = Optional.absent();
|
||||
public static Optional<Biome> wasteland = Optional.absent();
|
||||
public static Optional<Biome> wetland = Optional.absent();
|
||||
public static Optional<Biome> woodland = Optional.absent();
|
||||
public static Optional<Biome> xeric_shrubland = Optional.absent();
|
||||
|
||||
// edge-biomes, sub-biomes and mutated-biomes
|
||||
public static Optional<Biome> mountain_foothills = Optional.absent();
|
||||
public static Optional<Biome> glacier = Optional.absent();
|
||||
public static Optional<Biome> oasis = Optional.absent();
|
||||
public static Optional<Biome> coral_reef = Optional.absent();
|
||||
public static Optional<Biome> kelp_forest = Optional.absent();
|
||||
public static Optional<Biome> mangrove = Optional.absent();
|
||||
public static Optional<Biome> origin_island = Optional.absent();
|
||||
public static Optional<Biome> tropical_island = Optional.absent();
|
||||
public static Optional<Biome> volcanic_island = Optional.absent();
|
||||
public static Optional<Biome> flower_island = Optional.absent();
|
||||
public static Optional<Biome> gravel_beach = Optional.absent();
|
||||
public static RegistryKey<Biome> alps = register("alps");
|
||||
public static RegistryKey<Biome> alps_foothills = register("alps_foothills");
|
||||
public static RegistryKey<Biome> bamboo_blossom_grove = register("bamboo_blossom_grove");
|
||||
public static RegistryKey<Biome> bayou = register("bayou");
|
||||
public static RegistryKey<Biome> bayou_mangrove = register("bayou_mangrove");
|
||||
public static RegistryKey<Biome> burnt_forest = register("burnt_forest");
|
||||
public static RegistryKey<Biome> cherry_blossom_grove = register("cherry_blossom_grove");
|
||||
public static RegistryKey<Biome> cold_desert = register("cold_desert");
|
||||
public static RegistryKey<Biome> coniferous_forest = register("coniferous_forest");
|
||||
public static RegistryKey<Biome> coniferous_lakes = register("coniferous_lakes");
|
||||
public static RegistryKey<Biome> dead_forest = register("dead_forest");
|
||||
public static RegistryKey<Biome> deep_bayou = register("deep_bayou");
|
||||
public static RegistryKey<Biome> dense_marsh = register("dense_marsh");
|
||||
public static RegistryKey<Biome> dense_woodland = register("dense_woodland");
|
||||
public static RegistryKey<Biome> dryland = register("dryland");
|
||||
public static RegistryKey<Biome> dry_boneyard = register("dry_boneyard");
|
||||
public static RegistryKey<Biome> fir_clearing = register("fir_clearing");
|
||||
public static RegistryKey<Biome> flower_meadow = register("flower_meadow");
|
||||
public static RegistryKey<Biome> fungal_field = register("fungal_field");
|
||||
public static RegistryKey<Biome> fungal_jungle = register("fungal_jungle");
|
||||
public static RegistryKey<Biome> golden_prairie = register("golden_prairie");
|
||||
public static RegistryKey<Biome> grassland = register("grassland");
|
||||
public static RegistryKey<Biome> grassland_clover_patch = register("grassland_clover_patch");
|
||||
public static RegistryKey<Biome> gravel_beach = register("gravel_beach");
|
||||
public static RegistryKey<Biome> grove = register("grove");
|
||||
public static RegistryKey<Biome> grove_clearing = register("grove_clearing");
|
||||
public static RegistryKey<Biome> grove_lakes = register("grove_lakes");
|
||||
public static RegistryKey<Biome> highland = register("highland");
|
||||
public static RegistryKey<Biome> highland_crag = register("highland_crag");
|
||||
public static RegistryKey<Biome> highland_moor = register("highland_moor");
|
||||
public static RegistryKey<Biome> jade_cliffs = register("jade_cliffs");
|
||||
public static RegistryKey<Biome> lavender_field = register("lavender_field");
|
||||
public static RegistryKey<Biome> lavender_forest = register("lavender_forest");
|
||||
public static RegistryKey<Biome> lush_desert = register("lush_desert");
|
||||
public static RegistryKey<Biome> lush_savanna = register("lush_savanna");
|
||||
public static RegistryKey<Biome> marsh = register("marsh");
|
||||
public static RegistryKey<Biome> meadow = register("meadow");
|
||||
public static RegistryKey<Biome> meadow_forest = register("meadow_forest");
|
||||
public static RegistryKey<Biome> muskeg = register("muskeg");
|
||||
public static RegistryKey<Biome> mystic_grove = register("mystic_grove");
|
||||
public static RegistryKey<Biome> mystic_plains = register("mystic_plains");
|
||||
public static RegistryKey<Biome> ominous_woods = register("ominous_woods");
|
||||
public static RegistryKey<Biome> ominous_mire = register("ominous_mire");
|
||||
public static RegistryKey<Biome> orchard = register("orchard");
|
||||
public static RegistryKey<Biome> origin_valley = register("origin_valley");
|
||||
public static RegistryKey<Biome> prairie = register("prairie");
|
||||
public static RegistryKey<Biome> rainbow_hills = register("rainbow_hills");
|
||||
public static RegistryKey<Biome> rainforest = register("rainforest");
|
||||
public static RegistryKey<Biome> rainforest_cliffs = register("rainforest_cliffs");
|
||||
public static RegistryKey<Biome> rainforest_floodplain = register("rainforest_floodplain");
|
||||
public static RegistryKey<Biome> redwood_forest = register("redwood_forest");
|
||||
public static RegistryKey<Biome> redwood_forest_edge = register("redwood_forest_edge");
|
||||
public static RegistryKey<Biome> redwood_hills = register("redwood_hills");
|
||||
public static RegistryKey<Biome> scrubland = register("scrubland");
|
||||
public static RegistryKey<Biome> seasonal_forest = register("seasonal_forest");
|
||||
public static RegistryKey<Biome> seasonal_orchard = register("seasonal_orchard");
|
||||
public static RegistryKey<Biome> seasonal_pumpkin_patch = register("seasonal_pumpkin_patch");
|
||||
public static RegistryKey<Biome> shroomy_wetland = register("shroomy_wetland");
|
||||
public static RegistryKey<Biome> shrubland = register("shrubland");
|
||||
public static RegistryKey<Biome> shrubland_hills = register("shrubland_hills");
|
||||
public static RegistryKey<Biome> snowy_coniferous_forest = register("snowy_coniferous_forest");
|
||||
public static RegistryKey<Biome> snowy_fir_clearing = register("snowy_fir_clearing");
|
||||
public static RegistryKey<Biome> snowy_maple_forest = register("snowy_maple_forest");
|
||||
public static RegistryKey<Biome> tall_dead_forest = register("tall_dead_forest");
|
||||
public static RegistryKey<Biome> tropic_beach = register("tropic_beach");
|
||||
public static RegistryKey<Biome> tropics = register("tropics");
|
||||
public static RegistryKey<Biome> tundra = register("tundra");
|
||||
public static RegistryKey<Biome> tundra_basin = register("tundra_basin");
|
||||
public static RegistryKey<Biome> tundra_bog = register("tundra_bog");
|
||||
public static RegistryKey<Biome> volcanic_plains = register("volcanic_plains");
|
||||
public static RegistryKey<Biome> volcano = register("volcano");
|
||||
public static RegistryKey<Biome> wasteland = register("wasteland");
|
||||
public static RegistryKey<Biome> wetland = register("wetland");
|
||||
public static RegistryKey<Biome> wetland_forest = register("wetland_forest");
|
||||
public static RegistryKey<Biome> wooded_scrubland = register("wooded_scrubland");
|
||||
public static RegistryKey<Biome> woodland = register("woodland");
|
||||
|
||||
//Biome extensions
|
||||
public static IExtendedBiome end_extension;
|
||||
public static IExtendedBiome mushroom_island_extension;
|
||||
public static IExtendedBiome plains_extension;
|
||||
public static IExtendedBiome forest_extension;
|
||||
public static IExtendedBiome forest_hills_extension;
|
||||
public static IExtendedBiome jungle_extension;
|
||||
public static IExtendedBiome jungle_hills_extension;
|
||||
public static IExtendedBiome desert_extension;
|
||||
public static IExtendedBiome desert_hills_extension;
|
||||
public static IExtendedBiome taiga_extension;
|
||||
public static IExtendedBiome taiga_hills_extension;
|
||||
public static IExtendedBiome mesa_extension;
|
||||
public static IExtendedBiome mesa_plateau_extension;
|
||||
public static IExtendedBiome ice_plains_extension;
|
||||
public static IExtendedBiome ice_mountains_extension;
|
||||
public static IExtendedBiome extreme_hills_extension;
|
||||
public static IExtendedBiome extreme_hills_plus_extension;
|
||||
public static IExtendedBiome swampland_extension;
|
||||
public static IExtendedBiome birch_forest_extension;
|
||||
public static IExtendedBiome birch_forest_hills_extension;
|
||||
public static IExtendedBiome roofed_forest_extension;
|
||||
public static IExtendedBiome savanna_extension;
|
||||
public static IExtendedBiome savanna_plateau_extension;
|
||||
public static IExtendedBiome ocean_extension;
|
||||
public static IExtendedBiome cold_taiga_extension;
|
||||
public static IExtendedBiome cold_taiga_hills_extension;
|
||||
public static IExtendedBiome mega_taiga_extension;
|
||||
public static IExtendedBiome mega_taiga_hills_extension;
|
||||
|
||||
private static IBiomeRegistry createRegistry()
|
||||
public static RegistryKey<Biome> crystalline_chasm = register("crystalline_chasm");
|
||||
public static RegistryKey<Biome> undergrowth = register("undergrowth");
|
||||
public static RegistryKey<Biome> visceral_heap = register("visceral_heap");
|
||||
public static RegistryKey<Biome> withered_abyss = register("withered_abyss");
|
||||
|
||||
private static RegistryKey<Biome> register(String name)
|
||||
{
|
||||
IBiomeRegistry instance = null;
|
||||
|
||||
try
|
||||
{
|
||||
instance = (IBiomeRegistry)Class.forName("biomesoplenty.common.init.ModBiomes").newInstance();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
return instance;
|
||||
}
|
||||
|
||||
public static interface IBiomeRegistry
|
||||
{
|
||||
public IExtendedBiome registerBiome(IExtendedBiome biome, String idName);
|
||||
public IExtendedBiome getExtendedBiome(Biome biome);
|
||||
public ImmutableSet<Biome> getPresentBiomes();
|
||||
return RegistryKey.create(Registry.BIOME_REGISTRY, new ResourceLocation(BiomesOPlenty.MOD_ID, name));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2014-2016, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
|
||||
package biomesoplenty.api.biome;
|
||||
|
||||
public enum BiomeOwner
|
||||
{
|
||||
BIOMESOPLENTY, OTHER;
|
||||
}
|
|
@ -1,39 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2014-2016, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
|
||||
package biomesoplenty.api.biome;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import biomesoplenty.api.config.IBOPWorldSettings;
|
||||
import biomesoplenty.api.config.IConfigObj;
|
||||
import biomesoplenty.api.enums.BOPClimates;
|
||||
import biomesoplenty.api.generation.GeneratorStage;
|
||||
import biomesoplenty.api.generation.IGenerationManager;
|
||||
import biomesoplenty.api.generation.IGenerator;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
|
||||
public interface IExtendedBiome
|
||||
{
|
||||
public void applySettings(IBOPWorldSettings settings);
|
||||
public void configure(IConfigObj conf);
|
||||
|
||||
public BiomeOwner getBiomeOwner();
|
||||
public void addGenerator(String name, GeneratorStage stage, IGenerator generator);
|
||||
public IGenerationManager getGenerationManager();
|
||||
public Map<BOPClimates, Integer> getWeightMap();
|
||||
public void clearWeights();
|
||||
public void addWeight(BOPClimates climate, int weight);
|
||||
|
||||
public ResourceLocation getBeachLocation();
|
||||
|
||||
/**Get the base biome associated with this extension**/
|
||||
public Biome getBaseBiome();
|
||||
public ResourceLocation getResourceLocation();
|
||||
}
|
|
@ -1,158 +1,346 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2014-2016, the Biomes O' Plenty Team
|
||||
*
|
||||
* Copyright 2014-2019, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
|
||||
package biomesoplenty.api.block;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraftforge.fluids.Fluid;
|
||||
|
||||
public class BOPBlocks
|
||||
{
|
||||
public static Block bamboo_thatching;
|
||||
public static Block ash_block;
|
||||
public static Block bamboo;
|
||||
public static Block coral;
|
||||
public static Block seaweed;
|
||||
public static Block gem_block;
|
||||
public static Block gem_ore;
|
||||
public static Block hive;
|
||||
public static Block mushroom;
|
||||
public static Block stone;
|
||||
public static Block biome_block;
|
||||
|
||||
public static Block flower_0;
|
||||
public static Block flower_1;
|
||||
public static Block log_0;
|
||||
public static Block log_1;
|
||||
public static Block log_2;
|
||||
public static Block log_3;
|
||||
public static Block log_4;
|
||||
public static Block leaves_0;
|
||||
public static Block leaves_1;
|
||||
public static Block leaves_2;
|
||||
public static Block leaves_3;
|
||||
public static Block leaves_4;
|
||||
public static Block leaves_5;
|
||||
public static Block leaves_6;
|
||||
public static Block sapling_0;
|
||||
public static Block sapling_1;
|
||||
public static Block sapling_2;
|
||||
// TODO fruit tree leaves and saplings
|
||||
public static Block planks_0;
|
||||
public static Block wood_slab_0;
|
||||
public static Block wood_slab_1;
|
||||
public static Block double_wood_slab_0;
|
||||
public static Block double_wood_slab_1;
|
||||
public static Block sacred_oak_stairs;
|
||||
public static Block cherry_stairs;
|
||||
public static Block umbran_stairs;
|
||||
public static Block fir_stairs;
|
||||
public static Block ethereal_stairs;
|
||||
public static Block magic_stairs;
|
||||
public static Block mangrove_stairs;
|
||||
public static Block palm_stairs;
|
||||
public static Block redwood_stairs;
|
||||
public static Block willow_stairs;
|
||||
public static Block pine_stairs;
|
||||
public static Block hellbark_stairs;
|
||||
public static Block jacaranda_stairs;
|
||||
public static Block mahogany_stairs;
|
||||
public static Block ebony_stairs;
|
||||
public static Block eucalyptus_stairs;
|
||||
public static Block sacred_oak_fence;
|
||||
public static Block cherry_fence;
|
||||
public static Block umbran_fence;
|
||||
public static Block fir_fence;
|
||||
public static Block ethereal_fence;
|
||||
public static Block magic_fence;
|
||||
public static Block mangrove_fence;
|
||||
public static Block palm_fence;
|
||||
public static Block redwood_fence;
|
||||
public static Block willow_fence;
|
||||
public static Block pine_fence;
|
||||
public static Block hellbark_fence;
|
||||
public static Block jacaranda_fence;
|
||||
public static Block mahogany_fence;
|
||||
public static Block ebony_fence;
|
||||
public static Block eucalyptus_fence;
|
||||
public static Block sacred_oak_fence_gate;
|
||||
public static Block cherry_fence_gate;
|
||||
public static Block umbran_fence_gate;
|
||||
public static Block fir_fence_gate;
|
||||
public static Block ethereal_fence_gate;
|
||||
public static Block magic_fence_gate;
|
||||
public static Block mangrove_fence_gate;
|
||||
public static Block palm_fence_gate;
|
||||
public static Block redwood_fence_gate;
|
||||
public static Block willow_fence_gate;
|
||||
public static Block pine_fence_gate;
|
||||
public static Block hellbark_fence_gate;
|
||||
public static Block jacaranda_fence_gate;
|
||||
public static Block mahogany_fence_gate;
|
||||
public static Block ebony_fence_gate;
|
||||
public static Block eucalyptus_fence_gate;
|
||||
public static Block sacred_oak_door;
|
||||
public static Block cherry_door;
|
||||
public static Block umbran_door;
|
||||
public static Block fir_door;
|
||||
public static Block ethereal_door;
|
||||
public static Block magic_door;
|
||||
public static Block mangrove_door;
|
||||
public static Block palm_door;
|
||||
public static Block redwood_door;
|
||||
public static Block willow_door;
|
||||
public static Block pine_door;
|
||||
public static Block hellbark_door;
|
||||
public static Block jacaranda_door;
|
||||
public static Block mahogany_door;
|
||||
public static Block ebony_door;
|
||||
public static Block eucalyptus_door;
|
||||
public static Block white_sand;
|
||||
public static Block white_sandstone;
|
||||
public static Block cut_white_sandstone;
|
||||
public static Block cut_white_sandstone_slab;
|
||||
public static Block chiseled_white_sandstone;
|
||||
public static Block smooth_white_sandstone;
|
||||
public static Block smooth_white_sandstone_slab;
|
||||
public static Block smooth_white_sandstone_stairs;
|
||||
public static Block white_sandstone_slab;
|
||||
public static Block white_sandstone_stairs;
|
||||
public static Block white_sandstone_wall;
|
||||
|
||||
public static Block orange_sand;
|
||||
public static Block orange_sandstone;
|
||||
public static Block cut_orange_sandstone;
|
||||
public static Block cut_orange_sandstone_slab;
|
||||
public static Block chiseled_orange_sandstone;
|
||||
public static Block smooth_orange_sandstone;
|
||||
public static Block smooth_orange_sandstone_slab;
|
||||
public static Block smooth_orange_sandstone_stairs;
|
||||
public static Block orange_sandstone_slab;
|
||||
public static Block orange_sandstone_stairs;
|
||||
public static Block orange_sandstone_wall;
|
||||
|
||||
public static Block black_sand;
|
||||
public static Block black_sandstone;
|
||||
public static Block cut_black_sandstone;
|
||||
public static Block cut_black_sandstone_slab;
|
||||
public static Block chiseled_black_sandstone;
|
||||
public static Block smooth_black_sandstone;
|
||||
public static Block smooth_black_sandstone_slab;
|
||||
public static Block smooth_black_sandstone_stairs;
|
||||
public static Block black_sandstone_slab;
|
||||
public static Block black_sandstone_stairs;
|
||||
public static Block black_sandstone_wall;
|
||||
|
||||
public static Block mud;
|
||||
public static Block turnip_block;
|
||||
public static Block flesh;
|
||||
public static Block grass;
|
||||
public static Block grass_path;
|
||||
public static Block waterlily;
|
||||
public static Block dirt;
|
||||
public static Block farmland_0;
|
||||
public static Block farmland_1;
|
||||
public static Block stone_formations;
|
||||
public static Block hard_ice;
|
||||
public static Block dried_sand;
|
||||
public static Block crag_rock;
|
||||
public static Block mud_brick_block;
|
||||
public static Block crystal;
|
||||
public static Block other_slab;
|
||||
public static Block double_other_slab;
|
||||
|
||||
public static Block mud_bricks;
|
||||
public static Block mud_brick_slab;
|
||||
public static Block mud_brick_stairs;
|
||||
public static Block mud_brick_wall;
|
||||
|
||||
public static Block origin_grass_block;
|
||||
public static Block dried_salt;
|
||||
public static Block flesh;
|
||||
public static Block nether_crystal_block;
|
||||
public static Block nether_crystal;
|
||||
|
||||
public static Block toadstool_block;
|
||||
public static Block glowshroom_block;
|
||||
|
||||
public static Block flower_vine;
|
||||
public static Block ivy;
|
||||
public static Block tree_moss;
|
||||
public static Block origin_sapling;
|
||||
public static Block origin_leaves;
|
||||
public static Block flowering_oak_sapling;
|
||||
public static Block flowering_oak_leaves;
|
||||
public static Block rainbow_birch_sapling;
|
||||
public static Block rainbow_birch_leaves;
|
||||
public static Block yellow_autumn_sapling;
|
||||
public static Block yellow_autumn_leaves;
|
||||
public static Block orange_autumn_sapling;
|
||||
public static Block orange_autumn_leaves;
|
||||
public static Block maple_sapling;
|
||||
public static Block maple_leaves;
|
||||
|
||||
public static Block plant_0;
|
||||
public static Block plant_1;
|
||||
public static Block double_plant;
|
||||
public static Block fir_sapling;
|
||||
public static Block fir_leaves;
|
||||
public static Block fir_log;
|
||||
public static Block stripped_fir_log;
|
||||
public static Block fir_wood;
|
||||
public static Block stripped_fir_wood;
|
||||
public static Block fir_planks;
|
||||
public static Block fir_slab;
|
||||
public static Block fir_stairs;
|
||||
public static Block fir_fence;
|
||||
public static Block fir_fence_gate;
|
||||
public static Block fir_door;
|
||||
public static Block fir_trapdoor;
|
||||
public static Block fir_pressure_plate;
|
||||
public static Block fir_button;
|
||||
public static Block fir_sign;
|
||||
public static Block fir_wall_sign;
|
||||
|
||||
public static Block honey_block;
|
||||
public static Block jelled_poison;
|
||||
public static Block terrarium;
|
||||
public static Block redwood_sapling;
|
||||
public static Block redwood_leaves;
|
||||
public static Block redwood_log;
|
||||
public static Block stripped_redwood_log;
|
||||
public static Block redwood_wood;
|
||||
public static Block stripped_redwood_wood;
|
||||
public static Block redwood_planks;
|
||||
public static Block redwood_slab;
|
||||
public static Block redwood_stairs;
|
||||
public static Block redwood_fence;
|
||||
public static Block redwood_fence_gate;
|
||||
public static Block redwood_door;
|
||||
public static Block redwood_trapdoor;
|
||||
public static Block redwood_pressure_plate;
|
||||
public static Block redwood_button;
|
||||
public static Block redwood_sign;
|
||||
public static Block redwood_wall_sign;
|
||||
|
||||
public static Block sand;
|
||||
public static Fluid sand_fluid;
|
||||
public static Block honey;
|
||||
public static Fluid honey_fluid;
|
||||
public static Block blood;
|
||||
public static Fluid blood_fluid;
|
||||
public static Block poison;
|
||||
public static Fluid poison_fluid;
|
||||
public static Block hot_spring_water;
|
||||
public static Fluid hot_spring_water_fluid;
|
||||
public static Block white_cherry_sapling;
|
||||
public static Block white_cherry_leaves;
|
||||
public static Block pink_cherry_sapling;
|
||||
public static Block pink_cherry_leaves;
|
||||
public static Block cherry_log;
|
||||
public static Block stripped_cherry_log;
|
||||
public static Block cherry_wood;
|
||||
public static Block stripped_cherry_wood;
|
||||
public static Block cherry_planks;
|
||||
public static Block cherry_slab;
|
||||
public static Block cherry_stairs;
|
||||
public static Block cherry_fence;
|
||||
public static Block cherry_fence_gate;
|
||||
public static Block cherry_door;
|
||||
public static Block cherry_trapdoor;
|
||||
public static Block cherry_pressure_plate;
|
||||
public static Block cherry_button;
|
||||
public static Block cherry_sign;
|
||||
public static Block cherry_wall_sign;
|
||||
|
||||
public static Block mahogany_sapling;
|
||||
public static Block mahogany_leaves;
|
||||
public static Block mahogany_log;
|
||||
public static Block stripped_mahogany_log;
|
||||
public static Block mahogany_wood;
|
||||
public static Block stripped_mahogany_wood;
|
||||
public static Block mahogany_planks;
|
||||
public static Block mahogany_slab;
|
||||
public static Block mahogany_stairs;
|
||||
public static Block mahogany_fence;
|
||||
public static Block mahogany_fence_gate;
|
||||
public static Block mahogany_door;
|
||||
public static Block mahogany_trapdoor;
|
||||
public static Block mahogany_pressure_plate;
|
||||
public static Block mahogany_button;
|
||||
public static Block mahogany_sign;
|
||||
public static Block mahogany_wall_sign;
|
||||
|
||||
public static Block jacaranda_sapling;
|
||||
public static Block jacaranda_leaves;
|
||||
public static Block jacaranda_log;
|
||||
public static Block stripped_jacaranda_log;
|
||||
public static Block jacaranda_wood;
|
||||
public static Block stripped_jacaranda_wood;
|
||||
public static Block jacaranda_planks;
|
||||
public static Block jacaranda_slab;
|
||||
public static Block jacaranda_stairs;
|
||||
public static Block jacaranda_fence;
|
||||
public static Block jacaranda_fence_gate;
|
||||
public static Block jacaranda_door;
|
||||
public static Block jacaranda_trapdoor;
|
||||
public static Block jacaranda_pressure_plate;
|
||||
public static Block jacaranda_button;
|
||||
public static Block jacaranda_sign;
|
||||
public static Block jacaranda_wall_sign;
|
||||
|
||||
public static Block palm_sapling;
|
||||
public static Block palm_leaves;
|
||||
public static Block palm_log;
|
||||
public static Block stripped_palm_log;
|
||||
public static Block palm_wood;
|
||||
public static Block stripped_palm_wood;
|
||||
public static Block palm_planks;
|
||||
public static Block palm_slab;
|
||||
public static Block palm_stairs;
|
||||
public static Block palm_fence;
|
||||
public static Block palm_fence_gate;
|
||||
public static Block palm_door;
|
||||
public static Block palm_trapdoor;
|
||||
public static Block palm_pressure_plate;
|
||||
public static Block palm_button;
|
||||
public static Block palm_sign;
|
||||
public static Block palm_wall_sign;
|
||||
|
||||
public static Block willow_sapling;
|
||||
public static Block willow_leaves;
|
||||
public static Block willow_log;
|
||||
public static Block stripped_willow_log;
|
||||
public static Block willow_wood;
|
||||
public static Block stripped_willow_wood;
|
||||
public static Block willow_planks;
|
||||
public static Block willow_slab;
|
||||
public static Block willow_stairs;
|
||||
public static Block willow_fence;
|
||||
public static Block willow_fence_gate;
|
||||
public static Block willow_door;
|
||||
public static Block willow_trapdoor;
|
||||
public static Block willow_pressure_plate;
|
||||
public static Block willow_button;
|
||||
public static Block willow_sign;
|
||||
public static Block willow_wall_sign;
|
||||
|
||||
public static Block dead_sapling;
|
||||
public static Block dead_leaves;
|
||||
public static Block dead_log;
|
||||
public static Block stripped_dead_log;
|
||||
public static Block dead_wood;
|
||||
public static Block stripped_dead_wood;
|
||||
public static Block dead_planks;
|
||||
public static Block dead_slab;
|
||||
public static Block dead_stairs;
|
||||
public static Block dead_fence;
|
||||
public static Block dead_fence_gate;
|
||||
public static Block dead_door;
|
||||
public static Block dead_trapdoor;
|
||||
public static Block dead_pressure_plate;
|
||||
public static Block dead_button;
|
||||
public static Block dead_sign;
|
||||
public static Block dead_wall_sign;
|
||||
|
||||
public static Block magic_sapling;
|
||||
public static Block magic_leaves;
|
||||
public static Block magic_log;
|
||||
public static Block stripped_magic_log;
|
||||
public static Block magic_wood;
|
||||
public static Block stripped_magic_wood;
|
||||
public static Block magic_planks;
|
||||
public static Block magic_slab;
|
||||
public static Block magic_stairs;
|
||||
public static Block magic_fence;
|
||||
public static Block magic_fence_gate;
|
||||
public static Block magic_door;
|
||||
public static Block magic_trapdoor;
|
||||
public static Block magic_pressure_plate;
|
||||
public static Block magic_button;
|
||||
public static Block magic_sign;
|
||||
public static Block magic_wall_sign;
|
||||
|
||||
public static Block umbran_sapling;
|
||||
public static Block umbran_leaves;
|
||||
public static Block umbran_log;
|
||||
public static Block stripped_umbran_log;
|
||||
public static Block umbran_wood;
|
||||
public static Block stripped_umbran_wood;
|
||||
public static Block umbran_planks;
|
||||
public static Block umbran_slab;
|
||||
public static Block umbran_stairs;
|
||||
public static Block umbran_fence;
|
||||
public static Block umbran_fence_gate;
|
||||
public static Block umbran_door;
|
||||
public static Block umbran_trapdoor;
|
||||
public static Block umbran_pressure_plate;
|
||||
public static Block umbran_button;
|
||||
public static Block umbran_sign;
|
||||
public static Block umbran_wall_sign;
|
||||
|
||||
public static Block hellbark_sapling;
|
||||
public static Block hellbark_leaves;
|
||||
public static Block hellbark_log;
|
||||
public static Block stripped_hellbark_log;
|
||||
public static Block hellbark_wood;
|
||||
public static Block stripped_hellbark_wood;
|
||||
public static Block hellbark_planks;
|
||||
public static Block hellbark_slab;
|
||||
public static Block hellbark_stairs;
|
||||
public static Block hellbark_fence;
|
||||
public static Block hellbark_fence_gate;
|
||||
public static Block hellbark_door;
|
||||
public static Block hellbark_trapdoor;
|
||||
public static Block hellbark_pressure_plate;
|
||||
public static Block hellbark_button;
|
||||
public static Block hellbark_sign;
|
||||
public static Block hellbark_wall_sign;
|
||||
|
||||
public static Block rose;
|
||||
public static Block violet;
|
||||
public static Block lavender;
|
||||
public static Block wildflower;
|
||||
public static Block orange_cosmos;
|
||||
public static Block pink_daffodil;
|
||||
public static Block pink_hibiscus;
|
||||
public static Block glowflower;
|
||||
public static Block wilted_lily;
|
||||
public static Block burning_blossom;
|
||||
|
||||
public static Block blue_hydrangea;
|
||||
public static Block goldenrod;
|
||||
|
||||
public static Block willow_vine;
|
||||
public static Block spanish_moss;
|
||||
public static Block spanish_moss_plant;
|
||||
|
||||
public static Block sprout;
|
||||
public static Block bush;
|
||||
public static Block clover;
|
||||
public static Block huge_clover_petal;
|
||||
public static Block dune_grass;
|
||||
public static Block desert_grass;
|
||||
public static Block dead_grass;
|
||||
public static Block cattail;
|
||||
public static Block barley;
|
||||
public static Block reed;
|
||||
public static Block watergrass;
|
||||
public static Block mangrove_root;
|
||||
public static Block dead_branch;
|
||||
public static Block bramble;
|
||||
|
||||
public static Block toadstool;
|
||||
public static Block glowshroom;
|
||||
|
||||
public static Block potted_origin_sapling;
|
||||
public static Block potted_flowering_oak_sapling;
|
||||
public static Block potted_rainbow_birch_sapling;
|
||||
public static Block potted_yellow_autumn_sapling;
|
||||
public static Block potted_orange_autumn_sapling;
|
||||
public static Block potted_maple_sapling;
|
||||
public static Block potted_fir_sapling;
|
||||
public static Block potted_redwood_sapling;
|
||||
public static Block potted_white_cherry_sapling;
|
||||
public static Block potted_pink_cherry_sapling;
|
||||
public static Block potted_mahogany_sapling;
|
||||
public static Block potted_jacaranda_sapling;
|
||||
public static Block potted_palm_sapling;
|
||||
public static Block potted_willow_sapling;
|
||||
public static Block potted_dead_sapling;
|
||||
public static Block potted_magic_sapling;
|
||||
public static Block potted_umbran_sapling;
|
||||
public static Block potted_hellbark_sapling;
|
||||
public static Block potted_rose;
|
||||
public static Block potted_violet;
|
||||
public static Block potted_lavender;
|
||||
public static Block potted_wildflower;
|
||||
public static Block potted_orange_cosmos;
|
||||
public static Block potted_pink_daffodil;
|
||||
public static Block potted_pink_hibiscus;
|
||||
public static Block potted_glowflower;
|
||||
public static Block potted_wilted_lily;
|
||||
public static Block potted_burning_blossom;
|
||||
public static Block potted_sprout;
|
||||
public static Block potted_clover;
|
||||
public static Block potted_toadstool;
|
||||
public static Block potted_glowshroom;
|
||||
}
|
||||
|
|
|
@ -1,44 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2014-2016, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
|
||||
package biomesoplenty.api.block;
|
||||
|
||||
public class BlockQueries
|
||||
{
|
||||
public static IBlockPosQuery anything;
|
||||
public static IBlockPosQuery nothing;
|
||||
public static IBlockPosQuery hasWater;
|
||||
public static IBlockPosQuery airAbove;
|
||||
public static IBlockPosQuery airBelow;
|
||||
public static IBlockPosQuery waterCovered;
|
||||
public static IBlockPosQuery breakable;
|
||||
public static IBlockPosQuery air;
|
||||
public static IBlockPosQuery airOrLeaves;
|
||||
public static IBlockPosQuery surfaceBlocks;
|
||||
public static IBlockPosQuery groundBlocks;
|
||||
public static IBlockPosQuery solid;
|
||||
public static IBlockPosQuery replaceable;
|
||||
|
||||
public static IBlockPosQuery fertile;
|
||||
public static IBlockPosQuery fertileOrNetherrack;
|
||||
public static IBlockPosQuery sustainsCave;
|
||||
public static IBlockPosQuery sustainsNether;
|
||||
public static IBlockPosQuery endish;
|
||||
public static IBlockPosQuery hellish;
|
||||
public static IBlockPosQuery litFertile;
|
||||
public static IBlockPosQuery litBeach;
|
||||
public static IBlockPosQuery litFertileWaterside;
|
||||
public static IBlockPosQuery litSand;
|
||||
public static IBlockPosQuery litDry;
|
||||
public static IBlockPosQuery litFertileOrDry;
|
||||
public static IBlockPosQuery spectralMoss;
|
||||
public static IBlockPosQuery fertileSeaBed;
|
||||
public static IBlockPosQuery underwater;
|
||||
public static IBlockPosQuery suitableForReed;
|
||||
public static IBlockPosQuery rootsCanDigThrough;
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2016, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
package biomesoplenty.api.block;
|
||||
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
// for queries on a particular block position in the world
|
||||
public interface IBlockPosQuery
|
||||
{
|
||||
public boolean matches(World world, BlockPos pos);
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2016, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
package biomesoplenty.api.config;
|
||||
|
||||
public interface IBOPWorldSettings
|
||||
{
|
||||
boolean isEnabled(GeneratorType type);
|
||||
|
||||
public static enum GeneratorType
|
||||
{
|
||||
GEMS, SOILS, TREES, GRASSES, FOLIAGE, FLOWERS, PLANTS, WATER_PLANTS, MUSHROOMS,
|
||||
ROCK_FORMATIONS, POISON_IVY, FLAX, BERRY_BUSHES, THORNS, QUICKSAND, LIQUID_POISON, HOT_SPRINGS,
|
||||
NETHER_HIVES, NETHER_PLANTS, END_FEATURES;
|
||||
}
|
||||
}
|
|
@ -1,77 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2016, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
package biomesoplenty.api.config;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import biomesoplenty.api.block.IBlockPosQuery;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public interface IConfigObj
|
||||
{
|
||||
public void addMessage(String message);
|
||||
public void addMessage(String extraPrefix, String message);
|
||||
public List<String> flushMessages();
|
||||
public boolean isEmpty();
|
||||
public boolean has(String name);
|
||||
public Set<String> getKeys();
|
||||
|
||||
public IConfigObj getObject(String name);
|
||||
public ArrayList<IConfigObj> getObjectArray(String name);
|
||||
public IConfigObj getObject(String name, boolean warnIfMissing);
|
||||
public ArrayList<IConfigObj> getObjectArray(String name, boolean warnIfMissing);
|
||||
|
||||
// Use the methods below when you want to obtain a value from a config file, if it is present, but you have a default value to use if it isn't
|
||||
// No warning messages will be logged using these methods if the value is missing
|
||||
public Boolean getBool(String name, Boolean defaultVal);
|
||||
public String getString(String name, String defaultVal);
|
||||
public Integer getInt(String name, Integer defaultVal);
|
||||
public Float getFloat(String name, Float defaultVal);
|
||||
public IBlockState getBlockState(String name, IBlockState defaultVal);
|
||||
public IBlockPosQuery getBlockPosQuery(String name, IBlockPosQuery defaultVal);
|
||||
public ResourceLocation getResourceLocation(String name, ResourceLocation defaultVal);
|
||||
public <E extends Enum> E getEnum(String name, E defaultVal, Class<E> clazz);
|
||||
|
||||
// Use the methods below when you want to obtain a value from a config file which SHOULD be present
|
||||
// If the value is missing, a warning message is logged, and null is returned
|
||||
public Boolean getBool(String name);
|
||||
public String getString(String name);
|
||||
public Integer getInt(String name);
|
||||
public Float getFloat(String name);
|
||||
public IBlockState getBlockState(String name);
|
||||
public IBlockPosQuery getBlockPosQuery(String name);
|
||||
public ResourceLocation getResourceLocation(String name);
|
||||
public <E extends Enum> E getEnum(String name, Class<E> clazz);
|
||||
|
||||
// Use the methods below when you want to obtain an array of values from a config file, if it is present, but you have a default value to use if it isn't
|
||||
// No warning messages will be logged using these methods if the value is missing
|
||||
public ArrayList<Boolean> getBoolArray(String name, ArrayList<Boolean> defaultVal);
|
||||
public ArrayList<String> getStringArray(String name, ArrayList<String> defaultVal);
|
||||
public ArrayList<Integer> getIntArray(String name, ArrayList<Integer> defaultVal);
|
||||
public ArrayList<Float> getFloatArray(String name, ArrayList<Float> defaultVal);
|
||||
public ArrayList<IBlockState> getBlockStateArray(String name, ArrayList<IBlockState> defaultVal);
|
||||
public ArrayList<IBlockPosQuery> getBlockPosQueryArray(String name, ArrayList<IBlockPosQuery> defaultVal);
|
||||
public ArrayList<ResourceLocation> getResourceLocationArray(String name, ArrayList<ResourceLocation> defaultVal);
|
||||
public <E extends Enum> ArrayList<E> getEnumArray(String name, ArrayList<E> defaultVal, Class<E> clazz);
|
||||
|
||||
// Use the methods below when you want to obtain an array of values from a config file which SHOULD be present
|
||||
// If the value is missing, a warning message is logged, and null is returned
|
||||
public ArrayList<Boolean> getBoolArray(String name);
|
||||
public ArrayList<String> getStringArray(String name);
|
||||
public ArrayList<Integer> getIntArray(String name);
|
||||
public ArrayList<Float> getFloatArray(String name);
|
||||
public ArrayList<IBlockState> getBlockStateArray(String name);
|
||||
public ArrayList<IBlockPosQuery> getBlockPosQueryArray(String name);
|
||||
public ArrayList<ResourceLocation> getResourceLocationArray(String name);
|
||||
public <E extends Enum> ArrayList<E> getEnumArray(String name, Class<E> clazz);
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2014-2019, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
package biomesoplenty.api.entity;
|
||||
|
||||
import net.minecraft.entity.EntityType;
|
||||
import net.minecraft.entity.item.BoatEntity;
|
||||
|
||||
public class BOPEntities
|
||||
{
|
||||
public static EntityType<? extends BoatEntity> boat_bop;
|
||||
}
|
|
@ -1,54 +1,91 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2014-2019, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
package biomesoplenty.api.enums;
|
||||
|
||||
import biomesoplenty.api.biome.BOPBiomes;
|
||||
import biomesoplenty.common.util.biome.BiomeUtil;
|
||||
import biomesoplenty.init.ModBiomes;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Sets;
|
||||
import net.minecraft.util.RegistryKey;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
import net.minecraft.world.biome.Biomes;
|
||||
import net.minecraft.world.gen.INoiseRandom;
|
||||
import net.minecraftforge.common.BiomeManager;
|
||||
import net.minecraftforge.common.BiomeManager.BiomeType;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import biomesoplenty.api.generation.BOPGenLayer;
|
||||
import net.minecraft.init.Biomes;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
import net.minecraftforge.common.BiomeManager.BiomeType;
|
||||
|
||||
public enum BOPClimates {
|
||||
|
||||
public enum BOPClimates
|
||||
{
|
||||
ICE_CAP (BiomeType.ICY),
|
||||
TUNDRA (BiomeType.ICY),
|
||||
BOREAL (BiomeType.COOL),
|
||||
COLD_SWAMP (BiomeType.COOL),
|
||||
WET_TEMPERATE (BiomeType.WARM),
|
||||
WET_BOREAL (BiomeType.COOL),
|
||||
DRY_BOREAL (BiomeType.COOL),
|
||||
WET_TEMPERATE (BiomeType.COOL),
|
||||
DRY_TEMPERATE (BiomeType.WARM),
|
||||
COOL_TEMPERATE (BiomeType.COOL),
|
||||
WARM_TEMPERATE (BiomeType.WARM),
|
||||
HOT_SWAMP (BiomeType.WARM),
|
||||
SUBTROPICAL (BiomeType.WARM),
|
||||
TROPICAL (BiomeType.DESERT),
|
||||
MEDITERANEAN (BiomeType.WARM),
|
||||
MEDITERRANEAN (BiomeType.WARM),
|
||||
SAVANNA (BiomeType.DESERT),
|
||||
HOT_DESERT (BiomeType.DESERT),
|
||||
WASTELAND (BiomeType.DESERT);
|
||||
|
||||
WASTELAND (null),
|
||||
NETHER (null);
|
||||
|
||||
public final BiomeType biomeType;
|
||||
private int totalLandBiomesWeight;
|
||||
private ArrayList<WeightedBiomeEntry> landBiomes = new ArrayList<WeightedBiomeEntry>();
|
||||
|
||||
private BOPClimates(BiomeType biomeType)
|
||||
private int totalBiomesWeight;
|
||||
private int totalIslandBiomesWeight;
|
||||
|
||||
private ArrayList<WeightedBiomeEntry> landBiomes = Lists.newArrayList();
|
||||
private ArrayList<WeightedBiomeEntry> islandBiomes = Lists.newArrayList();
|
||||
|
||||
BOPClimates(BiomeType biomeType)
|
||||
{
|
||||
this.biomeType = biomeType;
|
||||
}
|
||||
|
||||
public BOPClimates addLandBiome(int weight, Biome biome)
|
||||
|
||||
public BOPClimates addBiome(int weight, RegistryKey<Biome> biome)
|
||||
{
|
||||
return this.addLandBiome(new WeightedBiomeEntry(weight, biome));
|
||||
return this.addBiome(new WeightedBiomeEntry(weight, biome));
|
||||
}
|
||||
|
||||
public BOPClimates addLandBiome(WeightedBiomeEntry biomeEntry)
|
||||
|
||||
public BOPClimates addBiome(WeightedBiomeEntry biomeEntry)
|
||||
{
|
||||
this.totalLandBiomesWeight += biomeEntry.weight;
|
||||
this.totalBiomesWeight += biomeEntry.weight;
|
||||
this.landBiomes.add(biomeEntry);
|
||||
return this;
|
||||
}
|
||||
|
||||
public Biome getRandomLandBiome(BOPGenLayer layer)
|
||||
|
||||
public BOPClimates addIslandBiome(int weight, RegistryKey<Biome> biome)
|
||||
{
|
||||
int weight = layer.nextInt(this.totalLandBiomesWeight);
|
||||
return this.addIslandBiome(new WeightedBiomeEntry(weight, biome));
|
||||
}
|
||||
|
||||
public BOPClimates addIslandBiome(WeightedBiomeEntry biomeEntry)
|
||||
{
|
||||
this.totalIslandBiomesWeight += biomeEntry.weight;
|
||||
this.islandBiomes.add(biomeEntry);
|
||||
return this;
|
||||
}
|
||||
|
||||
public RegistryKey<Biome> getRandomBiome(INoiseRandom context, RegistryKey<Biome> fallback)
|
||||
{
|
||||
if (this.totalBiomesWeight == 0)
|
||||
return fallback;
|
||||
|
||||
int weight = context.nextRandom(this.totalBiomesWeight);
|
||||
Iterator<WeightedBiomeEntry> iterator = this.landBiomes.iterator();
|
||||
WeightedBiomeEntry item;
|
||||
do
|
||||
|
@ -59,64 +96,64 @@ public enum BOPClimates {
|
|||
while (weight >= 0);
|
||||
return item.biome;
|
||||
}
|
||||
|
||||
public Biome getRandomOceanBiome(BOPGenLayer layer, boolean deep)
|
||||
|
||||
public RegistryKey<Biome> getRandomIslandBiome(INoiseRandom context, RegistryKey<Biome> fallback)
|
||||
{
|
||||
switch (this)
|
||||
if (this.totalIslandBiomesWeight == 0)
|
||||
return fallback;
|
||||
|
||||
int weight = context.nextRandom(this.totalIslandBiomesWeight);
|
||||
Iterator<WeightedBiomeEntry> iterator = this.islandBiomes.iterator();
|
||||
WeightedBiomeEntry item;
|
||||
do
|
||||
{
|
||||
case ICE_CAP:
|
||||
return (layer.nextInt(2)==0) ? this.getRandomLandBiome(layer) : Biomes.FROZEN_OCEAN;
|
||||
case TUNDRA: case BOREAL:
|
||||
return (layer.nextInt(3)!=0) ? (deep ? Biomes.DEEP_OCEAN : Biomes.OCEAN) : Biomes.FROZEN_OCEAN;
|
||||
default:
|
||||
return (deep ? Biomes.DEEP_OCEAN : Biomes.OCEAN);
|
||||
item = iterator.next();
|
||||
weight -= item.weight;
|
||||
}
|
||||
while (weight >= 0);
|
||||
return item.biome;
|
||||
}
|
||||
|
||||
static
|
||||
|
||||
public RegistryKey<Biome> getRandomOceanBiome(INoiseRandom context, boolean deep)
|
||||
{
|
||||
// set up vanilla biomes
|
||||
|
||||
BOPClimates.ICE_CAP.addLandBiome(10,Biomes.ICE_PLAINS);
|
||||
BOPClimates.TUNDRA.addLandBiome(10, Biomes.COLD_TAIGA).addLandBiome(10, Biomes.EXTREME_HILLS);
|
||||
BOPClimates.BOREAL.addLandBiome(5, Biomes.REDWOOD_TAIGA).addLandBiome(5, Biomes.EXTREME_HILLS).addLandBiome(20, Biomes.TAIGA);
|
||||
BOPClimates.COLD_SWAMP.addLandBiome(5, Biomes.SWAMPLAND);
|
||||
BOPClimates.WET_TEMPERATE.addLandBiome(20, Biomes.ROOFED_FOREST).addLandBiome(5, Biomes.FOREST);
|
||||
BOPClimates.DRY_TEMPERATE.addLandBiome(5, Biomes.PLAINS);
|
||||
BOPClimates.COOL_TEMPERATE.addLandBiome(15, Biomes.FOREST).addLandBiome(10, Biomes.BIRCH_FOREST);
|
||||
BOPClimates.WARM_TEMPERATE.addLandBiome(20, Biomes.PLAINS).addLandBiome(5, Biomes.BIRCH_FOREST);
|
||||
BOPClimates.HOT_SWAMP.addLandBiome(5, Biomes.SWAMPLAND);
|
||||
BOPClimates.TROPICAL.addLandBiome(15, Biomes.JUNGLE);
|
||||
BOPClimates.MEDITERANEAN.addLandBiome(5, Biomes.PLAINS);
|
||||
BOPClimates.SAVANNA.addLandBiome(20, Biomes.SAVANNA);
|
||||
BOPClimates.HOT_DESERT.addLandBiome(30, Biomes.DESERT).addLandBiome(10, Biomes.MESA_CLEAR_ROCK);
|
||||
BOPClimates.WASTELAND.addLandBiome(1, Biomes.DESERT);
|
||||
return (deep ? Biomes.DEEP_OCEAN : Biomes.OCEAN);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public ImmutableList<WeightedBiomeEntry> getLandBiomes()
|
||||
{
|
||||
return this.landBiomes.isEmpty() ? ImmutableList.of(this.getDefaultWeightedBiomeEntry()) : ImmutableList.copyOf(this.landBiomes);
|
||||
}
|
||||
|
||||
public ImmutableList<WeightedBiomeEntry> getIslandBiomes()
|
||||
{
|
||||
return this.islandBiomes.isEmpty() ? ImmutableList.of(this.getDefaultWeightedBiomeEntry()) : ImmutableList.copyOf(this.islandBiomes);
|
||||
}
|
||||
|
||||
private WeightedBiomeEntry getDefaultWeightedBiomeEntry()
|
||||
{
|
||||
return new WeightedBiomeEntry(100, Biomes.OCEAN);
|
||||
}
|
||||
|
||||
private static BOPClimates[] values = BOPClimates.values();
|
||||
|
||||
|
||||
public static BOPClimates lookup(int i) {return values[i];}
|
||||
|
||||
|
||||
// map temperature and rainfall to climates
|
||||
// temperature values from 0 (cold) to 8 (hot) and rainfall values from 0 (wet) to 11 (dry), index is (temperatureValue * 12) + rainfallValue
|
||||
// we will contrive to make any combination equally likely, so the overall rarity of each climate is in proportion to the number of times it appears in the array
|
||||
private static final BOPClimates[] climateMapping = new BOPClimates[] {
|
||||
// 0 1 2 3 4 5 6 7 8 9 10 11
|
||||
TUNDRA, TUNDRA, TUNDRA, ICE_CAP, ICE_CAP, ICE_CAP, ICE_CAP, ICE_CAP, ICE_CAP, ICE_CAP, ICE_CAP, ICE_CAP, // 0
|
||||
BOREAL, BOREAL, BOREAL, TUNDRA, TUNDRA, TUNDRA, TUNDRA, TUNDRA, TUNDRA, TUNDRA, TUNDRA, TUNDRA, // 1
|
||||
COLD_SWAMP, COLD_SWAMP, COLD_SWAMP, BOREAL, BOREAL, BOREAL, BOREAL, BOREAL, BOREAL, BOREAL, BOREAL, BOREAL, // 2
|
||||
COLD_SWAMP, COLD_SWAMP, COLD_SWAMP, WET_TEMPERATE, COOL_TEMPERATE, COOL_TEMPERATE, COOL_TEMPERATE, COOL_TEMPERATE, COOL_TEMPERATE, DRY_TEMPERATE, DRY_TEMPERATE, DRY_TEMPERATE, // 3
|
||||
COLD_SWAMP, WET_TEMPERATE, WET_TEMPERATE, COOL_TEMPERATE, COOL_TEMPERATE, COOL_TEMPERATE, COOL_TEMPERATE, COOL_TEMPERATE, DRY_TEMPERATE, DRY_TEMPERATE, DRY_TEMPERATE, DRY_TEMPERATE, // 4
|
||||
WET_TEMPERATE, WET_TEMPERATE, WET_TEMPERATE, WARM_TEMPERATE, WARM_TEMPERATE, WARM_TEMPERATE, WARM_TEMPERATE, WARM_TEMPERATE, WARM_TEMPERATE, DRY_TEMPERATE, SAVANNA, SAVANNA, // 5
|
||||
HOT_SWAMP, HOT_SWAMP, HOT_SWAMP, WET_TEMPERATE, WARM_TEMPERATE, WARM_TEMPERATE, WARM_TEMPERATE, MEDITERANEAN, MEDITERANEAN, SAVANNA, HOT_DESERT, HOT_DESERT, // 6
|
||||
TROPICAL, TROPICAL, HOT_SWAMP, HOT_SWAMP, WET_TEMPERATE, WARM_TEMPERATE, MEDITERANEAN, MEDITERANEAN, SAVANNA, HOT_DESERT, HOT_DESERT, WASTELAND, // 7
|
||||
TROPICAL, TROPICAL, TROPICAL, HOT_SWAMP, HOT_SWAMP, MEDITERANEAN, MEDITERANEAN, SAVANNA, HOT_DESERT, HOT_DESERT, WASTELAND, WASTELAND // 8
|
||||
private static final BOPClimates[] climateMapping = new BOPClimates[]
|
||||
{
|
||||
TUNDRA, TUNDRA, ICE_CAP, ICE_CAP, ICE_CAP, ICE_CAP, ICE_CAP, ICE_CAP, ICE_CAP, ICE_CAP, TUNDRA, TUNDRA,
|
||||
WET_BOREAL, WET_BOREAL, TUNDRA, TUNDRA, TUNDRA, TUNDRA, TUNDRA, TUNDRA, TUNDRA, TUNDRA, DRY_BOREAL, DRY_BOREAL,
|
||||
WET_BOREAL, WET_BOREAL, WET_BOREAL, WET_BOREAL, WET_BOREAL, WET_BOREAL, DRY_BOREAL, DRY_BOREAL, DRY_BOREAL, DRY_BOREAL, DRY_BOREAL, DRY_BOREAL,
|
||||
WET_TEMPERATE, WET_TEMPERATE, WET_TEMPERATE, COOL_TEMPERATE, COOL_TEMPERATE, COOL_TEMPERATE, COOL_TEMPERATE, COOL_TEMPERATE, COOL_TEMPERATE, DRY_TEMPERATE, DRY_TEMPERATE, DRY_TEMPERATE,
|
||||
WET_TEMPERATE, WET_TEMPERATE, WET_TEMPERATE, COOL_TEMPERATE, COOL_TEMPERATE, COOL_TEMPERATE, COOL_TEMPERATE, COOL_TEMPERATE, COOL_TEMPERATE, DRY_TEMPERATE, DRY_TEMPERATE, DRY_TEMPERATE,
|
||||
SUBTROPICAL, SUBTROPICAL, WET_TEMPERATE, WARM_TEMPERATE, WARM_TEMPERATE, WARM_TEMPERATE, WARM_TEMPERATE, WARM_TEMPERATE, WARM_TEMPERATE, DRY_TEMPERATE, SAVANNA, SAVANNA,
|
||||
SUBTROPICAL, SUBTROPICAL, SUBTROPICAL, WARM_TEMPERATE, WARM_TEMPERATE, WARM_TEMPERATE, WARM_TEMPERATE, WARM_TEMPERATE, WARM_TEMPERATE, SAVANNA, SAVANNA, SAVANNA,
|
||||
TROPICAL, TROPICAL, SUBTROPICAL, SUBTROPICAL, MEDITERRANEAN, MEDITERRANEAN, MEDITERRANEAN, MEDITERRANEAN, SAVANNA, SAVANNA, HOT_DESERT, HOT_DESERT,
|
||||
TROPICAL, TROPICAL, SUBTROPICAL, SUBTROPICAL, MEDITERRANEAN, MEDITERRANEAN, MEDITERRANEAN, MEDITERRANEAN, SAVANNA, SAVANNA, HOT_DESERT, HOT_DESERT
|
||||
};
|
||||
|
||||
|
||||
public static int[] getClimateMappingInts()
|
||||
{
|
||||
// 9 temperature values, 12 rainfall values, 12 * 9 = 108
|
||||
|
@ -127,19 +164,38 @@ public enum BOPClimates {
|
|||
}
|
||||
return out;
|
||||
}
|
||||
|
||||
|
||||
public static ImmutableSet<RegistryKey<Biome>> getOverworldBiomes()
|
||||
{
|
||||
Set<RegistryKey<Biome>> set = Sets.newHashSet();
|
||||
|
||||
for (BOPClimates climate : BOPClimates.values())
|
||||
{
|
||||
if (climate == BOPClimates.NETHER)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
set.addAll(climate.getLandBiomes().stream().map(weightedBiomeEntry -> weightedBiomeEntry.biome).collect(Collectors.toSet()));
|
||||
set.addAll(climate.getIslandBiomes().stream().map(weightedBiomeEntry -> weightedBiomeEntry.biome).collect(Collectors.toSet()));
|
||||
}
|
||||
|
||||
ModBiomes.subBiomes.values().forEach(weightedSubBiome -> set.add(weightedSubBiome.biome));
|
||||
return ImmutableSet.copyOf(set);
|
||||
}
|
||||
|
||||
public static class WeightedBiomeEntry
|
||||
{
|
||||
public final int weight;
|
||||
public final Biome biome;
|
||||
|
||||
public WeightedBiomeEntry(int weight, Biome biome)
|
||||
public final RegistryKey<Biome> biome;
|
||||
|
||||
public WeightedBiomeEntry(int weight, RegistryKey<Biome> biome)
|
||||
{
|
||||
this.weight = weight;
|
||||
this.biome = biome;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// for debugging purposes
|
||||
public static void printWeights()
|
||||
{
|
||||
|
@ -147,7 +203,7 @@ public enum BOPClimates {
|
|||
{
|
||||
for (WeightedBiomeEntry entry : climate.landBiomes)
|
||||
{
|
||||
System.out.println(climate.name()+" "+entry.biome.getBiomeName()+" "+entry.weight);
|
||||
System.out.println(climate.name()+" "+entry.biome.location()+" "+entry.weight);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2015-2016, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
|
||||
package biomesoplenty.api.generation;
|
||||
import net.minecraft.world.gen.layer.GenLayer;
|
||||
|
||||
public abstract class BOPGenLayer extends GenLayer
|
||||
{
|
||||
public BOPGenLayer(long seed) {
|
||||
super(seed);
|
||||
}
|
||||
|
||||
// make nextInt public
|
||||
@Override
|
||||
public int nextInt(int a)
|
||||
{
|
||||
return super.nextInt(a);
|
||||
}
|
||||
}
|
|
@ -1,98 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2015-2016, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
|
||||
package biomesoplenty.api.generation;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
||||
|
||||
public abstract class BOPGeneratorBase extends WorldGenerator implements IGenerator
|
||||
{
|
||||
protected final String identifier;
|
||||
protected String name;
|
||||
protected GeneratorStage stage;
|
||||
protected float amountPerChunk;
|
||||
|
||||
protected BOPGeneratorBase(float amountPerChunk)
|
||||
{
|
||||
this.identifier = Generators.registry.getIdentifier((Class<? extends IGenerator>)this.getClass());
|
||||
|
||||
if (this.identifier == null)
|
||||
{
|
||||
throw new RuntimeException("The identifier for " + this.getClass().getCanonicalName() + " cannot be null!");
|
||||
}
|
||||
|
||||
this.amountPerChunk = amountPerChunk;
|
||||
}
|
||||
|
||||
|
||||
protected static abstract class InnerBuilder<T extends InnerBuilder<T, G>, G extends BOPGeneratorBase>
|
||||
{
|
||||
protected T self() {return (T)this;}
|
||||
protected float amountPerChunk;
|
||||
public T amountPerChunk(float amountPerChunk) {this.amountPerChunk = amountPerChunk; return this.self();}
|
||||
public abstract G create();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setStage(GeneratorStage stage)
|
||||
{
|
||||
this.stage = stage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName()
|
||||
{
|
||||
return this.name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public GeneratorStage getStage()
|
||||
{
|
||||
return this.stage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String getIdentifier()
|
||||
{
|
||||
return this.identifier;
|
||||
}
|
||||
|
||||
public abstract BlockPos getScatterY(World world, Random random, int x, int z);
|
||||
|
||||
public int getAmountToScatter(Random random)
|
||||
{
|
||||
int amount = MathHelper.floor_float(this.amountPerChunk);
|
||||
float remainder = this.amountPerChunk - amount;
|
||||
if (random.nextFloat() < remainder) {amount++;}
|
||||
return amount;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void scatter(World world, Random random, BlockPos pos)
|
||||
{
|
||||
int amount = this.getAmountToScatter(random);
|
||||
for (int i = 0; i < amount; i++)
|
||||
{
|
||||
int x = pos.getX() + random.nextInt(16) + 8;
|
||||
int z = pos.getZ() + random.nextInt(16) + 8;
|
||||
generate(world, random, this.getScatterY(world, random, x, z));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,75 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2015-2016, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
|
||||
package biomesoplenty.api.generation;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import net.minecraftforge.event.terraingen.DecorateBiomeEvent.Decorate;
|
||||
|
||||
public enum GeneratorStage
|
||||
{
|
||||
@SerializedName("pre")
|
||||
PRE(null),
|
||||
@SerializedName("big_shroom")
|
||||
BIG_SHROOM(Decorate.EventType.BIG_SHROOM),
|
||||
@SerializedName("cactus")
|
||||
CACTUS(Decorate.EventType.CACTUS),
|
||||
@SerializedName("clay")
|
||||
CLAY(Decorate.EventType.CLAY),
|
||||
@SerializedName("dead_bush")
|
||||
DEAD_BUSH(Decorate.EventType.DEAD_BUSH),
|
||||
@SerializedName("lilypad")
|
||||
LILYPAD(Decorate.EventType.LILYPAD),
|
||||
@SerializedName("flowers")
|
||||
FLOWERS(Decorate.EventType.FLOWERS),
|
||||
@SerializedName("grass")
|
||||
GRASS(Decorate.EventType.GRASS),
|
||||
@SerializedName("lake_water")
|
||||
LAKE_WATER(Decorate.EventType.LAKE_WATER),
|
||||
@SerializedName("lake_lava")
|
||||
LAKE_LAVA(Decorate.EventType.LAKE_LAVA),
|
||||
@SerializedName("pumpkin")
|
||||
PUMPKIN(Decorate.EventType.PUMPKIN),
|
||||
@SerializedName("reed")
|
||||
REED(Decorate.EventType.REED),
|
||||
@SerializedName("sand")
|
||||
SAND(Decorate.EventType.SAND),
|
||||
@SerializedName("sand_pass_2")
|
||||
SAND_PASS2(Decorate.EventType.SAND_PASS2),
|
||||
@SerializedName("shroom")
|
||||
SHROOM(Decorate.EventType.SHROOM),
|
||||
@SerializedName("tree")
|
||||
TREE(Decorate.EventType.TREE),
|
||||
@SerializedName("post")
|
||||
POST(null),
|
||||
@SerializedName("parent")
|
||||
PARENT(null),
|
||||
@SerializedName("ore_pre")
|
||||
ORE_PRE(null),
|
||||
@SerializedName("ore_post")
|
||||
ORE_POST(null);
|
||||
|
||||
private Decorate.EventType decorateType;
|
||||
|
||||
private GeneratorStage(Decorate.EventType decorateType)
|
||||
{
|
||||
this.decorateType = decorateType;
|
||||
}
|
||||
|
||||
public Decorate.EventType getDecorateType()
|
||||
{
|
||||
return this.decorateType;
|
||||
}
|
||||
|
||||
public static GeneratorStage mapDecorateType(Decorate.EventType decorateType)
|
||||
{
|
||||
//Somewhat of a hack, requires the ordering of our enum to be the same as the decorate event
|
||||
return decorateType != Decorate.EventType.CUSTOM ? GeneratorStage.values()[decorateType.ordinal() + 1] : null;
|
||||
}
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2016, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
package biomesoplenty.api.generation;
|
||||
|
||||
import net.minecraft.world.gen.layer.GenLayer;
|
||||
|
||||
public class Generators
|
||||
{
|
||||
public static IGeneratorRegistry registry;
|
||||
|
||||
public static GenLayer biomeGenLayer;
|
||||
public static GenLayer biomeIndexLayer;
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2016, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
package biomesoplenty.api.generation;
|
||||
|
||||
import com.google.common.collect.ImmutableCollection;
|
||||
|
||||
import biomesoplenty.api.config.IConfigObj;
|
||||
|
||||
public interface IGenerationManager
|
||||
{
|
||||
void addGenerator(String name, GeneratorStage stage, IGenerator generator);
|
||||
ImmutableCollection<IGenerator> getGeneratorsForStage(GeneratorStage stage);
|
||||
void removeGenerator(String name);
|
||||
IGenerator getGenerator(String name);
|
||||
void configureWith(String name, IConfigObj conf);
|
||||
}
|
|
@ -1,39 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2014-2016, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
|
||||
package biomesoplenty.api.generation;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import biomesoplenty.api.config.IConfigObj;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public interface IGenerator
|
||||
{
|
||||
public void scatter(World world, Random random, BlockPos pos);
|
||||
public boolean generate(World world, Random random, BlockPos pos);
|
||||
|
||||
public void setStage(GeneratorStage stage);
|
||||
public void setName(String name);
|
||||
|
||||
/**A unique name used to classify the purpose of a generator. For example, emeralds and ruby use the
|
||||
* same generator (and thus, have the same identifier) but have differing names.
|
||||
*/
|
||||
public String getName();
|
||||
/**The identifier for this generator should be consistent across all instances of the same type*/
|
||||
public String getIdentifier();
|
||||
public GeneratorStage getStage();
|
||||
|
||||
public static interface IGeneratorBuilder<T extends IGenerator>
|
||||
{
|
||||
public T create();
|
||||
}
|
||||
|
||||
public void configure(IConfigObj conf);
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2016, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
package biomesoplenty.api.generation;
|
||||
|
||||
import biomesoplenty.api.config.IConfigObj;
|
||||
|
||||
public interface IGeneratorRegistry
|
||||
{
|
||||
<T extends IGenerator> void registerGenerator(String identifier, Class<T> generatorClass, IGenerator.IGeneratorBuilder<T> builder);
|
||||
String getIdentifier(Class<? extends IGenerator> generatorClass);
|
||||
Class<? extends IGenerator> getGeneratorClass(String identifier);
|
||||
IGenerator.IGeneratorBuilder<?> getGeneratorBuilder(String identifier);
|
||||
boolean generatorExists(String identifier);
|
||||
IGenerator createGenerator(IConfigObj conf);
|
||||
}
|
|
@ -1,117 +1,32 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2014-2016, the Biomes O' Plenty Team
|
||||
* Copyright 2014-2019, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
|
||||
package biomesoplenty.api.item;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
|
||||
public class BOPItems
|
||||
public class BOPItems
|
||||
{
|
||||
|
||||
public static Item berries;
|
||||
public static Item shroompowder;
|
||||
public static Item peach;
|
||||
public static Item saladfruit;
|
||||
public static Item saladveggie;
|
||||
public static Item saladshroom;
|
||||
public static Item earth;
|
||||
public static Item persimmon;
|
||||
public static Item filled_honeycomb;
|
||||
public static Item ambrosia;
|
||||
public static Item turnip;
|
||||
public static Item pear;
|
||||
public static Item ricebowl;
|
||||
|
||||
public static Item fleshchunk;
|
||||
public static Item mudball;
|
||||
public static Item turnip_seeds;
|
||||
public static Item crystal_shard;
|
||||
public static Item terrestrial_artifact;
|
||||
public static Item flax_string;
|
||||
public static Item honeycomb;
|
||||
public static Item gem;
|
||||
public static Item ash;
|
||||
public static Item bop_icon;
|
||||
|
||||
public static Item mud_ball;
|
||||
public static Item mud_brick;
|
||||
public static Item blue_dye;
|
||||
public static Item brown_dye;
|
||||
public static Item green_dye;
|
||||
public static Item white_dye;
|
||||
public static Item black_dye;
|
||||
public static Item soul;
|
||||
public static Item pixie_dust;
|
||||
public static Item ichor;
|
||||
public static Item pinecone;
|
||||
public static Item other_slab;
|
||||
|
||||
public static Item sacred_oak_door;
|
||||
public static Item cherry_door;
|
||||
public static Item umbran_door;
|
||||
public static Item fir_door;
|
||||
public static Item ethereal_door;
|
||||
public static Item magic_door;
|
||||
public static Item mangrove_door;
|
||||
public static Item palm_door;
|
||||
public static Item redwood_door;
|
||||
public static Item willow_door;
|
||||
public static Item pine_door;
|
||||
public static Item hellbark_door;
|
||||
public static Item jacaranda_door;
|
||||
public static Item mahogany_door;
|
||||
public static Item ebony_door;
|
||||
public static Item eucalyptus_door;
|
||||
|
||||
public static Item wood_slab_0;
|
||||
public static Item wood_slab_1;
|
||||
|
||||
public static Item wading_boots;
|
||||
public static Item flippers;
|
||||
public static Item plain_flower_band;
|
||||
public static Item lush_flower_band;
|
||||
public static Item exotic_flower_band;
|
||||
public static Item dull_flower_band;
|
||||
|
||||
public static Item mud_helmet;
|
||||
public static Item mud_chestplate;
|
||||
public static Item mud_leggings;
|
||||
public static Item mud_boots;
|
||||
|
||||
public static Item mud_axe;
|
||||
public static Item mud_hoe;
|
||||
public static Item mud_pickaxe;
|
||||
public static Item mud_shovel;
|
||||
public static Item mud_sword;
|
||||
|
||||
public static Item mud_scythe;
|
||||
public static Item wood_scythe;
|
||||
public static Item stone_scythe;
|
||||
public static Item iron_scythe;
|
||||
public static Item gold_scythe;
|
||||
public static Item diamond_scythe;
|
||||
|
||||
public static Item biome_finder;
|
||||
public static Item biome_essence;
|
||||
public static Item enderporter;
|
||||
public static Item flower_basket;
|
||||
public static Item jar_empty;
|
||||
public static Item jar_filled;
|
||||
public static Item sand_bucket;
|
||||
public static Item honey_bucket;
|
||||
public static Item blood_bucket;
|
||||
public static Item poison_bucket;
|
||||
public static Item hot_spring_water_bucket;
|
||||
|
||||
public static Item record_wanderer;
|
||||
public static Item record_corruption;
|
||||
|
||||
public static Item spawn_egg;
|
||||
|
||||
// TODO: public static Item ancientStaff;
|
||||
// TODO: public static Item bop_bucket;
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static Item fir_boat;
|
||||
public static Item redwood_boat;
|
||||
public static Item cherry_boat;
|
||||
public static Item mahogany_boat;
|
||||
public static Item jacaranda_boat;
|
||||
public static Item palm_boat;
|
||||
public static Item willow_boat;
|
||||
public static Item dead_boat;
|
||||
public static Item magic_boat;
|
||||
public static Item umbran_boat;
|
||||
public static Item hellbark_boat;
|
||||
|
||||
public static Item music_disc_wanderer;
|
||||
}
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2014-2016, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
|
||||
package biomesoplenty.api.item;
|
||||
|
||||
import net.minecraft.item.Item.ToolMaterial;
|
||||
import net.minecraft.item.ItemArmor.ArmorMaterial;
|
||||
|
||||
public class BOPMaterials
|
||||
{
|
||||
public static ArmorMaterial wading_boots_material;
|
||||
public static ArmorMaterial flippers_material;
|
||||
public static ArmorMaterial plain_flower_band_material;
|
||||
public static ArmorMaterial lush_flower_band_material;
|
||||
public static ArmorMaterial exotic_flower_band_material;
|
||||
public static ArmorMaterial dull_flower_band_material;
|
||||
|
||||
public static ArmorMaterial mud_armor_material;
|
||||
public static ToolMaterial mud_tool_material;
|
||||
}
|
|
@ -1,6 +1,13 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2014-2019, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
package biomesoplenty.api.particle;
|
||||
|
||||
public enum BOPParticleTypes
|
||||
{
|
||||
PIXIETRAIL, MUD, PLAYER_TRAIL;
|
||||
}
|
||||
MUD
|
||||
}
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2014-2016, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
|
||||
package biomesoplenty.api.potion;
|
||||
|
||||
import net.minecraft.potion.Potion;
|
||||
|
||||
public class BOPPotions
|
||||
{
|
||||
public static Potion paralysis;
|
||||
public static Potion possession;
|
||||
|
||||
}
|
|
@ -1,20 +1,15 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2016, the Biomes O' Plenty Team
|
||||
*
|
||||
* Copyright 2014-2019, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
package biomesoplenty.api.sound;
|
||||
|
||||
import net.minecraft.util.SoundEvent;
|
||||
|
||||
public class BOPSounds
|
||||
public class BOPSounds
|
||||
{
|
||||
public static SoundEvent pixie_ambient;
|
||||
public static SoundEvent pixie_hurt;
|
||||
public static SoundEvent wasp_ambient;
|
||||
public static SoundEvent wasp_hurt;
|
||||
public static SoundEvent records_corruption;
|
||||
public static SoundEvent records_wanderer;
|
||||
public static SoundEvent music_disc_wanderer;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,141 @@
|
|||
/**Copied from Twilight Forest and modified with permission**/
|
||||
|
||||
package biomesoplenty.client;
|
||||
|
||||
import biomesoplenty.core.BiomesOPlenty;
|
||||
import com.google.common.base.Joiner;
|
||||
import net.minecraft.resources.ResourcePack;
|
||||
import net.minecraft.resources.ResourcePackFileNotFoundException;
|
||||
import net.minecraft.resources.ResourcePackType;
|
||||
import net.minecraft.resources.data.IMetadataSectionSerializer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import net.minecraftforge.fml.loading.moddiscovery.ModFile;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.StandardOpenOption;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
import java.util.function.Predicate;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public class BOPClassicPack extends ResourcePack
|
||||
{
|
||||
private final ModFile modFile;
|
||||
private static final String subDir = "classic/";
|
||||
|
||||
public BOPClassicPack(ModFile modFile)
|
||||
{
|
||||
super(modFile.getFilePath().toFile());
|
||||
this.modFile = modFile;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<String> getNamespaces(ResourcePackType type)
|
||||
{
|
||||
try
|
||||
{
|
||||
Path root = modFile.getLocator().findPath(modFile, subDir + type.getDirectory()).toAbsolutePath();
|
||||
return Files.walk(root,1).map(path -> root.relativize(path.toAbsolutePath())).filter(path -> path.getNameCount() > 0).map(p->p.toString().replaceAll("/$","")).filter(s -> !s.isEmpty()).collect(Collectors.toSet());
|
||||
}
|
||||
catch (Throwable t)
|
||||
{
|
||||
BiomesOPlenty.logger.error("BOPClassicPack failed to collect resource namespaces!", t);
|
||||
return Collections.emptySet();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected InputStream getResource(String location) throws IOException
|
||||
{
|
||||
final Path path = modFile.getLocator().findPath(modFile, subDir + location);
|
||||
|
||||
if (!Files.exists(path))
|
||||
{
|
||||
BiomesOPlenty.logger.error("File does not exist!");
|
||||
throw new ResourcePackFileNotFoundException(path.toFile(), location);
|
||||
}
|
||||
|
||||
return Files.newInputStream(path, StandardOpenOption.READ);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean hasResource(String resourcePath)
|
||||
{
|
||||
return Files.exists(modFile.getLocator().findPath(modFile, subDir + resourcePath));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<ResourceLocation> getResources(ResourcePackType type, String namespaceIn, String pathIn, int maxDepthIn, Predicate<String> filterIn)
|
||||
{
|
||||
try
|
||||
{
|
||||
Path root = modFile.getLocator().findPath(modFile, subDir + type.getDirectory()).toAbsolutePath();
|
||||
Path inputPath = root.getFileSystem().getPath(pathIn);
|
||||
|
||||
return Files.walk(root).map(path -> root.relativize(path.toAbsolutePath())).filter(path -> path.getNameCount() > 1 && path.getNameCount() - 1 <= maxDepthIn).filter(path -> !path.toString().endsWith(".mcmeta")).filter(path -> path.subpath(1, path.getNameCount()).startsWith(inputPath)).filter(path -> filterIn.test(path.getFileName().toString())).map(path -> new ResourceLocation(path.getName(0).toString(), Joiner.on('/').join(path.subpath(1, Math.min(maxDepthIn, path.getNameCount()))))).collect(Collectors.toList());
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
return Collections.emptyList();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close() { }
|
||||
|
||||
@Override
|
||||
public String getName()
|
||||
{
|
||||
return "BOP Programmer Art";
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public <T> T getMetadataSection(IMetadataSectionSerializer<T> serializer) throws IOException
|
||||
{
|
||||
InputStream inputStream = getResource("pack.mcmeta");
|
||||
Throwable throwable = null;
|
||||
T resourceMetaData;
|
||||
|
||||
try
|
||||
{
|
||||
resourceMetaData = getMetadataFromStream(serializer, inputStream);
|
||||
}
|
||||
catch (Throwable t)
|
||||
{
|
||||
throwable = t;
|
||||
throw t;
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (inputStream != null)
|
||||
{
|
||||
if (throwable != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
inputStream.close();
|
||||
}
|
||||
catch (Throwable t)
|
||||
{
|
||||
throwable.addSuppressed(t);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
inputStream.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return resourceMetaData;
|
||||
}
|
||||
}
|
|
@ -1,44 +0,0 @@
|
|||
package biomesoplenty.client.gui;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import biomesoplenty.common.config.GameplayConfigurationHandler;
|
||||
import biomesoplenty.common.config.MiscConfigurationHandler;
|
||||
import biomesoplenty.common.remote.TrailManager;
|
||||
import biomesoplenty.common.util.entity.PlayerUtil;
|
||||
import biomesoplenty.core.BiomesOPlenty;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.util.text.translation.I18n;
|
||||
import net.minecraftforge.common.config.ConfigElement;
|
||||
import net.minecraftforge.fml.client.config.DummyConfigElement;
|
||||
import net.minecraftforge.fml.client.config.GuiConfig;
|
||||
import net.minecraftforge.fml.client.config.IConfigElement;
|
||||
|
||||
public class GuiBOPConfig extends GuiConfig
|
||||
{
|
||||
public GuiBOPConfig(GuiScreen parentScreen)
|
||||
{
|
||||
super(parentScreen, GuiBOPConfig.getConfigElements(), BiomesOPlenty.MOD_ID, false, false, "/biomesoplenty");
|
||||
}
|
||||
|
||||
private static List<IConfigElement> getConfigElements()
|
||||
{
|
||||
List<IConfigElement> list = new ArrayList<IConfigElement>();
|
||||
|
||||
List<IConfigElement> convenienceSettings = new ConfigElement(GameplayConfigurationHandler.config.getCategory(GameplayConfigurationHandler.convenienceSettings.toLowerCase())).getChildElements();
|
||||
List<IConfigElement> guiSettings = new ConfigElement(MiscConfigurationHandler.config.getCategory(MiscConfigurationHandler.guiSettings.toLowerCase())).getChildElements();
|
||||
List<IConfigElement> textureSettings = new ConfigElement(MiscConfigurationHandler.config.getCategory(MiscConfigurationHandler.textureSettings.toLowerCase())).getChildElements();
|
||||
List<IConfigElement> trailSettings = new ConfigElement(MiscConfigurationHandler.config.getCategory(MiscConfigurationHandler.trailSettings.toLowerCase())).getChildElements();
|
||||
|
||||
list.add(new DummyConfigElement.DummyCategoryElement(I18n.translateToLocal("config.category.convenienceSettings.title"), "config.category.convenienceSettings", convenienceSettings));
|
||||
list.add(new DummyConfigElement.DummyCategoryElement(I18n.translateToLocal("config.category.guiSettings.title"), "config.category.guiSettings", guiSettings));
|
||||
list.add(new DummyConfigElement.DummyCategoryElement(I18n.translateToLocal("config.category.textureSettings.title"), "config.category.textureSettings", textureSettings));
|
||||
if (TrailManager.trailsMap.containsKey(PlayerUtil.getClientPlayerUUID()))
|
||||
{
|
||||
list.add(new DummyConfigElement.DummyCategoryElement(I18n.translateToLocal("config.category.trailSettings.title"), "config.category.trailSettings", trailSettings));
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
}
|
|
@ -1,656 +0,0 @@
|
|||
package biomesoplenty.client.gui;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import com.google.common.base.Predicate;
|
||||
import com.google.common.primitives.Floats;
|
||||
|
||||
import biomesoplenty.common.world.BOPWorldSettings;
|
||||
import biomesoplenty.common.world.BOPWorldSettings.BiomeSize;
|
||||
import biomesoplenty.common.world.BOPWorldSettings.LandMassScheme;
|
||||
import biomesoplenty.common.world.BOPWorldSettings.RainfallVariationScheme;
|
||||
import biomesoplenty.common.world.BOPWorldSettings.TemperatureVariationScheme;
|
||||
import net.minecraft.client.gui.Gui;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiCreateWorld;
|
||||
import net.minecraft.client.gui.GuiListButton;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.gui.GuiSlider;
|
||||
import net.minecraft.client.gui.GuiTextField;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiBOPConfigureWorld extends GuiScreen implements GuiSlider.FormatHelper, GuiBOPPageList.GuiResponder
|
||||
{
|
||||
private GuiCreateWorld parentScreen;
|
||||
|
||||
protected String screenTitle = "Customize World Settings";
|
||||
protected String pageInfo = "Page 1 of 3";
|
||||
protected String page0Title = "Basic Settings";
|
||||
protected String[] pageNames;
|
||||
|
||||
private GuiBOPPageManager pageManager;
|
||||
|
||||
//Navigation buttons, required on all pages
|
||||
private GuiButton doneButton;
|
||||
private GuiButton defaultsButton;
|
||||
private GuiButton prevButton;
|
||||
private GuiButton nextButton;
|
||||
private GuiButton yesButton;
|
||||
private GuiButton noButton;
|
||||
|
||||
private int modalAction = 0;
|
||||
private boolean field_175340_C = false;
|
||||
private Predicate validFloatPredicate = new Predicate()
|
||||
{
|
||||
public boolean tryParseValidFloat(String p_178956_1_)
|
||||
{
|
||||
Float f = Floats.tryParse(p_178956_1_);
|
||||
return p_178956_1_.length() == 0 || f != null && Floats.isFinite(f.floatValue()) && f.floatValue() >= 0.0F;
|
||||
}
|
||||
@Override
|
||||
public boolean apply(Object p_apply_1_)
|
||||
{
|
||||
return this.tryParseValidFloat((String)p_apply_1_);
|
||||
}
|
||||
};
|
||||
|
||||
private BOPWorldSettings settings;
|
||||
|
||||
|
||||
public GuiBOPConfigureWorld(GuiScreen parentScreen, String settingsStringIn)
|
||||
{
|
||||
this.parentScreen = (GuiCreateWorld)parentScreen;
|
||||
|
||||
if (settingsStringIn.isEmpty())
|
||||
{
|
||||
this.settings = new BOPWorldSettings();
|
||||
} else {
|
||||
this.settings = new BOPWorldSettings(settingsStringIn);
|
||||
}
|
||||
}
|
||||
|
||||
private static enum Actions
|
||||
{
|
||||
PREVIOUS (301),
|
||||
NEXT (302),
|
||||
DEFAULTS (303),
|
||||
DONE (304),
|
||||
YES (305),
|
||||
NO (306);
|
||||
|
||||
private int id;
|
||||
|
||||
private Actions(int id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
public int getId()
|
||||
{
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public static Actions fromId(int id)
|
||||
{
|
||||
for (Actions action : Actions.values())
|
||||
{
|
||||
if (action.id == id)
|
||||
{
|
||||
return action;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initGui()
|
||||
{
|
||||
this.screenTitle = I18n.format("options.customizeTitle");
|
||||
|
||||
this.buttonList.clear();
|
||||
this.buttonList.add(this.prevButton = new GuiButton(Actions.PREVIOUS.getId(), 20, 5, 80, 20, I18n.format("createWorld.customize.custom.prev")));
|
||||
this.buttonList.add(this.nextButton = new GuiButton(Actions.NEXT.getId(), this.width - 100, 5, 80, 20, I18n.format("createWorld.customize.custom.next")));
|
||||
this.buttonList.add(this.defaultsButton = new GuiButton(Actions.DEFAULTS.getId(), this.width / 2 - 187, this.height - 27, 90, 20, I18n.format("createWorld.customize.custom.defaults")));
|
||||
this.buttonList.add(this.doneButton = new GuiButton(Actions.DONE.getId(), this.width / 2 + 98, this.height - 27, 90, 20, I18n.format("gui.done")));
|
||||
|
||||
this.yesButton = new GuiButton(Actions.YES.getId(), this.width / 2 - 55, 160, 50, 20, I18n.format("gui.yes"));
|
||||
this.yesButton.visible = false;
|
||||
this.buttonList.add(this.yesButton);
|
||||
|
||||
this.noButton = new GuiButton(Actions.NO.getId(), this.width / 2 + 5, 160, 50, 20, I18n.format("gui.no"));
|
||||
this.noButton.visible = false;
|
||||
this.buttonList.add(this.noButton);
|
||||
|
||||
this.setupPages();
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleMouseInput() throws IOException
|
||||
{
|
||||
super.handleMouseInput();
|
||||
this.pageManager.getActivePage().handleMouseInput();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void mouseClicked(int mouseX, int mouseY, int mouseButton) throws IOException
|
||||
{
|
||||
super.mouseClicked(mouseX, mouseY, mouseButton);
|
||||
|
||||
if (this.modalAction == 0 && !this.field_175340_C)
|
||||
{
|
||||
this.pageManager.getActivePage().mouseClicked(mouseX, mouseY, mouseButton);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void mouseReleased(int mouseX, int mouseY, int state)
|
||||
{
|
||||
super.mouseReleased(mouseX, mouseY, state);
|
||||
|
||||
if (this.field_175340_C)
|
||||
{
|
||||
this.field_175340_C = false;
|
||||
}
|
||||
else if (this.modalAction == 0)
|
||||
{
|
||||
this.pageManager.getActivePage().mouseReleased(mouseX, mouseY, state);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static enum GuiEntries
|
||||
{
|
||||
TEMP_SCHEME (101),
|
||||
GENERATE_BOP_GEMS (102),
|
||||
AMPLITUDE (104),
|
||||
BIOME_SIZE (105),
|
||||
LAND_SCHEME (106),
|
||||
RAIN_SCHEME (107),
|
||||
GENERATE_BOP_SOILS (108),
|
||||
GENERATE_BOP_TREES (109),
|
||||
GENERATE_BOP_GRASSES (110),
|
||||
GENERATE_BOP_FOLIAGE (111),
|
||||
GENERATE_BOP_FLOWERS (112),
|
||||
GENERATE_BOP_PLANTS (113),
|
||||
GENERATE_BOP_WATER_PLANTS (114),
|
||||
GENERATE_BOP_MUSHROOMS (115),
|
||||
GENERATE_ROCK_FORMATIONS (116),
|
||||
GENERATE_POISON_IVY (117),
|
||||
GENERATE_FLAX (118),
|
||||
GENERATE_BERRY_BUSHES (119),
|
||||
GENERATE_THORNS (120),
|
||||
GENERATE_QUICKSAND (121),
|
||||
GENERATE_LIQUID_POISON (122),
|
||||
GENERATE_HOT_SPRINGS (123),
|
||||
GENERATE_NETHER_HIVES (124),
|
||||
GENERATE_NETHER_PLANTS (125),
|
||||
GENERATE_END_FEATURES (126);
|
||||
|
||||
private int id;
|
||||
|
||||
private GuiEntries(int id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
public int getId()
|
||||
{
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public static GuiEntries fromId(int id)
|
||||
{
|
||||
for (GuiEntries entry : GuiEntries.values())
|
||||
{
|
||||
if (entry.id == id)
|
||||
{
|
||||
return entry;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void setupPages()
|
||||
{
|
||||
this.pageNames = new String[3];
|
||||
|
||||
this.pageNames[0] = "World Settings";
|
||||
GuiBOPPageList.GuiFieldEntry[] page0Fields = new GuiBOPPageList.GuiFieldEntry[] {
|
||||
new GuiBOPPageList.GuiEnumButtonEntry<BiomeSize>(GuiEntries.BIOME_SIZE.getId(), "Biome Size: %s", true, this.settings.biomeSize),
|
||||
new GuiBOPPageList.GuiEnumButtonEntry<LandMassScheme>(GuiEntries.LAND_SCHEME.getId(), "Land Mass: %s", true, this.settings.landScheme),
|
||||
new GuiBOPPageList.GuiEnumButtonEntry<TemperatureVariationScheme>(GuiEntries.TEMP_SCHEME.getId(), "Temperature: %s", true, this.settings.tempScheme),
|
||||
new GuiBOPPageList.GuiEnumButtonEntry<RainfallVariationScheme>(GuiEntries.RAIN_SCHEME.getId(), "Rainfall: %s", true, this.settings.rainScheme),
|
||||
new GuiBOPPageList.GuiSlideEntry(GuiEntries.AMPLITUDE.getId(), "Amplitude", true, this, 0.2F, 3.0F, this.settings.amplitude)
|
||||
};
|
||||
|
||||
this.pageNames[1] = "Biome Settings";
|
||||
GuiBOPPageList.GuiFieldEntry[] page1Fields = new GuiBOPPageList.GuiFieldEntry[] {
|
||||
|
||||
};
|
||||
|
||||
this.pageNames[2] = "Feature Generation Settings";
|
||||
GuiBOPPageList.GuiFieldEntry[] page2Fields = new GuiBOPPageList.GuiFieldEntry[] {
|
||||
new GuiBOPPageList.GuiButtonEntry(GuiEntries.GENERATE_BOP_GEMS.getId(), "BOP Gems", true, this.settings.generateBopGems),
|
||||
new GuiBOPPageList.GuiButtonEntry(GuiEntries.GENERATE_BOP_SOILS.getId(), "BOP Soils", true, this.settings.generateBopSoils),
|
||||
new GuiBOPPageList.GuiButtonEntry(GuiEntries.GENERATE_BOP_TREES.getId(), "BOP Logs/Leaves", true, this.settings.generateBopTrees),
|
||||
new GuiBOPPageList.GuiButtonEntry(GuiEntries.GENERATE_BOP_GRASSES.getId(), "BOP Grasses", true, this.settings.generateBopGrasses),
|
||||
new GuiBOPPageList.GuiButtonEntry(GuiEntries.GENERATE_BOP_FOLIAGE.getId(), "BOP Foliage", true, this.settings.generateBopFoliage),
|
||||
new GuiBOPPageList.GuiButtonEntry(GuiEntries.GENERATE_BOP_FLOWERS.getId(), "BOP Flowers", true, this.settings.generateBopFlowers),
|
||||
new GuiBOPPageList.GuiButtonEntry(GuiEntries.GENERATE_BOP_PLANTS.getId(), "BOP Plants", true, this.settings.generateBopPlants),
|
||||
new GuiBOPPageList.GuiButtonEntry(GuiEntries.GENERATE_BOP_WATER_PLANTS.getId(), "BOP Water Plants", true, this.settings.generateBopWaterPlants),
|
||||
new GuiBOPPageList.GuiButtonEntry(GuiEntries.GENERATE_BOP_MUSHROOMS.getId(), "BOP Mushrooms", true, this.settings.generateBopMushrooms),
|
||||
new GuiBOPPageList.GuiButtonEntry(GuiEntries.GENERATE_ROCK_FORMATIONS.getId(), "Rock Formations", true, this.settings.generateRockFormations),
|
||||
new GuiBOPPageList.GuiButtonEntry(GuiEntries.GENERATE_POISON_IVY.getId(), "Poison Ivy", true, this.settings.generatePoisonIvy),
|
||||
new GuiBOPPageList.GuiButtonEntry(GuiEntries.GENERATE_FLAX.getId(), "Flax", true, this.settings.generateFlax),
|
||||
new GuiBOPPageList.GuiButtonEntry(GuiEntries.GENERATE_BERRY_BUSHES.getId(), "Berry Bushes", true, this.settings.generateBerryBushes),
|
||||
new GuiBOPPageList.GuiButtonEntry(GuiEntries.GENERATE_THORNS.getId(), "Thorns", true, this.settings.generateThorns),
|
||||
new GuiBOPPageList.GuiButtonEntry(GuiEntries.GENERATE_QUICKSAND.getId(), "Quicksand", true, this.settings.generateQuicksand),
|
||||
new GuiBOPPageList.GuiButtonEntry(GuiEntries.GENERATE_LIQUID_POISON.getId(), "Liquid Poison Pools", true, this.settings.generateLiquidPoison),
|
||||
new GuiBOPPageList.GuiButtonEntry(GuiEntries.GENERATE_HOT_SPRINGS.getId(), "Hot Spring Pools", true, this.settings.generateHotSprings),
|
||||
new GuiBOPPageList.GuiButtonEntry(GuiEntries.GENERATE_NETHER_HIVES.getId(), "Nether Hives", true, this.settings.generateNetherHives),
|
||||
new GuiBOPPageList.GuiButtonEntry(GuiEntries.GENERATE_NETHER_PLANTS.getId(), "Nether Plants", true, this.settings.generateNetherPlants),
|
||||
new GuiBOPPageList.GuiButtonEntry(GuiEntries.GENERATE_END_FEATURES.getId(), "End Features", true, this.settings.generateEndFeatures)
|
||||
};
|
||||
|
||||
this.pageManager = new GuiBOPPageManager(createTableForFields(page0Fields, page1Fields, page2Fields));
|
||||
this.pageManager.setup();
|
||||
|
||||
this.showNewPage();
|
||||
}
|
||||
|
||||
private GuiBOPPageTable[] createTableForFields(GuiBOPPageList.GuiFieldEntry[]... fieldGroup)
|
||||
{
|
||||
GuiBOPPageTable[] output = new GuiBOPPageTable[fieldGroup.length];
|
||||
|
||||
for (int i = 0; i < fieldGroup.length; i++)
|
||||
{
|
||||
GuiBOPPageList.GuiFieldEntry[] fields = fieldGroup[i];
|
||||
output[i] = new GuiBOPPageTable(this.width, this.height, 32, this.height - 32, 25, i, this, fields);
|
||||
}
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
public String serialize()
|
||||
{
|
||||
return this.settings.toString().replace("\n", "");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public String getText(int id, String name, float value)
|
||||
{
|
||||
return name + ": " + this.stringFormatFloat(id, value);
|
||||
}
|
||||
|
||||
private String stringFormatFloat(int fieldId, float value)
|
||||
{
|
||||
GuiEntries entry = GuiEntries.fromId(fieldId);
|
||||
if (entry == null) {return "";}
|
||||
|
||||
switch (entry)
|
||||
{
|
||||
case AMPLITUDE:
|
||||
return String.format("%5.3f", new Object[] {Float.valueOf(value)});
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void handleEnumSelection(int fieldId, int ordinal)
|
||||
{
|
||||
GuiEntries entry = GuiEntries.fromId(fieldId);
|
||||
if (entry == null) {return;}
|
||||
|
||||
switch (entry)
|
||||
{
|
||||
case LAND_SCHEME:
|
||||
LandMassScheme[] land_values = LandMassScheme.values();
|
||||
this.settings.landScheme = land_values[ordinal % land_values.length];
|
||||
break;
|
||||
case TEMP_SCHEME:
|
||||
TemperatureVariationScheme[] temp_values = TemperatureVariationScheme.values();
|
||||
this.settings.tempScheme = temp_values[ordinal % temp_values.length];
|
||||
break;
|
||||
case RAIN_SCHEME:
|
||||
RainfallVariationScheme[] rain_values = RainfallVariationScheme.values();
|
||||
this.settings.rainScheme = rain_values[ordinal % rain_values.length];
|
||||
break;
|
||||
case BIOME_SIZE:
|
||||
BiomeSize[] size_values = BiomeSize.values();
|
||||
this.settings.biomeSize = size_values[ordinal % size_values.length];
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
System.out.println("settings currently: "+this.settings.toJson());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleBooleanSelection(int fieldId, boolean value)
|
||||
{
|
||||
GuiEntries entry = GuiEntries.fromId(fieldId);
|
||||
if (entry == null) {return;}
|
||||
|
||||
switch (entry)
|
||||
{
|
||||
case GENERATE_BOP_GEMS:
|
||||
this.settings.generateBopGems = value;
|
||||
break;
|
||||
case GENERATE_BOP_SOILS:
|
||||
this.settings.generateBopSoils = value;
|
||||
break;
|
||||
case GENERATE_BOP_TREES:
|
||||
this.settings.generateBopTrees = value;
|
||||
break;
|
||||
case GENERATE_BOP_GRASSES:
|
||||
this.settings.generateBopGrasses = value;
|
||||
break;
|
||||
case GENERATE_BOP_FOLIAGE:
|
||||
this.settings.generateBopFoliage = value;
|
||||
break;
|
||||
case GENERATE_BOP_FLOWERS:
|
||||
this.settings.generateBopFlowers = value;
|
||||
break;
|
||||
case GENERATE_BOP_PLANTS:
|
||||
this.settings.generateBopPlants = value;
|
||||
break;
|
||||
case GENERATE_BOP_WATER_PLANTS:
|
||||
this.settings.generateBopWaterPlants = value;
|
||||
break;
|
||||
case GENERATE_BOP_MUSHROOMS:
|
||||
this.settings.generateBopMushrooms = value;
|
||||
break;
|
||||
case GENERATE_ROCK_FORMATIONS:
|
||||
this.settings.generateRockFormations = value;
|
||||
break;
|
||||
case GENERATE_POISON_IVY:
|
||||
this.settings.generatePoisonIvy = value;
|
||||
break;
|
||||
case GENERATE_FLAX:
|
||||
this.settings.generateFlax = value;
|
||||
break;
|
||||
case GENERATE_BERRY_BUSHES:
|
||||
this.settings.generateBerryBushes = value;
|
||||
break;
|
||||
case GENERATE_THORNS:
|
||||
this.settings.generateThorns = value;
|
||||
break;
|
||||
case GENERATE_QUICKSAND:
|
||||
this.settings.generateQuicksand = value;
|
||||
break;
|
||||
case GENERATE_LIQUID_POISON:
|
||||
this.settings.generateLiquidPoison = value;
|
||||
break;
|
||||
case GENERATE_HOT_SPRINGS:
|
||||
this.settings.generateHotSprings = value;
|
||||
break;
|
||||
case GENERATE_NETHER_HIVES:
|
||||
this.settings.generateNetherHives = value;
|
||||
break;
|
||||
case GENERATE_NETHER_PLANTS:
|
||||
this.settings.generateNetherPlants = value;
|
||||
break;
|
||||
case GENERATE_END_FEATURES:
|
||||
this.settings.generateEndFeatures = value;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
System.out.println("settings currently: "+this.settings.toJson());
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void handleFloatSelection(int fieldId, float value)
|
||||
{
|
||||
GuiEntries entry = GuiEntries.fromId(fieldId);
|
||||
if (entry == null) {return;}
|
||||
|
||||
switch (entry)
|
||||
{
|
||||
case AMPLITUDE:
|
||||
this.settings.amplitude = value;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
System.out.println("settings currently: "+this.settings.toJson());
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void handleStringSelection(int fieldId, String value)
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void handleIntSelection(int fieldId, int value)
|
||||
{
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
// These 3 are the original functions required by GuiPageButtonList.GuiResponder - just pass off to the better named functions
|
||||
@Override
|
||||
public void setEntryValue(int fieldId, String value) {this.handleStringSelection(fieldId, value);}
|
||||
@Override
|
||||
public void setEntryValue(int fieldId, float value) {this.handleFloatSelection(fieldId, value);}
|
||||
@Override
|
||||
public void setEntryValue(int fieldId, boolean value) {this.handleBooleanSelection(fieldId, value);}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
protected void actionPerformed(GuiButton button) throws IOException
|
||||
{
|
||||
if (button.enabled)
|
||||
{
|
||||
Actions action = Actions.fromId(button.id);
|
||||
if (action == null) {return;}
|
||||
switch (action)
|
||||
{
|
||||
case DONE:
|
||||
this.parentScreen.chunkProviderSettingsJson = this.settings.toJson();
|
||||
System.out.println("settings sent to world screen "+this.parentScreen.chunkProviderSettingsJson);
|
||||
this.mc.displayGuiScreen(this.parentScreen);
|
||||
break;
|
||||
|
||||
case PREVIOUS:
|
||||
this.pageManager.gotToPrevPage(); // prev page
|
||||
this.showNewPage();
|
||||
break;
|
||||
|
||||
case NEXT:
|
||||
this.pageManager.goToNextPage(); // next page
|
||||
this.showNewPage();
|
||||
break;
|
||||
|
||||
case DEFAULTS:
|
||||
this.confirmSetDefaults(button.id);
|
||||
break;
|
||||
|
||||
case YES:
|
||||
this.handleModalClose();
|
||||
break;
|
||||
|
||||
case NO:
|
||||
this.modalAction = 0;
|
||||
this.handleModalClose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void doSetDefaults()
|
||||
{
|
||||
this.settings.setDefault();
|
||||
this.setupPages();
|
||||
}
|
||||
|
||||
private void confirmSetDefaults(int actionId)
|
||||
{
|
||||
this.modalAction = actionId;
|
||||
this.showModal(true);
|
||||
}
|
||||
|
||||
private void handleModalClose() throws IOException
|
||||
{
|
||||
Actions action = Actions.fromId(this.modalAction);
|
||||
if (action != null) {
|
||||
switch (action)
|
||||
{
|
||||
case DONE:
|
||||
this.actionPerformed((GuiListButton)this.pageManager.getActivePage().getGui(300));
|
||||
break;
|
||||
case DEFAULTS:
|
||||
this.doSetDefaults();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
this.modalAction = 0;
|
||||
this.field_175340_C = true;
|
||||
this.showModal(false);
|
||||
}
|
||||
|
||||
private void showModal(boolean flag)
|
||||
{
|
||||
this.yesButton.visible = flag;
|
||||
this.noButton.visible = flag;
|
||||
this.doneButton.enabled = !flag;
|
||||
this.prevButton.enabled = !flag;
|
||||
this.nextButton.enabled = !flag;
|
||||
this.defaultsButton.enabled = !flag;
|
||||
}
|
||||
|
||||
private void showNewPage()
|
||||
{
|
||||
this.prevButton.enabled = this.pageManager.getActivePage().pageNumber != 0;
|
||||
this.nextButton.enabled = this.pageManager.getActivePage().pageNumber != this.pageManager.getNumPages() - 1;
|
||||
this.pageInfo = I18n.format("book.pageIndicator", new Object[] {Integer.valueOf(this.pageManager.getActivePage().pageNumber + 1), Integer.valueOf(this.pageManager.getNumPages())});
|
||||
this.page0Title = this.pageNames[this.pageManager.getActivePage().pageNumber];
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void keyTyped(char typedChar, int keyCode) throws IOException
|
||||
{
|
||||
super.keyTyped(typedChar, keyCode);
|
||||
|
||||
if (this.modalAction == 0)
|
||||
{
|
||||
switch (keyCode)
|
||||
{
|
||||
case 200:
|
||||
this.func_175327_a(1.0F);
|
||||
break;
|
||||
case 208:
|
||||
this.func_175327_a(-1.0F);
|
||||
break;
|
||||
default:
|
||||
this.pageManager.getActivePage().keyTyped(typedChar, keyCode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void func_175327_a(float p_175327_1_)
|
||||
{
|
||||
Gui gui = this.pageManager.getActivePage().getFocusedGuiElement();
|
||||
|
||||
if (gui instanceof GuiTextField)
|
||||
{
|
||||
float f1 = p_175327_1_;
|
||||
|
||||
if (GuiScreen.isShiftKeyDown())
|
||||
{
|
||||
f1 = p_175327_1_ * 0.1F;
|
||||
|
||||
if (GuiScreen.isCtrlKeyDown())
|
||||
{
|
||||
f1 *= 0.1F;
|
||||
}
|
||||
}
|
||||
else if (GuiScreen.isCtrlKeyDown())
|
||||
{
|
||||
f1 = p_175327_1_ * 10.0F;
|
||||
|
||||
if (GuiScreen.isAltKeyDown())
|
||||
{
|
||||
f1 *= 10.0F;
|
||||
}
|
||||
}
|
||||
|
||||
GuiTextField guitextfield = (GuiTextField)gui;
|
||||
Float f2 = Floats.tryParse(guitextfield.getText());
|
||||
|
||||
if (f2 != null)
|
||||
{
|
||||
f2 = Float.valueOf(f2.floatValue() + f1);
|
||||
int i = guitextfield.getId();
|
||||
String s = this.stringFormatFloat(guitextfield.getId(), f2.floatValue());
|
||||
guitextfield.setText(s);
|
||||
this.setEntryValue(i, s);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawScreen(int mouseX, int mouseY, float partialTicks)
|
||||
{
|
||||
this.drawDefaultBackground();
|
||||
this.pageManager.getActivePage().drawScreen(mouseX, mouseY, partialTicks);
|
||||
this.drawCenteredString(this.fontRendererObj, this.screenTitle, this.width / 2, 2, 16777215);
|
||||
this.drawCenteredString(this.fontRendererObj, this.pageInfo, this.width / 2, 12, 16777215);
|
||||
this.drawCenteredString(this.fontRendererObj, this.page0Title, this.width / 2, 22, 16777215);
|
||||
super.drawScreen(mouseX, mouseY, partialTicks);
|
||||
|
||||
if (this.modalAction != 0)
|
||||
{
|
||||
drawRect(0, 0, this.width, this.height, Integer.MIN_VALUE);
|
||||
this.drawHorizontalLine(this.width / 2 - 91, this.width / 2 + 90, 99, -2039584);
|
||||
this.drawHorizontalLine(this.width / 2 - 91, this.width / 2 + 90, 185, -6250336);
|
||||
this.drawVerticalLine(this.width / 2 - 91, 99, 185, -2039584);
|
||||
this.drawVerticalLine(this.width / 2 + 90, 99, 185, -6250336);
|
||||
GlStateManager.disableLighting();
|
||||
GlStateManager.disableFog();
|
||||
Tessellator tessellator = Tessellator.getInstance();
|
||||
VertexBuffer worldrenderer = tessellator.getBuffer();
|
||||
this.mc.getTextureManager().bindTexture(OPTIONS_BACKGROUND);
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
|
||||
worldrenderer.pos((double)(this.width / 2 - 90), 185.0D, 0.0D).tex(0.0D, 2.65625D).color(64, 64, 64, 64).endVertex();
|
||||
worldrenderer.pos((double)(this.width / 2 + 90), 185.0D, 0.0D).tex(5.625D, 2.65625D).color(64, 64, 64, 64).endVertex();
|
||||
worldrenderer.pos((double)(this.width / 2 + 90), 100.0D, 0.0D).tex(5.625D, 0.0D).color(64, 64, 64, 64).endVertex();
|
||||
worldrenderer.pos((double)(this.width / 2 - 90), 100.0D, 0.0D).tex(0.0D, 0.0D).color(64, 64, 64, 64).endVertex();
|
||||
tessellator.draw();
|
||||
this.drawCenteredString(this.fontRendererObj, I18n.format("createWorld.customize.custom.confirmTitle", new Object[0]), this.width / 2, 105, 16777215);
|
||||
this.drawCenteredString(this.fontRendererObj, I18n.format("createWorld.customize.custom.confirm1", new Object[0]), this.width / 2, 125, 16777215);
|
||||
this.drawCenteredString(this.fontRendererObj, I18n.format("createWorld.customize.custom.confirm2", new Object[0]), this.width / 2, 135, 16777215);
|
||||
this.yesButton.drawButton(this.mc, mouseX, mouseY);
|
||||
this.noButton.drawButton(this.mc, mouseX, mouseY);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2014-2016, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
|
||||
package biomesoplenty.client.gui;
|
||||
|
||||
public class GuiBOPPageBiomes //extends GuiBOPPageDelegate
|
||||
{
|
||||
//Subclass implementing GuiListExtended.IGuiListEntry
|
||||
//Icon, label
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2014-2016, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
|
||||
package biomesoplenty.client.gui;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.Gui;
|
||||
import net.minecraft.client.gui.GuiSlot;
|
||||
|
||||
public abstract class GuiBOPPageDelegate extends GuiSlot
|
||||
{
|
||||
public final int pageNumber;
|
||||
|
||||
public GuiBOPPageDelegate(int width, int height, int top, int bottom, int slotHeight, int pageNumber)
|
||||
{
|
||||
super(Minecraft.getMinecraft(), width, height, top, bottom, slotHeight);
|
||||
|
||||
this.pageNumber = pageNumber;
|
||||
}
|
||||
|
||||
public abstract void setup();
|
||||
|
||||
|
||||
public abstract void setVisible(boolean isVisible);
|
||||
|
||||
public void mouseClicked(int mouseX, int mouseY, int mouseEvent) {}
|
||||
public void mouseReleased(int mouseX, int mouseY, int state) {}
|
||||
public void keyTyped(char typedChar, int keyCode) {}
|
||||
public Gui getFocusedGuiElement() { return null; }
|
||||
public Gui getGui(int fieldId) { return null; }
|
||||
}
|
|
@ -1,381 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2014-2016, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
|
||||
package biomesoplenty.client.gui;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
import com.google.common.base.Predicate;
|
||||
import com.google.common.base.Predicates;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.Gui;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiLabel;
|
||||
import net.minecraft.client.gui.GuiListExtended;
|
||||
import net.minecraft.client.gui.GuiPageButtonList;
|
||||
import net.minecraft.client.gui.GuiSlider;
|
||||
import net.minecraft.client.gui.GuiTextField;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
public abstract class GuiBOPPageList extends GuiBOPPageDelegate
|
||||
{
|
||||
public GuiBOPPageList(int width, int height, int top, int bottom, int slotHeight, int pageNumber)
|
||||
{
|
||||
super(width, height, top, bottom, slotHeight, pageNumber);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void elementClicked(int slotIndex, boolean isDoubleClick, int mouseX, int mouseY) {}
|
||||
|
||||
@Override
|
||||
protected boolean isSelected(int slotIndex)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawBackground() {}
|
||||
|
||||
@Override
|
||||
protected void drawSlot(int entryID, int p_180791_2_, int p_180791_3_, int p_180791_4_, int mouseXIn, int mouseYIn)
|
||||
{
|
||||
this.getListEntry(entryID).drawEntry(entryID, p_180791_2_, p_180791_3_, this.getListWidth(), p_180791_4_, mouseXIn, mouseYIn, this.getSlotIndexFromScreenCoords(mouseXIn, mouseYIn) == entryID);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void updateItemPos(int p_178040_1_, int p_178040_2_, int p_178040_3_)
|
||||
{
|
||||
this.getListEntry(p_178040_1_).setSelected(p_178040_1_, p_178040_2_, p_178040_3_);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mouseClicked(int mouseX, int mouseY, int mouseEvent)
|
||||
{
|
||||
if (this.isMouseYWithinSlotBounds(mouseY))
|
||||
{
|
||||
int l = this.getSlotIndexFromScreenCoords(mouseX, mouseY);
|
||||
|
||||
if (l >= 0)
|
||||
{
|
||||
int i1 = this.left + this.width / 2 - this.getListWidth() / 2 + 2;
|
||||
int j1 = this.top + 4 - this.getAmountScrolled() + l * this.slotHeight + this.headerPadding;
|
||||
int k1 = mouseX - i1;
|
||||
int l1 = mouseY - j1;
|
||||
|
||||
if (this.getListEntry(l).mousePressed(l, mouseX, mouseY, mouseEvent, k1, l1))
|
||||
{
|
||||
this.setEnabled(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mouseReleased(int mouseX, int mouseY, int state)
|
||||
{
|
||||
for (int l = 0; l < this.getSize(); ++l)
|
||||
{
|
||||
int i1 = this.left + this.width / 2 - this.getListWidth() / 2 + 2;
|
||||
int j1 = this.top + 4 - this.getAmountScrolled() + l * this.slotHeight + this.headerPadding;
|
||||
int k1 = mouseX - i1;
|
||||
int l1 = mouseY - j1;
|
||||
this.getListEntry(l).mouseReleased(l, mouseX, mouseY, state, k1, l1);
|
||||
}
|
||||
|
||||
this.setEnabled(true);
|
||||
}
|
||||
|
||||
public abstract GuiListExtended.IGuiListEntry getListEntry(int rowNum);
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static class GuiSlideEntry extends GuiBOPPageList.GuiFieldEntry
|
||||
{
|
||||
private final GuiSlider.FormatHelper formatHelper;
|
||||
private final float min;
|
||||
private final float max;
|
||||
private final float value;
|
||||
|
||||
public GuiSlideEntry(int fieldId, String labelText, boolean isVisible, GuiSlider.FormatHelper formatHelper, float min, float max, float value)
|
||||
{
|
||||
super(fieldId, labelText, isVisible);
|
||||
this.formatHelper = formatHelper;
|
||||
this.min = min;
|
||||
this.max = max;
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public GuiSlider.FormatHelper getFormatHelper()
|
||||
{
|
||||
return this.formatHelper;
|
||||
}
|
||||
|
||||
public float getMin()
|
||||
{
|
||||
return this.min;
|
||||
}
|
||||
|
||||
public float getMax()
|
||||
{
|
||||
return this.max;
|
||||
}
|
||||
|
||||
public float getValue()
|
||||
{
|
||||
return this.value;
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public interface GuiResponder extends GuiPageButtonList.GuiResponder
|
||||
{
|
||||
void handleEnumSelection(int fieldId, int ordinal);
|
||||
|
||||
void handleBooleanSelection(int fieldId, boolean value);
|
||||
|
||||
void handleFloatSelection(int fieldId, float value);
|
||||
|
||||
void handleStringSelection(int fieldId, String value);
|
||||
|
||||
void handleIntSelection(int fieldId, int value);
|
||||
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static class GuiFieldEntry
|
||||
{
|
||||
private final int fieldID;
|
||||
private final String labelText;
|
||||
private final boolean isVisible;
|
||||
|
||||
public GuiFieldEntry(int fieldId, String labelText, boolean isVisible)
|
||||
{
|
||||
this.fieldID = fieldId;
|
||||
this.labelText = labelText;
|
||||
this.isVisible = isVisible;
|
||||
}
|
||||
|
||||
public int getFieldId()
|
||||
{
|
||||
return this.fieldID;
|
||||
}
|
||||
|
||||
public String getLabelText()
|
||||
{
|
||||
return this.labelText;
|
||||
}
|
||||
|
||||
public boolean isVisible()
|
||||
{
|
||||
return this.isVisible;
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static class GuiLabelEntry extends GuiFieldEntry
|
||||
{
|
||||
public GuiLabelEntry(int fieldId, String labelText, boolean isVisible)
|
||||
{
|
||||
super(fieldId, labelText, isVisible);
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static class GuiRowEntry implements GuiListExtended.IGuiListEntry
|
||||
{
|
||||
private final Minecraft minecraft = Minecraft.getMinecraft();
|
||||
private final Gui guiLeft;
|
||||
private final Gui guiRight;
|
||||
Gui focusedGui;
|
||||
|
||||
public GuiRowEntry(Gui guiLeft, Gui guiRight)
|
||||
{
|
||||
this.guiLeft = guiLeft;
|
||||
this.guiRight = guiRight;
|
||||
}
|
||||
|
||||
public Gui getGuiLeft()
|
||||
{
|
||||
return this.guiLeft;
|
||||
}
|
||||
|
||||
public Gui getGuiRight()
|
||||
{
|
||||
return this.guiRight;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawEntry(int slotIndex, int x, int y, int listWidth, int slotHeight, int mouseX, int mouseY, boolean isVisible)
|
||||
{
|
||||
this.drawGui(this.guiLeft, y, mouseX, mouseY, false);
|
||||
this.drawGui(this.guiRight, y, mouseX, mouseY, false);
|
||||
}
|
||||
|
||||
private void drawGui(Gui gui, int y, int mouseX, int mouseY, boolean isVisible)
|
||||
{
|
||||
if (gui != null)
|
||||
{
|
||||
if (gui instanceof GuiButton)
|
||||
{
|
||||
this.drawGuiButton((GuiButton)gui, y, mouseX, mouseY, isVisible);
|
||||
}
|
||||
else if (gui instanceof GuiTextField)
|
||||
{
|
||||
this.drawGuiTextField((GuiTextField)gui, y, isVisible);
|
||||
}
|
||||
else if (gui instanceof GuiLabel)
|
||||
{
|
||||
this.drawGuiLabel((GuiLabel)gui, y, mouseX, mouseY, isVisible);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void drawGuiButton(GuiButton guiButton, int y, int mouseX, int mouseY, boolean isVisible)
|
||||
{
|
||||
guiButton.yPosition = y;
|
||||
|
||||
if (!isVisible)
|
||||
{
|
||||
guiButton.drawButton(this.minecraft, mouseX, mouseY);
|
||||
}
|
||||
}
|
||||
|
||||
private void drawGuiTextField(GuiTextField guiTextField, int y, boolean isVisible)
|
||||
{
|
||||
guiTextField.yPosition = y;
|
||||
|
||||
if (!isVisible)
|
||||
{
|
||||
guiTextField.drawTextBox();
|
||||
}
|
||||
}
|
||||
|
||||
private void drawGuiLabel(GuiLabel guiLabel, int y, int mouseX, int mouseY, boolean isVisible)
|
||||
{
|
||||
guiLabel.y = y;
|
||||
|
||||
if (!isVisible)
|
||||
{
|
||||
guiLabel.drawLabel(this.minecraft, mouseX, mouseY);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setSelected(int p_178011_1_, int p_178011_2_, int p_178011_3_)
|
||||
{
|
||||
this.drawGui(this.guiLeft, p_178011_3_, 0, 0, true);
|
||||
this.drawGui(this.guiRight, p_178011_3_, 0, 0, true);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean mousePressed(int slotIndex, int x, int y, int mouseEvent, int relativeX, int relativeY)
|
||||
{
|
||||
return this.doMousePressed(this.guiLeft, x, y, mouseEvent) || this.doMousePressed(this.guiRight, x, y, mouseEvent);
|
||||
}
|
||||
|
||||
private boolean doMousePressed(Gui gui, int x, int y, int mouseEvent)
|
||||
{
|
||||
if (gui == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else if (gui instanceof GuiButton)
|
||||
{
|
||||
if (((GuiButton)gui).mousePressed(this.minecraft, x, y))
|
||||
{
|
||||
this.focusedGui = gui;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if (gui instanceof GuiTextField)
|
||||
{
|
||||
((GuiTextField)gui).mouseClicked(x, y, mouseEvent);
|
||||
|
||||
if (((GuiTextField)gui).isFocused())
|
||||
{
|
||||
this.focusedGui = gui;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void mouseReleased(int slotIndex, int x, int y, int mouseEvent, int relativeX, int relativeY)
|
||||
{
|
||||
this.doMouseReleased(this.guiLeft, x, y);
|
||||
this.doMouseReleased(this.guiRight, x, y);
|
||||
}
|
||||
|
||||
public void doMouseReleased(Gui gui, int x, int y)
|
||||
{
|
||||
if (gui != null && (gui instanceof GuiButton))
|
||||
{
|
||||
((GuiButton)gui).mouseReleased(x, y);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static class GuiEnumButtonEntry<T extends Enum> extends GuiFieldEntry
|
||||
{
|
||||
private final T value;
|
||||
|
||||
public GuiEnumButtonEntry(int fieldId, String textLabel, boolean isVisible, T value)
|
||||
{
|
||||
super(fieldId, textLabel, isVisible);
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public T getValue()
|
||||
{
|
||||
return this.value;
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static class GuiButtonEntry extends GuiFieldEntry
|
||||
{
|
||||
private final boolean value;
|
||||
|
||||
public GuiButtonEntry(int fieldId, String textLabel, boolean isVisible, boolean value)
|
||||
{
|
||||
super(fieldId, textLabel, isVisible);
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public boolean getValue()
|
||||
{
|
||||
return this.value;
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static class EditBoxEntry extends GuiFieldEntry
|
||||
{
|
||||
private final Predicate validator;
|
||||
|
||||
public EditBoxEntry(int fieldId, String labelText, boolean isVisible, Predicate validator)
|
||||
{
|
||||
super(fieldId, labelText, isVisible);
|
||||
this.validator = (Predicate)Objects.firstNonNull(validator, Predicates.alwaysTrue());
|
||||
}
|
||||
|
||||
public Predicate getValidator()
|
||||
{
|
||||
return this.validator;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,61 +0,0 @@
|
|||
package biomesoplenty.client.gui;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiBOPPageManager
|
||||
{
|
||||
private GuiBOPPageDelegate[] pages;
|
||||
private GuiBOPPageDelegate activePage;
|
||||
|
||||
public GuiBOPPageManager(GuiBOPPageDelegate ... pages)
|
||||
{
|
||||
this.pages = pages;
|
||||
this.activePage = pages[0];
|
||||
}
|
||||
|
||||
public void setup()
|
||||
{
|
||||
for (GuiBOPPageDelegate page : pages)
|
||||
{
|
||||
page.setup();
|
||||
}
|
||||
}
|
||||
|
||||
public GuiBOPPageDelegate getActivePage()
|
||||
{
|
||||
return this.activePage;
|
||||
}
|
||||
|
||||
public int getNumPages()
|
||||
{
|
||||
return this.pages.length;
|
||||
}
|
||||
|
||||
public void gotToPrevPage()
|
||||
{
|
||||
if (this.activePage.pageNumber > 0)
|
||||
{
|
||||
int newPageNumber = this.activePage.pageNumber - 1;
|
||||
GuiBOPPageDelegate newPage = this.pages[newPageNumber];
|
||||
|
||||
this.activePage.setVisible(false);
|
||||
newPage.setVisible(true);
|
||||
this.activePage = newPage;
|
||||
}
|
||||
}
|
||||
|
||||
public void goToNextPage()
|
||||
{
|
||||
if (this.activePage.pageNumber < this.pages.length - 1)
|
||||
{
|
||||
int newPageNumber = this.activePage.pageNumber + 1;
|
||||
GuiBOPPageDelegate newPage = this.pages[newPageNumber];
|
||||
|
||||
this.activePage.setVisible(false);
|
||||
newPage.setVisible(true);
|
||||
this.activePage = newPage;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,370 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2014-2016, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
|
||||
package biomesoplenty.client.gui;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.lwjgl.input.Mouse;
|
||||
|
||||
import net.minecraft.client.gui.Gui;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.GuiLabel;
|
||||
import net.minecraft.client.gui.GuiListButton;
|
||||
import net.minecraft.client.gui.GuiListExtended;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraft.client.gui.GuiSlider;
|
||||
import net.minecraft.client.gui.GuiTextField;
|
||||
|
||||
public class GuiBOPPageTable extends GuiBOPPageList
|
||||
{
|
||||
private final List<GuiBOPPageList.GuiRowEntry> allRows = new ArrayList<GuiBOPPageList.GuiRowEntry>();
|
||||
private final Map<Integer, Gui> fieldIdToGuiMap = new HashMap<Integer, Gui>();
|
||||
private final List<GuiTextField> allTextFieldGuis = new ArrayList<GuiTextField>();
|
||||
private final GuiBOPPageList.GuiFieldEntry[] fields;
|
||||
private GuiBOPPageList.GuiResponder responder;
|
||||
private Gui focusedGui;
|
||||
|
||||
public GuiBOPPageTable(int width, int height, int top, int bottom, int slotHeight, int pageNumber, GuiBOPPageList.GuiResponder responder, GuiBOPPageList.GuiFieldEntry... fields)
|
||||
{
|
||||
super(width, height, top, bottom, slotHeight, pageNumber);
|
||||
|
||||
this.responder = responder;
|
||||
this.fields = fields;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setVisible(boolean isVisible)
|
||||
{
|
||||
if (isVisible)
|
||||
{
|
||||
for (GuiBOPPageList.GuiFieldEntry field : this.fields)
|
||||
{
|
||||
if (field != null)
|
||||
{
|
||||
Gui gui = this.fieldIdToGuiMap.get(field.getFieldId());
|
||||
this.setVisible(gui, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (GuiBOPPageList.GuiFieldEntry field : this.fields)
|
||||
{
|
||||
if (field != null)
|
||||
{
|
||||
Gui gui = this.fieldIdToGuiMap.get(field.getFieldId());
|
||||
this.setVisible(gui, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void setVisible(Gui gui, boolean isVisible)
|
||||
{
|
||||
if (gui instanceof GuiButton)
|
||||
{
|
||||
((GuiButton)gui).visible = isVisible;
|
||||
}
|
||||
else if (gui instanceof GuiTextField)
|
||||
{
|
||||
((GuiTextField)gui).setVisible(isVisible);
|
||||
}
|
||||
else if (gui instanceof GuiLabel)
|
||||
{
|
||||
((GuiLabel)gui).visible = isVisible;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setup()
|
||||
{
|
||||
// go through the fields in twos (so they go in 2 columns)
|
||||
for (int k = 0; k < fields.length; k += 2)
|
||||
{
|
||||
GuiBOPPageList.GuiFieldEntry fieldLeft = fields[k];
|
||||
GuiBOPPageList.GuiFieldEntry fieldRight = k < fields.length - 1 ? fields[k + 1] : null;
|
||||
|
||||
Gui guiLeft = this.createGui(fieldLeft, 0, fieldRight == null);
|
||||
Gui guiRight = this.createGui(fieldRight, 160, fieldLeft == null);
|
||||
|
||||
GuiBOPPageList.GuiRowEntry row = new GuiBOPPageList.GuiRowEntry(guiLeft, guiRight);
|
||||
this.allRows.add(row);
|
||||
|
||||
if (fieldLeft != null && guiLeft != null)
|
||||
{
|
||||
this.fieldIdToGuiMap.put(fieldLeft.getFieldId(), guiLeft);
|
||||
|
||||
if (guiLeft instanceof GuiTextField)
|
||||
{
|
||||
this.allTextFieldGuis.add((GuiTextField)guiLeft);
|
||||
}
|
||||
}
|
||||
|
||||
if (fieldRight != null && guiRight != null)
|
||||
{
|
||||
this.fieldIdToGuiMap.put(fieldRight.getFieldId(), guiRight);
|
||||
|
||||
if (guiRight instanceof GuiTextField)
|
||||
{
|
||||
this.allTextFieldGuis.add((GuiTextField)guiRight);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.resetRows();
|
||||
}
|
||||
|
||||
private void resetRows()
|
||||
{
|
||||
this.allRows.clear();
|
||||
|
||||
for (int i = 0; i < this.fields.length; i += 2)
|
||||
{
|
||||
GuiBOPPageList.GuiFieldEntry guilistentryLeft = this.fields[i];
|
||||
GuiBOPPageList.GuiFieldEntry guilistentryRight = i < this.fields.length - 1 ? this.fields[i + 1] : null;
|
||||
Gui guiLeft = (Gui)this.fieldIdToGuiMap.get(guilistentryLeft.getFieldId());
|
||||
Gui guiRight = guilistentryRight != null ? (Gui)this.fieldIdToGuiMap.get(guilistentryRight.getFieldId()) : null;
|
||||
GuiBOPPageList.GuiRowEntry guientry = new GuiBOPPageList.GuiRowEntry(guiLeft, guiRight);
|
||||
this.allRows.add(guientry);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Gui getFocusedGuiElement()
|
||||
{
|
||||
return this.focusedGui;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Gui getGui(int fieldId)
|
||||
{
|
||||
return (Gui)this.fieldIdToGuiMap.get(fieldId);
|
||||
}
|
||||
|
||||
|
||||
|
||||
private Gui createGui(GuiBOPPageList.GuiFieldEntry field, int xOffset, boolean hasNoNeighbor)
|
||||
{
|
||||
if (field instanceof GuiBOPPageList.GuiSlideEntry)
|
||||
{
|
||||
return (Gui)this.createSlider(this.width / 2 - 155 + xOffset, 0, (GuiBOPPageList.GuiSlideEntry)field);
|
||||
}
|
||||
else if (field instanceof GuiBOPPageList.GuiButtonEntry)
|
||||
{
|
||||
return (Gui)this.createListButton(this.width / 2 - 155 + xOffset, 0, (GuiBOPPageList.GuiButtonEntry)field);
|
||||
}
|
||||
else if (field instanceof GuiBOPPageList.EditBoxEntry)
|
||||
{
|
||||
return (Gui)this.createTextField(this.width / 2 - 155 + xOffset, 0, (GuiBOPPageList.EditBoxEntry)field);
|
||||
}
|
||||
else if (field instanceof GuiBOPPageList.GuiLabelEntry)
|
||||
{
|
||||
return (Gui)this.createLabel(this.width / 2 - 155 + xOffset, 0, (GuiBOPPageList.GuiLabelEntry)field, hasNoNeighbor);
|
||||
}
|
||||
else if (field instanceof GuiBOPPageList.GuiEnumButtonEntry)
|
||||
{
|
||||
return (Gui)this.createEnumButton(this.width / 2 - 155 + xOffset, 0, (GuiBOPPageList.GuiEnumButtonEntry)field);
|
||||
}
|
||||
else
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
//Mouse clicked
|
||||
|
||||
private GuiSlider createSlider(int xPosition, int yPosition, GuiBOPPageList.GuiSlideEntry field)
|
||||
{
|
||||
GuiSlider guislider = new GuiSlider(this.responder, field.getFieldId(), xPosition, yPosition, field.getLabelText(), field.getMin(), field.getMax(), field.getValue(), field.getFormatHelper());
|
||||
guislider.visible = field.isVisible();
|
||||
return guislider;
|
||||
}
|
||||
|
||||
private GuiListButton createListButton(int xPosition, int yPosition, GuiBOPPageList.GuiButtonEntry field)
|
||||
{
|
||||
GuiListButton guilistbutton = new GuiListButton(this.responder, field.getFieldId(), xPosition, yPosition, field.getLabelText(), field.getValue());
|
||||
guilistbutton.visible = field.isVisible();
|
||||
return guilistbutton;
|
||||
}
|
||||
|
||||
private GuiEnumButton createEnumButton(int xPosition, int yPosition, GuiBOPPageList.GuiEnumButtonEntry field)
|
||||
{
|
||||
GuiEnumButton guienumbutton = new GuiEnumButton(this.responder, field.getFieldId(), xPosition, yPosition, field.getLabelText(), field.getValue());
|
||||
guienumbutton.visible = field.isVisible();
|
||||
return guienumbutton;
|
||||
}
|
||||
|
||||
private GuiTextField createTextField(int xPosition, int yPosition, GuiBOPPageList.EditBoxEntry field)
|
||||
{
|
||||
GuiTextField guitextfield = new GuiTextField(field.getFieldId(), this.mc.fontRendererObj, xPosition, yPosition, 150, 20);
|
||||
guitextfield.setText(field.getLabelText());
|
||||
guitextfield.setGuiResponder(this.responder);
|
||||
guitextfield.setVisible(field.isVisible());
|
||||
guitextfield.setValidator(field.getValidator());
|
||||
return guitextfield;
|
||||
}
|
||||
|
||||
private GuiLabel createLabel(int xPosition, int yPosition, GuiBOPPageList.GuiLabelEntry field, boolean hasNoNeighbor)
|
||||
{
|
||||
GuiLabel guilabel;
|
||||
|
||||
if (hasNoNeighbor)
|
||||
{
|
||||
guilabel = new GuiLabel(this.mc.fontRendererObj, field.getFieldId(), xPosition, yPosition, this.width - xPosition * 2, 20, -1);
|
||||
}
|
||||
else
|
||||
{
|
||||
guilabel = new GuiLabel(this.mc.fontRendererObj, field.getFieldId(), xPosition, yPosition, 150, 20, -1);
|
||||
}
|
||||
|
||||
guilabel.visible = field.isVisible();
|
||||
guilabel.addLine(field.getLabelText());
|
||||
guilabel.setCentered();
|
||||
return guilabel;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void keyTyped(char typedChar, int keyCode)
|
||||
{
|
||||
if (this.focusedGui instanceof GuiTextField)
|
||||
{
|
||||
GuiTextField guitextfield = (GuiTextField)this.focusedGui;
|
||||
int j;
|
||||
|
||||
//Check if aren't we are pasting text
|
||||
if (!GuiScreen.isKeyComboCtrlV(keyCode))
|
||||
{
|
||||
if (keyCode == 15) //Tab is pressed
|
||||
{
|
||||
guitextfield.setFocused(false);
|
||||
int focusedGuiIndex = this.allTextFieldGuis.indexOf(this.focusedGui);
|
||||
|
||||
if (GuiScreen.isShiftKeyDown())
|
||||
{
|
||||
if (focusedGuiIndex == 0) //Jump back to the end of the list when at the start
|
||||
{
|
||||
focusedGuiIndex = this.allTextFieldGuis.size() - 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
--focusedGuiIndex; //Cycle backwards through the text fields
|
||||
}
|
||||
}
|
||||
else if (focusedGuiIndex == this.allTextFieldGuis.size() - 1) //Jump back to the start of the list when at the end
|
||||
{
|
||||
focusedGuiIndex = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
++focusedGuiIndex; //Cycle forwards through the text fields
|
||||
}
|
||||
|
||||
this.focusedGui = (Gui)this.allTextFieldGuis.get(focusedGuiIndex);
|
||||
guitextfield = (GuiTextField)this.focusedGui;
|
||||
guitextfield.setFocused(true);
|
||||
int k1 = guitextfield.yPosition + this.slotHeight;
|
||||
j = guitextfield.yPosition;
|
||||
|
||||
if (k1 > this.bottom)
|
||||
{
|
||||
this.amountScrolled += (float)(k1 - this.bottom);
|
||||
}
|
||||
else if (j < this.top)
|
||||
{
|
||||
this.amountScrolled = (float)j;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
guitextfield.textboxKeyTyped(typedChar, keyCode);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
String s = GuiScreen.getClipboardString();
|
||||
String[] astring = s.split(";");
|
||||
j = this.allTextFieldGuis.indexOf(this.focusedGui);
|
||||
int k = j;
|
||||
String[] astring1 = astring;
|
||||
int l = astring.length;
|
||||
|
||||
for (int i1 = 0; i1 < l; ++i1)
|
||||
{
|
||||
String s1 = astring1[i1];
|
||||
((GuiTextField)this.allTextFieldGuis.get(k)).setText(s1);
|
||||
|
||||
if (k == this.allTextFieldGuis.size() - 1)
|
||||
{
|
||||
k = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
++k;
|
||||
}
|
||||
|
||||
if (k == j)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public GuiBOPPageList.GuiRowEntry getRow(int rowNum)
|
||||
{
|
||||
return (GuiBOPPageList.GuiRowEntry)this.allRows.get(rowNum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSize()
|
||||
{
|
||||
return this.allRows.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getListWidth()
|
||||
{
|
||||
return 400;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getScrollBarX()
|
||||
{
|
||||
return super.getScrollBarX() + 32;
|
||||
}
|
||||
|
||||
@Override
|
||||
public GuiListExtended.IGuiListEntry getListEntry(int rowNum)
|
||||
{
|
||||
return this.getRow(rowNum);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void mouseClicked(int mouseX, int mouseY, int mouseButton)
|
||||
{
|
||||
super.mouseClicked(mouseX, mouseY, Mouse.getEventButton());
|
||||
int l = this.getSlotIndexFromScreenCoords(mouseX, mouseY);
|
||||
|
||||
if (l >= 0)
|
||||
{
|
||||
GuiBOPPageTable.GuiRowEntry row = this.getRow(l);
|
||||
|
||||
if (this.focusedGui != row.focusedGui && this.focusedGui != null && this.focusedGui instanceof GuiTextField)
|
||||
{
|
||||
((GuiTextField)this.focusedGui).setFocused(false);
|
||||
}
|
||||
|
||||
this.focusedGui = row.focusedGui;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,54 +0,0 @@
|
|||
package biomesoplenty.client.gui;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class GuiEnumButton<T extends Enum> extends GuiButton
|
||||
{
|
||||
private T value;
|
||||
private String localizationStr;
|
||||
private final GuiBOPPageList.GuiResponder guiResponder;
|
||||
|
||||
public GuiEnumButton(GuiBOPPageList.GuiResponder responder, int fieldId, int x, int y, String localizationStr, T initialValue)
|
||||
{
|
||||
super(fieldId, x, y, 150, 20, "");
|
||||
this.localizationStr = localizationStr;
|
||||
this.value = initialValue;
|
||||
this.displayString = this.buildDisplayString();
|
||||
this.guiResponder = responder;
|
||||
}
|
||||
|
||||
private String buildDisplayString()
|
||||
{
|
||||
return I18n.format(this.localizationStr, new Object[] {this.value.toString()});
|
||||
}
|
||||
|
||||
public void setValue(T value)
|
||||
{
|
||||
this.value = value;
|
||||
this.displayString = this.buildDisplayString();
|
||||
this.guiResponder.handleEnumSelection(this.id, value.ordinal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean mousePressed(Minecraft mc, int mouseX, int mouseY)
|
||||
{
|
||||
if (super.mousePressed(mc, mouseX, mouseY))
|
||||
{
|
||||
Object[] values = this.value.getClass().getEnumConstants();
|
||||
int len = values.length;
|
||||
this.value = (T)(values[(this.value.ordinal() + 1) % len]);
|
||||
this.displayString = this.buildDisplayString();
|
||||
this.guiResponder.handleEnumSelection(this.id, this.value.ordinal());
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
package biomesoplenty.client.gui;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiScreen;
|
||||
import net.minecraftforge.fml.client.IModGuiFactory;
|
||||
|
||||
public class GuiFactory implements IModGuiFactory {
|
||||
|
||||
@Override
|
||||
public void initialize(Minecraft minecraftInstance) { }
|
||||
|
||||
@Override
|
||||
public Class<? extends GuiScreen> mainConfigGuiClass()
|
||||
{
|
||||
return GuiBOPConfig.class;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<RuntimeOptionCategoryElement> runtimeGuiCategories() { return null; }
|
||||
|
||||
@Override
|
||||
public RuntimeOptionGuiHandler getHandlerFor(RuntimeOptionCategoryElement element) { return null; }
|
||||
}
|
|
@ -1,56 +0,0 @@
|
|||
package biomesoplenty.client.gui.inventory;
|
||||
|
||||
import static biomesoplenty.common.inventory.InventoryFlowerBasket.INVENTORY_ROWS;
|
||||
|
||||
import biomesoplenty.common.inventory.ContainerFlowerBasket;
|
||||
import biomesoplenty.common.inventory.InventoryFlowerBasket;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class GuiFlowerBasket extends GuiContainer
|
||||
{
|
||||
//Reuse the chest texture to save us some trouble
|
||||
private static final ResourceLocation CHEST_GUI_TEXTURE = new ResourceLocation("textures/gui/container/generic_54.png");
|
||||
|
||||
private final InventoryPlayer playerInventory;
|
||||
private InventoryFlowerBasket inventory;
|
||||
|
||||
public GuiFlowerBasket(EntityPlayer player, InventoryFlowerBasket inventoryFlowerBasket)
|
||||
{
|
||||
super(new ContainerFlowerBasket(player, inventoryFlowerBasket));
|
||||
|
||||
this.playerInventory = player.inventory;
|
||||
this.inventory = inventoryFlowerBasket;
|
||||
this.ySize = 114 + INVENTORY_ROWS * 18;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY)
|
||||
{
|
||||
String inventoryName = this.inventory.getDisplayName().getUnformattedText();
|
||||
this.fontRendererObj.drawString(inventoryName, 8, 6, 4210752);
|
||||
this.fontRendererObj.drawString(this.playerInventory.getDisplayName().getUnformattedText(), 8, this.ySize - 96 + 2, 4210752);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY)
|
||||
{
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
this.mc.getTextureManager().bindTexture(CHEST_GUI_TEXTURE);
|
||||
|
||||
int drawStartX = (this.width - this.xSize) / 2;
|
||||
int drawStartY = (this.height - this.ySize) / 2;
|
||||
|
||||
//Draw the top half of the bag inventory. Starts from the top left of the texture, offset by 17 pixels from the
|
||||
//top to account for the inventory title. Each row of slots is 18 pixels tall.
|
||||
this.drawTexturedModalRect(drawStartX, drawStartY, 0, 0, this.xSize, INVENTORY_ROWS * 18 + 17);
|
||||
|
||||
//Draw the player's hotbar and inventory (96 pixels tall). Begin drawing beneath the top half of the inventory, based
|
||||
//on the number of rows drawn. The bottom half of the inventory begins 126 pixels from the top of the image.
|
||||
this.drawTexturedModalRect(drawStartX, drawStartY + INVENTORY_ROWS * 18 + 17, 0, 126, this.xSize, 96);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,54 @@
|
|||
package biomesoplenty.client.handler;
|
||||
|
||||
import biomesoplenty.init.ModBiomes;
|
||||
import biomesoplenty.init.ModConfig;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.screen.*;
|
||||
import net.minecraft.util.text.TranslationTextComponent;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
import net.minecraftforge.client.event.GuiOpenEvent;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
@Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.FORGE)
|
||||
public class GuiEventHandler
|
||||
{
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
@SubscribeEvent
|
||||
public static void onGuiOpened(GuiOpenEvent event)
|
||||
{
|
||||
Screen gui = event.getGui();
|
||||
Minecraft mc = Minecraft.getInstance();
|
||||
Screen prevScreen = mc.screen;
|
||||
|
||||
// Default to the bop worldtype
|
||||
if (ModConfig.ClientConfig.useWorldType.get() && gui instanceof CreateWorldScreen && prevScreen instanceof WorldSelectionScreen)
|
||||
{
|
||||
WorldOptionsScreen optionsScreen = ((CreateWorldScreen)gui).worldGenSettingsComponent;
|
||||
optionsScreen.preset = Optional.of(findBopBiomeGeneratorTypeScreen());
|
||||
optionsScreen.settings = optionsScreen.preset.get().create(optionsScreen.registryHolder, optionsScreen.settings.seed(), optionsScreen.settings.generateFeatures(), optionsScreen.settings.generateBonusChest());
|
||||
}
|
||||
}
|
||||
|
||||
private static BiomeGeneratorTypeScreens findBopBiomeGeneratorTypeScreen()
|
||||
{
|
||||
for (BiomeGeneratorTypeScreens screen : BiomeGeneratorTypeScreens.PRESETS)
|
||||
{
|
||||
// Skip screens that don't use a TranslationTextComponent because definitely they're not ours
|
||||
if (!(screen.description instanceof TranslationTextComponent))
|
||||
continue;
|
||||
|
||||
TranslationTextComponent desc = (TranslationTextComponent)screen.description;
|
||||
|
||||
if (desc.getKey().equals("generator.minecraft.biomesoplenty"))
|
||||
{
|
||||
return screen;
|
||||
}
|
||||
}
|
||||
|
||||
throw new RuntimeException("Failed to locate biomesoplenty biome generator type screen!");
|
||||
}
|
||||
}
|
|
@ -1,87 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2014-2016, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
|
||||
package biomesoplenty.client.model;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
import biomesoplenty.client.util.ModelUtils;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.entity.EntityPlayerSP;
|
||||
import net.minecraft.client.renderer.block.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.block.model.ItemOverride;
|
||||
import net.minecraft.client.renderer.block.model.ItemOverrideList;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.model.IModel;
|
||||
|
||||
public class ModelBiomeFinder extends ItemOverrideList
|
||||
{
|
||||
private IBakedModel[] frames;
|
||||
|
||||
public ModelBiomeFinder(IModel defaultModel, TextureAtlasSprite[] frameTextures)
|
||||
{
|
||||
super(ImmutableList.<ItemOverride>of());
|
||||
|
||||
this.frames = ModelUtils.generateModelsForTextures(defaultModel, frameTextures);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBakedModel handleItemState(IBakedModel originalModel, ItemStack stack, World world, EntityLivingBase entity)
|
||||
{
|
||||
EntityPlayerSP player = Minecraft.getMinecraft().thePlayer;
|
||||
if (player == null) {return this.frames[0];}
|
||||
|
||||
NBTTagCompound nbt = stack.getTagCompound();
|
||||
if (nbt != null && nbt.hasKey("biomeIDToFind"))
|
||||
{
|
||||
if (nbt.hasKey("searchStarted"))
|
||||
{
|
||||
// searching for biome, but not yet found indicate searching by flashing
|
||||
return this.getFlashingFrame(player);
|
||||
}
|
||||
else if (nbt.getBoolean("found"))
|
||||
{
|
||||
// if the biome has been found, point at it
|
||||
int posX = nbt.getInteger("posX");
|
||||
int posZ = nbt.getInteger("posZ");
|
||||
return getFrameForPositionRelativeToPlayer(player, posX, posZ);
|
||||
}
|
||||
else
|
||||
{
|
||||
// the search has not yet been started, show all sectors lit
|
||||
return this.frames[9];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// if we've got here, the biome finder has not been bound to a biome yet - show no sectors lit
|
||||
return this.frames[8];
|
||||
}
|
||||
}
|
||||
|
||||
public IBakedModel getFlashingFrame(EntityPlayerSP player)
|
||||
{
|
||||
return (player.getRNG().nextInt(2) == 0 ? this.frames[10] : this.frames[11]);
|
||||
}
|
||||
|
||||
public IBakedModel getFrameForPositionRelativeToPlayer(EntityPlayer player, int biomePosX, int biomePosZ)
|
||||
{
|
||||
double xDiff = (double)biomePosX - player.posX;
|
||||
double zDiff = (double)biomePosZ - player.posZ;
|
||||
// angle (in degrees) of direction from player to biome (relative to player rotation)
|
||||
double angleDiff = (Math.atan2(zDiff, xDiff) * 180.0D / Math.PI) + 270.0D - player.rotationYaw;
|
||||
// there are 8 sectors on the biome finder, so 45 degrees each (offset by 22.5 to center the angle in the middle of the sector)
|
||||
int sector = (int)Math.floor((angleDiff + 22.5D) / 45.0D);
|
||||
return this.frames[((sector % 8) + 8) % 8];
|
||||
}
|
||||
}
|
|
@ -1,51 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2016, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
|
||||
package biomesoplenty.client.model;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
import biomesoplenty.common.inventory.InventoryFlowerBasket;
|
||||
import net.minecraft.client.renderer.block.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.block.model.ItemOverride;
|
||||
import net.minecraft.client.renderer.block.model.ItemOverrideList;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class ModelFlowerBasket extends ItemOverrideList
|
||||
{
|
||||
private IBakedModel emptyBakedModel;
|
||||
private IBakedModel filledBakedModel;
|
||||
|
||||
public ModelFlowerBasket(IBakedModel emptyModel, IBakedModel filledModel)
|
||||
{
|
||||
super(ImmutableList.<ItemOverride>of());
|
||||
|
||||
this.emptyBakedModel = emptyModel;
|
||||
this.filledBakedModel = filledModel;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBakedModel handleItemState(IBakedModel originalModel, ItemStack stack, World world, EntityLivingBase entity)
|
||||
{
|
||||
InventoryFlowerBasket inventory = new InventoryFlowerBasket(stack, null);
|
||||
boolean filled = false;
|
||||
|
||||
for (int index = 0; index < inventory.getSizeInventory(); ++index)
|
||||
{
|
||||
if (inventory.getStackInSlot(index) != null)
|
||||
{
|
||||
filled = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return filled ? this.filledBakedModel : this.emptyBakedModel;
|
||||
}
|
||||
}
|
|
@ -1,111 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2014-2016, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
|
||||
package biomesoplenty.client.particle;
|
||||
|
||||
import biomesoplenty.core.ClientProxy;
|
||||
import net.minecraft.client.particle.Particle;
|
||||
import net.minecraft.client.renderer.GlStateManager;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.client.FMLClientHandler;
|
||||
|
||||
public class EntityPixieTrailFX extends Particle
|
||||
{
|
||||
|
||||
public EntityPixieTrailFX(World world, double xCoordIn, double yCoordIn, double zCoordIn, double motionXIn, double motionYIn, double motionZIn)
|
||||
{
|
||||
this(world, xCoordIn, yCoordIn, zCoordIn, motionXIn, motionYIn, motionZIn, 1.0F);
|
||||
}
|
||||
|
||||
public EntityPixieTrailFX(World world, double xCoordIn, double yCoordIn, double zCoordIn, double motionXIn, double motionYIn, double motionZIn, float par14)
|
||||
{
|
||||
super(world, xCoordIn, yCoordIn, zCoordIn, 0.0D, 0.0D, 0.0D);
|
||||
|
||||
// pixie trail texture is row from position 0,1 to position 8,1
|
||||
this.particleTextureIndexX = 7;
|
||||
this.particleTextureIndexY = 1;
|
||||
|
||||
this.motionX *= 0.10000000149011612D;
|
||||
this.motionY *= 0.10000000149011612D;
|
||||
this.motionZ *= 0.10000000149011612D;
|
||||
this.motionX += motionXIn;
|
||||
this.motionY += motionYIn;
|
||||
this.motionZ += motionZIn;
|
||||
this.particleScale *= 0.75F;
|
||||
this.particleScale *= par14;
|
||||
this.particleMaxAge = (int)((8.0D / (Math.random() * 0.8D + 0.2D)) * 8);
|
||||
this.particleMaxAge = (int)((float)this.particleMaxAge * par14);
|
||||
this.particleAge = (particleMaxAge / 2) + (int)((particleMaxAge / 2) * world.rand.nextInt(7));
|
||||
this.particleAlpha = 1.0F;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFXLayer()
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderParticle(VertexBuffer renderer, Entity entity, float partialTicks, float rotX, float rotXZ, float rotZ, float rotYZ, float rotXY)
|
||||
{
|
||||
|
||||
// EffectRenderer will by default bind the vanilla particles texture, override with our own
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(ClientProxy.particleTexturesLocation);
|
||||
|
||||
float scaleMultiplier = ((float)this.particleAge + partialTicks) / (float)this.particleMaxAge * 32.0F;
|
||||
scaleMultiplier = MathHelper.clamp_float(scaleMultiplier, 0.0F, 1.0F);
|
||||
this.particleScale = this.particleScale * scaleMultiplier;
|
||||
|
||||
GlStateManager.depthMask(false);
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.blendFunc(770, 1);
|
||||
|
||||
super.renderParticle(renderer, entity, partialTicks, rotX, rotXZ, rotZ, rotYZ, rotXY);
|
||||
|
||||
GlStateManager.disableBlend();
|
||||
GlStateManager.depthMask(true);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate()
|
||||
{
|
||||
prevPosX = posX;
|
||||
prevPosY = posY;
|
||||
prevPosZ = posZ;
|
||||
|
||||
if (particleAge++ >= particleMaxAge)
|
||||
{
|
||||
this.setExpired();
|
||||
}
|
||||
|
||||
this.particleTextureIndexX = 7 - particleAge * 8 / particleMaxAge;
|
||||
this.moveEntity(motionX, motionY, motionZ);
|
||||
|
||||
if (posY == prevPosY)
|
||||
{
|
||||
motionX *= 1.1D;
|
||||
motionZ *= 1.1D;
|
||||
}
|
||||
|
||||
motionX *= 0.9599999785423279D;
|
||||
motionY *= 0.9599999785423279D;
|
||||
motionZ *= 0.9599999785423279D;
|
||||
|
||||
if (isCollided)
|
||||
{
|
||||
motionX *= 0.699999988079071D;
|
||||
motionZ *= 0.699999988079071D;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -1,80 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2014-2016, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
|
||||
package biomesoplenty.client.particle;
|
||||
|
||||
import net.minecraft.client.particle.Particle;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.client.FMLClientHandler;
|
||||
|
||||
public class EntityTrailFX extends Particle
|
||||
{
|
||||
private ResourceLocation trailResource;
|
||||
/**The index of the flower to be spawned, values are 0-3*/
|
||||
private int particleIndex;
|
||||
private double startY;
|
||||
|
||||
public EntityTrailFX(World world, double x, double y, double z, String trailName)
|
||||
{
|
||||
super(world, x, y, z);
|
||||
|
||||
this.trailResource = new ResourceLocation("biomesoplenty:textures/particles/" + trailName + ".png");
|
||||
this.motionX = this.motionY = this.motionZ = 0.0D; //Trail particles should not move
|
||||
this.particleMaxAge = 550;
|
||||
this.particleIndex = this.rand.nextInt(4); //Choose a random index on creation
|
||||
this.startY = y; //Where y coordinate where this particle has started (before it moves downwards with time)
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderParticle(VertexBuffer renderer, Entity entity, float partialTicks, float rotX, float rotXZ, float rotZ, float rotYZ, float rotXY)
|
||||
{
|
||||
// EffectRenderer will by default bind the vanilla particles texture, override with our own
|
||||
FMLClientHandler.instance().getClient().renderEngine.bindTexture(this.trailResource);
|
||||
|
||||
//The overall maxU and maxV of the particle sheet is 1.0 (representing 16px)
|
||||
float minU = (particleIndex % 2) * 0.5F; //Particles on the left side are 0, right are 0.5
|
||||
float maxU = minU + 0.5F; //Each flower is 8px wide (half of the overall sheet)
|
||||
|
||||
float minV = (particleIndex / 2) * 0.5F; //Uses integer rounding errors (0 and 1 = 0, 2 and 3 = 1)
|
||||
float maxV = minV + 0.5F; //Each flower is 8px high (half of the overall sheet)
|
||||
|
||||
//Vanilla particle rendering
|
||||
float alpha = 1.0F - Math.min(1.0F, 2.0F * this.particleAge / this.particleMaxAge);
|
||||
float width = 0.15F;
|
||||
float x = (float)(prevPosX + (posX - prevPosX) - interpPosX);
|
||||
float y = (float)(prevPosY + (posY - prevPosY) - interpPosY);
|
||||
float z = (float)(prevPosZ + (posZ - prevPosZ) - interpPosZ);
|
||||
|
||||
int i = this.getBrightnessForRender(partialTicks);
|
||||
int j = i >> 16 & 65535;
|
||||
int k = i & 65535;
|
||||
|
||||
renderer.pos(x - width, y, z + width).tex(minU, maxV).color(this.particleRed, this.particleGreen, this.particleBlue, alpha).lightmap(j, k).endVertex();
|
||||
renderer.pos(x + width, y, z + width).tex(minU, minV).color(this.particleRed, this.particleGreen, this.particleBlue, alpha).lightmap(j, k).endVertex();
|
||||
renderer.pos(x + width, y, z - width).tex(maxU, minV).color(this.particleRed, this.particleGreen, this.particleBlue, alpha).lightmap(j, k).endVertex();
|
||||
renderer.pos(x - width, y, z - width).tex(maxU, maxV).color(this.particleRed, this.particleGreen, this.particleBlue, alpha).lightmap(j, k).endVertex();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFXLayer()
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate()
|
||||
{
|
||||
super.onUpdate();
|
||||
|
||||
this.posY = this.startY - 0.01 * ((float)this.particleAge / (float)this.particleMaxAge);
|
||||
this.prevPosY = this.posY;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,78 @@
|
|||
package biomesoplenty.client.renderer;
|
||||
|
||||
import biomesoplenty.common.entity.item.BoatEntityBOP;
|
||||
import com.mojang.blaze3d.matrix.MatrixStack;
|
||||
import com.mojang.blaze3d.vertex.IVertexBuilder;
|
||||
import net.minecraft.client.renderer.IRenderTypeBuffer;
|
||||
import net.minecraft.client.renderer.RenderType;
|
||||
import net.minecraft.client.renderer.entity.EntityRenderer;
|
||||
import net.minecraft.client.renderer.entity.EntityRendererManager;
|
||||
import net.minecraft.client.renderer.entity.model.BoatModel;
|
||||
import net.minecraft.client.renderer.texture.OverlayTexture;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.util.math.vector.Quaternion;
|
||||
import net.minecraft.util.math.vector.Vector3f;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
|
||||
import static biomesoplenty.core.BiomesOPlenty.MOD_ID;
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public class BoatRendererBOP extends EntityRenderer<BoatEntityBOP> {
|
||||
protected final BoatModel model = new BoatModel();
|
||||
|
||||
public BoatRendererBOP(EntityRendererManager renderer) {
|
||||
super(renderer);
|
||||
this.shadowRadius = 0.8f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(BoatEntityBOP entity, float entityYaw, float partialTicks, MatrixStack matrixStack, IRenderTypeBuffer renderTypeBuffer, int light) {
|
||||
matrixStack.pushPose();
|
||||
matrixStack.translate(0d, 0.375d, 0d);
|
||||
matrixStack.mulPose(Vector3f.YP.rotationDegrees(180f - entityYaw));
|
||||
float f = (float) entity.getHurtTime() - partialTicks;
|
||||
float f1 = entity.getDamage() - partialTicks;
|
||||
if (f1 < 0f) {
|
||||
f1 = 0f;
|
||||
}
|
||||
if (f > 0f) {
|
||||
matrixStack.mulPose(Vector3f.XP.rotationDegrees(MathHelper.sin(f) * f * f1 / 10f * (float) entity.getHurtDir()));
|
||||
}
|
||||
float f2 = entity.getBubbleAngle(partialTicks);
|
||||
if (!MathHelper.equal(f2, 0f)) {
|
||||
matrixStack.mulPose(new Quaternion(new Vector3f(1f, 0f, 1f), entity.getBubbleAngle(partialTicks), true));
|
||||
}
|
||||
matrixStack.scale(-1f, -1f, 1f);
|
||||
matrixStack.mulPose(Vector3f.YP.rotationDegrees(90.0F));
|
||||
this.model.setupAnim(entity, partialTicks, 0f, -0.1f, 0f, 0f);
|
||||
IVertexBuilder ivertexbuilder = renderTypeBuffer.getBuffer(this.model.renderType(this.getTextureLocation(entity)));
|
||||
this.model.renderToBuffer(matrixStack, ivertexbuilder, light, OverlayTexture.NO_OVERLAY, 1f, 1f, 1f, 1f);
|
||||
if (!entity.isUnderWater()) {
|
||||
IVertexBuilder ivertexbuilder1 = renderTypeBuffer.getBuffer(RenderType.waterMask());
|
||||
this.model.waterPatch().render(matrixStack, ivertexbuilder1, light, OverlayTexture.NO_OVERLAY);
|
||||
}
|
||||
matrixStack.popPose();
|
||||
super.render(entity, entityYaw, partialTicks, matrixStack, renderTypeBuffer, light);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceLocation getTextureLocation(BoatEntityBOP entity) {
|
||||
return BOAT_TEXTURE_LOCATIONS[entity.getModel().ordinal()];
|
||||
}
|
||||
|
||||
private static final ResourceLocation[] BOAT_TEXTURE_LOCATIONS = new ResourceLocation[] {
|
||||
new ResourceLocation(MOD_ID, "textures/entity/boat/fir.png"),
|
||||
new ResourceLocation(MOD_ID, "textures/entity/boat/redwood.png"),
|
||||
new ResourceLocation(MOD_ID, "textures/entity/boat/cherry.png"),
|
||||
new ResourceLocation(MOD_ID, "textures/entity/boat/mahogany.png"),
|
||||
new ResourceLocation(MOD_ID, "textures/entity/boat/jacaranda.png"),
|
||||
new ResourceLocation(MOD_ID, "textures/entity/boat/palm.png"),
|
||||
new ResourceLocation(MOD_ID, "textures/entity/boat/willow.png"),
|
||||
new ResourceLocation(MOD_ID, "textures/entity/boat/dead.png"),
|
||||
new ResourceLocation(MOD_ID, "textures/entity/boat/magic.png"),
|
||||
new ResourceLocation(MOD_ID, "textures/entity/boat/umbran.png"),
|
||||
new ResourceLocation(MOD_ID, "textures/entity/boat/hellbark.png")
|
||||
};
|
||||
}
|
|
@ -1,35 +0,0 @@
|
|||
package biomesoplenty.client.texture;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
import net.minecraft.client.resources.IResourcePack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.fml.client.FMLClientHandler;
|
||||
import net.minecraftforge.fml.client.FMLFileResourcePack;
|
||||
import net.minecraftforge.fml.common.ModContainer;
|
||||
|
||||
//TODO: Switch title panorama replacement over to using this, allows resource packs to be used normally
|
||||
public class ForgeRedirectedResourcePack extends FMLFileResourcePack
|
||||
{
|
||||
private IResourcePack bopResourcePack;
|
||||
|
||||
public ForgeRedirectedResourcePack(ModContainer container)
|
||||
{
|
||||
super(container);
|
||||
|
||||
this.bopResourcePack = (IResourcePack)FMLClientHandler.instance().getResourcePackFor("BiomesOPlenty");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected InputStream getInputStreamByName(String resourceName) throws IOException
|
||||
{
|
||||
//Replace the bucket textures with our new ones
|
||||
if (resourceName.equals("assets/forge/textures/items/bucket_cover.png") || resourceName.equals("assets/forge/textures/items/bucket_base.png"))
|
||||
{
|
||||
return bopResourcePack.getInputStream(new ResourceLocation("biomesoplenty:textures/replacements/" + resourceName.substring(resourceName.indexOf("bucket"))));
|
||||
}
|
||||
|
||||
return super.getInputStreamByName(resourceName);
|
||||
}
|
||||
}
|
|
@ -1,43 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2014-2016, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
|
||||
package biomesoplenty.client.util;
|
||||
|
||||
import com.google.common.base.Function;
|
||||
|
||||
import net.minecraft.client.renderer.block.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.model.IModel;
|
||||
|
||||
public class ModelUtils
|
||||
{
|
||||
public static IBakedModel[] generateModelsForTextures(IModel model, TextureAtlasSprite[] textures)
|
||||
{
|
||||
IBakedModel[] output = new IBakedModel[textures.length];
|
||||
|
||||
for (int i = 0; i < output.length; i++)
|
||||
{
|
||||
final TextureAtlasSprite texture = textures[i];
|
||||
|
||||
//Defines how TextureAtlasSprites are obtained whilst baking
|
||||
Function<ResourceLocation, TextureAtlasSprite> textureGetter = new Function<ResourceLocation, TextureAtlasSprite>()
|
||||
{
|
||||
public TextureAtlasSprite apply(ResourceLocation location)
|
||||
{
|
||||
return texture;
|
||||
}
|
||||
};
|
||||
|
||||
output[i] = model.bake(model.getDefaultState(), DefaultVertexFormats.ITEM, textureGetter);
|
||||
}
|
||||
|
||||
return output;
|
||||
}
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2014-2016, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
|
||||
package biomesoplenty.client.util;
|
||||
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
public class TextureUtils
|
||||
{
|
||||
public static final String TEXTURES_BASE_PATH = "textures";
|
||||
|
||||
public static ResourceLocation completeResourceLocation(ResourceLocation location, int mode)
|
||||
{
|
||||
return mode == 0 ? new ResourceLocation(location.getResourceDomain(), String.format("%s/%s%s", new Object[] {TEXTURES_BASE_PATH, location.getResourcePath(), ".png"})) : new ResourceLocation(location.getResourceDomain(), String.format("%s/mipmaps/%s.%d%s", new Object[] {TEXTURES_BASE_PATH, location.getResourcePath(), Integer.valueOf(mode), ".png"}));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,64 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2014-2019, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
package biomesoplenty.common.biome;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.TreeMap;
|
||||
|
||||
public class BiomeConfigData
|
||||
{
|
||||
@SerializedName("standard_weights")
|
||||
public TreeMap<String, WeightedBiomeEntry> standardBiomeWeights = Maps.newTreeMap();
|
||||
|
||||
@SerializedName("technical_biome_toggles")
|
||||
public TreeMap<String, ToggleableBiomeEntry> technicalBiomeEntries = Maps.newTreeMap();
|
||||
|
||||
@SerializedName("sub_biome_weights")
|
||||
public TreeMap<String, SubBiomeEntry> subBiomeEntries = Maps.newTreeMap();
|
||||
|
||||
@SerializedName("island_biome_toggles")
|
||||
public TreeMap<String, ToggleableBiomeEntry> islandBiomeEntries = Maps.newTreeMap();
|
||||
|
||||
@SerializedName("vanilla_biome_weights")
|
||||
public TreeMap<String, WeightedBiomeEntry> vanillaBiomeEntries = Maps.newTreeMap();
|
||||
|
||||
public static class WeightedBiomeEntry
|
||||
{
|
||||
public int weight;
|
||||
|
||||
public WeightedBiomeEntry(int weight)
|
||||
{
|
||||
this.weight = weight;
|
||||
}
|
||||
}
|
||||
|
||||
public static class ToggleableBiomeEntry
|
||||
{
|
||||
public boolean enabled;
|
||||
|
||||
public ToggleableBiomeEntry(boolean enabled)
|
||||
{
|
||||
this.enabled = enabled;
|
||||
}
|
||||
}
|
||||
|
||||
public static class SubBiomeEntry
|
||||
{
|
||||
public int weight;
|
||||
public float rarity;
|
||||
|
||||
public SubBiomeEntry(int weight, float rarity)
|
||||
{
|
||||
this.weight = weight;
|
||||
this.rarity = rarity;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,90 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2020, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
package biomesoplenty.common.biome;
|
||||
|
||||
import biomesoplenty.api.enums.BOPClimates;
|
||||
import biomesoplenty.common.util.biome.BiomeUtil;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import net.minecraft.util.RegistryKey;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
import net.minecraft.world.biome.Biomes;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.function.BiFunction;
|
||||
|
||||
public class BiomeMetadata
|
||||
{
|
||||
private final ImmutableMap<BOPClimates, Integer> weightMap;
|
||||
|
||||
@Nullable
|
||||
private final RegistryKey<Biome> beachBiome;
|
||||
|
||||
@Nullable
|
||||
private final RegistryKey<Biome> riverBiome;
|
||||
|
||||
@Nullable
|
||||
private final BiFunction<Double, Double, Integer> foliageColorFunction;
|
||||
|
||||
@Nullable
|
||||
private final BiFunction<Double, Double, Integer> grassColorFunction;
|
||||
|
||||
@Nullable
|
||||
private final BiFunction<Double, Double, Integer> waterColorFunction;
|
||||
|
||||
protected BiomeMetadata(Map<BOPClimates, Integer> weights, @Nullable RegistryKey<Biome> beachBiome, @Nullable RegistryKey<Biome> riverBiome, BiFunction<Double, Double, Integer> foliageColorFunction, BiFunction<Double, Double, Integer> grassColorFunction, BiFunction<Double, Double, Integer> waterColorFunction)
|
||||
{
|
||||
this.weightMap = ImmutableMap.copyOf(weights);
|
||||
this.beachBiome = beachBiome;
|
||||
this.riverBiome = riverBiome;
|
||||
this.foliageColorFunction = foliageColorFunction;
|
||||
this.grassColorFunction = grassColorFunction;
|
||||
this.waterColorFunction = waterColorFunction;
|
||||
}
|
||||
|
||||
public Map<BOPClimates, Integer> getWeightMap()
|
||||
{
|
||||
return this.weightMap;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public RegistryKey<Biome> getBeachBiome()
|
||||
{
|
||||
return this.beachBiome;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public RegistryKey<Biome> getRiverBiome()
|
||||
{
|
||||
return this.riverBiome;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public BiFunction<Double, Double, Integer> getFoliageColorFunction()
|
||||
{
|
||||
return this.foliageColorFunction;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public BiFunction<Double, Double, Integer> getGrassColorFunction()
|
||||
{
|
||||
return this.grassColorFunction;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public BiFunction<Double, Double, Integer> getWaterColorFunction()
|
||||
{
|
||||
return this.waterColorFunction;
|
||||
}
|
||||
|
||||
public boolean hasWeights()
|
||||
{
|
||||
return !this.weightMap.isEmpty() && !this.weightMap.entrySet().stream().allMatch((entry) -> entry.getValue().equals(0));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,680 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2014-2019, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
package biomesoplenty.common.biome;
|
||||
|
||||
import biomesoplenty.api.biome.BOPBiomes;
|
||||
import biomesoplenty.api.enums.BOPClimates;
|
||||
import biomesoplenty.common.util.biome.BiomeUtil;
|
||||
import biomesoplenty.common.util.config.JsonUtil;
|
||||
import biomesoplenty.core.BiomesOPlenty;
|
||||
import biomesoplenty.init.ModBiomes;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.common.collect.Sets;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import net.minecraft.util.RegistryKey;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
import net.minecraftforge.fml.loading.FMLPaths;
|
||||
import net.minecraftforge.registries.ForgeRegistries;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.io.File;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.util.*;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
public class BiomeRegistry
|
||||
{
|
||||
private static final String CONFIG_FILE_NAME = "biomes.json";
|
||||
|
||||
private static Map<RegistrationType, List<DeferredRegistration>> deferrances = Maps.newHashMap();
|
||||
|
||||
public static void deferStandardRegistration(BiomeTemplate biome, String name)
|
||||
{
|
||||
defer(RegistrationType.STANDARD_BIOME, new StandardBiomeRegistrationData(biome, name));
|
||||
}
|
||||
|
||||
public static void deferTechnicalBiomeRegistration(BiomeTemplate biome, String name)
|
||||
{
|
||||
defer(RegistrationType.TECHNICAL_BIOME, new ToggleableStandardBiomeRegistrationData(biome, name, true));
|
||||
}
|
||||
|
||||
public static void deferSubBiomeRegistration(RegistryKey<Biome> parent, RegistryKey<Biome> child, int weight, float rarity)
|
||||
{
|
||||
// Don't register sub biome if the parent or child don't exist
|
||||
if (!BiomeUtil.exists(parent) || !BiomeUtil.exists(child)) {
|
||||
return;
|
||||
}
|
||||
|
||||
defer(RegistrationType.SUB_BIOME, new SubBiomeRegistrationData(parent, child, weight, rarity));
|
||||
}
|
||||
|
||||
public static void deferIslandBiomeRegistration(RegistryKey<Biome> key, BOPClimates climate, int weight)
|
||||
{
|
||||
if (!BiomeUtil.exists(key))
|
||||
return;
|
||||
|
||||
defer(RegistrationType.ISLAND_BIOME, new SingleClimateRegistrationData(key, climate, weight));
|
||||
}
|
||||
|
||||
public static void deferVanillaBiomeRegistration(RegistryKey<Biome> key, BOPClimates climate, int weight)
|
||||
{
|
||||
if (!BiomeUtil.exists(key))
|
||||
return;
|
||||
|
||||
defer(RegistrationType.VANILLA_BIOME, new SingleClimateRegistrationData(key, climate, weight));
|
||||
}
|
||||
|
||||
public static void configureStandardBiomes()
|
||||
{
|
||||
List<DeferredRegistration> standardRegistrations = deferrances.get(RegistrationType.STANDARD_BIOME);
|
||||
TreeMap<String, BiomeConfigData.WeightedBiomeEntry> defaultEntries = Maps.newTreeMap();
|
||||
Map<String, StandardBiomeRegistrationData> regDataMap = Maps.newHashMap();
|
||||
|
||||
for (DeferredRegistration<StandardBiomeRegistrationData> registration : standardRegistrations)
|
||||
{
|
||||
StandardBiomeRegistrationData regData = registration.regData;
|
||||
|
||||
// Ignore biomes which don't have any weights set by default
|
||||
if (regData.getMetadata().hasWeights())
|
||||
{
|
||||
String biomeName = new ResourceLocation(BiomesOPlenty.MOD_ID, regData.getName()).toString();
|
||||
Pair<BOPClimates, Integer> primaryWeight = regData.getPrimaryWeight();
|
||||
defaultEntries.put(biomeName, new BiomeConfigData.WeightedBiomeEntry(primaryWeight.getValue()));
|
||||
regDataMap.put(biomeName, registration.regData);
|
||||
}
|
||||
}
|
||||
|
||||
BiomeConfigData defaultConfigData = new BiomeConfigData();
|
||||
defaultConfigData.standardBiomeWeights = defaultEntries;
|
||||
BiomeConfigData configData = getConfigData(defaultConfigData);
|
||||
|
||||
TreeMap<String, BiomeConfigData.WeightedBiomeEntry> revisedStandardBiomeWeights = Maps.newTreeMap(defaultEntries);
|
||||
|
||||
// Merge the config file with the default values
|
||||
for (Map.Entry<String, BiomeConfigData.WeightedBiomeEntry> biomeEntry : configData.standardBiomeWeights.entrySet())
|
||||
{
|
||||
if (revisedStandardBiomeWeights.containsKey(biomeEntry.getKey()))
|
||||
{
|
||||
revisedStandardBiomeWeights.put(biomeEntry.getKey(), biomeEntry.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
// Write back to the config file
|
||||
configData.standardBiomeWeights = revisedStandardBiomeWeights;
|
||||
JsonUtil.writeFile(getConfigFile(), configData);
|
||||
|
||||
for (Map.Entry<String, BiomeConfigData.WeightedBiomeEntry> biomeEntry : configData.standardBiomeWeights.entrySet())
|
||||
{
|
||||
String name = biomeEntry.getKey();
|
||||
BiomeConfigData.WeightedBiomeEntry weight = biomeEntry.getValue();
|
||||
|
||||
// Replace the default weight map for this biome with those from the config file
|
||||
if (regDataMap.containsKey(name))
|
||||
{
|
||||
StandardBiomeRegistrationData registrationData = regDataMap.get(name);
|
||||
registrationData.setPrimaryWeight(weight.weight);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void configureTechnicalBiomes()
|
||||
{
|
||||
List<DeferredRegistration> biomeRegistrations = deferrances.get(RegistrationType.TECHNICAL_BIOME);
|
||||
TreeMap<String, BiomeConfigData.ToggleableBiomeEntry> defaultBiomeEntries = Maps.newTreeMap();
|
||||
|
||||
for (DeferredRegistration<ToggleableStandardBiomeRegistrationData> registration : biomeRegistrations)
|
||||
{
|
||||
ToggleableStandardBiomeRegistrationData regData = registration.regData;
|
||||
String biomeName = new ResourceLocation(BiomesOPlenty.MOD_ID, regData.getName()).toString();
|
||||
defaultBiomeEntries.put(biomeName, new BiomeConfigData.ToggleableBiomeEntry(true));
|
||||
}
|
||||
|
||||
BiomeConfigData defaultConfigData = new BiomeConfigData();
|
||||
defaultConfigData.technicalBiomeEntries = defaultBiomeEntries;
|
||||
BiomeConfigData configData = getConfigData(defaultConfigData);
|
||||
|
||||
TreeMap<String, BiomeConfigData.ToggleableBiomeEntry> revisedBiomeEntries = Maps.newTreeMap(defaultBiomeEntries);
|
||||
|
||||
// Merge the config file with the default values
|
||||
for (Map.Entry<String, BiomeConfigData.ToggleableBiomeEntry> biomeEntry : configData.technicalBiomeEntries.entrySet())
|
||||
{
|
||||
if (revisedBiomeEntries.containsKey(biomeEntry.getKey()))
|
||||
{
|
||||
revisedBiomeEntries.put(biomeEntry.getKey(), biomeEntry.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
// Write back to the config file
|
||||
configData.technicalBiomeEntries = revisedBiomeEntries;
|
||||
JsonUtil.writeFile(getConfigFile(), configData);
|
||||
|
||||
for (DeferredRegistration<ToggleableStandardBiomeRegistrationData> registration : biomeRegistrations)
|
||||
{
|
||||
ToggleableStandardBiomeRegistrationData regData = registration.regData;
|
||||
String biomeName = new ResourceLocation(BiomesOPlenty.MOD_ID, regData.getName()).toString();
|
||||
|
||||
if (revisedBiomeEntries.containsKey(biomeName))
|
||||
{
|
||||
BiomeConfigData.ToggleableBiomeEntry entry = revisedBiomeEntries.get(biomeName);
|
||||
|
||||
if (!entry.enabled)
|
||||
{
|
||||
registration.regData.setEnabled(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void configureSubBiomes()
|
||||
{
|
||||
List<DeferredRegistration> subBiomeRegistrations = deferrances.get(RegistrationType.SUB_BIOME);
|
||||
TreeMap<String, BiomeConfigData.SubBiomeEntry> defaultSubBiomeEntries = Maps.newTreeMap();
|
||||
Map<String, SubBiomeRegistrationData> regDataMap = Maps.newHashMap();
|
||||
|
||||
for (DeferredRegistration<SubBiomeRegistrationData> registration : subBiomeRegistrations)
|
||||
{
|
||||
SubBiomeRegistrationData regData = registration.regData;
|
||||
String biomeName = registration.regData.getChild().location().toString();
|
||||
defaultSubBiomeEntries.put(biomeName, new BiomeConfigData.SubBiomeEntry(regData.getWeight(), regData.getRarity()));
|
||||
regDataMap.put(biomeName, registration.regData);
|
||||
}
|
||||
|
||||
BiomeConfigData defaultConfigData = new BiomeConfigData();
|
||||
defaultConfigData.subBiomeEntries = defaultSubBiomeEntries;
|
||||
BiomeConfigData configData = getConfigData(defaultConfigData);
|
||||
|
||||
TreeMap<String, BiomeConfigData.SubBiomeEntry> revisedSubBiomeEntries = Maps.newTreeMap(defaultSubBiomeEntries);
|
||||
|
||||
// Merge the config file with the default values
|
||||
for (Map.Entry<String, BiomeConfigData.SubBiomeEntry> biomeEntry : configData.subBiomeEntries.entrySet())
|
||||
{
|
||||
if (revisedSubBiomeEntries.containsKey(biomeEntry.getKey()))
|
||||
{
|
||||
revisedSubBiomeEntries.put(biomeEntry.getKey(), biomeEntry.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
// Write back to the config file
|
||||
configData.subBiomeEntries = revisedSubBiomeEntries;
|
||||
JsonUtil.writeFile(getConfigFile(), configData);
|
||||
|
||||
for (Map.Entry<String, BiomeConfigData.SubBiomeEntry> biomeEntry : configData.subBiomeEntries.entrySet())
|
||||
{
|
||||
String name = biomeEntry.getKey();
|
||||
BiomeConfigData.SubBiomeEntry subBiomeEntry = biomeEntry.getValue();
|
||||
|
||||
// Replace the default values for this biome with those from the config file
|
||||
if (regDataMap.containsKey(name))
|
||||
{
|
||||
SubBiomeRegistrationData registrationData = regDataMap.get(name);
|
||||
registrationData.setWeight(subBiomeEntry.weight);
|
||||
registrationData.setRarity(subBiomeEntry.rarity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void configureIslandBiomes()
|
||||
{
|
||||
List<DeferredRegistration> biomeRegistrations = deferrances.get(RegistrationType.ISLAND_BIOME);
|
||||
TreeMap<String, BiomeConfigData.ToggleableBiomeEntry> defaultBiomeEntries = Maps.newTreeMap();
|
||||
|
||||
for (DeferredRegistration<SingleClimateRegistrationData> registration : biomeRegistrations)
|
||||
{
|
||||
SingleClimateRegistrationData regData = registration.regData;
|
||||
String biomeName = regData.getBiome().location().toString();
|
||||
defaultBiomeEntries.put(biomeName, new BiomeConfigData.ToggleableBiomeEntry(true));
|
||||
}
|
||||
|
||||
BiomeConfigData defaultConfigData = new BiomeConfigData();
|
||||
defaultConfigData.islandBiomeEntries = defaultBiomeEntries;
|
||||
BiomeConfigData configData = getConfigData(defaultConfigData);
|
||||
|
||||
TreeMap<String, BiomeConfigData.ToggleableBiomeEntry> revisedBiomeEntries = Maps.newTreeMap(defaultBiomeEntries);
|
||||
|
||||
// Merge the config file with the default values
|
||||
for (Map.Entry<String, BiomeConfigData.ToggleableBiomeEntry> biomeEntry : configData.islandBiomeEntries.entrySet())
|
||||
{
|
||||
if (revisedBiomeEntries.containsKey(biomeEntry.getKey()))
|
||||
{
|
||||
revisedBiomeEntries.put(biomeEntry.getKey(), biomeEntry.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
// Write back to the config file
|
||||
configData.islandBiomeEntries = revisedBiomeEntries;
|
||||
JsonUtil.writeFile(getConfigFile(), configData);
|
||||
|
||||
for (DeferredRegistration<SingleClimateRegistrationData> registration : biomeRegistrations)
|
||||
{
|
||||
SingleClimateRegistrationData regData = registration.regData;
|
||||
String biomeName = regData.getBiome().location().toString();
|
||||
|
||||
if (revisedBiomeEntries.containsKey(biomeName))
|
||||
{
|
||||
BiomeConfigData.ToggleableBiomeEntry entry = revisedBiomeEntries.get(biomeName);
|
||||
|
||||
if (!entry.enabled)
|
||||
{
|
||||
registration.regData.setWeight(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void configureVanillaBiomes()
|
||||
{
|
||||
List<DeferredRegistration> biomeRegistrations = deferrances.get(RegistrationType.VANILLA_BIOME);
|
||||
TreeMap<String, BiomeConfigData.WeightedBiomeEntry> defaultBiomeEntries = Maps.newTreeMap();
|
||||
Map<String, SingleClimateRegistrationData> regDataMap = Maps.newHashMap();
|
||||
|
||||
for (DeferredRegistration<SingleClimateRegistrationData> registration : biomeRegistrations)
|
||||
{
|
||||
SingleClimateRegistrationData regData = registration.regData;
|
||||
String biomeName = registration.regData.getBiome().location().toString();
|
||||
defaultBiomeEntries.put(biomeName, new BiomeConfigData.WeightedBiomeEntry(regData.getWeight()));
|
||||
regDataMap.put(biomeName, registration.regData);
|
||||
}
|
||||
|
||||
BiomeConfigData defaultConfigData = new BiomeConfigData();
|
||||
defaultConfigData.vanillaBiomeEntries = defaultBiomeEntries;
|
||||
BiomeConfigData configData = getConfigData(defaultConfigData);
|
||||
|
||||
TreeMap<String, BiomeConfigData.WeightedBiomeEntry> revisedBiomeEntries = Maps.newTreeMap(defaultBiomeEntries);
|
||||
|
||||
// Merge the config file with the default values
|
||||
for (Map.Entry<String, BiomeConfigData.WeightedBiomeEntry> biomeEntry : configData.vanillaBiomeEntries.entrySet())
|
||||
{
|
||||
if (revisedBiomeEntries.containsKey(biomeEntry.getKey()))
|
||||
{
|
||||
revisedBiomeEntries.put(biomeEntry.getKey(), biomeEntry.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
// Write back to the config file
|
||||
configData.vanillaBiomeEntries = revisedBiomeEntries;
|
||||
JsonUtil.writeFile(getConfigFile(), configData);
|
||||
|
||||
for (Map.Entry<String, BiomeConfigData.WeightedBiomeEntry> biomeEntry : configData.vanillaBiomeEntries.entrySet())
|
||||
{
|
||||
String name = biomeEntry.getKey();
|
||||
BiomeConfigData.WeightedBiomeEntry islandBiomeEntry = biomeEntry.getValue();
|
||||
|
||||
// Replace the default values for this biome with those from the config file
|
||||
if (regDataMap.containsKey(name))
|
||||
{
|
||||
SingleClimateRegistrationData registrationData = regDataMap.get(name);
|
||||
registrationData.setWeight(islandBiomeEntry.weight);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static File getConfigDirFile()
|
||||
{
|
||||
Path configPath = FMLPaths.CONFIGDIR.get();
|
||||
Path bopConfigPath = Paths.get(configPath.toAbsolutePath().toString(), "biomesoplenty");
|
||||
return bopConfigPath.toFile();
|
||||
}
|
||||
|
||||
private static File getConfigFile()
|
||||
{
|
||||
return new File(getConfigDirFile(), CONFIG_FILE_NAME);
|
||||
}
|
||||
|
||||
private static BiomeConfigData getConfigData(BiomeConfigData defaultConfigData)
|
||||
{
|
||||
BiomeConfigData configData = JsonUtil.getOrCreateConfigFile(getConfigDirFile(), CONFIG_FILE_NAME, defaultConfigData, new TypeToken<BiomeConfigData>(){}.getType());
|
||||
return configData;
|
||||
}
|
||||
|
||||
private static <T extends IRegistrationData> void defer(RegistrationType type, T data)
|
||||
{
|
||||
if (!deferrances.containsKey(type))
|
||||
deferrances.put(type, Lists.newArrayList());
|
||||
|
||||
List<DeferredRegistration> list = deferrances.get(type);
|
||||
list.add(new DeferredRegistration(type.regFunc, data));
|
||||
}
|
||||
|
||||
public static void finalizeRegistrations(RegistrationType type)
|
||||
{
|
||||
if (!deferrances.containsKey(type))
|
||||
return;
|
||||
|
||||
if (type == RegistrationType.SUB_BIOME)
|
||||
{
|
||||
Set<RegistryKey<Biome>> children = Sets.newHashSet();
|
||||
deferrances.get(RegistrationType.SUB_BIOME).forEach((reg) -> {
|
||||
RegistryKey<Biome> biome = ((SubBiomeRegistrationData)reg.regData).getChild();
|
||||
if (children.contains(biome))
|
||||
{
|
||||
throw new RuntimeException(String.format("Sub biome %s cannot be added to multiple parents", biome.location().toString()));
|
||||
}
|
||||
children.add(biome);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
for (DeferredRegistration reg : deferrances.get(type))
|
||||
{
|
||||
reg.register();
|
||||
}
|
||||
}
|
||||
|
||||
public enum RegistrationType
|
||||
{
|
||||
STANDARD_BIOME((StandardBiomeRegistrationData data) -> {
|
||||
Biome biome = data.getBiome();
|
||||
BiomeMetadata metadata = data.getMetadata();
|
||||
String name = data.getName();
|
||||
|
||||
// Don't register biomes with their weight set to 0, that normally have weights that are non-zero
|
||||
if (!metadata.getWeightMap().isEmpty() && (data.weightMap.isEmpty() || data.weightMap.entrySet().stream().allMatch((entry) -> entry.getValue().equals(0))))
|
||||
{
|
||||
BiomesOPlenty.logger.debug("Weights absent for " + data.getName() + ", disabling...");
|
||||
return;
|
||||
}
|
||||
|
||||
biome.setRegistryName(new ResourceLocation(BiomesOPlenty.MOD_ID, name));
|
||||
ForgeRegistries.BIOMES.register(biome);
|
||||
|
||||
for (Map.Entry<BOPClimates, Integer> entry : data.getWeights().entrySet())
|
||||
{
|
||||
if (entry != null && entry.getValue() > 0)
|
||||
{
|
||||
BOPClimates climate = entry.getKey();
|
||||
int weight = entry.getValue();
|
||||
BiomesOPlenty.logger.debug(String.format("%s weight set to %d for climate %s", name, weight, climate.name()));
|
||||
climate.addBiome(weight, BiomeUtil.createKey(data.getBiome()));
|
||||
}
|
||||
}
|
||||
|
||||
if (data.getMetadata() != null)
|
||||
{
|
||||
ModBiomes.biomeMetadata.put(BiomeUtil.createKey(data.getBiome()), data.getMetadata());
|
||||
}
|
||||
}),
|
||||
TECHNICAL_BIOME((ToggleableStandardBiomeRegistrationData data) -> {
|
||||
Biome biome = data.getBiome();
|
||||
String name = data.getName();
|
||||
|
||||
if (!data.getEnabled())
|
||||
{
|
||||
BiomesOPlenty.logger.debug("Technical biome " + data.getName() + " is disabled.");
|
||||
return;
|
||||
}
|
||||
|
||||
biome.setRegistryName(new ResourceLocation(BiomesOPlenty.MOD_ID, name));
|
||||
ForgeRegistries.BIOMES.register(biome);
|
||||
|
||||
if (data.getMetadata() != null)
|
||||
{
|
||||
ModBiomes.biomeMetadata.put(BiomeUtil.createKey(data.getBiome()), data.getMetadata());
|
||||
}
|
||||
}),
|
||||
SUB_BIOME((SubBiomeRegistrationData data) -> {
|
||||
if (data.getWeight() == 0)
|
||||
{
|
||||
BiomesOPlenty.logger.debug("Weights absent for sub biome" + data.getChild().location().toString() + ", disabling...");
|
||||
return;
|
||||
}
|
||||
|
||||
String childName = data.getChild().location().toString();
|
||||
BiomesOPlenty.logger.debug(String.format("Sub biome %s weight set to %d", childName, data.getWeight()));
|
||||
ModBiomes.subBiomes.put(BiomeUtil.getBiomeId(data.getParent()), new ModBiomes.WeightedSubBiome(data.getChild(), data.getRarity(), data.getWeight()));
|
||||
}),
|
||||
ISLAND_BIOME((SingleClimateRegistrationData data) -> {
|
||||
if (data.getWeight() == 0)
|
||||
{
|
||||
BiomesOPlenty.logger.debug("Weights absent for island biome" + data.getBiome().location().toString() + ", disabling...");
|
||||
return;
|
||||
}
|
||||
|
||||
String biomeName = data.getBiome().location().toString();
|
||||
BiomesOPlenty.logger.debug(String.format("Island biome %s weight set to %d for climate %s", biomeName, data.getWeight(), data.getClimate().name()));
|
||||
ModBiomes.islandBiomeIds.add(BiomeUtil.getBiomeId(data.getBiome()));
|
||||
data.getClimate().addIslandBiome(data.getWeight(), data.getBiome());
|
||||
}),
|
||||
VANILLA_BIOME((SingleClimateRegistrationData data) -> {
|
||||
if (data.getWeight() == 0)
|
||||
{
|
||||
BiomesOPlenty.logger.debug("Weights absent for vanilla biome" + data.getBiome().location().toString() + ", disabling...");
|
||||
return;
|
||||
}
|
||||
|
||||
data.getClimate().addBiome(data.getWeight(), data.getBiome());
|
||||
});
|
||||
|
||||
public final Consumer<? extends IRegistrationData> regFunc;
|
||||
|
||||
RegistrationType(Consumer<? extends IRegistrationData> regFunc)
|
||||
{
|
||||
this.regFunc = regFunc;
|
||||
}
|
||||
}
|
||||
|
||||
private interface IRegistrationData
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private static abstract class TemplateRegistrationData implements IRegistrationData
|
||||
{
|
||||
private final Biome biome;
|
||||
private final BiomeMetadata metadata;
|
||||
|
||||
public TemplateRegistrationData(BiomeTemplate template)
|
||||
{
|
||||
this.biome = template.build();
|
||||
this.metadata = template.buildMetadata();
|
||||
}
|
||||
|
||||
public TemplateRegistrationData(Biome biome)
|
||||
{
|
||||
this.biome = biome;
|
||||
this.metadata = null;
|
||||
}
|
||||
|
||||
public Biome getBiome()
|
||||
{
|
||||
return this.biome;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public BiomeMetadata getMetadata()
|
||||
{
|
||||
return this.metadata;
|
||||
}
|
||||
}
|
||||
|
||||
private static class StandardBiomeRegistrationData extends TemplateRegistrationData
|
||||
{
|
||||
private final String name;
|
||||
private Map<BOPClimates, Integer> weightMap;
|
||||
|
||||
public StandardBiomeRegistrationData(BiomeTemplate biome, String name)
|
||||
{
|
||||
super(biome);
|
||||
this.name = name;
|
||||
this.weightMap = Maps.newHashMap(this.getMetadata().getWeightMap());
|
||||
this.ensureSingleWeight();
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public ImmutableMap<BOPClimates, Integer> getWeights()
|
||||
{
|
||||
return ImmutableMap.copyOf(this.weightMap);
|
||||
}
|
||||
|
||||
public int getWeight(BOPClimates climate)
|
||||
{
|
||||
return this.weightMap.get(climate);
|
||||
}
|
||||
|
||||
public void setWeight(BOPClimates climate, int weight)
|
||||
{
|
||||
this.weightMap.put(climate, weight);
|
||||
this.ensureSingleWeight();
|
||||
}
|
||||
|
||||
public Pair<BOPClimates, Integer> getPrimaryWeight()
|
||||
{
|
||||
List<Pair<BOPClimates, Integer>> pairs = Lists.newArrayList();
|
||||
this.weightMap.entrySet().forEach((entry) -> pairs.add(Pair.of(entry.getKey(), entry.getValue())));
|
||||
return pairs.get(0);
|
||||
}
|
||||
|
||||
public void setPrimaryWeight(int value)
|
||||
{
|
||||
BOPClimates climate = this.getPrimaryWeight().getKey();
|
||||
this.setWeight(climate, value);
|
||||
}
|
||||
|
||||
// This limitation is enforced for config file simplicity, and because we don't need it at this time
|
||||
private void ensureSingleWeight()
|
||||
{
|
||||
if (this.weightMap.size() > 1)
|
||||
{
|
||||
throw new RuntimeException(String.format("%s cannot be assigned to multiple climates!\n%s", new ResourceLocation(BiomesOPlenty.MOD_ID, name).toString(), this.weightMap));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static class SubBiomeRegistrationData implements IRegistrationData
|
||||
{
|
||||
private final RegistryKey<Biome> parent;
|
||||
private final RegistryKey<Biome> child;
|
||||
private int weight;
|
||||
private float rarity;
|
||||
|
||||
public SubBiomeRegistrationData(RegistryKey<Biome> parent, RegistryKey<Biome> child, int weight, float rarity)
|
||||
{
|
||||
this.parent = parent;
|
||||
this.child = child;
|
||||
this.weight = weight;
|
||||
this.rarity = rarity;
|
||||
}
|
||||
|
||||
public RegistryKey<Biome> getParent()
|
||||
{
|
||||
return this.parent;
|
||||
}
|
||||
|
||||
public RegistryKey<Biome> getChild()
|
||||
{
|
||||
return this.child;
|
||||
}
|
||||
|
||||
public int getWeight()
|
||||
{
|
||||
return this.weight;
|
||||
}
|
||||
|
||||
public void setWeight(int weight)
|
||||
{
|
||||
this.weight = weight;
|
||||
}
|
||||
|
||||
public float getRarity()
|
||||
{
|
||||
return this.rarity;
|
||||
}
|
||||
|
||||
public void setRarity(float rarity)
|
||||
{
|
||||
this.rarity = rarity;
|
||||
}
|
||||
}
|
||||
|
||||
private static class SingleClimateRegistrationData implements IRegistrationData
|
||||
{
|
||||
private final BOPClimates climate;
|
||||
private final RegistryKey<Biome> biome;
|
||||
private int weight;
|
||||
|
||||
public SingleClimateRegistrationData(RegistryKey<Biome> biome, BOPClimates climate, int weight)
|
||||
{
|
||||
this.biome = biome;
|
||||
this.climate = climate;
|
||||
this.weight = weight;
|
||||
}
|
||||
|
||||
public RegistryKey<Biome> getBiome()
|
||||
{
|
||||
return this.biome;
|
||||
}
|
||||
|
||||
public BOPClimates getClimate()
|
||||
{
|
||||
return this.climate;
|
||||
}
|
||||
|
||||
public int getWeight()
|
||||
{
|
||||
return this.weight;
|
||||
}
|
||||
|
||||
public void setWeight(int weight)
|
||||
{
|
||||
this.weight = weight;
|
||||
}
|
||||
}
|
||||
|
||||
private static class ToggleableStandardBiomeRegistrationData extends TemplateRegistrationData
|
||||
{
|
||||
private final String name;
|
||||
private boolean enabled;
|
||||
|
||||
public ToggleableStandardBiomeRegistrationData(BiomeTemplate biome, String name, boolean enabled)
|
||||
{
|
||||
super(biome);
|
||||
this.name = name;
|
||||
this.enabled = enabled;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public boolean getEnabled()
|
||||
{
|
||||
return this.enabled;
|
||||
}
|
||||
|
||||
public void setEnabled(boolean enabled)
|
||||
{
|
||||
this.enabled = enabled;
|
||||
}
|
||||
}
|
||||
|
||||
private static class DeferredRegistration<T extends IRegistrationData>
|
||||
{
|
||||
private final Consumer<T> regFunc;
|
||||
private final T regData;
|
||||
|
||||
public DeferredRegistration(Consumer<T> regFunc, T regData)
|
||||
{
|
||||
this.regFunc = regFunc;
|
||||
this.regData = regData;
|
||||
}
|
||||
|
||||
public void register()
|
||||
{
|
||||
this.regFunc.accept(this.regData);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,101 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2014-2019, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
package biomesoplenty.common.biome;
|
||||
|
||||
import biomesoplenty.api.enums.BOPClimates;
|
||||
import net.minecraft.util.RegistryKey;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
import net.minecraft.world.biome.BiomeGenerationSettings;
|
||||
import net.minecraft.world.biome.Biomes;
|
||||
import net.minecraft.world.biome.MobSpawnInfo;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.function.BiFunction;
|
||||
|
||||
public class BiomeTemplate
|
||||
{
|
||||
private Map<BOPClimates, Integer> weightMap = new HashMap<BOPClimates, Integer>();
|
||||
private RegistryKey<Biome> beachBiome = Biomes.BEACH;
|
||||
private RegistryKey<Biome> riverBiome = Biomes.RIVER;
|
||||
private BiFunction<Double, Double, Integer> foliageColorFunction;
|
||||
private BiFunction<Double, Double, Integer> grassColorFunction;
|
||||
private BiFunction<Double, Double, Integer> waterColorFunction;
|
||||
|
||||
protected void configureBiome(Biome.Builder builder) {}
|
||||
protected void configureGeneration(BiomeGenerationSettings.Builder builder) {}
|
||||
protected void configureMobSpawns(MobSpawnInfo.Builder builder) {}
|
||||
|
||||
protected void configureDefaultMobSpawns(MobSpawnInfo.Builder builder)
|
||||
{
|
||||
builder.setPlayerCanSpawn();
|
||||
}
|
||||
|
||||
public final Biome build()
|
||||
{
|
||||
Biome.Builder biomeBuilder = new Biome.Builder();
|
||||
|
||||
// Configure the biome generation
|
||||
BiomeGenerationSettings.Builder biomeGenBuilder = new BiomeGenerationSettings.Builder();
|
||||
this.configureGeneration(biomeGenBuilder);
|
||||
biomeBuilder.generationSettings(biomeGenBuilder.build());
|
||||
|
||||
// Configure mob spawning
|
||||
MobSpawnInfo.Builder mobSpawnBuilder = new MobSpawnInfo.Builder();
|
||||
this.configureDefaultMobSpawns(mobSpawnBuilder);
|
||||
this.configureMobSpawns(mobSpawnBuilder);
|
||||
biomeBuilder.mobSpawnSettings(mobSpawnBuilder.build());
|
||||
|
||||
// Configure and build the biome
|
||||
this.configureBiome(biomeBuilder);
|
||||
return biomeBuilder.build();
|
||||
}
|
||||
|
||||
public final BiomeMetadata buildMetadata()
|
||||
{
|
||||
return new BiomeMetadata(this.weightMap, this.beachBiome, this.riverBiome, this.foliageColorFunction, this.grassColorFunction, this.waterColorFunction);
|
||||
}
|
||||
|
||||
public void addWeight(BOPClimates climate, int weight)
|
||||
{
|
||||
this.weightMap.put(climate, weight);
|
||||
}
|
||||
|
||||
public void setBeachBiome(RegistryKey<Biome> biome)
|
||||
{
|
||||
this.beachBiome = biome;
|
||||
}
|
||||
|
||||
public void setRiverBiome(RegistryKey<Biome> biome)
|
||||
{
|
||||
this.riverBiome = biome;
|
||||
}
|
||||
|
||||
public void setFoliageColorFunction(BiFunction<Double, Double, Integer> func)
|
||||
{
|
||||
this.foliageColorFunction = func;
|
||||
}
|
||||
|
||||
public void setGrassColorFunction(BiFunction<Double, Double, Integer> func)
|
||||
{
|
||||
this.grassColorFunction = func;
|
||||
}
|
||||
|
||||
public void setWaterColorFunction(BiFunction<Double, Double, Integer> func)
|
||||
{
|
||||
this.waterColorFunction = func;
|
||||
}
|
||||
|
||||
public static int calculateSkyColor(float temperature)
|
||||
{
|
||||
float lvt_1_1_ = temperature / 3.0F;
|
||||
lvt_1_1_ = MathHelper.clamp(lvt_1_1_, -1.0F, 1.0F);
|
||||
return MathHelper.hsvToRgb(0.62222224F - lvt_1_1_ * 0.05F, 0.5F + lvt_1_1_ * 0.1F, 1.0F);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2014-2019, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
package biomesoplenty.common.biome;
|
||||
|
||||
import net.minecraft.world.biome.MobSpawnInfo;
|
||||
|
||||
public class NetherBiomeTemplate extends BiomeTemplate
|
||||
{
|
||||
protected void configureDefaultMobSpawns(MobSpawnInfo.Builder builder)
|
||||
{
|
||||
// Do nothing
|
||||
}
|
||||
}
|
|
@ -0,0 +1,69 @@
|
|||
package biomesoplenty.common.biome.nether;
|
||||
|
||||
import biomesoplenty.api.enums.BOPClimates;
|
||||
import biomesoplenty.common.biome.NetherBiomeTemplate;
|
||||
import biomesoplenty.common.world.gen.feature.BOPConfiguredFeatures;
|
||||
import net.minecraft.client.audio.BackgroundMusicTracks;
|
||||
import net.minecraft.entity.EntityClassification;
|
||||
import net.minecraft.entity.EntityType;
|
||||
import net.minecraft.particles.ParticleTypes;
|
||||
import net.minecraft.util.SoundEvents;
|
||||
import net.minecraft.world.biome.*;
|
||||
import net.minecraft.world.gen.GenerationStage;
|
||||
import net.minecraft.world.gen.carver.ConfiguredCarvers;
|
||||
import net.minecraft.world.gen.feature.Features;
|
||||
import net.minecraft.world.gen.feature.structure.StructureFeatures;
|
||||
import net.minecraft.world.gen.surfacebuilders.ConfiguredSurfaceBuilder;
|
||||
import net.minecraft.world.gen.surfacebuilders.ConfiguredSurfaceBuilders;
|
||||
import net.minecraft.world.gen.surfacebuilders.SurfaceBuilder;
|
||||
|
||||
public class CrystallineChasmBiome extends NetherBiomeTemplate
|
||||
{
|
||||
public CrystallineChasmBiome()
|
||||
{
|
||||
this.addWeight(BOPClimates.NETHER, 5);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configureBiome(Biome.Builder builder)
|
||||
{
|
||||
builder.precipitation(Biome.RainType.NONE).biomeCategory(Biome.Category.NETHER).depth(0.1F).scale(0.2F).temperature(2.0F).downfall(0.0F);
|
||||
|
||||
builder.specialEffects((new BiomeAmbience.Builder()).waterColor(4159204).waterFogColor(329011).fogColor(0x59002C).skyColor(calculateSkyColor(2.0F)).ambientParticle(new ParticleEffectAmbience(ParticleTypes.INSTANT_EFFECT, 0.001785F)).ambientLoopSound(SoundEvents.AMBIENT_CRIMSON_FOREST_LOOP).ambientMoodSound(new MoodSoundAmbience(SoundEvents.AMBIENT_BASALT_DELTAS_MOOD, 6000, 8, 2.0D)).ambientAdditionsSound(new SoundAdditionsAmbience(SoundEvents.AMBIENT_BASALT_DELTAS_ADDITIONS, 0.0111D)).backgroundMusic(BackgroundMusicTracks.createGameMusic(SoundEvents.MUSIC_BIOME_NETHER_WASTES)).build());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configureGeneration(BiomeGenerationSettings.Builder builder)
|
||||
{
|
||||
builder.surfaceBuilder(ConfiguredSurfaceBuilders.NETHER);
|
||||
|
||||
//Terrain
|
||||
builder.addStructureStart(StructureFeatures.RUINED_PORTAL_NETHER);
|
||||
builder.addStructureStart(StructureFeatures.NETHER_BRIDGE);
|
||||
builder.addStructureStart(StructureFeatures.BASTION_REMNANT);
|
||||
builder.addCarver(GenerationStage.Carving.AIR, ConfiguredCarvers.NETHER_CAVE);
|
||||
|
||||
builder.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Features.SPRING_OPEN);
|
||||
builder.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Features.PATCH_FIRE);
|
||||
builder.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Features.PATCH_SOUL_FIRE);
|
||||
builder.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Features.GLOWSTONE_EXTRA);
|
||||
builder.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Features.GLOWSTONE);
|
||||
builder.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Features.BROWN_MUSHROOM_NETHER);
|
||||
builder.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Features.RED_MUSHROOM_NETHER);
|
||||
builder.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Features.ORE_MAGMA);
|
||||
builder.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Features.SPRING_CLOSED);
|
||||
|
||||
//Decoration
|
||||
builder.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, BOPConfiguredFeatures.LARGE_CRYSTAL);
|
||||
builder.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, BOPConfiguredFeatures.SMALL_CRYSTAL);
|
||||
|
||||
DefaultBiomeFeatures.addNetherDefaultOres(builder);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configureMobSpawns(MobSpawnInfo.Builder builder)
|
||||
{
|
||||
//Entities
|
||||
builder.addSpawn(EntityClassification.CREATURE, new MobSpawnInfo.Spawners(EntityType.STRIDER, 60, 1, 2));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,77 @@
|
|||
package biomesoplenty.common.biome.nether;
|
||||
|
||||
import biomesoplenty.api.enums.BOPClimates;
|
||||
import biomesoplenty.common.biome.NetherBiomeTemplate;
|
||||
import biomesoplenty.common.world.gen.feature.BOPConfiguredFeatures;
|
||||
import net.minecraft.client.audio.BackgroundMusicTracks;
|
||||
import net.minecraft.entity.EntityClassification;
|
||||
import net.minecraft.entity.EntityType;
|
||||
import net.minecraft.particles.ParticleTypes;
|
||||
import net.minecraft.util.SoundEvents;
|
||||
import net.minecraft.world.biome.*;
|
||||
import net.minecraft.world.gen.GenerationStage;
|
||||
import net.minecraft.world.gen.carver.ConfiguredCarvers;
|
||||
import net.minecraft.world.gen.feature.Features;
|
||||
import net.minecraft.world.gen.feature.structure.StructureFeatures;
|
||||
import net.minecraft.world.gen.surfacebuilders.ConfiguredSurfaceBuilder;
|
||||
import net.minecraft.world.gen.surfacebuilders.ConfiguredSurfaceBuilders;
|
||||
import net.minecraft.world.gen.surfacebuilders.SurfaceBuilder;
|
||||
|
||||
public class UndergrowthBiome extends NetherBiomeTemplate
|
||||
{
|
||||
public UndergrowthBiome()
|
||||
{
|
||||
this.addWeight(BOPClimates.NETHER, 10);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configureBiome(Biome.Builder builder)
|
||||
{
|
||||
builder.precipitation(Biome.RainType.NONE).biomeCategory(Biome.Category.NETHER).depth(0.1F).scale(0.2F).temperature(2.0F).downfall(0.0F);
|
||||
|
||||
builder.specialEffects((new BiomeAmbience.Builder()).waterColor(4159204).waterFogColor(329011).fogColor(0x1C2109).skyColor(calculateSkyColor(2.0F)).ambientParticle(new ParticleEffectAmbience(ParticleTypes.MYCELIUM, 0.00714F)).ambientLoopSound(SoundEvents.AMBIENT_WARPED_FOREST_LOOP).ambientMoodSound(new MoodSoundAmbience(SoundEvents.AMBIENT_CRIMSON_FOREST_MOOD, 6000, 8, 2.0D)).ambientAdditionsSound(new SoundAdditionsAmbience(SoundEvents.AMBIENT_NETHER_WASTES_ADDITIONS, 0.0111D)).backgroundMusic(BackgroundMusicTracks.createGameMusic(SoundEvents.MUSIC_BIOME_NETHER_WASTES)).build());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configureGeneration(BiomeGenerationSettings.Builder builder)
|
||||
{
|
||||
builder.surfaceBuilder(ConfiguredSurfaceBuilders.NETHER);
|
||||
|
||||
//Terrain
|
||||
builder.addStructureStart(StructureFeatures.RUINED_PORTAL_NETHER);
|
||||
builder.addStructureStart(StructureFeatures.NETHER_BRIDGE);
|
||||
builder.addStructureStart(StructureFeatures.BASTION_REMNANT);
|
||||
builder.addCarver(GenerationStage.Carving.AIR, ConfiguredCarvers.NETHER_CAVE);
|
||||
|
||||
builder.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Features.SPRING_OPEN);
|
||||
builder.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Features.PATCH_FIRE);
|
||||
builder.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Features.PATCH_SOUL_FIRE);
|
||||
builder.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Features.GLOWSTONE_EXTRA);
|
||||
builder.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Features.GLOWSTONE);
|
||||
builder.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Features.BROWN_MUSHROOM_NETHER);
|
||||
builder.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Features.RED_MUSHROOM_NETHER);
|
||||
builder.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Features.ORE_MAGMA);
|
||||
builder.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Features.SPRING_CLOSED);
|
||||
|
||||
//Vegetation
|
||||
builder.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, BOPConfiguredFeatures.UNDERGROWTH_TREES);
|
||||
|
||||
builder.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, BOPConfiguredFeatures.NETHER_BRAMBLE);
|
||||
builder.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, BOPConfiguredFeatures.UNDERGROWTH_FLOWERS);
|
||||
builder.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, BOPConfiguredFeatures.SPROUTS_UNDERGROWTH);
|
||||
builder.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, BOPConfiguredFeatures.DEAD_GRASS_45);
|
||||
builder.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, BOPConfiguredFeatures.NETHER_VINES);
|
||||
|
||||
DefaultBiomeFeatures.addNetherDefaultOres(builder);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configureMobSpawns(MobSpawnInfo.Builder builder)
|
||||
{
|
||||
//Entities
|
||||
builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.GHAST, 50, 4, 4));
|
||||
builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.MAGMA_CUBE, 2, 4, 4));
|
||||
builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.HOGLIN, 9, 3, 4));
|
||||
builder.addSpawn(EntityClassification.CREATURE, new MobSpawnInfo.Spawners(EntityType.STRIDER, 60, 1, 2));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,65 @@
|
|||
package biomesoplenty.common.biome.nether;
|
||||
|
||||
import biomesoplenty.api.enums.BOPClimates;
|
||||
import biomesoplenty.common.biome.NetherBiomeTemplate;
|
||||
import biomesoplenty.common.world.gen.feature.BOPConfiguredFeatures;
|
||||
import biomesoplenty.common.world.gen.surfacebuilders.BOPConfiguredSurfaceBuilders;
|
||||
import biomesoplenty.common.world.gen.surfacebuilders.BOPSurfaceBuilders;
|
||||
import net.minecraft.client.audio.BackgroundMusicTracks;
|
||||
import net.minecraft.entity.EntityClassification;
|
||||
import net.minecraft.entity.EntityType;
|
||||
import net.minecraft.particles.ParticleTypes;
|
||||
import net.minecraft.util.SoundEvents;
|
||||
import net.minecraft.world.biome.*;
|
||||
import net.minecraft.world.gen.GenerationStage;
|
||||
import net.minecraft.world.gen.carver.ConfiguredCarvers;
|
||||
import net.minecraft.world.gen.feature.Features;
|
||||
import net.minecraft.world.gen.feature.structure.StructureFeatures;
|
||||
import net.minecraft.world.gen.surfacebuilders.ConfiguredSurfaceBuilder;
|
||||
import net.minecraft.world.gen.surfacebuilders.SurfaceBuilder;
|
||||
|
||||
public class VisceralHeapBiome extends NetherBiomeTemplate
|
||||
{
|
||||
public VisceralHeapBiome()
|
||||
{
|
||||
this.addWeight(BOPClimates.NETHER, 7);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configureBiome(Biome.Builder builder)
|
||||
{
|
||||
builder.precipitation(Biome.RainType.NONE).biomeCategory(Biome.Category.NETHER).depth(0.1F).scale(0.2F).temperature(2.0F).downfall(0.0F);
|
||||
|
||||
builder.specialEffects((new BiomeAmbience.Builder()).waterColor(4159204).waterFogColor(329011).fogColor(0x601F18).skyColor(calculateSkyColor(2.0F)).ambientParticle(new ParticleEffectAmbience(ParticleTypes.FALLING_LAVA, 0.001785F)).ambientLoopSound(SoundEvents.AMBIENT_NETHER_WASTES_LOOP).ambientMoodSound(new MoodSoundAmbience(SoundEvents.AMBIENT_SOUL_SAND_VALLEY_MOOD, 6000, 8, 2.0D)).ambientAdditionsSound(new SoundAdditionsAmbience(SoundEvents.AMBIENT_CRIMSON_FOREST_ADDITIONS, 0.0111D)).backgroundMusic(BackgroundMusicTracks.createGameMusic(SoundEvents.MUSIC_BIOME_CRIMSON_FOREST)).build());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configureGeneration(BiomeGenerationSettings.Builder builder)
|
||||
{
|
||||
builder.surfaceBuilder(BOPConfiguredSurfaceBuilders.VISCERAL_HEAP);
|
||||
|
||||
//Terrain
|
||||
builder.addStructureStart(StructureFeatures.RUINED_PORTAL_NETHER);
|
||||
builder.addStructureStart(StructureFeatures.NETHER_BRIDGE);
|
||||
builder.addStructureStart(StructureFeatures.BASTION_REMNANT);
|
||||
builder.addCarver(GenerationStage.Carving.AIR, ConfiguredCarvers.NETHER_CAVE);
|
||||
|
||||
builder.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Features.SPRING_OPEN);
|
||||
builder.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Features.ORE_MAGMA);
|
||||
builder.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, Features.SPRING_CLOSED);
|
||||
|
||||
builder.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, BOPConfiguredFeatures.FLESH_TENDON);
|
||||
builder.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, BOPConfiguredFeatures.BONE_SPINE);
|
||||
|
||||
DefaultBiomeFeatures.addNetherDefaultOres(builder);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configureMobSpawns(MobSpawnInfo.Builder builder)
|
||||
{
|
||||
//Entities
|
||||
builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.GHAST, 50, 4, 4));
|
||||
builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.ZOMBIFIED_PIGLIN, 100, 4, 4));
|
||||
builder.addSpawn(EntityClassification.CREATURE, new MobSpawnInfo.Spawners(EntityType.STRIDER, 60, 1, 2));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,57 @@
|
|||
package biomesoplenty.common.biome.nether;
|
||||
|
||||
import biomesoplenty.api.enums.BOPClimates;
|
||||
import biomesoplenty.common.biome.NetherBiomeTemplate;
|
||||
import biomesoplenty.common.world.gen.feature.BOPConfiguredFeatures;
|
||||
import biomesoplenty.common.world.gen.surfacebuilders.BOPConfiguredSurfaceBuilders;
|
||||
import biomesoplenty.common.world.gen.surfacebuilders.BOPSurfaceBuilders;
|
||||
import net.minecraft.client.audio.BackgroundMusicTracks;
|
||||
import net.minecraft.entity.EntityClassification;
|
||||
import net.minecraft.entity.EntityType;
|
||||
import net.minecraft.particles.ParticleTypes;
|
||||
import net.minecraft.util.SoundEvents;
|
||||
import net.minecraft.world.biome.*;
|
||||
import net.minecraft.world.gen.GenerationStage;
|
||||
import net.minecraft.world.gen.carver.ConfiguredCarvers;
|
||||
import net.minecraft.world.gen.feature.structure.StructureFeatures;
|
||||
import net.minecraft.world.gen.surfacebuilders.ConfiguredSurfaceBuilder;
|
||||
|
||||
public class WitheredAbyssBiome extends NetherBiomeTemplate
|
||||
{
|
||||
public WitheredAbyssBiome()
|
||||
{
|
||||
this.addWeight(BOPClimates.NETHER, 3);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configureBiome(Biome.Builder builder)
|
||||
{
|
||||
builder.precipitation(Biome.RainType.NONE).biomeCategory(Biome.Category.NETHER).depth(0.1F).scale(0.2F).temperature(2.0F).downfall(0.0F);
|
||||
|
||||
builder.specialEffects((new BiomeAmbience.Builder()).waterColor(4159204).waterFogColor(329011).fogColor(0x09060F).skyColor(calculateSkyColor(2.0F)).ambientParticle(new ParticleEffectAmbience(ParticleTypes.SMOKE, 0.00357F)).ambientLoopSound(SoundEvents.AMBIENT_SOUL_SAND_VALLEY_LOOP).ambientMoodSound(new MoodSoundAmbience(SoundEvents.AMBIENT_SOUL_SAND_VALLEY_MOOD, 6000, 8, 2.0D)).backgroundMusic(BackgroundMusicTracks.createGameMusic(SoundEvents.MUSIC_BIOME_BASALT_DELTAS)).build());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configureGeneration(BiomeGenerationSettings.Builder builder)
|
||||
{
|
||||
builder.surfaceBuilder(BOPConfiguredSurfaceBuilders.WITHERED_ABYSS);
|
||||
|
||||
//Terrain
|
||||
builder.addStructureStart(StructureFeatures.NETHER_BRIDGE);
|
||||
builder.addStructureStart(StructureFeatures.BASTION_REMNANT);
|
||||
builder.addCarver(GenerationStage.Carving.AIR, ConfiguredCarvers.NETHER_CAVE);
|
||||
|
||||
//Decoration
|
||||
builder.addFeature(GenerationStage.Decoration.UNDERGROUND_DECORATION, BOPConfiguredFeatures.OBSIDIAN_SPLATTER);
|
||||
|
||||
DefaultBiomeFeatures.addNetherDefaultOres(builder);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configureMobSpawns(MobSpawnInfo.Builder builder)
|
||||
{
|
||||
//Entities
|
||||
builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.ENDERMAN, 1, 4, 4));
|
||||
builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.WITHER_SKELETON, 1, 1, 1));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,71 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2014-2019, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
package biomesoplenty.common.biome.overworld;
|
||||
|
||||
import biomesoplenty.api.enums.BOPClimates;
|
||||
import biomesoplenty.common.biome.BiomeTemplate;
|
||||
import biomesoplenty.common.world.gen.surfacebuilders.BOPConfiguredSurfaceBuilders;
|
||||
import biomesoplenty.common.world.gen.surfacebuilders.BOPSurfaceBuilders;
|
||||
import net.minecraft.entity.EntityClassification;
|
||||
import net.minecraft.entity.EntityType;
|
||||
import net.minecraft.world.biome.*;
|
||||
import net.minecraft.world.gen.feature.structure.StructureFeatures;
|
||||
import net.minecraft.world.gen.surfacebuilders.ConfiguredSurfaceBuilder;
|
||||
|
||||
public class AlpsBiome extends BiomeTemplate
|
||||
{
|
||||
public AlpsBiome()
|
||||
{
|
||||
this.addWeight(BOPClimates.ICE_CAP, 5);
|
||||
this.setBeachBiome(null);
|
||||
this.setRiverBiome(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configureBiome(Biome.Builder builder)
|
||||
{
|
||||
builder.precipitation(Biome.RainType.SNOW).biomeCategory(Biome.Category.ICY).depth(7.5F).scale(0.2F).temperature(-0.25F).downfall(0.3F);
|
||||
|
||||
builder.specialEffects((new BiomeAmbience.Builder()).waterColor(4159204).waterFogColor(329011).fogColor(12638463).skyColor(calculateSkyColor(-0.25F)).ambientMoodSound(MoodSoundAmbience.LEGACY_CAVE_SETTINGS).build());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configureGeneration(BiomeGenerationSettings.Builder builder)
|
||||
{
|
||||
builder.surfaceBuilder(BOPConfiguredSurfaceBuilders.DEEP_SNOW);
|
||||
|
||||
// Structures
|
||||
DefaultBiomeFeatures.addDefaultOverworldLandStructures(builder);
|
||||
builder.addStructureStart(StructureFeatures.RUINED_PORTAL_MOUNTAIN);
|
||||
|
||||
// Underground
|
||||
DefaultBiomeFeatures.addDefaultCarvers(builder);
|
||||
DefaultBiomeFeatures.addDefaultMonsterRoom(builder);
|
||||
DefaultBiomeFeatures.addDefaultUndergroundVariety(builder);
|
||||
DefaultBiomeFeatures.addDefaultOres(builder);
|
||||
DefaultBiomeFeatures.addDefaultSoftDisks(builder);
|
||||
|
||||
// Other Features
|
||||
DefaultBiomeFeatures.addDefaultSprings(builder);
|
||||
DefaultBiomeFeatures.addExtraEmeralds(builder);
|
||||
DefaultBiomeFeatures.addInfestedStone(builder);
|
||||
DefaultBiomeFeatures.addSurfaceFreezing(builder);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configureMobSpawns(MobSpawnInfo.Builder builder)
|
||||
{
|
||||
// Entities
|
||||
builder.addSpawn(EntityClassification.CREATURE, new MobSpawnInfo.Spawners(EntityType.LLAMA, 5, 4, 6));
|
||||
builder.addSpawn(EntityClassification.AMBIENT, new MobSpawnInfo.Spawners(EntityType.BAT, 10, 8, 8));
|
||||
builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.SKELETON, 100, 4, 4));
|
||||
builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.SLIME, 100, 4, 4));
|
||||
builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.ENDERMAN, 10, 1, 4));
|
||||
builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.STRAY, 80, 4, 4));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,83 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2014-2019, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
package biomesoplenty.common.biome.overworld;
|
||||
|
||||
import biomesoplenty.common.biome.BiomeTemplate;
|
||||
import biomesoplenty.common.world.gen.feature.BOPConfiguredFeatures;
|
||||
import biomesoplenty.common.world.gen.surfacebuilders.BOPConfiguredSurfaceBuilders;
|
||||
import net.minecraft.entity.EntityClassification;
|
||||
import net.minecraft.entity.EntityType;
|
||||
import net.minecraft.world.biome.*;
|
||||
import net.minecraft.world.gen.GenerationStage;
|
||||
import net.minecraft.world.gen.feature.structure.StructureFeatures;
|
||||
import net.minecraft.world.gen.surfacebuilders.ConfiguredSurfaceBuilder;
|
||||
import net.minecraft.world.gen.surfacebuilders.SurfaceBuilder;
|
||||
|
||||
public class AlpsFoothillsBiome extends BiomeTemplate
|
||||
{
|
||||
public AlpsFoothillsBiome()
|
||||
{
|
||||
this.setBeachBiome(null);
|
||||
this.setRiverBiome(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configureBiome(Biome.Builder builder)
|
||||
{
|
||||
builder.precipitation(Biome.RainType.SNOW).biomeCategory(Biome.Category.ICY).depth(3.0F).scale(0.3F).temperature(-0.25F).downfall(0.3F);
|
||||
|
||||
builder.specialEffects((new BiomeAmbience.Builder()).waterColor(4159204).waterFogColor(329011).fogColor(12638463).skyColor(calculateSkyColor(-0.25F)).ambientMoodSound(MoodSoundAmbience.LEGACY_CAVE_SETTINGS).build());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configureGeneration(BiomeGenerationSettings.Builder builder)
|
||||
{
|
||||
builder.surfaceBuilder(BOPConfiguredSurfaceBuilders.ALPS_FOOTHILLS);
|
||||
|
||||
// Structures
|
||||
DefaultBiomeFeatures.addDefaultOverworldLandStructures(builder);
|
||||
builder.addStructureStart(StructureFeatures.RUINED_PORTAL_MOUNTAIN);
|
||||
|
||||
// Underground
|
||||
DefaultBiomeFeatures.addDefaultCarvers(builder);
|
||||
DefaultBiomeFeatures.addDefaultMonsterRoom(builder);
|
||||
DefaultBiomeFeatures.addDefaultUndergroundVariety(builder);
|
||||
DefaultBiomeFeatures.addDefaultOres(builder);
|
||||
DefaultBiomeFeatures.addDefaultSoftDisks(builder);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
|
||||
// Vegetation
|
||||
builder.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, BOPConfiguredFeatures.ALPS_FOOTHILLS_TREES);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
|
||||
// Other Features
|
||||
DefaultBiomeFeatures.addDefaultSprings(builder);
|
||||
DefaultBiomeFeatures.addExtraEmeralds(builder);
|
||||
DefaultBiomeFeatures.addInfestedStone(builder);
|
||||
DefaultBiomeFeatures.addSurfaceFreezing(builder);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configureMobSpawns(MobSpawnInfo.Builder builder)
|
||||
{
|
||||
// Entities
|
||||
builder.addSpawn(EntityClassification.CREATURE, new MobSpawnInfo.Spawners(EntityType.LLAMA, 5, 4, 6));
|
||||
builder.addSpawn(EntityClassification.AMBIENT, new MobSpawnInfo.Spawners(EntityType.BAT, 10, 8, 8));
|
||||
builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.SPIDER, 100, 4, 4));
|
||||
builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.ZOMBIE, 95, 4, 4));
|
||||
builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.ZOMBIE_VILLAGER, 5, 1, 1));
|
||||
builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.SKELETON, 100, 4, 4));
|
||||
builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.CREEPER, 100, 4, 4));
|
||||
builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.SLIME, 100, 4, 4));
|
||||
builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.ENDERMAN, 10, 1, 4));
|
||||
builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.WITCH, 5, 1, 1));
|
||||
builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.STRAY, 80, 4, 4));
|
||||
}
|
||||
}
|
|
@ -1,474 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2015-2016, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
|
||||
package biomesoplenty.common.biome.overworld;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Random;
|
||||
|
||||
import biomesoplenty.api.biome.BiomeOwner;
|
||||
import biomesoplenty.api.biome.IExtendedBiome;
|
||||
import biomesoplenty.api.block.BOPBlocks;
|
||||
import biomesoplenty.api.block.IBlockPosQuery;
|
||||
import biomesoplenty.api.config.IBOPWorldSettings;
|
||||
import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType;
|
||||
import biomesoplenty.api.config.IConfigObj;
|
||||
import biomesoplenty.api.enums.BOPClimates;
|
||||
import biomesoplenty.api.generation.GeneratorStage;
|
||||
import biomesoplenty.api.generation.IGenerator;
|
||||
import biomesoplenty.common.block.BlockBOPMushroom;
|
||||
import biomesoplenty.common.enums.BOPFlowers;
|
||||
import biomesoplenty.common.enums.BOPPlants;
|
||||
import biomesoplenty.common.init.ModBiomes;
|
||||
import biomesoplenty.common.util.biome.BiomeUtils;
|
||||
import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod;
|
||||
import biomesoplenty.common.util.block.BlockQuery;
|
||||
import biomesoplenty.common.world.GenerationManager;
|
||||
import biomesoplenty.common.world.TerrainSettings;
|
||||
import biomesoplenty.common.world.generator.GeneratorColumns;
|
||||
import biomesoplenty.common.world.generator.GeneratorFlora;
|
||||
import biomesoplenty.core.BiomesOPlenty;
|
||||
import net.minecraft.block.BlockSand;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.EntityList;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.EnumCreatureType;
|
||||
import net.minecraft.init.Biomes;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
import net.minecraft.world.chunk.ChunkPrimer;
|
||||
|
||||
public class BOPBiome extends Biome implements IExtendedBiome
|
||||
{
|
||||
private GenerationManager generationManager = new GenerationManager();
|
||||
private Map<BOPClimates, Integer> weightMap = new HashMap<BOPClimates, Integer>();
|
||||
|
||||
// defaults
|
||||
public int skyColor = -1; // -1 indicates the default skyColor by temperature will be used
|
||||
public boolean hasBiomeEssence = true;
|
||||
public IBlockState seaFloorBlock = Blocks.DIRT.getDefaultState();
|
||||
|
||||
public boolean canSpawnInBiome = true;
|
||||
public boolean canGenerateVillages = true;
|
||||
public boolean canGenerateRivers = true;
|
||||
|
||||
public ResourceLocation beachBiomeLocation = BiomeUtils.getLocForBiome(Biomes.BEACH);
|
||||
|
||||
public TerrainSettings terrainSettings = new TerrainSettings();
|
||||
public boolean noNeighborTerrainInfuence = false;
|
||||
public int avgDirtDepth = 3;
|
||||
|
||||
public final ResourceLocation location;
|
||||
|
||||
private BOPBiome(ResourceLocation idLoc, PropsBuilder defaultBuilder, IConfigObj conf)
|
||||
{
|
||||
super(configureBiomeProps(idLoc, defaultBuilder, conf));
|
||||
|
||||
this.configure(conf);
|
||||
|
||||
this.location = idLoc;
|
||||
this.terrainSettings.setDefaults();
|
||||
|
||||
this.theBiomeDecorator.treesPerChunk = -999;
|
||||
this.theBiomeDecorator.flowersPerChunk = -999;
|
||||
this.theBiomeDecorator.grassPerChunk = -999;
|
||||
this.theBiomeDecorator.sandPerChunk = -999;
|
||||
this.theBiomeDecorator.sandPerChunk2 = -999;
|
||||
//this.theBiomeDecorator.generateLakes = false;
|
||||
|
||||
// roots
|
||||
this.addGenerator("roots", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(4.0F).with(BOPPlants.ROOT).create());
|
||||
|
||||
IBlockPosQuery suitableStonePosition = BlockQuery.buildAnd().withAltitudeBetween(0, 55).blocks(Blocks.STONE).create();
|
||||
this.addGenerator("miners_delight", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.25F).generationAttempts(64).with(BOPFlowers.MINERS_DELIGHT).placeOn(suitableStonePosition).scatterYMethod(ScatterYMethod.BELOW_GROUND).create());
|
||||
this.addGenerator("glowshrooms", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(1.5F).generationAttempts(64).placeOn(suitableStonePosition).with(BOPBlocks.mushroom.getDefaultState().withProperty(BlockBOPMushroom.VARIANT, BlockBOPMushroom.MushroomType.GLOWSHROOM)).scatterYMethod(ScatterYMethod.BELOW_GROUND).create());
|
||||
this.addGenerator("stone_formations", GeneratorStage.FLOWERS,(new GeneratorColumns.Builder()).amountPerChunk(30.0F).generationAttempts(32).placeOn(suitableStonePosition).with(BOPBlocks.stone_formations.getDefaultState()).minHeight(1).maxHeight(7).randomDirection(true).scatterYMethod(ScatterYMethod.BELOW_GROUND).create());
|
||||
}
|
||||
|
||||
public BOPBiome(String idName, PropsBuilder defaultBuilder)
|
||||
{
|
||||
this(new ResourceLocation(BiomesOPlenty.MOD_ID, idName), defaultBuilder, ModBiomes.readConfigFile(idName));
|
||||
}
|
||||
|
||||
public static BiomeProps configureBiomeProps(ResourceLocation idLoc, PropsBuilder defaultBuilder, IConfigObj conf)
|
||||
{
|
||||
// If there isn't a valid config file, don't use it to configure the biome
|
||||
if (conf.isEmpty())
|
||||
return defaultBuilder.build();
|
||||
|
||||
defaultBuilder.withBaseHeight(conf.getFloat("rootHeight"));
|
||||
defaultBuilder.withHeightVariation(conf.getFloat("variation"));
|
||||
defaultBuilder.withTemperature(conf.getFloat("temperature"));
|
||||
defaultBuilder.withRainfall(conf.getFloat("rainfall"));
|
||||
defaultBuilder.withWaterColor(conf.getInt("waterColor"));
|
||||
|
||||
Boolean enableRain = conf.getBool("enableRain");
|
||||
if (enableRain != null && !enableRain) defaultBuilder.withRainDisabled();
|
||||
|
||||
Boolean enableSnow = conf.getBool("enableSnow");
|
||||
if (enableSnow != null && enableSnow) defaultBuilder.withSnowEnabled();
|
||||
|
||||
defaultBuilder.withBaseBiome(conf.getString("baseBiome"));
|
||||
defaultBuilder.withGuiColour(conf.getInt("guiColour"));
|
||||
|
||||
return defaultBuilder.build();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applySettings(IBOPWorldSettings settings)
|
||||
{
|
||||
if (!settings.isEnabled(GeneratorType.MUSHROOMS)) {this.removeGenerator("glowshrooms");}
|
||||
if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("roots");}
|
||||
if (!settings.isEnabled(GeneratorType.FLOWERS)) {this.removeGenerator("miners_delight");}
|
||||
if (!settings.isEnabled(GeneratorType.ROCK_FORMATIONS)) {this.removeGenerator("stone_formations");}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void configure(IConfigObj conf)
|
||||
{
|
||||
// Allow basic properties to be overridden
|
||||
this.topBlock = conf.getBlockState("topBlock", this.topBlock);
|
||||
this.fillerBlock = conf.getBlockState("fillerBlock", this.fillerBlock);
|
||||
this.seaFloorBlock = conf.getBlockState("seaFloorBlock", this.seaFloorBlock);
|
||||
|
||||
this.skyColor = conf.getInt("skyColor", this.skyColor);
|
||||
this.hasBiomeEssence = conf.getBool("hasBiomeEssence", this.hasBiomeEssence);
|
||||
|
||||
this.canSpawnInBiome = conf.getBool("canSpawnInBiome", this.canSpawnInBiome);
|
||||
this.canGenerateVillages = conf.getBool("canGenerateVillages", this.canGenerateVillages);
|
||||
this.canGenerateRivers = conf.getBool("canGenerateRivers", this.canGenerateRivers);
|
||||
|
||||
this.beachBiomeLocation = conf.getResourceLocation("beachBiomeLocation", this.beachBiomeLocation);
|
||||
|
||||
// Allow weights to be overridden
|
||||
IConfigObj confWeights = conf.getObject("weights");
|
||||
if (confWeights != null)
|
||||
{
|
||||
for (BOPClimates climate : BOPClimates.values())
|
||||
{
|
||||
Integer weight = confWeights.getInt(climate.name().toLowerCase(), null);
|
||||
if (weight == null) {continue;}
|
||||
if (weight.intValue() < 1)
|
||||
{
|
||||
this.weightMap.remove(climate);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.weightMap.put(climate, weight);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Allow generators to be configured
|
||||
IConfigObj confGenerators = conf.getObject("generators");
|
||||
if (confGenerators != null)
|
||||
{
|
||||
for (String name : confGenerators.getKeys())
|
||||
{
|
||||
this.generationManager.configureWith(name, confGenerators.getObject(name));
|
||||
}
|
||||
}
|
||||
|
||||
// Allow spawnable entites to be configured
|
||||
ArrayList<IConfigObj> confEntities = conf.getObjectArray("entities");
|
||||
if (confEntities != null)
|
||||
{
|
||||
for (IConfigObj confEntity : confEntities)
|
||||
{
|
||||
String entityName = confEntity.getString("name");
|
||||
EnumCreatureType creatureType = confEntity.getEnum("creatureType", EnumCreatureType.class);
|
||||
if (entityName == null || creatureType == null) {continue;}
|
||||
|
||||
// Look for an entity class matching this name
|
||||
// case insensitive, dot used as mod delimiter, no spaces or underscores
|
||||
// eg 'villager', 'Zombie', 'SQUID', 'enderdragon', 'biomesoplenty.wasp' all ok
|
||||
Class <? extends EntityLiving> entityClazz = null;
|
||||
for (Object entry : EntityList.NAME_TO_CLASS.entrySet())
|
||||
{
|
||||
String entryEntityName = (String)((Entry)entry).getKey();
|
||||
if (entryEntityName.equalsIgnoreCase(entityName))
|
||||
{
|
||||
entityClazz = (Class <? extends EntityLiving>)((Entry)entry).getValue();
|
||||
}
|
||||
}
|
||||
if (entityClazz == null)
|
||||
{
|
||||
confEntity.addMessage("No entity registered called " + entityName);
|
||||
continue;
|
||||
}
|
||||
if (!creatureType.getCreatureClass().isAssignableFrom(entityClazz))
|
||||
{
|
||||
confEntity.addMessage("Entity " + entityName + " is not of type " + creatureType);
|
||||
continue;
|
||||
}
|
||||
|
||||
List<SpawnListEntry> spawns = this.getSpawnableList(creatureType);
|
||||
Integer weight = confEntity.getInt("weight");
|
||||
if (weight != null && weight < 1)
|
||||
{
|
||||
// weight was set to zero (or negative) so find and remove this spawn
|
||||
Iterator<SpawnListEntry> spawnIterator = spawns.iterator();
|
||||
while (spawnIterator.hasNext())
|
||||
{
|
||||
SpawnListEntry entry = spawnIterator.next();
|
||||
if (entry.entityClass == entityClazz)
|
||||
{
|
||||
spawnIterator.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// weight was positive, or omitted, so update an existing spawn or add a new spawn
|
||||
boolean foundIt = false;
|
||||
for (SpawnListEntry entry : spawns)
|
||||
{
|
||||
if (entry.entityClass == entityClazz)
|
||||
{
|
||||
// the entry already exists - adjust the params
|
||||
entry.itemWeight = confEntity.getInt("weight", entry.itemWeight);
|
||||
entry.minGroupCount = confEntity.getInt("minGroupCount", entry.minGroupCount);
|
||||
entry.maxGroupCount = confEntity.getInt("maxGroupCount", entry.maxGroupCount);
|
||||
foundIt = true;
|
||||
}
|
||||
}
|
||||
if (!foundIt)
|
||||
{
|
||||
// the entry does not exist - add it
|
||||
SpawnListEntry entry = new SpawnListEntry(entityClazz, confEntity.getInt("weight", 10), confEntity.getInt("minGroupCount", 4), confEntity.getInt("maxGroupCount", 4));
|
||||
spawns.add(entry);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public BiomeOwner getBiomeOwner()
|
||||
{
|
||||
return BiomeOwner.BIOMESOPLENTY;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addGenerator(String name, GeneratorStage stage, IGenerator generator)
|
||||
{
|
||||
this.generationManager.addGenerator(name, stage, generator);
|
||||
}
|
||||
|
||||
public IGenerator getGenerator(String name)
|
||||
{
|
||||
return this.generationManager.getGenerator(name);
|
||||
}
|
||||
|
||||
public void removeGenerator(String name)
|
||||
{
|
||||
this.generationManager.removeGenerator(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GenerationManager getGenerationManager()
|
||||
{
|
||||
return this.generationManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<BOPClimates, Integer> getWeightMap()
|
||||
{
|
||||
return this.weightMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addWeight(BOPClimates climate, int weight)
|
||||
{
|
||||
this.weightMap.put(climate, weight);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clearWeights()
|
||||
{
|
||||
this.weightMap.clear();
|
||||
}
|
||||
|
||||
// whether or not a biome essence item corresponding to this biome should be able to drop from biome blocks
|
||||
public boolean hasBiomeEssence()
|
||||
{
|
||||
return this.hasBiomeEssence;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSkyColorByTemp(float temperature)
|
||||
{
|
||||
return (this.skyColor == -1) ? super.getSkyColorByTemp(temperature) : this.skyColor;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void genTerrainBlocks(World world, Random rand, ChunkPrimer primer, int x, int z, double stoneNoiseVal)
|
||||
{
|
||||
|
||||
IBlockState topBlock = this.topBlock;
|
||||
IBlockState fillerBlock = this.fillerBlock;
|
||||
IBlockState seaFloorBlock = this.seaFloorBlock;
|
||||
|
||||
boolean hitFloorYet = false;
|
||||
int topBlocksToFill = 0;
|
||||
int dirtBlocksToFill = 0;
|
||||
int seaFloorBlocksToFill = 0;
|
||||
int dirtDepth = Math.max(0, (int)(stoneNoiseVal / 3.0D + this.avgDirtDepth + rand.nextDouble() * 0.25D));
|
||||
int seaFloorDepth = 1 + rand.nextInt(2);
|
||||
|
||||
int localX = x & 15;
|
||||
int localZ = z & 15;
|
||||
|
||||
// start at the top and move downwards
|
||||
for (int y = 255; y >= 0; --y)
|
||||
{
|
||||
|
||||
IBlockState state = primer.getBlockState(localZ, y, localX);
|
||||
|
||||
// bedrock at the bottom
|
||||
if (y <= rand.nextInt(5))
|
||||
{
|
||||
primer.setBlockState(localZ, y, localX, Blocks.BEDROCK.getDefaultState());
|
||||
continue;
|
||||
}
|
||||
|
||||
if (state.getMaterial() == Material.AIR)
|
||||
{
|
||||
// topBlocks and dirtBlocks can occur after any pocket of air
|
||||
topBlocksToFill = (topBlock == null ? 0 : 1);
|
||||
dirtBlocksToFill = dirtDepth;
|
||||
continue;
|
||||
}
|
||||
else if (!hitFloorYet && state.getMaterial() == Material.WATER)
|
||||
{
|
||||
// seaFloorBlocks can occur after surface water
|
||||
seaFloorBlocksToFill = seaFloorDepth;
|
||||
}
|
||||
|
||||
if (state.getBlock() == Blocks.STONE)
|
||||
{
|
||||
hitFloorYet = true;
|
||||
if (topBlocksToFill > 0)
|
||||
{
|
||||
if (y >= 62)
|
||||
{
|
||||
primer.setBlockState(localZ, y, localX, topBlock);
|
||||
}
|
||||
else if (y >= 56 - dirtDepth)
|
||||
{
|
||||
primer.setBlockState(localZ, y, localX, fillerBlock);
|
||||
}
|
||||
else
|
||||
{
|
||||
primer.setBlockState(localZ, y, localX, Blocks.GRAVEL.getDefaultState());
|
||||
dirtBlocksToFill = 0;
|
||||
}
|
||||
topBlocksToFill--;
|
||||
}
|
||||
else if (seaFloorBlocksToFill > 0)
|
||||
{
|
||||
primer.setBlockState(localZ, y, localX, seaFloorBlock);
|
||||
--seaFloorBlocksToFill;
|
||||
}
|
||||
else if (dirtBlocksToFill > 0)
|
||||
{
|
||||
primer.setBlockState(localZ, y, localX, fillerBlock);
|
||||
--dirtBlocksToFill;
|
||||
|
||||
// add sandstone after a patch of sand
|
||||
if (dirtBlocksToFill == 0 && fillerBlock.getBlock() == Blocks.SAND)
|
||||
{
|
||||
dirtBlocksToFill = rand.nextInt(4) + Math.max(0, y - 63);
|
||||
fillerBlock = fillerBlock.getValue(BlockSand.VARIANT) == BlockSand.EnumType.RED_SAND ? Blocks.RED_SANDSTONE.getDefaultState() : Blocks.SANDSTONE.getDefaultState();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceLocation getBeachLocation()
|
||||
{
|
||||
return this.beachBiomeLocation;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Biome getBaseBiome()
|
||||
{
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceLocation getResourceLocation()
|
||||
{
|
||||
return this.location;
|
||||
}
|
||||
|
||||
protected static class PropsBuilder
|
||||
{
|
||||
private final String biomeName;
|
||||
|
||||
/**The colour of this biome as seen in guis**/
|
||||
private int guiColour = 0xffffff;
|
||||
private float baseHeight = 0.1F;
|
||||
private float heightVariation = 0.2F;
|
||||
private float temperature = 0.5F;
|
||||
private float rainfall = 0.5F;
|
||||
private int waterColor = 16777215;
|
||||
private boolean enableSnow = false;
|
||||
private boolean enableRain = true;
|
||||
private String baseBiomeRegName;
|
||||
|
||||
public PropsBuilder(String name) { this.biomeName = name; }
|
||||
|
||||
public PropsBuilder withGuiColour(Integer colour) { if (colour != null) this.guiColour = colour; return this; }
|
||||
public PropsBuilder withTemperature(Float temperature) { if (temperature != null) this.temperature = temperature; return this; }
|
||||
public PropsBuilder withRainfall(Float rainfall) { if (rainfall != null) this.rainfall = rainfall; return this; }
|
||||
public PropsBuilder withBaseHeight(Float baseHeight) { if (baseHeight != null) this.baseHeight = baseHeight; return this; }
|
||||
public PropsBuilder withHeightVariation(Float heightVariation) { if (heightVariation != null) this.heightVariation = heightVariation; return this; }
|
||||
public PropsBuilder withRainDisabled() { this.enableRain = false; return this; }
|
||||
public PropsBuilder withSnowEnabled() { this.enableSnow = true; return this; }
|
||||
public PropsBuilder withWaterColor(Integer waterColor) { if (waterColor != null) this.waterColor = waterColor; return this; }
|
||||
public PropsBuilder withBaseBiome(String name) { if (name != null) this.baseBiomeRegName = name; return this; }
|
||||
|
||||
public BiomeProps build()
|
||||
{
|
||||
return new BiomeProps(this.biomeName, this.temperature, this.rainfall, this.baseHeight, this.heightVariation, this.enableRain, this.enableSnow, this.waterColor, this.baseBiomeRegName, this.guiColour);
|
||||
}
|
||||
}
|
||||
|
||||
private static class BiomeProps extends Biome.BiomeProperties
|
||||
{
|
||||
/**The colour of this biome as seen in guis**/
|
||||
private int guiColour = 0xffffff;
|
||||
|
||||
private BiomeProps(String name, float temperature, float rainfall, float baseHeight, float heightVariation, boolean enableRain, boolean enableSnow, int waterColor, String baseBiomeRegName, int guiColour)
|
||||
{
|
||||
super(name);
|
||||
|
||||
this.setTemperature(temperature);
|
||||
this.setRainfall(rainfall);
|
||||
this.setBaseHeight(baseHeight);
|
||||
this.setHeightVariation(heightVariation);
|
||||
if (!enableRain) this.setRainDisabled();
|
||||
if (enableSnow) this.setSnowEnabled();
|
||||
this.setWaterColor(waterColor);
|
||||
this.setBaseBiome(baseBiomeRegName);
|
||||
|
||||
this.guiColour = guiColour;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,95 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2014-2019, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
package biomesoplenty.common.biome.overworld;
|
||||
|
||||
import biomesoplenty.api.enums.BOPClimates;
|
||||
import biomesoplenty.common.biome.BiomeTemplate;
|
||||
import biomesoplenty.common.world.gen.feature.BOPConfiguredFeatures;
|
||||
import net.minecraft.entity.EntityClassification;
|
||||
import net.minecraft.entity.EntityType;
|
||||
import net.minecraft.world.biome.*;
|
||||
import net.minecraft.world.gen.GenerationStage;
|
||||
import net.minecraft.world.gen.feature.Features;
|
||||
import net.minecraft.world.gen.feature.structure.StructureFeatures;
|
||||
import net.minecraft.world.gen.surfacebuilders.ConfiguredSurfaceBuilder;
|
||||
import net.minecraft.world.gen.surfacebuilders.ConfiguredSurfaceBuilders;
|
||||
import net.minecraft.world.gen.surfacebuilders.SurfaceBuilder;
|
||||
|
||||
public class BambooBlossomGroveBiome extends BiomeTemplate
|
||||
{
|
||||
public BambooBlossomGroveBiome()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configureBiome(Biome.Builder builder)
|
||||
{
|
||||
builder.precipitation(Biome.RainType.RAIN).biomeCategory(Biome.Category.FOREST).depth(0.05F).scale(0.05F).temperature(0.6F).downfall(0.9F);
|
||||
|
||||
builder.specialEffects((new BiomeAmbience.Builder()).waterColor(4159204).waterFogColor(329011).fogColor(12638463).skyColor(calculateSkyColor(0.6F)).grassColorOverride(0x85CE71).foliageColorOverride(0x63BF66).ambientMoodSound(MoodSoundAmbience.LEGACY_CAVE_SETTINGS).build());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configureGeneration(BiomeGenerationSettings.Builder builder)
|
||||
{
|
||||
builder.surfaceBuilder(ConfiguredSurfaceBuilders.GRASS);
|
||||
|
||||
// Structures
|
||||
DefaultBiomeFeatures.addDefaultOverworldLandStructures(builder);
|
||||
builder.addStructureStart(StructureFeatures.RUINED_PORTAL_STANDARD);
|
||||
|
||||
// Underground
|
||||
DefaultBiomeFeatures.addDefaultCarvers(builder);
|
||||
DefaultBiomeFeatures.addDefaultLakes(builder);
|
||||
DefaultBiomeFeatures.addDefaultMonsterRoom(builder);
|
||||
DefaultBiomeFeatures.addDefaultUndergroundVariety(builder);
|
||||
DefaultBiomeFeatures.addDefaultOres(builder);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
|
||||
// Vegetation
|
||||
builder.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, BOPConfiguredFeatures.BAMBOO_BLOSSOM_GROVE_TREES);
|
||||
builder.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, BOPConfiguredFeatures.CHERRY_BLOSSOM_GROVE_FLOWERS);
|
||||
|
||||
builder.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, BOPConfiguredFeatures.CLOVER_3);
|
||||
builder.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, BOPConfiguredFeatures.LILAC_2);
|
||||
builder.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, BOPConfiguredFeatures.LILY_PAD_5);
|
||||
builder.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, BOPConfiguredFeatures.SHORT_BAMBOO_5);
|
||||
builder.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, BOPConfiguredFeatures.STANDARD_GRASS_12);
|
||||
builder.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Features.BROWN_MUSHROOM_NORMAL);
|
||||
builder.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Features.PATCH_SUGAR_CANE);
|
||||
builder.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Features.RED_MUSHROOM_NORMAL);
|
||||
builder.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Features.SEAGRASS_COLD);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
|
||||
// Other Features
|
||||
DefaultBiomeFeatures.addDefaultSprings(builder);
|
||||
DefaultBiomeFeatures.addSurfaceFreezing(builder);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configureMobSpawns(MobSpawnInfo.Builder builder)
|
||||
{
|
||||
// Entities
|
||||
builder.addSpawn(EntityClassification.CREATURE, new MobSpawnInfo.Spawners(EntityType.SHEEP, 12, 4, 4));
|
||||
builder.addSpawn(EntityClassification.CREATURE, new MobSpawnInfo.Spawners(EntityType.PIG, 10, 4, 4));
|
||||
builder.addSpawn(EntityClassification.CREATURE, new MobSpawnInfo.Spawners(EntityType.CHICKEN, 10, 4, 4));
|
||||
builder.addSpawn(EntityClassification.CREATURE, new MobSpawnInfo.Spawners(EntityType.COW, 8, 4, 4));
|
||||
builder.addSpawn(EntityClassification.CREATURE, new MobSpawnInfo.Spawners(EntityType.PANDA, 80, 1, 2));
|
||||
builder.addSpawn(EntityClassification.AMBIENT, new MobSpawnInfo.Spawners(EntityType.BAT, 10, 8, 8));
|
||||
builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.SPIDER, 100, 4, 4));
|
||||
builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.ZOMBIE, 95, 4, 4));
|
||||
builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.ZOMBIE_VILLAGER, 5, 1, 1));
|
||||
builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.SKELETON, 100, 4, 4));
|
||||
builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.CREEPER, 100, 4, 4));
|
||||
builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.SLIME, 100, 4, 4));
|
||||
builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.ENDERMAN, 10, 1, 4));
|
||||
builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.WITCH, 5, 1, 1));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,96 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2014-2019, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
package biomesoplenty.common.biome.overworld;
|
||||
|
||||
import biomesoplenty.api.biome.BOPBiomes;
|
||||
import biomesoplenty.api.enums.BOPClimates;
|
||||
import biomesoplenty.common.biome.BiomeTemplate;
|
||||
import biomesoplenty.common.world.gen.feature.BOPConfiguredFeatures;
|
||||
import net.minecraft.entity.EntityClassification;
|
||||
import net.minecraft.entity.EntityType;
|
||||
import net.minecraft.world.biome.*;
|
||||
import net.minecraft.world.gen.GenerationStage;
|
||||
import net.minecraft.world.gen.feature.*;
|
||||
import net.minecraft.world.gen.feature.structure.StructureFeatures;
|
||||
import net.minecraft.world.gen.surfacebuilders.ConfiguredSurfaceBuilder;
|
||||
import net.minecraft.world.gen.surfacebuilders.ConfiguredSurfaceBuilders;
|
||||
import net.minecraft.world.gen.surfacebuilders.SurfaceBuilder;
|
||||
|
||||
public class BayouBiome extends BiomeTemplate
|
||||
{
|
||||
public BayouBiome()
|
||||
{
|
||||
this.addWeight(BOPClimates.SUBTROPICAL, 10);
|
||||
this.setBeachBiome(BOPBiomes.bayou_mangrove);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configureBiome(Biome.Builder builder)
|
||||
{
|
||||
builder.precipitation(Biome.RainType.RAIN).biomeCategory(Biome.Category.SWAMP).depth(-0.3F).scale(0.0F).temperature(0.95F).downfall(0.9F);
|
||||
|
||||
builder.specialEffects((new BiomeAmbience.Builder()).waterColor(0x62AF84).waterFogColor(0x0C211C).fogColor(12638463).skyColor(calculateSkyColor(0.95F)).grassColorOverride(0x6FAA50).foliageColorOverride(0x8BDB67).ambientMoodSound(MoodSoundAmbience.LEGACY_CAVE_SETTINGS).build());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configureGeneration(BiomeGenerationSettings.Builder builder)
|
||||
{
|
||||
builder.surfaceBuilder(ConfiguredSurfaceBuilders.GRASS);
|
||||
|
||||
// Structures
|
||||
DefaultBiomeFeatures.addDefaultOverworldLandStructures(builder);
|
||||
builder.addStructureStart(StructureFeatures.RUINED_PORTAL_SWAMP);
|
||||
|
||||
// Underground
|
||||
DefaultBiomeFeatures.addDefaultCarvers(builder);
|
||||
DefaultBiomeFeatures.addDefaultLakes(builder);
|
||||
DefaultBiomeFeatures.addDefaultMonsterRoom(builder);
|
||||
DefaultBiomeFeatures.addDefaultUndergroundVariety(builder);
|
||||
DefaultBiomeFeatures.addDefaultOres(builder);
|
||||
DefaultBiomeFeatures.addSwampClayDisk(builder);
|
||||
|
||||
builder.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, BOPConfiguredFeatures.MUD_DISK);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
|
||||
// Vegetation
|
||||
builder.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, BOPConfiguredFeatures.BAYOU_TREES);
|
||||
|
||||
builder.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, BOPConfiguredFeatures.CATTAIL_6);
|
||||
builder.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, BOPConfiguredFeatures.FERN_GRASS_8);
|
||||
builder.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, BOPConfiguredFeatures.LARGE_FERN_7);
|
||||
builder.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, BOPConfiguredFeatures.LILY_PAD_10);
|
||||
builder.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, BOPConfiguredFeatures.TALL_GRASS_6);
|
||||
builder.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Features.BROWN_MUSHROOM_NORMAL);
|
||||
builder.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Features.PATCH_SUGAR_CANE);
|
||||
builder.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Features.RED_MUSHROOM_NORMAL);
|
||||
builder.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Features.SEAGRASS_SWAMP);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
|
||||
// Other Features
|
||||
DefaultBiomeFeatures.addDefaultSprings(builder);
|
||||
DefaultBiomeFeatures.addSurfaceFreezing(builder);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configureMobSpawns(MobSpawnInfo.Builder builder)
|
||||
{
|
||||
// Entities
|
||||
builder.addSpawn(EntityClassification.AMBIENT, new MobSpawnInfo.Spawners(EntityType.BAT, 10, 8, 8));
|
||||
builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.SPIDER, 100, 4, 4));
|
||||
builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.ZOMBIE, 95, 4, 4));
|
||||
builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.ZOMBIE_VILLAGER, 5, 1, 1));
|
||||
builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.SKELETON, 100, 4, 4));
|
||||
builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.CREEPER, 100, 4, 4));
|
||||
builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.SLIME, 100, 4, 4));
|
||||
builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.ENDERMAN, 10, 1, 4));
|
||||
builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.WITCH, 5, 1, 1));
|
||||
builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.SLIME, 1, 1, 1));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,86 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2014-2019, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
package biomesoplenty.common.biome.overworld;
|
||||
|
||||
import biomesoplenty.common.biome.BiomeTemplate;
|
||||
import biomesoplenty.common.world.gen.feature.BOPConfiguredFeatures;
|
||||
import biomesoplenty.common.world.gen.surfacebuilders.BOPConfiguredSurfaceBuilders;
|
||||
import net.minecraft.entity.EntityClassification;
|
||||
import net.minecraft.entity.EntityType;
|
||||
import net.minecraft.world.biome.*;
|
||||
import net.minecraft.world.gen.GenerationStage;
|
||||
import net.minecraft.world.gen.feature.Features;
|
||||
import net.minecraft.world.gen.feature.structure.StructureFeatures;
|
||||
|
||||
public class BayouMangroveBiome extends BiomeTemplate
|
||||
{
|
||||
public BayouMangroveBiome()
|
||||
{
|
||||
this.setBeachBiome(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configureBiome(Biome.Builder builder)
|
||||
{
|
||||
builder.precipitation(Biome.RainType.RAIN).biomeCategory(Biome.Category.SWAMP).depth(-0.175F).scale(-0.075F).temperature(0.95F).downfall(0.9F);
|
||||
|
||||
builder.specialEffects((new BiomeAmbience.Builder()).waterColor(0x62AF84).waterFogColor(0x0C211C).fogColor(12638463).skyColor(calculateSkyColor(0.95F)).grassColorOverride(0x6FAA50).foliageColorOverride(0x8BDB67).ambientMoodSound(MoodSoundAmbience.LEGACY_CAVE_SETTINGS).build());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configureGeneration(BiomeGenerationSettings.Builder builder)
|
||||
{
|
||||
builder.surfaceBuilder(BOPConfiguredSurfaceBuilders.MANGROVE);
|
||||
|
||||
// Structures
|
||||
DefaultBiomeFeatures.addDefaultOverworldLandStructures(builder);
|
||||
builder.addStructureStart(StructureFeatures.RUINED_PORTAL_SWAMP);
|
||||
|
||||
// Underground
|
||||
DefaultBiomeFeatures.addDefaultCarvers(builder);
|
||||
DefaultBiomeFeatures.addDefaultLakes(builder);
|
||||
|
||||
builder.addFeature(GenerationStage.Decoration.LAKES, BOPConfiguredFeatures.WATER_LAKE_COMMON);
|
||||
|
||||
DefaultBiomeFeatures.addDefaultMonsterRoom(builder);
|
||||
DefaultBiomeFeatures.addDefaultUndergroundVariety(builder);
|
||||
DefaultBiomeFeatures.addDefaultOres(builder);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
|
||||
// Vegetation
|
||||
builder.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, BOPConfiguredFeatures.MANGROVE_ROOTS);
|
||||
builder.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, BOPConfiguredFeatures.SPROUTS_75);
|
||||
builder.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, BOPConfiguredFeatures.STANDARD_GRASS_12);
|
||||
builder.addFeature(GenerationStage.Decoration.VEGETAL_DECORATION, Features.SEAGRASS_RIVER);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
|
||||
// Other Features
|
||||
DefaultBiomeFeatures.addDefaultSprings(builder);
|
||||
DefaultBiomeFeatures.addSurfaceFreezing(builder);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configureMobSpawns(MobSpawnInfo.Builder builder)
|
||||
{
|
||||
// Entities
|
||||
builder.addSpawn(EntityClassification.WATER_AMBIENT, new MobSpawnInfo.Spawners(EntityType.COD, 10, 3, 6));
|
||||
builder.addSpawn(EntityClassification.WATER_AMBIENT, new MobSpawnInfo.Spawners(EntityType.TROPICAL_FISH, 5, 8, 8));
|
||||
builder.addSpawn(EntityClassification.WATER_CREATURE, new MobSpawnInfo.Spawners(EntityType.SQUID, 5, 4, 4));
|
||||
builder.addSpawn(EntityClassification.AMBIENT, new MobSpawnInfo.Spawners(EntityType.BAT, 10, 8, 8));
|
||||
builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.SPIDER, 100, 4, 4));
|
||||
builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.ZOMBIE, 95, 4, 4));
|
||||
builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.ZOMBIE_VILLAGER, 5, 1, 1));
|
||||
builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.SKELETON, 100, 4, 4));
|
||||
builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.CREEPER, 100, 4, 4));
|
||||
builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.SLIME, 100, 4, 4));
|
||||
builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.ENDERMAN, 10, 1, 4));
|
||||
builder.addSpawn(EntityClassification.MONSTER, new MobSpawnInfo.Spawners(EntityType.WITCH, 5, 1, 1));
|
||||
}
|
||||
}
|
|
@ -1,61 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2015-2016, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
|
||||
package biomesoplenty.common.biome.overworld;
|
||||
|
||||
import biomesoplenty.api.block.BOPBlocks;
|
||||
import biomesoplenty.api.config.IBOPWorldSettings;
|
||||
import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType;
|
||||
import biomesoplenty.api.enums.BOPClimates;
|
||||
import biomesoplenty.api.generation.GeneratorStage;
|
||||
import biomesoplenty.common.world.generator.GeneratorLakes;
|
||||
import biomesoplenty.common.world.generator.GeneratorOreSingle;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.init.Blocks;
|
||||
|
||||
public class BiomeGenAlps extends BOPBiome
|
||||
{
|
||||
public BiomeGenAlps()
|
||||
{
|
||||
super("alps", new PropsBuilder("Alps").withGuiColour(13421772).withSnowEnabled().withTemperature(-0.5F).withRainfall(0.3F));
|
||||
|
||||
// terrain
|
||||
this.terrainSettings.avgHeight(198).heightVariation(12, 12).octaves(1, 1, 2, 2, 3, 3);
|
||||
|
||||
this.canGenerateRivers = false;
|
||||
this.canSpawnInBiome = false;
|
||||
this.canGenerateVillages = false;
|
||||
|
||||
this.addWeight(BOPClimates.TUNDRA, 3);
|
||||
this.addWeight(BOPClimates.ICE_CAP, 5);
|
||||
|
||||
this.topBlock = Blocks.SNOW.getDefaultState();
|
||||
this.fillerBlock = Blocks.SNOW.getDefaultState();
|
||||
|
||||
this.avgDirtDepth = 8;
|
||||
|
||||
this.spawnableCreatureList.clear();
|
||||
|
||||
// hot springs
|
||||
this.addGenerator("hot_springs", GeneratorStage.SAND, (new GeneratorLakes.Builder()).amountPerChunk(0.5F).waterLakeForBiome(this).liquid(BOPBlocks.hot_spring_water).frozenLiquid((IBlockState)null).create());
|
||||
|
||||
// gem
|
||||
this.addGenerator("emeralds", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).with(Blocks.EMERALD_ORE.getDefaultState()).create());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applySettings(IBOPWorldSettings settings)
|
||||
{
|
||||
if (!settings.isEnabled(GeneratorType.HOT_SPRINGS)) {this.removeGenerator("hot_springs");}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");}
|
||||
}
|
||||
}
|
|
@ -1,161 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2015-2016, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
|
||||
package biomesoplenty.common.biome.overworld;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import biomesoplenty.api.block.BOPBlocks;
|
||||
import biomesoplenty.api.block.BlockQueries;
|
||||
import biomesoplenty.api.config.IBOPWorldSettings;
|
||||
import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType;
|
||||
import biomesoplenty.api.config.IConfigObj;
|
||||
import biomesoplenty.api.enums.BOPClimates;
|
||||
import biomesoplenty.api.generation.GeneratorStage;
|
||||
import biomesoplenty.common.block.BlockBOPCoral;
|
||||
import biomesoplenty.common.block.BlockBOPPlant;
|
||||
import biomesoplenty.common.enums.BOPGems;
|
||||
import biomesoplenty.common.enums.BOPPlants;
|
||||
import biomesoplenty.common.enums.BOPTrees;
|
||||
import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod;
|
||||
import biomesoplenty.common.world.generator.GeneratorColumns;
|
||||
import biomesoplenty.common.world.generator.GeneratorDoubleFlora;
|
||||
import biomesoplenty.common.world.generator.GeneratorFlora;
|
||||
import biomesoplenty.common.world.generator.GeneratorGrass;
|
||||
import biomesoplenty.common.world.generator.GeneratorOreSingle;
|
||||
import biomesoplenty.common.world.generator.GeneratorWeighted;
|
||||
import biomesoplenty.common.world.generator.tree.GeneratorBulbTree;
|
||||
import biomesoplenty.common.world.generator.tree.GeneratorTwigletTree;
|
||||
import net.minecraft.block.BlockDirt;
|
||||
import net.minecraft.block.BlockDoublePlant;
|
||||
import net.minecraft.block.BlockFlower;
|
||||
import net.minecraft.block.BlockTallGrass;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.passive.EntityOcelot;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.chunk.ChunkPrimer;
|
||||
|
||||
public class BiomeGenBambooForest extends BOPBiome
|
||||
{
|
||||
|
||||
public IBlockState usualTopBlock;
|
||||
public IBlockState alternateTopBlock;
|
||||
|
||||
public BiomeGenBambooForest()
|
||||
{
|
||||
super("bamboo_forest", new PropsBuilder("Bamboo Forest").withGuiColour(0xA3E053).withRainfall(0.85F).withTemperature(0.9F));
|
||||
|
||||
// terrain
|
||||
this.terrainSettings.avgHeight(68).heightVariation(5, 10);
|
||||
|
||||
this.canGenerateVillages = false;
|
||||
|
||||
this.addWeight(BOPClimates.TROPICAL, 3);
|
||||
|
||||
this.spawnableCreatureList.clear();
|
||||
this.spawnableMonsterList.add(new SpawnListEntry(EntityOcelot.class, 2, 1, 1));
|
||||
|
||||
this.topBlock = Blocks.DIRT.getDefaultState().withProperty(BlockDirt.VARIANT, BlockDirt.DirtType.PODZOL);
|
||||
this.usualTopBlock = this.topBlock;
|
||||
this.alternateTopBlock = Blocks.GRASS.getDefaultState();
|
||||
|
||||
// flowers
|
||||
GeneratorWeighted flowerGenerator = new GeneratorWeighted(0.5F);
|
||||
this.addGenerator("flowers", GeneratorStage.GRASS, flowerGenerator);
|
||||
flowerGenerator.add("dandelion", 1, (new GeneratorFlora.Builder().with(BlockFlower.EnumFlowerType.DANDELION).create()));
|
||||
flowerGenerator.add("poppy", 1, (new GeneratorFlora.Builder().with(BlockFlower.EnumFlowerType.POPPY).create()));
|
||||
|
||||
// trees & logs
|
||||
GeneratorWeighted treeGenerator = new GeneratorWeighted(30);
|
||||
this.addGenerator("trees", GeneratorStage.TREE, treeGenerator);
|
||||
treeGenerator.add("bamboo", 3, (new GeneratorBulbTree.Builder()).minHeight(10).maxHeight(20).log(BOPBlocks.bamboo.getDefaultState()).leaves(BOPTrees.BAMBOO).create());
|
||||
treeGenerator.add("bamboo_thin", 1, (new GeneratorTwigletTree.Builder()).minHeight(5).maxHeight(10).leafChance(0.3F).log(BOPBlocks.bamboo.getDefaultState()).leaves(BOPTrees.BAMBOO).create());
|
||||
//treeGenerator.add("oak_bush", 1, (new GeneratorBush.Builder()).maxHeight(2).create());
|
||||
|
||||
// grasses
|
||||
GeneratorWeighted grassGenerator = new GeneratorWeighted(10);
|
||||
this.addGenerator("grass", GeneratorStage.GRASS, grassGenerator);
|
||||
grassGenerator.add("shortgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.SHORTGRASS).create());
|
||||
grassGenerator.add("mediumgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.MEDIUMGRASS).create());
|
||||
grassGenerator.add("dampgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.DAMPGRASS).create());
|
||||
grassGenerator.add("tallgrass", 1, (new GeneratorGrass.Builder()).with(BlockTallGrass.EnumType.GRASS).create());
|
||||
grassGenerator.add("doublegrass", 2, (new GeneratorDoubleFlora.Builder()).with(BlockDoublePlant.EnumPlantType.GRASS).create());
|
||||
|
||||
// other plants
|
||||
this.addGenerator("leaf_piles", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(3.0F).with(BOPPlants.LEAFPILE).create());
|
||||
this.addGenerator("ferns", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(4.0F).with(BlockTallGrass.EnumType.FERN).create());
|
||||
this.addGenerator("river_cane", GeneratorStage.FLOWERS,(new GeneratorColumns.Builder()).amountPerChunk(5.0F).generationAttempts(24).placeOn(BlockQueries.litFertileWaterside).with(BlockBOPPlant.paging.getVariantState(BOPPlants.RIVERCANE)).minHeight(1).maxHeight(3).create());
|
||||
this.addGenerator("algae", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(4.0F).replace(Blocks.WATER).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.ALGAE)).scatterYMethod(ScatterYMethod.AT_GROUND).create());
|
||||
this.addGenerator("bushes", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BOPPlants.BUSH).create());
|
||||
|
||||
// gem
|
||||
this.addGenerator("topaz", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).with(BOPGems.TOPAZ).create());
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void configure(IConfigObj conf)
|
||||
{
|
||||
super.configure(conf);
|
||||
|
||||
this.usualTopBlock = this.topBlock;
|
||||
this.alternateTopBlock = conf.getBlockState("alternateTopBlock", this.alternateTopBlock);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applySettings(IBOPWorldSettings settings)
|
||||
{
|
||||
if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("topaz");}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.WATER_PLANTS)) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");}
|
||||
|
||||
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
|
||||
if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void genTerrainBlocks(World world, Random rand, ChunkPrimer primer, int x, int z, double noise)
|
||||
{
|
||||
this.topBlock = (noise + rand.nextDouble() * 3.0D > 1.8D) ? this.alternateTopBlock : this.usualTopBlock;
|
||||
super.genTerrainBlocks(world, rand, primer, x, z, noise);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getGrassColorAtPos(BlockPos pos)
|
||||
{
|
||||
double noise = GRASS_COLOR_NOISE.getValue((double)pos.getX() * 0.0225D, (double)pos.getZ() * 0.0225D);
|
||||
return noise < -0.7D ? 0xD4DB55 : (noise < -0.3D ? 0xBBDD54 : 0xA3E053);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFoliageColorAtPos(BlockPos pos)
|
||||
{
|
||||
double noise = GRASS_COLOR_NOISE.getValue((double)pos.getX() * 0.0225D, (double)pos.getZ() * 0.0225D);
|
||||
return noise < -0.7D ? 0xD4DB55 : (noise < -0.3D ? 0xBBDD54 : 0xA3E053);
|
||||
}
|
||||
|
||||
// TODO: These 2 are copied from 1.7 - but are they used ever?
|
||||
public int getFogColour(BlockPos pos)
|
||||
{
|
||||
return 0xCCE874;
|
||||
}
|
||||
public float getFogDensity(BlockPos pos)
|
||||
{
|
||||
return 0.99F;
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -1,164 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2015-2016, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
|
||||
package biomesoplenty.common.biome.overworld;
|
||||
|
||||
import biomesoplenty.api.block.BOPBlocks;
|
||||
import biomesoplenty.api.block.BlockQueries;
|
||||
import biomesoplenty.api.block.IBlockPosQuery;
|
||||
import biomesoplenty.api.config.IBOPWorldSettings;
|
||||
import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType;
|
||||
import biomesoplenty.api.enums.BOPClimates;
|
||||
import biomesoplenty.api.generation.GeneratorStage;
|
||||
import biomesoplenty.common.block.BlockBOPCoral;
|
||||
import biomesoplenty.common.block.BlockBOPDoublePlant;
|
||||
import biomesoplenty.common.block.BlockBOPLilypad;
|
||||
import biomesoplenty.common.block.BlockBOPMushroom;
|
||||
import biomesoplenty.common.entities.EntitySnail;
|
||||
import biomesoplenty.common.enums.BOPGems;
|
||||
import biomesoplenty.common.enums.BOPPlants;
|
||||
import biomesoplenty.common.enums.BOPTrees;
|
||||
import biomesoplenty.common.enums.BOPWoods;
|
||||
import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod;
|
||||
import biomesoplenty.common.util.block.BlockQuery;
|
||||
import biomesoplenty.common.world.generator.GeneratorColumns;
|
||||
import biomesoplenty.common.world.generator.GeneratorDoubleFlora;
|
||||
import biomesoplenty.common.world.generator.GeneratorFlora;
|
||||
import biomesoplenty.common.world.generator.GeneratorGrass;
|
||||
import biomesoplenty.common.world.generator.GeneratorOreSingle;
|
||||
import biomesoplenty.common.world.generator.GeneratorSplatter;
|
||||
import biomesoplenty.common.world.generator.GeneratorWaterside;
|
||||
import biomesoplenty.common.world.generator.GeneratorWeighted;
|
||||
import biomesoplenty.common.world.generator.tree.GeneratorBayouTree;
|
||||
import net.minecraft.block.BlockDoublePlant;
|
||||
import net.minecraft.block.BlockTallGrass;
|
||||
import net.minecraft.entity.monster.EntitySlime;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
public class BiomeGenBayou extends BOPBiome
|
||||
{
|
||||
|
||||
public BiomeGenBayou()
|
||||
{
|
||||
super("bayou", new PropsBuilder("Bayou").withGuiColour(0x7DAD51).withTemperature(0.85F).withRainfall(0.9F).withWaterColor(0xFFD932));
|
||||
|
||||
// terrain
|
||||
this.terrainSettings.avgHeight(62).heightVariation(6, 3).octaves(1, 1, 1, 1, 0, 0).sidewaysNoise(0.0F);
|
||||
|
||||
//this.skyColor = 0xACC4BC;
|
||||
this.seaFloorBlock = BOPBlocks.mud.getDefaultState();
|
||||
|
||||
this.canSpawnInBiome = false;
|
||||
this.canGenerateRivers = false;
|
||||
this.canGenerateVillages = false;
|
||||
|
||||
this.beachBiomeLocation = null;
|
||||
|
||||
this.addWeight(BOPClimates.HOT_SWAMP, 10);
|
||||
|
||||
this.spawnableWaterCreatureList.clear();
|
||||
this.spawnableMonsterList.add(new SpawnListEntry(EntitySlime.class, 10, 1, 3));
|
||||
this.spawnableCreatureList.add(new SpawnListEntry(EntitySnail.class, 8, 1, 2));
|
||||
|
||||
// mud
|
||||
IBlockPosQuery emptyGrassOrDirt = BlockQuery.buildAnd().withAirAbove().states(this.topBlock, this.fillerBlock).create();
|
||||
this.addGenerator("mud", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(1).maxRadius(3).with(BOPBlocks.mud.getDefaultState()).create());
|
||||
this.addGenerator("mud_splatter", GeneratorStage.SAND, (new GeneratorSplatter.Builder()).amountPerChunk(0.2F).replace(emptyGrassOrDirt).with(BOPBlocks.mud.getDefaultState()).create());
|
||||
|
||||
// trees & logs
|
||||
GeneratorWeighted treeGenerator = new GeneratorWeighted(8);
|
||||
this.addGenerator("trees", GeneratorStage.TREE, treeGenerator);
|
||||
treeGenerator.add("willow", 3, (new GeneratorBayouTree.Builder()).log(BOPWoods.WILLOW).leaves(BOPTrees.WILLOW).minHeight(6).maxHeight(12).minLeavesRadius(1).leavesGradient(2).create());
|
||||
treeGenerator.add("willow_large", 1, (new GeneratorBayouTree.Builder()).log(BOPWoods.WILLOW).leaves(BOPTrees.WILLOW).minHeight(10).maxHeight(18).minLeavesRadius(2).leavesGradient(3).create());
|
||||
|
||||
// grasses
|
||||
GeneratorWeighted grassGenerator = new GeneratorWeighted(10.0F);
|
||||
this.addGenerator("grass", GeneratorStage.GRASS, grassGenerator);
|
||||
grassGenerator.add("shortgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.SHORTGRASS).create());
|
||||
grassGenerator.add("mediumgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.MEDIUMGRASS).create());
|
||||
grassGenerator.add("dampgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.DAMPGRASS).create());
|
||||
grassGenerator.add("tallgrass", 2, (new GeneratorGrass.Builder()).with(BlockTallGrass.EnumType.GRASS).create());
|
||||
grassGenerator.add("doublegrass", 1, (new GeneratorDoubleFlora.Builder()).with(BlockDoublePlant.EnumPlantType.GRASS).create());
|
||||
|
||||
// other plants
|
||||
this.addGenerator("koru", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.3F).with(BOPPlants.KORU).create());
|
||||
this.addGenerator("cattail", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(6.0F).with(BOPPlants.CATTAIL).create());
|
||||
this.addGenerator("double_cattail", GeneratorStage.FLOWERS, (new GeneratorDoubleFlora.Builder()).amountPerChunk(8.0F).with(BlockBOPDoublePlant.DoublePlantType.TALL_CATTAIL).create());
|
||||
this.addGenerator("leaf_piles", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(3.0F).with(BOPPlants.LEAFPILE).create());
|
||||
this.addGenerator("sugar_cane", GeneratorStage.FLOWERS,(new GeneratorColumns.Builder()).amountPerChunk(3.0F).generationAttempts(24).placeOn(BlockQueries.litFertileWaterside).with(Blocks.REEDS.getDefaultState()).minHeight(1).maxHeight(3).create());
|
||||
|
||||
// water plants
|
||||
this.addGenerator("lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(2.5F).with(Blocks.WATERLILY.getDefaultState()).create());
|
||||
this.addGenerator("medium_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(2.0F).with(BlockBOPLilypad.LilypadType.MEDIUM).create());
|
||||
this.addGenerator("flower_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.25F).with(BlockBOPLilypad.LilypadType.FLOWER).create());
|
||||
this.addGenerator("small_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(1.5F).with(BlockBOPLilypad.LilypadType.SMALL).create());
|
||||
this.addGenerator("tiny_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(1.5F).with(BlockBOPLilypad.LilypadType.TINY).create());
|
||||
this.addGenerator("algae", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(4.0F).replace(Blocks.WATER).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.ALGAE)).scatterYMethod(ScatterYMethod.AT_GROUND).create());
|
||||
this.addGenerator("water_reeds", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(4.0F).with(BOPPlants.REED).generationAttempts(32).create());
|
||||
|
||||
// shrooms
|
||||
this.addGenerator("flat_mushroom", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(BlockBOPMushroom.MushroomType.FLAT_MUSHROOM).create());
|
||||
this.addGenerator("red_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.3F).with(Blocks.RED_MUSHROOM.getDefaultState()).create());
|
||||
this.addGenerator("brown_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(Blocks.BROWN_MUSHROOM.getDefaultState()).create());
|
||||
|
||||
// gem
|
||||
this.addGenerator("malachite", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).with(BOPGems.MALACHITE).create());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applySettings(IBOPWorldSettings settings)
|
||||
{
|
||||
if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("malachite");}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.MUSHROOMS)) {this.removeGenerator("toadstools"); this.removeGenerator("flat_mushroom"); this.removeGenerator("blue_milk_caps"); this.removeGenerator("portobellos");}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.WATER_PLANTS)) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily"); this.removeGenerator("flower_lily");}
|
||||
|
||||
GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees");
|
||||
if (!settings.isEnabled(GeneratorType.TREES)) {this.removeGenerator("trees");
|
||||
|
||||
GeneratorWeighted treeGenerator = new GeneratorWeighted(8);
|
||||
this.addGenerator("trees", GeneratorStage.TREE, treeGenerator);
|
||||
treeGenerator.add("willow", 3, (new GeneratorBayouTree.Builder()).minHeight(6).maxHeight(12).minLeavesRadius(1).leavesGradient(2).create());
|
||||
treeGenerator.add("willow_large", 1, (new GeneratorBayouTree.Builder()).minHeight(10).maxHeight(18).minLeavesRadius(2).leavesGradient(3).create());
|
||||
}
|
||||
|
||||
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
|
||||
if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getGrassColorAtPos(BlockPos pos)
|
||||
{
|
||||
return 0x7DAD51;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFoliageColorAtPos(BlockPos pos)
|
||||
{
|
||||
return 0x9DDD66;
|
||||
}
|
||||
|
||||
// TODO: These 2 are copied from 1.7 - but are they used ever?
|
||||
public int getFogColour(BlockPos pos)
|
||||
{
|
||||
return 0x90AF95;
|
||||
}
|
||||
public float getFogDensity(BlockPos pos)
|
||||
{
|
||||
return 0.99F;
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -1,166 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2015-2016, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
|
||||
package biomesoplenty.common.biome.overworld;
|
||||
|
||||
import biomesoplenty.api.biome.BOPBiomes;
|
||||
import biomesoplenty.api.block.BOPBlocks;
|
||||
import biomesoplenty.api.block.BlockQueries;
|
||||
import biomesoplenty.api.config.IBOPWorldSettings;
|
||||
import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType;
|
||||
import biomesoplenty.api.enums.BOPClimates;
|
||||
import biomesoplenty.api.generation.GeneratorStage;
|
||||
import biomesoplenty.common.block.BlockBOPCoral;
|
||||
import biomesoplenty.common.block.BlockBOPDirt;
|
||||
import biomesoplenty.common.block.BlockBOPDoublePlant;
|
||||
import biomesoplenty.common.block.BlockBOPGrass;
|
||||
import biomesoplenty.common.block.BlockBOPMushroom;
|
||||
import biomesoplenty.common.block.BlockBOPPlant;
|
||||
import biomesoplenty.common.entities.EntitySnail;
|
||||
import biomesoplenty.common.enums.BOPGems;
|
||||
import biomesoplenty.common.enums.BOPPlants;
|
||||
import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod;
|
||||
import biomesoplenty.common.world.generator.GeneratorColumns;
|
||||
import biomesoplenty.common.world.generator.GeneratorDoubleFlora;
|
||||
import biomesoplenty.common.world.generator.GeneratorFlora;
|
||||
import biomesoplenty.common.world.generator.GeneratorGrass;
|
||||
import biomesoplenty.common.world.generator.GeneratorLakes;
|
||||
import biomesoplenty.common.world.generator.GeneratorOreSingle;
|
||||
import biomesoplenty.common.world.generator.GeneratorWaterside;
|
||||
import biomesoplenty.common.world.generator.GeneratorWeighted;
|
||||
import biomesoplenty.common.world.generator.tree.GeneratorTwigletTree;
|
||||
import net.minecraft.block.BlockFlower;
|
||||
import net.minecraft.block.BlockPlanks;
|
||||
import net.minecraft.block.BlockTallGrass;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.monster.EntitySlime;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
public class BiomeGenBog extends BOPBiome
|
||||
{
|
||||
|
||||
public BiomeGenBog()
|
||||
{
|
||||
super("bog", new PropsBuilder("Bog").withGuiColour(0xD8935F).withTemperature(0.5F).withRainfall(0.9F));
|
||||
|
||||
// terrain
|
||||
this.terrainSettings.avgHeight(64).heightVariation(6, 20);
|
||||
|
||||
this.topBlock = BOPBlocks.grass.getDefaultState().withProperty(BlockBOPGrass.VARIANT, BlockBOPGrass.BOPGrassType.LOAMY);
|
||||
this.fillerBlock = BOPBlocks.dirt.getDefaultState().withProperty(BlockBOPDirt.VARIANT, BlockBOPDirt.BOPDirtType.LOAMY);
|
||||
|
||||
this.canGenerateRivers = false;
|
||||
this.canGenerateVillages = false;
|
||||
|
||||
if (BOPBiomes.gravel_beach.isPresent())
|
||||
{
|
||||
this.beachBiomeLocation = ((BOPBiome)BOPBiomes.gravel_beach.get()).getResourceLocation();
|
||||
}
|
||||
|
||||
this.addWeight(BOPClimates.COLD_SWAMP, 7);
|
||||
|
||||
this.spawnableWaterCreatureList.clear();
|
||||
this.spawnableMonsterList.add(new SpawnListEntry(EntitySlime.class, 10, 1, 3));
|
||||
this.spawnableCreatureList.add(new SpawnListEntry(EntitySnail.class, 8, 1, 2));
|
||||
|
||||
// lakes
|
||||
this.addGenerator("lakes", GeneratorStage.SAND, (new GeneratorLakes.Builder()).amountPerChunk(2.5F).waterLakeForBiome(this).create());
|
||||
this.addGenerator("poison_lakes", GeneratorStage.SAND, (new GeneratorLakes.Builder()).amountPerChunk(0.5F).waterLakeForBiome(this).liquid(BOPBlocks.poison).frozenLiquid((IBlockState)null).create());
|
||||
|
||||
// gravel
|
||||
this.addGenerator("gravel", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(4).maxRadius(7).with(Blocks.GRAVEL.getDefaultState()).create());
|
||||
|
||||
// mud
|
||||
this.addGenerator("mud", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(BOPBlocks.mud.getDefaultState()).create());
|
||||
|
||||
// flowers
|
||||
GeneratorWeighted flowerGenerator = new GeneratorWeighted(0.5F);
|
||||
this.addGenerator("flowers", GeneratorStage.GRASS, flowerGenerator);
|
||||
flowerGenerator.add("dandelion", 1, (new GeneratorFlora.Builder().with(BlockFlower.EnumFlowerType.DANDELION).create()));
|
||||
flowerGenerator.add("poppy", 1, (new GeneratorFlora.Builder().with(BlockFlower.EnumFlowerType.POPPY).create()));
|
||||
|
||||
// trees & logs
|
||||
GeneratorWeighted treeGenerator = new GeneratorWeighted(12);
|
||||
this.addGenerator("trees", GeneratorStage.TREE, treeGenerator);
|
||||
treeGenerator.add("dark_oak_twiglet", 3, (new GeneratorTwigletTree.Builder()).log(BlockPlanks.EnumType.DARK_OAK).leaves(BlockPlanks.EnumType.DARK_OAK).minHeight(5).maxHeight(10).leafChance(0.3F, 0.9F).create());
|
||||
treeGenerator.add("birch_twiglet", 1, (new GeneratorTwigletTree.Builder()).log(BlockPlanks.EnumType.BIRCH).leaves(BlockPlanks.EnumType.BIRCH).minHeight(5).maxHeight(10).leafChance(0.3F, 0.9F).create());
|
||||
treeGenerator.add("bog_bush", 3, (new GeneratorFlora.Builder()).placeOn(this.topBlock).replace(Material.AIR).withNonDecayingLeaf(BlockPlanks.EnumType.OAK).generationAttempts(8).create());
|
||||
|
||||
// grasses
|
||||
GeneratorWeighted grassGenerator = new GeneratorWeighted(7.0F);
|
||||
this.addGenerator("grass", GeneratorStage.GRASS, grassGenerator);
|
||||
grassGenerator.add("shortgrass", 2, (new GeneratorGrass.Builder()).with(BOPPlants.SHORTGRASS).create());
|
||||
grassGenerator.add("mediumgrass", 2, (new GeneratorGrass.Builder()).with(BOPPlants.MEDIUMGRASS).create());
|
||||
grassGenerator.add("wheatgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.WHEATGRASS).create());
|
||||
grassGenerator.add("dampgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.DAMPGRASS).create());
|
||||
grassGenerator.add("tallgrass", 2, (new GeneratorGrass.Builder()).with(BlockTallGrass.EnumType.GRASS).create());
|
||||
|
||||
// other plants
|
||||
this.addGenerator("koru", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(BOPPlants.KORU).create());
|
||||
this.addGenerator("river_cane", GeneratorStage.FLOWERS,(new GeneratorColumns.Builder()).amountPerChunk(1.0F).generationAttempts(24).placeOn(BlockQueries.litFertileWaterside).with(BlockBOPPlant.paging.getVariantState(BOPPlants.RIVERCANE)).minHeight(1).maxHeight(3).create());
|
||||
this.addGenerator("bushes", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.6F).with(BOPPlants.BUSH).create());
|
||||
this.addGenerator("shrubs", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(1.0F).with(BOPPlants.SHRUB).create());
|
||||
this.addGenerator("leaf_piles", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(1.5F).with(BOPPlants.LEAFPILE).create());
|
||||
this.addGenerator("dead_leaf_piles", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.8F).with(BOPPlants.DEADLEAFPILE).create());
|
||||
this.addGenerator("poison_ivy", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.25F).with(BOPPlants.POISONIVY).create());
|
||||
this.addGenerator("cattail", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(2.0F).with(BOPPlants.CATTAIL).create());
|
||||
this.addGenerator("double_cattail", GeneratorStage.FLOWERS, (new GeneratorDoubleFlora.Builder()).amountPerChunk(1.0F).with(BlockBOPDoublePlant.DoublePlantType.TALL_CATTAIL).create());
|
||||
|
||||
// water plants
|
||||
this.addGenerator("algae", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(8.0F).replace(Blocks.WATER).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.ALGAE)).generationAttempts(32).scatterYMethod(ScatterYMethod.AT_GROUND).create());
|
||||
this.addGenerator("water_reeds", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(3.0F).with(BOPPlants.REED).generationAttempts(32).create());
|
||||
|
||||
// shrooms
|
||||
this.addGenerator("flat_mushroom", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(BlockBOPMushroom.MushroomType.FLAT_MUSHROOM).create());
|
||||
this.addGenerator("blue_milk_caps", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(BlockBOPMushroom.MushroomType.BLUE_MILK_CAP).create());
|
||||
this.addGenerator("brown_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(Blocks.BROWN_MUSHROOM.getDefaultState()).create());
|
||||
this.addGenerator("red_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(Blocks.RED_MUSHROOM.getDefaultState()).create());
|
||||
|
||||
// gem
|
||||
this.addGenerator("malachite", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).with(BOPGems.MALACHITE).create());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applySettings(IBOPWorldSettings settings)
|
||||
{
|
||||
if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("malachite");}
|
||||
if (!settings.isEnabled(GeneratorType.POISON_IVY)) {this.removeGenerator("poison_ivy");}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.LIQUID_POISON)) {this.removeGenerator("poison_lakes");}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.MUSHROOMS)) {this.removeGenerator("toadstools"); this.removeGenerator("flat_mushroom"); this.removeGenerator("blue_milk_caps"); this.removeGenerator("portobellos");}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.SOILS)) {this.topBlock = Blocks.GRASS.getDefaultState(); this.fillerBlock = Blocks.DIRT.getDefaultState();}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.WATER_PLANTS)) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");}
|
||||
|
||||
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
|
||||
if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getGrassColorAtPos(BlockPos pos)
|
||||
{
|
||||
return 0xD69E7C;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFoliageColorAtPos(BlockPos pos)
|
||||
{
|
||||
return 0xAAC164;
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -1,133 +0,0 @@
|
|||
package biomesoplenty.common.biome.overworld;
|
||||
|
||||
import biomesoplenty.api.biome.BOPBiomes;
|
||||
import biomesoplenty.api.config.IBOPWorldSettings;
|
||||
import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType;
|
||||
import biomesoplenty.api.enums.BOPClimates;
|
||||
import biomesoplenty.api.generation.GeneratorStage;
|
||||
import biomesoplenty.common.block.BlockBOPDoublePlant;
|
||||
import biomesoplenty.common.enums.BOPGems;
|
||||
import biomesoplenty.common.enums.BOPPlants;
|
||||
import biomesoplenty.common.enums.BOPTrees;
|
||||
import biomesoplenty.common.world.generator.GeneratorDoubleFlora;
|
||||
import biomesoplenty.common.world.generator.GeneratorFlora;
|
||||
import biomesoplenty.common.world.generator.GeneratorGrass;
|
||||
import biomesoplenty.common.world.generator.GeneratorOreSingle;
|
||||
import biomesoplenty.common.world.generator.GeneratorWaterside;
|
||||
import biomesoplenty.common.world.generator.GeneratorWeighted;
|
||||
import biomesoplenty.common.world.generator.tree.GeneratorBasicTree;
|
||||
import biomesoplenty.common.world.generator.tree.GeneratorBush;
|
||||
import biomesoplenty.common.world.generator.tree.GeneratorTaigaTree;
|
||||
import net.minecraft.block.BlockDoublePlant;
|
||||
import net.minecraft.block.BlockFlower;
|
||||
import net.minecraft.block.BlockPlanks;
|
||||
import net.minecraft.block.BlockTallGrass;
|
||||
import net.minecraft.entity.passive.EntityWolf;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
public class BiomeGenBorealForest extends BOPBiome
|
||||
{
|
||||
public BiomeGenBorealForest()
|
||||
{
|
||||
super("boreal_forest", new PropsBuilder("Boreal Forest").withGuiColour(0x9FB771).withTemperature(0.3F).withRainfall(0.6F));
|
||||
|
||||
// terrain
|
||||
this.terrainSettings.avgHeight(70).heightVariation(15, 30);
|
||||
|
||||
this.addWeight(BOPClimates.BOREAL, 5);
|
||||
|
||||
this.canGenerateVillages = false;
|
||||
|
||||
if (BOPBiomes.gravel_beach.isPresent())
|
||||
{
|
||||
this.beachBiomeLocation = ((BOPBiome)BOPBiomes.gravel_beach.get()).getResourceLocation();
|
||||
}
|
||||
|
||||
this.spawnableCreatureList.add(new SpawnListEntry(EntityWolf.class, 5, 4, 4));
|
||||
|
||||
// sand and gravel
|
||||
this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(Blocks.SAND.getDefaultState()).create());
|
||||
this.addGenerator("gravel", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(6).maxRadius(7).with(Blocks.GRAVEL.getDefaultState()).create());
|
||||
|
||||
// trees & logs
|
||||
GeneratorWeighted treeGenerator = new GeneratorWeighted(20);
|
||||
this.addGenerator("trees", GeneratorStage.TREE, treeGenerator);
|
||||
treeGenerator.add("small_oak", 2, (new GeneratorBasicTree.Builder()).create());
|
||||
treeGenerator.add("oak", 3, (new GeneratorBasicTree.Builder()).minHeight(8).maxHeight(12).create());
|
||||
treeGenerator.add("oak_bush", 3, (new GeneratorBush.Builder()).amountPerChunk(3).maxHeight(2).create());
|
||||
treeGenerator.add("yellow_autumn", 4, (new GeneratorBasicTree.Builder()).log(BlockPlanks.EnumType.BIRCH).leaves(BOPTrees.YELLOW_AUTUMN).minHeight(5).maxHeight(8).create());
|
||||
treeGenerator.add("spruce", 4, (new GeneratorTaigaTree.Builder()).minHeight(10).maxHeight(19).create()); // TODO: implement pine cones
|
||||
|
||||
// grasses
|
||||
GeneratorWeighted grassGenerator = new GeneratorWeighted(5.0F);
|
||||
this.addGenerator("grass", GeneratorStage.GRASS, grassGenerator);
|
||||
grassGenerator.add("shortgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.SHORTGRASS).create());
|
||||
grassGenerator.add("mediumgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.MEDIUMGRASS).create());
|
||||
grassGenerator.add("wheatgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.WHEATGRASS).create());
|
||||
grassGenerator.add("dampgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.DAMPGRASS).create());
|
||||
grassGenerator.add("tallgrass", 2, (new GeneratorGrass.Builder()).with(BlockTallGrass.EnumType.GRASS).create());
|
||||
grassGenerator.add("fern", 4, (new GeneratorGrass.Builder()).with(BlockTallGrass.EnumType.FERN).create());
|
||||
|
||||
// flowers
|
||||
GeneratorWeighted flowerGenerator = new GeneratorWeighted(0.5F);
|
||||
this.addGenerator("flowers", GeneratorStage.GRASS, flowerGenerator);
|
||||
flowerGenerator.add("rose", 2, (new GeneratorDoubleFlora.Builder().with(BlockDoublePlant.EnumPlantType.ROSE).create()));
|
||||
flowerGenerator.add("dandelion", 1, (new GeneratorFlora.Builder().with(BlockFlower.EnumFlowerType.DANDELION).create()));
|
||||
flowerGenerator.add("poppy", 1, (new GeneratorFlora.Builder().with(BlockFlower.EnumFlowerType.POPPY).create()));
|
||||
|
||||
// other plants
|
||||
this.addGenerator("shrubs", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BOPPlants.SHRUB).create());
|
||||
this.addGenerator("dead_leaf_piles", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(1.0F).with(BOPPlants.DEADLEAFPILE).create());
|
||||
this.addGenerator("flax", GeneratorStage.FLOWERS, (new GeneratorDoubleFlora.Builder()).amountPerChunk(0.2F).with(BlockBOPDoublePlant.DoublePlantType.FLAX).create());
|
||||
this.addGenerator("poison_ivy", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.25F).with(BOPPlants.POISONIVY).create());
|
||||
|
||||
// water plants
|
||||
this.addGenerator("water_reeds", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(2.0F).with(BOPPlants.REED).generationAttempts(32).create());
|
||||
|
||||
// gem
|
||||
this.addGenerator("amber", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).with(BOPGems.AMBER).create());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applySettings(IBOPWorldSettings settings)
|
||||
{
|
||||
if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("amber");}
|
||||
if (!settings.isEnabled(GeneratorType.POISON_IVY)) {this.removeGenerator("poison_ivy");}
|
||||
if (!settings.isEnabled(GeneratorType.FLAX)) {this.removeGenerator("flax");}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.WATER_PLANTS)) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");}
|
||||
|
||||
GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees");
|
||||
if (!settings.isEnabled(GeneratorType.TREES)) {this.removeGenerator("trees");
|
||||
|
||||
GeneratorWeighted treeGenerator = new GeneratorWeighted(20);
|
||||
this.addGenerator("trees", GeneratorStage.TREE, treeGenerator);
|
||||
treeGenerator.add("small_oak", 2, (new GeneratorBasicTree.Builder()).create());
|
||||
treeGenerator.add("oak", 3, (new GeneratorBasicTree.Builder()).minHeight(8).maxHeight(12).create());
|
||||
treeGenerator.add("oak_bush", 3, (new GeneratorBush.Builder()).amountPerChunk(3).maxHeight(2).create());
|
||||
treeGenerator.add("yellow_autumn", 4, (new GeneratorBasicTree.Builder()).log(BlockPlanks.EnumType.BIRCH).leaves(BlockPlanks.EnumType.BIRCH).minHeight(5).maxHeight(8).create());
|
||||
treeGenerator.add("spruce", 4, (new GeneratorTaigaTree.Builder()).minHeight(10).maxHeight(19).create()); // TODO: implement pine cones
|
||||
}
|
||||
|
||||
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
|
||||
if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getGrassColorAtPos(BlockPos pos)
|
||||
{
|
||||
return 0x9FB771;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFoliageColorAtPos(BlockPos pos)
|
||||
{
|
||||
return 0xC9CE65;
|
||||
}
|
||||
}
|
|
@ -1,118 +0,0 @@
|
|||
package biomesoplenty.common.biome.overworld;
|
||||
|
||||
import biomesoplenty.api.block.BOPBlocks;
|
||||
import biomesoplenty.api.config.IBOPWorldSettings;
|
||||
import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType;
|
||||
import biomesoplenty.api.enums.BOPClimates;
|
||||
import biomesoplenty.api.generation.GeneratorStage;
|
||||
import biomesoplenty.common.block.BlockBOPDirt;
|
||||
import biomesoplenty.common.block.BlockBOPGrass;
|
||||
import biomesoplenty.common.enums.BOPGems;
|
||||
import biomesoplenty.common.enums.BOPPlants;
|
||||
import biomesoplenty.common.enums.BOPTrees;
|
||||
import biomesoplenty.common.enums.BOPWoods;
|
||||
import biomesoplenty.common.world.generator.GeneratorFlora;
|
||||
import biomesoplenty.common.world.generator.GeneratorGrass;
|
||||
import biomesoplenty.common.world.generator.GeneratorLakes;
|
||||
import biomesoplenty.common.world.generator.GeneratorOreSingle;
|
||||
import biomesoplenty.common.world.generator.GeneratorWaterside;
|
||||
import biomesoplenty.common.world.generator.GeneratorWeighted;
|
||||
import biomesoplenty.common.world.generator.tree.GeneratorBasicTree;
|
||||
import biomesoplenty.common.world.generator.tree.GeneratorBigTree;
|
||||
import biomesoplenty.common.world.generator.tree.GeneratorTwigletTree;
|
||||
import net.minecraft.block.BlockPlanks;
|
||||
import net.minecraft.block.BlockTallGrass;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
public class BiomeGenBrushland extends BOPBiome
|
||||
{
|
||||
|
||||
public BiomeGenBrushland()
|
||||
{
|
||||
super("brushland", new PropsBuilder("Brushland").withGuiColour(0xC6C19B).withTemperature(1.5F).withRainfall(0.1F).withRainDisabled());
|
||||
|
||||
// terrain
|
||||
this.terrainSettings.avgHeight(66).heightVariation(3, 20);
|
||||
|
||||
this.topBlock = BOPBlocks.grass.getDefaultState().withProperty(BlockBOPGrass.VARIANT, BlockBOPGrass.BOPGrassType.SANDY);
|
||||
this.fillerBlock = BOPBlocks.dirt.getDefaultState().withProperty(BlockBOPDirt.VARIANT, BlockBOPDirt.BOPDirtType.SANDY);
|
||||
this.addWeight(BOPClimates.SAVANNA, 10);
|
||||
|
||||
this.canGenerateVillages = true;
|
||||
|
||||
//sand
|
||||
this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(4).maxRadius(7).with(Blocks.SAND.getDefaultState()).create());
|
||||
|
||||
// quicksand
|
||||
this.addGenerator("quicksand", GeneratorStage.SAND, (new GeneratorLakes.Builder()).amountPerChunk(0.2F).waterLakeForBiome(this).liquid(BOPBlocks.sand).frozenLiquid((IBlockState)null).create());
|
||||
|
||||
// trees & logs
|
||||
GeneratorWeighted treeGenerator = new GeneratorWeighted(6.0F);
|
||||
this.addGenerator("trees", GeneratorStage.TREE, treeGenerator);
|
||||
treeGenerator.add("brush", 1, (new GeneratorBasicTree.Builder()).log(BlockPlanks.EnumType.ACACIA).leaves(BlockPlanks.EnumType.ACACIA).minHeight(3).maxHeight(5).leafLayers(2).create());
|
||||
treeGenerator.add("brush_twiglet", 2, (new GeneratorTwigletTree.Builder()).minHeight(1).maxHeight(2).log(BOPWoods.EBONY).leaves(BOPTrees.EBONY).create());
|
||||
treeGenerator.add("jungle_twiglet", 1, (new GeneratorTwigletTree.Builder()).minHeight(2).maxHeight(2).log(BlockPlanks.EnumType.JUNGLE).leaves(BlockPlanks.EnumType.JUNGLE).trunkFruit(Blocks.COCOA.getDefaultState()).create());
|
||||
treeGenerator.add("brush_bush", 3, (new GeneratorFlora.Builder()).placeOn(this.topBlock).replace(Material.AIR).withNonDecayingLeaf(BlockPlanks.EnumType.OAK).generationAttempts(8).create());
|
||||
treeGenerator.add("decaying_tree", 2, (new GeneratorBigTree.Builder()).amountPerChunk(1.0F).log(BOPWoods.EBONY).leaves(BOPTrees.EBONY).minHeight(4).maxHeight(10).foliageHeight(1).create());
|
||||
|
||||
// grasses
|
||||
GeneratorWeighted grassGenerator = new GeneratorWeighted(9.0F);
|
||||
this.addGenerator("grass", GeneratorStage.GRASS, grassGenerator);
|
||||
grassGenerator.add("shortgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.SHORTGRASS).create());
|
||||
grassGenerator.add("mediumgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.MEDIUMGRASS).create());
|
||||
grassGenerator.add("tallgrass", 2, (new GeneratorGrass.Builder()).with(BlockTallGrass.EnumType.GRASS).create());
|
||||
|
||||
// other plants
|
||||
this.addGenerator("shrubs", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BOPPlants.SHRUB).create());
|
||||
this.addGenerator("thorns", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BOPPlants.THORN).create());
|
||||
|
||||
// gem
|
||||
this.addGenerator("ruby", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).with(BOPGems.RUBY).create());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applySettings(IBOPWorldSettings settings)
|
||||
{
|
||||
if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("ruby");}
|
||||
if (!settings.isEnabled(GeneratorType.THORNS)) {this.removeGenerator("thorns");}
|
||||
if (!settings.isEnabled(GeneratorType.QUICKSAND)) {this.removeGenerator("quicksand");}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.SOILS)) {this.topBlock = Blocks.GRASS.getDefaultState(); this.fillerBlock = Blocks.DIRT.getDefaultState();}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");}
|
||||
|
||||
GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees");
|
||||
if (!settings.isEnabled(GeneratorType.TREES)) {this.removeGenerator("trees");
|
||||
|
||||
GeneratorWeighted treeGenerator = new GeneratorWeighted(6.0F);
|
||||
this.addGenerator("trees", GeneratorStage.TREE, treeGenerator);
|
||||
treeGenerator.add("brush", 1, (new GeneratorBasicTree.Builder()).log(BlockPlanks.EnumType.ACACIA).leaves(BlockPlanks.EnumType.ACACIA).minHeight(3).maxHeight(5).leafLayers(2).create());
|
||||
treeGenerator.add("brush_twiglet", 2, (new GeneratorTwigletTree.Builder()).minHeight(1).maxHeight(2).log(BlockPlanks.EnumType.ACACIA).leaves(BlockPlanks.EnumType.ACACIA).create());
|
||||
treeGenerator.add("jungle_twiglet", 1, (new GeneratorTwigletTree.Builder()).minHeight(2).maxHeight(2).log(BlockPlanks.EnumType.JUNGLE).leaves(BlockPlanks.EnumType.JUNGLE).trunkFruit(Blocks.COCOA.getDefaultState()).create());
|
||||
treeGenerator.add("brush_bush", 3, (new GeneratorFlora.Builder()).placeOn(this.topBlock).replace(Material.AIR).withNonDecayingLeaf(BlockPlanks.EnumType.OAK).generationAttempts(8).create());
|
||||
treeGenerator.add("decaying_tree", 2, (new GeneratorBigTree.Builder()).amountPerChunk(1.0F).log(BlockPlanks.EnumType.ACACIA).leaves(BlockPlanks.EnumType.ACACIA).minHeight(4).maxHeight(10).foliageHeight(1).create());
|
||||
}
|
||||
|
||||
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
|
||||
if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getGrassColorAtPos(BlockPos pos)
|
||||
{
|
||||
return 0xC6C19B;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFoliageColorAtPos(BlockPos pos)
|
||||
{
|
||||
return 0xB3BA73;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,119 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2015-2016, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
|
||||
package biomesoplenty.common.biome.overworld;
|
||||
|
||||
import biomesoplenty.api.config.IBOPWorldSettings;
|
||||
import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType;
|
||||
import biomesoplenty.api.enums.BOPClimates;
|
||||
import biomesoplenty.api.generation.GeneratorStage;
|
||||
import biomesoplenty.common.entities.EntityButterfly;
|
||||
import biomesoplenty.common.enums.BOPGems;
|
||||
import biomesoplenty.common.enums.BOPPlants;
|
||||
import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod;
|
||||
import biomesoplenty.common.world.generator.GeneratorDoubleFlora;
|
||||
import biomesoplenty.common.world.generator.GeneratorFlora;
|
||||
import biomesoplenty.common.world.generator.GeneratorGrass;
|
||||
import biomesoplenty.common.world.generator.GeneratorOreSingle;
|
||||
import biomesoplenty.common.world.generator.GeneratorSplotches;
|
||||
import biomesoplenty.common.world.generator.GeneratorWaterside;
|
||||
import biomesoplenty.common.world.generator.GeneratorWeighted;
|
||||
import biomesoplenty.common.world.generator.tree.GeneratorTwigletTree;
|
||||
import net.minecraft.block.BlockDoublePlant;
|
||||
import net.minecraft.block.BlockFlower;
|
||||
import net.minecraft.block.BlockPlanks;
|
||||
import net.minecraft.block.BlockTallGrass;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.passive.EntityHorse;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
public class BiomeGenChaparral extends BOPBiome
|
||||
{
|
||||
public BiomeGenChaparral()
|
||||
{
|
||||
super("chaparral", new PropsBuilder("Chaparral").withGuiColour(0xC0D85D).withTemperature(0.8F).withRainfall(0.6F));
|
||||
|
||||
// terrain
|
||||
this.terrainSettings.avgHeight(70).heightVariation(10, 20).sidewaysNoise(0.1D).octaves(1, 4, 3, 1, 1, 0);
|
||||
|
||||
this.addWeight(BOPClimates.MEDITERANEAN, 10);
|
||||
|
||||
this.spawnableCreatureList.add(new SpawnListEntry(EntityHorse.class, 1, 2, 6));
|
||||
this.spawnableCreatureList.add(new SpawnListEntry(EntityButterfly.class, 6, 2, 4));
|
||||
|
||||
this.canGenerateVillages = true;
|
||||
|
||||
// sand
|
||||
this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(Blocks.SAND.getDefaultState()).create());
|
||||
|
||||
// stone patches
|
||||
this.addGenerator("stone_patches", GeneratorStage.SAND, (new GeneratorSplotches.Builder()).amountPerChunk(2).splotchSize(15).replace(this.topBlock).with(Blocks.STONE.getDefaultState()).scatterYMethod(ScatterYMethod.AT_SURFACE).create());
|
||||
|
||||
// flowers
|
||||
GeneratorWeighted flowerGenerator = new GeneratorWeighted(0.5F);
|
||||
this.addGenerator("flowers", GeneratorStage.GRASS, flowerGenerator);
|
||||
flowerGenerator.add("rose", 8, (new GeneratorDoubleFlora.Builder()).amountPerChunk(1).with(BlockDoublePlant.EnumPlantType.ROSE).create());
|
||||
flowerGenerator.add("syringa", 4, (new GeneratorDoubleFlora.Builder()).amountPerChunk(1).with(BlockDoublePlant.EnumPlantType.SYRINGA).create());
|
||||
flowerGenerator.add("dandelion", 1, (new GeneratorFlora.Builder().with(BlockFlower.EnumFlowerType.DANDELION).create()));
|
||||
flowerGenerator.add("poppy", 1, (new GeneratorFlora.Builder().with(BlockFlower.EnumFlowerType.POPPY).create()));
|
||||
|
||||
// grasses
|
||||
GeneratorWeighted grassGenerator = new GeneratorWeighted(2.0F);
|
||||
this.addGenerator("grass", GeneratorStage.GRASS, grassGenerator);
|
||||
grassGenerator.add("tallgrass", 2, (new GeneratorGrass.Builder()).with(BlockTallGrass.EnumType.GRASS).create());
|
||||
grassGenerator.add("shortgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.SHORTGRASS).create());
|
||||
grassGenerator.add("mediumgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.MEDIUMGRASS).create());
|
||||
grassGenerator.add("wheatgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.WHEATGRASS).create());
|
||||
grassGenerator.add("dampgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.DAMPGRASS).create());
|
||||
|
||||
// trees
|
||||
GeneratorWeighted treeGenerator = new GeneratorWeighted(7.0F);
|
||||
this.addGenerator("trees", GeneratorStage.TREE, treeGenerator);
|
||||
treeGenerator.add("twiglet", 3, (new GeneratorTwigletTree.Builder()).minHeight(2).maxHeight(2).log(BlockPlanks.EnumType.OAK).leaves(BlockPlanks.EnumType.OAK).create());
|
||||
treeGenerator.add("small_bush", 1, (new GeneratorFlora.Builder()).placeOn(this.topBlock).replace(Material.AIR).withNonDecayingLeaf(BlockPlanks.EnumType.OAK).create());
|
||||
|
||||
// other plants
|
||||
this.addGenerator("berry_bushes", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(BOPPlants.BERRYBUSH).create());
|
||||
this.addGenerator("bushes", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(1.0F).with(BOPPlants.BUSH).create());
|
||||
this.addGenerator("shrubs", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(BOPPlants.SHRUB).create());
|
||||
this.addGenerator("leaf_piles", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(1.0F).with(BOPPlants.LEAFPILE).create());
|
||||
this.addGenerator("dead_leaf_piles", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BOPPlants.DEADLEAFPILE).create());
|
||||
|
||||
// water plants
|
||||
this.addGenerator("water_reeds", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(BOPPlants.REED).generationAttempts(32).create());
|
||||
|
||||
// gem
|
||||
this.addGenerator("peridot", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).with(BOPGems.PERIDOT).create());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applySettings(IBOPWorldSettings settings)
|
||||
{
|
||||
if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("peridot");}
|
||||
if (!settings.isEnabled(GeneratorType.BERRY_BUSHES)) {this.removeGenerator("berry_bushes");}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.WATER_PLANTS)) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");}
|
||||
|
||||
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
|
||||
if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getGrassColorAtPos(BlockPos pos)
|
||||
{
|
||||
return 0xC0D85D;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,138 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2015-2016, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
|
||||
package biomesoplenty.common.biome.overworld;
|
||||
|
||||
import biomesoplenty.api.block.BOPBlocks;
|
||||
import biomesoplenty.api.config.IBOPWorldSettings;
|
||||
import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType;
|
||||
import biomesoplenty.api.enums.BOPClimates;
|
||||
import biomesoplenty.api.generation.GeneratorStage;
|
||||
import biomesoplenty.common.block.BlockBOPDirt;
|
||||
import biomesoplenty.common.block.BlockBOPDoublePlant;
|
||||
import biomesoplenty.common.block.BlockBOPGrass;
|
||||
import biomesoplenty.common.block.BlockBOPLilypad;
|
||||
import biomesoplenty.common.entities.EntityButterfly;
|
||||
import biomesoplenty.common.entities.EntitySnail;
|
||||
import biomesoplenty.common.enums.BOPFlowers;
|
||||
import biomesoplenty.common.enums.BOPGems;
|
||||
import biomesoplenty.common.enums.BOPPlants;
|
||||
import biomesoplenty.common.enums.BOPTrees;
|
||||
import biomesoplenty.common.enums.BOPWoods;
|
||||
import biomesoplenty.common.world.generator.GeneratorDoubleFlora;
|
||||
import biomesoplenty.common.world.generator.GeneratorFlora;
|
||||
import biomesoplenty.common.world.generator.GeneratorGrass;
|
||||
import biomesoplenty.common.world.generator.GeneratorOreSingle;
|
||||
import biomesoplenty.common.world.generator.GeneratorWeighted;
|
||||
import biomesoplenty.common.world.generator.tree.GeneratorBasicTree;
|
||||
import biomesoplenty.common.world.generator.tree.GeneratorBigTree;
|
||||
import net.minecraft.block.BlockDoublePlant;
|
||||
import net.minecraft.block.BlockFlower;
|
||||
import net.minecraft.block.BlockTallGrass;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
public class BiomeGenCherryBlossomGrove extends BOPBiome
|
||||
{
|
||||
public BiomeGenCherryBlossomGrove()
|
||||
{
|
||||
super("cherry_blossom_grove", new PropsBuilder("Cherry Blossom Grove").withGuiColour(0xF88F8F).withTemperature(0.55F).withRainfall(0.8F));
|
||||
|
||||
// terrain
|
||||
this.terrainSettings.avgHeight(63).heightVariation(5, 25).sidewaysNoise(0.8F);
|
||||
|
||||
this.topBlock = BOPBlocks.grass.getDefaultState().withProperty(BlockBOPGrass.VARIANT, BlockBOPGrass.BOPGrassType.SILTY);
|
||||
this.fillerBlock = BOPBlocks.dirt.getDefaultState().withProperty(BlockBOPDirt.VARIANT, BlockBOPDirt.BOPDirtType.SILTY);
|
||||
|
||||
this.canSpawnInBiome = false;
|
||||
this.canGenerateVillages = false;
|
||||
|
||||
this.addWeight(BOPClimates.COOL_TEMPERATE, 2);
|
||||
|
||||
this.spawnableCreatureList.add(new SpawnListEntry(EntitySnail.class, 6, 1, 2));
|
||||
this.spawnableCreatureList.add(new SpawnListEntry(EntityButterfly.class, 6, 2, 4));
|
||||
|
||||
// flowers
|
||||
GeneratorWeighted flowerGenerator = new GeneratorWeighted(6.0F);
|
||||
this.addGenerator("flowers", GeneratorStage.GRASS, flowerGenerator);
|
||||
flowerGenerator.add("pink_daffodil", 4, (new GeneratorFlora.Builder().with(BOPFlowers.PINK_DAFFODIL).create()));
|
||||
flowerGenerator.add("white_anemones", 3, (new GeneratorFlora.Builder().with(BOPFlowers.WHITE_ANEMONE).create()));
|
||||
flowerGenerator.add("clover", 2, (new GeneratorFlora.Builder().with(BOPFlowers.CLOVER).create()));
|
||||
flowerGenerator.add("syringa", 2, (new GeneratorDoubleFlora.Builder().with(BlockDoublePlant.EnumPlantType.SYRINGA).create()));
|
||||
flowerGenerator.add("houstonia", 1, (new GeneratorFlora.Builder().with(BlockFlower.EnumFlowerType.HOUSTONIA).create()));
|
||||
flowerGenerator.add("oxeye_daisy", 1, (new GeneratorFlora.Builder().with(BlockFlower.EnumFlowerType.OXEYE_DAISY).create()));
|
||||
flowerGenerator.add("dandelion", 1, (new GeneratorFlora.Builder().with(BlockFlower.EnumFlowerType.DANDELION).create()));
|
||||
flowerGenerator.add("poppy", 1, (new GeneratorFlora.Builder().with(BlockFlower.EnumFlowerType.POPPY).create()));
|
||||
|
||||
// trees
|
||||
GeneratorWeighted treeGenerator = new GeneratorWeighted(3.0F);
|
||||
this.addGenerator("trees", GeneratorStage.TREE, treeGenerator);
|
||||
treeGenerator.add("pink_cherry", 3, (new GeneratorBasicTree.Builder()).log(BOPWoods.CHERRY).leaves(BOPTrees.PINK_CHERRY).create());
|
||||
treeGenerator.add("white_cherry", 3, (new GeneratorBasicTree.Builder()).log(BOPWoods.CHERRY).leaves(BOPTrees.WHITE_CHERRY).create());
|
||||
treeGenerator.add("large_pink_cherry", 1, (new GeneratorBigTree.Builder()).log(BOPWoods.CHERRY).leaves(BOPTrees.PINK_CHERRY).create());
|
||||
treeGenerator.add("large_white_cherry", 1, (new GeneratorBigTree.Builder()).log(BOPWoods.CHERRY).leaves(BOPTrees.WHITE_CHERRY).create());
|
||||
|
||||
// other plants
|
||||
this.addGenerator("flax", GeneratorStage.FLOWERS,(new GeneratorDoubleFlora.Builder()).amountPerChunk(0.2F).with(BlockBOPDoublePlant.DoublePlantType.FLAX).generationAttempts(6).create());
|
||||
this.addGenerator("leaf_piles", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(1.5F).with(BOPPlants.LEAFPILE).create());
|
||||
this.addGenerator("clover_patches", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(2.5F).with(BOPPlants.CLOVERPATCH).create());
|
||||
this.addGenerator("sprouts", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.8F).with(BOPPlants.SPROUT).create());
|
||||
|
||||
// water plants
|
||||
this.addGenerator("lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(Blocks.WATERLILY.getDefaultState()).create());
|
||||
this.addGenerator("medium_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(BlockBOPLilypad.LilypadType.MEDIUM).create());
|
||||
this.addGenerator("small_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(BlockBOPLilypad.LilypadType.SMALL).create());
|
||||
this.addGenerator("tiny_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(BlockBOPLilypad.LilypadType.TINY).create());
|
||||
this.addGenerator("flower_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.3F).with(BlockBOPLilypad.LilypadType.FLOWER).create());
|
||||
|
||||
// grasses
|
||||
GeneratorWeighted grassGenerator = new GeneratorWeighted(2.0F);
|
||||
this.addGenerator("grass", GeneratorStage.GRASS, grassGenerator);
|
||||
grassGenerator.add("shortgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.SHORTGRASS).create());
|
||||
grassGenerator.add("mediumgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.MEDIUMGRASS).create());
|
||||
grassGenerator.add("wheatgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.WHEATGRASS).create());
|
||||
grassGenerator.add("dampgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.DAMPGRASS).create());
|
||||
grassGenerator.add("tallgrass", 2, (new GeneratorGrass.Builder()).with(BlockTallGrass.EnumType.GRASS).create());
|
||||
|
||||
// gem
|
||||
this.addGenerator("topaz", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).with(BOPGems.TOPAZ).create());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applySettings(IBOPWorldSettings settings)
|
||||
{
|
||||
if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("topaz");}
|
||||
if (!settings.isEnabled(GeneratorType.FLAX)) {this.removeGenerator("flax");}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.SOILS)) {this.topBlock = Blocks.GRASS.getDefaultState(); this.fillerBlock = Blocks.DIRT.getDefaultState();}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.WATER_PLANTS)) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily"); this.removeGenerator("flower_lily");}
|
||||
|
||||
GeneratorWeighted flowerGen = (GeneratorWeighted)this.getGenerator("flowers");
|
||||
if (!settings.isEnabled(GeneratorType.FLOWERS)) {flowerGen.removeGenerator("bluebells"); flowerGen.removeGenerator("clover"); flowerGen.removeGenerator("swampflower"); flowerGen.removeGenerator("deathbloom"); flowerGen.removeGenerator("glowflower"); flowerGen.removeGenerator("blue_hydrangeas"); flowerGen.removeGenerator("pink_daffodil"); flowerGen.removeGenerator("white_anemones"); flowerGen.removeGenerator("orange_cosmos"); flowerGen.removeGenerator("wildflowers"); flowerGen.removeGenerator("violet"); flowerGen.removeGenerator("hibiscus"); flowerGen.removeGenerator("goldenrods"); flowerGen.removeGenerator("icy_irises"); flowerGen.removeGenerator("wilted_lily"); flowerGen.removeGenerator("lily_of_the_valley"); flowerGen.removeGenerator("bromeliad"); this.removeGenerator("bromeliad");}
|
||||
|
||||
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
|
||||
if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getGrassColorAtPos(BlockPos pos)
|
||||
{
|
||||
return 0xA3FFAA;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFoliageColorAtPos(BlockPos pos)
|
||||
{
|
||||
return 0xA3FFAA;
|
||||
}
|
||||
}
|
|
@ -1,95 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2015-2016, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
|
||||
package biomesoplenty.common.biome.overworld;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import biomesoplenty.api.block.BOPBlocks;
|
||||
import biomesoplenty.api.block.IBlockPosQuery;
|
||||
import biomesoplenty.api.config.IBOPWorldSettings;
|
||||
import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType;
|
||||
import biomesoplenty.api.config.IConfigObj;
|
||||
import biomesoplenty.api.enums.BOPClimates;
|
||||
import biomesoplenty.api.generation.GeneratorStage;
|
||||
import biomesoplenty.common.enums.BOPGems;
|
||||
import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod;
|
||||
import biomesoplenty.common.util.block.BlockQuery.BlockQueryBlock;
|
||||
import biomesoplenty.common.world.generator.GeneratorBlobs;
|
||||
import biomesoplenty.common.world.generator.GeneratorOreSingle;
|
||||
import biomesoplenty.common.world.generator.GeneratorSplatter;
|
||||
import biomesoplenty.common.world.generator.GeneratorSplotches;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.chunk.ChunkPrimer;
|
||||
|
||||
public class BiomeGenColdDesert extends BOPBiome
|
||||
{
|
||||
|
||||
public IBlockState usualTopBlock;
|
||||
public IBlockState alternateTopBlock;
|
||||
|
||||
public BiomeGenColdDesert()
|
||||
{
|
||||
super("cold_desert", new PropsBuilder("Cold Desert").withGuiColour(0xB3AF9B).withTemperature(0.25F).withRainfall(0.0F).withRainDisabled());
|
||||
|
||||
this.canSpawnInBiome = false;
|
||||
this.canGenerateVillages = false;
|
||||
|
||||
// terrain
|
||||
this.terrainSettings.avgHeight(64).heightVariation(5, 10).sidewaysNoise(0.7D);
|
||||
|
||||
this.topBlock = Blocks.GRAVEL.getDefaultState();
|
||||
this.fillerBlock = Blocks.STONE.getDefaultState();
|
||||
this.usualTopBlock = this.topBlock;
|
||||
this.alternateTopBlock = Blocks.SNOW.getDefaultState();
|
||||
|
||||
this.canGenerateRivers = false;
|
||||
|
||||
this.addWeight(BOPClimates.ICE_CAP, 10);
|
||||
|
||||
this.spawnableCreatureList.clear();
|
||||
|
||||
// gravel, stone and boulders
|
||||
IBlockPosQuery surface = new BlockQueryBlock(Blocks.STONE, Blocks.GRAVEL);
|
||||
this.addGenerator("stone_patches", GeneratorStage.SAND, (new GeneratorSplotches.Builder()).amountPerChunk(6).splotchSize(24).placeOn(surface).replace(surface).with(Blocks.STONE.getDefaultState()).scatterYMethod(ScatterYMethod.AT_SURFACE).create());
|
||||
this.addGenerator("boulders", GeneratorStage.SAND_PASS2, (new GeneratorBlobs.Builder()).amountPerChunk(0.2F).placeOn(surface).with(Blocks.COBBLESTONE.getDefaultState()).minRadius(0.0F).maxRadius(3.0F).numBalls(4).scatterYMethod(ScatterYMethod.AT_SURFACE).create());
|
||||
this.addGenerator("hard_ice_splatter", GeneratorStage.SAND, (new GeneratorSplatter.Builder()).amountPerChunk(1.0F).replace(surface).with(BOPBlocks.hard_ice.getDefaultState()).create());
|
||||
|
||||
// gem
|
||||
this.addGenerator("tanzanite", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).with(BOPGems.TANZANITE).create());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void configure(IConfigObj conf)
|
||||
{
|
||||
super.configure(conf);
|
||||
|
||||
this.usualTopBlock = this.topBlock;
|
||||
this.alternateTopBlock = conf.getBlockState("alternateTopBlock", this.alternateTopBlock);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applySettings(IBOPWorldSettings settings)
|
||||
{
|
||||
if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("tanzanite");}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void genTerrainBlocks(World world, Random rand, ChunkPrimer primer, int x, int z, double noise)
|
||||
{
|
||||
this.topBlock = (noise + rand.nextDouble() * 3.0D > 1.8D) ? this.alternateTopBlock : this.usualTopBlock;
|
||||
super.genTerrainBlocks(world, rand, primer, x, z, noise);
|
||||
}
|
||||
|
||||
}
|
|
@ -1,142 +0,0 @@
|
|||
package biomesoplenty.common.biome.overworld;
|
||||
|
||||
import biomesoplenty.api.biome.BOPBiomes;
|
||||
import biomesoplenty.api.block.BOPBlocks;
|
||||
import biomesoplenty.api.config.IBOPWorldSettings;
|
||||
import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType;
|
||||
import biomesoplenty.api.enums.BOPClimates;
|
||||
import biomesoplenty.api.generation.GeneratorStage;
|
||||
import biomesoplenty.common.block.BlockBOPDirt;
|
||||
import biomesoplenty.common.block.BlockBOPDoublePlant;
|
||||
import biomesoplenty.common.block.BlockBOPGrass;
|
||||
import biomesoplenty.common.block.BlockBOPMushroom;
|
||||
import biomesoplenty.common.enums.BOPFlowers;
|
||||
import biomesoplenty.common.enums.BOPGems;
|
||||
import biomesoplenty.common.enums.BOPPlants;
|
||||
import biomesoplenty.common.enums.BOPTrees;
|
||||
import biomesoplenty.common.enums.BOPWoods;
|
||||
import biomesoplenty.common.world.generator.GeneratorDoubleFlora;
|
||||
import biomesoplenty.common.world.generator.GeneratorFlora;
|
||||
import biomesoplenty.common.world.generator.GeneratorGrass;
|
||||
import biomesoplenty.common.world.generator.GeneratorOreSingle;
|
||||
import biomesoplenty.common.world.generator.GeneratorWaterside;
|
||||
import biomesoplenty.common.world.generator.GeneratorWeighted;
|
||||
import biomesoplenty.common.world.generator.tree.GeneratorTaigaTree;
|
||||
import net.minecraft.block.BlockFlower;
|
||||
import net.minecraft.block.BlockPlanks;
|
||||
import net.minecraft.block.BlockTallGrass;
|
||||
import net.minecraft.entity.passive.EntityWolf;
|
||||
import net.minecraft.init.Blocks;
|
||||
|
||||
public class BiomeGenConiferousForest extends BOPBiome
|
||||
{
|
||||
|
||||
public BiomeGenConiferousForest()
|
||||
{
|
||||
super("coniferous_forest", new PropsBuilder("Coniferous Forest").withGuiColour(0x528F60).withTemperature(0.45F).withRainfall(0.5F));
|
||||
|
||||
// terrain
|
||||
this.terrainSettings.avgHeight(68).heightVariation(10, 20);
|
||||
|
||||
this.canGenerateVillages = false;
|
||||
|
||||
if (BOPBiomes.gravel_beach.isPresent())
|
||||
{
|
||||
this.beachBiomeLocation = ((BOPBiome)BOPBiomes.gravel_beach.get()).getResourceLocation();
|
||||
}
|
||||
|
||||
this.addWeight(BOPClimates.BOREAL, 10);
|
||||
|
||||
this.topBlock = BOPBlocks.grass.getDefaultState().withProperty(BlockBOPGrass.VARIANT, BlockBOPGrass.BOPGrassType.LOAMY);
|
||||
this.fillerBlock = BOPBlocks.dirt.getDefaultState().withProperty(BlockBOPDirt.VARIANT, BlockBOPDirt.BOPDirtType.LOAMY);
|
||||
|
||||
this.spawnableCreatureList.add(new SpawnListEntry(EntityWolf.class, 8, 4, 4));
|
||||
|
||||
// gravel
|
||||
this.addGenerator("gravel", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(4).maxRadius(7).with(Blocks.GRAVEL.getDefaultState()).create());
|
||||
|
||||
// trees
|
||||
GeneratorWeighted treeGenerator = new GeneratorWeighted(8.0F);
|
||||
this.addGenerator("trees", GeneratorStage.TREE, treeGenerator);
|
||||
treeGenerator.add("fir", 5, (new GeneratorTaigaTree.Builder()).log(BOPWoods.FIR).leaves(BOPTrees.FIR).minHeight(5).maxHeight(28).create());
|
||||
treeGenerator.add("mega_fir", 3, (new GeneratorTaigaTree.Builder()).log(BOPWoods.FIR).leaves(BOPTrees.FIR).minHeight(20).maxHeight(40).trunkWidth(2).create());
|
||||
|
||||
// other plants
|
||||
this.addGenerator("shrubs", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(BOPPlants.SHRUB).create());
|
||||
this.addGenerator("dead_leaf_piles", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(1.0F).with(BOPPlants.DEADLEAFPILE).create());
|
||||
this.addGenerator("leaf_piles", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BOPPlants.LEAFPILE).generationAttempts(64).create());
|
||||
this.addGenerator("flax", GeneratorStage.FLOWERS, (new GeneratorDoubleFlora.Builder()).amountPerChunk(0.2F).with(BlockBOPDoublePlant.DoublePlantType.FLAX).create());
|
||||
this.addGenerator("berry_bushes", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(BOPPlants.BERRYBUSH).create());
|
||||
this.addGenerator("poison_ivy", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.25F).with(BOPPlants.POISONIVY).create());
|
||||
this.addGenerator("bushes", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(BOPPlants.BUSH).create());
|
||||
this.addGenerator("cattail", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(2.0F).with(BOPPlants.CATTAIL).create());
|
||||
this.addGenerator("double_cattail", GeneratorStage.FLOWERS, (new GeneratorDoubleFlora.Builder()).amountPerChunk(1.0F).with(BlockBOPDoublePlant.DoublePlantType.TALL_CATTAIL).create());
|
||||
|
||||
// shrooms
|
||||
this.addGenerator("flat_mushroom", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(BlockBOPMushroom.MushroomType.FLAT_MUSHROOM).create());
|
||||
this.addGenerator("toadstools", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.4F).with(BlockBOPMushroom.MushroomType.TOADSTOOL).create());
|
||||
this.addGenerator("blue_milk_caps", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(BlockBOPMushroom.MushroomType.BLUE_MILK_CAP).create());
|
||||
this.addGenerator("brown_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(Blocks.BROWN_MUSHROOM.getDefaultState()).create());
|
||||
this.addGenerator("red_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(Blocks.RED_MUSHROOM.getDefaultState()).create());
|
||||
|
||||
// water plants
|
||||
this.addGenerator("water_reeds", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.8F).with(BOPPlants.REED).generationAttempts(32).create());
|
||||
|
||||
// flowers
|
||||
GeneratorWeighted flowerGenerator = new GeneratorWeighted(0.6F);
|
||||
this.addGenerator("flowers", GeneratorStage.GRASS, flowerGenerator);
|
||||
flowerGenerator.add("bluebells", 1, (new GeneratorFlora.Builder().with(BOPFlowers.BLUEBELLS)).generationAttempts(128).create());
|
||||
flowerGenerator.add("oxeye_daisy", 1, (new GeneratorFlora.Builder().with(BlockFlower.EnumFlowerType.OXEYE_DAISY).create()));
|
||||
flowerGenerator.add("dandelion", 1, (new GeneratorFlora.Builder().with(BlockFlower.EnumFlowerType.DANDELION).create()));
|
||||
flowerGenerator.add("poppy", 1, (new GeneratorFlora.Builder().with(BlockFlower.EnumFlowerType.POPPY).create()));
|
||||
|
||||
// grasses
|
||||
GeneratorWeighted grassGenerator = new GeneratorWeighted(5.0F);
|
||||
this.addGenerator("grass", GeneratorStage.GRASS, grassGenerator);
|
||||
grassGenerator.add("tallgrass", 2, (new GeneratorGrass.Builder()).with(BlockTallGrass.EnumType.GRASS).generationAttempts(128).create());
|
||||
grassGenerator.add("shortgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.SHORTGRASS).create());
|
||||
grassGenerator.add("mediumgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.MEDIUMGRASS).create());
|
||||
grassGenerator.add("wheatgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.WHEATGRASS).generationAttempts(128).create());
|
||||
grassGenerator.add("dampgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.DAMPGRASS).generationAttempts(128).create());
|
||||
grassGenerator.add("fern", 1, (new GeneratorGrass.Builder()).with(BlockTallGrass.EnumType.FERN).create());
|
||||
|
||||
// gem
|
||||
this.addGenerator("amber", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).with(BOPGems.AMBER).create());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applySettings(IBOPWorldSettings settings)
|
||||
{
|
||||
if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("amber");}
|
||||
if (!settings.isEnabled(GeneratorType.POISON_IVY)) {this.removeGenerator("poison_ivy");}
|
||||
if (!settings.isEnabled(GeneratorType.FLAX)) {this.removeGenerator("flax");}
|
||||
if (!settings.isEnabled(GeneratorType.BERRY_BUSHES)) {this.removeGenerator("berry_bushes");}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.MUSHROOMS)) {this.removeGenerator("toadstools"); this.removeGenerator("flat_mushroom"); this.removeGenerator("blue_milk_caps"); this.removeGenerator("portobellos");}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.SOILS)) {this.topBlock = Blocks.GRASS.getDefaultState(); this.fillerBlock = Blocks.DIRT.getDefaultState();}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.WATER_PLANTS)) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");}
|
||||
|
||||
GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees");
|
||||
if (!settings.isEnabled(GeneratorType.TREES)) {this.removeGenerator("trees");
|
||||
|
||||
GeneratorWeighted treeGenerator = new GeneratorWeighted(8.0F);
|
||||
this.addGenerator("trees", GeneratorStage.TREE, treeGenerator);
|
||||
treeGenerator.add("fir", 5, (new GeneratorTaigaTree.Builder()).log(BlockPlanks.EnumType.SPRUCE).leaves(BlockPlanks.EnumType.SPRUCE).minHeight(5).maxHeight(28).create());
|
||||
treeGenerator.add("mega_fir", 3, (new GeneratorTaigaTree.Builder()).log(BlockPlanks.EnumType.SPRUCE).leaves(BlockPlanks.EnumType.SPRUCE).minHeight(20).maxHeight(40).trunkWidth(2).create());
|
||||
}
|
||||
|
||||
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
|
||||
if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
|
||||
|
||||
GeneratorWeighted flowerGen = (GeneratorWeighted)this.getGenerator("flowers");
|
||||
if (!settings.isEnabled(GeneratorType.FLOWERS)) {flowerGen.removeGenerator("bluebells"); flowerGen.removeGenerator("clover"); flowerGen.removeGenerator("swampflower"); flowerGen.removeGenerator("deathbloom"); flowerGen.removeGenerator("glowflower"); flowerGen.removeGenerator("blue_hydrangeas"); flowerGen.removeGenerator("pink_daffodil"); flowerGen.removeGenerator("white_anemones"); flowerGen.removeGenerator("orange_cosmos"); flowerGen.removeGenerator("wildflowers"); flowerGen.removeGenerator("violet"); flowerGen.removeGenerator("hibiscus"); flowerGen.removeGenerator("goldenrods"); flowerGen.removeGenerator("icy_irises"); flowerGen.removeGenerator("wilted_lily"); flowerGen.removeGenerator("lily_of_the_valley"); this.removeGenerator("bromeliad");}
|
||||
}
|
||||
|
||||
}
|
|
@ -1,61 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2015-2016, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
|
||||
package biomesoplenty.common.biome.overworld;
|
||||
|
||||
import biomesoplenty.api.block.BOPBlocks;
|
||||
import biomesoplenty.api.config.IBOPWorldSettings;
|
||||
import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType;
|
||||
import biomesoplenty.api.generation.GeneratorStage;
|
||||
import biomesoplenty.common.block.BlockBOPCoral;
|
||||
import biomesoplenty.common.enums.BOPGems;
|
||||
import biomesoplenty.common.util.biome.BiomeUtils;
|
||||
import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod;
|
||||
import biomesoplenty.common.world.generator.GeneratorFlora;
|
||||
import biomesoplenty.common.world.generator.GeneratorOreSingle;
|
||||
import net.minecraft.init.Biomes;
|
||||
import net.minecraft.init.Blocks;
|
||||
|
||||
public class BiomeGenCoralReef extends BOPBiome
|
||||
{
|
||||
public BiomeGenCoralReef()
|
||||
{
|
||||
super("coral_reef", new PropsBuilder("Coral Reef").withGuiColour(18285));
|
||||
|
||||
// terrain
|
||||
this.terrainSettings.avgHeight(45).heightVariation(5, 10);
|
||||
|
||||
this.canSpawnInBiome = false;
|
||||
this.canGenerateVillages = false;
|
||||
this.canGenerateRivers = false;
|
||||
|
||||
this.beachBiomeLocation = BiomeUtils.getLocForBiome(Biomes.BEACH);
|
||||
|
||||
clearWeights();
|
||||
|
||||
// coral
|
||||
this.addGenerator("pink_coral", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(15.0F).replace(Blocks.WATER).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.PINK)).scatterYMethod(ScatterYMethod.AT_GROUND).create());
|
||||
this.addGenerator("orange_coral", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(15.0F).replace(Blocks.WATER).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.ORANGE)).scatterYMethod(ScatterYMethod.AT_GROUND).create());
|
||||
this.addGenerator("blue_coral", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(15.0F).replace(Blocks.WATER).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.BLUE)).scatterYMethod(ScatterYMethod.AT_GROUND).create());
|
||||
this.addGenerator("glowing_coral", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(15.0F).replace(Blocks.WATER).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.GLOWING)).scatterYMethod(ScatterYMethod.AT_GROUND).create());
|
||||
this.addGenerator("algae", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(3.0F).replace(Blocks.WATER).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.ALGAE)).scatterYMethod(ScatterYMethod.AT_GROUND).create());
|
||||
|
||||
// gem
|
||||
this.addGenerator("sapphire", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).with(BOPGems.SAPPHIRE).create());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applySettings(IBOPWorldSettings settings)
|
||||
{
|
||||
if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("sapphire");}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");}
|
||||
}
|
||||
}
|
|
@ -1,58 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2015-2016, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
|
||||
package biomesoplenty.common.biome.overworld;
|
||||
|
||||
import biomesoplenty.api.block.BOPBlocks;
|
||||
import biomesoplenty.api.config.IBOPWorldSettings;
|
||||
import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType;
|
||||
import biomesoplenty.api.enums.BOPClimates;
|
||||
import biomesoplenty.api.generation.GeneratorStage;
|
||||
import biomesoplenty.common.world.generator.GeneratorOreSingle;
|
||||
import net.minecraft.init.Blocks;
|
||||
|
||||
public class BiomeGenCrag extends BOPBiome
|
||||
{
|
||||
public BiomeGenCrag()
|
||||
{
|
||||
super("crag", new PropsBuilder("Crag").withGuiColour(5209457).withTemperature(0.5F).withRainfall(0.5F).withWaterColor(944693));
|
||||
|
||||
// terrain
|
||||
this.terrainSettings.avgHeight(80).heightVariation(80, 200).minHeight(40).sidewaysNoise(0.7F);
|
||||
|
||||
this.canSpawnInBiome = false;
|
||||
this.canGenerateVillages = false;
|
||||
this.canGenerateRivers = false;
|
||||
|
||||
this.beachBiomeLocation = null;
|
||||
|
||||
this.addWeight(BOPClimates.COLD_SWAMP, 1);
|
||||
|
||||
this.spawnableCreatureList.clear();
|
||||
this.spawnableWaterCreatureList.clear();
|
||||
|
||||
this.topBlock = BOPBlocks.crag_rock.getDefaultState();
|
||||
this.fillerBlock = BOPBlocks.crag_rock.getDefaultState();
|
||||
this.skyColor = 4944498;
|
||||
|
||||
this.avgDirtDepth = 8;
|
||||
|
||||
// gem
|
||||
this.addGenerator("emeralds", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).with(Blocks.EMERALD_ORE.getDefaultState()).create());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applySettings(IBOPWorldSettings settings)
|
||||
{
|
||||
if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");}
|
||||
}
|
||||
|
||||
}
|
|
@ -1,128 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2015-2016, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
|
||||
package biomesoplenty.common.biome.overworld;
|
||||
|
||||
import biomesoplenty.api.biome.BOPBiomes;
|
||||
import biomesoplenty.api.block.BOPBlocks;
|
||||
import biomesoplenty.api.config.IBOPWorldSettings;
|
||||
import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType;
|
||||
import biomesoplenty.api.enums.BOPClimates;
|
||||
import biomesoplenty.api.generation.GeneratorStage;
|
||||
import biomesoplenty.common.block.BlockBOPDirt;
|
||||
import biomesoplenty.common.block.BlockBOPGrass;
|
||||
import biomesoplenty.common.enums.BOPGems;
|
||||
import biomesoplenty.common.enums.BOPPlants;
|
||||
import biomesoplenty.common.enums.BOPTrees;
|
||||
import biomesoplenty.common.enums.BOPWoods;
|
||||
import biomesoplenty.common.world.generator.GeneratorFlora;
|
||||
import biomesoplenty.common.world.generator.GeneratorGrass;
|
||||
import biomesoplenty.common.world.generator.GeneratorOreSingle;
|
||||
import biomesoplenty.common.world.generator.GeneratorWaterside;
|
||||
import biomesoplenty.common.world.generator.GeneratorWeighted;
|
||||
import biomesoplenty.common.world.generator.tree.GeneratorBasicTree;
|
||||
import biomesoplenty.common.world.generator.tree.GeneratorBigTree;
|
||||
import biomesoplenty.common.world.generator.tree.GeneratorTaigaTree;
|
||||
import net.minecraft.block.BlockPlanks;
|
||||
import net.minecraft.block.BlockTallGrass;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
public class BiomeGenDeadForest extends BOPBiome
|
||||
{
|
||||
public BiomeGenDeadForest()
|
||||
{
|
||||
super("dead_forest", new PropsBuilder("Dead Forest").withGuiColour(0xBCA165).withTemperature(0.3F).withRainfall(0.3F));
|
||||
|
||||
// terrain
|
||||
this.terrainSettings.avgHeight(68).heightVariation(8, 25);
|
||||
|
||||
this.topBlock = BOPBlocks.grass.getDefaultState().withProperty(BlockBOPGrass.VARIANT, BlockBOPGrass.BOPGrassType.LOAMY);
|
||||
this.fillerBlock = BOPBlocks.dirt.getDefaultState().withProperty(BlockBOPDirt.VARIANT, BlockBOPDirt.BOPDirtType.LOAMY);
|
||||
|
||||
this.canSpawnInBiome = false;
|
||||
this.canGenerateVillages = false;
|
||||
|
||||
if (BOPBiomes.gravel_beach.isPresent())
|
||||
{
|
||||
this.beachBiomeLocation = ((BOPBiome)BOPBiomes.gravel_beach.get()).getResourceLocation();
|
||||
}
|
||||
|
||||
this.addWeight(BOPClimates.BOREAL, 3);
|
||||
|
||||
// gravel
|
||||
this.addGenerator("gravel", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(4).maxRadius(7).with(Blocks.GRAVEL.getDefaultState()).create());
|
||||
|
||||
// trees
|
||||
GeneratorWeighted treeGenerator = new GeneratorWeighted(3);
|
||||
this.addGenerator("trees", GeneratorStage.TREE, treeGenerator);
|
||||
treeGenerator.add("spruce", 3, (new GeneratorTaigaTree.Builder()).minHeight(6).maxHeight(16).create()); // TODO: implement pine cones
|
||||
treeGenerator.add("dying_tree", 5, (new GeneratorBigTree.Builder()).minHeight(5).maxHeight(12).foliageHeight(2).leaves(BOPTrees.DEAD).create());
|
||||
treeGenerator.add("oak", 3, (new GeneratorBasicTree.Builder()).leaves(BOPTrees.DEAD).create());
|
||||
treeGenerator.add("dead_tree", 1, (new GeneratorBigTree.Builder()).minHeight(5).maxHeight(12).foliageHeight(0).foliageDensity(0.5D).log(BOPWoods.DEAD).leaves(Blocks.AIR.getDefaultState()).create());
|
||||
|
||||
// other plants
|
||||
this.addGenerator("thorns", GeneratorStage.FLOWERS, (new GeneratorFlora.Builder()).amountPerChunk(0.3F).with(BOPPlants.THORN).create());
|
||||
this.addGenerator("shrubs", GeneratorStage.FLOWERS, (new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(BOPPlants.SHRUB).create());
|
||||
this.addGenerator("water_reeds", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.8F).with(BOPPlants.REED).generationAttempts(32).create());
|
||||
this.addGenerator("dead_leaf_piles", GeneratorStage.FLOWERS, (new GeneratorFlora.Builder()).amountPerChunk(3.5F).with(BOPPlants.DEADLEAFPILE).generationAttempts(64).create());
|
||||
|
||||
// grasses
|
||||
GeneratorWeighted grassGenerator = new GeneratorWeighted(1.5F);
|
||||
this.addGenerator("grass", GeneratorStage.GRASS, grassGenerator);
|
||||
grassGenerator.add("shortgrass", 4, (new GeneratorGrass.Builder()).with(BOPPlants.SHORTGRASS).create());
|
||||
grassGenerator.add("mediumgrass", 3, (new GeneratorGrass.Builder()).with(BOPPlants.MEDIUMGRASS).create());
|
||||
grassGenerator.add("tallgrass", 2, (new GeneratorGrass.Builder()).with(BlockTallGrass.EnumType.GRASS).create());
|
||||
grassGenerator.add("dead_bushes", 1, (new GeneratorGrass.Builder()).with(BlockTallGrass.EnumType.DEAD_BUSH).create());
|
||||
|
||||
// gem
|
||||
this.addGenerator("tanzanite", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).with(BOPGems.TANZANITE).create());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applySettings(IBOPWorldSettings settings)
|
||||
{
|
||||
if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("tanzanite");}
|
||||
if (!settings.isEnabled(GeneratorType.THORNS)) {this.removeGenerator("thorns");}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.SOILS)) {this.topBlock = Blocks.GRASS.getDefaultState(); this.fillerBlock = Blocks.DIRT.getDefaultState();}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.WATER_PLANTS)) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");}
|
||||
|
||||
GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees");
|
||||
if (!settings.isEnabled(GeneratorType.TREES)) {this.removeGenerator("trees");
|
||||
|
||||
GeneratorWeighted treeGenerator = new GeneratorWeighted(3);
|
||||
this.addGenerator("trees", GeneratorStage.TREE, treeGenerator);
|
||||
treeGenerator.add("spruce", 3, (new GeneratorTaigaTree.Builder()).minHeight(6).maxHeight(16).create()); // TODO: implement pine cones
|
||||
treeGenerator.add("dying_tree", 5, (new GeneratorBigTree.Builder()).minHeight(5).maxHeight(12).foliageHeight(2).leaves(BlockPlanks.EnumType.OAK).create());
|
||||
treeGenerator.add("dead_tree", 2, (new GeneratorBigTree.Builder()).minHeight(5).maxHeight(12).foliageHeight(0).foliageDensity(0.5D).log(BlockPlanks.EnumType.DARK_OAK).leaves(Blocks.AIR.getDefaultState()).create());
|
||||
}
|
||||
|
||||
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
|
||||
if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getGrassColorAtPos(BlockPos pos)
|
||||
{
|
||||
return 0xBCA165;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFoliageColorAtPos(BlockPos pos)
|
||||
{
|
||||
return 0xBCA165;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,155 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2015-2016, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
|
||||
package biomesoplenty.common.biome.overworld;
|
||||
|
||||
import biomesoplenty.api.block.BOPBlocks;
|
||||
import biomesoplenty.api.block.BlockQueries;
|
||||
import biomesoplenty.api.config.IBOPWorldSettings;
|
||||
import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType;
|
||||
import biomesoplenty.api.enums.BOPClimates;
|
||||
import biomesoplenty.api.generation.GeneratorStage;
|
||||
import biomesoplenty.common.block.BlockBOPCoral;
|
||||
import biomesoplenty.common.block.BlockBOPDirt;
|
||||
import biomesoplenty.common.block.BlockBOPGrass;
|
||||
import biomesoplenty.common.block.BlockBOPPlant;
|
||||
import biomesoplenty.common.entities.EntitySnail;
|
||||
import biomesoplenty.common.enums.BOPGems;
|
||||
import biomesoplenty.common.enums.BOPPlants;
|
||||
import biomesoplenty.common.enums.BOPTrees;
|
||||
import biomesoplenty.common.enums.BOPWoods;
|
||||
import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod;
|
||||
import biomesoplenty.common.world.generator.GeneratorColumns;
|
||||
import biomesoplenty.common.world.generator.GeneratorDoubleFlora;
|
||||
import biomesoplenty.common.world.generator.GeneratorFlora;
|
||||
import biomesoplenty.common.world.generator.GeneratorGrass;
|
||||
import biomesoplenty.common.world.generator.GeneratorOreSingle;
|
||||
import biomesoplenty.common.world.generator.GeneratorSplotches;
|
||||
import biomesoplenty.common.world.generator.GeneratorWaterside;
|
||||
import biomesoplenty.common.world.generator.GeneratorWeighted;
|
||||
import biomesoplenty.common.world.generator.tree.GeneratorBigTree;
|
||||
import net.minecraft.block.BlockDoublePlant;
|
||||
import net.minecraft.block.BlockPlanks;
|
||||
import net.minecraft.block.BlockTallGrass;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
public class BiomeGenDeadSwamp extends BOPBiome
|
||||
{
|
||||
|
||||
public BiomeGenDeadSwamp()
|
||||
{
|
||||
super("dead_swamp", new PropsBuilder("Dead Swamp").withGuiColour(0x8BAF48).withTemperature(0.55F).withRainfall(0.9F).withWaterColor(0xA2AD51));
|
||||
|
||||
// terrain
|
||||
this.terrainSettings.avgHeight(63).heightVariation(6, 3);
|
||||
|
||||
//this.skyColor = 0x627268;
|
||||
this.topBlock = BOPBlocks.grass.getDefaultState().withProperty(BlockBOPGrass.VARIANT, BlockBOPGrass.BOPGrassType.LOAMY);
|
||||
this.fillerBlock = BOPBlocks.dirt.getDefaultState().withProperty(BlockBOPDirt.VARIANT, BlockBOPDirt.BOPDirtType.LOAMY);
|
||||
|
||||
this.canSpawnInBiome = false;
|
||||
this.canGenerateRivers = false;
|
||||
this.canGenerateVillages = false;
|
||||
|
||||
this.beachBiomeLocation = null;
|
||||
|
||||
this.addWeight(BOPClimates.COLD_SWAMP, 3);
|
||||
|
||||
this.spawnableCreatureList.clear();
|
||||
this.spawnableWaterCreatureList.clear();
|
||||
this.spawnableCreatureList.add(new SpawnListEntry(EntitySnail.class, 8, 1, 2));
|
||||
|
||||
// mud
|
||||
this.addGenerator("mud", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(8).maxRadius(7).with(BOPBlocks.mud.getDefaultState()).create());
|
||||
this.addGenerator("mud_patches", GeneratorStage.SAND_PASS2, (new GeneratorSplotches.Builder()).amountPerChunk(1).splotchSize(12).replace(this.topBlock).with(BOPBlocks.mud.getDefaultState()).scatterYMethod(ScatterYMethod.AT_SURFACE).create());
|
||||
|
||||
// trees
|
||||
GeneratorWeighted treeGenerator = new GeneratorWeighted(0.6F);
|
||||
this.addGenerator("trees", GeneratorStage.TREE, treeGenerator);
|
||||
treeGenerator.add("dying_tree", 2, (new GeneratorBigTree.Builder()).minHeight(5).maxHeight(12).foliageHeight(1).log(BOPWoods.DEAD).leaves(BOPTrees.DEAD).create());
|
||||
treeGenerator.add("dead_tree", 1, (new GeneratorBigTree.Builder()).minHeight(5).maxHeight(12).foliageHeight(0).foliageDensity(0.5D).log(BOPWoods.DEAD).leaves(Blocks.AIR.getDefaultState()).create());
|
||||
|
||||
// other plants
|
||||
this.addGenerator("koru", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(BOPPlants.KORU).create());
|
||||
|
||||
// water plants
|
||||
this.addGenerator("river_cane", GeneratorStage.FLOWERS,(new GeneratorColumns.Builder()).amountPerChunk(0.3F).generationAttempts(24).placeOn(BlockQueries.litFertileWaterside).with(BlockBOPPlant.paging.getVariantState(BOPPlants.RIVERCANE)).minHeight(1).maxHeight(3).create());
|
||||
this.addGenerator("water_reeds", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BOPPlants.REED).generationAttempts(32).create());
|
||||
this.addGenerator("algae", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).replace(Blocks.WATER).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.ALGAE)).generationAttempts(32).scatterYMethod(ScatterYMethod.AT_GROUND).create());
|
||||
|
||||
// grasses
|
||||
GeneratorWeighted grassGenerator = new GeneratorWeighted(2.0F);
|
||||
this.addGenerator("grass", GeneratorStage.GRASS, grassGenerator);
|
||||
grassGenerator.add("tallgrass", 2, (new GeneratorGrass.Builder()).with(BlockTallGrass.EnumType.GRASS).create());
|
||||
grassGenerator.add("shortgrass", 4, (new GeneratorGrass.Builder()).with(BOPPlants.SHORTGRASS).create());
|
||||
grassGenerator.add("mediumgrass", 3, (new GeneratorGrass.Builder()).with(BOPPlants.MEDIUMGRASS).create());
|
||||
grassGenerator.add("dampgrass", 2, (new GeneratorGrass.Builder()).with(BOPPlants.DAMPGRASS).create());
|
||||
grassGenerator.add("doublegrass", 1, (new GeneratorDoubleFlora.Builder()).with(BlockDoublePlant.EnumPlantType.GRASS).create());
|
||||
|
||||
// gem
|
||||
this.addGenerator("malachite", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).with(BOPGems.MALACHITE).create());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applySettings(IBOPWorldSettings settings)
|
||||
{
|
||||
if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("malachite");}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.SOILS)) {this.topBlock = Blocks.GRASS.getDefaultState(); this.fillerBlock = Blocks.DIRT.getDefaultState();}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.WATER_PLANTS)) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");}
|
||||
|
||||
GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees");
|
||||
if (!settings.isEnabled(GeneratorType.TREES)) {this.removeGenerator("trees");
|
||||
|
||||
GeneratorWeighted treeGenerator = new GeneratorWeighted(0.6F);
|
||||
this.addGenerator("trees", GeneratorStage.TREE, treeGenerator);
|
||||
treeGenerator.add("dying_tree", 2, (new GeneratorBigTree.Builder()).minHeight(5).maxHeight(12).foliageHeight(1).log(BlockPlanks.EnumType.DARK_OAK).leaves(BlockPlanks.EnumType.DARK_OAK).create());
|
||||
treeGenerator.add("dead_tree", 1, (new GeneratorBigTree.Builder()).minHeight(5).maxHeight(12).foliageHeight(0).foliageDensity(0.5D).log(BlockPlanks.EnumType.DARK_OAK).leaves(Blocks.AIR.getDefaultState()).create());
|
||||
}
|
||||
|
||||
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
|
||||
if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getGrassColorAtPos(BlockPos pos)
|
||||
{
|
||||
return 0x66704C;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFoliageColorAtPos(BlockPos pos)
|
||||
{
|
||||
return 0x66704C;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* TODO
|
||||
@Override
|
||||
public int getFogColour(int x, int y, int z)
|
||||
{
|
||||
return 9219993;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getFogDensity(int x, int y, int z)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return 0.6F;
|
||||
}
|
||||
*/
|
||||
}
|
|
@ -1,194 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2015-2016, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
|
||||
package biomesoplenty.common.biome.overworld;
|
||||
|
||||
import biomesoplenty.api.block.BOPBlocks;
|
||||
import biomesoplenty.api.block.BlockQueries;
|
||||
import biomesoplenty.api.config.IBOPWorldSettings;
|
||||
import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType;
|
||||
import biomesoplenty.api.enums.BOPClimates;
|
||||
import biomesoplenty.api.generation.GeneratorStage;
|
||||
import biomesoplenty.common.block.BlockBOPCoral;
|
||||
import biomesoplenty.common.block.BlockBOPDoublePlant;
|
||||
import biomesoplenty.common.block.BlockBOPMushroom;
|
||||
import biomesoplenty.common.block.BlockBOPPlant;
|
||||
import biomesoplenty.common.enums.BOPFlowers;
|
||||
import biomesoplenty.common.enums.BOPGems;
|
||||
import biomesoplenty.common.enums.BOPPlants;
|
||||
import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod;
|
||||
import biomesoplenty.common.world.generator.GeneratorBigMushroom;
|
||||
import biomesoplenty.common.world.generator.GeneratorColumns;
|
||||
import biomesoplenty.common.world.generator.GeneratorDoubleFlora;
|
||||
import biomesoplenty.common.world.generator.GeneratorFlora;
|
||||
import biomesoplenty.common.world.generator.GeneratorGrass;
|
||||
import biomesoplenty.common.world.generator.GeneratorMixedLily;
|
||||
import biomesoplenty.common.world.generator.GeneratorOreSingle;
|
||||
import biomesoplenty.common.world.generator.GeneratorWaterside;
|
||||
import biomesoplenty.common.world.generator.GeneratorWeighted;
|
||||
import net.minecraft.block.BlockDoublePlant;
|
||||
import net.minecraft.block.BlockFlower.EnumFlowerType;
|
||||
import net.minecraft.block.BlockTallGrass;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
|
||||
// This class is not intended to be used in the game
|
||||
// It just contains one of every common generator, so it can be used as a template when creating new biomes - just delete lines you don't want and adjust weightings
|
||||
public class BiomeGenDummyTemplate extends BOPBiome
|
||||
{
|
||||
|
||||
public BiomeGenDummyTemplate()
|
||||
{
|
||||
super(null, null);
|
||||
|
||||
// terrain
|
||||
this.terrainSettings.avgHeight(64).heightVariation(6, 21).octaves(1, 1, 1, 1, 1, 1);
|
||||
|
||||
this.skyColor = 0xFFFFFF;
|
||||
|
||||
this.addWeight(BOPClimates.COOL_TEMPERATE, 10);
|
||||
|
||||
// gravel
|
||||
this.addGenerator("gravel", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(4).maxRadius(7).with(Blocks.GRAVEL.getDefaultState()).create());
|
||||
|
||||
// mud
|
||||
this.addGenerator("mud", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(BOPBlocks.mud.getDefaultState()).create());
|
||||
|
||||
|
||||
// trees
|
||||
GeneratorWeighted treeGenerator = new GeneratorWeighted(9);
|
||||
this.addGenerator("trees", GeneratorStage.TREE, treeGenerator);
|
||||
// TODO: standard trees here? Is there such a thing as standard trees?
|
||||
|
||||
// grasses
|
||||
GeneratorWeighted grassGenerator = new GeneratorWeighted(2.0F);
|
||||
this.addGenerator("grass", GeneratorStage.GRASS, grassGenerator);
|
||||
grassGenerator.add("deadgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.DEADGRASS).create());
|
||||
grassGenerator.add("desertgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.DESERTGRASS).create());
|
||||
grassGenerator.add("dunegrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.DUNEGRASS).create());
|
||||
grassGenerator.add("shortgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.SHORTGRASS).create());
|
||||
grassGenerator.add("mediumgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.MEDIUMGRASS).create());
|
||||
grassGenerator.add("tallgrass", 1, (new GeneratorGrass.Builder()).with(BlockTallGrass.EnumType.GRASS).create());
|
||||
grassGenerator.add("ferns", 1, (new GeneratorGrass.Builder()).with(BlockTallGrass.EnumType.FERN).create());
|
||||
grassGenerator.add("wheatgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.WHEATGRASS).create());
|
||||
grassGenerator.add("dampgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.DAMPGRASS).create());
|
||||
grassGenerator.add("doublegrass", 1, (new GeneratorDoubleFlora.Builder()).with(BlockDoublePlant.EnumPlantType.GRASS).create());
|
||||
|
||||
// other plants
|
||||
this.addGenerator("berry_bushes", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BOPPlants.BERRYBUSH).create());
|
||||
this.addGenerator("bushes", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BOPPlants.BUSH).create());
|
||||
this.addGenerator("cattails", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BOPPlants.CATTAIL).create());
|
||||
this.addGenerator("clover_patches", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BOPPlants.CLOVERPATCH).create());
|
||||
this.addGenerator("dead_leaf_piles", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BOPPlants.DEADLEAFPILE).create());
|
||||
this.addGenerator("desert_sprouts", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BOPPlants.DESERTSPROUTS).create());
|
||||
this.addGenerator("koru", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BOPPlants.KORU).create());
|
||||
this.addGenerator("leaf_piles", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BOPPlants.LEAFPILE).create());
|
||||
this.addGenerator("poison_ivy", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BOPPlants.POISONIVY).create());
|
||||
this.addGenerator("shrubs", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BOPPlants.SHRUB).create());
|
||||
this.addGenerator("spectral_ferns", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BOPPlants.SPECTRALFERN).create());
|
||||
this.addGenerator("sprouts", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BOPPlants.SPROUT).create());
|
||||
this.addGenerator("thorns", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BOPPlants.THORN).create());
|
||||
this.addGenerator("tiny_cacti", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BOPPlants.TINYCACTUS).create());
|
||||
this.addGenerator("wild_rice", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BOPPlants.WILDRICE).create());
|
||||
this.addGenerator("witherwart", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BOPPlants.WITHERWART).create());
|
||||
this.addGenerator("dead_bushes", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BlockTallGrass.EnumType.DEAD_BUSH).create());
|
||||
this.addGenerator("eyebulbs", GeneratorStage.FLOWERS, (new GeneratorDoubleFlora.Builder()).amountPerChunk(0.5F).with(BlockBOPDoublePlant.DoublePlantType.EYEBULB).create());
|
||||
this.addGenerator("flax", GeneratorStage.FLOWERS, (new GeneratorDoubleFlora.Builder()).amountPerChunk(0.5F).with(BlockBOPDoublePlant.DoublePlantType.FLAX).create());
|
||||
this.addGenerator("tall_cattails", GeneratorStage.FLOWERS, (new GeneratorDoubleFlora.Builder()).amountPerChunk(0.5F).with(BlockBOPDoublePlant.DoublePlantType.TALL_CATTAIL).create());
|
||||
this.addGenerator("tall_ferns", GeneratorStage.FLOWERS, (new GeneratorDoubleFlora.Builder()).amountPerChunk(0.5F).with(BlockDoublePlant.EnumPlantType.FERN).create());
|
||||
this.addGenerator("river_cane", GeneratorStage.FLOWERS,(new GeneratorColumns.Builder()).amountPerChunk(0.5F).placeOn(BlockQueries.litFertileWaterside).with(BlockBOPPlant.paging.getVariantState(BOPPlants.RIVERCANE)).minHeight(1).maxHeight(3).create());
|
||||
this.addGenerator("sugar_cane", GeneratorStage.FLOWERS,(new GeneratorColumns.Builder()).amountPerChunk(0.5F).placeOn(BlockQueries.litFertileWaterside).with(Blocks.REEDS.getDefaultState()).minHeight(1).maxHeight(3).create());
|
||||
// TODO root
|
||||
|
||||
// water plants
|
||||
this.addGenerator("water_reeds", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BOPPlants.REED).generationAttempts(32).create());
|
||||
this.addGenerator("mixed_lily", GeneratorStage.LILYPAD, (new GeneratorMixedLily.Builder()).amountPerChunk(0.5F).create());
|
||||
this.addGenerator("algae", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).replace(Blocks.WATER).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.ALGAE)).scatterYMethod(ScatterYMethod.AT_GROUND).create());
|
||||
|
||||
// flowers
|
||||
GeneratorWeighted flowerGenerator = new GeneratorWeighted(1.0F);
|
||||
this.addGenerator("flowers", GeneratorStage.GRASS, flowerGenerator);
|
||||
flowerGenerator.add("alliums", 1, (new GeneratorFlora.Builder().with(EnumFlowerType.ALLIUM).create()));
|
||||
flowerGenerator.add("blue_orchids", 1, (new GeneratorFlora.Builder().with(EnumFlowerType.BLUE_ORCHID).create()));
|
||||
flowerGenerator.add("dandelion", 1, (new GeneratorFlora.Builder().with(EnumFlowerType.DANDELION).create()));
|
||||
flowerGenerator.add("houstonias", 1, (new GeneratorFlora.Builder().with(EnumFlowerType.HOUSTONIA).create()));
|
||||
flowerGenerator.add("orange_tulips", 1, (new GeneratorFlora.Builder().with(EnumFlowerType.ORANGE_TULIP).create()));
|
||||
flowerGenerator.add("oxeye_daisies", 1, (new GeneratorFlora.Builder().with(EnumFlowerType.OXEYE_DAISY).create()));
|
||||
flowerGenerator.add("pink_tulips", 1, (new GeneratorFlora.Builder().with(EnumFlowerType.PINK_TULIP).create()));
|
||||
flowerGenerator.add("poppy", 1, (new GeneratorFlora.Builder().with(EnumFlowerType.POPPY).create()));
|
||||
flowerGenerator.add("red_tulips", 1, (new GeneratorFlora.Builder().with(EnumFlowerType.RED_TULIP).create()));
|
||||
flowerGenerator.add("white_tulips", 1, (new GeneratorFlora.Builder().with(EnumFlowerType.WHITE_TULIP).create()));
|
||||
flowerGenerator.add("blue_hydrangeas", 1, (new GeneratorFlora.Builder().with(BOPFlowers.BLUE_HYDRANGEA).create()));
|
||||
flowerGenerator.add("bluebells", 1, (new GeneratorFlora.Builder().with(BOPFlowers.BLUEBELLS).create()));
|
||||
flowerGenerator.add("bromeliads", 1, (new GeneratorFlora.Builder().with(BOPFlowers.BROMELIAD).create()));
|
||||
flowerGenerator.add("burning_blossoms", 1, (new GeneratorFlora.Builder().with(BOPFlowers.BURNING_BLOSSOM).create()));
|
||||
flowerGenerator.add("clover", 1, (new GeneratorFlora.Builder().with(BOPFlowers.CLOVER).create()));
|
||||
flowerGenerator.add("wilted_lily", 1, (new GeneratorFlora.Builder().with(BOPFlowers.WILTED_LILY).create()));
|
||||
flowerGenerator.add("deathbloom", 1, (new GeneratorFlora.Builder().with(BOPFlowers.DEATHBLOOM).create()));
|
||||
flowerGenerator.add("enterlotus", 1, (new GeneratorFlora.Builder().with(BOPFlowers.ENDERLOTUS).create()));
|
||||
flowerGenerator.add("glowflower", 1, (new GeneratorFlora.Builder().with(BOPFlowers.GLOWFLOWER).create()));
|
||||
flowerGenerator.add("goldenrods", 1, (new GeneratorFlora.Builder().with(BOPFlowers.GOLDENROD).create()));
|
||||
flowerGenerator.add("icy_irises", 1, (new GeneratorFlora.Builder().with(BOPFlowers.ICY_IRIS).create()));
|
||||
flowerGenerator.add("lavender", 1, (new GeneratorFlora.Builder().with(BOPFlowers.LAVENDER).create()));
|
||||
flowerGenerator.add("lily_of_the_valley", 1, (new GeneratorFlora.Builder().with(BOPFlowers.LILY_OF_THE_VALLEY).create()));
|
||||
flowerGenerator.add("miners_delight", 1, (new GeneratorFlora.Builder().with(BOPFlowers.MINERS_DELIGHT).create()));
|
||||
flowerGenerator.add("orange_cosmos", 1, (new GeneratorFlora.Builder().with(BOPFlowers.ORANGE_COSMOS).create()));
|
||||
flowerGenerator.add("pink_daffodil", 1, (new GeneratorFlora.Builder().with(BOPFlowers.PINK_DAFFODIL).create()));
|
||||
flowerGenerator.add("hibiscus", 1, (new GeneratorFlora.Builder().with(BOPFlowers.PINK_HIBISCUS).create()));
|
||||
flowerGenerator.add("roses", 1, (new GeneratorFlora.Builder().with(BOPFlowers.ROSE).create()));
|
||||
flowerGenerator.add("swampflower", 1, (new GeneratorFlora.Builder().with(BOPFlowers.SWAMPFLOWER).create()));
|
||||
flowerGenerator.add("violet", 1, (new GeneratorFlora.Builder().with(BOPFlowers.VIOLET).create()));
|
||||
flowerGenerator.add("white_anemones", 1, (new GeneratorFlora.Builder().with(BOPFlowers.WHITE_ANEMONE).create()));
|
||||
flowerGenerator.add("wildflowers", 1, (new GeneratorFlora.Builder().with(BOPFlowers.WILDFLOWER).create()));
|
||||
flowerGenerator.add("paeonias", 1, (new GeneratorDoubleFlora.Builder()).with(BlockDoublePlant.EnumPlantType.PAEONIA).create());
|
||||
flowerGenerator.add("tall_roses", 1, (new GeneratorDoubleFlora.Builder()).with(BlockDoublePlant.EnumPlantType.ROSE).create());
|
||||
flowerGenerator.add("sunflowers", 1, (new GeneratorDoubleFlora.Builder()).with(BlockDoublePlant.EnumPlantType.SUNFLOWER).create());
|
||||
flowerGenerator.add("syringas", 1, (new GeneratorDoubleFlora.Builder()).with(BlockDoublePlant.EnumPlantType.SYRINGA).create());
|
||||
|
||||
// shrooms
|
||||
this.addGenerator("brown_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(Blocks.BROWN_MUSHROOM.getDefaultState()).create());
|
||||
this.addGenerator("red_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(Blocks.RED_MUSHROOM.getDefaultState()).create());
|
||||
this.addGenerator("blue_milk_caps", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(BlockBOPMushroom.MushroomType.BLUE_MILK_CAP).create());
|
||||
this.addGenerator("flat_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(BlockBOPMushroom.MushroomType.FLAT_MUSHROOM).create());
|
||||
this.addGenerator("glowshrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(BlockBOPMushroom.MushroomType.GLOWSHROOM).create());
|
||||
this.addGenerator("portobellos", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(BlockBOPMushroom.MushroomType.PORTOBELLO).create());
|
||||
this.addGenerator("shadow_shrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(BlockBOPMushroom.MushroomType.SHADOW_SHROOM).create());
|
||||
this.addGenerator("toadstools", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(BlockBOPMushroom.MushroomType.TOADSTOOL).create());
|
||||
|
||||
// big mushrooms
|
||||
GeneratorWeighted mushroomGenerator = new GeneratorWeighted(0.5F);
|
||||
this.addGenerator("big_mushrooms", GeneratorStage.BIG_SHROOM, mushroomGenerator);
|
||||
mushroomGenerator.add("brown_mushroom", 1, (new GeneratorBigMushroom.Builder()).mushroomType(GeneratorBigMushroom.BigMushroomType.BROWN).create());
|
||||
mushroomGenerator.add("red_mushroom", 1, (new GeneratorBigMushroom.Builder()).mushroomType(GeneratorBigMushroom.BigMushroomType.RED).create());
|
||||
|
||||
|
||||
// gem
|
||||
this.addGenerator("amber", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).with(BOPGems.AMBER).create());
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applySettings(IBOPWorldSettings settings)
|
||||
{
|
||||
if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("amber");}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getGrassColorAtPos(BlockPos pos)
|
||||
{
|
||||
return 0xFFFFFF;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFoliageColorAtPos(BlockPos pos)
|
||||
{
|
||||
return 0xFFFFFF;
|
||||
}
|
||||
}
|
|
@ -1,119 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2015-2016, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
|
||||
package biomesoplenty.common.biome.overworld;
|
||||
|
||||
import biomesoplenty.api.config.IBOPWorldSettings;
|
||||
import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType;
|
||||
import biomesoplenty.api.enums.BOPClimates;
|
||||
import biomesoplenty.api.generation.GeneratorStage;
|
||||
import biomesoplenty.common.block.BlockBOPLilypad;
|
||||
import biomesoplenty.common.entities.EntityButterfly;
|
||||
import biomesoplenty.common.enums.BOPGems;
|
||||
import biomesoplenty.common.enums.BOPPlants;
|
||||
import biomesoplenty.common.enums.BOPTrees;
|
||||
import biomesoplenty.common.enums.BOPWoods;
|
||||
import biomesoplenty.common.world.generator.GeneratorFlora;
|
||||
import biomesoplenty.common.world.generator.GeneratorGrass;
|
||||
import biomesoplenty.common.world.generator.GeneratorOreSingle;
|
||||
import biomesoplenty.common.world.generator.GeneratorWeighted;
|
||||
import biomesoplenty.common.world.generator.tree.GeneratorBulbTree;
|
||||
import biomesoplenty.common.world.generator.tree.GeneratorBush;
|
||||
import net.minecraft.block.BlockFlower;
|
||||
import net.minecraft.block.BlockPlanks;
|
||||
import net.minecraft.block.BlockTallGrass;
|
||||
import net.minecraft.entity.passive.EntityOcelot;
|
||||
import net.minecraft.init.Blocks;
|
||||
|
||||
public class BiomeGenEucalyptusForest extends BOPBiome
|
||||
{
|
||||
|
||||
public BiomeGenEucalyptusForest()
|
||||
{
|
||||
super("eucalyptus_forest", new PropsBuilder("Eucalyptus Forest").withGuiColour(0x9DCC70).withTemperature(0.85F).withRainfall(0.9F));
|
||||
|
||||
// terrain
|
||||
this.terrainSettings.avgHeight(64).heightVariation(10, 20);
|
||||
|
||||
this.canGenerateVillages = false;
|
||||
|
||||
this.addWeight(BOPClimates.TROPICAL, 5);
|
||||
|
||||
this.spawnableMonsterList.add(new SpawnListEntry(EntityOcelot.class, 2, 1, 1));
|
||||
this.spawnableCreatureList.add(new SpawnListEntry(EntityButterfly.class, 6, 2, 4));
|
||||
|
||||
// trees
|
||||
GeneratorWeighted treeGenerator = new GeneratorWeighted(10);
|
||||
this.addGenerator("trees", GeneratorStage.TREE, treeGenerator);
|
||||
treeGenerator.add("oak_bush", 8, (new GeneratorBush.Builder()).maxHeight(2).create());
|
||||
treeGenerator.add("tall_eucalyptus", 1, (new GeneratorBulbTree.Builder()).minHeight(15).maxHeight(30).log(BOPWoods.EUCALYPTUS).leaves(BOPTrees.EUCALYPTUS).create());
|
||||
|
||||
// grasses
|
||||
GeneratorWeighted grassGenerator = new GeneratorWeighted(6);
|
||||
this.addGenerator("grass", GeneratorStage.GRASS, grassGenerator);
|
||||
grassGenerator.add("shortgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.SHORTGRASS).create());
|
||||
grassGenerator.add("mediumgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.MEDIUMGRASS).create());
|
||||
grassGenerator.add("tallgrass", 4, (new GeneratorGrass.Builder()).with(BlockTallGrass.EnumType.GRASS).create());
|
||||
grassGenerator.add("fern", 2, (new GeneratorGrass.Builder()).with(BlockTallGrass.EnumType.FERN).create());
|
||||
|
||||
// flowers
|
||||
GeneratorWeighted flowerGenerator = new GeneratorWeighted(0.5F);
|
||||
this.addGenerator("flowers", GeneratorStage.GRASS, flowerGenerator);
|
||||
flowerGenerator.add("dandelion", 1, (new GeneratorFlora.Builder().with(BlockFlower.EnumFlowerType.DANDELION).create()));
|
||||
flowerGenerator.add("poppy", 1, (new GeneratorFlora.Builder().with(BlockFlower.EnumFlowerType.POPPY).create()));
|
||||
|
||||
// other plants
|
||||
this.addGenerator("sprouts", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(BOPPlants.SPROUT).create());
|
||||
this.addGenerator("bushes", GeneratorStage.FLOWERS, (new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(BOPPlants.BUSH).create());
|
||||
this.addGenerator("shrubs", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(BOPPlants.SHRUB).create());
|
||||
this.addGenerator("rafflesia", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(BOPPlants.RAFFLESIA).create());
|
||||
this.addGenerator("melons", GeneratorStage.FLOWERS, (new GeneratorFlora.Builder()).amountPerChunk(0.015625F).placeOn(this.topBlock).with(Blocks.MELON_BLOCK.getDefaultState()).create());
|
||||
|
||||
// water plants
|
||||
this.addGenerator("lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(Blocks.WATERLILY.getDefaultState()).create());
|
||||
this.addGenerator("medium_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.3F).with(BlockBOPLilypad.LilypadType.MEDIUM).create());
|
||||
this.addGenerator("small_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BlockBOPLilypad.LilypadType.SMALL).create());
|
||||
this.addGenerator("tiny_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BlockBOPLilypad.LilypadType.TINY).create());
|
||||
|
||||
// gem
|
||||
this.addGenerator("topaz", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).with(BOPGems.TOPAZ).create());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applySettings(IBOPWorldSettings settings)
|
||||
{
|
||||
if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("topaz");}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.WATER_PLANTS)) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("algae"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");}
|
||||
|
||||
GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees");
|
||||
if (!settings.isEnabled(GeneratorType.TREES)) {this.removeGenerator("trees");
|
||||
|
||||
GeneratorWeighted treeGenerator = new GeneratorWeighted(10);
|
||||
this.addGenerator("trees", GeneratorStage.TREE, treeGenerator);
|
||||
treeGenerator.add("oak_bush", 8, (new GeneratorBush.Builder()).maxHeight(2).create());
|
||||
treeGenerator.add("tall_eucalyptus", 1, (new GeneratorBulbTree.Builder()).minHeight(15).maxHeight(30).log(BlockPlanks.EnumType.JUNGLE).leaves(BlockPlanks.EnumType.JUNGLE).create());
|
||||
}
|
||||
|
||||
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
|
||||
if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
|
||||
}
|
||||
|
||||
/*
|
||||
public int getFogColour(int x, int y, int z)
|
||||
{
|
||||
return 14805212;
|
||||
}
|
||||
*/
|
||||
|
||||
}
|
|
@ -1,189 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2015-2016, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
|
||||
package biomesoplenty.common.biome.overworld;
|
||||
|
||||
import biomesoplenty.api.biome.BOPBiomes;
|
||||
import biomesoplenty.api.block.BOPBlocks;
|
||||
import biomesoplenty.api.block.BlockQueries;
|
||||
import biomesoplenty.api.config.IBOPWorldSettings;
|
||||
import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType;
|
||||
import biomesoplenty.api.enums.BOPClimates;
|
||||
import biomesoplenty.api.generation.GeneratorStage;
|
||||
import biomesoplenty.common.block.BlockBOPCoral;
|
||||
import biomesoplenty.common.block.BlockBOPDirt;
|
||||
import biomesoplenty.common.block.BlockBOPDoublePlant;
|
||||
import biomesoplenty.common.block.BlockBOPGrass;
|
||||
import biomesoplenty.common.block.BlockBOPLilypad;
|
||||
import biomesoplenty.common.block.BlockBOPMushroom;
|
||||
import biomesoplenty.common.block.BlockBOPPlant;
|
||||
import biomesoplenty.common.entities.EntitySnail;
|
||||
import biomesoplenty.common.enums.BOPGems;
|
||||
import biomesoplenty.common.enums.BOPPlants;
|
||||
import biomesoplenty.common.enums.BOPTrees;
|
||||
import biomesoplenty.common.enums.BOPWoods;
|
||||
import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod;
|
||||
import biomesoplenty.common.world.generator.GeneratorColumns;
|
||||
import biomesoplenty.common.world.generator.GeneratorDoubleFlora;
|
||||
import biomesoplenty.common.world.generator.GeneratorFlora;
|
||||
import biomesoplenty.common.world.generator.GeneratorGrass;
|
||||
import biomesoplenty.common.world.generator.GeneratorOreSingle;
|
||||
import biomesoplenty.common.world.generator.GeneratorWaterside;
|
||||
import biomesoplenty.common.world.generator.GeneratorWeighted;
|
||||
import biomesoplenty.common.world.generator.tree.GeneratorBigTree;
|
||||
import biomesoplenty.common.world.generator.tree.GeneratorTaigaTree;
|
||||
import net.minecraft.block.BlockDoublePlant;
|
||||
import net.minecraft.block.BlockFlower;
|
||||
import net.minecraft.block.BlockPlanks;
|
||||
import net.minecraft.block.BlockTallGrass;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
public class BiomeGenFen extends BOPBiome
|
||||
{
|
||||
|
||||
public BiomeGenFen()
|
||||
{
|
||||
super("fen", new PropsBuilder("Fen").withGuiColour(0xBAC481).withTemperature(0.4F).withRainfall(0.4F));
|
||||
|
||||
// terrain
|
||||
this.terrainSettings.avgHeight(64).heightVariation(8, 15);
|
||||
|
||||
this.topBlock = BOPBlocks.grass.getDefaultState().withProperty(BlockBOPGrass.VARIANT, BlockBOPGrass.BOPGrassType.LOAMY);
|
||||
this.fillerBlock = BOPBlocks.dirt.getDefaultState().withProperty(BlockBOPDirt.VARIANT, BlockBOPDirt.BOPDirtType.LOAMY);
|
||||
|
||||
this.canSpawnInBiome = false;
|
||||
this.canGenerateRivers = false;
|
||||
this.canGenerateVillages = false;
|
||||
|
||||
if (BOPBiomes.gravel_beach.isPresent())
|
||||
{
|
||||
this.beachBiomeLocation = ((BOPBiome)BOPBiomes.gravel_beach.get()).getResourceLocation();
|
||||
}
|
||||
|
||||
this.addWeight(BOPClimates.COLD_SWAMP, 7);
|
||||
|
||||
this.spawnableCreatureList.add(new SpawnListEntry(EntitySnail.class, 8, 1, 2));
|
||||
|
||||
// TODO: this.theBiomeDecorator.bopFeatures.waterSpringsPerChunk = 99;
|
||||
|
||||
// gravel
|
||||
this.addGenerator("gravel", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(4).maxRadius(7).with(Blocks.GRAVEL.getDefaultState()).create());
|
||||
|
||||
// mud
|
||||
this.addGenerator("mud", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(BOPBlocks.mud.getDefaultState()).create());
|
||||
|
||||
// trees and logs
|
||||
GeneratorWeighted treeGenerator = new GeneratorWeighted(9);
|
||||
this.addGenerator("trees", GeneratorStage.TREE, treeGenerator);
|
||||
treeGenerator.add("dark_oak_taiga", 5, (new GeneratorTaigaTree.Builder()).log(BlockPlanks.EnumType.DARK_OAK).maxHeight(14).leaves(BlockPlanks.EnumType.DARK_OAK).create());
|
||||
treeGenerator.add("dying", 10, (new GeneratorTaigaTree.Builder()).log(BlockPlanks.EnumType.DARK_OAK).maxHeight(14).leaves(BOPTrees.DEAD).create());
|
||||
treeGenerator.add("dead", 1, (new GeneratorBigTree.Builder()).log(BOPWoods.DEAD).leaves(Blocks.AIR.getDefaultState()).maxHeight(14).create());
|
||||
|
||||
// grasses
|
||||
GeneratorWeighted grassGenerator = new GeneratorWeighted(2.5F);
|
||||
this.addGenerator("grass", GeneratorStage.GRASS, grassGenerator);
|
||||
grassGenerator.add("shortgrass", 4, (new GeneratorGrass.Builder()).with(BOPPlants.SHORTGRASS).create());
|
||||
grassGenerator.add("mediumgrass", 2, (new GeneratorGrass.Builder()).with(BOPPlants.MEDIUMGRASS).create());
|
||||
grassGenerator.add("dampgrass", 2, (new GeneratorGrass.Builder()).with(BOPPlants.DAMPGRASS).create());
|
||||
grassGenerator.add("tallgrass", 2, (new GeneratorGrass.Builder()).with(BlockTallGrass.EnumType.GRASS).create());
|
||||
grassGenerator.add("doublegrass", 1, (new GeneratorDoubleFlora.Builder()).with(BlockDoublePlant.EnumPlantType.GRASS).create());
|
||||
|
||||
// flowers
|
||||
GeneratorWeighted flowerGenerator = new GeneratorWeighted(0.5F);
|
||||
this.addGenerator("flowers", GeneratorStage.GRASS, flowerGenerator);
|
||||
flowerGenerator.add("poppy", 1, (new GeneratorFlora.Builder()).with(BlockFlower.EnumFlowerType.POPPY).create());
|
||||
|
||||
// other plants
|
||||
this.addGenerator("cattail", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(3.0F).with(BOPPlants.CATTAIL).create());
|
||||
this.addGenerator("double_cattail", GeneratorStage.FLOWERS,(new GeneratorDoubleFlora.Builder()).amountPerChunk(4.0F).with(BlockBOPDoublePlant.DoublePlantType.TALL_CATTAIL).create());
|
||||
this.addGenerator("river_cane", GeneratorStage.FLOWERS,(new GeneratorColumns.Builder()).amountPerChunk(1.0F).generationAttempts(24).placeOn(BlockQueries.litFertileWaterside).with(BlockBOPPlant.paging.getVariantState(BOPPlants.RIVERCANE)).minHeight(1).maxHeight(3).create());
|
||||
this.addGenerator("koru", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(BOPPlants.KORU).create());
|
||||
this.addGenerator("shrubs", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.3F).with(BOPPlants.SHRUB).create());
|
||||
this.addGenerator("dead_leaf_piles", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(1.0F).with(BOPPlants.DEADLEAFPILE).generationAttempts(64).create());
|
||||
|
||||
// water plants
|
||||
this.addGenerator("water_reeds", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(1.0F).with(BOPPlants.REED).generationAttempts(32).create());
|
||||
this.addGenerator("lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(Blocks.WATERLILY.getDefaultState()).create());
|
||||
this.addGenerator("medium_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BlockBOPLilypad.LilypadType.MEDIUM).create());
|
||||
this.addGenerator("small_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BlockBOPLilypad.LilypadType.SMALL).create());
|
||||
this.addGenerator("tiny_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BlockBOPLilypad.LilypadType.TINY).create());
|
||||
this.addGenerator("algae", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(3.0F).replace(Blocks.WATER).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.ALGAE)).generationAttempts(32).scatterYMethod(ScatterYMethod.AT_GROUND).create());
|
||||
this.addGenerator("flower_lily", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(BlockBOPLilypad.LilypadType.FLOWER).create());
|
||||
|
||||
// shrooms
|
||||
this.addGenerator("flat_mushroom", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(BlockBOPMushroom.MushroomType.FLAT_MUSHROOM).create());
|
||||
this.addGenerator("toadstools", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(BlockBOPMushroom.MushroomType.TOADSTOOL).create());
|
||||
this.addGenerator("portobellos", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(BlockBOPMushroom.MushroomType.PORTOBELLO).create());
|
||||
this.addGenerator("brown_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.4F).with(Blocks.BROWN_MUSHROOM.getDefaultState()).create());
|
||||
this.addGenerator("red_mushrooms", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.4F).with(Blocks.RED_MUSHROOM.getDefaultState()).create());
|
||||
|
||||
// gem
|
||||
this.addGenerator("malachite", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).with(BOPGems.MALACHITE).create());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applySettings(IBOPWorldSettings settings)
|
||||
{
|
||||
if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("malachite");}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.SOILS)) {this.topBlock = Blocks.GRASS.getDefaultState(); this.fillerBlock = Blocks.DIRT.getDefaultState();}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.MUSHROOMS)) {this.removeGenerator("toadstools"); this.removeGenerator("flat_mushroom"); this.removeGenerator("blue_milk_caps"); this.removeGenerator("portobellos");}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.WATER_PLANTS)) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily"); this.removeGenerator("flower_lily");}
|
||||
|
||||
GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees");
|
||||
if (!settings.isEnabled(GeneratorType.TREES)) {this.removeGenerator("trees");
|
||||
|
||||
GeneratorWeighted treeGenerator = new GeneratorWeighted(9);
|
||||
this.addGenerator("trees", GeneratorStage.TREE, treeGenerator);
|
||||
treeGenerator.add("dark_oak_taiga", 5, (new GeneratorTaigaTree.Builder()).log(BlockPlanks.EnumType.DARK_OAK).maxHeight(14).leaves(BlockPlanks.EnumType.DARK_OAK).create());
|
||||
treeGenerator.add("dying", 10, (new GeneratorTaigaTree.Builder()).log(BlockPlanks.EnumType.DARK_OAK).maxHeight(14).leaves(BlockPlanks.EnumType.DARK_OAK).create());
|
||||
treeGenerator.add("dead", 1, (new GeneratorBigTree.Builder()).log(BlockPlanks.EnumType.DARK_OAK).leaves(Blocks.AIR.getDefaultState()).maxHeight(14).create());
|
||||
}
|
||||
|
||||
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
|
||||
if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getGrassColorAtPos(BlockPos pos)
|
||||
{
|
||||
return 0xBAC481;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFoliageColorAtPos(BlockPos pos)
|
||||
{
|
||||
return 0xA7C166;
|
||||
}
|
||||
|
||||
/* TODO
|
||||
@Override
|
||||
public int getFogColour(int x, int y, int z)
|
||||
{
|
||||
return 12638463;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getFogDensity(int x, int y, int z)
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
return 0.8F;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
}
|
|
@ -1,87 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2015-2016, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
|
||||
package biomesoplenty.common.biome.overworld;
|
||||
|
||||
import biomesoplenty.api.config.IBOPWorldSettings;
|
||||
import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType;
|
||||
import biomesoplenty.api.enums.BOPClimates;
|
||||
import biomesoplenty.api.generation.GeneratorStage;
|
||||
import biomesoplenty.common.entities.EntityButterfly;
|
||||
import biomesoplenty.common.enums.BOPGems;
|
||||
import biomesoplenty.common.enums.BOPPlants;
|
||||
import biomesoplenty.common.world.generator.GeneratorFlora;
|
||||
import biomesoplenty.common.world.generator.GeneratorGrass;
|
||||
import biomesoplenty.common.world.generator.GeneratorOreSingle;
|
||||
import biomesoplenty.common.world.generator.GeneratorWeighted;
|
||||
import net.minecraft.block.BlockFlower.EnumFlowerType;
|
||||
import net.minecraft.block.BlockTallGrass;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
public class BiomeGenFlowerField extends BOPBiome
|
||||
{
|
||||
public BiomeGenFlowerField()
|
||||
{
|
||||
super("flower_field", new PropsBuilder("Flower Field").withGuiColour(4044093).withTemperature(0.6F).withRainfall(0.7F));
|
||||
|
||||
// terrain
|
||||
this.terrainSettings.avgHeight(64).heightVariation(4, 12);
|
||||
|
||||
this.addWeight(BOPClimates.WARM_TEMPERATE, 2);
|
||||
|
||||
this.canGenerateVillages = false;
|
||||
|
||||
this.spawnableCreatureList.add(new SpawnListEntry(EntityButterfly.class, 6, 2, 4));
|
||||
|
||||
// flowers
|
||||
GeneratorWeighted flowerGenerator = new GeneratorWeighted(50);
|
||||
this.addGenerator("flowers", GeneratorStage.GRASS, flowerGenerator);
|
||||
flowerGenerator.add("pink_tulip", 2, (new GeneratorFlora.Builder().with(EnumFlowerType.PINK_TULIP).create()));
|
||||
flowerGenerator.add("white_tulip", 5, (new GeneratorFlora.Builder().with(EnumFlowerType.WHITE_TULIP).create()));
|
||||
flowerGenerator.add("orange_tulip", 7, (new GeneratorFlora.Builder().with(EnumFlowerType.ORANGE_TULIP).create()));
|
||||
flowerGenerator.add("red_tulip", 10, (new GeneratorFlora.Builder().with(EnumFlowerType.RED_TULIP).create()));
|
||||
|
||||
// grasses
|
||||
GeneratorWeighted grassGenerator = new GeneratorWeighted(15.0F);
|
||||
this.addGenerator("grass", GeneratorStage.GRASS, grassGenerator);
|
||||
grassGenerator.add("shortgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.SHORTGRASS).create());
|
||||
grassGenerator.add("mediumgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.MEDIUMGRASS).create());
|
||||
grassGenerator.add("wheatgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.WHEATGRASS).create());
|
||||
grassGenerator.add("dampgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.DAMPGRASS).create());
|
||||
grassGenerator.add("tallgrass", 2, (new GeneratorGrass.Builder()).with(BlockTallGrass.EnumType.GRASS).create());
|
||||
|
||||
// gem
|
||||
this.addGenerator("peridot", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).with(BOPGems.PERIDOT).create());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applySettings(IBOPWorldSettings settings)
|
||||
{
|
||||
if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("peridot");}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");}
|
||||
|
||||
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
|
||||
if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getGrassColorAtPos(BlockPos pos)
|
||||
{
|
||||
return 7390273;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFoliageColorAtPos(BlockPos pos)
|
||||
{
|
||||
return 7390273;
|
||||
}
|
||||
}
|
|
@ -1,141 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2015-2016, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
|
||||
package biomesoplenty.common.biome.overworld;
|
||||
|
||||
import biomesoplenty.api.block.BOPBlocks;
|
||||
import biomesoplenty.api.block.IBlockPosQuery;
|
||||
import biomesoplenty.api.config.IBOPWorldSettings;
|
||||
import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType;
|
||||
import biomesoplenty.api.generation.GeneratorStage;
|
||||
import biomesoplenty.common.block.BlockBOPGrass;
|
||||
import biomesoplenty.common.entities.EntityButterfly;
|
||||
import biomesoplenty.common.entities.EntitySnail;
|
||||
import biomesoplenty.common.enums.BOPFlowers;
|
||||
import biomesoplenty.common.enums.BOPGems;
|
||||
import biomesoplenty.common.enums.BOPPlants;
|
||||
import biomesoplenty.common.enums.BOPTrees;
|
||||
import biomesoplenty.common.util.block.BlockQuery;
|
||||
import biomesoplenty.common.world.generator.GeneratorBigFlower;
|
||||
import biomesoplenty.common.world.generator.GeneratorDoubleFlora;
|
||||
import biomesoplenty.common.world.generator.GeneratorFlora;
|
||||
import biomesoplenty.common.world.generator.GeneratorGrass;
|
||||
import biomesoplenty.common.world.generator.GeneratorOreSingle;
|
||||
import biomesoplenty.common.world.generator.GeneratorSplatter;
|
||||
import biomesoplenty.common.world.generator.GeneratorWeighted;
|
||||
import biomesoplenty.common.world.generator.tree.GeneratorBush;
|
||||
import net.minecraft.block.BlockDoublePlant;
|
||||
import net.minecraft.block.BlockFlower;
|
||||
import net.minecraft.block.BlockFlower.EnumFlowerType;
|
||||
import net.minecraft.block.BlockTallGrass;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
public class BiomeGenFlowerIsland extends BOPBiome
|
||||
{
|
||||
|
||||
public BiomeGenFlowerIsland()
|
||||
{
|
||||
super("flower_island", new PropsBuilder("Flower Island").withGuiColour(0x74D374).withTemperature(0.6F).withRainfall(0.8F));
|
||||
|
||||
// terrain
|
||||
this.terrainSettings.avgHeight(70).heightVariation(10, 15).octaves(0, 0, 1, 1, 2, 2);
|
||||
|
||||
this.topBlock = BOPBlocks.grass.getDefaultState().withProperty(BlockBOPGrass.VARIANT, BlockBOPGrass.BOPGrassType.DAISY);
|
||||
|
||||
this.canSpawnInBiome = false;
|
||||
this.canGenerateVillages = false;
|
||||
this.canGenerateRivers = false;
|
||||
|
||||
clearWeights();
|
||||
|
||||
this.spawnableMonsterList.clear();
|
||||
this.spawnableCreatureList.clear();
|
||||
this.spawnableCreatureList.add(new SpawnListEntry(EntitySnail.class, 6, 1, 2));
|
||||
this.spawnableCreatureList.add(new SpawnListEntry(EntityButterfly.class, 6, 2, 4));
|
||||
// TODO: implement rosester? this.spawnableCreatureList.add(new SpawnListEntry(EntityRosester.class, 10, 4, 4));
|
||||
|
||||
// regular grass
|
||||
IBlockPosQuery emptyGrass = BlockQuery.buildAnd().withAirAbove().states(this.topBlock).create();
|
||||
this.addGenerator("grass_splatter", GeneratorStage.SAND, (new GeneratorSplatter.Builder()).amountPerChunk(6.0F).replace(emptyGrass).with(Blocks.GRASS.getDefaultState()).create());
|
||||
|
||||
// trees
|
||||
GeneratorWeighted treeGenerator = new GeneratorWeighted(1);
|
||||
this.addGenerator("trees", GeneratorStage.TREE, treeGenerator);
|
||||
treeGenerator.add("red_big_flowers", 1, (new GeneratorBigFlower.Builder()).flowerType(GeneratorBigFlower.BigFlowerType.RED).create());
|
||||
treeGenerator.add("yellow_big_flowers", 1, (new GeneratorBigFlower.Builder()).flowerType(GeneratorBigFlower.BigFlowerType.YELLOW).create());
|
||||
treeGenerator.add("oak_bush", 2, (new GeneratorBush.Builder()).maxHeight(2).altLeaves(BOPTrees.FLOWERING).create());
|
||||
|
||||
// grasses
|
||||
GeneratorWeighted grassGenerator = new GeneratorWeighted(0.75F);
|
||||
this.addGenerator("grass", GeneratorStage.GRASS, grassGenerator);
|
||||
grassGenerator.add("tallgrass", 4, (new GeneratorGrass.Builder()).with(BlockTallGrass.EnumType.GRASS).create());
|
||||
grassGenerator.add("shortgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.SHORTGRASS).create());
|
||||
grassGenerator.add("mediumgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.MEDIUMGRASS).create());
|
||||
grassGenerator.add("dampgrass", 2, (new GeneratorGrass.Builder()).with(BOPPlants.DAMPGRASS).create());
|
||||
|
||||
// other plants
|
||||
this.addGenerator("clover_patches", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(BOPPlants.CLOVERPATCH).create());
|
||||
this.addGenerator("sprouts", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BOPPlants.SPROUT).create());
|
||||
// flowers
|
||||
GeneratorWeighted flowerGenerator = new GeneratorWeighted(4.0F);
|
||||
this.addGenerator("flowers", GeneratorStage.GRASS, flowerGenerator);
|
||||
flowerGenerator.add("dandelion", 3, (new GeneratorFlora.Builder().with(BlockFlower.EnumFlowerType.DANDELION).create()));
|
||||
flowerGenerator.add("poppy", 5, (new GeneratorFlora.Builder().with(EnumFlowerType.POPPY).create()));
|
||||
flowerGenerator.add("white_anemones", 4, (new GeneratorFlora.Builder().with(BOPFlowers.WHITE_ANEMONE).create()));
|
||||
flowerGenerator.add("blue_hydrangeas", 2, (new GeneratorFlora.Builder().with(BOPFlowers.BLUE_HYDRANGEA).create()));
|
||||
flowerGenerator.add("sunflowers", 1, (new GeneratorDoubleFlora.Builder()).with(BlockDoublePlant.EnumPlantType.SUNFLOWER).create());
|
||||
flowerGenerator.add("oxeye_daisy", 2, (new GeneratorFlora.Builder().with(BlockFlower.EnumFlowerType.OXEYE_DAISY).create()));
|
||||
flowerGenerator.add("rose", 2, (new GeneratorDoubleFlora.Builder().with(BlockDoublePlant.EnumPlantType.ROSE).create()));
|
||||
|
||||
// gem
|
||||
this.addGenerator("peridot", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).with(BOPGems.PERIDOT).create());
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applySettings(IBOPWorldSettings settings)
|
||||
{
|
||||
if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("peridot");}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.WATER_PLANTS)) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");}
|
||||
|
||||
GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees");
|
||||
if (!settings.isEnabled(GeneratorType.TREES)) {this.removeGenerator("trees");
|
||||
|
||||
GeneratorWeighted treeGenerator = new GeneratorWeighted(1);
|
||||
this.addGenerator("trees", GeneratorStage.TREE, treeGenerator);
|
||||
treeGenerator.add("red_big_flowers", 1, (new GeneratorBigFlower.Builder()).flowerType(GeneratorBigFlower.BigFlowerType.RED).create());
|
||||
treeGenerator.add("yellow_big_flowers", 1, (new GeneratorBigFlower.Builder()).flowerType(GeneratorBigFlower.BigFlowerType.YELLOW).create());
|
||||
treeGenerator.add("oak_bush", 2, (new GeneratorBush.Builder()).maxHeight(2).create());
|
||||
}
|
||||
|
||||
GeneratorWeighted flowerGen = (GeneratorWeighted)this.getGenerator("flowers");
|
||||
if (!settings.isEnabled(GeneratorType.FLOWERS)) {flowerGen.removeGenerator("bluebells"); flowerGen.removeGenerator("clover"); flowerGen.removeGenerator("swampflower"); flowerGen.removeGenerator("deathbloom"); flowerGen.removeGenerator("glowflower"); flowerGen.removeGenerator("blue_hydrangeas"); flowerGen.removeGenerator("pink_daffodil"); flowerGen.removeGenerator("white_anemones"); flowerGen.removeGenerator("orange_cosmos"); flowerGen.removeGenerator("wildflowers"); flowerGen.removeGenerator("violet"); flowerGen.removeGenerator("hibiscus"); flowerGen.removeGenerator("goldenrods"); flowerGen.removeGenerator("icy_irises"); flowerGen.removeGenerator("wilted_lily"); flowerGen.removeGenerator("lily_of_the_valley"); flowerGen.removeGenerator("bromeliad"); this.removeGenerator("bromeliad");}
|
||||
|
||||
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
|
||||
if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getGrassColorAtPos(BlockPos pos)
|
||||
{
|
||||
return 0x74D374;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFoliageColorAtPos(BlockPos pos)
|
||||
{
|
||||
return 0x66E266;
|
||||
}
|
||||
}
|
|
@ -1,53 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2015-2016, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
|
||||
package biomesoplenty.common.biome.overworld;
|
||||
|
||||
import biomesoplenty.api.block.BOPBlocks;
|
||||
import biomesoplenty.api.config.IBOPWorldSettings;
|
||||
import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType;
|
||||
import biomesoplenty.api.generation.GeneratorStage;
|
||||
import biomesoplenty.common.enums.BOPGems;
|
||||
import biomesoplenty.common.world.generator.GeneratorOreSingle;
|
||||
import net.minecraft.init.Blocks;
|
||||
|
||||
public class BiomeGenGlacier extends BOPBiome
|
||||
{
|
||||
|
||||
public BiomeGenGlacier()
|
||||
{
|
||||
super("glacier", new PropsBuilder("Glacier").withTemperature(-0.5F).withRainfall(0.2F).withGuiColour(11582425));
|
||||
|
||||
// terrain
|
||||
this.terrainSettings.avgHeight(88).heightVariation(8, 10).octaves(0, 1, 1, 3, 1, 0);
|
||||
|
||||
this.topBlock = Blocks.ICE.getDefaultState();
|
||||
this.fillerBlock = BOPBlocks.hard_ice.getDefaultState();
|
||||
|
||||
this.avgDirtDepth = 16;
|
||||
|
||||
this.canSpawnInBiome = false;
|
||||
this.canGenerateVillages = false;
|
||||
this.canGenerateRivers = false;
|
||||
|
||||
this.spawnableCreatureList.clear();
|
||||
|
||||
clearWeights();
|
||||
|
||||
// gem
|
||||
this.addGenerator("tanzanite", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).with(BOPGems.TANZANITE).create());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applySettings(IBOPWorldSettings settings)
|
||||
{
|
||||
if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("malachite");}
|
||||
}
|
||||
|
||||
}
|
|
@ -1,121 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2015-2016, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
|
||||
package biomesoplenty.common.biome.overworld;
|
||||
|
||||
import biomesoplenty.api.biome.BOPBiomes;
|
||||
import biomesoplenty.api.block.BlockQueries;
|
||||
import biomesoplenty.api.config.IBOPWorldSettings;
|
||||
import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType;
|
||||
import biomesoplenty.api.enums.BOPClimates;
|
||||
import biomesoplenty.api.generation.GeneratorStage;
|
||||
import biomesoplenty.common.block.BlockBOPDoublePlant;
|
||||
import biomesoplenty.common.block.BlockBOPMushroom;
|
||||
import biomesoplenty.common.block.BlockBOPPlant;
|
||||
import biomesoplenty.common.entities.EntityButterfly;
|
||||
import biomesoplenty.common.enums.BOPGems;
|
||||
import biomesoplenty.common.enums.BOPPlants;
|
||||
import biomesoplenty.common.world.generator.GeneratorColumns;
|
||||
import biomesoplenty.common.world.generator.GeneratorDoubleFlora;
|
||||
import biomesoplenty.common.world.generator.GeneratorFlora;
|
||||
import biomesoplenty.common.world.generator.GeneratorGrass;
|
||||
import biomesoplenty.common.world.generator.GeneratorLakes;
|
||||
import biomesoplenty.common.world.generator.GeneratorOreSingle;
|
||||
import biomesoplenty.common.world.generator.GeneratorWaterside;
|
||||
import biomesoplenty.common.world.generator.GeneratorWeighted;
|
||||
import net.minecraft.block.BlockTallGrass;
|
||||
import net.minecraft.entity.passive.EntityHorse;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
public class BiomeGenGrassland extends BOPBiome {
|
||||
|
||||
public BiomeGenGrassland() {
|
||||
|
||||
super("grassland", new PropsBuilder("Grassland").withGuiColour(0x7FDB7D).withTemperature(0.6F).withRainfall(0.7F));
|
||||
|
||||
// terrain
|
||||
this.terrainSettings.avgHeight(64).heightVariation(6, 25).octaves(0, 1, 2, 2, 1, 0).sidewaysNoise(0.1D);
|
||||
|
||||
this.addWeight(BOPClimates.COOL_TEMPERATE, 7);
|
||||
this.addWeight(BOPClimates.WET_TEMPERATE, 3);
|
||||
|
||||
if (BOPBiomes.gravel_beach.isPresent())
|
||||
{
|
||||
this.beachBiomeLocation = ((BOPBiome)BOPBiomes.gravel_beach.get()).getResourceLocation();
|
||||
}
|
||||
|
||||
this.canGenerateVillages = true;
|
||||
|
||||
this.spawnableCreatureList.add(new SpawnListEntry(EntityHorse.class, 5, 2, 6));
|
||||
this.spawnableCreatureList.add(new SpawnListEntry(EntityButterfly.class, 6, 2, 4));
|
||||
|
||||
// lakes
|
||||
this.addGenerator("lakes", GeneratorStage.SAND, (new GeneratorLakes.Builder()).amountPerChunk(0.2F).waterLakeForBiome(this).create());
|
||||
|
||||
// sand and gravel
|
||||
this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(Blocks.SAND.getDefaultState()).create());
|
||||
this.addGenerator("gravel", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(4).maxRadius(7).with(Blocks.GRAVEL.getDefaultState()).create());
|
||||
|
||||
// other plants
|
||||
this.addGenerator("river_cane", GeneratorStage.FLOWERS,(new GeneratorColumns.Builder()).amountPerChunk(1.0F).generationAttempts(24).placeOn(BlockQueries.litFertileWaterside).with(BlockBOPPlant.paging.getVariantState(BOPPlants.RIVERCANE)).minHeight(1).maxHeight(3).create());
|
||||
this.addGenerator("sugar_cane", GeneratorStage.FLOWERS,(new GeneratorColumns.Builder()).amountPerChunk(4.0F).generationAttempts(24).placeOn(BlockQueries.litFertileWaterside).with(Blocks.REEDS.getDefaultState()).minHeight(1).maxHeight(3).create());
|
||||
this.addGenerator("flax", GeneratorStage.FLOWERS,(new GeneratorDoubleFlora.Builder()).amountPerChunk(0.1F).with(BlockBOPDoublePlant.DoublePlantType.FLAX).generationAttempts(6).create());
|
||||
|
||||
// water plants
|
||||
this.addGenerator("water_reeds", GeneratorStage.LILYPAD,(new GeneratorFlora.Builder()).amountPerChunk(0.3F).with(BOPPlants.REED).generationAttempts(32).create());
|
||||
|
||||
// shrooms
|
||||
this.addGenerator("portobellos", GeneratorStage.SHROOM,(new GeneratorFlora.Builder()).amountPerChunk(0.3F).with(BlockBOPMushroom.MushroomType.PORTOBELLO).create());
|
||||
|
||||
// grasses
|
||||
GeneratorWeighted grassGenerator = new GeneratorWeighted(0.6F);
|
||||
this.addGenerator("grass", GeneratorStage.GRASS, grassGenerator);
|
||||
grassGenerator.add("shortgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.SHORTGRASS).create());
|
||||
grassGenerator.add("mediumgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.MEDIUMGRASS).create());
|
||||
grassGenerator.add("wheatgrass", 2, (new GeneratorGrass.Builder()).with(BOPPlants.WHEATGRASS).create());
|
||||
grassGenerator.add("dampgrass", 2, (new GeneratorGrass.Builder()).with(BOPPlants.DAMPGRASS).create());
|
||||
grassGenerator.add("tallgrass", 4, (new GeneratorGrass.Builder()).with(BlockTallGrass.EnumType.GRASS).create());
|
||||
|
||||
// gem
|
||||
this.addGenerator("peridot", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).with(BOPGems.PERIDOT).create());
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applySettings(IBOPWorldSettings settings)
|
||||
{
|
||||
if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("peridot");}
|
||||
if (!settings.isEnabled(GeneratorType.FLAX)) {this.removeGenerator("flax");}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.MUSHROOMS)) {this.removeGenerator("toadstools"); this.removeGenerator("flat_mushroom"); this.removeGenerator("blue_milk_caps"); this.removeGenerator("portobellos");}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.WATER_PLANTS)) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");}
|
||||
|
||||
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
|
||||
if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getGrassColorAtPos(BlockPos pos)
|
||||
{
|
||||
return 0x7FDB7D;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFoliageColorAtPos(BlockPos pos)
|
||||
{
|
||||
return 0x7FDB7D;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,37 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2015-2016, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
|
||||
package biomesoplenty.common.biome.overworld;
|
||||
|
||||
import net.minecraft.init.Blocks;
|
||||
|
||||
public class BiomeGenGravelBeach extends BOPBiome
|
||||
{
|
||||
public BiomeGenGravelBeach()
|
||||
{
|
||||
super("gravel_beach", new PropsBuilder("Gravel Beach").withGuiColour(0x908884));
|
||||
|
||||
// terrain
|
||||
this.terrainSettings.avgHeight(64).heightVariation(3, 4);
|
||||
|
||||
this.canSpawnInBiome = false;
|
||||
this.canGenerateVillages = false;
|
||||
|
||||
this.spawnableCreatureList.clear();
|
||||
|
||||
this.theBiomeDecorator.treesPerChunk = -999;
|
||||
this.theBiomeDecorator.deadBushPerChunk = 0;
|
||||
this.theBiomeDecorator.reedsPerChunk = 0;
|
||||
this.theBiomeDecorator.cactiPerChunk = 0;
|
||||
|
||||
clearWeights();
|
||||
|
||||
this.topBlock = Blocks.GRAVEL.getDefaultState();
|
||||
this.fillerBlock = Blocks.GRAVEL.getDefaultState();
|
||||
}
|
||||
}
|
|
@ -1,132 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2015-2016, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
|
||||
package biomesoplenty.common.biome.overworld;
|
||||
|
||||
import biomesoplenty.api.config.IBOPWorldSettings;
|
||||
import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType;
|
||||
import biomesoplenty.api.enums.BOPClimates;
|
||||
import biomesoplenty.api.generation.GeneratorStage;
|
||||
import biomesoplenty.common.entities.EntityButterfly;
|
||||
import biomesoplenty.common.enums.BOPFlowers;
|
||||
import biomesoplenty.common.enums.BOPGems;
|
||||
import biomesoplenty.common.enums.BOPPlants;
|
||||
import biomesoplenty.common.enums.BOPTrees;
|
||||
import biomesoplenty.common.world.generator.GeneratorDoubleFlora;
|
||||
import biomesoplenty.common.world.generator.GeneratorFlora;
|
||||
import biomesoplenty.common.world.generator.GeneratorGrass;
|
||||
import biomesoplenty.common.world.generator.GeneratorOreSingle;
|
||||
import biomesoplenty.common.world.generator.GeneratorWeighted;
|
||||
import biomesoplenty.common.world.generator.tree.GeneratorBush;
|
||||
import biomesoplenty.common.world.generator.tree.GeneratorProfileTree;
|
||||
import net.minecraft.block.BlockDoublePlant;
|
||||
import net.minecraft.block.BlockFlower;
|
||||
import net.minecraft.block.BlockPlanks;
|
||||
import net.minecraft.block.BlockTallGrass;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
public class BiomeGenGrove extends BOPBiome
|
||||
{
|
||||
|
||||
public BiomeGenGrove()
|
||||
{
|
||||
super("grove", new PropsBuilder("Grove").withGuiColour(0x517F51).withTemperature(0.55F).withRainfall(0.8F));
|
||||
|
||||
// terrain
|
||||
this.terrainSettings.avgHeight(66).heightVariation(8, 20).octaves(0, 1, 2, 2, 1, 0).sidewaysNoise(0.1D);
|
||||
|
||||
this.addWeight(BOPClimates.COOL_TEMPERATE, 7);
|
||||
|
||||
this.canGenerateVillages = true;
|
||||
|
||||
this.spawnableCreatureList.add(new SpawnListEntry(EntityButterfly.class, 6, 2, 4));
|
||||
|
||||
// other plants
|
||||
this.addGenerator("sprouts", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(BOPPlants.SPROUT).create());
|
||||
this.addGenerator("berry_bushes", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(BOPPlants.BERRYBUSH).create());
|
||||
this.addGenerator("bushes", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.4F).with(BOPPlants.BUSH).create());
|
||||
this.addGenerator("shrubs", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(BOPPlants.SHRUB).create());
|
||||
this.addGenerator("clover_patches", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.6F).with(BOPPlants.CLOVERPATCH).create());
|
||||
this.addGenerator("leaf_piles", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BOPPlants.LEAFPILE).create());
|
||||
|
||||
// trees
|
||||
GeneratorWeighted treeGenerator = new GeneratorWeighted(3);
|
||||
this.addGenerator("trees", GeneratorStage.TREE, treeGenerator);
|
||||
treeGenerator.add("dark_poplar", 1, (new GeneratorProfileTree.Builder()).minHeight(6).maxHeight(14).log(BlockPlanks.EnumType.DARK_OAK).leaves(BlockPlanks.EnumType.DARK_OAK).profile(GeneratorProfileTree.TreeProfile.POPLAR).create());
|
||||
treeGenerator.add("poplar", 1, (new GeneratorProfileTree.Builder()).minHeight(8).maxHeight(18).log(BlockPlanks.EnumType.BIRCH).leaves(BlockPlanks.EnumType.BIRCH).profile(GeneratorProfileTree.TreeProfile.POPLAR).create());
|
||||
treeGenerator.add("bush", 1, (new GeneratorBush.Builder()).maxHeight(2).altLeaves(BOPTrees.FLOWERING).create());
|
||||
|
||||
|
||||
// flowers
|
||||
GeneratorWeighted flowerGenerator = new GeneratorWeighted(3.0F);
|
||||
this.addGenerator("flowers", GeneratorStage.GRASS, flowerGenerator);
|
||||
flowerGenerator.add("clover", 4, (new GeneratorFlora.Builder().with(BOPFlowers.CLOVER).create()));
|
||||
flowerGenerator.add("white_anemones", 2, (new GeneratorFlora.Builder().with(BOPFlowers.WHITE_ANEMONE).create()));
|
||||
flowerGenerator.add("paeonias", 1, (new GeneratorDoubleFlora.Builder()).with(BlockDoublePlant.EnumPlantType.PAEONIA).create());
|
||||
flowerGenerator.add("oxeye_daisy", 1, (new GeneratorFlora.Builder().with(BlockFlower.EnumFlowerType.OXEYE_DAISY).create()));
|
||||
flowerGenerator.add("dandelion", 1, (new GeneratorFlora.Builder().with(BlockFlower.EnumFlowerType.DANDELION).create()));
|
||||
flowerGenerator.add("poppy", 1, (new GeneratorFlora.Builder().with(BlockFlower.EnumFlowerType.POPPY).create()));
|
||||
|
||||
// grasses
|
||||
GeneratorWeighted grassGenerator = new GeneratorWeighted(9.0F);
|
||||
this.addGenerator("grass", GeneratorStage.GRASS, grassGenerator);
|
||||
grassGenerator.add("shortgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.SHORTGRASS).create());
|
||||
grassGenerator.add("mediumgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.MEDIUMGRASS).create());
|
||||
grassGenerator.add("wheatgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.WHEATGRASS).create());
|
||||
grassGenerator.add("dampgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.DAMPGRASS).create());
|
||||
grassGenerator.add("tallgrass", 1, (new GeneratorGrass.Builder()).with(BlockTallGrass.EnumType.GRASS).create());
|
||||
|
||||
// gem
|
||||
this.addGenerator("amber", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).with(BOPGems.AMBER).create());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applySettings(IBOPWorldSettings settings)
|
||||
{
|
||||
if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("amber");}
|
||||
if (!settings.isEnabled(GeneratorType.BERRY_BUSHES)) {this.removeGenerator("berry_bushes");}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.WATER_PLANTS)) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");}
|
||||
|
||||
GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees");
|
||||
if (!settings.isEnabled(GeneratorType.TREES)) {this.removeGenerator("trees");
|
||||
|
||||
GeneratorWeighted treeGenerator = new GeneratorWeighted(3);
|
||||
this.addGenerator("trees", GeneratorStage.TREE, treeGenerator);
|
||||
treeGenerator.add("dark_poplar", 1, (new GeneratorProfileTree.Builder()).minHeight(6).maxHeight(14).log(BlockPlanks.EnumType.DARK_OAK).leaves(BlockPlanks.EnumType.DARK_OAK).profile(GeneratorProfileTree.TreeProfile.POPLAR).create());
|
||||
treeGenerator.add("poplar", 1, (new GeneratorProfileTree.Builder()).minHeight(8).maxHeight(18).log(BlockPlanks.EnumType.BIRCH).leaves(BlockPlanks.EnumType.BIRCH).profile(GeneratorProfileTree.TreeProfile.POPLAR).create());
|
||||
treeGenerator.add("bush", 1, (new GeneratorBush.Builder()).maxHeight(2).create());
|
||||
}
|
||||
|
||||
GeneratorWeighted flowerGen = (GeneratorWeighted)this.getGenerator("flowers");
|
||||
if (!settings.isEnabled(GeneratorType.FLOWERS)) {flowerGen.removeGenerator("bluebells"); flowerGen.removeGenerator("clover"); flowerGen.removeGenerator("swampflower"); flowerGen.removeGenerator("deathbloom"); flowerGen.removeGenerator("glowflower"); flowerGen.removeGenerator("blue_hydrangeas"); flowerGen.removeGenerator("pink_daffodil"); flowerGen.removeGenerator("white_anemones"); flowerGen.removeGenerator("orange_cosmos"); flowerGen.removeGenerator("wildflowers"); flowerGen.removeGenerator("violet"); flowerGen.removeGenerator("hibiscus"); flowerGen.removeGenerator("goldenrods"); flowerGen.removeGenerator("icy_irises"); flowerGen.removeGenerator("wilted_lily"); flowerGen.removeGenerator("lily_of_the_valley"); flowerGen.removeGenerator("bromeliad"); this.removeGenerator("bromeliad");}
|
||||
|
||||
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
|
||||
if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getGrassColorAtPos(BlockPos pos)
|
||||
{
|
||||
double noise = GRASS_COLOR_NOISE.getValue((double)pos.getX() * 0.0225D, (double)pos.getZ() * 0.0225D);
|
||||
return noise < -0.1D ? 0x517F51 : 0x609E58;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFoliageColorAtPos(BlockPos pos)
|
||||
{
|
||||
double noise = GRASS_COLOR_NOISE.getValue((double)pos.getX() * 0.0225D, (double)pos.getZ() * 0.0225D);
|
||||
return noise < -0.1D ? 0x619961 : 0x75B569;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,151 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2015-2016, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
|
||||
package biomesoplenty.common.biome.overworld;
|
||||
|
||||
import biomesoplenty.api.block.IBlockPosQuery;
|
||||
import biomesoplenty.api.config.IBOPWorldSettings;
|
||||
import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType;
|
||||
import biomesoplenty.api.enums.BOPClimates;
|
||||
import biomesoplenty.api.generation.GeneratorStage;
|
||||
import biomesoplenty.common.enums.BOPFlowers;
|
||||
import biomesoplenty.common.enums.BOPGems;
|
||||
import biomesoplenty.common.enums.BOPPlants;
|
||||
import biomesoplenty.common.enums.BOPTrees;
|
||||
import biomesoplenty.common.enums.BOPWoods;
|
||||
import biomesoplenty.common.util.block.BlockQuery;
|
||||
import biomesoplenty.common.world.generator.GeneratorFlora;
|
||||
import biomesoplenty.common.world.generator.GeneratorGrass;
|
||||
import biomesoplenty.common.world.generator.GeneratorOreSingle;
|
||||
import biomesoplenty.common.world.generator.GeneratorWaterside;
|
||||
import biomesoplenty.common.world.generator.GeneratorWeighted;
|
||||
import biomesoplenty.common.world.generator.tree.GeneratorBasicTree;
|
||||
import biomesoplenty.common.world.generator.tree.GeneratorBigTree;
|
||||
import biomesoplenty.common.world.generator.tree.GeneratorBush;
|
||||
import biomesoplenty.common.world.generator.tree.GeneratorPineTree;
|
||||
import net.minecraft.block.BlockFlower;
|
||||
import net.minecraft.block.BlockPlanks;
|
||||
import net.minecraft.block.BlockTallGrass;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.passive.EntityHorse;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
public class BiomeGenHeathland extends BOPBiome
|
||||
{
|
||||
public BiomeGenHeathland()
|
||||
{
|
||||
super("heathland", new PropsBuilder("Heathland").withGuiColour(0xADAE68).withTemperature(0.75F).withRainfall(0.2F));
|
||||
|
||||
// terrain
|
||||
this.terrainSettings.avgHeight(75).heightVariation(7, 10).octaves(0, 1, 2, 2, 1, 0).sidewaysNoise(0.1D);
|
||||
|
||||
this.addWeight(BOPClimates.DRY_TEMPERATE, 5);
|
||||
|
||||
this.canGenerateVillages = true;
|
||||
|
||||
// TODO: why is there SO many horses?
|
||||
this.spawnableCreatureList.add(new SpawnListEntry(EntityHorse.class, 1, 2, 6));
|
||||
|
||||
// sand and gravel
|
||||
this.addGenerator("sand", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(3).maxRadius(7).with(Blocks.SAND.getDefaultState()).create());
|
||||
this.addGenerator("gravel", GeneratorStage.SAND_PASS2, (new GeneratorWaterside.Builder()).amountPerChunk(4).maxRadius(7).with(Blocks.GRAVEL.getDefaultState()).create());
|
||||
|
||||
// flowers
|
||||
GeneratorWeighted flowerGenerator = new GeneratorWeighted(3.0F);
|
||||
this.addGenerator("flowers", GeneratorStage.GRASS, flowerGenerator);
|
||||
flowerGenerator.add("wildflower", 7, (new GeneratorFlora.Builder()).with(BOPFlowers.WILDFLOWER).create());
|
||||
flowerGenerator.add("dandelion", 1, (new GeneratorFlora.Builder().with(BlockFlower.EnumFlowerType.DANDELION).create()));
|
||||
flowerGenerator.add("allium", 4, (new GeneratorFlora.Builder().with(BlockFlower.EnumFlowerType.ALLIUM).create()));
|
||||
flowerGenerator.add("poppy", 1, (new GeneratorFlora.Builder().with(BlockFlower.EnumFlowerType.POPPY).create()));
|
||||
|
||||
// grasses
|
||||
GeneratorWeighted grassGenerator = new GeneratorWeighted(6.0F);
|
||||
this.addGenerator("grass", GeneratorStage.GRASS, grassGenerator);
|
||||
grassGenerator.add("tallgrass", 2, (new GeneratorGrass.Builder()).with(BlockTallGrass.EnumType.GRASS).create());
|
||||
grassGenerator.add("shortgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.SHORTGRASS).create());
|
||||
grassGenerator.add("mediumgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.MEDIUMGRASS).create());
|
||||
grassGenerator.add("wheatgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.WHEATGRASS).create());
|
||||
grassGenerator.add("dampgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.DAMPGRASS).create());
|
||||
|
||||
// trees
|
||||
IBlockPosQuery suitableTreePosition = BlockQuery.buildAnd().withAltitudeBetween(77, 90).materials(Material.GROUND, Material.GRASS).create();
|
||||
GeneratorWeighted treeGenerator = new GeneratorWeighted(12);
|
||||
this.addGenerator("trees", GeneratorStage.TREE, treeGenerator);
|
||||
treeGenerator.add("red_bush", 7, (new GeneratorFlora.Builder()).placeOn(this.topBlock).replace(Material.AIR).withNonDecayingLeaf(BOPTrees.MAPLE).create());
|
||||
treeGenerator.add("small_bush", 11, (new GeneratorFlora.Builder()).placeOn(this.topBlock).replace(Material.AIR).withNonDecayingLeaf(BlockPlanks.EnumType.OAK).create());
|
||||
treeGenerator.add("oak_bush", 3, (new GeneratorBush.Builder()).maxHeight(2).create());
|
||||
treeGenerator.add("oak", 2, (new GeneratorBasicTree.Builder()).minHeight(3).maxHeight(5).create());
|
||||
treeGenerator.add("decaying_tree", 1, (new GeneratorBigTree.Builder()).amountPerChunk(1.0F).minHeight(5).maxHeight(12).foliageHeight(2).create());
|
||||
treeGenerator.add("pine", 15, (new GeneratorPineTree.Builder()).minHeight(6).maxHeight(18).log(BOPWoods.PINE).leaves(BOPTrees.PINE).placeOn(suitableTreePosition).create());
|
||||
|
||||
// other plants
|
||||
this.addGenerator("thorns", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.4F).with(BOPPlants.THORN).create());
|
||||
this.addGenerator("bushes", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(4.5F).with(BOPPlants.BUSH).create());
|
||||
this.addGenerator("shrubs", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.2F).with(BOPPlants.SHRUB).create());
|
||||
this.addGenerator("leaf_piles", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(1.0F).with(BOPPlants.LEAFPILE).create());
|
||||
this.addGenerator("dead_leaf_piles", GeneratorStage.FLOWERS,(new GeneratorFlora.Builder()).amountPerChunk(0.5F).with(BOPPlants.DEADLEAFPILE).create());
|
||||
this.addGenerator("water_reeds", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(0.1F).with(BOPPlants.REED).generationAttempts(32).create());
|
||||
this.addGenerator("desertgrass", GeneratorStage.GRASS, (new GeneratorGrass.Builder()).amountPerChunk(6.0F).with(BOPPlants.DESERTGRASS).create());
|
||||
|
||||
// gem
|
||||
this.addGenerator("peridot", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).with(BOPGems.PERIDOT).create());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applySettings(IBOPWorldSettings settings)
|
||||
{
|
||||
if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("peridot");}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.THORNS)) {this.removeGenerator("thorns");}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.SOILS)) {this.topBlock = Blocks.GRASS.getDefaultState(); this.fillerBlock = Blocks.DIRT.getDefaultState();}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.WATER_PLANTS)) {this.removeGenerator("algae"); this.removeGenerator("water_reeds"); this.removeGenerator("medium_lily"); this.removeGenerator("small_lily"); this.removeGenerator("tiny_lily");}
|
||||
|
||||
GeneratorWeighted treeGen = (GeneratorWeighted)this.getGenerator("trees");
|
||||
if (!settings.isEnabled(GeneratorType.TREES)) {this.removeGenerator("trees");
|
||||
|
||||
IBlockPosQuery suitableTreePosition = BlockQuery.buildAnd().withAltitudeBetween(77, 90).materials(Material.GROUND, Material.GRASS).create();
|
||||
GeneratorWeighted treeGenerator = new GeneratorWeighted(12);
|
||||
this.addGenerator("trees", GeneratorStage.TREE, treeGenerator);
|
||||
treeGenerator.add("red_bush", 7, (new GeneratorFlora.Builder()).placeOn(this.topBlock).replace(Material.AIR).withNonDecayingLeaf(BlockPlanks.EnumType.BIRCH).create());
|
||||
treeGenerator.add("small_bush", 11, (new GeneratorFlora.Builder()).placeOn(this.topBlock).replace(Material.AIR).withNonDecayingLeaf(BlockPlanks.EnumType.OAK).create());
|
||||
treeGenerator.add("oak_bush", 3, (new GeneratorBush.Builder()).maxHeight(2).create());
|
||||
treeGenerator.add("oak", 2, (new GeneratorBasicTree.Builder()).minHeight(3).maxHeight(5).create());
|
||||
treeGenerator.add("decaying_tree", 1, (new GeneratorBigTree.Builder()).amountPerChunk(1.0F).minHeight(5).maxHeight(12).foliageHeight(2).create());
|
||||
treeGenerator.add("pine", 15, (new GeneratorPineTree.Builder()).minHeight(6).maxHeight(18).log(BlockPlanks.EnumType.SPRUCE).leaves(BlockPlanks.EnumType.SPRUCE).placeOn(suitableTreePosition).create());
|
||||
}
|
||||
|
||||
GeneratorWeighted flowerGen = (GeneratorWeighted)this.getGenerator("flowers");
|
||||
if (!settings.isEnabled(GeneratorType.FLOWERS)) {flowerGen.removeGenerator("bluebells"); flowerGen.removeGenerator("clover"); flowerGen.removeGenerator("swampflower"); flowerGen.removeGenerator("deathbloom"); flowerGen.removeGenerator("glowflower"); flowerGen.removeGenerator("blue_hydrangeas"); flowerGen.removeGenerator("pink_daffodil"); flowerGen.removeGenerator("white_anemones"); flowerGen.removeGenerator("orange_cosmos"); flowerGen.removeGenerator("wildflowers"); flowerGen.removeGenerator("violet"); flowerGen.removeGenerator("hibiscus"); flowerGen.removeGenerator("goldenrods"); flowerGen.removeGenerator("icy_irises"); flowerGen.removeGenerator("wilted_lily"); flowerGen.removeGenerator("lily_of_the_valley"); flowerGen.removeGenerator("bromeliad"); this.removeGenerator("bromeliad");}
|
||||
|
||||
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
|
||||
if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass"); this.removeGenerator("desertgrass");}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getGrassColorAtPos(BlockPos pos)
|
||||
{
|
||||
double noise = GRASS_COLOR_NOISE.getValue((double)pos.getX() * 0.0225D, (double)pos.getZ() * 0.0225D);
|
||||
return noise < -0.1D ? 0xAD9D68 : 0xADAE68;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getFoliageColorAtPos(BlockPos pos)
|
||||
{
|
||||
double noise = GRASS_COLOR_NOISE.getValue((double)pos.getX() * 0.0225D, (double)pos.getZ() * 0.0225D);
|
||||
return noise < -0.1D ? 0xB6A763 : 0xB6C663;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,70 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2015-2016, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
|
||||
package biomesoplenty.common.biome.overworld;
|
||||
|
||||
import biomesoplenty.api.config.IBOPWorldSettings;
|
||||
import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType;
|
||||
import biomesoplenty.api.enums.BOPClimates;
|
||||
import biomesoplenty.api.generation.GeneratorStage;
|
||||
import biomesoplenty.common.enums.BOPPlants;
|
||||
import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod;
|
||||
import biomesoplenty.common.world.generator.GeneratorBlobs;
|
||||
import biomesoplenty.common.world.generator.GeneratorDoubleFlora;
|
||||
import biomesoplenty.common.world.generator.GeneratorGrass;
|
||||
import biomesoplenty.common.world.generator.GeneratorOreSingle;
|
||||
import biomesoplenty.common.world.generator.GeneratorWeighted;
|
||||
import net.minecraft.block.BlockDoublePlant;
|
||||
import net.minecraft.block.BlockTallGrass;
|
||||
import net.minecraft.init.Blocks;
|
||||
|
||||
public class BiomeGenHighland extends BOPBiome
|
||||
{
|
||||
|
||||
public BiomeGenHighland()
|
||||
{
|
||||
super("highland", new PropsBuilder("Highland").withGuiColour(0x7CAD66).withTemperature(0.55F).withRainfall(0.8F));
|
||||
|
||||
// terrain
|
||||
this.terrainSettings.avgHeight(120).heightVariation(25, 25);
|
||||
|
||||
this.canGenerateRivers = false;
|
||||
this.canGenerateVillages = false;
|
||||
|
||||
this.addWeight(BOPClimates.COOL_TEMPERATE, 7);
|
||||
|
||||
this.beachBiomeLocation = null;
|
||||
|
||||
// boulders
|
||||
this.addGenerator("boulders", GeneratorStage.SAND, (new GeneratorBlobs.Builder()).amountPerChunk(0.5F).placeOn(Blocks.GRASS).with(Blocks.COBBLESTONE.getDefaultState()).minRadius(0.0F).maxRadius(3.0F).numBalls(3).scatterYMethod(ScatterYMethod.AT_SURFACE).create());
|
||||
|
||||
// grasses
|
||||
GeneratorWeighted grassGenerator = new GeneratorWeighted(10);
|
||||
this.addGenerator("grass", GeneratorStage.GRASS, grassGenerator);
|
||||
grassGenerator.add("shortgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.SHORTGRASS).create());
|
||||
grassGenerator.add("mediumgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.MEDIUMGRASS).create());
|
||||
grassGenerator.add("wheatgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.WHEATGRASS).create());
|
||||
grassGenerator.add("dampgrass", 1, (new GeneratorGrass.Builder()).with(BOPPlants.DAMPGRASS).create());
|
||||
grassGenerator.add("tallgrass", 1, (new GeneratorGrass.Builder()).with(BlockTallGrass.EnumType.GRASS).create());
|
||||
grassGenerator.add("doublegrass", 4, (new GeneratorDoubleFlora.Builder()).with(BlockDoublePlant.EnumPlantType.GRASS).create());
|
||||
|
||||
// gem
|
||||
this.addGenerator("emerald", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).with(Blocks.EMERALD_ORE.getDefaultState()).create());
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applySettings(IBOPWorldSettings settings)
|
||||
{
|
||||
if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");}
|
||||
|
||||
GeneratorWeighted grassGen = (GeneratorWeighted)this.getGenerator("grass");
|
||||
if (!settings.isEnabled(GeneratorType.GRASSES)) {grassGen.removeGenerator("shortgrass"); grassGen.removeGenerator("mediumgrass"); grassGen.removeGenerator("wheatgrass"); grassGen.removeGenerator("dampgrass");}
|
||||
}
|
||||
|
||||
}
|
|
@ -1,63 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright 2015-2016, the Biomes O' Plenty Team
|
||||
*
|
||||
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
|
||||
*
|
||||
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
|
||||
******************************************************************************/
|
||||
|
||||
package biomesoplenty.common.biome.overworld;
|
||||
|
||||
import biomesoplenty.api.block.BOPBlocks;
|
||||
import biomesoplenty.api.block.BlockQueries;
|
||||
import biomesoplenty.api.config.IBOPWorldSettings;
|
||||
import biomesoplenty.api.config.IBOPWorldSettings.GeneratorType;
|
||||
import biomesoplenty.api.generation.GeneratorStage;
|
||||
import biomesoplenty.common.block.BlockBOPCoral;
|
||||
import biomesoplenty.common.enums.BOPGems;
|
||||
import biomesoplenty.common.util.biome.BiomeUtils;
|
||||
import biomesoplenty.common.util.biome.GeneratorUtils.ScatterYMethod;
|
||||
import biomesoplenty.common.world.generator.GeneratorColumns;
|
||||
import biomesoplenty.common.world.generator.GeneratorFlora;
|
||||
import biomesoplenty.common.world.generator.GeneratorOreSingle;
|
||||
import net.minecraft.init.Biomes;
|
||||
import net.minecraft.init.Blocks;
|
||||
|
||||
public class BiomeGenKelpForest extends BOPBiome
|
||||
{
|
||||
public BiomeGenKelpForest()
|
||||
{
|
||||
super("kelp_forest", new PropsBuilder("Kelp Forest").withGuiColour(27468));
|
||||
|
||||
// terrain
|
||||
this.terrainSettings.avgHeight(40).heightVariation(5, 5);
|
||||
|
||||
this.canSpawnInBiome = false;
|
||||
this.canGenerateVillages = false;
|
||||
this.canGenerateRivers = false;
|
||||
|
||||
this.beachBiomeLocation = BiomeUtils.getLocForBiome(Biomes.OCEAN);
|
||||
|
||||
clearWeights();
|
||||
|
||||
// algae
|
||||
this.addGenerator("algae", GeneratorStage.LILYPAD, (new GeneratorFlora.Builder()).amountPerChunk(3.0F).replace(Blocks.WATER).with(BOPBlocks.coral.getDefaultState().withProperty(BlockBOPCoral.VARIANT, BlockBOPCoral.CoralType.ALGAE)).scatterYMethod(ScatterYMethod.AT_GROUND).create());
|
||||
|
||||
// kelp
|
||||
this.addGenerator("kelp", GeneratorStage.LILYPAD, (new GeneratorColumns.Builder()).amountPerChunk(5.0F).replace(BlockQueries.waterCovered).placeOn(BlockQueries.groundBlocks).with(BOPBlocks.seaweed.getDefaultState()).scatterYMethod(ScatterYMethod.AT_GROUND).create());
|
||||
this.addGenerator("kelp_tall", GeneratorStage.LILYPAD, (new GeneratorColumns.Builder()).amountPerChunk(6.0F).replace(BlockQueries.waterCovered).placeOn(BlockQueries.groundBlocks).with(BOPBlocks.seaweed.getDefaultState()).minHeight(8).maxHeight(18).scatterYMethod(ScatterYMethod.AT_GROUND).create());
|
||||
|
||||
// gem
|
||||
this.addGenerator("sapphire", GeneratorStage.SAND, (new GeneratorOreSingle.Builder()).amountPerChunk(12).with(BOPGems.SAPPHIRE).create());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applySettings(IBOPWorldSettings settings)
|
||||
{
|
||||
if (!settings.isEnabled(GeneratorType.GEMS)) {this.removeGenerator("sapphire");}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.FOLIAGE)) {this.removeGenerator("bushes"); this.removeGenerator("koru"); this.removeGenerator("shrubs"); this.removeGenerator("leaf_piles"); this.removeGenerator("dead_leaf_piles"); this.removeGenerator("clover_patches"); this.removeGenerator("sprouts");}
|
||||
|
||||
if (!settings.isEnabled(GeneratorType.PLANTS)) {this.removeGenerator("cattail"); this.removeGenerator("double_cattail"); this.removeGenerator("river_cane"); this.removeGenerator("tiny_cacti"); this.removeGenerator("roots"); this.removeGenerator("rafflesia"); this.removeGenerator("desert_sprouts");}
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue