mirror of
https://github.com/GTNewHorizons/ThaumicTinkerer.git
synced 2026-11-28 16:06:07 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
28c0a749c8 | ||
|
|
672822b1b1 | ||
|
|
1505437bc4 | ||
|
|
377c5f688e | ||
|
|
d7d50f873a | ||
|
|
37f5fa4e02 | ||
|
|
2609b03e02 | ||
|
|
6c56d3c9b1 | ||
|
|
d14d2cf0a2 | ||
|
|
b605a836ea | ||
|
|
01b41b8f77 | ||
|
|
6e914be9eb | ||
|
|
6a71cd28ec | ||
|
|
3b2495870f | ||
|
|
f11fb8bad4 | ||
|
|
84b56e3f18 | ||
|
|
740c1d7fd9 | ||
|
|
73223de2dd | ||
|
|
65ba1f4464 | ||
|
|
c8fdb5747f | ||
|
|
52f872b6ad | ||
|
|
f1751ce5bc | ||
|
|
d4f5857ec0 | ||
|
|
80c1960c7c | ||
|
|
11c8199f4f | ||
|
|
dd943e80a9 | ||
|
|
4c9d2a00ab | ||
|
|
8e64099df4 | ||
|
|
60383f52df | ||
|
|
17a06b2c2d | ||
|
|
9f79fc786d | ||
|
|
bbe915413b | ||
|
|
ce9de390fd | ||
|
|
7a6f26f915 | ||
|
|
ad8e9375a9 | ||
|
|
eb36cf02dd | ||
|
|
3388dd2296 | ||
|
|
3d6ed92e7f | ||
|
|
96ecc27389 | ||
|
|
accc812448 | ||
|
|
4078ef5731 | ||
|
|
bd07066f16 | ||
|
|
cb230093d5 | ||
|
|
43ecd3f82f | ||
|
|
c74625c8f0 | ||
|
|
48a1cdbe07 | ||
|
|
2eaec0d010 | ||
|
|
95e0a8350c | ||
|
|
504ad29aa8 | ||
|
|
a2b24f95cd | ||
|
|
906b93e16e | ||
|
|
973299fab8 | ||
|
|
20f233bbc4 | ||
|
|
abeafc36da | ||
|
|
fdc971841f | ||
|
|
137749c38a | ||
|
|
717533534d | ||
|
|
a6568edb96 | ||
|
|
f259ae670b | ||
|
|
7455daecd9 | ||
|
|
9bba1f209a | ||
|
|
8cfa60719d | ||
|
|
67ee85b77d | ||
|
|
0c4cdad475 | ||
|
|
dfec103fcf | ||
|
|
0da10ce8d4 | ||
|
|
f35d8a755f | ||
|
|
eee99a0c81 | ||
|
|
db3bb554b4 | ||
|
|
2e1794b484 | ||
|
|
579c850ca1 | ||
|
|
47896bc02d | ||
|
|
97dc338023 | ||
|
|
79f59db6f5 | ||
|
|
da0bcacdf4 | ||
|
|
169ee31b8e | ||
|
|
34aee427c7 | ||
|
|
482bffabce | ||
|
|
5035d2fffd | ||
|
|
84788dcf54 | ||
|
|
c7fe97c48d | ||
|
|
58d57a02e5 | ||
|
|
085c9b553e | ||
|
|
fc6329335d | ||
|
|
ddf1569f24 | ||
|
|
f38a73197c | ||
|
|
cca69d2e7a | ||
|
|
3a2df62fae | ||
|
|
90dc246e3a | ||
|
|
fe9a84e60e | ||
|
|
d6ea0a3972 | ||
|
|
a73d38de64 | ||
|
|
7cdbfb8254 | ||
|
|
525cf467dc | ||
|
|
d40e8585b3 | ||
|
|
aa41a8485f | ||
|
|
d179e36347 | ||
|
|
3c9322af05 | ||
|
|
9655c9b58d | ||
|
|
a9a7eabb72 | ||
|
|
578f6fc868 | ||
|
|
08341ebd60 | ||
|
|
417e86a4ca | ||
|
|
5874de06d7 | ||
|
|
f3a167dc8a | ||
|
|
f998506f9c | ||
|
|
81d9fe3d97 | ||
|
|
981397cf3c | ||
|
|
fd45ef3f92 | ||
|
|
1aa642b65b | ||
|
|
087202247a | ||
|
|
9ad933874a | ||
|
|
6d6a847536 | ||
|
|
51deb58f78 | ||
|
|
75a7d55411 | ||
|
|
3a68e7935c | ||
|
|
3d9f996d99 | ||
|
|
f4060274d5 | ||
|
|
329961bfed | ||
|
|
7ff8a7a40e | ||
|
|
35340b2fcd | ||
|
|
b3c401f718 | ||
|
|
9b9f49675b | ||
|
|
e03466fcc2 | ||
|
|
fd92c885e8 | ||
|
|
25811bc207 | ||
|
|
753cfc0140 | ||
|
|
f07d933e35 | ||
|
|
f578198479 | ||
|
|
ecda071df8 | ||
|
|
547df8eff0 | ||
|
|
55a2fa4e7a | ||
|
|
ecc0ad66dc | ||
|
|
f5f0b38d48 | ||
|
|
ec26bfee98 | ||
|
|
d2da2996a3 | ||
|
|
6f1aa321d5 | ||
|
|
7fb1ea7214 | ||
|
|
2bcc83bc87 | ||
|
|
9f002fc743 | ||
|
|
486567a9cb | ||
|
|
09eb7c9ce8 | ||
|
|
0cf7066b7e | ||
|
|
34c846b475 | ||
|
|
7f466627c1 | ||
|
|
e0c3e3ad07 | ||
|
|
b830f87b23 | ||
|
|
4683b995a8 | ||
|
|
f812e74fba | ||
|
|
bea4ccc1e3 | ||
|
|
3419f42318 | ||
|
|
c1d38a434b | ||
|
|
7b62b0d478 | ||
|
|
321775cb93 | ||
|
|
7a196a06ca | ||
|
|
f15c7ca364 | ||
|
|
43cd815442 | ||
|
|
cb2855baac | ||
|
|
9572fcdd01 | ||
|
|
3d8de57312 | ||
|
|
38887a2252 | ||
|
|
1a7f11bace | ||
|
|
836bae42ad | ||
|
|
a17c529252 | ||
|
|
6f534bb52a | ||
|
|
504adabd0e | ||
|
|
05c2f0bc45 | ||
|
|
8fc69e8338 | ||
|
|
2b35134bad | ||
|
|
8d91096c4d | ||
|
|
f477187ede | ||
|
|
f42f3d3685 | ||
|
|
6622892f0e | ||
|
|
70e3c09600 | ||
|
|
6365e45ac8 | ||
|
|
cf600636bf | ||
|
|
d478a9e1f7 | ||
|
|
9deb20d7f1 | ||
|
|
22dc31e327 | ||
|
|
2e7f142a01 | ||
|
|
e8f02fe4d3 | ||
|
|
6f3cfdc8dd | ||
|
|
876bd85375 | ||
|
|
f262171c2b | ||
|
|
8fcdae376c | ||
|
|
d869801895 | ||
|
|
2697bb9017 | ||
|
|
07923989f3 | ||
|
|
e6daf64ab5 | ||
|
|
0558f81f17 | ||
|
|
2e5407ea42 | ||
|
|
46a0deacfb | ||
|
|
881378a5aa | ||
|
|
fc3e896c88 | ||
|
|
1ed45708dd | ||
|
|
bdc2fd3091 | ||
|
|
8ed69b88bc | ||
|
|
16d1ec0462 | ||
|
|
7f98d51cbb | ||
|
|
5a54b66bf5 | ||
|
|
99d45f957c | ||
|
|
e21101d635 | ||
|
|
dcc4ed95c1 | ||
|
|
a0fc1aee13 | ||
|
|
d1f139edcf | ||
|
|
46e5d2755f | ||
|
|
a397740d1c | ||
|
|
95a1c4ef2b | ||
|
|
c3dc9d1b1f | ||
|
|
6f3dc7f490 | ||
|
|
3cbd4aafb1 | ||
|
|
8d1456aa95 | ||
|
|
2a42f6a092 | ||
|
|
c796781f5c | ||
|
|
7716940286 | ||
|
|
a29ed292b6 | ||
|
|
f8ab8e785c | ||
|
|
c207c9ca97 | ||
|
|
38945de076 | ||
|
|
7b527593b7 | ||
|
|
dda5f72322 | ||
|
|
73fa0f2df1 | ||
|
|
7c35cfb711 | ||
|
|
5a2eacaff1 | ||
|
|
0e7ef4c856 | ||
|
|
11ec90b990 | ||
|
|
6acc9c2762 | ||
|
|
6eba97dd97 | ||
|
|
662f03c4f3 | ||
|
|
6c95b877bd | ||
|
|
1d1be5efd4 | ||
|
|
2e5cdaf2ac | ||
|
|
f9aedca248 | ||
|
|
f6c172f6c8 | ||
|
|
c68f04d9d9 | ||
|
|
c878403bd6 | ||
|
|
3dfda37c58 | ||
|
|
05a02e0521 | ||
|
|
260cff2f38 | ||
|
|
9b505f9962 | ||
|
|
3e0e4df02d | ||
|
|
8242bc0d5c | ||
|
|
794e78a774 | ||
|
|
a106d6b7bf | ||
|
|
2aa1f70d6b | ||
|
|
ccae308cf7 | ||
|
|
cab3af0985 | ||
|
|
82309b798d | ||
|
|
88452d0a0c | ||
|
|
b5f4402fca | ||
|
|
09c32e1def | ||
|
|
8161174c8b | ||
|
|
79cc4e7019 | ||
|
|
4e92c1bd87 | ||
|
|
c582281431 | ||
|
|
ca864a73ff | ||
|
|
8e38975b50 | ||
|
|
6669691f87 | ||
|
|
b6ce57a9db | ||
|
|
77381de551 | ||
|
|
f7aaa35c6e | ||
|
|
a9f83ebc92 | ||
|
|
bc30d83a4e | ||
|
|
57ae35f7bc | ||
|
|
ede9de2ff4 | ||
|
|
c65f627a2f | ||
|
|
72b0eaf009 | ||
|
|
ef76485185 | ||
|
|
e7aedd4bf1 | ||
|
|
9ec223f1f7 | ||
|
|
2bdc2f9ee9 | ||
|
|
8328a80873 | ||
|
|
c8562b6dfa | ||
|
|
cc34336880 | ||
|
|
cf7aa8e357 | ||
|
|
8ea5f625d2 | ||
|
|
9d3250ceef | ||
|
|
cc6cd807fa | ||
|
|
fa9c2df3f3 | ||
|
|
d74b2a20f1 | ||
|
|
a081c7cc43 | ||
|
|
1b2748e4f0 | ||
|
|
488ebc0ad5 | ||
|
|
98b7922a8b | ||
|
|
746af19e7c | ||
|
|
ef879721e2 | ||
|
|
fe28730623 | ||
|
|
cb3955f25a | ||
|
|
5b2c1e0d84 | ||
|
|
1c81f4cb2a | ||
|
|
d1dc02134a | ||
|
|
e851cbf73a | ||
|
|
ebbb330fe2 | ||
|
|
cc44bf7c25 | ||
|
|
a4415ae838 | ||
|
|
8818468461 | ||
|
|
e0de7bafab | ||
|
|
b7b64aebf6 | ||
|
|
b19b5fabcf | ||
|
|
b371f23dc1 | ||
|
|
96263612a5 | ||
|
|
d748f5c32b | ||
|
|
5d7bdd9f2a | ||
|
|
f9a597d00d | ||
|
|
751da64b40 | ||
|
|
1ec374057a | ||
|
|
a3fc6a13a5 | ||
|
|
5694358bef | ||
|
|
27ba70fb14 | ||
|
|
1e612d4281 | ||
|
|
000652eaed | ||
|
|
2456f31f47 | ||
|
|
9196916bd1 | ||
|
|
d7236dd31e | ||
|
|
2b9d7764e5 | ||
|
|
4e6464ce00 | ||
|
|
ab4c4b4ab6 | ||
|
|
e7cc9de002 | ||
|
|
20fd6305db | ||
|
|
8f6efcaf45 | ||
|
|
c149c75b54 | ||
|
|
9e4f99c777 | ||
|
|
1393304f00 | ||
|
|
b02410da8b | ||
|
|
36b42046db | ||
|
|
3e569142da | ||
|
|
024ec87bbc | ||
|
|
d145e1f430 | ||
|
|
4c030a959d | ||
|
|
ac0c44db28 | ||
|
|
4d7efc0556 | ||
|
|
90b256dba5 | ||
|
|
b8ead3310b | ||
|
|
abddcfb23f | ||
|
|
a49eb3985f | ||
|
|
fead344072 | ||
|
|
3deed5e0e6 | ||
|
|
a4f0dc010e | ||
|
|
adcb2299c1 | ||
|
|
925f076e5e | ||
|
|
1a06ebb4b5 | ||
|
|
211da4fa4d | ||
|
|
36f3cfa8ae | ||
|
|
0bea87f357 | ||
|
|
54506e61bf | ||
|
|
d06abc2fb0 | ||
|
|
8c4ffcd48f | ||
|
|
2dd694fee5 | ||
|
|
f3c7af563b | ||
|
|
16451275d9 | ||
|
|
95e951f4c1 | ||
|
|
12a6d31ab0 | ||
|
|
0c6d85496d | ||
|
|
f26da02a70 | ||
|
|
5f9b7d95e2 | ||
|
|
a2c37b0aaf | ||
|
|
721b09053d | ||
|
|
d547e1f06f | ||
|
|
1641e8aa44 | ||
|
|
146bfa3738 | ||
|
|
3e84b5919a | ||
|
|
f9e6834b02 | ||
|
|
213ecc963e | ||
|
|
c488fce3f8 | ||
|
|
1f1c2e351c | ||
|
|
d38fbace17 | ||
|
|
07304f6717 | ||
|
|
c137204220 | ||
|
|
f38fcb3235 | ||
|
|
5d51323198 | ||
|
|
5c745a8691 | ||
|
|
bae0767a60 | ||
|
|
d69f271f2c | ||
|
|
4273ad51be | ||
|
|
07abea8cf4 | ||
|
|
bc03cc3acc | ||
|
|
57f18419b5 | ||
|
|
469380d8b8 | ||
|
|
3c670bd38d | ||
|
|
2a30234ec6 | ||
|
|
b70310bb19 | ||
|
|
13a16ae75a | ||
|
|
a4e7d03f51 | ||
|
|
4a171b7951 | ||
|
|
9a0ca6987b | ||
|
|
be0a983315 | ||
|
|
806df301b0 | ||
|
|
e54b1bc1f1 | ||
|
|
4817c89fbf | ||
|
|
13885509c7 | ||
|
|
98734dea7f | ||
|
|
12bf214c0f | ||
|
|
98e739fe75 | ||
|
|
127d92303f | ||
|
|
e1d02b278d | ||
|
|
29349055a7 | ||
|
|
aaa9f0cc8d | ||
|
|
bfec7484a4 | ||
|
|
420ea4bdff | ||
|
|
975a992f67 | ||
|
|
2f6e6fff64 | ||
|
|
bed2b0cf65 | ||
|
|
1b397e94e5 | ||
|
|
4a1cddf7b4 | ||
|
|
e94d3f3089 | ||
|
|
495b76adf8 | ||
|
|
8b58e6b0eb | ||
|
|
cfe23e8514 | ||
|
|
18188029b0 | ||
|
|
d574f4c0d9 | ||
|
|
8a190cebae | ||
|
|
8e3ec523e7 | ||
|
|
4310227166 | ||
|
|
7a016d33e6 | ||
|
|
a416643483 | ||
|
|
60f6569a2d | ||
|
|
e42eb50987 | ||
|
|
5c5c062367 | ||
|
|
4958301274 | ||
|
|
c80317683b | ||
|
|
d6c8af3475 | ||
|
|
c1784f3708 | ||
|
|
b967a1b461 | ||
|
|
e83ad5287c | ||
|
|
988c91c7da | ||
|
|
bbbeb3084f | ||
|
|
4372041caf | ||
|
|
4e79c8703b | ||
|
|
26e0c1b60a | ||
|
|
2270f16818 | ||
|
|
1a56b870cb | ||
|
|
0be22880f9 | ||
|
|
bb49758239 | ||
|
|
a35811a92d | ||
|
|
7eed5f6fe2 | ||
|
|
a43c4ca47e | ||
|
|
b5afc7343d | ||
|
|
a690eca413 | ||
|
|
663975f19a | ||
|
|
99193f39c9 | ||
|
|
5538011738 | ||
|
|
9d967d73e1 | ||
|
|
6295d78144 | ||
|
|
1d1cf04973 | ||
|
|
e5be2a2d24 | ||
|
|
4202785ea3 | ||
|
|
d226d6bc4c | ||
|
|
787eadef71 | ||
|
|
7e533cf4c4 | ||
|
|
b75c86a495 | ||
|
|
12dff53879 | ||
|
|
7a99ec4932 | ||
|
|
aebdf25fd8 | ||
|
|
2b8a451435 | ||
|
|
48f6268504 | ||
|
|
8a5a51f651 | ||
|
|
de7ffa9704 | ||
|
|
e0ab0615e8 | ||
|
|
ce14a01c49 | ||
|
|
63ad4a9db7 | ||
|
|
5398e0b4d2 | ||
|
|
2d5b616a52 | ||
|
|
3095e8e3bd | ||
|
|
43e12f35cd | ||
|
|
849a436d09 | ||
|
|
cc066a9dba | ||
|
|
ba9cc429bb | ||
|
|
76a030eac0 | ||
|
|
ea31ae3024 | ||
|
|
a78023d6d9 | ||
|
|
046b123100 | ||
|
|
9eef651a0d | ||
|
|
7181c9f744 | ||
|
|
8dc6825e81 | ||
|
|
ebb50e0ba8 | ||
|
|
27426724d2 | ||
|
|
aeb1663d34 | ||
|
|
ef68cd6e26 | ||
|
|
87018f1658 | ||
|
|
bf95933411 | ||
|
|
df6e1ab53b | ||
|
|
bda1cf9862 | ||
|
|
9f3c6ba6fb | ||
|
|
be659180df | ||
|
|
2433a2893b | ||
|
|
f237f6af7f | ||
|
|
e18c283317 | ||
|
|
1934fcd21c | ||
|
|
1fb0a676cd | ||
|
|
e2ea26b708 | ||
|
|
6add552757 | ||
|
|
276f09c9ed | ||
|
|
69fdf4e4a2 | ||
|
|
9c2f7f039e | ||
|
|
7c3475eea8 | ||
|
|
fcfba73ec5 | ||
|
|
b17e0c91b6 | ||
|
|
81c69b1079 | ||
|
|
04c02fd701 | ||
|
|
8a8639993a | ||
|
|
a8aeb83754 | ||
|
|
e96f819328 | ||
|
|
0ac4e94548 | ||
|
|
7d70af4f20 | ||
|
|
46e0686f6c | ||
|
|
8dc8bb2155 | ||
|
|
f3353271cb | ||
|
|
7995195ba6 | ||
|
|
729c548a13 | ||
|
|
03c71e1f55 | ||
|
|
a420cbd06c | ||
|
|
d6f205682b | ||
|
|
4d1cba7733 | ||
|
|
1ab0589f18 | ||
|
|
6bdc988eff | ||
|
|
fa25fd0618 | ||
|
|
14d71cb961 | ||
|
|
f8b9be06ee | ||
|
|
784cf9b5de | ||
|
|
02063206ef | ||
|
|
3d6d62189c | ||
|
|
f1757f0681 | ||
|
|
99208ba29a | ||
|
|
d3d6e5b0f0 | ||
|
|
a9bad7ece2 | ||
|
|
70ebb4b0b6 | ||
|
|
d9530a62cf | ||
|
|
454fe47cfe | ||
|
|
e6eac9135e | ||
|
|
c0059e9f76 | ||
|
|
cf2d68d42e | ||
|
|
6522f55479 | ||
|
|
5e436ac787 | ||
|
|
d6159fc5fb | ||
|
|
0602aca546 | ||
|
|
a01c9510cb | ||
|
|
416d3ff15d | ||
|
|
065d4fef25 | ||
|
|
aa35cafb38 | ||
|
|
96cb589f15 | ||
|
|
762e546686 | ||
|
|
531f921bf5 | ||
|
|
8e20d0e8b0 | ||
|
|
0e40b3485c | ||
|
|
76a474a6e8 | ||
|
|
a6b60a4efd | ||
|
|
4d95f8e33e | ||
|
|
8ec4c25d5f | ||
|
|
4cd67c87c4 | ||
|
|
ebdcdd8a0c | ||
|
|
77c8ef4c3a | ||
|
|
7254592c57 | ||
|
|
2ed6548403 | ||
|
|
f5e3497bde | ||
|
|
dc12ec04f9 | ||
|
|
73e9d34cb9 | ||
|
|
9027043b3e | ||
|
|
9696ccf5e3 | ||
|
|
2fd64931c2 | ||
|
|
de1cbd2cde | ||
|
|
fb425a2acb | ||
|
|
ab2dce605d | ||
|
|
13c66ae735 | ||
|
|
2f8d0e2ec6 | ||
|
|
0ac14deaec | ||
|
|
d36c3eb612 | ||
|
|
8674130d17 | ||
|
|
71e1e2064a | ||
|
|
ab70b26df6 | ||
|
|
91e9368269 | ||
|
|
55ba3ab86c | ||
|
|
b116bece93 | ||
|
|
35a4ed71a6 | ||
|
|
33b3d9bc38 | ||
|
|
7ddd697522 | ||
|
|
125e2a9d6f | ||
|
|
af3b458abb | ||
|
|
4d34a9c996 | ||
|
|
de4b78dd71 | ||
|
|
07c671587b | ||
|
|
30e4095192 | ||
|
|
7604cd8a16 | ||
|
|
251c12c0d3 | ||
|
|
10178931e5 | ||
|
|
69c5b5e958 | ||
|
|
3d2b7850d1 | ||
|
|
e031fa1e8e | ||
|
|
604e3a5bbe | ||
|
|
109f819dff | ||
|
|
5057125b27 | ||
|
|
4209f5aad8 | ||
|
|
7c2d66a2b6 | ||
|
|
17aca3eeb8 | ||
|
|
ee984c8526 | ||
|
|
75c41b748c | ||
|
|
6dbcca4da0 | ||
|
|
c09cb164c6 | ||
|
|
ebf0b03e18 | ||
|
|
0946ad7ad3 | ||
|
|
05beeca893 | ||
|
|
3efdf93073 | ||
|
|
3dac441378 | ||
|
|
7a93ae33f0 | ||
|
|
1841af2fd9 | ||
|
|
23340c46db | ||
|
|
06a380ec5f | ||
|
|
3cd0acc269 | ||
|
|
ca6eda66fd | ||
|
|
83791a418b | ||
|
|
fc55cc67a8 | ||
|
|
196cc2f9cd | ||
|
|
89174ec73e | ||
|
|
6181970b58 | ||
|
|
439ec90949 | ||
|
|
3664443470 | ||
|
|
50d01c5c01 | ||
|
|
287736b859 | ||
|
|
285459ea65 | ||
|
|
ab1c9c75fa | ||
|
|
213b6eb619 | ||
|
|
d7dd22c620 | ||
|
|
57b6f98fcc | ||
|
|
4821c48516 | ||
|
|
ae23de20d5 | ||
|
|
6417d10ee3 | ||
|
|
ef39801c61 | ||
|
|
6d5a62a32b | ||
|
|
efeee94659 | ||
|
|
69b64640f1 | ||
|
|
b346fd4356 | ||
|
|
2f6aaa0fd7 | ||
|
|
c5f9df4217 | ||
|
|
b1b5803106 | ||
|
|
8a5fe94473 | ||
|
|
1b57dc4df3 | ||
|
|
32842ce5c8 | ||
|
|
0c21892ffe | ||
|
|
f94a1b251c | ||
|
|
8ff6b33b41 | ||
|
|
95cd8340c2 | ||
|
|
a7474d6d5e | ||
|
|
f04844c26d | ||
|
|
16ac27bf82 | ||
|
|
e942a545d0 | ||
|
|
3b3bf90af8 | ||
|
|
7f8d05a172 | ||
|
|
269e493428 | ||
|
|
13404fd88d | ||
|
|
11e7ce8ffe | ||
|
|
3576048a36 | ||
|
|
69000ef9a8 | ||
|
|
4d94e886aa | ||
|
|
e8ee078221 | ||
|
|
d791268083 | ||
|
|
17a97fc38a | ||
|
|
3efd7fbab5 | ||
|
|
93744c5eb2 | ||
|
|
b22420de62 | ||
|
|
b92d0e7f3f | ||
|
|
0e445ed2f5 | ||
|
|
9769d65f0e | ||
|
|
0491978b43 | ||
|
|
b3668b612b | ||
|
|
af2636daff | ||
|
|
93d94fb144 | ||
|
|
95640d9152 | ||
|
|
39497f0179 | ||
|
|
3877bf82e7 | ||
|
|
fb7419c857 | ||
|
|
b74ade0dfc | ||
|
|
67c9494678 | ||
|
|
7c3b2c5991 | ||
|
|
ae0a854d46 | ||
|
|
5c1855bbc7 | ||
|
|
37bc9aa39d | ||
|
|
dfc501a6be | ||
|
|
858078b5f5 | ||
|
|
ba4ac4b220 | ||
|
|
ab52133f29 | ||
|
|
d45575d2a2 | ||
|
|
7ea1a5b270 | ||
|
|
cdde6224ea | ||
|
|
c5f8d01b5a | ||
|
|
0c2d032155 | ||
|
|
627bd5a53c | ||
|
|
206aa2a6b7 | ||
|
|
22e0ca6f63 | ||
|
|
cccc40ccdf | ||
|
|
777ad58305 | ||
|
|
35606b4c9b | ||
|
|
e138dc4a13 | ||
|
|
4256c1393f | ||
|
|
159212b7f6 | ||
|
|
ae909f1500 | ||
|
|
d0c6161f7b | ||
|
|
30cec14ab3 | ||
|
|
cd500be8f2 | ||
|
|
894651abfe | ||
|
|
e2a7735658 | ||
|
|
17ca44f149 | ||
|
|
0012a84617 | ||
|
|
e2e104ecb3 | ||
|
|
29bba7a2fb | ||
|
|
d57da2f43c | ||
|
|
164654c709 | ||
|
|
7258ca13ea | ||
|
|
79856fa99d | ||
|
|
c31bdf7258 | ||
|
|
8f580f6431 | ||
|
|
f7999d3579 | ||
|
|
26d434635b | ||
|
|
16cff3ca16 | ||
|
|
d25b74bc87 | ||
|
|
bfcf4f84f1 | ||
|
|
777ca48dc4 | ||
|
|
d5831aa518 | ||
|
|
1de5d2bb04 | ||
|
|
caadd0ba4f | ||
|
|
4491cae180 | ||
|
|
f89c02db2d | ||
|
|
9555d9feb7 | ||
|
|
8892f5f1b1 | ||
|
|
ac811be26f | ||
|
|
9e2b143b95 | ||
|
|
8b03ee7ac3 | ||
|
|
a6d515c4e0 | ||
|
|
1255086532 | ||
|
|
b2554e1a71 | ||
|
|
a292a5ab86 | ||
|
|
10a2d324a1 | ||
|
|
f750a17ccc | ||
|
|
d2fd1bca0c | ||
|
|
a9498e66af | ||
|
|
892ada9c0e | ||
|
|
76ae77bd8e | ||
|
|
21d77074b5 | ||
|
|
b79ff0c65e | ||
|
|
109e87d174 | ||
|
|
66174f43cc | ||
|
|
6d2730f44f | ||
|
|
73e57cbc72 | ||
|
|
bfc4298b01 | ||
|
|
ee62ca3295 | ||
|
|
b1295c7412 | ||
|
|
4c7634038f | ||
|
|
9cde72a825 | ||
|
|
d88f806f01 | ||
|
|
6949ef0228 | ||
|
|
1b8b865c56 | ||
|
|
c5185855c9 | ||
|
|
4012747e16 | ||
|
|
704b75a646 | ||
|
|
236aded99b | ||
|
|
0b01e12e59 | ||
|
|
dcfcc6adec | ||
|
|
16eb4b0025 | ||
|
|
fb5ce33123 | ||
|
|
b7e8f0a464 | ||
|
|
dd30f08ef6 | ||
|
|
908fc7ff03 | ||
|
|
4a2d7ca7fb | ||
|
|
985f5907cf | ||
|
|
ce7d3fce63 | ||
|
|
e927fb48bc | ||
|
|
906c42488e | ||
|
|
9cd01c01f9 | ||
|
|
fd51898a61 | ||
|
|
63c217f685 | ||
|
|
a67b8d3c75 | ||
|
|
c80f3eed95 | ||
|
|
c4ef976ca6 | ||
|
|
b98de523f5 | ||
|
|
dcb527ea7c | ||
|
|
aeeeb79860 | ||
|
|
77ab034fc6 | ||
|
|
095a5ad658 | ||
|
|
9bbe2cffaf | ||
|
|
ab019bf8c2 | ||
|
|
2121eed3ce | ||
|
|
5c8dc43949 | ||
|
|
33d57499fd | ||
|
|
86e357af01 | ||
|
|
939d4f4896 | ||
|
|
f12fd992f8 | ||
|
|
8ffc7dfba0 | ||
|
|
080e960897 | ||
|
|
f56f6dce8c | ||
|
|
7a56337ceb | ||
|
|
d2158f078e | ||
|
|
cc0d696b4f | ||
|
|
ef95a51d17 | ||
|
|
8fb89791b8 | ||
|
|
02964c03a2 | ||
|
|
8a618fb654 | ||
|
|
06568ffb95 | ||
|
|
41ff522991 | ||
|
|
5d0eabfcfc | ||
|
|
e6428a0533 | ||
|
|
1cd76cf12d | ||
|
|
9d4500c8fe | ||
|
|
67240bfdb9 | ||
|
|
363029c962 | ||
|
|
0047b72ea8 | ||
|
|
5b22e76999 | ||
|
|
a421bda3e7 | ||
|
|
46f30955b7 | ||
|
|
b4b5930871 | ||
|
|
849c6f427c | ||
|
|
01d0814b50 | ||
|
|
9543dedc4c | ||
|
|
dc69abfc49 | ||
|
|
49fb62bea0 | ||
|
|
1954ee5e98 | ||
|
|
180c7a978e | ||
|
|
42685ad16f | ||
|
|
44dc64800c | ||
|
|
6ab968bdea | ||
|
|
d7b547c72b | ||
|
|
93ece21e58 | ||
|
|
1626c3c4f2 | ||
|
|
15735e5bcf | ||
|
|
ac2bfa3d23 | ||
|
|
d69144e98e | ||
|
|
85900e740a | ||
|
|
f468d39041 | ||
|
|
8e425dc8df | ||
|
|
130e2cae79 | ||
|
|
9e5f5f4673 | ||
|
|
2cda0833c7 | ||
|
|
1df0f265bb | ||
|
|
abd8e462c3 | ||
|
|
7379a95584 | ||
|
|
842939d86d | ||
|
|
1bcc3ec422 | ||
|
|
6514047a5f | ||
|
|
68d6c18898 | ||
|
|
ebea7f572e | ||
|
|
a01d4dce32 | ||
|
|
f59f6dcacf | ||
|
|
4b8405eef2 | ||
|
|
5c2fd60f10 | ||
|
|
34c236d435 | ||
|
|
7f743499fd | ||
|
|
038469e010 | ||
|
|
067d31825d | ||
|
|
5984af5579 | ||
|
|
7568017570 | ||
|
|
73fe052957 | ||
|
|
75e2f0feb4 | ||
|
|
49e5062101 | ||
|
|
64662fdbaf | ||
|
|
5709bdb087 | ||
|
|
c1ec6f7114 | ||
|
|
d1630dca5f | ||
|
|
bb954ed725 | ||
|
|
8cf5f3f12a | ||
|
|
462a2b1a9a | ||
|
|
00070b230a | ||
|
|
6f2dafd903 | ||
|
|
3951926470 | ||
|
|
146289290e | ||
|
|
785106af33 | ||
|
|
c6cc0fe37e | ||
|
|
d4a63ba60c | ||
|
|
521cc0bedf | ||
|
|
99ed85c79c | ||
|
|
06624184e8 | ||
|
|
56c548d450 | ||
|
|
33fed0b28a | ||
|
|
b19d563516 | ||
|
|
35a91679aa | ||
|
|
940338b173 | ||
|
|
2c5633fa31 | ||
|
|
8b1c633141 | ||
|
|
7d4112363d | ||
|
|
a1dbcc7082 | ||
|
|
4ee73985cc | ||
|
|
cdc4773ac1 | ||
|
|
7b6e7b0211 | ||
|
|
cfb6e3144a | ||
|
|
d3ace56126 | ||
|
|
5653ec7472 | ||
|
|
60f2ca8be6 | ||
|
|
e3992aecd6 | ||
|
|
8f2c84c354 | ||
|
|
a2f1381cdb | ||
|
|
c322bc6005 | ||
|
|
f240f1d33d | ||
|
|
533347925e | ||
|
|
b50c0be8ab | ||
|
|
5012887daa | ||
|
|
d80a07d121 | ||
|
|
d3f08032cc | ||
|
|
84789c588e | ||
|
|
f97697f70b | ||
|
|
c132544c8f | ||
|
|
fbf220bd37 | ||
|
|
cd754f1511 | ||
|
|
bf7284f20c | ||
|
|
1c70ef933f | ||
|
|
0a2b8a196a | ||
|
|
eb79df2adb | ||
|
|
d36648c61d | ||
|
|
f834612320 | ||
|
|
c5f0891de8 | ||
|
|
2e6aed7705 | ||
|
|
1fdc33aa5f | ||
|
|
05c0afb318 | ||
|
|
68f21171bf | ||
|
|
1110b47dc0 | ||
|
|
67cd48fe46 | ||
|
|
4c4f164185 | ||
|
|
4891d73cab | ||
|
|
964e12886a | ||
|
|
06c039c7f9 | ||
|
|
b3ca075f2d | ||
|
|
d7e62e437d | ||
|
|
b2ceca1492 | ||
|
|
f65bc1837f | ||
|
|
1cb0f9ccdb | ||
|
|
056fd28dfa | ||
|
|
68fc7c2e89 | ||
|
|
9d7195691b | ||
|
|
c5d17de8d7 | ||
|
|
d55203ef2c | ||
|
|
7010492533 | ||
|
|
4ba5185476 | ||
|
|
4bf0dc4c57 | ||
|
|
63e15e46ba | ||
|
|
8a15c35c8d | ||
|
|
9a1b2946b7 | ||
|
|
dcc772fc72 | ||
|
|
79115cde43 | ||
|
|
4f6006eb1c | ||
|
|
9f297f6112 | ||
|
|
e83da5aec7 | ||
|
|
a8e621babc | ||
|
|
023d246a1a | ||
|
|
91a8ae9574 | ||
|
|
93c426be9a | ||
|
|
641d80fb23 | ||
|
|
754fef2d65 | ||
|
|
47ba5a0c02 | ||
|
|
e639e19967 | ||
|
|
0735032d6f | ||
|
|
2055a395ad | ||
|
|
0dd434b1c8 | ||
|
|
2de5393dcd | ||
|
|
e04ce9c3f1 | ||
|
|
2b1bfcd466 | ||
|
|
fa2b25bfa8 | ||
|
|
b7faf6b293 | ||
|
|
1ca2c8eb67 | ||
|
|
2c2ed48181 | ||
|
|
e953c10765 | ||
|
|
28f5947a84 | ||
|
|
34abca3d79 | ||
|
|
10ea0c140d | ||
|
|
0a92b6635b | ||
|
|
413eabedb8 | ||
|
|
443f235699 | ||
|
|
232a95c293 | ||
|
|
577e75f4b7 | ||
|
|
e8c067032b | ||
|
|
13ab4dd283 | ||
|
|
45ac9ef988 | ||
|
|
06cfeab352 | ||
|
|
07ff5cf43e | ||
|
|
66ce3f9eda | ||
|
|
621b90ffbb | ||
|
|
93f0906ced | ||
|
|
85438f35bd | ||
|
|
ebff62b407 | ||
|
|
551d2a72fa | ||
|
|
10d8940d8e | ||
|
|
263b84db6a | ||
|
|
ce431eeda2 | ||
|
|
cdc7986a8b | ||
|
|
736f3cc5df | ||
|
|
3865b55a43 | ||
|
|
9e39c58bc9 | ||
|
|
e722fcad9a | ||
|
|
cbdfa17077 | ||
|
|
d156fac060 | ||
|
|
24614baca1 | ||
|
|
1bafef9bcc | ||
|
|
1d16095dbd | ||
|
|
06ae94b1a3 | ||
|
|
c2c74a8356 | ||
|
|
ca95367537 | ||
|
|
ca3f291d92 | ||
|
|
1529d7a69c | ||
|
|
d4c5ddcf5b | ||
|
|
e30284f9ad | ||
|
|
e51d7942f6 | ||
|
|
35ded4d14e | ||
|
|
ebcc2ceafe | ||
|
|
55e27853f2 | ||
|
|
e06fc3d16e | ||
|
|
116b275bec | ||
|
|
834d89bb8b | ||
|
|
f6f6650942 | ||
|
|
b3878a2c95 | ||
|
|
a9a28a99e4 | ||
|
|
6d666e76a2 | ||
|
|
1ba384bab6 | ||
|
|
9bbb1871b4 | ||
|
|
c1fe262374 | ||
|
|
c821a193b1 | ||
|
|
01ef53a5e3 | ||
|
|
bbd7af2fa2 | ||
|
|
aa15a0c09d | ||
|
|
149303da68 | ||
|
|
f2a240b1db | ||
|
|
e4f6fabe7b | ||
|
|
ea922f04c6 | ||
|
|
52ed78ec30 | ||
|
|
104702c708 | ||
|
|
02204c527b | ||
|
|
3718084cc2 | ||
|
|
875e90b3d1 | ||
|
|
02371a7a06 | ||
|
|
17ff973daa | ||
|
|
f3910119d5 | ||
|
|
bf7bd6736c | ||
|
|
67711fdd90 | ||
|
|
942e6c9c24 | ||
|
|
bb49ff42d2 | ||
|
|
939b1399da | ||
|
|
6c6d785534 | ||
|
|
358bd5a56d | ||
|
|
e6e9e70f8d | ||
|
|
2bbba3a2b1 | ||
|
|
0f2bd682fd | ||
|
|
a57ecb8a56 | ||
|
|
81d97ef7b2 | ||
|
|
316b690256 | ||
|
|
a3543262ee | ||
|
|
f83f3e06bc | ||
|
|
c235e5f758 | ||
|
|
44db409d11 | ||
|
|
e7083e9799 | ||
|
|
e40f9755ec | ||
|
|
e6033029f5 | ||
|
|
b81694a60b | ||
|
|
b524074a1e | ||
|
|
3002269f28 | ||
|
|
75732383cb | ||
|
|
8c5c179a33 | ||
|
|
ae4df1df42 | ||
|
|
0e62de5cae | ||
|
|
6a9ae192cc | ||
|
|
c4eca50e8d | ||
|
|
17ac90cde8 | ||
|
|
e5a8e1a3db | ||
|
|
306c577b37 | ||
|
|
e527a7fdde | ||
|
|
85c57d0565 | ||
|
|
d4f0d4ab0e | ||
|
|
aee4dc7212 | ||
|
|
8dd22e2f58 | ||
|
|
cbdf1ec5c2 | ||
|
|
5e8516961d | ||
|
|
ad5c72b4da | ||
|
|
a4fd7a5c43 | ||
|
|
c375359cb3 | ||
|
|
0d91b3baa4 | ||
|
|
15c89eab32 | ||
|
|
cb25473253 | ||
|
|
0db7e0b1cf | ||
|
|
d6fa37522b | ||
|
|
492134d9ca | ||
|
|
9df8866ac7 | ||
|
|
e11c0e2c22 | ||
|
|
95dac08202 | ||
|
|
7cbbe40aba | ||
|
|
5158768951 | ||
|
|
55170166d2 | ||
|
|
02b8285430 | ||
|
|
95df439e9c | ||
|
|
7318901961 | ||
|
|
762b62288b | ||
|
|
14b6f77c2b | ||
|
|
89a31fe4ac | ||
|
|
1d465a2498 | ||
|
|
00eef05ce5 | ||
|
|
5a3f793ba6 | ||
|
|
2d3a7e6e61 | ||
|
|
1a595072c1 | ||
|
|
c151c1439e | ||
|
|
951daed4ac | ||
|
|
0e4bf7cfb9 | ||
|
|
24044f6bbd | ||
|
|
fb0687e499 | ||
|
|
67a00b5f8e | ||
|
|
91648b6637 | ||
|
|
561bef5706 | ||
|
|
7ce417dd45 | ||
|
|
1446553f7a | ||
|
|
47874ccdc1 | ||
|
|
f8f9d950ac | ||
|
|
5dddf357bd | ||
|
|
ba31978d6a | ||
|
|
bd7c840eb4 | ||
|
|
b313d8d0fc | ||
|
|
5ea242492c | ||
|
|
b162d16ef9 | ||
|
|
a20f8317bd | ||
|
|
32817d0910 | ||
|
|
ee941626a2 | ||
|
|
91b5a82d49 | ||
|
|
9ef770e5fb | ||
|
|
f598861813 | ||
|
|
3d55368aca | ||
|
|
bdf1679bbc | ||
|
|
1bfd34132c | ||
|
|
0c75c86c8b | ||
|
|
59713058be | ||
|
|
4ef344d48b | ||
|
|
a02d066148 | ||
|
|
c07195ed4f | ||
|
|
db375e1f22 | ||
|
|
398a767ff5 | ||
|
|
ee2419f859 | ||
|
|
c34025938d | ||
|
|
a35c6b04a0 | ||
|
|
10cf011966 | ||
|
|
c9ae306352 | ||
|
|
5dc02e53df | ||
|
|
390b9b4d53 | ||
|
|
ab68d75461 | ||
|
|
de21696387 | ||
|
|
06586458f7 | ||
|
|
7315846af5 | ||
|
|
f0425f3614 | ||
|
|
cb419b5411 | ||
|
|
bac81cd16e | ||
|
|
42348d944f | ||
|
|
2bb8b684c2 | ||
|
|
14c87fc926 | ||
|
|
b81801ccab | ||
|
|
a0805f0523 | ||
|
|
ab7fd06b93 | ||
|
|
c0cd9e4c2f | ||
|
|
947ca64fe5 | ||
|
|
06742b4114 | ||
|
|
d76b62a54d | ||
|
|
2f3642a301 | ||
|
|
cb69705454 | ||
|
|
b7dcb80269 | ||
|
|
470968704b | ||
|
|
714d6d9b13 | ||
|
|
db1031b635 | ||
|
|
9916412fc4 | ||
|
|
2d6643f587 | ||
|
|
5c0f8407f3 | ||
|
|
4651bf4a0a | ||
|
|
811e32c89a | ||
|
|
91346ebb3b | ||
|
|
92d5ac53a6 | ||
|
|
6ba1bd25c1 | ||
|
|
05c58821e0 | ||
|
|
d1b91e5cda | ||
|
|
5d4949aeee | ||
|
|
7b901d0415 | ||
|
|
5870994fb6 | ||
|
|
08c2543ecd | ||
|
|
74a7eab2bc | ||
|
|
85186a2946 | ||
|
|
ec69a4990c | ||
|
|
a1a25eb174 | ||
|
|
9abdff5b8e | ||
|
|
0b4d77de17 | ||
|
|
f178a4b14f | ||
|
|
1181374f44 | ||
|
|
a8b866079e | ||
|
|
2981bf7a5c | ||
|
|
896aa6d7a6 | ||
|
|
fa59e253de | ||
|
|
65e15f61d0 | ||
|
|
9114119318 | ||
|
|
7a431fb683 | ||
|
|
c7abf87b22 | ||
|
|
a71e02c7ac | ||
|
|
d5caabf9e2 | ||
|
|
af3efd168a | ||
|
|
92a4686059 | ||
|
|
eb2a4aaa40 | ||
|
|
edd473bb12 | ||
|
|
c28cbbfe44 | ||
|
|
ee4b0237ab | ||
|
|
694f6464df | ||
|
|
5908e4c01e | ||
|
|
c37820812f | ||
|
|
3c941b10cb | ||
|
|
6e5b770f6c | ||
|
|
a1f9d72d1b | ||
|
|
5bb46221ae | ||
|
|
188c25508c | ||
|
|
4ddce1b717 | ||
|
|
6fa6ab6a5a | ||
|
|
622558b9d7 | ||
|
|
a676adbb36 | ||
|
|
309b0f44d8 | ||
|
|
83b8412855 | ||
|
|
2b8a671613 | ||
|
|
9d7179a0de | ||
|
|
dcd8177b4f | ||
|
|
82c5188b2e | ||
|
|
b9c1bfa94e | ||
|
|
db60eecd3f | ||
|
|
562f6aad6e | ||
|
|
16dc3fd7d1 | ||
|
|
06722bffe0 | ||
|
|
598c04c60d | ||
|
|
b298024a79 | ||
|
|
f2d2614562 | ||
|
|
79107fc49e | ||
|
|
9de0edfd25 | ||
|
|
c43141bc33 | ||
|
|
bac3fb78a7 | ||
|
|
965a209502 | ||
|
|
3e4211adb9 | ||
|
|
98a6c8ae6f | ||
|
|
5336a68088 | ||
|
|
87c932ec8e | ||
|
|
669de63e50 | ||
|
|
14293ab3f0 | ||
|
|
7484c0dd79 | ||
|
|
3d0b21d69b | ||
|
|
68ad725a02 | ||
|
|
b92650d239 | ||
|
|
3bd9850179 | ||
|
|
ad27e9a9e6 | ||
|
|
f6f030df73 | ||
|
|
f15c9bae24 | ||
|
|
4591dadd7a | ||
|
|
20b61d5078 | ||
|
|
25ee8c952a | ||
|
|
e997f8ede0 | ||
|
|
e982a4baeb | ||
|
|
fe1a294e41 | ||
|
|
24e628b609 | ||
|
|
d9af736740 | ||
|
|
229016a8c0 | ||
|
|
6d0454e24c | ||
|
|
af36172a67 | ||
|
|
9316da6906 | ||
|
|
7e60086720 | ||
|
|
76517dba7e | ||
|
|
6fafd208ff | ||
|
|
6b1f3a1122 | ||
|
|
db432ded46 | ||
|
|
a76da0b6a0 | ||
|
|
af0b1fb71d | ||
|
|
41c32173e1 | ||
|
|
0df46d1594 | ||
|
|
f8d0cd759f | ||
|
|
b844a39fa3 | ||
|
|
2bc9da3b6d | ||
|
|
bcece1fadc | ||
|
|
52a5118fc2 | ||
|
|
a9e34ac653 | ||
|
|
f0dfa401dc | ||
|
|
68c463a778 | ||
|
|
f8ce7e176d | ||
|
|
a828edf8ce | ||
|
|
b42f543998 | ||
|
|
ca35720fa5 | ||
|
|
d13356e037 | ||
|
|
a62ecac0eb | ||
|
|
b0b2cd9949 | ||
|
|
949c516a0d | ||
|
|
8621078460 | ||
|
|
e5a3a8dd40 | ||
|
|
bc7f514ca5 | ||
|
|
15e3654843 | ||
|
|
fdd07e76d2 | ||
|
|
556e4b9277 | ||
|
|
645aa90d40 | ||
|
|
39cc9fb501 | ||
|
|
e3784f10e0 | ||
|
|
cf2e201878 | ||
|
|
fb6d9044c1 | ||
|
|
c124fc85a9 | ||
|
|
30f88dd545 | ||
|
|
03ea6885d2 | ||
|
|
c1bdfb2d41 | ||
|
|
8dbb63b078 | ||
|
|
55a24864ee | ||
|
|
1078c22ee9 | ||
|
|
bd28db5c7b | ||
|
|
77fa4c2d14 | ||
|
|
bd425d7dd1 | ||
|
|
76bb8bf09c | ||
|
|
7b42cdbc21 | ||
|
|
1b7e6fb3bd | ||
|
|
2df0020f02 | ||
|
|
bf8a5ae41e | ||
|
|
c8e416c667 | ||
|
|
4aa04d74a0 | ||
|
|
4e6269f1f4 | ||
|
|
6fa7f0d0d3 | ||
|
|
7ed72196fa | ||
|
|
3f6c29d4cf | ||
|
|
946183243d | ||
|
|
022abea54b | ||
|
|
0de0b482e4 | ||
|
|
76b854cfd5 | ||
|
|
e22f7b14cc | ||
|
|
841af6718c | ||
|
|
4d4ff73301 | ||
|
|
4616b0e309 | ||
|
|
7a641af97f | ||
|
|
66c14b6fc2 | ||
|
|
4b859904b7 | ||
|
|
1e41d1fcb6 | ||
|
|
fbdda555ac | ||
|
|
f5b79c22c3 | ||
|
|
551d6d7fc6 | ||
|
|
af885ad7e3 | ||
|
|
c121cf16fb | ||
|
|
146cad0df9 | ||
|
|
f3ccc28905 | ||
|
|
681a493392 | ||
|
|
845561727a | ||
|
|
fd93bf4874 | ||
|
|
8e5a51ca17 | ||
|
|
04702d8aac | ||
|
|
095d4943b2 | ||
|
|
736e4f973f | ||
|
|
1a0d6c6cbe | ||
|
|
b2d99c4552 | ||
|
|
4056c2dcd4 | ||
|
|
6521913723 | ||
|
|
f3eb312243 | ||
|
|
a07dfe5b49 | ||
|
|
4625053493 | ||
|
|
60c0802c91 | ||
|
|
b6d91e49ab | ||
|
|
6c227d67f4 | ||
|
|
3db0f1c2fa | ||
|
|
1a421141c4 | ||
|
|
9a3aadd9ab | ||
|
|
a2c6d12245 | ||
|
|
8d790aa979 | ||
|
|
0147cd2f4d | ||
|
|
8b9c03b51d | ||
|
|
3adad2edc0 | ||
|
|
0660836d43 | ||
|
|
a3c6f8fbf5 | ||
|
|
cb81aeaf7f | ||
|
|
3ee5946f35 | ||
|
|
1ed143396a | ||
|
|
5b27c6c650 | ||
|
|
ca1355803e | ||
|
|
cb892940cd | ||
|
|
6ca2e66019 | ||
|
|
0bf741c0a8 | ||
|
|
c4f0352e41 | ||
|
|
4565688111 | ||
|
|
5379f364d8 | ||
|
|
fa8493b280 | ||
|
|
930db89b51 | ||
|
|
ebdc99ea59 | ||
|
|
022b0556b7 | ||
|
|
67050f39fe | ||
|
|
d7669bd5e1 | ||
|
|
9caea433ad | ||
|
|
01ea4abc18 | ||
|
|
87b3a29642 | ||
|
|
d98b73986b | ||
|
|
9c95b56306 | ||
|
|
5ee92d4619 | ||
|
|
73ff288ce6 | ||
|
|
8438490d2e | ||
|
|
2be812a795 | ||
|
|
2b8a5bf9ed | ||
|
|
422ba4da34 | ||
|
|
f97337114b | ||
|
|
5d766686da | ||
|
|
d9dd567882 | ||
|
|
89563a75d7 | ||
|
|
3505c9e8bf | ||
|
|
0cfeac57fb | ||
|
|
4ce92cb88d | ||
|
|
28c7b80442 | ||
|
|
c928387059 | ||
|
|
90ff28f272 | ||
|
|
608992f3a9 | ||
|
|
8c084e702a | ||
|
|
ba24bf94bc | ||
|
|
cc34b322e9 | ||
|
|
7167e626a3 | ||
|
|
5e38a43302 | ||
|
|
ea208bc354 | ||
|
|
7689e1d97c | ||
|
|
ce386ce1d6 | ||
|
|
0238e673f9 | ||
|
|
54457f6b02 | ||
|
|
03654517e7 | ||
|
|
3e6d3c5842 | ||
|
|
94dc104abe | ||
|
|
ad0e34e996 | ||
|
|
809e24bd48 | ||
|
|
e4f93003dc | ||
|
|
89b67bbd0d | ||
|
|
084fabe2a0 | ||
|
|
ec3db7d789 | ||
|
|
d8238bd77d | ||
|
|
f623a19056 | ||
|
|
f8e0092eae | ||
|
|
1e006f4ca8 | ||
|
|
a614e12232 | ||
|
|
5fb8d92312 | ||
|
|
450387541f | ||
|
|
67716772a7 | ||
|
|
61b0e39962 | ||
|
|
2d094f8b84 | ||
|
|
3c39c16cf9 | ||
|
|
7ee9662158 | ||
|
|
48db08392b | ||
|
|
46f3724b6d | ||
|
|
38b3f87ee8 | ||
|
|
9c19eee85e | ||
|
|
cb373d6e03 | ||
|
|
edd6053ef8 | ||
|
|
6230340769 | ||
|
|
2638bdfc54 | ||
|
|
5d10a08d6b | ||
|
|
e8a825cc9b | ||
|
|
909a737652 | ||
|
|
0cf8ec6dd9 | ||
|
|
b0902ab276 | ||
|
|
1a663ef4dc | ||
|
|
98da05a41a | ||
|
|
c2401e3876 | ||
|
|
9e0047352b | ||
|
|
e28323aaaf | ||
|
|
f4530497e7 | ||
|
|
7efa46142f | ||
|
|
bb2ede3ce7 | ||
|
|
caef8e60f8 | ||
|
|
baadf21d31 | ||
|
|
4d1bbbe5e1 | ||
|
|
33406e8e0d | ||
|
|
1453a7efae | ||
|
|
d9694bd087 | ||
|
|
5ca4786696 | ||
|
|
2236f9934f | ||
|
|
28e58e2dc8 | ||
|
|
f2cc185121 | ||
|
|
fcaf993a0e | ||
|
|
4a65f7ed91 | ||
|
|
693da8ef5c | ||
|
|
812ff0fda9 | ||
|
|
98018e61c1 | ||
|
|
fb1b206af1 | ||
|
|
0230565df8 | ||
|
|
f906c6cdee | ||
|
|
78ab025fd6 | ||
|
|
af03274c2b | ||
|
|
ed9eecbd91 | ||
|
|
54cb71e3ef | ||
|
|
5d624b488c | ||
|
|
240b69bd30 | ||
|
|
58e42ffe48 | ||
|
|
40a6106b8b | ||
|
|
f514c655f1 | ||
|
|
d3373fdcd3 | ||
|
|
71966d19e5 | ||
|
|
4808cf44cf | ||
|
|
dbba18023a | ||
|
|
10e5574e41 | ||
|
|
c6e512cf82 | ||
|
|
99e2e3603b | ||
|
|
f4c4ae94b2 | ||
|
|
e15ae7f5a9 | ||
|
|
25a50fc510 | ||
|
|
aa9d3cb65c | ||
|
|
aeec90c4fd | ||
|
|
324835f178 | ||
|
|
483bdd4dc7 | ||
|
|
78e0e367fd | ||
|
|
7422d46b08 | ||
|
|
7e8e61ee73 | ||
|
|
683e71ac42 | ||
|
|
188c7ea362 | ||
|
|
bf184ccfe0 | ||
|
|
83e538e292 | ||
|
|
2e6f5707ab | ||
|
|
45500adf82 | ||
|
|
258082d980 | ||
|
|
3704bccc60 | ||
|
|
daea446d80 | ||
|
|
9af1880880 | ||
|
|
e105ffcaf5 | ||
|
|
230df722f7 | ||
|
|
ff3a8550fa | ||
|
|
cf3a711ae4 | ||
|
|
39af510c4a | ||
|
|
2c85b152db | ||
|
|
8e551ba556 | ||
|
|
c3bc2e0673 | ||
|
|
2448935f8d | ||
|
|
01874c4a5e | ||
|
|
d113cb6a69 | ||
|
|
390168145b | ||
|
|
ddc44951a0 | ||
|
|
e0d5553593 | ||
|
|
71c4f6881b | ||
|
|
c194eb2b12 | ||
|
|
8c725eb755 | ||
|
|
3b7a5faf8f | ||
|
|
bf15eaea06 | ||
|
|
3993318f99 | ||
|
|
267c7eaa94 | ||
|
|
d39576cf8e | ||
|
|
8d1fb229ae | ||
|
|
8cbe3fbceb | ||
|
|
784154458b | ||
|
|
1a0d63c18d | ||
|
|
887e7b7a34 | ||
|
|
c89b3d57fa | ||
|
|
f63b025051 | ||
|
|
7020ffae80 | ||
|
|
6f1d3418e4 | ||
|
|
a2488ca798 | ||
|
|
f36261fb99 | ||
|
|
028c712ada | ||
|
|
ea308a8814 | ||
|
|
55931b9048 | ||
|
|
30cc3a8ccb | ||
|
|
cbad3ef653 | ||
|
|
cabd11f474 | ||
|
|
a13a5245ca | ||
|
|
d82091637a | ||
|
|
628505fd65 | ||
|
|
142e04b2c7 | ||
|
|
3d47a5984b | ||
|
|
d9e99b1016 | ||
|
|
21b124fb59 | ||
|
|
1ba03a8c75 | ||
|
|
4558e0fa58 | ||
|
|
562d60e2a2 | ||
|
|
86558c1d26 | ||
|
|
f55f16be6a | ||
|
|
f64a7e9766 | ||
|
|
1e83616f51 | ||
|
|
900c94a6af | ||
|
|
c23ee17065 | ||
|
|
26a0e11bfc | ||
|
|
e17e3c96dd | ||
|
|
0e8e02d98c | ||
|
|
11677cd556 | ||
|
|
fce4dca967 | ||
|
|
42cdfb301f | ||
|
|
4b09e8a1ad | ||
|
|
c83434355b | ||
|
|
a95651fb5b | ||
|
|
0ff03ae0c2 | ||
|
|
c3713deceb | ||
|
|
0fae04aac9 | ||
|
|
e461645fde | ||
|
|
d6df913779 | ||
|
|
27c48126be | ||
|
|
e3f01b6c59 | ||
|
|
f80e39e900 | ||
|
|
6dc5ec03b7 | ||
|
|
b6d48afcb2 | ||
|
|
ff50f36342 | ||
|
|
dcbd452759 | ||
|
|
ef8328c541 | ||
|
|
9b2bd0e5f9 | ||
|
|
635bcea800 | ||
|
|
4f383f4ad2 | ||
|
|
b206f687ef | ||
|
|
3d5756072f | ||
|
|
bd6a721395 | ||
|
|
28aace645a | ||
|
|
26c0d02038 | ||
|
|
f6cf634215 | ||
|
|
a24512f149 | ||
|
|
8353ae86fd | ||
|
|
cd5d19d80c | ||
|
|
ff7d502a42 | ||
|
|
5784aaa664 | ||
|
|
58ce56945e | ||
|
|
de9a231b84 | ||
|
|
f4bb88fb16 | ||
|
|
12bcd17c8f | ||
|
|
fb16094313 | ||
|
|
b3abd0db57 | ||
|
|
a5848dc5fd | ||
|
|
3cefacbb1b | ||
|
|
555118b415 | ||
|
|
a229e53d9e | ||
|
|
805bba3ef2 | ||
|
|
7089bb4db5 | ||
|
|
4792b2b85f | ||
|
|
07496652b2 | ||
|
|
40406918f6 | ||
|
|
b714cff27d | ||
|
|
41d923fcd8 | ||
|
|
e1bd2bba1e | ||
|
|
c4515f26c2 | ||
|
|
0be5cdb606 | ||
|
|
0dd059f0b8 | ||
|
|
a9247fe915 | ||
|
|
89fe11fab7 | ||
|
|
c427fc0cb0 | ||
|
|
4cf7e10d91 | ||
|
|
37890f6367 | ||
|
|
942364347a | ||
|
|
21863a7f70 | ||
|
|
02a21c3213 | ||
|
|
189eadd27e | ||
|
|
762607e026 | ||
|
|
3d93600b7a | ||
|
|
fcad74f3ef | ||
|
|
27512a2b8f | ||
|
|
c5c148c61d | ||
|
|
56fb257121 | ||
|
|
a8403ad61c | ||
|
|
9b17c0d705 | ||
|
|
f9cf33083b | ||
|
|
cf7ef18bcc | ||
|
|
530dfa8762 | ||
|
|
edc1c5b2a8 | ||
|
|
416e593cc6 | ||
|
|
a1e71ea4b8 | ||
|
|
0cc01a5057 | ||
|
|
31b5a07951 | ||
|
|
39eb6f8a6d | ||
|
|
5962c7c23b | ||
|
|
b0bdf4d878 | ||
|
|
2d7279143f | ||
|
|
4e63b1c113 | ||
|
|
970e2df68d | ||
|
|
fc051f69af | ||
|
|
ad0b1520f9 | ||
|
|
8b88e15174 | ||
|
|
87f400eb18 | ||
|
|
201edd94c0 | ||
|
|
11288735c9 | ||
|
|
55498358f2 | ||
|
|
6e91462f29 | ||
|
|
d1ebe22395 | ||
|
|
5b67a347d9 | ||
|
|
2a6dbf9287 | ||
|
|
644119c413 | ||
|
|
c18c7c925c | ||
|
|
b14f483979 | ||
|
|
62a003e45f | ||
|
|
1555da45da | ||
|
|
ce82b933a7 | ||
|
|
7abd326458 | ||
|
|
f00698bb22 | ||
|
|
10e6d92885 | ||
|
|
c823f98704 | ||
|
|
8f82530b9a | ||
|
|
4a1eb65f3a | ||
|
|
8e7475fc3b | ||
|
|
007f85f6b2 | ||
|
|
5a01fbf0ba | ||
|
|
9658f16cd2 | ||
|
|
64b4688ae8 | ||
|
|
3a2767d7e8 | ||
|
|
6d3abad185 | ||
|
|
238e0c6e98 | ||
|
|
0ac010feae | ||
|
|
bf9f19524e | ||
|
|
e2a97a4a9e | ||
|
|
c223dd1564 | ||
|
|
cbe5a3597a | ||
|
|
951a96d44c | ||
|
|
fbe4db10c1 | ||
|
|
53a122ac73 | ||
|
|
f0d00aa003 | ||
|
|
23d8826aa8 | ||
|
|
f8d82c47da | ||
|
|
d77b5c7e00 | ||
|
|
ee02eb413d | ||
|
|
58d24e0cca | ||
|
|
430b8911fa | ||
|
|
f5975d53c4 | ||
|
|
0c8683afb7 | ||
|
|
aeb609dd6c | ||
|
|
efb8800f00 | ||
|
|
1cb3868c95 | ||
|
|
43f2253a21 | ||
|
|
27c0b11d8d | ||
|
|
1956c7a158 | ||
|
|
84c8ae056c | ||
|
|
3bc5da4839 | ||
|
|
5e5d69f394 | ||
|
|
2b34aaf27b | ||
|
|
7685ba0ae4 | ||
|
|
954f320e58 | ||
|
|
be6fca535e | ||
|
|
43d900fcf5 | ||
|
|
4c1c748384 | ||
|
|
37c86801da | ||
|
|
2ae58e13cd | ||
|
|
99c73b5f39 | ||
|
|
4739b162fe | ||
|
|
3fc2ecf14b | ||
|
|
6bbb8c7e33 | ||
|
|
a4910fb896 | ||
|
|
ef44347564 | ||
|
|
0872126ec6 | ||
|
|
04dc72d60b | ||
|
|
b022d2f103 | ||
|
|
5132f0545d | ||
|
|
c995cfe86b | ||
|
|
c579bfec60 | ||
|
|
5b1d542ee4 | ||
|
|
5c669efedb | ||
|
|
ab6d0da4c2 | ||
|
|
3a9ed7a812 | ||
|
|
85ac626018 | ||
|
|
3dc2ce0fed | ||
|
|
2c4591bdbb | ||
|
|
98e593615f | ||
|
|
7b3a17caf8 | ||
|
|
908f7b503c | ||
|
|
7ec32c5b61 | ||
|
|
ea41d8fff2 | ||
|
|
a70f7e32e3 | ||
|
|
104dda81a1 | ||
|
|
b23ce2ed0b | ||
|
|
3236dc82c0 | ||
|
|
f03588392b | ||
|
|
06f9d1460c | ||
|
|
e96b7d9c68 | ||
|
|
34680ddb5b | ||
|
|
802efbdfa5 | ||
|
|
d79005f2a4 | ||
|
|
3e0423f3e2 | ||
|
|
fbcb537b41 | ||
|
|
33c8116c20 | ||
|
|
c7936f7e6d | ||
|
|
a6457fb7c8 | ||
|
|
d27fc557c9 | ||
|
|
d679506811 | ||
|
|
9260f1b93b | ||
|
|
7da90321b1 | ||
|
|
7ed2955af7 | ||
|
|
f8e6f17da8 | ||
|
|
e0bf1c92b3 | ||
|
|
d015c3a77f | ||
|
|
069b3e50d1 | ||
|
|
3c5b397fed | ||
|
|
f996275e17 | ||
|
|
aae2112096 | ||
|
|
1cb5eab65d | ||
|
|
b603957146 | ||
|
|
3ea91f45d7 | ||
|
|
d9b49f8200 | ||
|
|
ab8d5a0ae9 | ||
|
|
f26829b6bd | ||
|
|
94300e4b44 | ||
|
|
33a8777e4b | ||
|
|
7a2628db18 | ||
|
|
2d9a47b52e | ||
|
|
9beb361776 | ||
|
|
402a8637e5 | ||
|
|
4a3435e1e5 | ||
|
|
c9f248539f | ||
|
|
ed53a3d876 | ||
|
|
d0a094f475 | ||
|
|
1f3342d791 | ||
|
|
ea1ea672e5 | ||
|
|
a71eab1f8c | ||
|
|
687d543271 | ||
|
|
99e2ab7e0a | ||
|
|
3452e385a2 | ||
|
|
94b564a4fa | ||
|
|
7992b9a3bf | ||
|
|
238d75c01f | ||
|
|
1ebf238501 | ||
|
|
f975d6e9a0 | ||
|
|
e37c0653c0 | ||
|
|
11bce906ff | ||
|
|
9836d8ca30 | ||
|
|
5889925a48 | ||
|
|
c7b0619989 | ||
|
|
d19f33c799 | ||
|
|
e9b2f5eead | ||
|
|
7c7e94bfa1 | ||
|
|
4db23e6e86 | ||
|
|
c8571597df | ||
|
|
11444e41a0 | ||
|
|
fc2c8251a2 | ||
|
|
a384da84aa | ||
|
|
854fa9c334 | ||
|
|
88fead556b | ||
|
|
37d8dbbed4 | ||
|
|
371a636b4e | ||
|
|
47f4ab43f5 | ||
|
|
d84f4c5fda | ||
|
|
00800e8611 | ||
|
|
2cc006f911 | ||
|
|
ee68f7828d | ||
|
|
971203650e | ||
|
|
b6cf110de9 | ||
|
|
815f838cc1 | ||
|
|
61b1dd17ab | ||
|
|
926444293d | ||
|
|
b604fe65fa | ||
|
|
3f4ec95e51 | ||
|
|
25a4df53e4 | ||
|
|
3cf59925bc | ||
|
|
071b1aab03 | ||
|
|
c94c33fdac | ||
|
|
d881b73ec4 | ||
|
|
fa31630cfa | ||
|
|
c01202d355 | ||
|
|
1f43d9cd50 | ||
|
|
00ddb35273 | ||
|
|
8124669363 | ||
|
|
581c781319 | ||
|
|
7b2829612d | ||
|
|
2f6467230b | ||
|
|
34705d56b7 | ||
|
|
361732dbe4 | ||
|
|
6b7fb79d45 | ||
|
|
9a726225f1 | ||
|
|
b1be5335be | ||
|
|
b9ce0a5ed3 | ||
|
|
91524232aa | ||
|
|
9592829796 | ||
|
|
383dfe0281 | ||
|
|
eb4b2cd448 | ||
|
|
1d0c7ce8b6 | ||
|
|
bef4a41c52 | ||
|
|
59f8be7793 | ||
|
|
82360f8759 | ||
|
|
514cac18fa | ||
|
|
4e01ec77ef | ||
|
|
f394e0ca2e | ||
|
|
ddbf9571a3 | ||
|
|
8620f42e6e | ||
|
|
e760da1c5f | ||
|
|
ed09496d49 | ||
|
|
78496cc716 | ||
|
|
6a5ef9f95e | ||
|
|
d2cf9aae89 | ||
|
|
6056f4fbe7 | ||
|
|
0fac4e2dca | ||
|
|
cad5c288f8 | ||
|
|
cf2e5e2a29 | ||
|
|
5e102295f3 | ||
|
|
fd7bb2e082 | ||
|
|
4eae65551e | ||
|
|
e3667a3647 | ||
|
|
e4f1d4945c | ||
|
|
7666392f7b | ||
|
|
5c0f45a8d6 | ||
|
|
92d4605c8a | ||
|
|
e0dcd6385b | ||
|
|
6e1142d82d | ||
|
|
a0b029eed3 | ||
|
|
c1c3cd063c | ||
|
|
2638fd9b07 | ||
|
|
a4d8535407 | ||
|
|
2204b303c7 | ||
|
|
afd9dccb5a | ||
|
|
f27407de6a | ||
|
|
35a2d0d1bf | ||
|
|
64fc62bdf9 | ||
|
|
f8cad6ab7a | ||
|
|
a24e36a1ee | ||
|
|
6816a371e4 | ||
|
|
bed0b7dff0 | ||
|
|
e05d9fcac3 | ||
|
|
9d29a2b96f | ||
|
|
d8a70b151c | ||
|
|
73e4bb8213 | ||
|
|
4c9f6f5e95 | ||
|
|
e339230748 | ||
|
|
6b3321d2a6 | ||
|
|
56221654f0 | ||
|
|
7bdf8998fa | ||
|
|
29a3578a68 | ||
|
|
50c164891c | ||
|
|
a4e9d78e2b | ||
|
|
58ff3ffdee | ||
|
|
f1827e3a26 | ||
|
|
ec70c130d1 | ||
|
|
e64103fc97 | ||
|
|
0960096bdb | ||
|
|
97d9af8d3a | ||
|
|
de3d9978cf | ||
|
|
2df312c46a | ||
|
|
6320c7d926 | ||
|
|
c6265980a1 | ||
|
|
2969d57f55 | ||
|
|
34a78e77ce | ||
|
|
e205562eee | ||
|
|
0adca6c6cb | ||
|
|
a97f063d1f | ||
|
|
84e9abd491 | ||
|
|
f6bfd2ff3b | ||
|
|
85c552133c | ||
|
|
c116faae74 | ||
|
|
ec3765f7f0 | ||
|
|
840c8ab497 | ||
|
|
de0636e941 | ||
|
|
774179d40e | ||
|
|
1424f6fbb4 | ||
|
|
86aeb86f91 | ||
|
|
7a005a1ae3 | ||
|
|
3aac6bc05f | ||
|
|
32e7a42406 | ||
|
|
1b71aeb790 | ||
|
|
e255521141 | ||
|
|
a9ef042830 | ||
|
|
5df0319081 | ||
|
|
09e35e1565 | ||
|
|
df96ea26c5 | ||
|
|
671c449743 | ||
|
|
6737d04706 | ||
|
|
179d6f7ae5 | ||
|
|
165e6a0d87 | ||
|
|
9269c0a26e | ||
|
|
70748fd00c | ||
|
|
507a630668 | ||
|
|
b233aaa802 | ||
|
|
9c67110655 | ||
|
|
4c39ce4fe9 | ||
|
|
5f4d434362 | ||
|
|
a42c8e80fe | ||
|
|
fdcbc88cb9 | ||
|
|
594b34f78c | ||
|
|
d130f1061c | ||
|
|
0a1bde7abb | ||
|
|
5d5e99c69e | ||
|
|
1e69128e85 | ||
|
|
dc48c45527 | ||
|
|
054022bf2c | ||
|
|
f0bf6178da | ||
|
|
8eeccc7449 | ||
|
|
40f87e628f | ||
|
|
21e26b051b | ||
|
|
740b65785b | ||
|
|
2483ec15bf | ||
|
|
141b6e5f7b | ||
|
|
af6b2d0287 | ||
|
|
24e5bbf962 | ||
|
|
f78a3141e0 | ||
|
|
7f8dc37db0 | ||
|
|
4449eea79c | ||
|
|
1b07525a42 | ||
|
|
81b7835b8e | ||
|
|
40ea404e11 | ||
|
|
934b18c48a | ||
|
|
3f20f67777 | ||
|
|
7e1b341363 | ||
|
|
d0afd1ffc1 | ||
|
|
8bb56a1402 | ||
|
|
13225fdcf4 | ||
|
|
1f1914862b | ||
|
|
5084fa5eb2 | ||
|
|
53138dd309 | ||
|
|
624d1f4717 | ||
|
|
6e57f44e23 | ||
|
|
6900b897dd | ||
|
|
620a65ee21 | ||
|
|
6274ea0d36 | ||
|
|
264985d4c4 | ||
|
|
99daf56fbf | ||
|
|
cbe87c9714 | ||
|
|
b48fcdf35a | ||
|
|
579116994a | ||
|
|
eec97ab588 |
No files matched your search
@@ -0,0 +1,27 @@
|
||||
if [[ -d "run/crash-reports" ]]; then
|
||||
echo "Crash reports detected:"
|
||||
cat $directory/*
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if grep --quiet "Fatal errors were detected" server.log; 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" server.log; then
|
||||
echo "Server force stopped:"
|
||||
cat server.log
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if grep --quiet 'Done .+ For help, type "help" or "?"' server.log; then
|
||||
echo "Server didn't finish startup:"
|
||||
cat server.log
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "No crash reports detected"
|
||||
exit 0
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
|
||||
|
||||
name: Build and test
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ master, main ]
|
||||
push:
|
||||
branches: [ master, main ]
|
||||
|
||||
jobs:
|
||||
build-and-test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up JDK 8
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
java-version: '8'
|
||||
distribution: 'adopt'
|
||||
cache: gradle
|
||||
|
||||
- name: Grant execute permission for gradlew
|
||||
run: chmod +x gradlew
|
||||
|
||||
- name: Setup the workspace
|
||||
run: ./gradlew setupCIWorkspace
|
||||
|
||||
- name: Build the mod
|
||||
run: ./gradlew build
|
||||
|
||||
- name: Run server for 1.5 minutes
|
||||
run: |
|
||||
mkdir run
|
||||
echo "eula=true" > run/eula.txt
|
||||
timeout 90 ./gradlew runServer | tee --append server.log || true
|
||||
|
||||
- name: Test no errors reported during server run
|
||||
run: |
|
||||
chmod +x .github/scripts/test-no-error-reports.sh
|
||||
.github/scripts/test-no-error-reports.sh
|
||||
@@ -0,0 +1,51 @@
|
||||
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
|
||||
|
||||
name: Release tagged build
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set release version
|
||||
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
|
||||
|
||||
- name: Set up JDK 8
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
java-version: '8'
|
||||
distribution: 'adopt'
|
||||
cache: gradle
|
||||
|
||||
- name: Grant execute permission for gradlew
|
||||
run: chmod +x gradlew
|
||||
|
||||
- name: Setup the workspace
|
||||
run: ./gradlew setupCIWorkspace
|
||||
|
||||
- name: Build the mod
|
||||
run: ./gradlew build
|
||||
|
||||
- name: Release under current tag
|
||||
uses: "marvinpinto/action-automatic-releases@latest"
|
||||
with:
|
||||
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
automatic_release_tag: "${{ env.RELEASE_VERSION }}"
|
||||
prerelease: false
|
||||
title: "${{ env.RELEASE_VERSION }}"
|
||||
files: build/libs/*.jar
|
||||
|
||||
- name: Publish to Maven
|
||||
run: ./gradlew publish
|
||||
env:
|
||||
MAVEN_USER: ${{ secrets.MAVEN_USER }}
|
||||
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
|
||||
+26
-28
@@ -1,33 +1,31 @@
|
||||
# Eclipse stuff
|
||||
.gradle
|
||||
.settings
|
||||
/.idea/
|
||||
/run/
|
||||
/build/
|
||||
/eclipse/
|
||||
.classpath
|
||||
.project
|
||||
.settings/
|
||||
|
||||
# netbeans
|
||||
nbproject
|
||||
|
||||
# maven
|
||||
/*/target/
|
||||
|
||||
# gradle
|
||||
.gradle/
|
||||
|
||||
# vim
|
||||
.*.sw[a-p]
|
||||
|
||||
# various other potential build files
|
||||
/*/build/
|
||||
/buildassets/map_*.txt
|
||||
/*/bin/
|
||||
/*/dist/
|
||||
/*/manifest.mf
|
||||
/release
|
||||
|
||||
# Mac filesystem dust
|
||||
.DS_Store
|
||||
|
||||
# intellij
|
||||
/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
|
||||
.idea/
|
||||
src/main/resources/mixins.*.json
|
||||
*.bat
|
||||
*.DS_Store
|
||||
!gradlew.bat
|
||||
@@ -0,0 +1,3 @@
|
||||
# Any Github changes require admin approval
|
||||
/.github/** @GTNewHorizons/admin
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<profiles version="2">
|
||||
<profile kind="CleanUpProfile" name="ThaumicTinkererCleanup" version="2">
|
||||
<setting id="cleanup.remove_unused_private_fields" value="true"/>
|
||||
<setting id="cleanup.always_use_parentheses_in_expressions" value="false"/>
|
||||
<setting id="cleanup.never_use_blocks" value="false"/>
|
||||
<setting id="cleanup.add_missing_deprecated_annotations" value="true"/>
|
||||
<setting id="cleanup.remove_unused_private_methods" value="true"/>
|
||||
<setting id="cleanup.convert_to_enhanced_for_loop" value="true"/>
|
||||
<setting id="cleanup.remove_unnecessary_nls_tags" value="true"/>
|
||||
<setting id="cleanup.sort_members" value="false"/>
|
||||
<setting id="cleanup.remove_unused_local_variables" value="true"/>
|
||||
<setting id="cleanup.remove_unused_private_members" value="true"/>
|
||||
<setting id="cleanup.never_use_parentheses_in_expressions" value="true"/>
|
||||
<setting id="cleanup.remove_unnecessary_casts" value="true"/>
|
||||
<setting id="cleanup.make_parameters_final" value="false"/>
|
||||
<setting id="cleanup.use_this_for_non_static_field_access" value="true"/>
|
||||
<setting id="cleanup.use_blocks" value="false"/>
|
||||
<setting id="cleanup.remove_private_constructors" value="true"/>
|
||||
<setting id="cleanup.always_use_this_for_non_static_method_access" value="false"/>
|
||||
<setting id="cleanup.remove_trailing_whitespaces_all" value="true"/>
|
||||
<setting id="cleanup.always_use_this_for_non_static_field_access" value="false"/>
|
||||
<setting id="cleanup.use_this_for_non_static_field_access_only_if_necessary" value="true"/>
|
||||
<setting id="cleanup.add_default_serial_version_id" value="false"/>
|
||||
<setting id="cleanup.make_type_abstract_if_missing_method" value="false"/>
|
||||
<setting id="cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class" value="true"/>
|
||||
<setting id="cleanup.make_variable_declarations_final" value="false"/>
|
||||
<setting id="cleanup.add_missing_nls_tags" value="false"/>
|
||||
<setting id="cleanup.format_source_code" value="false"/>
|
||||
<setting id="cleanup.add_missing_override_annotations" value="true"/>
|
||||
<setting id="cleanup.qualify_static_method_accesses_with_declaring_class" value="false"/>
|
||||
<setting id="cleanup.remove_unused_private_types" value="true"/>
|
||||
<setting id="cleanup.make_local_variable_final" value="true"/>
|
||||
<setting id="cleanup.add_missing_methods" value="false"/>
|
||||
<setting id="cleanup.add_missing_override_annotations_interface_methods" value="true"/>
|
||||
<setting id="cleanup.correct_indentation" value="false"/>
|
||||
<setting id="cleanup.remove_unused_imports" value="true"/>
|
||||
<setting id="cleanup.remove_trailing_whitespaces_ignore_empty" value="false"/>
|
||||
<setting id="cleanup.make_private_fields_final" value="true"/>
|
||||
<setting id="cleanup.add_generated_serial_version_id" value="true"/>
|
||||
<setting id="cleanup.organize_imports" value="true"/>
|
||||
<setting id="cleanup.sort_members_all" value="false"/>
|
||||
<setting id="cleanup.remove_trailing_whitespaces" value="true"/>
|
||||
<setting id="cleanup.use_blocks_only_for_return_and_throw" value="false"/>
|
||||
<setting id="cleanup.use_parentheses_in_expressions" value="true"/>
|
||||
<setting id="cleanup.add_missing_annotations" value="true"/>
|
||||
<setting id="cleanup.qualify_static_field_accesses_with_declaring_class" value="false"/>
|
||||
<setting id="cleanup.use_this_for_non_static_method_access_only_if_necessary" value="true"/>
|
||||
<setting id="cleanup.use_this_for_non_static_method_access" value="true"/>
|
||||
<setting id="cleanup.qualify_static_member_accesses_through_instances_with_declaring_class" value="true"/>
|
||||
<setting id="cleanup.add_serial_version_id" value="true"/>
|
||||
<setting id="cleanup.always_use_blocks" value="true"/>
|
||||
<setting id="cleanup.qualify_static_member_accesses_with_declaring_class" value="true"/>
|
||||
<setting id="cleanup.format_source_code_changes_only" value="false"/>
|
||||
</profile>
|
||||
</profiles>
|
||||
@@ -1,17 +0,0 @@
|
||||
[
|
||||
{
|
||||
"modid": "ThaumicTinkerer",
|
||||
"name": "Thaumic Tinkerer",
|
||||
"description": "An addon to Thaumcraft 3, implementing new content. This mod is a spiritual successor to Elemental Tinkerer. Compiled for Thaumcraft 3.0.5.",
|
||||
"version": "1.0.1",
|
||||
"mcversion": "1.5+",
|
||||
"logoFile": "/mods/ThaumicTinkerer/logo.png",
|
||||
"url": "",
|
||||
"updateUrl": "",
|
||||
"authors": ["Vazkii"],
|
||||
"credits": "azanor for creating Thaumcraft. TheAtlanticCraft, MartysGames, TheWhiteWolves",
|
||||
"parent": "",
|
||||
"screenshots": [],
|
||||
"dependencies": ["Thaumcraft"]
|
||||
}
|
||||
]
|
||||
@@ -1,100 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [24 Apr 2013, 19:28:32 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer;
|
||||
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
import thaumcraft.common.CommonProxy;
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
import vazkii.tinkerer.block.ModBlocks;
|
||||
import vazkii.tinkerer.core.proxy.TTCommonProxy;
|
||||
import vazkii.tinkerer.item.ModItems;
|
||||
import vazkii.tinkerer.lib.LibMisc;
|
||||
import vazkii.tinkerer.lib.LibNetwork;
|
||||
import vazkii.tinkerer.lib.LibResources;
|
||||
import vazkii.tinkerer.network.PacketManager;
|
||||
import vazkii.tinkerer.network.PlayerTracker;
|
||||
import vazkii.tinkerer.potion.ModPotions;
|
||||
import vazkii.tinkerer.research.ModArcaneRecipes;
|
||||
import vazkii.tinkerer.research.ModCraftingRecipes;
|
||||
import vazkii.tinkerer.research.ModInfusionRecipes;
|
||||
import vazkii.tinkerer.research.ModResearchItems;
|
||||
import vazkii.tinkerer.util.handler.ConfigurationHandler;
|
||||
import vazkii.tinkerer.util.handler.EntityInteractionHandler;
|
||||
import vazkii.tinkerer.util.handler.GuiHandler;
|
||||
import cpw.mods.fml.common.Mod;
|
||||
import cpw.mods.fml.common.Mod.Init;
|
||||
import cpw.mods.fml.common.Mod.Instance;
|
||||
import cpw.mods.fml.common.Mod.PostInit;
|
||||
import cpw.mods.fml.common.Mod.PreInit;
|
||||
import cpw.mods.fml.common.SidedProxy;
|
||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
import cpw.mods.fml.common.network.NetworkMod;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
@Mod(modid = LibMisc.MOD_ID, name = LibMisc.MOD_NAME, version = LibMisc.MOD_VERSION, dependencies = LibMisc.DEPENDENCIES)
|
||||
@NetworkMod(channels = { LibNetwork.PACKET_CHANNEL }, clientSideRequired = true, packetHandler = PacketManager.class)
|
||||
public class ThaumicTinkerer {
|
||||
|
||||
@Instance(LibMisc.MOD_ID)
|
||||
public static ThaumicTinkerer modInstance;
|
||||
|
||||
@SidedProxy(clientSide = LibMisc.CLIENT_PROXY, serverSide = LibMisc.COMMON_PROXY)
|
||||
public static TTCommonProxy proxy;
|
||||
|
||||
public static CommonProxy tcProxy;
|
||||
|
||||
@PreInit
|
||||
public void onPreInit(FMLPreInitializationEvent event) {
|
||||
modInstance = this;
|
||||
tcProxy = Thaumcraft.proxy;
|
||||
|
||||
ConfigurationHandler.loadConfig(event.getSuggestedConfigurationFile());
|
||||
|
||||
proxy.initPackets();
|
||||
|
||||
ThaumcraftApi.registerResearchXML(LibResources.RESEARCH_XML);
|
||||
}
|
||||
|
||||
@Init
|
||||
public void onInit(FMLInitializationEvent event) {
|
||||
ModBlocks.initBlocks();
|
||||
ModItems.initItems();
|
||||
ModPotions.initPotions();
|
||||
|
||||
proxy.initEntities();
|
||||
proxy.initTileEntities();
|
||||
proxy.initRenders();
|
||||
|
||||
MinecraftForge.EVENT_BUS.register(new EntityInteractionHandler());
|
||||
|
||||
GameRegistry.registerPlayerTracker(new PlayerTracker());
|
||||
NetworkRegistry.instance().registerGuiHandler(modInstance, new GuiHandler());
|
||||
|
||||
proxy.initTickHandlers();
|
||||
}
|
||||
|
||||
@PostInit
|
||||
public void onPostInit(FMLPostInitializationEvent event) {
|
||||
ModResearchItems.registerModResearchItems();
|
||||
ModInfusionRecipes.initInfusionRecipes();
|
||||
ModArcaneRecipes.initArcaneRecipes();
|
||||
ModCraftingRecipes.initCraftingRecipes();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,140 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [13 May 2013, 14:44:11 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.block;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import vazkii.tinkerer.ThaumicTinkerer;
|
||||
import vazkii.tinkerer.client.util.helper.IconHelper;
|
||||
import vazkii.tinkerer.lib.LibGuiIDs;
|
||||
import vazkii.tinkerer.tile.TileEntityAnimationTablet;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockAnimationTablet extends BlockModContainer {
|
||||
|
||||
Icon iconBottom;
|
||||
Icon iconTop;
|
||||
Icon iconSides;
|
||||
|
||||
public BlockAnimationTablet(int par1) {
|
||||
super(par1, Material.iron);
|
||||
setBlockBounds(0F, 0F, 0F, 1F, 1F / 16F * 2F, 1F);
|
||||
setHardness(3F);
|
||||
setResistance(50F);
|
||||
setStepSound(soundMetalFootstep);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IconRegister par1IconRegister) {
|
||||
iconBottom = IconHelper.forBlock(par1IconRegister, this, 0);
|
||||
iconTop = IconHelper.forBlock(par1IconRegister, this, 1);
|
||||
iconSides = IconHelper.forBlock(par1IconRegister, this, 2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World par1World, int par2, int par3, int par4, EntityLiving par5EntityLiving, ItemStack par6ItemStack) {
|
||||
byte b0 = 0;
|
||||
int l1 = MathHelper.floor_double(par5EntityLiving.rotationYaw * 4.0F / 360.0F + 0.5D) & 3;
|
||||
|
||||
if (l1 == 0)
|
||||
b0 = 2;
|
||||
|
||||
if (l1 == 1)
|
||||
b0 = 5;
|
||||
|
||||
if (l1 == 2)
|
||||
b0 = 3;
|
||||
|
||||
if (l1 == 3)
|
||||
b0 = 4;
|
||||
|
||||
par1World.setBlockMetadataWithNotify(par2, par3, par4, b0, 2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange(World par1World, int par2, int par3, int par4, int par5) {
|
||||
boolean power = par1World.isBlockIndirectlyGettingPowered(par2, par3, par4) || par1World.isBlockIndirectlyGettingPowered(par2, par3 + 1, par4);
|
||||
int meta = par1World.getBlockMetadata(par2, par3, par4);
|
||||
boolean on = (meta & 8) != 0;
|
||||
|
||||
if (power && !on) {
|
||||
par1World.scheduleBlockUpdate(par2, par3, par4, blockID, tickRate(par1World));
|
||||
par1World.setBlockMetadataWithNotify(par2, par3, par4, meta | 8, 4);
|
||||
} else if (!power && on)
|
||||
par1World.setBlockMetadataWithNotify(par2, par3, par4, meta & 7, 4);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int tickRate(World par1World) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) {
|
||||
TileEntity tile = par1World.getBlockTileEntity(par2, par3, par4);
|
||||
if(tile != null && tile instanceof TileEntityAnimationTablet) {
|
||||
TileEntityAnimationTablet tablet = (TileEntityAnimationTablet) tile;
|
||||
if(tablet.redstone && tablet.swingProgress == 0) {
|
||||
tablet.findEntities(tablet.getTargetLoc());
|
||||
tablet.initiateSwing();
|
||||
par1World.addBlockEvent(par2, par3, par4, ModBlocks.animationTablet.blockID, 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) {
|
||||
if(!par1World.isRemote) {
|
||||
TileEntity tile = par1World.getBlockTileEntity(par2, par3, par4);
|
||||
if(tile != null)
|
||||
par5EntityPlayer.openGui(ThaumicTinkerer.modInstance, LibGuiIDs.ID_ANIMATION_TABLET, par1World, par2, par3, par4);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Icon getIcon(int par1, int par2) {
|
||||
return par1 == ForgeDirection.UP.ordinal() ? iconTop : par1 == ForgeDirection.DOWN.ordinal() ? iconBottom : iconSides;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world) {
|
||||
return new TileEntityAnimationTablet();
|
||||
}
|
||||
}
|
||||
@@ -1,121 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [7 May 2013, 17:04:43 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.block;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.tinkerer.client.util.helper.IconHelper;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockDarkQuartz extends BlockMod {
|
||||
|
||||
private static final String[] iconNames = new String[] {"darkQuartz0", "chiseledDarkQuartz0", "pillarDarkQuartz0", null, null};
|
||||
private Icon[] darkQuartzIcons;
|
||||
private Icon chiseledDarkQuartzIcon;
|
||||
private Icon pillarDarkQuartzIcon;
|
||||
private Icon darkQuartzTopIcon;
|
||||
|
||||
public BlockDarkQuartz(int par1) {
|
||||
super(par1, Material.rock);
|
||||
setHardness(0.8F);
|
||||
setResistance(10F);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Icon getIcon(int par1, int par2) {
|
||||
if (par2 != 2 && par2 != 3 && par2 != 4) {
|
||||
if (par1 != 1 && (par1 != 0 || par2 != 1)) {
|
||||
if (par1 == 0)
|
||||
return darkQuartzTopIcon;
|
||||
else {
|
||||
if (par2 < 0 || par2 >= darkQuartzIcons.length)
|
||||
par2 = 0;
|
||||
|
||||
return darkQuartzIcons[par2];
|
||||
}
|
||||
}
|
||||
else return par2 == 1 ? chiseledDarkQuartzIcon : darkQuartzTopIcon;
|
||||
}
|
||||
else return par2 == 2 && (par1 == 1 || par1 == 0) ? pillarDarkQuartzIcon : par2 == 3 && (par1 == 5 || par1 == 4) ? pillarDarkQuartzIcon : par2 == 4 && (par1 == 2 || par1 == 3) ? pillarDarkQuartzIcon : darkQuartzIcons[par2];
|
||||
}
|
||||
|
||||
@Override
|
||||
public int onBlockPlaced(World par1World, int par2, int par3, int par4, int par5, float par6, float par7, float par8, int par9) {
|
||||
if (par9 == 2) {
|
||||
switch (par5) {
|
||||
case 0:
|
||||
case 1:
|
||||
par9 = 2;
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
par9 = 4;
|
||||
break;
|
||||
case 4:
|
||||
case 5:
|
||||
par9 = 3;
|
||||
}
|
||||
}
|
||||
|
||||
return par9;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int damageDropped(int par1) {
|
||||
return par1 != 3 && par1 != 4 ? par1 : 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ItemStack createStackedBlock(int par1) {
|
||||
return par1 != 3 && par1 != 4 ? super.createStackedBlock(par1) : new ItemStack(blockID, 1, 2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType() {
|
||||
return 39;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubBlocks(int par1, CreativeTabs par2CreativeTabs, List par3List) {
|
||||
par3List.add(new ItemStack(par1, 1, 0));
|
||||
par3List.add(new ItemStack(par1, 1, 1));
|
||||
par3List.add(new ItemStack(par1, 1, 2));
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IconRegister par1IconRegister) {
|
||||
darkQuartzIcons = new Icon[iconNames.length];
|
||||
|
||||
for (int i = 0; i < darkQuartzIcons.length; ++i) {
|
||||
if (iconNames[i] == null)
|
||||
darkQuartzIcons[i] = darkQuartzIcons[i - 1];
|
||||
else darkQuartzIcons[i] = IconHelper.forName(par1IconRegister, iconNames[i]);
|
||||
}
|
||||
|
||||
darkQuartzTopIcon = IconHelper.forName(par1IconRegister, "darkQuartz1");
|
||||
chiseledDarkQuartzIcon = IconHelper.forName(par1IconRegister, "chiseledDarkQuartz1");
|
||||
pillarDarkQuartzIcon = IconHelper.forName(par1IconRegister, "pillarDarkQuartz1");
|
||||
}
|
||||
}
|
||||
@@ -1,66 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [7 May 2013, 17:06:00 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.block;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.BlockHalfSlab;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Icon;
|
||||
import vazkii.tinkerer.lib.LibBlockNames;
|
||||
import vazkii.tinkerer.util.helper.ModCreativeTab;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockDarkQuartzSlab extends BlockHalfSlab {
|
||||
|
||||
public BlockDarkQuartzSlab(int par1, boolean par2) {
|
||||
super(par1, par2, Material.rock);
|
||||
setHardness(0.8F);
|
||||
setResistance(10F);
|
||||
if(!par2) {
|
||||
setCreativeTab(ModCreativeTab.INSTANCE);
|
||||
setLightOpacity(0);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Icon getIcon(int par1, int par2) {
|
||||
return ModBlocks.darkQuartz.getBlockTextureFromSide(par1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int idDropped(int par1, Random par2Random, int par3) {
|
||||
return ModBlocks.darkQuartzSlab.blockID;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ItemStack createStackedBlock(int par1) {
|
||||
return new ItemStack(ModBlocks.darkQuartzSlab);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFullSlabName(int i) {
|
||||
return LibBlockNames.DARK_QUARTZ_SLAB;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IconRegister par1IconRegister) {
|
||||
// NO-OP
|
||||
}
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [7 May 2013, 17:07:48 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.block;
|
||||
|
||||
import net.minecraft.block.BlockStairs;
|
||||
import vazkii.tinkerer.util.helper.ModCreativeTab;
|
||||
|
||||
/**
|
||||
* BlockETStairs
|
||||
*
|
||||
* Elemental Tinkerer Implementation of BlockStairs.
|
||||
*
|
||||
* @author Vazkii
|
||||
*/
|
||||
public class BlockDarkQuartzStairs extends BlockStairs {
|
||||
|
||||
protected BlockDarkQuartzStairs(int par1) {
|
||||
super(par1, ModBlocks.darkQuartz, 0);
|
||||
setCreativeTab(ModCreativeTab.INSTANCE);
|
||||
}
|
||||
}
|
||||
@@ -1,135 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [25 Apr 2013, 11:57:15 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.block;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.Explosion;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.tinkerer.ThaumicTinkerer;
|
||||
import vazkii.tinkerer.client.util.helper.IconHelper;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockGlowstoneGas extends BlockMod {
|
||||
|
||||
public BlockGlowstoneGas(int par1) {
|
||||
super(par1, Material.air);
|
||||
setLightValue(0.85F);
|
||||
setBlockBounds(0, 0, 0, 0, 0, 0);
|
||||
setTickRandomly(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IconRegister par1IconRegister) {
|
||||
blockIcon = IconHelper.emptyTexture(par1IconRegister);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType() {
|
||||
return -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void randomDisplayTick(World par1World, int par2, int par3, int par4, Random par5Random) {
|
||||
if(par5Random.nextFloat() < 0.0075F)
|
||||
ThaumicTinkerer.tcProxy.sparkle(par2 + 0.5F, par3 + 0.5F, par4 + 0.5F, 1F, 1, par5Random.nextFloat() / 2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) {
|
||||
int meta = par1World.getBlockMetadata(par2, par3, par4);
|
||||
if(meta != 0) {
|
||||
setAt(par1World, par2 - 1, par3, par4, meta - 1);
|
||||
setAt(par1World, par2 + 1, par3, par4, meta - 1);
|
||||
|
||||
setAt(par1World, par2, par3 - 1, par4, meta - 1);
|
||||
setAt(par1World, par2, par3 + 1, par4, meta - 1);
|
||||
|
||||
setAt(par1World, par2, par3, par4 - 1, meta - 1);
|
||||
setAt(par1World, par2, par3, par4 + 1, meta - 1);
|
||||
|
||||
// Just in case...
|
||||
par1World.setBlockMetadataWithNotify(par2, par3, par4, 0, 2);
|
||||
|
||||
ThaumicTinkerer.tcProxy.sparkle(par2 + 0.5F, par3 + 0.5F, par4 + 0.5F, 1);
|
||||
}
|
||||
}
|
||||
|
||||
private void setAt(World world, int x, int y, int z, int meta) {
|
||||
if(world.isAirBlock(x, y, z) && world.getBlockId(x, y, z) != blockID) {
|
||||
if(!world.isRemote)
|
||||
world.setBlock(x, y, z, blockID, meta, 2);
|
||||
world.scheduleBlockUpdate(x, y, z, blockID, 10);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isBlockNormalCube(World world, int x, int y, int z) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean registerInCreative() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canDragonDestroy(World world, int x, int y, int z) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canCollideCheck(int par1, boolean par2) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canBeReplacedByLeaves(World world, int x, int y, int z) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canDropFromExplosion(Explosion par1Explosion) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArrayList<ItemStack> getBlockDropped(World world, int x, int y, int z, int metadata, int fortune) {
|
||||
return new ArrayList(); // Empty List
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAirBlock(World world, int x, int y, int z) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [25 Apr 2013, 11:50:58 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.block;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import vazkii.tinkerer.client.util.helper.IconHelper;
|
||||
import vazkii.tinkerer.util.helper.ModCreativeTab;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockMod extends Block {
|
||||
|
||||
public BlockMod(int par1, Material par2Material) {
|
||||
super(par1, par2Material);
|
||||
if(registerInCreative())
|
||||
setCreativeTab(ModCreativeTab.INSTANCE);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IconRegister par1IconRegister) {
|
||||
blockIcon = IconHelper.forBlock(par1IconRegister, this);
|
||||
}
|
||||
|
||||
/** Does the block register in the creative inv? **/
|
||||
boolean registerInCreative() {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [28 Apr 2013, 17:32:41 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.block;
|
||||
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import vazkii.tinkerer.client.util.helper.IconHelper;
|
||||
import vazkii.tinkerer.util.helper.ModCreativeTab;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public abstract class BlockModContainer extends BlockContainer {
|
||||
|
||||
protected BlockModContainer(int par1, Material par2Material) {
|
||||
super(par1, par2Material);
|
||||
if(registerInCreative())
|
||||
setCreativeTab(ModCreativeTab.INSTANCE);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IconRegister par1IconRegister) {
|
||||
blockIcon = IconHelper.forBlock(par1IconRegister, this);
|
||||
}
|
||||
|
||||
/** Does the block register in the creative inv? **/
|
||||
boolean registerInCreative() {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,81 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [28 Apr 2013, 16:50:31 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.block;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.tinkerer.ThaumicTinkerer;
|
||||
import vazkii.tinkerer.client.util.helper.IconHelper;
|
||||
import vazkii.tinkerer.lib.LibGuiIDs;
|
||||
import vazkii.tinkerer.tile.TileEntityTransmutator;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockTransmutator extends BlockModContainer {
|
||||
|
||||
Icon[] icons = new Icon[6];
|
||||
|
||||
public BlockTransmutator(int par1) {
|
||||
super(par1, Material.wood);
|
||||
setBlockBounds(0F, 0F, 0F, 1F, 1F / 16F * 6F, 1F);
|
||||
setHardness(1.7F);
|
||||
setResistance(1F);
|
||||
setStepSound(soundWoodFootstep);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) {
|
||||
if(!par1World.isRemote) {
|
||||
TileEntity tile = par1World.getBlockTileEntity(par2, par3, par4);
|
||||
if(tile != null)
|
||||
par5EntityPlayer.openGui(ThaumicTinkerer.modInstance, LibGuiIDs.ID_TRANSMUTATOR, par1World, par2, par3, par4);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IconRegister par1IconRegister) {
|
||||
for(int i = 0; i < icons.length; i++)
|
||||
icons[i] = IconHelper.forBlock(par1IconRegister, this, i);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Icon getIcon(int par1, int par2) {
|
||||
return icons[par1];
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world) {
|
||||
return new TileEntityTransmutator();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,178 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [4 May 2013, 21:34:53 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.block;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
import thaumcraft.common.Config;
|
||||
import thaumcraft.common.items.wands.ItemWandCasting;
|
||||
import vazkii.tinkerer.lib.LibRenderIDs;
|
||||
import vazkii.tinkerer.tile.TileEntityWardChest;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class BlockWardChest extends BlockModContainer {
|
||||
|
||||
Random random;
|
||||
|
||||
protected BlockWardChest(int par1) {
|
||||
super(par1, Material.wood);
|
||||
setBlockUnbreakable();
|
||||
setHardness(6000F);
|
||||
disableStats();
|
||||
setStepSound(soundWoodFootstep);
|
||||
setBlockBounds(0.0625F, 0F, 0.0625F, 0.9375F, 0.875F, 0.9375F);
|
||||
ThaumcraftApi.portableHoleBlackList.add(par1);
|
||||
|
||||
random = new Random();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World par1World, int par2, int par3, int par4, EntityLiving par5EntityLiving, ItemStack par6ItemStack) {
|
||||
byte b0 = 0;
|
||||
int l1 = MathHelper.floor_double(par5EntityLiving.rotationYaw * 4.0F / 360.0F + 0.5D) & 3;
|
||||
|
||||
if (l1 == 0)
|
||||
b0 = 2;
|
||||
|
||||
if (l1 == 1)
|
||||
b0 = 5;
|
||||
|
||||
if (l1 == 2)
|
||||
b0 = 3;
|
||||
|
||||
if (l1 == 3)
|
||||
b0 = 4;
|
||||
|
||||
par1World.setBlockMetadataWithNotify(par2, par3, par4, b0, 2);
|
||||
TileEntityWardChest chest = (TileEntityWardChest) par1World.getBlockTileEntity(par2, par3, par4);
|
||||
if (par6ItemStack.hasDisplayName())
|
||||
chest.customName = par6ItemStack.getDisplayName();
|
||||
if(par5EntityLiving instanceof EntityPlayer)
|
||||
chest.owner = ((EntityPlayer) par5EntityLiving).username;
|
||||
else chest.owner = "";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void breakBlock(World par1World, int par2, int par3, int par4, int par5, int par6) {
|
||||
TileEntityWardChest chest = (TileEntityWardChest) par1World.getBlockTileEntity(par2, par3, par4);
|
||||
|
||||
if (chest != null) {
|
||||
for (int j1 = 0; j1 < chest.getSizeInventory(); ++j1) {
|
||||
ItemStack itemstack = chest.getStackInSlot(j1);
|
||||
|
||||
if (itemstack != null) {
|
||||
float f = random.nextFloat() * 0.8F + 0.1F;
|
||||
float f1 = random.nextFloat() * 0.8F + 0.1F;
|
||||
EntityItem entityitem;
|
||||
|
||||
for (float f2 = random.nextFloat() * 0.8F + 0.1F; itemstack.stackSize > 0; par1World.spawnEntityInWorld(entityitem)) {
|
||||
int k1 = random.nextInt(21) + 10;
|
||||
|
||||
if (k1 > itemstack.stackSize)
|
||||
k1 = itemstack.stackSize;
|
||||
|
||||
itemstack.stackSize -= k1;
|
||||
entityitem = new EntityItem(par1World, par2 + f, par3 + f1, par4 + f2, new ItemStack(itemstack.itemID, k1, itemstack.getItemDamage()));
|
||||
float f3 = 0.05F;
|
||||
entityitem.motionX = (float)random.nextGaussian() * f3;
|
||||
entityitem.motionY = (float)random.nextGaussian() * f3 + 0.2F;
|
||||
entityitem.motionZ = (float)random.nextGaussian() * f3;
|
||||
|
||||
if (itemstack.hasTagCompound())
|
||||
entityitem.getEntityItem().setTagCompound((NBTTagCompound)itemstack.getTagCompound().copy());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
par1World.func_96440_m(par2, par3, par4, par5);
|
||||
}
|
||||
|
||||
super.breakBlock(par1World, par2, par3, par4, par5, par6);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) {
|
||||
if (par1World.isRemote)
|
||||
return true;
|
||||
|
||||
TileEntityWardChest chest = (TileEntityWardChest) par1World.getBlockTileEntity(par2, par3, par4);
|
||||
|
||||
effect : {
|
||||
if (chest != null) {
|
||||
String owner = chest.owner;
|
||||
|
||||
if(owner.equals(par5EntityPlayer.username)) {
|
||||
if(par5EntityPlayer.getCurrentEquippedItem() != null && par5EntityPlayer.getCurrentEquippedItem().getItem() instanceof ItemWandCasting) {
|
||||
if(!par1World.isRemote) {
|
||||
int meta = par1World.getBlockMetadata(par2, par3, par4);
|
||||
dropBlockAsItem(par1World, par2, par3, par4, meta, par6);
|
||||
par1World.playAuxSFX(2001, par2, par3, par4, blockID + (meta << 12));
|
||||
par1World.setBlock(par2, par3, par4, 0, 0, 1 & 2);
|
||||
break effect;
|
||||
} else par5EntityPlayer.swingItem();
|
||||
}
|
||||
|
||||
par5EntityPlayer.displayGUIChest(chest);
|
||||
par1World.playSoundEffect(par2, par3, par4, "thaumcraft.key", 1F, 1F);
|
||||
} else {
|
||||
par5EntityPlayer.addChatMessage("The Chest refuses to budge.");
|
||||
par1World.playSoundEffect(par2, par3, par4, "random.chestclosed", 1F, 0.2F);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Icon getIcon(int par1, int par2) {
|
||||
return Config.blockWooden.getIcon(par1, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType() {
|
||||
return LibRenderIDs.idWardChest;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world) {
|
||||
return new TileEntityWardChest();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,81 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [25 Apr 2013, 11:46:35 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.block;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import thaumcraft.api.EnumTag;
|
||||
import thaumcraft.api.ObjectTags;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
import vazkii.tinkerer.item.ItemDarkQuartzBlock;
|
||||
import vazkii.tinkerer.item.ItemDarkQuartzSlab;
|
||||
import vazkii.tinkerer.lib.LibBlockIDs;
|
||||
import vazkii.tinkerer.lib.LibBlockNames;
|
||||
import vazkii.tinkerer.lib.LibMisc;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
|
||||
public final class ModBlocks {
|
||||
|
||||
public static Block glowstoneGas;
|
||||
public static Block transmutator;
|
||||
public static Block wardChest;
|
||||
public static Block darkQuartz;
|
||||
public static Block darkQuartzStairs;
|
||||
public static Block darkQuartzSlab;
|
||||
public static Block darkQuartzSlabFull;
|
||||
public static Block animationTablet;
|
||||
|
||||
public static void initBlocks() {
|
||||
glowstoneGas = new BlockGlowstoneGas(LibBlockIDs.idGlowstoneGas).setUnlocalizedName(LibBlockNames.GLOWSTONE_GAS);
|
||||
transmutator = new BlockTransmutator(LibBlockIDs.idTransmutator).setUnlocalizedName(LibBlockNames.TRANSMUTATOR);
|
||||
wardChest = new BlockWardChest(LibBlockIDs.idWardChest).setUnlocalizedName(LibBlockNames.WARD_CHEST);
|
||||
darkQuartz = new BlockDarkQuartz(LibBlockIDs.idDarkQuartz).setUnlocalizedName(LibBlockNames.DARK_QUARTZ);
|
||||
darkQuartzStairs = new BlockDarkQuartzStairs(LibBlockIDs.idDarkQuartzStairs).setUnlocalizedName(LibBlockNames.DARK_QUARTZ_STAIRS);
|
||||
darkQuartzSlab = new BlockDarkQuartzSlab(LibBlockIDs.idDarkQuartzSlab, false).setUnlocalizedName(LibBlockNames.DARK_QUARTZ_SLAB);
|
||||
darkQuartzSlabFull = new BlockDarkQuartzSlab(LibBlockIDs.idDarkQuartzSlabFull, true).setUnlocalizedName(LibBlockNames.DARK_QUARTZ_SLAB);
|
||||
animationTablet = new BlockAnimationTablet(LibBlockIDs.idAnimationTablet).setUnlocalizedName(LibBlockNames.ANIMATION_TABLET);
|
||||
|
||||
registerBlocks();
|
||||
nameBlocks();
|
||||
registerObjectTags();
|
||||
}
|
||||
|
||||
private static void registerBlocks() {
|
||||
GameRegistry.registerBlock(glowstoneGas, LibBlockNames.GLOWSTONE_GAS);
|
||||
GameRegistry.registerBlock(transmutator, LibBlockNames.TRANSMUTATOR);
|
||||
GameRegistry.registerBlock(wardChest, LibBlockNames.WARD_CHEST);
|
||||
GameRegistry.registerBlock(darkQuartz, ItemDarkQuartzBlock.class, LibBlockNames.DARK_QUARTZ);
|
||||
GameRegistry.registerBlock(darkQuartzStairs, LibBlockNames.DARK_QUARTZ_STAIRS);
|
||||
GameRegistry.registerBlock(darkQuartzSlab, ItemDarkQuartzSlab.class, LibBlockNames.DARK_QUARTZ_SLAB);
|
||||
GameRegistry.registerBlock(darkQuartzSlabFull, ItemDarkQuartzSlab.class, LibBlockNames.DARK_QUARTZ_SLAB_FULL);
|
||||
GameRegistry.registerBlock(animationTablet, LibBlockNames.ANIMATION_TABLET);
|
||||
}
|
||||
|
||||
private static void nameBlocks() {
|
||||
LanguageRegistry.addName(transmutator, LibBlockNames.TRANSMUTATOR_D);
|
||||
LanguageRegistry.addName(wardChest, LibBlockNames.WARD_CHEST_D);
|
||||
LanguageRegistry.addName(darkQuartzStairs, LibBlockNames.DARK_QUARTZ_STAIRS_D);
|
||||
LanguageRegistry.addName(animationTablet, LibBlockNames.ANIMATION_TABLET_D);
|
||||
}
|
||||
|
||||
private static void registerObjectTags() {
|
||||
ObjectTags tags = new ObjectTags().add(EnumTag.WOOD, 16).add(EnumTag.EXCHANGE, 64).add(EnumTag.FLUX, 24).add(EnumTag.MECHANISM, 8).add(EnumTag.MAGIC, 16);
|
||||
ThaumcraftApi.registerObjectTag(transmutator.blockID, LibMisc.CRAFTING_META_WILDCARD, tags);
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.WOOD, 16).add(EnumTag.VOID, 18).add(EnumTag.MAGIC, 12);
|
||||
ThaumcraftApi.registerObjectTag(wardChest.blockID, LibMisc.CRAFTING_META_WILDCARD, tags);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,91 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [13 May 2013, 19:59:12 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.client.gui;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import vazkii.tinkerer.client.gui.button.GuiButtonAT;
|
||||
import vazkii.tinkerer.client.gui.button.GuiButtonATRadio;
|
||||
import vazkii.tinkerer.client.gui.button.IRadioButton;
|
||||
import vazkii.tinkerer.inventory.container.ContainerAnimationTablet;
|
||||
import vazkii.tinkerer.lib.LibResources;
|
||||
import vazkii.tinkerer.network.PacketManager;
|
||||
import vazkii.tinkerer.network.packet.PacketAnimationTabletButton;
|
||||
import vazkii.tinkerer.tile.TileEntityAnimationTablet;
|
||||
|
||||
public class GuiAnimationTablet extends GuiContainer {
|
||||
|
||||
int x, y;
|
||||
|
||||
TileEntityAnimationTablet tablet;
|
||||
List<GuiButtonAT> buttonListAT = new ArrayList();
|
||||
List<IRadioButton> radioButtons = new ArrayList();
|
||||
|
||||
public GuiAnimationTablet(TileEntityAnimationTablet tablet, InventoryPlayer playerInv) {
|
||||
super(new ContainerAnimationTablet(tablet, playerInv));
|
||||
this.tablet = tablet;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
x = (width - xSize) / 2;
|
||||
y = (height - ySize) / 2;
|
||||
buttonListAT.clear();
|
||||
addButton(new GuiButtonAT(0, x + xSize / 2 - 7, y + 60, tablet.redstone));
|
||||
addButton(new GuiButtonATRadio(1, x + 52, y + 15, tablet.leftClick, radioButtons));
|
||||
addButton(new GuiButtonATRadio(2, x + 111, y + 15, !tablet.leftClick, radioButtons));
|
||||
buttonList = buttonListAT;
|
||||
}
|
||||
|
||||
private void addButton(GuiButtonAT button) {
|
||||
buttonListAT.add(button);
|
||||
if(button instanceof IRadioButton)
|
||||
radioButtons.add((IRadioButton) button);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionPerformed(GuiButton par1GuiButton) {
|
||||
if(par1GuiButton instanceof IRadioButton)
|
||||
((IRadioButton) par1GuiButton).enableFromClick();
|
||||
else buttonListAT.get(0).enabled = !buttonListAT.get(0).enabled;
|
||||
|
||||
tablet.leftClick = buttonListAT.get(1).enabled;
|
||||
tablet.redstone = buttonListAT.get(0).enabled;
|
||||
|
||||
PacketManager.sendPacketToServer(new PacketAnimationTabletButton(tablet));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float f, int i, int j) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
mc.renderEngine.bindTexture(LibResources.GUI_ANIMATION_TABLET);
|
||||
drawTexturedModalRect(x, y, 0, 0, xSize, ySize);
|
||||
String left = "Left";
|
||||
String right = "Right";
|
||||
String redstone = "Redstone";
|
||||
fontRenderer.drawString(left, x + 48 - fontRenderer.getStringWidth(left), y + 18, 0x999999);
|
||||
fontRenderer.drawString(right, x + 128, y + 18, 0x999999);
|
||||
fontRenderer.drawString(redstone, x + xSize / 2 - fontRenderer.getStringWidth(redstone) / 2, y + 50, 0x999999);
|
||||
GL11.glColor3f(1F, 1F, 1F);
|
||||
}
|
||||
}
|
||||
@@ -1,124 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [28 Apr 2013, 18:57:15 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.client.gui;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import thaumcraft.api.EnumTag;
|
||||
import thaumcraft.api.ObjectTags;
|
||||
import thaumcraft.client.lib.UtilsFX;
|
||||
import thaumcraft.common.lib.ThaumcraftCraftingManager;
|
||||
import vazkii.tinkerer.inventory.container.ContainerTransmutator;
|
||||
import vazkii.tinkerer.inventory.slot.SlotTransmutator;
|
||||
import vazkii.tinkerer.lib.LibResources;
|
||||
import vazkii.tinkerer.tile.TileEntityTransmutator;
|
||||
import vazkii.tinkerer.util.helper.MiscHelper;
|
||||
|
||||
public class GuiTransmutator extends GuiContainer {
|
||||
|
||||
int x, y;
|
||||
|
||||
TileEntityTransmutator transmutator;
|
||||
|
||||
public GuiTransmutator(TileEntityTransmutator tile, InventoryPlayer player) {
|
||||
super(new ContainerTransmutator(tile, player));
|
||||
transmutator = tile;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
x = (width - xSize) / 2;
|
||||
y = (height - ySize) / 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerBackgroundLayer(float f, int i, int j) {
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
mc.renderEngine.bindTexture(LibResources.GUI_TRANSMUTATOR);
|
||||
drawTexturedModalRect(x, y, 0, 0, xSize, ySize);
|
||||
float deg = (float) (transmutator.ticksExisted % 360F);
|
||||
renderGlyphsAt(x + 154, y + 19, deg);
|
||||
if(transmutator.getStackInSlot(0) != null) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
ObjectTags tags = ThaumcraftCraftingManager.getObjectTags(transmutator.getStackInSlot(0));
|
||||
int value = SlotTransmutator.getTotalAspectValue(tags);
|
||||
String price = value + " vis";
|
||||
fontRenderer.drawString(price, (x + 162 - fontRenderer.getStringWidth(price) / 2) * 2, (y + 69) * 2, 0xFFFFFF);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void drawGuiContainerForegroundLayer(int i, int j) {
|
||||
List<String> renderString = null;
|
||||
|
||||
if(transmutator.getStackInSlot(0) != null) {
|
||||
ObjectTags tags = ThaumcraftCraftingManager.getObjectTags(transmutator.getStackInSlot(0));
|
||||
int degPerTag = 360 / tags.size();
|
||||
int renderDeg = -90;
|
||||
for(EnumTag tag : tags.getAspects()) {
|
||||
int amount = tags.getAmount(tag);
|
||||
int xpos = (int) (50 + 35 * Math.cos(renderDeg * Math.PI / 180));
|
||||
int ypos = (int) (16 + 35 * Math.sin(renderDeg * Math.PI / 180));
|
||||
UtilsFX.drawTag(mc, xpos, ypos, tag, amount * 4, this, false, false);
|
||||
float deg = (float) (transmutator.ticksExisted * amount % 360F);
|
||||
|
||||
int color = tag.color;
|
||||
int red = color >> 16 & 0xFF;
|
||||
int green = color >> 8 & 0xFF;
|
||||
int blue = color & 0xFF;
|
||||
GL11.glColor4ub((byte) red, (byte) green, (byte) blue, (byte) 128);
|
||||
if(transmutator.foundTags.getAmount(tag) >= amount * 4)
|
||||
renderGlyphsAt(xpos + 8, ypos + 8, deg);
|
||||
|
||||
if(i > xpos + x && i < xpos + x + 16 && j > ypos + y && j < ypos + y + 16)
|
||||
renderString = Arrays.asList(tag.name, tag.meaning);
|
||||
renderDeg += degPerTag;
|
||||
}
|
||||
|
||||
if(renderString != null)
|
||||
UtilsFX.drawCustomTooltip(this, itemRenderer, fontRenderer, renderString, i - x, j - y, EnumChatFormatting.AQUA.ordinal());
|
||||
}
|
||||
}
|
||||
|
||||
private void renderGlyphsAt(int x, int y, float deg) {
|
||||
Minecraft mc = MiscHelper.getMc();
|
||||
mc.renderEngine.bindTexture(LibResources.MISC_GLYPHS);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glTranslatef(x, y, 0F);
|
||||
GL11.glRotatef(deg, 0F, 0F, 1F);
|
||||
Tessellator tess = Tessellator.instance;
|
||||
tess.startDrawingQuads();
|
||||
tess.addVertexWithUV(-16, 16, zLevel, 0, 1);
|
||||
tess.addVertexWithUV(16, 16, zLevel, 1, 1);
|
||||
tess.addVertexWithUV(16, -16, zLevel, 1, 0);
|
||||
tess.addVertexWithUV(-16, -16, zLevel, 0, 0);
|
||||
tess.draw();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [13 May 2013, 21:37:42 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.client.gui.button;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.GuiButton;
|
||||
import vazkii.tinkerer.lib.LibResources;
|
||||
|
||||
public class GuiButtonAT extends GuiButton {
|
||||
|
||||
public boolean enabled = false;;
|
||||
|
||||
public GuiButtonAT(int par1, int par2, int par3, boolean enabled) {
|
||||
super(par1, par2, par3, 13, 13, "");
|
||||
this.enabled = enabled;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawButton(Minecraft par1Minecraft, int par2, int par3) {
|
||||
if(drawButton) {
|
||||
par1Minecraft.renderEngine.bindTexture(LibResources.GUI_ANIMATION_TABLET);
|
||||
int y = enabled ? 13 : 0;
|
||||
drawTexturedModalRect(xPosition, yPosition, 176, y, width, height);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [13 May 2013, 21:37:31 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.client.gui.button;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class GuiButtonATRadio extends GuiButtonAT implements IRadioButton {
|
||||
|
||||
List<IRadioButton> linkedButtons;
|
||||
|
||||
public GuiButtonATRadio(int par1, int par2, int par3, boolean enabled, List<IRadioButton> linkedButtons) {
|
||||
super(par1, par2, par3, enabled);
|
||||
this.linkedButtons = linkedButtons;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void enableFromClick() {
|
||||
setEnabled(true);
|
||||
for(IRadioButton button : linkedButtons)
|
||||
if(button != this)
|
||||
button.updateStatus(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateStatus(IRadioButton otherButton) {
|
||||
if(otherButton.isEnabled())
|
||||
setEnabled(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEnabled() {
|
||||
return enabled;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setEnabled(boolean enabled) {
|
||||
this.enabled = enabled;
|
||||
}
|
||||
}
|
||||
@@ -1,60 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [26 Apr 2013, 23:46:45 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.client.hud;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.ScaledResolution;
|
||||
import net.minecraft.client.renderer.RenderHelper;
|
||||
import net.minecraft.client.renderer.entity.RenderItem;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import thaumcraft.api.EnumTag;
|
||||
import vazkii.tinkerer.item.ModItems;
|
||||
import vazkii.tinkerer.potion.ModPotions;
|
||||
import vazkii.tinkerer.util.helper.MiscHelper;
|
||||
|
||||
public class HUDStopwatch implements IHUDElement {
|
||||
|
||||
@Override
|
||||
public boolean shouldRender() {
|
||||
return MiscHelper.getMc().currentScreen == null && MiscHelper.getClientPlayer() != null && MiscHelper.getClientPlayer().isPotionActive(ModPotions.effectStopwatch.id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(float partialTicks) {
|
||||
Minecraft mc = MiscHelper.getMc();
|
||||
ScaledResolution res = new ScaledResolution(mc.gameSettings, mc.displayWidth, mc.displayHeight);
|
||||
|
||||
int width = res.getScaledWidth();
|
||||
int height = res.getScaledHeight();
|
||||
|
||||
boolean unicode = mc.fontRenderer.getUnicodeFlag();
|
||||
mc.fontRenderer.setUnicodeFlag(true);
|
||||
String timeStr = EnumChatFormatting.BOLD + Potion.getDurationString(mc.thePlayer.getActivePotionEffect(ModPotions.effectStopwatch));
|
||||
RenderItem itemRender = new RenderItem();
|
||||
int lenght = 18 + mc.fontRenderer.getStringWidth(timeStr);
|
||||
|
||||
RenderHelper.enableStandardItemLighting();
|
||||
itemRender.renderItemIntoGUI(mc.fontRenderer, mc.renderEngine, new ItemStack(ModItems.stopwatch), width / 2 - lenght / 2, height - 85);
|
||||
RenderHelper.disableStandardItemLighting();
|
||||
|
||||
mc.fontRenderer.drawStringWithShadow(timeStr, width / 2 - lenght / 2 + 18, height - 81, EnumTag.TIME.color);
|
||||
mc.fontRenderer.setUnicodeFlag(unicode);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clientTick() { }
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [26 Apr 2013, 23:42:36 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.client.hud;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public interface IHUDElement {
|
||||
|
||||
public boolean shouldRender();
|
||||
|
||||
public void render(float partialTicks);
|
||||
|
||||
public void clientTick();
|
||||
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [6 May 2013, 21:23:40 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.client.render.block;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntityRenderer;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import vazkii.tinkerer.lib.LibRenderIDs;
|
||||
import vazkii.tinkerer.tile.TileEntityWardChest;
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
|
||||
public class RenderWardChest implements ISimpleBlockRenderingHandler {
|
||||
|
||||
@Override
|
||||
public void renderInventoryBlock(Block block, int metadata, int modelID, RenderBlocks renderer) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
|
||||
TileEntityRenderer.instance.renderTileEntityAt(new TileEntityWardChest(), 0.0D, 0.0D, 0.0D, 0.0F);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldRender3DInInventory() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderId() {
|
||||
return LibRenderIDs.idWardChest;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [11 May 2013, 23:05:52 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.client.render.entity;
|
||||
|
||||
import net.minecraft.client.renderer.ItemRenderer;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.entity.Render;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.Icon;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import vazkii.tinkerer.item.ModItems;
|
||||
import vazkii.tinkerer.lib.LibMisc;
|
||||
import vazkii.tinkerer.util.helper.MiscHelper;
|
||||
|
||||
public class RenderDeathRune extends Render {
|
||||
|
||||
@Override
|
||||
public void doRender(Entity entity, double d0, double d1, double d2, float f4, float f5) {
|
||||
GL11.glPushMatrix();
|
||||
double xShake = (Math.random() - 0.5) / 12;
|
||||
double yShake = (Math.random() - 0.5) / 12;
|
||||
double zShake = (Math.random() - 0.25) / 12;
|
||||
GL11.glTranslated(d0 + xShake - 0.2, d1 + yShake - 0.25, d2 + zShake);
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
MiscHelper.getMc().renderEngine.bindTexture("/gui/items.png");
|
||||
Icon icon = ModItems.deathRune.getIconFromDamage(0);
|
||||
float f = icon.getMinU();
|
||||
float f1 = icon.getMaxU();
|
||||
float f2 = icon.getMinV();
|
||||
float f3 = icon.getMaxV();
|
||||
ItemRenderer.renderItemIn2D(Tessellator.instance, f1, f2, f, f3, icon.getSheetWidth(), icon.getSheetHeight(), LibMisc.MODEL_DEFAULT_RENDER_SCALE);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
@@ -1,133 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [13 May 2013, 20:05:48 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.client.render.tile;
|
||||
|
||||
import java.awt.Color;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.ItemRenderer;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Icon;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import vazkii.tinkerer.client.util.handler.ClientTickHandler;
|
||||
import vazkii.tinkerer.lib.LibMisc;
|
||||
import vazkii.tinkerer.lib.LibResources;
|
||||
import vazkii.tinkerer.tile.TileEntityAnimationTablet;
|
||||
import vazkii.tinkerer.util.helper.MiscHelper;
|
||||
|
||||
public class RenderTileAnimationTablet extends TileEntitySpecialRenderer {
|
||||
|
||||
private static final float[][] TRANSLATIONS = new float[][] {
|
||||
{ 0F, 0F, -1.25F },
|
||||
{ -1.25F, 0F, 0F },
|
||||
{ 0F, 0F, 0F },
|
||||
{ -1.25F, 0F, -1.25F }
|
||||
};
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, double d2, float partialTicks) {
|
||||
TileEntityAnimationTablet tile = (TileEntityAnimationTablet) tileentity;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(d0, d1, d2);
|
||||
renderOverlay(tile, LibResources.MISC_AT_OVERLAY_DIAL, -1, false, false, 0.65, 0.13F);
|
||||
if(tile.leftClick)
|
||||
renderOverlay(tile, LibResources.MISC_AT_OVERLAY_LEFT, 1, false, true, 1, 0.13F);
|
||||
else renderOverlay(tile, LibResources.MISC_AT_OVERLAY_RIGHT, 1, false, true, 1, 0.13F);
|
||||
|
||||
int meta = tile.getBlockMetadata() & 7;
|
||||
int rotation = meta == 2 ? 270 : meta == 3 ? 90 : meta == 4 ? 0 : 180;
|
||||
GL11.glRotatef(rotation, 0F, 1F, 0F);
|
||||
GL11.glTranslated(0.1, 0.2 + Math.cos(ClientTickHandler.clientTicksElapsed / 12D) / 18F, 0.5);
|
||||
GL11.glScalef(0.8F, 0.8F, 0.8F);
|
||||
float[] translations = TRANSLATIONS[meta - 2];
|
||||
GL11.glTranslatef(translations[0], translations[1], translations[2]);
|
||||
GL11.glTranslatef(0.5F, 0F, 0.5F);
|
||||
GL11.glRotatef(tile.swingProgress, 0F, 0F, 1F);
|
||||
GL11.glTranslatef(-0.5F, 0F, -0.5F);
|
||||
GL11.glTranslatef(-tile.swingProgress / 250F, tile.swingProgress / 1000F, 0F);
|
||||
GL11.glRotatef((float) Math.cos(ClientTickHandler.clientTicksElapsed / 8F) * 5F, 1F, 0F, 1F);
|
||||
renderItem(tile);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
private void renderItem(TileEntityAnimationTablet tablet) {
|
||||
ItemStack stack = tablet.getStackInSlot(0);
|
||||
Minecraft mc = MiscHelper.getMc();
|
||||
if(stack != null) {
|
||||
mc.renderEngine.bindTexture(stack.getItem() instanceof ItemBlock ? "/terrain.png" : "/gui/items.png");
|
||||
|
||||
if(stack.getItem() instanceof ItemBlock && RenderBlocks.renderItemIn3d(Block.blocksList[stack.itemID].getRenderType())) {
|
||||
GL11.glTranslatef(0.5F, 0.55F, 0F);
|
||||
new RenderBlocks().renderBlockAsItem(Block.blocksList[stack.itemID], stack.getItemDamage(), 1F);
|
||||
GL11.glTranslatef(-0.5F, -0.55F, 0F);
|
||||
} else {
|
||||
int renderPass = 0;
|
||||
do {
|
||||
Icon icon = stack.getItem().getIcon(stack, renderPass);
|
||||
if(icon != null) {
|
||||
Color color = new Color(stack.getItem().getColorFromItemStack(stack, renderPass));
|
||||
GL11.glColor3ub((byte) color.getRed(), (byte) color.getGreen(), (byte) color.getBlue());
|
||||
float f = icon.getMinU();
|
||||
float f1 = icon.getMaxU();
|
||||
float f2 = icon.getMinV();
|
||||
float f3 = icon.getMaxV();
|
||||
ItemRenderer.renderItemIn2D(Tessellator.instance, f1, f2, f, f3, icon.getSheetWidth(), icon.getSheetHeight(), LibMisc.MODEL_DEFAULT_RENDER_SCALE);
|
||||
GL11.glColor3f(1F, 1F, 1F);
|
||||
}
|
||||
renderPass++;
|
||||
} while(renderPass < stack.getItem().getRenderPasses(stack.getItemDamage()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void renderOverlay(TileEntityAnimationTablet tablet, String texture, int rotationMod, boolean useLighting, boolean useBlend, double size, float height) {
|
||||
Minecraft mc = MiscHelper.getMc();
|
||||
mc.renderEngine.bindTexture(texture);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glDepthMask(false);
|
||||
if(!useLighting)
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
if(useBlend) {
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
}
|
||||
GL11.glTranslatef(0.5F, height, 0.5F);
|
||||
float deg = (float) (tablet.ticksExisted * rotationMod % 360F);
|
||||
GL11.glRotatef(deg, 0F, 1F, 0F);
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
Tessellator tess = Tessellator.instance;
|
||||
double size1 = size / 2;
|
||||
double size2 = -size1;
|
||||
tess.startDrawingQuads();
|
||||
tess.addVertexWithUV(size2, 0, size1, 0, 1);
|
||||
tess.addVertexWithUV(size1, 0, size1, 1, 1);
|
||||
tess.addVertexWithUV(size1, 0, size2, 1, 0);
|
||||
tess.addVertexWithUV(size2, 0, size2, 0, 0);
|
||||
tess.draw();
|
||||
GL11.glDepthMask(true);
|
||||
if(!useLighting)
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
@@ -1,106 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [28 Apr 2013, 21:08:49 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.client.render.tile;
|
||||
|
||||
import java.awt.Color;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.ItemRenderer;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Icon;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import vazkii.tinkerer.client.util.handler.ClientTickHandler;
|
||||
import vazkii.tinkerer.lib.LibMisc;
|
||||
import vazkii.tinkerer.lib.LibResources;
|
||||
import vazkii.tinkerer.tile.TileEntityTransmutator;
|
||||
import vazkii.tinkerer.util.helper.MiscHelper;
|
||||
|
||||
public class RenderTileTransmutator extends TileEntitySpecialRenderer {
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, double d2, float partialTicks) {
|
||||
TileEntityTransmutator tile = (TileEntityTransmutator) tileentity;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslated(d0, d1, d2);
|
||||
renderGlyphs(tile);
|
||||
GL11.glTranslated(0.25, 0.45 + Math.cos(ClientTickHandler.clientTicksElapsed / 12D) / 18F, 0.5);
|
||||
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||
renderItem(tile);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
private void renderItem(TileEntityTransmutator transmutator) {
|
||||
ItemStack stack = transmutator.getStackInSlot(0);
|
||||
Minecraft mc = MiscHelper.getMc();
|
||||
if(stack != null) {
|
||||
mc.renderEngine.bindTexture(stack.getItem() instanceof ItemBlock ? "/terrain.png" : "/gui/items.png");
|
||||
|
||||
if(stack.getItem() instanceof ItemBlock && RenderBlocks.renderItemIn3d(Block.blocksList[stack.itemID].getRenderType())) {
|
||||
GL11.glTranslatef(0.5F, 0.4F, 0F);
|
||||
new RenderBlocks().renderBlockAsItem(Block.blocksList[stack.itemID], stack.getItemDamage(), 1F);
|
||||
GL11.glTranslatef(-0.5F, -0.4F, 0F);
|
||||
} else {
|
||||
int renderPass = 0;
|
||||
do {
|
||||
Icon icon = stack.getItem().getIcon(stack, renderPass);
|
||||
if(icon != null) {
|
||||
Color color = new Color(stack.getItem().getColorFromItemStack(stack, renderPass));
|
||||
GL11.glColor3ub((byte) color.getRed(), (byte) color.getGreen(), (byte) color.getBlue());
|
||||
float f = icon.getMinU();
|
||||
float f1 = icon.getMaxU();
|
||||
float f2 = icon.getMinV();
|
||||
float f3 = icon.getMaxV();
|
||||
ItemRenderer.renderItemIn2D(Tessellator.instance, f1, f2, f, f3, icon.getSheetWidth(), icon.getSheetHeight(), LibMisc.MODEL_DEFAULT_RENDER_SCALE);
|
||||
GL11.glColor3f(1F, 1F, 1F);
|
||||
}
|
||||
renderPass++;
|
||||
} while(renderPass < stack.getItem().getRenderPasses(stack.getItemDamage()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void renderGlyphs(TileEntityTransmutator transmutator) {
|
||||
Minecraft mc = MiscHelper.getMc();
|
||||
mc.renderEngine.bindTexture(LibResources.MISC_GLYPHS);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glDepthMask(false);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GL11.glTranslatef(0.5F, 0.4F, 0.5F);
|
||||
float deg = (float) (transmutator.ticksExisted % 360F);
|
||||
GL11.glRotatef(deg, 0F, 1F, 0F);
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
Tessellator tess = Tessellator.instance;
|
||||
tess.startDrawingQuads();
|
||||
tess.addVertexWithUV(-0.5, 0, 0.5, 0, 1);
|
||||
tess.addVertexWithUV(0.5, 0, 0.5, 1, 1);
|
||||
tess.addVertexWithUV(0.5, 0, -0.5, 1, 0);
|
||||
tess.addVertexWithUV(-0.5, 0, -0.5, 0, 0);
|
||||
tess.draw();
|
||||
GL11.glDepthMask(true);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
@@ -1,111 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [5 May 2013, 18:23:31 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.client.render.tile;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.model.ModelChest;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
import vazkii.tinkerer.client.util.handler.ClientTickHandler;
|
||||
import vazkii.tinkerer.lib.LibMisc;
|
||||
import vazkii.tinkerer.lib.LibResources;
|
||||
import vazkii.tinkerer.tile.TileEntityWardChest;
|
||||
import vazkii.tinkerer.util.helper.MiscHelper;
|
||||
|
||||
public class RenderTileWardChest extends TileEntitySpecialRenderer {
|
||||
|
||||
ModelChest chestModel;
|
||||
|
||||
public RenderTileWardChest() {
|
||||
chestModel = new ModelChest();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileentity, double x, double y, double z, float f) {
|
||||
int meta = tileentity.worldObj == null ? 3 : tileentity.getBlockMetadata();
|
||||
int rotation = meta == 2 ? 180 : meta == 3 ? 0 : meta == 4 ? 90 : 270;
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GL11.glTranslatef((float)x, (float)y , (float)z);
|
||||
|
||||
bindTextureByName(LibResources.MODEL_WARD_CHEST);
|
||||
GL11.glTranslatef(0F, 1F, 1F);
|
||||
GL11.glScalef(1F, -1F, -1F);
|
||||
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
|
||||
GL11.glRotatef(rotation, 0F, 1F, 0F);
|
||||
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
|
||||
chestModel.chestBelow.render(LibMisc.MODEL_DEFAULT_RENDER_SCALE);
|
||||
chestModel.chestKnob.render(LibMisc.MODEL_DEFAULT_RENDER_SCALE);
|
||||
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glPopMatrix();
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
|
||||
GL11.glTranslatef((float) x, (float) y, (float) z);
|
||||
renderOverlay((TileEntityWardChest) tileentity);
|
||||
GL11.glTranslatef((float) -x, (float) -y, (float) -z);
|
||||
|
||||
bindTextureByName(LibResources.MODEL_WARD_CHEST);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||
GL11.glDepthMask(false);
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
GL11.glTranslatef((float)x, (float)y , (float)z);
|
||||
|
||||
bindTextureByName(LibResources.MODEL_WARD_CHEST);
|
||||
GL11.glTranslatef(0F, 1F, 1F);
|
||||
GL11.glScalef(1F, -1F, -1F);
|
||||
GL11.glTranslatef(0.5F, 0.5F, 0.5F);
|
||||
GL11.glRotatef(rotation, 0F, 1F, 0F);
|
||||
GL11.glTranslatef(-0.5F, -0.5F, -0.5F);
|
||||
chestModel.chestLid.render(LibMisc.MODEL_DEFAULT_RENDER_SCALE);
|
||||
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glDepthMask(true);
|
||||
GL11.glPopMatrix();
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
}
|
||||
|
||||
private void renderOverlay(TileEntityWardChest chest) {
|
||||
Minecraft mc = MiscHelper.getMc();
|
||||
mc.renderEngine.bindTexture(LibResources.MISC_WARD_CHEST_OVERLAY);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
|
||||
GL11.glTranslatef(0.5F, 0.65F, 0.5F);
|
||||
float deg = (float) ((chest.worldObj == null ? ClientTickHandler.clientTicksElapsed : chest.ticksExisted) % 360F);
|
||||
GL11.glRotatef(deg, 0F, 1F, 0F);
|
||||
GL11.glColor4f(1F, 1F, 1F, 1F);
|
||||
Tessellator tess = Tessellator.instance;
|
||||
tess.startDrawingQuads();
|
||||
tess.addVertexWithUV(-0.45, 0, 0.45, 0, 1);
|
||||
tess.addVertexWithUV(0.45, 0, 0.45, 1, 1);
|
||||
tess.addVertexWithUV(0.45, 0, -0.45, 1, 0);
|
||||
tess.addVertexWithUV(-0.45, 0, -0.45, 0, 0);
|
||||
tess.draw();
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
}
|
||||
@@ -1,72 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [26 Apr 2013, 23:40:32 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.client.util.handler;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.EnumSet;
|
||||
import java.util.LinkedHashSet;
|
||||
|
||||
import vazkii.tinkerer.client.hud.HUDStopwatch;
|
||||
import vazkii.tinkerer.client.hud.IHUDElement;
|
||||
import vazkii.tinkerer.lib.LibMisc;
|
||||
import cpw.mods.fml.common.ITickHandler;
|
||||
import cpw.mods.fml.common.TickType;
|
||||
|
||||
public class ClientTickHandler implements ITickHandler {
|
||||
|
||||
public static long clientTicksElapsed;
|
||||
|
||||
private Collection<IHUDElement> hudElements;
|
||||
|
||||
public ClientTickHandler() {
|
||||
hudElements = new LinkedHashSet();
|
||||
hudElements.add(new HUDStopwatch());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tickStart(EnumSet<TickType> type, Object... tickData) { }
|
||||
|
||||
@Override
|
||||
public void tickEnd(EnumSet<TickType> type, Object... tickData) {
|
||||
if(type.equals(EnumSet.of(TickType.CLIENT)))
|
||||
clientTick();
|
||||
else renderTick((Float) tickData[0]);
|
||||
}
|
||||
|
||||
public void clientTick() {
|
||||
for(IHUDElement element : hudElements)
|
||||
element.clientTick();
|
||||
|
||||
clientTicksElapsed++;
|
||||
}
|
||||
|
||||
public void renderTick(float partialTicks) {
|
||||
for(IHUDElement element : hudElements)
|
||||
if(element.shouldRender())
|
||||
element.render(partialTicks);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumSet<TickType> ticks() {
|
||||
return EnumSet.of(TickType.RENDER, TickType.CLIENT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getLabel() {
|
||||
return LibMisc.MOD_ID;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [24 Apr 2013, 22:58:41 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.client.util.helper;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.util.Icon;
|
||||
import vazkii.tinkerer.lib.LibMisc;
|
||||
import vazkii.tinkerer.lib.LibResources;
|
||||
|
||||
public final class IconHelper {
|
||||
|
||||
private static Icon emptyTexture;
|
||||
|
||||
public static Icon forName(IconRegister ir, String name) {
|
||||
return ir.registerIcon(LibMisc.MOD_ID + ":" + name);
|
||||
}
|
||||
|
||||
public static Icon forBlock(IconRegister ir, Block block) {
|
||||
return forName(ir, block.getUnlocalizedName().replaceAll("tile.", ""));
|
||||
}
|
||||
|
||||
public static Icon forBlock(IconRegister ir, Block block, int i) {
|
||||
return forName(ir, block.getUnlocalizedName().replaceAll("tile.", "") + i);
|
||||
}
|
||||
|
||||
public static Icon emptyTexture(IconRegister ir) {
|
||||
return emptyTexture == null ? (emptyTexture = forName(ir, LibResources.EMTPY_TEXTURE)) : emptyTexture;
|
||||
}
|
||||
|
||||
public static Icon forItem(IconRegister ir, Item item) {
|
||||
return forName(ir, item.getUnlocalizedName().replaceAll("item.", ""));
|
||||
}
|
||||
|
||||
public static Icon forItem(IconRegister ir, Item item, int i) {
|
||||
return forName(ir, item.getUnlocalizedName().replaceAll("item.", "") + i);
|
||||
}
|
||||
}
|
||||
@@ -1,90 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [24 Apr 2013, 21:02:22 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.core.proxy;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import thaumcraft.client.fx.FXLightningBolt;
|
||||
import vazkii.tinkerer.client.render.block.RenderWardChest;
|
||||
import vazkii.tinkerer.client.render.entity.RenderDeathRune;
|
||||
import vazkii.tinkerer.client.render.tile.RenderTileAnimationTablet;
|
||||
import vazkii.tinkerer.client.render.tile.RenderTileTransmutator;
|
||||
import vazkii.tinkerer.client.render.tile.RenderTileWardChest;
|
||||
import vazkii.tinkerer.client.util.handler.ClientTickHandler;
|
||||
import vazkii.tinkerer.entity.EntityDeathRune;
|
||||
import vazkii.tinkerer.lib.LibRenderIDs;
|
||||
import vazkii.tinkerer.network.PacketManager;
|
||||
import vazkii.tinkerer.network.packet.PacketAnimationTabletSync;
|
||||
import vazkii.tinkerer.network.packet.PacketTransmutatorSync;
|
||||
import vazkii.tinkerer.network.packet.PacketVerification;
|
||||
import vazkii.tinkerer.tile.TileEntityAnimationTablet;
|
||||
import vazkii.tinkerer.tile.TileEntityTransmutator;
|
||||
import vazkii.tinkerer.tile.TileEntityWardChest;
|
||||
import cpw.mods.fml.client.registry.ClientRegistry;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import cpw.mods.fml.common.registry.TickRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
|
||||
public class TTClientProxy extends TTCommonProxy {
|
||||
|
||||
@Override
|
||||
public void initTickHandlers() {
|
||||
super.initTickHandlers();
|
||||
|
||||
TickRegistry.registerTickHandler(new ClientTickHandler(), Side.CLIENT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initTileEntities() {
|
||||
super.initTileEntities();
|
||||
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityTransmutator.class, new RenderTileTransmutator());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityWardChest.class, new RenderTileWardChest());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityAnimationTablet.class, new RenderTileAnimationTablet());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initEntities() {
|
||||
super.initEntities();
|
||||
|
||||
RenderingRegistry.registerEntityRenderingHandler(EntityDeathRune.class, new RenderDeathRune());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initPackets() {
|
||||
super.initPackets();
|
||||
|
||||
PacketManager.packetHandlers.add(new PacketVerification());
|
||||
PacketManager.packetHandlers.add(new PacketTransmutatorSync());
|
||||
PacketManager.packetHandlers.add(new PacketAnimationTabletSync());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initRenders() {
|
||||
LibRenderIDs.idWardChest = RenderingRegistry.getNextAvailableRenderId();
|
||||
|
||||
RenderingRegistry.registerBlockHandler(new RenderWardChest());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sigilLightning(World world, Entity entity, Vec3 end) {
|
||||
FXLightningBolt lightning = new FXLightningBolt(world, entity.posX + entity.width / 2, entity.posY - entity.height / 2, entity.posZ + entity.width / 2, end.xCoord, end.yCoord, end.zCoord, world.rand.nextLong(), 10, 2F, 5);
|
||||
lightning.defaultFractal();
|
||||
lightning.setType(5);
|
||||
lightning.finalizeBolt();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,58 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [24 Apr 2013, 21:02:12 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.core.proxy;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.tinkerer.ThaumicTinkerer;
|
||||
import vazkii.tinkerer.entity.EntityDeathRune;
|
||||
import vazkii.tinkerer.lib.LibBlockNames;
|
||||
import vazkii.tinkerer.lib.LibItemNames;
|
||||
import vazkii.tinkerer.lib.LibMisc;
|
||||
import vazkii.tinkerer.network.PacketManager;
|
||||
import vazkii.tinkerer.network.packet.PacketAnimationTabletButton;
|
||||
import vazkii.tinkerer.tile.TileEntityAnimationTablet;
|
||||
import vazkii.tinkerer.tile.TileEntityTransmutator;
|
||||
import vazkii.tinkerer.tile.TileEntityWardChest;
|
||||
import cpw.mods.fml.common.registry.EntityRegistry;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
public class TTCommonProxy {
|
||||
|
||||
public void initTickHandlers() { }
|
||||
|
||||
public void initTileEntities() {
|
||||
GameRegistry.registerTileEntity(TileEntityTransmutator.class, tileName(LibBlockNames.TRANSMUTATOR));
|
||||
GameRegistry.registerTileEntity(TileEntityWardChest.class, tileName(LibBlockNames.WARD_CHEST));
|
||||
GameRegistry.registerTileEntity(TileEntityAnimationTablet.class, tileName(LibBlockNames.ANIMATION_TABLET));
|
||||
}
|
||||
|
||||
public void initRenders() { }
|
||||
|
||||
public void initEntities() {
|
||||
EntityRegistry.registerModEntity(EntityDeathRune.class, LibMisc.MOD_ID + "_" + LibItemNames.DEATH_RUNE, 0, ThaumicTinkerer.modInstance, 64, 10, false);
|
||||
}
|
||||
|
||||
public void initPackets() {
|
||||
PacketManager.packetHandlers.add(new PacketAnimationTabletButton());
|
||||
}
|
||||
|
||||
private static String tileName(String name) {
|
||||
return LibMisc.MOD_ID + "_" + name;
|
||||
}
|
||||
|
||||
public void sigilLightning(World world, Entity entity, Vec3 end) { }
|
||||
}
|
||||
@@ -1,237 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [11 May 2013, 22:43:15 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.entity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.tinkerer.ThaumicTinkerer;
|
||||
import vazkii.tinkerer.lib.LibItemNames;
|
||||
|
||||
public class EntityDeathRune extends Entity implements IInventory {
|
||||
|
||||
private static final String TAG_SLOTS_SIZE = "slots";
|
||||
private static final String TAG_PLAYER_NAME = "playerName";
|
||||
|
||||
ItemStack[] inventorySlots;
|
||||
String username;
|
||||
|
||||
public EntityDeathRune(World par1World) {
|
||||
super(par1World);
|
||||
width = 0.1F;
|
||||
height = 0.1F;
|
||||
}
|
||||
|
||||
public EntityDeathRune(EntityPlayer player) {
|
||||
super(player.worldObj);
|
||||
width = 0.1F;
|
||||
height = 0.1F;
|
||||
int size = player.inventory.getSizeInventory();
|
||||
username = player.username;
|
||||
inventorySlots = new ItemStack[size + size % 9];
|
||||
|
||||
for(int i = 0; i < player.inventory.getSizeInventory(); i++) {
|
||||
ItemStack stackAt = player.inventory.getStackInSlot(i);
|
||||
if(stackAt != null) {
|
||||
inventorySlots[i] = stackAt.copy();
|
||||
player.inventory.setInventorySlotContents(i, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void entityInit() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
super.onUpdate();
|
||||
posY = prevPosY;
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
List<EntityPlayer> nearbyPlayers = worldObj.getEntitiesWithinAABB(EntityPlayer.class, AxisAlignedBB.getBoundingBox(posX - 2, posY - 2, posZ - 2, posX + 2, posY + 2, posZ + 2));
|
||||
for(EntityPlayer player : nearbyPlayers) {
|
||||
if(player.username.equals(username) && player.isEntityAlive())
|
||||
restockPlayer(player);
|
||||
}
|
||||
}
|
||||
|
||||
double x = posX + (Math.random() - 0.5);
|
||||
double y = posY + (Math.random() - 0.5);
|
||||
double z = posZ + (Math.random() - 0.5);
|
||||
Vec3 vector = worldObj.getWorldVec3Pool().getVecFromPool(x, y, z);
|
||||
|
||||
ThaumicTinkerer.proxy.sigilLightning(worldObj, this, vector);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean attackEntityFrom(DamageSource par1DamageSource, int par2) {
|
||||
return false;
|
||||
}
|
||||
|
||||
private void restockPlayer(EntityPlayer player) {
|
||||
boolean hasSomething = false;
|
||||
|
||||
for(int i = 0; i < Math.min(inventorySlots.length, player.inventory.getSizeInventory()); i++) {
|
||||
ItemStack playerStack = player.inventory.getStackInSlot(i);
|
||||
ItemStack invStack = getStackInSlot(i);
|
||||
if(invStack != null) {
|
||||
ItemStack restockStack = invStack.copy();
|
||||
hasSomething = true;
|
||||
boolean remove = false;
|
||||
if(playerStack == null) {
|
||||
player.inventory.setInventorySlotContents(i, restockStack);
|
||||
remove = true;
|
||||
} else if(player.inventory.addItemStackToInventory(restockStack))
|
||||
remove = true;
|
||||
|
||||
if(remove)
|
||||
setInventorySlotContents(i, null);
|
||||
}
|
||||
}
|
||||
|
||||
if(!hasSomething)
|
||||
setDead();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDead() {
|
||||
super.setDead();
|
||||
worldObj.playSoundAtEntity(this, "thaumcraft.key", 1F, 1F);
|
||||
ThaumicTinkerer.tcProxy.burst(worldObj, posX, posY, posZ, 0.5F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound) {
|
||||
inventorySlots = new ItemStack[par1NBTTagCompound.getInteger(TAG_SLOTS_SIZE)];
|
||||
username = par1NBTTagCompound.getString(TAG_PLAYER_NAME);
|
||||
|
||||
NBTTagList var2 = par1NBTTagCompound.getTagList("Items");
|
||||
inventorySlots = new ItemStack[getSizeInventory()];
|
||||
for (int var3 = 0; var3 < var2.tagCount(); ++var3) {
|
||||
NBTTagCompound var4 = (NBTTagCompound)var2.tagAt(var3);
|
||||
byte var5 = var4.getByte("Slot");
|
||||
if (var5 >= 0 && var5 < inventorySlots.length)
|
||||
inventorySlots[var5] = ItemStack.loadItemStackFromNBT(var4);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound) {
|
||||
par1NBTTagCompound.setInteger(TAG_SLOTS_SIZE, inventorySlots.length);
|
||||
par1NBTTagCompound.setString(TAG_PLAYER_NAME, username);
|
||||
|
||||
NBTTagList var2 = new NBTTagList();
|
||||
for (int var3 = 0; var3 < inventorySlots.length; ++var3) {
|
||||
if (inventorySlots[var3] != null) {
|
||||
NBTTagCompound var4 = new NBTTagCompound();
|
||||
var4.setByte("Slot", (byte)var3);
|
||||
inventorySlots[var3].writeToNBT(var4);
|
||||
var2.appendTag(var4);
|
||||
}
|
||||
}
|
||||
par1NBTTagCompound.setTag("Items", var2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSizeInventory() {
|
||||
return inventorySlots.length;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlot(int i) {
|
||||
if(i >= inventorySlots.length)
|
||||
return null;
|
||||
return inventorySlots[i];
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack decrStackSize(int par1, int par2) {
|
||||
if (inventorySlots[par1] != null) {
|
||||
ItemStack stackAt;
|
||||
|
||||
if (inventorySlots[par1].stackSize <= par2) {
|
||||
stackAt = inventorySlots[par1];
|
||||
inventorySlots[par1] = null;
|
||||
return stackAt;
|
||||
} else {
|
||||
stackAt = inventorySlots[par1].splitStack(par2);
|
||||
|
||||
if (inventorySlots[par1].stackSize == 0)
|
||||
inventorySlots[par1] = null;
|
||||
|
||||
return stackAt;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlotOnClosing(int i) {
|
||||
return getStackInSlot(i);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInventorySlotContents(int i, ItemStack itemstack) {
|
||||
inventorySlots[i] = itemstack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInvName() {
|
||||
return LibItemNames.DEATH_RUNE_D;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isInvNameLocalized() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInventoryStackLimit() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUseableByPlayer(EntityPlayer entityplayer) {
|
||||
return entityplayer.getDistanceSq(posX + 0.5D, posY + 0.5D, posZ + 0.5D) <= 64;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openChest() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void closeChest() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onInventoryChanged() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isStackValidForSlot(int i, ItemStack itemstack) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1,71 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [13 May 2013, 19:50:33 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.inventory.container;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import vazkii.tinkerer.tile.TileEntityAnimationTablet;
|
||||
|
||||
public class ContainerAnimationTablet extends ContainerPlayerInv {
|
||||
|
||||
public TileEntityAnimationTablet tablet;
|
||||
|
||||
public ContainerAnimationTablet(TileEntityAnimationTablet tablet, InventoryPlayer playerInv) {
|
||||
super(playerInv);
|
||||
|
||||
this.tablet = tablet;
|
||||
|
||||
addSlotToContainer(new Slot(tablet, 0, 80, 15));
|
||||
|
||||
initPlayerInv();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer entityplayer) {
|
||||
return tablet.isUseableByPlayer(entityplayer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int par2) {
|
||||
ItemStack var3 = null;
|
||||
Slot var4 = (Slot)inventorySlots.get(par2);
|
||||
|
||||
if (var4 != null && var4.getHasStack()) {
|
||||
ItemStack var5 = var4.getStack();
|
||||
|
||||
var3 = var5.copy();
|
||||
|
||||
if (par2 < 1) {
|
||||
if(!mergeItemStack(var5, 1, 37, false))
|
||||
return null;
|
||||
} else if(!mergeItemStack(var5, 0, 1, false))
|
||||
return null;
|
||||
|
||||
if (var5.stackSize == 0)
|
||||
var4.putStack((ItemStack)null);
|
||||
else
|
||||
var4.onSlotChanged();
|
||||
|
||||
if (var5.stackSize == var3.stackSize)
|
||||
return null;
|
||||
|
||||
var4.onPickupFromSlot(par1EntityPlayer, var5);
|
||||
}
|
||||
|
||||
return var3;
|
||||
}
|
||||
}
|
||||
@@ -1,73 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [28 Apr 2013, 17:57:28 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.inventory.container;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.InventoryPlayer;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import vazkii.tinkerer.inventory.slot.SlotTransmutator;
|
||||
import vazkii.tinkerer.inventory.slot.SlotTransmutatorOutput;
|
||||
import vazkii.tinkerer.tile.TileEntityTransmutator;
|
||||
|
||||
public class ContainerTransmutator extends ContainerPlayerInv {
|
||||
|
||||
TileEntityTransmutator transmutator;
|
||||
|
||||
public ContainerTransmutator(TileEntityTransmutator transmutator, InventoryPlayer playerInv) {
|
||||
super(playerInv);
|
||||
|
||||
this.transmutator = transmutator;
|
||||
|
||||
addSlotToContainer(new SlotTransmutator(transmutator, 0, 146, 11));
|
||||
addSlotToContainer(new SlotTransmutatorOutput(transmutator, 1, 146, 49));
|
||||
|
||||
initPlayerInv();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInteractWith(EntityPlayer entityplayer) {
|
||||
return transmutator.isUseableByPlayer(entityplayer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int par2) {
|
||||
ItemStack var3 = null;
|
||||
Slot var4 = (Slot)inventorySlots.get(par2);
|
||||
|
||||
if (var4 != null && var4.getHasStack()) {
|
||||
ItemStack var5 = var4.getStack();
|
||||
|
||||
var3 = var5.copy();
|
||||
|
||||
if (par2 < 2) {
|
||||
if(!mergeItemStack(var5, 2, 38, false))
|
||||
return null;
|
||||
}
|
||||
|
||||
if (var5.stackSize == 0)
|
||||
var4.putStack((ItemStack)null);
|
||||
else
|
||||
var4.onSlotChanged();
|
||||
|
||||
if (var5.stackSize == var3.stackSize)
|
||||
return null;
|
||||
|
||||
var4.onPickupFromSlot(par1EntityPlayer, var5);
|
||||
}
|
||||
|
||||
return var3;
|
||||
}
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [28 Apr 2013, 19:56:00 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.inventory.slot;
|
||||
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class SlotPureOutput extends Slot {
|
||||
|
||||
public SlotPureOutput(IInventory par1iInventory, int par2, int par3, int par4) {
|
||||
super(par1iInventory, par2, par3, par4);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemValid(ItemStack par1ItemStack) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [28 Apr 2013, 18:04:41 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.inventory.slot;
|
||||
|
||||
import net.minecraft.inventory.Slot;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import thaumcraft.api.EnumTag;
|
||||
import thaumcraft.api.ObjectTags;
|
||||
import thaumcraft.common.lib.ThaumcraftCraftingManager;
|
||||
import vazkii.tinkerer.tile.TileEntityTransmutator;
|
||||
|
||||
public class SlotTransmutator extends Slot {
|
||||
|
||||
public SlotTransmutator(TileEntityTransmutator transmutator, int par2, int par3, int par4) {
|
||||
super(transmutator, par2, par3, par4);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isItemValid(ItemStack par1ItemStack) {
|
||||
ObjectTags tags = ThaumcraftCraftingManager.getObjectTags(par1ItemStack);
|
||||
|
||||
return tags != null && getTotalAspectValue(tags) <= 100;
|
||||
}
|
||||
|
||||
public static int getTotalAspectValue(ObjectTags tags) {
|
||||
int totalValue = 0;
|
||||
for(EnumTag tag : tags.getAspects())
|
||||
totalValue += tags.getAmount(tag);
|
||||
return totalValue;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSlotStackLimit() {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [30 Apr 2013, 22:11:57 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.inventory.slot;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import thaumcraft.api.EnumTag;
|
||||
import thaumcraft.api.IAspectSource;
|
||||
import thaumcraft.api.ObjectTags;
|
||||
import thaumcraft.common.aura.AuraManager;
|
||||
import thaumcraft.common.lib.ThaumcraftCraftingManager;
|
||||
import vazkii.tinkerer.tile.TileEntityTransmutator;
|
||||
|
||||
public class SlotTransmutatorOutput extends SlotPureOutput {
|
||||
|
||||
TileEntityTransmutator transmutator;
|
||||
|
||||
public SlotTransmutatorOutput(TileEntityTransmutator transmutator, int par2, int par3, int par4) {
|
||||
super(transmutator, par2, par3, par4);
|
||||
this.transmutator = transmutator;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPickupFromSlot(EntityPlayer par1EntityPlayer, ItemStack par2ItemStack) {
|
||||
ObjectTags tags = ThaumcraftCraftingManager.getObjectTags(transmutator.getStackInSlot(0));
|
||||
int value = SlotTransmutator.getTotalAspectValue(tags);
|
||||
int cost = value == 1 ? 0 : value / 2;
|
||||
|
||||
AuraManager.decreaseClosestAura(transmutator.worldObj, transmutator.xCoord, transmutator.yCoord, transmutator.zCoord, cost);
|
||||
|
||||
for(EnumTag tag : tags.getAspects()) {
|
||||
IAspectSource source = transmutator.foundTags.getSource(tag);
|
||||
if(source != null)
|
||||
source.takeFromSource(tag, tags.getAmount(tag) * 4);
|
||||
}
|
||||
|
||||
par1EntityPlayer.worldObj.playSoundAtEntity(par1EntityPlayer, "thaumcraft.wand", 0.3F, 1F);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [7 May 2013, 17:18:29 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.item;
|
||||
|
||||
import net.minecraft.item.ItemMultiTextureTile;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import vazkii.tinkerer.block.ModBlocks;
|
||||
import vazkii.tinkerer.lib.LibBlockNames;
|
||||
|
||||
public class ItemDarkQuartzBlock extends ItemMultiTextureTile {
|
||||
|
||||
public ItemDarkQuartzBlock(int par1) {
|
||||
super(par1, ModBlocks.darkQuartz, new String[] { "" } );
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getItemDisplayName(ItemStack par1ItemStack) {
|
||||
return par1ItemStack.getItemDamage() >= 3 ? "" : LibBlockNames.DARK_QUARTZ_BLOCK_NAMES[par1ItemStack.getItemDamage()];
|
||||
}
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [7 May 2013, 17:19:52 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.item;
|
||||
|
||||
import net.minecraft.block.BlockHalfSlab;
|
||||
import net.minecraft.item.ItemSlab;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import vazkii.tinkerer.block.ModBlocks;
|
||||
import vazkii.tinkerer.lib.LibBlockNames;
|
||||
|
||||
public class ItemDarkQuartzSlab extends ItemSlab {
|
||||
|
||||
public ItemDarkQuartzSlab(int par1) {
|
||||
super(par1, (BlockHalfSlab) ModBlocks.darkQuartzSlab, (BlockHalfSlab) ModBlocks.darkQuartzSlabFull, par1 == ModBlocks.darkQuartzSlabFull.blockID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getItemDisplayName(ItemStack par1ItemStack) {
|
||||
return LibBlockNames.DARK_QUARTZ_SLAB_D;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [11 May 2013, 21:00:24 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.item;
|
||||
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import vazkii.tinkerer.util.handler.PlayerDeathHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemDeathRune extends ItemMod {
|
||||
|
||||
public ItemDeathRune(int par1) {
|
||||
super(par1);
|
||||
setMaxStackSize(1);
|
||||
|
||||
MinecraftForge.EVENT_BUS.register(new PlayerDeathHandler());
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public EnumRarity getRarity(ItemStack par1ItemStack) {
|
||||
return EnumRarity.rare;
|
||||
}
|
||||
}
|
||||
@@ -1,105 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [17 May 2013, 19:54:06 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.item;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumAction;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.ItemTool;
|
||||
import net.minecraft.world.World;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
import vazkii.tinkerer.client.util.helper.IconHelper;
|
||||
import vazkii.tinkerer.lib.LibFeatures;
|
||||
import vazkii.tinkerer.util.helper.ModCreativeTab;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemDefaultEnchant extends ItemTool implements INoRemoveEnchant {
|
||||
|
||||
Enchantment enchant;
|
||||
int enchantLevel;
|
||||
|
||||
protected ItemDefaultEnchant(int par1, Enchantment enchant, int enchantLevel) {
|
||||
super(par1, ThaumcraftApi.toolMatThaumium.getDamageVsEntity() + 4, ThaumcraftApi.toolMatThaumium, new Block[0]);
|
||||
setMaxDamage(LibFeatures.ENCHANT_ITEM_MAX_DMG);
|
||||
setNoRepair();
|
||||
setCreativeTab(ModCreativeTab.INSTANCE);
|
||||
this.enchant = enchant;
|
||||
this.enchantLevel = enchantLevel;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IconRegister par1IconRegister) {
|
||||
itemIcon = IconHelper.forItem(par1IconRegister, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(int par1, CreativeTabs par2CreativeTabs, List par3List) {
|
||||
ItemStack stack = new ItemStack(par1, 1, 0);
|
||||
stack.addEnchantment(enchant, enchantLevel);
|
||||
par3List.add(stack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hitEntity(ItemStack par1ItemStack, EntityLiving par2EntityLiving, EntityLiving par3EntityLiving) {
|
||||
par1ItemStack.damageItem(1, par3EntityLiving);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumAction getItemUseAction(ItemStack par1ItemStack) {
|
||||
return EnumAction.block;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxItemUseDuration(ItemStack par1ItemStack) {
|
||||
return 72000;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
|
||||
par3EntityPlayer.setItemInUse(par1ItemStack, getMaxItemUseDuration(par1ItemStack));
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canHarvestBlock(Block par1Block) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getStrVsBlock(ItemStack stack, Block block, int meta) {
|
||||
return 1.2F;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreated(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
|
||||
par1ItemStack.addEnchantment(enchant, enchantLevel);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1,114 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [2 May 2013, 11:50:56 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.item;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.FurnaceRecipes;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.world.World;
|
||||
import thaumcraft.common.Config;
|
||||
import thaumcraft.common.aura.AuraManager;
|
||||
import vazkii.tinkerer.ThaumicTinkerer;
|
||||
import vazkii.tinkerer.client.util.helper.IconHelper;
|
||||
import vazkii.tinkerer.lib.LibFeatures;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemFireBracelet extends ItemMod {
|
||||
|
||||
Icon disabledIcon;
|
||||
|
||||
public ItemFireBracelet(int par1) {
|
||||
super(par1);
|
||||
setMaxStackSize(1);
|
||||
setMaxDamage(LibFeatures.FIRE_BRACELET_CHARGES + 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10) {
|
||||
int id = par3World.getBlockId(par4, par5, par6);
|
||||
int meta = par3World.getBlockMetadata(par4, par5, par6);
|
||||
|
||||
boolean did = false;
|
||||
|
||||
if(par1ItemStack.getItemDamage() != LibFeatures.FIRE_BRACELET_CHARGES) {
|
||||
ItemStack stack = new ItemStack(id, 1, meta);
|
||||
ItemStack result = FurnaceRecipes.smelting().getSmeltingResult(stack);
|
||||
|
||||
if(result != null && result.getItem() instanceof ItemBlock) {
|
||||
par3World.setBlock(par4, par5, par6, result.itemID, result.getItemDamage(), 1 | 2);
|
||||
par1ItemStack.damageItem(1, par2EntityPlayer);
|
||||
par3World.playSoundAtEntity(par2EntityPlayer, "fire.ignite", 0.6F, 1F);
|
||||
par3World.playSoundAtEntity(par2EntityPlayer, "fire.fire", 1F, 1F);
|
||||
if(par3World.isRemote)
|
||||
par2EntityPlayer.swingItem();
|
||||
for(int i = 0; i < 25; i++) {
|
||||
double x = par4 + Math.random();
|
||||
double y = par5 + Math.random();
|
||||
double z = par6 + Math.random();
|
||||
|
||||
ThaumicTinkerer.tcProxy.wispFX2(par3World, x, y, z, (float) Math.random() / 2F, 4, true, (float) -Math.random() / 10F);
|
||||
}
|
||||
|
||||
if(par1ItemStack.getItemDamage() == LibFeatures.FIRE_BRACELET_CHARGES)
|
||||
par3World.playSoundAtEntity(par2EntityPlayer, "thaumcraft.brain", 1F, 1F);
|
||||
|
||||
did = true;
|
||||
return did;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onItemUseFirst(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ) {
|
||||
int id = world.getBlockId(x, y, z);
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
|
||||
if(stack.getItemDamage() == LibFeatures.FIRE_BRACELET_CHARGES && id == Config.blockWoodenDevice.blockID && meta == 0 && AuraManager.decreaseClosestAura(world, x, y, z, LibFeatures.FIRE_BRACELET_RECHARGE_VIS)) {
|
||||
world.playSoundAtEntity(player, "fire.ignite", 0.6F, 1F);
|
||||
world.playSoundAtEntity(player, "fire.fire", 1F, 1F);
|
||||
if(world.isRemote)
|
||||
player.swingItem();
|
||||
stack.setItemDamage(0);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IconRegister par1IconRegister) {
|
||||
itemIcon = IconHelper.forItem(par1IconRegister, this, 1);
|
||||
disabledIcon = IconHelper.forItem(par1IconRegister, this, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Icon getIconFromDamage(int par1) {
|
||||
return par1 == LibFeatures.FIRE_BRACELET_CHARGES ? disabledIcon : itemIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public EnumRarity getRarity(ItemStack par1ItemStack) {
|
||||
return EnumRarity.uncommon;
|
||||
}
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [25 Apr 2013, 11:40:30 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.item;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.tinkerer.block.ModBlocks;
|
||||
|
||||
public class ItemGlowstoneGas extends ItemMod {
|
||||
|
||||
public ItemGlowstoneGas(int par1) {
|
||||
super(par1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
|
||||
int x = (int) par3EntityPlayer.posX;
|
||||
int y = (int) par3EntityPlayer.posY + 1;
|
||||
int z = (int) par3EntityPlayer.posZ;
|
||||
boolean air = par2World.isAirBlock(x, y, z);
|
||||
|
||||
if (!par3EntityPlayer.capabilities.isCreativeMode)
|
||||
par1ItemStack.stackSize--;
|
||||
|
||||
par2World.playSoundAtEntity(par3EntityPlayer, "random.pop", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F));
|
||||
|
||||
if(air) {
|
||||
if(!par2World.isRemote)
|
||||
par2World.setBlock(x, y, z, ModBlocks.glowstoneGas.blockID, 4, 2);
|
||||
else par3EntityPlayer.swingItem();
|
||||
par2World.scheduleBlockUpdate(x, y, z, ModBlocks.glowstoneGas.blockID, 10);
|
||||
}
|
||||
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [25 Apr 2013, 11:37:18 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.item;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.item.Item;
|
||||
import vazkii.tinkerer.client.util.helper.IconHelper;
|
||||
import vazkii.tinkerer.util.helper.ModCreativeTab;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemMod extends Item {
|
||||
|
||||
public ItemMod(int par1) {
|
||||
super(par1);
|
||||
setCreativeTab(ModCreativeTab.INSTANCE);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IconRegister par1IconRegister) {
|
||||
itemIcon = IconHelper.forItem(par1IconRegister, this);
|
||||
}
|
||||
}
|
||||
@@ -1,63 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [27 Apr 2013, 18:23:29 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.item;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import thaumcraft.common.entities.golems.EntityGolemBase;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemNametag extends ItemMod {
|
||||
|
||||
public ItemNametag(int par1) {
|
||||
super(par1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onLeftClickEntity(ItemStack stack, EntityPlayer player, Entity entity) {
|
||||
if(entity instanceof EntityGolemBase) {
|
||||
EntityGolemBase golem = (EntityGolemBase) entity;
|
||||
if(!stack.hasDisplayName()) {
|
||||
if(player.worldObj.isRemote)
|
||||
player.addChatMessage("This name tag is blank. You need to name it using an anvil.");
|
||||
return true;
|
||||
}
|
||||
|
||||
if(golem.getOwnerName().equals(player.username)) {
|
||||
golem.func_94058_c(stack.getDisplayName());
|
||||
golem.playLivingSound();
|
||||
if(player.worldObj.isRemote)
|
||||
player.swingItem();
|
||||
} else if(player.worldObj.isRemote)
|
||||
player.addChatMessage("That golem isn't yours.");
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
if(!par1ItemStack.hasDisplayName())
|
||||
par3List.add("Blank");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,74 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [25 Apr 2013, 14:28:21 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.item;
|
||||
|
||||
import java.awt.Color;
|
||||
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.CraftingManager;
|
||||
import vazkii.tinkerer.lib.LibFeatures;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemSpellCloth extends ItemMod {
|
||||
|
||||
public ItemSpellCloth(int par1) {
|
||||
super(par1);
|
||||
setMaxDamage(LibFeatures.SPELL_CLOTH_USES);
|
||||
setMaxStackSize(1);
|
||||
|
||||
CraftingManager.getInstance().getRecipeList().add(new SpellClothRecipe(this));
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getColorFromItemStack(ItemStack par1ItemStack, int par2) {
|
||||
return Color.HSBtoRGB(0.75F, ((float) par1ItemStack.getMaxDamage() - (float) par1ItemStack.getItemDamage()) / par1ItemStack.getMaxDamage() * 0.5F, 1F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasContainerItem() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getContainerItemStack(ItemStack itemStack) {
|
||||
ItemStack copyStack = itemStack.copy();
|
||||
copyStack.setItemDamage(copyStack.getItemDamage() + 1);
|
||||
if(copyStack.getItemDamage() >= copyStack.getMaxDamage())
|
||||
return null;
|
||||
|
||||
return copyStack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean doesContainerItemLeaveCraftingGrid(ItemStack par1ItemStack) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean hasEffect(ItemStack par1ItemStack) {
|
||||
return par1ItemStack.getItemDamage() == 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public EnumRarity getRarity(ItemStack par1ItemStack) {
|
||||
return EnumRarity.uncommon;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,174 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [25 Apr 2013, 21:54:08 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.item;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.FakePlayer;
|
||||
import thaumcraft.common.aura.AuraManager;
|
||||
import vazkii.tinkerer.ThaumicTinkerer;
|
||||
import vazkii.tinkerer.lib.LibFeatures;
|
||||
import vazkii.tinkerer.potion.ModPotions;
|
||||
import vazkii.tinkerer.util.helper.ItemNBTHelper;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemStopwatch extends ItemMod {
|
||||
|
||||
public static final String TAG_USERNAME = "username";
|
||||
public static final String TAG_X = "x";
|
||||
public static final String TAG_Y = "y";
|
||||
public static final String TAG_Z = "z";
|
||||
public static final String TAG_PITCH = "pitch";
|
||||
public static final String TAG_YAW = "yaw";
|
||||
public static final String TAG_MOTION_X = "motionX";
|
||||
public static final String TAG_MOTION_Y = "motionY";
|
||||
public static final String TAG_MOTION_Z = "motionZ";
|
||||
public static final String TAG_DIMENSION = "dim";
|
||||
public static final String TAG_HP = "hp";
|
||||
public static final String TAG_FOOD = "food";
|
||||
public static final String TAG_SATURATION = "saturation";
|
||||
|
||||
public ItemStopwatch(int par1) {
|
||||
super(par1);
|
||||
setMaxStackSize(1);
|
||||
setMaxDamage(11);
|
||||
setNoRepair();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5) {
|
||||
if(!par2World.isRemote && par1ItemStack.getItemDamage() >= 1 && decreaseAura(par3Entity))
|
||||
par1ItemStack.setItemDamage(par1ItemStack.getItemDamage() - 1);
|
||||
|
||||
if(par3Entity instanceof EntityPlayer && validate(par1ItemStack, (EntityPlayer) par3Entity)) {
|
||||
EntityPlayer player = (EntityPlayer) par3Entity;
|
||||
PotionEffect effect = player.getActivePotionEffect(ModPotions.effectStopwatch);
|
||||
if(effect.duration % 20 == 0)
|
||||
par2World.playSoundAtEntity(par3Entity, "random.click", 0.5F, 1F);
|
||||
|
||||
if(effect.duration == 1) {
|
||||
moveParticlesAndSound(par3Entity);
|
||||
|
||||
if(par3Entity instanceof EntityPlayerMP && !par2World.isRemote) {
|
||||
regressStatus(par1ItemStack, (EntityPlayerMP) par3Entity);
|
||||
wipeData(par1ItemStack, par3Entity);
|
||||
}
|
||||
|
||||
moveParticlesAndSound(par3Entity);
|
||||
}
|
||||
} else wipeData(par1ItemStack, par3Entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
|
||||
if(!validate(par1ItemStack, par3EntityPlayer) && !(par3EntityPlayer instanceof FakePlayer)) {
|
||||
int charge = par1ItemStack.getMaxDamage() - par1ItemStack.getItemDamage();
|
||||
if(charge >= 10) {
|
||||
populateNBT(par1ItemStack, par3EntityPlayer);
|
||||
PotionEffect effect = new PotionEffect(ModPotions.effectStopwatch.id, LibFeatures.STOPWATCH_TIME, 0);
|
||||
effect.getCurativeItems().clear();
|
||||
par3EntityPlayer.addPotionEffect(effect);
|
||||
par2World.playSoundAtEntity(par3EntityPlayer, "thaumcraft.wand", 1F, 1F);
|
||||
par1ItemStack.damageItem(10, par3EntityPlayer);
|
||||
} else if(!par2World.isRemote)
|
||||
par3EntityPlayer.addChatMessage("The Stopwatch does not have enough charge to do that.");
|
||||
} else if(!par2World.isRemote)
|
||||
par3EntityPlayer.addChatMessage("You can not Twist Time while a Time Twister effect lingers.");
|
||||
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public EnumRarity getRarity(ItemStack par1ItemStack) {
|
||||
return EnumRarity.uncommon;
|
||||
}
|
||||
|
||||
private static void moveParticlesAndSound(Entity entity) {
|
||||
for(int i = 0; i < 15; i++) {
|
||||
float x = (float) (entity.posX + Math.random());
|
||||
float y = (float) (entity.posY + 1.2 + Math.random());
|
||||
float z = (float) (entity.posZ + Math.random());
|
||||
ThaumicTinkerer.tcProxy.wispFX(entity.worldObj, x, y, z, (float) Math.random(), 1F, 1F, 0F);
|
||||
}
|
||||
entity.worldObj.playSoundAtEntity(entity, "thaumcraft.wand", 1F, 1F);
|
||||
}
|
||||
|
||||
private static boolean decreaseAura(Entity player) {
|
||||
return AuraManager.decreaseClosestAura(player.worldObj, player.posX, player.posY, player.posZ, LibFeatures.STOPWATCH_VIS / 10);
|
||||
}
|
||||
|
||||
private static void populateNBT(ItemStack stack, EntityPlayer player) {
|
||||
ItemNBTHelper.setString(stack, TAG_USERNAME, player.username);
|
||||
ItemNBTHelper.setDouble(stack, TAG_X, player.posX);
|
||||
ItemNBTHelper.setDouble(stack, TAG_Y, player.posY);
|
||||
ItemNBTHelper.setDouble(stack, TAG_Z, player.posZ);
|
||||
ItemNBTHelper.setFloat(stack, TAG_PITCH, player.rotationPitch);
|
||||
ItemNBTHelper.setFloat(stack, TAG_YAW, player.rotationYaw);
|
||||
ItemNBTHelper.setDouble(stack, TAG_MOTION_X, player.motionX);
|
||||
ItemNBTHelper.setDouble(stack, TAG_MOTION_Y, player.motionY);
|
||||
ItemNBTHelper.setDouble(stack, TAG_MOTION_Z, player.motionZ);
|
||||
ItemNBTHelper.setInt(stack, TAG_DIMENSION, player.dimension);
|
||||
ItemNBTHelper.setInt(stack, TAG_HP, player.getHealth());
|
||||
ItemNBTHelper.setInt(stack, TAG_FOOD, player.getFoodStats().getFoodLevel());
|
||||
ItemNBTHelper.setFloat(stack, TAG_SATURATION, player.getFoodStats().getSaturationLevel());
|
||||
}
|
||||
|
||||
private static boolean validate(ItemStack stack, EntityPlayer player) {
|
||||
if(!stack.hasTagCompound() || !player.isPotionActive(ModPotions.effectStopwatch.id))
|
||||
return false;
|
||||
|
||||
String username = ItemNBTHelper.getString(stack, TAG_USERNAME, "");
|
||||
int dim = ItemNBTHelper.getInt(stack, TAG_DIMENSION, Integer.MIN_VALUE);
|
||||
|
||||
return username.equals(player.username) && dim == player.dimension;
|
||||
}
|
||||
|
||||
private static void regressStatus(ItemStack stack, EntityPlayerMP player) {
|
||||
double x = ItemNBTHelper.getDouble(stack, TAG_X, 0D);
|
||||
double y = ItemNBTHelper.getDouble(stack, TAG_Y, 0D);
|
||||
double z = ItemNBTHelper.getDouble(stack, TAG_Z, 0D);
|
||||
float pitch = ItemNBTHelper.getFloat(stack, TAG_PITCH, 0F);
|
||||
float yaw = ItemNBTHelper.getFloat(stack, TAG_YAW, 0F);
|
||||
double motionX = ItemNBTHelper.getDouble(stack, TAG_MOTION_X, 0D);
|
||||
double motionY = ItemNBTHelper.getDouble(stack, TAG_MOTION_Y, 0D);
|
||||
double motionZ = ItemNBTHelper.getDouble(stack, TAG_MOTION_Z, 0D);
|
||||
int health = ItemNBTHelper.getInt(stack, TAG_HP, 0);
|
||||
int food = ItemNBTHelper.getInt(stack, TAG_FOOD, 0);
|
||||
float saturation = ItemNBTHelper.getFloat(stack, TAG_SATURATION, 0F);
|
||||
|
||||
player.playerNetServerHandler.setPlayerLocation(x, y, z, pitch, yaw);
|
||||
player.motionX = motionX;
|
||||
player.motionY = motionY;
|
||||
player.motionZ = motionZ;
|
||||
player.setEntityHealth(health);
|
||||
player.getFoodStats().setFoodLevel(food);
|
||||
player.getFoodStats().setFoodSaturationLevel(saturation);
|
||||
}
|
||||
|
||||
private static void wipeData(ItemStack stack, Entity player) {
|
||||
stack.setTagCompound(null);
|
||||
if(player instanceof EntityLiving)
|
||||
((EntityLiving) player).removePotionEffect(ModPotions.effectStopwatch.id);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [11 May 2013, 00:12:00 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.item;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.world.World;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
import thaumcraft.common.items.equipment.ItemElementalSword;
|
||||
import vazkii.tinkerer.client.util.helper.IconHelper;
|
||||
import vazkii.tinkerer.util.helper.ModCreativeTab;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemSwordCondor extends ItemElementalSword {
|
||||
|
||||
public ItemSwordCondor(int i) {
|
||||
super(i, ThaumcraftApi.toolMatElemental);
|
||||
setMaxDamage(getMaxDamage() + ModItems.wandUprising.getMaxDamage());
|
||||
setCreativeTab(ModCreativeTab.INSTANCE);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IconRegister par1IconRegister) {
|
||||
itemIcon = IconHelper.forItem(par1IconRegister, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Icon getIconFromDamage(int par1) {
|
||||
return itemIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
|
||||
return ItemWandUprising.movePlayer(par1ItemStack, par2World, par3EntityPlayer, par3EntityPlayer.isSneaking(), 1.15);
|
||||
}
|
||||
}
|
||||
@@ -1,164 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [8 May 2013, 20:53:06 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.item;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.item.EnumAction;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import thaumcraft.common.aura.AuraManager;
|
||||
import vazkii.tinkerer.ThaumicTinkerer;
|
||||
import vazkii.tinkerer.client.util.helper.IconHelper;
|
||||
import vazkii.tinkerer.lib.LibFeatures;
|
||||
import vazkii.tinkerer.util.helper.ItemNBTHelper;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemTeleportSigil extends ItemMod {
|
||||
|
||||
private static final String TAG_X = "x";
|
||||
private static final String TAG_Y = "y";
|
||||
private static final String TAG_Z = "z";
|
||||
private static final String TAG_DIMENSION = "dim";
|
||||
|
||||
Icon enabledIcon;
|
||||
|
||||
public ItemTeleportSigil(int par1) {
|
||||
super(par1);
|
||||
setMaxStackSize(1);
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ) {
|
||||
if(stack.getItemDamage() == 1)
|
||||
return true;
|
||||
|
||||
if(world.isRemote)
|
||||
player.swingItem();
|
||||
else setData(stack, player.dimension, x, y, z);
|
||||
|
||||
world.playSoundAtEntity(player, "thaumcraft.tool", 1F, 1F);
|
||||
for(int i = 0; i < 20; i++) {
|
||||
double x1 = x + Math.random();
|
||||
double y1 = y + Math.random() + 0.75;
|
||||
double z1 = z + Math.random();
|
||||
ThaumicTinkerer.tcProxy.wispFX2(world, x1, y1, z1, 0.25F, 5, true, -0.02F);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
|
||||
if(par1ItemStack.getItemDamage() == 1)
|
||||
par3EntityPlayer.setItemInUse(par1ItemStack, getMaxItemUseDuration(par1ItemStack));
|
||||
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUsingItemTick(ItemStack stack, EntityPlayer player, int count) {
|
||||
if(getMaxItemUseDuration(stack) - count >= LibFeatures.TELEPORT_SIGIL_TIME && count % 10 == 0) {
|
||||
for(int i = 0; i < 5; i++) {
|
||||
double x = player.posX + player.width / 2 + (Math.random() - 0.5) * 4;
|
||||
double y = player.posY + player.width / 2 + (Math.random() - 0.5) * 4;
|
||||
double z = player.posZ - player.height / 2 + (Math.random() - 0.5) * 4;
|
||||
Vec3 vector = player.worldObj.getWorldVec3Pool().getVecFromPool(x, y, z);
|
||||
|
||||
ThaumicTinkerer.proxy.sigilLightning(player.worldObj, player, vector);
|
||||
}
|
||||
player.worldObj.playSoundAtEntity(player, "thaumcraft.zap", 0.2F, 1F);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPlayerStoppedUsing(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer, int par4) {
|
||||
if(getMaxItemUseDuration(par1ItemStack) - par4 >= LibFeatures.TELEPORT_SIGIL_TIME && AuraManager.decreaseClosestAura(par2World, par3EntityPlayer.posX, par3EntityPlayer.posY, par3EntityPlayer.posZ, LibFeatures.TELEPORT_SIGIL_VIS)) {
|
||||
moveParticlesAndSound(par3EntityPlayer);
|
||||
if(par3EntityPlayer instanceof EntityPlayerMP && !par2World.isRemote)
|
||||
regressStatus(par1ItemStack, (EntityPlayerMP) par3EntityPlayer);
|
||||
moveParticlesAndSound(par3EntityPlayer);
|
||||
par3EntityPlayer.renderBrokenItemStack(par1ItemStack);
|
||||
par3EntityPlayer.inventory.setInventorySlotContents(par3EntityPlayer.inventory.currentItem, null);
|
||||
}
|
||||
}
|
||||
|
||||
private static void moveParticlesAndSound(Entity entity) {
|
||||
for(int i = 0; i < 15; i++) {
|
||||
float x = (float) (entity.posX + Math.random());
|
||||
float y = (float) (entity.posY + 1.2 + Math.random());
|
||||
float z = (float) (entity.posZ + Math.random());
|
||||
ThaumicTinkerer.tcProxy.wispFX2(entity.worldObj, x, y, z, 0.5F, 5, true, -0.02F);
|
||||
}
|
||||
entity.worldObj.playSoundAtEntity(entity, "thaumcraft.tool", 1F, 1F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxItemUseDuration(ItemStack par1ItemStack) {
|
||||
return 72000;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumAction getItemUseAction(ItemStack par1ItemStack) {
|
||||
return EnumAction.block;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getShareTag() {
|
||||
return true;
|
||||
}
|
||||
|
||||
private static void setData(ItemStack stack, int dim, int x, int y, int z) {
|
||||
ItemNBTHelper.setInt(stack, TAG_X, x);
|
||||
ItemNBTHelper.setInt(stack, TAG_Y, y);
|
||||
ItemNBTHelper.setInt(stack, TAG_Z, z);
|
||||
ItemNBTHelper.setInt(stack, TAG_DIMENSION, dim);
|
||||
stack.setItemDamage(1);
|
||||
}
|
||||
|
||||
private static void regressStatus(ItemStack stack, EntityPlayerMP player) {
|
||||
int x = ItemNBTHelper.getInt(stack, TAG_X, 0);
|
||||
int y = ItemNBTHelper.getInt(stack, TAG_Y, 0);
|
||||
int z = ItemNBTHelper.getInt(stack, TAG_Z, 0);
|
||||
|
||||
player.playerNetServerHandler.setPlayerLocation(x + 0.5, y + 1.6, z + 0.5, player.rotationPitch, player.rotationYaw);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public EnumRarity getRarity(ItemStack par1ItemStack) {
|
||||
return EnumRarity.uncommon;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IconRegister par1IconRegister) {
|
||||
itemIcon = IconHelper.forItem(par1IconRegister, this, 0);
|
||||
enabledIcon = IconHelper.forItem(par1IconRegister, this, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Icon getIconFromDamage(int par1) {
|
||||
return par1 == 1 ? enabledIcon : itemIcon;
|
||||
}
|
||||
}
|
||||
@@ -1,150 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [27 Apr 2013, 14:59:05 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.item;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
import thaumcraft.common.items.wands.ItemWandTrade;
|
||||
import vazkii.tinkerer.ThaumicTinkerer;
|
||||
import vazkii.tinkerer.client.util.helper.IconHelper;
|
||||
import vazkii.tinkerer.lib.LibFeatures;
|
||||
import vazkii.tinkerer.util.helper.ItemNBTHelper;
|
||||
import vazkii.tinkerer.util.helper.ModCreativeTab;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemWandDislocation extends ItemWandTrade {
|
||||
|
||||
private static String TAG_TILE_CMP = "tileEntityCMP";
|
||||
private static String TAG_AVAILABLE = "available";
|
||||
|
||||
public ItemWandDislocation(int i) {
|
||||
super(i);
|
||||
setMaxDamage(250);
|
||||
setCreativeTab(ModCreativeTab.INSTANCE);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IconRegister par1IconRegister) {
|
||||
itemIcon = IconHelper.forItem(par1IconRegister, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Icon getIconFromDamage(int par1) {
|
||||
return itemIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onItemUseFirst(ItemStack arg0, EntityPlayer arg1, World arg2, int arg3, int arg4, int arg5, int arg6, float arg7, float arg8, float arg9) {
|
||||
int id = arg2.getBlockId(arg3, arg4, arg5);
|
||||
int meta = arg2.getBlockMetadata(arg3, arg4, arg5);
|
||||
TileEntity tile = arg2.getBlockTileEntity(arg3, arg4, arg5);
|
||||
|
||||
if(arg1.canPlayerEdit(arg3, arg4, arg5, arg6, arg0)) {
|
||||
if(getPickedBlock(arg0) != null) {
|
||||
ItemStack stack = getPickedBlock(arg0);
|
||||
if (arg6 == 0)
|
||||
--arg4;
|
||||
if (arg6 == 1)
|
||||
++arg4;
|
||||
if (arg6 == 2)
|
||||
--arg5;
|
||||
if (arg6 == 3)
|
||||
++arg5;
|
||||
if (arg6 == 4)
|
||||
--arg3;
|
||||
if (arg6 == 5)
|
||||
++arg3;
|
||||
|
||||
if(Block.blocksList[stack.itemID].canPlaceBlockOnSide(arg2, arg3, arg4, arg5, ForgeDirection.getOrientation(arg6).getOpposite().ordinal(), stack)) {
|
||||
arg2.setBlock(arg3, arg4, arg5, stack.itemID, stack.getItemDamage(), 1 | 2);
|
||||
NBTTagCompound tileCmp = ItemNBTHelper.getCompound(arg0, TAG_TILE_CMP, true);
|
||||
if(tileCmp != null && !tileCmp.getTags().isEmpty()) {
|
||||
TileEntity tile1 = TileEntity.createAndLoadEntity(tileCmp);
|
||||
tile1.xCoord = arg3;
|
||||
tile1.yCoord = arg4;
|
||||
tile1.zCoord = arg5;
|
||||
arg2.setBlockTileEntity(arg3, arg4, arg5, tile1);
|
||||
}
|
||||
if(arg2.isRemote)
|
||||
arg1.swingItem();
|
||||
clearPickedBlock(arg0);
|
||||
arg0.damageItem(LibFeatures.WAND_DISLOCATION_VIS, arg1);
|
||||
|
||||
for(int i = 0; i < 8; i++) {
|
||||
float x = (float) (arg3 + Math.random());
|
||||
float y = (float) (arg4 + Math.random()) + 0.65F;
|
||||
float z = (float) (arg5 + Math.random());
|
||||
ThaumicTinkerer.tcProxy.burst(arg2, x, y, z, 0.2F);
|
||||
}
|
||||
arg2.playSoundAtEntity(arg1, "thaumcraft.wand", 0.5F, 1F);
|
||||
}
|
||||
} else if(!ThaumcraftApi.portableHoleBlackList.contains(id) && Block.blocksList[id] != null && Block.blocksList[id].getBlockHardness(arg2, arg3, arg4, arg5) != -1F) {
|
||||
arg2.removeBlockTileEntity(arg3, arg4, arg5);
|
||||
arg2.setBlock(arg3, arg4, arg5, 0, 0, 1 | 2);
|
||||
storePickedBlock(arg0, (short) id, (short) meta, tile);
|
||||
|
||||
for(int i = 0; i < 8; i++) {
|
||||
float x = (float) (arg3 + Math.random());
|
||||
float y = (float) (arg4 + Math.random());
|
||||
float z = (float) (arg5 + Math.random());
|
||||
ThaumicTinkerer.tcProxy.burst(arg2, x, y, z, 0.2F);
|
||||
}
|
||||
arg2.playSoundAtEntity(arg1, Block.blocksList[id].stepSound.getBreakSound(), 1F, 1F);
|
||||
arg2.playSoundAtEntity(arg1, "thaumcraft.wand", 0.5F, 1F);
|
||||
|
||||
if(arg2.isRemote)
|
||||
arg1.swingItem();
|
||||
arg0.damageItem(LibFeatures.WAND_DISLOCATION_VIS, arg1);
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockStartBreak(ItemStack itemstack, int x, int y, int z, EntityPlayer player) {
|
||||
return true; // Don't allow for the wand of trade behaviour
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getPickedBlock(ItemStack stack) {
|
||||
return stack.hasTagCompound() && stack.getTagCompound().hasKey(TAG_AVAILABLE) &&
|
||||
stack.getTagCompound().getBoolean(TAG_AVAILABLE) ? super.getPickedBlock(stack) : null;
|
||||
}
|
||||
|
||||
private void storePickedBlock(ItemStack stack, short id, short meta, TileEntity tile) {
|
||||
super.storePickedBlock(stack, id, meta);
|
||||
NBTTagCompound cmp = new NBTTagCompound();
|
||||
if(tile != null)
|
||||
tile.writeToNBT(cmp);
|
||||
ItemNBTHelper.setCompound(stack, TAG_TILE_CMP, cmp);
|
||||
ItemNBTHelper.setBoolean(stack, TAG_AVAILABLE, true);
|
||||
}
|
||||
|
||||
private void clearPickedBlock(ItemStack stack) {
|
||||
ItemNBTHelper.setBoolean(stack, TAG_AVAILABLE, false);
|
||||
}
|
||||
}
|
||||
@@ -1,55 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [24 Apr 2013, 22:53:54 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.item;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import thaumcraft.common.items.wands.ItemWandCasting;
|
||||
import vazkii.tinkerer.client.util.helper.IconHelper;
|
||||
import vazkii.tinkerer.util.helper.ModCreativeTab;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemWandTinkerer extends ItemWandCasting {
|
||||
|
||||
public ItemWandTinkerer(int i) {
|
||||
super(i);
|
||||
setCreativeTab(ModCreativeTab.INSTANCE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxVis() {
|
||||
return 500;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRechargeInterval() {
|
||||
return 9;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IconRegister par1IconRegister) {
|
||||
itemIcon = IconHelper.forItem(par1IconRegister, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public EnumRarity getRarity(ItemStack par1ItemStack) {
|
||||
return EnumRarity.rare;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,74 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [10 May 2013, 21:53:44 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.item;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import thaumcraft.common.items.wands.ItemWandFrost;
|
||||
import vazkii.tinkerer.ThaumicTinkerer;
|
||||
import vazkii.tinkerer.client.util.helper.IconHelper;
|
||||
import vazkii.tinkerer.util.helper.ModCreativeTab;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemWandUprising extends ItemWandFrost {
|
||||
// ItemWandFrost, in order to have it recharge. That code doesn't seem to be in the
|
||||
// ItemWandBasic class.
|
||||
|
||||
public ItemWandUprising(int i) {
|
||||
super(i);
|
||||
setCreativeTab(ModCreativeTab.INSTANCE);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IconRegister ir) {
|
||||
itemIcon = IconHelper.forItem(ir, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Icon getIconFromDamage(int par1) {
|
||||
return itemIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer p) {
|
||||
return movePlayer(itemstack, world, p, false, 1 / 1.5);
|
||||
}
|
||||
|
||||
// Method also used in ItemSwordCondor
|
||||
protected static ItemStack movePlayer(ItemStack itemstack, World world, EntityPlayer p, boolean inverse, double force) {
|
||||
Vec3 vec = p.getLookVec();
|
||||
int mul = inverse ? -1 : 1;
|
||||
p.motionX = vec.xCoord * force * mul;
|
||||
p.motionY = vec.yCoord * force * mul;
|
||||
p.motionZ = vec.zCoord * force * mul;
|
||||
p.fallDistance = 0F;
|
||||
|
||||
for(int i = 0; i < 5; i++)
|
||||
ThaumicTinkerer.tcProxy.smokeSpiral(world, p.posX, p.posY - p.motionY, p.posZ, 2F, (int) Math.random() * 360, (int) p.posY);
|
||||
world.playSoundAtEntity(p, "thaumcraft.wind", 0.4F, 1F);
|
||||
if(world.isRemote)
|
||||
p.swingItem();
|
||||
else itemstack.damageItem(1, p);
|
||||
|
||||
return itemstack;
|
||||
}
|
||||
}
|
||||
@@ -1,158 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [1 May 2013, 18:48:38 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.item;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.item.EntityXPOrb;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.Icon;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.tinkerer.ThaumicTinkerer;
|
||||
import vazkii.tinkerer.client.util.helper.IconHelper;
|
||||
import vazkii.tinkerer.lib.LibFeatures;
|
||||
import vazkii.tinkerer.util.helper.ItemNBTHelper;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemXPTalisman extends ItemMod {
|
||||
|
||||
private static final String TAG_XP = "xp";
|
||||
Icon enabledIcon;
|
||||
|
||||
public ItemXPTalisman(int par1) {
|
||||
super(par1);
|
||||
setMaxStackSize(1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
|
||||
if(par3EntityPlayer.isSneaking()) {
|
||||
if(getXP(par1ItemStack) < LibFeatures.XP_TALISMAN_MAX_XP) {
|
||||
int dmg = par1ItemStack.getItemDamage();
|
||||
par1ItemStack.setItemDamage(dmg == 0 ? 1 : 0);
|
||||
par2World.playSoundAtEntity(par3EntityPlayer, "random.orb", 0.3F, 0.1F);
|
||||
}
|
||||
} else if(getXP(par1ItemStack) >= LibFeatures.XP_TALISMAN_ENCHANTING_BOTTLE_COST) {
|
||||
boolean has = par3EntityPlayer.inventory.consumeInventoryItem(Item.glassBottle.itemID);
|
||||
if(has) {
|
||||
if(!par3EntityPlayer.inventory.addItemStackToInventory(new ItemStack(Item.expBottle, 1)) && !par2World.isRemote)
|
||||
par3EntityPlayer.dropItem(Item.expBottle.itemID, 1);
|
||||
int xp = getXP(par1ItemStack);
|
||||
setXP(par1ItemStack, xp - LibFeatures.XP_TALISMAN_ENCHANTING_BOTTLE_COST);
|
||||
par2World.playSoundAtEntity(par3EntityPlayer, "random.orb", 0.1F, (float) (0.1F + Math.random() / 2F));
|
||||
for(int i = 0; par2World.isRemote && i < 6; i++)
|
||||
ThaumicTinkerer.tcProxy.sparkle((float) (par3EntityPlayer.posX + (Math.random() - 0.5)), (float) (par3EntityPlayer.posY + Math.random() - 0.5), (float) (par3EntityPlayer.posZ + (Math.random() - 0.5)), 3);
|
||||
}
|
||||
}
|
||||
|
||||
return par1ItemStack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate(ItemStack par1ItemStack, World par2World, Entity par3Entity, int par4, boolean par5) {
|
||||
if(par1ItemStack.getItemDamage() == 1 && !par2World.isRemote) {
|
||||
int r = LibFeatures.XP_TALISMAN_RANGE;
|
||||
int currentXP = getXP(par1ItemStack);
|
||||
int xpToAdd = 0;
|
||||
int maxXP = LibFeatures.XP_TALISMAN_MAX_XP - currentXP; // Max, to prevent overflow.
|
||||
if(maxXP <= 0) {
|
||||
par1ItemStack.setItemDamage(0);
|
||||
return; // Can't take any XP.
|
||||
}
|
||||
|
||||
AxisAlignedBB boundingBox = AxisAlignedBB.getBoundingBox(par3Entity.posX - r, par3Entity.posY - r, par3Entity.posZ - r, par3Entity.posX + r, par3Entity.posY + r, par3Entity.posZ + r);
|
||||
List<EntityXPOrb> orbs = par2World.getEntitiesWithinAABB(EntityXPOrb.class, boundingBox);
|
||||
|
||||
for(EntityXPOrb orb : orbs) {
|
||||
if(!orb.isDead) {
|
||||
int xp = orb.getXpValue();
|
||||
if(xpToAdd + xp <= maxXP) {
|
||||
xpToAdd += xp;
|
||||
consumeXPOrb(orb);
|
||||
}
|
||||
|
||||
maxXP -= xpToAdd;
|
||||
|
||||
if(maxXP <= 0)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
setXP(par1ItemStack, Math.min(LibFeatures.XP_TALISMAN_MAX_XP, currentXP + xpToAdd));
|
||||
}
|
||||
}
|
||||
|
||||
private void consumeXPOrb(EntityXPOrb orb) {
|
||||
orb.setDead();
|
||||
orb.worldObj.playSoundAtEntity(orb, "thaumcraft.zap", orb.getXpValue() / 10F, 1F);
|
||||
ThaumicTinkerer.tcProxy.wispFX(orb.worldObj, orb.posX, orb.posY, orb.posZ, orb.getXpValue() / 5F, 0.1F, 0.9F, 0.1F);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getShareTag() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
par3List.add("XP: " + getXP(par1ItemStack));
|
||||
if(getXP(par1ItemStack) >= LibFeatures.XP_TALISMAN_MAX_XP)
|
||||
par3List.add(EnumChatFormatting.RED + "Full");
|
||||
else if(par1ItemStack.getItemDamage() == 0)
|
||||
par3List.add(EnumChatFormatting.RED + "Not Absorbing");
|
||||
else par3List.add(EnumChatFormatting.GREEN + "Absorbing");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IconRegister par1IconRegister) {
|
||||
itemIcon = IconHelper.forItem(par1IconRegister, this, 0);
|
||||
enabledIcon = IconHelper.forItem(par1IconRegister, this, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Icon getIconFromDamage(int par1) {
|
||||
return par1 == 1 ? enabledIcon : itemIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public EnumRarity getRarity(ItemStack par1ItemStack) {
|
||||
return EnumRarity.uncommon;
|
||||
}
|
||||
|
||||
public static boolean hasCmp(ItemStack stack) {
|
||||
return ItemNBTHelper.detectNBT(stack);
|
||||
}
|
||||
|
||||
public static int getXP(ItemStack stack) {
|
||||
return ItemNBTHelper.getInt(stack, TAG_XP, 0);
|
||||
}
|
||||
|
||||
public static void setXP(ItemStack stack, int xp) {
|
||||
ItemNBTHelper.setInt(stack, TAG_XP, xp);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,118 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [24 Apr 2013, 22:53:42 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.item;
|
||||
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
import net.minecraft.item.Item;
|
||||
import thaumcraft.api.EnumTag;
|
||||
import thaumcraft.api.ObjectTags;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
import vazkii.tinkerer.lib.LibItemIDs;
|
||||
import vazkii.tinkerer.lib.LibItemNames;
|
||||
import vazkii.tinkerer.lib.LibMisc;
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
|
||||
public final class ModItems {
|
||||
|
||||
public static Item wandTinkerer;
|
||||
public static Item glowstoneGas;
|
||||
public static Item spellCloth;
|
||||
public static Item stopwatch;
|
||||
public static Item wandDislocation;
|
||||
public static Item nametag;
|
||||
public static Item xpTalisman;
|
||||
public static Item fireBracelet;
|
||||
public static Item darkQuartz;
|
||||
public static Item teleportSigil;
|
||||
public static Item wandUprising;
|
||||
public static Item swordCondor;
|
||||
public static Item deathRune;
|
||||
public static Item silkSword;
|
||||
public static Item fortuneMaul;
|
||||
|
||||
public static void initItems() {
|
||||
wandTinkerer = new ItemWandTinkerer(LibItemIDs.idWandTinkerer).setUnlocalizedName(LibItemNames.WAND_TINKERER);
|
||||
glowstoneGas = new ItemGlowstoneGas(LibItemIDs.idGlowstoneGas).setUnlocalizedName(LibItemNames.GLOWSTONE_GAS);
|
||||
spellCloth = new ItemSpellCloth(LibItemIDs.idSpellCloth).setUnlocalizedName(LibItemNames.SPELL_CLOTH);
|
||||
stopwatch = new ItemStopwatch(LibItemIDs.idStopwatch).setUnlocalizedName(LibItemNames.STOPWATCH);
|
||||
wandDislocation = new ItemWandDislocation(LibItemIDs.idWandDislocation).setUnlocalizedName(LibItemNames.WAND_DISLOCATION);
|
||||
nametag = new ItemNametag(LibItemIDs.idNametag).setUnlocalizedName(LibItemNames.NAMETAG);
|
||||
xpTalisman = new ItemXPTalisman(LibItemIDs.idXpTalisman).setUnlocalizedName(LibItemNames.XP_TALISMAN);
|
||||
fireBracelet = new ItemFireBracelet(LibItemIDs.idFireBracelet).setUnlocalizedName(LibItemNames.FIRE_BRACELET);
|
||||
darkQuartz = new ItemMod(LibItemIDs.idDarkQuartz).setUnlocalizedName(LibItemNames.DARK_QUARTZ);
|
||||
teleportSigil = new ItemTeleportSigil(LibItemIDs.idTeleportSigil).setUnlocalizedName(LibItemNames.TELEPORTATION_SIGIL);
|
||||
wandUprising = new ItemWandUprising(LibItemIDs.idWandUprising).setUnlocalizedName(LibItemNames.WAND_UPRISING);
|
||||
swordCondor = new ItemSwordCondor(LibItemIDs.idSwordCondor).setUnlocalizedName(LibItemNames.SWORD_CONDOR);
|
||||
deathRune = new ItemDeathRune(LibItemIDs.idDeathRune).setUnlocalizedName(LibItemNames.DEATH_RUNE);
|
||||
silkSword = new ItemDefaultEnchant(LibItemIDs.idSilkSword, Enchantment.silkTouch, 1).setUnlocalizedName(LibItemNames.SILK_SWORD);
|
||||
fortuneMaul = new ItemDefaultEnchant(LibItemIDs.idFortuneMaul, Enchantment.fortune, 3).setUnlocalizedName(LibItemNames.FORTUNE_MAUL);
|
||||
|
||||
nameItems();
|
||||
applyObjectTags();
|
||||
}
|
||||
|
||||
private static void nameItems() {
|
||||
LanguageRegistry.addName(wandTinkerer, LibItemNames.WAND_TINKERER_D);
|
||||
LanguageRegistry.addName(glowstoneGas, LibItemNames.GLOWSTONE_GAS_D);
|
||||
LanguageRegistry.addName(spellCloth, LibItemNames.SPELL_CLOTH_D);
|
||||
LanguageRegistry.addName(stopwatch, LibItemNames.STOPWATCH_D);
|
||||
LanguageRegistry.addName(wandDislocation, LibItemNames.WAND_DISLOCATION_D);
|
||||
LanguageRegistry.addName(nametag, LibItemNames.NAMETAG_D);
|
||||
LanguageRegistry.addName(xpTalisman, LibItemNames.XP_TALISMAN_D);
|
||||
LanguageRegistry.addName(fireBracelet, LibItemNames.FIRE_BRACELET_D);
|
||||
LanguageRegistry.addName(darkQuartz, LibItemNames.DARK_QUARTZ_D);
|
||||
LanguageRegistry.addName(teleportSigil, LibItemNames.TELEPORTATION_SIGIL_D);
|
||||
LanguageRegistry.addName(wandUprising, LibItemNames.WAND_UPRISING_D);
|
||||
LanguageRegistry.addName(swordCondor, LibItemNames.SWORD_CONDOR_D);
|
||||
LanguageRegistry.addName(deathRune, LibItemNames.DEATH_RUNE_D);
|
||||
LanguageRegistry.addName(silkSword, LibItemNames.SILK_SWORD_D);
|
||||
LanguageRegistry.addName(fortuneMaul, LibItemNames.FORTUNE_MAUL_D);
|
||||
}
|
||||
|
||||
private static void applyObjectTags() {
|
||||
ObjectTags tags = new ObjectTags().add(EnumTag.MAGIC, 48).add(EnumTag.VOID, 12).add(EnumTag.CRYSTAL, 15);
|
||||
ThaumcraftApi.registerObjectTag(wandTinkerer.itemID, LibMisc.TAG_META_WILDCARD, tags);
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.LIGHT, 12).add(EnumTag.WIND, 4).add(EnumTag.POWER, 3);
|
||||
ThaumcraftApi.registerObjectTag(glowstoneGas.itemID, LibMisc.TAG_META_WILDCARD, tags);
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.MAGIC, 15).add(EnumTag.CLOTH, 12).add(EnumTag.EXCHANGE, 8);
|
||||
ThaumcraftApi.registerObjectTag(spellCloth.itemID, LibMisc.TAG_META_WILDCARD, tags);
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.TIME, 12).add(EnumTag.MECHANISM, 12).add(EnumTag.POWER, 9);
|
||||
ThaumcraftApi.registerObjectTag(stopwatch.itemID, LibMisc.TAG_META_WILDCARD, tags);
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.MAGIC, 24).add(EnumTag.CRYSTAL, 6).add(EnumTag.EXCHANGE, 12).add(EnumTag.TRAP, 8);
|
||||
ThaumcraftApi.registerObjectTag(wandDislocation.itemID, LibMisc.TAG_META_WILDCARD, tags);
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.WOOD, 2).add(EnumTag.DARK, 1);
|
||||
ThaumcraftApi.registerObjectTag(nametag.itemID, LibMisc.TAG_META_WILDCARD, tags);
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.EVIL, 12).add(EnumTag.KNOWLEDGE, 12).add(EnumTag.TRAP, 24).add(EnumTag.MAGIC, 8);
|
||||
ThaumcraftApi.registerObjectTag(xpTalisman.itemID, LibMisc.TAG_META_WILDCARD, tags);
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.MECHANISM, 12).add(EnumTag.MOTION, 8).add(EnumTag.ELDRITCH, 12);
|
||||
ThaumcraftApi.registerObjectTag(teleportSigil.itemID, LibMisc.TAG_META_WILDCARD, tags);
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.FLIGHT, 8).add(EnumTag.WIND, 8).add(EnumTag.MOTION, 9).add(EnumTag.POWER, 20).add(EnumTag.MAGIC, 16);
|
||||
ThaumcraftApi.registerObjectTag(wandUprising.itemID, LibMisc.TAG_META_WILDCARD, tags);
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.FLIGHT, 12).add(EnumTag.WIND, 24).add(EnumTag.MOTION, 20).add(EnumTag.POWER, 24).add(EnumTag.MAGIC, 30);
|
||||
ThaumcraftApi.registerObjectTag(swordCondor.itemID, LibMisc.TAG_META_WILDCARD, tags);
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.DEATH, 16).add(EnumTag.TRAP, 12).add(EnumTag.POWER, 12).add(EnumTag.MAGIC, 22);
|
||||
ThaumcraftApi.registerObjectTag(deathRune.itemID, LibMisc.TAG_META_WILDCARD, tags);
|
||||
}
|
||||
}
|
||||
@@ -1,83 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [25 Apr 2013, 14:28:58 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.item;
|
||||
|
||||
import net.minecraft.inventory.InventoryCrafting;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class SpellClothRecipe implements IRecipe {
|
||||
|
||||
Item item;
|
||||
|
||||
public SpellClothRecipe(Item item) {
|
||||
this.item = item;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean matches(InventoryCrafting var1, World var2) {
|
||||
boolean foundCloth = false;
|
||||
boolean foundEnchanted = false;
|
||||
for(int i = 0; i < var1.getSizeInventory(); i++) {
|
||||
ItemStack stack = var1.getStackInSlot(i);
|
||||
if(stack != null) {
|
||||
if(stack.isItemEnchanted() && !(stack.getItem() instanceof INoRemoveEnchant) && !foundEnchanted)
|
||||
foundEnchanted = true;
|
||||
|
||||
else if(stack.itemID == item.itemID && !foundCloth)
|
||||
foundCloth = true;
|
||||
|
||||
else return false; // Found an invalid item, breaking the recipe
|
||||
}
|
||||
}
|
||||
|
||||
return foundCloth && foundEnchanted;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getCraftingResult(InventoryCrafting var1) {
|
||||
ItemStack stackToDisenchant = null;
|
||||
for(int i = 0; i < var1.getSizeInventory(); i++) {
|
||||
ItemStack stack = var1.getStackInSlot(i);
|
||||
if(stack != null && stack.isItemEnchanted()) {
|
||||
stackToDisenchant = stack.copy();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(stackToDisenchant == null)
|
||||
return null;
|
||||
|
||||
NBTTagCompound cmp = (NBTTagCompound) stackToDisenchant.getTagCompound().copy();
|
||||
cmp.removeTag("ench"); // Remove enchantments
|
||||
stackToDisenchant.setTagCompound(cmp);
|
||||
|
||||
return stackToDisenchant;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRecipeSize() {
|
||||
return 10;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getRecipeOutput() {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [25 Apr 2013, 12:02:56 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.lib;
|
||||
|
||||
public final class LibBlockIDs {
|
||||
|
||||
public static final int DEFAULT_GLOWSTONE_GAS = 2150;
|
||||
public static final int DEFAULT_TRANSMUTATOR = 2151;
|
||||
public static final int DEFAULT_WARD_CHEST = 2152;
|
||||
public static final int DEFAULT_DARK_QUARTZ = 2154;
|
||||
public static final int DEFAULT_DARK_QUARTZ_SLAB = 2155;
|
||||
public static final int DEFAULT_DARK_QUARTZ_STAIRS = 2156;
|
||||
public static final int DEFAULT_DARK_QUARTZ_SLAB_FULL = 2157;
|
||||
public static final int DEFAULT_ANIMATION_TABLET = 2153;
|
||||
|
||||
public static int idGlowstoneGas;
|
||||
public static int idTransmutator;
|
||||
public static int idWardChest;
|
||||
public static int idDarkQuartz;
|
||||
public static int idDarkQuartzSlab;
|
||||
public static int idDarkQuartzStairs;
|
||||
public static int idDarkQuartzSlabFull;
|
||||
public static int idAnimationTablet;
|
||||
}
|
||||
@@ -1,56 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [25 Apr 2013, 12:01:26 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.lib;
|
||||
|
||||
public final class LibBlockNames {
|
||||
|
||||
/*
|
||||
* Item Suffixes:
|
||||
*
|
||||
* No suffix = Internal Name
|
||||
* _R = Research/Recipe Name
|
||||
* _D = Display Name
|
||||
*/
|
||||
|
||||
public static final String GLOWSTONE_GAS = LibItemNames.GLOWSTONE_GAS;
|
||||
|
||||
public static final String TRANSMUTATOR = "transmutator";
|
||||
public static final String TRANSMUTATOR_R = "TRANSMUTATOR";
|
||||
public static final String TRANSMUTATOR_D = "Arcane Transmutator";
|
||||
|
||||
public static final String WARD_CHEST = "wardChest";
|
||||
public static final String WARD_CHEST_R = "WARD_CHEST";
|
||||
public static final String WARD_CHEST_D = "Warded Chest";
|
||||
|
||||
public static final String DARK_QUARTZ = "darkQuartz";
|
||||
|
||||
public static final String DARK_QUARTZ_STAIRS = "darkQuartzStairs";
|
||||
public static final String DARK_QUARTZ_STAIRS_D = "Smokey Quartz Stairs";
|
||||
|
||||
public static final String DARK_QUARTZ_SLAB = "darkQuartzSlab";
|
||||
public static final String DARK_QUARTZ_SLAB_D = "Smokey Quartz Slab";
|
||||
|
||||
public static final String DARK_QUARTZ_SLAB_FULL = "darkQuartzSlabFull";
|
||||
|
||||
public static final String ANIMATION_TABLET = "animationTablet";
|
||||
public static final String ANIMATION_TABLET_R = "ANIMATION_TABLET";
|
||||
public static final String ANIMATION_TABLET_D = "Tool Dynamism Tablet";
|
||||
|
||||
public static final String[] DARK_QUARTZ_BLOCK_NAMES = {
|
||||
"Block of Smokey Quartz",
|
||||
"Chiseled Smokey Quartz Block",
|
||||
"Pillar Smokey Quartz Block"
|
||||
};
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [25 Apr 2013, 14:31:08 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.lib;
|
||||
|
||||
public final class LibFeatures {
|
||||
|
||||
public static final int SPELL_CLOTH_USES = 35;
|
||||
|
||||
public static final int STOPWATCH_TIME = 1200;
|
||||
public static final int STOPWATCH_VIS = 20;
|
||||
|
||||
public static final int WAND_DISLOCATION_VIS = 50;
|
||||
|
||||
public static final int XP_TALISMAN_RANGE = 3;
|
||||
public static final int XP_TALISMAN_MAX_XP = 1500;
|
||||
public static final int XP_TALISMAN_ENCHANTING_BOTTLE_COST = 10;
|
||||
|
||||
public static final int FIRE_BRACELET_CHARGES = 64;
|
||||
public static final int FIRE_BRACELET_RECHARGE_VIS = 12;
|
||||
|
||||
public static final int TELEPORT_SIGIL_TIME = 100;
|
||||
public static final int TELEPORT_SIGIL_VIS = 25;
|
||||
|
||||
public static final int ENCHANT_ITEM_MAX_DMG = 1200;
|
||||
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
package vazkii.tinkerer.lib;
|
||||
|
||||
public final class LibItemIDs {
|
||||
|
||||
public static final int DEFAULT_WAND_TINKERER = 21150;
|
||||
public static final int DEFAULT_GLOWSTONE_GAS = 21151;
|
||||
public static final int DEFAULT_SPELL_CLOTH = 21152;
|
||||
public static final int DEFAULT_STOPWATCH = 21153;
|
||||
public static final int DEFAULT_WAND_DISLOCATION = 21154;
|
||||
public static final int DEFAULT_NAMETAG = 21155;
|
||||
public static final int DEFAULT_XP_TALISMAN = 21156;
|
||||
public static final int DEFAULT_FIRE_BRACELET = 21157;
|
||||
public static final int DEFAULT_DARK_QUARTZ = 21158;
|
||||
public static final int DEFAULT_TELEPORT_SIGIL = 21159;
|
||||
public static final int DEFAULT_WAND_UPRISING = 21160;
|
||||
public static final int DEFAULT_SWORD_CONDOR = 21161;
|
||||
public static final int DEFAULT_DEATH_RUNE = 21162;
|
||||
public static final int DEFAULT_SILK_SWORD = 21162;
|
||||
public static final int DEFAULT_FORTUNE_MAUL = 21163;
|
||||
|
||||
public static int idWandTinkerer;
|
||||
public static int idGlowstoneGas;
|
||||
public static int idSpellCloth;
|
||||
public static int idStopwatch;
|
||||
public static int idWandDislocation;
|
||||
public static int idNametag;
|
||||
public static int idXpTalisman;
|
||||
public static int idFireBracelet;
|
||||
public static int idDarkQuartz;
|
||||
public static int idTeleportSigil;
|
||||
public static int idWandUprising;
|
||||
public static int idSwordCondor;
|
||||
public static int idDeathRune;
|
||||
public static int idSilkSword;
|
||||
public static int idFortuneMaul;
|
||||
}
|
||||
@@ -1,72 +0,0 @@
|
||||
package vazkii.tinkerer.lib;
|
||||
|
||||
public final class LibItemNames {
|
||||
|
||||
/*
|
||||
* Item Suffixes:
|
||||
*
|
||||
* No suffix = Internal Name
|
||||
* _R = Research/Recipe Name
|
||||
* _D = Display Name
|
||||
*/
|
||||
|
||||
public static final String WAND_TINKERER = "wandTinkerer";
|
||||
public static final String WAND_TINKERER_R = "WAND_TINKERER";
|
||||
public static final String WAND_TINKERER_D = "Wand of the Tinkerer";
|
||||
|
||||
public static final String GLOWSTONE_GAS = "glowstoneGas";
|
||||
public static final String GLOWSTONE_GAS_R = "GLOWSTONE_GAS";
|
||||
public static final String GLOWSTONE_GAS_D = "Gaseous Glowstone";
|
||||
|
||||
public static final String SPELL_CLOTH = "spellCloth";
|
||||
public static final String SPELL_CLOTH_R = "SPELL_CLOTH";
|
||||
public static final String SPELL_CLOTH_D = "Spellbinding Cloth";
|
||||
|
||||
public static final String STOPWATCH = "stopwatch";
|
||||
public static final String STOPWATCH_R = "STOPWATCH";
|
||||
public static final String STOPWATCH_D = "Stopwatch of the Timetwister";
|
||||
|
||||
public static final String WAND_DISLOCATION = "wandDislocation";
|
||||
public static final String WAND_DISLOCATION_R = "WAND_DISLOCATION";
|
||||
public static final String WAND_DISLOCATION_D = "Wand of Dislocation";
|
||||
|
||||
public static final String NAMETAG = "nametag";
|
||||
public static final String NAMETAG_R = "NAMETAG";
|
||||
public static final String NAMETAG_D = "Golem Name Tag";
|
||||
|
||||
public static final String XP_TALISMAN = "xpTalisman";
|
||||
public static final String XP_TALISMAN_R = "XP_TALISMAN";
|
||||
public static final String XP_TALISMAN_D = "Talisman of Withhold";
|
||||
|
||||
public static final String FIRE_BRACELET = "fireBracelet";
|
||||
public static final String FIRE_BRACELET_R = "FIRE_BRACELET";
|
||||
public static final String FIRE_BRACELET_D = "Infernal Bracelet";
|
||||
|
||||
public static final String DARK_QUARTZ = "darkQuartz";
|
||||
public static final String DARK_QUARTZ_R = "DARK_QUARTZ";
|
||||
public static final String DARK_QUARTZ_D = "Smokey Quartz";
|
||||
|
||||
public static final String TELEPORTATION_SIGIL = "teleportSigil";
|
||||
public static final String TELEPORTATION_SIGIL_R = "TELEPORTATION_SIGIL";
|
||||
public static final String TELEPORTATION_SIGIL_D = "Sigil of Memories";
|
||||
|
||||
public static final String WAND_UPRISING = "wandUprising";
|
||||
public static final String WAND_UPRISING_R = "WAND_UPRISING";
|
||||
public static final String WAND_UPRISING_D = "Wand of Uprising";
|
||||
|
||||
public static final String SWORD_CONDOR = "swordCondor";
|
||||
public static final String SWORD_CONDOR_R = "SWORD_CONDOR";
|
||||
public static final String SWORD_CONDOR_D = "Sword of the Condor";
|
||||
|
||||
public static final String DEATH_RUNE = "deathRune";
|
||||
public static final String DEATH_RUNE_R = "DEATH_RUNE";
|
||||
public static final String DEATH_RUNE_D = "Rune Thanatos";
|
||||
|
||||
public static final String SILK_SWORD = "silkSword";
|
||||
public static final String SILK_SWORD_R = "SILK_SWORD";
|
||||
public static final String SILK_SWORD_D = "Silk Cutter";
|
||||
|
||||
public static final String FORTUNE_MAUL = "fortuneMaul";
|
||||
public static final String FORTUNE_MAUL_R = "FORTUNE_MAUL";
|
||||
public static final String FORTUNE_MAUL_D = "Fortunate Maul";
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [24 Apr 2013, 20:38:31 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.lib;
|
||||
|
||||
public final class LibMisc {
|
||||
|
||||
public static final String MOD_ID = "ThaumicTinkerer";
|
||||
public static final String MOD_NAME = "Thaumic Tinkerer";
|
||||
public static final String MOD_VERSION = "1.0.1";
|
||||
|
||||
public static final String DEPENDENCIES = "required-after:Thaumcraft";
|
||||
|
||||
public static final String COMMON_PROXY = "vazkii.tinkerer.core.proxy.TTCommonProxy";
|
||||
public static final String CLIENT_PROXY = "vazkii.tinkerer.core.proxy.TTClientProxy";
|
||||
|
||||
public static final short CRAFTING_META_WILDCARD = Short.MAX_VALUE;
|
||||
public static final short TAG_META_WILDCARD = -1;
|
||||
|
||||
public static final float MODEL_DEFAULT_RENDER_SCALE = 0.0625F;
|
||||
|
||||
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [28 Apr 2013, 20:22:37 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.lib;
|
||||
|
||||
public final class LibNetwork {
|
||||
|
||||
public static final String PACKET_CHANNEL = LibMisc.MOD_ID;
|
||||
|
||||
public static final String SUBCHANNEL_VERIFY = "verify";
|
||||
public static final String SUBCHANNEL_TRANSMUTATOR_SYNC = "transmutatorSync";
|
||||
public static final String SUBCHANNEL_ANIMATION_TABLET_SYNC = "tabletSync";
|
||||
public static final String SUBCHANNEL_ANIMATION_TABLET_BUTTON = "tabletButton";
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [25 Apr 2013, 22:10:53 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.lib;
|
||||
|
||||
public final class LibPotions {
|
||||
|
||||
public static final int DEFAULT_ID_STOPWATCH = 21;
|
||||
|
||||
public static int idStopwatch;
|
||||
|
||||
public static final String NAME_STOPWATCH = "stopwatch";
|
||||
|
||||
public static final String DISPLAY_NAME_STOPWATCH = "Time Twister";
|
||||
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [24 Apr 2013, 22:14:57 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.lib;
|
||||
|
||||
public final class LibResources {
|
||||
|
||||
public static final String ROOT = "/mods/ThaumicTinkerer/";
|
||||
public static final String ROOT_GUI = ROOT + "gui/";
|
||||
public static final String ROOT_MODEL = ROOT + "model/";
|
||||
public static final String ROOT_MISC = ROOT + "misc/";
|
||||
|
||||
public static final String ROOT_TC = "/mods/thaumcraft/textures/";
|
||||
|
||||
public static final String BLUR = "%blur%";
|
||||
|
||||
public static final String RESEARCH_XML = ROOT + "research.xml";
|
||||
|
||||
public static final String SS_POTIONS = ROOT_GUI + "potionEffects.png";
|
||||
|
||||
public static final String GUI_TRANSMUTATOR = ROOT_GUI + "guiTransmutator.png";
|
||||
public static final String GUI_ANIMATION_TABLET = ROOT_GUI + "guiAnimationTablet.png";
|
||||
|
||||
public static final String MODEL_WARD_CHEST = ROOT_MODEL + "chestWard.png";
|
||||
|
||||
public static final String MISC_GLYPHS = BLUR + ROOT_MISC + "transmutatorGlyphs.png";
|
||||
public static final String MISC_WARD_CHEST_OVERLAY = BLUR + ROOT_MISC + "wardChestOverlay.png";
|
||||
public static final String MISC_AT_OVERLAY_LEFT = BLUR + ROOT_MISC + "atLeft.png";
|
||||
public static final String MISC_AT_OVERLAY_RIGHT = BLUR + ROOT_MISC + "atRight1.png";
|
||||
public static final String MISC_AT_OVERLAY_DIAL = BLUR + ROOT_TC + "misc/dial.png";
|
||||
public static final String MISC_ATOVERLAY_REDSTONE = BLUR + ROOT_TC + "misc/dial_ind.png";
|
||||
|
||||
public static final String EMTPY_TEXTURE = "emptyTexture";
|
||||
}
|
||||
@@ -1,49 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [28 Apr 2013, 20:06:45 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.network;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.DataInputStream;
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.IOException;
|
||||
|
||||
import net.minecraft.network.INetworkManager;
|
||||
import net.minecraft.network.packet.Packet250CustomPayload;
|
||||
import cpw.mods.fml.common.network.Player;
|
||||
|
||||
public abstract class ModPacket {
|
||||
|
||||
public abstract ByteArrayOutputStream asOutputStream() throws IOException;
|
||||
|
||||
public abstract boolean readPayload(Packet250CustomPayload packet, INetworkManager manager, Player player, String subchannel) throws IOException;
|
||||
|
||||
public abstract String getSubchannel();
|
||||
|
||||
public ByteArrayOutputStream emptyStream() throws IOException {
|
||||
ByteArrayOutputStream stream = new ByteArrayOutputStream();
|
||||
DataOutputStream data = new DataOutputStream(stream);
|
||||
writeSubchannel(data);
|
||||
return stream;
|
||||
}
|
||||
|
||||
public final void skipSubchannel(DataInputStream stream) throws IOException {
|
||||
stream.readUTF();
|
||||
}
|
||||
|
||||
public final void writeSubchannel(DataOutputStream stream) throws IOException {
|
||||
stream.writeUTF(getSubchannel());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,134 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [28 Apr 2013, 20:05:24 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.network;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.DataInputStream;
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.network.INetworkManager;
|
||||
import net.minecraft.network.packet.Packet250CustomPayload;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.tinkerer.lib.LibNetwork;
|
||||
import cpw.mods.fml.common.network.IPacketHandler;
|
||||
import cpw.mods.fml.common.network.PacketDispatcher;
|
||||
import cpw.mods.fml.common.network.Player;
|
||||
|
||||
public class PacketManager implements IPacketHandler {
|
||||
|
||||
public static boolean currentServerVerified = false;
|
||||
|
||||
public static Set<ModPacket> packetHandlers = new LinkedHashSet();
|
||||
|
||||
|
||||
@Override
|
||||
public void onPacketData(INetworkManager handler, Packet250CustomPayload packet, Player player) {
|
||||
ByteArrayInputStream stream = new ByteArrayInputStream(packet.data);
|
||||
DataInputStream inputStream = new DataInputStream(stream);
|
||||
try {
|
||||
String subchannel = inputStream.readUTF();
|
||||
for(ModPacket packetHandler : packetHandlers) {
|
||||
if(packetHandler.readPayload(packet, handler, player, subchannel)) // If the packet handler read the packet, stops execution
|
||||
break;
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public static void sendPacketToClient(Player player, ModPacket packet) {
|
||||
Packet250CustomPayload payload = generatePacket(packet);
|
||||
PacketDispatcher.sendPacketToPlayer(payload, player);
|
||||
}
|
||||
|
||||
public static void sendPacketToAllClients(ModPacket packet) {
|
||||
Packet250CustomPayload payload = generatePacket(packet);
|
||||
PacketDispatcher.sendPacketToAllPlayers(payload);
|
||||
}
|
||||
|
||||
// Sends a packet to all players in range of the area pssed in
|
||||
public static void sendPacketToClientsInRange(ModPacket packet, World world, double x, double y, double z, float range) {
|
||||
Packet250CustomPayload payload = generatePacket(packet);
|
||||
List<EntityPlayerMP> players = world.getEntitiesWithinAABB(EntityPlayerMP.class, AxisAlignedBB.getBoundingBox(x-range, y-range, z-range, x+range, y+range, z+range));
|
||||
for(EntityPlayerMP player : players)
|
||||
PacketDispatcher.sendPacketToPlayer(payload, (Player)player);
|
||||
}
|
||||
|
||||
public static void sendPacketToServer(ModPacket packet) {
|
||||
if(!currentServerVerified)
|
||||
return;
|
||||
|
||||
try {
|
||||
ByteArrayOutputStream outStream = packet.asOutputStream();
|
||||
Packet250CustomPayload payload = signPacket(outStream, packet);
|
||||
PacketDispatcher.sendPacketToServer(payload);
|
||||
} catch(IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
/** Generates a packet **/
|
||||
public static Packet250CustomPayload generatePacket(ModPacket packet) {
|
||||
try {
|
||||
ByteArrayOutputStream outStream = packet.asOutputStream();
|
||||
Packet250CustomPayload payload = signPacket(outStream, packet);
|
||||
return payload;
|
||||
} catch(IOException e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/** Signs a packet, setting the channel, data and size **/
|
||||
public static Packet250CustomPayload signPacket(ByteArrayOutputStream outStream, ModPacket packet) {
|
||||
Packet250CustomPayload payload = new Packet250CustomPayload();
|
||||
payload.data = outStream.toByteArray();
|
||||
payload.length = payload.data.length;
|
||||
payload.channel = LibNetwork.PACKET_CHANNEL;
|
||||
return payload;
|
||||
}
|
||||
|
||||
/** Writes an ItemStack onto a DataOutputStream but
|
||||
* it write the Stack Tag Compound. **/
|
||||
public static void writeItemStackIntoStream(ItemStack stack, DataOutputStream stream) throws IOException {
|
||||
if(stack != null) {
|
||||
stream.writeShort(stack.itemID);
|
||||
stream.writeByte(stack.stackSize);
|
||||
stream.writeShort(stack.getItemDamage());
|
||||
} else {
|
||||
stream.writeShort(-1); // If the itemstack is null, write it regardless
|
||||
}
|
||||
}
|
||||
|
||||
/** Gets an ItemStack from a DataInputStream. **/
|
||||
public static ItemStack getItemStackFromStream(DataInputStream stream) throws IOException {
|
||||
short id = stream.readShort();
|
||||
if(id == -1) // Handle null item stacks
|
||||
return null;
|
||||
|
||||
byte size = stream.readByte();
|
||||
short dmg = stream.readShort();
|
||||
return new ItemStack(id, size, dmg);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [28 Apr 2013, 20:30:53 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.network;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import vazkii.tinkerer.network.packet.PacketVerification;
|
||||
import cpw.mods.fml.common.IPlayerTracker;
|
||||
import cpw.mods.fml.common.network.Player;
|
||||
|
||||
public class PlayerTracker implements IPlayerTracker {
|
||||
|
||||
@Override
|
||||
public void onPlayerLogin(EntityPlayer player) {
|
||||
PacketManager.sendPacketToClient((Player) player, new PacketVerification());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPlayerLogout(EntityPlayer player) {
|
||||
// NO-OP
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPlayerChangedDimension(EntityPlayer player) {
|
||||
// NO-OP
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPlayerRespawn(EntityPlayer player) {
|
||||
// NO-OP
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,88 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [14 May 2013, 20:08:07 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.network.packet;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.DataInputStream;
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.IOException;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.network.INetworkManager;
|
||||
import net.minecraft.network.packet.Packet250CustomPayload;
|
||||
import vazkii.tinkerer.inventory.container.ContainerAnimationTablet;
|
||||
import vazkii.tinkerer.lib.LibNetwork;
|
||||
import vazkii.tinkerer.network.ModPacket;
|
||||
import vazkii.tinkerer.network.PacketManager;
|
||||
import vazkii.tinkerer.tile.TileEntityAnimationTablet;
|
||||
import cpw.mods.fml.common.network.Player;
|
||||
|
||||
public class PacketAnimationTabletButton extends ModPacket {
|
||||
|
||||
TileEntityAnimationTablet tablet;
|
||||
|
||||
public PacketAnimationTabletButton() { }
|
||||
|
||||
public PacketAnimationTabletButton(TileEntityAnimationTablet tablet) {
|
||||
this.tablet = tablet;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ByteArrayOutputStream asOutputStream() throws IOException {
|
||||
ByteArrayOutputStream stream = new ByteArrayOutputStream();
|
||||
DataOutputStream data = new DataOutputStream(stream);
|
||||
writeSubchannel(data);
|
||||
data.writeInt(tablet.xCoord);
|
||||
data.writeInt(tablet.yCoord);
|
||||
data.writeInt(tablet.zCoord);
|
||||
data.writeBoolean(tablet.leftClick);
|
||||
data.writeBoolean(tablet.redstone);
|
||||
return stream;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean readPayload(Packet250CustomPayload packet, INetworkManager manager, Player player, String subchannel) throws IOException {
|
||||
if(subchannel.equals(getSubchannel()) && player != null && player instanceof EntityPlayer) {
|
||||
EntityPlayer entityPlayer = (EntityPlayer)player;
|
||||
if(entityPlayer.openContainer != null && entityPlayer.openContainer instanceof ContainerAnimationTablet) {
|
||||
ByteArrayInputStream stream = new ByteArrayInputStream(packet.data);
|
||||
DataInputStream inputStream = new DataInputStream(stream);
|
||||
skipSubchannel(inputStream);
|
||||
int x = inputStream.readInt();
|
||||
int y = inputStream.readInt();
|
||||
int z = inputStream.readInt();
|
||||
ContainerAnimationTablet container = (ContainerAnimationTablet)entityPlayer.openContainer;
|
||||
if(container.tablet.xCoord == x && container.tablet.yCoord == y && container.tablet.zCoord == z) {
|
||||
TileEntityAnimationTablet tablet = (TileEntityAnimationTablet) container.tablet.worldObj.getBlockTileEntity(x, y, z);
|
||||
boolean leftClick = inputStream.readBoolean();
|
||||
boolean redstone = inputStream.readBoolean();
|
||||
tablet.leftClick = leftClick;
|
||||
tablet.redstone = redstone;
|
||||
PacketAnimationTabletSync packet1 = new PacketAnimationTabletSync(tablet);
|
||||
PacketManager.sendPacketToClient(player, packet1);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSubchannel() {
|
||||
return LibNetwork.SUBCHANNEL_ANIMATION_TABLET_BUTTON;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,86 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [13 May 2013, 19:43:05 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.network.packet;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.DataInputStream;
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.IOException;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.network.INetworkManager;
|
||||
import net.minecraft.network.packet.Packet250CustomPayload;
|
||||
import vazkii.tinkerer.lib.LibNetwork;
|
||||
import vazkii.tinkerer.network.ModPacket;
|
||||
import vazkii.tinkerer.network.PacketManager;
|
||||
import vazkii.tinkerer.tile.TileEntityAnimationTablet;
|
||||
import cpw.mods.fml.common.network.Player;
|
||||
|
||||
public class PacketAnimationTabletSync extends ModPacket {
|
||||
|
||||
TileEntityAnimationTablet tablet;
|
||||
|
||||
public PacketAnimationTabletSync() { }
|
||||
|
||||
public PacketAnimationTabletSync(TileEntityAnimationTablet tablet) {
|
||||
this.tablet = tablet;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ByteArrayOutputStream asOutputStream() throws IOException {
|
||||
ByteArrayOutputStream stream = new ByteArrayOutputStream();
|
||||
DataOutputStream data = new DataOutputStream(stream);
|
||||
writeSubchannel(data);
|
||||
data.writeInt(tablet.xCoord);
|
||||
data.writeInt(tablet.yCoord);
|
||||
data.writeInt(tablet.zCoord);
|
||||
PacketManager.writeItemStackIntoStream(tablet.getStackInSlot(0), data);
|
||||
data.writeBoolean(tablet.leftClick);
|
||||
data.writeBoolean(tablet.redstone);
|
||||
return stream;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean readPayload(Packet250CustomPayload packet, INetworkManager manager, Player player, String subchannel) throws IOException {
|
||||
if(subchannel.equals(getSubchannel()) && player != null && player instanceof EntityPlayer) {
|
||||
ByteArrayInputStream stream = new ByteArrayInputStream(packet.data);
|
||||
DataInputStream inputStream = new DataInputStream(stream);
|
||||
skipSubchannel(inputStream);
|
||||
int x = inputStream.readInt();
|
||||
int y = inputStream.readInt();
|
||||
int z = inputStream.readInt();
|
||||
TileEntityAnimationTablet tablet = (TileEntityAnimationTablet) ((EntityPlayer)player).worldObj.getBlockTileEntity(x, y, z);
|
||||
ItemStack stack = PacketManager.getItemStackFromStream(inputStream);
|
||||
if(tablet != null) {
|
||||
tablet.setInventorySlotContents(0, stack);
|
||||
boolean leftClick = inputStream.readBoolean();
|
||||
boolean redstone = inputStream.readBoolean();
|
||||
tablet.leftClick = leftClick;
|
||||
tablet.redstone = redstone;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSubchannel() {
|
||||
return LibNetwork.SUBCHANNEL_ANIMATION_TABLET_SYNC;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,76 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [28 Apr 2013, 20:50:21 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.network.packet;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.DataInputStream;
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.IOException;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.network.INetworkManager;
|
||||
import net.minecraft.network.packet.Packet250CustomPayload;
|
||||
import vazkii.tinkerer.lib.LibNetwork;
|
||||
import vazkii.tinkerer.network.ModPacket;
|
||||
import vazkii.tinkerer.network.PacketManager;
|
||||
import vazkii.tinkerer.tile.TileEntityTransmutator;
|
||||
import cpw.mods.fml.common.network.Player;
|
||||
|
||||
public class PacketTransmutatorSync extends ModPacket {
|
||||
|
||||
TileEntityTransmutator transmutator;
|
||||
|
||||
public PacketTransmutatorSync() { }
|
||||
|
||||
public PacketTransmutatorSync(TileEntityTransmutator transmutator) {
|
||||
this.transmutator = transmutator;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ByteArrayOutputStream asOutputStream() throws IOException {
|
||||
ByteArrayOutputStream stream = new ByteArrayOutputStream();
|
||||
DataOutputStream data = new DataOutputStream(stream);
|
||||
writeSubchannel(data);
|
||||
data.writeInt(transmutator.xCoord);
|
||||
data.writeInt(transmutator.yCoord);
|
||||
data.writeInt(transmutator.zCoord);
|
||||
PacketManager.writeItemStackIntoStream(transmutator.getStackInSlot(0), data);
|
||||
return stream;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean readPayload(Packet250CustomPayload packet, INetworkManager manager, Player player, String subchannel) throws IOException {
|
||||
if(subchannel.equals(getSubchannel()) && player != null && player instanceof EntityPlayer) {
|
||||
ByteArrayInputStream stream = new ByteArrayInputStream(packet.data);
|
||||
DataInputStream inputStream = new DataInputStream(stream);
|
||||
skipSubchannel(inputStream);
|
||||
int x = inputStream.readInt();
|
||||
int y = inputStream.readInt();
|
||||
int z = inputStream.readInt();
|
||||
TileEntityTransmutator transmutator = (TileEntityTransmutator) ((EntityPlayer)player).worldObj.getBlockTileEntity(x, y, z);
|
||||
ItemStack stack = PacketManager.getItemStackFromStream(inputStream);
|
||||
transmutator.setInventorySlotContents(0, stack);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSubchannel() {
|
||||
return LibNetwork.SUBCHANNEL_TRANSMUTATOR_SYNC;
|
||||
}
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [28 Apr 2013, 20:25:08 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.network.packet;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
|
||||
import net.minecraft.network.INetworkManager;
|
||||
import net.minecraft.network.packet.Packet250CustomPayload;
|
||||
import vazkii.tinkerer.lib.LibNetwork;
|
||||
import vazkii.tinkerer.network.ModPacket;
|
||||
import vazkii.tinkerer.network.PacketManager;
|
||||
import cpw.mods.fml.common.network.Player;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class PacketVerification extends ModPacket {
|
||||
|
||||
@Override
|
||||
public ByteArrayOutputStream asOutputStream() throws IOException {
|
||||
return emptyStream();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public boolean readPayload(Packet250CustomPayload packet, INetworkManager manager, Player player, String subchannel) {
|
||||
if(subchannel.equals(getSubchannel())) {
|
||||
PacketManager.currentServerVerified = true;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getSubchannel() {
|
||||
return LibNetwork.SUBCHANNEL_VERIFY;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [25 Apr 2013, 22:02:51 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.potion;
|
||||
|
||||
import net.minecraft.potion.Potion;
|
||||
import vazkii.tinkerer.lib.LibPotions;
|
||||
|
||||
public final class ModPotions {
|
||||
|
||||
public static int idStopwatch;
|
||||
|
||||
public static Potion effectStopwatch;
|
||||
|
||||
public static void initPotions() {
|
||||
effectStopwatch = new TTPotion(idStopwatch, false, 0x999900, 0, 0).setPotionName(LibPotions.DISPLAY_NAME_STOPWATCH);
|
||||
}
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [25 Apr 2013, 22:07:40 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.potion;
|
||||
|
||||
import net.minecraft.potion.Potion;
|
||||
import vazkii.tinkerer.lib.LibResources;
|
||||
import vazkii.tinkerer.util.helper.MiscHelper;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class TTPotion extends Potion {
|
||||
|
||||
protected TTPotion(int par1, boolean par2, int par3, int ssX, int ssY) {
|
||||
super(par1, par2, par3);
|
||||
setIconIndex(ssX, ssY);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getStatusIconIndex() {
|
||||
MiscHelper.getMc().renderEngine.bindTexture(LibResources.SS_POTIONS);
|
||||
return super.getStatusIconIndex();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [27 Apr 2013, 22:44:38 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.research;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
import vazkii.tinkerer.item.ModItems;
|
||||
import vazkii.tinkerer.lib.LibItemNames;
|
||||
|
||||
public final class ModArcaneRecipes {
|
||||
|
||||
public static void initArcaneRecipes() {
|
||||
ThaumcraftApi.addArcaneCraftingRecipe(LibItemNames.NAMETAG_R, LibItemNames.NAMETAG_R, 2, new ItemStack(ModItems.nametag),
|
||||
"SI",
|
||||
'S', new ItemStack(Item.sign),
|
||||
'I', new ItemStack(Item.dyePowder));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,66 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [7 May 2013, 18:28:45 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.research;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.CraftingManager;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import thaumcraft.api.research.ResearchList;
|
||||
import vazkii.tinkerer.block.ModBlocks;
|
||||
import vazkii.tinkerer.item.ModItems;
|
||||
import vazkii.tinkerer.lib.LibItemNames;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
public final class ModCraftingRecipes {
|
||||
|
||||
public static void initCraftingRecipes() {
|
||||
registerResearchItem(LibItemNames.DARK_QUARTZ_R + 0, new ItemStack(ModItems.darkQuartz, 8),
|
||||
"QQQ", "QCQ", "QQQ",
|
||||
'Q', Item.netherQuartz,
|
||||
'C', Item.coal);
|
||||
registerResearchItem(LibItemNames.DARK_QUARTZ_R + 0, new ItemStack(ModItems.darkQuartz, 8),
|
||||
"QQQ", "QCQ", "QQQ",
|
||||
'Q', Item.netherQuartz,
|
||||
'C', new ItemStack(Item.coal, 1, 1));
|
||||
registerResearchItem(LibItemNames.DARK_QUARTZ_R + 1, new ItemStack(ModBlocks.darkQuartz),
|
||||
"QQ", "QQ",
|
||||
'Q', ModItems.darkQuartz);
|
||||
registerResearchItem(LibItemNames.DARK_QUARTZ_R + 2, new ItemStack(ModBlocks.darkQuartzSlab, 6),
|
||||
"QQQ",
|
||||
'Q', ModBlocks.darkQuartz);
|
||||
registerResearchItem(LibItemNames.DARK_QUARTZ_R + 3, new ItemStack(ModBlocks.darkQuartz, 2, 2),
|
||||
"Q", "Q",
|
||||
'Q', ModBlocks.darkQuartz);
|
||||
registerResearchItem(LibItemNames.DARK_QUARTZ_R + 4, new ItemStack(ModBlocks.darkQuartz, 1, 1),
|
||||
"Q", "Q",
|
||||
'Q', ModBlocks.darkQuartzSlab);
|
||||
registerResearchItem(LibItemNames.DARK_QUARTZ_R + 5, new ItemStack(ModBlocks.darkQuartzStairs, 4),
|
||||
" Q", " QQ", "QQQ",
|
||||
'Q', ModBlocks.darkQuartz);
|
||||
registerResearchItem("", new ItemStack(ModBlocks.darkQuartzStairs, 4),
|
||||
"Q ", "QQ ", "QQQ",
|
||||
'Q', ModBlocks.darkQuartz);
|
||||
}
|
||||
|
||||
private static void registerResearchItem(String name, ItemStack output, Object... stuff) {
|
||||
GameRegistry.addRecipe(output, stuff);
|
||||
if(name != null && name.length() != 0)
|
||||
ResearchList.craftingRecipesForResearch.put(name, Arrays.asList(CraftingManager.getInstance().getRecipeList().size() -1));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,135 +0,0 @@
|
||||
package vazkii.tinkerer.research;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import thaumcraft.api.EnumTag;
|
||||
import thaumcraft.api.ObjectTags;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
import thaumcraft.common.Config;
|
||||
import vazkii.tinkerer.block.ModBlocks;
|
||||
import vazkii.tinkerer.item.ModItems;
|
||||
import vazkii.tinkerer.lib.LibBlockNames;
|
||||
import vazkii.tinkerer.lib.LibItemNames;
|
||||
import vazkii.tinkerer.lib.LibMisc;
|
||||
|
||||
public final class ModInfusionRecipes {
|
||||
|
||||
public static void initInfusionRecipes() {
|
||||
ObjectTags tags = new ObjectTags().add(EnumTag.MAGIC, 16).add(EnumTag.VOID, 12);
|
||||
ThaumcraftApi.addInfusionCraftingRecipe(LibItemNames.WAND_TINKERER_R, LibItemNames.WAND_TINKERER_R, 85, tags, new ItemStack(ModItems.wandTinkerer),
|
||||
"SSS", "SWS", "SSS",
|
||||
'S', new ItemStack(Config.itemShard, 1, 4),
|
||||
'W', new ItemStack(Config.itemWandCastingApprentice, 1, LibMisc.CRAFTING_META_WILDCARD));
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.WIND, 8);
|
||||
ThaumcraftApi.addInfusionCraftingRecipe(LibItemNames.GLOWSTONE_GAS_R, LibItemNames.GLOWSTONE_GAS_R, 5, tags, new ItemStack(ModItems.glowstoneGas),
|
||||
"GPG", " N ",
|
||||
'G', new ItemStack(Block.glowStone),
|
||||
'P', new ItemStack(Config.itemEssence, 1, 0),
|
||||
'N', new ItemStack(Config.itemResource, 1, 1));
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.CLOTH, 4).add(EnumTag.MAGIC, 6).add(EnumTag.EXCHANGE, 8);
|
||||
ThaumcraftApi.addInfusionCraftingRecipe(LibItemNames.SPELL_CLOTH_R, LibItemNames.SPELL_CLOTH_R, 55, tags, new ItemStack(ModItems.spellCloth),
|
||||
" C ", "CEC", " C ",
|
||||
'C', new ItemStack(Config.itemResource, 1, 7),
|
||||
'E', new ItemStack(Item.expBottle));
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.TIME, 12).add(EnumTag.MECHANISM, 20);
|
||||
ThaumcraftApi.addInfusionCraftingRecipe(LibItemNames.STOPWATCH_R, LibItemNames.STOPWATCH_R, 85, tags, new ItemStack(ModItems.stopwatch),
|
||||
" Q ", "QCQ", " Q ",
|
||||
'Q', new ItemStack(Item.netherQuartz),
|
||||
'C', new ItemStack(Item.pocketSundial));
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.TRAP, 12).add(EnumTag.EXCHANGE, 14);
|
||||
ThaumcraftApi.addInfusionCraftingRecipe(LibItemNames.WAND_DISLOCATION_R, LibItemNames.WAND_DISLOCATION_R, 90, tags, new ItemStack(ModItems.wandDislocation),
|
||||
" H", "W ",
|
||||
'H', new ItemStack(Config.itemPortableHole),
|
||||
'W', new ItemStack(Config.itemWandTrade));
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.FLUX, 24).add(EnumTag.EXCHANGE, 48);
|
||||
ThaumcraftApi.addInfusionCraftingRecipe(LibBlockNames.TRANSMUTATOR_R, LibBlockNames.TRANSMUTATOR_R, 320, tags, new ItemStack(ModBlocks.transmutator),
|
||||
"ITI", "WFW", "WCW",
|
||||
'W', new ItemStack(Config.blockWooden),
|
||||
'T', new ItemStack(Config.itemWandTrade),
|
||||
'I', new ItemStack(Config.itemResource, 1, 2),
|
||||
'F', new ItemStack(Config.itemResource, 1, 8),
|
||||
'C', new ItemStack(Config.blockCrucible));
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.EVIL, 6).add(EnumTag.TRAP, 18).add(EnumTag.KNOWLEDGE, 12);
|
||||
ThaumcraftApi.addInfusionCraftingRecipe(LibItemNames.XP_TALISMAN_R, LibItemNames.XP_TALISMAN_R, 140, tags, new ItemStack(ModItems.xpTalisman),
|
||||
"OGO", "GBG", "OGO",
|
||||
'O', new ItemStack(Block.obsidian),
|
||||
'G', new ItemStack(Item.ingotGold),
|
||||
'B', new ItemStack(Config.itemResource, 1, 5));
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.FIRE, 8).add(EnumTag.ROCK, 6).add(EnumTag.METAL, 12);
|
||||
ThaumcraftApi.addInfusionCraftingRecipe(LibItemNames.FIRE_BRACELET_R, LibItemNames.FIRE_BRACELET_R, 85, tags, new ItemStack(ModItems.fireBracelet),
|
||||
"O O", "ILI",
|
||||
'O', new ItemStack(Block.obsidian),
|
||||
'I', new ItemStack(Item.ingotIron),
|
||||
'L', new ItemStack(Item.bucketLava));
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.VOID, 12).add(EnumTag.MAGIC, 16);
|
||||
ThaumcraftApi.addInfusionCraftingRecipe(LibBlockNames.WARD_CHEST_R, LibBlockNames.WARD_CHEST_R, 25, tags, new ItemStack(ModBlocks.wardChest),
|
||||
"GGG", "IBI", "WCW",
|
||||
'G', new ItemStack(Config.blockCosmeticOpaque, 1, 2),
|
||||
'I', new ItemStack(Config.itemResource, 1, 2),
|
||||
'B', new ItemStack(Config.itemResource, 1, 5),
|
||||
'W', new ItemStack(Config.blockWooden),
|
||||
'C', new ItemStack(Block.chest));
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.MOTION, 16).add(EnumTag.ELDRITCH, 4).add(EnumTag.MECHANISM, 12);
|
||||
ThaumcraftApi.addInfusionCraftingRecipe(LibItemNames.TELEPORTATION_SIGIL_R, LibItemNames.TELEPORTATION_SIGIL_R, 50, tags, new ItemStack(ModItems.teleportSigil),
|
||||
" O ", "OEO", " O ",
|
||||
'O', new ItemStack(Block.obsidian),
|
||||
'E', new ItemStack(Item.enderPearl));
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.FLIGHT, 12).add(EnumTag.WIND, 6);
|
||||
ThaumcraftApi.addInfusionCraftingRecipe(LibItemNames.WAND_UPRISING_R, LibItemNames.WAND_UPRISING_R, 25, tags, new ItemStack(ModItems.wandUprising),
|
||||
" Q ", "QWQ", " Q ",
|
||||
'Q', new ItemStack(Config.itemResource, 1, 10),
|
||||
'W', new ItemStack(Config.itemWandLightning));
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.POWER, 14).add(EnumTag.FLIGHT, 6);
|
||||
ThaumcraftApi.addInfusionCraftingRecipe(LibItemNames.SWORD_CONDOR_R, LibItemNames.SWORD_CONDOR_R, 25, tags, new ItemStack(ModItems.swordCondor),
|
||||
"I W", " S ", " I",
|
||||
'I', new ItemStack(Config.itemResource, 1, 2),
|
||||
'S', new ItemStack(Config.itemSwordElemental),
|
||||
'W', new ItemStack(ModItems.wandUprising));
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.DEATH, 16).add(EnumTag.POWER, 12).add(EnumTag.MAGIC, 20);
|
||||
ThaumcraftApi.addInfusionCraftingRecipe(LibItemNames.DEATH_RUNE_R, LibItemNames.DEATH_RUNE_R, 60, tags, new ItemStack(ModItems.deathRune),
|
||||
"TOT", "OBO", "TOT",
|
||||
'T', new ItemStack(Config.itemResource, 1, 2),
|
||||
'O', new ItemStack(Block.obsidian),
|
||||
'B', new ItemStack(Config.itemResource, 1, 5));
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.CONTROL, 16).add(EnumTag.MOTION, 8).add(EnumTag.MECHANISM, 16).add(EnumTag.MAGIC, 12);
|
||||
ThaumcraftApi.addInfusionCraftingRecipe(LibBlockNames.ANIMATION_TABLET_R, LibBlockNames.ANIMATION_TABLET_R, 25, tags, new ItemStack(ModBlocks.animationTablet),
|
||||
"GIG", "ICI",
|
||||
'G', new ItemStack(Item.ingotGold),
|
||||
'I', new ItemStack(Item.ingotIron),
|
||||
'C', new ItemStack(Config.itemGolemCore, 1, 0));
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.TOOL, 25).add(EnumTag.DARK, 4).add(EnumTag.MAGIC, 12).add(EnumTag.CLOTH, 100);
|
||||
ThaumcraftApi.addInfusionCraftingRecipe(LibItemNames.SILK_SWORD_R, LibItemNames.SILK_SWORD_R, 100, tags, new ItemStack(ModItems.silkSword),
|
||||
"O1O", "2D3", "O4O",
|
||||
'1', new ItemStack(Config.itemSwordThaumium),
|
||||
'2', new ItemStack(Config.itemAxeThaumium),
|
||||
'3', new ItemStack(Config.itemPickThaumium),
|
||||
'4', new ItemStack(Config.itemShovelThaumium),
|
||||
'O', new ItemStack(Block.obsidian),
|
||||
'D', new ItemStack(Item.diamond));
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.TOOL, 25).add(EnumTag.DARK, 4).add(EnumTag.MAGIC, 12).add(EnumTag.VALUABLE, 25);
|
||||
ThaumcraftApi.addInfusionCraftingRecipe(LibItemNames.FORTUNE_MAUL_R, LibItemNames.FORTUNE_MAUL_R, 100, tags, new ItemStack(ModItems.fortuneMaul),
|
||||
"O1O", "2D3", "O4O",
|
||||
'1', new ItemStack(Config.itemHoeThaumium),
|
||||
'2', new ItemStack(Config.itemAxeThaumium),
|
||||
'3', new ItemStack(Config.itemPickThaumium),
|
||||
'4', new ItemStack(Config.itemShovelThaumium),
|
||||
'O', new ItemStack(Block.obsidian),
|
||||
'D', new ItemStack(Item.diamond));
|
||||
}
|
||||
}
|
||||
@@ -1,103 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [24 Apr 2013, 22:14:28 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.research;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import thaumcraft.api.EnumTag;
|
||||
import thaumcraft.api.ObjectTags;
|
||||
import thaumcraft.api.research.ResearchItem;
|
||||
import thaumcraft.common.Config;
|
||||
import vazkii.tinkerer.block.ModBlocks;
|
||||
import vazkii.tinkerer.item.ModItems;
|
||||
import vazkii.tinkerer.lib.LibBlockNames;
|
||||
import vazkii.tinkerer.lib.LibItemNames;
|
||||
|
||||
public final class ModResearchItems {
|
||||
|
||||
public static ResearchItem wandTinkerer;
|
||||
public static ResearchItem glowstoneGas;
|
||||
public static ResearchItem spellCloth;
|
||||
public static ResearchItem stopwatch;
|
||||
public static ResearchItem wandDislocation;
|
||||
public static ResearchItem nametag;
|
||||
public static ResearchItem transmutator;
|
||||
public static ResearchItem xpTalisman;
|
||||
public static ResearchItem fireBracelet;
|
||||
public static ResearchItem wardChest;
|
||||
public static ResearchItem darkQuartz;
|
||||
public static ResearchItem sigilTeleport;
|
||||
public static ResearchItem wandUprising;
|
||||
public static ResearchItem swordCondor;
|
||||
public static ResearchItem deathRune;
|
||||
public static ResearchItem animationTablet;
|
||||
public static ResearchItem silkSword;
|
||||
public static ResearchItem fortuneMaul;
|
||||
|
||||
public static void registerModResearchItems() {
|
||||
ObjectTags tags = new ObjectTags().add(EnumTag.MAGIC, 16).add(EnumTag.VOID, 8);
|
||||
wandTinkerer = new ResearchItem(LibItemNames.WAND_TINKERER_R, tags, -5, 3, ModItems.wandTinkerer).setParentsHidden(Config.researchGoggles).registerResearchItem();
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.LIGHT, 7).add(EnumTag.WIND, 4).add(EnumTag.POWER, 3);
|
||||
glowstoneGas = new ResearchItem(LibItemNames.GLOWSTONE_GAS_R, tags, 5, 2, ModItems.glowstoneGas).setParents(Config.researchNitor).registerResearchItem();
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.CLOTH, 9).add(EnumTag.MAGIC, 8).add(EnumTag.EXCHANGE, 6);
|
||||
spellCloth = new ResearchItem(LibItemNames.SPELL_CLOTH_R, tags, -6, 1, ModItems.spellCloth).setParents(Config.researchFabric).setParentsHidden(Config.researchUTFT).registerResearchItem();
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.TIME, 4).add(EnumTag.MECHANISM, 8);
|
||||
stopwatch = new ResearchItem(LibItemNames.STOPWATCH_R, tags, -2, 24, ModItems.stopwatch).setParents(Config.researchTTOE).registerResearchItem();
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.TRAP, 10).add(EnumTag.EXCHANGE, 8).add(EnumTag.CRYSTAL, 4);
|
||||
wandDislocation = new ResearchItem(LibItemNames.WAND_DISLOCATION_R, tags, -1, 7, ModItems.wandDislocation).setParents(Config.researchWandTrade).setParentsHidden(Config.researchPortableHole).registerResearchItem();
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.WOOD, 1).add(EnumTag.DARK, 1);
|
||||
nametag = new ResearchItem(LibItemNames.NAMETAG_R, tags, 4, 18, ModItems.nametag).setParents(Config.researchGolemancy).registerResearchItem();
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.FLUX, 12).add(EnumTag.EXCHANGE, 20);
|
||||
transmutator = new ResearchItem(LibBlockNames.TRANSMUTATOR_R, tags, -5, 24, ModBlocks.transmutator).setParents(Config.researchCrystalCore).setParentsHidden(Config.researchWandTrade).registerResearchItem();
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.EVIL, 8).add(EnumTag.TRAP, 16).add(EnumTag.KNOWLEDGE, 12);
|
||||
xpTalisman = new ResearchItem(LibItemNames.XP_TALISMAN_R, tags, -4, 14, ModItems.xpTalisman).setParents(Config.researchJarBrain).setHidden().registerResearchItem();
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.FIRE, 8).add(EnumTag.ROCK, 12).add(EnumTag.METAL, 4);
|
||||
fireBracelet = new ResearchItem(LibItemNames.FIRE_BRACELET_R, tags, -4, 9, ModItems.fireBracelet).setParents(Config.researchArcaneBellows).setHidden().registerResearchItem();
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.WOOD, 12).add(EnumTag.VOID, 12).add(EnumTag.MAGIC, 16);
|
||||
wardChest = new ResearchItem(LibBlockNames.WARD_CHEST_R, tags, 3, 11, ModBlocks.wardChest).setParents(Config.researchArcaneDoor).setHidden().registerResearchItem();
|
||||
|
||||
tags = new ObjectTags();
|
||||
darkQuartz = new ResearchItem(LibItemNames.DARK_QUARTZ_R, tags, -7, -3, ModItems.darkQuartz).setAutoUnlock().registerResearchItem();
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.MECHANISM, 12).add(EnumTag.MOTION, 16).add(EnumTag.ELDRITCH, 5);
|
||||
sigilTeleport = new ResearchItem(LibItemNames.TELEPORTATION_SIGIL_R, tags, -2, 26, new ItemStack(ModItems.teleportSigil, 0, 1)).setParents(Config.researchTTOE).setHidden().registerResearchItem();
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.MAGIC, 8).add(EnumTag.POWER, 8).add(EnumTag.MOTION, 12).add(EnumTag.FLIGHT, 14);
|
||||
wandUprising = new ResearchItem(LibItemNames.WAND_UPRISING_R, tags, 2, 7, ModItems.wandUprising).setParentsHidden(Config.researchElementalSword).setHidden().registerResearchItem();
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.FLIGHT, 12).add(EnumTag.MOTION, 8).add(EnumTag.POWER, 14).add(EnumTag.MAGIC, 12);
|
||||
swordCondor = new ResearchItem(LibItemNames.SWORD_CONDOR_R, tags, 4, 7, ModItems.swordCondor).setParentsHidden(wandUprising).setHidden().registerResearchItem();
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.DEATH, 20).add(EnumTag.POWER, 16).add(EnumTag.TRAP, 12);
|
||||
deathRune = new ResearchItem(LibItemNames.DEATH_RUNE_R, tags, 5, 11, ModItems.deathRune).setParents(wardChest).setHidden().registerResearchItem();
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.CONTROL, 12).add(EnumTag.MOTION, 6).add(EnumTag.MECHANISM, 12).add(EnumTag.MAGIC, 4);
|
||||
animationTablet = new ResearchItem(LibBlockNames.ANIMATION_TABLET_R, tags, 4, 24, ModBlocks.animationTablet).setParents(Config.researchGolemIronGuardian).registerResearchItem();
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.TOOL, 12).add(EnumTag.DARK, 1).add(EnumTag.CLOTH, 48);
|
||||
silkSword = new ResearchItem(LibItemNames.SILK_SWORD_R, tags, 7, 24, ModItems.silkSword).setParentsHidden(Config.researchThaumium).setHidden().setLost().registerResearchItem();
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.TOOL, 12).add(EnumTag.DARK, 1).add(EnumTag.VALUABLE, 12);
|
||||
fortuneMaul = new ResearchItem(LibItemNames.FORTUNE_MAUL_R, tags, 8, 24, ModItems.fortuneMaul).setParentsHidden(Config.researchThaumium).setHidden().setLost().registerResearchItem();
|
||||
}
|
||||
}
|
||||
@@ -1,74 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [15 May 2013, 19:38:21 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.tile;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ChunkCoordinates;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.FakePlayer;
|
||||
|
||||
public class TabletFakePlayer extends FakePlayer {
|
||||
|
||||
TileEntityAnimationTablet tablet;
|
||||
|
||||
public TabletFakePlayer(TileEntityAnimationTablet tablet) {
|
||||
super(tablet.worldObj, tablet.getInvName());
|
||||
this.tablet = tablet;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openGui(Object mod, int modGuiId, World world, int x, int y, int z) {
|
||||
// NO-OP
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
posX = tablet.xCoord + 0.5;
|
||||
posY = tablet.yCoord + 1.6;
|
||||
posZ = tablet.zCoord + 0.5;
|
||||
|
||||
if(riddenByEntity != null)
|
||||
riddenByEntity.ridingEntity = null;
|
||||
if(ridingEntity != null)
|
||||
ridingEntity.riddenByEntity = null;
|
||||
riddenByEntity = null;
|
||||
ridingEntity = null;
|
||||
|
||||
motionX = motionY = motionZ = 0;
|
||||
setEntityHealth(getMaxHealth());
|
||||
isDead = false;
|
||||
|
||||
int meta = tablet.getBlockMetadata() & 7;
|
||||
int rotation = meta == 2 ? 180 : meta == 3 ? 0 : meta == 4 ? 90 : -90;
|
||||
rotationYaw = rotationYawHead = rotation;
|
||||
rotationPitch = -15;
|
||||
|
||||
for(int i = 0; i < inventory.getSizeInventory(); i++) {
|
||||
if(i != inventory.currentItem) {
|
||||
ItemStack stack = inventory.getStackInSlot(i);
|
||||
if(stack != null) {
|
||||
dropPlayerItem(stack);
|
||||
inventory.setInventorySlotContents(i, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ChunkCoordinates getPlayerCoordinates() {
|
||||
return new ChunkCoordinates(tablet.xCoord, tablet.yCoord, tablet.zCoord);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,465 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [13 May 2013, 19:36:07 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.tile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.network.packet.Packet;
|
||||
import net.minecraft.network.packet.Packet3Chat;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.ChunkCoordinates;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraftforge.common.FakePlayer;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import net.minecraftforge.event.Event;
|
||||
import net.minecraftforge.event.ForgeEventFactory;
|
||||
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
|
||||
import net.minecraftforge.event.entity.player.PlayerInteractEvent.Action;
|
||||
import vazkii.tinkerer.block.ModBlocks;
|
||||
import vazkii.tinkerer.lib.LibBlockNames;
|
||||
import vazkii.tinkerer.network.PacketManager;
|
||||
import vazkii.tinkerer.network.packet.PacketAnimationTabletSync;
|
||||
import cpw.mods.fml.common.network.PacketDispatcher;
|
||||
|
||||
public class TileEntityAnimationTablet extends TileEntity implements IInventory {
|
||||
|
||||
private static final String TAG_LEFT_CLICK = "leftClick";
|
||||
private static final String TAG_REDSTONE = "redstone";
|
||||
private static final String TAG_PROGRESS = "progress";
|
||||
private static final String TAG_MOD = "mod";
|
||||
|
||||
private static final int[][] LOC_INCREASES = new int[][] {
|
||||
{ 0, -1 },
|
||||
{ 0, +1 },
|
||||
{ -1, 0 },
|
||||
{ +1, 0 }
|
||||
};
|
||||
|
||||
private static final ForgeDirection[] SIDES = new ForgeDirection[] {
|
||||
ForgeDirection.NORTH,
|
||||
ForgeDirection.SOUTH,
|
||||
ForgeDirection.WEST,
|
||||
ForgeDirection.EAST
|
||||
};
|
||||
|
||||
private static final int SWING_SPEED = 3;
|
||||
private static final int MAX_DEGREE = 45;
|
||||
|
||||
List<Entity> detectedEntities = new ArrayList();
|
||||
|
||||
ItemStack[] inventorySlots = new ItemStack[1];
|
||||
public double ticksExisted = 0;
|
||||
|
||||
public boolean leftClick = true;
|
||||
public boolean redstone = false;
|
||||
|
||||
public int swingProgress = 0;
|
||||
private int swingMod = 0;
|
||||
|
||||
private boolean isBreaking = false;
|
||||
private int initialDamage = 0;
|
||||
private int curblockDamage = 0;
|
||||
private int durabilityRemainingOnBlock;
|
||||
|
||||
FakePlayer player;
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
if(player == null)
|
||||
player = new TabletFakePlayer(this);
|
||||
|
||||
player.onUpdate();
|
||||
|
||||
ticksExisted++;
|
||||
|
||||
ItemStack stack = getStackInSlot(0);
|
||||
|
||||
if(stack != null) {
|
||||
if(swingProgress >= MAX_DEGREE)
|
||||
swingHit();
|
||||
|
||||
swingMod = swingProgress <= 0 ? 0 : swingProgress >= MAX_DEGREE ? -SWING_SPEED : swingMod;
|
||||
swingProgress += swingMod;
|
||||
if(swingProgress < 0)
|
||||
swingProgress = 0;
|
||||
} else {
|
||||
swingMod = 0;
|
||||
swingProgress = 0;
|
||||
|
||||
if(isBreaking)
|
||||
stopBreaking();
|
||||
}
|
||||
|
||||
boolean detect = detect();
|
||||
if(!detect)
|
||||
stopBreaking();
|
||||
|
||||
if(detect && isBreaking)
|
||||
continueBreaking();
|
||||
|
||||
if((!redstone || isBreaking) && detect && swingProgress == 0) {
|
||||
initiateSwing();
|
||||
worldObj.addBlockEvent(xCoord, yCoord, zCoord, ModBlocks.animationTablet.blockID, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
public void initiateSwing() {
|
||||
swingMod = SWING_SPEED;
|
||||
swingProgress = 1;
|
||||
}
|
||||
|
||||
public void swingHit() {
|
||||
ChunkCoordinates coords = getTargetLoc();
|
||||
ItemStack stack = getStackInSlot(0);
|
||||
Item item = stack.getItem();
|
||||
int id = worldObj.getBlockId(coords.posX, coords.posY, coords.posZ);
|
||||
|
||||
player.setCurrentItemOrArmor(0, stack);
|
||||
|
||||
boolean done = false;
|
||||
|
||||
if(leftClick) {
|
||||
Entity entity = detectedEntities.isEmpty() ? null : detectedEntities.get(worldObj.rand.nextInt(detectedEntities.size()));
|
||||
if(entity != null) {
|
||||
stack.getDamageVsEntity(entity);
|
||||
player.attackTargetEntityWithCurrentItem(entity);
|
||||
done = true;
|
||||
} else if(!isBreaking){
|
||||
if(id != 0 && !Block.blocksList[id].isAirBlock(worldObj, coords.posX, coords.posY, coords.posZ)) {
|
||||
isBreaking = true;
|
||||
startBreaking(Block.blocksList[id], worldObj.getBlockMetadata(coords.posX, coords.posY, coords.posZ));
|
||||
done = true;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
int side = SIDES[(getBlockMetadata() & 7) - 2].getOpposite().ordinal();
|
||||
|
||||
if(!(id != 0 && !Block.blocksList[id].isAirBlock(worldObj, coords.posX, coords.posY, coords.posZ))) {
|
||||
coords.posY -= 1;
|
||||
side = ForgeDirection.UP.ordinal();
|
||||
id = worldObj.getBlockId(coords.posX, coords.posY, coords.posZ);
|
||||
}
|
||||
|
||||
try {
|
||||
ForgeEventFactory.onPlayerInteract(player, Action.RIGHT_CLICK_AIR, coords.posX, coords.posY, coords.posZ, side);
|
||||
Entity entity = detectedEntities.isEmpty() ? null : detectedEntities.get(worldObj.rand.nextInt(detectedEntities.size()));
|
||||
done = entity != null && entity instanceof EntityLiving && (item.itemInteractionForEntity(stack, (EntityLiving) entity) || entity.interact(player));
|
||||
|
||||
if(!done)
|
||||
item.onItemUseFirst(stack, player, worldObj, coords.posX, coords.posY, coords.posZ, side, 0F, 0F, 0F);
|
||||
if(!done)
|
||||
done = Block.blocksList[id] != null && Block.blocksList[id].onBlockActivated(worldObj, coords.posX, coords.posY, coords.posZ, player, side, 0F, 0F, 0F);
|
||||
if(!done)
|
||||
done = item.onItemUse(stack, player, worldObj, coords.posX, coords.posY, coords.posZ, side, 0F, 0F, 0F);
|
||||
if(!done) {
|
||||
stack = item.onItemRightClick(stack, worldObj, player);
|
||||
done = true;
|
||||
}
|
||||
} catch(Throwable e) {
|
||||
e.printStackTrace();
|
||||
Packet3Chat packet = new Packet3Chat(EnumChatFormatting.RED + "Something went wrong with a Tool Dynamism Tablet! Check your FML log.");
|
||||
Packet3Chat packet1 = new Packet3Chat(EnumChatFormatting.RED + "" + EnumChatFormatting.ITALIC + e.getMessage());
|
||||
|
||||
PacketDispatcher.sendPacketToAllAround(xCoord, yCoord, zCoord, 16, worldObj.getWorldInfo().getDimension(), packet);
|
||||
PacketDispatcher.sendPacketToAllAround(xCoord, yCoord, zCoord, 16, worldObj.getWorldInfo().getDimension(), packet1);
|
||||
}
|
||||
}
|
||||
|
||||
if(done) {
|
||||
setInventorySlotContents(0, stack.stackSize == 0 ? null : stack);
|
||||
PacketDispatcher.sendPacketToAllPlayers(getDescriptionPacket());
|
||||
}
|
||||
}
|
||||
|
||||
// Copied from ItemInWorldManager, seems to do the trick.
|
||||
private void stopBreaking() {
|
||||
isBreaking = false;
|
||||
ChunkCoordinates coords = getTargetLoc();
|
||||
worldObj.destroyBlockInWorldPartially(player.entityId, coords.posX, coords.posY, coords.posZ, -1);
|
||||
}
|
||||
|
||||
// Copied from ItemInWorldManager, seems to do the trick.
|
||||
private void startBreaking(Block block, int meta) {
|
||||
int side = SIDES[(getBlockMetadata() & 7) - 2].getOpposite().ordinal();
|
||||
ChunkCoordinates coords = getTargetLoc();
|
||||
|
||||
PlayerInteractEvent event = ForgeEventFactory.onPlayerInteract(player, Action.LEFT_CLICK_BLOCK, coords.posX, coords.posY, coords.posZ, side);
|
||||
if (event.isCanceled()) {
|
||||
stopBreaking();
|
||||
return;
|
||||
}
|
||||
|
||||
initialDamage = curblockDamage;
|
||||
float var5 = 1F;
|
||||
|
||||
if (block != null) {
|
||||
if (event.useBlock != Event.Result.DENY)
|
||||
block.onBlockClicked(worldObj, coords.posX, coords.posY, coords.posZ, player);
|
||||
var5 = block.getPlayerRelativeBlockHardness(player, worldObj, coords.posX, coords.posY, coords.posZ);
|
||||
}
|
||||
|
||||
if (event.useItem == Event.Result.DENY) {
|
||||
stopBreaking();
|
||||
return;
|
||||
}
|
||||
|
||||
if(var5 >= 1F) {
|
||||
tryHarvestBlock(coords.posX, coords.posY, coords.posZ);
|
||||
stopBreaking();
|
||||
} else {
|
||||
int var7 = (int) (var5 * 10);
|
||||
worldObj.destroyBlockInWorldPartially(player.entityId, coords.posX, coords.posY, coords.posZ, var7);
|
||||
durabilityRemainingOnBlock = var7;
|
||||
}
|
||||
}
|
||||
|
||||
// Copied from ItemInWorldManager, seems to do the trick.
|
||||
private void continueBreaking() {
|
||||
++curblockDamage;
|
||||
int var1;
|
||||
float var4;
|
||||
int var5;
|
||||
ChunkCoordinates coords = getTargetLoc();
|
||||
|
||||
var1 = curblockDamage - initialDamage;
|
||||
int var2 = worldObj.getBlockId(coords.posX, coords.posY, coords.posZ);
|
||||
|
||||
if (var2 == 0)
|
||||
stopBreaking();
|
||||
else {
|
||||
Block var3 = Block.blocksList[var2];
|
||||
var4 = var3.getPlayerRelativeBlockHardness(player, worldObj,coords.posX, coords.posY, coords.posZ) * var1 + 1F;
|
||||
var5 = (int) (var4 * 10);
|
||||
|
||||
if (var5 != durabilityRemainingOnBlock) {
|
||||
worldObj.destroyBlockInWorldPartially(player.entityId, coords.posX, coords.posY, coords.posZ, var5);
|
||||
durabilityRemainingOnBlock = var5;
|
||||
}
|
||||
|
||||
if (var4 >= 1F) {
|
||||
tryHarvestBlock(coords.posX, coords.posY, coords.posZ);
|
||||
stopBreaking();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Copied from ItemInWorldManager, seems to do the trick.
|
||||
public boolean tryHarvestBlock(int par1, int par2, int par3) {
|
||||
ItemStack stack = getStackInSlot(0);
|
||||
if (stack != null && stack.getItem().onBlockStartBreak(stack, par1, par2, par3, player))
|
||||
return false;
|
||||
|
||||
int var4 = worldObj.getBlockId(par1, par2, par3);
|
||||
int var5 = worldObj.getBlockMetadata(par1, par2, par3);
|
||||
worldObj.playAuxSFXAtEntity(player, 2001, par1, par2, par3, var4 + (var5 << 12));
|
||||
boolean var6 = false;
|
||||
|
||||
boolean var8 = false;
|
||||
Block block = Block.blocksList[var4];
|
||||
if (block != null)
|
||||
var8 = block.canHarvestBlock(player, var5);
|
||||
|
||||
worldObj.loadedEntityList.size();
|
||||
if (stack != null)
|
||||
stack.onBlockDestroyed(worldObj, var4, par1, par2, par3, player);
|
||||
|
||||
var6 = removeBlock(par1, par2, par3);
|
||||
if (var6 && var8)
|
||||
Block.blocksList[var4].harvestBlock(worldObj, player, par1, par2, par3, var5);
|
||||
|
||||
return var6;
|
||||
}
|
||||
|
||||
// Copied from ItemInWorldManager, seems to do the trick.
|
||||
private boolean removeBlock(int par1, int par2, int par3) {
|
||||
Block var4 = Block.blocksList[worldObj.getBlockId(par1, par2, par3)];
|
||||
int var5 = worldObj.getBlockMetadata(par1, par2, par3);
|
||||
|
||||
if (var4 != null)
|
||||
var4.onBlockHarvested(worldObj, par1, par2, par3, var5, player);
|
||||
|
||||
boolean var6 = var4 != null && var4.removeBlockByPlayer(worldObj, player, par1, par2, par3);
|
||||
|
||||
if (var4 != null && var6)
|
||||
var4.onBlockDestroyedByPlayer(worldObj, par1, par2, par3, var5);
|
||||
|
||||
return var6;
|
||||
}
|
||||
|
||||
public boolean detect() {
|
||||
ChunkCoordinates coords = getTargetLoc();
|
||||
findEntities(coords);
|
||||
return !worldObj.isAirBlock(coords.posX, coords.posY, coords.posZ) || !detectedEntities.isEmpty();
|
||||
}
|
||||
|
||||
public void findEntities(ChunkCoordinates coords) {
|
||||
AxisAlignedBB boundingBox = AxisAlignedBB.getBoundingBox(coords.posX, coords.posY, coords.posZ, coords.posX + 1, coords.posY + 1, coords.posZ + 1);
|
||||
detectedEntities = worldObj.getEntitiesWithinAABB(Entity.class, boundingBox);
|
||||
}
|
||||
|
||||
public ChunkCoordinates getTargetLoc() {
|
||||
ChunkCoordinates coords = new ChunkCoordinates(xCoord, yCoord, zCoord);
|
||||
|
||||
int meta = getBlockMetadata();
|
||||
int[] increase = LOC_INCREASES[(meta & 7) - 2];
|
||||
coords.posX += increase[0];
|
||||
coords.posZ += increase[1];
|
||||
|
||||
return coords;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean receiveClientEvent(int par1, int par2) {
|
||||
if(par1 == 0) {
|
||||
initiateSwing();
|
||||
return true;
|
||||
}
|
||||
|
||||
return tileEntityInvalid;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound par1NBTTagCompound) {
|
||||
super.readFromNBT(par1NBTTagCompound);
|
||||
|
||||
leftClick = par1NBTTagCompound.getBoolean(TAG_LEFT_CLICK);
|
||||
redstone = par1NBTTagCompound.getBoolean(TAG_REDSTONE);
|
||||
swingProgress = par1NBTTagCompound.getInteger(TAG_PROGRESS);
|
||||
swingMod = par1NBTTagCompound.getInteger(TAG_MOD);
|
||||
|
||||
NBTTagList var2 = par1NBTTagCompound.getTagList("Items");
|
||||
inventorySlots = new ItemStack[getSizeInventory()];
|
||||
for (int var3 = 0; var3 < var2.tagCount(); ++var3) {
|
||||
NBTTagCompound var4 = (NBTTagCompound)var2.tagAt(var3);
|
||||
byte var5 = var4.getByte("Slot");
|
||||
if (var5 >= 0 && var5 < inventorySlots.length)
|
||||
inventorySlots[var5] = ItemStack.loadItemStackFromNBT(var4);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound par1NBTTagCompound) {
|
||||
super.writeToNBT(par1NBTTagCompound);
|
||||
|
||||
par1NBTTagCompound.setBoolean(TAG_LEFT_CLICK, leftClick);
|
||||
par1NBTTagCompound.setBoolean(TAG_REDSTONE, redstone);
|
||||
par1NBTTagCompound.setInteger(TAG_PROGRESS, swingProgress);
|
||||
par1NBTTagCompound.setInteger(TAG_MOD, swingMod);
|
||||
|
||||
NBTTagList var2 = new NBTTagList();
|
||||
for (int var3 = 0; var3 < inventorySlots.length; ++var3) {
|
||||
if (inventorySlots[var3] != null) {
|
||||
NBTTagCompound var4 = new NBTTagCompound();
|
||||
var4.setByte("Slot", (byte)var3);
|
||||
inventorySlots[var3].writeToNBT(var4);
|
||||
var2.appendTag(var4);
|
||||
}
|
||||
}
|
||||
par1NBTTagCompound.setTag("Items", var2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSizeInventory() {
|
||||
return inventorySlots.length;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlot(int i) {
|
||||
return inventorySlots[i];
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack decrStackSize(int par1, int par2) {
|
||||
if (inventorySlots[par1] != null) {
|
||||
ItemStack stackAt;
|
||||
|
||||
if (inventorySlots[par1].stackSize <= par2) {
|
||||
stackAt = inventorySlots[par1];
|
||||
inventorySlots[par1] = null;
|
||||
return stackAt;
|
||||
} else {
|
||||
stackAt = inventorySlots[par1].splitStack(par2);
|
||||
|
||||
if (inventorySlots[par1].stackSize == 0)
|
||||
inventorySlots[par1] = null;
|
||||
|
||||
return stackAt;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlotOnClosing(int i) {
|
||||
return getStackInSlot(i);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInventorySlotContents(int i, ItemStack itemstack) {
|
||||
inventorySlots[i] = itemstack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInvName() {
|
||||
return LibBlockNames.ANIMATION_TABLET_D;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isInvNameLocalized() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInventoryStackLimit() {
|
||||
return 64;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isStackValidForSlot(int i, ItemStack itemstack) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUseableByPlayer(EntityPlayer entityplayer) {
|
||||
return worldObj.getBlockTileEntity(xCoord, yCoord, zCoord) != this ? false : entityplayer.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <= 64;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openChest() {
|
||||
// NO-OP
|
||||
}
|
||||
|
||||
@Override
|
||||
public void closeChest() {
|
||||
// NO-OP
|
||||
}
|
||||
|
||||
@Override
|
||||
public Packet getDescriptionPacket() {
|
||||
return PacketManager.generatePacket(new PacketAnimationTabletSync(this));
|
||||
}
|
||||
}
|
||||
@@ -1,223 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [28 Apr 2013, 17:32:35 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.tile;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.network.packet.Packet;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import thaumcraft.api.EnumTag;
|
||||
import thaumcraft.api.ObjectTags;
|
||||
import thaumcraft.common.aura.AuraManager;
|
||||
import thaumcraft.common.lib.ThaumcraftCraftingManager;
|
||||
import thaumcraft.common.tiles.TileInfusionWorkbench;
|
||||
import vazkii.tinkerer.inventory.slot.SlotTransmutator;
|
||||
import vazkii.tinkerer.lib.LibBlockNames;
|
||||
import vazkii.tinkerer.network.PacketManager;
|
||||
import vazkii.tinkerer.network.packet.PacketTransmutatorSync;
|
||||
|
||||
public class TileEntityTransmutator extends TileInfusionWorkbench implements ISidedInventory {
|
||||
|
||||
ItemStack[] inventorySlots = new ItemStack[2];
|
||||
public double ticksExisted = 0;
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
ItemStack stack = getStackInSlot(0);
|
||||
partTags = stack == null ? null : ThaumcraftCraftingManager.getObjectTags(stack);
|
||||
findSources(true);
|
||||
|
||||
super.updateEntity();
|
||||
if(getStackInSlot(0) != null)
|
||||
ticksExisted++;
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
if(hasAspectsAndVis()) {
|
||||
ItemStack setStack = getStackInSlot(0).copy();
|
||||
if(setStack.hasTagCompound()) {
|
||||
NBTTagCompound cmp = setStack.getTagCompound();
|
||||
cmp.removeTag("ench");
|
||||
}
|
||||
|
||||
setInventorySlotContents(1, setStack);
|
||||
}
|
||||
else setInventorySlotContents(1, null);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean hasAspectsAndVis() {
|
||||
if(getStackInSlot(0) == null)
|
||||
return false;
|
||||
|
||||
ObjectTags tags = ThaumcraftCraftingManager.getObjectTags(getStackInSlot(0));
|
||||
int value = SlotTransmutator.getTotalAspectValue(tags);
|
||||
boolean hasVis = value == 1 ? true : AuraManager.decreaseClosestAura(worldObj, xCoord, yCoord, zCoord, value * 2, false);
|
||||
if(!hasVis)
|
||||
return false;
|
||||
|
||||
for(EnumTag tag : tags.getAspects()) {
|
||||
int amount = tags.getAmount(tag);
|
||||
int transAmount = foundTags.getAmount(tag);
|
||||
if(transAmount < amount * 4)
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound par1NBTTagCompound) {
|
||||
super.readFromNBT(par1NBTTagCompound);
|
||||
|
||||
NBTTagList var2 = par1NBTTagCompound.getTagList("Items");
|
||||
inventorySlots = new ItemStack[getSizeInventory()];
|
||||
for (int var3 = 0; var3 < var2.tagCount(); ++var3) {
|
||||
NBTTagCompound var4 = (NBTTagCompound)var2.tagAt(var3);
|
||||
byte var5 = var4.getByte("Slot");
|
||||
if (var5 >= 0 && var5 < inventorySlots.length)
|
||||
inventorySlots[var5] = ItemStack.loadItemStackFromNBT(var4);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound par1NBTTagCompound) {
|
||||
super.writeToNBT(par1NBTTagCompound);
|
||||
|
||||
NBTTagList var2 = new NBTTagList();
|
||||
for (int var3 = 0; var3 < inventorySlots.length; ++var3) {
|
||||
if (inventorySlots[var3] != null) {
|
||||
NBTTagCompound var4 = new NBTTagCompound();
|
||||
var4.setByte("Slot", (byte)var3);
|
||||
inventorySlots[var3].writeToNBT(var4);
|
||||
var2.appendTag(var4);
|
||||
}
|
||||
}
|
||||
par1NBTTagCompound.setTag("Items", var2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSizeInventory() {
|
||||
return inventorySlots.length;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlot(int i) {
|
||||
if(i >= inventorySlots.length)
|
||||
return null;
|
||||
return inventorySlots[i];
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack decrStackSize(int par1, int par2) {
|
||||
if (inventorySlots[par1] != null) {
|
||||
ItemStack stackAt;
|
||||
|
||||
if (inventorySlots[par1].stackSize <= par2) {
|
||||
stackAt = inventorySlots[par1];
|
||||
inventorySlots[par1] = null;
|
||||
return stackAt;
|
||||
} else {
|
||||
stackAt = inventorySlots[par1].splitStack(par2);
|
||||
|
||||
if (inventorySlots[par1].stackSize == 0)
|
||||
inventorySlots[par1] = null;
|
||||
|
||||
return stackAt;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlotOnClosing(int i) {
|
||||
return getStackInSlot(i);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInventorySlotContents(int i, ItemStack itemstack) {
|
||||
inventorySlots[i] = itemstack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInvName() {
|
||||
return LibBlockNames.TRANSMUTATOR_D;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isInvNameLocalized() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInventoryStackLimit() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUseableByPlayer(EntityPlayer entityplayer) {
|
||||
return worldObj.getBlockTileEntity(xCoord, yCoord, zCoord) != this ? false : entityplayer.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <= 64;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openChest() {
|
||||
// NO-OP
|
||||
}
|
||||
|
||||
@Override
|
||||
public void closeChest() {
|
||||
// NO-OP
|
||||
}
|
||||
|
||||
@Override
|
||||
public Packet getDescriptionPacket() {
|
||||
return PacketManager.generatePacket(new PacketTransmutatorSync(this));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isStackValidForSlot(int i, ItemStack itemstack) {
|
||||
return i == 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getAccessibleSlotsFromSide(int var1) {
|
||||
return var1 == 1 ? new int[] { 1 } : new int[0];
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInsertItem(int i, ItemStack itemstack, int j) {
|
||||
return i == 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canExtractItem(int i, ItemStack itemstack, int j) {
|
||||
return canInsertItem(i, itemstack, j);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public int getStartInventorySide(ForgeDirection side) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public int getSizeInventorySide(ForgeDirection side) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@@ -1,190 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [5 May 2013, 15:03:49 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.tile;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import thaumcraft.common.tiles.TileOwned;
|
||||
import vazkii.tinkerer.lib.LibBlockNames;
|
||||
|
||||
public class TileEntityWardChest extends TileOwned implements ISidedInventory, net.minecraftforge.common.ISidedInventory {
|
||||
|
||||
private static final String TAG_CUSTOM_NAME = "customName";
|
||||
|
||||
private ItemStack[] inventorySlots = new ItemStack[54];
|
||||
public String customName;
|
||||
|
||||
public double ticksExisted;
|
||||
|
||||
@Override
|
||||
public boolean canUpdate() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
super.updateEntity();
|
||||
ticksExisted++;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound par1NBTTagCompound) {
|
||||
super.readFromNBT(par1NBTTagCompound);
|
||||
|
||||
customName = par1NBTTagCompound.getString(TAG_CUSTOM_NAME);
|
||||
|
||||
NBTTagList var2 = par1NBTTagCompound.getTagList("Items");
|
||||
inventorySlots = new ItemStack[getSizeInventory()];
|
||||
for (int var3 = 0; var3 < var2.tagCount(); ++var3) {
|
||||
NBTTagCompound var4 = (NBTTagCompound)var2.tagAt(var3);
|
||||
byte var5 = var4.getByte("Slot");
|
||||
if (var5 >= 0 && var5 < inventorySlots.length)
|
||||
inventorySlots[var5] = ItemStack.loadItemStackFromNBT(var4);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound par1NBTTagCompound) {
|
||||
super.writeToNBT(par1NBTTagCompound);
|
||||
|
||||
par1NBTTagCompound.setString(TAG_CUSTOM_NAME, customName == null ? "" : customName);
|
||||
|
||||
NBTTagList var2 = new NBTTagList();
|
||||
for (int var3 = 0; var3 < inventorySlots.length; ++var3) {
|
||||
if (inventorySlots[var3] != null) {
|
||||
NBTTagCompound var4 = new NBTTagCompound();
|
||||
var4.setByte("Slot", (byte)var3);
|
||||
inventorySlots[var3].writeToNBT(var4);
|
||||
var2.appendTag(var4);
|
||||
}
|
||||
}
|
||||
par1NBTTagCompound.setTag("Items", var2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSizeInventory() {
|
||||
return inventorySlots.length;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlot(int i) {
|
||||
if(i >= inventorySlots.length)
|
||||
return null;
|
||||
return inventorySlots[i];
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack decrStackSize(int par1, int par2) {
|
||||
if (inventorySlots[par1] != null) {
|
||||
ItemStack stackAt;
|
||||
|
||||
if (inventorySlots[par1].stackSize <= par2) {
|
||||
stackAt = inventorySlots[par1];
|
||||
inventorySlots[par1] = null;
|
||||
return stackAt;
|
||||
} else {
|
||||
stackAt = inventorySlots[par1].splitStack(par2);
|
||||
|
||||
if (inventorySlots[par1].stackSize == 0)
|
||||
inventorySlots[par1] = null;
|
||||
|
||||
return stackAt;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getStackInSlotOnClosing(int i) {
|
||||
return getStackInSlot(i);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setInventorySlotContents(int i, ItemStack itemstack) {
|
||||
inventorySlots[i] = itemstack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getInvName() {
|
||||
return isInvNameLocalized() ? customName : LibBlockNames.WARD_CHEST_D;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isInvNameLocalized() {
|
||||
return !MathHelper.stringNullOrLengthZero(customName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInventoryStackLimit() {
|
||||
return 64;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isUseableByPlayer(EntityPlayer entityplayer) {
|
||||
return entityplayer.username.equals(owner) ? worldObj.getBlockTileEntity(xCoord, yCoord, zCoord) != this ? false : entityplayer.getDistanceSq(xCoord + 0.5D, yCoord + 0.5D, zCoord + 0.5D) <= 64 : false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void openChest() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void closeChest() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean receiveClientEvent(int par1, int par2) {
|
||||
return tileEntityInvalid;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isStackValidForSlot(int i, ItemStack itemstack) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public int getStartInventorySide(ForgeDirection side) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public int getSizeInventorySide(ForgeDirection side) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getAccessibleSlotsFromSide(int var1) {
|
||||
return new int[0];
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canInsertItem(int i, ItemStack itemstack, int j) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canExtractItem(int i, ItemStack itemstack, int j) {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,70 +0,0 @@
|
||||
package vazkii.tinkerer.util.handler;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import net.minecraftforge.common.ConfigCategory;
|
||||
import net.minecraftforge.common.Configuration;
|
||||
import vazkii.tinkerer.lib.LibBlockIDs;
|
||||
import vazkii.tinkerer.lib.LibBlockNames;
|
||||
import vazkii.tinkerer.lib.LibItemIDs;
|
||||
import vazkii.tinkerer.lib.LibItemNames;
|
||||
import vazkii.tinkerer.lib.LibPotions;
|
||||
|
||||
public final class ConfigurationHandler {
|
||||
|
||||
private static Configuration config;
|
||||
|
||||
private static final String CATEGORY_POTIONS = "potions";
|
||||
|
||||
private static ConfigCategory categoryPotions;
|
||||
|
||||
public static void loadConfig(File configFile) {
|
||||
config = new Configuration(configFile);
|
||||
|
||||
categoryPotions = new ConfigCategory(CATEGORY_POTIONS);
|
||||
|
||||
config.load();
|
||||
|
||||
LibItemIDs.idWandTinkerer = loadItem(LibItemNames.WAND_TINKERER, LibItemIDs.DEFAULT_WAND_TINKERER);
|
||||
LibItemIDs.idGlowstoneGas = loadItem(LibItemNames.GLOWSTONE_GAS, LibItemIDs.DEFAULT_GLOWSTONE_GAS);
|
||||
LibItemIDs.idSpellCloth = loadItem(LibItemNames.SPELL_CLOTH, LibItemIDs.DEFAULT_SPELL_CLOTH);
|
||||
LibItemIDs.idStopwatch = loadItem(LibItemNames.STOPWATCH, LibItemIDs.DEFAULT_STOPWATCH);
|
||||
LibItemIDs.idWandDislocation = loadItem(LibItemNames.WAND_DISLOCATION, LibItemIDs.DEFAULT_WAND_DISLOCATION);
|
||||
LibItemIDs.idNametag = loadItem(LibItemNames.NAMETAG, LibItemIDs.DEFAULT_NAMETAG);
|
||||
LibItemIDs.idXpTalisman = loadItem(LibItemNames.XP_TALISMAN, LibItemIDs.DEFAULT_XP_TALISMAN);
|
||||
LibItemIDs.idFireBracelet = loadItem(LibItemNames.FIRE_BRACELET, LibItemIDs.DEFAULT_FIRE_BRACELET);
|
||||
LibItemIDs.idDarkQuartz = loadItem(LibItemNames.DARK_QUARTZ, LibItemIDs.DEFAULT_DARK_QUARTZ);
|
||||
LibItemIDs.idTeleportSigil = loadItem(LibItemNames.TELEPORTATION_SIGIL, LibItemIDs.DEFAULT_TELEPORT_SIGIL);
|
||||
LibItemIDs.idWandUprising = loadItem(LibItemNames.WAND_UPRISING, LibItemIDs.DEFAULT_WAND_UPRISING);
|
||||
LibItemIDs.idSwordCondor = loadItem(LibItemNames.SWORD_CONDOR, LibItemIDs.DEFAULT_SWORD_CONDOR);
|
||||
LibItemIDs.idDeathRune = loadItem(LibItemNames.DEATH_RUNE, LibItemIDs.DEFAULT_DEATH_RUNE);
|
||||
LibItemIDs.idSilkSword = loadItem(LibItemNames.SILK_SWORD, LibItemIDs.DEFAULT_SILK_SWORD);
|
||||
LibItemIDs.idFortuneMaul = loadItem(LibItemNames.FORTUNE_MAUL, LibItemIDs.DEFAULT_FORTUNE_MAUL);
|
||||
|
||||
LibBlockIDs.idGlowstoneGas = loadBlock(LibBlockNames.GLOWSTONE_GAS, LibBlockIDs.DEFAULT_GLOWSTONE_GAS);
|
||||
LibBlockIDs.idTransmutator = loadBlock(LibBlockNames.TRANSMUTATOR, LibBlockIDs.DEFAULT_TRANSMUTATOR);
|
||||
LibBlockIDs.idWardChest = loadBlock(LibBlockNames.WARD_CHEST, LibBlockIDs.DEFAULT_WARD_CHEST);
|
||||
LibBlockIDs.idDarkQuartz = loadBlock(LibBlockNames.DARK_QUARTZ, LibBlockIDs.DEFAULT_DARK_QUARTZ);
|
||||
LibBlockIDs.idDarkQuartzStairs = loadBlock(LibBlockNames.DARK_QUARTZ_STAIRS, LibBlockIDs.DEFAULT_DARK_QUARTZ_STAIRS);
|
||||
LibBlockIDs.idDarkQuartzSlab = loadBlock(LibBlockNames.DARK_QUARTZ_SLAB, LibBlockIDs.DEFAULT_DARK_QUARTZ_SLAB);
|
||||
LibBlockIDs.idDarkQuartzSlabFull = loadBlock(LibBlockNames.DARK_QUARTZ_SLAB_FULL, LibBlockIDs.DEFAULT_DARK_QUARTZ_SLAB_FULL);
|
||||
LibBlockIDs.idAnimationTablet = loadBlock(LibBlockNames.ANIMATION_TABLET, LibBlockIDs.DEFAULT_ANIMATION_TABLET);
|
||||
|
||||
LibPotions.idStopwatch = loadPotion(LibPotions.NAME_STOPWATCH, LibPotions.DEFAULT_ID_STOPWATCH);
|
||||
|
||||
config.save();
|
||||
}
|
||||
|
||||
private static int loadItem(String label, int defaultID) {
|
||||
return config.getItem(label, defaultID).getInt(defaultID);
|
||||
}
|
||||
|
||||
private static int loadBlock(String label, int defaultID) {
|
||||
return config.getBlock(label, defaultID).getInt(defaultID);
|
||||
}
|
||||
|
||||
private static int loadPotion(String label, int deafultID) {
|
||||
return config.get(CATEGORY_POTIONS, label, deafultID).getInt(deafultID);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [27 Apr 2013, 19:17:37 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.util.handler;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraftforge.event.EventPriority;
|
||||
import net.minecraftforge.event.ForgeSubscribe;
|
||||
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
|
||||
|
||||
public class EntityInteractionHandler {
|
||||
|
||||
private static EntityPlayer lastInteractingPlayer;
|
||||
|
||||
public static EntityPlayer getLastInteractingPlayer() {
|
||||
return lastInteractingPlayer;
|
||||
}
|
||||
|
||||
@ForgeSubscribe(priority = EventPriority.HIGHEST)
|
||||
public void onInteract(PlayerInteractEvent event) {
|
||||
lastInteractingPlayer = event.entityPlayer;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,57 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [28 Apr 2013, 17:54:47 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.util.handler;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import vazkii.tinkerer.client.gui.GuiAnimationTablet;
|
||||
import vazkii.tinkerer.client.gui.GuiTransmutator;
|
||||
import vazkii.tinkerer.inventory.container.ContainerAnimationTablet;
|
||||
import vazkii.tinkerer.inventory.container.ContainerTransmutator;
|
||||
import vazkii.tinkerer.lib.LibGuiIDs;
|
||||
import vazkii.tinkerer.tile.TileEntityAnimationTablet;
|
||||
import vazkii.tinkerer.tile.TileEntityTransmutator;
|
||||
import cpw.mods.fml.common.network.IGuiHandler;
|
||||
|
||||
public final class GuiHandler implements IGuiHandler {
|
||||
|
||||
@Override
|
||||
public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
TileEntity tile = world.getBlockTileEntity(x, y, z);
|
||||
switch(ID) {
|
||||
case LibGuiIDs.ID_TRANSMUTATOR :
|
||||
return new ContainerTransmutator((TileEntityTransmutator) tile, player.inventory);
|
||||
|
||||
case LibGuiIDs.ID_ANIMATION_TABLET :
|
||||
return new ContainerAnimationTablet((TileEntityAnimationTablet) tile, player.inventory);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
TileEntity tile = world.getBlockTileEntity(x, y, z);
|
||||
switch(ID) {
|
||||
case LibGuiIDs.ID_TRANSMUTATOR :
|
||||
return new GuiTransmutator((TileEntityTransmutator) tile, player.inventory);
|
||||
|
||||
case LibGuiIDs.ID_ANIMATION_TABLET :
|
||||
return new GuiAnimationTablet((TileEntityAnimationTablet) tile, player.inventory);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [11 May 2013, 22:37:43 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.util.handler;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraftforge.event.ForgeSubscribe;
|
||||
import net.minecraftforge.event.entity.living.LivingDeathEvent;
|
||||
import vazkii.tinkerer.entity.EntityDeathRune;
|
||||
import vazkii.tinkerer.item.ModItems;
|
||||
|
||||
public final class PlayerDeathHandler {
|
||||
|
||||
@ForgeSubscribe
|
||||
public void onEntityDeath(LivingDeathEvent event) {
|
||||
if(event.entity instanceof EntityPlayer && !event.entity.worldObj.isRemote) {
|
||||
EntityPlayer player = (EntityPlayer) event.entity;
|
||||
if(player.inventory.consumeInventoryItem(ModItems.deathRune.itemID)) {
|
||||
EntityDeathRune rune = new EntityDeathRune(player);
|
||||
rune.setPosition(player.posX, player.posY + 1.6, player.posZ);
|
||||
player.worldObj.spawnEntityInWorld(rune);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,135 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [25 Apr 2013, 16:01:47 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.util.helper;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
public final class ItemNBTHelper {
|
||||
|
||||
/** Checks if an ItemStack has a Tag Compound **/
|
||||
public static boolean detectNBT(ItemStack stack) {
|
||||
return stack.hasTagCompound();
|
||||
}
|
||||
|
||||
/** Tries to initialize an NBT Tag Compound in an ItemStack,
|
||||
* this will not do anything if the stack already has a tag
|
||||
* compound **/
|
||||
public static void initNBT(ItemStack stack) {
|
||||
if(!detectNBT(stack))
|
||||
injectNBT(stack, new NBTTagCompound());
|
||||
}
|
||||
|
||||
/** Injects an NBT Tag Compound to an ItemStack, no checks
|
||||
* are made previously **/
|
||||
public static void injectNBT(ItemStack stack, NBTTagCompound nbt) {
|
||||
stack.setTagCompound(nbt);
|
||||
}
|
||||
|
||||
/** Gets the NBTTagCompound in an ItemStack. Tries to init it
|
||||
* previously in case there isn't one present **/
|
||||
public static NBTTagCompound getNBT(ItemStack stack) {
|
||||
initNBT(stack);
|
||||
return stack.getTagCompound();
|
||||
}
|
||||
|
||||
// SETTERS ///////////////////////////////////////////////////////////////////
|
||||
|
||||
public static void setBoolean(ItemStack stack, String tag, boolean b) {
|
||||
getNBT(stack).setBoolean(tag, b);
|
||||
}
|
||||
|
||||
public static void setByte(ItemStack stack, String tag, byte b) {
|
||||
getNBT(stack).setByte(tag, b);
|
||||
}
|
||||
|
||||
public static void setShort(ItemStack stack, String tag, short s) {
|
||||
getNBT(stack).setShort(tag, s);
|
||||
}
|
||||
|
||||
public static void setInt(ItemStack stack, String tag, int i) {
|
||||
getNBT(stack).setInteger(tag, i);
|
||||
}
|
||||
|
||||
public static void setLong(ItemStack stack, String tag, long l) {
|
||||
getNBT(stack).setLong(tag, l);
|
||||
}
|
||||
|
||||
public static void setFloat(ItemStack stack, String tag, float f) {
|
||||
getNBT(stack).setFloat(tag, f);
|
||||
}
|
||||
|
||||
public static void setDouble(ItemStack stack, String tag, double d) {
|
||||
getNBT(stack).setDouble(tag, d);
|
||||
}
|
||||
|
||||
public static void setCompound(ItemStack stack, String tag, NBTTagCompound cmp) {
|
||||
if(!tag.equalsIgnoreCase("ench")) // not override the enchantments
|
||||
getNBT(stack).setCompoundTag(tag, cmp);
|
||||
}
|
||||
|
||||
public static void setCompound(ItemStack stack, NBTTagCompound cmp) {
|
||||
setCompound(stack, cmp.getName(), cmp);
|
||||
}
|
||||
|
||||
public static void setString(ItemStack stack, String tag, String s) {
|
||||
getNBT(stack).setString(tag, s);
|
||||
}
|
||||
|
||||
// GETTERS ///////////////////////////////////////////////////////////////////
|
||||
|
||||
public static boolean verifyExistance(ItemStack stack, String tag) {
|
||||
return getNBT(stack).hasKey(tag);
|
||||
}
|
||||
|
||||
public static boolean getBoolean(ItemStack stack, String tag, boolean defaultExpected) {
|
||||
return verifyExistance(stack, tag) ? getNBT(stack).getBoolean(tag) : defaultExpected;
|
||||
}
|
||||
|
||||
public static byte getByte(ItemStack stack, String tag, byte defaultExpected) {
|
||||
return verifyExistance(stack, tag) ? getNBT(stack).getByte(tag) : defaultExpected;
|
||||
}
|
||||
|
||||
public static short getShort(ItemStack stack, String tag, short defaultExpected) {
|
||||
return verifyExistance(stack, tag) ? getNBT(stack).getShort(tag) : defaultExpected;
|
||||
}
|
||||
|
||||
public static int getInt(ItemStack stack, String tag, int defaultExpected) {
|
||||
return verifyExistance(stack, tag) ? getNBT(stack).getInteger(tag) : defaultExpected;
|
||||
}
|
||||
|
||||
public static long getLong(ItemStack stack, String tag, long defaultExpected) {
|
||||
return verifyExistance(stack, tag) ? getNBT(stack).getLong(tag) : defaultExpected;
|
||||
}
|
||||
|
||||
public static float getFloat(ItemStack stack, String tag, float defaultExpected) {
|
||||
return verifyExistance(stack, tag) ? getNBT(stack).getFloat(tag) : defaultExpected;
|
||||
}
|
||||
|
||||
public static double getDouble(ItemStack stack, String tag, double defaultExpected) {
|
||||
return verifyExistance(stack, tag) ? getNBT(stack).getDouble(tag) : defaultExpected;
|
||||
}
|
||||
|
||||
/** If nullifyOnFail is true it'll return null if it doesn't find any
|
||||
* compounds, otherwise it'll return a new one. **/
|
||||
public static NBTTagCompound getCompound(ItemStack stack, String tag, boolean nullifyOnFail) {
|
||||
return verifyExistance(stack, tag) ? getNBT(stack).getCompoundTag(tag) : nullifyOnFail ? null : new NBTTagCompound();
|
||||
}
|
||||
|
||||
public static String getString(ItemStack stack, String tag, String defaultExpected) {
|
||||
return verifyExistance(stack, tag) ? getNBT(stack).getString(tag) : defaultExpected;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [24 Apr 2013, 22:59:12 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.util.helper;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.entity.EntityClientPlayerMP;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public final class MiscHelper {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static Minecraft getMc() {
|
||||
return Minecraft.getMinecraft();
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public static EntityClientPlayerMP getClientPlayer() {
|
||||
return getMc().thePlayer;
|
||||
}
|
||||
|
||||
public static String stackAsString(ItemStack stack) {
|
||||
return stack == null ? "null" : stack.itemID + ":" + stack.getItemDamage();
|
||||
}
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the ThaumicTinkerer Mod.
|
||||
*
|
||||
* ThaumicTinkerer is Open Source and distributed under a
|
||||
* Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License
|
||||
* (http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
*
|
||||
* ThaumicTinkerer is a Derivative Work on Thaumcraft 3.
|
||||
* Thaumcraft 3 © Azanor 2012
|
||||
* (http://www.minecraftforum.net/topic/1585216-)
|
||||
*
|
||||
* File Created @ [24 Apr 2013, 22:54:50 (GMT)]
|
||||
*/
|
||||
package vazkii.tinkerer.util.helper;
|
||||
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import vazkii.tinkerer.item.ModItems;
|
||||
import vazkii.tinkerer.lib.LibMisc;
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ModCreativeTab extends CreativeTabs {
|
||||
|
||||
public static final ModCreativeTab INSTANCE = new ModCreativeTab();
|
||||
|
||||
public ModCreativeTab() {
|
||||
super(LibMisc.MOD_ID);
|
||||
LanguageRegistry.instance().addStringLocalization("itemGroup." + LibMisc.MOD_ID, LibMisc.MOD_NAME);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public Item getTabIconItem() {
|
||||
return ModItems.wandTinkerer;
|
||||
}
|
||||
}
|
||||
@@ -4,11 +4,18 @@ Welcome to the Thaumic Tinkerer Github Repo.
|
||||
|
||||
Thaumic Tinkerer is a Thaumcraft addon, it's intention is to add new content to Thaumcraft, and bring back some oldies, but goodies.
|
||||
|
||||
[Thaumic Tinkerer MCF Thread](http://www.minecraftforum.net/topic/1813058-)
|
||||
|
||||
Thaumcraft © Azanor 2012
|
||||
[Thaumcraft MCF Thread](http://www.minecraftforum.net/topic/1585216-)
|
||||
|
||||
This mod is made with a Deobfuscated version of Thaumcraft, loaded as a Library. You can get a deobfuscated version of Thaumcraft using immibis' [Bearded Octo Nemesis](https://github.com/immibis/bearded-octo-nemesis). Remember that Thaumcraft is a closed-source mod, you can not decompile it, and I don't do so.
|
||||
|
||||
This mod is made with a Deobfuscated version of Thaumcraft, loaded as a Library. You can get a deobfuscated version of Thaumcraft using immibis' [Bearded Octo Nemesis](https://github.com/immibis/bearded-octo-nemesis).
|
||||

|
||||
|
||||
Thaumic Tinkerer by Vazkii is licensed under a [Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License](http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
Thaumic Tinkerer Was originally by Vazkii and is licensed under a [Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License](http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_GB)
|
||||
|
||||
|
||||
# Fork
|
||||
This mod was forked by the GT:NH Team to continue the development of the 1.7.10 Branch.
|
||||
The up-to-date Master branch can be found on our Jenkins:
|
||||
http://jenkins.usrv.de
|
||||
+644
@@ -0,0 +1,644 @@
|
||||
//version: 1642964305
|
||||
/*
|
||||
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 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.6'
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
id 'idea'
|
||||
id 'eclipse'
|
||||
id 'scala'
|
||||
id("org.ajoberstar.grgit") version("3.1.1")
|
||||
id("com.github.johnrengelman.shadow") version("4.0.4")
|
||||
id("com.palantir.git-version") version("0.12.3")
|
||||
id('de.undercouch.download') version('4.1.2')
|
||||
id("maven-publish")
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
String javaSourceDir = "src/main/java/"
|
||||
String scalaSourceDir = "src/main/scala/"
|
||||
|
||||
String targetPackageJava = javaSourceDir + modGroup.toString().replaceAll("\\.", "/")
|
||||
String targetPackageScala = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/")
|
||||
if((getFile(targetPackageJava).exists() || getFile(targetPackageScala).exists()) == false) {
|
||||
throw new GradleException("Could not resolve \"modGroup\"! Could not find " + targetPackageJava + " or " + targetPackageScala)
|
||||
}
|
||||
|
||||
if(apiPackage) {
|
||||
targetPackageJava = javaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + apiPackage.toString().replaceAll("\\.", "/")
|
||||
targetPackageScala = scalaSourceDir + modGroup.toString().replaceAll("\\.", "/") + "/" + apiPackage.toString().replaceAll("\\.", "/")
|
||||
if((getFile(targetPackageJava).exists() || getFile(targetPackageScala).exists()) == false) {
|
||||
throw new GradleException("Could not resolve \"apiPackage\"! Could not find " + targetPackageJava + " or " + targetPackageScala)
|
||||
}
|
||||
}
|
||||
|
||||
if(accessTransformersFile) {
|
||||
String targetFile = "src/main/resources/META-INF/" + accessTransformersFile
|
||||
if(getFile(targetFile).exists() == false) {
|
||||
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("\\.", "/")
|
||||
if((getFile(targetPackageJava).exists() || getFile(targetPackageScala).exists()) == false) {
|
||||
throw new GradleException("Could not resolve \"mixinsPackage\"! Could not find " + targetPackageJava + " or " + targetPackageScala)
|
||||
}
|
||||
|
||||
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"
|
||||
if((getFile(targetFileJava).exists() || getFile(targetFileScala).exists() || getFile(targetFileScalaJava).exists()) == false) {
|
||||
throw new GradleException("Could not resolve \"mixinPlugin\"! Could not find " + targetFileJava + " or " + targetFileScala + " or " + targetFileScalaJava)
|
||||
}
|
||||
}
|
||||
|
||||
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"
|
||||
if((getFile(targetFileJava).exists() || getFile(targetFileScala).exists() || getFile(targetFileScalaJava).exists()) == false) {
|
||||
throw new GradleException("Could not resolve \"coreModClass\"! Could not find " + targetFileJava + " or " + targetFileScala + " or " + targetFileScalaJava)
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
'git config core.fileMode false'.execute()
|
||||
|
||||
// Pulls version first from the VERSION env and then git tag
|
||||
String identifiedVersion
|
||||
try {
|
||||
String versionOverride = System.getenv("VERSION") ?: null
|
||||
identifiedVersion = versionOverride == null ? gitVersion() : versionOverride
|
||||
version = minecraftVersion + "-" + identifiedVersion
|
||||
}
|
||||
catch (Exception e) {
|
||||
throw new IllegalStateException("This mod must be version controlled by Git AND the repository must provide at least one tag, or the VERSION override must be set!");
|
||||
}
|
||||
|
||||
group = modGroup
|
||||
if(project.hasProperty("customArchiveBaseName") && customArchiveBaseName) {
|
||||
archivesBaseName = customArchiveBaseName
|
||||
}
|
||||
else {
|
||||
archivesBaseName = modId
|
||||
}
|
||||
|
||||
minecraft {
|
||||
version = minecraftVersion + "-" + forgeVersion + "-" + minecraftVersion
|
||||
runDir = "run"
|
||||
|
||||
if (replaceGradleTokenInFile) {
|
||||
replaceIn replaceGradleTokenInFile
|
||||
if(gradleTokenModId) {
|
||||
replace gradleTokenModId, modId
|
||||
}
|
||||
if(gradleTokenModName) {
|
||||
replace gradleTokenModName, modName
|
||||
}
|
||||
if(gradleTokenVersion) {
|
||||
replace gradleTokenVersion, versionDetails().lastTag
|
||||
}
|
||||
if(gradleTokenGroupName) {
|
||||
replace gradleTokenGroupName, modGroup
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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)
|
||||
}
|
||||
|
||||
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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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")
|
||||
}
|
||||
}
|
||||
|
||||
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()) {
|
||||
getFile("/src/main/resources/mixins." + modId + ".json").text = """{
|
||||
"required": true,
|
||||
"minVersion": "0.7.11",
|
||||
"package": "${modGroup}.${mixinsPackage}",
|
||||
"plugin": "${modGroup}.${mixinPlugin}",
|
||||
"refmap": "${mixingConfigRefMap}",
|
||||
"target": "@env(DEFAULT)",
|
||||
"compatibilityLevel": "JAVA_8"
|
||||
}
|
||||
|
||||
"""
|
||||
}
|
||||
}
|
||||
|
||||
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"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
def arguments = []
|
||||
def jvmArguments = []
|
||||
if(usesMixins.toBoolean()) {
|
||||
arguments += [
|
||||
"--tweakClass org.spongepowered.asm.launch.MixinTweaker"
|
||||
]
|
||||
jvmArguments += [
|
||||
"-Dmixin.debug=true", "-Dmixin.debug.countInjections=true", "-Dmixin.debug.verbose=true", "-Dmixin.debug.export=true"
|
||||
]
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
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'
|
||||
|
||||
// replace version and mcversion
|
||||
expand "minecraftVersion": project.minecraft.version,
|
||||
"modVersion": versionDetails().lastTag,
|
||||
"modId": modId,
|
||||
"modName": modName
|
||||
}
|
||||
|
||||
if(usesMixins.toBoolean()) {
|
||||
from refMap
|
||||
}
|
||||
|
||||
// copy everything else, thats not the mcmod.info
|
||||
from(sourceSets.main.resources.srcDirs) {
|
||||
exclude 'mcmod.info'
|
||||
}
|
||||
}
|
||||
|
||||
def getManifestAttributes() {
|
||||
def manifestAttributes = [:]
|
||||
if(containsMixinsAndOrCoreModOnly.toBoolean() == false && (usesMixins.toBoolean() || coreModClass)) {
|
||||
manifestAttributes += ["FMLCorePluginContainsFMLMod": true]
|
||||
}
|
||||
|
||||
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() == false
|
||||
]
|
||||
}
|
||||
return manifestAttributes
|
||||
}
|
||||
|
||||
task sourcesJar(type: Jar) {
|
||||
from (sourceSets.main.allJava)
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
task apiJar(type: Jar) {
|
||||
from (sourceSets.main.allJava) {
|
||||
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')
|
||||
}
|
||||
|
||||
artifacts {
|
||||
if(!noPublishedSources) {
|
||||
archives sourcesJar
|
||||
}
|
||||
archives devJar
|
||||
if(apiPackage) {
|
||||
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
|
||||
}
|
||||
|
||||
|
||||
// publishing
|
||||
publishing {
|
||||
publications {
|
||||
maven(MavenPublication) {
|
||||
from components.java
|
||||
if(usesShadowedDependencies.toBoolean()) {
|
||||
artifact source: shadowJar, classifier: ""
|
||||
}
|
||||
if(!noPublishedSources) {
|
||||
artifact source: sourcesJar, classifier: "src"
|
||||
}
|
||||
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 all non GTNH deps here.
|
||||
// Original intention was to remove an invalid forgeBin being generated without a groupId (mandatory), but
|
||||
// it also removes all of the MC deps
|
||||
pom.withXml {
|
||||
Node pomNode = asNode()
|
||||
pomNode.dependencies.'*'.findAll() {
|
||||
it.groupId.text() != 'com.github.GTNewHorizons'
|
||||
}.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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Updating
|
||||
task updateBuildScript {
|
||||
doLast {
|
||||
if (performBuildScriptUpdate(projectDir.toString())) return
|
||||
|
||||
print("Build script already up-to-date!")
|
||||
}
|
||||
}
|
||||
|
||||
if (isNewBuildScriptVersionAvailable(projectDir.toString())) {
|
||||
if (autoUpdateBuildScript.toBoolean()) {
|
||||
performBuildScriptUpdate(projectDir.toString())
|
||||
} else {
|
||||
println("Build script update available! Run 'gradle updateBuildScript'")
|
||||
}
|
||||
}
|
||||
|
||||
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 } }
|
||||
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, String fileName) {
|
||||
def bon2File = "$projectDir/deobf/BON2-2.5.0.jar"
|
||||
def cacheFile = "$projectDir/deobf/out/" + fileName + ".jar"
|
||||
def deobfFile = "$projectDir/deobf/out/" + fileName + "-deobf.jar"
|
||||
|
||||
if(file(deobfFile).exists()) {
|
||||
return files(deobfFile)
|
||||
}
|
||||
|
||||
download {
|
||||
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 {
|
||||
src sourceURL
|
||||
dest cacheFile
|
||||
quiet true
|
||||
overwrite false
|
||||
}
|
||||
|
||||
exec {
|
||||
commandLine 'java', '-jar', bon2File, '--inputJar', cacheFile, '--outputJar', deobfFile, '--mcVer', '1.7.10', '--mappingsVer', 'stable_12', '--notch'
|
||||
workingDir "$projectDir/deobf"
|
||||
standardOutput = new ByteArrayOutputStream()
|
||||
}
|
||||
|
||||
delete(cacheFile)
|
||||
return files(deobfFile)
|
||||
}
|
||||
|
||||
// Helper methods
|
||||
|
||||
def checkPropertyExists(String propertyName) {
|
||||
if (project.hasProperty(propertyName) == false) {
|
||||
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)
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
#CodeChickenCore configuration file.
|
||||
|
||||
#set to true to completely deobfuscate mcp names
|
||||
dev.deobfuscate=true
|
||||
dev.mappingDir=C:\minecraftDev\forge\mcp\conf
|
||||
@@ -0,0 +1,54 @@
|
||||
# Configuration file
|
||||
|
||||
general {
|
||||
# Set to true to disable Forge's version check mechanics. Forge queries a small json file on our server for version information. For more details see the ForgeVersion class in our github.
|
||||
B:disableVersionCheck=false
|
||||
|
||||
# Controls the number threshold at which Packet51 is preferred over Packet52, default and minimum 64, maximum 1024
|
||||
I:clumpingThreshold=64
|
||||
|
||||
# Set to true to enable the post initialization sorting of crafting recipes using Forge's sorter. May cause desyncing on conflicting recipies. MUST RESTART MINECRAFT IF CHANGED FROM THE CONFIG GUI.
|
||||
B:sortRecipies=true
|
||||
|
||||
# Set this to true to force a crash if more than one block attempts to link back to the same Fluid. Enabled by default.
|
||||
B:forceDuplicateFluidBlockCrash=true
|
||||
|
||||
# Set this to true to remove any Entity that throws an error in its update method instead of closing the server and reporting a crash log. BE WARNED THIS COULD SCREW UP EVERYTHING USE SPARINGLY WE ARE NOT RESPONSIBLE FOR DAMAGES.
|
||||
B:removeErroringEntities=false
|
||||
|
||||
# Set this to true to remove any TileEntity that throws an error in its update method instead of closing the server and reporting a crash log. BE WARNED THIS COULD SCREW UP EVERYTHING USE SPARINGLY WE ARE NOT RESPONSIBLE FOR DAMAGES.
|
||||
B:removeErroringTileEntities=false
|
||||
|
||||
# Set this to true to check the entire entity's collision bounding box for ladders instead of just the block they are in. Causes noticable differences in mechanics so default is vanilla behavior. Default: false
|
||||
B:fullBoundingBoxLadders=false
|
||||
|
||||
# Control the range of sky blending for colored skies in biomes.
|
||||
I:biomeSkyBlendRange <
|
||||
2
|
||||
4
|
||||
6
|
||||
8
|
||||
10
|
||||
12
|
||||
14
|
||||
16
|
||||
18
|
||||
20
|
||||
22
|
||||
24
|
||||
26
|
||||
28
|
||||
30
|
||||
32
|
||||
34
|
||||
>
|
||||
|
||||
# Base zombie summoning spawn chance. Allows changing the bonus zombie summoning mechanic.
|
||||
D:zombieBaseSummonChance=0.1
|
||||
|
||||
# Chance that a zombie (or subclass) is a baby. Allows changing the zombie spawning mechanic.
|
||||
D:zombieBabyChance=0.05
|
||||
B:enableGlobalConfig=false
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
// Add your dependencies here
|
||||
|
||||
dependencies {
|
||||
compile("com.github.GTNewHorizons:Baubles:1.0.1.14:dev")
|
||||
compile("com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-70-GTNH:api")
|
||||
|
||||
compile("thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev")
|
||||
|
||||
compileOnly("com.github.GTNewHorizons:Botania:master-SNAPSHOT:dev") {
|
||||
transitive = false
|
||||
}
|
||||
compileOnly("com.github.GTNewHorizons:EnderCore:0.2.6:dev") {
|
||||
transitive = false
|
||||
}
|
||||
compileOnly("com.github.GTNewHorizons:EnderIO:2.3.1.27:dev") {
|
||||
transitive = false
|
||||
}
|
||||
compileOnly("com.github.GTNewHorizons:EnderStorage:1.4.11:dev") {
|
||||
transitive = false
|
||||
}
|
||||
compileOnly("com.github.GTNewHorizons:waila:1.5.18:api") {
|
||||
transitive = false
|
||||
}
|
||||
compileOnly("com.github.GTNewHorizons:TinkersConstruct:1.9.0.10-GTNH:dev") {
|
||||
transitive = false
|
||||
}
|
||||
compileOnly("com.github.GTNewHorizons:ForgeMultipart:1.2.7:dev") {
|
||||
transitive = false
|
||||
}
|
||||
compileOnly("com.github.GTNewHorizons:CodeChickenLib:1.1.5.1:dev") {
|
||||
transitive = false
|
||||
}
|
||||
compileOnly("com.github.GTNewHorizons:OpenComputers:1.7.5.20-GTNH:api") {
|
||||
transitive = false
|
||||
}
|
||||
|
||||
compileOnly("curse.maven:computercraft-67504:2269339") {
|
||||
transitive = false
|
||||
}
|
||||
compileOnly("curse.maven:cofh-lib-220333:2388748") {
|
||||
transitive = false
|
||||
}
|
||||
compileOnly("curse.maven:cofh-core-69162:2388751") {
|
||||
transitive = false
|
||||
}
|
||||
compileOnly("net.industrial-craft:industrialcraft-2:2.2.828-experimental:api") {
|
||||
transitive = false
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
modName = Thaumic Tinkerer
|
||||
|
||||
# This is a case-sensitive string to identify your mod. Convention is to use lower case.
|
||||
modId = ThaumicTinkerer
|
||||
|
||||
modGroup = thaumic.tinkerer
|
||||
|
||||
# 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 user name 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 mods 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 = LibMisc.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. I must be placed into /src/main/resources/META-INF/
|
||||
# Example value: mymodid_at.cfg
|
||||
accessTransformersFile = ThaumicTinkerer_at.cfg
|
||||
|
||||
# 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 = preloader.ThaumicTLoaderContainer
|
||||
# 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
|
||||
|
||||
# Optional parameter to customize the produced artifacts. Use this to preserver artifact naming when migrating older
|
||||
# projects. New projects should not use this parameter.
|
||||
#customArchiveBaseName =
|
||||
Vendored
BIN
Binary file not shown.
+5
@@ -0,0 +1,5 @@
|
||||
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
|
||||
@@ -0,0 +1,188 @@
|
||||
#!/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.
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
## Gradle start up script for UN*X
|
||||
##
|
||||
##############################################################################
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
# Resolve links: $0 may be a link
|
||||
PRG="$0"
|
||||
# Need this for relative symlinks.
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`"/$link"
|
||||
fi
|
||||
done
|
||||
SAVED="`pwd`"
|
||||
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||
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
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD="java"
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
||||
MAX_FD_LIMIT=`ulimit -H -n`
|
||||
if [ $? -eq 0 ] ; then
|
||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||
MAX_FD="$MAX_FD_LIMIT"
|
||||
fi
|
||||
ulimit -n $MAX_FD
|
||||
if [ $? -ne 0 ] ; then
|
||||
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
||||
fi
|
||||
else
|
||||
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
||||
fi
|
||||
fi
|
||||
|
||||
# For Darwin, add options to specify how the application appears in the dock
|
||||
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
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||
|
||||
# We build the pattern for arguments to be converted via cygpath
|
||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||
SEP=""
|
||||
for dir in $ROOTDIRSRAW ; do
|
||||
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
||||
SEP="|"
|
||||
done
|
||||
OURCYGPATTERN="(^($ROOTDIRS))"
|
||||
# Add a user-defined pattern to the cygpath arguments
|
||||
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
||||
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
||||
fi
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
i=0
|
||||
for arg in "$@" ; do
|
||||
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
||||
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
||||
|
||||
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
||||
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
||||
else
|
||||
eval `echo args$i`="\"$arg\""
|
||||
fi
|
||||
i=$((i+1))
|
||||
done
|
||||
case $i in
|
||||
(0) set -- ;;
|
||||
(1) set -- "$args0" ;;
|
||||
(2) set -- "$args0" "$args1" ;;
|
||||
(3) set -- "$args0" "$args1" "$args2" ;;
|
||||
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Escape application args
|
||||
save () {
|
||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||
echo " "
|
||||
}
|
||||
APP_ARGS=$(save "$@")
|
||||
|
||||
# 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" "$@"
|
||||
Vendored
+100
@@ -0,0 +1,100 @@
|
||||
@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
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
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
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto init
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:init
|
||||
@rem Get command-line arguments, handling Windows variants
|
||||
|
||||
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||
|
||||
:win9xME_args
|
||||
@rem Slurp the command line arguments.
|
||||
set CMD_LINE_ARGS=
|
||||
set _SKIP=2
|
||||
|
||||
:win9xME_args_slurp
|
||||
if "x%~1" == "x" goto execute
|
||||
|
||||
set CMD_LINE_ARGS=%*
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
Loaded 100 of 778 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user