mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-15 09:34:57 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d2d9da6af7 | ||
|
|
a9819781d0 | ||
|
|
055834b63a | ||
|
|
e244a0c82c | ||
|
|
ef96f754d8 | ||
|
|
32270601e7 | ||
|
|
823305dd94 | ||
|
|
bbf80a4320 | ||
|
|
4057537027 | ||
|
|
3a294b79a7 | ||
|
|
206d483422 | ||
|
|
6d51d53da1 | ||
|
|
1ee6c05494 | ||
|
|
8feb3500a4 | ||
|
|
4515aa513a | ||
|
|
c06057ddd0 | ||
|
|
9b4a4c2b1d | ||
|
|
2b3d21b05d | ||
|
|
cb43bbee52 | ||
|
|
b92a1a10e9 | ||
|
|
8a431e56ef | ||
|
|
f73b48695e | ||
|
|
0454fea0a8 | ||
|
|
4ff772954e | ||
|
|
d8304d5d7e | ||
|
|
a12cfff9d9 | ||
|
|
d34ad60d31 | ||
|
|
508b26ca45 | ||
|
|
255bd9da99 | ||
|
|
5cedc2adca | ||
|
|
c968278d27 | ||
|
|
2392785daa | ||
|
|
e82691165f | ||
|
|
e54cd57162 | ||
|
|
0a3a933b77 | ||
|
|
10dbed1406 | ||
|
|
b515870cb4 | ||
|
|
30010d2554 | ||
|
|
317d9abfda | ||
|
|
7df3a94916 | ||
|
|
8158562974 | ||
|
|
a96ce6c873 | ||
|
|
6efbdd747d | ||
|
|
82dd0e5eed | ||
|
|
64c0590bef | ||
|
|
691ccd578e | ||
|
|
98cd99aa4e | ||
|
|
cd8e78f60a | ||
|
|
5ed536da7c | ||
|
|
96ca20c784 | ||
|
|
764d969bb4 | ||
|
|
a26a86fe99 | ||
|
|
ebe6580aaf | ||
|
|
e90ab8caf6 | ||
|
|
efdffd31c8 | ||
|
|
fa515f0941 | ||
|
|
78c033a7d2 | ||
|
|
4975fa80c3 | ||
|
|
aa642a3ee8 | ||
|
|
b19809bd3c | ||
|
|
b566a1befd | ||
|
|
88c9270316 | ||
|
|
f52cc3893b | ||
|
|
b7578e3a11 | ||
|
|
c124a34533 | ||
|
|
ae038b23f2 | ||
|
|
df29777b49 | ||
|
|
a786d71cfd | ||
|
|
2b757ae91a | ||
|
|
decc351e04 | ||
|
|
98806129bc | ||
|
|
55c01f4cea | ||
|
|
38447d4d13 | ||
|
|
348149f4d6 | ||
|
|
dfb4504cde | ||
|
|
f12c6d2d11 | ||
|
|
0ff0aa802c | ||
|
|
fd25e0822d | ||
|
|
649c13f5f0 | ||
|
|
630dcde28a | ||
|
|
d4dee797d7 | ||
|
|
47ff5d9ad1 | ||
|
|
6ff1d8b8d7 | ||
|
|
934ffde12a | ||
|
|
6c806c377a | ||
|
|
24c8add7fc | ||
|
|
8c39ad956e | ||
|
|
36ccd5c3e1 | ||
|
|
d621d8a5df | ||
|
|
76d77b4784 | ||
|
|
6efbd6e158 | ||
|
|
aa45da81ba | ||
|
|
3cd1c30dbc | ||
|
|
8ba478d758 | ||
|
|
b5a8740e4a | ||
|
|
8f6b056776 | ||
|
|
d72ba48a1a | ||
|
|
c0a3e2240f | ||
|
|
46f78ce7b3 | ||
|
|
b0bc8429ac | ||
|
|
9c44111665 | ||
|
|
54a9da917d | ||
|
|
bcafbcbc32 | ||
|
|
2ce018d84b | ||
|
|
0638822b74 | ||
|
|
2b8d905e0e | ||
|
|
d0f28a32b2 | ||
|
|
b74e142ce1 | ||
|
|
3d95b9f6d9 | ||
|
|
571d158809 | ||
|
|
9cd6bfcfa8 | ||
|
|
ebc70ab22a | ||
|
|
e3e4a4341d | ||
|
|
918e4f0099 | ||
|
|
123bed88a2 | ||
|
|
9de446cc4e | ||
|
|
f328efa4e9 | ||
|
|
cdb5ddeb6a | ||
|
|
7f83c387e3 | ||
|
|
95c52f3607 | ||
|
|
19a30bdb91 | ||
|
|
1b262d6604 | ||
|
|
ca73687940 | ||
|
|
ed2f06c514 | ||
|
|
bef36c15b0 | ||
|
|
7dba583c26 | ||
|
|
3168639c89 | ||
|
|
e9019fd8c3 | ||
|
|
d43cc63367 | ||
|
|
89e8ec8e38 | ||
|
|
f270231e67 | ||
|
|
34be92d462 | ||
|
|
eea193aa83 | ||
|
|
d6a5827f0b | ||
|
|
a093e7c094 | ||
|
|
4ea0795063 | ||
|
|
31b83ea852 | ||
|
|
0f494d4ac7 | ||
|
|
0cfddef397 | ||
|
|
e4478bc296 | ||
|
|
6a921c78fb | ||
|
|
5f9e0f30fd | ||
|
|
355ba9a7ed | ||
|
|
424bc8910d | ||
|
|
6eab284cd1 | ||
|
|
1745a7e946 | ||
|
|
74e381f184 | ||
|
|
0b2589b007 | ||
|
|
d29187746d | ||
|
|
26d538cb50 | ||
|
|
d48fca4652 | ||
|
|
211ab566a7 | ||
|
|
bb7a42dff5 | ||
|
|
31bcc661cd | ||
|
|
43a29e7ec8 | ||
|
|
13905ee4a9 | ||
|
|
2b9b105211 | ||
|
|
8b10349309 | ||
|
|
0d26b6b2f2 | ||
|
|
3e5de52efd | ||
|
|
e30e9f4ab9 | ||
|
|
05d1eb87ce | ||
|
|
7679dfc393 | ||
|
|
bb52acc67c | ||
|
|
3caf8cbfef | ||
|
|
207f15ed0b | ||
|
|
c5178be225 | ||
|
|
cd7250604e | ||
|
|
533c9d0b2a | ||
|
|
c00fa15f0e | ||
|
|
ce3dea42e3 | ||
|
|
287cb8cb87 | ||
|
|
10fec50457 | ||
|
|
43c61c18c0 | ||
|
|
dca593f7d8 | ||
|
|
4c874fcf7d | ||
|
|
e62a2f1199 | ||
|
|
8ab94e6741 | ||
|
|
1278c09064 | ||
|
|
ed0b884bce | ||
|
|
85f413f857 | ||
|
|
3cc298b0f1 | ||
|
|
8b0d54f3ec | ||
|
|
40445462f1 | ||
|
|
8eea336fdb | ||
|
|
521514f3d2 | ||
|
|
cc50a05f43 | ||
|
|
1fc56c3b20 | ||
|
|
9cee882788 | ||
|
|
9404f769bb | ||
|
|
7b8b317ffe | ||
|
|
b40a6d4ec9 | ||
|
|
42865951a9 | ||
|
|
a058c3f8c9 | ||
|
|
a83e428d29 | ||
|
|
9c41566485 | ||
|
|
842b9c7199 | ||
|
|
cbb0c15783 | ||
|
|
cbc6f9acff | ||
|
|
03ecce51cc | ||
|
|
644145ac92 | ||
|
|
850a7e2919 | ||
|
|
1f54359836 | ||
|
|
debde28aba | ||
|
|
a2aa07c917 | ||
|
|
3c9572eb83 | ||
|
|
03fd954781 | ||
|
|
2002dff3c9 | ||
|
|
d9ade6dae0 | ||
|
|
3b547c1b87 | ||
|
|
05070982dc | ||
|
|
9833dbb01f | ||
|
|
e67ef8adec | ||
|
|
b5b4ff2de6 | ||
|
|
f78e21e31a | ||
|
|
457962c716 | ||
|
|
7a0dde1140 | ||
|
|
5f7f7fbed6 | ||
|
|
c107c75cbe | ||
|
|
8ed4fa8d7b | ||
|
|
5a10d8a0b2 | ||
|
|
16c3fae45d | ||
|
|
b3be6a8f02 | ||
|
|
aac4d730d6 | ||
|
|
dacd2741a3 | ||
|
|
2f47114015 | ||
|
|
b7ae349314 | ||
|
|
fbea338462 | ||
|
|
b07e5a1556 | ||
|
|
13f49fc930 | ||
|
|
3c4b025c74 | ||
|
|
3df3d9121e | ||
|
|
58ab49d66e | ||
|
|
37893d8aca | ||
|
|
9814601ff2 | ||
|
|
11e8a06a48 | ||
|
|
26f44a2862 | ||
|
|
3073473b0e | ||
|
|
61af8ba6c9 | ||
|
|
3e60c43b30 | ||
|
|
e9ae149ba2 | ||
|
|
b62ec72422 | ||
|
|
50ef3d8b2c | ||
|
|
a0e15f76ca | ||
|
|
e7766d3ad9 | ||
|
|
4e096e7338 | ||
|
|
88fd031fb4 | ||
|
|
ee272de168 | ||
|
|
1faaa6e297 | ||
|
|
6c86447891 | ||
|
|
905e81c2b9 | ||
|
|
25bb682f7d | ||
|
|
18e10f617c | ||
|
|
e0a0ab5594 | ||
|
|
29d96db1e8 | ||
|
|
3769ec42d2 | ||
|
|
d0c1133304 | ||
|
|
c3ff59fbfb | ||
|
|
aa52b063b7 | ||
|
|
a74b3c87c4 | ||
|
|
6c38a6a28e | ||
|
|
db49d305f4 | ||
|
|
5df7b9252b | ||
|
|
f4d0979bb1 | ||
|
|
199200cb01 | ||
|
|
419cebef33 | ||
|
|
716167e3ec | ||
|
|
60debc45f3 | ||
|
|
2c04d42717 | ||
|
|
9e21ed9670 | ||
|
|
095e710bec | ||
|
|
888c5268d5 | ||
|
|
1180c16f45 | ||
|
|
dea1fb144a | ||
|
|
a01190a242 | ||
|
|
0ebced9609 | ||
|
|
ab4489c5aa | ||
|
|
d2ea1d820c | ||
|
|
4d0dfd837e | ||
|
|
e07f10d981 | ||
|
|
d48e9484b8 | ||
|
|
b9924ea98b | ||
|
|
5707d27598 | ||
|
|
42bde9e576 | ||
|
|
76f09be39d | ||
|
|
3aa328a522 | ||
|
|
2b0f5bfdf4 | ||
|
|
bbe6f919c4 | ||
|
|
4441d78eb2 | ||
|
|
e6cb758e0e | ||
|
|
6d774de5a6 | ||
|
|
0a2ca1febc | ||
|
|
6d3ff67efd | ||
|
|
d37a52dcf4 | ||
|
|
c03fa0e955 | ||
|
|
b3549edf51 | ||
|
|
e09d159935 | ||
|
|
66f0da433e | ||
|
|
4cb2610b1c | ||
|
|
c44f11cf09 | ||
|
|
b69c31ed8a | ||
|
|
6a2231f8fb | ||
|
|
a3a6c71c42 | ||
|
|
8d5c0c6f8b | ||
|
|
56603fd00c | ||
|
|
ed69411d2e | ||
|
|
d8c8aec2ee | ||
|
|
e1d017f077 | ||
|
|
9269af7a13 | ||
|
|
8ffdba5021 | ||
|
|
e00aecd886 | ||
|
|
98f859f2fb | ||
|
|
55a15d23b2 | ||
|
|
38189388f6 | ||
|
|
8bb1b74b1c | ||
|
|
465d32af25 | ||
|
|
13b8a023a3 | ||
|
|
54ca3488df | ||
|
|
26bf69effc | ||
|
|
307580aed8 | ||
|
|
d2d93004e0 | ||
|
|
e1df424bfd | ||
|
|
6a75347b05 | ||
|
|
cfd513ea80 | ||
|
|
edcc47a6b3 | ||
|
|
6593118f3d | ||
|
|
8f29faa28a | ||
|
|
fd724d147a | ||
|
|
1e6716f8ec | ||
|
|
787395494c | ||
|
|
b0b6ffb963 | ||
|
|
d3d57ab0df | ||
|
|
375515937d | ||
|
|
b2e1b2dc9b | ||
|
|
6c869cab98 | ||
|
|
212f857692 | ||
|
|
c40adda51c | ||
|
|
35f7ba6153 | ||
|
|
327b7bba87 | ||
|
|
defc47000b | ||
|
|
694cd8103a | ||
|
|
f50e7281c5 | ||
|
|
0a37ad0666 | ||
|
|
13d4907bff | ||
|
|
78725009c1 | ||
|
|
a1bc9144bd | ||
|
|
1034111985 | ||
|
|
b897056824 | ||
|
|
0c27bf850c | ||
|
|
87563b6c97 | ||
|
|
62d6294da2 | ||
|
|
78489a6146 | ||
|
|
b4d71543db | ||
|
|
b4db0f32e4 | ||
|
|
8ad42a8918 | ||
|
|
96ed44a186 | ||
|
|
4e17804997 | ||
|
|
e391d06f32 | ||
|
|
353fcb1ba7 | ||
|
|
73db1a608a | ||
|
|
322327e1f4 | ||
|
|
1c6b60122e | ||
|
|
c2ca77ecae | ||
|
|
441f57d027 | ||
|
|
1e7a042b53 | ||
|
|
2e0bb5a3b2 | ||
|
|
bf08336bc5 | ||
|
|
62cbf31ac2 | ||
|
|
a2eac214b4 | ||
|
|
32933ce90b | ||
|
|
44cdc191fc | ||
|
|
e4f77e42d3 | ||
|
|
9f91832c7e | ||
|
|
6d4af0fb5d | ||
|
|
4345739a87 | ||
|
|
0a881a81f8 | ||
|
|
b066f7ad4c | ||
|
|
a19380347a | ||
|
|
9bc1211e57 | ||
|
|
cbce5d0fc0 | ||
|
|
b20b56c5d4 | ||
|
|
27041c205c | ||
|
|
00504d4096 | ||
|
|
ed0c5e1a7e | ||
|
|
ddf90f4ee0 | ||
|
|
39290512cf | ||
|
|
09ea20729d | ||
|
|
736e6c5fa2 | ||
|
|
e96f4fc8a0 | ||
|
|
bbe1f539dd | ||
|
|
1fcaacd41b | ||
|
|
7306764c51 | ||
|
|
d3c7280f3f | ||
|
|
2c6ed06574 | ||
|
|
81e2e18089 | ||
|
|
7b7e7eb7e7 | ||
|
|
944aaf3297 | ||
|
|
5a5793f243 | ||
|
|
5e41a4d2c0 | ||
|
|
c4ac0bc7a5 | ||
|
|
5549cfaaa1 | ||
|
|
ae4d246c59 | ||
|
|
2622557a00 | ||
|
|
339abedeee | ||
|
|
149b35224a | ||
|
|
d148279224 | ||
|
|
554fe8bad1 | ||
|
|
27e8259ff6 | ||
|
|
3a51df154a | ||
|
|
a3c79c0427 | ||
|
|
f569a04797 | ||
|
|
610ddfed12 | ||
|
|
438883bb8e | ||
|
|
828dd63acd | ||
|
|
f7cc35d949 | ||
|
|
ec9004b50b | ||
|
|
8b4c1a5dab | ||
|
|
853355062e | ||
|
|
834e3ed55a | ||
|
|
5b2b0bfc95 | ||
|
|
4fae8c26d9 | ||
|
|
0aa4a0f794 | ||
|
|
ac0864303c | ||
|
|
8811b24811 | ||
|
|
904293f407 | ||
|
|
3e175aa8e6 | ||
|
|
c4ecdde110 | ||
|
|
4aa978023d | ||
|
|
50009786d8 | ||
|
|
032d706fc4 | ||
|
|
dcd9e90898 | ||
|
|
bab3479cde | ||
|
|
a5b79c97d2 | ||
|
|
05d6dc3d4a | ||
|
|
6e2ed37e80 | ||
|
|
c840945706 | ||
|
|
ca7d6dbc66 | ||
|
|
81ef5d536f | ||
|
|
f911100c3d | ||
|
|
386f0645a5 | ||
|
|
91d46d1331 | ||
|
|
e1eb4d25fb | ||
|
|
72234d9b5d | ||
|
|
97f21bfda8 | ||
|
|
c8c30073a2 | ||
|
|
dc27154c1f | ||
|
|
5b15e6f405 | ||
|
|
2530a7fb15 | ||
|
|
4ec1381fbe | ||
|
|
d97f6f69b0 | ||
|
|
c8fcb292d4 | ||
|
|
e075fe8fbf | ||
|
|
5ce9b9f65b | ||
|
|
2c9a30db73 | ||
|
|
4a31215ce1 | ||
|
|
4da5e86813 | ||
|
|
66bdedd65b | ||
|
|
0149013579 | ||
|
|
bebf5b3aec | ||
|
|
0356a3f479 | ||
|
|
d29aa13377 | ||
|
|
c2313c7569 | ||
|
|
bb28a6db48 | ||
|
|
f61f7a0aff | ||
|
|
84f01de7f9 | ||
|
|
ced6f3cbf2 | ||
|
|
bbec31fc6e | ||
|
|
67024ffb2b | ||
|
|
1945c4ff70 | ||
|
|
7a1e35e05f | ||
|
|
06adb53944 | ||
|
|
919ce8238b | ||
|
|
6f285d1c88 | ||
|
|
af9ddb4928 | ||
|
|
1d2f3f16ab | ||
|
|
7f63ae8450 | ||
|
|
77ecd03416 | ||
|
|
56a907dbec | ||
|
|
e93633d999 | ||
|
|
fc0d144508 | ||
|
|
252dd8ab22 | ||
|
|
6ef41d4cd8 | ||
|
|
0b08780964 | ||
|
|
1cf24982fd | ||
|
|
9555005ac0 | ||
|
|
00b4b6552c | ||
|
|
23a9af3020 | ||
|
|
84a14811d8 | ||
|
|
7b340fdb49 | ||
|
|
9044a72aee | ||
|
|
cc40bd1cc3 | ||
|
|
a13e63cb2d | ||
|
|
6cb3b73200 | ||
|
|
7c8d81470d | ||
|
|
ef3f64fdd9 | ||
|
|
fdd6d75d0e | ||
|
|
46bb2cdccd | ||
|
|
aa21b31392 | ||
|
|
6a12e19798 | ||
|
|
81dd20b41c | ||
|
|
0b491f26fc | ||
|
|
bb0a0343c1 | ||
|
|
17e38e7c5e | ||
|
|
0ad3baecda | ||
|
|
a72971e042 | ||
|
|
b5e24e84cb | ||
|
|
c210886400 | ||
|
|
1bdbb7e9f8 | ||
|
|
f91c0574ad | ||
|
|
50f0efb7a0 | ||
|
|
3d932700cd | ||
|
|
6a00a65aac | ||
|
|
1b781684a0 | ||
|
|
f2d280a861 | ||
|
|
87ce642235 | ||
|
|
b297bbb2c4 | ||
|
|
931e518ca2 | ||
|
|
7ff4944281 | ||
|
|
9d8c616b67 | ||
|
|
17afceab6a | ||
|
|
306bae490c | ||
|
|
d8e735ef3b | ||
|
|
55919a135e | ||
|
|
02f5c7121d | ||
|
|
ed1907ddea | ||
|
|
0a0bdfa978 | ||
|
|
4abbc92472 | ||
|
|
1fa461430e | ||
|
|
d60bdd5f93 | ||
|
|
f39ff51ca8 | ||
|
|
35f9b95f37 | ||
|
|
b2d4e6eaba | ||
|
|
5bd4ba3cd5 | ||
|
|
d4f9c69538 | ||
|
|
ea976ebb2f | ||
|
|
c5798af241 | ||
|
|
e0bff8ec64 | ||
|
|
8bf6b19a63 | ||
|
|
abf6ccb3ed | ||
|
|
d55b91df48 | ||
|
|
1b865a0589 | ||
|
|
a2c12f3841 | ||
|
|
08c99cb0ca | ||
|
|
8cfafec6f9 | ||
|
|
9611ae08ae | ||
|
|
30d7365518 | ||
|
|
56800af94d | ||
|
|
043571b659 | ||
|
|
7fd2776147 | ||
|
|
d4c2d7220d | ||
|
|
d392666dc4 | ||
|
|
07b88d36fc | ||
|
|
408d1dc7c3 | ||
|
|
7b1aead339 | ||
|
|
21969649a2 | ||
|
|
f9b8b89340 | ||
|
|
65712adcb3 | ||
|
|
9864a84a13 | ||
|
|
8f9ae45147 | ||
|
|
2965f28403 | ||
|
|
cb93c217e0 | ||
|
|
219e9bf355 | ||
|
|
43a2f0ae76 | ||
|
|
098b739dca | ||
|
|
4dfa29b1ad | ||
|
|
60d2820ed6 | ||
|
|
91ec6cff9b | ||
|
|
1775e59880 | ||
|
|
f62745b233 | ||
|
|
1d6293c788 | ||
|
|
3fd07f2a7a | ||
|
|
856e800e0e | ||
|
|
d9561fd7af | ||
|
|
e0623f7d57 | ||
|
|
d48b979ac3 | ||
|
|
63494c40a7 | ||
|
|
2c57aef3b3 | ||
|
|
1392823fae | ||
|
|
67693961ac | ||
|
|
8ad8597ff0 | ||
|
|
4c8d5e2f43 | ||
|
|
d04713339c | ||
|
|
844aea7431 | ||
|
|
53a9bf458e | ||
|
|
2ae52451b2 | ||
|
|
d3054c33e7 | ||
|
|
bf61462a2a | ||
|
|
41f3ae4b1f | ||
|
|
b1d7c1721d | ||
|
|
2944165741 | ||
|
|
e316526675 | ||
|
|
411cbd913c | ||
|
|
2191d00f3d | ||
|
|
a02af0ddf2 | ||
|
|
a8e4f5dde7 | ||
|
|
85718b1df8 | ||
|
|
781b4d883b | ||
|
|
c5c056750a | ||
|
|
3b8af4e4c9 | ||
|
|
f58938ff32 | ||
|
|
a05bc13852 | ||
|
|
1cd3e15ef9 | ||
|
|
1ac7a7de42 | ||
|
|
90ed57c742 | ||
|
|
94b0b44f51 | ||
|
|
c0fafc20da | ||
|
|
4f85236475 | ||
|
|
41ab1ea374 | ||
|
|
52b8d56ff0 | ||
|
|
a61879daff | ||
|
|
e71edd5855 | ||
|
|
321e316665 | ||
|
|
aca6ed1fd8 | ||
|
|
b135593733 | ||
|
|
ac7fe4b2d2 | ||
|
|
5e0e045053 | ||
|
|
f01dab6f58 | ||
|
|
9385a4caca | ||
|
|
582c8d64df | ||
|
|
26c40b2006 | ||
|
|
b7eaaf6804 | ||
|
|
3f07e68952 | ||
|
|
2b40762934 | ||
|
|
dcaf6e144f | ||
|
|
413e1b9a0d | ||
|
|
64f64f2b5c | ||
|
|
2d25754731 | ||
|
|
2df6cfb7f7 | ||
|
|
2d0ca49359 | ||
|
|
d567138365 | ||
|
|
72380251f3 | ||
|
|
05a263826e | ||
|
|
61aa8bdcf0 | ||
|
|
e0694842b6 | ||
|
|
ff9942d0bc | ||
|
|
dcf7776cc1 | ||
|
|
a0d355d0aa | ||
|
|
649a061b6e | ||
|
|
2ca743a931 | ||
|
|
76a34a603b | ||
|
|
68651939e7 | ||
|
|
9dcc818a17 | ||
|
|
5e3c23e4eb | ||
|
|
d8ffc5c4b8 | ||
|
|
737f64eeab | ||
|
|
0db27d83b0 | ||
|
|
f57de19b06 | ||
|
|
1fed58fae5 | ||
|
|
1d8d61daf1 | ||
|
|
65bd93749c | ||
|
|
ac48b4b5c6 | ||
|
|
3be3ecfc8a | ||
|
|
10aae6b6bc | ||
|
|
d84560926c | ||
|
|
ab3de49198 | ||
|
|
b2b743398c | ||
|
|
52f233e84a | ||
|
|
2f2ec91670 | ||
|
|
2e2fa8e6df | ||
|
|
3de6e0c5b7 | ||
|
|
0f4ba8d8fa | ||
|
|
9570d26c83 | ||
|
|
01dc4f2bfe | ||
|
|
80de4d6490 | ||
|
|
253e9f18ed | ||
|
|
bbda5c8ba9 | ||
|
|
c289590740 | ||
|
|
714858be99 | ||
|
|
5bb60cad8a | ||
|
|
b8cf4ef1cf | ||
|
|
d35075d681 | ||
|
|
79c56311c2 | ||
|
|
77cea8a645 | ||
|
|
ed00ca3158 | ||
|
|
418f00abf2 | ||
|
|
0fa8fdad39 | ||
|
|
0a110eb761 | ||
|
|
9feb5cb114 | ||
|
|
7aa44fb1fa | ||
|
|
84fa956ce4 | ||
|
|
0c14a85c31 | ||
|
|
a20fbbe60f | ||
|
|
27d932ee34 | ||
|
|
52b1784f25 | ||
|
|
154f4f2712 | ||
|
|
806ca2cf7b | ||
|
|
9f171977bb | ||
|
|
2031f7fe02 | ||
|
|
4259a55e7a | ||
|
|
065344ba5e | ||
|
|
d0c9a77528 | ||
|
|
604429f267 | ||
|
|
f5a9dcccb8 | ||
|
|
b056cce707 | ||
|
|
1497aada57 | ||
|
|
fb8ddf54b7 | ||
|
|
9a05322d45 | ||
|
|
8c2008b06c | ||
|
|
e3cc08a624 | ||
|
|
36cd4663d9 | ||
|
|
a014ef6d14 | ||
|
|
34fa218c38 | ||
|
|
f422b577fe | ||
|
|
e379465227 | ||
|
|
eb63e75200 | ||
|
|
b5faab51c3 | ||
|
|
ddffe5d4ce | ||
|
|
f59e57aa6a | ||
|
|
ae8cbf2ff2 | ||
|
|
305f3f78ec | ||
|
|
98e506cc4a | ||
|
|
ecfb11c096 | ||
|
|
6b59736ffe | ||
|
|
a3a1f7720e | ||
|
|
89cfbfca9c | ||
|
|
e0676030d6 | ||
|
|
0c76e22b8a | ||
|
|
1a8f1751d9 | ||
|
|
b95bb8315f | ||
|
|
2cc2540bdc | ||
|
|
84af238d82 | ||
|
|
89960db2bd | ||
|
|
c5f53bda3e | ||
|
|
2e1b62e58d | ||
|
|
982aefa165 | ||
|
|
2cccf95775 | ||
|
|
1969ed8b09 | ||
|
|
c3fc490fac | ||
|
|
59687329fb | ||
|
|
94f751d78a | ||
|
|
f6feca096f | ||
|
|
649f38efb8 | ||
|
|
e4e221b9fd | ||
|
|
d7f063eec8 | ||
|
|
aa988a3be7 | ||
|
|
18f2a027bc | ||
|
|
7ca34e52d6 | ||
|
|
7f83b5b909 | ||
|
|
641f763d05 | ||
|
|
0df85063a1 | ||
|
|
550b0dc3f5 | ||
|
|
96a7b688c0 | ||
|
|
8f6c2baba6 | ||
|
|
523a8da908 | ||
|
|
cd10500a17 | ||
|
|
6d9211ada1 | ||
|
|
003ca9273d | ||
|
|
28f65f13a5 | ||
|
|
21ee0947d7 | ||
|
|
1e11992de2 | ||
|
|
d690a38fa2 | ||
|
|
46eb29cf28 | ||
|
|
fb01d3ffaa | ||
|
|
e676a73a7c | ||
|
|
6e348dbc5d | ||
|
|
39114ec429 | ||
|
|
3b82fe3bd0 | ||
|
|
2667334252 | ||
|
|
be39e2c3c3 | ||
|
|
40eece7d77 | ||
|
|
4fcc785e85 | ||
|
|
11e4097bd8 | ||
|
|
f8c37da06d | ||
|
|
09756f21fd | ||
|
|
a06c4bd1dc | ||
|
|
bb477f0dfb | ||
|
|
0b86b3df8f | ||
|
|
edd5357008 | ||
|
|
dfb4e04f4a | ||
|
|
45c0375387 | ||
|
|
5e4cfa5112 | ||
|
|
086b53e4a3 | ||
|
|
fbb5612b8c | ||
|
|
c3c471ab33 | ||
|
|
67ddc252aa | ||
|
|
59945a8961 | ||
|
|
bbabb967b1 | ||
|
|
4cb1ee4cb1 | ||
|
|
95135544e2 | ||
|
|
e34b71c13e | ||
|
|
cc8bcf384a | ||
|
|
1f21952beb | ||
|
|
1ed4ced65f | ||
|
|
beb74e635d | ||
|
|
40c4fc5d1f | ||
|
|
645dba903d | ||
|
|
1ac4acdb47 | ||
|
|
74aa33e80c | ||
|
|
6f6b45abcf | ||
|
|
7297a6a5d3 | ||
|
|
5ef76cffca | ||
|
|
9284f84645 | ||
|
|
85ba33e1ff | ||
|
|
9f5f5e7812 | ||
|
|
8617c4a79f | ||
|
|
e9809238de | ||
|
|
c0a22f4a28 | ||
|
|
41c6fb15b3 | ||
|
|
b5d65e83f0 | ||
|
|
1a7c148a7e | ||
|
|
ead630aa51 | ||
|
|
85b71c785a | ||
|
|
04cb58dfa2 | ||
|
|
3822e90ada | ||
|
|
af5cb93689 | ||
|
|
6a62024dd4 | ||
|
|
bedb7ffe85 | ||
|
|
4a21641bcd | ||
|
|
21d0b832b9 | ||
|
|
ce9081249f | ||
|
|
f6786cd44a | ||
|
|
a045c18a89 | ||
|
|
d6af85ad77 | ||
|
|
af55bd86a2 | ||
|
|
7aa840282f | ||
|
|
a5d57c4788 | ||
|
|
4d0c2d1ea2 | ||
|
|
840331b7d5 | ||
|
|
df91b47b35 | ||
|
|
f400241ff4 | ||
|
|
8639148f20 | ||
|
|
28e7b561ea | ||
|
|
ba7ef4228c | ||
|
|
fcd3ee6feb | ||
|
|
6ddc9f3079 | ||
|
|
cc53894473 | ||
|
|
2cd76bdad7 | ||
|
|
92eab8d47a | ||
|
|
12f5d7be6c | ||
|
|
ab88e7d57c | ||
|
|
725d85181d | ||
|
|
23c9b2071b | ||
|
|
ae025a92fc | ||
|
|
fbf30b1a73 | ||
|
|
4ba3370fc9 | ||
|
|
c1a590961d | ||
|
|
a1f7a678c1 | ||
|
|
1117b820f1 | ||
|
|
4681bf4cfb | ||
|
|
b9dd19a556 | ||
|
|
f97a737185 | ||
|
|
68fb27410e | ||
|
|
b8be42548e | ||
|
|
eb9ef642cd | ||
|
|
ed658301fd | ||
|
|
d55d86a3c5 | ||
|
|
b2d5706bbd | ||
|
|
ba6bd8fd10 | ||
|
|
b998e2ac49 | ||
|
|
817540d996 | ||
|
|
9d8866e4fd | ||
|
|
7575b9c6ce | ||
|
|
6700c511a5 | ||
|
|
acc55d4f41 | ||
|
|
7bd5bb120d | ||
|
|
dbbb727576 | ||
|
|
dcf0fc83ad | ||
|
|
6ef91590cf | ||
|
|
856322b208 | ||
|
|
42425e3500 | ||
|
|
cde076e702 | ||
|
|
b5f60d73e3 | ||
|
|
f82d123b7f | ||
|
|
ca17801c86 | ||
|
|
33d1685713 | ||
|
|
69c024811f | ||
|
|
4dd95625e1 | ||
|
|
6adcde4a75 | ||
|
|
2f06c777b2 | ||
|
|
32f295b16c | ||
|
|
ef4c65c6e6 | ||
|
|
ba313a9dfe | ||
|
|
8f36c2a6fc | ||
|
|
149a5b6128 | ||
|
|
56b871eca1 | ||
|
|
c09cdcdb64 | ||
|
|
2f66d0ea82 | ||
|
|
ac224823be | ||
|
|
1eca6e41af | ||
|
|
94bd65ee8e | ||
|
|
795b154eb5 | ||
|
|
358e7853c2 | ||
|
|
4f7b77abb4 | ||
|
|
aff15b34d6 | ||
|
|
55cf7b5c16 | ||
|
|
d4cfbe9f29 | ||
|
|
4fc731c7c8 | ||
|
|
bd2af7fa13 | ||
|
|
f3d88fea3c | ||
|
|
1d642cf9c5 | ||
|
|
b187815415 | ||
|
|
5c7150ad62 | ||
|
|
d84f708a98 | ||
|
|
2117be96cd | ||
|
|
96f941f6e6 | ||
|
|
d3c7d7141d | ||
|
|
e23a406e6f | ||
|
|
340b04fee0 | ||
|
|
7437f4f364 | ||
|
|
bfac4500a4 | ||
|
|
bd2aae4d60 | ||
|
|
30286fd0ad | ||
|
|
db482a5820 | ||
|
|
ce2138393a | ||
|
|
4f8912dd66 | ||
|
|
34f95c43c7 | ||
|
|
72cf00aa34 | ||
|
|
d5071b0da2 | ||
|
|
fc77a6ea71 | ||
|
|
c726a1973f | ||
|
|
ae5596491d | ||
|
|
40856a3748 | ||
|
|
8f836ef0d2 | ||
|
|
555304d987 | ||
|
|
b444994b81 | ||
|
|
da486ee941 | ||
|
|
a2881fbe1c | ||
|
|
7db47391e8 | ||
|
|
8b078f16d9 | ||
|
|
febb74177a | ||
|
|
61ca28d520 | ||
|
|
fe8be57a80 | ||
|
|
5cb03067ad | ||
|
|
23ffa00ca5 | ||
|
|
cdb85cb042 | ||
|
|
33051d09b2 | ||
|
|
69cf513e51 | ||
|
|
2c173766cb | ||
|
|
0405151a8e | ||
|
|
fd6a1de27e | ||
|
|
686f74e4f3 | ||
|
|
528bb6e051 | ||
|
|
078987808c | ||
|
|
c1e414b8f7 | ||
|
|
939d35661b | ||
|
|
3c85f3a7be | ||
|
|
aa4b4a18d1 | ||
|
|
55c32a8280 | ||
|
|
502160011b | ||
|
|
790197d7bd | ||
|
|
7d459bb30b | ||
|
|
da005bc404 | ||
|
|
9d0975a0ff | ||
|
|
a39f6e8e89 | ||
|
|
16c5284923 | ||
|
|
a9bc982595 | ||
|
|
45d29456af | ||
|
|
3f2afa7bcb | ||
|
|
238d33d37a | ||
|
|
a30ff61c9a | ||
|
|
2155f9eac9 | ||
|
|
30aea48952 | ||
|
|
0ae4d1a54d | ||
|
|
f597834198 | ||
|
|
e3ccd06ddc | ||
|
|
bc2c80365c | ||
|
|
752a221fe8 | ||
|
|
2801e346c5 | ||
|
|
a278a488f6 | ||
|
|
bf3e00c9e9 | ||
|
|
fd6958b637 | ||
|
|
75d747df70 | ||
|
|
d1969e1868 | ||
|
|
55d35c4cbe | ||
|
|
4ae72d7550 | ||
|
|
520c053cbc | ||
|
|
afbde2d735 | ||
|
|
1707573f7d | ||
|
|
c4c3f493be | ||
|
|
2dc7ae137e | ||
|
|
70bf28c1c4 | ||
|
|
dd36746240 | ||
|
|
2cfd0dae0a | ||
|
|
fdef1ba84a | ||
|
|
292a0f029e | ||
|
|
7bd7357684 | ||
|
|
a84ad5c828 | ||
|
|
586ecec9fe | ||
|
|
9cb3e4897b | ||
|
|
3a941ead9f | ||
|
|
edacde02e7 | ||
|
|
4fdbaff7ad | ||
|
|
36c8adbc05 | ||
|
|
8ac1485390 | ||
|
|
29573ff502 | ||
|
|
0bfa254d7f | ||
|
|
6ae98d4428 | ||
|
|
bc66802384 | ||
|
|
c9f17452cf | ||
|
|
4907993759 | ||
|
|
ee63729525 | ||
|
|
62368d4e40 | ||
|
|
78a955e3ea | ||
|
|
fb523c2064 | ||
|
|
ae7ec5c782 | ||
|
|
80eb842558 | ||
|
|
939e776668 | ||
|
|
ced605d006 | ||
|
|
215761b1b1 | ||
|
|
3a829c9990 | ||
|
|
8981384385 | ||
|
|
8eddbaf6c5 | ||
|
|
9d563bc953 | ||
|
|
ff1ff5ae2c | ||
|
|
fb7cd3ee09 | ||
|
|
6b4d7ebcc4 | ||
|
|
afb3ee56dd | ||
|
|
828f91f894 | ||
|
|
7ae7e62c0c | ||
|
|
23b5126d51 | ||
|
|
ba5a2529df | ||
|
|
5188b5a3f6 | ||
|
|
2ec6601383 | ||
|
|
bb3d736cb5 | ||
|
|
7bb91e9165 | ||
|
|
ea6fd2e3c0 | ||
|
|
8299fe3a75 | ||
|
|
4c83209eae | ||
|
|
92d8b020db | ||
|
|
6a4ea30484 | ||
|
|
a15f110ca3 | ||
|
|
9d9ea95ed1 | ||
|
|
4cf74e4aa1 | ||
|
|
0df025c2d5 | ||
|
|
99646e8656 | ||
|
|
9af235cc3b | ||
|
|
4268ceb11c | ||
|
|
2c7d56f308 | ||
|
|
64ed04e09b | ||
|
|
e432e17373 | ||
|
|
1e1f65fc6c | ||
|
|
5cc181d4c7 | ||
|
|
0ae2e36e90 | ||
|
|
a312afedd3 | ||
|
|
26b8f67885 | ||
|
|
54c5ed7a1b | ||
|
|
ad42e7327a | ||
|
|
db6d43e457 | ||
|
|
fed1994838 | ||
|
|
6d00d35ae5 | ||
|
|
7403a6cdcd | ||
|
|
7601a60c5e | ||
|
|
566efc7a96 | ||
|
|
898860975a | ||
|
|
03c1c26258 | ||
|
|
c30c3d7575 | ||
|
|
62ddd7bafc | ||
|
|
686e2799ad | ||
|
|
b1d55811a9 | ||
|
|
c6bfdec1ea | ||
|
|
6b95bc0b50 | ||
|
|
31a186c0a5 | ||
|
|
c8706ed1f8 | ||
|
|
07c3355489 | ||
|
|
17b1c792d0 | ||
|
|
db2d534d52 | ||
|
|
6b5750f252 | ||
|
|
078290649c | ||
|
|
65c63dcc63 | ||
|
|
6b912633b9 | ||
|
|
66d6a4d75e | ||
|
|
7bf554b024 | ||
|
|
5d74c1254b | ||
|
|
a0cdaf1e1a | ||
|
|
73c2608848 | ||
|
|
c47acd803c | ||
|
|
76bcc42c82 | ||
|
|
ab70788b66 | ||
|
|
79b3d910ea | ||
|
|
a3363fb4bc | ||
|
|
1b58077904 | ||
|
|
92d62de486 | ||
|
|
3aef4aa2c1 | ||
|
|
dc57e0826d | ||
|
|
77b1d2a283 | ||
|
|
92460d1d4a | ||
|
|
1d1959b535 | ||
|
|
1222637e92 | ||
|
|
b97151c56b | ||
|
|
24979f18f6 | ||
|
|
efd4a33bbb | ||
|
|
5dc95864a6 | ||
|
|
8f68f49759 | ||
|
|
cc34078ab4 | ||
|
|
1d8f2dae66 | ||
|
|
798b17fa03 | ||
|
|
feda5834b0 | ||
|
|
84877ab1cf | ||
|
|
1d676bc3f1 | ||
|
|
f4787efdad | ||
|
|
cf73635e92 | ||
|
|
5e75430526 | ||
|
|
eba8fb8c69 | ||
|
|
3cfc158875 | ||
|
|
43ac71b022 | ||
|
|
9e33648920 | ||
|
|
641dea32ac | ||
|
|
09aa0ecd1c | ||
|
|
01b1a9a33a | ||
|
|
6460eb5624 | ||
|
|
8d20833b78 | ||
|
|
c4e52f8670 | ||
|
|
c95f70a677 | ||
|
|
08d543b2ef | ||
|
|
04173d6bcf | ||
|
|
db20469cb7 | ||
|
|
6820d31b31 | ||
|
|
04bcdfd8b0 | ||
|
|
2d4a98b138 | ||
|
|
4f239590fb | ||
|
|
1b24ba1e5c | ||
|
|
f49cea199e | ||
|
|
fe61f40179 | ||
|
|
2fe2d9f895 | ||
|
|
64cf622ccf | ||
|
|
47a4bb70e0 | ||
|
|
9bc61a891d | ||
|
|
39dc7dbe5e | ||
|
|
2f65545c6b | ||
|
|
7ca28d4d10 | ||
|
|
080dd93dc2 | ||
|
|
f9eeb8a1d8 | ||
|
|
c7b94cc8af | ||
|
|
801d8f2752 | ||
|
|
5be265374b | ||
|
|
74c9fb57e9 | ||
|
|
1ea86eb343 | ||
|
|
f7ad61a2f3 | ||
|
|
9f66b811c9 | ||
|
|
e775b5ec5a | ||
|
|
af30ecd03b | ||
|
|
f4f022c250 | ||
|
|
b0cc323b87 | ||
|
|
23826adafd | ||
|
|
b4d2b4ec7e | ||
|
|
187a37643b | ||
|
|
4dfa1cec85 | ||
|
|
17d2105aff | ||
|
|
f6daefe255 | ||
|
|
a401995e7e | ||
|
|
d794207dae | ||
|
|
c5fc804bfa | ||
|
|
cf23644f45 | ||
|
|
bc0d105730 | ||
|
|
0349890ddd | ||
|
|
31bd519eaf | ||
|
|
6fbbb508cb | ||
|
|
8a40dd6d27 | ||
|
|
1c1dd4918a | ||
|
|
b0b501a0ff | ||
|
|
39c6e52d73 | ||
|
|
5b42b5fbae | ||
|
|
c4f447aa67 | ||
|
|
65d9c1dee6 | ||
|
|
cbcadfbba7 | ||
|
|
b3a2d6cf84 | ||
|
|
2442a2534a | ||
|
|
9f62f1f853 | ||
|
|
806b5121a8 | ||
|
|
336d388b4b | ||
|
|
7924e9fa83 | ||
|
|
8fea137a8b | ||
|
|
fa30244c5e | ||
|
|
cd4061b1fe | ||
|
|
a828c6a006 | ||
|
|
19421f7f22 | ||
|
|
007c036f54 | ||
|
|
ddbc5e96f1 | ||
|
|
9c81817baa | ||
|
|
f1f87d638d | ||
|
|
27d6cf1219 | ||
|
|
0f3e63ed20 | ||
|
|
252a08f416 | ||
|
|
a0fb568144 | ||
|
|
eebd9c6ecf | ||
|
|
ad69242a40 | ||
|
|
4d2135aae8 | ||
|
|
7518722ac8 | ||
|
|
248466bd91 | ||
|
|
927295ad40 | ||
|
|
45e18af1d3 | ||
|
|
3eaf9d4d30 | ||
|
|
8d549e14e6 | ||
|
|
927a13883c | ||
|
|
86a93b29c0 | ||
|
|
3d25bd8626 | ||
|
|
bde92c4afc | ||
|
|
7238886d00 | ||
|
|
9a0e5dc3e3 | ||
|
|
c28c1c4298 | ||
|
|
dd65d083cc | ||
|
|
e703536d57 | ||
|
|
886591f710 | ||
|
|
e8d0e92b5c | ||
|
|
a192c1ce49 | ||
|
|
d5a45a39eb | ||
|
|
72c0093856 | ||
|
|
4068fc9e99 | ||
|
|
43cf636096 | ||
|
|
ea64436f28 | ||
|
|
9b82c46517 | ||
|
|
eae8f719a7 | ||
|
|
0049d1e20d | ||
|
|
ff038cc468 | ||
|
|
70c5e851c2 | ||
|
|
83e01c71a2 | ||
|
|
0b31054a58 | ||
|
|
4677ae7d54 | ||
|
|
92b1f85d84 | ||
|
|
6e3c28e07e | ||
|
|
2d4c180389 | ||
|
|
039af049aa | ||
|
|
ec53b6d882 | ||
|
|
5a78f97fcb | ||
|
|
ff076090e3 | ||
|
|
626d0d8fb5 | ||
|
|
2ddad6ec37 | ||
|
|
8b9c48bf5c | ||
|
|
6d2313b251 | ||
|
|
545b051dd4 | ||
|
|
86e3ae87fd | ||
|
|
5a901ffa36 | ||
|
|
efcab41e04 | ||
|
|
87f2dc0a0a | ||
|
|
4b2d7594cb | ||
|
|
e0ea0c1073 | ||
|
|
e6669b0c60 | ||
|
|
339bbbe0f7 | ||
|
|
2f711b0493 | ||
|
|
315e5ba1cf | ||
|
|
7d251d32dd | ||
|
|
43e41034f6 | ||
|
|
a8270ef365 | ||
|
|
75bbf7e6a7 | ||
|
|
7b0259a343 | ||
|
|
14c42afd29 | ||
|
|
406392e7f7 | ||
|
|
c9b2f7bd3e | ||
|
|
78d836bc1f | ||
|
|
65436a4e70 | ||
|
|
c6ab58de22 | ||
|
|
28502d23e0 | ||
|
|
f85b534389 | ||
|
|
ab0d1cf7fc | ||
|
|
0672035596 | ||
|
|
fbae1b7622 | ||
|
|
372e17b488 | ||
|
|
96170b5f21 | ||
|
|
f9a8a294b8 | ||
|
|
48c8c016b4 | ||
|
|
8da0c0dc95 | ||
|
|
73812d8765 | ||
|
|
801c6dff92 | ||
|
|
02ec97b031 | ||
|
|
6390a0cd11 | ||
|
|
5a3850c264 | ||
|
|
d35cc1df09 |
No files matched your search
@@ -0,0 +1,5 @@
|
||||
Thank you for reporting!
|
||||
|
||||
For issues:
|
||||
* Try the latest version, it may have fixed the issue already.
|
||||
* If you crashed, please paste the crash log to [gist](https://gist.github.com/) and link it here.
|
||||
@@ -1,33 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
RUNDIR="run"
|
||||
CRASH="crash-reports"
|
||||
SERVERLOG="server.log"
|
||||
|
||||
if [[ -d $RUNDIR/$CRASH ]]; then
|
||||
echo "Crash reports detected:"
|
||||
cat $RUNDIR/$CRASH/crash*.txt
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if grep --quiet "Fatal errors were detected" $SERVERLOG; then
|
||||
echo "Fatal errors detected:"
|
||||
cat server.log
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if grep --quiet "The state engine was in incorrect state ERRORED and forced into state SERVER_STOPPED" $SERVERLOG; then
|
||||
echo "Server force stopped:"
|
||||
cat server.log
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! grep --quiet -Po '.+Done \(.+\)\! For help, type "help" or "\?"' $SERVERLOG; then
|
||||
echo "Server didn't finish startup:"
|
||||
cat server.log
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "No crash reports detected"
|
||||
exit 0
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
|
||||
name: Build and test
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ master, main ]
|
||||
push:
|
||||
branches: [ master, main ]
|
||||
|
||||
jobs:
|
||||
build-and-test:
|
||||
uses: GTNewHorizons/GTNH-Actions-Workflows/.github/workflows/build-and-test.yml@master
|
||||
secrets: inherit
|
||||
@@ -1,14 +0,0 @@
|
||||
|
||||
name: Release tagged build
|
||||
|
||||
on:
|
||||
push:
|
||||
tags: [ '*' ]
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
release-tags:
|
||||
uses: GTNewHorizons/GTNH-Actions-Workflows/.github/workflows/release-tags.yml@master
|
||||
secrets: inherit
|
||||
+23
-32
@@ -1,32 +1,23 @@
|
||||
.gradle
|
||||
.settings
|
||||
/.idea/
|
||||
/.vscode/
|
||||
/run/
|
||||
/build/
|
||||
/eclipse/
|
||||
.classpath
|
||||
.project
|
||||
/bin/
|
||||
/config/
|
||||
/crash-reports/
|
||||
/logs/
|
||||
options.txt
|
||||
/saves/
|
||||
usernamecache.json
|
||||
banned-ips.json
|
||||
banned-players.json
|
||||
eula.txt
|
||||
ops.json
|
||||
server.properties
|
||||
servers.dat
|
||||
usercache.json
|
||||
whitelist.json
|
||||
/out/
|
||||
*.iml
|
||||
*.ipr
|
||||
*.iws
|
||||
src/main/resources/mixins.*.json
|
||||
*.bat
|
||||
*.DS_Store
|
||||
!gradlew.bat
|
||||
# everything
|
||||
/*
|
||||
|
||||
# folders
|
||||
!/.github
|
||||
!/forestry_techne
|
||||
!/gradle/wrapper
|
||||
!/src
|
||||
|
||||
# files
|
||||
!/.gitignore
|
||||
!/CLA.txt
|
||||
!/CONTRIBUTING.md
|
||||
!/LICENSE.txt
|
||||
!/license-header.txt
|
||||
!/README.md
|
||||
!/gradle.properties
|
||||
!/build.gradle
|
||||
!/build.xml
|
||||
!/gradlew
|
||||
!/gradlew.bat
|
||||
!/cla-signatures.txt
|
||||
!/formatting-settings.jar
|
||||
@@ -1,48 +0,0 @@
|
||||
|
||||
# ForestryMC
|
||||
|
||||
Changelog of ForestryMC.
|
||||
|
||||
|
||||
### [#8 Fix NPE on crafting in worktable](https://github.com/GTNewHorizons/ForestryMC/pull/8)
|
||||
**Merge pull request #8 from GTNewHorizons/worktable-npe**
|
||||
* Fix NPE on crafting in worktable
|
||||
|
||||
[4c7c7c34388aebd](https://github.com/GTNewHorizons/ForestryMC/commit/4c7c7c34388aebd)
|
||||
by Martin Robertz *2021-04-06 15:05:20*
|
||||
### No issue
|
||||
**Fix NPE on crafting in worktable**
|
||||
|
||||
[621208393e64d97](https://github.com/GTNewHorizons/ForestryMC/commit/621208393e64d97)
|
||||
by Glease *2021-04-06 14:46:39*
|
||||
|
||||
### [#6 Ic2 crop module](https://github.com/GTNewHorizons/ForestryMC/pull/6)
|
||||
**Ic2 crop module (#6)**
|
||||
* Added IC2-Crop-Module
|
||||
* Changed Lang repo
|
||||
* updated lang submodule
|
||||
|
||||
[d2545b7a5990cf2](https://github.com/GTNewHorizons/ForestryMC/commit/d2545b7a5990cf2)
|
||||
by bartimaeusnek *2020-12-24 20:15:03*
|
||||
### [#7 Dirty fix for BQ3 crafting quest not triggering](https://github.com/GTNewHorizons/ForestryMC/pull/7)
|
||||
**Merge pull request #7 from GTNewHorizons/bq3_compat**
|
||||
* Dirty fix for BQ3 crafting quest not triggering
|
||||
|
||||
[d0254997472c5be](https://github.com/GTNewHorizons/ForestryMC/commit/d0254997472c5be)
|
||||
by Martin Robertz *2021-01-22 16:15:58*
|
||||
### No issue
|
||||
**bump version**
|
||||
|
||||
[98c0b66b6fbe598](https://github.com/GTNewHorizons/ForestryMC/commit/98c0b66b6fbe598)
|
||||
by DreamMasterXXL *2021-01-29 19:11:09*
|
||||
|
||||
**Merge branch 'IC2-Crop-Module' into GTNH-Fixes**
|
||||
|
||||
[5b61261d69d541b](https://github.com/GTNewHorizons/ForestryMC/commit/5b61261d69d541b)
|
||||
by DreamMasterXXL *2021-01-29 19:05:41*
|
||||
|
||||
**Dirty fix for BQ3 crafting quest not triggering**
|
||||
|
||||
[7320ddb44f63bfd](https://github.com/GTNewHorizons/ForestryMC/commit/7320ddb44f63bfd)
|
||||
by Glease *2021-01-22 14:41:32*
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
# Any Github changes require admin approval
|
||||
/.github/** @GTNewHorizons/admin
|
||||
|
||||
Regular → Executable
File mode changed.
Regular → Executable
+676
-1
@@ -1,7 +1,7 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
@@ -163,3 +163,678 @@ whether future versions of the GNU Lesser General Public License shall
|
||||
apply, that proxy's public statement of acceptance of any version is
|
||||
permanent authorization for you to choose that version for the
|
||||
Library.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
@@ -1,4 +1,4 @@
|
||||
Forestry
|
||||
[Forestry](https://minecraft.curseforge.com/projects/forestry/files)
|
||||
====================================
|
||||
|
||||
### What is it?
|
||||
@@ -9,21 +9,26 @@ Forestry is a modification for the game Minecraft and known primarily for its fa
|
||||
|
||||
[Wiki](http://forestry.sengir.net/)
|
||||
|
||||
[Latest Builds for 1.7.10](http://jenkins.ic2.player.to/job/Forestry_Dev/)
|
||||
[Latest Builds for 1.11.2/1.12](http://jenkins.ic2.player.to/job/Forestry_1.11/)
|
||||
|
||||
[IRC #forestry on esper.net](http://webchat.esper.net/?nick=ForestryGithub...&channels=forestry&prompt=1)
|
||||
[](https://discord.gg/49XNRJk)
|
||||
|
||||
For those interested in developement, you can also visit #forestry-dev.
|
||||
|
||||
### Building
|
||||
|
||||
The API and localization files reside in their own repository. It is pulled in automatically.
|
||||
The localization files reside in their own repository. It is pulled in automatically.
|
||||
|
||||
You may want to adjust the "./gradle.properties" file to set your mc account as needed.
|
||||
|
||||
To setup, open a command line and run "gradlew setupDecompWorkspace" and "gradlew eclipse".
|
||||
To setup, open a command line and run "gradlew setupDecompWorkspace". Then run the following depending on your IDE:
|
||||
|
||||
To package, open a command line and type "gradlew release".
|
||||
Eclipse: "gradlew eclipse"
|
||||
IntelliJ IDEA: "gradlew idea genIntellijRuns"
|
||||
|
||||
To package, open a command line and type "gradlew build".
|
||||
|
||||
For mod authors: the Forestry maven is located at http://maven.ic2.player.to/net/sengir/forestry/
|
||||
|
||||
### Notes
|
||||
|
||||
|
||||
Executable → Regular
+119
-697
@@ -1,747 +1,169 @@
|
||||
//version: 1650343995
|
||||
/*
|
||||
DO NOT CHANGE THIS FILE!
|
||||
|
||||
Also, you may replace this file at any time if there is an update available.
|
||||
Please check https://github.com/GTNewHorizons/ExampleMod1.7.10/blob/main/build.gradle for updates.
|
||||
*/
|
||||
|
||||
|
||||
import com.github.jengelman.gradle.plugins.shadow.tasks.ConfigureShadowRelocation
|
||||
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
||||
import org.gradle.internal.logging.text.StyledTextOutput.Style
|
||||
import org.gradle.internal.logging.text.StyledTextOutputFactory
|
||||
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
||||
buildscript {
|
||||
repositories {
|
||||
maven {
|
||||
name 'forge'
|
||||
url 'https://maven.minecraftforge.net'
|
||||
}
|
||||
maven {
|
||||
name 'sonatype'
|
||||
url 'https://oss.sonatype.org/content/repositories/snapshots/'
|
||||
}
|
||||
maven {
|
||||
name 'Scala CI dependencies'
|
||||
url 'https://repo1.maven.org/maven2/'
|
||||
}
|
||||
maven {
|
||||
name 'jitpack'
|
||||
url 'https://jitpack.io'
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.github.GTNewHorizons:ForgeGradle:1.2.7'
|
||||
}
|
||||
repositories {
|
||||
jcenter()
|
||||
maven { url = "http://files.minecraftforge.net/maven" }
|
||||
}
|
||||
dependencies {
|
||||
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
|
||||
classpath "gradle.plugin.se.bjurr.gitchangelog:git-changelog-gradle-plugin:1.47"
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
id 'java-library'
|
||||
id 'idea'
|
||||
id 'eclipse'
|
||||
id 'scala'
|
||||
id 'maven-publish'
|
||||
id 'org.jetbrains.kotlin.jvm' version '1.5.30' apply false
|
||||
id 'org.jetbrains.kotlin.kapt' version '1.5.30' apply false
|
||||
id 'org.ajoberstar.grgit' version '4.1.1'
|
||||
id 'com.github.johnrengelman.shadow' version '4.0.4'
|
||||
id 'com.palantir.git-version' version '0.13.0' apply false
|
||||
id 'de.undercouch.download' version '5.0.1'
|
||||
id 'com.github.gmazzo.buildconfig' version '3.0.3' apply false
|
||||
id "com.matthewprenger.cursegradle" version "1.0.9"
|
||||
}
|
||||
apply plugin: 'net.minecraftforge.gradle.forge'
|
||||
apply plugin: 'idea'
|
||||
apply plugin: 'maven'
|
||||
apply plugin: "se.bjurr.gitchangelog.git-changelog-gradle-plugin"
|
||||
|
||||
if (project.file('.git/HEAD').isFile()) {
|
||||
apply plugin: 'com.palantir.git-version'
|
||||
version = version_major + '.' + version_minor + '.' + version_patch + '.' + getBuildNumber()
|
||||
if (project.hasProperty('buildQualifier')) {
|
||||
version = project.version + '-' + project.buildQualifier
|
||||
}
|
||||
group = "net.sengir.forestry" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||
archivesBaseName = "forestry_" + mcversion
|
||||
|
||||
def out = services.get(StyledTextOutputFactory).create('an-output')
|
||||
ext.dirDest = './build/dist'
|
||||
|
||||
apply plugin: 'forge'
|
||||
|
||||
def projectJavaVersion = JavaLanguageVersion.of(8)
|
||||
|
||||
java {
|
||||
toolchain {
|
||||
languageVersion.set(projectJavaVersion)
|
||||
}
|
||||
}
|
||||
|
||||
idea {
|
||||
module {
|
||||
inheritOutputDirs = true
|
||||
downloadJavadoc = true
|
||||
downloadSources = true
|
||||
}
|
||||
}
|
||||
|
||||
if(JavaVersion.current() != JavaVersion.VERSION_1_8) {
|
||||
throw new GradleException("This project requires Java 8, but it's running on " + JavaVersion.current())
|
||||
}
|
||||
|
||||
checkPropertyExists("modName")
|
||||
checkPropertyExists("modId")
|
||||
checkPropertyExists("modGroup")
|
||||
checkPropertyExists("autoUpdateBuildScript")
|
||||
checkPropertyExists("minecraftVersion")
|
||||
checkPropertyExists("forgeVersion")
|
||||
checkPropertyExists("replaceGradleTokenInFile")
|
||||
checkPropertyExists("gradleTokenModId")
|
||||
checkPropertyExists("gradleTokenModName")
|
||||
checkPropertyExists("gradleTokenVersion")
|
||||
checkPropertyExists("gradleTokenGroupName")
|
||||
checkPropertyExists("apiPackage")
|
||||
checkPropertyExists("accessTransformersFile")
|
||||
checkPropertyExists("usesMixins")
|
||||
checkPropertyExists("mixinPlugin")
|
||||
checkPropertyExists("mixinsPackage")
|
||||
checkPropertyExists("coreModClass")
|
||||
checkPropertyExists("containsMixinsAndOrCoreModOnly")
|
||||
checkPropertyExists("usesShadowedDependencies")
|
||||
checkPropertyExists("developmentEnvironmentUserName")
|
||||
|
||||
boolean noPublishedSources = project.findProperty("noPublishedSources") ? project.noPublishedSources.toBoolean() : false
|
||||
boolean usesMixinDebug = project.findProperty('usesMixinDebug') ?: project.usesMixins.toBoolean()
|
||||
|
||||
String javaSourceDir = "src/main/java/"
|
||||
String scalaSourceDir = "src/main/scala/"
|
||||
String kotlinSourceDir = "src/main/kotlin/"
|
||||
|
||||
String targetPackageJava = javaSourceDir + modGroup.toString().replaceAll("\\.", "/")
|
||||
String targetPackageScala = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/")
|
||||
String targetPackageKotlin = kotlinSourceDir + modGroup.toString().replaceAll("\\.", "/")
|
||||
if(!(getFile(targetPackageJava).exists() || getFile(targetPackageScala).exists() || getFile(targetPackageKotlin).exists())) {
|
||||
throw new GradleException("Could not resolve \"modGroup\"! Could not find " + targetPackageJava + " or " + targetPackageScala + " or " + targetPackageKotlin)
|
||||
}
|
||||
|
||||
if(apiPackage) {
|
||||
targetPackageJava = javaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + apiPackage.toString().replaceAll("\\.", "/")
|
||||
targetPackageScala = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + apiPackage.toString().replaceAll("\\.", "/")
|
||||
targetPackageKotlin = kotlinSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + apiPackage.toString().replaceAll("\\.", "/")
|
||||
if(!(getFile(targetPackageJava).exists() || getFile(targetPackageScala).exists() || getFile(targetPackageKotlin).exists())) {
|
||||
throw new GradleException("Could not resolve \"apiPackage\"! Could not find " + targetPackageJava + " or " + targetPackageScala + " or " + targetPackageKotlin)
|
||||
}
|
||||
}
|
||||
|
||||
if(accessTransformersFile) {
|
||||
String targetFile = "src/main/resources/META-INF/" + accessTransformersFile
|
||||
if(!getFile(targetFile).exists()) {
|
||||
throw new GradleException("Could not resolve \"accessTransformersFile\"! Could not find " + targetFile)
|
||||
}
|
||||
}
|
||||
|
||||
if(usesMixins.toBoolean()) {
|
||||
if(mixinsPackage.isEmpty() || mixinPlugin.isEmpty()) {
|
||||
throw new GradleException("\"mixinPlugin\" requires \"mixinsPackage\" and \"mixinPlugin\" to be set!")
|
||||
}
|
||||
|
||||
targetPackageJava = javaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + mixinsPackage.toString().replaceAll("\\.", "/")
|
||||
targetPackageScala = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + mixinsPackage.toString().replaceAll("\\.", "/")
|
||||
targetPackageKotlin = kotlinSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + mixinsPackage.toString().replaceAll("\\.", "/")
|
||||
if(!(getFile(targetPackageJava).exists() || getFile(targetPackageScala).exists() || getFile(targetPackageKotlin).exists())) {
|
||||
throw new GradleException("Could not resolve \"mixinsPackage\"! Could not find " + targetPackageJava + " or " + targetPackageScala + " or " + targetPackageKotlin)
|
||||
}
|
||||
|
||||
String targetFileJava = javaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + mixinPlugin.toString().replaceAll("\\.", "/") + ".java"
|
||||
String targetFileScala = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + mixinPlugin.toString().replaceAll("\\.", "/") + ".scala"
|
||||
String targetFileScalaJava = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + mixinPlugin.toString().replaceAll("\\.", "/") + ".java"
|
||||
String targetFileKotlin = kotlinSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + mixinPlugin.toString().replaceAll("\\.", "/") + ".kt"
|
||||
if(!(getFile(targetFileJava).exists() || getFile(targetFileScala).exists() || getFile(targetFileScalaJava).exists() || getFile(targetFileKotlin).exists())) {
|
||||
throw new GradleException("Could not resolve \"mixinPlugin\"! Could not find " + targetFileJava + " or " + targetFileScala + " or " + targetFileScalaJava + " or " + targetFileKotlin)
|
||||
}
|
||||
}
|
||||
|
||||
if(coreModClass) {
|
||||
String targetFileJava = javaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + coreModClass.toString().replaceAll("\\.", "/") + ".java"
|
||||
String targetFileScala = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + coreModClass.toString().replaceAll("\\.", "/") + ".scala"
|
||||
String targetFileScalaJava = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + coreModClass.toString().replaceAll("\\.", "/") + ".java"
|
||||
String targetFileKotlin = kotlinSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + coreModClass.toString().replaceAll("\\.", "/") + ".kt"
|
||||
if(!(getFile(targetFileJava).exists() || getFile(targetFileScala).exists() || getFile(targetFileScalaJava).exists() || getFile(targetFileKotlin).exists())) {
|
||||
throw new GradleException("Could not resolve \"coreModClass\"! Could not find " + targetFileJava + " or " + targetFileScala + " or " + targetFileScalaJava + " or " + targetFileKotlin)
|
||||
}
|
||||
}
|
||||
|
||||
configurations.all {
|
||||
resolutionStrategy.cacheChangingModulesFor(0, TimeUnit.SECONDS)
|
||||
|
||||
// Make sure GregTech build won't time out
|
||||
System.setProperty("org.gradle.internal.http.connectionTimeout", 120000 as String)
|
||||
System.setProperty("org.gradle.internal.http.socketTimeout", 120000 as String)
|
||||
}
|
||||
|
||||
// Fix Jenkins' Git: chmod a file should not be detected as a change and append a '.dirty' to the version
|
||||
try {
|
||||
'git config core.fileMode false'.execute()
|
||||
}
|
||||
catch (Exception ignored) {
|
||||
out.style(Style.Failure).println("git isn't installed at all")
|
||||
}
|
||||
|
||||
// Pulls version first from the VERSION env and then git tag
|
||||
String identifiedVersion
|
||||
String versionOverride = System.getenv("VERSION") ?: null
|
||||
try {
|
||||
identifiedVersion = versionOverride == null ? gitVersion() : versionOverride
|
||||
}
|
||||
catch (Exception ignored) {
|
||||
out.style(Style.Failure).text(
|
||||
'This mod must be version controlled by Git AND the repository must provide at least one tag,\n' +
|
||||
'or the VERSION override must be set! ').style(Style.SuccessHeader).text('(Do NOT download from GitHub using the ZIP option, instead\n' +
|
||||
'clone the repository, see ').style(Style.Info).text('https://gtnh.miraheze.org/wiki/Development').style(Style.SuccessHeader).println(' for details.)'
|
||||
)
|
||||
versionOverride = 'NO-GIT-TAG-SET'
|
||||
identifiedVersion = versionOverride
|
||||
}
|
||||
version = minecraftVersion + '-' + identifiedVersion
|
||||
ext {
|
||||
modVersion = identifiedVersion
|
||||
}
|
||||
|
||||
if(identifiedVersion == versionOverride) {
|
||||
out.style(Style.Failure).text('Override version to ').style(Style.Identifier).text(modVersion).style(Style.Failure).println('!\7')
|
||||
}
|
||||
|
||||
group = modGroup
|
||||
if(project.hasProperty("customArchiveBaseName") && customArchiveBaseName) {
|
||||
archivesBaseName = customArchiveBaseName
|
||||
}
|
||||
else {
|
||||
archivesBaseName = modId
|
||||
}
|
||||
|
||||
def arguments = []
|
||||
def jvmArguments = []
|
||||
|
||||
if (usesMixins.toBoolean()) {
|
||||
arguments += [
|
||||
"--tweakClass org.spongepowered.asm.launch.MixinTweaker"
|
||||
]
|
||||
if (usesMixinDebug.toBoolean()) {
|
||||
jvmArguments += [
|
||||
"-Dmixin.debug.countInjections=true",
|
||||
"-Dmixin.debug.verbose=true",
|
||||
"-Dmixin.debug.export=true"
|
||||
]
|
||||
}
|
||||
}
|
||||
// java version
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
|
||||
minecraft {
|
||||
version = minecraftVersion + '-' + forgeVersion + '-' + minecraftVersion
|
||||
runDir = 'run'
|
||||
version = mcversion + "-" + forgeversion
|
||||
runDir = "run"
|
||||
mappings = mcp_mappings
|
||||
|
||||
if (replaceGradleTokenInFile) {
|
||||
replaceIn replaceGradleTokenInFile
|
||||
if(gradleTokenModId) {
|
||||
replace gradleTokenModId, modId
|
||||
}
|
||||
if(gradleTokenModName) {
|
||||
replace gradleTokenModName, modName
|
||||
}
|
||||
if(gradleTokenVersion) {
|
||||
replace gradleTokenVersion, modVersion
|
||||
}
|
||||
if(gradleTokenGroupName) {
|
||||
replace gradleTokenGroupName, modGroup
|
||||
}
|
||||
}
|
||||
|
||||
clientIntellijRun {
|
||||
args(arguments)
|
||||
jvmArgs(jvmArguments)
|
||||
|
||||
if(developmentEnvironmentUserName) {
|
||||
args("--username", developmentEnvironmentUserName)
|
||||
}
|
||||
}
|
||||
|
||||
serverIntellijRun {
|
||||
args(arguments)
|
||||
jvmArgs(jvmArguments)
|
||||
}
|
||||
}
|
||||
|
||||
if(file('addon.gradle').exists()) {
|
||||
apply from: 'addon.gradle'
|
||||
}
|
||||
|
||||
apply from: 'repositories.gradle'
|
||||
|
||||
configurations {
|
||||
implementation.extendsFrom(shadowImplementation) // TODO: remove after all uses are refactored
|
||||
implementation.extendsFrom(shadowCompile)
|
||||
implementation.extendsFrom(shadeCompile)
|
||||
replace '@VERSION@', project.version
|
||||
replace '@BUILD_NUMBER@', getBuildNumber()
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven {
|
||||
name 'Overmind forge repo mirror'
|
||||
url 'https://gregtech.overminddl1.com/'
|
||||
}
|
||||
if(usesMixins.toBoolean()) {
|
||||
maven {
|
||||
name 'sponge'
|
||||
url 'https://repo.spongepowered.org/repository/maven-public'
|
||||
}
|
||||
maven {
|
||||
url 'https://jitpack.io'
|
||||
}
|
||||
}
|
||||
maven {
|
||||
url = 'http://maven.mcmoddev.com'
|
||||
}
|
||||
maven {
|
||||
url "http://dvs1.progwml6.com/files/maven"
|
||||
}
|
||||
maven {
|
||||
name = "ic2"
|
||||
url = "http://maven.ic2.player.to/"
|
||||
}
|
||||
maven {
|
||||
name = "Modmuss50"
|
||||
url = "http://maven.modmuss50.me"
|
||||
}
|
||||
maven {
|
||||
url = 'https://mod-buildcraft.com/maven'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
if(usesMixins.toBoolean()) {
|
||||
annotationProcessor('org.ow2.asm:asm-debug-all:5.0.3')
|
||||
annotationProcessor('com.google.guava:guava:24.1.1-jre')
|
||||
annotationProcessor('com.google.code.gson:gson:2.8.6')
|
||||
annotationProcessor('org.spongepowered:mixin:0.8-SNAPSHOT')
|
||||
// using 0.8 to workaround a issue in 0.7 which fails mixin application
|
||||
compile('com.github.GTNewHorizons:SpongePoweredMixin:0.7.12-GTNH') {
|
||||
// Mixin includes a lot of dependencies that are too up-to-date
|
||||
exclude module: 'launchwrapper'
|
||||
exclude module: 'guava'
|
||||
exclude module: 'gson'
|
||||
exclude module: 'commons-io'
|
||||
exclude module: 'log4j-core'
|
||||
}
|
||||
compile('com.github.GTNewHorizons:SpongeMixins:1.5.0')
|
||||
}
|
||||
deobfProvided "net.darkhax.tesla:Tesla-${tesla_mcversion}:${tesla_version}"
|
||||
deobfProvided "mezz.jei:jei_${jei_mcversion}:${jei_version}:api"
|
||||
runtimeOnly "mezz.jei:jei_${jei_mcversion}:${jei_version}"
|
||||
deobfProvided "net.industrial-craft:industrialcraft-2:${ic2_version}:api"
|
||||
deobfProvided "TechReborn:TechReborn-${TR_mcversion}:${TR_version}:api"
|
||||
deobfProvided "com.mod-buildcraft:buildcraft-api:${buildcraft_version}"
|
||||
}
|
||||
|
||||
apply from: 'dependencies.gradle'
|
||||
|
||||
def mixingConfigRefMap = 'mixins.' + modId + '.refmap.json'
|
||||
def refMap = "${tasks.compileJava.temporaryDir}" + File.separator + mixingConfigRefMap
|
||||
def mixinSrg = "${tasks.reobf.temporaryDir}" + File.separator + "mixins.srg"
|
||||
|
||||
task generateAssets {
|
||||
if (usesMixins.toBoolean()) {
|
||||
def mixinConfigFile = getFile("/src/main/resources/mixins." + modId + ".json");
|
||||
if (!mixinConfigFile.exists()) {
|
||||
mixinConfigFile.text = """{
|
||||
"required": true,
|
||||
"minVersion": "0.7.11",
|
||||
"package": "${modGroup}.${mixinsPackage}",
|
||||
"plugin": "${modGroup}.${mixinPlugin}",
|
||||
"refmap": "${mixingConfigRefMap}",
|
||||
"target": "@env(DEFAULT)",
|
||||
"compatibilityLevel": "JAVA_8",
|
||||
"mixins": [],
|
||||
"client": [],
|
||||
"server": []
|
||||
}
|
||||
"""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
task relocateShadowJar(type: ConfigureShadowRelocation) {
|
||||
target = tasks.shadowJar
|
||||
prefix = modGroup + ".shadow"
|
||||
}
|
||||
|
||||
shadowJar {
|
||||
project.configurations.shadeCompile.each { dep ->
|
||||
from(project.zipTree(dep)) {
|
||||
exclude 'META-INF', 'META-INF/**'
|
||||
}
|
||||
}
|
||||
|
||||
manifest {
|
||||
attributes(getManifestAttributes())
|
||||
}
|
||||
|
||||
minimize() // This will only allow shading for actually used classes
|
||||
configurations = [project.configurations.shadowImplementation, project.configurations.shadowCompile]
|
||||
dependsOn(relocateShadowJar)
|
||||
}
|
||||
|
||||
jar {
|
||||
project.configurations.shadeCompile.each { dep ->
|
||||
from(project.zipTree(dep)) {
|
||||
exclude 'META-INF', 'META-INF/**'
|
||||
}
|
||||
}
|
||||
|
||||
manifest {
|
||||
attributes(getManifestAttributes())
|
||||
}
|
||||
|
||||
if(usesShadowedDependencies.toBoolean()) {
|
||||
dependsOn(shadowJar)
|
||||
enabled = false
|
||||
}
|
||||
}
|
||||
|
||||
reobf {
|
||||
if(usesMixins.toBoolean()) {
|
||||
addExtraSrgFile mixinSrg
|
||||
}
|
||||
}
|
||||
|
||||
afterEvaluate {
|
||||
if(usesMixins.toBoolean()) {
|
||||
tasks.compileJava {
|
||||
options.compilerArgs += [
|
||||
"-AreobfSrgFile=${tasks.reobf.srg}",
|
||||
"-AoutSrgFile=${mixinSrg}",
|
||||
"-AoutRefMapFile=${refMap}",
|
||||
// Elan: from what I understand they are just some linter configs so you get some warning on how to properly code
|
||||
"-XDenableSunApiLintControl",
|
||||
"-XDignore.symbol.file"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
runClient {
|
||||
if(developmentEnvironmentUserName) {
|
||||
arguments += [
|
||||
"--username",
|
||||
developmentEnvironmentUserName
|
||||
]
|
||||
}
|
||||
|
||||
args(arguments)
|
||||
jvmArgs(jvmArguments)
|
||||
}
|
||||
|
||||
runServer {
|
||||
args(arguments)
|
||||
jvmArgs(jvmArguments)
|
||||
}
|
||||
|
||||
tasks.withType(JavaExec).configureEach {
|
||||
javaLauncher.set(
|
||||
javaToolchains.launcherFor {
|
||||
languageVersion = projectJavaVersion
|
||||
}
|
||||
)
|
||||
configurations {
|
||||
api
|
||||
compile.extendsFrom api
|
||||
}
|
||||
|
||||
processResources {
|
||||
// this will ensure that this task is redone when the versions change.
|
||||
inputs.property "version", project.version
|
||||
inputs.property "mcversion", project.minecraft.version
|
||||
|
||||
// replace stuff in mcmod.info, nothing else
|
||||
from(sourceSets.main.resources.srcDirs) {
|
||||
include 'mcmod.info'
|
||||
// this will ensure that this task is redone when the versions change.
|
||||
inputs.property "version", project.version
|
||||
inputs.property "mcversion", project.minecraft.version
|
||||
|
||||
// replace modVersion and minecraftVersion
|
||||
expand "minecraftVersion": project.minecraft.version,
|
||||
"modVersion": modVersion,
|
||||
"modId": modId,
|
||||
"modName": modName
|
||||
}
|
||||
// replace stuff in mcmod.info, nothing else
|
||||
from(sourceSets.main.resources.srcDirs) {
|
||||
include 'mcmod.info'
|
||||
|
||||
if(usesMixins.toBoolean()) {
|
||||
from refMap
|
||||
}
|
||||
// replace version and mcversion
|
||||
expand 'version': project.version, 'mcversion': project.minecraft.version
|
||||
}
|
||||
|
||||
// copy everything else that's not the mcmod.info
|
||||
from(sourceSets.main.resources.srcDirs) {
|
||||
exclude 'mcmod.info'
|
||||
}
|
||||
// copy everything else, thats not the mcmod.info
|
||||
from(sourceSets.main.resources.srcDirs) {
|
||||
exclude 'mcmod.info'
|
||||
exclude '**/*.md'
|
||||
}
|
||||
|
||||
// Move access transformers to META-INF
|
||||
rename '(.+_at.cfg)', 'META-INF/$1'
|
||||
}
|
||||
|
||||
def getManifestAttributes() {
|
||||
def manifestAttributes = [:]
|
||||
if(!containsMixinsAndOrCoreModOnly.toBoolean() && (usesMixins.toBoolean() || coreModClass)) {
|
||||
manifestAttributes += ["FMLCorePluginContainsFMLMod": true]
|
||||
}
|
||||
// prevent java 8's strict doclint for javadocs from failing builds
|
||||
allprojects {
|
||||
tasks.withType(Javadoc) {
|
||||
options.addStringOption('Xdoclint:none', '-quiet')
|
||||
}
|
||||
}
|
||||
|
||||
if(accessTransformersFile) {
|
||||
manifestAttributes += ["FMLAT" : accessTransformersFile.toString()]
|
||||
}
|
||||
|
||||
if(coreModClass) {
|
||||
manifestAttributes += ["FMLCorePlugin": modGroup + "." + coreModClass]
|
||||
}
|
||||
|
||||
if(usesMixins.toBoolean()) {
|
||||
manifestAttributes += [
|
||||
"TweakClass" : "org.spongepowered.asm.launch.MixinTweaker",
|
||||
"MixinConfigs" : "mixins." + modId + ".json",
|
||||
"ForceLoadAsMod" : !containsMixinsAndOrCoreModOnly.toBoolean()
|
||||
]
|
||||
}
|
||||
return manifestAttributes
|
||||
jar {
|
||||
manifest {
|
||||
attributes 'FMLAT': 'forestry_at.cfg'
|
||||
}
|
||||
}
|
||||
|
||||
task sourcesJar(type: Jar) {
|
||||
from (sourceSets.main.allSource)
|
||||
from (file("$projectDir/LICENSE"))
|
||||
getArchiveClassifier().set('sources')
|
||||
}
|
||||
|
||||
task shadowDevJar(type: ShadowJar) {
|
||||
project.configurations.shadeCompile.each { dep ->
|
||||
from(project.zipTree(dep)) {
|
||||
exclude 'META-INF', 'META-INF/**'
|
||||
}
|
||||
}
|
||||
|
||||
from sourceSets.main.output
|
||||
getArchiveClassifier().set("dev")
|
||||
|
||||
manifest {
|
||||
attributes(getManifestAttributes())
|
||||
}
|
||||
|
||||
minimize() // This will only allow shading for actually used classes
|
||||
configurations = [project.configurations.shadowImplementation, project.configurations.shadowCompile]
|
||||
}
|
||||
|
||||
task relocateShadowDevJar(type: ConfigureShadowRelocation) {
|
||||
target = tasks.shadowDevJar
|
||||
prefix = modGroup + ".shadow"
|
||||
}
|
||||
|
||||
task circularResolverJar(type: Jar) {
|
||||
dependsOn(relocateShadowDevJar)
|
||||
dependsOn(shadowDevJar)
|
||||
enabled = false
|
||||
}
|
||||
|
||||
task devJar(type: Jar) {
|
||||
project.configurations.shadeCompile.each { dep ->
|
||||
from(project.zipTree(dep)) {
|
||||
exclude 'META-INF', 'META-INF/**'
|
||||
}
|
||||
}
|
||||
|
||||
from sourceSets.main.output
|
||||
getArchiveClassifier().set("dev")
|
||||
|
||||
manifest {
|
||||
attributes(getManifestAttributes())
|
||||
}
|
||||
|
||||
if(usesShadowedDependencies.toBoolean()) {
|
||||
dependsOn(circularResolverJar)
|
||||
enabled = false
|
||||
}
|
||||
from zipTree('build/retromapping/retromappedReplacedMain.jar') // Not sure if this is how Abrar designed it, but grab the remapped src
|
||||
classifier = 'sources'
|
||||
}
|
||||
|
||||
task apiJar(type: Jar) {
|
||||
from (sourceSets.main.allSource) {
|
||||
include modGroup.toString().replaceAll("\\.", "/") + "/" + apiPackage.toString().replaceAll("\\.", "/") + '/**'
|
||||
}
|
||||
|
||||
from (sourceSets.main.output) {
|
||||
include modGroup.toString().replaceAll("\\.", "/") + "/" + apiPackage.toString().replaceAll("\\.", "/") + '/**'
|
||||
}
|
||||
|
||||
from (sourceSets.main.resources.srcDirs) {
|
||||
include("LICENSE")
|
||||
}
|
||||
|
||||
getArchiveClassifier().set('api')
|
||||
// TODO: when FG bug is fixed, remove allSource from the api jar.
|
||||
// https://github.com/MinecraftForge/ForgeGradle/issues/369
|
||||
// Gradle should be able to pull them from the -sources jar.
|
||||
from sourceSets.main.allSource
|
||||
from sourceSets.main.output
|
||||
include 'forestry/api/**'
|
||||
classifier = 'api'
|
||||
}
|
||||
|
||||
artifacts {
|
||||
if(!noPublishedSources) {
|
||||
archives sourcesJar
|
||||
}
|
||||
archives devJar
|
||||
if(apiPackage) {
|
||||
archives apiJar
|
||||
}
|
||||
archives sourcesJar
|
||||
archives apiJar
|
||||
}
|
||||
|
||||
// The gradle metadata includes all of the additional deps that we disabled from POM generation (including forgeBin with no groupID),
|
||||
// and isn't strictly needed with the POM so just disable it.
|
||||
tasks.withType(GenerateModuleMetadata) {
|
||||
enabled = false
|
||||
uploadArchives {
|
||||
repositories {
|
||||
if (project.hasProperty('mavenDir')) {
|
||||
mavenDeployer {
|
||||
repository(url: "file://" + mavenDir)
|
||||
}
|
||||
} else {
|
||||
println 'Archives upload disabled, mavenDir in gradle.properties is missing.'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// workaround variable hiding in pom processing
|
||||
def projectConfigs = project.configurations
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
maven(MavenPublication) {
|
||||
from components.java
|
||||
if(usesShadowedDependencies.toBoolean()) {
|
||||
artifact source: shadowJar, classifier: ""
|
||||
}
|
||||
if(!noPublishedSources) {
|
||||
artifact source: sourcesJar, classifier: "sources"
|
||||
}
|
||||
artifact source: usesShadowedDependencies.toBoolean() ? shadowDevJar : devJar, classifier: "dev"
|
||||
if (apiPackage) {
|
||||
artifact source: apiJar, classifier: "api"
|
||||
}
|
||||
|
||||
groupId = System.getenv("ARTIFACT_GROUP_ID") ?: "com.github.GTNewHorizons"
|
||||
artifactId = System.getenv("ARTIFACT_ID") ?: project.name
|
||||
// Using the identified version, not project.version as it has the prepended 1.7.10
|
||||
version = System.getenv("RELEASE_VERSION") ?: identifiedVersion
|
||||
|
||||
// remove extra garbage from minecraft and minecraftDeps configuration
|
||||
pom.withXml {
|
||||
def badArtifacts = [:].withDefault {[] as Set<String>}
|
||||
for (configuration in [projectConfigs.minecraft, projectConfigs.minecraftDeps]) {
|
||||
for (dependency in configuration.allDependencies) {
|
||||
badArtifacts[dependency.group == null ? "" : dependency.group] += dependency.name
|
||||
}
|
||||
}
|
||||
// example for specifying extra stuff to ignore
|
||||
// badArtifacts["org.example.group"] += "artifactName"
|
||||
|
||||
Node pomNode = asNode()
|
||||
pomNode.dependencies.'*'.findAll() {
|
||||
badArtifacts[it.groupId.text()].contains(it.artifactId.text())
|
||||
}.each() {
|
||||
it.parent().remove(it)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven {
|
||||
url = "http://jenkins.usrv.eu:8081/nexus/content/repositories/releases"
|
||||
credentials {
|
||||
username = System.getenv("MAVEN_USER") ?: "NONE"
|
||||
password = System.getenv("MAVEN_PASSWORD") ?: "NONE"
|
||||
}
|
||||
}
|
||||
}
|
||||
def getBuildNumber() {
|
||||
return "$System.env.BUILD_NUMBER" != "null" ? "$System.env.BUILD_NUMBER" : "0"
|
||||
}
|
||||
|
||||
// Updating
|
||||
task updateBuildScript {
|
||||
doLast {
|
||||
if (performBuildScriptUpdate(projectDir.toString())) return
|
||||
|
||||
print("Build script already up-to-date!")
|
||||
}
|
||||
task makeChangelog(type: se.bjurr.gitchangelog.plugin.gradle.GitChangelogTask) {
|
||||
filePath = "changelog.html"
|
||||
untaggedName = "Current release ${project.version}"
|
||||
fromCommit = "5a3850c2642e535656d090d1473054d5fa8d3331"
|
||||
toRef = "HEAD"
|
||||
templateContent = file('changelog.mustache').getText('UTF-8')
|
||||
}
|
||||
|
||||
if (isNewBuildScriptVersionAvailable(projectDir.toString())) {
|
||||
if (autoUpdateBuildScript.toBoolean()) {
|
||||
performBuildScriptUpdate(projectDir.toString())
|
||||
} else {
|
||||
out.style(Style.SuccessHeader).println("Build script update available! Run 'gradle updateBuildScript'")
|
||||
}
|
||||
curseforge {
|
||||
apiKey = project.hasProperty('curseforge_apikey') ? project.curseforge_apikey : '0'
|
||||
project {
|
||||
id = curse_project_id
|
||||
changelog = file('changelog.html')
|
||||
changelogType = 'html'
|
||||
releaseType = 'beta'
|
||||
}
|
||||
}
|
||||
|
||||
static URL availableBuildScriptUrl() {
|
||||
new URL("https://raw.githubusercontent.com/GTNewHorizons/ExampleMod1.7.10/main/build.gradle")
|
||||
}
|
||||
|
||||
boolean performBuildScriptUpdate(String projectDir) {
|
||||
if (isNewBuildScriptVersionAvailable(projectDir)) {
|
||||
def buildscriptFile = getFile("build.gradle")
|
||||
availableBuildScriptUrl().withInputStream { i -> buildscriptFile.withOutputStream { it << i } }
|
||||
out.style(Style.Success).print("Build script updated. Please REIMPORT the project or RESTART your IDE!")
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
boolean isNewBuildScriptVersionAvailable(String projectDir) {
|
||||
Map parameters = ["connectTimeout": 2000, "readTimeout": 2000]
|
||||
|
||||
String currentBuildScript = getFile("build.gradle").getText()
|
||||
String currentBuildScriptHash = getVersionHash(currentBuildScript)
|
||||
String availableBuildScript = availableBuildScriptUrl().newInputStream(parameters).getText()
|
||||
String availableBuildScriptHash = getVersionHash(availableBuildScript)
|
||||
|
||||
boolean isUpToDate = currentBuildScriptHash.empty || availableBuildScriptHash.empty || currentBuildScriptHash == availableBuildScriptHash
|
||||
return !isUpToDate
|
||||
}
|
||||
|
||||
static String getVersionHash(String buildScriptContent) {
|
||||
String versionLine = buildScriptContent.find("^//version: [a-z0-9]*")
|
||||
if(versionLine != null) {
|
||||
return versionLine.split(": ").last()
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
configure(updateBuildScript) {
|
||||
group = 'forgegradle'
|
||||
description = 'Updates the build script to the latest version'
|
||||
}
|
||||
|
||||
// Deobfuscation
|
||||
|
||||
def deobf(String sourceURL) {
|
||||
try {
|
||||
URL url = new URL(sourceURL)
|
||||
String fileName = url.getFile()
|
||||
|
||||
//get rid of directories:
|
||||
int lastSlash = fileName.lastIndexOf("/")
|
||||
if(lastSlash > 0) {
|
||||
fileName = fileName.substring(lastSlash + 1)
|
||||
}
|
||||
//get rid of extension:
|
||||
if(fileName.endsWith(".jar")) {
|
||||
fileName = fileName.substring(0, fileName.lastIndexOf("."))
|
||||
}
|
||||
|
||||
String hostName = url.getHost()
|
||||
if(hostName.startsWith("www.")) {
|
||||
hostName = hostName.substring(4)
|
||||
}
|
||||
List parts = Arrays.asList(hostName.split("\\."))
|
||||
Collections.reverse(parts)
|
||||
hostName = String.join(".", parts)
|
||||
|
||||
return deobf(sourceURL, hostName + "/" + fileName)
|
||||
} catch(Exception e) {
|
||||
return deobf(sourceURL, "deobf/" + String.valueOf(sourceURL.hashCode()))
|
||||
}
|
||||
}
|
||||
|
||||
// The method above is to be preferred. Use this method if the filename is not at the end of the URL.
|
||||
def deobf(String sourceURL, String fileName) {
|
||||
String cacheDir = System.getProperty("user.home") + "/.gradle/caches/"
|
||||
String bon2Dir = cacheDir + "forge_gradle/deobf"
|
||||
String bon2File = bon2Dir + "/BON2-2.5.0.jar"
|
||||
String obfFile = cacheDir + "modules-2/files-2.1/" + fileName + ".jar"
|
||||
String deobfFile = cacheDir + "modules-2/files-2.1/" + fileName + "-deobf.jar"
|
||||
|
||||
if(file(deobfFile).exists()) {
|
||||
return files(deobfFile)
|
||||
}
|
||||
|
||||
download.run {
|
||||
src 'https://github.com/GTNewHorizons/BON2/releases/download/2.5.0/BON2-2.5.0.CUSTOM-all.jar'
|
||||
dest bon2File
|
||||
quiet true
|
||||
overwrite false
|
||||
}
|
||||
|
||||
download.run {
|
||||
src sourceURL
|
||||
dest obfFile
|
||||
quiet true
|
||||
overwrite false
|
||||
}
|
||||
|
||||
exec {
|
||||
commandLine 'java', '-jar', bon2File, '--inputJar', obfFile, '--outputJar', deobfFile, '--mcVer', '1.7.10', '--mappingsVer', 'stable_12', '--notch'
|
||||
workingDir bon2Dir
|
||||
standardOutput = new ByteArrayOutputStream()
|
||||
}
|
||||
|
||||
return files(deobfFile)
|
||||
}
|
||||
|
||||
// Helper methods
|
||||
|
||||
def checkPropertyExists(String propertyName) {
|
||||
if (!project.hasProperty(propertyName)) {
|
||||
throw new GradleException("This project requires a property \"" + propertyName + "\"! Please add it your \"gradle.properties\". You can find all properties and their description here: https://github.com/GTNewHorizons/ExampleMod1.7.10/blob/main/gradle.properties")
|
||||
}
|
||||
}
|
||||
|
||||
def getFile(String relativePath) {
|
||||
return new File(projectDir, relativePath)
|
||||
afterEvaluate {
|
||||
tasks.curseforge59751.dependsOn.add(makeChangelog)
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
Please help the Forestry project by <a href="https://github.com/ForestryMC/ForestryMC/issues">reporting issues here.</a><br/>
|
||||
{{#tags}}
|
||||
<h3>{{name}}</h3>
|
||||
<ul>
|
||||
{{#commits}}
|
||||
<li>{{{message}}} - {{authorName}}</li>
|
||||
{{/commits}}
|
||||
</ul>
|
||||
{{/tags}}
|
||||
@@ -4,3 +4,4 @@ GenuineSounds;[email protected];2015-02-26
|
||||
airbreather;[email protected];2015-04-10
|
||||
ganymedes01;[email protected];2015-05-27
|
||||
infinityraider;theoneandonlyraider@gmail;com;2015-10-03
|
||||
girafistudios;[email protected];2016-06-02
|
||||
@@ -1,12 +0,0 @@
|
||||
// Add your dependencies here
|
||||
|
||||
dependencies {
|
||||
compile('com.github.GTNewHorizons:NotEnoughItems:2.2.7-GTNH:dev')
|
||||
compile('com.github.GTNewHorizons:inventory-tweaks:1.5.14:api')
|
||||
compile('com.github.GTNewHorizons:BuildCraft:7.1.27:api')
|
||||
compile('net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev')
|
||||
|
||||
compile('curse.maven:cofh-lib-220333:2388748')
|
||||
|
||||
compileOnly('curse.maven:craftguide-75557:2459320')
|
||||
}
|
||||
Binary file not shown.
+15
-59
@@ -1,60 +1,16 @@
|
||||
modName = Forestry
|
||||
mcversion=1.12.2
|
||||
forgeversion=14.23.4.2705
|
||||
mcp_mappings=snapshot_20171003
|
||||
curse_project_id=59751
|
||||
|
||||
# This is a case-sensitive string to identify your mod. Convention is to use lower case.
|
||||
modId = Forestry
|
||||
|
||||
modGroup = forestry
|
||||
|
||||
# WHY is there no version field?
|
||||
# The build script relies on git to provide a version via tags. It is super easy and will enable you to always know the
|
||||
# code base or your binary. Check out this tutorial: https://blog.mattclemente.com/2017/10/13/versioning-with-git-tags/
|
||||
|
||||
# Will update your build.gradle automatically whenever an update is available
|
||||
autoUpdateBuildScript = false
|
||||
|
||||
minecraftVersion = 1.7.10
|
||||
forgeVersion = 10.13.4.1614
|
||||
|
||||
# Select a username for testing your mod with breakpoints. You may leave this empty for a random username each time you
|
||||
# restart Minecraft in development. Choose this dependent on your mod:
|
||||
# Do you need consistent player progressing (for example Thaumcraft)? -> Select a name
|
||||
# Do you need to test how your custom blocks interacts with a player that is not the owner? -> leave name empty
|
||||
developmentEnvironmentUserName = Developer
|
||||
|
||||
# Define a source file of your project with:
|
||||
# public static final String VERSION = "GRADLETOKEN_VERSION";
|
||||
# The string's content will be replaced with your mod's version when compiled. You should use this to specify your mod's
|
||||
# version in @Mod([...], version = VERSION, [...])
|
||||
# Leave these properties empty to skip individual token replacements
|
||||
replaceGradleTokenInFile = Constants.java
|
||||
gradleTokenModId =
|
||||
gradleTokenModName =
|
||||
gradleTokenVersion = GRADLETOKEN_VERSION
|
||||
gradleTokenGroupName =
|
||||
|
||||
# In case your mod provides an API for other mods to implement you may declare its package here. Otherwise, you can
|
||||
# leave this property empty.
|
||||
# Example value: apiPackage = api + modGroup = com.myname.mymodid -> com.myname.mymodid.api
|
||||
apiPackage = api
|
||||
|
||||
# Specify the configuration file for Forge's access transformers here. It must be placed into /src/main/resources/META-INF/
|
||||
# Example value: mymodid_at.cfg
|
||||
accessTransformersFile =
|
||||
|
||||
# Provides setup for Mixins if enabled. If you don't know what mixins are: Keep it disabled!
|
||||
usesMixins = false
|
||||
# Specify the location of your implementation of IMixinConfigPlugin. Leave it empty otherwise.
|
||||
mixinPlugin =
|
||||
# Specify the package that contains all of your Mixins. You may only place Mixins in this package or the build will fail!
|
||||
mixinsPackage =
|
||||
# Specify the core mod entry class if you use a core mod. This class must implement IFMLLoadingPlugin!
|
||||
# This parameter is for legacy compatibility only
|
||||
# Example value: coreModClass = asm.FMLPlugin + modGroup = com.myname.mymodid -> com.myname.mymodid.asm.FMLPlugin
|
||||
coreModClass =
|
||||
# If your project is only a consolidation of mixins or a core mod and does NOT contain a 'normal' mod ( = some class
|
||||
# that is annotated with @Mod) you want this to be true. When in doubt: leave it on false!
|
||||
containsMixinsAndOrCoreModOnly = false
|
||||
|
||||
# If enabled, you may use 'shadowImplementation' for dependencies. They will be integrated in your jar. It is your
|
||||
# responsibility check the licence and request permission for distribution, if required.
|
||||
usesShadowedDependencies = false
|
||||
tesla_version=1.0.60
|
||||
tesla_mcversion=1.12
|
||||
jei_version=4.10.0.200
|
||||
jei_mcversion=1.12.2
|
||||
ic2_version=2.8.90-ex112
|
||||
TR_mcversion=1.12.2
|
||||
TR_version=2.13.2.561
|
||||
buildcraft_version=7.99.17
|
||||
version_major=5
|
||||
version_minor=8
|
||||
version_patch=1
|
||||
Vendored
BIN
Binary file not shown.
+6
-5
@@ -1,5 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.9.1-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
#Mon Jul 03 15:24:47 PDT 2017
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.0-all.zip
|
||||
@@ -1,20 +1,4 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
#
|
||||
# Copyright 2015 the original author or authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# https://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
#!/usr/bin/env bash
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
@@ -22,6 +6,42 @@
|
||||
##
|
||||
##############################################################################
|
||||
|
||||
# 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
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
# Resolve links: $0 may be a link
|
||||
PRG="$0"
|
||||
@@ -36,49 +56,9 @@ while [ -h "$PRG" ] ; do
|
||||
fi
|
||||
done
|
||||
SAVED="`pwd`"
|
||||
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||
cd "`dirname \"$PRG\"`/" >&-
|
||||
APP_HOME="`pwd -P`"
|
||||
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
|
||||
cd "$SAVED" >&-
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
@@ -105,7 +85,7 @@ location of your Java installation."
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
|
||||
MAX_FD_LIMIT=`ulimit -H -n`
|
||||
if [ $? -eq 0 ] ; then
|
||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||
@@ -125,8 +105,8 @@ if $darwin; then
|
||||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||
fi
|
||||
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
||||
# For Cygwin, switch paths to Windows format before running java
|
||||
if $cygwin ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||
@@ -170,19 +150,11 @@ if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
||||
esac
|
||||
fi
|
||||
|
||||
# Escape application args
|
||||
save () {
|
||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||
echo " "
|
||||
# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
|
||||
function splitJvmOpts() {
|
||||
JVM_OPTS=("$@")
|
||||
}
|
||||
APP_ARGS=$(save "$@")
|
||||
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
|
||||
JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
|
||||
|
||||
# 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" "$@"
|
||||
exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
|
||||
Vendored
+10
-20
@@ -1,19 +1,3 @@
|
||||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@@ -24,14 +8,14 @@
|
||||
@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 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="-Xmx64m" "-Xms64m"
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
@@ -62,9 +46,10 @@ echo location of your Java installation.
|
||||
goto fail
|
||||
|
||||
:init
|
||||
@rem Get command-line arguments, handling Windows variants
|
||||
@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.
|
||||
@@ -75,6 +60,11 @@ set _SKIP=2
|
||||
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
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
before_install:
|
||||
- ./gradlew setupCIWorkspace
|
||||
@@ -0,0 +1,12 @@
|
||||
/*
|
||||
*******************************************************************************
|
||||
* Copyright (c) 2011-2014 SirSengir.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the GNU Lesser Public License v3
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*
|
||||
* Various Contributors including, but not limited to:
|
||||
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
|
||||
*******************************************************************************
|
||||
*/
|
||||
@@ -1,26 +0,0 @@
|
||||
// Add any additional repositiroes for your dependencies here
|
||||
|
||||
repositories {
|
||||
maven {
|
||||
name 'GTNH Maven'
|
||||
url 'http://jenkins.usrv.eu:8081/nexus/content/groups/public/'
|
||||
allowInsecureProtocol
|
||||
}
|
||||
maven {
|
||||
name 'ic2'
|
||||
url 'http://maven.ic2.player.to/'
|
||||
metadataSources {
|
||||
mavenPom()
|
||||
artifact()
|
||||
}
|
||||
}
|
||||
maven {
|
||||
url 'https://cursemaven.com'
|
||||
content {
|
||||
includeGroup 'curse.maven'
|
||||
}
|
||||
}
|
||||
maven {
|
||||
url 'https://jitpack.io'
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
## Inventory Tweaks Mod license (MIT)
|
||||
|
||||
Copyright (c) 2011-2013 Marwane Kalam-Alami
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
* Copyright (c) 2013 Andrew Crocker
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
package invtweaks.api;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public interface IItemTree {
|
||||
void registerOre(String category, String name, String oreName, int order);
|
||||
|
||||
boolean matches(List<IItemTreeItem> items, String keyword);
|
||||
|
||||
boolean isKeywordValid(String keyword);
|
||||
|
||||
Collection<IItemTreeCategory> getAllCategories();
|
||||
|
||||
IItemTreeCategory getRootCategory();
|
||||
|
||||
void setRootCategory(IItemTreeCategory category);
|
||||
|
||||
IItemTreeCategory getCategory(String keyword);
|
||||
|
||||
boolean isItemUnknown(String id, int damage);
|
||||
|
||||
List<IItemTreeItem> getItems(String id, int damage);
|
||||
|
||||
List<IItemTreeItem> getItems(String name);
|
||||
|
||||
IItemTreeItem getRandomItem(Random r);
|
||||
|
||||
boolean containsItem(String name);
|
||||
|
||||
boolean containsCategory(String name);
|
||||
|
||||
IItemTreeCategory addCategory(String parentCategory, String newCategory) throws NullPointerException;
|
||||
|
||||
void addCategory(String parentCategory, IItemTreeCategory newCategory) throws NullPointerException;
|
||||
|
||||
IItemTreeItem addItem(String parentCategory, String name, String id, int damage, int order)
|
||||
throws NullPointerException;
|
||||
|
||||
void addItem(String parentCategory, IItemTreeItem newItem) throws NullPointerException;
|
||||
|
||||
int getKeywordDepth(String keyword);
|
||||
|
||||
int getKeywordOrder(String keyword);
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* Copyright (c) 2013 Andrew Crocker
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
package invtweaks.api;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public interface IItemTreeCategory {
|
||||
boolean contains(IItemTreeItem item);
|
||||
|
||||
void addCategory(IItemTreeCategory category);
|
||||
|
||||
void addItem(IItemTreeItem item);
|
||||
|
||||
Collection<IItemTreeCategory> getSubCategories();
|
||||
|
||||
Collection<List<IItemTreeItem>> getItems();
|
||||
|
||||
String getName();
|
||||
|
||||
int getCategoryOrder();
|
||||
|
||||
int findCategoryOrder(String keyword);
|
||||
|
||||
int findKeywordDepth(String keyword);
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* Copyright (c) 2013 Andrew Crocker
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
package invtweaks.api;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public interface IItemTreeItem extends Comparable<IItemTreeItem> {
|
||||
String getName();
|
||||
|
||||
String getId();
|
||||
|
||||
int getDamage();
|
||||
|
||||
int getOrder();
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Copyright (c) 2013 Andrew Crocker
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
package invtweaks.api;
|
||||
|
||||
import java.util.EventListener;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public interface IItemTreeListener extends EventListener {
|
||||
void onTreeLoaded(IItemTree tree);
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
/*
|
||||
* Copyright (c) 2013 Andrew Crocker
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
package invtweaks.api;
|
||||
|
||||
import invtweaks.api.container.ContainerSection;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
/**
|
||||
* Interface to access functions exposed by Inventory Tweaks
|
||||
* <p/>
|
||||
* The main @Mod instance of the mod implements this interface, so a refernce to it can
|
||||
* be obtained via @Instance("inventorytweaks") or methods in net.minecraftforge.fml.common.Loader
|
||||
* <p/>
|
||||
* All of these functions currently have no effect if called on a dedicated server.
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
public interface InvTweaksAPI {
|
||||
/**
|
||||
* Add a listener for ItemTree load events
|
||||
*/
|
||||
void addOnLoadListener(IItemTreeListener listener);
|
||||
|
||||
/**
|
||||
* Remove a listener for ItemTree load events
|
||||
*
|
||||
* @return true if the listener was previously added
|
||||
*/
|
||||
boolean removeOnLoadListener(IItemTreeListener listener);
|
||||
|
||||
/**
|
||||
* Toggle sorting shortcut state.
|
||||
*/
|
||||
void setSortKeyEnabled(boolean enabled);
|
||||
|
||||
/**
|
||||
* Toggle sorting shortcut supression.
|
||||
* Unlike setSortKeyEnabled, this flag is automatically cleared when GUIs are closed.
|
||||
*/
|
||||
void setTextboxMode(boolean enabled);
|
||||
|
||||
/**
|
||||
* Compare two items using the default (non-rule based) algorithm,
|
||||
* sutable for an implementation of Comparator<ItemStack>.
|
||||
*
|
||||
* @param i
|
||||
* @param j
|
||||
* @return A value with a sign representing the relative order of the item stacks
|
||||
*/
|
||||
int compareItems(ItemStack i, ItemStack j);
|
||||
|
||||
/**
|
||||
* Initiate a sort as if the player had clicked on a sorting button or pressed the sort key.
|
||||
*/
|
||||
void sort(ContainerSection section, SortingMethod method);
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* Copyright (c) 2013 Andrew Crocker
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
package invtweaks.api;
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
public enum SortingMethod {
|
||||
/**
|
||||
* Standard 'r' sorting for generic inventories
|
||||
*/
|
||||
DEFAULT,
|
||||
/**
|
||||
* Sort method creating vertical columns of items.
|
||||
* Used for chests only, requires container to have a valid row size for correct results.
|
||||
*/
|
||||
VERTICAL,
|
||||
/**
|
||||
* Sort method creating horizontal rows of items.
|
||||
* Used for chests only, requires container to have a valid row size for correct results.
|
||||
*/
|
||||
HORIZONTAL,
|
||||
/**
|
||||
* Sort method for player inventory.
|
||||
* Applies to extra player-specified sorting rules for the main inventory.
|
||||
* Will always operate on main inventory.
|
||||
*/
|
||||
INVENTORY,
|
||||
/**
|
||||
* Attempts to even the number of items in each stack of the same type of item, without moving full stacks.
|
||||
* Used in crafting grid sorting.
|
||||
*/
|
||||
EVEN_STACKS,
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package invtweaks.api.container;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* A marker for containers that have a chest-like persistant storage component. Enables the Inventroy Tweaks sorting
|
||||
* buttons for this container.
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.TYPE)
|
||||
public @interface ChestContainer {
|
||||
// Set to true if the Inventory Tweaks sorting buttons should be shown for this container.
|
||||
boolean showButtons() default true;
|
||||
|
||||
// Size of a chest row
|
||||
int rowSize() default 9;
|
||||
|
||||
// Uses 'large chest' mode for sorting buttons
|
||||
// (Renders buttons vertically down the right side of the GUI)
|
||||
boolean isLargeChest() default false;
|
||||
|
||||
// Annotation for method to get size of a chest row if it is not a fixed size for this container class
|
||||
// Signature int func()
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.METHOD)
|
||||
@interface RowSizeCallback {
|
||||
}
|
||||
|
||||
// Annotation for method to get size of a chest row if it is not a fixed size for this container class
|
||||
// Signature int func()
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.METHOD)
|
||||
@interface IsLargeCallback {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
/*
|
||||
* Copyright (c) 2013 Andrew Crocker
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
package invtweaks.api.container;
|
||||
|
||||
/**
|
||||
* Names for specific parts of containers. For unknown container types (such as mod containers), only INVENTORY and
|
||||
* CHEST sections are available.
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
public enum ContainerSection {
|
||||
/**
|
||||
* The player's inventory
|
||||
*/
|
||||
INVENTORY,
|
||||
/**
|
||||
* The player's inventory (only the hotbar)
|
||||
*/
|
||||
INVENTORY_HOTBAR,
|
||||
/**
|
||||
* The player's inventory (all except the hotbar)
|
||||
*/
|
||||
INVENTORY_NOT_HOTBAR,
|
||||
/**
|
||||
* The chest or dispenser contents. Also used for unknown container contents.
|
||||
*/
|
||||
CHEST,
|
||||
/**
|
||||
* The crafting input
|
||||
*/
|
||||
CRAFTING_IN,
|
||||
/**
|
||||
* The crafting input, for containters that store it internally
|
||||
*/
|
||||
CRAFTING_IN_PERSISTENT,
|
||||
/**
|
||||
* The crafting output
|
||||
*/
|
||||
CRAFTING_OUT,
|
||||
/**
|
||||
* The armor slots
|
||||
*/
|
||||
ARMOR,
|
||||
/**
|
||||
* The furnace input
|
||||
*/
|
||||
FURNACE_IN,
|
||||
/**
|
||||
* The furnace output
|
||||
*/
|
||||
FURNACE_OUT,
|
||||
/**
|
||||
* The furnace fuel
|
||||
*/
|
||||
FURNACE_FUEL,
|
||||
/**
|
||||
* The enchantment table slot
|
||||
*/
|
||||
ENCHANTMENT,
|
||||
/**
|
||||
* The three bottles slots in brewing tables
|
||||
* NOTE: Do not use without also using BREWING_INGREDIENT.
|
||||
*/
|
||||
BREWING_BOTTLES,
|
||||
/**
|
||||
* The top slot in brewing tables
|
||||
* NOTE: Do not use without also using BREWING_BOTTLES.
|
||||
*/
|
||||
BREWING_INGREDIENT
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package invtweaks.api.container;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* A marker for a method to call which returns the set of ContainerSections for this container.
|
||||
* <p/>
|
||||
* Signature of the method should be Map<ContainerSection, List<Slot>> func()
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.METHOD)
|
||||
public @interface ContainerSectionCallback {
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package invtweaks.api.container;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* Use this annotation to override inherited annotation properties and mark a Container as unsortable.
|
||||
* This effect is inherited as well.
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.TYPE)
|
||||
public @interface IgnoreContainer {
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package invtweaks.api.container;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* A marker for containers that need special treatment, such as crafting inputs or alternate player inventory positions,
|
||||
* but do not have a chest-like component.
|
||||
* <p/>
|
||||
* Does not enable the Inventory Tweaks sorting buttons for this container.
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.TYPE)
|
||||
public @interface InventoryContainer {
|
||||
// Set to true if the Inventory Tweaks options button should be shown for this container.
|
||||
// (For instance, if you are replacing a vanilla container such as the player's inventory)
|
||||
boolean showOptions() default true;
|
||||
}
|
||||
Regular → Executable
+88
-69
@@ -10,32 +10,41 @@
|
||||
******************************************************************************/
|
||||
package forestry;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.io.File;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import forestry.plugins.ForestryCompatPlugins;
|
||||
import forestry.plugins.PluginBuildCraftFuels;
|
||||
import forestry.plugins.PluginIC2;
|
||||
import forestry.plugins.PluginNatura;
|
||||
import forestry.plugins.PluginTechReborn;
|
||||
import net.minecraft.item.Item;
|
||||
|
||||
import net.minecraftforge.client.event.ModelRegistryEvent;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.RegistryEvent;
|
||||
import net.minecraftforge.fluids.FluidRegistry;
|
||||
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.Mod;
|
||||
import cpw.mods.fml.common.Mod.EventHandler;
|
||||
import cpw.mods.fml.common.ModAPIManager;
|
||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms.IMCEvent;
|
||||
import cpw.mods.fml.common.event.FMLMissingMappingsEvent;
|
||||
import cpw.mods.fml.common.event.FMLMissingMappingsEvent.MissingMapping;
|
||||
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLServerStartingEvent;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.common.registry.GameRegistry.Type;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.fml.common.Mod.EventHandler;
|
||||
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLInterModComms;
|
||||
import net.minecraftforge.fml.common.event.FMLInterModComms.IMCEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLServerStartingEvent;
|
||||
import net.minecraftforge.fml.common.eventhandler.EventPriority;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.network.NetworkRegistry;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
|
||||
import forestry.api.core.ForestryAPI;
|
||||
import forestry.core.ClimateManager;
|
||||
import forestry.api.core.ForestryEvent;
|
||||
import forestry.core.EventHandlerCore;
|
||||
import forestry.core.advancements.AdvancementManager;
|
||||
import forestry.core.climate.ClimateStates;
|
||||
import forestry.core.config.Config;
|
||||
import forestry.core.config.Constants;
|
||||
import forestry.core.config.GameMode;
|
||||
@@ -45,10 +54,10 @@ import forestry.core.gui.GuiHandler;
|
||||
import forestry.core.multiblock.MultiblockEventHandler;
|
||||
import forestry.core.network.PacketHandler;
|
||||
import forestry.core.proxy.Proxies;
|
||||
import forestry.core.utils.Log;
|
||||
import forestry.core.utils.StringUtil;
|
||||
import forestry.core.utils.MigrationHelper;
|
||||
import forestry.core.worldgen.WorldGenerator;
|
||||
import forestry.plugins.PluginManager;
|
||||
import forestry.modules.ForestryModules;
|
||||
import forestry.modules.ModuleManager;
|
||||
|
||||
/**
|
||||
* Forestry Minecraft Mod
|
||||
@@ -56,52 +65,83 @@ import forestry.plugins.PluginManager;
|
||||
* @author SirSengir
|
||||
*/
|
||||
@Mod(
|
||||
modid = Constants.MOD,
|
||||
name = Constants.MOD,
|
||||
modid = Constants.MOD_ID,
|
||||
name = Constants.MOD_NAME,
|
||||
version = Constants.VERSION,
|
||||
guiFactory = "forestry.core.config.ForestryGuiConfigFactory",
|
||||
dependencies = "required-after:Forge@[10.13.4.1566,);"
|
||||
+ "after:Buildcraft|Core@[6.1.7,);"
|
||||
+ "after:ExtrabiomesXL;"
|
||||
+ "after:BiomesOPlenty;"
|
||||
+ "after:IC2@[2.0.140,);"
|
||||
+ "after:Natura@[2.2.0,);"
|
||||
+ "after:HardcoreEnderExpansion;")
|
||||
acceptedMinecraftVersions = "[1.12.2,1.13.0)",
|
||||
dependencies = "required-after:forge@[14.23.4.2705,);"
|
||||
+ "after:jei@[4.7.8.91,);"
|
||||
+ "after:" + PluginIC2.MOD_ID + ";"
|
||||
+ "after:" + PluginNatura.MOD_ID + ";"
|
||||
+ "after:toughasnails;"
|
||||
+ "after:" + PluginTechReborn.MOD_ID + ";"
|
||||
+ "after:" + PluginBuildCraftFuels.MOD_ID + ";")
|
||||
public class Forestry {
|
||||
|
||||
@Mod.Instance(Constants.MOD)
|
||||
@SuppressWarnings("NullableProblems")
|
||||
@Mod.Instance(Constants.MOD_ID)
|
||||
public static Forestry instance;
|
||||
@Nullable
|
||||
private File configFolder;
|
||||
|
||||
public Forestry() {
|
||||
ForestryAPI.instance = this;
|
||||
ForestryAPI.climateManager = new ClimateManager();
|
||||
ForestryAPI.forestryConstants = new Constants();
|
||||
ForestryAPI.errorStateRegistry = new ErrorStateRegistry();
|
||||
ForestryAPI.states = ClimateStates.INSTANCE;
|
||||
EnumErrorCode.init();
|
||||
FluidRegistry.enableUniversalBucket();
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
ModuleManager moduleManager = ModuleManager.getInstance();
|
||||
ForestryAPI.moduleManager = moduleManager;
|
||||
moduleManager.registerContainers(new ForestryModules(), new ForestryCompatPlugins());
|
||||
}
|
||||
|
||||
public static PacketHandler packetHandler;
|
||||
@Nullable
|
||||
private static PacketHandler packetHandler;
|
||||
|
||||
public static PacketHandler getPacketHandler() {
|
||||
Preconditions.checkNotNull(packetHandler);
|
||||
return packetHandler;
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void preInit(FMLPreInitializationEvent event) {
|
||||
checkForCoFHLib();
|
||||
packetHandler = new PacketHandler();
|
||||
|
||||
// Register event handler
|
||||
EventHandlerCore eventHandlerCore = new EventHandlerCore();
|
||||
MinecraftForge.EVENT_BUS.register(eventHandlerCore);
|
||||
FMLCommonHandler.instance().bus().register(eventHandlerCore);
|
||||
MinecraftForge.EVENT_BUS.register(new MultiblockEventHandler());
|
||||
MinecraftForge.EVENT_BUS.register(Config.class);
|
||||
Proxies.common.registerEventHandlers();
|
||||
|
||||
configFolder = new File(event.getModConfigurationDirectory(), "forestry");
|
||||
Config.load();
|
||||
configFolder = new File(event.getModConfigurationDirectory(), Constants.MOD_ID);
|
||||
Config.load(event.getSide());
|
||||
|
||||
PluginManager.runSetup();
|
||||
MinecraftForge.EVENT_BUS.post(new ForestryEvent.PreInit(this, event));
|
||||
|
||||
ForestryAPI.activeMode = new GameMode(Config.gameMode);
|
||||
ModuleManager.runSetup(event);
|
||||
ModuleManager.getInternalHandler().runSetup();
|
||||
|
||||
PluginManager.runPreInit();
|
||||
String gameMode = Config.gameMode;
|
||||
Preconditions.checkNotNull(gameMode);
|
||||
ForestryAPI.activeMode = new GameMode(gameMode);
|
||||
|
||||
MigrationHelper.registerFixable();
|
||||
|
||||
ModuleManager.getInternalHandler().runPreInit(event.getSide());
|
||||
}
|
||||
|
||||
@SubscribeEvent(priority = EventPriority.LOWEST)
|
||||
public void registerItems(RegistryEvent.Register<Item> event) {
|
||||
ModuleManager.getInternalHandler().runRegisterBackpacksAndCrates();
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void registerModels(ModelRegistryEvent event) {
|
||||
Proxies.render.registerModels();
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
@@ -109,12 +149,15 @@ public class Forestry {
|
||||
// Register gui handler
|
||||
NetworkRegistry.INSTANCE.registerGuiHandler(this, new GuiHandler());
|
||||
|
||||
PluginManager.runInit();
|
||||
ModuleManager.getInternalHandler().runInit();
|
||||
|
||||
Proxies.render.registerItemAndBlockColors();
|
||||
AdvancementManager.registerTriggers();
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void postInit(FMLPostInitializationEvent event) {
|
||||
PluginManager.runPostInit();
|
||||
ModuleManager.getInternalHandler().runPostInit();
|
||||
|
||||
// Register world generator
|
||||
WorldGenerator worldGenerator = new WorldGenerator();
|
||||
@@ -124,45 +167,21 @@ public class Forestry {
|
||||
Proxies.common.registerTickHandlers(worldGenerator);
|
||||
|
||||
// Handle IMC messages.
|
||||
PluginManager.processIMCMessages(FMLInterModComms.fetchRuntimeMessages(ForestryAPI.instance));
|
||||
ModuleManager.getInternalHandler().processIMCMessages(FMLInterModComms.fetchRuntimeMessages(ForestryAPI.instance));
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void serverStarting(FMLServerStartingEvent event) {
|
||||
PluginManager.serverStarting(event.getServer());
|
||||
ModuleManager.serverStarting(event.getServer());
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public File getConfigFolder() {
|
||||
return configFolder;
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void processIMCMessages(IMCEvent event) {
|
||||
PluginManager.processIMCMessages(event.getMessages());
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void missingMapping(FMLMissingMappingsEvent event) {
|
||||
for (MissingMapping mapping : event.get()) {
|
||||
if (mapping.type == Type.BLOCK) {
|
||||
Block block = GameRegistry.findBlock(Constants.MOD, StringUtil.cleanTags(mapping.name));
|
||||
if (block != null) {
|
||||
mapping.remap(block);
|
||||
Log.warning("Remapping block " + mapping.name + " to " + StringUtil.cleanBlockName(block));
|
||||
}
|
||||
} else {
|
||||
Item item = GameRegistry.findItem(Constants.MOD, StringUtil.cleanTags(mapping.name));
|
||||
if (item != null) {
|
||||
mapping.remap(item);
|
||||
Log.warning("Remapping item " + mapping.name + " to " + StringUtil.cleanItemName(item));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void checkForCoFHLib() {
|
||||
if (!ModAPIManager.INSTANCE.hasAPI("CoFHAPI|energy")) {
|
||||
throw new RuntimeException("CoFHAPI|energy could not be found! This version of Forestry does not contain the RedstoneFlux API anymore, so you have to install either CoFHLib or CoFHCore.");
|
||||
}
|
||||
ModuleManager.getInternalHandler().processIMCMessages(event.getMessages());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
License („MIT“)
|
||||
|
||||
Forestry API
|
||||
|
||||
Copyright (c) 2011 - 2014 SirSengir.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
@@ -0,0 +1,26 @@
|
||||
Forestry API
|
||||
====================================
|
||||
|
||||
### What is it?
|
||||
|
||||
Forestry is a modification for the game Minecraft and known primarily for its farms and bees. This is the API for inter-mod operations.
|
||||
|
||||
### Homepage
|
||||
|
||||
[Wiki](http://forestry.sengir.net/)
|
||||
|
||||
[Forums](http://forestry.sengir.net/forum/)
|
||||
|
||||
[IRC #forestry on esper.net](http://webchat.esper.net/?nick=ForestryWiki...&channels=forestry&prompt=1)
|
||||
|
||||
### Notes
|
||||
|
||||
This is only the API. It is not intended to be used by itself, but rather for use either with Forestry itself or another mod which wants to use a functionality of Forestry.
|
||||
|
||||
Package versioning follows the rules laid out by http://semver.org/
|
||||
|
||||
Bugfixes are generally welcome. If you want to contribute something which changes game mechanics, please talk to someone with commit privileges first. Nothing is more frustrating than putting a lot of work and effort into a new game mechanic and then having the PR rejected because it doesn’t fit gameplay-wise.
|
||||
|
||||
### License & Copyright
|
||||
|
||||
Forestry API is (c) 2011 - 2014 SirSengir and licensed under MIT. See the LICENSE.txt for more information. Note that the core Forestry source is licensed differently! The Forestry API may also contain code contributed by CovertJaguar, Player, MysteriousAges, Binnie and others.
|
||||
@@ -0,0 +1,18 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.apiculture;
|
||||
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
import net.minecraftforge.common.capabilities.CapabilityInject;
|
||||
|
||||
public class ApicultureCapabilities {
|
||||
/**
|
||||
* Capability for {@link IArmorApiarist}.
|
||||
* The {@link Capability#getDefaultInstance()} will always protect the wearer with no side effects.
|
||||
*/
|
||||
@CapabilityInject(IArmorApiarist.class)
|
||||
public static Capability<IArmorApiarist> ARMOR_APIARIST;
|
||||
}
|
||||
@@ -1,54 +1,75 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.apiculture;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
/**
|
||||
*
|
||||
* Some miscellaneous lists and settings for bees.
|
||||
*
|
||||
*
|
||||
* @author SirSengir
|
||||
*/
|
||||
public class BeeManager {
|
||||
|
||||
/**
|
||||
* 0 - Common Village Bees 1 - Uncommon Village Bees (20 % of spawns)
|
||||
* Common Village Bees
|
||||
*/
|
||||
public static ArrayList<IBeeGenome>[] villageBees;
|
||||
public static List<IBeeGenome> commonVillageBees;
|
||||
/**
|
||||
* Uncommon Village Bees (20 % of spawns)
|
||||
*/
|
||||
public static List<IBeeGenome> uncommonVillageBees;
|
||||
|
||||
/**
|
||||
* List of items that can induce swarming. Integer denotes x in 1000 chance.
|
||||
*/
|
||||
public static HashMap<ItemStack, Integer> inducers = new HashMap<ItemStack, Integer>();
|
||||
public static final Map<ItemStack, Integer> inducers = new HashMap<>();
|
||||
|
||||
/**
|
||||
* Convenient access to AlleleManager.alleleRegistry.getSpeciesRoot("rootBees")
|
||||
*
|
||||
* @implNote Only null if the "apiculture" module is not enabled.
|
||||
*/
|
||||
@Nullable
|
||||
public static IBeeRoot beeRoot;
|
||||
|
||||
/**
|
||||
* Used to create new bees.
|
||||
*
|
||||
* @implNote Only null if the "apiculture" module is not enabled.
|
||||
*/
|
||||
@Nullable
|
||||
public static IBeeFactory beeFactory;
|
||||
|
||||
/**
|
||||
* Used to create new bee mutations.
|
||||
*
|
||||
* @implNote Only null if the "apiculture" module is not enabled.
|
||||
*/
|
||||
@Nullable
|
||||
public static IBeeMutationFactory beeMutationFactory;
|
||||
|
||||
/**
|
||||
* Used to get Forestry's jubilance implementations.
|
||||
*
|
||||
* @implNote Only null if the "apiculture" module is not enabled.
|
||||
*/
|
||||
@Nullable
|
||||
public static IJubilanceFactory jubilanceFactory;
|
||||
|
||||
/**
|
||||
* Used to check whether a player is wearing Apiarist Armor.
|
||||
*
|
||||
* @implNote Only null if the "apiculture" module is not enabled.
|
||||
*/
|
||||
@Nullable
|
||||
public static IArmorApiaristHelper armorApiaristHelper;
|
||||
}
|
||||
@@ -1,10 +1,12 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.apiculture;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
/**
|
||||
* Easily extendable default IBeeModifier.
|
||||
* By itself, this IBeeModifier does nothing.
|
||||
@@ -12,42 +14,52 @@ package forestry.api.apiculture;
|
||||
*/
|
||||
public class DefaultBeeModifier implements IBeeModifier {
|
||||
|
||||
@Override
|
||||
public float getTerritoryModifier(IBeeGenome genome, float currentModifier) {
|
||||
return 1.0f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getMutationModifier(IBeeGenome genome, IBeeGenome mate, float currentModifier) {
|
||||
return 1.0f;
|
||||
}
|
||||
|
||||
public float getLifespanModifier(IBeeGenome genome, IBeeGenome mate, float currentModifier) {
|
||||
@Override
|
||||
public float getLifespanModifier(IBeeGenome genome, @Nullable IBeeGenome mate, float currentModifier) {
|
||||
return 1.0f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getProductionModifier(IBeeGenome genome, float currentModifier) {
|
||||
return 1.0f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getFloweringModifier(IBeeGenome genome, float currentModifier) {
|
||||
return 1.0f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getGeneticDecay(IBeeGenome genome, float currentModifier) {
|
||||
return 1.0f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSealed() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSelfLighted() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isSunlightSimulated() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isHellish() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.apiculture;
|
||||
@@ -19,7 +19,7 @@ import forestry.api.genetics.ISpeciesRoot;
|
||||
|
||||
/**
|
||||
* Enum representing the order of chromosomes in a bee's genome and what they control.
|
||||
*
|
||||
*
|
||||
* @author SirSengir
|
||||
*/
|
||||
public enum EnumBeeChromosome implements IChromosomeType {
|
||||
@@ -44,14 +44,9 @@ public enum EnumBeeChromosome implements IChromosomeType {
|
||||
*/
|
||||
TEMPERATURE_TOLERANCE(IAlleleTolerance.class),
|
||||
/**
|
||||
* Slightly incorrectly named. If true, a naturally dirunal bee can work during the night. If true, a naturally nocturnal bee can work during the day.
|
||||
* If true, a naturally diurnal bee can work during the night. If true, a naturally nocturnal bee can work during the day.
|
||||
*/
|
||||
NOCTURNAL(IAlleleBoolean.class),
|
||||
/**
|
||||
* Not used / superseded by fixed values for the species. Probably going to be replaced with a boolean for FIRE_RESIST.
|
||||
*/
|
||||
@Deprecated
|
||||
HUMIDITY(IAllele.class),
|
||||
NEVER_SLEEPS(IAlleleBoolean.class),
|
||||
/**
|
||||
* Humidity difference to its native supported one the bee can tolerate.
|
||||
*/
|
||||
@@ -59,7 +54,7 @@ public enum EnumBeeChromosome implements IChromosomeType {
|
||||
/**
|
||||
* If true the bee can work during rain.
|
||||
*/
|
||||
TOLERANT_FLYER(IAlleleBoolean.class),
|
||||
TOLERATES_RAIN(IAlleleBoolean.class),
|
||||
/**
|
||||
* If true, the bee can work without a clear view of the sky.
|
||||
*/
|
||||
@@ -80,16 +75,16 @@ public enum EnumBeeChromosome implements IChromosomeType {
|
||||
* Determines the bee's effect.
|
||||
*/
|
||||
EFFECT(IAlleleBeeEffect.class);
|
||||
|
||||
Class<? extends IAllele> clss;
|
||||
|
||||
EnumBeeChromosome(Class<? extends IAllele> clss) {
|
||||
this.clss = clss;
|
||||
|
||||
private final Class<? extends IAllele> alleleClass;
|
||||
|
||||
EnumBeeChromosome(Class<? extends IAllele> alleleClass) {
|
||||
this.alleleClass = alleleClass;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends IAllele> getAlleleClass() {
|
||||
return clss;
|
||||
return alleleClass;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.apiculture;
|
||||
@@ -10,11 +10,11 @@ import java.util.Locale;
|
||||
import forestry.api.genetics.ISpeciesType;
|
||||
|
||||
public enum EnumBeeType implements ISpeciesType {
|
||||
DRONE, PRINCESS, QUEEN, LARVAE, NONE;
|
||||
DRONE, PRINCESS, QUEEN, LARVAE;
|
||||
|
||||
public static final EnumBeeType[] VALUES = values();
|
||||
|
||||
String name;
|
||||
private final String name;
|
||||
|
||||
EnumBeeType() {
|
||||
this.name = this.toString().toLowerCase(Locale.ENGLISH);
|
||||
|
||||
@@ -1,19 +1,15 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.apiculture;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import forestry.api.genetics.IFlowerRegistry;
|
||||
|
||||
public class FlowerManager {
|
||||
/**
|
||||
* <blockquote><pre>e.g. FlowerManager.flowerRegister.registerPlantableFlower(new ItemStack(Blocks.red_flower), 1.0, FlowerManager.FlowerTypeVanilla, FlowerManager.FlowerTypeSnow);</pre></blockquote>
|
||||
/**
|
||||
* <blockquote><pre>e.g. FlowerManager.flowerRegister.registerPlantableFlower(new ItemStack(Blocks.RED_FLOWER), 1.0, FlowerManager.FlowerTypeVanilla, FlowerManager.FlowerTypeSnow);</pre></blockquote>
|
||||
*/
|
||||
public static IFlowerRegistry flowerRegistry;
|
||||
|
||||
@@ -27,10 +23,4 @@ public class FlowerManager {
|
||||
public static final String FlowerTypeWheat = "flowersWheat";
|
||||
public static final String FlowerTypeGourd = "flowersGourd";
|
||||
|
||||
/**
|
||||
* @deprecated since Forestry 3.4. Use IFlowerRegistry.registerPlantableFlower instead.
|
||||
* Completely unused since Forestry 4.0, kept for backward compatibility with older mods.
|
||||
*/
|
||||
@Deprecated
|
||||
public static ArrayList<ItemStack> plainFlowers = new ArrayList<ItemStack>();
|
||||
}
|
||||
@@ -1,36 +1,36 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.apiculture;
|
||||
|
||||
import forestry.api.genetics.IAlleleEffect;
|
||||
import forestry.api.genetics.IEffectData;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
public interface IAlleleBeeEffect extends IAlleleEffect {
|
||||
|
||||
|
||||
/**
|
||||
* Called by apiaries to cause an effect in the world.
|
||||
*
|
||||
* @param genome
|
||||
* Genome of the bee queen causing this effect
|
||||
* @param storedData
|
||||
* Object containing the stored effect data for the apiary/hive the bee is in.
|
||||
* @param housing {@link IBeeHousing} the bee currently resides in.
|
||||
* Called by apiaries to cause an effect in the world. (server)
|
||||
*
|
||||
* @param genome Genome of the bee queen causing this effect
|
||||
* @param storedData Object containing the stored effect data for the apiary/hive the bee is in.
|
||||
* @param housing {@link IBeeHousing} the bee currently resides in.
|
||||
* @return storedData, may have been manipulated.
|
||||
*/
|
||||
IEffectData doEffect(IBeeGenome genome, IEffectData storedData, IBeeHousing housing);
|
||||
|
||||
/**
|
||||
* Is called to produce bee effects.
|
||||
*
|
||||
* @param genome
|
||||
* @param storedData
|
||||
* Object containing the stored effect data for the apiary/hive the bee is in.
|
||||
* @param housing {@link IBeeHousing} the bee currently resides in.
|
||||
* Is called to produce visual bee effects. (client)
|
||||
*
|
||||
* @param genome Genome of the bee queen causing this effect
|
||||
* @param storedData Object containing the stored effect data for the apiary/hive the bee is in.
|
||||
* @param housing {@link IBeeHousing} the bee currently resides in.
|
||||
* @return storedData, may have been manipulated.
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
IEffectData doFX(IBeeGenome genome, IEffectData storedData, IBeeHousing housing);
|
||||
|
||||
|
||||
}
|
||||
@@ -7,19 +7,20 @@ package forestry.api.apiculture;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import forestry.api.core.IModelManager;
|
||||
import forestry.api.genetics.IAlleleSpecies;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
public interface IAlleleBeeSpecies extends IAlleleSpecies {
|
||||
|
||||
/**
|
||||
* @return the IBeeRoot
|
||||
*/
|
||||
@Override
|
||||
IBeeRoot getRoot();
|
||||
|
||||
/**
|
||||
@@ -39,18 +40,14 @@ public interface IAlleleBeeSpecies extends IAlleleSpecies {
|
||||
|
||||
/**
|
||||
* Only jubilant bees produce specialities.
|
||||
*
|
||||
* @return true if the bee is jubilant, false otherwise.
|
||||
*/
|
||||
boolean isJubilant(IBeeGenome genome, IBeeHousing housing);
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
IIcon getIcon(EnumBeeType type, int renderPass);
|
||||
|
||||
/**
|
||||
* @deprecated since Forestry 3.6.
|
||||
* @return Path of the texture to use for entity rendering.
|
||||
*/
|
||||
@Deprecated
|
||||
String getEntityTexture();
|
||||
ModelResourceLocation getModel(EnumBeeType type);
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
void registerModels(Item item, IModelManager manager);
|
||||
}
|
||||
+16
-10
@@ -5,39 +5,45 @@
|
||||
******************************************************************************/
|
||||
package forestry.api.apiculture;
|
||||
|
||||
import forestry.api.genetics.IAlleleSpeciesBuilder;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import forestry.api.genetics.IAlleleSpeciesCustom;
|
||||
public interface IAlleleBeeSpeciesBuilder extends IAlleleSpeciesBuilder {
|
||||
|
||||
public interface IAlleleBeeSpeciesCustom extends IAlleleBeeSpecies, IAlleleSpeciesCustom {
|
||||
@Override
|
||||
IAlleleBeeSpecies build();
|
||||
|
||||
/**
|
||||
* Add a product for this bee species.
|
||||
* Chance is between 0 and 1.
|
||||
*/
|
||||
IAlleleBeeSpeciesCustom addProduct(ItemStack product, Float chance);
|
||||
IAlleleBeeSpeciesBuilder addProduct(ItemStack product, Float chance);
|
||||
|
||||
/**
|
||||
* Add a specialty product for this bee species.
|
||||
* Bees only produce their specialty when they are Jubilant (see IJubilanceProvider)
|
||||
* Chance is between 0 and 1.
|
||||
*/
|
||||
IAlleleBeeSpeciesCustom addSpecialty(ItemStack specialty, Float chance);
|
||||
IAlleleBeeSpeciesBuilder addSpecialty(ItemStack specialty, Float chance);
|
||||
|
||||
/**
|
||||
* Set the Jubilance Provider for this bee species.
|
||||
* Bees only produce their specialty when they are Jubilant (see IJubilanceProvider)
|
||||
*/
|
||||
IAlleleBeeSpeciesCustom setJubilanceProvider(IJubilanceProvider provider);
|
||||
IAlleleBeeSpeciesBuilder setJubilanceProvider(IJubilanceProvider provider);
|
||||
|
||||
/**
|
||||
* Make this species only active at night.
|
||||
*/
|
||||
IAlleleBeeSpeciesCustom setNocturnal();
|
||||
IAlleleBeeSpeciesBuilder setNocturnal();
|
||||
|
||||
/** Use this if you have custom icons for bees. */
|
||||
IAlleleBeeSpeciesCustom setCustomBeeIconProvider(IBeeIconProvider beeIconProvider);
|
||||
/**
|
||||
* Use this if you have custom icons for bees.
|
||||
*/
|
||||
IAlleleBeeSpeciesBuilder setCustomBeeModelProvider(IBeeModelProvider beeIconProvider);
|
||||
|
||||
/** Use this if you have custom icon colours for bees (other than the default static primary + secondary colours). */
|
||||
IAlleleBeeSpeciesCustom setCustomBeeIconColourProvider(IBeeIconColourProvider beeIconColourProvider);
|
||||
/**
|
||||
* Use this if you have custom icon colours for bees (other than the default static primary + secondary colours).
|
||||
*/
|
||||
IAlleleBeeSpeciesBuilder setCustomBeeSpriteColourProvider(IBeeSpriteColourProvider beeIconColourProvider);
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.apiculture;
|
||||
@@ -10,16 +10,15 @@ import forestry.api.genetics.IIndividual;
|
||||
|
||||
/**
|
||||
* Can be used to garner information on bee breeding. See {@link forestry.api.genetics.ISpeciesRoot} for retrieval functions.
|
||||
*
|
||||
*
|
||||
* @author SirSengir
|
||||
*/
|
||||
public interface IApiaristTracker extends IBreedingTracker {
|
||||
|
||||
/**
|
||||
* Register the birth of a queen. Will mark species as discovered.
|
||||
*
|
||||
* @param queen
|
||||
* Created queen.
|
||||
*
|
||||
* @param queen Created queen.
|
||||
*/
|
||||
void registerQueen(IIndividual queen);
|
||||
|
||||
@@ -30,9 +29,8 @@ public interface IApiaristTracker extends IBreedingTracker {
|
||||
|
||||
/**
|
||||
* Register the birth of a princess. Will mark species as discovered.
|
||||
*
|
||||
* @param princess
|
||||
* Created princess.
|
||||
*
|
||||
* @param princess Created princess.
|
||||
*/
|
||||
void registerPrincess(IIndividual princess);
|
||||
|
||||
@@ -43,9 +41,8 @@ public interface IApiaristTracker extends IBreedingTracker {
|
||||
|
||||
/**
|
||||
* Register the birth of a drone. Will mark species as discovered.
|
||||
*
|
||||
* @param drone
|
||||
* Created drone.
|
||||
*
|
||||
* @param drone Created drone.
|
||||
*/
|
||||
void registerDrone(IIndividual drone);
|
||||
|
||||
|
||||
@@ -1,39 +1,29 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.apiculture;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
/**
|
||||
* When implemented by armor piece items, allows them to act as apiarist's armor.
|
||||
* When implemented as a capability by armor items, protects the wearer from negative bee effects.
|
||||
*
|
||||
* @see ApicultureCapabilities#ARMOR_APIARIST
|
||||
*/
|
||||
public interface IArmorApiarist {
|
||||
/**
|
||||
* Called when the apiarist's armor acts as protection against an attack.
|
||||
*
|
||||
* @param entity Entity being attacked
|
||||
* @param armor Armor item
|
||||
* @param cause Optional cause of attack, such as a bee effect identifier
|
||||
* @param entity Entity being attacked
|
||||
* @param armor Armor item
|
||||
* @param cause Optional cause of attack, such as a bee effect identifier
|
||||
* @param doProtect Whether or not to actually do the side effects of protection
|
||||
* @return Whether or not the armor should protect the player from that attack
|
||||
*/
|
||||
boolean protectEntity(EntityLivingBase entity, ItemStack armor, String cause, boolean doProtect);
|
||||
|
||||
/**
|
||||
* Called when the apiarist's armor acts as protection against an attack.
|
||||
*
|
||||
* @param player Player being attacked
|
||||
* @param armor Armor item
|
||||
* @param cause Optional cause of attack, such as a bee effect identifier
|
||||
* @param doProtect Whether or not to actually do the side effects of protection
|
||||
* @return Whether or not the armor should protect the player from that attack
|
||||
* @deprecated since Forestry 4.2. Use protectEntity
|
||||
*/
|
||||
@Deprecated
|
||||
public boolean protectPlayer(EntityPlayer player, ItemStack armor, String cause, boolean doProtect);
|
||||
boolean protectEntity(EntityLivingBase entity, ItemStack armor, @Nullable String cause, boolean doProtect);
|
||||
}
|
||||
@@ -6,7 +6,6 @@
|
||||
package forestry.api.apiculture;
|
||||
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
/**
|
||||
@@ -18,9 +17,10 @@ public interface IArmorApiaristHelper {
|
||||
|
||||
/**
|
||||
* Called when the apiarist's armor acts as protection against an attack.
|
||||
* @param stack ItemStack to check
|
||||
* @param entity Entity being attacked
|
||||
* @param cause Optional cause of attack, such as a bee effect identifier
|
||||
*
|
||||
* @param stack ItemStack to check
|
||||
* @param entity Entity being attacked
|
||||
* @param cause Optional cause of attack, such as a bee effect identifier
|
||||
* @param doProtect Whether or not to actually do the side effects of protection
|
||||
* @return Whether or not the item is valid Apiarist Armor and should protect the player from that attack
|
||||
* @since Forestry 4.2
|
||||
@@ -29,34 +29,13 @@ public interface IArmorApiaristHelper {
|
||||
|
||||
/**
|
||||
* Called when the apiarist's armor acts as protection against an attack.
|
||||
* @param entity Entity being attacked
|
||||
* @param cause Optional cause of attack, such as a bee effect identifier
|
||||
*
|
||||
* @param entity Entity being attacked
|
||||
* @param cause Optional cause of attack, such as a bee effect identifier
|
||||
* @param doProtect Whether or not to actually do the side effects of protection
|
||||
* @return The number of valid Apiarist Armor pieces the player is wearing that are actually protecting
|
||||
* @return The number of valid Apiarist Armor pieces the player is wearing that are actually protecting.
|
||||
* 4 means full protection, but it can go higher if they are holding items like the smoker.
|
||||
* @since Forestry 4.2
|
||||
*/
|
||||
int wearsItems(EntityLivingBase entity, String cause, boolean doProtect);
|
||||
|
||||
/**
|
||||
* Called when the apiarist's armor acts as protection against an attack.
|
||||
* @param stack ItemStack to check
|
||||
* @param player Player being attacked
|
||||
* @param cause Optional cause of attack, such as a bee effect identifier
|
||||
* @param doProtect Whether or not to actually do the side effects of protection
|
||||
* @return Whether or not the item is valid Apiarist Armor and should protect the player from that attack
|
||||
* @deprecated since Forestry 4.2. use the EntityLivingBase version
|
||||
*/
|
||||
@Deprecated
|
||||
boolean isArmorApiarist(ItemStack stack, EntityPlayer player, String cause, boolean doProtect);
|
||||
|
||||
/**
|
||||
* Called when the apiarist's armor acts as protection against an attack.
|
||||
* @param player Player being attacked
|
||||
* @param cause Optional cause of attack, such as a bee effect identifier
|
||||
* @param doProtect Whether or not to actually do the side effects of protection
|
||||
* @return The number of valid Apiarist Armor pieces the player is wearing that are actually protecting
|
||||
* @deprecated since Forestry 4.2. use the EntityLivingBase version
|
||||
*/
|
||||
@Deprecated
|
||||
int wearsItems(EntityPlayer player, String cause, boolean doProtect);
|
||||
}
|
||||
@@ -1,15 +1,22 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.apiculture;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import forestry.api.core.IErrorState;
|
||||
import forestry.api.genetics.IEffectData;
|
||||
@@ -18,7 +25,7 @@ import forestry.api.genetics.IIndividualLiving;
|
||||
|
||||
/**
|
||||
* Other implementations than Forestry's default one are not supported.
|
||||
*
|
||||
*
|
||||
* @author SirSengir
|
||||
*/
|
||||
public interface IBee extends IIndividualLiving {
|
||||
@@ -26,11 +33,14 @@ public interface IBee extends IIndividualLiving {
|
||||
/**
|
||||
* @return Bee's genetic information.
|
||||
*/
|
||||
@Override
|
||||
IBeeGenome getGenome();
|
||||
|
||||
/**
|
||||
* @return Genetic information of the bee's mate, null if unmated.
|
||||
*/
|
||||
@Nullable
|
||||
@Override
|
||||
IBeeGenome getMate();
|
||||
|
||||
/**
|
||||
@@ -45,12 +55,12 @@ public interface IBee extends IIndividualLiving {
|
||||
|
||||
/**
|
||||
* Set the natural flag on this bee.
|
||||
* @param flag
|
||||
*/
|
||||
void setIsNatural(boolean flag);
|
||||
|
||||
IEffectData[] doEffect(IEffectData[] storedData, IBeeHousing housing);
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
IEffectData[] doFX(IEffectData[] storedData, IBeeHousing housing);
|
||||
|
||||
/**
|
||||
@@ -60,25 +70,47 @@ public interface IBee extends IIndividualLiving {
|
||||
|
||||
/**
|
||||
* Determines whether the queen can work.
|
||||
*
|
||||
* @param housing the {@link IBeeHousing} the bee currently resides in.
|
||||
* @return an empty set if the queen can work, a set of error states if the queen can not work
|
||||
*/
|
||||
Set<IErrorState> getCanWork(IBeeHousing housing);
|
||||
|
||||
List<BiomeGenBase> getSuitableBiomes();
|
||||
List<Biome> getSuitableBiomes();
|
||||
|
||||
ItemStack[] getProduceList();
|
||||
NonNullList<ItemStack> getProduceList();
|
||||
|
||||
ItemStack[] getSpecialtyList();
|
||||
NonNullList<ItemStack> getSpecialtyList();
|
||||
|
||||
ItemStack[] produceStacks(IBeeHousing housing);
|
||||
NonNullList<ItemStack> produceStacks(IBeeHousing housing);
|
||||
|
||||
@Nullable
|
||||
IBee spawnPrincess(IBeeHousing housing);
|
||||
|
||||
IBee[] spawnDrones(IBeeHousing housing);
|
||||
List<IBee> spawnDrones(IBeeHousing housing);
|
||||
|
||||
/**
|
||||
* @deprecated since Forestry 5.5.4. Use {@link #plantFlowerRandom(IBeeHousing, List)}
|
||||
*/
|
||||
@Deprecated
|
||||
void plantFlowerRandom(IBeeHousing housing);
|
||||
|
||||
/**
|
||||
* Plants a random flower from the given list near the housing
|
||||
*
|
||||
* @param housing the location the bee is living
|
||||
* @param potentialFlowers the flowers to choose from
|
||||
* @return the position of the planted flower, or null of none were planted
|
||||
* @since Forestry 5.5.4
|
||||
*/
|
||||
@Nullable
|
||||
default BlockPos plantFlowerRandom(IBeeHousing housing, List<IBlockState> potentialFlowers) {
|
||||
//noinspection deprecation
|
||||
plantFlowerRandom(housing);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
IIndividual retrievePollen(IBeeHousing housing);
|
||||
|
||||
boolean pollinateRandom(IBeeHousing housing, IIndividual pollen);
|
||||
|
||||
@@ -12,28 +12,36 @@ public interface IBeeFactory {
|
||||
/**
|
||||
* Creates a new bee species.
|
||||
* Automatically registered with AlleleManager.alleleRegistry.registerAllele()
|
||||
* See IAlleleBeeSpeciesCustom and IAlleleSpeciesCustom for adding additional properties to the returned species.
|
||||
* See IAlleleBeeSpeciesBuilder and IAlleleSpeciesBuilder for adding additional properties to the returned species.
|
||||
*
|
||||
* @param uid Unique Identifier for this species
|
||||
* @param dominant Whether this species is genetically dominant (false means it is recessive)
|
||||
* @param authority Authority for the binomial name, e.g. "Sengir" on species of base Forestry.
|
||||
* @param unlocalizedName Unlocalized name for this species
|
||||
* @param modId The modId of the mod that is creating the species
|
||||
* @param uid Unique Identifier for this species
|
||||
* @param dominant Whether this species is genetically dominant (false means it is recessive)
|
||||
* @param authority Authority for the binomial name, e.g. "Sengir" on species of base Forestry.
|
||||
* @param unlocalizedName Unlocalized name for this species
|
||||
* @param unlocalizedDescription Unlocalized description for this species
|
||||
* @param branch Classification of this species
|
||||
* @param binomial Binomial name of the species sans genus ("Apis"). "humboldti" will have the bee species flavour name be "Apis humboldti". Feel free to use fun names or null.
|
||||
* @param primaryColor The outline color of this species
|
||||
* @param secondaryColor The body color of this species
|
||||
* @param branch Classification of this species
|
||||
* @param binomial Binomial name of the species sans genus ("Apis"). "humboldti" will have the bee species flavour name be "Apis humboldti". Feel free to use fun names or null.
|
||||
* @param primaryColor The outline color of this species
|
||||
* @param secondaryColor The body color of this species
|
||||
* @return a new bee species allele.
|
||||
* @since Forestry 5.6.0.
|
||||
*/
|
||||
IAlleleBeeSpeciesCustom createSpecies(String uid, boolean dominant, String authority, String unlocalizedName, String unlocalizedDescription, IClassification branch, String binomial, int primaryColor, int secondaryColor);
|
||||
IAlleleBeeSpeciesBuilder createSpecies(String modId, String uid, boolean dominant, String authority, String unlocalizedName, String unlocalizedDescription, IClassification branch, String binomial, int primaryColor, int secondaryColor);
|
||||
|
||||
/**
|
||||
* Creates a new bee branch.
|
||||
* Must be registered with AlleleManager.alleleRegistry.getClassification("family.apidae").addMemberGroup();
|
||||
*
|
||||
* @param uid Unique Identifier for this branch
|
||||
* @param uid Unique Identifier for this branch
|
||||
* @param scientific approximates a "genus" in real life. Real life examples: "Micrapis", "Megapis"
|
||||
* @return a new bee branch
|
||||
*/
|
||||
IClassification createBranch(String uid, String scientific);
|
||||
|
||||
/**
|
||||
* @deprecated since Forestry 5.6.0. use {@link #createSpecies(String, String, boolean, String, String, String, IClassification, String, int, int)}
|
||||
*/
|
||||
@Deprecated
|
||||
IAlleleBeeSpeciesBuilder createSpecies(String uid, boolean dominant, String authority, String unlocalizedName, String unlocalizedDescription, IClassification branch, String binomial, int primaryColor, int secondaryColor);
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.apiculture;
|
||||
@@ -8,17 +8,19 @@ package forestry.api.apiculture;
|
||||
import forestry.api.genetics.EnumTolerance;
|
||||
import forestry.api.genetics.IFlowerProvider;
|
||||
import forestry.api.genetics.IGenome;
|
||||
import net.minecraft.util.math.Vec3i;
|
||||
|
||||
/**
|
||||
* Only the default implementation is supported.
|
||||
*
|
||||
*
|
||||
* @author SirSengir
|
||||
*
|
||||
*/
|
||||
public interface IBeeGenome extends IGenome {
|
||||
|
||||
@Override
|
||||
IAlleleBeeSpecies getPrimary();
|
||||
|
||||
|
||||
@Override
|
||||
IAlleleBeeSpecies getSecondary();
|
||||
|
||||
float getSpeed();
|
||||
@@ -31,9 +33,9 @@ public interface IBeeGenome extends IGenome {
|
||||
|
||||
EnumTolerance getToleranceHumid();
|
||||
|
||||
boolean getNocturnal();
|
||||
boolean getNeverSleeps();
|
||||
|
||||
boolean getTolerantFlyer();
|
||||
boolean getToleratesRain();
|
||||
|
||||
boolean getCaveDwelling();
|
||||
|
||||
@@ -41,7 +43,7 @@ public interface IBeeGenome extends IGenome {
|
||||
|
||||
int getFlowering();
|
||||
|
||||
int[] getTerritory();
|
||||
Vec3i getTerritory();
|
||||
|
||||
IAlleleBeeEffect getEffect();
|
||||
|
||||
|
||||
@@ -1,47 +1,53 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.apiculture;
|
||||
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
|
||||
import forestry.api.core.IClimateProvider;
|
||||
import forestry.api.climate.IClimateProvider;
|
||||
import forestry.api.core.IErrorLogicSource;
|
||||
import forestry.api.core.ILocatable;
|
||||
import forestry.api.genetics.IHousing;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
|
||||
public interface IBeeHousing extends IHousing, IClimateProvider, IErrorLogicSource {
|
||||
public interface IBeeHousing extends IHousing, IErrorLogicSource, IClimateProvider, ILocatable {
|
||||
|
||||
/**
|
||||
* Used by BeeManager.beeRoot.createBeeHousingModifier(IBeeHousing housing)
|
||||
* Used by {@link IBeeRoot#createBeeHousingModifier(IBeeHousing)}
|
||||
* to combine bee modifiers from several sources that can change over time.
|
||||
*
|
||||
* @return IBeeModifiers from the housing, frames, etc.
|
||||
*/
|
||||
Iterable<IBeeModifier> getBeeModifiers();
|
||||
|
||||
/**
|
||||
* Used by BeeManager.beeRoot.createBeeHousingListener(IBeeHousing housing)
|
||||
* Used by {@link IBeeRoot#createBeeHousingListener(IBeeHousing)}
|
||||
* to combine bee listeners from several sources that can change over time.
|
||||
*
|
||||
* @return IBeeListeners from the housing, multiblock parts, etc.
|
||||
*/
|
||||
Iterable<IBeeListener> getBeeListeners();
|
||||
|
||||
IBeeHousingInventory getBeeInventory();
|
||||
|
||||
IBeekeepingLogic getBeekeepingLogic();
|
||||
|
||||
int getBlockLightValue();
|
||||
|
||||
boolean canBlockSeeTheSky();
|
||||
|
||||
World getWorld();
|
||||
boolean isRaining();
|
||||
|
||||
@Nullable
|
||||
GameProfile getOwner();
|
||||
|
||||
/**
|
||||
* @return exact coordinates where bee particle FX should spawn from
|
||||
* @since Forestry 4.2
|
||||
* @return exact coordinates where bee FX should spawn from
|
||||
*/
|
||||
Vec3 getBeeFXCoordinates();
|
||||
Vec3d getBeeFXCoordinates();
|
||||
}
|
||||
@@ -10,16 +10,18 @@ import net.minecraft.item.ItemStack;
|
||||
public interface IBeeHousingInventory {
|
||||
|
||||
ItemStack getQueen();
|
||||
|
||||
ItemStack getDrone();
|
||||
|
||||
void setQueen(ItemStack itemstack);
|
||||
|
||||
void setDrone(ItemStack itemstack);
|
||||
|
||||
/**
|
||||
* Adds products to the housing's inventory.
|
||||
*
|
||||
* @param product ItemStack with the product to add.
|
||||
* @param all if true, success requires that all products are added
|
||||
* @param all if true, success requires that all products are added
|
||||
* @return boolean indicating success or failure.
|
||||
*/
|
||||
boolean addProduct(ItemStack product, boolean all);
|
||||
|
||||
@@ -11,6 +11,7 @@ public interface IBeeListener {
|
||||
|
||||
/**
|
||||
* Called when the bees wear out the housing's equipment.
|
||||
*
|
||||
* @param amount Integer indicating the amount worn out.
|
||||
*/
|
||||
void wearOutEquipment(int amount);
|
||||
@@ -22,6 +23,7 @@ public interface IBeeListener {
|
||||
|
||||
/**
|
||||
* Called when the bees have retrieved some pollen.
|
||||
*
|
||||
* @return true if this bee listener handled the pollen.
|
||||
*/
|
||||
boolean onPollenRetrieved(IIndividual pollen);
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.apiculture;
|
||||
|
||||
import forestry.api.core.IModelManager;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
public interface IBeeModelProvider {
|
||||
@SideOnly(Side.CLIENT)
|
||||
void registerModels(Item item, IModelManager manager);
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
ModelResourceLocation getModel(EnumBeeType type);
|
||||
}
|
||||
@@ -5,31 +5,33 @@
|
||||
******************************************************************************/
|
||||
package forestry.api.apiculture;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public interface IBeeModifier {
|
||||
/**
|
||||
* @param genome Genome of the bee this modifier is called for.
|
||||
* @param genome Genome of the bee this modifier is called for.
|
||||
* @param currentModifier Current modifier.
|
||||
* @return Float used to modify the base territory.
|
||||
*/
|
||||
float getTerritoryModifier(IBeeGenome genome, float currentModifier);
|
||||
|
||||
/**
|
||||
* @param genome Genome of the bee this modifier is called for.
|
||||
* @param mate Genome of the bee mate this modifier is called for.
|
||||
* @param genome Genome of the bee this modifier is called for.
|
||||
* @param mate Genome of the bee mate this modifier is called for.
|
||||
* @param currentModifier Current modifier.
|
||||
* @return Float used to modify the base mutation chance.
|
||||
*/
|
||||
float getMutationModifier(IBeeGenome genome, IBeeGenome mate, float currentModifier);
|
||||
|
||||
/**
|
||||
* @param genome Genome of the bee this modifier is called for.
|
||||
* @param genome Genome of the bee this modifier is called for.
|
||||
* @param currentModifier Current modifier.
|
||||
* @return Float used to modify the life span of queens.
|
||||
*/
|
||||
float getLifespanModifier(IBeeGenome genome, IBeeGenome mate, float currentModifier);
|
||||
float getLifespanModifier(IBeeGenome genome, @Nullable IBeeGenome mate, float currentModifier);
|
||||
|
||||
/**
|
||||
* @param genome Genome of the bee this modifier is called for.
|
||||
* @param genome Genome of the bee this modifier is called for.
|
||||
* @param currentModifier Current modifier.
|
||||
* @return Float modifying the production speed of queens.
|
||||
*/
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.apiculture;
|
||||
@@ -8,9 +8,10 @@ package forestry.api.apiculture;
|
||||
import forestry.api.genetics.IMutation;
|
||||
|
||||
public interface IBeeMutation extends IMutation {
|
||||
|
||||
|
||||
@Override
|
||||
IBeeRoot getRoot();
|
||||
|
||||
|
||||
/**
|
||||
* @return float representing the chance for mutation to occur. note that this is 0 - 100 based, since it was an integer previously!
|
||||
*/
|
||||
|
||||
+4
-3
@@ -5,8 +5,9 @@
|
||||
******************************************************************************/
|
||||
package forestry.api.apiculture;
|
||||
|
||||
import forestry.api.genetics.IMutationCustom;
|
||||
|
||||
public interface IBeeMutationCustom extends IBeeMutation, IMutationCustom {
|
||||
import forestry.api.genetics.IMutationBuilder;
|
||||
|
||||
public interface IBeeMutationBuilder extends IMutationBuilder {
|
||||
@Override
|
||||
IBeeMutation build();
|
||||
}
|
||||
@@ -11,13 +11,13 @@ public interface IBeeMutationFactory {
|
||||
/**
|
||||
* Creates a new bee mutation.
|
||||
* Automatically registered with BeeManager.beeRoot.registerMutation()
|
||||
* See IBeeMutationCustom and IMutationCustom for adding additional properties to the returned mutation.
|
||||
* See IBeeMutationBuilder and IMutationBuilder for adding additional properties to the returned mutation.
|
||||
*
|
||||
* @param parentBee0 A parent bee for this mutation
|
||||
* @param parentBee1 A parent bee for this mutation
|
||||
* @param result The resulting alleles for this mutation
|
||||
* @param chance The chance that breeding the two parent bees will result in this mutation
|
||||
* @param result The resulting alleles for this mutation
|
||||
* @param chance The chance that breeding the two parent bees will result in this mutation
|
||||
* @return a new bee mutation.
|
||||
*/
|
||||
IBeeMutationCustom createMutation(IAlleleBeeSpecies parentBee0, IAlleleBeeSpecies parentBee1, IAllele[] result, int chance);
|
||||
IBeeMutationBuilder createMutation(IAlleleBeeSpecies parentBee0, IAlleleBeeSpecies parentBee1, IAllele[] result, int chance);
|
||||
}
|
||||
@@ -1,34 +1,33 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.apiculture;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.List;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import forestry.api.genetics.IAllele;
|
||||
import forestry.api.genetics.ISpeciesRoot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
|
||||
import forestry.api.genetics.IAllele;
|
||||
import forestry.api.genetics.ISpeciesRoot;
|
||||
|
||||
public interface IBeeRoot extends ISpeciesRoot {
|
||||
|
||||
/**
|
||||
* @return true if passed item is a Forestry bee. Equal to getType(ItemStack stack) != EnumBeeType.NONE
|
||||
* @return true if passed item is a Forestry bee. Equal to getType(ItemStack stack) != null
|
||||
*/
|
||||
@Override
|
||||
boolean isMember(ItemStack stack);
|
||||
|
||||
/**
|
||||
* @return {@link IBee} pattern parsed from the passed stack's nbt data.
|
||||
* @return {@link IBee} pattern parsed from the passed stack's nbt data. Null if the ItemStack is not a valid member.
|
||||
*/
|
||||
@Override
|
||||
@Nullable
|
||||
IBee getMember(ItemStack stack);
|
||||
|
||||
@Override
|
||||
@@ -48,16 +47,19 @@ public interface IBeeRoot extends ISpeciesRoot {
|
||||
IBeeGenome templateAsGenome(IAllele[] templateActive, IAllele[] templateInactive);
|
||||
|
||||
/* BREEDING TRACKER */
|
||||
|
||||
/**
|
||||
* @param world
|
||||
* @return {@link IApiaristTracker} associated with the passed world.
|
||||
*/
|
||||
IApiaristTracker getBreedingTracker(World world, GameProfile player);
|
||||
@Override
|
||||
IApiaristTracker getBreedingTracker(World world, @Nullable GameProfile player);
|
||||
|
||||
/* BEE SPECIFIC */
|
||||
|
||||
/**
|
||||
* @return type of bee encoded on the itemstack. EnumBeeType.NONE if it isn't a bee.
|
||||
* @return type of bee encoded on the itemstack. null if it isn't a bee.
|
||||
*/
|
||||
@Nullable
|
||||
@Override
|
||||
EnumBeeType getType(ItemStack stack);
|
||||
|
||||
@@ -72,45 +74,45 @@ public interface IBeeRoot extends ISpeciesRoot {
|
||||
boolean isMated(ItemStack stack);
|
||||
|
||||
/**
|
||||
* @param genome
|
||||
* Valid {@link IBeeGenome}
|
||||
* @param genome Valid {@link IBeeGenome}
|
||||
* @return {@link IBee} from the passed genome
|
||||
*/
|
||||
IBee getBee(World world, IBeeGenome genome);
|
||||
IBee getBee(IBeeGenome genome);
|
||||
|
||||
/**
|
||||
* Creates an IBee suitable for a queen containing the necessary second genome for the mate.
|
||||
*
|
||||
* @param genome
|
||||
* Valid {@link IBeeGenome}
|
||||
* @param mate
|
||||
* Valid {@link IBee} representing the mate.
|
||||
*
|
||||
* @param genome Valid {@link IBeeGenome}
|
||||
* @param mate Valid {@link IBee} representing the mate.
|
||||
* @return Mated {@link IBee} from the passed genomes.
|
||||
*/
|
||||
IBee getBee(World world, IBeeGenome genome, IBee mate);
|
||||
|
||||
/* TEMPLATES */
|
||||
|
||||
@Override
|
||||
ArrayList<IBee> getIndividualTemplates();
|
||||
List<IBee> getIndividualTemplates();
|
||||
|
||||
/* MUTATIONS */
|
||||
@Override
|
||||
Collection<IBeeMutation> getMutations(boolean shuffle);
|
||||
List<IBeeMutation> getMutations(boolean shuffle);
|
||||
|
||||
/* GAME MODE */
|
||||
void resetBeekeepingMode();
|
||||
|
||||
ArrayList<IBeekeepingMode> getBeekeepingModes();
|
||||
List<IBeekeepingMode> getBeekeepingModes();
|
||||
|
||||
IBeekeepingMode getBeekeepingMode(World world);
|
||||
|
||||
@Nullable
|
||||
IBeekeepingMode getBeekeepingMode(String name);
|
||||
|
||||
void registerBeekeepingMode(IBeekeepingMode mode);
|
||||
|
||||
void setBeekeepingMode(World world, String name);
|
||||
void setBeekeepingMode(World world, IBeekeepingMode mode);
|
||||
|
||||
/* MISC */
|
||||
|
||||
/**
|
||||
* Creates beekeepingLogic for a housing.
|
||||
* Should be used when the housing is created, see IBeekeepingLogic
|
||||
|
||||
+2
-2
@@ -8,6 +8,6 @@ package forestry.api.apiculture;
|
||||
/**
|
||||
* Custom colour provider for bees with complicated colors.
|
||||
*/
|
||||
public interface IBeeIconColourProvider {
|
||||
int getIconColour(int renderPass);
|
||||
public interface IBeeSpriteColourProvider {
|
||||
int getSpriteColour(int renderPass);
|
||||
}
|
||||
@@ -1,25 +1,37 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.apiculture;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import forestry.api.core.INBTTagable;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.network.PacketBuffer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import forestry.api.core.INbtReadable;
|
||||
import forestry.api.core.INbtWritable;
|
||||
|
||||
/**
|
||||
* Stores beekeeping logic for bee housings.
|
||||
* Get one with BeeManager.beeRoot.createBeekeepingLogic(IBeeHousing housing)
|
||||
* Save and load it to NBT using the INBTTagable methods.
|
||||
* Save and load it to NBT using the INbtWritable methods.
|
||||
*/
|
||||
public interface IBeekeepingLogic extends INBTTagable {
|
||||
public interface IBeekeepingLogic extends INbtWritable, INbtReadable {
|
||||
|
||||
/* SERVER */
|
||||
|
||||
/**
|
||||
* Checks that the bees can work, setting error conditions on the housing where needed
|
||||
*
|
||||
* @return true if no errors are present and doWork should be called
|
||||
*/
|
||||
boolean canWork();
|
||||
@@ -29,14 +41,20 @@ public interface IBeekeepingLogic extends INBTTagable {
|
||||
*/
|
||||
void doWork();
|
||||
|
||||
/**
|
||||
* Force the logic to refresh any cached values and error states.
|
||||
* Call this when a player opens the gui so that all errors are up to date.
|
||||
*/
|
||||
void clearCachedValues();
|
||||
|
||||
|
||||
/* CLIENT */
|
||||
|
||||
/**
|
||||
* Call this when the housing comes into view of the client.
|
||||
* (i.e. when tile.getDescriptionPacket() is called)
|
||||
* Sync to client by using {@link #writeToNBT(NBTTagCompound)} in your {@link TileEntity#getUpdateTag()}
|
||||
*/
|
||||
void syncToClient();
|
||||
|
||||
void syncToClient(EntityPlayerMP player);
|
||||
|
||||
/**
|
||||
@@ -50,12 +68,27 @@ public interface IBeekeepingLogic extends INBTTagable {
|
||||
* Whether bee fx should be active.
|
||||
* Internally, this is automatically synced to the client.
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
boolean canDoBeeFX();
|
||||
|
||||
/**
|
||||
* Display bee fx. Calls IBee.doFX(IEffectData[] storedData, IBeeHousing housing) on the queen.
|
||||
* Internally, the queen is automatically synced to the client for the fx.
|
||||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
void doBeeFX();
|
||||
|
||||
/**
|
||||
* Used by bee fx to direct bees to nearby flowers.
|
||||
* These positions are synced to the client from the server.
|
||||
*/
|
||||
List<BlockPos> getFlowerPositions();
|
||||
|
||||
default void readData(PacketBuffer data) throws IOException {
|
||||
|
||||
}
|
||||
|
||||
default void writeData(PacketBuffer data) {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,12 +1,13 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.apiculture;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public interface IBeekeepingMode {
|
||||
@@ -19,7 +20,7 @@ public interface IBeekeepingMode {
|
||||
/**
|
||||
* @return Localized list of strings outlining the behaviour of this beekeeping mode.
|
||||
*/
|
||||
ArrayList<String> getDescription();
|
||||
List<String> getDescription();
|
||||
|
||||
/**
|
||||
* @return Float used to modify the wear on comb frames.
|
||||
@@ -27,41 +28,36 @@ public interface IBeekeepingMode {
|
||||
float getWearModifier();
|
||||
|
||||
/**
|
||||
* @param queen
|
||||
* @return fertility taking into account the birthing queen and surroundings.
|
||||
*/
|
||||
int getFinalFertility(IBee queen, World world, int x, int y, int z);
|
||||
int getFinalFertility(IBee queen, World world, BlockPos pos);
|
||||
|
||||
/**
|
||||
* @param queen
|
||||
* @return true if the queen is genetically "fatigued" and should not be reproduced anymore.
|
||||
*/
|
||||
boolean isFatigued(IBee queen, IBeeHousing housing);
|
||||
|
||||
/**
|
||||
* @param queen
|
||||
* @param housing
|
||||
* @return true if the queen is being overworked in the bee housing (with chance). will trigger a negative effect.
|
||||
/**
|
||||
* @return true if the queen is being overworked in the bee housing (with chance). will trigger a negative effect.
|
||||
* @deprecated bees max out at 16x productivity instead of being overworked.
|
||||
* TODO remove this method in 1.13
|
||||
*/
|
||||
boolean isOverworked(IBee queen, IBeeHousing housing);
|
||||
@Deprecated
|
||||
default boolean isOverworked(IBee queen, IBeeHousing housing) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param queen
|
||||
* @param offspring
|
||||
* @param housing
|
||||
* @return true if the genetic structure of the queen is breaking down during spawning of the offspring (with chance). will trigger a negative effect.
|
||||
*/
|
||||
boolean isDegenerating(IBee queen, IBee offspring, IBeeHousing housing);
|
||||
|
||||
/**
|
||||
* @param queen
|
||||
* @return true if an offspring of this queen is considered a natural
|
||||
*/
|
||||
boolean isNaturalOffspring(IBee queen);
|
||||
|
||||
/**
|
||||
* @param queen
|
||||
* @return true if this mode allows the passed queen or princess to be multiplied
|
||||
*/
|
||||
boolean mayMultiplyPrincess(IBee queen);
|
||||
|
||||
@@ -1,38 +1,43 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.apiculture;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
/**
|
||||
* Bees can be seeded either as hive drops or as mutation results.
|
||||
*
|
||||
* <p>
|
||||
* Add IHiveDrops with HiveManager.get___Hive.addDrop
|
||||
*
|
||||
*
|
||||
* @author SirSengir
|
||||
*/
|
||||
public interface IHiveDrop {
|
||||
|
||||
ItemStack getPrincess(World world, int x, int y, int z, int fortune);
|
||||
IBee getBeeType(IBlockAccess world, BlockPos pos);
|
||||
|
||||
Collection<ItemStack> getDrones(World world, int x, int y, int z, int fortune);
|
||||
|
||||
Collection<ItemStack> getAdditional(World world, int x, int y, int z, int fortune);
|
||||
NonNullList<ItemStack> getExtraItems(IBlockAccess world, BlockPos pos, int fortune);
|
||||
|
||||
/**
|
||||
* Chance to drop. Default drops have 80 (= 80 %).
|
||||
*
|
||||
* Chance to drop a bee or extra items. Default drops have 0.80 (= 80 %).
|
||||
*
|
||||
* @param world Minecraft world this is called for.
|
||||
* @param x x-Coordinate of the broken hive.
|
||||
* @param y y-Coordinate of the broken hive.
|
||||
* @param z z-Coordinate of the broken hive.
|
||||
* @return Chance for drop as an integer of 0 - 100.
|
||||
* @param pos Coordinates of the broken hive.
|
||||
* @return Chance for drop as a float of 0.0 - 1.0.
|
||||
*/
|
||||
int getChance(World world, int x, int y, int z);
|
||||
double getChance(IBlockAccess world, BlockPos pos, int fortune);
|
||||
|
||||
/**
|
||||
* Chance for the princess to be ignoble. Default is around 0.4 to 0.7 (40% - 70%).
|
||||
*
|
||||
* @param world Minecraft world this is called for.
|
||||
* @param pos Coordinates of the broken hive.
|
||||
* @return Chance for ignoble as a float of 0.0 - 1.0.
|
||||
*/
|
||||
double getIgnobleChance(IBlockAccess world, BlockPos pos, int fortune);
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.apiculture;
|
||||
@@ -11,14 +11,27 @@ public interface IHiveFrame {
|
||||
|
||||
/**
|
||||
* Wears out a frame.
|
||||
*
|
||||
*
|
||||
* @param housing IBeeHousing the frame is contained in.
|
||||
* @param frame ItemStack containing the actual frame.
|
||||
* @param queen Current queen in the caller.
|
||||
* @param wear Integer denoting the amount worn out. The wear modifier of the current beekeeping mode has already been taken into account.
|
||||
* @return ItemStack containing the actual frame with adjusted damage, or null if it has been broken.
|
||||
* @param frame ItemStack containing the actual frame.
|
||||
* @param queen Current queen in the caller.
|
||||
* @param wear Integer denoting the amount worn out. The wear modifier of the current beekeeping mode has already been taken into account.
|
||||
* @return ItemStack containing the actual frame with adjusted damage, or Empty ItemStack if it has been broken.
|
||||
*/
|
||||
ItemStack frameUsed(IBeeHousing housing, ItemStack frame, IBee queen, int wear);
|
||||
|
||||
/**
|
||||
* @param frame ItemStack containing the actual frame.
|
||||
* @return the {@link IBeeModifier} for this frame.
|
||||
* @since Forestry 5.5.1
|
||||
*/
|
||||
default IBeeModifier getBeeModifier(ItemStack frame) {
|
||||
return getBeeModifier();
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Forestry 5.5.1. Use {@link #getBeeModifier(ItemStack)}
|
||||
*/
|
||||
@Deprecated
|
||||
IBeeModifier getBeeModifier();
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.apiculture;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public interface IHiveTile {
|
||||
/**
|
||||
* Call to calm agitated bees. Used by the smoker to stop wild bees from attacking as much.
|
||||
* Bees will not stay calm for very long.
|
||||
*/
|
||||
void calmBees();
|
||||
|
||||
boolean isAngry();
|
||||
|
||||
/**
|
||||
* Called when the hive is attacked.
|
||||
*/
|
||||
void onAttack(World world, BlockPos pos, EntityPlayer player);
|
||||
|
||||
/**
|
||||
* Called when the hive is broken.
|
||||
*/
|
||||
void onBroken(World world, BlockPos pos, EntityPlayer player, boolean canHarvest);
|
||||
}
|
||||
@@ -5,12 +5,16 @@
|
||||
******************************************************************************/
|
||||
package forestry.api.apiculture;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
|
||||
public interface IJubilanceFactory {
|
||||
/** The default Jubilance Provider is satisfied when the humidity and temperature are ideal for the bee. */
|
||||
/**
|
||||
* The default Jubilance Provider is satisfied when the humidity and temperature are ideal for the bee.
|
||||
*/
|
||||
IJubilanceProvider getDefault();
|
||||
|
||||
/** The Requires Resource Jubilance Provider is satisfied when a specific block is under the hive. */
|
||||
IJubilanceProvider getRequiresResource(Block block, int meta);
|
||||
/**
|
||||
* The Requires Resource Jubilance Provider is satisfied when a specific block is under the hive.
|
||||
*/
|
||||
IJubilanceProvider getRequiresResource(IBlockState... acceptedBlockStates);
|
||||
}
|
||||
@@ -5,12 +5,14 @@
|
||||
******************************************************************************/
|
||||
package forestry.api.apiculture.hives;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import java.util.Random;
|
||||
|
||||
import forestry.api.core.EnumHumidity;
|
||||
import forestry.api.core.EnumTemperature;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
|
||||
public interface IHiveDescription {
|
||||
|
||||
@@ -22,27 +24,28 @@ public interface IHiveDescription {
|
||||
/**
|
||||
* The hive block to be placed in the world.
|
||||
*/
|
||||
Block getBlock();
|
||||
int getMeta();
|
||||
IBlockState getBlockState();
|
||||
|
||||
/**
|
||||
* returns true if the hive can be generated in these conditions.
|
||||
* Used as a fast early-elimination check for hives that have no hope of spawning in the area.
|
||||
*/
|
||||
boolean isGoodBiome(BiomeGenBase biome);
|
||||
boolean isGoodBiome(Biome biome);
|
||||
|
||||
boolean isGoodHumidity(EnumHumidity humidity);
|
||||
|
||||
boolean isGoodTemperature(EnumTemperature temperature);
|
||||
|
||||
/**
|
||||
* float representing the relative chance a hive will generate in a chunk.
|
||||
* Default is 1.0, higher numbers result in more hives, smaller will result in fewer.
|
||||
* Tree hives want around 3.0 to 4.0 since there are less locations to generate on.
|
||||
*/
|
||||
*/
|
||||
float getGenChance();
|
||||
|
||||
/**
|
||||
* Called after successful hive generation.
|
||||
* world, x, y, z give the location of the new hive.
|
||||
**/
|
||||
void postGen(World world, int x, int y, int z);
|
||||
void postGen(World world, Random rand, BlockPos pos);
|
||||
}
|
||||
@@ -5,25 +5,30 @@
|
||||
******************************************************************************/
|
||||
package forestry.api.apiculture.hives;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public interface IHiveGen {
|
||||
|
||||
/**
|
||||
* return a Y value that the hive should try to generate at.
|
||||
* returns negative if the hive can't be placed anywhere.
|
||||
* return a position that the hive should try to generate at.
|
||||
* returns null if the hive can't be placed anywhere.
|
||||
*/
|
||||
int getYForHive(World world, int x, int z);
|
||||
@Nullable
|
||||
BlockPos getPosForHive(World world, int x, int z);
|
||||
|
||||
/**
|
||||
* returns true if the hive can be generated at this location.
|
||||
* Used for advanced conditions, like checking that the ground below the hive is a certain type.
|
||||
*/
|
||||
boolean isValidLocation(World world, int x, int y, int z);
|
||||
boolean isValidLocation(World world, BlockPos pos);
|
||||
|
||||
/**
|
||||
* returns true if the hive can safely replace the block at this location.
|
||||
*/
|
||||
boolean canReplace(World world, int x, int y, int z);
|
||||
boolean canReplace(IBlockState blockState, World world, BlockPos pos);
|
||||
|
||||
}
|
||||
@@ -6,19 +6,54 @@
|
||||
package forestry.api.apiculture.hives;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import net.minecraft.util.IStringSerializable;
|
||||
|
||||
import forestry.api.apiculture.IHiveDrop;
|
||||
|
||||
public interface IHiveRegistry {
|
||||
|
||||
/* Forestry Hive Names */
|
||||
public static final String forest = "Forestry:forest";
|
||||
public static final String meadows = "Forestry:meadows";
|
||||
public static final String desert = "Forestry:desert";
|
||||
public static final String jungle = "Forestry:jungle";
|
||||
public static final String end = "Forestry:end";
|
||||
public static final String snow = "Forestry:snow";
|
||||
public static final String swamp = "Forestry:swamp";
|
||||
enum HiveType implements IStringSerializable {
|
||||
FOREST("forestry:forest", "forestry.speciesForest"),
|
||||
MEADOWS("forestry:meadows", "forestry.speciesMeadows"),
|
||||
DESERT("forestry:desert", "forestry.speciesModest"),
|
||||
JUNGLE("forestry:jungle", "forestry.speciesTropical"),
|
||||
END("forestry:end", "forestry.speciesEnded"),
|
||||
SNOW("forestry:snow", "forestry.speciesWintry"),
|
||||
SWAMP("forestry:swamp", "forestry.speciesMarshy"),
|
||||
SWARM("forestry:swarm", "forestry.speciesForest");
|
||||
|
||||
public static final HiveType[] VALUES = values();
|
||||
|
||||
private final String hiveUid;
|
||||
private final String speciesUid;
|
||||
|
||||
HiveType(String hiveUid, String speciesUid) {
|
||||
this.hiveUid = hiveUid;
|
||||
this.speciesUid = speciesUid;
|
||||
}
|
||||
|
||||
|
||||
public String getHiveUid() {
|
||||
return hiveUid;
|
||||
}
|
||||
|
||||
|
||||
public String getSpeciesUid() {
|
||||
return speciesUid;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return name().toLowerCase(Locale.ENGLISH);
|
||||
}
|
||||
|
||||
public int getMeta() {
|
||||
return ordinal();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a new hive to be generated in the world.
|
||||
@@ -29,5 +64,6 @@ public interface IHiveRegistry {
|
||||
* Add drops to a registered hive.
|
||||
*/
|
||||
void addDrops(String hiveName, IHiveDrop... drops);
|
||||
|
||||
void addDrops(String hiveName, List<IHiveDrop> drop);
|
||||
}
|
||||
@@ -3,6 +3,12 @@
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
@API(apiVersion="4.1.0", owner="ForestryAPI|apiculture", provides="ForestryAPI|hives")
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
@API(apiVersion = "4.1.0", owner = "ForestryAPI|apiculture", provides = "ForestryAPI|hives")
|
||||
package forestry.api.apiculture.hives;
|
||||
import cpw.mods.fml.common.API;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
|
||||
import mcp.MethodsReturnNonnullByDefault;
|
||||
import net.minecraftforge.fml.common.API;
|
||||
@@ -1,8 +1,14 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
@API(apiVersion="5.0.0", owner="ForestryAPI|core", provides="ForestryAPI|apiculture")
|
||||
@ParametersAreNonnullByDefault
|
||||
@MethodsReturnNonnullByDefault
|
||||
@API(apiVersion = "5.0.0", owner = "ForestryAPI|core", provides = "ForestryAPI|apiculture")
|
||||
package forestry.api.apiculture;
|
||||
import cpw.mods.fml.common.API;
|
||||
|
||||
import javax.annotation.ParametersAreNonnullByDefault;
|
||||
|
||||
import mcp.MethodsReturnNonnullByDefault;
|
||||
import net.minecraftforge.fml.common.API;
|
||||
@@ -0,0 +1,20 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.arboriculture;
|
||||
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
import net.minecraftforge.common.capabilities.CapabilityInject;
|
||||
|
||||
import forestry.api.core.IArmorNaturalist;
|
||||
|
||||
public class ArboricultureCapabilities {
|
||||
/**
|
||||
* Capability for {@link IArmorNaturalist}.
|
||||
* The {@link Capability#getDefaultInstance()} will always show pollination with no side effects.
|
||||
*/
|
||||
@CapabilityInject(IArmorNaturalist.class)
|
||||
public static Capability<IArmorNaturalist> ARMOR_NATURALIST;
|
||||
}
|
||||
@@ -0,0 +1,132 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.arboriculture;
|
||||
|
||||
import java.util.Locale;
|
||||
import java.util.Random;
|
||||
|
||||
public enum EnumForestryWoodType implements IWoodType {
|
||||
LARCH(4),
|
||||
TEAK(4),
|
||||
ACACIA(4),
|
||||
LIME(4),
|
||||
CHESTNUT(4),
|
||||
WENGE(4),
|
||||
BAOBAB(4),
|
||||
SEQUOIA(3, 4.0f),
|
||||
|
||||
KAPOK(4),
|
||||
EBONY(4),
|
||||
MAHOGANY(4),
|
||||
BALSA(4, 1.0f),
|
||||
WILLOW(4),
|
||||
WALNUT(4),
|
||||
GREENHEART(4, 7.5f),
|
||||
CHERRY(4),
|
||||
|
||||
MAHOE(4),
|
||||
POPLAR(4),
|
||||
PALM(4),
|
||||
PAPAYA(4),
|
||||
PINE(4, 3.0f),
|
||||
PLUM(4),
|
||||
MAPLE(4),
|
||||
CITRUS(4),
|
||||
|
||||
GIGANTEUM(3, 4.0f),
|
||||
IPE(4),
|
||||
PADAUK(4),
|
||||
COCOBOLO(4),
|
||||
ZEBRAWOOD(4);
|
||||
|
||||
public static final float DEFAULT_HARDNESS = 2.0f;
|
||||
public static final EnumForestryWoodType[] VALUES = values();
|
||||
|
||||
private final int carbonization;
|
||||
private final float hardness;
|
||||
|
||||
EnumForestryWoodType(int carbonization) {
|
||||
this(carbonization, DEFAULT_HARDNESS);
|
||||
}
|
||||
|
||||
EnumForestryWoodType(int carbonization, float hardness) {
|
||||
this.carbonization = carbonization;
|
||||
this.hardness = hardness;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getHardness() {
|
||||
return hardness;
|
||||
}
|
||||
|
||||
public static EnumForestryWoodType getRandom(Random random) {
|
||||
return VALUES[random.nextInt(VALUES.length)];
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString().toLowerCase(Locale.ENGLISH);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetadata() {
|
||||
return ordinal();
|
||||
}
|
||||
|
||||
public static EnumForestryWoodType byMetadata(int meta) {
|
||||
if (meta < 0 || meta >= VALUES.length) {
|
||||
meta = 0;
|
||||
}
|
||||
return VALUES[meta];
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCarbonization() {
|
||||
return carbonization;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getCharcoalChance(int numberOfCharcoal) {
|
||||
if (numberOfCharcoal == 3) {
|
||||
return 0.75F;
|
||||
} else if (numberOfCharcoal == 4) {
|
||||
return 0.5F;
|
||||
} else if (numberOfCharcoal == 5) {
|
||||
return 0.25F;
|
||||
}
|
||||
return 0.15F;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlankTexture() {
|
||||
return "forestry:blocks/wood/planks." + getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDoorLowerTexture() {
|
||||
return "forestry:blocks/doors/" + getName() + "_lower";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDoorUpperTexture() {
|
||||
return "forestry:blocks/doors/" + getName() + "_upper";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getBarkTexture() {
|
||||
return "forestry:blocks/wood/bark." + getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getHeartTexture() {
|
||||
return "forestry:blocks/wood/heart." + getName();
|
||||
}
|
||||
}
|
||||
@@ -5,7 +5,7 @@
|
||||
******************************************************************************/
|
||||
package forestry.api.arboriculture;
|
||||
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.util.text.translation.I18n;
|
||||
|
||||
import forestry.api.genetics.AlleleManager;
|
||||
import forestry.api.genetics.IFruitFamily;
|
||||
@@ -14,7 +14,8 @@ public enum EnumFruitFamily implements IFruitFamily {
|
||||
PRUNES("prunes", "Prunus domestica"),
|
||||
POMES("pomes", "Pomum"),
|
||||
JUNGLE("jungle", "Tropicus"),
|
||||
NUX("nuts", "Nux");
|
||||
NUX("nuts", "Nux"),
|
||||
NONE("none", "None");
|
||||
|
||||
private final String uid;
|
||||
private final String scientific;
|
||||
@@ -37,12 +38,12 @@ public enum EnumFruitFamily implements IFruitFamily {
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return StatCollector.translateToLocal("for.family." + uid);
|
||||
return I18n.translateToLocal("for.family." + uid);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return StatCollector.translateToLocal("for.family." + uid + ".description");
|
||||
return I18n.translateToLocal("for.family." + uid + ".description");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.arboriculture;
|
||||
@@ -8,10 +8,10 @@ package forestry.api.arboriculture;
|
||||
import forestry.api.genetics.ISpeciesType;
|
||||
|
||||
public enum EnumGermlingType implements ISpeciesType {
|
||||
SAPLING("sapling"), BLOSSOM("blossom"), POLLEN("pollen"), GERMLING("germling"), NONE("none");
|
||||
SAPLING("sapling"), POLLEN("pollen");
|
||||
|
||||
public static final EnumGermlingType[] VALUES = values();
|
||||
|
||||
|
||||
private final String name;
|
||||
|
||||
EnumGermlingType(String name) {
|
||||
|
||||
+7
-3
@@ -1,10 +1,14 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.arboriculture;
|
||||
|
||||
public enum EnumGrowthConditions {
|
||||
HOSTILE, PALTRY, NORMAL, GOOD, EXCELLENT
|
||||
public enum EnumPileType {
|
||||
WOOD,
|
||||
DIRT,
|
||||
ASH;
|
||||
|
||||
public static final EnumPileType[] VALUES = values();
|
||||
}
|
||||
@@ -1,23 +1,20 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.arboriculture;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import net.minecraftforge.common.EnumPlantType;
|
||||
|
||||
import forestry.api.genetics.IAllele;
|
||||
import forestry.api.genetics.IAlleleArea;
|
||||
import forestry.api.genetics.IAlleleBoolean;
|
||||
import forestry.api.genetics.IAlleleFloat;
|
||||
import forestry.api.genetics.IAlleleInteger;
|
||||
import forestry.api.genetics.IAllelePlantType;
|
||||
import forestry.api.genetics.IChromosomeType;
|
||||
import forestry.api.genetics.IFruitFamily;
|
||||
import forestry.api.genetics.ISpeciesRoot;
|
||||
import net.minecraftforge.common.EnumPlantType;
|
||||
|
||||
public enum EnumTreeChromosome implements IChromosomeType {
|
||||
|
||||
@@ -26,10 +23,6 @@ public enum EnumTreeChromosome implements IChromosomeType {
|
||||
* will actually yield fruit with this species. - Native {@link EnumPlantType} for this tree. Combines with the PLANT chromosome.
|
||||
*/
|
||||
SPECIES(IAlleleTreeSpecies.class),
|
||||
/**
|
||||
* {@link IGrowthProvider}, determines conditions required by the tree to grow.
|
||||
*/
|
||||
GROWTH(IAlleleGrowth.class),
|
||||
/**
|
||||
* A float modifying the height of the tree. Taken into account at worldgen.
|
||||
*/
|
||||
@@ -46,18 +39,10 @@ public enum EnumTreeChromosome implements IChromosomeType {
|
||||
* Chance for fruit leaves and/or drops.
|
||||
*/
|
||||
YIELD(IAlleleFloat.class),
|
||||
/**
|
||||
* May add additional tolerances for {@link EnumPlantTypes}.
|
||||
*/
|
||||
PLANT(IAllelePlantType.class),
|
||||
/**
|
||||
* Determines the speed at which fruit will ripen on this tree.
|
||||
*/
|
||||
SAPPINESS(IAlleleFloat.class),
|
||||
/**
|
||||
* Territory for leaf effects. Unused.
|
||||
*/
|
||||
TERRITORY(IAlleleArea.class),
|
||||
/**
|
||||
* Leaf effect. Unused.
|
||||
*/
|
||||
@@ -71,18 +56,17 @@ public enum EnumTreeChromosome implements IChromosomeType {
|
||||
/**
|
||||
* Determines if the tree can burn.
|
||||
*/
|
||||
FIREPROOF(IAlleleBoolean.class),
|
||||
;
|
||||
|
||||
Class<? extends IAllele> clss;
|
||||
|
||||
EnumTreeChromosome(Class<? extends IAllele> clss) {
|
||||
this.clss = clss;
|
||||
FIREPROOF(IAlleleBoolean.class),;
|
||||
|
||||
private final Class<? extends IAllele> alleleClass;
|
||||
|
||||
EnumTreeChromosome(Class<? extends IAllele> alleleClass) {
|
||||
this.alleleClass = alleleClass;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends IAllele> getAlleleClass() {
|
||||
return clss;
|
||||
return alleleClass;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -0,0 +1,122 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.arboriculture;
|
||||
|
||||
import java.util.Locale;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.BlockPlanks;
|
||||
|
||||
public enum EnumVanillaWoodType implements IWoodType {
|
||||
OAK(BlockPlanks.EnumType.OAK, 5),
|
||||
SPRUCE(BlockPlanks.EnumType.SPRUCE, 4),
|
||||
BIRCH(BlockPlanks.EnumType.BIRCH, 4),
|
||||
JUNGLE(BlockPlanks.EnumType.JUNGLE, 5),
|
||||
ACACIA(BlockPlanks.EnumType.ACACIA, 4),
|
||||
DARK_OAK(BlockPlanks.EnumType.DARK_OAK, 5);
|
||||
|
||||
public static final EnumVanillaWoodType[] VALUES = values();
|
||||
|
||||
public static EnumVanillaWoodType getRandom(Random random) {
|
||||
return VALUES[random.nextInt(VALUES.length)];
|
||||
}
|
||||
|
||||
private final BlockPlanks.EnumType vanillaType;
|
||||
private final int carbonization;
|
||||
|
||||
EnumVanillaWoodType(BlockPlanks.EnumType vanillaType, int carbonization) {
|
||||
this.vanillaType = vanillaType;
|
||||
this.carbonization = carbonization;
|
||||
}
|
||||
|
||||
public BlockPlanks.EnumType getVanillaType() {
|
||||
return vanillaType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString().toLowerCase(Locale.ENGLISH);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMetadata() {
|
||||
return ordinal();
|
||||
}
|
||||
|
||||
public static EnumVanillaWoodType byMetadata(int meta) {
|
||||
if (meta < 0 || meta >= VALUES.length) {
|
||||
meta = 0;
|
||||
}
|
||||
return VALUES[meta];
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getHardness() {
|
||||
return 2.0F;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCarbonization() {
|
||||
return carbonization;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getCharcoalChance(int numberOfCharcoal) {
|
||||
if (numberOfCharcoal == 3) {
|
||||
return 0.75F;
|
||||
} else if (numberOfCharcoal == 4) {
|
||||
return 0.5F;
|
||||
} else if (numberOfCharcoal == 5) {
|
||||
return 0.25F;
|
||||
}
|
||||
return 0.15F;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPlankTexture() {
|
||||
if (this == DARK_OAK) {
|
||||
return "blocks/planks_big_oak";
|
||||
}
|
||||
return "blocks/planks_" + getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDoorLowerTexture() {
|
||||
if (this == OAK) {
|
||||
return "blocks/door_wood_lower";
|
||||
}
|
||||
return "blocks/door_wood_lower";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDoorUpperTexture() {
|
||||
if (this == OAK) {
|
||||
return "blocks/door_wood_upper";
|
||||
}
|
||||
return "blocks/door_" + getName() + "_upper";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getBarkTexture() {
|
||||
if (this == DARK_OAK) {
|
||||
return "blocks/log_big_oak";
|
||||
}
|
||||
return "blocks/log_" + getName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getHeartTexture() {
|
||||
if (this == DARK_OAK) {
|
||||
return "blocks/log_big_oak_top";
|
||||
}
|
||||
return "blocks/log_" + getName() + "_top";
|
||||
}
|
||||
}
|
||||
@@ -1,69 +0,0 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.arboriculture;
|
||||
|
||||
import java.util.Locale;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
public enum EnumWoodType {
|
||||
LARCH, TEAK, ACACIA, LIME, CHESTNUT,
|
||||
WENGE, BAOBAB, SEQUOIA(4.0f), KAPOK, EBONY,
|
||||
MAHOGANY, BALSA(1.0f), WILLOW, WALNUT, GREENHEART(7.5f),
|
||||
CHERRY, MAHOE, POPLAR, PALM, PAPAYA,
|
||||
PINE(3.0f), PLUM, MAPLE, CITRUS, GIGANTEUM,
|
||||
IPE, PADAUK, COCOBOLO, ZEBRAWOOD;
|
||||
|
||||
public static final float DEFAULT_HARDNESS = 2.0f;
|
||||
public static final EnumWoodType[] VALUES = values();
|
||||
|
||||
private final float hardness;
|
||||
|
||||
EnumWoodType() {
|
||||
this.hardness = DEFAULT_HARDNESS;
|
||||
}
|
||||
|
||||
EnumWoodType(float hardness) {
|
||||
this.hardness = hardness;
|
||||
}
|
||||
|
||||
public float getHardness() {
|
||||
return hardness;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Forestry 4.2. Woods use itemDamage instead of NBT now
|
||||
*/
|
||||
@Deprecated
|
||||
public void saveToCompound(NBTTagCompound compound) {
|
||||
compound.setInteger("WoodType", ordinal());
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since Forestry 4.2. Woods use itemDamage instead of NBT now
|
||||
*/
|
||||
@Deprecated
|
||||
public static EnumWoodType getFromCompound(NBTTagCompound compound) {
|
||||
if (compound != null) {
|
||||
int typeOrdinal = compound.getInteger("WoodType");
|
||||
if (typeOrdinal >= 0 && typeOrdinal < VALUES.length) {
|
||||
return VALUES[typeOrdinal];
|
||||
}
|
||||
}
|
||||
|
||||
return EnumWoodType.LARCH;
|
||||
}
|
||||
|
||||
public static EnumWoodType getRandom(Random random) {
|
||||
return VALUES[random.nextInt(VALUES.length)];
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString().toLowerCase(Locale.ENGLISH);
|
||||
}
|
||||
}
|
||||
@@ -1,17 +1,22 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.arboriculture;
|
||||
|
||||
import forestry.api.genetics.IAllele;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import forestry.api.genetics.IAlleleProperty;
|
||||
|
||||
/**
|
||||
* Simple allele encapsulating an {@link IFruitProvider}.
|
||||
*/
|
||||
public interface IAlleleFruit extends IAllele {
|
||||
public interface IAlleleFruit extends IAlleleProperty<IAlleleFruit> {
|
||||
|
||||
IFruitProvider getProvider();
|
||||
|
||||
@Nullable
|
||||
String getModelName();
|
||||
|
||||
}
|
||||
@@ -1,20 +1,20 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.arboriculture;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import forestry.api.genetics.IAlleleEffect;
|
||||
import forestry.api.genetics.IEffectData;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/**
|
||||
* Simple allele encapsulating a leaf effect. (Not implemented)
|
||||
*/
|
||||
public interface IAlleleLeafEffect extends IAlleleEffect {
|
||||
|
||||
IEffectData doEffect(ITreeGenome genome, IEffectData storedData, World world, int x, int y, int z);
|
||||
IEffectData doEffect(ITreeGenome genome, IEffectData storedData, World world, BlockPos pos);
|
||||
|
||||
}
|
||||
@@ -1,26 +1,30 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.arboriculture;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.item.Item;
|
||||
|
||||
import net.minecraftforge.common.EnumPlantType;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import forestry.api.core.IModelManager;
|
||||
import forestry.api.genetics.IAlleleProperty;
|
||||
import forestry.api.genetics.IAlleleSpecies;
|
||||
import forestry.api.genetics.IFruitFamily;
|
||||
|
||||
public interface IAlleleTreeSpecies extends IAlleleSpecies {
|
||||
public interface IAlleleTreeSpecies extends IAlleleSpecies, IAlleleProperty<IAlleleTreeSpecies> {
|
||||
|
||||
@Override
|
||||
ITreeRoot getRoot();
|
||||
|
||||
|
||||
/**
|
||||
* @return Native plant type of this species.
|
||||
*/
|
||||
@@ -35,17 +39,29 @@ public interface IAlleleTreeSpecies extends IAlleleSpecies {
|
||||
* @return Tree generator for this species.
|
||||
*/
|
||||
ITreeGenerator getGenerator();
|
||||
|
||||
/* TEXTURES AND OVERRIDES */
|
||||
int getLeafColour(boolean pollinated);
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
IIcon getLeafIcon(boolean pollinated, boolean fancy);
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
IIcon getGermlingIcon(EnumGermlingType type, int renderPass);
|
||||
|
||||
/**
|
||||
* @return Float between 0 and 1 representing the rarity of the species, will affect spawn rate. If it's 0, it will not spawn.
|
||||
*/
|
||||
float getRarity();
|
||||
|
||||
IWoodProvider getWoodProvider();
|
||||
|
||||
ILeafProvider getLeafProvider();
|
||||
|
||||
IGrowthProvider getGrowthProvider();
|
||||
|
||||
/* MODELS AND OVERRIDES */
|
||||
@SideOnly(Side.CLIENT)
|
||||
ILeafSpriteProvider getLeafSpriteProvider();
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
int getGermlingColour(EnumGermlingType type, int renderPass);
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
ModelResourceLocation getGermlingModel(EnumGermlingType type);
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
void registerModels(Item item, IModelManager manager, EnumGermlingType type);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.arboriculture;
|
||||
|
||||
import forestry.api.genetics.IAlleleSpeciesBuilder;
|
||||
import forestry.api.genetics.IFruitFamily;
|
||||
import net.minecraftforge.common.EnumPlantType;
|
||||
|
||||
public interface IAlleleTreeSpeciesBuilder extends IAlleleSpeciesBuilder {
|
||||
|
||||
@Override
|
||||
IAlleleTreeSpecies build();
|
||||
|
||||
/**
|
||||
* Add a fruit family for this tree. Trees can have multiple fruit families.
|
||||
*/
|
||||
IAlleleTreeSpeciesBuilder addFruitFamily(IFruitFamily family);
|
||||
|
||||
/**
|
||||
* Set the minecraft plant type for this tree. Default is Plains.
|
||||
*/
|
||||
IAlleleTreeSpeciesBuilder setPlantType(EnumPlantType type);
|
||||
|
||||
/**
|
||||
* Set rarity of the species, will affect spawn rate in the world. Must be a float between 0 and 1. If it's 0, it will not spawn.
|
||||
*/
|
||||
IAlleleTreeSpeciesBuilder setRarity(float rarity);
|
||||
|
||||
/**
|
||||
* Set the growth provider.
|
||||
*/
|
||||
IAlleleTreeSpeciesBuilder setGrowthProvider(IGrowthProvider growthProvider);
|
||||
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.arboriculture;
|
||||
|
||||
import net.minecraftforge.common.EnumPlantType;
|
||||
|
||||
import forestry.api.genetics.IAlleleSpeciesCustom;
|
||||
import forestry.api.genetics.IFruitFamily;
|
||||
|
||||
public interface IAlleleTreeSpeciesCustom extends IAlleleSpeciesCustom, IAlleleTreeSpecies {
|
||||
|
||||
/** Add a fruit family for this tree. Trees can have multiple fruit families. */
|
||||
IAlleleTreeSpeciesCustom addFruitFamily(IFruitFamily family);
|
||||
|
||||
/** Set the minecraft plant type for this tree. Default is Plains. */
|
||||
IAlleleTreeSpeciesCustom setPlantType(EnumPlantType type);
|
||||
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.arboriculture;
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.arboriculture;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
|
||||
/**
|
||||
* Provides functions that are related to the forestry charcoal pile.
|
||||
*/
|
||||
public interface ICharcoalManager {
|
||||
/**
|
||||
* Registers the given block as a valid block for the charcoal pile wall and adds the given charcoal amount to it.
|
||||
* <p>
|
||||
* This method unlike {@link #registerWall(IBlockState, int)} ignores the metadata of the actual block and
|
||||
* only compares the world block with the given block.
|
||||
*/
|
||||
void registerWall(Block block, int amount);
|
||||
|
||||
/**
|
||||
* Registers the given block as a valid block for the charcoal pile wall and adds the given charcoal amount to it.
|
||||
* <p>
|
||||
* This method unlike {@link #registerWall(Block, int)} compares the world state with the given state and not
|
||||
* only the block.
|
||||
*/
|
||||
void registerWall(IBlockState blockState, int amount);
|
||||
|
||||
/**
|
||||
* Registers your implementation of the {@link ICharcoalPileWall} interface.
|
||||
*/
|
||||
void registerWall(ICharcoalPileWall wall);
|
||||
|
||||
/**
|
||||
* @return A collection with all registered charcoal pile walls.
|
||||
*/
|
||||
Collection<ICharcoalPileWall> getWalls();
|
||||
}
|
||||
+15
-6
@@ -5,12 +5,21 @@
|
||||
******************************************************************************/
|
||||
package forestry.api.arboriculture;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.NonNullList;
|
||||
|
||||
public interface IWoodItemAccess {
|
||||
ItemStack getLog(EnumWoodType woodType, boolean fireproof);
|
||||
ItemStack getPlanks(EnumWoodType woodType, boolean fireproof);
|
||||
ItemStack getSlab(EnumWoodType woodType, boolean fireproof);
|
||||
ItemStack getFence(EnumWoodType woodType, boolean fireproof);
|
||||
ItemStack getStairs(EnumWoodType woodType, boolean fireproof);
|
||||
public interface ICharcoalPileWall {
|
||||
|
||||
int getCharcoalAmount();
|
||||
|
||||
boolean matches(IBlockState state);
|
||||
|
||||
@Deprecated
|
||||
default NonNullList<ItemStack> getDisplyItems(){
|
||||
return getDisplayItems();
|
||||
}
|
||||
|
||||
NonNullList<ItemStack> getDisplayItems();
|
||||
|
||||
}
|
||||
@@ -1,56 +1,70 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.arboriculture;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
|
||||
import forestry.api.genetics.IFruitFamily;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
public interface IFruitProvider {
|
||||
|
||||
IFruitFamily getFamily();
|
||||
|
||||
int getColour(ITreeGenome genome, IBlockAccess world, int x, int y, int z, int ripeningTime);
|
||||
int getColour(ITreeGenome genome, IBlockAccess world, BlockPos pos, int ripeningTime);
|
||||
|
||||
boolean markAsFruitLeaf(ITreeGenome genome, World world, int x, int y, int z);
|
||||
/**
|
||||
* return the color to use for decorative leaves. Usually the ripe color.
|
||||
*/
|
||||
int getDecorativeColor();
|
||||
|
||||
boolean isFruitLeaf(ITreeGenome genome, World world, BlockPos pos);
|
||||
|
||||
int getRipeningPeriod();
|
||||
|
||||
// / Products, Chance
|
||||
ItemStack[] getProducts();
|
||||
Map<ItemStack, Float> getProducts();
|
||||
|
||||
// / Specialty, Chance
|
||||
ItemStack[] getSpecialty();
|
||||
Map<ItemStack, Float> getSpecialty();
|
||||
|
||||
ItemStack[] getFruits(ITreeGenome genome, World world, int x, int y, int z, int ripeningTime);
|
||||
NonNullList<ItemStack> getFruits(ITreeGenome genome, World world, BlockPos pos, int ripeningTime);
|
||||
|
||||
/**
|
||||
* @return Short, human-readable identifier used in the treealyzer.
|
||||
*/
|
||||
String getDescription();
|
||||
|
||||
@Nullable
|
||||
String getModelName();
|
||||
|
||||
String getModID();
|
||||
|
||||
/* TEXTURE OVERLAY */
|
||||
|
||||
/**
|
||||
* @param genome
|
||||
* @param world
|
||||
* @param x
|
||||
* @param y
|
||||
* @param z
|
||||
* @param ripeningTime
|
||||
* Elapsed ripening time for the fruit.
|
||||
* @param fancy
|
||||
* @return IIcon index of the texture to overlay on the leaf block.
|
||||
* @param ripeningTime Elapsed ripening time for the fruit.
|
||||
* @return ResourceLocation of the texture to overlay on the leaf block.
|
||||
*/
|
||||
short getIconIndex(ITreeGenome genome, IBlockAccess world, int x, int y, int z, int ripeningTime, boolean fancy);
|
||||
@Nullable
|
||||
ResourceLocation getSprite(ITreeGenome genome, IBlockAccess world, BlockPos pos, int ripeningTime);
|
||||
|
||||
/**
|
||||
* return the ResourceLocation to display on decorative leaves
|
||||
*/
|
||||
@Nullable
|
||||
ResourceLocation getDecorativeSprite();
|
||||
|
||||
/**
|
||||
* @return true if this fruit provider requires fruit blocks to spawn, false otherwise.
|
||||
@@ -59,16 +73,12 @@ public interface IFruitProvider {
|
||||
|
||||
/**
|
||||
* Tries to spawn a fruit block at the potential position when the tree generates.
|
||||
*
|
||||
* @param genome
|
||||
* @param world
|
||||
* @param x
|
||||
* @param y
|
||||
* @param z
|
||||
* Spawning a fruit has a random chance of success based on {@link ITreeGenome#getSappiness()}
|
||||
*
|
||||
* @return true if a fruit block was spawned, false otherwise.
|
||||
*/
|
||||
boolean trySpawnFruitBlock(ITreeGenome genome, World world, int x, int y, int z);
|
||||
boolean trySpawnFruitBlock(ITreeGenome genome, World world, Random rand, BlockPos pos);
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
void registerIcons(IIconRegister register);
|
||||
void registerSprites();
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.arboriculture;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
/**
|
||||
* Provides icons for saplings, pollen, etc.
|
||||
* You must implement this yourself to use TreeManager.treeFactory.createSpecies()
|
||||
* There is no default implementation because every sapling has a unique icon.
|
||||
*/
|
||||
public interface IGermlingIconProvider {
|
||||
void registerIcons(IIconRegister register);
|
||||
IIcon getIcon(EnumGermlingType type, int renderPass);
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.arboriculture;
|
||||
|
||||
import forestry.api.core.IModelManager;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
/**
|
||||
* Provides icons for saplings, pollen, etc.
|
||||
* You must implement this yourself to use TreeManager.treeFactory.createSpecies()
|
||||
* There is no default implementation because every sapling has a unique icon.
|
||||
*/
|
||||
public interface IGermlingModelProvider {
|
||||
@SideOnly(Side.CLIENT)
|
||||
void registerModels(Item item, IModelManager manager, EnumGermlingType type);
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
ModelResourceLocation getModel(EnumGermlingType type);
|
||||
|
||||
/**
|
||||
* Provides color for sapling. See {@link ILeafSpriteProvider} for pollen color.
|
||||
*
|
||||
* @param type the germling type to render
|
||||
* @param renderPass renderPass of rendering
|
||||
* @return sapling color for renderPass
|
||||
*/
|
||||
int getSpriteColor(EnumGermlingType type, int renderPass);
|
||||
}
|
||||
@@ -1,38 +1,18 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.arboriculture;
|
||||
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
|
||||
public interface IGrowthProvider {
|
||||
|
||||
/**
|
||||
* Check to see whether a sapling at the given location with the given genome can grow into a tree.
|
||||
*
|
||||
* @param genome Genome of the tree this is called for.
|
||||
* @param world Minecraft world the tree will inhabit.
|
||||
* @param xPos x-Coordinate to attempt growth at.
|
||||
* @param yPos y-Coordinate to attempt growth at.
|
||||
* @param zPos z-Coordinate to attempt growth at.
|
||||
* @param expectedGirth Trunk size of the tree to generate.
|
||||
* @param expectedHeight Height of the tree to generate.
|
||||
* @return true if the tree can grow at the given coordinates, false otherwise.
|
||||
*/
|
||||
boolean canGrow(ITreeGenome genome, World world, int xPos, int yPos, int zPos, int expectedGirth, int expectedHeight);
|
||||
|
||||
EnumGrowthConditions getGrowthConditions(ITreeGenome genome, World world, int xPos, int yPos, int zPos);
|
||||
|
||||
/**
|
||||
* @return Short, human-readable identifier used in the treealyzer.
|
||||
*/
|
||||
String getDescription();
|
||||
|
||||
/**
|
||||
* @return Detailed description of growth behaviour used in the treealyzer.
|
||||
*/
|
||||
String[] getInfo();
|
||||
|
||||
boolean canSpawn(ITree tree, World world, BlockPos pos);
|
||||
|
||||
boolean isBiomeValid(ITree tree, Biome biome);
|
||||
|
||||
}
|
||||
+8
-9
@@ -1,17 +1,16 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.arboriculture;
|
||||
|
||||
import forestry.api.genetics.IAllele;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
/**
|
||||
* Simple allele encapsulating an {@link IGrowthProvider}.
|
||||
*/
|
||||
public interface IAlleleGrowth extends IAllele {
|
||||
public interface ILeafProvider {
|
||||
|
||||
void init(IAlleleTreeSpecies treeSpecies);
|
||||
|
||||
IGrowthProvider getProvider();
|
||||
|
||||
}
|
||||
ItemStack getDecorativeLeaves();
|
||||
|
||||
}
|
||||
+5
-4
@@ -5,16 +5,17 @@
|
||||
******************************************************************************/
|
||||
package forestry.api.arboriculture;
|
||||
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
||||
/**
|
||||
* Provides icons for leaves. Used by TreeManager.treeFactory.createSpecies()
|
||||
* Get a default Forestry implementation from TreeManager.treeFactory.getLeafIconProvider() or implement your own.
|
||||
*
|
||||
* <p>
|
||||
* If you implement your own, be sure to register the icons.
|
||||
* Icon registration is not done here because these icons are heavily reused.
|
||||
*/
|
||||
public interface ILeafIconProvider {
|
||||
IIcon getIcon(boolean pollinated, boolean fancy);
|
||||
public interface ILeafSpriteProvider {
|
||||
ResourceLocation getSprite(boolean pollinated, boolean fancy);
|
||||
|
||||
int getColor(boolean pollinated);
|
||||
}
|
||||
@@ -1,12 +1,15 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.arboriculture;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public interface ILeafTickHandler {
|
||||
boolean onRandomLeafTick(ITree tree, World world, int x, int y, int z, boolean isDestroyed);
|
||||
boolean onRandomLeafTick(ITree tree, World world, Random rand, BlockPos pos, boolean isDestroyed);
|
||||
}
|
||||
@@ -1,24 +1,23 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.arboriculture;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public interface IToolGrafter {
|
||||
/**
|
||||
* Called by leaves to determine the increase in sapling droprate.
|
||||
*
|
||||
*
|
||||
* @param stack ItemStack containing the grafter.
|
||||
* @param world Minecraft world the player and the target block inhabit.
|
||||
* @param x x-Coordinate of the broken leaf block.
|
||||
* @param y y-Coordinate of the broken leaf block.
|
||||
* @param z z-Coordinate of the broken leaf block.
|
||||
* @param pos Coordinate of the broken leaf block.
|
||||
* @return Float representing the factor the usual drop chance is to be multiplied by.
|
||||
*/
|
||||
float getSaplingModifier(ItemStack stack, World world, EntityPlayer player, int x, int y, int z);
|
||||
float getSaplingModifier(ItemStack stack, World world, EntityPlayer player, BlockPos pos);
|
||||
}
|
||||
@@ -1,58 +1,67 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.api.arboriculture;
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
|
||||
import net.minecraftforge.common.EnumPlantType;
|
||||
|
||||
import forestry.api.genetics.IEffectData;
|
||||
import forestry.api.genetics.IIndividual;
|
||||
import forestry.api.world.ITreeGenData;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
public interface ITree extends IIndividual, ITreeGenData {
|
||||
|
||||
void mate(ITree other);
|
||||
|
||||
IEffectData[] doEffect(IEffectData[] storedData, World world, int x, int y, int z);
|
||||
IEffectData[] doEffect(IEffectData[] storedData, World world, BlockPos pos);
|
||||
|
||||
IEffectData[] doFX(IEffectData[] storedData, World world, int x, int y, int z);
|
||||
@SideOnly(Side.CLIENT)
|
||||
IEffectData[] doFX(IEffectData[] storedData, World world, BlockPos pos);
|
||||
|
||||
@Override
|
||||
ITreeGenome getGenome();
|
||||
|
||||
@Nullable
|
||||
ITreeGenome getMate();
|
||||
|
||||
EnumSet<EnumPlantType> getPlantTypes();
|
||||
|
||||
/**
|
||||
* @since Forestry 4.0
|
||||
*/
|
||||
ITree[] getSaplings(World world, GameProfile playerProfile, int x, int y, int z, float modifier);
|
||||
List<ITree> getSaplings(World world, @Nullable GameProfile playerProfile, BlockPos pos, float modifier);
|
||||
|
||||
ItemStack[] getProduceList();
|
||||
// Products, Chance
|
||||
Map<ItemStack, Float> getProducts();
|
||||
|
||||
ItemStack[] getSpecialtyList();
|
||||
// Specialties, Chance
|
||||
Map<ItemStack, Float> getSpecialties();
|
||||
|
||||
ItemStack[] produceStacks(World world, int x, int y, int z, int ripeningTime);
|
||||
NonNullList<ItemStack> produceStacks(World world, BlockPos pos, int ripeningTime);
|
||||
|
||||
/**
|
||||
* @return Boolean indicating whether a sapling can stay planted at the given position.
|
||||
*/
|
||||
boolean canStay(World world, int x, int y, int z);
|
||||
boolean canStay(IBlockAccess world, BlockPos pos);
|
||||
|
||||
/**
|
||||
* @return Boolean indicating whether a sapling at the given position can grow into a tree.
|
||||
* @return Position that this tree can grow. May be different from pos if there are multiple saplings.
|
||||
* Returns null if a sapling at the given position can not grow into a tree.
|
||||
*/
|
||||
boolean canGrow(World world, int x, int y, int z, int expectedGirth, int expectedHeight);
|
||||
@Override
|
||||
@Nullable
|
||||
BlockPos canGrow(World world, BlockPos pos, int expectedGirth, int expectedHeight);
|
||||
|
||||
/**
|
||||
* @return Integer denoting the maturity (block ticks) required for a sapling to attempt to grow into a tree.
|
||||
@@ -63,19 +72,16 @@ public interface ITree extends IIndividual, ITreeGenData {
|
||||
* @return Integer denoting how resilient leaf blocks are against adverse influences (i.e. caterpillars).
|
||||
*/
|
||||
int getResilience();
|
||||
|
||||
|
||||
/**
|
||||
* @return Integer denoting the size of the tree trunk.
|
||||
*/
|
||||
int getGirth(World world, int x, int y, int z);
|
||||
@Override
|
||||
int getGirth();
|
||||
|
||||
/**
|
||||
* @return Growth conditions at the given position.
|
||||
*/
|
||||
EnumGrowthConditions getGrowthCondition(World world, int x, int y, int z);
|
||||
|
||||
WorldGenerator getTreeGenerator(World world, int x, int y, int z, boolean wasBonemealed);
|
||||
WorldGenerator getTreeGenerator(World world, BlockPos pos, boolean wasBonemealed);
|
||||
|
||||
@Override
|
||||
ITree copy();
|
||||
|
||||
boolean isPureBred(EnumTreeChromosome chromosome);
|
||||
|
||||
Loaded 100 of 3569 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user