mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
Compare commits
654 Commits
1.0.27_X54
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6bb6b5426c | ||
|
|
492703ab23 | ||
|
|
b4d0122cfc | ||
|
|
f809843745 | ||
|
|
6401ffde19 | ||
|
|
1aba934d36 | ||
|
|
69c1ed01fa | ||
|
|
e776b4c8d9 | ||
|
|
6fa00c5771 | ||
|
|
69c1f49f55 | ||
|
|
ade48e4ac7 | ||
|
|
6c1fd10a50 | ||
|
|
a2fd0ea108 | ||
|
|
33a4b983e5 | ||
|
|
0d431e387b | ||
|
|
f0a1eaaaff | ||
|
|
165fd062f4 | ||
|
|
7b18634b34 | ||
|
|
99ca4628dc | ||
|
|
b892f0cc37 | ||
|
|
7664cacd2f | ||
|
|
e96e821146 | ||
|
|
e02e4f6aae | ||
|
|
c1464f2881 | ||
|
|
91dd4cc218 | ||
|
|
6cadca0d89 | ||
|
|
5c9d71c626 | ||
|
|
bd03028170 | ||
|
|
67aee6a2e0 | ||
|
|
223fe240c1 | ||
|
|
5cb013d545 | ||
|
|
82293e46cd | ||
|
|
2e7af7058c | ||
|
|
cc816b40e0 | ||
|
|
64fc72e18a | ||
|
|
76c6222f45 | ||
|
|
2f8b0dde49 | ||
|
|
712ae952df | ||
|
|
b2df165b4b | ||
|
|
90e148e022 | ||
|
|
52440fca2f | ||
|
|
292b989e09 | ||
|
|
b0e0b54def | ||
|
|
51b758e103 | ||
|
|
d25cef888d | ||
|
|
62ce75f458 | ||
|
|
c146829bf4 | ||
|
|
b60cf07e98 | ||
|
|
0e30985963 | ||
|
|
a491b16dfe | ||
|
|
026c0d074e | ||
|
|
6cc60c0234 | ||
|
|
1f17af27f7 | ||
|
|
8aa9ff2895 | ||
|
|
5c0ff2b603 | ||
|
|
3c461313bc | ||
|
|
71fb9a814d | ||
|
|
27e4cd32aa | ||
|
|
8bdce3a4b3 | ||
|
|
4bfce2ba92 | ||
|
|
5ec68643f8 | ||
|
|
65ea177ac0 | ||
|
|
be93b9cc8c | ||
|
|
439d5e52b8 | ||
|
|
72500ed749 | ||
|
|
f17556a0d6 | ||
|
|
6a732fadde | ||
|
|
bcb2f1a198 | ||
|
|
79351bbd0a | ||
|
|
a6087b4bef | ||
|
|
9f26d04f7a | ||
|
|
84326bedb4 | ||
|
|
a0a7e000d4 | ||
|
|
b5b4a537c5 | ||
|
|
7757e3cb53 | ||
|
|
b77633b152 | ||
|
|
9ef7668702 | ||
|
|
4998cd13c2 | ||
|
|
1aaf568338 | ||
|
|
18a4d7a25a | ||
|
|
2b9d43891a | ||
|
|
0197ee79a7 | ||
|
|
6297bbd6a8 | ||
|
|
ad9130079e | ||
|
|
7a39fd778f | ||
|
|
ee0149c133 | ||
|
|
ee643f4407 | ||
|
|
218ad3e59e | ||
|
|
4032cc277a | ||
|
|
4b4868e102 | ||
|
|
83d4505021 | ||
|
|
0e063bbd72 | ||
|
|
29960cdc0a | ||
|
|
d718b58269 | ||
|
|
6141d1d24e | ||
|
|
8619c8e67d | ||
|
|
9c89902e56 | ||
|
|
b20d5f46b2 | ||
|
|
52ae974f51 | ||
|
|
a7afacfaf2 | ||
|
|
f089578ba7 | ||
|
|
1e4346a54b | ||
|
|
a1b83b4a67 | ||
|
|
4e7bbda689 | ||
|
|
539225cf78 | ||
|
|
195cf193c7 | ||
|
|
fd348a40e7 | ||
|
|
6964b4ec9d | ||
|
|
1418a9be87 | ||
|
|
f87b37d7e3 | ||
|
|
871de4ae47 | ||
|
|
89b1cb1de0 | ||
|
|
5dc1ee440b | ||
|
|
e52f70b340 | ||
|
|
e629802bcb | ||
|
|
59bccc9be3 | ||
|
|
838bcb8faa | ||
|
|
5100384e18 | ||
|
|
a8b046f46b | ||
|
|
6b87447ca1 | ||
|
|
e601e79ad3 | ||
|
|
a944c28dd4 | ||
|
|
de2a11389c | ||
|
|
b88d6f6cd3 | ||
|
|
ef2b20d357 | ||
|
|
f82a606b66 | ||
|
|
c639be1429 | ||
|
|
76e6e7852b | ||
|
|
82f175105c | ||
|
|
fa12cfeec1 | ||
|
|
7ee52ac56c | ||
|
|
0fe125251b | ||
|
|
5bcfd368fc | ||
|
|
154503a95d | ||
|
|
54cbb495cc | ||
|
|
1f5fc1926c | ||
|
|
1e3e5f38d4 | ||
|
|
ec0613b9cf | ||
|
|
7204b3662c | ||
|
|
d5ac6fe239 | ||
|
|
c916ad73e1 | ||
|
|
bce98561d3 | ||
|
|
7129d5ee7c | ||
|
|
003afa4071 | ||
|
|
7f963bdb6f | ||
|
|
96298a5c31 | ||
|
|
540900d0f5 | ||
|
|
10585527ae | ||
|
|
d02b328c27 | ||
|
|
510923d14a | ||
|
|
8b5cf6f321 | ||
|
|
39aa0de008 | ||
|
|
bd17238c1c | ||
|
|
63146394ac | ||
|
|
7867d6c6bd | ||
|
|
55b4fec00b | ||
|
|
2430fec8c6 | ||
|
|
6cf88c673f | ||
|
|
308e559229 | ||
|
|
1fcfa136be | ||
|
|
03e7db5d92 | ||
|
|
a94005fc1f | ||
|
|
548ede7f89 | ||
|
|
0e4ef1c45c | ||
|
|
42ab196b06 | ||
|
|
a32b04ed14 | ||
|
|
2f841940b8 | ||
|
|
4141b424a9 | ||
|
|
afb44cd3fd | ||
|
|
096f77f3ab | ||
|
|
e2bb1e00c9 | ||
|
|
b43577c6cd | ||
|
|
818f39c1c5 | ||
|
|
d71fee617c | ||
|
|
aa7aff5150 | ||
|
|
f6a3e44271 | ||
|
|
6ad72b293d | ||
|
|
bce94d0957 | ||
|
|
3101c9b3b9 | ||
|
|
99b19cd022 | ||
|
|
f50e0ee67c | ||
|
|
a8c6ee4ba4 | ||
|
|
9ab73e382f | ||
|
|
3bdd7b4c94 | ||
|
|
4322892abb | ||
|
|
a4a08aa9cd | ||
|
|
cbff57375c | ||
|
|
879d9d1f8a | ||
|
|
b9271cc81d | ||
|
|
fc967e8878 | ||
|
|
7afd9901d3 | ||
|
|
f91718111d | ||
|
|
c7f5a14e42 | ||
|
|
dacddfb3a1 | ||
|
|
4fe5128547 | ||
|
|
e1cb8d00a7 | ||
|
|
2b056a8ae2 | ||
|
|
14490f9392 | ||
|
|
9aa3ac9978 | ||
|
|
4233a36348 | ||
|
|
170f155bc7 | ||
|
|
6818121b9a | ||
|
|
e5b93da9e4 | ||
|
|
71b40de7a7 | ||
|
|
4a3db6adba | ||
|
|
56a17c8856 | ||
|
|
2b5d23fbc1 | ||
|
|
c33d717631 | ||
|
|
2e00964514 | ||
|
|
f28ebbea5c | ||
|
|
1d559fbfe0 | ||
|
|
732f6552b6 | ||
|
|
e16a60d713 | ||
|
|
6c4b58a192 | ||
|
|
938f99318f | ||
|
|
c4c873767f | ||
|
|
4b15267d4f | ||
|
|
51380e49a7 | ||
|
|
94db51bb37 | ||
|
|
84f1434131 | ||
|
|
1cb8ca18cf | ||
|
|
de40ff388a | ||
|
|
8ffbb512c1 | ||
|
|
9a2a79c4c2 | ||
|
|
13cf418c16 | ||
|
|
bb693a729d | ||
|
|
c6a7d2aba4 | ||
|
|
0c0a3c952b | ||
|
|
b5fb8ae5be | ||
|
|
0a60e10827 | ||
|
|
85a0373675 | ||
|
|
6b30ba7d76 | ||
|
|
f1cfe03bf3 | ||
|
|
ded4c9c53a | ||
|
|
0194c0d2a9 | ||
|
|
97349a1df5 | ||
|
|
991e3ffa1d | ||
|
|
58c76bdd55 | ||
|
|
ab48d52265 | ||
|
|
eaf0cfa24a | ||
|
|
f7d2038f7e | ||
|
|
ada5ccbf77 | ||
|
|
252659bdf0 | ||
|
|
bc1073f734 | ||
|
|
9386e9d186 | ||
|
|
a8c24cf76a | ||
|
|
6e7be25614 | ||
|
|
8b88d0f439 | ||
|
|
82185aa9ca | ||
|
|
b2d52e8cfa | ||
|
|
b278d27b9b | ||
|
|
036c220317 | ||
|
|
a3fbb711f0 | ||
|
|
09dd5e37b5 | ||
|
|
176a2e58ee | ||
|
|
18dabf7e8c | ||
|
|
113a800270 | ||
|
|
311a9d1a31 | ||
|
|
b6c60f5997 | ||
|
|
76d4a4a453 | ||
|
|
0a6bddc83d | ||
|
|
efc5a88928 | ||
|
|
02ee44e1ce | ||
|
|
9e5c4e4a8e | ||
|
|
14d79d426c | ||
|
|
03f8b2d80a | ||
|
|
7161a1ef73 | ||
|
|
2833d58e84 | ||
|
|
6eeefc23b4 | ||
|
|
9ce0c0ec39 | ||
|
|
f9baf87289 | ||
|
|
bff3e15fb3 | ||
|
|
f297d4f856 | ||
|
|
3b55d26e17 | ||
|
|
dfd1aafb89 | ||
|
|
75adc232f7 | ||
|
|
d6f957f975 | ||
|
|
f9baf88f3c | ||
|
|
b3aa9ab637 | ||
|
|
c8a0b7f89a | ||
|
|
193f011619 | ||
|
|
f2e733679c | ||
|
|
2f7c013423 | ||
|
|
5a987621a5 | ||
|
|
e7b3dff934 | ||
|
|
51b1f3e46d | ||
|
|
c3c0be94e3 | ||
|
|
f87a23d494 | ||
|
|
59ace7eaf5 | ||
|
|
bd8ed4920d | ||
|
|
72957ef167 | ||
|
|
b3b05d9208 | ||
|
|
2d593dbeb3 | ||
|
|
cde2d39631 | ||
|
|
38cd74536d | ||
|
|
e16be434f5 | ||
|
|
3bf9ab1570 | ||
|
|
bbe41c02a7 | ||
|
|
10cf45b452 | ||
|
|
907d389b43 | ||
|
|
ec076fb97a | ||
|
|
12e8da8750 | ||
|
|
4d6a92e015 | ||
|
|
5fd64f5d8f | ||
|
|
fe38e61ba4 | ||
|
|
db9b0501d5 | ||
|
|
40a14fb440 | ||
|
|
6f7a23d8cc | ||
|
|
db3f58b4cd | ||
|
|
a0670eb700 | ||
|
|
6304df71dd | ||
|
|
d1c5355362 | ||
|
|
801fdc146c | ||
|
|
7d6fea7646 | ||
|
|
39603e2edb | ||
|
|
edbc062da0 | ||
|
|
054aa07318 | ||
|
|
264ee49212 | ||
|
|
32c0491ca4 | ||
|
|
3ca0e1ad4c | ||
|
|
59afb41c22 | ||
|
|
ab7c852d61 | ||
|
|
15d7edacb5 | ||
|
|
278a7b5dfb | ||
|
|
4ef2442770 | ||
|
|
bbf3d29d80 | ||
|
|
8cc94738ad | ||
|
|
ee79c8d9dc | ||
|
|
97cb4cb6a1 | ||
|
|
9a42d65e26 | ||
|
|
f3e315297a | ||
|
|
b1d4e99ea9 | ||
|
|
40dc8c8679 | ||
|
|
63fbbeb5c7 | ||
|
|
669c2b9b50 | ||
|
|
62366d5adb | ||
|
|
8b6af76fa0 | ||
|
|
abe22b7f97 | ||
|
|
111f0d1114 | ||
|
|
0f5b5837b8 | ||
|
|
2796bcb892 | ||
|
|
540cf425e9 | ||
|
|
31a9000a82 | ||
|
|
4710fcfc34 | ||
|
|
9ba40044ed | ||
|
|
bb056af18d | ||
|
|
b710b88ed5 | ||
|
|
995f987e66 | ||
|
|
a709db58bb | ||
|
|
4f97af940c | ||
|
|
a08c410a9c | ||
|
|
a030397f71 | ||
|
|
a0184b1751 | ||
|
|
640397fdda | ||
|
|
6f314c3996 | ||
|
|
f389a25dec | ||
|
|
bc7e00c71c | ||
|
|
2d64453317 | ||
|
|
c9155b55ba | ||
|
|
dfa1d7718b | ||
|
|
6a7acb337e | ||
|
|
f082094740 | ||
|
|
c8fe3cc095 | ||
|
|
dd3746a3d4 | ||
|
|
dd0a604aa6 | ||
|
|
7285867856 | ||
|
|
b57acc2cb2 | ||
|
|
d67b3778c3 | ||
|
|
4440550a37 | ||
|
|
644e188a94 | ||
|
|
72026cb772 | ||
|
|
072f226181 | ||
|
|
9f849e8c2d | ||
|
|
cf5bf4be8c | ||
|
|
890eb49747 | ||
|
|
ebd7ffc827 | ||
|
|
eddd75a626 | ||
|
|
b3405d085b | ||
|
|
003721d4f7 | ||
|
|
f3345f7778 | ||
|
|
94e3df1751 | ||
|
|
d01016034f | ||
|
|
f7ffc694bf | ||
|
|
7113838d68 | ||
|
|
96e5ea531c | ||
|
|
c25adf5014 | ||
|
|
f499e6cf00 | ||
|
|
daae6e9694 | ||
|
|
0916aa9b17 | ||
|
|
d6a10bf49a | ||
|
|
1f09f64176 | ||
|
|
3dc97e8133 | ||
|
|
aaa046e4eb | ||
|
|
2ffe3d0072 | ||
|
|
715ecda0dd | ||
|
|
c61d7f4f89 | ||
|
|
2efce806a9 | ||
|
|
b9fabc3af4 | ||
|
|
dbd63e706f | ||
|
|
a79125b94d | ||
|
|
afb559d604 | ||
|
|
c0cb28c2ad | ||
|
|
ada1b5245d | ||
|
|
8c752488ee | ||
|
|
4a4606e6ed | ||
|
|
7916d76aca | ||
|
|
463d020dad | ||
|
|
4805dd800c | ||
|
|
4320071a41 | ||
|
|
07a2e4eea3 | ||
|
|
d7f859ecab | ||
|
|
f6c74ce98e | ||
|
|
966206dbf5 | ||
|
|
675cde7321 | ||
|
|
98cf0b002b | ||
|
|
3ff201bf4d | ||
|
|
81c5bb84d3 | ||
|
|
1025f626b7 | ||
|
|
13df9566a2 | ||
|
|
99aa9da490 | ||
|
|
465b521f19 | ||
|
|
0cea7393a6 | ||
|
|
7096062847 | ||
|
|
2b612e82e9 | ||
|
|
e03ad3edfb | ||
|
|
a35cb1cbd5 | ||
|
|
2ed4d906c3 | ||
|
|
d4844073ae | ||
|
|
fba1d2a97b | ||
|
|
45af851032 | ||
|
|
94accf6ed6 | ||
|
|
539ecb8130 | ||
|
|
3f38c9b7d2 | ||
|
|
8f67cb6ba3 | ||
|
|
9a6cebe0fa | ||
|
|
ff75e7662e | ||
|
|
7e01544c19 | ||
|
|
4e0171159e | ||
|
|
f005680cc1 | ||
|
|
eb0dd854f0 | ||
|
|
2f12549464 | ||
|
|
174ce22da3 | ||
|
|
5604fa5e4a | ||
|
|
bb453ce45b | ||
|
|
b6e9d36301 | ||
|
|
a0ff23a4d1 | ||
|
|
b456275016 | ||
|
|
4d5f88896a | ||
|
|
6215b32f4d | ||
|
|
be78cf3a43 | ||
|
|
97866f1fb9 | ||
|
|
1be5127582 | ||
|
|
53a63a28aa | ||
|
|
37926a6b8f | ||
|
|
53d1323604 | ||
|
|
4fba0fc42a | ||
|
|
45aab4617a | ||
|
|
a636440d13 | ||
|
|
c978fa8955 | ||
|
|
66971b3310 | ||
|
|
92d4232472 | ||
|
|
ee9c69cfca | ||
|
|
5bde7c9a0d | ||
|
|
848ac39463 | ||
|
|
b9418dcb2e | ||
|
|
245dbf421c | ||
|
|
0b28311374 | ||
|
|
c20a90e45c | ||
|
|
9a7f991092 | ||
|
|
a24bed5337 | ||
|
|
bf3e795a66 | ||
|
|
76b51ebca9 | ||
|
|
c8bf809e9f | ||
|
|
7084dc919a | ||
|
|
b98c8c3f98 | ||
|
|
3f6e758cd4 | ||
|
|
a000347877 | ||
|
|
e5b29e3352 | ||
|
|
5605a9c3b8 | ||
|
|
708879c276 | ||
|
|
95e1c97781 | ||
|
|
cac17dea98 | ||
|
|
03d195fd91 | ||
|
|
2eecf17100 | ||
|
|
48b4124c14 | ||
|
|
23669e6337 | ||
|
|
6ed83ab7ec | ||
|
|
2b3f98a850 | ||
|
|
fcabf659af | ||
|
|
742595c83f | ||
|
|
e062b4d2c3 | ||
|
|
a2a91d929a | ||
|
|
7e87efcc48 | ||
|
|
61e10fe48f | ||
|
|
518871bf2b | ||
|
|
b75e14d9fc | ||
|
|
12d2d6b8dd | ||
|
|
37279845be | ||
|
|
d6b095c568 | ||
|
|
f7cf05d944 | ||
|
|
3cbc342af5 | ||
|
|
ee41e9a7ed | ||
|
|
79074e19c2 | ||
|
|
ad9cb55b98 | ||
|
|
d71057bbab | ||
|
|
8033fde2b9 | ||
|
|
b209795f60 | ||
|
|
f73d81310a | ||
|
|
6555d6316a | ||
|
|
bf0aa7d285 | ||
|
|
fbc5177918 | ||
|
|
4aafbdaeac | ||
|
|
4e30ac8084 | ||
|
|
63d5d41d48 | ||
|
|
fdf73a4f06 | ||
|
|
dafe4a535e | ||
|
|
96793ec599 | ||
|
|
951c00d79d | ||
|
|
d5e923c263 | ||
|
|
9d67211ddd | ||
|
|
4b28ee2227 | ||
|
|
78ea52cbab | ||
|
|
7793f9fa24 | ||
|
|
1d18d832e7 | ||
|
|
14f7668a9a | ||
|
|
f0bd84fa47 | ||
|
|
13b3988829 | ||
|
|
0a99397f30 | ||
|
|
52149b098e | ||
|
|
4903b2e189 | ||
|
|
54a5769dee | ||
|
|
f9369f5e02 | ||
|
|
90522b98db | ||
|
|
9e83f24179 | ||
|
|
9a0cadaf9d | ||
|
|
3f641a843b | ||
|
|
60b9e1fb18 | ||
|
|
fa6b4faeee | ||
|
|
fb4bca3544 | ||
|
|
9e99a21969 | ||
|
|
0ac72afa97 | ||
|
|
bdd56b6062 | ||
|
|
16824452b0 | ||
|
|
ee1ffc98ba | ||
|
|
4b52afd0e1 | ||
|
|
aa045050a1 | ||
|
|
b7dc3fb600 | ||
|
|
8ea7cf4080 | ||
|
|
7505b72f7a | ||
|
|
763a702ed7 | ||
|
|
a4e1cc139f | ||
|
|
ecc8151919 | ||
|
|
b4b471e5c3 | ||
|
|
525169743c | ||
|
|
e1d66c93a1 | ||
|
|
037af08963 | ||
|
|
1a13e68c67 | ||
|
|
a0451b46a5 | ||
|
|
c86aa101ba | ||
|
|
be03467f65 | ||
|
|
b01b88cb03 | ||
|
|
b7da4e7bd1 | ||
|
|
bee95f9065 | ||
|
|
d669c4372e | ||
|
|
2db923173a | ||
|
|
9e2f116a32 | ||
|
|
eaadc36618 | ||
|
|
8ef85c4d04 | ||
|
|
ffd83ebef3 | ||
|
|
85895f7ce8 | ||
|
|
792dff062e | ||
|
|
ed67caa19c | ||
|
|
74bd23d76e | ||
|
|
9a47ec30f4 | ||
|
|
9b7332a047 | ||
|
|
098ecd3791 | ||
|
|
de4a359002 | ||
|
|
997ed75b79 | ||
|
|
2ad1c2121d | ||
|
|
9da95bbff3 | ||
|
|
c99f647e15 | ||
|
|
9ff54c2495 | ||
|
|
9b412c726d | ||
|
|
470f950b1a | ||
|
|
4750b0eba2 | ||
|
|
458ee0a90e | ||
|
|
563defd5f1 | ||
|
|
2546cf79b7 | ||
|
|
b8fa2a67d7 | ||
|
|
4c162e9f37 | ||
|
|
a4b49633c6 | ||
|
|
00980d937a | ||
|
|
c39854dbb4 | ||
|
|
aa5c85ade5 | ||
|
|
cdda91f2d8 | ||
|
|
84c69e7803 | ||
|
|
1709848209 | ||
|
|
f6ce5b5ae7 | ||
|
|
bbe87c34c3 | ||
|
|
37cee61269 | ||
|
|
81f9915e54 | ||
|
|
8c696a6f64 | ||
|
|
61ab6dda7b | ||
|
|
96976e9fb4 | ||
|
|
2bd11fdd71 | ||
|
|
07a6b144c8 | ||
|
|
d8a6272597 | ||
|
|
0911ddc423 | ||
|
|
8e102c3fc8 | ||
|
|
aaff825539 | ||
|
|
0748abae07 | ||
|
|
1051342526 | ||
|
|
adc57e79b4 | ||
|
|
7741330fec | ||
|
|
74b0e4e929 | ||
|
|
a88b7ef5df | ||
|
|
f003235381 | ||
|
|
0920358df4 | ||
|
|
75dd1ea555 | ||
|
|
6def4eaac9 | ||
|
|
c841002f70 | ||
|
|
3ddad84863 | ||
|
|
907d97e1ba | ||
|
|
af9780f57d | ||
|
|
e6901d8134 | ||
|
|
5f041cde7d | ||
|
|
4c67d4d0c3 | ||
|
|
bdba1fc503 | ||
|
|
ad6c7c06a5 | ||
|
|
8ddc169c31 | ||
|
|
9b316af586 | ||
|
|
419b207eff | ||
|
|
ba24ed64aa | ||
|
|
9cfdc17115 | ||
|
|
938c28f293 | ||
|
|
b374f4088b | ||
|
|
5444f57cad | ||
|
|
0ec1e5735a | ||
|
|
43f38d8679 | ||
|
|
a70410f5dd | ||
|
|
f3ee962e8e | ||
|
|
bfe043b81d | ||
|
|
f5db461bfd | ||
|
|
36080e183a | ||
|
|
e21b14b979 | ||
|
|
149e51288f | ||
|
|
14746a76b3 | ||
|
|
b95e9b6e80 | ||
|
|
59df04d608 | ||
|
|
f69a1d8876 | ||
|
|
b485558e13 | ||
|
|
791b4c7687 | ||
|
|
1eecfbca85 | ||
|
|
22aefff48d |
23
.github/workflows/build.yml
vendored
23
.github/workflows/build.yml
vendored
@ -7,27 +7,46 @@
|
|||||||
|
|
||||||
# Yes this is a mostly untouched Github actions template
|
# Yes this is a mostly untouched Github actions template
|
||||||
|
|
||||||
|
|
||||||
name: Java CI with Gradle
|
name: Java CI with Gradle
|
||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "0 0 * * *"
|
- cron: "0 0 * * *"
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up JDK 8
|
- name: Set up JDK 8
|
||||||
uses: actions/setup-java@v4
|
uses: actions/setup-java@v4
|
||||||
with:
|
with:
|
||||||
java-version: '8'
|
java-version: '8'
|
||||||
distribution: 'temurin' # Temurin because it's default :P
|
distribution: 'temurin' # Temurin because it's default :P
|
||||||
|
|
||||||
|
# Calculate days since 10/10/10
|
||||||
|
- name: Calculate days since 10/10/10
|
||||||
|
id: calculate_days
|
||||||
|
run: |
|
||||||
|
start_date="2010-10-10"
|
||||||
|
current_date=$(date +%Y-%m-%d)
|
||||||
|
days_since=$(( ($(date -d "$current_date" +%s) - $(date -d "$start_date" +%s)) / 86400 ))
|
||||||
|
echo "days=$days_since" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
# Update version files with proper sed syntax
|
||||||
|
- name: Update version files
|
||||||
|
run: |
|
||||||
|
days=${{ steps.calculate_days.outputs.days }}
|
||||||
|
# Use proper sed syntax for Linux runners
|
||||||
|
sed -i "s/public static final String VERSION = \".*\";/public static final String VERSION = \"1.0.27 BETA ($days)\";/" src/main/java/com/hbm/lib/RefStrings.java
|
||||||
|
sed -i "s/mod_build_number=.*/mod_build_number=$days/" gradle.properties
|
||||||
|
|
||||||
# Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies.
|
# Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies.
|
||||||
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
|
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md
|
||||||
- name: Setup Gradle
|
- name: Setup Gradle
|
||||||
@ -41,5 +60,3 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
# A file, directory or wildcard pattern that describes what to upload
|
# A file, directory or wildcard pattern that describes what to upload
|
||||||
path: ./build/libs
|
path: ./build/libs
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
[NTM on Modrinth](https://modrinth.com/mod/ntm)
|
[NTM on Modrinth](https://modrinth.com/mod/ntm)
|
||||||
|
|
||||||
[NTM on CurseForge](https://minecraft.curseforge.com/projects/hbms-nuclear-tech-mod?gameCategorySlug=mc-mods&projectID=235439)
|
[NTM on CurseForge](https://www.curseforge.com/minecraft/mc-mods/hbms-nuclear-tech-mod)
|
||||||
|
|
||||||
[Official NTM Wiki](https://nucleartech.wiki/wiki/Main_Page)
|
[Official NTM Wiki](https://nucleartech.wiki/wiki/Main_Page)
|
||||||
|
|
||||||
@ -10,9 +10,9 @@
|
|||||||
|
|
||||||
**This is for 1.7.10!** For 1.12, check out these projects:
|
**This is for 1.7.10!** For 1.12, check out these projects:
|
||||||
|
|
||||||
* NTM Reloaded: https://github.com/TheOriginalGolem/Hbm-s-Nuclear-Tech-GIT/releases
|
|
||||||
* NTM Extended Edition (Alcater): https://github.com/Alcatergit/Hbm-s-Nuclear-Tech-GIT/releases
|
|
||||||
* NTM Community Edition (WarFactory): https://github.com/MisterNorwood/Hbm-s-Nuclear-Tech-CE
|
* NTM Community Edition (WarFactory): https://github.com/MisterNorwood/Hbm-s-Nuclear-Tech-CE
|
||||||
|
* NTM Extended Edition (Alcater): https://github.com/Alcatergit/Hbm-s-Nuclear-Tech-GIT/releases
|
||||||
|
* NTM Reloaded: https://github.com/TheOriginalGolem/Hbm-s-Nuclear-Tech-GIT/releases
|
||||||
|
|
||||||
For 1.18, try Martin's remake: https://codeberg.org/MartinTheDragon/Nuclear-Tech-Mod-Remake/releases
|
For 1.18, try Martin's remake: https://codeberg.org/MartinTheDragon/Nuclear-Tech-Mod-Remake/releases
|
||||||
|
|
||||||
@ -25,7 +25,7 @@ Simply navigate to "Releases" on the right side of the page, download links for
|
|||||||
Tired of waiting until the next version comes out? Here is a tutorial on how to compile the very newest version yourself:
|
Tired of waiting until the next version comes out? Here is a tutorial on how to compile the very newest version yourself:
|
||||||
Please note that these installation instructions are assuming you're running Microsoft Windows operating system. Linux users should know what to do by looking at the same guide.
|
Please note that these installation instructions are assuming you're running Microsoft Windows operating system. Linux users should know what to do by looking at the same guide.
|
||||||
|
|
||||||
1. Make sure you have JDK8 installed. If not, download it from [adoptium.net](https://adoptium.net/?variant=openjdk8&jvmVariant=hotspot)
|
1. Make sure you have JDK8 installed. If not, download it from [adoptium.net](https://adoptium.net/temurin/releases?version=8)
|
||||||
2. If you don't have git installed, download&install it from [here](https://git-scm.com/downloads).
|
2. If you don't have git installed, download&install it from [here](https://git-scm.com/downloads).
|
||||||
3. Open up "Git Bash":
|
3. Open up "Git Bash":
|
||||||
* Press Windows Button, type "Git Bash" and press ENTER
|
* Press Windows Button, type "Git Bash" and press ENTER
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import java.nio.file.StandardCopyOption
|
|||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
repositories {
|
repositories {
|
||||||
|
maven { url = 'https://maven.ntmr.dev/proxy/' }
|
||||||
maven { url = 'https://maven.minecraftforge.net/' }
|
maven { url = 'https://maven.minecraftforge.net/' }
|
||||||
maven { url = 'https://plugins.gradle.org/m2' }
|
maven { url = 'https://plugins.gradle.org/m2' }
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
@ -67,6 +68,10 @@ eclipse.classpath.file.whenMerged { cp ->
|
|||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
|
maven {
|
||||||
|
name = 'Blerg'
|
||||||
|
url = 'https://maven.ntmr.dev/proxy/'
|
||||||
|
}
|
||||||
maven {
|
maven {
|
||||||
name = 'ModMaven'
|
name = 'ModMaven'
|
||||||
url = 'https://modmaven.dev'
|
url = 'https://modmaven.dev'
|
||||||
|
|||||||
46
changelog
46
changelog
@ -1,23 +1,27 @@
|
|||||||
## Added
|
|
||||||
* QMAW (quick manual and wiki)
|
|
||||||
* It's a simple ingame manual that can be found by pressing F1 on items (like the WIAJ presentations)
|
|
||||||
* Supports text and links and not much else
|
|
||||||
* Easy to make entries for, the system scans `assets/manual` for valid `.json` format files
|
|
||||||
* Should also work in resource packs (no recent tests for that, not going to make promises)
|
|
||||||
* Still WIP, many new info pages are yet to be made
|
|
||||||
* `/ntmlocate`
|
|
||||||
* Finds structures
|
|
||||||
* Only works on the new component structures, the old crusty ones like the factors and powerplant aren't supported
|
|
||||||
|
|
||||||
## Changed
|
## Changed
|
||||||
* Updated chinese and russian localization
|
* Updated russian localization
|
||||||
* All the never completed missile parts (20/20 fuselage, 20 warhead, 10 and 15 tec kerosene thrusters) have been removed
|
* Rad absorbers now use metadata, existing blocks will be converted automatically
|
||||||
* The electric arc furnace now scrapes the vanilla furnace recipe list on server start in addition to postinit, making sure recipes added during postinit after NTM loads (like Thermal's ingots) are covered too
|
* Fissure bombs that go off in crater biomes now create fissures with metadata 1 which creates radioactive volcanic lava
|
||||||
* The shredder's sound will now start immediately when processing instead of with random delay
|
* If a crater biome is created on top of an existing fissure, it will keep producing normal volcanic lava
|
||||||
* The assembly machine can now make nuclear waste into barrels
|
* Simplified the battery socket's client packets, reducing CPU load
|
||||||
* Capacitors now have OpenComputers integration
|
* Muzzle flashes on guns now work in third person mode, including on other players and on NPCs, making it more apparent when you're being fired at
|
||||||
|
* This includes non-standard special effects like the .44 gap flash and the .35-800 ejector plume
|
||||||
|
* Removed the old unused satelite deco blocks, freeing up 6 block IDs
|
||||||
|
* Crucibles that smelt metal with no template set will no place the metal in the recipe stack instead of the waste stack, this should make it easier to get a recipe to work in the many, many cases where people add the template after smelting the material
|
||||||
|
* Battery sockets and the FENSU now support the copy tool
|
||||||
|
* Removed unused displaylist support from the model loader
|
||||||
|
* DLs have been long phased out in favor of VBOs anyway
|
||||||
|
* Rebranded canned horse slime
|
||||||
|
* Now with extra bone marrow
|
||||||
|
* Updated the deuterium tower's model
|
||||||
|
* Increased the energy requirement for welding osmiridium
|
||||||
|
|
||||||
## Fixed
|
# Fixed
|
||||||
* Fixed GT6 compatibility watz pellets crashing due to misconfigured recipes
|
* Potentially fixed yet another issue regarding crates
|
||||||
* Removed failed attempt at fixing the gun desync dupe which made things worse
|
* Fixed battery socket `fillpercent` RoR function always assuming a max power of 1
|
||||||
* Fixed a potential crash regarding structure blocks
|
* Fixed issue where multiblock ports would generate many OpenComputers component entries
|
||||||
|
* Fixed RBMK automatic control rods having incorrect settings when using the copy tool
|
||||||
|
* Fixed battery sockets producing junk debug data in the logs
|
||||||
|
* Fixed an issue where the charging station would crash when trying to charge certain items
|
||||||
|
* Fixed the DFC's core component not dropping its contents when mined
|
||||||
|
* Fixed audio problems with guns
|
||||||
@ -1,15 +1,15 @@
|
|||||||
mod_version=1.0.27
|
mod_version=1.0.27
|
||||||
# Empty build number makes a release type
|
# Empty build number makes a release type
|
||||||
mod_build_number=5418
|
mod_build_number=5572
|
||||||
|
|
||||||
credits=HbMinecraft,\
|
credits=HbMinecraft,\
|
||||||
\ rodolphito (explosion algorithms),\
|
\ rodolphito (explosion algorithms),\
|
||||||
\ grangerave (explosion algorithms),\
|
\ grangerave (explosion algorithms),\
|
||||||
\ Hoboy (textures, models),\
|
\ Hoboy (textures, models),\
|
||||||
\ Drillgon200 (effects, models, porting),\
|
\ Drillgon200 (effects, models),\
|
||||||
\ MartinTheDragon (calculator, chunk-based fallout, bendable cranes, pipe improvements, PWR sounds),\
|
\ MartinTheDragon (calculator, chunk-based fallout, bendable cranes, pipe improvements, PWR sounds),\
|
||||||
\ Alcater (GUI textures, porting),\
|
\ Alcater (GUI textures),\
|
||||||
\ MellowArpeggiation (new animation system, turbine sounds, sound fixes, industrial lights, conveyor wand, NBT structures),\
|
\ MellowArpeggiation (new animation system, turbine sounds, sound fixes, industrial lights, conveyor wand, NBT structures, MSU displays),\
|
||||||
\ Pheo (textures, various machines, models, weapons),\
|
\ Pheo (textures, various machines, models, weapons),\
|
||||||
\ Vær (gas centrifuges, better worldgen, ZIRNOX, CP-1 parts, starter guide, new cyclotron, weapon animations),\
|
\ Vær (gas centrifuges, better worldgen, ZIRNOX, CP-1 parts, starter guide, new cyclotron, weapon animations),\
|
||||||
\ UFFR (RTG pellets, guns, casings, euphemium capacitor, nucleartech.wiki),\
|
\ UFFR (RTG pellets, guns, casings, euphemium capacitor, nucleartech.wiki),\
|
||||||
@ -22,6 +22,7 @@ credits=HbMinecraft,\
|
|||||||
\ Doctor17 (russian localization)),\
|
\ Doctor17 (russian localization)),\
|
||||||
\ Pashtet (russian localization),\
|
\ Pashtet (russian localization),\
|
||||||
\ 7H40 (russian localization),\
|
\ 7H40 (russian localization),\
|
||||||
|
\ RayzerHan (russian localization),\
|
||||||
\ Bismarck (chinese localization),\
|
\ Bismarck (chinese localization),\
|
||||||
\ Creeper-banner (chinese localization),\
|
\ Creeper-banner (chinese localization),\
|
||||||
\ 5467864 (chinese localization),\
|
\ 5467864 (chinese localization),\
|
||||||
@ -34,8 +35,10 @@ credits=HbMinecraft,\
|
|||||||
\ Herobrine 457985 (chinese localization),\
|
\ Herobrine 457985 (chinese localization),\
|
||||||
\ xxwinhere (chinese localization),\
|
\ xxwinhere (chinese localization),\
|
||||||
\ Nycticoraxnightheron (chinese localization),\
|
\ Nycticoraxnightheron (chinese localization),\
|
||||||
|
\ NarekoMichigami810 (chinese localization),\
|
||||||
\ Maksymisio (polish localization)\
|
\ Maksymisio (polish localization)\
|
||||||
\ el3ctro4ndre (italian localization),\
|
\ el3ctro4ndre (italian localization),\
|
||||||
|
\ Goaty1208 (italian localization),\
|
||||||
\ Pu-238 (Tom impact effects),\
|
\ Pu-238 (Tom impact effects),\
|
||||||
\ Frooz (gun models),\
|
\ Frooz (gun models),\
|
||||||
\ VT-6/24 (models, textures),\
|
\ VT-6/24 (models, textures),\
|
||||||
@ -55,18 +58,22 @@ credits=HbMinecraft,\
|
|||||||
\ Silly541 (config for safe ME drives),\
|
\ Silly541 (config for safe ME drives),\
|
||||||
\ Voxelstice (OpenComputers integration, turbine spinup),\
|
\ Voxelstice (OpenComputers integration, turbine spinup),\
|
||||||
\ BallOfEnergy1 (OpenComputers integration, RBMK and packet optimization, crate backpacks),\
|
\ BallOfEnergy1 (OpenComputers integration, RBMK and packet optimization, crate backpacks),\
|
||||||
|
\ PewPewCricket (OpenComputers integration),\
|
||||||
|
\ kelllllen (OpenComputers integration),\
|
||||||
\ sdddddf80 (recipe configs, chinese localization, custom machine holograms),\
|
\ sdddddf80 (recipe configs, chinese localization, custom machine holograms),\
|
||||||
\ Abel1502 (abilities GUI, optimization, crate upgrade recipes, strand caster improvements, varous tweaks),\
|
\ Abel1502 (abilities GUI, optimization, crate upgrade recipes, strand caster improvements, varous tweaks),\
|
||||||
\ Darek505 (armor rendering compatibility fix),\
|
\ Darek505 (armor rendering compatibility fix),\
|
||||||
|
\ ranch21 (improved HUD gauges),\
|
||||||
\ SuperCraftAlex (tooltips)\
|
\ SuperCraftAlex (tooltips)\
|
||||||
\ Ice-Arrow (research reactor tweaks),\
|
\ Ice-Arrow (research reactor tweaks),\
|
||||||
\ 245tt (anvil GUI improvements),\
|
\ 245tt (anvil GUI improvements),\
|
||||||
\ KoblizekXD (doors),\
|
\ KoblizekXD (doors),\
|
||||||
\ FOlkvangrField (custom machine parts),\
|
\ FOlkvangrField (custom machine parts),\
|
||||||
\ RosaTryp (centrifuge config),\
|
\ RosaTryp (centrifuge config),\
|
||||||
\ Toshayo (satellite loot system, project settings, gradle curse task, OpenComputers integration),\
|
\ Toshayo (satellite loot system, project settings, gradle curse task, OpenComputers integration, fluid counter valve),\
|
||||||
\ Dash (PA particle serialization fix),\
|
\ Dash (PA particle serialization fix),\
|
||||||
\ archiecarrot123 (armor rendering compatibility fix),\
|
\ archiecarrot123 (armor rendering compatibility fix),\
|
||||||
|
\ mikkerlo (mining laser & builder's jetpack improvements),\
|
||||||
\ icomet (refactoring),\
|
\ icomet (refactoring),\
|
||||||
\ martemen (project settings),\
|
\ martemen (project settings),\
|
||||||
\ OvermindDL1 (project settings),\
|
\ OvermindDL1 (project settings),\
|
||||||
|
|||||||
@ -3,6 +3,7 @@ package api.hbm.block;
|
|||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public interface IDrillInteraction {
|
public interface IDrillInteraction {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
package api.hbm.block;
|
package api.hbm.block;
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public interface IMiningDrill {
|
public interface IMiningDrill {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -11,8 +11,8 @@ public interface IBatteryItem {
|
|||||||
public void dischargeBattery(ItemStack stack, long i);
|
public void dischargeBattery(ItemStack stack, long i);
|
||||||
public long getCharge(ItemStack stack);
|
public long getCharge(ItemStack stack);
|
||||||
public long getMaxCharge(ItemStack stack);
|
public long getMaxCharge(ItemStack stack);
|
||||||
public long getChargeRate();
|
public long getChargeRate(ItemStack stack);
|
||||||
public long getDischargeRate();
|
public long getDischargeRate(ItemStack stack);
|
||||||
|
|
||||||
/** Returns a string for the NBT tag name of the long storing power */
|
/** Returns a string for the NBT tag name of the long storing power */
|
||||||
public default String getChargeTagName() {
|
public default String getChargeTagName() {
|
||||||
|
|||||||
@ -2,7 +2,6 @@ package api.hbm.energymk2;
|
|||||||
|
|
||||||
import com.hbm.handler.threading.PacketThreading;
|
import com.hbm.handler.threading.PacketThreading;
|
||||||
import com.hbm.packet.toclient.AuxParticlePacketNT;
|
import com.hbm.packet.toclient.AuxParticlePacketNT;
|
||||||
import com.hbm.util.Compat;
|
|
||||||
|
|
||||||
import api.hbm.energymk2.Nodespace.PowerNode;
|
import api.hbm.energymk2.Nodespace.PowerNode;
|
||||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||||
@ -25,7 +24,7 @@ public interface IEnergyProviderMK2 extends IEnergyHandlerMK2 {
|
|||||||
|
|
||||||
public default void tryProvide(World world, int x, int y, int z, ForgeDirection dir) {
|
public default void tryProvide(World world, int x, int y, int z, ForgeDirection dir) {
|
||||||
|
|
||||||
TileEntity te = Compat.getTileStandard(world, x, y, z);
|
TileEntity te = TileAccessCache.getTileOrCache(world, x, y, z);
|
||||||
boolean red = false;
|
boolean red = false;
|
||||||
|
|
||||||
if(te instanceof IEnergyConductorMK2) {
|
if(te instanceof IEnergyConductorMK2) {
|
||||||
@ -43,7 +42,7 @@ public interface IEnergyProviderMK2 extends IEnergyHandlerMK2 {
|
|||||||
|
|
||||||
if(te instanceof IEnergyReceiverMK2 && te != this) {
|
if(te instanceof IEnergyReceiverMK2 && te != this) {
|
||||||
IEnergyReceiverMK2 rec = (IEnergyReceiverMK2) te;
|
IEnergyReceiverMK2 rec = (IEnergyReceiverMK2) te;
|
||||||
if(rec.canConnect(dir.getOpposite())) {
|
if(rec.canConnect(dir.getOpposite()) && rec.allowDirectProvision()) {
|
||||||
long provides = Math.min(this.getPower(), this.getProviderSpeed());
|
long provides = Math.min(this.getPower(), this.getProviderSpeed());
|
||||||
long receives = Math.min(rec.getMaxPower() - rec.getPower(), rec.getReceiverSpeed());
|
long receives = Math.min(rec.getMaxPower() - rec.getPower(), rec.getReceiverSpeed());
|
||||||
long toTransfer = Math.min(provides, receives);
|
long toTransfer = Math.min(provides, receives);
|
||||||
|
|||||||
@ -3,7 +3,6 @@ package api.hbm.energymk2;
|
|||||||
import com.hbm.handler.threading.PacketThreading;
|
import com.hbm.handler.threading.PacketThreading;
|
||||||
import com.hbm.interfaces.NotableComments;
|
import com.hbm.interfaces.NotableComments;
|
||||||
import com.hbm.packet.toclient.AuxParticlePacketNT;
|
import com.hbm.packet.toclient.AuxParticlePacketNT;
|
||||||
import com.hbm.util.Compat;
|
|
||||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||||
|
|
||||||
import api.hbm.energymk2.Nodespace.PowerNode;
|
import api.hbm.energymk2.Nodespace.PowerNode;
|
||||||
@ -31,12 +30,15 @@ public interface IEnergyReceiverMK2 extends IEnergyHandlerMK2 {
|
|||||||
public default long getReceiverSpeed() {
|
public default long getReceiverSpeed() {
|
||||||
return this.getMaxPower();
|
return this.getMaxPower();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Whether a provider can provide power by touching the block (i.e. via proxies), bypassing the need for a network entirely */
|
||||||
|
public default boolean allowDirectProvision() { return true; }
|
||||||
|
|
||||||
public default void trySubscribe(World world, DirPos pos) { trySubscribe(world, pos.getX(), pos.getY(), pos.getZ(), pos.getDir()); }
|
public default void trySubscribe(World world, DirPos pos) { trySubscribe(world, pos.getX(), pos.getY(), pos.getZ(), pos.getDir()); }
|
||||||
|
|
||||||
public default void trySubscribe(World world, int x, int y, int z, ForgeDirection dir) {
|
public default void trySubscribe(World world, int x, int y, int z, ForgeDirection dir) {
|
||||||
|
|
||||||
TileEntity te = Compat.getTileStandard(world, x, y, z);
|
TileEntity te = TileAccessCache.getTileOrCache(world, x, y, z);
|
||||||
boolean red = false;
|
boolean red = false;
|
||||||
|
|
||||||
if(te instanceof IEnergyConductorMK2) {
|
if(te instanceof IEnergyConductorMK2) {
|
||||||
|
|||||||
@ -16,6 +16,7 @@ import net.minecraft.world.World;
|
|||||||
*
|
*
|
||||||
* @author hbm
|
* @author hbm
|
||||||
*/
|
*/
|
||||||
|
@NotableComments
|
||||||
public class Nodespace {
|
public class Nodespace {
|
||||||
|
|
||||||
public static final PowerNetProvider THE_POWER_PROVIDER = new PowerNetProvider();
|
public static final PowerNetProvider THE_POWER_PROVIDER = new PowerNetProvider();
|
||||||
|
|||||||
@ -78,7 +78,7 @@ public class PowerNetMK2 extends NodeNet<IEnergyReceiverMK2, IEnergyProviderMK2,
|
|||||||
|
|
||||||
for(Pair<IEnergyReceiverMK2, Long> entry : list) {
|
for(Pair<IEnergyReceiverMK2, Long> entry : list) {
|
||||||
double weight = (double) entry.getValue() / (double) (priorityDemand);
|
double weight = (double) entry.getValue() / (double) (priorityDemand);
|
||||||
long toSend = (long) Math.max(toTransfer * weight, 0D);
|
long toSend = (long) Math.min(Math.max(toTransfer * weight, 0D), entry.getValue());
|
||||||
energyUsed += (toSend - entry.getKey().transferPower(toSend)); //leftovers are subtracted from the intended amount to use up
|
energyUsed += (toSend - entry.getKey().transferPower(toSend)); //leftovers are subtracted from the intended amount to use up
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,6 @@ import com.hbm.packet.PacketDispatcher;
|
|||||||
import com.hbm.packet.toclient.AuxParticlePacketNT;
|
import com.hbm.packet.toclient.AuxParticlePacketNT;
|
||||||
import com.hbm.uninos.GenNode;
|
import com.hbm.uninos.GenNode;
|
||||||
import com.hbm.uninos.UniNodespace;
|
import com.hbm.uninos.UniNodespace;
|
||||||
import com.hbm.util.Compat;
|
|
||||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||||
|
|
||||||
import api.hbm.energymk2.IEnergyReceiverMK2.ConnectionPriority;
|
import api.hbm.energymk2.IEnergyReceiverMK2.ConnectionPriority;
|
||||||
@ -28,7 +27,7 @@ public interface IFluidReceiverMK2 extends IFluidUserMK2 {
|
|||||||
|
|
||||||
public default void trySubscribe(FluidType type, World world, int x, int y, int z, ForgeDirection dir) {
|
public default void trySubscribe(FluidType type, World world, int x, int y, int z, ForgeDirection dir) {
|
||||||
|
|
||||||
TileEntity te = Compat.getTileStandard(world, x, y, z);
|
TileEntity te = TileAccessCache.getTileOrCache(world, x, y, z);
|
||||||
boolean red = false;
|
boolean red = false;
|
||||||
|
|
||||||
if(te instanceof IFluidConnectorMK2) {
|
if(te instanceof IFluidConnectorMK2) {
|
||||||
|
|||||||
@ -6,7 +6,6 @@ import com.hbm.packet.PacketDispatcher;
|
|||||||
import com.hbm.packet.toclient.AuxParticlePacketNT;
|
import com.hbm.packet.toclient.AuxParticlePacketNT;
|
||||||
import com.hbm.uninos.GenNode;
|
import com.hbm.uninos.GenNode;
|
||||||
import com.hbm.uninos.UniNodespace;
|
import com.hbm.uninos.UniNodespace;
|
||||||
import com.hbm.util.Compat;
|
|
||||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||||
|
|
||||||
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
import cpw.mods.fml.common.network.NetworkRegistry.TargetPoint;
|
||||||
@ -30,7 +29,7 @@ public interface IFluidStandardSenderMK2 extends IFluidProviderMK2 {
|
|||||||
|
|
||||||
public default void tryProvide(FluidType type, int pressure, World world, int x, int y, int z, ForgeDirection dir) {
|
public default void tryProvide(FluidType type, int pressure, World world, int x, int y, int z, ForgeDirection dir) {
|
||||||
|
|
||||||
TileEntity te = Compat.getTileStandard(world, x, y, z);
|
TileEntity te = TileAccessCache.getTileOrCache(world, x, y, z);
|
||||||
boolean red = false;
|
boolean red = false;
|
||||||
|
|
||||||
if(te instanceof IFluidConnectorMK2) {
|
if(te instanceof IFluidConnectorMK2) {
|
||||||
|
|||||||
@ -1,7 +1,55 @@
|
|||||||
package api.hbm.tile;
|
package api.hbm.tile;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import com.hbm.util.Compat;
|
||||||
|
import com.hbm.util.Tuple.Quartet;
|
||||||
|
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
/** For anything that should be removed off networks when considered unloaded, only affects providers and receivers, not links. Must not necessarily be a tile. */
|
/** For anything that should be removed off networks when considered unloaded, only affects providers and receivers, not links. Must not necessarily be a tile. */
|
||||||
public interface ILoadedTile {
|
public interface ILoadedTile {
|
||||||
|
|
||||||
public boolean isLoaded();
|
public boolean isLoaded();
|
||||||
|
|
||||||
|
// should we gunk this into the API? no, but i don't care
|
||||||
|
public static class TileAccessCache {
|
||||||
|
|
||||||
|
public static Map<Quartet, TileAccessCache> cache = new HashMap();
|
||||||
|
|
||||||
|
public static int NULL_CACHE = 20;
|
||||||
|
public static int NONNULL_CACHE = 60;
|
||||||
|
|
||||||
|
public TileEntity tile;
|
||||||
|
public long expiresOn;
|
||||||
|
|
||||||
|
public TileAccessCache(TileEntity tile, long expiresOn) {
|
||||||
|
this.tile = tile;
|
||||||
|
this.expiresOn = expiresOn;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean hasExpired(long worldTime) {
|
||||||
|
if(tile != null && tile.isInvalid()) return true;
|
||||||
|
if(worldTime >= expiresOn) return true;
|
||||||
|
if(tile instanceof ILoadedTile && !((ILoadedTile) tile).isLoaded()) return true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Quartet publicCumRag = new Quartet(0, 0, 0, 0);
|
||||||
|
public static TileEntity getTileOrCache(World world, int x, int y, int z) {
|
||||||
|
publicCumRag.mangle(x, y, z, world.provider.dimensionId);
|
||||||
|
TileAccessCache cache = TileAccessCache.cache.get(publicCumRag);
|
||||||
|
|
||||||
|
if(cache == null || cache.hasExpired(world.getTotalWorldTime())) {
|
||||||
|
TileEntity tile = Compat.getTileStandard(world, x, y, z);
|
||||||
|
cache = new TileAccessCache(tile, world.getTotalWorldTime() + (tile == null ? NULL_CACHE : NONNULL_CACHE));
|
||||||
|
TileAccessCache.cache.put(publicCumRag.clone(), cache);
|
||||||
|
return tile;
|
||||||
|
} else {
|
||||||
|
return cache.tile;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -565,6 +565,7 @@ public abstract class BlockDummyable extends BlockContainer implements ICustomBl
|
|||||||
@Override
|
@Override
|
||||||
public void pasteSettings(NBTTagCompound nbt, int index, World world, EntityPlayer player, int x, int y, int z) {
|
public void pasteSettings(NBTTagCompound nbt, int index, World world, EntityPlayer player, int x, int y, int z) {
|
||||||
int[] pos = findCore(world, x, y, z);
|
int[] pos = findCore(world, x, y, z);
|
||||||
|
if(pos == null) return;
|
||||||
TileEntity tile = world.getTileEntity(pos[0], pos[1], pos[2]);
|
TileEntity tile = world.getTileEntity(pos[0], pos[1], pos[2]);
|
||||||
if (tile instanceof ICopiable)
|
if (tile instanceof ICopiable)
|
||||||
((ICopiable) tile).pasteSettings(nbt, index, world, player, pos[0], pos[1], pos[2]);
|
((ICopiable) tile).pasteSettings(nbt, index, world, player, pos[0], pos[1], pos[2]);
|
||||||
|
|||||||
@ -80,4 +80,5 @@ public class BlockEnums {
|
|||||||
FLUORESCENT,
|
FLUORESCENT,
|
||||||
HALOGEN
|
HALOGEN
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,6 +8,14 @@ import com.hbm.blocks.generic.*;
|
|||||||
import com.hbm.blocks.generic.BlockHazard.ExtDisplayEffect;
|
import com.hbm.blocks.generic.BlockHazard.ExtDisplayEffect;
|
||||||
import com.hbm.blocks.machine.*;
|
import com.hbm.blocks.machine.*;
|
||||||
import com.hbm.blocks.machine.albion.*;
|
import com.hbm.blocks.machine.albion.*;
|
||||||
|
import com.hbm.blocks.machine.fusion.MachineFusionBoiler;
|
||||||
|
import com.hbm.blocks.machine.fusion.MachineFusionBreeder;
|
||||||
|
import com.hbm.blocks.machine.fusion.MachineFusionCollector;
|
||||||
|
import com.hbm.blocks.machine.fusion.MachineFusionCoupler;
|
||||||
|
import com.hbm.blocks.machine.fusion.MachineFusionKlystron;
|
||||||
|
import com.hbm.blocks.machine.fusion.MachineFusionKlystronCreative;
|
||||||
|
import com.hbm.blocks.machine.fusion.MachineFusionMHDT;
|
||||||
|
import com.hbm.blocks.machine.fusion.MachineFusionTorus;
|
||||||
import com.hbm.blocks.machine.pile.*;
|
import com.hbm.blocks.machine.pile.*;
|
||||||
import com.hbm.blocks.machine.rbmk.*;
|
import com.hbm.blocks.machine.rbmk.*;
|
||||||
import com.hbm.blocks.network.*;
|
import com.hbm.blocks.network.*;
|
||||||
@ -22,6 +30,8 @@ import com.hbm.lib.RefStrings;
|
|||||||
import com.hbm.main.MainRegistry;
|
import com.hbm.main.MainRegistry;
|
||||||
import com.hbm.tileentity.DoorDecl;
|
import com.hbm.tileentity.DoorDecl;
|
||||||
import com.hbm.tileentity.machine.storage.TileEntityFileCabinet;
|
import com.hbm.tileentity.machine.storage.TileEntityFileCabinet;
|
||||||
|
import com.hbm.util.Compat;
|
||||||
|
|
||||||
import cpw.mods.fml.common.registry.GameRegistry;
|
import cpw.mods.fml.common.registry.GameRegistry;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.BlockFalling;
|
import net.minecraft.block.BlockFalling;
|
||||||
@ -147,8 +157,6 @@ public class ModBlocks {
|
|||||||
public static Block ore_bedrock_oil;
|
public static Block ore_bedrock_oil;
|
||||||
public static Block ore_lignite;
|
public static Block ore_lignite;
|
||||||
public static Block ore_asbestos;
|
public static Block ore_asbestos;
|
||||||
@Deprecated public static Block ore_coal_oil;
|
|
||||||
@Deprecated public static Block ore_coal_oil_burning;
|
|
||||||
|
|
||||||
public static Block ore_tikite;
|
public static Block ore_tikite;
|
||||||
|
|
||||||
@ -245,11 +253,6 @@ public class ModBlocks {
|
|||||||
public static Block block_slag;
|
public static Block block_slag;
|
||||||
|
|
||||||
public static Block block_australium;
|
public static Block block_australium;
|
||||||
public static Block block_weidanium;
|
|
||||||
public static Block block_reiium;
|
|
||||||
public static Block block_unobtainium;
|
|
||||||
public static Block block_daffergon;
|
|
||||||
public static Block block_verticium;
|
|
||||||
|
|
||||||
public static Block block_cap;
|
public static Block block_cap;
|
||||||
|
|
||||||
@ -341,6 +344,7 @@ public class ModBlocks {
|
|||||||
public static Block brick_fire;
|
public static Block brick_fire;
|
||||||
|
|
||||||
public static Block lightstone;
|
public static Block lightstone;
|
||||||
|
public static Block brick_forgotten;
|
||||||
|
|
||||||
public static Block concrete_slab;
|
public static Block concrete_slab;
|
||||||
public static Block concrete_double_slab;
|
public static Block concrete_double_slab;
|
||||||
@ -427,30 +431,30 @@ public class ModBlocks {
|
|||||||
public static Block steel_grate;
|
public static Block steel_grate;
|
||||||
public static Block steel_grate_wide;
|
public static Block steel_grate_wide;
|
||||||
|
|
||||||
public static Block deco_pipe;
|
@Deprecated public static Block deco_pipe;
|
||||||
public static Block deco_pipe_rusted;
|
@Deprecated public static Block deco_pipe_rusted;
|
||||||
public static Block deco_pipe_green;
|
@Deprecated public static Block deco_pipe_green;
|
||||||
public static Block deco_pipe_green_rusted;
|
@Deprecated public static Block deco_pipe_green_rusted;
|
||||||
public static Block deco_pipe_red;
|
@Deprecated public static Block deco_pipe_red;
|
||||||
public static Block deco_pipe_marked;
|
@Deprecated public static Block deco_pipe_marked;
|
||||||
public static Block deco_pipe_rim;
|
@Deprecated public static Block deco_pipe_rim;
|
||||||
public static Block deco_pipe_rim_rusted;
|
@Deprecated public static Block deco_pipe_rim_rusted;
|
||||||
public static Block deco_pipe_rim_green;
|
@Deprecated public static Block deco_pipe_rim_green;
|
||||||
public static Block deco_pipe_rim_green_rusted;
|
@Deprecated public static Block deco_pipe_rim_green_rusted;
|
||||||
public static Block deco_pipe_rim_red;
|
@Deprecated public static Block deco_pipe_rim_red;
|
||||||
public static Block deco_pipe_rim_marked;
|
@Deprecated public static Block deco_pipe_rim_marked;
|
||||||
public static Block deco_pipe_framed;
|
@Deprecated public static Block deco_pipe_framed;
|
||||||
public static Block deco_pipe_framed_rusted;
|
@Deprecated public static Block deco_pipe_framed_rusted;
|
||||||
public static Block deco_pipe_framed_green;
|
@Deprecated public static Block deco_pipe_framed_green;
|
||||||
public static Block deco_pipe_framed_green_rusted;
|
@Deprecated public static Block deco_pipe_framed_green_rusted;
|
||||||
public static Block deco_pipe_framed_red;
|
@Deprecated public static Block deco_pipe_framed_red;
|
||||||
public static Block deco_pipe_framed_marked;
|
@Deprecated public static Block deco_pipe_framed_marked;
|
||||||
public static Block deco_pipe_quad;
|
@Deprecated public static Block deco_pipe_quad;
|
||||||
public static Block deco_pipe_quad_rusted;
|
@Deprecated public static Block deco_pipe_quad_rusted;
|
||||||
public static Block deco_pipe_quad_green;
|
@Deprecated public static Block deco_pipe_quad_green;
|
||||||
public static Block deco_pipe_quad_green_rusted;
|
@Deprecated public static Block deco_pipe_quad_green_rusted;
|
||||||
public static Block deco_pipe_quad_red;
|
@Deprecated public static Block deco_pipe_quad_red;
|
||||||
public static Block deco_pipe_quad_marked;
|
@Deprecated public static Block deco_pipe_quad_marked;
|
||||||
|
|
||||||
public static Block broadcaster_pc;
|
public static Block broadcaster_pc;
|
||||||
public static Block geiger;
|
public static Block geiger;
|
||||||
@ -458,11 +462,7 @@ public class ModBlocks {
|
|||||||
|
|
||||||
public static Block fence_metal;
|
public static Block fence_metal;
|
||||||
|
|
||||||
public static Block sand_boron;
|
public static Block sand_mix;
|
||||||
public static Block sand_lead;
|
|
||||||
public static Block sand_uranium;
|
|
||||||
public static Block sand_polonium;
|
|
||||||
public static Block sand_quartz;
|
|
||||||
public static Block ash_digamma;
|
public static Block ash_digamma;
|
||||||
public static Block glass_boron;
|
public static Block glass_boron;
|
||||||
public static Block glass_lead;
|
public static Block glass_lead;
|
||||||
@ -617,15 +617,7 @@ public class ModBlocks {
|
|||||||
|
|
||||||
public static Block tesla;
|
public static Block tesla;
|
||||||
|
|
||||||
public static Block sat_mapper;
|
|
||||||
public static Block sat_scanner;
|
|
||||||
public static Block sat_radar;
|
|
||||||
public static Block sat_laser;
|
|
||||||
public static Block sat_foeq;
|
|
||||||
public static Block sat_resonator;
|
|
||||||
|
|
||||||
public static Block sat_dock;
|
public static Block sat_dock;
|
||||||
|
|
||||||
public static Block soyuz_capsule;
|
public static Block soyuz_capsule;
|
||||||
public static Block crate_supply;
|
public static Block crate_supply;
|
||||||
|
|
||||||
@ -728,10 +720,6 @@ public class ModBlocks {
|
|||||||
public static Block hadron_coil_chlorophyte;
|
public static Block hadron_coil_chlorophyte;
|
||||||
public static Block hadron_coil_mese;
|
public static Block hadron_coil_mese;
|
||||||
public static Block hadron_power;
|
public static Block hadron_power;
|
||||||
public static Block hadron_power_10m;
|
|
||||||
public static Block hadron_power_100m;
|
|
||||||
public static Block hadron_power_1g;
|
|
||||||
public static Block hadron_power_10g;
|
|
||||||
public static Block hadron_diode;
|
public static Block hadron_diode;
|
||||||
public static Block hadron_analysis;
|
public static Block hadron_analysis;
|
||||||
public static Block hadron_analysis_glass;
|
public static Block hadron_analysis_glass;
|
||||||
@ -747,25 +735,24 @@ public class ModBlocks {
|
|||||||
|
|
||||||
public static Block machine_electric_furnace_off;
|
public static Block machine_electric_furnace_off;
|
||||||
public static Block machine_electric_furnace_on;
|
public static Block machine_electric_furnace_on;
|
||||||
|
|
||||||
public static Block machine_microwave;
|
public static Block machine_microwave;
|
||||||
|
|
||||||
//public static Block machine_deuterium;
|
public static Block machine_battery_socket;
|
||||||
|
public static Block machine_battery_redd;
|
||||||
|
|
||||||
|
@Deprecated public static Block machine_battery_potato;
|
||||||
|
@Deprecated public static Block machine_battery;
|
||||||
|
@Deprecated public static Block machine_lithium_battery;
|
||||||
|
@Deprecated public static Block machine_schrabidium_battery;
|
||||||
|
@Deprecated public static Block machine_dineutronium_battery;
|
||||||
|
@Deprecated public static Block machine_fensu;
|
||||||
|
|
||||||
public static Block machine_battery_potato;
|
@Deprecated public static Block capacitor_bus;
|
||||||
public static Block machine_battery;
|
public static Block capacitor_copper; // neat for structures
|
||||||
public static Block machine_lithium_battery;
|
@Deprecated public static Block capacitor_gold;
|
||||||
public static Block machine_schrabidium_battery;
|
@Deprecated public static Block capacitor_niobium;
|
||||||
public static Block machine_dineutronium_battery;
|
@Deprecated public static Block capacitor_tantalium;
|
||||||
public static Block machine_fensu;
|
@Deprecated public static Block capacitor_schrabidate;
|
||||||
public static final int guiID_machine_fensu = 99;
|
|
||||||
|
|
||||||
public static Block capacitor_bus;
|
|
||||||
public static Block capacitor_copper;
|
|
||||||
public static Block capacitor_gold;
|
|
||||||
public static Block capacitor_niobium;
|
|
||||||
public static Block capacitor_tantalium;
|
|
||||||
public static Block capacitor_schrabidate;
|
|
||||||
|
|
||||||
public static Block machine_wood_burner;
|
public static Block machine_wood_burner;
|
||||||
|
|
||||||
@ -774,6 +761,7 @@ public class ModBlocks {
|
|||||||
public static Block red_cable_classic;
|
public static Block red_cable_classic;
|
||||||
public static Block red_cable_paintable;
|
public static Block red_cable_paintable;
|
||||||
public static Block red_cable_gauge;
|
public static Block red_cable_gauge;
|
||||||
|
public static Block red_cable_box;
|
||||||
public static Block red_connector;
|
public static Block red_connector;
|
||||||
public static Block red_pylon;
|
public static Block red_pylon;
|
||||||
public static Block red_pylon_medium_wood;
|
public static Block red_pylon_medium_wood;
|
||||||
@ -792,8 +780,10 @@ public class ModBlocks {
|
|||||||
public static Block fluid_duct_gauge;
|
public static Block fluid_duct_gauge;
|
||||||
public static Block fluid_duct_exhaust;
|
public static Block fluid_duct_exhaust;
|
||||||
public static Block fluid_duct_paintable_block_exhaust;
|
public static Block fluid_duct_paintable_block_exhaust;
|
||||||
|
public static Block pipe_anchor;
|
||||||
public static Block fluid_valve;
|
public static Block fluid_valve;
|
||||||
public static Block fluid_switch;
|
public static Block fluid_switch;
|
||||||
|
public static Block fluid_counter_valve;
|
||||||
public static Block fluid_pump;
|
public static Block fluid_pump;
|
||||||
public static Block machine_drain;
|
public static Block machine_drain;
|
||||||
public static Block radio_torch_sender;
|
public static Block radio_torch_sender;
|
||||||
@ -807,7 +797,6 @@ public class ModBlocks {
|
|||||||
|
|
||||||
public static Block conveyor;
|
public static Block conveyor;
|
||||||
public static Block conveyor_express;
|
public static Block conveyor_express;
|
||||||
//public static Block conveyor_classic;
|
|
||||||
public static Block conveyor_double;
|
public static Block conveyor_double;
|
||||||
public static Block conveyor_triple;
|
public static Block conveyor_triple;
|
||||||
public static Block conveyor_chute;
|
public static Block conveyor_chute;
|
||||||
@ -832,7 +821,6 @@ public class ModBlocks {
|
|||||||
public static Block pneumatic_tube_paintable;
|
public static Block pneumatic_tube_paintable;
|
||||||
|
|
||||||
public static Block fan;
|
public static Block fan;
|
||||||
|
|
||||||
public static Block piston_inserter;
|
public static Block piston_inserter;
|
||||||
|
|
||||||
public static Block chain;
|
public static Block chain;
|
||||||
@ -851,8 +839,8 @@ public class ModBlocks {
|
|||||||
public static Block trapdoor_steel;
|
public static Block trapdoor_steel;
|
||||||
|
|
||||||
public static Block barrel_plastic;
|
public static Block barrel_plastic;
|
||||||
public static Block barrel_corroded;
|
@Deprecated public static Block barrel_corroded;
|
||||||
public static Block barrel_iron;
|
@Deprecated public static Block barrel_iron;
|
||||||
public static Block barrel_steel;
|
public static Block barrel_steel;
|
||||||
public static Block barrel_tcalloy;
|
public static Block barrel_tcalloy;
|
||||||
public static Block barrel_antimatter;
|
public static Block barrel_antimatter;
|
||||||
@ -868,8 +856,7 @@ public class ModBlocks {
|
|||||||
public static Block struct_launcher_core;
|
public static Block struct_launcher_core;
|
||||||
public static Block struct_launcher_core_large;
|
public static Block struct_launcher_core_large;
|
||||||
public static Block struct_soyuz_core;
|
public static Block struct_soyuz_core;
|
||||||
public static Block struct_iter_core;
|
public static Block struct_torus_core;
|
||||||
public static Block struct_plasma_core;
|
|
||||||
public static Block struct_watz_core;
|
public static Block struct_watz_core;
|
||||||
public static Block struct_icf_core;
|
public static Block struct_icf_core;
|
||||||
|
|
||||||
@ -899,15 +886,22 @@ public class ModBlocks {
|
|||||||
public static Block pwr_controller;
|
public static Block pwr_controller;
|
||||||
public static Block pwr_block;
|
public static Block pwr_block;
|
||||||
|
|
||||||
public static Block fusion_conductor;
|
@Deprecated public static Block fusion_heater;
|
||||||
public static Block fusion_center;
|
@Deprecated public static Block fusion_hatch;
|
||||||
public static Block fusion_motor;
|
@Deprecated public static Block plasma; // only actually used by the old plasma grenade, will die with the grenade rework
|
||||||
public static Block fusion_heater;
|
|
||||||
public static Block fusion_hatch;
|
|
||||||
public static Block plasma;
|
|
||||||
|
|
||||||
public static Block iter;
|
@Deprecated public static Block iter;
|
||||||
public static Block plasma_heater;
|
@Deprecated public static Block plasma_heater;
|
||||||
|
|
||||||
|
public static Block fusion_component;
|
||||||
|
public static Block fusion_torus;
|
||||||
|
public static Block fusion_klystron;
|
||||||
|
public static Block fusion_klystron_creative;
|
||||||
|
public static Block fusion_breeder;
|
||||||
|
public static Block fusion_collector;
|
||||||
|
public static Block fusion_boiler;
|
||||||
|
public static Block fusion_mhdt;
|
||||||
|
public static Block fusion_coupler;
|
||||||
|
|
||||||
public static Block machine_icf_press;
|
public static Block machine_icf_press;
|
||||||
public static Block icf_component;
|
public static Block icf_component;
|
||||||
@ -936,8 +930,6 @@ public class ModBlocks {
|
|||||||
public static Block machine_converter_he_rf;
|
public static Block machine_converter_he_rf;
|
||||||
public static Block machine_converter_rf_he;
|
public static Block machine_converter_rf_he;
|
||||||
|
|
||||||
public static Block machine_schrabidium_transmutator;
|
|
||||||
|
|
||||||
public static Block machine_diesel;
|
public static Block machine_diesel;
|
||||||
public static Block machine_combustion_engine;
|
public static Block machine_combustion_engine;
|
||||||
|
|
||||||
@ -948,8 +940,6 @@ public class ModBlocks {
|
|||||||
public static Block field_disturber;
|
public static Block field_disturber;
|
||||||
|
|
||||||
public static Block machine_rtg_grey;
|
public static Block machine_rtg_grey;
|
||||||
public static Block machine_amgen;
|
|
||||||
public static Block machine_geo;
|
|
||||||
public static Block machine_minirtg;
|
public static Block machine_minirtg;
|
||||||
public static Block machine_powerrtg;
|
public static Block machine_powerrtg;
|
||||||
public static Block machine_radiolysis;
|
public static Block machine_radiolysis;
|
||||||
@ -999,6 +989,7 @@ public class ModBlocks {
|
|||||||
|
|
||||||
public static Block machine_excavator;
|
public static Block machine_excavator;
|
||||||
public static Block machine_ore_slopper;
|
public static Block machine_ore_slopper;
|
||||||
|
public static Block machine_annihilator;
|
||||||
public static Block machine_autosaw;
|
public static Block machine_autosaw;
|
||||||
|
|
||||||
public static Block machine_mining_laser;
|
public static Block machine_mining_laser;
|
||||||
@ -1007,6 +998,8 @@ public class ModBlocks {
|
|||||||
@Deprecated public static Block machine_assembler;
|
@Deprecated public static Block machine_assembler;
|
||||||
public static Block machine_assembly_machine;
|
public static Block machine_assembly_machine;
|
||||||
@Deprecated public static Block machine_assemfac;
|
@Deprecated public static Block machine_assemfac;
|
||||||
|
public static Block machine_assembly_factory;
|
||||||
|
public static Block machine_precass;
|
||||||
public static Block machine_arc_welder;
|
public static Block machine_arc_welder;
|
||||||
public static Block machine_soldering_station;
|
public static Block machine_soldering_station;
|
||||||
public static Block machine_arc_furnace;
|
public static Block machine_arc_furnace;
|
||||||
@ -1063,9 +1056,6 @@ public class ModBlocks {
|
|||||||
|
|
||||||
public static Block machine_controller;
|
public static Block machine_controller;
|
||||||
|
|
||||||
public static Block machine_spp_bottom;
|
|
||||||
public static Block machine_spp_top;
|
|
||||||
|
|
||||||
public static Block radiobox;
|
public static Block radiobox;
|
||||||
public static Block radiorec;
|
public static Block radiorec;
|
||||||
|
|
||||||
@ -1176,10 +1166,11 @@ public class ModBlocks {
|
|||||||
public static Block gas_explosive;
|
public static Block gas_explosive;
|
||||||
public static Block vacuum;
|
public static Block vacuum;
|
||||||
|
|
||||||
public static Block absorber;
|
@Deprecated public static Block absorber;
|
||||||
public static Block absorber_red;
|
@Deprecated public static Block absorber_red;
|
||||||
public static Block absorber_green;
|
@Deprecated public static Block absorber_green;
|
||||||
public static Block absorber_pink;
|
@Deprecated public static Block absorber_pink;
|
||||||
|
public static Block rad_absorber;
|
||||||
public static Block decon;
|
public static Block decon;
|
||||||
|
|
||||||
public static Block mud_block;
|
public static Block mud_block;
|
||||||
@ -1249,6 +1240,7 @@ public class ModBlocks {
|
|||||||
public static Block wand_jigsaw;
|
public static Block wand_jigsaw;
|
||||||
public static Block wand_logic;
|
public static Block wand_logic;
|
||||||
public static Block wand_tandem;
|
public static Block wand_tandem;
|
||||||
|
public static Block wand_structure;
|
||||||
|
|
||||||
public static Block logic_block;
|
public static Block logic_block;
|
||||||
|
|
||||||
@ -1278,8 +1270,6 @@ public class ModBlocks {
|
|||||||
ore_beryllium = new BlockGeneric(Material.rock).setBlockName("ore_beryllium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(15.0F).setBlockTextureName(RefStrings.MODID + ":ore_beryllium");
|
ore_beryllium = new BlockGeneric(Material.rock).setBlockName("ore_beryllium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(15.0F).setBlockTextureName(RefStrings.MODID + ":ore_beryllium");
|
||||||
ore_lignite = new BlockOre(Material.rock).setBlockName("ore_lignite").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(15.0F).setBlockTextureName(RefStrings.MODID + ":ore_lignite");
|
ore_lignite = new BlockOre(Material.rock).setBlockName("ore_lignite").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(15.0F).setBlockTextureName(RefStrings.MODID + ":ore_lignite");
|
||||||
ore_asbestos = new BlockOutgas(Material.rock, true, 5, true).setBlockName("ore_asbestos").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(15.0F).setBlockTextureName(RefStrings.MODID + ":ore_asbestos");
|
ore_asbestos = new BlockOutgas(Material.rock, true, 5, true).setBlockName("ore_asbestos").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(15.0F).setBlockTextureName(RefStrings.MODID + ":ore_asbestos");
|
||||||
ore_coal_oil = new BlockCoalOil(Material.rock).setBlockName("ore_coal_oil").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(15.0F).setBlockTextureName(RefStrings.MODID + ":ore_coal_oil");
|
|
||||||
ore_coal_oil_burning = new BlockCoalBurning(Material.rock).setBlockName("ore_coal_oil_burning").setCreativeTab(MainRegistry.blockTab).setLightLevel(10F/15F).setHardness(5.0F).setResistance(15.0F).setBlockTextureName(RefStrings.MODID + ":ore_coal_oil_burning");
|
|
||||||
|
|
||||||
cluster_iron = new BlockCluster(Material.rock).setBlockName("cluster_iron").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(15.0F).setBlockTextureName(RefStrings.MODID + ":cluster_iron");
|
cluster_iron = new BlockCluster(Material.rock).setBlockName("cluster_iron").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(15.0F).setBlockTextureName(RefStrings.MODID + ":cluster_iron");
|
||||||
cluster_titanium = new BlockCluster(Material.rock).setBlockName("cluster_titanium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(15.0F).setBlockTextureName(RefStrings.MODID + ":cluster_titanium");
|
cluster_titanium = new BlockCluster(Material.rock).setBlockName("cluster_titanium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(15.0F).setBlockTextureName(RefStrings.MODID + ":cluster_titanium");
|
||||||
@ -1458,11 +1448,6 @@ public class ModBlocks {
|
|||||||
block_slag = new BlockSlag(Material.rock).setBlockName("block_slag").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeStone).setHardness(2.0F).setBlockTextureName(RefStrings.MODID + ":block_slag");
|
block_slag = new BlockSlag(Material.rock).setBlockName("block_slag").setCreativeTab(MainRegistry.blockTab).setStepSound(Block.soundTypeStone).setHardness(2.0F).setBlockTextureName(RefStrings.MODID + ":block_slag");
|
||||||
|
|
||||||
block_australium = new BlockBeaconable(Material.iron).setBlockName("block_australium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_australium");
|
block_australium = new BlockBeaconable(Material.iron).setBlockName("block_australium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_australium");
|
||||||
block_weidanium = new BlockBeaconable(Material.iron).setBlockName("block_weidanium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_deprecated");
|
|
||||||
block_reiium = new BlockBeaconable(Material.iron).setBlockName("block_reiium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_deprecated");
|
|
||||||
block_unobtainium = new BlockBeaconable(Material.iron).setBlockName("block_unobtainium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_deprecated");
|
|
||||||
block_daffergon = new BlockBeaconable(Material.iron).setBlockName("block_daffergon").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_deprecated");
|
|
||||||
block_verticium = new BlockBeaconable(Material.iron).setBlockName("block_verticium").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F).setBlockTextureName(RefStrings.MODID + ":block_deprecated");
|
|
||||||
|
|
||||||
block_cap = new BlockCap().setBlockName("block_cap").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F);
|
block_cap = new BlockCap().setBlockName("block_cap").setCreativeTab(MainRegistry.blockTab).setHardness(5.0F).setResistance(10.0F);
|
||||||
|
|
||||||
@ -1556,6 +1541,7 @@ public class ModBlocks {
|
|||||||
reinforced_ducrete = new BlockGeneric(Material.rock).setBlockName("reinforced_ducrete").setCreativeTab(MainRegistry.blockTab).setHardness(20.0F).setResistance(1000.0F).setBlockTextureName(RefStrings.MODID + ":reinforced_ducrete");
|
reinforced_ducrete = new BlockGeneric(Material.rock).setBlockName("reinforced_ducrete").setCreativeTab(MainRegistry.blockTab).setHardness(20.0F).setResistance(1000.0F).setBlockTextureName(RefStrings.MODID + ":reinforced_ducrete");
|
||||||
|
|
||||||
lightstone = new BlockLightstone(Material.rock, LightstoneType.class, true, true).setBlockName("lightstone").setCreativeTab(MainRegistry.blockTab).setHardness(2F).setResistance(15.0F).setBlockTextureName(RefStrings.MODID + ":lightstone");
|
lightstone = new BlockLightstone(Material.rock, LightstoneType.class, true, true).setBlockName("lightstone").setCreativeTab(MainRegistry.blockTab).setHardness(2F).setResistance(15.0F).setBlockTextureName(RefStrings.MODID + ":lightstone");
|
||||||
|
brick_forgotten = new BlockPillar(Material.rock, RefStrings.MODID + ":brick_forgotten_top").setBlockName("brick_forgotten").setBlockUnbreakable().setResistance(666_666F).setBlockTextureName(RefStrings.MODID + ":brick_forgotten");
|
||||||
|
|
||||||
concrete_slab = new BlockMultiSlab(null, Material.rock, concrete_smooth, concrete, concrete_asbestos, ducrete_smooth, ducrete, asphalt).setBlockName("concrete_slab").setCreativeTab(MainRegistry.blockTab);
|
concrete_slab = new BlockMultiSlab(null, Material.rock, concrete_smooth, concrete, concrete_asbestos, ducrete_smooth, ducrete, asphalt).setBlockName("concrete_slab").setCreativeTab(MainRegistry.blockTab);
|
||||||
concrete_double_slab = new BlockMultiSlab(concrete_slab, Material.rock, concrete_smooth, concrete, concrete_asbestos, ducrete_smooth, ducrete, asphalt).setBlockName("concrete_double_slab").setCreativeTab(MainRegistry.blockTab);
|
concrete_double_slab = new BlockMultiSlab(concrete_slab, Material.rock, concrete_smooth, concrete, concrete_asbestos, ducrete_smooth, ducrete, asphalt).setBlockName("concrete_double_slab").setCreativeTab(MainRegistry.blockTab);
|
||||||
@ -1637,6 +1623,7 @@ public class ModBlocks {
|
|||||||
steel_grate = new BlockGrate(Material.iron).setBlockName("steel_grate").setStepSound(ModSoundTypes.grate).setCreativeTab(MainRegistry.blockTab).setHardness(2.0F).setResistance(5.0F);
|
steel_grate = new BlockGrate(Material.iron).setBlockName("steel_grate").setStepSound(ModSoundTypes.grate).setCreativeTab(MainRegistry.blockTab).setHardness(2.0F).setResistance(5.0F);
|
||||||
steel_grate_wide = new BlockGrate(Material.iron).setBlockName("steel_grate_wide").setStepSound(ModSoundTypes.grate).setCreativeTab(MainRegistry.blockTab).setHardness(2.0F).setResistance(5.0F);
|
steel_grate_wide = new BlockGrate(Material.iron).setBlockName("steel_grate_wide").setStepSound(ModSoundTypes.grate).setCreativeTab(MainRegistry.blockTab).setHardness(2.0F).setResistance(5.0F);
|
||||||
|
|
||||||
|
//TODO: dear god
|
||||||
deco_pipe = new BlockPipe(Material.iron, RefStrings.MODID + ":pipe_side", 0).setBlockName("deco_pipe").setStepSound(ModSoundTypes.grate).setCreativeTab(MainRegistry.blockTab).setHardness(2.0F).setResistance(5.0F).setBlockTextureName(RefStrings.MODID + ":pipe_top");
|
deco_pipe = new BlockPipe(Material.iron, RefStrings.MODID + ":pipe_side", 0).setBlockName("deco_pipe").setStepSound(ModSoundTypes.grate).setCreativeTab(MainRegistry.blockTab).setHardness(2.0F).setResistance(5.0F).setBlockTextureName(RefStrings.MODID + ":pipe_top");
|
||||||
deco_pipe_rusted = new BlockPipe(Material.iron, RefStrings.MODID + ":pipe_side_rusty", 0).setBlockName("deco_pipe_rusted").setStepSound(ModSoundTypes.grate).setCreativeTab(MainRegistry.blockTab).setHardness(2.0F).setResistance(5.0F).setBlockTextureName(RefStrings.MODID + ":pipe_top_rusty");
|
deco_pipe_rusted = new BlockPipe(Material.iron, RefStrings.MODID + ":pipe_side_rusty", 0).setBlockName("deco_pipe_rusted").setStepSound(ModSoundTypes.grate).setCreativeTab(MainRegistry.blockTab).setHardness(2.0F).setResistance(5.0F).setBlockTextureName(RefStrings.MODID + ":pipe_top_rusty");
|
||||||
deco_pipe_green = new BlockPipe(Material.iron, RefStrings.MODID + ":pipe_side_green", 0).setBlockName("deco_pipe_green").setStepSound(ModSoundTypes.grate).setCreativeTab(MainRegistry.blockTab).setHardness(2.0F).setResistance(5.0F).setBlockTextureName(RefStrings.MODID + ":pipe_top_green");
|
deco_pipe_green = new BlockPipe(Material.iron, RefStrings.MODID + ":pipe_side_green", 0).setBlockName("deco_pipe_green").setStepSound(ModSoundTypes.grate).setCreativeTab(MainRegistry.blockTab).setHardness(2.0F).setResistance(5.0F).setBlockTextureName(RefStrings.MODID + ":pipe_top_green");
|
||||||
@ -1669,11 +1656,7 @@ public class ModBlocks {
|
|||||||
fence_metal = new BlockMetalFence(Material.iron).setBlockName("fence_metal").setCreativeTab(MainRegistry.machineTab).setHardness(15.0F).setResistance(0.25F).setBlockTextureName(RefStrings.MODID + ":fence_metal");
|
fence_metal = new BlockMetalFence(Material.iron).setBlockName("fence_metal").setCreativeTab(MainRegistry.machineTab).setHardness(15.0F).setResistance(0.25F).setBlockTextureName(RefStrings.MODID + ":fence_metal");
|
||||||
|
|
||||||
ash_digamma = new BlockAshes(Material.sand).setBlockName("ash_digamma").setStepSound(Block.soundTypeSand).setCreativeTab(MainRegistry.machineTab).setHardness(0.5F).setResistance(150.0F).setBlockTextureName(RefStrings.MODID + ":ash_digamma");
|
ash_digamma = new BlockAshes(Material.sand).setBlockName("ash_digamma").setStepSound(Block.soundTypeSand).setCreativeTab(MainRegistry.machineTab).setHardness(0.5F).setResistance(150.0F).setBlockTextureName(RefStrings.MODID + ":ash_digamma");
|
||||||
sand_boron = new BlockFalling(Material.sand).setBlockName("sand_boron").setStepSound(Block.soundTypeSand).setCreativeTab(MainRegistry.machineTab).setHardness(0.5F).setBlockTextureName(RefStrings.MODID + ":sand_boron");
|
sand_mix = new BlockNTMSand(Material.sand).setBlockName("sand_mix").setStepSound(Block.soundTypeSand).setCreativeTab(MainRegistry.machineTab).setHardness(0.5F);
|
||||||
sand_lead = new BlockFalling(Material.sand).setBlockName("sand_lead").setStepSound(Block.soundTypeSand).setCreativeTab(MainRegistry.machineTab).setHardness(0.5F).setBlockTextureName(RefStrings.MODID + ":sand_lead");
|
|
||||||
sand_uranium = new BlockFalling(Material.sand).setBlockName("sand_uranium").setStepSound(Block.soundTypeSand).setCreativeTab(MainRegistry.machineTab).setHardness(0.5F).setBlockTextureName(RefStrings.MODID + ":sand_uranium");
|
|
||||||
sand_polonium = new BlockFalling(Material.sand).setBlockName("sand_polonium").setStepSound(Block.soundTypeSand).setCreativeTab(MainRegistry.machineTab).setHardness(0.5F).setBlockTextureName(RefStrings.MODID + ":sand_polonium");
|
|
||||||
sand_quartz = new BlockFalling(Material.sand).setBlockName("sand_quartz").setStepSound(Block.soundTypeSand).setCreativeTab(MainRegistry.machineTab).setHardness(0.5F).setBlockTextureName(RefStrings.MODID + ":sand_quartz");
|
|
||||||
glass_boron = new BlockNTMGlassCT(0, RefStrings.MODID + ":glass_boron", Material.glass).setBlockName("glass_boron").setStepSound(Block.soundTypeGlass).setCreativeTab(MainRegistry.machineTab).setHardness(0.3F);
|
glass_boron = new BlockNTMGlassCT(0, RefStrings.MODID + ":glass_boron", Material.glass).setBlockName("glass_boron").setStepSound(Block.soundTypeGlass).setCreativeTab(MainRegistry.machineTab).setHardness(0.3F);
|
||||||
glass_lead = new BlockNTMGlassCT(0, RefStrings.MODID + ":glass_lead", Material.glass).setBlockName("glass_lead").setStepSound(Block.soundTypeGlass).setCreativeTab(MainRegistry.machineTab).setHardness(0.3F);
|
glass_lead = new BlockNTMGlassCT(0, RefStrings.MODID + ":glass_lead", Material.glass).setBlockName("glass_lead").setStepSound(Block.soundTypeGlass).setCreativeTab(MainRegistry.machineTab).setHardness(0.3F);
|
||||||
glass_uranium = new BlockNTMGlassCT(1, RefStrings.MODID + ":glass_uranium", Material.glass).setBlockName("glass_uranium").setLightLevel(5F/15F).setStepSound(Block.soundTypeGlass).setCreativeTab(MainRegistry.machineTab).setHardness(0.3F);
|
glass_uranium = new BlockNTMGlassCT(1, RefStrings.MODID + ":glass_uranium", Material.glass).setBlockName("glass_uranium").setLightLevel(5F/15F).setStepSound(Block.soundTypeGlass).setCreativeTab(MainRegistry.machineTab).setHardness(0.3F);
|
||||||
@ -1825,9 +1808,8 @@ public class ModBlocks {
|
|||||||
machine_rotary_furnace = new MachineRotaryFurnace(Material.iron).setBlockName("machine_rotary_furnace").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":brick_fire");
|
machine_rotary_furnace = new MachineRotaryFurnace(Material.iron).setBlockName("machine_rotary_furnace").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":brick_fire");
|
||||||
machine_crystallizer = new MachineCrystallizer(Material.iron).setBlockName("machine_crystallizer").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_crystallizer");
|
machine_crystallizer = new MachineCrystallizer(Material.iron).setBlockName("machine_crystallizer").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_crystallizer");
|
||||||
|
|
||||||
machine_uf6_tank = new MachineUF6Tank(Material.iron).setBlockName("machine_uf6_tank").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
machine_uf6_tank = new MachineUF6Tank(Material.iron).setBlockName("machine_uf6_tank").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null);
|
||||||
|
machine_puf6_tank = new MachinePuF6Tank(Material.iron).setBlockName("machine_puf6_tank").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null);
|
||||||
machine_puf6_tank = new MachinePuF6Tank(Material.iron).setBlockName("machine_puf6_tank").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
|
||||||
|
|
||||||
machine_reactor_breeding = new MachineReactorBreeding(Material.iron).setBlockName("machine_reactor").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_reactor");
|
machine_reactor_breeding = new MachineReactorBreeding(Material.iron).setBlockName("machine_reactor").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_reactor");
|
||||||
|
|
||||||
@ -1841,13 +1823,13 @@ public class ModBlocks {
|
|||||||
machine_exposure_chamber = new MachineExposureChamber(Material.iron).setBlockName("machine_exposure_chamber").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_aluminium");
|
machine_exposure_chamber = new MachineExposureChamber(Material.iron).setBlockName("machine_exposure_chamber").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_aluminium");
|
||||||
machine_radgen = new MachineRadGen(Material.iron).setBlockName("machine_radgen").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_radgen");
|
machine_radgen = new MachineRadGen(Material.iron).setBlockName("machine_radgen").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_radgen");
|
||||||
|
|
||||||
hadron_plating = new BlockHadronPlating(Material.iron).setStepSound(Block.soundTypeMetal).setBlockName("hadron_plating").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_plating");
|
hadron_plating = new BlockHadronPlating(Material.iron).setStepSound(Block.soundTypeMetal).setBlockName("hadron_plating").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":hadron_plating");
|
||||||
hadron_plating_blue = new BlockHadronPlating(Material.iron).setStepSound(Block.soundTypeMetal).setBlockName("hadron_plating_blue").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_plating_blue");
|
hadron_plating_blue = new BlockHadronPlating(Material.iron).setStepSound(Block.soundTypeMetal).setBlockName("hadron_plating_blue").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":hadron_plating_blue");
|
||||||
hadron_plating_black = new BlockHadronPlating(Material.iron).setStepSound(Block.soundTypeMetal).setBlockName("hadron_plating_black").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_plating_black");
|
hadron_plating_black = new BlockHadronPlating(Material.iron).setStepSound(Block.soundTypeMetal).setBlockName("hadron_plating_black").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":hadron_plating_black");
|
||||||
hadron_plating_yellow = new BlockHadronPlating(Material.iron).setStepSound(Block.soundTypeMetal).setBlockName("hadron_plating_yellow").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_plating_yellow");
|
hadron_plating_yellow = new BlockHadronPlating(Material.iron).setStepSound(Block.soundTypeMetal).setBlockName("hadron_plating_yellow").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":hadron_plating_yellow");
|
||||||
hadron_plating_striped = new BlockHadronPlating(Material.iron).setStepSound(Block.soundTypeMetal).setBlockName("hadron_plating_striped").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_plating_striped");
|
hadron_plating_striped = new BlockHadronPlating(Material.iron).setStepSound(Block.soundTypeMetal).setBlockName("hadron_plating_striped").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":hadron_plating_striped");
|
||||||
hadron_plating_voltz = new BlockHadronPlating(Material.iron).setStepSound(Block.soundTypeMetal).setBlockName("hadron_plating_voltz").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_plating_voltz");
|
hadron_plating_voltz = new BlockHadronPlating(Material.iron).setStepSound(Block.soundTypeMetal).setBlockName("hadron_plating_voltz").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":hadron_plating_voltz");
|
||||||
hadron_plating_glass = new BlockNTMGlass(0, RefStrings.MODID + ":hadron_plating_glass", Material.iron, true).setStepSound(Block.soundTypeMetal).setBlockName("hadron_plating_glass").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_plating_glass");
|
hadron_plating_glass = new BlockNTMGlass(0, RefStrings.MODID + ":hadron_plating_glass", Material.iron, true).setStepSound(Block.soundTypeMetal).setBlockName("hadron_plating_glass").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":hadron_plating_glass");
|
||||||
hadron_coil_alloy = new BlockHadronCoil(Material.iron, 10).setStepSound(Block.soundTypeMetal).setBlockName("hadron_coil_alloy").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_coil_alloy");
|
hadron_coil_alloy = new BlockHadronCoil(Material.iron, 10).setStepSound(Block.soundTypeMetal).setBlockName("hadron_coil_alloy").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_coil_alloy");
|
||||||
hadron_coil_gold = new BlockHadronCoil(Material.iron, 25).setStepSound(Block.soundTypeMetal).setBlockName("hadron_coil_gold").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_coil_gold");
|
hadron_coil_gold = new BlockHadronCoil(Material.iron, 25).setStepSound(Block.soundTypeMetal).setBlockName("hadron_coil_gold").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_coil_gold");
|
||||||
hadron_coil_neodymium = new BlockHadronCoil(Material.iron, 50).setStepSound(Block.soundTypeMetal).setBlockName("hadron_coil_neodymium").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_coil_neodymium");
|
hadron_coil_neodymium = new BlockHadronCoil(Material.iron, 50).setStepSound(Block.soundTypeMetal).setBlockName("hadron_coil_neodymium").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_coil_neodymium");
|
||||||
@ -1857,16 +1839,12 @@ public class ModBlocks {
|
|||||||
hadron_coil_starmetal = new BlockHadronCoil(Material.iron, 1000).setStepSound(Block.soundTypeMetal).setBlockName("hadron_coil_starmetal").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_coil_starmetal");
|
hadron_coil_starmetal = new BlockHadronCoil(Material.iron, 1000).setStepSound(Block.soundTypeMetal).setBlockName("hadron_coil_starmetal").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_coil_starmetal");
|
||||||
hadron_coil_chlorophyte = new BlockHadronCoil(Material.iron, 2500).setStepSound(Block.soundTypeMetal).setBlockName("hadron_coil_chlorophyte").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_coil_chlorophyte");
|
hadron_coil_chlorophyte = new BlockHadronCoil(Material.iron, 2500).setStepSound(Block.soundTypeMetal).setBlockName("hadron_coil_chlorophyte").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_coil_chlorophyte");
|
||||||
hadron_coil_mese = new BlockHadronCoil(Material.iron, 10000).setStepSound(Block.soundTypeMetal).setBlockName("hadron_coil_mese").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_coil_mese");
|
hadron_coil_mese = new BlockHadronCoil(Material.iron, 10000).setStepSound(Block.soundTypeMetal).setBlockName("hadron_coil_mese").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_coil_mese");
|
||||||
hadron_power = new BlockHadronPower(Material.iron, 1000000L).setStepSound(Block.soundTypeMetal).setBlockName("hadron_power").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_power");
|
hadron_power = new BlockHadronPower(Material.iron, 10000000000L).setStepSound(Block.soundTypeMetal).setBlockName("hadron_power").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":hadron_power");
|
||||||
hadron_power_10m = new BlockHadronPower(Material.iron, 10000000L).setStepSound(Block.soundTypeMetal).setBlockName("hadron_power_10m").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_power");
|
hadron_diode = new BlockHadronDiode(Material.iron).setStepSound(Block.soundTypeMetal).setBlockName("hadron_diode").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null);
|
||||||
hadron_power_100m = new BlockHadronPower(Material.iron, 100000000L).setStepSound(Block.soundTypeMetal).setBlockName("hadron_power_100m").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_power");
|
hadron_analysis = new BlockHadronPlating(Material.iron).setStepSound(Block.soundTypeMetal).setBlockName("hadron_analysis").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":hadron_analysis");
|
||||||
hadron_power_1g = new BlockHadronPower(Material.iron, 1000000000L).setStepSound(Block.soundTypeMetal).setBlockName("hadron_power_1g").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_power");
|
hadron_analysis_glass = new BlockNTMGlass(0, RefStrings.MODID + ":hadron_analysis_glass", Material.iron, true).setStepSound(Block.soundTypeMetal).setBlockName("hadron_analysis_glass").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":hadron_analysis_glass");
|
||||||
hadron_power_10g = new BlockHadronPower(Material.iron, 10000000000L).setStepSound(Block.soundTypeMetal).setBlockName("hadron_power_10g").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_power");
|
hadron_access = new BlockHadronAccess(Material.iron).setStepSound(Block.soundTypeMetal).setBlockName("hadron_access").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":hadron_access");
|
||||||
hadron_diode = new BlockHadronDiode(Material.iron).setStepSound(Block.soundTypeMetal).setBlockName("hadron_diode").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
hadron_core = new BlockHadronCore(Material.iron).setStepSound(Block.soundTypeMetal).setBlockName("hadron_core").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":hadron_core");
|
||||||
hadron_analysis = new BlockHadronPlating(Material.iron).setStepSound(Block.soundTypeMetal).setBlockName("hadron_analysis").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_analysis");
|
|
||||||
hadron_analysis_glass = new BlockNTMGlass(0, RefStrings.MODID + ":hadron_analysis_glass", Material.iron, true).setStepSound(Block.soundTypeMetal).setBlockName("hadron_analysis_glass").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_analysis_glass");
|
|
||||||
hadron_access = new BlockHadronAccess(Material.iron).setStepSound(Block.soundTypeMetal).setBlockName("hadron_access").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_access");
|
|
||||||
hadron_core = new BlockHadronCore(Material.iron).setStepSound(Block.soundTypeMetal).setBlockName("hadron_core").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":hadron_core");
|
|
||||||
|
|
||||||
pa_source = new BlockPASource().setStepSound(Block.soundTypeMetal).setBlockName("pa_source").setHardness(5.0F).setResistance(10.0F);
|
pa_source = new BlockPASource().setStepSound(Block.soundTypeMetal).setBlockName("pa_source").setHardness(5.0F).setResistance(10.0F);
|
||||||
pa_beamline = new BlockPABeamline().setStepSound(Block.soundTypeMetal).setBlockName("pa_beamline").setHardness(5.0F).setResistance(10.0F);
|
pa_beamline = new BlockPABeamline().setStepSound(Block.soundTypeMetal).setBlockName("pa_beamline").setHardness(5.0F).setResistance(10.0F);
|
||||||
@ -1880,19 +1858,22 @@ public class ModBlocks {
|
|||||||
machine_arc_furnace = new MachineArcFurnaceLarge().setBlockName("machine_arc_furnace").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
machine_arc_furnace = new MachineArcFurnaceLarge().setBlockName("machine_arc_furnace").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||||
machine_microwave = new MachineMicrowave(Material.iron).setBlockName("machine_microwave").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_microwave");
|
machine_microwave = new MachineMicrowave(Material.iron).setBlockName("machine_microwave").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_microwave");
|
||||||
|
|
||||||
machine_battery_potato = new MachineBattery(Material.iron, 10_000).setBlockName("machine_battery_potato").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
machine_battery_socket = new MachineBatterySocket().setBlockName("machine_battery_socket").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||||
machine_battery = new MachineBattery(Material.iron, 1_000_000).setBlockName("machine_battery").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
machine_battery_redd = new MachineBatteryREDD().setBlockName("machine_battery_redd").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||||
machine_lithium_battery = new MachineBattery(Material.iron, 50_000_000).setBlockName("machine_lithium_battery").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
|
||||||
machine_schrabidium_battery = new MachineBattery(Material.iron, 25_000_000_000L).setBlockName("machine_schrabidium_battery").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
machine_battery_potato = new MachineBattery(Material.iron, 10_000).setBlockName("machine_battery_potato").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null);
|
||||||
machine_dineutronium_battery = new MachineBattery(Material.iron, 1_000_000_000_000L).setBlockName("machine_dineutronium_battery").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
machine_battery = new MachineBattery(Material.iron, 1_000_000).setBlockName("machine_battery").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null);
|
||||||
machine_fensu = new MachineFENSU(Material.iron).setBlockName("machine_fensu").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_fensu");
|
machine_lithium_battery = new MachineBattery(Material.iron, 50_000_000).setBlockName("machine_lithium_battery").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null);
|
||||||
|
machine_schrabidium_battery = new MachineBattery(Material.iron, 25_000_000_000L).setBlockName("machine_schrabidium_battery").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null);
|
||||||
|
machine_dineutronium_battery = new MachineBattery(Material.iron, 1_000_000_000_000L).setBlockName("machine_dineutronium_battery").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null);
|
||||||
|
machine_fensu = new MachineFENSU(Material.iron).setBlockName("machine_fensu").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":machine_fensu");
|
||||||
|
|
||||||
capacitor_bus = new MachineCapacitorBus(Material.iron).setBlockName("capacitor_bus").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
capacitor_bus = new MachineCapacitorBus(Material.iron).setBlockName("capacitor_bus").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null);
|
||||||
capacitor_copper = new MachineCapacitor(Material.iron, 1_000_000L, "copper").setBlockName("capacitor_copper").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_copper");
|
capacitor_copper = new MachineCapacitor(Material.iron, 1_000_000L, "copper").setBlockName("capacitor_copper").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_copper");
|
||||||
capacitor_gold = new MachineCapacitor(Material.iron, 5_000_000L, "gold").setBlockName("capacitor_gold").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName("gold_block");
|
capacitor_gold = new MachineCapacitor(Material.iron, 5_000_000L, "gold").setBlockName("capacitor_gold").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName("gold_block");
|
||||||
capacitor_niobium = new MachineCapacitor(Material.iron, 25_000_000L, "niobium").setBlockName("capacitor_niobium").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_niobium");
|
capacitor_niobium = new MachineCapacitor(Material.iron, 25_000_000L, "niobium").setBlockName("capacitor_niobium").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_niobium");
|
||||||
capacitor_tantalium = new MachineCapacitor(Material.iron, 150_000_000L, "tantalium").setBlockName("capacitor_tantalium").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_tantalium");
|
capacitor_tantalium = new MachineCapacitor(Material.iron, 150_000_000L, "tantalium").setBlockName("capacitor_tantalium").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_tantalium");
|
||||||
capacitor_schrabidate = new MachineCapacitor(Material.iron, 50_000_000_000L, "schrabidate").setBlockName("capacitor_schrabidate").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_schrabidate");
|
capacitor_schrabidate = new MachineCapacitor(Material.iron, 50_000_000_000L, "schrabidate").setBlockName("capacitor_schrabidate").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_schrabidate");
|
||||||
|
|
||||||
machine_wood_burner = new MachineWoodBurner(Material.iron).setBlockName("machine_wood_burner").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
machine_wood_burner = new MachineWoodBurner(Material.iron).setBlockName("machine_wood_burner").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||||
machine_diesel = new MachineDiesel().setBlockName("machine_diesel").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
machine_diesel = new MachineDiesel().setBlockName("machine_diesel").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||||
@ -1905,8 +1886,6 @@ public class ModBlocks {
|
|||||||
field_disturber = new MachineFieldDisturber().setBlockName("field_disturber").setHardness(5.0F).setResistance(200.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":field_disturber");
|
field_disturber = new MachineFieldDisturber().setBlockName("field_disturber").setHardness(5.0F).setResistance(200.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":field_disturber");
|
||||||
|
|
||||||
machine_rtg_grey = new MachineRTG(Material.iron).setBlockName("machine_rtg_grey").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":rtg");
|
machine_rtg_grey = new MachineRTG(Material.iron).setBlockName("machine_rtg_grey").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":rtg");
|
||||||
machine_amgen = new MachineAmgen(Material.iron).setBlockName("machine_amgen").setHardness(5.0F).setResistance(10.0F);
|
|
||||||
machine_geo = new MachineAmgen(Material.iron).setBlockName("machine_geo").setHardness(5.0F).setResistance(10.0F);
|
|
||||||
machine_minirtg = new MachineMiniRTG(Material.iron).setBlockName("machine_minirtg").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":rtg_cell");
|
machine_minirtg = new MachineMiniRTG(Material.iron).setBlockName("machine_minirtg").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":rtg_cell");
|
||||||
machine_powerrtg = new MachineMiniRTG(Material.iron).setBlockName("machine_powerrtg").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":rtg_polonium");
|
machine_powerrtg = new MachineMiniRTG(Material.iron).setBlockName("machine_powerrtg").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":rtg_polonium");
|
||||||
machine_radiolysis = new MachineRadiolysis(Material.iron).setBlockName("machine_radiolysis").setHardness(10.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel_machine");
|
machine_radiolysis = new MachineRadiolysis(Material.iron).setBlockName("machine_radiolysis").setHardness(10.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel_machine");
|
||||||
@ -1917,6 +1896,7 @@ public class ModBlocks {
|
|||||||
red_cable_classic = new BlockCable(Material.iron).setBlockName("red_cable_classic").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":red_cable_classic");
|
red_cable_classic = new BlockCable(Material.iron).setBlockName("red_cable_classic").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":red_cable_classic");
|
||||||
red_cable_paintable = new BlockCablePaintable().setBlockName("red_cable_paintable").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
red_cable_paintable = new BlockCablePaintable().setBlockName("red_cable_paintable").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||||
red_cable_gauge = new BlockCableGauge().setBlockName("red_cable_gauge").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
red_cable_gauge = new BlockCableGauge().setBlockName("red_cable_gauge").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||||
|
red_cable_box = new PowerCableBox(Material.iron).setBlockName("red_cable_box").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":fluid_duct_box");
|
||||||
red_connector = new ConnectorRedWire(Material.iron).setBlockName("red_connector").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":red_connector");
|
red_connector = new ConnectorRedWire(Material.iron).setBlockName("red_connector").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":red_connector");
|
||||||
red_pylon = new PylonRedWire(Material.iron).setBlockName("red_pylon").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":red_pylon");
|
red_pylon = new PylonRedWire(Material.iron).setBlockName("red_pylon").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":red_pylon");
|
||||||
red_pylon_medium_wood = new PylonMedium(Material.wood).setBlockName("red_pylon_medium_wood").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":red_pylon");
|
red_pylon_medium_wood = new PylonMedium(Material.wood).setBlockName("red_pylon_medium_wood").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":red_pylon");
|
||||||
@ -1933,10 +1913,12 @@ public class ModBlocks {
|
|||||||
fluid_duct_box = new FluidDuctBox(Material.iron).setBlockName("fluid_duct_box").setStepSound(ModSoundTypes.pipe).setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":fluid_duct_box");
|
fluid_duct_box = new FluidDuctBox(Material.iron).setBlockName("fluid_duct_box").setStepSound(ModSoundTypes.pipe).setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":fluid_duct_box");
|
||||||
fluid_duct_exhaust = new FluidDuctBoxExhaust(Material.iron).setBlockName("fluid_duct_exhaust").setStepSound(ModSoundTypes.pipe).setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":fluid_duct_box");
|
fluid_duct_exhaust = new FluidDuctBoxExhaust(Material.iron).setBlockName("fluid_duct_exhaust").setStepSound(ModSoundTypes.pipe).setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":fluid_duct_box");
|
||||||
fluid_duct_paintable_block_exhaust = new FluidDuctPaintableBlockExhaust().setBlockName("fluid_duct_paintable_block_exhaust").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
fluid_duct_paintable_block_exhaust = new FluidDuctPaintableBlockExhaust().setBlockName("fluid_duct_paintable_block_exhaust").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||||
|
pipe_anchor = new FluidPipeAnchor().setBlockName("pipe_anchor").setStepSound(ModSoundTypes.pipe).setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||||
fluid_duct_paintable = new FluidDuctPaintable().setBlockName("fluid_duct_paintable").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
fluid_duct_paintable = new FluidDuctPaintable().setBlockName("fluid_duct_paintable").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||||
fluid_duct_gauge = new FluidDuctGauge().setBlockName("fluid_duct_gauge").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
fluid_duct_gauge = new FluidDuctGauge().setBlockName("fluid_duct_gauge").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||||
fluid_valve = new FluidValve(Material.iron).setBlockName("fluid_valve").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
fluid_valve = new FluidValve(Material.iron).setBlockName("fluid_valve").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||||
fluid_switch = new FluidSwitch(Material.iron).setBlockName("fluid_switch").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
fluid_switch = new FluidSwitch(Material.iron).setBlockName("fluid_switch").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||||
|
fluid_counter_valve = new FluidCounterValve(Material.iron).setBlockName("fluid_counter_valve").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||||
fluid_pump = new FluidPump(Material.iron).setBlockName("fluid_pump").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
fluid_pump = new FluidPump(Material.iron).setBlockName("fluid_pump").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||||
machine_drain = new MachineDrain(Material.iron).setBlockName("machine_drain").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":concrete");
|
machine_drain = new MachineDrain(Material.iron).setBlockName("machine_drain").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":concrete");
|
||||||
radio_torch_sender = new RadioTorchSender().setBlockName("radio_torch_sender").setHardness(0.1F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
radio_torch_sender = new RadioTorchSender().setBlockName("radio_torch_sender").setHardness(0.1F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||||
@ -1990,8 +1972,8 @@ public class ModBlocks {
|
|||||||
trapdoor_steel = new BlockNTMTrapdoor(Material.iron).setBlockName("trapdoor_steel").setHardness(3F).setResistance(8.0F).setStepSound(Block.soundTypeMetal).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":trapdoor_steel");
|
trapdoor_steel = new BlockNTMTrapdoor(Material.iron).setBlockName("trapdoor_steel").setHardness(3F).setResistance(8.0F).setStepSound(Block.soundTypeMetal).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":trapdoor_steel");
|
||||||
|
|
||||||
barrel_plastic = new BlockFluidBarrel(Material.iron, 12000).setBlockName("barrel_plastic").setStepSound(Block.soundTypeStone).setHardness(2.0F).setResistance(5.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":barrel_plastic");
|
barrel_plastic = new BlockFluidBarrel(Material.iron, 12000).setBlockName("barrel_plastic").setStepSound(Block.soundTypeStone).setHardness(2.0F).setResistance(5.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":barrel_plastic");
|
||||||
barrel_corroded = new BlockFluidBarrel(Material.iron, 6000).setBlockName("barrel_corroded").setStepSound(Block.soundTypeMetal).setHardness(2.0F).setResistance(5.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":barrel_corroded");
|
barrel_corroded = new BlockFluidBarrel(Material.iron, 6000).setBlockName("barrel_corroded").setStepSound(Block.soundTypeMetal).setHardness(2.0F).setResistance(5.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":barrel_corroded");
|
||||||
barrel_iron = new BlockFluidBarrel(Material.iron, 8000).setBlockName("barrel_iron").setStepSound(Block.soundTypeMetal).setHardness(2.0F).setResistance(5.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":barrel_iron");
|
barrel_iron = new BlockFluidBarrel(Material.iron, 8000).setBlockName("barrel_iron").setStepSound(Block.soundTypeMetal).setHardness(2.0F).setResistance(5.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":barrel_iron");
|
||||||
barrel_steel = new BlockFluidBarrel(Material.iron, 16000).setBlockName("barrel_steel").setStepSound(Block.soundTypeMetal).setHardness(2.0F).setResistance(5.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":barrel_steel");
|
barrel_steel = new BlockFluidBarrel(Material.iron, 16000).setBlockName("barrel_steel").setStepSound(Block.soundTypeMetal).setHardness(2.0F).setResistance(5.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":barrel_steel");
|
||||||
barrel_tcalloy = new BlockFluidBarrel(Material.iron, 24000).setBlockName("barrel_tcalloy").setStepSound(Block.soundTypeMetal).setHardness(2.0F).setResistance(5.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":barrel_tcalloy");
|
barrel_tcalloy = new BlockFluidBarrel(Material.iron, 24000).setBlockName("barrel_tcalloy").setStepSound(Block.soundTypeMetal).setHardness(2.0F).setResistance(5.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":barrel_tcalloy");
|
||||||
barrel_antimatter = new BlockFluidBarrel(Material.iron, 16000).setBlockName("barrel_antimatter").setStepSound(Block.soundTypeMetal).setHardness(2.0F).setResistance(5.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":barrel_antimatter");
|
barrel_antimatter = new BlockFluidBarrel(Material.iron, 16000).setBlockName("barrel_antimatter").setStepSound(Block.soundTypeMetal).setHardness(2.0F).setResistance(5.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":barrel_antimatter");
|
||||||
@ -2012,8 +1994,7 @@ public class ModBlocks {
|
|||||||
struct_launcher_core = new BlockStruct(Material.iron).setBlockName("struct_launcher_core").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":struct_launcher_core");
|
struct_launcher_core = new BlockStruct(Material.iron).setBlockName("struct_launcher_core").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":struct_launcher_core");
|
||||||
struct_launcher_core_large = new BlockStruct(Material.iron).setBlockName("struct_launcher_core_large").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":struct_launcher_core_large");
|
struct_launcher_core_large = new BlockStruct(Material.iron).setBlockName("struct_launcher_core_large").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":struct_launcher_core_large");
|
||||||
struct_soyuz_core = new BlockSoyuzStruct(Material.iron).setBlockName("struct_soyuz_core").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":struct_soyuz_core");
|
struct_soyuz_core = new BlockSoyuzStruct(Material.iron).setBlockName("struct_soyuz_core").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":struct_soyuz_core");
|
||||||
struct_iter_core = new BlockITERStruct(Material.iron).setBlockName("struct_iter_core").setLightLevel(1F).setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":struct_iter_core");
|
struct_torus_core = new BlockFusionTorusStruct(Material.iron).setBlockName("struct_torus_core").setLightLevel(1F).setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":struct_torus_core");
|
||||||
struct_plasma_core = new BlockPlasmaStruct(Material.iron).setBlockName("struct_plasma_core").setLightLevel(1F).setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":struct_plasma_core");
|
|
||||||
struct_watz_core = new BlockWatzStruct(Material.iron).setBlockName("struct_watz_core").setLightLevel(1F).setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":struct_watz_core");
|
struct_watz_core = new BlockWatzStruct(Material.iron).setBlockName("struct_watz_core").setLightLevel(1F).setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":struct_watz_core");
|
||||||
struct_icf_core = new BlockICFStruct(Material.iron).setBlockName("struct_icf_core").setLightLevel(1F).setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":struct_icf_core");
|
struct_icf_core = new BlockICFStruct(Material.iron).setBlockName("struct_icf_core").setLightLevel(1F).setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":struct_icf_core");
|
||||||
|
|
||||||
@ -2043,14 +2024,21 @@ public class ModBlocks {
|
|||||||
pwr_controller = new MachinePWRController(Material.iron).setBlockName("pwr_controller").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":pwr_casing_blank");
|
pwr_controller = new MachinePWRController(Material.iron).setBlockName("pwr_controller").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":pwr_casing_blank");
|
||||||
pwr_block = new BlockPWR(Material.iron).setBlockName("pwr_block").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":pwr_block");
|
pwr_block = new BlockPWR(Material.iron).setBlockName("pwr_block").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":pwr_block");
|
||||||
|
|
||||||
fusion_conductor = new BlockToolConversionPillar(Material.iron).addVariant("_welded").setBlockName("fusion_conductor").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":fusion_conductor");
|
fusion_heater = new BlockPillar(Material.iron, RefStrings.MODID + ":fusion_heater_top").setBlockName("fusion_heater").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":fusion_heater_side");
|
||||||
fusion_center = new BlockPillar(Material.iron, RefStrings.MODID + ":fusion_center_top_alt").setBlockName("fusion_center").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":fusion_center_side_alt");
|
fusion_hatch = new FusionHatch(Material.iron).setBlockName("fusion_hatch").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":fusion_hatch");
|
||||||
fusion_motor = new BlockPillar(Material.iron, RefStrings.MODID + ":fusion_motor_top_alt").setBlockName("fusion_motor").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":fusion_motor_side_alt");
|
plasma = new BlockPlasma(Material.iron).setBlockName("plasma").setHardness(5.0F).setResistance(6000.0F).setLightLevel(1.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":plasma");
|
||||||
fusion_heater = new BlockPillar(Material.iron, RefStrings.MODID + ":fusion_heater_top").setBlockName("fusion_heater").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":fusion_heater_side");
|
iter = new MachineITER().setBlockName("iter").setHardness(5.0F).setResistance(60.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":iter");
|
||||||
fusion_hatch = new FusionHatch(Material.iron).setBlockName("fusion_hatch").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":fusion_hatch");
|
plasma_heater = new MachinePlasmaHeater().setBlockName("plasma_heater").setHardness(5.0F).setResistance(60.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":plasma_heater");
|
||||||
plasma = new BlockPlasma(Material.iron).setBlockName("plasma").setHardness(5.0F).setResistance(6000.0F).setLightLevel(1.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":plasma");
|
|
||||||
iter = new MachineITER().setBlockName("iter").setHardness(5.0F).setResistance(60.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":iter");
|
fusion_component = new BlockFusionComponent().setBlockName("fusion_component").setHardness(5.0F).setResistance(30.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":fusion_component");
|
||||||
plasma_heater = new MachinePlasmaHeater().setBlockName("plasma_heater").setHardness(5.0F).setResistance(60.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":plasma_heater");
|
fusion_torus = new MachineFusionTorus().setBlockName("fusion_torus").setHardness(5.0F).setResistance(60.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||||
|
fusion_klystron = new MachineFusionKlystron().setBlockName("fusion_klystron").setHardness(5.0F).setResistance(60.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||||
|
fusion_klystron_creative = new MachineFusionKlystronCreative().setBlockName("fusion_klystron_creative").setHardness(5.0F).setResistance(60.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||||
|
fusion_breeder = new MachineFusionBreeder().setBlockName("fusion_breeder").setHardness(5.0F).setResistance(60.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||||
|
fusion_collector = new MachineFusionCollector().setBlockName("fusion_collector").setHardness(5.0F).setResistance(60.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||||
|
fusion_boiler = new MachineFusionBoiler().setBlockName("fusion_boiler").setHardness(5.0F).setResistance(60.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||||
|
fusion_mhdt = new MachineFusionMHDT().setBlockName("fusion_mhdt").setHardness(5.0F).setResistance(60.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||||
|
fusion_coupler = new MachineFusionCoupler().setBlockName("fusion_coupler").setHardness(5.0F).setResistance(60.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||||
|
|
||||||
machine_icf_press = new MachineICFPress().setBlockName("machine_icf_press").setHardness(5.0F).setResistance(60.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
machine_icf_press = new MachineICFPress().setBlockName("machine_icf_press").setHardness(5.0F).setResistance(60.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||||
icf = new MachineICF().setBlockName("icf").setHardness(5.0F).setResistance(60.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
icf = new MachineICF().setBlockName("icf").setHardness(5.0F).setResistance(60.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||||
@ -2128,13 +2116,6 @@ public class ModBlocks {
|
|||||||
launch_table = new LaunchTable(Material.iron).setBlockName("launch_table").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":launch_table");
|
launch_table = new LaunchTable(Material.iron).setBlockName("launch_table").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":launch_table");
|
||||||
soyuz_launcher = new SoyuzLauncher(Material.iron).setBlockName("soyuz_launcher").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":soyuz_launcher");
|
soyuz_launcher = new SoyuzLauncher(Material.iron).setBlockName("soyuz_launcher").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":soyuz_launcher");
|
||||||
|
|
||||||
sat_mapper = new DecoBlock(Material.iron).setBlockName("sat_mapper").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":sat_mapper");
|
|
||||||
sat_radar = new DecoBlock(Material.iron).setBlockName("sat_radar").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":sat_radar");
|
|
||||||
sat_scanner = new DecoBlock(Material.iron).setBlockName("sat_scanner").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":sat_scanner");
|
|
||||||
sat_laser = new DecoBlock(Material.iron).setBlockName("sat_laser").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":sat_laser");
|
|
||||||
sat_foeq = new DecoBlock(Material.iron).setBlockName("sat_foeq").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":sat_foeq");
|
|
||||||
sat_resonator = new DecoBlock(Material.iron).setBlockName("sat_resonator").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.blockTab).setBlockTextureName(RefStrings.MODID + ":sat_resonator");
|
|
||||||
|
|
||||||
sat_dock = new MachineSatDock(Material.iron).setBlockName("sat_dock").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":sat_dock");
|
sat_dock = new MachineSatDock(Material.iron).setBlockName("sat_dock").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":sat_dock");
|
||||||
soyuz_capsule = new SoyuzCapsule(Material.iron).setBlockName("soyuz_capsule").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":soyuz_capsule");
|
soyuz_capsule = new SoyuzCapsule(Material.iron).setBlockName("soyuz_capsule").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":soyuz_capsule");
|
||||||
crate_supply = new BlockSupplyCrate(Material.wood).setBlockName("crate_supply").setStepSound(Block.soundTypeWood).setHardness(1.0F).setResistance(2.5F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":crate_can");
|
crate_supply = new BlockSupplyCrate(Material.wood).setBlockName("crate_supply").setStepSound(Block.soundTypeWood).setHardness(1.0F).setResistance(2.5F).setCreativeTab(MainRegistry.missileTab).setBlockTextureName(RefStrings.MODID + ":crate_can");
|
||||||
@ -2182,10 +2163,10 @@ public class ModBlocks {
|
|||||||
|
|
||||||
book_guide = new Guide(Material.iron).setBlockName("book_guide").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.nukeTab);
|
book_guide = new Guide(Material.iron).setBlockName("book_guide").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.nukeTab);
|
||||||
|
|
||||||
rail_wood = new RailGeneric().setMaxSpeed(0.2F).setBlockName("rail_wood").setHardness(5.0F).setResistance(10.0F).setCreativeTab(CreativeTabs.tabTransport).setBlockTextureName(RefStrings.MODID + ":rail_wood");
|
rail_wood = new RailGeneric("axe", 0).setMaxSpeed(0.2F).setBlockName("rail_wood").setHardness(5.0F).setResistance(10.0F).setCreativeTab(CreativeTabs.tabTransport).setBlockTextureName(RefStrings.MODID + ":rail_wood");
|
||||||
rail_narrow = new RailGeneric().setBlockName("rail_narrow").setHardness(5.0F).setResistance(10.0F).setCreativeTab(CreativeTabs.tabTransport).setBlockTextureName(RefStrings.MODID + ":rail_narrow");
|
rail_narrow = new RailGeneric("pickaxe", 0).setBlockName("rail_narrow").setHardness(5.0F).setResistance(10.0F).setCreativeTab(CreativeTabs.tabTransport).setBlockTextureName(RefStrings.MODID + ":rail_narrow");
|
||||||
rail_highspeed = new RailGeneric().setMaxSpeed(1F).setFlexible(false).setBlockName("rail_highspeed").setHardness(5.0F).setResistance(10.0F).setCreativeTab(CreativeTabs.tabTransport).setBlockTextureName(RefStrings.MODID + ":rail_highspeed");
|
rail_highspeed = new RailGeneric("pickaxe", 0).setMaxSpeed(1F).setFlexible(false).setBlockName("rail_highspeed").setHardness(5.0F).setResistance(10.0F).setCreativeTab(CreativeTabs.tabTransport).setBlockTextureName(RefStrings.MODID + ":rail_highspeed");
|
||||||
rail_booster = new RailBooster().setBlockName("rail_booster").setHardness(5.0F).setResistance(10.0F).setCreativeTab(CreativeTabs.tabTransport).setBlockTextureName(RefStrings.MODID + ":rail_booster");
|
rail_booster = new RailBooster("pickaxe", 0).setBlockName("rail_booster").setHardness(5.0F).setResistance(10.0F).setCreativeTab(CreativeTabs.tabTransport).setBlockTextureName(RefStrings.MODID + ":rail_booster");
|
||||||
rail_narrow_straight = new RailNarrowStraight().setBlockName("rail_narrow_straight").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":rail_narrow_neo");
|
rail_narrow_straight = new RailNarrowStraight().setBlockName("rail_narrow_straight").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":rail_narrow_neo");
|
||||||
rail_narrow_curve = new RailNarrowCurve().setBlockName("rail_narrow_curve").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":rail_narrow_neo");
|
rail_narrow_curve = new RailNarrowCurve().setBlockName("rail_narrow_curve").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":rail_narrow_neo");
|
||||||
rail_large_straight = new RailStandardStraight().setBlockName("rail_large_straight").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":rail_standard_straight");
|
rail_large_straight = new RailStandardStraight().setBlockName("rail_large_straight").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":rail_standard_straight");
|
||||||
@ -2236,11 +2217,14 @@ public class ModBlocks {
|
|||||||
machine_autosaw = new MachineAutosaw().setBlockName("machine_autosaw").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
machine_autosaw = new MachineAutosaw().setBlockName("machine_autosaw").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||||
machine_excavator = new MachineExcavator().setBlockName("machine_excavator").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
machine_excavator = new MachineExcavator().setBlockName("machine_excavator").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||||
machine_ore_slopper = new MachineOreSlopper().setBlockName("machine_ore_slopper").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
machine_ore_slopper = new MachineOreSlopper().setBlockName("machine_ore_slopper").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||||
|
machine_annihilator = new MachineAnnihilator().setBlockName("machine_annihilator").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||||
machine_mining_laser = new MachineMiningLaser(Material.iron).setBlockName("machine_mining_laser").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_mining_laser");
|
machine_mining_laser = new MachineMiningLaser(Material.iron).setBlockName("machine_mining_laser").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_mining_laser");
|
||||||
barricade = new BlockNoDrop(Material.sand).setBlockName("barricade").setHardness(1.0F).setResistance(2.5F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":barricade");
|
barricade = new BlockNoDrop(Material.sand).setBlockName("barricade").setHardness(1.0F).setResistance(2.5F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":barricade");
|
||||||
machine_assembler = new MachineAssembler(Material.iron).setBlockName("machine_assembler").setHardness(5.0F).setResistance(30.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":machine_assembler");
|
machine_assembler = new MachineAssembler(Material.iron).setBlockName("machine_assembler").setHardness(5.0F).setResistance(30.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":machine_assembler");
|
||||||
machine_assembly_machine = new MachineAssemblyMachine(Material.iron).setBlockName("machine_assembly_machine").setHardness(5.0F).setResistance(30.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
machine_assembly_machine = new MachineAssemblyMachine(Material.iron).setBlockName("machine_assembly_machine").setHardness(5.0F).setResistance(30.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||||
machine_assemfac = new MachineAssemfac(Material.iron).setBlockName("machine_assemfac").setHardness(5.0F).setResistance(30.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
machine_assemfac = new MachineAssemfac(Material.iron).setBlockName("machine_assemfac").setHardness(5.0F).setResistance(30.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||||
|
machine_assembly_factory = new MachineAssemblyFactory(Material.iron).setBlockName("machine_assembly_factory").setHardness(5.0F).setResistance(30.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||||
|
machine_precass = new MachinePrecAss(Material.iron).setBlockName("machine_precass").setHardness(5.0F).setResistance(30.0F).setCreativeTab(null /* the world isn't ready for your beauty yet */).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||||
machine_arc_welder = new MachineArcWelder(Material.iron).setBlockName("machine_arc_welder").setHardness(5.0F).setResistance(30.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
machine_arc_welder = new MachineArcWelder(Material.iron).setBlockName("machine_arc_welder").setHardness(5.0F).setResistance(30.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||||
machine_soldering_station = new MachineSolderingStation(Material.iron).setBlockName("machine_soldering_station").setHardness(5.0F).setResistance(30.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
machine_soldering_station = new MachineSolderingStation(Material.iron).setBlockName("machine_soldering_station").setHardness(5.0F).setResistance(30.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||||
machine_chemplant = new MachineChemplant(Material.iron).setBlockName("machine_chemplant").setHardness(5.0F).setResistance(30.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
machine_chemplant = new MachineChemplant(Material.iron).setBlockName("machine_chemplant").setHardness(5.0F).setResistance(30.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_steel");
|
||||||
@ -2306,13 +2290,8 @@ public class ModBlocks {
|
|||||||
machine_waste_drum = new WasteDrum(Material.iron).setBlockName("machine_waste_drum").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":waste_drum");
|
machine_waste_drum = new WasteDrum(Material.iron).setBlockName("machine_waste_drum").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":waste_drum");
|
||||||
machine_storage_drum = new StorageDrum(Material.iron).setBlockName("machine_storage_drum").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_storage_drum");
|
machine_storage_drum = new StorageDrum(Material.iron).setBlockName("machine_storage_drum").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_storage_drum");
|
||||||
|
|
||||||
machine_schrabidium_transmutator = new MachineSchrabidiumTransmutator(Material.iron).setBlockName("machine_schrabidium_transmutator").setHardness(5.0F).setResistance(100.0F).setCreativeTab(MainRegistry.machineTab);
|
|
||||||
|
|
||||||
machine_siren = new MachineSiren(Material.iron).setBlockName("machine_siren").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_siren");
|
machine_siren = new MachineSiren(Material.iron).setBlockName("machine_siren").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":machine_siren");
|
||||||
|
|
||||||
machine_spp_bottom = new SPPBottom(Material.iron).setBlockName("machine_spp_bottom").setHardness(5.0F).setResistance(10.0F);
|
|
||||||
machine_spp_top = new SPPTop(Material.iron).setBlockName("machine_spp_top").setHardness(5.0F).setResistance(10.0F);
|
|
||||||
|
|
||||||
radiobox = new Radiobox(Material.iron).setBlockName("radiobox").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":radiobox");
|
radiobox = new Radiobox(Material.iron).setBlockName("radiobox").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":radiobox");
|
||||||
radiorec = new RadioRec(Material.iron).setBlockName("radiorec").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":radiorec");
|
radiorec = new RadioRec(Material.iron).setBlockName("radiorec").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":radiorec");
|
||||||
|
|
||||||
@ -2342,13 +2321,15 @@ public class ModBlocks {
|
|||||||
gas_explosive = new BlockGasExplosive().setBlockName("gas_explosive").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":gas_explosive");
|
gas_explosive = new BlockGasExplosive().setBlockName("gas_explosive").setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":gas_explosive");
|
||||||
vacuum = new BlockVacuum().setBlockName("vacuum").setResistance(1000000F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":vacuum");
|
vacuum = new BlockVacuum().setBlockName("vacuum").setResistance(1000000F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":vacuum");
|
||||||
|
|
||||||
absorber = new BlockAbsorber(Material.iron, 2.5F).setBlockName("absorber").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":absorber");
|
absorber = new BlockGeneric(Material.iron).setBlockName("absorber").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_deprecated");
|
||||||
absorber_red = new BlockAbsorber(Material.iron, 10F).setBlockName("absorber_red").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":absorber_red");
|
absorber_red = new BlockGeneric(Material.iron).setBlockName("absorber_red").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_deprecated");
|
||||||
absorber_green = new BlockAbsorber(Material.iron, 100F).setBlockName("absorber_green").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":absorber_green");
|
absorber_green = new BlockGeneric(Material.iron).setBlockName("absorber_green").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_deprecated");
|
||||||
absorber_pink = new BlockAbsorber(Material.iron, 10000F).setBlockName("absorber_pink").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":absorber_pink");
|
absorber_pink = new BlockGeneric(Material.iron).setBlockName("absorber_pink").setHardness(5.0F).setResistance(10.0F).setCreativeTab(null).setBlockTextureName(RefStrings.MODID + ":block_deprecated");
|
||||||
|
|
||||||
|
rad_absorber = new BlockAbsorber(Material.iron).setBlockName("rad_absorber").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||||
decon = new BlockDecon(Material.iron).setBlockName("decon").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":decon_side");
|
decon = new BlockDecon(Material.iron).setBlockName("decon").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab).setBlockTextureName(RefStrings.MODID + ":decon_side");
|
||||||
|
|
||||||
if (Loader.isModLoaded("OpenComputers")) {
|
if(Loader.isModLoaded("OpenComputers")) {
|
||||||
oc_cable_paintable = new BlockOpenComputersCablePaintable().setBlockName("oc_cable_paintable").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
oc_cable_paintable = new BlockOpenComputersCablePaintable().setBlockName("oc_cable_paintable").setHardness(5.0F).setResistance(10.0F).setCreativeTab(MainRegistry.machineTab);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2413,6 +2394,7 @@ public class ModBlocks {
|
|||||||
wand_jigsaw = new BlockWandJigsaw().setBlockName("wand_jigsaw").setBlockTextureName(RefStrings.MODID + ":wand_jigsaw");
|
wand_jigsaw = new BlockWandJigsaw().setBlockName("wand_jigsaw").setBlockTextureName(RefStrings.MODID + ":wand_jigsaw");
|
||||||
wand_logic = new BlockWandLogic().setBlockName("wand_logic").setBlockTextureName(RefStrings.MODID + ":wand_logic");
|
wand_logic = new BlockWandLogic().setBlockName("wand_logic").setBlockTextureName(RefStrings.MODID + ":wand_logic");
|
||||||
wand_tandem = new BlockWandTandem().setBlockName("wand_tandem").setBlockTextureName(RefStrings.MODID + ":wand_tandem");
|
wand_tandem = new BlockWandTandem().setBlockName("wand_tandem").setBlockTextureName(RefStrings.MODID + ":wand_tandem");
|
||||||
|
wand_structure = new BlockWandStructure().setBlockName("wand_structure");
|
||||||
|
|
||||||
logic_block = new LogicBlock().setBlockName("logic_block").setBlockTextureName(RefStrings.MODID + ":logic_block");
|
logic_block = new LogicBlock().setBlockName("logic_block").setBlockTextureName(RefStrings.MODID + ":logic_block");
|
||||||
|
|
||||||
@ -2462,10 +2444,6 @@ public class ModBlocks {
|
|||||||
//Bedrock ores
|
//Bedrock ores
|
||||||
GameRegistry.registerBlock(ore_bedrock_oil, ore_bedrock_oil.getUnlocalizedName());
|
GameRegistry.registerBlock(ore_bedrock_oil, ore_bedrock_oil.getUnlocalizedName());
|
||||||
|
|
||||||
//Nice Meme
|
|
||||||
GameRegistry.registerBlock(ore_coal_oil, ore_coal_oil.getUnlocalizedName());
|
|
||||||
GameRegistry.registerBlock(ore_coal_oil_burning, ore_coal_oil_burning.getUnlocalizedName());
|
|
||||||
|
|
||||||
//Nether Ores
|
//Nether Ores
|
||||||
GameRegistry.registerBlock(ore_nether_coal, ore_nether_coal.getUnlocalizedName());
|
GameRegistry.registerBlock(ore_nether_coal, ore_nether_coal.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(ore_nether_smoldering, ore_nether_smoldering.getUnlocalizedName());
|
GameRegistry.registerBlock(ore_nether_smoldering, ore_nether_smoldering.getUnlocalizedName());
|
||||||
@ -2630,11 +2608,6 @@ public class ModBlocks {
|
|||||||
GameRegistry.registerBlock(block_bakelite, block_bakelite.getUnlocalizedName());
|
GameRegistry.registerBlock(block_bakelite, block_bakelite.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(block_rubber, block_rubber.getUnlocalizedName());
|
GameRegistry.registerBlock(block_rubber, block_rubber.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(block_australium, ItemOreBlock.class, block_australium.getUnlocalizedName());
|
GameRegistry.registerBlock(block_australium, ItemOreBlock.class, block_australium.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(block_weidanium, ItemOreBlock.class, block_weidanium.getUnlocalizedName());
|
|
||||||
GameRegistry.registerBlock(block_reiium, ItemOreBlock.class, block_reiium.getUnlocalizedName());
|
|
||||||
GameRegistry.registerBlock(block_unobtainium, ItemOreBlock.class, block_unobtainium.getUnlocalizedName());
|
|
||||||
GameRegistry.registerBlock(block_daffergon, ItemOreBlock.class, block_daffergon.getUnlocalizedName());
|
|
||||||
GameRegistry.registerBlock(block_verticium, ItemOreBlock.class, block_verticium.getUnlocalizedName());
|
|
||||||
register(block_cap);
|
register(block_cap);
|
||||||
GameRegistry.registerBlock(block_lanthanium, block_lanthanium.getUnlocalizedName());
|
GameRegistry.registerBlock(block_lanthanium, block_lanthanium.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(block_ra226, block_ra226.getUnlocalizedName());
|
GameRegistry.registerBlock(block_ra226, block_ra226.getUnlocalizedName());
|
||||||
@ -2739,6 +2712,8 @@ public class ModBlocks {
|
|||||||
register(stones_slab, ItemModSlab.class);
|
register(stones_slab, ItemModSlab.class);
|
||||||
register(stones_double_slab, ItemModSlab.class);
|
register(stones_double_slab, ItemModSlab.class);
|
||||||
|
|
||||||
|
register(brick_forgotten);
|
||||||
|
|
||||||
GameRegistry.registerBlock(concrete_slab, ItemModSlab.class, concrete_slab.getUnlocalizedName());
|
GameRegistry.registerBlock(concrete_slab, ItemModSlab.class, concrete_slab.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(concrete_double_slab, ItemModSlab.class, concrete_double_slab.getUnlocalizedName());
|
GameRegistry.registerBlock(concrete_double_slab, ItemModSlab.class, concrete_double_slab.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(concrete_brick_slab, ItemModSlab.class, concrete_brick_slab.getUnlocalizedName());
|
GameRegistry.registerBlock(concrete_brick_slab, ItemModSlab.class, concrete_brick_slab.getUnlocalizedName());
|
||||||
@ -2831,6 +2806,13 @@ public class ModBlocks {
|
|||||||
GameRegistry.registerBlock(steel_grate, steel_grate.getUnlocalizedName());
|
GameRegistry.registerBlock(steel_grate, steel_grate.getUnlocalizedName());
|
||||||
register(steel_grate_wide);
|
register(steel_grate_wide);
|
||||||
//register(scaffold_dynamic);
|
//register(scaffold_dynamic);
|
||||||
|
/*
|
||||||
|
* operation: pipe annihilation
|
||||||
|
* each pipe has three rotations, and there's four shapes, so in theory, we only need 12 metas
|
||||||
|
* which leaves color, but that's the least bad thing to break due to tile syncing issues, so we
|
||||||
|
* can handle that using tile entities. it's unlikely that we add new shapes or invent new spacial
|
||||||
|
* axis to align them to, so it's also the easiest to extend
|
||||||
|
*/
|
||||||
GameRegistry.registerBlock(deco_pipe, ItemBlockBase.class, deco_pipe.getUnlocalizedName());
|
GameRegistry.registerBlock(deco_pipe, ItemBlockBase.class, deco_pipe.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(deco_pipe_rusted, ItemBlockBase.class, deco_pipe_rusted.getUnlocalizedName());
|
GameRegistry.registerBlock(deco_pipe_rusted, ItemBlockBase.class, deco_pipe_rusted.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(deco_pipe_green, ItemBlockBase.class, deco_pipe_green.getUnlocalizedName());
|
GameRegistry.registerBlock(deco_pipe_green, ItemBlockBase.class, deco_pipe_green.getUnlocalizedName());
|
||||||
@ -2996,11 +2978,7 @@ public class ModBlocks {
|
|||||||
|
|
||||||
//Sands, Glass
|
//Sands, Glass
|
||||||
GameRegistry.registerBlock(ash_digamma, ash_digamma.getUnlocalizedName());
|
GameRegistry.registerBlock(ash_digamma, ash_digamma.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(sand_boron, sand_boron.getUnlocalizedName());
|
register(sand_mix);
|
||||||
GameRegistry.registerBlock(sand_lead, sand_lead.getUnlocalizedName());
|
|
||||||
GameRegistry.registerBlock(sand_uranium, sand_uranium.getUnlocalizedName());
|
|
||||||
GameRegistry.registerBlock(sand_polonium, sand_polonium.getUnlocalizedName());
|
|
||||||
GameRegistry.registerBlock(sand_quartz, sand_quartz.getUnlocalizedName());
|
|
||||||
GameRegistry.registerBlock(glass_boron, glass_boron.getUnlocalizedName());
|
GameRegistry.registerBlock(glass_boron, glass_boron.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(glass_lead, glass_lead.getUnlocalizedName());
|
GameRegistry.registerBlock(glass_lead, glass_lead.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(glass_uranium, glass_uranium.getUnlocalizedName());
|
GameRegistry.registerBlock(glass_uranium, glass_uranium.getUnlocalizedName());
|
||||||
@ -3128,14 +3106,10 @@ public class ModBlocks {
|
|||||||
GameRegistry.registerBlock(machine_cyclotron, machine_cyclotron.getUnlocalizedName());
|
GameRegistry.registerBlock(machine_cyclotron, machine_cyclotron.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(machine_exposure_chamber, machine_exposure_chamber.getUnlocalizedName());
|
GameRegistry.registerBlock(machine_exposure_chamber, machine_exposure_chamber.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(machine_rtg_grey, machine_rtg_grey.getUnlocalizedName());
|
GameRegistry.registerBlock(machine_rtg_grey, machine_rtg_grey.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(machine_geo, machine_geo.getUnlocalizedName());
|
|
||||||
GameRegistry.registerBlock(machine_amgen, machine_amgen.getUnlocalizedName());
|
|
||||||
GameRegistry.registerBlock(machine_minirtg, machine_minirtg.getUnlocalizedName());
|
GameRegistry.registerBlock(machine_minirtg, machine_minirtg.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(machine_powerrtg, machine_powerrtg.getUnlocalizedName());
|
GameRegistry.registerBlock(machine_powerrtg, machine_powerrtg.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(machine_radiolysis, machine_radiolysis.getUnlocalizedName());
|
GameRegistry.registerBlock(machine_radiolysis, machine_radiolysis.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(machine_hephaestus, machine_hephaestus.getUnlocalizedName());
|
GameRegistry.registerBlock(machine_hephaestus, machine_hephaestus.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(machine_spp_bottom, machine_spp_bottom.getUnlocalizedName());
|
|
||||||
GameRegistry.registerBlock(machine_spp_top, machine_spp_top.getUnlocalizedName());
|
|
||||||
|
|
||||||
GameRegistry.registerBlock(hadron_plating, hadron_plating.getUnlocalizedName());
|
GameRegistry.registerBlock(hadron_plating, hadron_plating.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(hadron_plating_blue, hadron_plating_blue.getUnlocalizedName());
|
GameRegistry.registerBlock(hadron_plating_blue, hadron_plating_blue.getUnlocalizedName());
|
||||||
@ -3154,10 +3128,6 @@ public class ModBlocks {
|
|||||||
GameRegistry.registerBlock(hadron_coil_chlorophyte, ItemBlockBase.class, hadron_coil_chlorophyte.getUnlocalizedName());
|
GameRegistry.registerBlock(hadron_coil_chlorophyte, ItemBlockBase.class, hadron_coil_chlorophyte.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(hadron_coil_mese, ItemBlockBase.class, hadron_coil_mese.getUnlocalizedName());
|
GameRegistry.registerBlock(hadron_coil_mese, ItemBlockBase.class, hadron_coil_mese.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(hadron_power, hadron_power.getUnlocalizedName());
|
GameRegistry.registerBlock(hadron_power, hadron_power.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(hadron_power_10m, hadron_power_10m.getUnlocalizedName());
|
|
||||||
GameRegistry.registerBlock(hadron_power_100m, hadron_power_100m.getUnlocalizedName());
|
|
||||||
GameRegistry.registerBlock(hadron_power_1g, hadron_power_1g.getUnlocalizedName());
|
|
||||||
GameRegistry.registerBlock(hadron_power_10g, hadron_power_10g.getUnlocalizedName());
|
|
||||||
GameRegistry.registerBlock(hadron_diode, hadron_diode.getUnlocalizedName());
|
GameRegistry.registerBlock(hadron_diode, hadron_diode.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(hadron_analysis, hadron_analysis.getUnlocalizedName());
|
GameRegistry.registerBlock(hadron_analysis, hadron_analysis.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(hadron_analysis_glass, hadron_analysis_glass.getUnlocalizedName());
|
GameRegistry.registerBlock(hadron_analysis_glass, hadron_analysis_glass.getUnlocalizedName());
|
||||||
@ -3202,6 +3172,7 @@ public class ModBlocks {
|
|||||||
GameRegistry.registerBlock(red_cable_classic, red_cable_classic.getUnlocalizedName());
|
GameRegistry.registerBlock(red_cable_classic, red_cable_classic.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(red_cable_paintable, red_cable_paintable.getUnlocalizedName());
|
GameRegistry.registerBlock(red_cable_paintable, red_cable_paintable.getUnlocalizedName());
|
||||||
register(red_cable_gauge);
|
register(red_cable_gauge);
|
||||||
|
register(red_cable_box);
|
||||||
GameRegistry.registerBlock(red_wire_coated, red_wire_coated.getUnlocalizedName());
|
GameRegistry.registerBlock(red_wire_coated, red_wire_coated.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(red_connector, ItemBlockBase.class, red_connector.getUnlocalizedName());
|
GameRegistry.registerBlock(red_connector, ItemBlockBase.class, red_connector.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(red_pylon, ItemBlockBase.class, red_pylon.getUnlocalizedName());
|
GameRegistry.registerBlock(red_pylon, ItemBlockBase.class, red_pylon.getUnlocalizedName());
|
||||||
@ -3215,13 +3186,16 @@ public class ModBlocks {
|
|||||||
GameRegistry.registerBlock(cable_detector, cable_detector.getUnlocalizedName());
|
GameRegistry.registerBlock(cable_detector, cable_detector.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(cable_diode, ItemBlockBase.class, cable_diode.getUnlocalizedName());
|
GameRegistry.registerBlock(cable_diode, ItemBlockBase.class, cable_diode.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(machine_detector, machine_detector.getUnlocalizedName());
|
GameRegistry.registerBlock(machine_detector, machine_detector.getUnlocalizedName());
|
||||||
|
|
||||||
register(fluid_duct_neo);
|
register(fluid_duct_neo);
|
||||||
register(fluid_duct_box);
|
register(fluid_duct_box);
|
||||||
register(fluid_duct_exhaust);
|
register(fluid_duct_exhaust);
|
||||||
register(fluid_duct_paintable_block_exhaust);
|
register(fluid_duct_paintable_block_exhaust);
|
||||||
register(fluid_duct_paintable);
|
register(fluid_duct_paintable);
|
||||||
|
register(pipe_anchor);
|
||||||
register(fluid_duct_gauge);
|
register(fluid_duct_gauge);
|
||||||
register(fluid_valve);
|
register(fluid_valve);
|
||||||
|
register(fluid_counter_valve);
|
||||||
register(fluid_switch);
|
register(fluid_switch);
|
||||||
register(fluid_pump);
|
register(fluid_pump);
|
||||||
register(machine_drain);
|
register(machine_drain);
|
||||||
@ -3277,6 +3251,8 @@ public class ModBlocks {
|
|||||||
register(barrel_steel);
|
register(barrel_steel);
|
||||||
register(barrel_tcalloy);
|
register(barrel_tcalloy);
|
||||||
register(barrel_antimatter);
|
register(barrel_antimatter);
|
||||||
|
register(machine_battery_socket);
|
||||||
|
register(machine_battery_redd);
|
||||||
register(machine_battery_potato);
|
register(machine_battery_potato);
|
||||||
register(machine_battery);
|
register(machine_battery);
|
||||||
register(machine_lithium_battery);
|
register(machine_lithium_battery);
|
||||||
@ -3299,6 +3275,8 @@ public class ModBlocks {
|
|||||||
GameRegistry.registerBlock(machine_assembler, machine_assembler.getUnlocalizedName());
|
GameRegistry.registerBlock(machine_assembler, machine_assembler.getUnlocalizedName());
|
||||||
register(machine_assembly_machine);
|
register(machine_assembly_machine);
|
||||||
GameRegistry.registerBlock(machine_assemfac, machine_assemfac.getUnlocalizedName());
|
GameRegistry.registerBlock(machine_assemfac, machine_assemfac.getUnlocalizedName());
|
||||||
|
register(machine_assembly_factory);
|
||||||
|
register(machine_precass);
|
||||||
GameRegistry.registerBlock(machine_chemplant, machine_chemplant.getUnlocalizedName());
|
GameRegistry.registerBlock(machine_chemplant, machine_chemplant.getUnlocalizedName());
|
||||||
register(machine_chemical_plant);
|
register(machine_chemical_plant);
|
||||||
register(machine_chemfac);
|
register(machine_chemfac);
|
||||||
@ -3349,12 +3327,12 @@ public class ModBlocks {
|
|||||||
register(machine_autosaw);
|
register(machine_autosaw);
|
||||||
register(machine_excavator);
|
register(machine_excavator);
|
||||||
register(machine_ore_slopper);
|
register(machine_ore_slopper);
|
||||||
|
register(machine_annihilator);
|
||||||
register(machine_mining_laser);
|
register(machine_mining_laser);
|
||||||
register(barricade);
|
register(barricade);
|
||||||
register(machine_turbofan);
|
register(machine_turbofan);
|
||||||
register(machine_turbinegas);
|
register(machine_turbinegas);
|
||||||
register(machine_lpw2);
|
register(machine_lpw2);
|
||||||
GameRegistry.registerBlock(machine_schrabidium_transmutator, machine_schrabidium_transmutator.getUnlocalizedName());
|
|
||||||
GameRegistry.registerBlock(machine_teleporter, machine_teleporter.getUnlocalizedName());
|
GameRegistry.registerBlock(machine_teleporter, machine_teleporter.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(teleanchor, teleanchor.getUnlocalizedName());
|
GameRegistry.registerBlock(teleanchor, teleanchor.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(field_disturber, field_disturber.getUnlocalizedName());
|
GameRegistry.registerBlock(field_disturber, field_disturber.getUnlocalizedName());
|
||||||
@ -3372,8 +3350,7 @@ public class ModBlocks {
|
|||||||
GameRegistry.registerBlock(struct_launcher_core, struct_launcher_core.getUnlocalizedName());
|
GameRegistry.registerBlock(struct_launcher_core, struct_launcher_core.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(struct_launcher_core_large, struct_launcher_core_large.getUnlocalizedName());
|
GameRegistry.registerBlock(struct_launcher_core_large, struct_launcher_core_large.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(struct_soyuz_core, struct_soyuz_core.getUnlocalizedName());
|
GameRegistry.registerBlock(struct_soyuz_core, struct_soyuz_core.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(struct_iter_core, struct_iter_core.getUnlocalizedName());
|
register(struct_torus_core);
|
||||||
GameRegistry.registerBlock(struct_plasma_core, struct_plasma_core.getUnlocalizedName());
|
|
||||||
GameRegistry.registerBlock(struct_watz_core, struct_watz_core.getUnlocalizedName());
|
GameRegistry.registerBlock(struct_watz_core, struct_watz_core.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(struct_icf_core, struct_icf_core.getUnlocalizedName());
|
GameRegistry.registerBlock(struct_icf_core, struct_icf_core.getUnlocalizedName());
|
||||||
|
|
||||||
@ -3382,6 +3359,7 @@ public class ModBlocks {
|
|||||||
GameRegistry.registerBlock(absorber_red, absorber_red.getUnlocalizedName());
|
GameRegistry.registerBlock(absorber_red, absorber_red.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(absorber_green, absorber_green.getUnlocalizedName());
|
GameRegistry.registerBlock(absorber_green, absorber_green.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(absorber_pink, absorber_pink.getUnlocalizedName());
|
GameRegistry.registerBlock(absorber_pink, absorber_pink.getUnlocalizedName());
|
||||||
|
GameRegistry.registerBlock(rad_absorber, ItemBlockBase.class, rad_absorber.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(decon, decon.getUnlocalizedName());
|
GameRegistry.registerBlock(decon, decon.getUnlocalizedName());
|
||||||
|
|
||||||
//Solar Tower Blocks
|
//Solar Tower Blocks
|
||||||
@ -3418,15 +3396,22 @@ public class ModBlocks {
|
|||||||
register(pwr_block);
|
register(pwr_block);
|
||||||
|
|
||||||
//Multiblock Generators
|
//Multiblock Generators
|
||||||
register(fusion_conductor);
|
|
||||||
GameRegistry.registerBlock(fusion_center, fusion_center.getUnlocalizedName());
|
|
||||||
GameRegistry.registerBlock(fusion_motor, fusion_motor.getUnlocalizedName());
|
|
||||||
GameRegistry.registerBlock(fusion_heater, fusion_heater.getUnlocalizedName());
|
GameRegistry.registerBlock(fusion_heater, fusion_heater.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(fusion_hatch, fusion_hatch.getUnlocalizedName());
|
GameRegistry.registerBlock(fusion_hatch, fusion_hatch.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(plasma, ItemBlockLore.class, plasma.getUnlocalizedName());
|
GameRegistry.registerBlock(plasma, ItemBlockLore.class, plasma.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(iter, iter.getUnlocalizedName());
|
GameRegistry.registerBlock(iter, iter.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(plasma_heater, plasma_heater.getUnlocalizedName());
|
GameRegistry.registerBlock(plasma_heater, plasma_heater.getUnlocalizedName());
|
||||||
|
|
||||||
|
register(fusion_component);
|
||||||
|
register(fusion_torus);
|
||||||
|
register(fusion_klystron);
|
||||||
|
register(fusion_klystron_creative);
|
||||||
|
register(fusion_breeder);
|
||||||
|
register(fusion_collector);
|
||||||
|
register(fusion_boiler);
|
||||||
|
register(fusion_mhdt);
|
||||||
|
register(fusion_coupler);
|
||||||
|
|
||||||
register(watz_element);
|
register(watz_element);
|
||||||
register(watz_cooler);
|
register(watz_cooler);
|
||||||
register(watz_end);
|
register(watz_end);
|
||||||
@ -3472,14 +3457,6 @@ public class ModBlocks {
|
|||||||
//Guide
|
//Guide
|
||||||
GameRegistry.registerBlock(book_guide, book_guide.getUnlocalizedName());
|
GameRegistry.registerBlock(book_guide, book_guide.getUnlocalizedName());
|
||||||
|
|
||||||
//Sat Blocks
|
|
||||||
GameRegistry.registerBlock(sat_mapper, sat_mapper.getUnlocalizedName());
|
|
||||||
GameRegistry.registerBlock(sat_scanner, sat_scanner.getUnlocalizedName());
|
|
||||||
GameRegistry.registerBlock(sat_radar, sat_radar.getUnlocalizedName());
|
|
||||||
GameRegistry.registerBlock(sat_laser, sat_laser.getUnlocalizedName());
|
|
||||||
GameRegistry.registerBlock(sat_foeq, sat_foeq.getUnlocalizedName());
|
|
||||||
GameRegistry.registerBlock(sat_resonator, sat_resonator.getUnlocalizedName());
|
|
||||||
|
|
||||||
//Rails
|
//Rails
|
||||||
GameRegistry.registerBlock(rail_wood, ItemBlockBase.class, rail_wood.getUnlocalizedName());
|
GameRegistry.registerBlock(rail_wood, ItemBlockBase.class, rail_wood.getUnlocalizedName());
|
||||||
GameRegistry.registerBlock(rail_narrow, ItemBlockBase.class, rail_narrow.getUnlocalizedName());
|
GameRegistry.registerBlock(rail_narrow, ItemBlockBase.class, rail_narrow.getUnlocalizedName());
|
||||||
@ -3549,7 +3526,7 @@ public class ModBlocks {
|
|||||||
GameRegistry.registerBlock(vacuum, vacuum.getUnlocalizedName());
|
GameRegistry.registerBlock(vacuum, vacuum.getUnlocalizedName());
|
||||||
|
|
||||||
// OC Compat Items
|
// OC Compat Items
|
||||||
if (Loader.isModLoaded("OpenComputers")) {
|
if(Loader.isModLoaded(Compat.MOD_OC)) {
|
||||||
register(oc_cable_paintable);
|
register(oc_cable_paintable);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3572,6 +3549,7 @@ public class ModBlocks {
|
|||||||
register(wand_jigsaw);
|
register(wand_jigsaw);
|
||||||
register(wand_logic);
|
register(wand_logic);
|
||||||
register(wand_tandem);
|
register(wand_tandem);
|
||||||
|
register(wand_structure);
|
||||||
|
|
||||||
register(logic_block);
|
register(logic_block);
|
||||||
}
|
}
|
||||||
@ -3604,4 +3582,24 @@ public class ModBlocks {
|
|||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Block getBlockFromStack(ItemStack stack) {
|
||||||
|
if(stack == null) return null;
|
||||||
|
if(!(stack.getItem() instanceof ItemBlock)) return null;
|
||||||
|
|
||||||
|
return ((ItemBlock) stack.getItem()).field_150939_a;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Is this block a special structure handling block, so we can ignore it for blacklist selection, etc.
|
||||||
|
public static boolean isStructureBlock(Block block, boolean includeAir) {
|
||||||
|
if(block == null) return false;
|
||||||
|
if(block == wand_air) return includeAir;
|
||||||
|
if(block == wand_structure) return true;
|
||||||
|
if(block == wand_jigsaw) return true;
|
||||||
|
if(block == wand_logic) return true;
|
||||||
|
if(block == wand_tandem) return true;
|
||||||
|
if(block == wand_loot) return true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,6 +3,7 @@ package com.hbm.blocks.bomb;
|
|||||||
import com.hbm.blocks.ModBlocks;
|
import com.hbm.blocks.ModBlocks;
|
||||||
import com.hbm.entity.item.EntityTNTPrimedBase;
|
import com.hbm.entity.item.EntityTNTPrimedBase;
|
||||||
import com.hbm.explosion.ExplosionNukeSmall;
|
import com.hbm.explosion.ExplosionNukeSmall;
|
||||||
|
import com.hbm.world.biome.BiomeGenCraterBase;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
@ -16,6 +17,8 @@ public class BlockFissureBomb extends BlockTNTBase {
|
|||||||
|
|
||||||
int range = 5;
|
int range = 5;
|
||||||
|
|
||||||
|
boolean crater = world.getBiomeGenForCoords((int) Math.floor(x), (int) Math.floor(z)) instanceof BiomeGenCraterBase;
|
||||||
|
|
||||||
for(int i = -range; i <= range; i++) {
|
for(int i = -range; i <= range; i++) {
|
||||||
for(int j = -range; j <= range; j++) {
|
for(int j = -range; j <= range; j++) {
|
||||||
for(int k = -range; k <= range; k++) {
|
for(int k = -range; k <= range; k++) {
|
||||||
@ -27,7 +30,7 @@ public class BlockFissureBomb extends BlockTNTBase {
|
|||||||
Block block = world.getBlock(a, b, c);
|
Block block = world.getBlock(a, b, c);
|
||||||
|
|
||||||
if(block == ModBlocks.ore_bedrock) {
|
if(block == ModBlocks.ore_bedrock) {
|
||||||
world.setBlock(a, b, c, ModBlocks.ore_volcano);
|
world.setBlock(a, b, c, ModBlocks.ore_volcano, crater ? 1 : 0, 3);
|
||||||
} else if(block == ModBlocks.ore_bedrock_oil) {
|
} else if(block == ModBlocks.ore_bedrock_oil) {
|
||||||
world.setBlock(a, b, c, Blocks.bedrock);
|
world.setBlock(a, b, c, Blocks.bedrock);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,16 +3,17 @@ package com.hbm.blocks.bomb;
|
|||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
import com.hbm.blocks.ModBlocks;
|
import com.hbm.blocks.ModBlocks;
|
||||||
|
import com.hbm.config.BombConfig;
|
||||||
import com.hbm.entity.effect.EntityCloudFleija;
|
import com.hbm.entity.effect.EntityCloudFleija;
|
||||||
|
import com.hbm.entity.effect.EntityCloudFleijaRainbow;
|
||||||
import com.hbm.entity.effect.EntityNukeTorex;
|
import com.hbm.entity.effect.EntityNukeTorex;
|
||||||
import com.hbm.entity.grenade.EntityGrenadeZOMG;
|
|
||||||
import com.hbm.entity.logic.EntityBalefire;
|
import com.hbm.entity.logic.EntityBalefire;
|
||||||
import com.hbm.entity.logic.EntityNukeExplosionMK3;
|
import com.hbm.entity.logic.EntityNukeExplosionMK3;
|
||||||
import com.hbm.entity.logic.EntityNukeExplosionMK5;
|
import com.hbm.entity.logic.EntityNukeExplosionMK5;
|
||||||
import com.hbm.entity.projectile.EntityFallingNuke;
|
import com.hbm.entity.projectile.EntityFallingNuke;
|
||||||
import com.hbm.explosion.ExplosionChaos;
|
|
||||||
import com.hbm.explosion.ExplosionLarge;
|
import com.hbm.explosion.ExplosionLarge;
|
||||||
import com.hbm.interfaces.IBomb;
|
import com.hbm.interfaces.IBomb;
|
||||||
|
import com.hbm.interfaces.NotableComments;
|
||||||
import com.hbm.main.MainRegistry;
|
import com.hbm.main.MainRegistry;
|
||||||
import com.hbm.tileentity.bomb.TileEntityNukeCustom;
|
import com.hbm.tileentity.bomb.TileEntityNukeCustom;
|
||||||
|
|
||||||
@ -30,10 +31,10 @@ import net.minecraft.tileentity.TileEntity;
|
|||||||
import net.minecraft.util.MathHelper;
|
import net.minecraft.util.MathHelper;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
// this entire class sucks ass
|
||||||
|
@NotableComments
|
||||||
public class NukeCustom extends BlockContainer implements IBomb {
|
public class NukeCustom extends BlockContainer implements IBomb {
|
||||||
|
|
||||||
public TileEntityNukeCustom tetn = new TileEntityNukeCustom();
|
|
||||||
|
|
||||||
private static boolean keepInventory = false;
|
private static boolean keepInventory = false;
|
||||||
private final static Random field_149933_a = new Random();
|
private final static Random field_149933_a = new Random();
|
||||||
|
|
||||||
@ -134,6 +135,7 @@ public class NukeCustom extends BlockContainer implements IBomb {
|
|||||||
public static final int maxAmat = 350;
|
public static final int maxAmat = 350;
|
||||||
public static final int maxSchrab = 250;
|
public static final int maxSchrab = 250;
|
||||||
|
|
||||||
|
// genuinely some of the worst fucking code i've ever written
|
||||||
public static void explodeCustom(World worldObj, double xCoord, double yCoord, double zCoord, float tnt, float nuke, float hydro, float amat, float dirty, float schrab, float euph) {
|
public static void explodeCustom(World worldObj, double xCoord, double yCoord, double zCoord, float tnt, float nuke, float hydro, float amat, float dirty, float schrab, float euph) {
|
||||||
|
|
||||||
dirty = Math.min(dirty, 100);
|
dirty = Math.min(dirty, 100);
|
||||||
@ -141,8 +143,23 @@ public class NukeCustom extends BlockContainer implements IBomb {
|
|||||||
/// EUPHEMIUM ///
|
/// EUPHEMIUM ///
|
||||||
if(euph > 0) {
|
if(euph > 0) {
|
||||||
|
|
||||||
EntityGrenadeZOMG zomg = new EntityGrenadeZOMG(worldObj, xCoord, yCoord, zCoord);
|
EntityNukeExplosionMK3 ex = new EntityNukeExplosionMK3(worldObj);
|
||||||
ExplosionChaos.zomgMeSinPi(worldObj, xCoord, yCoord, zCoord, 1000, null, zomg);
|
ex.posX = xCoord;
|
||||||
|
ex.posY = yCoord;
|
||||||
|
ex.posZ = zCoord;
|
||||||
|
ex.destructionRange = 150;
|
||||||
|
ex.speed = BombConfig.blastSpeed;
|
||||||
|
ex.coefficient = 1.0F;
|
||||||
|
ex.waste = false;
|
||||||
|
worldObj.spawnEntityInWorld(ex);
|
||||||
|
|
||||||
|
worldObj.playSoundEffect(xCoord, yCoord, zCoord, "random.explode", 100000.0F, 1.0F);
|
||||||
|
|
||||||
|
EntityCloudFleijaRainbow cloud = new EntityCloudFleijaRainbow(worldObj, 50);
|
||||||
|
cloud.posX = xCoord;
|
||||||
|
cloud.posY = yCoord;
|
||||||
|
cloud.posZ = zCoord;
|
||||||
|
worldObj.spawnEntityInWorld(cloud);
|
||||||
|
|
||||||
// SCHRABIDIUM ///
|
// SCHRABIDIUM ///
|
||||||
} else if(schrab > 0) {
|
} else if(schrab > 0) {
|
||||||
|
|||||||
@ -59,8 +59,15 @@ public class CoriumFinite extends GenericFiniteFluid {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateTick(World world, int x, int y, int z, Random rand) {
|
public void updateTick(World world, int x, int y, int z, Random rand) {
|
||||||
|
|
||||||
super.updateTick(world, x, y, z, rand);
|
// COFH core apparently replaces the water block class with an incompatible type which breaks
|
||||||
|
// the finite fluid implementation. can't recreate the issue, but according to the provided log
|
||||||
|
// it seems like this shitty band aid might work
|
||||||
|
try {
|
||||||
|
super.updateTick(world, x, y, z, rand);
|
||||||
|
} catch(ClassCastException ex) {
|
||||||
|
if(!world.isRemote) world.setBlockToAir(x, y, z);
|
||||||
|
}
|
||||||
|
|
||||||
if(!world.isRemote && rand.nextInt(10) == 0 && world.getBlock(x, y - 1, z) != this) {
|
if(!world.isRemote && rand.nextInt(10) == 0 && world.getBlock(x, y - 1, z) != this) {
|
||||||
|
|
||||||
|
|||||||
@ -2,38 +2,79 @@ package com.hbm.blocks.generic;
|
|||||||
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
|
import com.hbm.blocks.BlockEnumMulti;
|
||||||
|
import com.hbm.blocks.IBlockMulti;
|
||||||
import com.hbm.handler.radiation.ChunkRadiationManager;
|
import com.hbm.handler.radiation.ChunkRadiationManager;
|
||||||
|
import com.hbm.lib.RefStrings;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.util.IIcon;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
public class BlockAbsorber extends Block {
|
public class BlockAbsorber extends BlockEnumMulti implements IBlockMulti {
|
||||||
|
|
||||||
float absorb = 0;
|
// Enum for tiers they are in order of meta data, 0, 1, 2, 3 for Base, Red, Green, Pink
|
||||||
|
public static enum EnumAbsorberTier {
|
||||||
|
|
||||||
public BlockAbsorber(Material mat, float ab) {
|
BASE(2.5F, "absorber"), RED(10F, "absorber_red"), GREEN(100F, "absorber_green"), PINK(10000F, "absorber_pink");
|
||||||
super(mat);
|
|
||||||
|
public final float absorbAmount;
|
||||||
|
public final String textureName;
|
||||||
|
|
||||||
|
private EnumAbsorberTier(float absorb, String texture) {
|
||||||
|
this.absorbAmount = absorb;
|
||||||
|
this.textureName = texture;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public BlockAbsorber(Material mat) {
|
||||||
|
super(mat, EnumAbsorberTier.class, true, true);
|
||||||
this.setTickRandomly(true);
|
this.setTickRandomly(true);
|
||||||
absorb = ab;
|
this.setBlockName("rad_absorber");
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnumAbsorberTier getTier(int meta) {
|
||||||
|
return EnumAbsorberTier.values()[rectify(meta)];
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int tickRate(World world) {
|
public String getUnlocalizedName(ItemStack stack) {
|
||||||
|
EnumAbsorberTier tier = getTier(stack.getItemDamage());
|
||||||
|
String tierName = net.minecraft.util.StatCollector.translateToLocal("tile.rad_absorber." + tier.name().toLowerCase());
|
||||||
|
return tierName;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public void registerBlockIcons(net.minecraft.client.renderer.texture.IIconRegister reg) {
|
||||||
|
icons = new IIcon[EnumAbsorberTier.values().length];
|
||||||
|
for(int i = 0; i < icons.length; i++) {
|
||||||
|
icons[i] = reg.registerIcon(RefStrings.MODID + ":" + EnumAbsorberTier.values()[i].textureName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// All that rad math shit that was on there already, did not touch this
|
||||||
|
// -Wolf
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int tickRate(World world) {
|
||||||
return 10;
|
return 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateTick(World world, int x, int y, int z, Random rand) {
|
public void updateTick(World world, int x, int y, int z, Random rand) {
|
||||||
|
EnumAbsorberTier tier = getTier(world.getBlockMetadata(x, y, z));
|
||||||
ChunkRadiationManager.proxy.decrementRad(world, x, y, z, absorb);
|
ChunkRadiationManager.proxy.decrementRad(world, x, y, z, tier.absorbAmount);
|
||||||
world.scheduleBlockUpdate(x, y, z, this, this.tickRate(world));
|
world.scheduleBlockUpdate(x, y, z, this, tickRate(world));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void onBlockAdded(World world, int x, int y, int z) {
|
public void onBlockAdded(World world, int x, int y, int z) {
|
||||||
super.onBlockAdded(world, x, y, z);
|
super.onBlockAdded(world, x, y, z);
|
||||||
|
world.scheduleBlockUpdate(x, y, z, this, tickRate(world));
|
||||||
world.scheduleBlockUpdate(x, y, z, this, this.tickRate(world));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,6 +7,7 @@ import static net.minecraftforge.common.util.ForgeDirection.WEST;
|
|||||||
|
|
||||||
import com.hbm.lib.RefStrings;
|
import com.hbm.lib.RefStrings;
|
||||||
|
|
||||||
|
import com.hbm.world.gen.nbt.INBTBlockTransformable;
|
||||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
@ -20,23 +21,23 @@ import net.minecraft.world.IBlockAccess;
|
|||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
public class BlockChain extends Block {
|
public class BlockChain extends Block implements INBTBlockTransformable {
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
private IIcon iconEnd;
|
private IIcon iconEnd;
|
||||||
|
|
||||||
public BlockChain(Material mat) {
|
public BlockChain(Material mat) {
|
||||||
super(mat);
|
super(mat);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isOpaqueCube() {
|
public boolean isOpaqueCube() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean renderAsNormalBlock() {
|
public boolean renderAsNormalBlock() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int renderID = RenderingRegistry.getNextAvailableRenderId();
|
public static int renderID = RenderingRegistry.getNextAvailableRenderId();
|
||||||
|
|
||||||
public int getRenderType() {
|
public int getRenderType() {
|
||||||
@ -47,7 +48,7 @@ public class BlockChain extends Block {
|
|||||||
public boolean isLadder(IBlockAccess world, int x, int y, int z, EntityLivingBase entity) {
|
public boolean isLadder(IBlockAccess world, int x, int y, int z, EntityLivingBase entity) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||||
@ -60,14 +61,14 @@ public class BlockChain extends Block {
|
|||||||
|
|
||||||
if(world.isSideSolid(x, y - 1, z, ForgeDirection.UP, false) || (world.getBlock(x, y - 1, z) == this && world.getBlockMetadata(x, y, z) == world.getBlockMetadata(x, y - 1, z)))
|
if(world.isSideSolid(x, y - 1, z, ForgeDirection.UP, false) || (world.getBlock(x, y - 1, z) == this && world.getBlockMetadata(x, y, z) == world.getBlockMetadata(x, y - 1, z)))
|
||||||
return this.blockIcon;
|
return this.blockIcon;
|
||||||
|
|
||||||
return this.iconEnd;
|
return this.iconEnd;
|
||||||
}
|
}
|
||||||
|
|
||||||
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) {
|
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) {
|
public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) {
|
||||||
func_149797_b(world.getBlockMetadata(x, y, z));
|
func_149797_b(world.getBlockMetadata(x, y, z));
|
||||||
|
|
||||||
@ -76,11 +77,11 @@ public class BlockChain extends Block {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void func_149797_b(int meta) {
|
public void func_149797_b(int meta) {
|
||||||
|
|
||||||
float f = 0.125F;
|
float f = 0.125F;
|
||||||
|
|
||||||
if(meta == 0) {
|
if(meta == 0) {
|
||||||
|
|
||||||
this.minX = 3 * f;
|
this.minX = 3 * f;
|
||||||
this.minY = 0;
|
this.minY = 0;
|
||||||
this.minZ = 3 * f;
|
this.minZ = 3 * f;
|
||||||
@ -109,24 +110,24 @@ public class BlockChain extends Block {
|
|||||||
this.setBlockBounds(0.0F, 0.0F, 3 * f, f, 1.0F, 5 * f);
|
this.setBlockBounds(0.0F, 0.0F, 3 * f, f, 1.0F, 5 * f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public AxisAlignedBB getSelectedBoundingBoxFromPool(World world, int x, int y, int z) {
|
public AxisAlignedBB getSelectedBoundingBoxFromPool(World world, int x, int y, int z) {
|
||||||
this.setBlockBoundsBasedOnState(world, x, y, z);
|
this.setBlockBoundsBasedOnState(world, x, y, z);
|
||||||
return super.getSelectedBoundingBoxFromPool(world, x, y, z);
|
return super.getSelectedBoundingBoxFromPool(world, x, y, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean canPlaceBlockAt(World world, int x, int y, int z) {
|
public boolean canPlaceBlockAt(World world, int x, int y, int z) {
|
||||||
|
|
||||||
if(world.isSideSolid(x, y + 1, z, ForgeDirection.DOWN) || world.getBlock(x, y + 1, z) == this)
|
if(world.isSideSolid(x, y + 1, z, ForgeDirection.DOWN) || world.getBlock(x, y + 1, z) == this)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
return world.isSideSolid(x - 1, y, z, EAST ) ||
|
return world.isSideSolid(x - 1, y, z, EAST ) ||
|
||||||
world.isSideSolid(x + 1, y, z, WEST ) ||
|
world.isSideSolid(x + 1, y, z, WEST ) ||
|
||||||
world.isSideSolid(x, y, z - 1, SOUTH) ||
|
world.isSideSolid(x, y, z - 1, SOUTH) ||
|
||||||
world.isSideSolid(x, y, z + 1, NORTH);
|
world.isSideSolid(x, y, z + 1, NORTH);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int onBlockPlaced(World world, int x, int y, int z, int side, float p_149660_6_, float p_149660_7_, float p_149660_8_, int meta)
|
public int onBlockPlaced(World world, int x, int y, int z, int side, float p_149660_6_, float p_149660_7_, float p_149660_8_, int meta)
|
||||||
{
|
{
|
||||||
int j1 = meta;
|
int j1 = meta;
|
||||||
@ -142,12 +143,12 @@ public class BlockChain extends Block {
|
|||||||
|
|
||||||
if(side == 5 && world.isSideSolid(x - 1, y, z, EAST))
|
if(side == 5 && world.isSideSolid(x - 1, y, z, EAST))
|
||||||
j1 = 5;
|
j1 = 5;
|
||||||
|
|
||||||
if(j1 == 0) {
|
if(j1 == 0) {
|
||||||
|
|
||||||
if(world.getBlock(x, y + 1, z) == this)
|
if(world.getBlock(x, y + 1, z) == this)
|
||||||
return world.getBlockMetadata(x, y + 1, z);
|
return world.getBlockMetadata(x, y + 1, z);
|
||||||
|
|
||||||
if(world.isSideSolid(x, y + 1, z, ForgeDirection.DOWN))
|
if(world.isSideSolid(x, y + 1, z, ForgeDirection.DOWN))
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -155,30 +156,30 @@ public class BlockChain extends Block {
|
|||||||
if(j1 == 0) {
|
if(j1 == 0) {
|
||||||
if(world.isSideSolid(x, y, z + 1, NORTH))
|
if(world.isSideSolid(x, y, z + 1, NORTH))
|
||||||
j1 = 2;
|
j1 = 2;
|
||||||
|
|
||||||
if(world.isSideSolid(x, y, z - 1, SOUTH))
|
if(world.isSideSolid(x, y, z - 1, SOUTH))
|
||||||
j1 = 3;
|
j1 = 3;
|
||||||
|
|
||||||
if(world.isSideSolid(x + 1, y, z, WEST))
|
if(world.isSideSolid(x + 1, y, z, WEST))
|
||||||
j1 = 4;
|
j1 = 4;
|
||||||
|
|
||||||
if(world.isSideSolid(x - 1, y, z, EAST))
|
if(world.isSideSolid(x - 1, y, z, EAST))
|
||||||
j1 = 5;
|
j1 = 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
return j1;
|
return j1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onNeighborBlockChange(World world, int x, int y, int z, Block block) {
|
public void onNeighborBlockChange(World world, int x, int y, int z, Block block) {
|
||||||
|
|
||||||
int l = world.getBlockMetadata(x, y, z);
|
int l = world.getBlockMetadata(x, y, z);
|
||||||
boolean flag = false;
|
boolean flag = false;
|
||||||
|
|
||||||
if(world.getBlock(x, y + 1, z) == this && world.getBlockMetadata(x, y, z) == world.getBlockMetadata(x, y + 1, z)) {
|
if(world.getBlock(x, y + 1, z) == this && world.getBlockMetadata(x, y, z) == world.getBlockMetadata(x, y + 1, z)) {
|
||||||
super.onNeighborBlockChange(world, x, y, z, block);
|
super.onNeighborBlockChange(world, x, y, z, block);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(world.isSideSolid(x, y + 1, z, ForgeDirection.DOWN) && world.getBlockMetadata(x, y, z) == 0) {
|
if(world.isSideSolid(x, y + 1, z, ForgeDirection.DOWN) && world.getBlockMetadata(x, y, z) == 0) {
|
||||||
super.onNeighborBlockChange(world, x, y, z, block);
|
super.onNeighborBlockChange(world, x, y, z, block);
|
||||||
return;
|
return;
|
||||||
@ -201,4 +202,12 @@ public class BlockChain extends Block {
|
|||||||
|
|
||||||
super.onNeighborBlockChange(world, x, y, z, block);
|
super.onNeighborBlockChange(world, x, y, z, block);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int transformMeta(int meta, int coordBaseMode) {
|
||||||
|
if (coordBaseMode == 0) return meta;
|
||||||
|
if (meta == 0) return meta;
|
||||||
|
if (meta == 1) return meta;
|
||||||
|
return INBTBlockTransformable.transformMetaDeco(meta, coordBaseMode);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,26 +1,15 @@
|
|||||||
package com.hbm.blocks.generic;
|
package com.hbm.blocks.generic;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
import com.hbm.blocks.ITooltipProvider;
|
|
||||||
import com.hbm.blocks.ModBlocks;
|
import com.hbm.blocks.ModBlocks;
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.util.i18n.I18nUtil;
|
|
||||||
|
|
||||||
import api.hbm.block.IDrillInteraction;
|
|
||||||
import api.hbm.block.IMiningDrill;
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.entity.item.EntityItem;
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.util.EnumChatFormatting;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import net.minecraftforge.common.util.FakePlayer;
|
|
||||||
|
|
||||||
public class BlockCluster extends Block implements IDrillInteraction, ITooltipProvider {
|
public class BlockCluster extends Block {
|
||||||
|
|
||||||
public BlockCluster(Material mat) {
|
public BlockCluster(Material mat) {
|
||||||
super(mat);
|
super(mat);
|
||||||
@ -28,32 +17,7 @@ public class BlockCluster extends Block implements IDrillInteraction, ITooltipPr
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Item getItemDropped(int i, Random rand, int j) {
|
public Item getItemDropped(int i, Random rand, int j) {
|
||||||
return null;
|
return getDrop();
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void harvestBlock(World world, EntityPlayer player, int x, int y, int z, int meta) {
|
|
||||||
|
|
||||||
if(player instanceof FakePlayer || player == null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!world.isRemote && world.getGameRules().getGameRuleBooleanValue("doTileDrops") && !world.restoringBlockSnapshots) {
|
|
||||||
|
|
||||||
Item drop = getDrop();
|
|
||||||
|
|
||||||
if(drop == null)
|
|
||||||
return;
|
|
||||||
|
|
||||||
float f = 0.7F;
|
|
||||||
double mX = (double) (world.rand.nextFloat() * f) + (double) (1.0F - f) * 0.5D;
|
|
||||||
double mY = (double) (world.rand.nextFloat() * f) + (double) (1.0F - f) * 0.5D;
|
|
||||||
double mZ = (double) (world.rand.nextFloat() * f) + (double) (1.0F - f) * 0.5D;
|
|
||||||
|
|
||||||
EntityItem entityitem = new EntityItem(world, (double) x + mX, (double) y + mY, (double) z + mZ, new ItemStack(drop));
|
|
||||||
entityitem.delayBeforeCanPickup = 10;
|
|
||||||
world.spawnEntityInWorld(entityitem);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private Item getDrop() {
|
private Item getDrop() {
|
||||||
@ -65,24 +29,4 @@ public class BlockCluster extends Block implements IDrillInteraction, ITooltipPr
|
|||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean canBreak(World world, int x, int y, int z, int meta, IMiningDrill drill) {
|
|
||||||
return drill.getDrillRating() > 70 || world.rand.nextFloat() < 0.05;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ItemStack extractResource(World world, int x, int y, int z, int meta, IMiningDrill drill) {
|
|
||||||
return drill.getDrillRating() <= 70 ? new ItemStack(getDrop()) : null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public float getRelativeHardness(World world, int x, int y, int z, int meta, IMiningDrill drill) {
|
|
||||||
return this.getBlockHardness(world, x, y, z);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
|
||||||
list.add(EnumChatFormatting.YELLOW + I18nUtil.resolveKey("trait.tile.cluster"));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,78 +0,0 @@
|
|||||||
package com.hbm.blocks.generic;
|
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.block.material.Material;
|
|
||||||
import net.minecraft.entity.Entity;
|
|
||||||
import net.minecraft.init.Blocks;
|
|
||||||
import net.minecraft.item.Item;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
|
||||||
|
|
||||||
public class BlockCoalBurning extends BlockOutgas {
|
|
||||||
|
|
||||||
public BlockCoalBurning(Material mat) {
|
|
||||||
super(mat, false, 1, false);
|
|
||||||
this.setTickRandomly(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public void randomDisplayTick(World world, int x, int y, int z, Random rand) {
|
|
||||||
super.randomDisplayTick(world, x, y, z, rand);
|
|
||||||
|
|
||||||
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) {
|
|
||||||
|
|
||||||
if(dir == ForgeDirection.DOWN)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if(world.getBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ).getMaterial() == Material.air) {
|
|
||||||
|
|
||||||
double ix = x + 0.5F + dir.offsetX + rand.nextDouble() - 0.5D;
|
|
||||||
double iy = y + 0.5F + dir.offsetY + rand.nextDouble() - 0.5D;
|
|
||||||
double iz = z + 0.5F + dir.offsetZ + rand.nextDouble() - 0.5D;
|
|
||||||
|
|
||||||
if(dir.offsetX != 0)
|
|
||||||
ix = x + 0.5F + dir.offsetX * 0.5 + rand.nextDouble() * 0.125 * dir.offsetX;
|
|
||||||
if(dir.offsetY != 0)
|
|
||||||
iy = y + 0.5F + dir.offsetY * 0.5 + rand.nextDouble() * 0.125 * dir.offsetY;
|
|
||||||
if(dir.offsetZ != 0)
|
|
||||||
iz = z + 0.5F + dir.offsetZ * 0.5 + rand.nextDouble() * 0.125 * dir.offsetZ;
|
|
||||||
|
|
||||||
world.spawnParticle("flame", ix, iy, iz, 0.0, 0.0, 0.0);
|
|
||||||
world.spawnParticle("smoke", ix, iy, iz, 0.0, 0.0, 0.0);
|
|
||||||
world.spawnParticle("smoke", ix, iy, iz, 0.0, 0.1, 0.0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Item getItemDropped(int i, Random rand, int j) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void breakBlock(World world, int x, int y, int z, Block block, int i) {
|
|
||||||
super.breakBlock(world, x, y, z, block, i);
|
|
||||||
|
|
||||||
world.setBlock(x, y, z, Blocks.fire);
|
|
||||||
|
|
||||||
for(int ix = -2; ix <= 2; ix++) {
|
|
||||||
for(int iy = -2; iy <= 2; iy++) {
|
|
||||||
for(int iz = -2; iz <= 2; iz++) {
|
|
||||||
|
|
||||||
if(Math.abs(ix + iy + iz) < 5 && world.getBlock(x + ix, y + iy, z + iz) == Blocks.air) {
|
|
||||||
world.setBlock(x + ix, y + iy, z + iz, this.getGas());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onEntityWalking(World world, int x, int y, int z, Entity entity) {
|
|
||||||
entity.setFire(3);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,33 +0,0 @@
|
|||||||
package com.hbm.blocks.generic;
|
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import com.hbm.blocks.ModBlocks;
|
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.block.material.Material;
|
|
||||||
import net.minecraft.init.Items;
|
|
||||||
import net.minecraft.item.Item;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
|
|
||||||
public class BlockCoalOil extends Block {
|
|
||||||
|
|
||||||
public BlockCoalOil(Material mat) {
|
|
||||||
super(mat);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void updateTick(World world, int x, int y, int z, Random rand) {
|
|
||||||
world.setBlock(x, y, z, ModBlocks.ore_coal_oil_burning);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Item getItemDropped(int i, Random rand, int j) {
|
|
||||||
return Items.coal;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int quantityDropped(Random rand) {
|
|
||||||
return 2 + rand.nextInt(2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -5,8 +5,10 @@ import java.util.List;
|
|||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
import com.hbm.blocks.ModBlocks;
|
import com.hbm.blocks.ModBlocks;
|
||||||
|
import com.hbm.interfaces.Spaghetti;
|
||||||
import com.hbm.items.weapon.sedna.factory.GunFactory.EnumAmmoSecret;
|
import com.hbm.items.weapon.sedna.factory.GunFactory.EnumAmmoSecret;
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
|
import com.hbm.items.machine.ItemBatteryPack.EnumBatteryPack;
|
||||||
|
|
||||||
import net.minecraft.block.BlockFalling;
|
import net.minecraft.block.BlockFalling;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
@ -16,6 +18,7 @@ import net.minecraft.item.Item;
|
|||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
@Spaghetti("this is implemented in the most braindead fucking way imaginable") // TODO: rework this unholy abomination using configurable loot pools
|
||||||
public class BlockCrate extends BlockFalling {
|
public class BlockCrate extends BlockFalling {
|
||||||
|
|
||||||
List<ItemStack> crateList;
|
List<ItemStack> crateList;
|
||||||
@ -69,22 +72,16 @@ public class BlockCrate extends BlockFalling {
|
|||||||
|
|
||||||
// Lead Crate
|
// Lead Crate
|
||||||
BlockCrate.addToListWithWeight(leadList, ModItems.ingot_uranium, 10);
|
BlockCrate.addToListWithWeight(leadList, ModItems.ingot_uranium, 10);
|
||||||
// BlockCrate.addToListWithWeight(leadList, ModItems.ingot_u235, 5);
|
|
||||||
BlockCrate.addToListWithWeight(leadList, ModItems.ingot_u238, 8);
|
BlockCrate.addToListWithWeight(leadList, ModItems.ingot_u238, 8);
|
||||||
BlockCrate.addToListWithWeight(leadList, ModItems.ingot_plutonium, 7);
|
BlockCrate.addToListWithWeight(leadList, ModItems.ingot_plutonium, 7);
|
||||||
// BlockCrate.addToListWithWeight(leadList, ModItems.ingot_pu238, 5);
|
|
||||||
// BlockCrate.addToListWithWeight(leadList, ModItems.ingot_pu239, 4);
|
|
||||||
BlockCrate.addToListWithWeight(leadList, ModItems.ingot_pu240, 6);
|
BlockCrate.addToListWithWeight(leadList, ModItems.ingot_pu240, 6);
|
||||||
BlockCrate.addToListWithWeight(leadList, ModItems.ingot_neptunium, 7);
|
BlockCrate.addToListWithWeight(leadList, ModItems.ingot_neptunium, 7);
|
||||||
BlockCrate.addToListWithWeight(leadList, ModItems.ingot_uranium_fuel, 8);
|
BlockCrate.addToListWithWeight(leadList, ModItems.ingot_uranium_fuel, 8);
|
||||||
BlockCrate.addToListWithWeight(leadList, ModItems.ingot_plutonium_fuel, 7);
|
BlockCrate.addToListWithWeight(leadList, ModItems.ingot_plutonium_fuel, 7);
|
||||||
BlockCrate.addToListWithWeight(leadList, ModItems.ingot_mox_fuel, 6);
|
BlockCrate.addToListWithWeight(leadList, ModItems.ingot_mox_fuel, 6);
|
||||||
BlockCrate.addToListWithWeight(leadList, ModItems.nugget_uranium, 10);
|
BlockCrate.addToListWithWeight(leadList, ModItems.nugget_uranium, 10);
|
||||||
// BlockCrate.addToListWithWeight(leadList, ModItems.nugget_u235, 5);
|
|
||||||
BlockCrate.addToListWithWeight(leadList, ModItems.nugget_u238, 8);
|
BlockCrate.addToListWithWeight(leadList, ModItems.nugget_u238, 8);
|
||||||
BlockCrate.addToListWithWeight(leadList, ModItems.nugget_plutonium, 7);
|
BlockCrate.addToListWithWeight(leadList, ModItems.nugget_plutonium, 7);
|
||||||
// BlockCrate.addToListWithWeight(leadList, ModItems.nugget_pu238, 5);
|
|
||||||
// BlockCrate.addToListWithWeight(leadList, ModItems.nugget_pu239, 4);
|
|
||||||
BlockCrate.addToListWithWeight(leadList, ModItems.nugget_pu240, 6);
|
BlockCrate.addToListWithWeight(leadList, ModItems.nugget_pu240, 6);
|
||||||
BlockCrate.addToListWithWeight(leadList, ModItems.nugget_neptunium, 7);
|
BlockCrate.addToListWithWeight(leadList, ModItems.nugget_neptunium, 7);
|
||||||
BlockCrate.addToListWithWeight(leadList, ModItems.nugget_uranium_fuel, 8);
|
BlockCrate.addToListWithWeight(leadList, ModItems.nugget_uranium_fuel, 8);
|
||||||
@ -96,7 +93,6 @@ public class BlockCrate extends BlockFalling {
|
|||||||
BlockCrate.addToListWithWeight(leadList, ModItems.cell_puf6, 8);
|
BlockCrate.addToListWithWeight(leadList, ModItems.cell_puf6, 8);
|
||||||
BlockCrate.addToListWithWeight(leadList, ModItems.pellet_rtg, 6);
|
BlockCrate.addToListWithWeight(leadList, ModItems.pellet_rtg, 6);
|
||||||
BlockCrate.addToListWithWeight(leadList, ModItems.pellet_rtg_weak, 7);
|
BlockCrate.addToListWithWeight(leadList, ModItems.pellet_rtg_weak, 7);
|
||||||
BlockCrate.addToListWithWeight(leadList, ModItems.tritium_deuterium_cake, 5);
|
|
||||||
BlockCrate.addToListWithWeight(leadList, ModItems.powder_yellowcake, 10);
|
BlockCrate.addToListWithWeight(leadList, ModItems.powder_yellowcake, 10);
|
||||||
|
|
||||||
// Metal Crate
|
// Metal Crate
|
||||||
@ -107,17 +103,15 @@ public class BlockCrate extends BlockFalling {
|
|||||||
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_diesel), 8);
|
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_diesel), 8);
|
||||||
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_rtg_grey), 4);
|
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_rtg_grey), 4);
|
||||||
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.red_pylon), 9);
|
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.red_pylon), 9);
|
||||||
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_battery), 8);
|
BlockCrate.addToListWithWeight(metalList, new ItemStack(ModItems.battery_pack, 1, EnumBatteryPack.BATTERY_LEAD.ordinal()), 10);
|
||||||
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_lithium_battery), 5);
|
|
||||||
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_electric_furnace_off), 8);
|
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_electric_furnace_off), 8);
|
||||||
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_assembler), 10);
|
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_assembly_machine), 10);
|
||||||
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_fluidtank), 7);
|
BlockCrate.addToListWithWeight(metalList, Item.getItemFromBlock(ModBlocks.machine_fluidtank), 7);
|
||||||
BlockCrate.addToListWithWeight(metalList, ModItems.centrifuge_element, 6);
|
BlockCrate.addToListWithWeight(metalList, ModItems.centrifuge_element, 6);
|
||||||
BlockCrate.addToListWithWeight(metalList, ModItems.motor, 8);
|
BlockCrate.addToListWithWeight(metalList, ModItems.motor, 8);
|
||||||
BlockCrate.addToListWithWeight(metalList, ModItems.coil_tungsten, 7);
|
BlockCrate.addToListWithWeight(metalList, ModItems.coil_tungsten, 7);
|
||||||
BlockCrate.addToListWithWeight(metalList, ModItems.photo_panel, 3);
|
BlockCrate.addToListWithWeight(metalList, ModItems.photo_panel, 3);
|
||||||
BlockCrate.addToListWithWeight(metalList, ModItems.coil_copper, 10);
|
BlockCrate.addToListWithWeight(metalList, ModItems.coil_copper, 10);
|
||||||
BlockCrate.addToListWithWeight(metalList, ModItems.tank_steel, 9);
|
|
||||||
BlockCrate.addToListWithWeight(metalList, ModItems.blade_titanium, 3);
|
BlockCrate.addToListWithWeight(metalList, ModItems.blade_titanium, 3);
|
||||||
BlockCrate.addToListWithWeight(metalList, ModItems.piston_selenium, 6);
|
BlockCrate.addToListWithWeight(metalList, ModItems.piston_selenium, 6);
|
||||||
|
|
||||||
|
|||||||
@ -55,7 +55,8 @@ public class BlockFissure extends BlockContainer implements IBlockMultiPass {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void updateTick(World world, int x, int y, int z, Random rand) {
|
public void updateTick(World world, int x, int y, int z, Random rand) {
|
||||||
if(world.getBlock(x, y + 1, z).isReplaceable(world, x, y + 1, z)) world.setBlock(x, y + 1, z, ModBlocks.volcanic_lava_block);
|
boolean crater = world.getBlockMetadata(x, y, z) != 0;
|
||||||
|
if(world.getBlock(x, y + 1, z).isReplaceable(world, x, y + 1, z)) world.setBlock(x, y + 1, z, crater ? ModBlocks.rad_lava_block : ModBlocks.volcanic_lava_block);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
79
src/main/java/com/hbm/blocks/generic/BlockNTMSand.java
Normal file
79
src/main/java/com/hbm/blocks/generic/BlockNTMSand.java
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
package com.hbm.blocks.generic;
|
||||||
|
|
||||||
|
import java.util.Locale;
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
|
import com.hbm.blocks.BlockEnumMulti;
|
||||||
|
import com.hbm.lib.RefStrings;
|
||||||
|
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.block.BlockFalling;
|
||||||
|
import net.minecraft.block.material.Material;
|
||||||
|
import net.minecraft.entity.item.EntityFallingBlock;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public class BlockNTMSand extends BlockEnumMulti {
|
||||||
|
|
||||||
|
public BlockNTMSand(Material mat) {
|
||||||
|
super(mat, EnumSandType.class, true, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBlockAdded(World world, int x, int y, int z) {
|
||||||
|
world.scheduleBlockUpdate(x, y, z, this, this.tickRate(world));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onNeighborBlockChange(World world, int x, int y, int z, Block b) {
|
||||||
|
world.scheduleBlockUpdate(x, y, z, this, this.tickRate(world));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateTick(World world, int x, int y, int z, Random rand) {
|
||||||
|
if(!world.isRemote) {
|
||||||
|
this.fall(world, x, y, z);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void fall(World world, int x, int y, int z) {
|
||||||
|
if(BlockFalling.func_149831_e(world, x, y - 1, z) && y >= 0) {
|
||||||
|
byte b0 = 32;
|
||||||
|
|
||||||
|
if(!BlockFalling.fallInstantly && world.checkChunksExist(x - b0, y - b0, z - b0, x + b0, y + b0, z + b0)) {
|
||||||
|
if(!world.isRemote) {
|
||||||
|
EntityFallingBlock entityfallingblock = new EntityFallingBlock(world, x + 0.5, y + 0.5, z + 0.5, this, world.getBlockMetadata(x, y, z));
|
||||||
|
world.spawnEntityInWorld(entityfallingblock);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
world.setBlockToAir(x, y, z);
|
||||||
|
|
||||||
|
while(BlockFalling.func_149831_e(world, x, y - 1, z) && y > 0) {
|
||||||
|
--y;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(y > 0) {
|
||||||
|
world.setBlock(x, y, z, this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int tickRate(World p_149738_1_) {
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getTextureMultiName(Enum num) {
|
||||||
|
return RefStrings.MODID + ":sand_" + num.name().toLowerCase(Locale.US);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getUnlocalizedMultiName(Enum num) {
|
||||||
|
return "tile.sand_" + num.name().toLowerCase(Locale.US);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static enum EnumSandType {
|
||||||
|
BORON, LEAD, URANIUM, POLONIUM, QUARTZ
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -50,7 +50,7 @@ public class BlockOutgas extends BlockOre {
|
|||||||
if(this == ModBlocks.ancient_scrap)
|
if(this == ModBlocks.ancient_scrap)
|
||||||
return ModBlocks.gas_radon_tomb;
|
return ModBlocks.gas_radon_tomb;
|
||||||
|
|
||||||
if(this == ModBlocks.ore_coal_oil_burning || this == ModBlocks.ore_nether_coal) {
|
if(this == ModBlocks.ore_nether_coal) {
|
||||||
return ModBlocks.gas_monoxide;
|
return ModBlocks.gas_monoxide;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,49 +10,33 @@ import net.minecraft.item.Item;
|
|||||||
import net.minecraft.util.AxisAlignedBB;
|
import net.minecraft.util.AxisAlignedBB;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public class BlockPlasma extends Block {
|
public class BlockPlasma extends Block {
|
||||||
|
|
||||||
public BlockPlasma(Material p_i45394_1_) {
|
public BlockPlasma(Material p_i45394_1_) {
|
||||||
super(p_i45394_1_);
|
super(p_i45394_1_);
|
||||||
this.setTickRandomly(true);
|
this.setTickRandomly(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void updateTick(World world, int x, int y, int z, Random rand)
|
|
||||||
{
|
|
||||||
if (world.getGameRules().getGameRuleBooleanValue("doFireTick"))
|
|
||||||
world.setBlock(x, y, z, Blocks.air);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public AxisAlignedBB getCollisionBoundingBoxFromPool(World p_149668_1_, int p_149668_2_, int p_149668_3_, int p_149668_4_)
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onEntityCollidedWithBlock(World p_149670_1_, int p_149670_2_, int p_149670_3_, int p_149670_4_, Entity p_149670_5_)
|
|
||||||
{
|
|
||||||
p_149670_5_.setFire(10);
|
|
||||||
p_149670_5_.setInWeb();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isOpaqueCube()
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_)
|
public void updateTick(World world, int x, int y, int z, Random rand) {
|
||||||
{
|
if(world.getGameRules().getGameRuleBooleanValue("doFireTick"))
|
||||||
|
world.setBlock(x, y, z, Blocks.air);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AxisAlignedBB getCollisionBoundingBoxFromPool(World p_149668_1_, int p_149668_2_, int p_149668_3_, int p_149668_4_) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean renderAsNormalBlock()
|
public void onEntityCollidedWithBlock(World p_149670_1_, int p_149670_2_, int p_149670_3_, int p_149670_4_, Entity p_149670_5_) {
|
||||||
{
|
p_149670_5_.setFire(10);
|
||||||
return false;
|
p_149670_5_.setInWeb();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override public boolean isOpaqueCube() { return false; }
|
||||||
|
@Override public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_) { return null; }
|
||||||
|
@Override public boolean renderAsNormalBlock() { return false; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -96,12 +96,16 @@ public class BlockPlushie extends BlockContainer implements IBlockMulti, IToolti
|
|||||||
@Override
|
@Override
|
||||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||||
|
|
||||||
|
TileEntityPlushie plushie = (TileEntityPlushie) world.getTileEntity(x, y, z);
|
||||||
if(world.isRemote) {
|
if(world.isRemote) {
|
||||||
TileEntityPlushie plushie = (TileEntityPlushie) world.getTileEntity(x, y, z);
|
|
||||||
plushie.squishTimer = 11;
|
plushie.squishTimer = 11;
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
world.playSoundEffect(x + 0.5, y + 0.5, z + 0.5, "hbm:block.squeakyToy", 0.25F, 1F);
|
if(plushie.type == PlushieType.HUNDUN) {
|
||||||
|
world.playSoundEffect(x + 0.5, y + 0.5, z + 0.5, "hbm:block.hunduns_magnificent_howl", 100F, 1F);
|
||||||
|
} else {
|
||||||
|
world.playSoundEffect(x + 0.5, y + 0.5, z + 0.5, "hbm:block.squeakyToy", 0.25F, 1F);
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -155,7 +159,8 @@ public class BlockPlushie extends BlockContainer implements IBlockMulti, IToolti
|
|||||||
NONE( "NONE", null),
|
NONE( "NONE", null),
|
||||||
YOMI( "Yomi", "Hi! Can I be your rabbit friend?"),
|
YOMI( "Yomi", "Hi! Can I be your rabbit friend?"),
|
||||||
NUMBERNINE( "Number Nine", "None of y'all deserve coal."),
|
NUMBERNINE( "Number Nine", "None of y'all deserve coal."),
|
||||||
POOH( "Winnie the Pooh", "Beloved children's character with no malicious intent.");
|
HUNDUN( "Hundun", "混沌"),
|
||||||
|
DERG( "Dragon", "Squeeze him.");
|
||||||
|
|
||||||
public String label;
|
public String label;
|
||||||
public String inscription;
|
public String inscription;
|
||||||
|
|||||||
@ -372,6 +372,7 @@ public class BlockRebar extends BlockContainer implements ISBRHUniversal {
|
|||||||
if(!(o instanceof TileEntityRebar)) continue;
|
if(!(o instanceof TileEntityRebar)) continue;
|
||||||
TileEntityRebar rebar = (TileEntityRebar) o;
|
TileEntityRebar rebar = (TileEntityRebar) o;
|
||||||
if(rebar.progress > 0) rebars.add(rebar);
|
if(rebar.progress > 0) rebars.add(rebar);
|
||||||
|
if(rebars.size() >= ClientConfig.RENDER_REBAR_LIMIT.get()) break;
|
||||||
}
|
}
|
||||||
|
|
||||||
Minecraft mc = Minecraft.getMinecraft();
|
Minecraft mc = Minecraft.getMinecraft();
|
||||||
|
|||||||
@ -152,7 +152,7 @@ public class BlockToolConversion extends BlockMulti implements IToolable, ILookO
|
|||||||
|
|
||||||
public static void registerRecipes() {
|
public static void registerRecipes() {
|
||||||
conversions.put(new Pair(ToolType.BOLT, new MetaBlock(ModBlocks.watz_end, 0)), new Pair(new AStack[] {new OreDictStack(OreDictManager.DURA.bolt(), 4)}, new MetaBlock(ModBlocks.watz_end, 1)));
|
conversions.put(new Pair(ToolType.BOLT, new MetaBlock(ModBlocks.watz_end, 0)), new Pair(new AStack[] {new OreDictStack(OreDictManager.DURA.bolt(), 4)}, new MetaBlock(ModBlocks.watz_end, 1)));
|
||||||
conversions.put(new Pair(ToolType.TORCH, new MetaBlock(ModBlocks.fusion_conductor, 0)), new Pair(new AStack[] {new OreDictStack(OreDictManager.STEEL.plateCast())}, new MetaBlock(ModBlocks.fusion_conductor, 1)));
|
conversions.put(new Pair(ToolType.TORCH, new MetaBlock(ModBlocks.fusion_component, 0)), new Pair(new AStack[] {new OreDictStack(OreDictManager.STEEL.plateCast())}, new MetaBlock(ModBlocks.fusion_component, 1)));
|
||||||
conversions.put(new Pair(ToolType.TORCH, new MetaBlock(ModBlocks.icf_component, 1)), new Pair(new AStack[] {new OreDictStack(OreDictManager.ANY_BISMOIDBRONZE.plateCast())}, new MetaBlock(ModBlocks.icf_component, 2)));
|
conversions.put(new Pair(ToolType.TORCH, new MetaBlock(ModBlocks.icf_component, 1)), new Pair(new AStack[] {new OreDictStack(OreDictManager.ANY_BISMOIDBRONZE.plateCast())}, new MetaBlock(ModBlocks.icf_component, 2)));
|
||||||
conversions.put(new Pair(ToolType.BOLT, new MetaBlock(ModBlocks.icf_component, 3)), new Pair(new AStack[] {new OreDictStack(OreDictManager.STEEL.plateCast()), new OreDictStack(OreDictManager.DURA.bolt(), 4)}, new MetaBlock(ModBlocks.icf_component, 4)));
|
conversions.put(new Pair(ToolType.BOLT, new MetaBlock(ModBlocks.icf_component, 3)), new Pair(new AStack[] {new OreDictStack(OreDictManager.STEEL.plateCast()), new OreDictStack(OreDictManager.DURA.bolt(), 4)}, new MetaBlock(ModBlocks.icf_component, 4)));
|
||||||
}
|
}
|
||||||
|
|||||||
@ -37,7 +37,6 @@ import net.minecraft.entity.EntityLivingBase;
|
|||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.inventory.Container;
|
import net.minecraft.inventory.Container;
|
||||||
import net.minecraft.item.ItemBlock;
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
@ -135,10 +134,10 @@ public class BlockWandJigsaw extends BlockContainer implements IBlockSideRotatio
|
|||||||
TileEntityWandJigsaw jigsaw = (TileEntityWandJigsaw) te;
|
TileEntityWandJigsaw jigsaw = (TileEntityWandJigsaw) te;
|
||||||
|
|
||||||
if(!player.isSneaking()) {
|
if(!player.isSneaking()) {
|
||||||
Block block = getBlock(world, player.getHeldItem());
|
Block block = ModBlocks.getBlockFromStack(player.getHeldItem());
|
||||||
if(block == ModBlocks.wand_air) block = Blocks.air;
|
if(block == ModBlocks.wand_air) block = Blocks.air;
|
||||||
|
|
||||||
if(block != null && block != ModBlocks.wand_jigsaw && block != ModBlocks.wand_loot) {
|
if(block != null && !ModBlocks.isStructureBlock(block, false)) {
|
||||||
jigsaw.replaceBlock = block;
|
jigsaw.replaceBlock = block;
|
||||||
jigsaw.replaceMeta = player.getHeldItem().getItemDamage();
|
jigsaw.replaceMeta = player.getHeldItem().getItemDamage();
|
||||||
|
|
||||||
@ -155,13 +154,6 @@ public class BlockWandJigsaw extends BlockContainer implements IBlockSideRotatio
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Block getBlock(World world, ItemStack stack) {
|
|
||||||
if(stack == null) return null;
|
|
||||||
if(!(stack.getItem() instanceof ItemBlock)) return null;
|
|
||||||
|
|
||||||
return ((ItemBlock) stack.getItem()).field_150939_a;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public Object provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
public Object provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||||
|
|||||||
@ -33,7 +33,6 @@ import net.minecraft.client.renderer.texture.IIconRegister;
|
|||||||
import net.minecraft.entity.EntityLivingBase;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.inventory.IInventory;
|
import net.minecraft.inventory.IInventory;
|
||||||
import net.minecraft.item.ItemBlock;
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
@ -82,7 +81,7 @@ public class BlockWandLoot extends BlockContainer implements ILookOverlay, ITool
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) {
|
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) {
|
||||||
int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3;
|
int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3;
|
||||||
|
|
||||||
if(i == 0) world.setBlockMetadataWithNotify(x, y, z, 3, 2);
|
if(i == 0) world.setBlockMetadataWithNotify(x, y, z, 3, 2);
|
||||||
if(i == 1) world.setBlockMetadataWithNotify(x, y, z, 2, 2);
|
if(i == 1) world.setBlockMetadataWithNotify(x, y, z, 2, 2);
|
||||||
@ -153,17 +152,14 @@ public class BlockWandLoot extends BlockContainer implements ILookOverlay, ITool
|
|||||||
}
|
}
|
||||||
|
|
||||||
private Block getLootableBlock(World world, ItemStack stack) {
|
private Block getLootableBlock(World world, ItemStack stack) {
|
||||||
if(stack == null) return null;
|
Block block = ModBlocks.getBlockFromStack(stack);
|
||||||
|
if(block == null) return null;
|
||||||
|
|
||||||
if(stack.getItem() instanceof ItemBlock) {
|
if(block == ModBlocks.deco_loot) return block;
|
||||||
Block block = ((ItemBlock) stack.getItem()).field_150939_a;
|
|
||||||
|
|
||||||
if(block == ModBlocks.deco_loot) return block;
|
if(block instanceof ITileEntityProvider) {
|
||||||
|
TileEntity te = ((ITileEntityProvider) block).createNewTileEntity(world, 12);
|
||||||
if(block instanceof ITileEntityProvider) {
|
if(te instanceof IInventory) return block;
|
||||||
TileEntity te = ((ITileEntityProvider) block).createNewTileEntity(world, 12);
|
|
||||||
if(te instanceof IInventory) return block;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
573
src/main/java/com/hbm/blocks/generic/BlockWandStructure.java
Normal file
573
src/main/java/com/hbm/blocks/generic/BlockWandStructure.java
Normal file
@ -0,0 +1,573 @@
|
|||||||
|
package com.hbm.blocks.generic;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.FileFilter;
|
||||||
|
import java.io.FileNotFoundException;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
import org.lwjgl.input.Keyboard;
|
||||||
|
|
||||||
|
import com.hbm.blocks.IBlockMulti;
|
||||||
|
import com.hbm.blocks.ILookOverlay;
|
||||||
|
import com.hbm.blocks.ModBlocks;
|
||||||
|
import com.hbm.config.StructureConfig;
|
||||||
|
import com.hbm.interfaces.IControlReceiver;
|
||||||
|
import com.hbm.inventory.gui.element.GuiFileList;
|
||||||
|
import com.hbm.lib.RefStrings;
|
||||||
|
import com.hbm.main.MainRegistry;
|
||||||
|
import com.hbm.packet.PacketDispatcher;
|
||||||
|
import com.hbm.packet.toserver.NBTControlPacket;
|
||||||
|
import com.hbm.tileentity.IGUIProvider;
|
||||||
|
import com.hbm.tileentity.TileEntityLoadedBase;
|
||||||
|
import com.hbm.util.BufferUtil;
|
||||||
|
import com.hbm.util.Tuple.Pair;
|
||||||
|
import com.hbm.util.i18n.I18nUtil;
|
||||||
|
import com.hbm.world.gen.nbt.NBTStructure;
|
||||||
|
|
||||||
|
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import io.netty.buffer.ByteBuf;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.block.BlockContainer;
|
||||||
|
import net.minecraft.block.material.Material;
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
|
import net.minecraft.client.gui.GuiButton;
|
||||||
|
import net.minecraft.client.gui.GuiScreen;
|
||||||
|
import net.minecraft.client.gui.GuiTextField;
|
||||||
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.event.ClickEvent;
|
||||||
|
import net.minecraft.init.Blocks;
|
||||||
|
import net.minecraft.inventory.Container;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.util.AxisAlignedBB;
|
||||||
|
import net.minecraft.util.ChatComponentText;
|
||||||
|
import net.minecraft.util.EnumChatFormatting;
|
||||||
|
import net.minecraft.util.IIcon;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre;
|
||||||
|
|
||||||
|
public class BlockWandStructure extends BlockContainer implements IBlockMulti, IGUIProvider, ILookOverlay {
|
||||||
|
|
||||||
|
private IIcon saveIcon;
|
||||||
|
private IIcon loadIcon;
|
||||||
|
|
||||||
|
public BlockWandStructure() {
|
||||||
|
super(Material.iron);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TileEntity createNewTileEntity(World worldIn, int meta) {
|
||||||
|
return new TileEntityWandStructure();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||||
|
saveIcon = iconRegister.registerIcon(RefStrings.MODID + ":wand_structure_save");
|
||||||
|
loadIcon = iconRegister.registerIcon(RefStrings.MODID + ":wand_structure_load");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IIcon getIcon(int side, int meta) {
|
||||||
|
if(meta == 1) return loadIcon;
|
||||||
|
return saveIcon;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||||
|
TileEntity te = world.getTileEntity(x, y, z);
|
||||||
|
|
||||||
|
if(!(te instanceof TileEntityWandStructure)) return false;
|
||||||
|
|
||||||
|
TileEntityWandStructure structure = (TileEntityWandStructure) te;
|
||||||
|
|
||||||
|
if(!player.isSneaking()) {
|
||||||
|
Block block = ModBlocks.getBlockFromStack(player.getHeldItem());
|
||||||
|
if(block != null && !ModBlocks.isStructureBlock(block, true)) {
|
||||||
|
Pair<Block, Integer> bm = new Pair<Block, Integer>(block, player.getHeldItem().getItemDamage());
|
||||||
|
|
||||||
|
if(structure.blacklist.contains(bm)) {
|
||||||
|
structure.blacklist.remove(bm);
|
||||||
|
} else {
|
||||||
|
structure.blacklist.add(bm);
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(world.isRemote) FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, x, y, z);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||||
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public void getSubBlocks(Item itemIn, CreativeTabs tab, List list) {
|
||||||
|
list.add(new ItemStack(itemIn, 1, 0));
|
||||||
|
list.add(new ItemStack(itemIn, 1, 1));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getSubCount() {
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getUnlocalizedName(ItemStack stack) {
|
||||||
|
int meta = stack.getItemDamage();
|
||||||
|
if(meta == 1) return getUnlocalizedName() + ".load";
|
||||||
|
return getUnlocalizedName() + ".save";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int damageDropped(int meta) {
|
||||||
|
return meta;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Container provideContainer(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Object provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||||
|
int meta = world.getBlockMetadata(x, y, z);
|
||||||
|
TileEntityWandStructure structure = (TileEntityWandStructure) world.getTileEntity(x, y, z);
|
||||||
|
if(meta == 1) return new GuiStructureLoad(structure);
|
||||||
|
return new GuiStructureSave(structure);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void printHook(Pre event, World world, int x, int y, int z) {
|
||||||
|
if(world.getBlockMetadata(x, y, z) != 0) return;
|
||||||
|
|
||||||
|
TileEntity te = world.getTileEntity(x, y, z);
|
||||||
|
if(!(te instanceof TileEntityWandStructure)) return;
|
||||||
|
TileEntityWandStructure structure = (TileEntityWandStructure) te;
|
||||||
|
|
||||||
|
List<String> text = new ArrayList<String>();
|
||||||
|
|
||||||
|
text.add(EnumChatFormatting.GRAY + "Name: " + EnumChatFormatting.RESET + structure.name);
|
||||||
|
|
||||||
|
text.add(EnumChatFormatting.GRAY + "Blacklist:");
|
||||||
|
for (Pair<Block, Integer> bm : structure.blacklist) {
|
||||||
|
text.add(EnumChatFormatting.RED + "- " + bm.getKey().getUnlocalizedName() + " : " + bm.getValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".save.name"), 0xffff00, 0x404000, text);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class TileEntityWandStructure extends TileEntityLoadedBase implements IControlReceiver {
|
||||||
|
|
||||||
|
public String name = "";
|
||||||
|
|
||||||
|
public int sizeX = 1;
|
||||||
|
public int sizeY = 1;
|
||||||
|
public int sizeZ = 1;
|
||||||
|
|
||||||
|
public Set<Pair<Block, Integer>> blacklist = new HashSet<>();
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void updateEntity() {
|
||||||
|
if(!worldObj.isRemote) {
|
||||||
|
networkPackNT(256);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void saveStructure(EntityPlayer player) {
|
||||||
|
if(name.isEmpty()) {
|
||||||
|
player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Could not save: invalid name"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(sizeX <= 0 || sizeY <= 0 || sizeZ <= 0) {
|
||||||
|
player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Could not save: invalid dimensions"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Pair<Block, Integer> air = new Pair<Block, Integer>(Blocks.air, 0);
|
||||||
|
blacklist.add(air);
|
||||||
|
|
||||||
|
File file = NBTStructure.quickSaveArea(name + ".nbt", worldObj, xCoord, yCoord + 1, zCoord, xCoord + sizeX - 1, yCoord + sizeY, zCoord + sizeZ - 1, blacklist);
|
||||||
|
|
||||||
|
blacklist.remove(air);
|
||||||
|
|
||||||
|
if(file == null) {
|
||||||
|
player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Failed to save structure"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
ChatComponentText fileText = new ChatComponentText(file.getName());
|
||||||
|
fileText.getChatStyle().setChatClickEvent(new ClickEvent(ClickEvent.Action.OPEN_FILE, file.getParentFile().getAbsolutePath()));
|
||||||
|
fileText.getChatStyle().setUnderlined(true);
|
||||||
|
|
||||||
|
player.addChatMessage(new ChatComponentText("Saved structure as ").appendSibling(fileText));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void loadStructure(EntityPlayer player) {
|
||||||
|
if(name.isEmpty()) {
|
||||||
|
player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Could not load: no filename specified"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
File structureDirectory = new File(Minecraft.getMinecraft().mcDataDir, "structures");
|
||||||
|
structureDirectory.mkdir();
|
||||||
|
|
||||||
|
File structureFile = new File(structureDirectory, name + ".nbt");
|
||||||
|
|
||||||
|
boolean previousDebug = StructureConfig.debugStructures;
|
||||||
|
StructureConfig.debugStructures = true;
|
||||||
|
|
||||||
|
try {
|
||||||
|
NBTStructure structure = new NBTStructure(structureFile);
|
||||||
|
|
||||||
|
sizeX = structure.getSizeX();
|
||||||
|
sizeY = structure.getSizeY();
|
||||||
|
sizeZ = structure.getSizeZ();
|
||||||
|
|
||||||
|
structure.build(worldObj, xCoord, yCoord + 1, zCoord, 0, false, true);
|
||||||
|
|
||||||
|
worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, 0, 3);
|
||||||
|
|
||||||
|
player.addChatMessage(new ChatComponentText("Structure loaded"));
|
||||||
|
|
||||||
|
} catch (FileNotFoundException ex) {
|
||||||
|
player.addChatMessage(new ChatComponentText(EnumChatFormatting.RED + "Could not load: file not found"));
|
||||||
|
} finally {
|
||||||
|
StructureConfig.debugStructures = previousDebug;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void serialize(ByteBuf buf) {
|
||||||
|
BufferUtil.writeString(buf, name);
|
||||||
|
|
||||||
|
buf.writeInt(sizeX);
|
||||||
|
buf.writeInt(sizeY);
|
||||||
|
buf.writeInt(sizeZ);
|
||||||
|
|
||||||
|
buf.writeInt(blacklist.size());
|
||||||
|
for(Pair<Block, Integer> bm : blacklist) {
|
||||||
|
buf.writeInt(Block.getIdFromBlock(bm.getKey()));
|
||||||
|
buf.writeInt(bm.getValue());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deserialize(ByteBuf buf) {
|
||||||
|
name = BufferUtil.readString(buf);
|
||||||
|
|
||||||
|
sizeX = buf.readInt();
|
||||||
|
sizeY = buf.readInt();
|
||||||
|
sizeZ = buf.readInt();
|
||||||
|
|
||||||
|
int count = buf.readInt();
|
||||||
|
blacklist = new HashSet<>();
|
||||||
|
for(int i = 0; i < count; i++) {
|
||||||
|
Block block = Block.getBlockById(buf.readInt());
|
||||||
|
int meta = buf.readInt();
|
||||||
|
blacklist.add(new Pair<Block, Integer>(block, meta));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void readFromNBT(NBTTagCompound nbt) {
|
||||||
|
super.readFromNBT(nbt);
|
||||||
|
|
||||||
|
name = nbt.getString("name");
|
||||||
|
|
||||||
|
sizeX = nbt.getInteger("sizeX");
|
||||||
|
sizeY = nbt.getInteger("sizeY");
|
||||||
|
sizeZ = nbt.getInteger("sizeZ");
|
||||||
|
|
||||||
|
int[] blocks = nbt.getIntArray("blocks");
|
||||||
|
int[] metas = nbt.getIntArray("metas");
|
||||||
|
|
||||||
|
blacklist = new HashSet<>();
|
||||||
|
for (int i = 0; i < blocks.length; i++) {
|
||||||
|
blacklist.add(new Pair<Block, Integer>(Block.getBlockById(blocks[i]), metas[i]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void writeToNBT(NBTTagCompound nbt) {
|
||||||
|
super.writeToNBT(nbt);
|
||||||
|
|
||||||
|
nbt.setString("name", name);
|
||||||
|
|
||||||
|
nbt.setInteger("sizeX", sizeX);
|
||||||
|
nbt.setInteger("sizeY", sizeY);
|
||||||
|
nbt.setInteger("sizeZ", sizeZ);
|
||||||
|
|
||||||
|
nbt.setIntArray("blocks", blacklist.stream().mapToInt(b -> Block.getIdFromBlock(b.getKey())).toArray());
|
||||||
|
nbt.setIntArray("metas", blacklist.stream().mapToInt(b -> b.getValue()).toArray());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean hasPermission(EntityPlayer player) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void receiveControl(NBTTagCompound data) {}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void receiveControl(EntityPlayer player, NBTTagCompound nbt) {
|
||||||
|
readFromNBT(nbt);
|
||||||
|
markDirty();
|
||||||
|
|
||||||
|
if(nbt.getBoolean("save")) {
|
||||||
|
saveStructure(player);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(nbt.getBoolean("load")) {
|
||||||
|
loadStructure(player);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public AxisAlignedBB getRenderBoundingBox() {
|
||||||
|
return INFINITE_EXTENT_AABB;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public double getMaxRenderDistanceSquared() {
|
||||||
|
return 65536.0D;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public static class GuiStructureSave extends GuiScreen {
|
||||||
|
|
||||||
|
private final TileEntityWandStructure tile;
|
||||||
|
|
||||||
|
private GuiTextField textName;
|
||||||
|
|
||||||
|
private GuiTextField textSizeX;
|
||||||
|
private GuiTextField textSizeY;
|
||||||
|
private GuiTextField textSizeZ;
|
||||||
|
|
||||||
|
private GuiButton performAction;
|
||||||
|
|
||||||
|
private boolean saveOnClose = false;
|
||||||
|
|
||||||
|
public GuiStructureSave(TileEntityWandStructure tile) {
|
||||||
|
this.tile = tile;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void initGui() {
|
||||||
|
Keyboard.enableRepeatEvents(true);
|
||||||
|
|
||||||
|
textName = new GuiTextField(fontRendererObj, width / 2 - 150, 50, 300, 20);
|
||||||
|
textName.setText(tile.name);
|
||||||
|
|
||||||
|
textSizeX = new GuiTextField(fontRendererObj, width / 2 - 150, 100, 50, 20);
|
||||||
|
textSizeX.setText("" + tile.sizeX);
|
||||||
|
textSizeY = new GuiTextField(fontRendererObj, width / 2 - 100, 100, 50, 20);
|
||||||
|
textSizeY.setText("" + tile.sizeY);
|
||||||
|
textSizeZ = new GuiTextField(fontRendererObj, width / 2 - 50, 100, 50, 20);
|
||||||
|
textSizeZ.setText("" + tile.sizeZ);
|
||||||
|
|
||||||
|
performAction = new GuiButton(0, width / 2 - 150, 150, 300, 20, "SAVE");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void drawScreen(int mouseX, int mouseY, float partialTicks) {
|
||||||
|
drawDefaultBackground();
|
||||||
|
|
||||||
|
textName.drawTextBox();
|
||||||
|
|
||||||
|
textSizeX.drawTextBox();
|
||||||
|
textSizeY.drawTextBox();
|
||||||
|
textSizeZ.drawTextBox();
|
||||||
|
|
||||||
|
performAction.drawButton(mc, mouseX, mouseY);
|
||||||
|
|
||||||
|
super.drawScreen(mouseX, mouseY, partialTicks);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onGuiClosed() {
|
||||||
|
Keyboard.enableRepeatEvents(false);
|
||||||
|
|
||||||
|
NBTTagCompound data = new NBTTagCompound();
|
||||||
|
tile.writeToNBT(data);
|
||||||
|
|
||||||
|
data.setString("name", textName.getText());
|
||||||
|
|
||||||
|
try { data.setInteger("sizeX", Integer.parseInt(textSizeX.getText())); } catch (Exception ex) {}
|
||||||
|
try { data.setInteger("sizeY", Integer.parseInt(textSizeY.getText())); } catch (Exception ex) {}
|
||||||
|
try { data.setInteger("sizeZ", Integer.parseInt(textSizeZ.getText())); } catch (Exception ex) {}
|
||||||
|
|
||||||
|
if(saveOnClose) data.setBoolean("save", true);
|
||||||
|
|
||||||
|
PacketDispatcher.wrapper.sendToServer(new NBTControlPacket(data, tile.xCoord, tile.yCoord, tile.zCoord));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void keyTyped(char typedChar, int keyCode) {
|
||||||
|
super.keyTyped(typedChar, keyCode);
|
||||||
|
|
||||||
|
textName.textboxKeyTyped(typedChar, keyCode);
|
||||||
|
|
||||||
|
textSizeX.textboxKeyTyped(typedChar, keyCode);
|
||||||
|
textSizeY.textboxKeyTyped(typedChar, keyCode);
|
||||||
|
textSizeZ.textboxKeyTyped(typedChar, keyCode);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void mouseClicked(int mouseX, int mouseY, int mouseButton) {
|
||||||
|
super.mouseClicked(mouseX, mouseY, mouseButton);
|
||||||
|
textName.mouseClicked(mouseX, mouseY, mouseButton);
|
||||||
|
|
||||||
|
textSizeX.mouseClicked(mouseX, mouseY, mouseButton);
|
||||||
|
textSizeY.mouseClicked(mouseX, mouseY, mouseButton);
|
||||||
|
textSizeZ.mouseClicked(mouseX, mouseY, mouseButton);
|
||||||
|
|
||||||
|
if(performAction.mousePressed(mc, mouseX, mouseY)) {
|
||||||
|
saveOnClose = true;
|
||||||
|
|
||||||
|
mc.displayGuiScreen(null);
|
||||||
|
mc.setIngameFocus();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean doesGuiPauseGame() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public static class GuiStructureLoad extends GuiScreen {
|
||||||
|
|
||||||
|
private final TileEntityWandStructure tile;
|
||||||
|
|
||||||
|
private GuiTextField textName;
|
||||||
|
|
||||||
|
private GuiFileList fileList;
|
||||||
|
|
||||||
|
private GuiButton performAction;
|
||||||
|
|
||||||
|
private boolean loadOnClose = false;
|
||||||
|
|
||||||
|
private static File structureDirectory = new File(Minecraft.getMinecraft().mcDataDir, "structures");
|
||||||
|
private static String nameFilter = "";
|
||||||
|
private static final FileFilter structureFilter = new FileFilter() {
|
||||||
|
|
||||||
|
public boolean accept(File file) {
|
||||||
|
if(!file.isFile() || !file.getName().endsWith(".nbt")) return false;
|
||||||
|
return nameFilter.isEmpty() || file.getName().contains(nameFilter);
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
public GuiStructureLoad(TileEntityWandStructure tile) {
|
||||||
|
this.tile = tile;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void initGui() {
|
||||||
|
Keyboard.enableRepeatEvents(true);
|
||||||
|
|
||||||
|
textName = new GuiTextField(fontRendererObj, width / 2 - 150, 50, 300, 20);
|
||||||
|
textName.setText(tile.name);
|
||||||
|
nameFilter = tile.name;
|
||||||
|
|
||||||
|
structureDirectory.mkdir();
|
||||||
|
|
||||||
|
fileList = new GuiFileList(mc, structureDirectory.listFiles(structureFilter), this::selectFile, nameFilter, width, height, 70, height - 90, 16);
|
||||||
|
|
||||||
|
performAction = new GuiButton(0, width / 2 - 150, height - 70, 300, 20, "LOAD");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void selectFile(File file) {
|
||||||
|
String fileName = file.getName();
|
||||||
|
textName.setText(fileName.substring(0, fileName.length() - 4));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void drawScreen(int mouseX, int mouseY, float partialTicks) {
|
||||||
|
fileList.drawScreen(mouseX, mouseY, partialTicks);
|
||||||
|
|
||||||
|
textName.drawTextBox();
|
||||||
|
|
||||||
|
performAction.drawButton(mc, mouseX, mouseY);
|
||||||
|
|
||||||
|
super.drawScreen(mouseX, mouseY, partialTicks);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onGuiClosed() {
|
||||||
|
Keyboard.enableRepeatEvents(false);
|
||||||
|
|
||||||
|
NBTTagCompound data = new NBTTagCompound();
|
||||||
|
tile.writeToNBT(data);
|
||||||
|
|
||||||
|
data.setString("name", textName.getText());
|
||||||
|
|
||||||
|
if(loadOnClose) data.setBoolean("load", true);
|
||||||
|
|
||||||
|
PacketDispatcher.wrapper.sendToServer(new NBTControlPacket(data, tile.xCoord, tile.yCoord, tile.zCoord));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void keyTyped(char typedChar, int keyCode) {
|
||||||
|
super.keyTyped(typedChar, keyCode);
|
||||||
|
|
||||||
|
textName.textboxKeyTyped(typedChar, keyCode);
|
||||||
|
|
||||||
|
if(!nameFilter.equals(textName.getText())) {
|
||||||
|
nameFilter = textName.getText();
|
||||||
|
fileList = new GuiFileList(mc, structureDirectory.listFiles(structureFilter), this::selectFile, nameFilter, width, height, 70, height - 90, 16);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void mouseClicked(int mouseX, int mouseY, int mouseButton) {
|
||||||
|
super.mouseClicked(mouseX, mouseY, mouseButton);
|
||||||
|
textName.mouseClicked(mouseX, mouseY, mouseButton);
|
||||||
|
|
||||||
|
fileList.func_148179_a(mouseX, mouseY, mouseButton);
|
||||||
|
|
||||||
|
fileList.select(textName.getText());
|
||||||
|
|
||||||
|
if(performAction.mousePressed(mc, mouseX, mouseY)) {
|
||||||
|
loadOnClose = true;
|
||||||
|
|
||||||
|
mc.displayGuiScreen(null);
|
||||||
|
mc.setIngameFocus();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void mouseMovedOrUp(int mouseX, int mouseY, int state) {
|
||||||
|
super.mouseMovedOrUp(mouseX, mouseY, state);
|
||||||
|
fileList.func_148181_b(mouseX, mouseY, state);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean doesGuiPauseGame() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -44,7 +44,6 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.init.Items;
|
import net.minecraft.init.Items;
|
||||||
import net.minecraft.inventory.Container;
|
import net.minecraft.inventory.Container;
|
||||||
import net.minecraft.item.ItemBlock;
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
@ -175,10 +174,10 @@ public class BlockWandTandem extends BlockContainer implements IBlockSideRotatio
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!player.isSneaking()) {
|
if(!player.isSneaking()) {
|
||||||
Block block = getBlock(world, player.getHeldItem());
|
Block block = ModBlocks.getBlockFromStack(player.getHeldItem());
|
||||||
if(block == ModBlocks.wand_air) block = Blocks.air;
|
if(block == ModBlocks.wand_air) block = Blocks.air;
|
||||||
|
|
||||||
if(block != null && block != ModBlocks.wand_jigsaw && block != ModBlocks.wand_loot) {
|
if(block != null && !ModBlocks.isStructureBlock(block, false)) {
|
||||||
jigsaw.replaceBlock = block;
|
jigsaw.replaceBlock = block;
|
||||||
jigsaw.replaceMeta = player.getHeldItem().getItemDamage();
|
jigsaw.replaceMeta = player.getHeldItem().getItemDamage();
|
||||||
jigsaw.markDirty();
|
jigsaw.markDirty();
|
||||||
@ -196,13 +195,6 @@ public class BlockWandTandem extends BlockContainer implements IBlockSideRotatio
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Block getBlock(World world, ItemStack stack) {
|
|
||||||
if(stack == null) return null;
|
|
||||||
if(!(stack.getItem() instanceof ItemBlock)) return null;
|
|
||||||
|
|
||||||
return ((ItemBlock) stack.getItem()).field_150939_a;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public Object provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
public Object provideGUI(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||||
|
|||||||
@ -79,7 +79,7 @@ public class TritiumLamp extends Block implements ISpotlight {
|
|||||||
private void updateBeam(World world, int x, int y, int z) {
|
private void updateBeam(World world, int x, int y, int z) {
|
||||||
if(!isOn) return;
|
if(!isOn) return;
|
||||||
|
|
||||||
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) Spotlight.propagateBeam(world, x, y, z, dir, getBeamLength());
|
for(ForgeDirection dir : ForgeDirection.VALID_DIRECTIONS) Spotlight.propagateBeam(world, x, y, z, dir, getBeamLength(), getMeta());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -98,6 +98,12 @@ public class TritiumLamp extends Block implements ISpotlight {
|
|||||||
return new ItemStack(getOff());
|
return new ItemStack(getOff());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected int getMeta() {
|
||||||
|
if(this == ModBlocks.lamp_tritium_green_off || this == ModBlocks.lamp_tritium_green_on) return Spotlight.META_GREEN;
|
||||||
|
if(this == ModBlocks.lamp_tritium_blue_off || this == ModBlocks.lamp_tritium_blue_on) return Spotlight.META_BLUE;
|
||||||
|
return Spotlight.META_YELLOW;
|
||||||
|
}
|
||||||
|
|
||||||
protected Block getOff() {
|
protected Block getOff() {
|
||||||
if(this == ModBlocks.lamp_tritium_green_on) return ModBlocks.lamp_tritium_green_off;
|
if(this == ModBlocks.lamp_tritium_green_on) return ModBlocks.lamp_tritium_green_off;
|
||||||
if(this == ModBlocks.lamp_tritium_blue_on) return ModBlocks.lamp_tritium_blue_off;
|
if(this == ModBlocks.lamp_tritium_blue_on) return ModBlocks.lamp_tritium_blue_off;
|
||||||
|
|||||||
@ -0,0 +1,13 @@
|
|||||||
|
package com.hbm.blocks.machine;
|
||||||
|
|
||||||
|
import com.hbm.blocks.generic.BlockToolConversion;
|
||||||
|
|
||||||
|
import net.minecraft.block.material.Material;
|
||||||
|
|
||||||
|
public class BlockFusionComponent extends BlockToolConversion {
|
||||||
|
|
||||||
|
public BlockFusionComponent() {
|
||||||
|
super(Material.iron);
|
||||||
|
this.addVariant(".bscco_welded", ".blanket", ".motor");
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,16 @@
|
|||||||
|
package com.hbm.blocks.machine;
|
||||||
|
|
||||||
|
import com.hbm.tileentity.machine.TileEntityFusionTorusStruct;
|
||||||
|
|
||||||
|
import net.minecraft.block.BlockContainer;
|
||||||
|
import net.minecraft.block.material.Material;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public class BlockFusionTorusStruct extends BlockContainer {
|
||||||
|
|
||||||
|
public BlockFusionTorusStruct(Material mat) { super(mat); }
|
||||||
|
|
||||||
|
@Override public TileEntity createNewTileEntity(World world, int meta) { return new TileEntityFusionTorusStruct(); }
|
||||||
|
@Override public boolean isOpaqueCube() { return false; }
|
||||||
|
}
|
||||||
@ -1,25 +0,0 @@
|
|||||||
package com.hbm.blocks.machine;
|
|
||||||
|
|
||||||
import com.hbm.tileentity.machine.TileEntityITERStruct;
|
|
||||||
|
|
||||||
import net.minecraft.block.BlockContainer;
|
|
||||||
import net.minecraft.block.material.Material;
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
|
|
||||||
public class BlockITERStruct extends BlockContainer {
|
|
||||||
|
|
||||||
public BlockITERStruct(Material mat) {
|
|
||||||
super(mat);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public TileEntity createNewTileEntity(World world, int meta) {
|
|
||||||
return new TileEntityITERStruct();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isOpaqueCube() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -33,6 +33,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.EnumChatFormatting;
|
import net.minecraft.util.EnumChatFormatting;
|
||||||
import net.minecraft.util.IIcon;
|
import net.minecraft.util.IIcon;
|
||||||
|
import net.minecraft.util.MathHelper;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre;
|
import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre;
|
||||||
|
|
||||||
@ -40,7 +41,8 @@ public class BlockMassStorage extends BlockContainer implements IBlockMulti, ILo
|
|||||||
|
|
||||||
@SideOnly(Side.CLIENT) private IIcon[] iconTop;
|
@SideOnly(Side.CLIENT) private IIcon[] iconTop;
|
||||||
@SideOnly(Side.CLIENT) private IIcon[] iconSide;
|
@SideOnly(Side.CLIENT) private IIcon[] iconSide;
|
||||||
|
@SideOnly(Side.CLIENT) private IIcon[] iconFront;
|
||||||
|
|
||||||
public BlockMassStorage() {
|
public BlockMassStorage() {
|
||||||
super(Material.iron);
|
super(Material.iron);
|
||||||
}
|
}
|
||||||
@ -50,15 +52,23 @@ public class BlockMassStorage extends BlockContainer implements IBlockMulti, ILo
|
|||||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||||
this.iconTop = new IIcon[4];
|
this.iconTop = new IIcon[4];
|
||||||
this.iconSide = new IIcon[4];
|
this.iconSide = new IIcon[4];
|
||||||
|
this.iconFront = new IIcon[4];
|
||||||
|
|
||||||
this.iconTop[0] = iconRegister.registerIcon(RefStrings.MODID + ":mass_storage_top_iron");
|
this.iconTop[0] = iconRegister.registerIcon(RefStrings.MODID + ":mass_storage_top_iron");
|
||||||
this.iconSide[0] = iconRegister.registerIcon(RefStrings.MODID + ":mass_storage_side_iron");
|
this.iconSide[0] = iconRegister.registerIcon(RefStrings.MODID + ":mass_storage_side_iron");
|
||||||
|
this.iconFront[0] = iconRegister.registerIcon(RefStrings.MODID + ":mass_storage_front_iron");
|
||||||
|
|
||||||
this.iconTop[1] = iconRegister.registerIcon(RefStrings.MODID + ":mass_storage_top_desh");
|
this.iconTop[1] = iconRegister.registerIcon(RefStrings.MODID + ":mass_storage_top_desh");
|
||||||
this.iconSide[1] = iconRegister.registerIcon(RefStrings.MODID + ":mass_storage_side_desh");
|
this.iconSide[1] = iconRegister.registerIcon(RefStrings.MODID + ":mass_storage_side_desh");
|
||||||
|
this.iconFront[1] = iconRegister.registerIcon(RefStrings.MODID + ":mass_storage_front_desh");
|
||||||
|
|
||||||
this.iconTop[2] = iconRegister.registerIcon(RefStrings.MODID + ":mass_storage_top");
|
this.iconTop[2] = iconRegister.registerIcon(RefStrings.MODID + ":mass_storage_top");
|
||||||
this.iconSide[2] = iconRegister.registerIcon(RefStrings.MODID + ":mass_storage_side");
|
this.iconSide[2] = iconRegister.registerIcon(RefStrings.MODID + ":mass_storage_side");
|
||||||
|
this.iconFront[2] = iconRegister.registerIcon(RefStrings.MODID + ":mass_storage_front");
|
||||||
|
|
||||||
this.iconTop[3] = iconRegister.registerIcon(RefStrings.MODID + ":mass_storage_top_wood");
|
this.iconTop[3] = iconRegister.registerIcon(RefStrings.MODID + ":mass_storage_top_wood");
|
||||||
this.iconSide[3] = iconRegister.registerIcon(RefStrings.MODID + ":mass_storage_side_wood");
|
this.iconSide[3] = iconRegister.registerIcon(RefStrings.MODID + ":mass_storage_side_wood");
|
||||||
|
this.iconFront[3] = iconRegister.registerIcon(RefStrings.MODID + ":mass_storage_front_wood");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -74,20 +84,24 @@ public class BlockMassStorage extends BlockContainer implements IBlockMulti, ILo
|
|||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public IIcon getIcon(int side, int metadata) {
|
public IIcon getIcon(int side, int metadata) {
|
||||||
int meta = this.rectify(metadata);
|
int meta = this.rectify(metadata);
|
||||||
return side == 1 ? this.iconTop[meta] : (side == 0 ? this.iconTop[meta] : this.iconSide[meta]);
|
int dir = (metadata / getSubCount()) + 2;
|
||||||
|
if(side == 0 || side == 1) return iconTop[meta];
|
||||||
|
if(side == dir) return iconFront[meta];
|
||||||
|
return iconSide[meta];
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int damageDropped(int meta) {
|
public int damageDropped(int meta) {
|
||||||
return meta;
|
return rectify(meta);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TileEntity createNewTileEntity(World world, int meta) {
|
public TileEntity createNewTileEntity(World world, int meta) {
|
||||||
return new TileEntityMassStorage(getCapacity(meta));
|
return new TileEntityMassStorage(getCapacity(meta));
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getCapacity(int meta) {
|
public int getCapacity(int meta) {
|
||||||
|
meta = rectify(meta);
|
||||||
return meta == 3 ? 100 : meta == 0 ? 10_000 : meta == 1 ? 100_000 : meta == 2 ? 1_000_000 : 0;
|
return meta == 3 ? 100 : meta == 0 ? 10_000 : meta == 1 ? 100_000 : meta == 2 ? 1_000_000 : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -108,121 +122,129 @@ public class BlockMassStorage extends BlockContainer implements IBlockMulti, ILo
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static boolean dropInv = true;
|
private static boolean dropInv = true;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean removedByPlayer(World world, EntityPlayer player, int x, int y, int z, boolean willHarvest) {
|
public boolean removedByPlayer(World world, EntityPlayer player, int x, int y, int z, boolean willHarvest) {
|
||||||
|
|
||||||
if(!player.capabilities.isCreativeMode && !world.isRemote && willHarvest) {
|
if(!player.capabilities.isCreativeMode && !world.isRemote && willHarvest) {
|
||||||
|
|
||||||
ItemStack drop = new ItemStack(this, 1, world.getBlockMetadata(x, y, z));
|
ItemStack drop = new ItemStack(this, 1, rectify(world.getBlockMetadata(x, y, z)));
|
||||||
ISidedInventory inv = (ISidedInventory)world.getTileEntity(x, y, z);
|
ISidedInventory inv = (ISidedInventory)world.getTileEntity(x, y, z);
|
||||||
|
|
||||||
NBTTagCompound nbt = new NBTTagCompound();
|
NBTTagCompound nbt = new NBTTagCompound();
|
||||||
|
|
||||||
if(inv != null) {
|
if(inv != null) {
|
||||||
|
|
||||||
for(int i = 0; i < inv.getSizeInventory(); i++) {
|
for(int i = 0; i < inv.getSizeInventory(); i++) {
|
||||||
|
|
||||||
ItemStack stack = inv.getStackInSlot(i);
|
ItemStack stack = inv.getStackInSlot(i);
|
||||||
if(stack == null)
|
if(stack == null)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
NBTTagCompound slot = new NBTTagCompound();
|
NBTTagCompound slot = new NBTTagCompound();
|
||||||
stack.writeToNBT(slot);
|
stack.writeToNBT(slot);
|
||||||
nbt.setTag("slot" + i, slot);
|
nbt.setTag("slot" + i, slot);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(inv instanceof TileEntityLockableBase) {
|
if(inv instanceof TileEntityLockableBase) {
|
||||||
TileEntityLockableBase lockable = (TileEntityLockableBase) inv;
|
TileEntityLockableBase lockable = (TileEntityLockableBase) inv;
|
||||||
|
|
||||||
if(lockable.isLocked()) {
|
if(lockable.isLocked()) {
|
||||||
nbt.setInteger("lock", lockable.getPins());
|
nbt.setInteger("lock", lockable.getPins());
|
||||||
nbt.setDouble("lockMod", lockable.getMod());
|
nbt.setDouble("lockMod", lockable.getMod());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(inv instanceof TileEntityMassStorage && nbt.func_150296_c().size() > 0) {
|
if(inv instanceof TileEntityMassStorage && nbt.func_150296_c().size() > 0) {
|
||||||
TileEntityMassStorage storage = (TileEntityMassStorage) inv;
|
TileEntityMassStorage storage = (TileEntityMassStorage) inv;
|
||||||
nbt.setInteger("stack", storage.getStockpile());
|
nbt.setInteger("stack", storage.getStockpile());
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!nbt.hasNoTags()) {
|
if(!nbt.hasNoTags()) {
|
||||||
drop.stackTagCompound = nbt;
|
drop.stackTagCompound = nbt;
|
||||||
}
|
}
|
||||||
|
|
||||||
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, drop));
|
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, drop));
|
||||||
}
|
}
|
||||||
|
|
||||||
dropInv = false;
|
dropInv = false;
|
||||||
boolean flag = world.setBlockToAir(x, y, z);
|
boolean flag = world.setBlockToAir(x, y, z);
|
||||||
dropInv = true;
|
dropInv = true;
|
||||||
|
|
||||||
return flag;
|
return flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack stack) {
|
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack stack) {
|
||||||
|
|
||||||
ISidedInventory inv = (ISidedInventory)world.getTileEntity(x, y, z);
|
ISidedInventory inv = (ISidedInventory)world.getTileEntity(x, y, z);
|
||||||
|
|
||||||
if(inv != null && stack.hasTagCompound()) {
|
if(inv != null && stack.hasTagCompound()) {
|
||||||
|
|
||||||
for(int i = 0; i < inv.getSizeInventory(); i++) {
|
for(int i = 0; i < inv.getSizeInventory(); i++) {
|
||||||
inv.setInventorySlotContents(i, ItemStack.loadItemStackFromNBT(stack.stackTagCompound.getCompoundTag("slot" + i)));
|
inv.setInventorySlotContents(i, ItemStack.loadItemStackFromNBT(stack.stackTagCompound.getCompoundTag("slot" + i)));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(inv instanceof TileEntityMassStorage) {
|
if(inv instanceof TileEntityMassStorage) {
|
||||||
TileEntityMassStorage storage = (TileEntityMassStorage) inv;
|
TileEntityMassStorage storage = (TileEntityMassStorage) inv;
|
||||||
|
|
||||||
if(stack.stackTagCompound.hasKey("lock")) {
|
if(stack.stackTagCompound.hasKey("lock")) {
|
||||||
storage.setPins(stack.stackTagCompound.getInteger("lock"));
|
storage.setPins(stack.stackTagCompound.getInteger("lock"));
|
||||||
storage.setMod(stack.stackTagCompound.getDouble("lockMod"));
|
storage.setMod(stack.stackTagCompound.getDouble("lockMod"));
|
||||||
storage.lock();
|
storage.lock();
|
||||||
}
|
}
|
||||||
|
|
||||||
storage.setStockpile(stack.stackTagCompound.getInteger("stack"));
|
storage.setStockpile(stack.stackTagCompound.getInteger("stack"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
super.onBlockPlacedBy(world, x, y, z, player, stack);
|
super.onBlockPlacedBy(world, x, y, z, player, stack);
|
||||||
|
|
||||||
|
int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3;
|
||||||
|
int meta = stack.getItemDamage();
|
||||||
|
|
||||||
|
if(i == 0) world.setBlockMetadataWithNotify(x, y, z, meta, 2);
|
||||||
|
if(i == 1) world.setBlockMetadataWithNotify(x, y, z, meta + 3 * getSubCount(), 2);
|
||||||
|
if(i == 2) world.setBlockMetadataWithNotify(x, y, z, meta + 1 * getSubCount(), 2);
|
||||||
|
if(i == 3) world.setBlockMetadataWithNotify(x, y, z, meta + 2 * getSubCount(), 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void breakBlock(World world, int x, int y, int z, Block block, int meta) {
|
public void breakBlock(World world, int x, int y, int z, Block block, int meta) {
|
||||||
|
|
||||||
if(dropInv) {
|
if(dropInv) {
|
||||||
ISidedInventory sided = (ISidedInventory) world.getTileEntity(x, y, z);
|
ISidedInventory sided = (ISidedInventory) world.getTileEntity(x, y, z);
|
||||||
Random rand = world.rand;
|
Random rand = world.rand;
|
||||||
|
|
||||||
if(sided != null) {
|
if(sided != null) {
|
||||||
for(int i1 = 0; i1 < sided.getSizeInventory(); ++i1) {
|
for(int i1 = 0; i1 < sided.getSizeInventory(); ++i1) {
|
||||||
|
|
||||||
if(i1 == 1) continue; //do NOT drop the filter item
|
if(i1 == 1) continue; //do NOT drop the filter item
|
||||||
|
|
||||||
ItemStack itemstack = sided.getStackInSlot(i1);
|
ItemStack itemstack = sided.getStackInSlot(i1);
|
||||||
|
|
||||||
if(itemstack != null) {
|
if(itemstack != null) {
|
||||||
float f = rand.nextFloat() * 0.8F + 0.1F;
|
float f = rand.nextFloat() * 0.8F + 0.1F;
|
||||||
float f1 = rand.nextFloat() * 0.8F + 0.1F;
|
float f1 = rand.nextFloat() * 0.8F + 0.1F;
|
||||||
float f2 = rand.nextFloat() * 0.8F + 0.1F;
|
float f2 = rand.nextFloat() * 0.8F + 0.1F;
|
||||||
|
|
||||||
while(itemstack.stackSize > 0) {
|
while(itemstack.stackSize > 0) {
|
||||||
int j1 = rand.nextInt(21) + 10;
|
int j1 = rand.nextInt(21) + 10;
|
||||||
|
|
||||||
if(j1 > itemstack.stackSize) {
|
if(j1 > itemstack.stackSize) {
|
||||||
j1 = itemstack.stackSize;
|
j1 = itemstack.stackSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
itemstack.stackSize -= j1;
|
itemstack.stackSize -= j1;
|
||||||
EntityItem entityitem = new EntityItem(world, x + f, y + f1, z + f2, new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage()));
|
EntityItem entityitem = new EntityItem(world, x + f, y + f1, z + f2, new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage()));
|
||||||
|
|
||||||
if(itemstack.hasTagCompound()) {
|
if(itemstack.hasTagCompound()) {
|
||||||
entityitem.getEntityItem().setTagCompound((NBTTagCompound) itemstack.getTagCompound().copy());
|
entityitem.getEntityItem().setTagCompound((NBTTagCompound) itemstack.getTagCompound().copy());
|
||||||
}
|
}
|
||||||
|
|
||||||
float f3 = 0.05F;
|
float f3 = 0.05F;
|
||||||
entityitem.motionX = (float) rand.nextGaussian() * f3;
|
entityitem.motionX = (float) rand.nextGaussian() * f3;
|
||||||
entityitem.motionY = (float) rand.nextGaussian() * f3 + 0.2F;
|
entityitem.motionY = (float) rand.nextGaussian() * f3 + 0.2F;
|
||||||
@ -231,7 +253,7 @@ public class BlockMassStorage extends BlockContainer implements IBlockMulti, ILo
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
world.func_147453_f(x, y, z, block);
|
world.func_147453_f(x, y, z, block);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -251,51 +273,51 @@ public class BlockMassStorage extends BlockContainer implements IBlockMulti, ILo
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void printHook(Pre event, World world, int x, int y, int z) {
|
public void printHook(Pre event, World world, int x, int y, int z) {
|
||||||
|
|
||||||
TileEntity te = world.getTileEntity(x, y, z);
|
TileEntity te = world.getTileEntity(x, y, z);
|
||||||
|
|
||||||
if(!(te instanceof TileEntityMassStorage))
|
if(!(te instanceof TileEntityMassStorage))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
TileEntityMassStorage storage = (TileEntityMassStorage) te;
|
TileEntityMassStorage storage = (TileEntityMassStorage) te;
|
||||||
|
|
||||||
List<String> text = new ArrayList();
|
List<String> text = new ArrayList();
|
||||||
String title = "Empty";
|
String title = "Empty";
|
||||||
boolean full = storage.type != null;
|
boolean full = storage.type != null;
|
||||||
|
|
||||||
if(full) {
|
if(full) {
|
||||||
|
|
||||||
title = storage.type.getDisplayName();
|
title = storage.type.getDisplayName();
|
||||||
text.add(String.format(Locale.US, "%,d", storage.getStockpile()) + " / " + String.format(Locale.US, "%,d", storage.getCapacity()));
|
text.add(String.format(Locale.US, "%,d", storage.getStockpile()) + " / " + String.format(Locale.US, "%,d", storage.getCapacity()));
|
||||||
|
|
||||||
double percent = (double) storage.getStockpile() / (double) storage.getCapacity();
|
double percent = (double) storage.getStockpile() / (double) storage.getCapacity();
|
||||||
int charge = (int) Math.floor(percent * 10_000D);
|
int charge = (int) Math.floor(percent * 10_000D);
|
||||||
int color = ((int) (0xFF - 0xFF * percent)) << 16 | ((int)(0xFF * percent) << 8);
|
int color = ((int) (0xFF - 0xFF * percent)) << 16 | ((int)(0xFF * percent) << 8);
|
||||||
|
|
||||||
text.add("&[" + color + "&]" + (charge / 100D) + "%");
|
text.add("&[" + color + "&]" + (charge / 100D) + "%");
|
||||||
}
|
}
|
||||||
|
|
||||||
ILookOverlay.printGeneric(event, title, full ? 0xffff00 : 0x00ffff, full ? 0x404000 : 0x004040, text);
|
ILookOverlay.printGeneric(event, title, full ? 0xffff00 : 0x00ffff, full ? 0x404000 : 0x004040, text);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||||
|
|
||||||
if(!stack.hasTagCompound()) return;
|
if(!stack.hasTagCompound()) return;
|
||||||
|
|
||||||
ItemStack type = ItemStack.loadItemStackFromNBT(stack.stackTagCompound.getCompoundTag("slot1"));
|
ItemStack type = ItemStack.loadItemStackFromNBT(stack.stackTagCompound.getCompoundTag("slot1"));
|
||||||
|
|
||||||
if(type != null) {
|
if(type != null) {
|
||||||
list.add(EnumChatFormatting.GOLD + type.getDisplayName());
|
list.add(EnumChatFormatting.GOLD + type.getDisplayName());
|
||||||
list.add(String.format(Locale.US, "%,d", stack.stackTagCompound.getInteger("stack")) + " / " + String.format(Locale.US, "%,d", getCapacity(stack.getItemDamage())));
|
list.add(String.format(Locale.US, "%,d", stack.stackTagCompound.getInteger("stack")) + " / " + String.format(Locale.US, "%,d", getCapacity(stack.getItemDamage())));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean hasComparatorInputOverride() {
|
public boolean hasComparatorInputOverride() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getComparatorInputOverride(World world, int x, int y, int z, int side) {
|
public int getComparatorInputOverride(World world, int x, int y, int z, int side) {
|
||||||
return ((TileEntityMassStorage) world.getTileEntity(x, y, z)).redstone;
|
return ((TileEntityMassStorage) world.getTileEntity(x, y, z)).redstone;
|
||||||
|
|||||||
@ -1,52 +0,0 @@
|
|||||||
package com.hbm.blocks.machine;
|
|
||||||
|
|
||||||
import com.hbm.tileentity.machine.TileEntityPlasmaStruct;
|
|
||||||
|
|
||||||
import net.minecraft.block.BlockContainer;
|
|
||||||
import net.minecraft.block.material.Material;
|
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
|
||||||
import net.minecraft.util.MathHelper;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
|
|
||||||
public class BlockPlasmaStruct extends BlockContainer {
|
|
||||||
|
|
||||||
public BlockPlasmaStruct(Material mat) {
|
|
||||||
super(mat);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public TileEntity createNewTileEntity(World world, int meta) {
|
|
||||||
return new TileEntityPlasmaStruct();
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean isOpaqueCube() {
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) {
|
|
||||||
|
|
||||||
int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3;
|
|
||||||
|
|
||||||
if(i == 0)
|
|
||||||
{
|
|
||||||
world.setBlockMetadataWithNotify(x, y, z, 2, 2);
|
|
||||||
}
|
|
||||||
if(i == 1)
|
|
||||||
{
|
|
||||||
world.setBlockMetadataWithNotify(x, y, z, 5, 2);
|
|
||||||
}
|
|
||||||
if(i == 2)
|
|
||||||
{
|
|
||||||
world.setBlockMetadataWithNotify(x, y, z, 3, 2);
|
|
||||||
}
|
|
||||||
if(i == 3)
|
|
||||||
{
|
|
||||||
world.setBlockMetadataWithNotify(x, y, z, 4, 2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,6 +1,7 @@
|
|||||||
package com.hbm.blocks.machine;
|
package com.hbm.blocks.machine;
|
||||||
|
|
||||||
import com.hbm.tileentity.machine.TileEntityCharger;
|
import com.hbm.tileentity.machine.TileEntityCharger;
|
||||||
|
import com.hbm.world.gen.nbt.INBTBlockTransformable;
|
||||||
|
|
||||||
import net.minecraft.block.BlockContainer;
|
import net.minecraft.block.BlockContainer;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
@ -12,8 +13,8 @@ import net.minecraft.util.MathHelper;
|
|||||||
import net.minecraft.world.IBlockAccess;
|
import net.minecraft.world.IBlockAccess;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
public class Charger extends BlockContainer {
|
public class Charger extends BlockContainer implements INBTBlockTransformable {
|
||||||
|
|
||||||
public Charger(Material mat) {
|
public Charger(Material mat) {
|
||||||
super(mat);
|
super(mat);
|
||||||
}
|
}
|
||||||
@ -22,17 +23,17 @@ public class Charger extends BlockContainer {
|
|||||||
public TileEntity createNewTileEntity(World world, int meta) {
|
public TileEntity createNewTileEntity(World world, int meta) {
|
||||||
return new TileEntityCharger();
|
return new TileEntityCharger();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getRenderType(){
|
public int getRenderType(){
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isOpaqueCube() {
|
public boolean isOpaqueCube() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean renderAsNormalBlock() {
|
public boolean renderAsNormalBlock() {
|
||||||
return false;
|
return false;
|
||||||
@ -40,9 +41,9 @@ public class Charger extends BlockContainer {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) {
|
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) {
|
||||||
|
|
||||||
int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3;
|
int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3;
|
||||||
|
|
||||||
if(i == 0) {
|
if(i == 0) {
|
||||||
world.setBlockMetadataWithNotify(x, y, z, 2, 2);
|
world.setBlockMetadataWithNotify(x, y, z, 2, 2);
|
||||||
}
|
}
|
||||||
@ -60,13 +61,13 @@ public class Charger extends BlockContainer {
|
|||||||
@Override
|
@Override
|
||||||
public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) {
|
public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) {
|
||||||
float f = 0.0625F;
|
float f = 0.0625F;
|
||||||
|
|
||||||
switch(world.getBlockMetadata(x, y, z)) {
|
switch(world.getBlockMetadata(x, y, z)) {
|
||||||
case 2: this.setBlockBounds(5 * f, 0.25F, 12 * f, 11 * f, 0.75F, 1F); break;
|
case 2: this.setBlockBounds(5 * f, 0.25F, 12 * f, 11 * f, 0.75F, 1F); break;
|
||||||
case 3: this.setBlockBounds(5 * f, 0.25F, 0F, 11 * f, 0.75F, 4 * f); break;
|
case 3: this.setBlockBounds(5 * f, 0.25F, 0F, 11 * f, 0.75F, 4 * f); break;
|
||||||
case 4: this.setBlockBounds(12 * f, 0.25F, 5 * f, 1F, 0.75F, 11 * f); break;
|
case 4: this.setBlockBounds(12 * f, 0.25F, 5 * f, 1F, 0.75F, 11 * f); break;
|
||||||
case 5: this.setBlockBounds(0F, 0.25F, 5 * f, 4 * f, 0.75F, 11 * f); break;
|
case 5: this.setBlockBounds(0F, 0.25F, 5 * f, 4 * f, 0.75F, 11 * f); break;
|
||||||
default: this.setBlockBounds(5 * f, 0.25F, 5 * f, 11 * f, 0.75F, 11 * f); break;
|
default: this.setBlockBounds(5 * f, 0.25F, 5 * f, 11 * f, 0.75F, 11 * f); break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -75,4 +76,9 @@ public class Charger extends BlockContainer {
|
|||||||
this.setBlockBoundsBasedOnState(world, x, y, z);
|
this.setBlockBoundsBasedOnState(world, x, y, z);
|
||||||
return AxisAlignedBB.getBoundingBox(x + this.minX, y + this.minY, z + this.minZ, x + this.maxX, y + this.maxY, z + this.maxZ);
|
return AxisAlignedBB.getBoundingBox(x + this.minX, y + this.minY, z + this.minZ, x + this.maxX, y + this.maxY, z + this.maxZ);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int transformMeta(int meta, int coordBaseMode) {
|
||||||
|
return INBTBlockTransformable.transformMetaDeco(meta, coordBaseMode);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,12 +1,18 @@
|
|||||||
package com.hbm.blocks.machine;
|
package com.hbm.blocks.machine;
|
||||||
|
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
import com.hbm.main.MainRegistry;
|
import com.hbm.main.MainRegistry;
|
||||||
import com.hbm.tileentity.machine.TileEntityCore;
|
import com.hbm.tileentity.machine.TileEntityCore;
|
||||||
|
|
||||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.BlockContainer;
|
import net.minecraft.block.BlockContainer;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
|
import net.minecraft.entity.item.EntityItem;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
@ -50,5 +56,43 @@ public class CoreCore extends BlockContainer {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private Random rand = new Random();
|
||||||
|
|
||||||
|
// shitty copy pasted crap for the 50th time because i hate this block
|
||||||
|
@Override
|
||||||
|
public void breakBlock(World world, int x, int y, int z, Block b, int m) {
|
||||||
|
TileEntityCore core = (TileEntityCore) world.getTileEntity(x, y, z);
|
||||||
|
|
||||||
|
if(core != null) {
|
||||||
|
for(int i1 = 0; i1 < core.getSizeInventory(); ++i1) {
|
||||||
|
ItemStack itemstack = core.getStackInSlot(i1);
|
||||||
|
|
||||||
|
if(itemstack != null) {
|
||||||
|
float f = this.rand.nextFloat() * 0.8F + 0.1F;
|
||||||
|
float f1 = this.rand.nextFloat() * 0.8F + 0.1F;
|
||||||
|
float f2 = this.rand.nextFloat() * 0.8F + 0.1F;
|
||||||
|
|
||||||
|
while(itemstack.stackSize > 0) {
|
||||||
|
int j1 = this.rand.nextInt(21) + 10;
|
||||||
|
if(j1 > itemstack.stackSize) j1 = itemstack.stackSize;
|
||||||
|
|
||||||
|
itemstack.stackSize -= j1;
|
||||||
|
EntityItem entityitem = new EntityItem(world, x + f, y + f1, z + f2, new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage()));
|
||||||
|
if(itemstack.hasTagCompound()) entityitem.getEntityItem().setTagCompound((NBTTagCompound) itemstack.getTagCompound().copy());
|
||||||
|
|
||||||
|
float f3 = 0.05F;
|
||||||
|
entityitem.motionX = (float) this.rand.nextGaussian() * f3;
|
||||||
|
entityitem.motionY = (float) this.rand.nextGaussian() * f3 + 0.2F;
|
||||||
|
entityitem.motionZ = (float) this.rand.nextGaussian() * f3;
|
||||||
|
world.spawnEntityInWorld(entityitem);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
world.func_147453_f(x, y, z, b);
|
||||||
|
}
|
||||||
|
|
||||||
|
super.breakBlock(world, x, y, z, b, m);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,11 +4,17 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.hbm.blocks.ModBlocks;
|
import com.hbm.blocks.ModBlocks;
|
||||||
|
import com.hbm.inventory.material.NTMMaterial;
|
||||||
import com.hbm.inventory.material.Mats.MaterialStack;
|
import com.hbm.inventory.material.Mats.MaterialStack;
|
||||||
import com.hbm.items.machine.ItemScraps;
|
import com.hbm.items.machine.ItemScraps;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
import com.hbm.lib.RefStrings;
|
import com.hbm.lib.RefStrings;
|
||||||
import com.hbm.tileentity.machine.TileEntityFoundryChannel;
|
import com.hbm.tileentity.machine.TileEntityFoundryChannel;
|
||||||
|
import com.hbm.uninos.GenNode;
|
||||||
|
import com.hbm.uninos.INetworkProvider;
|
||||||
|
import com.hbm.uninos.networkproviders.FoundryNetwork;
|
||||||
|
import com.hbm.util.fauxpointtwelve.BlockPos;
|
||||||
|
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||||
|
|
||||||
import api.hbm.block.ICrucibleAcceptor;
|
import api.hbm.block.ICrucibleAcceptor;
|
||||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||||
@ -41,7 +47,7 @@ public class FoundryChannel extends BlockContainer implements ICrucibleAcceptor
|
|||||||
public FoundryChannel() {
|
public FoundryChannel() {
|
||||||
super(Material.rock);
|
super(Material.rock);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||||
@ -65,16 +71,16 @@ public class FoundryChannel extends BlockContainer implements ICrucibleAcceptor
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addCollisionBoxesToList(World world, int x, int y, int z, AxisAlignedBB entityBounding, List list, Entity entity) {
|
public void addCollisionBoxesToList(World world, int x, int y, int z, AxisAlignedBB entityBounding, List list, Entity entity) {
|
||||||
|
|
||||||
List<AxisAlignedBB> bbs = new ArrayList();
|
List<AxisAlignedBB> bbs = new ArrayList();
|
||||||
|
|
||||||
bbs.add(AxisAlignedBB.getBoundingBox(x + 0.3125D, y, z + 0.3125D, x + 0.6875D, y + 0.5D, z + 0.6875D));
|
bbs.add(AxisAlignedBB.getBoundingBox(x + 0.3125D, y, z + 0.3125D, x + 0.6875D, y + 0.5D, z + 0.6875D));
|
||||||
|
|
||||||
if(canConnectTo(world, x, y, z, Library.POS_X)) bbs.add(AxisAlignedBB.getBoundingBox(x + 0.6875D, y, z + 0.3125D, x + 1D, y + 0.5D, z + 0.6875D));
|
if(canConnectTo(world, x, y, z, Library.POS_X)) bbs.add(AxisAlignedBB.getBoundingBox(x + 0.6875D, y, z + 0.3125D, x + 1D, y + 0.5D, z + 0.6875D));
|
||||||
if(canConnectTo(world, x, y, z, Library.NEG_X)) bbs.add(AxisAlignedBB.getBoundingBox(x, y, z + 0.3125D, x + 0.3125D, y + 0.5D, z + 0.6875D));
|
if(canConnectTo(world, x, y, z, Library.NEG_X)) bbs.add(AxisAlignedBB.getBoundingBox(x, y, z + 0.3125D, x + 0.3125D, y + 0.5D, z + 0.6875D));
|
||||||
if(canConnectTo(world, x, y, z, Library.POS_Z)) bbs.add(AxisAlignedBB.getBoundingBox(x + 0.3125D, y, z + 0.6875D, x + 0.6875D, y + 0.5D, z + 1D));
|
if(canConnectTo(world, x, y, z, Library.POS_Z)) bbs.add(AxisAlignedBB.getBoundingBox(x + 0.3125D, y, z + 0.6875D, x + 0.6875D, y + 0.5D, z + 1D));
|
||||||
if(canConnectTo(world, x, y, z, Library.NEG_Z)) bbs.add(AxisAlignedBB.getBoundingBox(x + 0.3125D, y, z, x + 0.6875D, y + 0.5D, z + 0.3125D));
|
if(canConnectTo(world, x, y, z, Library.NEG_Z)) bbs.add(AxisAlignedBB.getBoundingBox(x + 0.3125D, y, z, x + 0.6875D, y + 0.5D, z + 0.3125D));
|
||||||
|
|
||||||
for(AxisAlignedBB bb : bbs) {
|
for(AxisAlignedBB bb : bbs) {
|
||||||
if(entityBounding.intersectsWith(bb)) {
|
if(entityBounding.intersectsWith(bb)) {
|
||||||
list.add(bb);
|
list.add(bb);
|
||||||
@ -120,23 +126,23 @@ public class FoundryChannel extends BlockContainer implements ICrucibleAcceptor
|
|||||||
public boolean canAcceptPartialFlow(World world, int x, int y, int z, ForgeDirection side, MaterialStack stack) {
|
public boolean canAcceptPartialFlow(World world, int x, int y, int z, ForgeDirection side, MaterialStack stack) {
|
||||||
return ((ICrucibleAcceptor) world.getTileEntity(x, y, z)).canAcceptPartialFlow(world, x, y, z, side, stack);
|
return ((ICrucibleAcceptor) world.getTileEntity(x, y, z)).canAcceptPartialFlow(world, x, y, z, side, stack);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public MaterialStack flow(World world, int x, int y, int z, ForgeDirection side, MaterialStack stack) {
|
public MaterialStack flow(World world, int x, int y, int z, ForgeDirection side, MaterialStack stack) {
|
||||||
return ((ICrucibleAcceptor) world.getTileEntity(x, y, z)).flow(world, x, y, z, side, stack);
|
return ((ICrucibleAcceptor) world.getTileEntity(x, y, z)).flow(world, x, y, z, side, stack);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean canConnectTo(IBlockAccess world, int x, int y, int z, ForgeDirection dir) {
|
public boolean canConnectTo(IBlockAccess world, int x, int y, int z, ForgeDirection dir) {
|
||||||
|
|
||||||
if(dir == ForgeDirection.UP || dir == ForgeDirection.DOWN || dir == ForgeDirection.UNKNOWN)
|
if(dir == ForgeDirection.UP || dir == ForgeDirection.DOWN || dir == ForgeDirection.UNKNOWN)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
Block b = world.getBlock(x + dir.offsetX, y, z + dir.offsetZ);
|
Block b = world.getBlock(x + dir.offsetX, y, z + dir.offsetZ);
|
||||||
int meta = world.getBlockMetadata(x + dir.offsetX, y, z + dir.offsetZ);
|
int meta = world.getBlockMetadata(x + dir.offsetX, y, z + dir.offsetZ);
|
||||||
|
|
||||||
if((b == ModBlocks.foundry_outlet || b == ModBlocks.foundry_slagtap) && meta == dir.ordinal())
|
if((b == ModBlocks.foundry_outlet || b == ModBlocks.foundry_slagtap) && meta == dir.ordinal())
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
return b == ModBlocks.foundry_channel || b == ModBlocks.foundry_mold;
|
return b == ModBlocks.foundry_channel || b == ModBlocks.foundry_mold;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -146,25 +152,25 @@ public class FoundryChannel extends BlockContainer implements ICrucibleAcceptor
|
|||||||
public int getRenderType() {
|
public int getRenderType() {
|
||||||
return renderID;
|
return renderID;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isOpaqueCube() {
|
public boolean isOpaqueCube() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean renderAsNormalBlock() {
|
public boolean renderAsNormalBlock() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||||
if(world.isRemote) {
|
if(world.isRemote) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
TileEntityFoundryChannel cast = (TileEntityFoundryChannel) world.getTileEntity(x, y, z);
|
TileEntityFoundryChannel cast = (TileEntityFoundryChannel) world.getTileEntity(x, y, z);
|
||||||
|
|
||||||
if(player.getHeldItem() != null && player.getHeldItem().getItem() instanceof ItemTool && ((ItemTool) player.getHeldItem().getItem()).getToolClasses(player.getHeldItem()).contains("shovel")) {
|
if(player.getHeldItem() != null && player.getHeldItem().getItem() instanceof ItemTool && ((ItemTool) player.getHeldItem().getItem()).getToolClasses(player.getHeldItem()).contains("shovel")) {
|
||||||
if(cast.amount > 0) {
|
if(cast.amount > 0) {
|
||||||
ItemStack scrap = ItemScraps.create(new MaterialStack(cast.type, cast.amount));
|
ItemStack scrap = ItemScraps.create(new MaterialStack(cast.type, cast.amount));
|
||||||
@ -176,19 +182,18 @@ public class FoundryChannel extends BlockContainer implements ICrucibleAcceptor
|
|||||||
}
|
}
|
||||||
cast.amount = 0;
|
cast.amount = 0;
|
||||||
cast.type = null;
|
cast.type = null;
|
||||||
cast.propagateMaterial(null);
|
|
||||||
cast.markDirty();
|
cast.markDirty();
|
||||||
world.markBlockForUpdate(x, y, z);
|
world.markBlockForUpdate(x, y, z);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void breakBlock(World world, int x, int y, int z, Block b, int i) {
|
public void breakBlock(World world, int x, int y, int z, Block b, int i) {
|
||||||
|
|
||||||
TileEntityFoundryChannel channel = (TileEntityFoundryChannel) world.getTileEntity(x, y, z);
|
TileEntityFoundryChannel channel = (TileEntityFoundryChannel) world.getTileEntity(x, y, z);
|
||||||
if(channel.amount > 0) {
|
if(channel.amount > 0) {
|
||||||
ItemStack scrap = ItemScraps.create(new MaterialStack(channel.type, channel.amount));
|
ItemStack scrap = ItemScraps.create(new MaterialStack(channel.type, channel.amount));
|
||||||
@ -196,7 +201,24 @@ public class FoundryChannel extends BlockContainer implements ICrucibleAcceptor
|
|||||||
world.spawnEntityInWorld(item);
|
world.spawnEntityInWorld(item);
|
||||||
channel.amount = 0;
|
channel.amount = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
super.breakBlock(world, x, y, z, b, i);
|
super.breakBlock(world, x, y, z, b, i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static class FoundryNode extends GenNode<FoundryNetwork> {
|
||||||
|
|
||||||
|
public NTMMaterial type;
|
||||||
|
|
||||||
|
public FoundryNode(INetworkProvider<FoundryNetwork> provider, BlockPos... positions) {
|
||||||
|
super(provider, positions);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FoundryNode setConnections(DirPos... connections) {
|
||||||
|
super.setConnections(connections);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,34 +0,0 @@
|
|||||||
package com.hbm.blocks.machine;
|
|
||||||
|
|
||||||
import com.hbm.lib.RefStrings;
|
|
||||||
import com.hbm.tileentity.machine.TileEntityMachineAmgen;
|
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
|
||||||
import net.minecraft.block.BlockContainer;
|
|
||||||
import net.minecraft.block.material.Material;
|
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
|
||||||
import net.minecraft.util.IIcon;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
|
|
||||||
public class MachineAmgen extends BlockContainer {
|
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
private IIcon iconTop;
|
|
||||||
|
|
||||||
public MachineAmgen(Material p_i45386_1_) {
|
|
||||||
super(p_i45386_1_);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
|
||||||
return new TileEntityMachineAmgen();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
|
||||||
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":block_deprecated");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
55
src/main/java/com/hbm/blocks/machine/MachineAnnihilator.java
Normal file
55
src/main/java/com/hbm/blocks/machine/MachineAnnihilator.java
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
package com.hbm.blocks.machine;
|
||||||
|
|
||||||
|
import com.hbm.blocks.BlockDummyable;
|
||||||
|
import com.hbm.handler.MultiblockHandlerXR;
|
||||||
|
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||||
|
import com.hbm.tileentity.machine.TileEntityMachineAnnihilator;
|
||||||
|
|
||||||
|
import net.minecraft.block.material.Material;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
|
public class MachineAnnihilator extends BlockDummyable {
|
||||||
|
|
||||||
|
public MachineAnnihilator() {
|
||||||
|
super(Material.iron);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TileEntity createNewTileEntity(World world, int meta) {
|
||||||
|
if(meta >= 12) return new TileEntityMachineAnnihilator();
|
||||||
|
if(meta >= 6) return new TileEntityProxyCombo().inventory().fluid();
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||||
|
return standardOpenBehavior(world, x, y, z, player, side);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override public int[] getDimensions() { return new int[] {2, 0, 4, 4, 1, 1}; }
|
||||||
|
@Override public int getOffset() { return 4; }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean checkRequirement(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||||
|
return super.checkRequirement(world, x, y, z, dir, o) &&
|
||||||
|
MultiblockHandlerXR.checkSpace(world, x + dir.offsetX * (o - 3), y, z + dir.offsetZ * (o - 3), new int[] {8, -2, 1, 1, 1, 1}, x, y, z, dir);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||||
|
super.fillSpace(world, x, y, z, dir, o);
|
||||||
|
MultiblockHandlerXR.fillSpace(world, x + dir.offsetX * (o - 3), y, z + dir.offsetZ * (o - 3), new int[] {8, -2, 1, 1, 1, 1}, this, dir);
|
||||||
|
|
||||||
|
x += dir.offsetX * o;
|
||||||
|
z += dir.offsetZ * o;
|
||||||
|
|
||||||
|
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||||
|
|
||||||
|
this.makeExtra(world, x + dir.offsetX * 3 + rot.offsetX, y, z + dir.offsetZ * 3 + rot.offsetZ);
|
||||||
|
this.makeExtra(world, x + dir.offsetX * 3 - rot.offsetX, y, z + dir.offsetZ * 3 - rot.offsetZ);
|
||||||
|
this.makeExtra(world, x + dir.offsetX * 4, y, z + dir.offsetZ * 4);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -11,6 +11,7 @@ import net.minecraft.util.AxisAlignedBB;
|
|||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public class MachineAssembler extends BlockDummyable {
|
public class MachineAssembler extends BlockDummyable {
|
||||||
|
|
||||||
public MachineAssembler(Material p_i45386_1_) {
|
public MachineAssembler(Material p_i45386_1_) {
|
||||||
|
|||||||
@ -0,0 +1,88 @@
|
|||||||
|
package com.hbm.blocks.machine;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.hbm.blocks.BlockDummyable;
|
||||||
|
import com.hbm.blocks.ILookOverlay;
|
||||||
|
import com.hbm.blocks.ITooltipProvider;
|
||||||
|
import com.hbm.tileentity.TileEntityProxyDyn;
|
||||||
|
import com.hbm.tileentity.machine.TileEntityMachineAssemblyFactory;
|
||||||
|
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||||
|
import com.hbm.util.i18n.I18nUtil;
|
||||||
|
|
||||||
|
import net.minecraft.block.material.Material;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.util.EnumChatFormatting;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre;
|
||||||
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
|
public class MachineAssemblyFactory extends BlockDummyable implements ITooltipProvider, ILookOverlay {
|
||||||
|
|
||||||
|
public MachineAssemblyFactory(Material mat) {
|
||||||
|
super(mat);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TileEntity createNewTileEntity(World world, int meta) {
|
||||||
|
if(meta >= 12) return new TileEntityMachineAssemblyFactory();
|
||||||
|
if(meta >= 6) return new TileEntityProxyDyn().inventory().power().fluid();
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||||
|
return this.standardOpenBehavior(world, x, y, z, player, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override public int[] getDimensions() { return new int[] {2, 0, 2, 2, 2, 2}; }
|
||||||
|
@Override public int getOffset() { return 2; }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||||
|
super.fillSpace(world, x, y, z, dir, o);
|
||||||
|
|
||||||
|
x -= dir.offsetX * 2;
|
||||||
|
z -= dir.offsetZ * 2;
|
||||||
|
|
||||||
|
for(int i = -2; i <= 2; i++) for(int j = -2; j <= 2; j++) {
|
||||||
|
if(Math.abs(i) == 2 || Math.abs(j) == 2) this.makeExtra(world, x + i, y, z + j);
|
||||||
|
}
|
||||||
|
|
||||||
|
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||||
|
for(int i = -2; i <= 2; i++) {
|
||||||
|
this.makeExtra(world, x + dir.offsetX * i + rot.offsetX * 2, y + 2, z + dir.offsetZ * i + rot.offsetZ * 2);
|
||||||
|
this.makeExtra(world, x + dir.offsetX * i - rot.offsetX * 2, y + 2, z + dir.offsetZ * i - rot.offsetZ * 2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||||
|
this.addStandardInfo(stack, player, list, ext);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void printHook(Pre event, World world, int x, int y, int z) {
|
||||||
|
int[] pos = this.findCore(world, x, y, z);
|
||||||
|
if(pos == null) return;
|
||||||
|
|
||||||
|
TileEntity te = world.getTileEntity(pos[0], pos[1], pos[2]);
|
||||||
|
if(!(te instanceof TileEntityMachineAssemblyFactory)) return;
|
||||||
|
TileEntityMachineAssemblyFactory assemfac = (TileEntityMachineAssemblyFactory) te;
|
||||||
|
|
||||||
|
DirPos[] cool = assemfac.getCoolPos();
|
||||||
|
|
||||||
|
for(DirPos dirPos : cool) if(dirPos.compare(x + dirPos.getDir().offsetX, y, z + dirPos.getDir().offsetZ)) {
|
||||||
|
List<String> text = new ArrayList();
|
||||||
|
|
||||||
|
text.add(EnumChatFormatting.GREEN + "-> " + EnumChatFormatting.RESET + assemfac.water.getTankType().getLocalizedName());
|
||||||
|
text.add(EnumChatFormatting.RED + "<- " + EnumChatFormatting.RESET + assemfac.lps.getTankType().getLocalizedName());
|
||||||
|
|
||||||
|
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -10,6 +10,7 @@ import net.minecraft.tileentity.TileEntity;
|
|||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public class MachineAssemfac extends BlockDummyable {
|
public class MachineAssemfac extends BlockDummyable {
|
||||||
|
|
||||||
public MachineAssemfac(Material mat) {
|
public MachineAssemfac(Material mat) {
|
||||||
|
|||||||
@ -5,6 +5,7 @@ import java.util.List;
|
|||||||
|
|
||||||
import com.hbm.blocks.BlockDummyable;
|
import com.hbm.blocks.BlockDummyable;
|
||||||
import com.hbm.blocks.ICustomBlockHighlight;
|
import com.hbm.blocks.ICustomBlockHighlight;
|
||||||
|
import com.hbm.blocks.ITooltipProvider;
|
||||||
import com.hbm.inventory.material.Mats.MaterialStack;
|
import com.hbm.inventory.material.Mats.MaterialStack;
|
||||||
import com.hbm.items.machine.ItemScraps;
|
import com.hbm.items.machine.ItemScraps;
|
||||||
import com.hbm.main.MainRegistry;
|
import com.hbm.main.MainRegistry;
|
||||||
@ -27,7 +28,7 @@ import net.minecraft.world.World;
|
|||||||
import net.minecraftforge.client.event.DrawBlockHighlightEvent;
|
import net.minecraftforge.client.event.DrawBlockHighlightEvent;
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
public class MachineCrucible extends BlockDummyable implements ICrucibleAcceptor {
|
public class MachineCrucible extends BlockDummyable implements ICrucibleAcceptor, ITooltipProvider {
|
||||||
|
|
||||||
public MachineCrucible() {
|
public MachineCrucible() {
|
||||||
super(Material.rock);
|
super(Material.rock);
|
||||||
@ -181,4 +182,9 @@ public class MachineCrucible extends BlockDummyable implements ICrucibleAcceptor
|
|||||||
|
|
||||||
@Override public boolean canAcceptPartialFlow(World world, int x, int y, int z, ForgeDirection side, MaterialStack stack) { return false; }
|
@Override public boolean canAcceptPartialFlow(World world, int x, int y, int z, ForgeDirection side, MaterialStack stack) { return false; }
|
||||||
@Override public MaterialStack flow(World world, int x, int y, int z, ForgeDirection side, MaterialStack stack) { return null; }
|
@Override public MaterialStack flow(World world, int x, int y, int z, ForgeDirection side, MaterialStack stack) { return null; }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||||
|
this.addStandardInfo(stack, player, list, ext);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,13 +6,12 @@ import java.util.List;
|
|||||||
import com.hbm.blocks.BlockDummyable;
|
import com.hbm.blocks.BlockDummyable;
|
||||||
import com.hbm.blocks.ILookOverlay;
|
import com.hbm.blocks.ILookOverlay;
|
||||||
import com.hbm.blocks.IPersistentInfoProvider;
|
import com.hbm.blocks.IPersistentInfoProvider;
|
||||||
import com.hbm.main.MainRegistry;
|
import com.hbm.tileentity.IPersistentNBT;
|
||||||
import com.hbm.tileentity.machine.storage.TileEntityMachineBattery;
|
import com.hbm.tileentity.machine.storage.TileEntityMachineBattery;
|
||||||
import com.hbm.tileentity.machine.storage.TileEntityMachineFENSU;
|
import com.hbm.tileentity.machine.storage.TileEntityMachineFENSU;
|
||||||
import com.hbm.util.BobMathUtil;
|
import com.hbm.util.BobMathUtil;
|
||||||
import com.hbm.util.i18n.I18nUtil;
|
import com.hbm.util.i18n.I18nUtil;
|
||||||
|
|
||||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
@ -30,43 +29,21 @@ public class MachineFENSU extends BlockDummyable implements ILookOverlay, IPersi
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TileEntity createNewTileEntity(World world, int meta) {
|
public TileEntity createNewTileEntity(World world, int meta) {
|
||||||
|
if(meta >= 12) return new TileEntityMachineFENSU();
|
||||||
if(meta >= 12)
|
|
||||||
return new TileEntityMachineFENSU();
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override public int[] getDimensions() { return new int[] {4, 0, 1, 1, 2, 2}; }
|
||||||
public int[] getDimensions() {
|
@Override public int getOffset() { return 1; }
|
||||||
return new int[] {4, 0, 1, 1, 2, 2};
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getOffset() {
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||||
if(world.isRemote)
|
return this.standardOpenBehavior(world, x, y, z, player, 0);
|
||||||
{
|
}
|
||||||
return true;
|
|
||||||
} else if(!player.isSneaking())
|
@Override
|
||||||
{
|
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune) {
|
||||||
int[] pos = this.findCore(world, x, y, z);
|
return IPersistentNBT.getDrops(world, x, y, z, this);
|
||||||
|
|
||||||
if(pos == null)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
TileEntityMachineFENSU entity = (TileEntityMachineFENSU) world.getTileEntity(pos[0], pos[1], pos[2]);
|
|
||||||
if(entity != null)
|
|
||||||
{
|
|
||||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, pos[0], pos[1], pos[2]);
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -1,21 +1,14 @@
|
|||||||
package com.hbm.blocks.machine;
|
package com.hbm.blocks.machine;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import com.hbm.blocks.BlockDummyable;
|
import com.hbm.blocks.BlockDummyable;
|
||||||
import com.hbm.blocks.ModBlocks;
|
|
||||||
import com.hbm.inventory.material.Mats;
|
|
||||||
import com.hbm.items.ModItems;
|
|
||||||
import com.hbm.main.MainRegistry;
|
import com.hbm.main.MainRegistry;
|
||||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||||
import com.hbm.tileentity.machine.TileEntityITER;
|
import com.hbm.tileentity.machine.TileEntityITER;
|
||||||
import com.hbm.tileentity.machine.TileEntityITERStruct;
|
import com.hbm.tileentity.machine.TileEntityITERStruct;
|
||||||
|
|
||||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
import net.minecraft.entity.item.EntityItem;
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
@ -25,6 +18,7 @@ import net.minecraft.util.Vec3;
|
|||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public class MachineITER extends BlockDummyable {
|
public class MachineITER extends BlockDummyable {
|
||||||
|
|
||||||
public MachineITER() {
|
public MachineITER() {
|
||||||
@ -43,11 +37,6 @@ public class MachineITER extends BlockDummyable {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Item getItemDropped(int i, Random rand, int j) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getDimensions() {
|
public int[] getDimensions() {
|
||||||
//because we'll implement our own gnarly behavior here
|
//because we'll implement our own gnarly behavior here
|
||||||
@ -238,28 +227,5 @@ public class MachineITER extends BlockDummyable {
|
|||||||
public int getOffset() {
|
public int getOffset() {
|
||||||
return 7;
|
return 7;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean drop = true;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void breakBlock(World world, int x, int y, int z, Block block, int i) {
|
|
||||||
|
|
||||||
if(i >= 12 && drop) {
|
|
||||||
|
|
||||||
for(int l = 0; l < 4; l++) {
|
|
||||||
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, new ItemStack(ModBlocks.fusion_conductor, 64)));
|
|
||||||
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, new ItemStack(ModItems.plate_cast, 64, Mats.MAT_STEEL.id)));
|
|
||||||
}
|
|
||||||
|
|
||||||
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, new ItemStack(ModBlocks.fusion_conductor, 36)));
|
|
||||||
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, new ItemStack(ModItems.plate_cast, 36, Mats.MAT_STEEL.id)));
|
|
||||||
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, new ItemStack(ModBlocks.fusion_center, 64)));
|
|
||||||
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, new ItemStack(ModBlocks.fusion_motor, 4)));
|
|
||||||
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, new ItemStack(ModBlocks.reinforced_glass, 8)));
|
|
||||||
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, new ItemStack(ModBlocks.struct_iter_core, 1)));
|
|
||||||
}
|
|
||||||
|
|
||||||
super.breakBlock(world, x, y, z, block, i);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import com.hbm.blocks.ITooltipProvider;
|
|||||||
import com.hbm.blocks.ModBlocks;
|
import com.hbm.blocks.ModBlocks;
|
||||||
import com.hbm.blocks.machine.BlockPWR.TileEntityBlockPWR;
|
import com.hbm.blocks.machine.BlockPWR.TileEntityBlockPWR;
|
||||||
import com.hbm.handler.threading.PacketThreading;
|
import com.hbm.handler.threading.PacketThreading;
|
||||||
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.lib.RefStrings;
|
import com.hbm.lib.RefStrings;
|
||||||
import com.hbm.main.MainRegistry;
|
import com.hbm.main.MainRegistry;
|
||||||
import com.hbm.packet.toclient.AuxParticlePacketNT;
|
import com.hbm.packet.toclient.AuxParticlePacketNT;
|
||||||
@ -80,6 +81,7 @@ public class MachinePWRController extends BlockContainer implements ITooltipProv
|
|||||||
if(!controller.assembled) {
|
if(!controller.assembled) {
|
||||||
assemble(world, x, y, z, player);
|
assemble(world, x, y, z, player);
|
||||||
} else {
|
} else {
|
||||||
|
if(player.getHeldItem() != null && player.getHeldItem().getItem() == ModItems.pwr_printer) return false;
|
||||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, x, y, z);
|
FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, x, y, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,26 +1,19 @@
|
|||||||
package com.hbm.blocks.machine;
|
package com.hbm.blocks.machine;
|
||||||
|
|
||||||
import com.hbm.blocks.BlockDummyable;
|
import com.hbm.blocks.BlockDummyable;
|
||||||
import com.hbm.blocks.ModBlocks;
|
|
||||||
import com.hbm.handler.MultiblockHandlerXR;
|
import com.hbm.handler.MultiblockHandlerXR;
|
||||||
import com.hbm.main.MainRegistry;
|
import com.hbm.main.MainRegistry;
|
||||||
import com.hbm.tileentity.TileEntityProxyCombo;
|
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||||
import com.hbm.tileentity.machine.TileEntityMachinePlasmaHeater;
|
import com.hbm.tileentity.machine.TileEntityMachinePlasmaHeater;
|
||||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.entity.item.EntityItem;
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.Item;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.AxisAlignedBB;
|
import net.minecraft.util.AxisAlignedBB;
|
||||||
import net.minecraft.world.IBlockAccess;
|
import net.minecraft.world.IBlockAccess;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class MachinePlasmaHeater extends BlockDummyable {
|
public class MachinePlasmaHeater extends BlockDummyable {
|
||||||
|
|
||||||
public MachinePlasmaHeater() {
|
public MachinePlasmaHeater() {
|
||||||
@ -39,11 +32,6 @@ public class MachinePlasmaHeater extends BlockDummyable {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Item getItemDropped(int i, Random rand, int j) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||||
if(world.isRemote)
|
if(world.isRemote)
|
||||||
@ -133,19 +121,4 @@ public class MachinePlasmaHeater extends BlockDummyable {
|
|||||||
public int getOffset() {
|
public int getOffset() {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void breakBlock(World world, int x, int y, int z, Block block, int i) {
|
|
||||||
|
|
||||||
if(i >= 12) {
|
|
||||||
|
|
||||||
for(int l = 0; l < 2; l++)
|
|
||||||
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, new ItemStack(ModBlocks.fusion_heater, 64)));
|
|
||||||
|
|
||||||
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, new ItemStack(ModBlocks.fusion_heater, 7)));
|
|
||||||
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, new ItemStack(ModBlocks.struct_plasma_core, 1)));
|
|
||||||
}
|
|
||||||
|
|
||||||
super.breakBlock(world, x, y, z, block, i);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
20
src/main/java/com/hbm/blocks/machine/MachinePrecAss.java
Normal file
20
src/main/java/com/hbm/blocks/machine/MachinePrecAss.java
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
package com.hbm.blocks.machine;
|
||||||
|
|
||||||
|
import com.hbm.tileentity.machine.TileEntityMachinePrecAss;
|
||||||
|
|
||||||
|
import net.minecraft.block.material.Material;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public class MachinePrecAss extends MachineAssemblyMachine {
|
||||||
|
|
||||||
|
public MachinePrecAss(Material mat) {
|
||||||
|
super(mat);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TileEntity createNewTileEntity(World world, int meta) {
|
||||||
|
if(meta >= 12) return new TileEntityMachinePrecAss();
|
||||||
|
return super.createNewTileEntity(world, meta);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -24,7 +24,6 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||||||
import net.minecraft.init.Blocks;
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.stats.StatList;
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.util.AxisAlignedBB;
|
import net.minecraft.util.AxisAlignedBB;
|
||||||
import net.minecraft.util.EnumChatFormatting;
|
import net.minecraft.util.EnumChatFormatting;
|
||||||
@ -87,27 +86,11 @@ public class MachineRefinery extends BlockDummyable implements IPersistentInfoPr
|
|||||||
public int getOffset() {
|
public int getOffset() {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onBlockHarvested(World world, int x, int y, int z, int meta, EntityPlayer player) {
|
|
||||||
|
|
||||||
if(!player.capabilities.isCreativeMode) {
|
|
||||||
harvesters.set(player);
|
|
||||||
this.dropBlockAsItem(world, x, y, z, meta, 0);
|
|
||||||
harvesters.set(null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune) {
|
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune) {
|
||||||
return IPersistentNBT.getDrops(world, x, y, z, this);
|
return IPersistentNBT.getDrops(world, x, y, z, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void harvestBlock(World world, EntityPlayer player, int x, int y, int z, int meta) {
|
|
||||||
player.addStat(StatList.mineBlockStatArray[getIdFromBlock(this)], 1);
|
|
||||||
player.addExhaustion(0.025F);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addInformation(ItemStack stack, NBTTagCompound persistentTag, EntityPlayer player, List list, boolean ext) {
|
public void addInformation(ItemStack stack, NBTTagCompound persistentTag, EntityPlayer player, List list, boolean ext) {
|
||||||
|
|||||||
@ -1,133 +0,0 @@
|
|||||||
package com.hbm.blocks.machine;
|
|
||||||
|
|
||||||
import com.hbm.blocks.ModBlocks;
|
|
||||||
import com.hbm.lib.RefStrings;
|
|
||||||
import com.hbm.main.MainRegistry;
|
|
||||||
import com.hbm.tileentity.machine.TileEntityMachineSchrabidiumTransmutator;
|
|
||||||
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.block.BlockContainer;
|
|
||||||
import net.minecraft.block.material.Material;
|
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
|
||||||
import net.minecraft.entity.item.EntityItem;
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
|
||||||
import net.minecraft.item.Item;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
|
||||||
import net.minecraft.util.IIcon;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
public class MachineSchrabidiumTransmutator extends BlockContainer {
|
|
||||||
|
|
||||||
private final Random field_149933_a = new Random();
|
|
||||||
private static boolean keepInventory;
|
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
//private IIcon iconFront;
|
|
||||||
private IIcon iconTop;
|
|
||||||
private IIcon iconBottom;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
|
||||||
this.iconTop = iconRegister.registerIcon(RefStrings.MODID + (":transmutator_top"));
|
|
||||||
this.iconBottom = iconRegister.registerIcon(RefStrings.MODID + (":transmutator_bottom"));
|
|
||||||
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":transmutator_side");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public IIcon getIcon(int side, int metadata) {
|
|
||||||
return side == 1 ? this.iconTop : (side == 0 ? this.iconBottom : this.blockIcon);
|
|
||||||
}
|
|
||||||
|
|
||||||
public MachineSchrabidiumTransmutator(Material p_i45386_1_) {
|
|
||||||
super(p_i45386_1_);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Item getItemDropped(int p_149650_1_, Random p_149650_2_, int p_149650_3_)
|
|
||||||
{
|
|
||||||
return Item.getItemFromBlock(ModBlocks.machine_schrabidium_transmutator);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
|
||||||
if(world.isRemote)
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
} else if(!player.isSneaking())
|
|
||||||
{
|
|
||||||
TileEntityMachineSchrabidiumTransmutator entity = (TileEntityMachineSchrabidiumTransmutator) world.getTileEntity(x, y, z);
|
|
||||||
if(entity != null)
|
|
||||||
{
|
|
||||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, x, y, z);
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
|
||||||
return new TileEntityMachineSchrabidiumTransmutator();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void breakBlock(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_)
|
|
||||||
{
|
|
||||||
if (!keepInventory)
|
|
||||||
{
|
|
||||||
TileEntityMachineSchrabidiumTransmutator tileentityfurnace = (TileEntityMachineSchrabidiumTransmutator)p_149749_1_.getTileEntity(p_149749_2_, p_149749_3_, p_149749_4_);
|
|
||||||
|
|
||||||
if (tileentityfurnace != null)
|
|
||||||
{
|
|
||||||
for (int i1 = 0; i1 < tileentityfurnace.getSizeInventory(); ++i1)
|
|
||||||
{
|
|
||||||
ItemStack itemstack = tileentityfurnace.getStackInSlot(i1);
|
|
||||||
|
|
||||||
if (itemstack != null)
|
|
||||||
{
|
|
||||||
float f = this.field_149933_a.nextFloat() * 0.8F + 0.1F;
|
|
||||||
float f1 = this.field_149933_a.nextFloat() * 0.8F + 0.1F;
|
|
||||||
float f2 = this.field_149933_a.nextFloat() * 0.8F + 0.1F;
|
|
||||||
|
|
||||||
while (itemstack.stackSize > 0)
|
|
||||||
{
|
|
||||||
int j1 = this.field_149933_a.nextInt(21) + 10;
|
|
||||||
|
|
||||||
if (j1 > itemstack.stackSize)
|
|
||||||
{
|
|
||||||
j1 = itemstack.stackSize;
|
|
||||||
}
|
|
||||||
|
|
||||||
itemstack.stackSize -= j1;
|
|
||||||
EntityItem entityitem = new EntityItem(p_149749_1_, p_149749_2_ + f, p_149749_3_ + f1, p_149749_4_ + f2, new ItemStack(itemstack.getItem(), j1, itemstack.getItemDamage()));
|
|
||||||
|
|
||||||
if (itemstack.hasTagCompound())
|
|
||||||
{
|
|
||||||
entityitem.getEntityItem().setTagCompound((NBTTagCompound)itemstack.getTagCompound().copy());
|
|
||||||
}
|
|
||||||
|
|
||||||
float f3 = 0.05F;
|
|
||||||
entityitem.motionX = (float)this.field_149933_a.nextGaussian() * f3;
|
|
||||||
entityitem.motionY = (float)this.field_149933_a.nextGaussian() * f3 + 0.2F;
|
|
||||||
entityitem.motionZ = (float)this.field_149933_a.nextGaussian() * f3;
|
|
||||||
p_149749_1_.spawnEntityInWorld(entityitem);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
p_149749_1_.func_147453_f(p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
super.breakBlock(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -26,12 +26,8 @@ public class MachineSolarBoiler extends BlockDummyable implements ILookOverlay {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TileEntity createNewTileEntity(World world, int meta) {
|
public TileEntity createNewTileEntity(World world, int meta) {
|
||||||
|
if(meta >= 12) return new TileEntitySolarBoiler();
|
||||||
if(meta >= 12)
|
if(meta >= extra) return new TileEntityProxyCombo(false, false, true);
|
||||||
return new TileEntitySolarBoiler();
|
|
||||||
if(meta >= extra)
|
|
||||||
return new TileEntityProxyCombo(false, false, true);
|
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
package com.hbm.blocks.machine;
|
package com.hbm.blocks.machine;
|
||||||
|
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.items.machine.ItemBattery;
|
|
||||||
import com.hbm.tileentity.machine.TileEntityRadiobox;
|
import com.hbm.tileentity.machine.TileEntityRadiobox;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
@ -47,31 +46,17 @@ public class Radiobox extends BlockContainer {
|
|||||||
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) {
|
public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack itemStack) {
|
||||||
int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3;
|
int i = MathHelper.floor_double(player.rotationYaw * 4.0F / 360.0F + 0.5D) & 3;
|
||||||
|
|
||||||
if(i == 0)
|
if(i == 0) world.setBlockMetadataWithNotify(x, y, z, 2, 2);
|
||||||
{
|
if(i == 1) world.setBlockMetadataWithNotify(x, y, z, 5, 2);
|
||||||
world.setBlockMetadataWithNotify(x, y, z, 2, 2);
|
if(i == 2) world.setBlockMetadataWithNotify(x, y, z, 3, 2);
|
||||||
}
|
if(i == 3) world.setBlockMetadataWithNotify(x, y, z, 4, 2);
|
||||||
if(i == 1)
|
|
||||||
{
|
|
||||||
world.setBlockMetadataWithNotify(x, y, z, 5, 2);
|
|
||||||
}
|
|
||||||
if(i == 2)
|
|
||||||
{
|
|
||||||
world.setBlockMetadataWithNotify(x, y, z, 3, 2);
|
|
||||||
}
|
|
||||||
if(i == 3)
|
|
||||||
{
|
|
||||||
world.setBlockMetadataWithNotify(x, y, z, 4, 2);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||||
if(world.isRemote)
|
if(world.isRemote) {
|
||||||
{
|
|
||||||
return true;
|
return true;
|
||||||
} else if(!player.isSneaking())
|
} else if(!player.isSneaking()) {
|
||||||
{
|
|
||||||
TileEntityRadiobox box = (TileEntityRadiobox)world.getTileEntity(x, y, z);
|
TileEntityRadiobox box = (TileEntityRadiobox)world.getTileEntity(x, y, z);
|
||||||
|
|
||||||
if(player.getHeldItem() != null && player.getHeldItem().getItem() == ModItems.battery_spark && !box.infinite) {
|
if(player.getHeldItem() != null && player.getHeldItem().getItem() == ModItems.battery_spark && !box.infinite) {
|
||||||
@ -93,78 +78,53 @@ public class Radiobox extends BlockContainer {
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
//FMLNetworkHandler.openGui(player, MainRegistry.instance, ModBlocks.guiID_radiobox, world, x, y, z);
|
|
||||||
//return true;
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setBlockBoundsBasedOnState(IBlockAccess p_149719_1_, int p_149719_2_, int p_149719_3_, int p_149719_4_)
|
public void setBlockBoundsBasedOnState(IBlockAccess p_149719_1_, int p_149719_2_, int p_149719_3_, int p_149719_4_) {
|
||||||
{
|
|
||||||
int te = p_149719_1_.getBlockMetadata(p_149719_2_, p_149719_3_, p_149719_4_);
|
int te = p_149719_1_.getBlockMetadata(p_149719_2_, p_149719_3_, p_149719_4_);
|
||||||
float f = 0.0625F;
|
float f = 0.0625F;
|
||||||
|
|
||||||
this.setBlockBounds(0.0F, 0.0F, 2*f, 1.0F, 1.0F, 14*f);
|
this.setBlockBounds(0.0F, 0.0F, 2 * f, 1.0F, 1.0F, 14 * f);
|
||||||
switch(te)
|
switch(te) {
|
||||||
{
|
|
||||||
case 4:
|
case 4:
|
||||||
case 8:
|
case 8: this.setBlockBounds(11 * f, 1 * f, 4 * f, 16 * f, 15 * f, 12 * f); break;
|
||||||
this.setBlockBounds(11*f, 1*f, 4*f, 16*f, 15*f, 12*f);
|
|
||||||
break;
|
|
||||||
case 2:
|
case 2:
|
||||||
case 6:
|
case 6: this.setBlockBounds(4 * f, 1 * f, 11 * f, 12 * f, 15 * f, 16 * f); break;
|
||||||
this.setBlockBounds(4*f, 1*f, 11*f, 12*f, 15*f, 16*f);
|
|
||||||
break;
|
|
||||||
case 5:
|
case 5:
|
||||||
case 9:
|
case 9: this.setBlockBounds(0 * f, 1 * f, 4 * f, 5 * f, 15 * f, 12 * f); break;
|
||||||
this.setBlockBounds(0*f, 1*f, 4*f, 5*f, 15*f, 12*f);
|
|
||||||
break;
|
|
||||||
case 3:
|
case 3:
|
||||||
case 7:
|
case 7: this.setBlockBounds(4 * f, 1 * f, 0 * f, 12 * f, 15 * f, 5 * f); break;
|
||||||
this.setBlockBounds(4*f, 1*f, 0*f, 12*f, 15*f, 5*f);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) {
|
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) {
|
||||||
|
|
||||||
int te = world.getBlockMetadata(x, y, z);
|
int te = world.getBlockMetadata(x, y, z);
|
||||||
float f = 0.0625F;
|
float f = 0.0625F;
|
||||||
|
|
||||||
this.setBlockBounds(0.0F, 0.0F, 2*f, 1.0F, 1.0F, 14*f);
|
this.setBlockBounds(0.0F, 0.0F, 2 * f, 1.0F, 1.0F, 14 * f);
|
||||||
switch(te)
|
switch(te) {
|
||||||
{
|
|
||||||
case 4:
|
case 4:
|
||||||
case 8:
|
case 8: this.setBlockBounds(11 * f, 1 * f, 4 * f, 16 * f, 15 * f, 12 * f); break;
|
||||||
this.setBlockBounds(11*f, 1*f, 4*f, 16*f, 15*f, 12*f);
|
|
||||||
break;
|
|
||||||
case 2:
|
case 2:
|
||||||
case 6:
|
case 6: this.setBlockBounds(4 * f, 1 * f, 11 * f, 12 * f, 15 * f, 16 * f); break;
|
||||||
this.setBlockBounds(4*f, 1*f, 11*f, 12*f, 15*f, 16*f);
|
|
||||||
break;
|
|
||||||
case 5:
|
case 5:
|
||||||
case 9:
|
case 9: this.setBlockBounds(0 * f, 1 * f, 4 * f, 5 * f, 15 * f, 12 * f); break;
|
||||||
this.setBlockBounds(0*f, 1*f, 4*f, 5*f, 15*f, 12*f);
|
|
||||||
break;
|
|
||||||
case 3:
|
case 3:
|
||||||
case 7:
|
case 7: this.setBlockBounds(4 * f, 1 * f, 0 * f, 12 * f, 15 * f, 5 * f); break;
|
||||||
this.setBlockBounds(4*f, 1*f, 0*f, 12*f, 15*f, 5*f);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return AxisAlignedBB.getBoundingBox(x + this.minX, y + this.minY, z + this.minZ, x + this.maxX, y + this.maxY, z + this.maxZ);
|
return AxisAlignedBB.getBoundingBox(x + this.minX, y + this.minY, z + this.minZ, x + this.maxX, y + this.maxY, z + this.maxZ);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void breakBlock(World world, int x, int y, int z, Block b, int m) {
|
public void breakBlock(World world, int x, int y, int z, Block b, int m) {
|
||||||
|
|
||||||
TileEntityRadiobox box = (TileEntityRadiobox)world.getTileEntity(x, y, z);
|
TileEntityRadiobox box = (TileEntityRadiobox)world.getTileEntity(x, y, z);
|
||||||
|
if(box.infinite) world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, new ItemStack(ModItems.battery_spark)));
|
||||||
|
|
||||||
if(box.infinite) {
|
super.breakBlock(world, x, y, z, b, m);
|
||||||
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, ItemBattery.getEmptyBattery(ModItems.battery_spark)));
|
}
|
||||||
}
|
|
||||||
|
|
||||||
super.breakBlock(world, x, y, z, b, m);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,9 +4,9 @@ import net.minecraft.entity.item.EntityMinecart;
|
|||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
public class RailBooster extends RailGeneric {
|
public class RailBooster extends RailGeneric {
|
||||||
|
|
||||||
public RailBooster() {
|
public RailBooster(String tool, int harvestLevel) {
|
||||||
super();
|
super(tool, harvestLevel);
|
||||||
this.setMaxSpeed(1.0F);
|
this.setMaxSpeed(1.0F);
|
||||||
this.setFlexible(false);
|
this.setFlexible(false);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -17,19 +17,20 @@ import net.minecraft.world.IBlockAccess;
|
|||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
public class RailGeneric extends BlockRailBase implements ITooltipProvider {
|
public class RailGeneric extends BlockRailBase implements ITooltipProvider {
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
protected IIcon turnedIcon;
|
protected IIcon turnedIcon;
|
||||||
|
|
||||||
protected static final float baseSpeed = 0.4F;
|
protected static final float baseSpeed = 0.4F;
|
||||||
protected float maxSpeed = 0.4F;
|
protected float maxSpeed = 0.4F;
|
||||||
protected boolean slopable = true;
|
protected boolean slopable = true;
|
||||||
protected boolean flexible = true;
|
protected boolean flexible = true;
|
||||||
|
|
||||||
public RailGeneric() {
|
public RailGeneric(String tool, int harvestLevel) {
|
||||||
super(false);
|
super(false);
|
||||||
|
setHarvestLevel(tool, harvestLevel);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public IIcon getIcon(int side, int meta) {
|
public IIcon getIcon(int side, int meta) {
|
||||||
@ -40,16 +41,16 @@ public class RailGeneric extends BlockRailBase implements ITooltipProvider {
|
|||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void registerBlockIcons(IIconRegister reg) {
|
public void registerBlockIcons(IIconRegister reg) {
|
||||||
super.registerBlockIcons(reg);
|
super.registerBlockIcons(reg);
|
||||||
|
|
||||||
if(flexible)
|
if(flexible)
|
||||||
this.turnedIcon = reg.registerIcon(this.getTextureName() + "_turned");
|
this.turnedIcon = reg.registerIcon(this.getTextureName() + "_turned");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public float getRailMaxSpeed(World world, EntityMinecart cart, int y, int x, int z) {
|
public float getRailMaxSpeed(World world, EntityMinecart cart, int y, int x, int z) {
|
||||||
return maxSpeed;
|
return maxSpeed;
|
||||||
}
|
}
|
||||||
|
|
||||||
public RailGeneric setMaxSpeed(float speed) {
|
public RailGeneric setMaxSpeed(float speed) {
|
||||||
this.maxSpeed = speed;
|
this.maxSpeed = speed;
|
||||||
return this;
|
return this;
|
||||||
@ -59,7 +60,7 @@ public class RailGeneric extends BlockRailBase implements ITooltipProvider {
|
|||||||
public boolean isFlexibleRail(IBlockAccess world, int y, int x, int z) {
|
public boolean isFlexibleRail(IBlockAccess world, int y, int x, int z) {
|
||||||
return !isPowered();
|
return !isPowered();
|
||||||
}
|
}
|
||||||
|
|
||||||
public RailGeneric setFlexible(boolean flexible) {
|
public RailGeneric setFlexible(boolean flexible) {
|
||||||
this.flexible = flexible;
|
this.flexible = flexible;
|
||||||
return this;
|
return this;
|
||||||
@ -69,7 +70,7 @@ public class RailGeneric extends BlockRailBase implements ITooltipProvider {
|
|||||||
public boolean canMakeSlopes(IBlockAccess world, int x, int y, int z) {
|
public boolean canMakeSlopes(IBlockAccess world, int x, int y, int z) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public RailGeneric setSlopable(boolean slopable) {
|
public RailGeneric setSlopable(boolean slopable) {
|
||||||
this.slopable = slopable;
|
this.slopable = slopable;
|
||||||
return this;
|
return this;
|
||||||
@ -78,15 +79,15 @@ public class RailGeneric extends BlockRailBase implements ITooltipProvider {
|
|||||||
@Override
|
@Override
|
||||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||||
float speed = this.maxSpeed / this.baseSpeed;
|
float speed = this.maxSpeed / this.baseSpeed;
|
||||||
|
|
||||||
if(speed != 1F) {
|
if(speed != 1F) {
|
||||||
list.add((speed > 1 ? EnumChatFormatting.BLUE : EnumChatFormatting.RED) + "Speed: " + ((int) (speed * 100)) + "%");
|
list.add((speed > 1 ? EnumChatFormatting.BLUE : EnumChatFormatting.RED) + "Speed: " + ((int) (speed * 100)) + "%");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!flexible) {
|
if(!flexible) {
|
||||||
list.add(EnumChatFormatting.RED + "Cannot be used for turns!");
|
list.add(EnumChatFormatting.RED + "Cannot be used for turns!");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!slopable) {
|
if(!slopable) {
|
||||||
list.add(EnumChatFormatting.RED + "Cannot be used for slopes!");
|
list.add(EnumChatFormatting.RED + "Cannot be used for slopes!");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,15 +9,16 @@ public class RailHighspeed extends BlockRailBase {
|
|||||||
/*@SideOnly(Side.CLIENT)
|
/*@SideOnly(Side.CLIENT)
|
||||||
private IIcon icon;*/
|
private IIcon icon;*/
|
||||||
|
|
||||||
public RailHighspeed() {
|
public RailHighspeed(String tool, Integer harvestLevel) {
|
||||||
super(true);
|
super(true);
|
||||||
|
setHarvestLevel(tool, harvestLevel);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*@Override
|
/*@Override
|
||||||
@SideOnly(Side.CLIENT) public IIcon getIcon(int p_149691_1_, int p_149691_2_) {
|
@SideOnly(Side.CLIENT) public IIcon getIcon(int p_149691_1_, int p_149691_2_) {
|
||||||
return p_149691_2_ >= 6 ? this.icon : this.blockIcon;
|
return p_149691_2_ >= 6 ? this.icon : this.blockIcon;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
|
|||||||
@ -1,31 +0,0 @@
|
|||||||
package com.hbm.blocks.machine;
|
|
||||||
|
|
||||||
import com.hbm.lib.RefStrings;
|
|
||||||
import com.hbm.tileentity.machine.TileEntityMachineSPP;
|
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
|
||||||
import net.minecraft.block.BlockContainer;
|
|
||||||
import net.minecraft.block.material.Material;
|
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
|
|
||||||
public class SPPBottom extends BlockContainer {
|
|
||||||
|
|
||||||
public SPPBottom(Material p_i45386_1_) {
|
|
||||||
super(p_i45386_1_);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
|
||||||
return new TileEntityMachineSPP();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
|
||||||
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":block_deprecated");
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,22 +0,0 @@
|
|||||||
package com.hbm.blocks.machine;
|
|
||||||
|
|
||||||
import com.hbm.lib.RefStrings;
|
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.block.material.Material;
|
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
|
||||||
|
|
||||||
public class SPPTop extends Block {
|
|
||||||
|
|
||||||
public SPPTop(Material p_i45394_1_) {
|
|
||||||
super(p_i45394_1_);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public void registerBlockIcons(IIconRegister iconRegister) {
|
|
||||||
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":block_deprecated");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -28,6 +28,10 @@ import net.minecraftforge.common.util.ForgeDirection;
|
|||||||
|
|
||||||
public class Spotlight extends Block implements ISpotlight, INBTBlockTransformable {
|
public class Spotlight extends Block implements ISpotlight, INBTBlockTransformable {
|
||||||
|
|
||||||
|
public static final int META_YELLOW = 0;
|
||||||
|
public static final int META_GREEN = 1;
|
||||||
|
public static final int META_BLUE = 2;
|
||||||
|
|
||||||
public static boolean disableOnGeneration = true;
|
public static boolean disableOnGeneration = true;
|
||||||
|
|
||||||
// I'd be extending the ReinforcedLamp class if it wasn't for the inverted behaviour of these specific lights
|
// I'd be extending the ReinforcedLamp class if it wasn't for the inverted behaviour of these specific lights
|
||||||
@ -223,7 +227,7 @@ public class Spotlight extends Block implements ISpotlight, INBTBlockTransformab
|
|||||||
if(!isOn) return;
|
if(!isOn) return;
|
||||||
|
|
||||||
ForgeDirection dir = getDirection(world, x, y, z);
|
ForgeDirection dir = getDirection(world, x, y, z);
|
||||||
propagateBeam(world, x, y, z, dir, beamLength);
|
propagateBeam(world, x, y, z, dir, beamLength, META_YELLOW);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ForgeDirection getDirection(IBlockAccess world, int x, int y, int z) {
|
public ForgeDirection getDirection(IBlockAccess world, int x, int y, int z) {
|
||||||
@ -281,7 +285,7 @@ public class Spotlight extends Block implements ISpotlight, INBTBlockTransformab
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Recursively add beam blocks, updating any that already exist with new incoming light directions
|
// Recursively add beam blocks, updating any that already exist with new incoming light directions
|
||||||
public static void propagateBeam(World world, int x, int y, int z, ForgeDirection dir, int distance) {
|
public static void propagateBeam(World world, int x, int y, int z, ForgeDirection dir, int distance, int meta) {
|
||||||
distance--;
|
distance--;
|
||||||
if(distance <= 0)
|
if(distance <= 0)
|
||||||
return;
|
return;
|
||||||
@ -295,7 +299,7 @@ public class Spotlight extends Block implements ISpotlight, INBTBlockTransformab
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if(!(block instanceof SpotlightBeam)) {
|
if(!(block instanceof SpotlightBeam)) {
|
||||||
world.setBlock(x, y, z, ModBlocks.spotlight_beam);
|
world.setBlock(x, y, z, ModBlocks.spotlight_beam, meta, 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we encounter an existing beam, add a new INCOMING direction to the
|
// If we encounter an existing beam, add a new INCOMING direction to the
|
||||||
@ -303,7 +307,7 @@ public class Spotlight extends Block implements ISpotlight, INBTBlockTransformab
|
|||||||
if (SpotlightBeam.setDirection(world, x, y, z, dir, true) == 0)
|
if (SpotlightBeam.setDirection(world, x, y, z, dir, true) == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
propagateBeam(world, x, y, z, dir, distance);
|
propagateBeam(world, x, y, z, dir, distance, meta);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Recursively delete beam blocks, if they aren't still illuminated from a different direction
|
// Recursively delete beam blocks, if they aren't still illuminated from a different direction
|
||||||
@ -326,7 +330,7 @@ public class Spotlight extends Block implements ISpotlight, INBTBlockTransformab
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Travels back through a beam to the source, and if found, repropagates the beam
|
// Travels back through a beam to the source, and if found, repropagates the beam
|
||||||
public static void backPropagate(World world, int x, int y, int z, ForgeDirection dir) {
|
public static void backPropagate(World world, int x, int y, int z, ForgeDirection dir, int meta) {
|
||||||
x -= dir.offsetX;
|
x -= dir.offsetX;
|
||||||
y -= dir.offsetY;
|
y -= dir.offsetY;
|
||||||
z -= dir.offsetZ;
|
z -= dir.offsetZ;
|
||||||
@ -334,12 +338,12 @@ public class Spotlight extends Block implements ISpotlight, INBTBlockTransformab
|
|||||||
Block block = world.getBlock(x, y, z);
|
Block block = world.getBlock(x, y, z);
|
||||||
if(block instanceof ISpotlight) {
|
if(block instanceof ISpotlight) {
|
||||||
ISpotlight spot = (ISpotlight) block;
|
ISpotlight spot = (ISpotlight) block;
|
||||||
propagateBeam(world, x, y, z, dir, spot.getBeamLength());
|
propagateBeam(world, x, y, z, dir, spot.getBeamLength(), meta);
|
||||||
} else if(!(block instanceof SpotlightBeam)) {
|
} else if(!(block instanceof SpotlightBeam)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
backPropagate(world, x, y, z, dir);
|
backPropagate(world, x, y, z, dir, meta);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Block getOff() {
|
protected Block getOff() {
|
||||||
|
|||||||
@ -29,8 +29,8 @@ public class SpotlightBeam extends BlockBeamBase {
|
|||||||
if (world.isRemote) return;
|
if (world.isRemote) return;
|
||||||
if (neighborBlock instanceof SpotlightBeam) return;
|
if (neighborBlock instanceof SpotlightBeam) return;
|
||||||
|
|
||||||
for (ForgeDirection dir : getDirections(world, x, y, z)) {
|
for(ForgeDirection dir : getDirections(world, x, y, z)) {
|
||||||
Spotlight.backPropagate(world, x, y, z, dir);
|
Spotlight.backPropagate(world, x, y, z, dir, world.getBlockMetadata(x, y, z));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,93 @@
|
|||||||
|
package com.hbm.blocks.machine.fusion;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.hbm.blocks.BlockDummyable;
|
||||||
|
import com.hbm.blocks.ILookOverlay;
|
||||||
|
import com.hbm.blocks.ITooltipProvider;
|
||||||
|
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||||
|
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||||
|
import com.hbm.tileentity.machine.fusion.TileEntityFusionBoiler;
|
||||||
|
import com.hbm.util.BobMathUtil;
|
||||||
|
import com.hbm.util.i18n.I18nUtil;
|
||||||
|
|
||||||
|
import net.minecraft.block.material.Material;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.util.EnumChatFormatting;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre;
|
||||||
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
|
public class MachineFusionBoiler extends BlockDummyable implements ILookOverlay, ITooltipProvider {
|
||||||
|
|
||||||
|
public MachineFusionBoiler() {
|
||||||
|
super(Material.iron);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TileEntity createNewTileEntity(World world, int meta) {
|
||||||
|
if(meta >= 12) return new TileEntityFusionBoiler();
|
||||||
|
if(meta >= 6) return new TileEntityProxyCombo().fluid();
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int[] getDimensions() {
|
||||||
|
return new int[] { 3, 0, 4, 4, 1, 1 };
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getOffset() {
|
||||||
|
return 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean checkRequirement(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||||
|
return super.checkRequirement(world, x, y, z, dir, o);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||||
|
super.fillSpace(world, x, y, z, dir, o);
|
||||||
|
|
||||||
|
x += dir.offsetX * o;
|
||||||
|
z += dir.offsetZ * o;
|
||||||
|
|
||||||
|
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||||
|
|
||||||
|
//this.makeExtra(world, x + dir.offsetX * 4, y + 2, z + dir.offsetZ * 4);
|
||||||
|
this.makeExtra(world, x - dir.offsetX * 1 + rot.offsetX, y, z - dir.offsetZ * 1 + rot.offsetZ);
|
||||||
|
this.makeExtra(world, x - dir.offsetX * 1 - rot.offsetX, y, z - dir.offsetZ * 1 - rot.offsetZ);
|
||||||
|
this.makeExtra(world, x + dir.offsetX * 2 + rot.offsetX, y, z + dir.offsetZ * 2 + rot.offsetZ);
|
||||||
|
this.makeExtra(world, x + dir.offsetX * 2 - rot.offsetX, y, z + dir.offsetZ * 2 - rot.offsetZ);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void printHook(Pre event, World world, int x, int y, int z) {
|
||||||
|
int[] pos = this.findCore(world, x, y, z);
|
||||||
|
if(pos == null) return;
|
||||||
|
|
||||||
|
TileEntity te = world.getTileEntity(pos[0], pos[1], pos[2]);
|
||||||
|
|
||||||
|
if(!(te instanceof TileEntityFusionBoiler)) return;
|
||||||
|
TileEntityFusionBoiler boiler = (TileEntityFusionBoiler) te;
|
||||||
|
|
||||||
|
List<String> text = new ArrayList();
|
||||||
|
text.add(EnumChatFormatting.GREEN + "-> " + EnumChatFormatting.RESET + BobMathUtil.format(boiler.plasmaEnergy) + " TU");
|
||||||
|
|
||||||
|
for(int i = 0; i < boiler.getAllTanks().length; i++) {
|
||||||
|
FluidTank tank = boiler.getAllTanks()[i];
|
||||||
|
text.add((i == 0 ? (EnumChatFormatting.GREEN + "-> ") : (EnumChatFormatting.RED + "<- ")) + EnumChatFormatting.RESET + tank.getTankType().getLocalizedName() + ": " + tank.getFill() + "/" + tank.getMaxFill() + "mB");
|
||||||
|
}
|
||||||
|
|
||||||
|
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||||
|
addStandardInfo(stack, player, list, ext);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,70 @@
|
|||||||
|
package com.hbm.blocks.machine.fusion;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.hbm.blocks.BlockDummyable;
|
||||||
|
import com.hbm.blocks.ITooltipProvider;
|
||||||
|
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||||
|
import com.hbm.tileentity.machine.fusion.TileEntityFusionBreeder;
|
||||||
|
|
||||||
|
import net.minecraft.block.material.Material;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
|
public class MachineFusionBreeder extends BlockDummyable implements ITooltipProvider {
|
||||||
|
|
||||||
|
public MachineFusionBreeder() {
|
||||||
|
super(Material.iron);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TileEntity createNewTileEntity(World world, int meta) {
|
||||||
|
if(meta >= 12) return new TileEntityFusionBreeder();
|
||||||
|
if(meta >= 6) return new TileEntityProxyCombo().inventory().fluid();
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int[] getDimensions() {
|
||||||
|
return new int[] { 3, 0, 2, 2, 1, 1 };
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getOffset() {
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||||
|
return super.standardOpenBehavior(world, x, y, z, player, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean checkRequirement(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||||
|
return super.checkRequirement(world, x, y, z, dir, o);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||||
|
super.fillSpace(world, x, y, z, dir, o);
|
||||||
|
|
||||||
|
x += dir.offsetX * o;
|
||||||
|
z += dir.offsetZ * o;
|
||||||
|
|
||||||
|
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||||
|
|
||||||
|
this.makeExtra(world, x + rot.offsetX, y, z + rot.offsetZ);
|
||||||
|
this.makeExtra(world, x - rot.offsetX, y, z - rot.offsetZ);
|
||||||
|
this.makeExtra(world, x + dir.offsetX + rot.offsetX, y, z + dir.offsetZ + rot.offsetZ);
|
||||||
|
this.makeExtra(world, x + dir.offsetX - rot.offsetX, y, z + dir.offsetZ - rot.offsetZ);
|
||||||
|
this.makeExtra(world, x + dir.offsetX * 2, y + 2, z + dir.offsetZ * 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||||
|
addStandardInfo(stack, player, list, ext);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,52 @@
|
|||||||
|
package com.hbm.blocks.machine.fusion;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.hbm.blocks.BlockDummyable;
|
||||||
|
import com.hbm.blocks.ITooltipProvider;
|
||||||
|
import com.hbm.tileentity.machine.fusion.TileEntityFusionCollector;
|
||||||
|
|
||||||
|
import net.minecraft.block.material.Material;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
|
public class MachineFusionCollector extends BlockDummyable implements ITooltipProvider {
|
||||||
|
|
||||||
|
public MachineFusionCollector() {
|
||||||
|
super(Material.iron);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TileEntity createNewTileEntity(World world, int meta) {
|
||||||
|
if(meta >= 12) return new TileEntityFusionCollector();
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int[] getDimensions() {
|
||||||
|
return new int[] { 3, 0, 2, 1, 2, 2 };
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getOffset() {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean checkRequirement(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||||
|
return super.checkRequirement(world, x, y, z, dir, o);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||||
|
super.fillSpace(world, x, y, z, dir, o);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||||
|
addStandardInfo(stack, player, list, ext);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,41 @@
|
|||||||
|
package com.hbm.blocks.machine.fusion;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.hbm.blocks.BlockDummyable;
|
||||||
|
import com.hbm.blocks.ITooltipProvider;
|
||||||
|
import com.hbm.tileentity.machine.fusion.TileEntityFusionCoupler;
|
||||||
|
|
||||||
|
import net.minecraft.block.material.Material;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public class MachineFusionCoupler extends BlockDummyable implements ITooltipProvider {
|
||||||
|
|
||||||
|
public MachineFusionCoupler() {
|
||||||
|
super(Material.iron);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TileEntity createNewTileEntity(World world, int meta) {
|
||||||
|
if(meta >= 12) return new TileEntityFusionCoupler();
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int[] getDimensions() {
|
||||||
|
return new int[] { 3, 0, 1, 1, 1, 1 };
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getOffset() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||||
|
addStandardInfo(stack, player, list, ext);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,65 @@
|
|||||||
|
package com.hbm.blocks.machine.fusion;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.hbm.blocks.BlockDummyable;
|
||||||
|
import com.hbm.blocks.ITooltipProvider;
|
||||||
|
import com.hbm.handler.MultiblockHandlerXR;
|
||||||
|
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||||
|
import com.hbm.tileentity.machine.fusion.TileEntityFusionKlystron;
|
||||||
|
|
||||||
|
import net.minecraft.block.material.Material;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
|
public class MachineFusionKlystron extends BlockDummyable implements ITooltipProvider {
|
||||||
|
|
||||||
|
public MachineFusionKlystron() {
|
||||||
|
super(Material.iron);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TileEntity createNewTileEntity(World world, int meta) {
|
||||||
|
if(meta >= 12) return new TileEntityFusionKlystron();
|
||||||
|
if(meta >= 6) return new TileEntityProxyCombo().power().fluid();
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||||
|
return super.standardOpenBehavior(world, x, y, z, player, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override public int[] getDimensions() { return new int[] { 3, 0, 4, 3, 2, 2 }; }
|
||||||
|
@Override public int getOffset() { return 3; }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean checkRequirement(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||||
|
return super.checkRequirement(world, x, y, z, dir, o) &&
|
||||||
|
MultiblockHandlerXR.checkSpace(world, x + dir.offsetX * o, y + dir.offsetY * o, z + dir.offsetZ * o, new int[] {4, -3, 4, 3, 1, 1}, x, y, z, dir);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||||
|
super.fillSpace(world, x, y, z, dir, o);
|
||||||
|
|
||||||
|
MultiblockHandlerXR.fillSpace(world, x + dir.offsetX * o, y, z + dir.offsetZ * o, new int[] {4, -3, 4, 3, 1, 1}, this, dir);
|
||||||
|
|
||||||
|
x += dir.offsetX * o;
|
||||||
|
z += dir.offsetZ * o;
|
||||||
|
|
||||||
|
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||||
|
|
||||||
|
this.makeExtra(world, x + dir.offsetX * 3, y + 2, z + dir.offsetZ * 3);
|
||||||
|
this.makeExtra(world, x + rot.offsetX * 2, y, z + rot.offsetZ * 2);
|
||||||
|
this.makeExtra(world, x - rot.offsetX * 2, y, z - rot.offsetZ * 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||||
|
addStandardInfo(stack, player, list, ext);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,48 @@
|
|||||||
|
package com.hbm.blocks.machine.fusion;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.hbm.blocks.BlockDummyable;
|
||||||
|
import com.hbm.blocks.ITooltipProvider;
|
||||||
|
import com.hbm.handler.MultiblockHandlerXR;
|
||||||
|
import com.hbm.tileentity.machine.fusion.TileEntityFusionKlystronCreative;
|
||||||
|
|
||||||
|
import net.minecraft.block.material.Material;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
|
public class MachineFusionKlystronCreative extends BlockDummyable implements ITooltipProvider {
|
||||||
|
|
||||||
|
public MachineFusionKlystronCreative() {
|
||||||
|
super(Material.iron);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TileEntity createNewTileEntity(World world, int meta) {
|
||||||
|
if(meta >= 12) return new TileEntityFusionKlystronCreative();
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override public int[] getDimensions() { return new int[] { 3, 0, 4, 3, 2, 2 }; }
|
||||||
|
@Override public int getOffset() { return 3; }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean checkRequirement(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||||
|
return super.checkRequirement(world, x, y, z, dir, o) &&
|
||||||
|
MultiblockHandlerXR.checkSpace(world, x + dir.offsetX * o, y + dir.offsetY * o, z + dir.offsetZ * o, new int[] {4, -3, 4, 3, 1, 1}, x, y, z, dir);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||||
|
super.fillSpace(world, x, y, z, dir, o);
|
||||||
|
MultiblockHandlerXR.fillSpace(world, x + dir.offsetX * o, y, z + dir.offsetZ * o, new int[] {4, -3, 4, 3, 1, 1}, this, dir);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||||
|
addStandardInfo(stack, player, list, ext);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,111 @@
|
|||||||
|
package com.hbm.blocks.machine.fusion;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.hbm.blocks.BlockDummyable;
|
||||||
|
import com.hbm.blocks.ILookOverlay;
|
||||||
|
import com.hbm.blocks.ITooltipProvider;
|
||||||
|
import com.hbm.handler.MultiblockHandlerXR;
|
||||||
|
import com.hbm.inventory.fluid.tank.FluidTank;
|
||||||
|
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||||
|
import com.hbm.tileentity.machine.fusion.TileEntityFusionMHDT;
|
||||||
|
import com.hbm.util.BobMathUtil;
|
||||||
|
import com.hbm.util.i18n.I18nUtil;
|
||||||
|
|
||||||
|
import net.minecraft.block.material.Material;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.util.EnumChatFormatting;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre;
|
||||||
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
|
public class MachineFusionMHDT extends BlockDummyable implements ILookOverlay, ITooltipProvider {
|
||||||
|
|
||||||
|
public MachineFusionMHDT() {
|
||||||
|
super(Material.iron);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TileEntity createNewTileEntity(World world, int meta) {
|
||||||
|
if(meta >= 12) return new TileEntityFusionMHDT();
|
||||||
|
if(meta >= 6) return new TileEntityProxyCombo().power().fluid();
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int[] getDimensions() {
|
||||||
|
return new int[] { 2, 0, 6, 7, 2, 2 };
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getOffset() {
|
||||||
|
return 7;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean checkRequirement(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||||
|
return super.checkRequirement(world, x, y, z, dir, o) &&
|
||||||
|
MultiblockHandlerXR.checkSpace(world, x + dir.offsetX * o, y + dir.offsetY * o, z + dir.offsetZ * o, new int[] {3, -2, 6, 2, 1, 1}, x, y, z, dir) &&
|
||||||
|
MultiblockHandlerXR.checkSpace(world, x + dir.offsetX * o, y + dir.offsetY * o, z + dir.offsetZ * o, new int[] {3, -2, -6, 7, 1, 1}, x, y, z, dir) &&
|
||||||
|
MultiblockHandlerXR.checkSpace(world, x + dir.offsetX * o, y + dir.offsetY * o, z + dir.offsetZ * o, new int[] {3, -2, -3, 5, 2, 2}, x, y, z, dir) &&
|
||||||
|
MultiblockHandlerXR.checkSpace(world, x + dir.offsetX * o, y + dir.offsetY * o, z + dir.offsetZ * o, new int[] {4, -3, -3, 5, 1, 1}, x, y, z, dir) &&
|
||||||
|
MultiblockHandlerXR.checkSpace(world, x + dir.offsetX * (o + 3), y, z + dir.offsetZ * (o + 3), new int[] {1, 0, 0, 1, 3, 3}, x, y, z, dir);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||||
|
super.fillSpace(world, x, y, z, dir, o);
|
||||||
|
|
||||||
|
MultiblockHandlerXR.fillSpace(world, x + dir.offsetX * o, y, z + dir.offsetZ * o, new int[] {3, -2, 6, 2, 1, 1}, this, dir);
|
||||||
|
MultiblockHandlerXR.fillSpace(world, x + dir.offsetX * o, y, z + dir.offsetZ * o, new int[] {3, -2, -6, 7, 1, 1}, this, dir);
|
||||||
|
MultiblockHandlerXR.fillSpace(world, x + dir.offsetX * o, y, z + dir.offsetZ * o, new int[] {3, -2, -3, 5, 2, 2}, this, dir);
|
||||||
|
MultiblockHandlerXR.fillSpace(world, x + dir.offsetX * o, y, z + dir.offsetZ * o, new int[] {4, -3, -3, 5, 1, 1}, this, dir);
|
||||||
|
MultiblockHandlerXR.fillSpace(world, x + dir.offsetX * (o + 3), y, z + dir.offsetZ * (o + 3), new int[] {1, 0, 0, 1, 3, 3}, this, dir);
|
||||||
|
|
||||||
|
x += dir.offsetX * o;
|
||||||
|
z += dir.offsetZ * o;
|
||||||
|
|
||||||
|
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||||
|
this.makeExtra(world, x + dir.offsetX * 4 + rot.offsetX * 3, y, z + dir.offsetZ * 4 + rot.offsetZ * 3);
|
||||||
|
this.makeExtra(world, x + dir.offsetX * 4 - rot.offsetX * 3, y, z + dir.offsetZ * 4 - rot.offsetZ * 3);
|
||||||
|
this.makeExtra(world, x + dir.offsetX * 7, y + 1, z + dir.offsetZ * 7);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void printHook(Pre event, World world, int x, int y, int z) {
|
||||||
|
int[] pos = this.findCore(world, x, y, z);
|
||||||
|
if(pos == null) return;
|
||||||
|
|
||||||
|
TileEntity te = world.getTileEntity(pos[0], pos[1], pos[2]);
|
||||||
|
|
||||||
|
if(!(te instanceof TileEntityFusionMHDT)) return;
|
||||||
|
TileEntityFusionMHDT turbine = (TileEntityFusionMHDT) te;
|
||||||
|
|
||||||
|
boolean hasPlasma = turbine.hasMinimumPlasma();
|
||||||
|
boolean isCool = turbine.isCool();
|
||||||
|
long power = (long) Math.floor(turbine.plasmaEnergy * turbine.PLASMA_EFFICIENCY);
|
||||||
|
if(!hasPlasma) power /= 2;
|
||||||
|
|
||||||
|
List<String> text = new ArrayList();
|
||||||
|
text.add(EnumChatFormatting.GREEN + "-> " + (hasPlasma ? EnumChatFormatting.RESET : EnumChatFormatting.GOLD) + BobMathUtil.getShortNumber(turbine.plasmaEnergy) + "TU/t / " + BobMathUtil.getShortNumber(turbine.MINIMUM_PLASMA) + "TU/t");
|
||||||
|
text.add(EnumChatFormatting.RED + "<- " + EnumChatFormatting.RESET + BobMathUtil.getShortNumber(!isCool ? 0 : power) + "HE/t");
|
||||||
|
|
||||||
|
for(int i = 0; i < turbine.getAllTanks().length; i++) {
|
||||||
|
FluidTank tank = turbine.getAllTanks()[i];
|
||||||
|
text.add((i == 0 ? (EnumChatFormatting.GREEN + "-> ") : (EnumChatFormatting.RED + "<- ")) + EnumChatFormatting.RESET + tank.getTankType().getLocalizedName() + ": " + tank.getFill() + "/" + tank.getMaxFill() + "mB");
|
||||||
|
}
|
||||||
|
|
||||||
|
if(turbine.plasmaEnergy > 0 && !hasPlasma) text.add("&[" + (BobMathUtil.getBlink() ? 0xff8000 : 0xffff00) + "&]! LOW POWER !");
|
||||||
|
if(!isCool) text.add("&[" + (BobMathUtil.getBlink() ? 0xff0000 : 0xffff00) + "&]! ! ! INSUFFICIENT COOLING ! ! !");
|
||||||
|
|
||||||
|
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||||
|
addStandardInfo(stack, player, list, ext);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,205 @@
|
|||||||
|
package com.hbm.blocks.machine.fusion;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.hbm.blocks.BlockDummyable;
|
||||||
|
import com.hbm.blocks.ITooltipProvider;
|
||||||
|
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||||
|
import com.hbm.tileentity.machine.fusion.TileEntityFusionTorus;
|
||||||
|
|
||||||
|
import net.minecraft.block.material.Material;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
|
public class MachineFusionTorus extends BlockDummyable implements ITooltipProvider {
|
||||||
|
|
||||||
|
public static final int[][][] layout = new int[][][] {
|
||||||
|
|
||||||
|
new int[][] {
|
||||||
|
new int[] {0,0,0,0,3,3,3,3,3,3,3,0,0,0,0},
|
||||||
|
new int[] {0,0,0,3,1,1,1,1,1,1,1,3,0,0,0},
|
||||||
|
new int[] {0,0,3,1,1,1,1,1,1,1,1,1,3,0,0},
|
||||||
|
new int[] {0,3,1,1,1,1,1,1,1,1,1,1,1,3,0},
|
||||||
|
new int[] {3,1,1,1,1,3,3,3,3,3,1,1,1,1,3},
|
||||||
|
new int[] {3,1,1,1,3,3,3,3,3,3,3,1,1,1,3},
|
||||||
|
new int[] {3,1,1,1,3,3,3,3,3,3,3,1,1,1,3},
|
||||||
|
new int[] {3,1,1,1,3,3,3,3,3,3,3,1,1,1,3},
|
||||||
|
new int[] {3,1,1,1,3,3,3,3,3,3,3,1,1,1,3},
|
||||||
|
new int[] {3,1,1,1,3,3,3,3,3,3,3,1,1,1,3},
|
||||||
|
new int[] {3,1,1,1,1,3,3,3,3,3,1,1,1,1,3},
|
||||||
|
new int[] {0,3,1,1,1,1,1,1,1,1,1,1,1,3,0},
|
||||||
|
new int[] {0,0,3,1,1,1,1,1,1,1,1,1,3,0,0},
|
||||||
|
new int[] {0,0,0,3,1,1,1,1,1,1,1,3,0,0,0},
|
||||||
|
new int[] {0,0,0,0,3,3,3,3,3,3,3,0,0,0,0},
|
||||||
|
},
|
||||||
|
new int[][] {
|
||||||
|
new int[] {0,0,0,0,1,1,3,3,3,1,1,0,0,0,0},
|
||||||
|
new int[] {0,0,0,1,1,1,1,1,1,1,1,1,0,0,0},
|
||||||
|
new int[] {0,0,1,1,2,2,2,2,2,2,2,1,1,0,0},
|
||||||
|
new int[] {0,1,1,2,1,1,1,1,1,1,1,2,1,1,0},
|
||||||
|
new int[] {1,1,2,1,1,1,1,1,1,1,1,1,2,1,1},
|
||||||
|
new int[] {1,1,2,1,1,3,3,3,3,3,1,1,2,1,1},
|
||||||
|
new int[] {3,1,2,1,1,3,3,3,3,3,1,1,2,1,3},
|
||||||
|
new int[] {3,1,2,1,1,3,3,3,3,3,1,1,2,1,3},
|
||||||
|
new int[] {3,1,2,1,1,3,3,3,3,3,1,1,2,1,3},
|
||||||
|
new int[] {1,1,2,1,1,3,3,3,3,3,1,1,2,1,1},
|
||||||
|
new int[] {1,1,2,1,1,1,1,1,1,1,1,1,2,1,1},
|
||||||
|
new int[] {0,1,1,2,1,1,1,1,1,1,1,2,1,1,0},
|
||||||
|
new int[] {0,0,1,1,2,2,2,2,2,2,2,1,1,0,0},
|
||||||
|
new int[] {0,0,0,1,1,1,1,1,1,1,1,1,0,0,0},
|
||||||
|
new int[] {0,0,0,0,1,1,3,3,3,1,1,0,0,0,0},
|
||||||
|
},
|
||||||
|
new int[][] {
|
||||||
|
new int[] {0,0,0,0,1,1,3,3,3,1,1,0,0,0,0},
|
||||||
|
new int[] {0,0,0,1,2,2,2,2,2,2,2,1,0,0,0},
|
||||||
|
new int[] {0,0,1,2,2,2,2,2,2,2,2,2,1,0,0},
|
||||||
|
new int[] {0,1,2,2,2,2,2,2,2,2,2,2,2,1,0},
|
||||||
|
new int[] {1,2,2,2,1,1,1,1,1,1,1,2,2,2,1},
|
||||||
|
new int[] {1,2,2,2,1,3,3,3,3,3,1,2,2,2,1},
|
||||||
|
new int[] {3,2,2,2,1,3,3,3,3,3,1,2,2,2,3},
|
||||||
|
new int[] {3,2,2,2,1,3,3,3,3,3,1,2,2,2,3},
|
||||||
|
new int[] {3,2,2,2,1,3,3,3,3,3,1,2,2,2,3},
|
||||||
|
new int[] {1,2,2,2,1,3,3,3,3,3,1,2,2,2,1},
|
||||||
|
new int[] {1,2,2,2,1,1,1,1,1,1,1,2,2,2,1},
|
||||||
|
new int[] {0,1,2,2,2,2,2,2,2,2,2,2,2,1,0},
|
||||||
|
new int[] {0,0,1,2,2,2,2,2,2,2,2,2,1,0,0},
|
||||||
|
new int[] {0,0,0,1,2,2,2,2,2,2,2,1,0,0,0},
|
||||||
|
new int[] {0,0,0,0,1,1,3,3,3,1,1,0,0,0,0},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
public MachineFusionTorus() {
|
||||||
|
super(Material.iron);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TileEntity createNewTileEntity(World world, int meta) {
|
||||||
|
if(meta >= 12) return new TileEntityFusionTorus();
|
||||||
|
if(meta >= 6) return new TileEntityProxyCombo().inventory().power().fluid();
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||||
|
return super.standardOpenBehavior(world, x, y, z, player, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int[] getDimensions() {
|
||||||
|
return new int[] { 4, 0, 7, 7, 7, 7 };
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getOffset() {
|
||||||
|
return 7;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean checkRequirement(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||||
|
|
||||||
|
x = x + dir.offsetX * o;
|
||||||
|
z = z + dir.offsetZ * o;
|
||||||
|
|
||||||
|
for(int iy = 0; iy < 5; iy++) {
|
||||||
|
|
||||||
|
int l = iy > 2 ? 4 - iy : iy;
|
||||||
|
int[][] layer = layout[l];
|
||||||
|
|
||||||
|
for(int ix = 0; ix < layer.length; ix++) {
|
||||||
|
|
||||||
|
for(int iz = 0; iz < layer.length; iz++) {
|
||||||
|
|
||||||
|
int ex = ix - layer.length / 2;
|
||||||
|
int ez = iz - layer.length / 2;
|
||||||
|
|
||||||
|
if(layout[l][ix][iz] > 0 && !world.getBlock(x + ex, y + iy, z + ez).canPlaceBlockAt(world, x + ex, y + iy, z + ez)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||||
|
|
||||||
|
x = x + dir.offsetX * o;
|
||||||
|
z = z + dir.offsetZ * o;
|
||||||
|
|
||||||
|
for(int iy = 0; iy < 5; iy++) {
|
||||||
|
|
||||||
|
int l = iy > 2 ? 4 - iy : iy;
|
||||||
|
int[][] layer = layout[l];
|
||||||
|
|
||||||
|
for(int ix = 0; ix < layer.length; ix++) {
|
||||||
|
|
||||||
|
for(int iz = 0; iz < layer[0].length; iz++) {
|
||||||
|
|
||||||
|
int ex = ix - layer.length / 2;
|
||||||
|
int ez = iz - layer.length / 2;
|
||||||
|
|
||||||
|
int meta = 0;
|
||||||
|
|
||||||
|
if(iy > 0) {
|
||||||
|
meta = ForgeDirection.UP.ordinal();
|
||||||
|
} else if(ex < 0) {
|
||||||
|
meta = ForgeDirection.WEST.ordinal();
|
||||||
|
} else if(ex > 0) {
|
||||||
|
meta = ForgeDirection.EAST.ordinal();
|
||||||
|
} else if(ez < 0) {
|
||||||
|
meta = ForgeDirection.NORTH.ordinal();
|
||||||
|
} else if(ez > 0) {
|
||||||
|
meta = ForgeDirection.SOUTH.ordinal();
|
||||||
|
} else {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(layout[l][ix][iz] > 0)
|
||||||
|
world.setBlock(x + ex, y + iy, z + ez, this, meta, 3);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// is that enough ports?
|
||||||
|
this.makeExtra(world, x, y + 4, z);
|
||||||
|
|
||||||
|
this.makeExtra(world, x + 6, y, z);
|
||||||
|
this.makeExtra(world, x + 6, y + 4, z);
|
||||||
|
this.makeExtra(world, x + 6, y, z + 2);
|
||||||
|
this.makeExtra(world, x + 6, y + 4, z + 2);
|
||||||
|
this.makeExtra(world, x + 6, y, z - 2);
|
||||||
|
this.makeExtra(world, x + 6, y + 4, z - 2);
|
||||||
|
|
||||||
|
this.makeExtra(world, x - 6, y, z);
|
||||||
|
this.makeExtra(world, x - 6, y + 4, z);
|
||||||
|
this.makeExtra(world, x - 6, y, z + 2);
|
||||||
|
this.makeExtra(world, x - 6, y + 4, z + 2);
|
||||||
|
this.makeExtra(world, x - 6, y, z - 2);
|
||||||
|
this.makeExtra(world, x - 6, y + 4, z - 2);
|
||||||
|
|
||||||
|
this.makeExtra(world, x, y, z + 6);
|
||||||
|
this.makeExtra(world, x, y + 4, z + 6);
|
||||||
|
this.makeExtra(world, x + 2, y, z + 6);
|
||||||
|
this.makeExtra(world, x + 2, y + 4, z + 6);
|
||||||
|
this.makeExtra(world, x - 2, y, z + 6);
|
||||||
|
this.makeExtra(world, x - 2, y + 4, z + 6);
|
||||||
|
|
||||||
|
this.makeExtra(world, x, y, z - 6);
|
||||||
|
this.makeExtra(world, x, y + 4, z - 6);
|
||||||
|
this.makeExtra(world, x + 2, y, z - 6);
|
||||||
|
this.makeExtra(world, x + 2, y + 4, z - 6);
|
||||||
|
this.makeExtra(world, x - 2, y, z - 6);
|
||||||
|
this.makeExtra(world, x - 2, y + 4, z - 6);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||||
|
addStandardInfo(stack, player, list, ext);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -3,6 +3,7 @@ package com.hbm.blocks.machine.rbmk;
|
|||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
import com.hbm.blocks.ModBlocks;
|
import com.hbm.blocks.ModBlocks;
|
||||||
|
import com.hbm.blocks.generic.BlockNTMSand.EnumSandType;
|
||||||
import com.hbm.handler.threading.PacketThreading;
|
import com.hbm.handler.threading.PacketThreading;
|
||||||
import com.hbm.main.MainRegistry;
|
import com.hbm.main.MainRegistry;
|
||||||
import com.hbm.packet.toclient.AuxParticlePacketNT;
|
import com.hbm.packet.toclient.AuxParticlePacketNT;
|
||||||
@ -38,6 +39,7 @@ public class RBMKDebrisBurning extends RBMKDebris {
|
|||||||
|
|
||||||
ForgeDirection dir = ForgeDirection.getOrientation(rand.nextInt(6));
|
ForgeDirection dir = ForgeDirection.getOrientation(rand.nextInt(6));
|
||||||
Block block = world.getBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ);
|
Block block = world.getBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ);
|
||||||
|
int meta = world.getBlockMetadata(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ);
|
||||||
|
|
||||||
if(rand.nextInt(10) == 0 && block == Blocks.air) {
|
if(rand.nextInt(10) == 0 && block == Blocks.air) {
|
||||||
world.setBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ, ModBlocks.gas_meltdown);
|
world.setBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ, ModBlocks.gas_meltdown);
|
||||||
@ -45,7 +47,7 @@ public class RBMKDebrisBurning extends RBMKDebris {
|
|||||||
|
|
||||||
//Foam helps stop the fire; Boron smothers it. 1.66% chance every 100-120 seconds for one side
|
//Foam helps stop the fire; Boron smothers it. 1.66% chance every 100-120 seconds for one side
|
||||||
int chance = block == ModBlocks.foam_layer || block == ModBlocks.block_foam ||
|
int chance = block == ModBlocks.foam_layer || block == ModBlocks.block_foam ||
|
||||||
block == ModBlocks.sand_boron_layer || block == ModBlocks.sand_boron ? 10 : 100;
|
block == ModBlocks.sand_boron_layer || (block == ModBlocks.sand_mix && meta == EnumSandType.BORON.ordinal()) ? 10 : 100;
|
||||||
|
|
||||||
if(rand.nextInt(chance) == 0) {
|
if(rand.nextInt(chance) == 0) {
|
||||||
world.setBlock(x, y, z, ModBlocks.pribris);
|
world.setBlock(x, y, z, ModBlocks.pribris);
|
||||||
|
|||||||
@ -4,6 +4,7 @@ import java.util.List;
|
|||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
|
|
||||||
import com.hbm.blocks.ModBlocks;
|
import com.hbm.blocks.ModBlocks;
|
||||||
|
import com.hbm.blocks.generic.BlockNTMSand.EnumSandType;
|
||||||
import com.hbm.handler.threading.PacketThreading;
|
import com.hbm.handler.threading.PacketThreading;
|
||||||
import com.hbm.items.ModItems;
|
import com.hbm.items.ModItems;
|
||||||
import com.hbm.packet.toclient.AuxParticlePacketNT;
|
import com.hbm.packet.toclient.AuxParticlePacketNT;
|
||||||
@ -50,13 +51,14 @@ public class RBMKDebrisRadiating extends RBMKDebrisBurning {
|
|||||||
|
|
||||||
ForgeDirection dir = ForgeDirection.getOrientation(rand.nextInt(6));
|
ForgeDirection dir = ForgeDirection.getOrientation(rand.nextInt(6));
|
||||||
Block block = world.getBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ);
|
Block block = world.getBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ);
|
||||||
|
int m = world.getBlockMetadata(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ);
|
||||||
|
|
||||||
if(rand.nextInt(10) == 0 && block == Blocks.air) {
|
if(rand.nextInt(10) == 0 && block == Blocks.air) {
|
||||||
world.setBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ, ModBlocks.gas_meltdown);
|
world.setBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ, ModBlocks.gas_meltdown);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Boron sand helps stop the fission reaction; 0.66% chance every 20-40 ticks for one side
|
//Boron sand helps stop the fission reaction; 0.66% chance every 20-40 ticks for one side
|
||||||
int chance = block == ModBlocks.sand_boron_layer || block == ModBlocks.sand_boron ? 25 : 1000;
|
int chance = block == ModBlocks.sand_boron_layer || (block == ModBlocks.sand_mix && m == EnumSandType.BORON.ordinal()) ? 25 : 1000;
|
||||||
|
|
||||||
if(rand.nextInt(chance) == 0) {
|
if(rand.nextInt(chance) == 0) {
|
||||||
|
|
||||||
|
|||||||
@ -1,9 +1,13 @@
|
|||||||
package com.hbm.blocks.machine.rbmk;
|
package com.hbm.blocks.machine.rbmk;
|
||||||
|
|
||||||
import com.hbm.handler.BossSpawnHandler;
|
import com.hbm.handler.BossSpawnHandler;
|
||||||
|
import com.hbm.items.machine.ItemRBMKLid;
|
||||||
|
import com.hbm.items.machine.ItemRBMKRod;
|
||||||
|
import com.hbm.main.MainRegistry;
|
||||||
import com.hbm.tileentity.TileEntityProxyInventory;
|
import com.hbm.tileentity.TileEntityProxyInventory;
|
||||||
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKRod;
|
import com.hbm.tileentity.machine.rbmk.TileEntityRBMKRod;
|
||||||
|
|
||||||
|
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.tileentity.TileEntity;
|
import net.minecraft.tileentity.TileEntity;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
@ -32,7 +36,34 @@ public class RBMKRod extends RBMKBase {
|
|||||||
@Override
|
@Override
|
||||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||||
BossSpawnHandler.markFBI(player);
|
BossSpawnHandler.markFBI(player);
|
||||||
return openInv(world, x, y, z, player);
|
|
||||||
|
if(world.isRemote) return true;
|
||||||
|
|
||||||
|
int[] pos = this.findCore(world, x, y, z);
|
||||||
|
if(pos == null) return false;
|
||||||
|
|
||||||
|
TileEntity te = world.getTileEntity(pos[0], pos[1], pos[2]);
|
||||||
|
if(!(te instanceof TileEntityRBMKRod)) return false;
|
||||||
|
TileEntityRBMKRod rbmk = (TileEntityRBMKRod) te;
|
||||||
|
|
||||||
|
if(player.getHeldItem() != null && player.getHeldItem().getItem() instanceof ItemRBMKLid) {
|
||||||
|
if(!rbmk.hasLid()) return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(player.getHeldItem() != null && player.getHeldItem().getItem() instanceof ItemRBMKRod && rbmk.slots[0] == null) {
|
||||||
|
rbmk.slots[0] = player.getHeldItem().copy();
|
||||||
|
rbmk.slots[0].stackSize = 1;
|
||||||
|
player.getHeldItem().stackSize--;
|
||||||
|
world.playSoundEffect(x + 0.5, y + 0.5, z + 0.5, "hbm:item.upgradePlug", 1.0F, 1.0F);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!player.isSneaking()) {
|
||||||
|
FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, pos[0], pos[1], pos[2]);
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -13,6 +13,7 @@ import com.hbm.tileentity.network.TileEntityCableBaseNT;
|
|||||||
import com.hbm.util.BobMathUtil;
|
import com.hbm.util.BobMathUtil;
|
||||||
import com.hbm.util.i18n.I18nUtil;
|
import com.hbm.util.i18n.I18nUtil;
|
||||||
|
|
||||||
|
import com.hbm.world.gen.nbt.INBTBlockTransformable;
|
||||||
import cpw.mods.fml.common.Optional;
|
import cpw.mods.fml.common.Optional;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
@ -37,7 +38,7 @@ import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre;
|
|||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class BlockCableGauge extends BlockContainer implements IBlockMultiPass, ILookOverlay, ITooltipProvider {
|
public class BlockCableGauge extends BlockContainer implements IBlockMultiPass, INBTBlockTransformable, ILookOverlay, ITooltipProvider {
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT) protected IIcon overlayGauge;
|
@SideOnly(Side.CLIENT) protected IIcon overlayGauge;
|
||||||
|
|
||||||
@ -84,6 +85,11 @@ public class BlockCableGauge extends BlockContainer implements IBlockMultiPass,
|
|||||||
this.addStandardInfo(stack, player, list, ext);
|
this.addStandardInfo(stack, player, list, ext);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int transformMeta(int meta, int coordBaseMode) {
|
||||||
|
return INBTBlockTransformable.transformMetaDeco(meta, coordBaseMode);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void printHook(Pre event, World world, int x, int y, int z) {
|
public void printHook(Pre event, World world, int x, int y, int z) {
|
||||||
|
|
||||||
@ -178,5 +184,6 @@ public class BlockCableGauge extends BlockContainer implements IBlockMultiPass,
|
|||||||
if((PREFIX_VALUE + "deltasecond").equals(name)) return "" + deltaLastSecond;
|
if((PREFIX_VALUE + "deltasecond").equals(name)) return "" + deltaLastSecond;
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,6 +13,7 @@ import net.minecraft.block.BlockContainer;
|
|||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.item.ItemBlock;
|
import net.minecraft.item.ItemBlock;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
@ -73,7 +74,7 @@ public class BlockCablePaintable extends BlockContainer implements IToolable, IB
|
|||||||
ItemBlock ib = (ItemBlock) stack.getItem();
|
ItemBlock ib = (ItemBlock) stack.getItem();
|
||||||
Block block = ib.field_150939_a;
|
Block block = ib.field_150939_a;
|
||||||
|
|
||||||
if(block.renderAsNormalBlock() && block != this) {
|
if(allowedPaint(block, this)) {
|
||||||
|
|
||||||
TileEntity tile = world.getTileEntity(x, y, z);
|
TileEntity tile = world.getTileEntity(x, y, z);
|
||||||
|
|
||||||
@ -93,6 +94,11 @@ public class BlockCablePaintable extends BlockContainer implements IToolable, IB
|
|||||||
|
|
||||||
return super.onBlockActivated(world, x, y, z, player, side, fX, fY, fZ);
|
return super.onBlockActivated(world, x, y, z, player, side, fX, fY, fZ);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean allowedPaint(Block paint, Block that) {
|
||||||
|
if(paint == Blocks.grass) return false;
|
||||||
|
return paint.renderAsNormalBlock() && paint != that;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onScrew(World world, EntityPlayer player, int x, int y, int z, int side, float fX, float fY, float fZ, ToolType tool) {
|
public boolean onScrew(World world, EntityPlayer player, int x, int y, int z, int side, float fX, float fY, float fZ, ToolType tool) {
|
||||||
|
|||||||
@ -6,6 +6,7 @@ import api.hbm.conveyor.IEnterableBlock;
|
|||||||
import com.hbm.lib.RefStrings;
|
import com.hbm.lib.RefStrings;
|
||||||
import com.hbm.tileentity.network.TileEntityCraneBase;
|
import com.hbm.tileentity.network.TileEntityCraneBase;
|
||||||
import com.hbm.tileentity.network.TileEntityCraneBoxer;
|
import com.hbm.tileentity.network.TileEntityCraneBoxer;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
@ -84,9 +85,21 @@ public class CraneBoxer extends BlockCraneBase implements IEnterableBlock {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canPackageEnter(World world, int x, int y, int z, ForgeDirection dir, IConveyorPackage entity) {
|
public boolean canPackageEnter(World world, int x, int y, int z, ForgeDirection dir, IConveyorPackage entity) {
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPackageEnter(World world, int x, int y, int z, ForgeDirection dir, IConveyorPackage entity) { }
|
public void onPackageEnter(World world, int x, int y, int z, ForgeDirection dir, IConveyorPackage entity) {
|
||||||
|
TileEntityCraneBoxer unboxer = (TileEntityCraneBoxer) world.getTileEntity(x, y, z);
|
||||||
|
ForgeDirection accessedSide = getOutputSide(world, x, y, z).getOpposite();
|
||||||
|
|
||||||
|
for(ItemStack stack : entity.getItemStacks()) {
|
||||||
|
ItemStack remainder = CraneInserter.addToInventory(unboxer, unboxer.getAccessibleSlotsFromSide(accessedSide.ordinal()), stack, accessedSide.ordinal());
|
||||||
|
|
||||||
|
if(remainder != null && remainder.stackSize > 0) {
|
||||||
|
EntityItem drop = new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, remainder.copy());
|
||||||
|
world.spawnEntityInWorld(drop);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -145,19 +145,51 @@ public class CraneInserter extends BlockCraneBase implements IEnterableBlock {
|
|||||||
return toAdd;
|
return toAdd;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override public boolean canPackageEnter(World world, int x, int y, int z, ForgeDirection dir, IConveyorPackage entity) { return true; }
|
||||||
public boolean canPackageEnter(World world, int x, int y, int z, ForgeDirection dir, IConveyorPackage entity) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPackageEnter(World world, int x, int y, int z, ForgeDirection dir, IConveyorPackage entity) { }
|
public void onPackageEnter(World world, int x, int y, int z, ForgeDirection dir, IConveyorPackage entity) {
|
||||||
|
ForgeDirection outputDirection = getOutputSide(world, x, y, z);
|
||||||
|
TileEntity te = world.getTileEntity(x + outputDirection.offsetX, y + outputDirection.offsetY, z + outputDirection.offsetZ);
|
||||||
|
|
||||||
@Override
|
if(entity == null || entity.getItemStacks() == null || entity.getItemStacks().length == 0) {
|
||||||
public boolean hasComparatorInputOverride() {
|
return;
|
||||||
return true;
|
}
|
||||||
|
|
||||||
|
ItemStack[] toAdd = entity.getItemStacks();
|
||||||
|
|
||||||
|
if(!world.isBlockIndirectlyGettingPowered(x, y, z)) {
|
||||||
|
int[] access = null;
|
||||||
|
|
||||||
|
if(te instanceof ISidedInventory) {
|
||||||
|
ISidedInventory sided = (ISidedInventory) te;
|
||||||
|
access = InventoryUtil.masquerade(sided, outputDirection.getOpposite().ordinal());
|
||||||
|
}
|
||||||
|
|
||||||
|
if(te instanceof IInventory) {
|
||||||
|
IInventory inv = (IInventory) te;
|
||||||
|
|
||||||
|
for(ItemStack stack : toAdd) addToInventory(inv, access, stack, outputDirection.getOpposite().ordinal());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
TileEntityCraneInserter inserter = null;
|
||||||
|
|
||||||
|
for(ItemStack stack : toAdd) {
|
||||||
|
|
||||||
|
if(stack.stackSize > 0) {
|
||||||
|
inserter = (TileEntityCraneInserter) world.getTileEntity(x, y, z);
|
||||||
|
addToInventory(inserter, null, stack, outputDirection.getOpposite().ordinal());
|
||||||
|
}
|
||||||
|
if(stack.stackSize > 0 && inserter != null && !inserter.destroyer) {
|
||||||
|
EntityItem drop = new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, stack.copy());
|
||||||
|
world.spawnEntityInWorld(drop);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override public boolean hasComparatorInputOverride() { return true; }
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getComparatorInputOverride(World world, int x, int y, int z, int side) {
|
public int getComparatorInputOverride(World world, int x, int y, int z, int side) {
|
||||||
return Container.calcRedstoneFromInventory((TileEntityCraneInserter)world.getTileEntity(x, y, z));
|
return Container.calcRedstoneFromInventory((TileEntityCraneInserter)world.getTileEntity(x, y, z));
|
||||||
|
|||||||
@ -127,9 +127,9 @@ public class CranePartitioner extends BlockContainer implements IConveyorBelt, I
|
|||||||
ItemStack stack = entity.getItemStack();
|
ItemStack stack = entity.getItemStack();
|
||||||
ItemStack remainder = null;
|
ItemStack remainder = null;
|
||||||
if(CrystallizerRecipes.getAmount(stack) > 0) {
|
if(CrystallizerRecipes.getAmount(stack) > 0) {
|
||||||
remainder = InventoryUtil.tryAddItemToInventory(partitioner, 0, 8, stack);
|
remainder = InventoryUtil.tryAddItemToInventory(partitioner, 0, TileEntityCranePartitioner.SLOT_COUNT - 1, stack);
|
||||||
} else {
|
} else {
|
||||||
remainder = InventoryUtil.tryAddItemToInventory(partitioner, 9, 17, stack);
|
remainder = InventoryUtil.tryAddItemToInventory(partitioner, TileEntityCranePartitioner.SLOT_COUNT, TileEntityCranePartitioner.SLOT_COUNT * 2 - 1, stack);
|
||||||
}
|
}
|
||||||
if(remainder != null) {
|
if(remainder != null) {
|
||||||
EntityItem item = new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, remainder.copy());
|
EntityItem item = new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, remainder.copy());
|
||||||
@ -139,8 +139,10 @@ public class CranePartitioner extends BlockContainer implements IConveyorBelt, I
|
|||||||
|
|
||||||
public static class TileEntityCranePartitioner extends TileEntityMachineBase {
|
public static class TileEntityCranePartitioner extends TileEntityMachineBase {
|
||||||
|
|
||||||
|
public static final int SLOT_COUNT = 45;
|
||||||
|
|
||||||
public TileEntityCranePartitioner() {
|
public TileEntityCranePartitioner() {
|
||||||
super(18);
|
super(SLOT_COUNT * 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override public String getName() { return "container.partitioner"; }
|
@Override public String getName() { return "container.partitioner"; }
|
||||||
@ -151,12 +153,14 @@ public class CranePartitioner extends BlockContainer implements IConveyorBelt, I
|
|||||||
if(!worldObj.isRemote) {
|
if(!worldObj.isRemote) {
|
||||||
|
|
||||||
List<ItemStack> stacks = new ArrayList();
|
List<ItemStack> stacks = new ArrayList();
|
||||||
for(int i = 0; i < 9; i++) if(slots[i] != null) stacks.add(slots[i]);
|
for(int i = 0; i < SLOT_COUNT; i++) if(slots[i] != null) stacks.add(slots[i]);
|
||||||
stacks.sort(stackSizeComparator);
|
stacks.sort(stackSizeComparator);
|
||||||
boolean markDirty = false;
|
boolean markDirty = false;
|
||||||
|
|
||||||
for(ItemStack stack : stacks) {
|
for(ItemStack stack : stacks) {
|
||||||
int amount = CrystallizerRecipes.getAmount(stack);
|
int amount = CrystallizerRecipes.getAmount(stack);
|
||||||
|
if(amount == 0) amount = stack.stackSize; // eject full stack if invalid type somehow ended up in the queue
|
||||||
|
|
||||||
while(stack.stackSize >= amount) {
|
while(stack.stackSize >= amount) {
|
||||||
ItemStack entityStack = stack.copy();
|
ItemStack entityStack = stack.copy();
|
||||||
entityStack.stackSize = amount;
|
entityStack.stackSize = amount;
|
||||||
@ -168,7 +172,7 @@ public class CranePartitioner extends BlockContainer implements IConveyorBelt, I
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int i = 0; i < 9; i++) if(slots[i] != null && slots[i].stackSize <= 0) slots[i] = null;
|
for(int i = 0; i < SLOT_COUNT; i++) if(slots[i] != null && slots[i].stackSize <= 0) slots[i] = null;
|
||||||
if(markDirty) this.markDirty();
|
if(markDirty) this.markDirty();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -183,17 +187,25 @@ public class CranePartitioner extends BlockContainer implements IConveyorBelt, I
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canExtractItem(int slot, ItemStack stack, int side) {
|
public boolean canExtractItem(int slot, ItemStack stack, int side) {
|
||||||
return slot >= 9;
|
return slot >= SLOT_COUNT; // declog
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isItemValidForSlot(int i, ItemStack stack) {
|
public boolean isItemValidForSlot(int i, ItemStack stack) {
|
||||||
return i <= 8 && CrystallizerRecipes.getAmount(stack) >= 1;
|
return i <= (SLOT_COUNT - 1) && CrystallizerRecipes.getAmount(stack) >= 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected int[] access;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int[] getAccessibleSlotsFromSide(int side) {
|
public int[] getAccessibleSlotsFromSide(int side) {
|
||||||
return new int[] { 0, 1, 2, 3, 4, 5, 6 ,7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17 };
|
|
||||||
|
if(access == null) {
|
||||||
|
access = new int[SLOT_COUNT * 2]; // writing this by hand is for chumps
|
||||||
|
for(int i = 0; i < SLOT_COUNT * 2; i++) access[i] = i;
|
||||||
|
}
|
||||||
|
|
||||||
|
return access;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -7,6 +7,7 @@ import api.hbm.conveyor.IEnterableBlock;
|
|||||||
import com.hbm.blocks.IBlockMultiPass;
|
import com.hbm.blocks.IBlockMultiPass;
|
||||||
import com.hbm.blocks.ITooltipProvider;
|
import com.hbm.blocks.ITooltipProvider;
|
||||||
import com.hbm.entity.item.EntityMovingItem;
|
import com.hbm.entity.item.EntityMovingItem;
|
||||||
|
import com.hbm.entity.item.EntityMovingPackage;
|
||||||
import com.hbm.items.tool.ItemConveyorWand;
|
import com.hbm.items.tool.ItemConveyorWand;
|
||||||
import com.hbm.lib.RefStrings;
|
import com.hbm.lib.RefStrings;
|
||||||
import com.hbm.main.MainRegistry;
|
import com.hbm.main.MainRegistry;
|
||||||
@ -115,16 +116,100 @@ public class CraneRouter extends BlockContainer implements IBlockMultiPass, IEnt
|
|||||||
return 7;
|
return 7;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override public boolean canItemEnter(World world, int x, int y, int z, ForgeDirection dir, IConveyorItem entity) { return true; }
|
||||||
public boolean canItemEnter(World world, int x, int y, int z, ForgeDirection dir, IConveyorItem entity) {
|
@Override public boolean canPackageEnter(World world, int x, int y, int z, ForgeDirection dir, IConveyorPackage entity) { return true; }
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onItemEnter(World world, int x, int y, int z, ForgeDirection dir, IConveyorItem entity) {
|
public void onItemEnter(World world, int x, int y, int z, ForgeDirection dir, IConveyorItem entity) {
|
||||||
TileEntityCraneRouter router = (TileEntityCraneRouter) world.getTileEntity(x, y, z);
|
List<ItemStack>[] sort = this.sort(world, x, y, z, entity.getItemStack());
|
||||||
ItemStack stack = entity.getItemStack();
|
|
||||||
|
|
||||||
|
for(int i = 0; i < 7; i++) {
|
||||||
|
ForgeDirection d = ForgeDirection.getOrientation(i);
|
||||||
|
List<ItemStack> list = sort[i];
|
||||||
|
|
||||||
|
if(d == ForgeDirection.UNKNOWN) {
|
||||||
|
for(ItemStack stack : list) world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, stack));
|
||||||
|
} else {
|
||||||
|
for(ItemStack stack : list) sendOnRoute(world, x, y, z, stack, d);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void sendOnRoute(World world, int x, int y, int z, ItemStack item, ForgeDirection dir) {
|
||||||
|
IConveyorBelt belt = null;
|
||||||
|
Block block = world.getBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ);
|
||||||
|
|
||||||
|
if(block instanceof IConveyorBelt) {
|
||||||
|
belt = (IConveyorBelt) block;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(belt != null) {
|
||||||
|
EntityMovingItem moving = new EntityMovingItem(world);
|
||||||
|
Vec3 pos = Vec3.createVectorHelper(x + 0.5 + dir.offsetX * 0.55, y + 0.5 + dir.offsetY * 0.55, z + 0.5 + dir.offsetZ * 0.55);
|
||||||
|
Vec3 snap = belt.getClosestSnappingPosition(world, x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ, pos);
|
||||||
|
moving.setPosition(snap.xCoord, snap.yCoord, snap.zCoord);
|
||||||
|
moving.setItemStack(item);
|
||||||
|
world.spawnEntityInWorld(moving);
|
||||||
|
} else {
|
||||||
|
world.spawnEntityInWorld(new EntityItem(world, x + 0.5 + dir.offsetX * 0.55, y + 0.5 + dir.offsetY * 0.55, z + 0.5 + dir.offsetZ * 0.55, item));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onPackageEnter(World world, int x, int y, int z, ForgeDirection dir, IConveyorPackage entity) {
|
||||||
|
List<ItemStack>[] sort = this.sort(world, x, y, z, entity.getItemStacks());
|
||||||
|
|
||||||
|
for(int i = 0; i < 7; i++) {
|
||||||
|
ForgeDirection d = ForgeDirection.getOrientation(i);
|
||||||
|
List<ItemStack> list = sort[i];
|
||||||
|
if(list.isEmpty()) continue;
|
||||||
|
|
||||||
|
if(d == ForgeDirection.UNKNOWN) {
|
||||||
|
for(ItemStack stack : list) world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, stack));
|
||||||
|
} else {
|
||||||
|
|
||||||
|
IConveyorBelt belt = null;
|
||||||
|
Block block = world.getBlock(x + d.offsetX, y + d.offsetY, z + d.offsetZ);
|
||||||
|
if(block instanceof IConveyorBelt) belt = (IConveyorBelt) block;
|
||||||
|
|
||||||
|
if(belt != null) {
|
||||||
|
EntityMovingPackage moving = new EntityMovingPackage(world);
|
||||||
|
Vec3 pos = Vec3.createVectorHelper(x + 0.5 + d.offsetX * 0.55, y + 0.5 + d.offsetY * 0.55, z + 0.5 + d.offsetZ * 0.55);
|
||||||
|
Vec3 snap = belt.getClosestSnappingPosition(world, x + d.offsetX, y + d.offsetY, z + d.offsetZ, pos);
|
||||||
|
moving.setPosition(snap.xCoord, snap.yCoord, snap.zCoord);
|
||||||
|
moving.setItemStacks(list.toArray(new ItemStack[0]));
|
||||||
|
world.spawnEntityInWorld(moving);
|
||||||
|
} else {
|
||||||
|
for(ItemStack stack : list) world.spawnEntityInWorld(new EntityItem(world, x + 0.5 + d.offsetX * 0.55, y + 0.5 + d.offsetY * 0.55, z + 0.5 + d.offsetZ * 0.55, stack));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||||
|
this.addStandardInfo(stack, player, list, ext);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Accepts an arbitrary amount of ItemStacks (either solo or from boxes) and returns an array corresponding with ForgeDirections,
|
||||||
|
* with each direction having a list of items being output in that direction. Index 6 is used for UNKNOWN, i.e. unsortable items.
|
||||||
|
* Returned lists are populated with COPIES of the original stacks. */
|
||||||
|
public static List<ItemStack>[] sort(World world, int x, int y, int z, ItemStack... stacks) {
|
||||||
|
TileEntityCraneRouter router = (TileEntityCraneRouter) world.getTileEntity(x, y, z);
|
||||||
|
List<ItemStack>[] output = new List[7];
|
||||||
|
for(int i = 0; i < 7; i++) output[i] = new ArrayList();
|
||||||
|
|
||||||
|
for(ItemStack stack : stacks) {
|
||||||
|
if(stack == null) continue;
|
||||||
|
ForgeDirection dir = getOutputDir(router, stack.copy());
|
||||||
|
output[dir.ordinal()].add(stack);
|
||||||
|
}
|
||||||
|
|
||||||
|
return output;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ForgeDirection getOutputDir(TileEntityCraneRouter router, ItemStack stack) {
|
||||||
List<ForgeDirection> validDirs = new ArrayList();
|
List<ForgeDirection> validDirs = new ArrayList();
|
||||||
|
|
||||||
//check filters for all sides
|
//check filters for all sides
|
||||||
@ -168,40 +253,10 @@ public class CraneRouter extends BlockContainer implements IBlockMultiPass, IEnt
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(validDirs.isEmpty()) {
|
if(validDirs.isEmpty()) {
|
||||||
world.spawnEntityInWorld(new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, stack.copy()));
|
return ForgeDirection.UNKNOWN;
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int i = world.rand.nextInt(validDirs.size());
|
int i = router.getWorldObj().rand.nextInt(validDirs.size());
|
||||||
sendOnRoute(world, x, y, z, entity, validDirs.get(i));
|
return validDirs.get(i);
|
||||||
}
|
|
||||||
|
|
||||||
protected void sendOnRoute(World world, int x, int y, int z, IConveyorItem item, ForgeDirection dir) {
|
|
||||||
|
|
||||||
IConveyorBelt belt = null;
|
|
||||||
Block block = world.getBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ);
|
|
||||||
|
|
||||||
if(block instanceof IConveyorBelt) {
|
|
||||||
belt = (IConveyorBelt) block;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(belt != null) {
|
|
||||||
EntityMovingItem moving = new EntityMovingItem(world);
|
|
||||||
Vec3 pos = Vec3.createVectorHelper(x + 0.5 + dir.offsetX * 0.55, y + 0.5 + dir.offsetY * 0.55, z + 0.5 + dir.offsetZ * 0.55);
|
|
||||||
Vec3 snap = belt.getClosestSnappingPosition(world, x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ, pos);
|
|
||||||
moving.setPosition(snap.xCoord, snap.yCoord, snap.zCoord);
|
|
||||||
moving.setItemStack(item.getItemStack());
|
|
||||||
world.spawnEntityInWorld(moving);
|
|
||||||
} else {
|
|
||||||
world.spawnEntityInWorld(new EntityItem(world, x + 0.5 + dir.offsetX * 0.55, y + 0.5 + dir.offsetY * 0.55, z + 0.5 + dir.offsetZ * 0.55, item.getItemStack()));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override public boolean canPackageEnter(World world, int x, int y, int z, ForgeDirection dir, IConveyorPackage entity) { return false; }
|
|
||||||
@Override public void onPackageEnter(World world, int x, int y, int z, ForgeDirection dir, IConveyorPackage entity) { }
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
|
||||||
this.addStandardInfo(stack, player, list, ext);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
68
src/main/java/com/hbm/blocks/network/FluidCounterValve.java
Normal file
68
src/main/java/com/hbm/blocks/network/FluidCounterValve.java
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
package com.hbm.blocks.network;
|
||||||
|
|
||||||
|
import com.hbm.blocks.ILookOverlay;
|
||||||
|
import com.hbm.blocks.ITooltipProvider;
|
||||||
|
import com.hbm.lib.RefStrings;
|
||||||
|
import com.hbm.tileentity.network.TileEntityFluidCounterValve;
|
||||||
|
import com.hbm.util.i18n.I18nUtil;
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import net.minecraft.block.material.Material;
|
||||||
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.util.IIcon;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public class FluidCounterValve extends FluidDuctBase implements ILookOverlay, ITooltipProvider {
|
||||||
|
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
private IIcon iconOn;
|
||||||
|
|
||||||
|
public FluidCounterValve(Material mat) {
|
||||||
|
super(mat);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||||
|
this.iconOn = iconRegister.registerIcon(RefStrings.MODID + ":fluid_counter_valve_on");
|
||||||
|
this.blockIcon = iconRegister.registerIcon(RefStrings.MODID + ":fluid_counter_valve_off");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public IIcon getIcon(int side, int metadata) {
|
||||||
|
return metadata == 1 ? iconOn : blockIcon;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
|
||||||
|
return new TileEntityFluidCounterValve();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void printHook(Pre event, World world, int x, int y, int z) {
|
||||||
|
TileEntity te = world.getTileEntity(x, y, z);
|
||||||
|
|
||||||
|
if(!(te instanceof TileEntityFluidCounterValve))
|
||||||
|
return;
|
||||||
|
|
||||||
|
TileEntityFluidCounterValve duct = (TileEntityFluidCounterValve) te;
|
||||||
|
|
||||||
|
List<String> text = new ArrayList<>();
|
||||||
|
text.add("&[" + duct.getType().getColor() + "&]" + duct.getType().getLocalizedName());
|
||||||
|
text.add("Counter: " + duct.getCounter());
|
||||||
|
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||||
|
this.addStandardInfo(stack, player, list, ext);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -13,6 +13,7 @@ import com.hbm.render.block.RenderBlockMultipass;
|
|||||||
import com.hbm.tileentity.network.TileEntityPipeBaseNT;
|
import com.hbm.tileentity.network.TileEntityPipeBaseNT;
|
||||||
import com.hbm.util.i18n.I18nUtil;
|
import com.hbm.util.i18n.I18nUtil;
|
||||||
|
|
||||||
|
import com.hbm.world.gen.nbt.INBTBlockTransformable;
|
||||||
import cpw.mods.fml.common.Optional;
|
import cpw.mods.fml.common.Optional;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
@ -37,7 +38,7 @@ import java.util.ArrayList;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
||||||
public class FluidDuctGauge extends FluidDuctBase implements IBlockMultiPass, ILookOverlay, ITooltipProvider {
|
public class FluidDuctGauge extends FluidDuctBase implements IBlockMultiPass, INBTBlockTransformable, ILookOverlay, ITooltipProvider {
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT) protected IIcon overlay;
|
@SideOnly(Side.CLIENT) protected IIcon overlay;
|
||||||
@SideOnly(Side.CLIENT) protected IIcon overlayGauge;
|
@SideOnly(Side.CLIENT) protected IIcon overlayGauge;
|
||||||
@ -108,6 +109,11 @@ public class FluidDuctGauge extends FluidDuctBase implements IBlockMultiPass, IL
|
|||||||
return IBlockMultiPass.getRenderType();
|
return IBlockMultiPass.getRenderType();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int transformMeta(int meta, int coordBaseMode) {
|
||||||
|
return INBTBlockTransformable.transformMetaDeco(meta, coordBaseMode);
|
||||||
|
}
|
||||||
|
|
||||||
@Optional.InterfaceList({@Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "OpenComputers")})
|
@Optional.InterfaceList({@Optional.Interface(iface = "li.cil.oc.api.network.SimpleComponent", modid = "OpenComputers")})
|
||||||
public static class TileEntityPipeGauge extends TileEntityPipeBaseNT implements SimpleComponent, CompatHandler.OCComponent, IRORValueProvider {
|
public static class TileEntityPipeGauge extends TileEntityPipeBaseNT implements SimpleComponent, CompatHandler.OCComponent, IRORValueProvider {
|
||||||
|
|
||||||
|
|||||||
@ -98,7 +98,7 @@ public class FluidDuctPaintable extends FluidDuctBase implements IToolable, IBlo
|
|||||||
ItemBlock ib = (ItemBlock) stack.getItem();
|
ItemBlock ib = (ItemBlock) stack.getItem();
|
||||||
Block block = ib.field_150939_a;
|
Block block = ib.field_150939_a;
|
||||||
|
|
||||||
if(block.renderAsNormalBlock() && block != this) {
|
if(BlockCablePaintable.allowedPaint(block, this)) {
|
||||||
|
|
||||||
TileEntity tile = world.getTileEntity(x, y, z);
|
TileEntity tile = world.getTileEntity(x, y, z);
|
||||||
|
|
||||||
|
|||||||
@ -102,7 +102,7 @@ public class FluidDuctPaintableBlockExhaust extends FluidDuctBase implements ITo
|
|||||||
ItemBlock ib = (ItemBlock) stack.getItem();
|
ItemBlock ib = (ItemBlock) stack.getItem();
|
||||||
Block block = ib.field_150939_a;
|
Block block = ib.field_150939_a;
|
||||||
|
|
||||||
if(block.renderAsNormalBlock() && block != this) {
|
if(BlockCablePaintable.allowedPaint(block, this)) {
|
||||||
|
|
||||||
TileEntity tile = world.getTileEntity(x, y, z);
|
TileEntity tile = world.getTileEntity(x, y, z);
|
||||||
|
|
||||||
|
|||||||
121
src/main/java/com/hbm/blocks/network/FluidPipeAnchor.java
Normal file
121
src/main/java/com/hbm/blocks/network/FluidPipeAnchor.java
Normal file
@ -0,0 +1,121 @@
|
|||||||
|
package com.hbm.blocks.network;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.hbm.blocks.ILookOverlay;
|
||||||
|
import com.hbm.blocks.ITooltipProvider;
|
||||||
|
import com.hbm.inventory.fluid.FluidType;
|
||||||
|
import com.hbm.lib.Library;
|
||||||
|
import com.hbm.tileentity.network.TileEntityPipeAnchor;
|
||||||
|
import com.hbm.tileentity.network.TileEntityPipeBaseNT;
|
||||||
|
import com.hbm.util.i18n.I18nUtil;
|
||||||
|
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.block.material.Material;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.util.AxisAlignedBB;
|
||||||
|
import net.minecraft.util.EnumChatFormatting;
|
||||||
|
import net.minecraft.world.IBlockAccess;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre;
|
||||||
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
|
public class FluidPipeAnchor extends FluidDuctBase implements ITooltipProvider, ILookOverlay {
|
||||||
|
|
||||||
|
public FluidPipeAnchor() {
|
||||||
|
super(Material.iron);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TileEntity createNewTileEntity(World world, int meta) {
|
||||||
|
return new TileEntityPipeAnchor();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override public int getRenderType() { return -1; }
|
||||||
|
@Override public boolean isOpaqueCube() { return false; }
|
||||||
|
@Override public boolean renderAsNormalBlock() { return false; }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int onBlockPlaced(World world, int x, int y, int z, int side, float fX, float fY, float fZ, int meta) {
|
||||||
|
return side;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) {
|
||||||
|
setBlockBounds(world.getBlockMetadata(x, y, z));
|
||||||
|
return AxisAlignedBB.getBoundingBox(x + this.minX, y + this.minY, z + this.minZ, x + this.maxX, y + this.maxY, z + this.maxZ);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) {
|
||||||
|
setBlockBounds(world.getBlockMetadata(x, y, z));
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setBlockBounds(int meta) {
|
||||||
|
|
||||||
|
float pixel = 0.0625F;
|
||||||
|
float min = pixel * 4F;
|
||||||
|
float max = pixel * 12F;
|
||||||
|
|
||||||
|
ForgeDirection dir = ForgeDirection.getOrientation(meta).getOpposite();
|
||||||
|
|
||||||
|
float minX = dir == Library.NEG_X ? 0F : min;
|
||||||
|
float maxX = dir == Library.POS_X ? 1F : max;
|
||||||
|
float minY = dir == Library.NEG_Y ? 0F : min;
|
||||||
|
float maxY = dir == Library.POS_Y ? 1F : max;
|
||||||
|
float minZ = dir == Library.NEG_Z ? 0F : min;
|
||||||
|
float maxZ = dir == Library.POS_Z ? 1F : max;
|
||||||
|
|
||||||
|
this.setBlockBounds(minX, minY, minZ, maxX, maxY, maxZ);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||||
|
list.add(EnumChatFormatting.GOLD + "Connection Type: " + EnumChatFormatting.YELLOW + "Single");
|
||||||
|
list.add(EnumChatFormatting.GOLD + "Connection Range: " + EnumChatFormatting.YELLOW + "10m");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override // didn't think this was overridable, that makes everything so much easier. good job martin
|
||||||
|
public void changeTypeRecursively(World world, int x, int y, int z, FluidType prevType, FluidType type, int loopsRemaining) {
|
||||||
|
|
||||||
|
TileEntity te = world.getTileEntity(x, y, z);
|
||||||
|
|
||||||
|
if(te instanceof TileEntityPipeAnchor) {
|
||||||
|
TileEntityPipeAnchor pipe = (TileEntityPipeAnchor) te;
|
||||||
|
|
||||||
|
if(pipe.getType() == prevType && pipe.getType() != type) {
|
||||||
|
pipe.setType(type);
|
||||||
|
|
||||||
|
if(loopsRemaining > 0) {
|
||||||
|
ForgeDirection dir = ForgeDirection.getOrientation(pipe.getBlockMetadata()).getOpposite();
|
||||||
|
Block b = world.getBlock(x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ);
|
||||||
|
|
||||||
|
if(b instanceof IBlockFluidDuct) ((IBlockFluidDuct) b).changeTypeRecursively(world, x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ, prevType, type, loopsRemaining - 1);
|
||||||
|
|
||||||
|
for(int[] pos : pipe.getConnected()) {
|
||||||
|
Block c = world.getBlock(pos[0], pos[1], pos[2]);
|
||||||
|
if(c instanceof IBlockFluidDuct) ((IBlockFluidDuct) c).changeTypeRecursively(world, pos[0], pos[1], pos[2], prevType, type, loopsRemaining - 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void printHook(Pre event, World world, int x, int y, int z) {
|
||||||
|
|
||||||
|
TileEntity te = world.getTileEntity(x, y, z);
|
||||||
|
|
||||||
|
if(!(te instanceof TileEntityPipeBaseNT))
|
||||||
|
return;
|
||||||
|
|
||||||
|
TileEntityPipeBaseNT duct = (TileEntityPipeBaseNT) te;
|
||||||
|
|
||||||
|
List<String> text = new ArrayList();
|
||||||
|
text.add("&[" + duct.getType().getColor() + "&]" + duct.getType().getLocalizedName());
|
||||||
|
ILookOverlay.printGeneric(event, I18nUtil.resolveKey(getUnlocalizedName() + ".name"), 0xffff00, 0x404000, text);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -347,6 +347,7 @@ public class FluidPump extends BlockContainer implements INBTBlockTransformable,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
public static class GUIPump extends GuiScreen {
|
public static class GUIPump extends GuiScreen {
|
||||||
|
|
||||||
protected final TileEntityFluidPump pump;
|
protected final TileEntityFluidPump pump;
|
||||||
|
|||||||
88
src/main/java/com/hbm/blocks/network/MachineBatteryREDD.java
Normal file
88
src/main/java/com/hbm/blocks/network/MachineBatteryREDD.java
Normal file
@ -0,0 +1,88 @@
|
|||||||
|
package com.hbm.blocks.network;
|
||||||
|
|
||||||
|
import java.math.BigInteger;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.hbm.blocks.BlockDummyable;
|
||||||
|
import com.hbm.blocks.IPersistentInfoProvider;
|
||||||
|
import com.hbm.tileentity.IPersistentNBT;
|
||||||
|
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||||
|
import com.hbm.tileentity.machine.storage.TileEntityBatteryREDD;
|
||||||
|
import com.hbm.util.BobMathUtil;
|
||||||
|
|
||||||
|
import net.minecraft.block.material.Material;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
import net.minecraft.stats.StatList;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.util.EnumChatFormatting;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
|
public class MachineBatteryREDD extends BlockDummyable implements IPersistentInfoProvider {
|
||||||
|
|
||||||
|
public MachineBatteryREDD() {
|
||||||
|
super(Material.iron);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TileEntity createNewTileEntity(World world, int meta) {
|
||||||
|
if(meta >= 12) return new TileEntityBatteryREDD();
|
||||||
|
if(meta >= 6) return new TileEntityProxyCombo().power().conductor();
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||||
|
return standardOpenBehavior(world, x, y, z, player, side);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override public int[] getDimensions() { return new int[] {9, 0, 2, 2, 4, 4}; }
|
||||||
|
@Override public int getOffset() { return 2; }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||||
|
super.fillSpace(world, x, y, z, dir, o);
|
||||||
|
|
||||||
|
x += dir.offsetX * o;
|
||||||
|
z += dir.offsetZ * o;
|
||||||
|
|
||||||
|
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||||
|
|
||||||
|
this.makeExtra(world, x + dir.offsetX * 2 + rot.offsetX * 2, y, z + dir.offsetZ * 2 + rot.offsetZ * 2);
|
||||||
|
this.makeExtra(world, x + dir.offsetX * 2 - rot.offsetX * 2, y, z + dir.offsetZ * 2 - rot.offsetZ * 2);
|
||||||
|
this.makeExtra(world, x - dir.offsetX * 2 + rot.offsetX * 2, y, z - dir.offsetZ * 2 + rot.offsetZ * 2);
|
||||||
|
this.makeExtra(world, x - dir.offsetX * 2 - rot.offsetX * 2, y, z - dir.offsetZ * 2 - rot.offsetZ * 2);
|
||||||
|
this.makeExtra(world, x + rot.offsetX * 4, y, z + rot.offsetZ * 4);
|
||||||
|
this.makeExtra(world, x - rot.offsetX * 4, y, z - rot.offsetZ * 4);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ArrayList<ItemStack> getDrops(World world, int x, int y, int z, int metadata, int fortune) {
|
||||||
|
return IPersistentNBT.getDrops(world, x, y, z, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onBlockHarvested(World world, int x, int y, int z, int meta, EntityPlayer player) {
|
||||||
|
|
||||||
|
if(!player.capabilities.isCreativeMode) {
|
||||||
|
harvesters.set(player);
|
||||||
|
this.dropBlockAsItem(world, x, y, z, meta, 0);
|
||||||
|
harvesters.set(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void harvestBlock(World world, EntityPlayer player, int x, int y, int z, int meta) {
|
||||||
|
player.addStat(StatList.mineBlockStatArray[getIdFromBlock(this)], 1);
|
||||||
|
player.addExhaustion(0.025F);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addInformation(ItemStack stack, NBTTagCompound persistentTag, EntityPlayer player, List list, boolean ext) {
|
||||||
|
if(persistentTag != null && persistentTag.hasKey("power"))
|
||||||
|
list.add(EnumChatFormatting.YELLOW + "" + BobMathUtil.format(new BigInteger(persistentTag.getByteArray("power"))) + " HE");
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,95 @@
|
|||||||
|
package com.hbm.blocks.network;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.hbm.blocks.BlockDummyable;
|
||||||
|
import com.hbm.blocks.ILookOverlay;
|
||||||
|
import com.hbm.blocks.ITooltipProvider;
|
||||||
|
import com.hbm.tileentity.TileEntityProxyCombo;
|
||||||
|
import com.hbm.tileentity.machine.storage.TileEntityBatterySocket;
|
||||||
|
import com.hbm.util.BobMathUtil;
|
||||||
|
|
||||||
|
import net.minecraft.block.material.Material;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.client.event.RenderGameOverlayEvent.Pre;
|
||||||
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
|
public class MachineBatterySocket extends BlockDummyable implements ITooltipProvider, ILookOverlay {
|
||||||
|
|
||||||
|
public MachineBatterySocket() {
|
||||||
|
super(Material.iron);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TileEntity createNewTileEntity(World world, int meta) {
|
||||||
|
if(meta >= 12) return new TileEntityBatterySocket();
|
||||||
|
if(meta >= 6) return new TileEntityProxyCombo().inventory().power().conductor();
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||||
|
return standardOpenBehavior(world, x, y, z, player, side);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override public int[] getDimensions() { return new int[] {1, 0, 1, 0, 1, 0}; }
|
||||||
|
@Override public int getOffset() { return 0; }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void fillSpace(World world, int x, int y, int z, ForgeDirection dir, int o) {
|
||||||
|
super.fillSpace(world, x, y, z, dir, o);
|
||||||
|
|
||||||
|
ForgeDirection rot = dir.getRotation(ForgeDirection.UP);
|
||||||
|
this.makeExtra(world, x - dir.offsetX, y, z - dir.offsetZ);
|
||||||
|
this.makeExtra(world, x + rot.offsetX, y, z + rot.offsetZ);
|
||||||
|
this.makeExtra(world, x - dir.offsetX + rot.offsetX, y, z - dir.offsetZ + rot.offsetZ);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean ext) {
|
||||||
|
addStandardInfo(stack, player, list, ext);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean hasComparatorInputOverride() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getComparatorInputOverride(World world, int x, int y, int z, int side) {
|
||||||
|
if(world.getBlockMetadata(x, y, z) < 6) return 0;
|
||||||
|
int[] pos = this.findCore(world, x, y, z);
|
||||||
|
if(pos == null) return 0;
|
||||||
|
TileEntity te = world.getTileEntity(pos[0], pos[1], pos[2]);
|
||||||
|
if(!(te instanceof TileEntityBatterySocket)) return 0;
|
||||||
|
|
||||||
|
TileEntityBatterySocket battery = (TileEntityBatterySocket) te;
|
||||||
|
return battery.getComparatorPower();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void printHook(Pre event, World world, int x, int y, int z) {
|
||||||
|
|
||||||
|
int[] pos = this.findCore(world, x, y, z);
|
||||||
|
if(pos == null) return;
|
||||||
|
TileEntity te = world.getTileEntity(pos[0], pos[1], pos[2]);
|
||||||
|
if(!(te instanceof TileEntityBatterySocket)) return;
|
||||||
|
TileEntityBatterySocket socket = (TileEntityBatterySocket) te;
|
||||||
|
if(socket.syncStack == null) return;
|
||||||
|
|
||||||
|
List<String> text = new ArrayList();
|
||||||
|
text.add(BobMathUtil.getShortNumber(socket.syncPower) + " / " + BobMathUtil.getShortNumber(socket.syncMaxPower) + "HE");
|
||||||
|
|
||||||
|
double percent = (double) socket.syncPower / socket.syncMaxPower;
|
||||||
|
int charge = (int) Math.floor(percent * 10_000D);
|
||||||
|
int color = ((int) (0xFF - 0xFF * percent)) << 16 | ((int)(0xFF * percent) << 8);
|
||||||
|
|
||||||
|
text.add("&[" + color + "&]" + (charge / 100D) + "%");
|
||||||
|
|
||||||
|
ILookOverlay.printGeneric(event, socket.syncStack.getDisplayName(), 0xffff00, 0x404000, text);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -96,6 +96,9 @@ public class PneumoTube extends BlockContainer implements IToolable, ITooltipPro
|
|||||||
if(tube.isCompressor()) {
|
if(tube.isCompressor()) {
|
||||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, x, y, z);
|
FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, x, y, z);
|
||||||
return true;
|
return true;
|
||||||
|
} else if(tube.isEndpoint()) {
|
||||||
|
FMLNetworkHandler.openGui(player, MainRegistry.instance, 1, world, x, y, z);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@ -36,10 +36,10 @@ public class PneumoTubePaintableBlock extends BlockContainer implements IToolabl
|
|||||||
@SideOnly(Side.CLIENT) public IIcon overlayIn;
|
@SideOnly(Side.CLIENT) public IIcon overlayIn;
|
||||||
@SideOnly(Side.CLIENT) public IIcon overlayOut;
|
@SideOnly(Side.CLIENT) public IIcon overlayOut;
|
||||||
|
|
||||||
public PneumoTubePaintableBlock() {super(Material.iron);}
|
public PneumoTubePaintableBlock() { super(Material.iron); }
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TileEntity createNewTileEntity(World world, int meta) {return new TileEntityPneumoTubePaintable();}
|
public TileEntity createNewTileEntity(World world, int meta) { return new TileEntityPneumoTubePaintable(); }
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
@ -55,18 +55,18 @@ public class PneumoTubePaintableBlock extends BlockContainer implements IToolabl
|
|||||||
public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side) {
|
public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side) {
|
||||||
TileEntity tile = world.getTileEntity(x, y, z);
|
TileEntity tile = world.getTileEntity(x, y, z);
|
||||||
|
|
||||||
if (tile instanceof TileEntityPneumoTubePaintable) {
|
if(tile instanceof TileEntityPneumoTubePaintable) {
|
||||||
TileEntityPneumoTubePaintable tube = (TileEntityPneumoTubePaintable) tile;
|
TileEntityPneumoTubePaintable tube = (TileEntityPneumoTubePaintable) tile;
|
||||||
|
|
||||||
if (RenderBlockMultipass.currentPass == 0) {
|
if(RenderBlockMultipass.currentPass == 0) {
|
||||||
if (tube.block != null) {
|
if(tube.block != null) {
|
||||||
return tube.block.getIcon(side, tube.meta);
|
return tube.block.getIcon(side, tube.meta);
|
||||||
} else {
|
} else {
|
||||||
return this.blockIcon;
|
return this.blockIcon;
|
||||||
}
|
}
|
||||||
} else if (tube.ejectionDir.ordinal() == side) {
|
} else if(tube.ejectionDir.ordinal() == side) {
|
||||||
return this.overlayIn;
|
return this.overlayIn;
|
||||||
} else if (tube.insertionDir.ordinal() == side) {
|
} else if(tube.insertionDir.ordinal() == side) {
|
||||||
return this.overlayOut;
|
return this.overlayOut;
|
||||||
} else {
|
} else {
|
||||||
return this.overlay;
|
return this.overlay;
|
||||||
@ -84,39 +84,43 @@ public class PneumoTubePaintableBlock extends BlockContainer implements IToolabl
|
|||||||
@Override
|
@Override
|
||||||
public boolean onScrew(World world, EntityPlayer player, int x, int y, int z, int side, float fX, float fY, float fZ, ToolType tool) {
|
public boolean onScrew(World world, EntityPlayer player, int x, int y, int z, int side, float fX, float fY, float fZ, ToolType tool) {
|
||||||
|
|
||||||
if (tool == ToolType.HAND_DRILL) {
|
if(tool == ToolType.HAND_DRILL) {
|
||||||
|
|
||||||
TileEntity tile = world.getTileEntity(x, y, z);
|
TileEntity tile = world.getTileEntity(x, y, z);
|
||||||
if (tile instanceof TileEntityPneumoTubePaintable) {
|
if(tile instanceof TileEntityPneumoTubePaintable) {
|
||||||
TileEntityPneumoTubePaintable tube = (TileEntityPneumoTubePaintable) tile;
|
TileEntityPneumoTubePaintable tube = (TileEntityPneumoTubePaintable) tile;
|
||||||
|
|
||||||
if (tube.block != null) {
|
if(tube.block != null) {
|
||||||
tube.block = null;
|
tube.block = null;
|
||||||
world.markBlockForUpdate(x, y, z);
|
world.markBlockForUpdate(x, y, z);
|
||||||
tube.markDirty();
|
tube.markDirty();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (tool == ToolType.SCREWDRIVER) {
|
} else if(tool == ToolType.SCREWDRIVER) {
|
||||||
|
|
||||||
if (world.isRemote) return true;
|
if(world.isRemote) return true;
|
||||||
TileEntityPneumoTube tube = (TileEntityPneumoTube) world.getTileEntity(x, y, z);
|
TileEntityPneumoTube tube = (TileEntityPneumoTube) world.getTileEntity(x, y, z);
|
||||||
|
|
||||||
ForgeDirection rot = player.isSneaking() ? tube.ejectionDir : tube.insertionDir;
|
ForgeDirection rot = player.isSneaking() ? tube.ejectionDir : tube.insertionDir;
|
||||||
ForgeDirection oth = player.isSneaking() ? tube.insertionDir : tube.ejectionDir;
|
ForgeDirection oth = player.isSneaking() ? tube.insertionDir : tube.ejectionDir;
|
||||||
|
|
||||||
for (int i = 0; i < 7; i++) {
|
for(int i = 0; i < 7; i++) {
|
||||||
rot = ForgeDirection.getOrientation((rot.ordinal() + 1) % 7);
|
rot = ForgeDirection.getOrientation((rot.ordinal() + 1) % 7);
|
||||||
if (rot == ForgeDirection.UNKNOWN) break; //unknown is always valid, simply disables this part
|
if(rot == ForgeDirection.UNKNOWN) break; // unknown is always valid, simply disables this part
|
||||||
if (rot == oth) continue; //skip if both positions collide
|
if(rot == oth) continue; // skip if both positions collide
|
||||||
TileEntity tile = Compat.getTileStandard(world, x + rot.offsetX, y + rot.offsetY, z + rot.offsetZ);
|
TileEntity tile = Compat.getTileStandard(world, x + rot.offsetX, y + rot.offsetY, z + rot.offsetZ);
|
||||||
if (tile instanceof TileEntityPneumoTube) continue;
|
if(tile instanceof TileEntityPneumoTube) continue;
|
||||||
if (tile instanceof IInventory) break; //valid if connected to an IInventory
|
if(tile instanceof IInventory) break; // valid if connected to an IInventory
|
||||||
}
|
}
|
||||||
|
|
||||||
if(player.isSneaking()) tube.ejectionDir = rot; else tube.insertionDir = rot;
|
if(player.isSneaking())
|
||||||
|
tube.ejectionDir = rot;
|
||||||
|
else
|
||||||
|
tube.insertionDir = rot;
|
||||||
|
|
||||||
tube.markDirty();
|
tube.markDirty();
|
||||||
if(world instanceof WorldServer) ((WorldServer) world).getPlayerManager().markBlockForUpdate(x, y, z);
|
if(world instanceof WorldServer)
|
||||||
|
((WorldServer) world).getPlayerManager().markBlockForUpdate(x, y, z);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -127,16 +131,16 @@ public class PneumoTubePaintableBlock extends BlockContainer implements IToolabl
|
|||||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float fX, float fY, float fZ) {
|
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float fX, float fY, float fZ) {
|
||||||
|
|
||||||
ItemStack stack = player.getHeldItem();
|
ItemStack stack = player.getHeldItem();
|
||||||
if (stack != null && stack.getItem() instanceof ItemBlock) {
|
if(stack != null && stack.getItem() instanceof ItemBlock) {
|
||||||
ItemBlock ib = (ItemBlock) stack.getItem();
|
ItemBlock ib = (ItemBlock) stack.getItem();
|
||||||
Block block = ib.field_150939_a;
|
Block block = ib.field_150939_a;
|
||||||
|
|
||||||
if (block.renderAsNormalBlock() && block != this) {
|
if(BlockCablePaintable.allowedPaint(block, this)) {
|
||||||
TileEntity tile = world.getTileEntity(x, y, z);
|
TileEntity tile = world.getTileEntity(x, y, z);
|
||||||
if (tile instanceof TileEntityPneumoTubePaintable) {
|
if(tile instanceof TileEntityPneumoTubePaintable) {
|
||||||
TileEntityPneumoTubePaintable tube = (TileEntityPneumoTubePaintable) tile;
|
TileEntityPneumoTubePaintable tube = (TileEntityPneumoTubePaintable) tile;
|
||||||
|
|
||||||
if (tube.block == null) {
|
if(tube.block == null) {
|
||||||
tube.block = block;
|
tube.block = block;
|
||||||
tube.meta = stack.getItemDamage() & 15;
|
tube.meta = stack.getItemDamage() & 15;
|
||||||
world.markBlockForUpdate(x, y, z);
|
world.markBlockForUpdate(x, y, z);
|
||||||
@ -145,17 +149,22 @@ public class PneumoTubePaintableBlock extends BlockContainer implements IToolabl
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (ToolType.getType(stack) == ToolType.SCREWDRIVER || ToolType.getType(stack) == ToolType.HAND_DRILL) return false;
|
} else if(ToolType.getType(stack) == ToolType.SCREWDRIVER || ToolType.getType(stack) == ToolType.HAND_DRILL) return false;
|
||||||
if (!player.isSneaking()) {
|
|
||||||
TileEntity tile = world.getTileEntity(x, y, z);
|
if(!player.isSneaking()) {
|
||||||
if (tile instanceof TileEntityPneumoTube) {
|
TileEntity tile = world.getTileEntity(x, y, z);
|
||||||
TileEntityPneumoTube tube = (TileEntityPneumoTube) tile;
|
if(tile instanceof TileEntityPneumoTube) {
|
||||||
if (tube.isCompressor()) {
|
TileEntityPneumoTube tube = (TileEntityPneumoTube) tile;
|
||||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, x, y, z);
|
if(tube.isCompressor()) {
|
||||||
return true;
|
FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, x, y, z);
|
||||||
}
|
return true;
|
||||||
|
} else if(tube.isEndpoint()) {
|
||||||
|
FMLNetworkHandler.openGui(player, MainRegistry.instance, 1, world, x, y, z);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -170,7 +179,7 @@ public class PneumoTubePaintableBlock extends BlockContainer implements IToolabl
|
|||||||
public void updateEntity() {
|
public void updateEntity() {
|
||||||
super.updateEntity();
|
super.updateEntity();
|
||||||
|
|
||||||
if (worldObj.isRemote && (lastMeta != meta || lastBlock != block )) {
|
if(worldObj.isRemote && (lastMeta != meta || lastBlock != block)) {
|
||||||
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
|
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||||
lastBlock = block;
|
lastBlock = block;
|
||||||
lastMeta = meta;
|
lastMeta = meta;
|
||||||
|
|||||||
270
src/main/java/com/hbm/blocks/network/PowerCableBox.java
Normal file
270
src/main/java/com/hbm/blocks/network/PowerCableBox.java
Normal file
@ -0,0 +1,270 @@
|
|||||||
|
package com.hbm.blocks.network;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.hbm.blocks.IBlockMulti;
|
||||||
|
import com.hbm.lib.Library;
|
||||||
|
import com.hbm.lib.RefStrings;
|
||||||
|
import com.hbm.tileentity.network.TileEntityCableBaseNT;
|
||||||
|
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import net.minecraft.block.BlockContainer;
|
||||||
|
import net.minecraft.block.material.Material;
|
||||||
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||||
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
|
import net.minecraft.entity.Entity;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraft.util.AxisAlignedBB;
|
||||||
|
import net.minecraft.util.IIcon;
|
||||||
|
import net.minecraft.world.IBlockAccess;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
|
|
||||||
|
public class PowerCableBox extends BlockContainer implements IBlockMulti {
|
||||||
|
|
||||||
|
@SideOnly(Side.CLIENT) public IIcon iconStraight;
|
||||||
|
@SideOnly(Side.CLIENT) public IIcon[] iconEnd;
|
||||||
|
@SideOnly(Side.CLIENT) public IIcon iconCurveTL;
|
||||||
|
@SideOnly(Side.CLIENT) public IIcon iconCurveTR;
|
||||||
|
@SideOnly(Side.CLIENT) public IIcon iconCurveBL;
|
||||||
|
@SideOnly(Side.CLIENT) public IIcon iconCurveBR;
|
||||||
|
@SideOnly(Side.CLIENT) public IIcon iconJunction;
|
||||||
|
|
||||||
|
public PowerCableBox(Material mat) {
|
||||||
|
super(mat);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public TileEntity createNewTileEntity(World world, int meta) {
|
||||||
|
return new TileEntityCableBaseNT();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public void registerBlockIcons(IIconRegister iconRegister) {
|
||||||
|
super.registerBlockIcons(iconRegister);
|
||||||
|
|
||||||
|
iconEnd = new IIcon[5];
|
||||||
|
|
||||||
|
iconStraight = iconRegister.registerIcon(RefStrings.MODID + ":boxduct_" + "cable" + "_straight");
|
||||||
|
for(int i = 0; i < 5; i++) iconEnd[i] = iconRegister.registerIcon(RefStrings.MODID + ":boxduct_" + "cable" + "_end_" + i);
|
||||||
|
iconCurveTL = iconRegister.registerIcon(RefStrings.MODID + ":boxduct_" + "cable" + "_curve_tl");
|
||||||
|
iconCurveTR = iconRegister.registerIcon(RefStrings.MODID + ":boxduct_" + "cable" + "_curve_tr");
|
||||||
|
iconCurveBL = iconRegister.registerIcon(RefStrings.MODID + ":boxduct_" + "cable" + "_curve_bl");
|
||||||
|
iconCurveBR = iconRegister.registerIcon(RefStrings.MODID + ":boxduct_" + "cable" + "_curve_br");
|
||||||
|
iconJunction = iconRegister.registerIcon(RefStrings.MODID + ":boxduct_" + "cable" + "_junction");
|
||||||
|
}
|
||||||
|
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side) {
|
||||||
|
|
||||||
|
TileEntity te = world.getTileEntity(x, y, z);
|
||||||
|
|
||||||
|
boolean nX = canConnectTo(world, x, y, z, Library.NEG_X, te);
|
||||||
|
boolean pX = canConnectTo(world, x, y, z, Library.POS_X, te);
|
||||||
|
boolean nY = canConnectTo(world, x, y, z, Library.NEG_Y, te);
|
||||||
|
boolean pY = canConnectTo(world, x, y, z, Library.POS_Y, te);
|
||||||
|
boolean nZ = canConnectTo(world, x, y, z, Library.NEG_Z, te);
|
||||||
|
boolean pZ = canConnectTo(world, x, y, z, Library.POS_Z, te);
|
||||||
|
|
||||||
|
int mask = 0 + (pX ? 32 : 0) + (nX ? 16 : 0) + (pY ? 8 : 0) + (nY ? 4 : 0) + (pZ ? 2 : 0) + (nZ ? 1 : 0);
|
||||||
|
int count = 0 + (pX ? 1 : 0) + (nX ? 1 : 0) + (pY ? 1 : 0) + (nY ? 1 : 0) + (pZ ? 1 : 0) + (nZ ? 1 : 0);
|
||||||
|
|
||||||
|
int meta = world.getBlockMetadata(x, y, z);
|
||||||
|
|
||||||
|
if((mask & 0b001111) == 0 && mask > 0) {
|
||||||
|
return (side == 4 || side == 5) ? iconEnd[meta] : iconStraight;
|
||||||
|
} else if((mask & 0b111100) == 0 && mask > 0) {
|
||||||
|
return (side == 2 || side == 3) ? iconEnd[meta] : iconStraight;
|
||||||
|
} else if((mask & 0b110011) == 0 && mask > 0) {
|
||||||
|
return (side == 0 || side == 1) ? iconEnd[meta] : iconStraight;
|
||||||
|
} else {
|
||||||
|
|
||||||
|
if(side == 0 && nY || side == 1 && pY || side == 2 && nZ || side == 3 && pZ || side == 4 && nX || side == 5 && pX)
|
||||||
|
return iconEnd[meta];
|
||||||
|
|
||||||
|
if(count == 2) {
|
||||||
|
if(side == 1 && nY || side == 0 && pY || side == 3 && nZ || side == 2 && pZ || side == 5 && nX || side == 4 && pX)
|
||||||
|
return iconStraight;
|
||||||
|
|
||||||
|
if(nY && pZ) return side == 4 ? iconCurveBR : iconCurveBL;
|
||||||
|
if(nY && nZ) return side == 5 ? iconCurveBR : iconCurveBL;
|
||||||
|
if(nY && pX) return side == 3 ? iconCurveBR : iconCurveBL;
|
||||||
|
if(nY && nX) return side == 2 ? iconCurveBR : iconCurveBL;
|
||||||
|
if(pY && pZ) return side == 4 ? iconCurveTR : iconCurveTL;
|
||||||
|
if(pY && nZ) return side == 5 ? iconCurveTR : iconCurveTL;
|
||||||
|
if(pY && pX) return side == 3 ? iconCurveTR : iconCurveTL;
|
||||||
|
if(pY && nX) return side == 2 ? iconCurveTR : iconCurveTL;
|
||||||
|
|
||||||
|
if(pX && nZ) return side == 0 ? iconCurveTR : iconCurveTR;
|
||||||
|
if(pX && pZ) return side == 0 ? iconCurveBR : iconCurveBR;
|
||||||
|
if(nX && nZ) return side == 0 ? iconCurveTL : iconCurveTL;
|
||||||
|
if(nX && pZ) return side == 0 ? iconCurveBL : iconCurveBL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return iconJunction;
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public void getSubBlocks(Item item, CreativeTabs tab, List list) {
|
||||||
|
for(int i = 0; i < 5; ++i) {
|
||||||
|
list.add(new ItemStack(item, 1, i));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public int damageDropped(int meta) {
|
||||||
|
return meta % 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getRenderType() {
|
||||||
|
return FluidDuctBox.renderID;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isOpaqueCube() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean renderAsNormalBlock() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public boolean shouldSideBeRendered(IBlockAccess world, int x, int y, int z, int side) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||||
|
@Override
|
||||||
|
public void addCollisionBoxesToList(World world, int x, int y, int z, AxisAlignedBB entityBounding, List list, Entity entity) {
|
||||||
|
|
||||||
|
List<AxisAlignedBB> bbs = new ArrayList<>();
|
||||||
|
|
||||||
|
TileEntity te = world.getTileEntity(x, y, z);
|
||||||
|
|
||||||
|
double lower = 0.125D;
|
||||||
|
double upper = 0.875D;
|
||||||
|
int meta = world.getBlockMetadata(x, y, z);
|
||||||
|
|
||||||
|
for(int i = 0; i < 5; i++) {
|
||||||
|
|
||||||
|
if(meta > i) {
|
||||||
|
lower += 0.0625D;
|
||||||
|
upper -= 0.0625D;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean nX = canConnectTo(world, x, y, z, Library.NEG_X, te);
|
||||||
|
boolean pX = canConnectTo(world, x, y, z, Library.POS_X, te);
|
||||||
|
boolean nY = canConnectTo(world, x, y, z, Library.NEG_Y, te);
|
||||||
|
boolean pY = canConnectTo(world, x, y, z, Library.POS_Y, te);
|
||||||
|
boolean nZ = canConnectTo(world, x, y, z, Library.NEG_Z, te);
|
||||||
|
boolean pZ = canConnectTo(world, x, y, z, Library.POS_Z, te);
|
||||||
|
int mask = 0 + (pX ? 32 : 0) + (nX ? 16 : 0) + (pY ? 8 : 0) + (nY ? 4 : 0) + (pZ ? 2 : 0) + (nZ ? 1 : 0);
|
||||||
|
|
||||||
|
if(mask == 0) {
|
||||||
|
bbs.add(AxisAlignedBB.getBoundingBox(x + lower, y + lower, z + lower, x + upper, y + upper, z + upper));
|
||||||
|
} else if(mask == 0b100000 || mask == 0b010000 || mask == 0b110000) {
|
||||||
|
bbs.add(AxisAlignedBB.getBoundingBox(x + 0.0D, y + lower, z + lower, x + 1.0D, y + upper, z + upper));
|
||||||
|
} else if(mask == 0b001000 || mask == 0b000100 || mask == 0b001100) {
|
||||||
|
bbs.add(AxisAlignedBB.getBoundingBox(x + lower, y + 0.0D, z + lower, x + upper, y + 1.0D, z + upper));
|
||||||
|
} else if(mask == 0b000010 || mask == 0b000001 || mask == 0b000011) {
|
||||||
|
bbs.add(AxisAlignedBB.getBoundingBox(x + lower, y + lower, z + 0.0D, x + upper, y + upper, z + 1.0D));
|
||||||
|
} else {
|
||||||
|
bbs.add(AxisAlignedBB.getBoundingBox(x + lower, y + lower, z + lower, x + upper, y + upper, z + upper));
|
||||||
|
|
||||||
|
if(pX) bbs.add(AxisAlignedBB.getBoundingBox(x + upper, y + lower, z + lower, x + 1.0D, y + upper, z + upper));
|
||||||
|
if(nX) bbs.add(AxisAlignedBB.getBoundingBox(x + 0.0D, y + lower, z + lower, x + lower, y + upper, z + upper));
|
||||||
|
if(pY) bbs.add(AxisAlignedBB.getBoundingBox(x + lower, y + upper, z + lower, x + upper, y + 1.0D, z + upper));
|
||||||
|
if(nY) bbs.add(AxisAlignedBB.getBoundingBox(x + lower, y + 0.0D, z + lower, x + upper, y + lower, z + upper));
|
||||||
|
if(pZ) bbs.add(AxisAlignedBB.getBoundingBox(x + lower, y + lower, z + upper, x + upper, y + upper, z + 1.0D));
|
||||||
|
if(nZ) bbs.add(AxisAlignedBB.getBoundingBox(x + lower, y + lower, z + 0.0D, x + upper, y + upper, z + lower));
|
||||||
|
}
|
||||||
|
|
||||||
|
for(AxisAlignedBB bb : bbs) {
|
||||||
|
if(entityBounding.intersectsWith(bb)) {
|
||||||
|
list.add(bb);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) {
|
||||||
|
setBlockBoundsBasedOnState(world, x, y, z);
|
||||||
|
return AxisAlignedBB.getBoundingBox(x + this.minX, y + this.minY, z + this.minZ, x + this.maxX, y + this.maxY, z + this.maxZ);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public AxisAlignedBB getSelectedBoundingBoxFromPool(World world, int x, int y, int z) {
|
||||||
|
setBlockBoundsBasedOnState(world, x, y, z);
|
||||||
|
return AxisAlignedBB.getBoundingBox(x + this.minX, y + this.minY, z + this.minZ, x + this.maxX, y + this.maxY, z + this.maxZ);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) {
|
||||||
|
|
||||||
|
TileEntity te = world.getTileEntity(x, y, z);
|
||||||
|
|
||||||
|
float lower = 0.125F;
|
||||||
|
float upper = 0.875F;
|
||||||
|
int meta = world.getBlockMetadata(x, y, z);
|
||||||
|
|
||||||
|
for(int i = 0; i < 5; i++) {
|
||||||
|
|
||||||
|
if(meta > i) {
|
||||||
|
lower += 0.0625F;
|
||||||
|
upper -= 0.0625F;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean nX = canConnectTo(world, x, y, z, Library.NEG_X, te);
|
||||||
|
boolean pX = canConnectTo(world, x, y, z, Library.POS_X, te);
|
||||||
|
boolean nY = canConnectTo(world, x, y, z, Library.NEG_Y, te);
|
||||||
|
boolean pY = canConnectTo(world, x, y, z, Library.POS_Y, te);
|
||||||
|
boolean nZ = canConnectTo(world, x, y, z, Library.NEG_Z, te);
|
||||||
|
boolean pZ = canConnectTo(world, x, y, z, Library.POS_Z, te);
|
||||||
|
int mask = 0 + (pX ? 32 : 0) + (nX ? 16 : 0) + (pY ? 8 : 0) + (nY ? 4 : 0) + (pZ ? 2 : 0) + (nZ ? 1 : 0);
|
||||||
|
|
||||||
|
if(mask == 0) {
|
||||||
|
this.setBlockBounds(lower, lower, lower, upper, upper, upper);
|
||||||
|
} else if(mask == 0b100000 || mask == 0b010000 || mask == 0b110000) {
|
||||||
|
this.setBlockBounds(0F, lower, lower, 1F, upper, upper);
|
||||||
|
} else if(mask == 0b001000 || mask == 0b000100 || mask == 0b001100) {
|
||||||
|
this.setBlockBounds(lower, 0F, lower, upper, 1F, upper);
|
||||||
|
} else if(mask == 0b000010 || mask == 0b000001 || mask == 0b000011) {
|
||||||
|
this.setBlockBounds(lower, lower, 0F, upper, upper, 1F);
|
||||||
|
} else {
|
||||||
|
|
||||||
|
this.setBlockBounds(
|
||||||
|
nX ? 0F : lower,
|
||||||
|
nY ? 0F : lower,
|
||||||
|
nZ ? 0F : lower,
|
||||||
|
pX ? 1F : upper,
|
||||||
|
pY ? 1F : upper,
|
||||||
|
pZ ? 1F : upper);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean canConnectTo(IBlockAccess world, int x, int y, int z, ForgeDirection dir, TileEntity tile) {
|
||||||
|
if(tile instanceof TileEntityCableBaseNT) {
|
||||||
|
return Library.canConnect(world, x + dir.offsetX, y + dir.offsetY, z + dir.offsetZ, dir);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getSubCount() {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -28,7 +28,7 @@ public abstract class PylonBase extends BlockContainer implements ITooltipProvid
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getRenderType(){
|
public int getRenderType() {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,14 +0,0 @@
|
|||||||
package com.hbm.calc;
|
|
||||||
|
|
||||||
public class EasyLocation {
|
|
||||||
|
|
||||||
public double posX;
|
|
||||||
public double posY;
|
|
||||||
public double posZ;
|
|
||||||
|
|
||||||
public EasyLocation(double x, double y, double z) {
|
|
||||||
posX = x;
|
|
||||||
posY = y;
|
|
||||||
posZ = z;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,33 +0,0 @@
|
|||||||
package com.hbm.calc;
|
|
||||||
|
|
||||||
import net.minecraft.tileentity.TileEntity;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
|
||||||
|
|
||||||
public class Location {
|
|
||||||
|
|
||||||
public int x;
|
|
||||||
public int y;
|
|
||||||
public int z;
|
|
||||||
public World world;
|
|
||||||
|
|
||||||
public Location(World world, int x, int y, int z) {
|
|
||||||
this.world = world;
|
|
||||||
this.x = x;
|
|
||||||
this.y = y;
|
|
||||||
this.z = z;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Location add(int xa, int ya, int za) {
|
|
||||||
return new Location(world, x + xa, y + ya, z + za);
|
|
||||||
}
|
|
||||||
|
|
||||||
public Location add(ForgeDirection dir) {
|
|
||||||
return add(dir.offsetX, dir.offsetY, dir.offsetZ);
|
|
||||||
}
|
|
||||||
|
|
||||||
public TileEntity getTileEntity() {
|
|
||||||
return world.getTileEntity(x, y, z);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user