mirror of
https://github.com/GTNewHorizons/waila.git
synced 2026-11-15 01:25:16 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9b3cf62785 | ||
|
|
0bb6caf334 | ||
|
|
5ac5f7956c | ||
|
|
d00c17b3bb | ||
|
|
52ac40a10e | ||
|
|
40facdda4b | ||
|
|
3505888a82 | ||
|
|
7eb35b7544 | ||
|
|
78039db017 | ||
|
|
17b5cbead9 | ||
|
|
d355ec28bb | ||
|
|
bd675cee28 | ||
|
|
7c74db3640 | ||
|
|
b65dc58fc6 | ||
|
|
1438d6a701 | ||
|
|
223e2c7da6 | ||
|
|
1aed35a2b5 | ||
|
|
96a0d27778 | ||
|
|
aecf8c0330 | ||
|
|
4c1803accf | ||
|
|
3ce45461eb | ||
|
|
90dd086cc3 | ||
|
|
fb9de99f39 | ||
|
|
1580296a2c | ||
|
|
9d272f2e34 | ||
|
|
2259e27f60 | ||
|
|
716498256b | ||
|
|
bcd36dd638 | ||
|
|
f790ac948d | ||
|
|
f282be75f4 | ||
|
|
ec1ab8e548 | ||
|
|
add57cbd6b | ||
|
|
ce249c806e | ||
|
|
3f6da9018c | ||
|
|
2b7f3866a5 | ||
|
|
b83d5bd297 | ||
|
|
4e7e32fba7 | ||
|
|
2346ffd559 | ||
|
|
49a2a32a77 | ||
|
|
47fb4c55a8 | ||
|
|
b6b5404440 | ||
|
|
89fc1c8ce7 | ||
|
|
79107209d9 | ||
|
|
3533ea2d23 | ||
|
|
f1a4056431 | ||
|
|
dcc35737be | ||
|
|
4a3015eb21 | ||
|
|
d3a317e3dd | ||
|
|
9d1045333a | ||
|
|
80e30abec3 | ||
|
|
2dd88b9c13 | ||
|
|
f46d9393b5 | ||
|
|
d2f8911797 | ||
|
|
a1365b2db3 | ||
|
|
0988ee744e | ||
|
|
537c3dc1af | ||
|
|
5f7bf6cc5c | ||
|
|
904fe472b8 | ||
|
|
0ef5f65067 | ||
|
|
b6d529575d | ||
|
|
669435f153 | ||
|
|
f1c484d390 | ||
|
|
ef20dcc4c6 | ||
|
|
1bbf3e8747 | ||
|
|
3bc29dd907 | ||
|
|
23bbd2ceb4 | ||
|
|
d0e2932257 | ||
|
|
cf6ecd55e5 | ||
|
|
bfc2e5dec6 | ||
|
|
d6589ec1c1 | ||
|
|
1cadab1320 | ||
|
|
91aea326c7 | ||
|
|
d2c6d95e75 | ||
|
|
5a8673d322 | ||
|
|
917eaab8be | ||
|
|
198d0c7079 | ||
|
|
03f4bed4fe | ||
|
|
1bfcc07e1f | ||
|
|
ef9a1bedfc | ||
|
|
4121e689fd | ||
|
|
0b1911b711 | ||
|
|
ac73b6b537 | ||
|
|
4188ec37b2 | ||
|
|
6cefb32520 | ||
|
|
7ba3a2b7e8 | ||
|
|
3d7c3f0726 | ||
|
|
74cdb0fa1e | ||
|
|
dc07947ccf | ||
|
|
3b1f35e7a8 | ||
|
|
dbd06b2552 | ||
|
|
9c121fb5c8 | ||
|
|
28d19ef015 | ||
|
|
3843fd9815 | ||
|
|
2777e0ea80 | ||
|
|
e62f26a0ee | ||
|
|
403e2aad57 | ||
|
|
c171d33e8c | ||
|
|
b1f7f2f2df | ||
|
|
a49d359656 | ||
|
|
03ec8ac17b | ||
|
|
75f3618424 | ||
|
|
e400edb92f | ||
|
|
42170ca050 | ||
|
|
f9868afde1 | ||
|
|
4e79797cd1 | ||
|
|
921b245273 | ||
|
|
2cbaeca169 | ||
|
|
bc344cab41 | ||
|
|
7a2fd4363c | ||
|
|
11d0f86320 | ||
|
|
d83fb8fe76 | ||
|
|
a36013c28c | ||
|
|
1934171e5a | ||
|
|
4b2e873261 | ||
|
|
6319cbd425 | ||
|
|
72ae5eccb3 | ||
|
|
5d1c7d532f | ||
|
|
afb9549da9 | ||
|
|
0d749d80ae | ||
|
|
050fd992c6 | ||
|
|
3694992eb5 | ||
|
|
6f0301667d | ||
|
|
d2606bfc25 | ||
|
|
299ef5307e | ||
|
|
a750f76a5d | ||
|
|
cd587ee8ca | ||
|
|
987254caca | ||
|
|
ef5ff0c6ed | ||
|
|
e9947e3960 | ||
|
|
95bf99a24a | ||
|
|
be530da970 | ||
|
|
5d82ebf0d5 | ||
|
|
165cb1003c | ||
|
|
5388d1bea0 | ||
|
|
c40c032531 | ||
|
|
bf0bb6e0c7 | ||
|
|
42c35d2b69 | ||
|
|
e9b440616e | ||
|
|
d1b354f05e | ||
|
|
0742ef2422 | ||
|
|
8e45cb8064 | ||
|
|
6896998934 | ||
|
|
74a2805844 | ||
|
|
c95daee0e2 | ||
|
|
bb5cd6cbfa | ||
|
|
3dde25b1a4 | ||
|
|
66649fa9dd | ||
|
|
a87c29bb2f | ||
|
|
3a057e4aba | ||
|
|
b50df6af26 | ||
|
|
8e8fd7f2bd | ||
|
|
d9f209a1d4 | ||
|
|
5e6ccc5ff8 | ||
|
|
bbfcc3b3ad | ||
|
|
d4a7b62644 | ||
|
|
417a75a896 | ||
|
|
b551d54e5c | ||
|
|
16ca8f2917 | ||
|
|
e7f2cab192 | ||
|
|
40063f3799 | ||
|
|
326d2b519b | ||
|
|
a7668e321c | ||
|
|
79af54e8cf | ||
|
|
09f8bbe33e | ||
|
|
1908f39995 | ||
|
|
748fc3fffa | ||
|
|
250dc6ac2a | ||
|
|
b81d2d3709 | ||
|
|
a873131d2f | ||
|
|
b5689428e8 | ||
|
|
d6285e2932 | ||
|
|
eb348d10fc | ||
|
|
7eb3ddb50c | ||
|
|
fde934363c | ||
|
|
dce9809205 | ||
|
|
15bee287f3 | ||
|
|
f28ed4c274 | ||
|
|
fc3606b71c | ||
|
|
aeff9c1039 | ||
|
|
9fd13c9ca1 | ||
|
|
ac1cc77258 | ||
|
|
e6005e55af | ||
|
|
62ec48ba21 | ||
|
|
7ab8981dde | ||
|
|
f8202e8fa8 | ||
|
|
b18fb9df61 | ||
|
|
b4ca299115 | ||
|
|
b0104482bb | ||
|
|
ef9ee6441d | ||
|
|
4ad3e92fae | ||
|
|
098c88676e | ||
|
|
4b05b017f7 | ||
|
|
a92a5dde3c | ||
|
|
a6890c5824 | ||
|
|
e87d08a789 | ||
|
|
65d8ef8c63 | ||
|
|
878a00b16b | ||
|
|
984b26c7fd | ||
|
|
b2cc1e02d7 | ||
|
|
83c7ef6aa9 | ||
|
|
6fca3468e2 | ||
|
|
d134aba573 | ||
|
|
8f32c0c770 | ||
|
|
e0a5da865f | ||
|
|
69a62e6edf | ||
|
|
a6da4adc08 | ||
|
|
2d3768423f | ||
|
|
cb2491f3f3 | ||
|
|
9248b75a0c | ||
|
|
fc46634fcc | ||
|
|
9df8f252c0 | ||
|
|
a844fb4815 | ||
|
|
58266d3cd1 | ||
|
|
94a22bf6ca | ||
|
|
32a50e112b | ||
|
|
6dbcf366bd | ||
|
|
24efba751d | ||
|
|
e681b98231 | ||
|
|
30d88b4c45 | ||
|
|
9a13ff7898 | ||
|
|
91ac3a9e32 | ||
|
|
1036c7c0c0 | ||
|
|
c03d9183a8 | ||
|
|
5da91bea2d | ||
|
|
c2ceb365d9 | ||
|
|
4488c37149 | ||
|
|
3c3fcad888 | ||
|
|
391cfe8290 | ||
|
|
8c2ff2b56f | ||
|
|
d9a16ba7fa | ||
|
|
3b906f4de8 | ||
|
|
0496543d70 | ||
|
|
e9cc68d2b1 | ||
|
|
8a5dc45240 | ||
|
|
d23855b263 | ||
|
|
5601fcdf7b | ||
|
|
a87d3b9de7 | ||
|
|
67775bad84 | ||
|
|
3d004700fb | ||
|
|
b3b2024ce7 | ||
|
|
c1cfb94a0d | ||
|
|
029d141872 | ||
|
|
ed93c68fb9 | ||
|
|
4b8acb517e | ||
|
|
419308e2ac | ||
|
|
8dc890421d | ||
|
|
fe90900b55 | ||
|
|
1d9807e6d6 | ||
|
|
58931febc4 | ||
|
|
d72dfa5775 | ||
|
|
dbf49534da | ||
|
|
aad38c1eac | ||
|
|
c0727b2157 | ||
|
|
3085f7442a | ||
|
|
25cfff7354 | ||
|
|
13f49db4b7 | ||
|
|
117808a326 | ||
|
|
31ee058c87 | ||
|
|
4d8087fb4c | ||
|
|
cef91a3ef4 | ||
|
|
9da2402851 | ||
|
|
3eaffb5812 | ||
|
|
643d1bfad2 | ||
|
|
ad6fd7290a | ||
|
|
7e012ff6c6 | ||
|
|
b547b7ece6 | ||
|
|
022d792d01 | ||
|
|
c4f6b40ea5 | ||
|
|
709f750a2a | ||
|
|
281a8f26dd | ||
|
|
03b8097ccb | ||
|
|
6a2c137bce | ||
|
|
e9c43a71fa | ||
|
|
f7e0e24548 | ||
|
|
73c5383d59 | ||
|
|
4cbe727b81 | ||
|
|
00ea3d77cc | ||
|
|
bc424e1d01 | ||
|
|
3c048e9795 | ||
|
|
eeb3c7f48a | ||
|
|
ee1118ee4b | ||
|
|
636ae4203e | ||
|
|
005cc66115 | ||
|
|
5360475686 | ||
|
|
15f89627c6 | ||
|
|
e42914c721 | ||
|
|
394d9cd564 | ||
|
|
f648c41890 | ||
|
|
37498dc0b1 | ||
|
|
ed1a4d010d | ||
|
|
83ee66d8a6 | ||
|
|
c4dcdd926a | ||
|
|
3048dfe09a | ||
|
|
6acfa28ef7 | ||
|
|
bac71d0894 | ||
|
|
b2dabe7bed | ||
|
|
78a8f92b2f | ||
|
|
137db44e23 | ||
|
|
d744bdf25b | ||
|
|
1eb67afea6 | ||
|
|
396dbd734a | ||
|
|
fb00790fdc | ||
|
|
39124f153f | ||
|
|
f754ab5fbe | ||
|
|
4ebbd2b3e9 | ||
|
|
4970a268f4 | ||
|
|
da64a0a019 | ||
|
|
d687bb5383 | ||
|
|
37d07ab99f | ||
|
|
172e8ca659 | ||
|
|
243ca7db20 | ||
|
|
39a979ef62 |
No files matched your search
+387
@@ -0,0 +1,387 @@
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
|
||||
APACHE COMMONS MATH DERIVATIVE WORKS:
|
||||
|
||||
The Apache commons-math library includes a number of subcomponents
|
||||
whose implementation is derived from original sources written
|
||||
in C or Fortran. License terms of the original sources
|
||||
are reproduced below.
|
||||
|
||||
===============================================================================
|
||||
For the lmder, lmpar and qrsolv Fortran routine from minpack and translated in
|
||||
the LevenbergMarquardtOptimizer class in package
|
||||
org.apache.commons.math3.optimization.general
|
||||
Original source copyright and license statement:
|
||||
|
||||
Minpack Copyright Notice (1999) University of Chicago. All rights reserved
|
||||
|
||||
Redistribution and use in source and binary forms, with or
|
||||
without modification, are permitted provided that the
|
||||
following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above
|
||||
copyright notice, this list of conditions and the following
|
||||
disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the following
|
||||
disclaimer in the documentation and/or other materials
|
||||
provided with the distribution.
|
||||
|
||||
3. The end-user documentation included with the
|
||||
redistribution, if any, must include the following
|
||||
acknowledgment:
|
||||
|
||||
"This product includes software developed by the
|
||||
University of Chicago, as Operator of Argonne National
|
||||
Laboratory.
|
||||
|
||||
Alternately, this acknowledgment may appear in the software
|
||||
itself, if and wherever such third-party acknowledgments
|
||||
normally appear.
|
||||
|
||||
4. WARRANTY DISCLAIMER. THE SOFTWARE IS SUPPLIED "AS IS"
|
||||
WITHOUT WARRANTY OF ANY KIND. THE COPYRIGHT HOLDER, THE
|
||||
UNITED STATES, THE UNITED STATES DEPARTMENT OF ENERGY, AND
|
||||
THEIR EMPLOYEES: (1) DISCLAIM ANY WARRANTIES, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO ANY IMPLIED WARRANTIES
|
||||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE
|
||||
OR NON-INFRINGEMENT, (2) DO NOT ASSUME ANY LEGAL LIABILITY
|
||||
OR RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS, OR
|
||||
USEFULNESS OF THE SOFTWARE, (3) DO NOT REPRESENT THAT USE OF
|
||||
THE SOFTWARE WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS, (4)
|
||||
DO NOT WARRANT THAT THE SOFTWARE WILL FUNCTION
|
||||
UNINTERRUPTED, THAT IT IS ERROR-FREE OR THAT ANY ERRORS WILL
|
||||
BE CORRECTED.
|
||||
|
||||
5. LIMITATION OF LIABILITY. IN NO EVENT WILL THE COPYRIGHT
|
||||
HOLDER, THE UNITED STATES, THE UNITED STATES DEPARTMENT OF
|
||||
ENERGY, OR THEIR EMPLOYEES: BE LIABLE FOR ANY INDIRECT,
|
||||
INCIDENTAL, CONSEQUENTIAL, SPECIAL OR PUNITIVE DAMAGES OF
|
||||
ANY KIND OR NATURE, INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
PROFITS OR LOSS OF DATA, FOR ANY REASON WHATSOEVER, WHETHER
|
||||
SUCH LIABILITY IS ASSERTED ON THE BASIS OF CONTRACT, TORT
|
||||
(INCLUDING NEGLIGENCE OR STRICT LIABILITY), OR OTHERWISE,
|
||||
EVEN IF ANY OF SAID PARTIES HAS BEEN WARNED OF THE
|
||||
POSSIBILITY OF SUCH LOSS OR DAMAGES.
|
||||
===============================================================================
|
||||
|
||||
Copyright and license statement for the odex Fortran routine developed by
|
||||
E. Hairer and G. Wanner and translated in GraggBulirschStoerIntegrator class
|
||||
in package org.apache.commons.math3.ode.nonstiff:
|
||||
|
||||
|
||||
Copyright (c) 2004, Ernst Hairer
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
|
||||
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
|
||||
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
===============================================================================
|
||||
|
||||
Copyright and license statement for the original lapack fortran routines
|
||||
translated in EigenDecompositionImpl class in package
|
||||
org.apache.commons.math3.linear:
|
||||
|
||||
Copyright (c) 1992-2008 The University of Tennessee. All rights reserved.
|
||||
|
||||
$COPYRIGHT$
|
||||
|
||||
Additional copyrights may follow
|
||||
|
||||
$HEADER$
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer listed
|
||||
in this license in the documentation and/or other materials
|
||||
provided with the distribution.
|
||||
|
||||
- Neither the name of the copyright holders nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
===============================================================================
|
||||
|
||||
Copyright and license statement for the original Mersenne twister C
|
||||
routines translated in MersenneTwister class in package
|
||||
org.apache.commons.math3.random:
|
||||
|
||||
Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura,
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
3. The names of its contributors may not be used to endorse or promote
|
||||
products derived from this software without specific prior written
|
||||
permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
===============================================================================
|
||||
|
||||
The class "org.apache.commons.math3.exception.util.LocalizedFormatsTest" is
|
||||
an adapted version of "OrekitMessagesTest" test class for the Orekit library
|
||||
The "org.apache.commons.math3.analysis.interpolation.HermiteInterpolator"
|
||||
has been imported from the Orekit space flight dynamics library.
|
||||
|
||||
Th Orekit library is described at:
|
||||
https://www.orekit.org/forge/projects/orekit
|
||||
The original files are distributed under the terms of the Apache 2 license
|
||||
which is: Copyright 2010 CS Communication & Systèmes
|
||||
Binary file not shown.
@@ -0,0 +1,137 @@
|
||||
screen.button.waila=Waila
|
||||
screen.button.modules=Module
|
||||
screen.label.scale=Maße
|
||||
screen.label.dragtuto=Verschiebe das HUD, um seine Position zu ändern.
|
||||
|
||||
screen.button.default=Standard
|
||||
screen.button.cancel=Abbrechen
|
||||
screen.button.ok=Ok
|
||||
screen.button.yes=Ja
|
||||
screen.button.no=Nein
|
||||
screen.button.back=Zurück
|
||||
screen.button.hidden=Versteckt
|
||||
screen.button.visible=Sichtbar
|
||||
screen.button.maintained=Gewartet
|
||||
screen.button.toggled=Geschaltet
|
||||
|
||||
choice.showhidewaila=Zeige/Verstecke Waila
|
||||
choice.showhideidmeta=Zeige ID:Metadata
|
||||
choice.toggledmaintained=Geschaltet/Gewartet
|
||||
choice.showliquids=Flüssigkeiten
|
||||
screen.button.configureaspect=Konfiguriere Aspekt...
|
||||
|
||||
enchant.title.name=Name
|
||||
enchant.title.minlvl=Min lvl
|
||||
enchant.title.maxlvl=Max lvl
|
||||
enchant.title.weight=Gewicht
|
||||
enchant.label.enchantability=Verzauberbarkeit
|
||||
|
||||
waila.keybind.wailaconfig=[Waila] Config-Bildschirm
|
||||
waila.keybind.wailadisplay=[Waila] Zeigen/Verstecken
|
||||
waila.keybind.liquid=[Waila] Zeige Flüssigkeiten
|
||||
waila.keybind.recipe=[Waila] Zeige Rezept
|
||||
waila.keybind.usage=[Waila] Zeige Nutzung
|
||||
waila.keybind.testing=[Waila] Testen
|
||||
|
||||
client.msg.norecipe=Kein Rezept gefunden.
|
||||
client.msg.nousage=Keine Nutzung gefunden.
|
||||
|
||||
hud.msg.none=<Nichts>
|
||||
hud.msg.empty=<Leer>
|
||||
hud.msg.output=Output
|
||||
hud.msg.input=Input
|
||||
hud.msg.out=Out
|
||||
hud.msg.in=In
|
||||
hud.msg.power=Energie
|
||||
hud.msg.storage=Speicher
|
||||
hud.msg.stored=Gespeichert
|
||||
hud.msg.any=Jegliches
|
||||
hud.msg.mode=Modus
|
||||
hud.msg.maxpower=Max Energie
|
||||
hud.msg.trigger=Trigger
|
||||
hud.msg.maxio=Max IO
|
||||
|
||||
hud.msg.send=Senden
|
||||
hud.msg.recv=Empfangen
|
||||
hud.msg.item=Item
|
||||
hud.msg.fluid=Flüssigk.
|
||||
hud.msg.energ=Energie
|
||||
hud.msg.frequency=Frequenz
|
||||
|
||||
hud.msg.owner=Besitzer
|
||||
hud.msg.public=Öffentlich
|
||||
hud.msg.restricted=Eingeschränkt
|
||||
hud.msg.private=Privat
|
||||
|
||||
hud.msg.white=Weiß
|
||||
hud.msg.orange=Orange
|
||||
hud.msg.magenta=Magenta
|
||||
hud.msg.lblue=HBlau
|
||||
hud.msg.yellow=Gelb
|
||||
hud.msg.lime=HGrün
|
||||
hud.msg.pink=Pink
|
||||
hud.msg.gray=Grau
|
||||
hud.msg.lgray=HGrau
|
||||
hud.msg.cyan=Türkis
|
||||
hud.msg.purple=Violett
|
||||
hud.msg.blue=Blau
|
||||
hud.msg.brown=Braun
|
||||
hud.msg.green=Grün
|
||||
hud.msg.red=Rot
|
||||
hud.msg.black=Schwarz
|
||||
|
||||
hud.msg.growth=Wachstum
|
||||
hud.msg.mature=Erwachsen
|
||||
hud.msg.off=Aus
|
||||
hud.msg.on=An
|
||||
hud.msg.state=Status
|
||||
hud.msg.delay=Verzögerung
|
||||
hud.msg.comparator=Komparator
|
||||
hud.msg.substractor=Substraktor
|
||||
hud.msg.record=Platte
|
||||
|
||||
hud.msg.offers=Angebote
|
||||
hud.msg.demands=Bedarf
|
||||
|
||||
option.appeng.monitorcontent=Monitorinhalt
|
||||
option.bb.content=Fassinhalt
|
||||
option.bc.tankamount=Flüssigk.-Menge
|
||||
option.bc.tanktype=Flüssigk.-Typ
|
||||
option.enderstorage.colors=Farben
|
||||
option.ic2.inputeumach=Max EU-Input [Maschinen]
|
||||
option.ic2.inputeuother=Max EU-Input [Anderes]
|
||||
option.ic2.inputeu=Max EU-Input
|
||||
option.ic2.outputeu=Max EU-Output
|
||||
option.ic2.storage=Energie gespeichert
|
||||
option.ic2.consump=Zeige Verbrauch
|
||||
option.ic2.tradeomat=Zeige Tauschautomaten-Forderung
|
||||
option.thaumcraft.storedvis=Kondensatorspeicher
|
||||
option.thermalexpansion.energyhandler=Zeige RO-Speicher
|
||||
option.thermalexpansion.energycell=Zeige EZellen IN/OUT
|
||||
option.thermalexpansion.fluidtype=Zeige Flüssigk.-Typ
|
||||
option.thermalexpansion.fluidamount=Zeige Flüssigk.-Menge
|
||||
option.thermalexpansion.tankmode=Zeige Tankmodus
|
||||
option.thermalexpansion.tesssendrecv=Tesseraktmodus
|
||||
option.thermalexpansion.tessfreq=Tesseraktfrequenz
|
||||
option.thermalexpansion.owner=Zeige Besitzer
|
||||
option.thermalexpansion.conditemmode=Zeige Itemduktmodus
|
||||
option.vanilla.spawntype=Spawner-Typ
|
||||
option.vanilla.growthvalue=Wachstumswert
|
||||
option.vanilla.leverstate=Hebelstatus
|
||||
option.vanilla.repeater=Repeater-Verzögerung
|
||||
option.vanilla.comparator=Komparatormodus
|
||||
option.vanilla.redstone=Redstone-Stärke
|
||||
option.vanilla.jukebox=Musikbox-Platte
|
||||
option.etb.displaydata=Zeige Sockeldaten
|
||||
option.enderio.inout=Zeige Input/Output
|
||||
option.enderio.storage=Zeige gespeicherte MJ
|
||||
option.enderio.owner=Zeige Block-Besitzer
|
||||
option.enderio.channel=Zeige Hypercube-Kanal
|
||||
option.bcapi.storage=Zeige gespeicherte MJ
|
||||
option.bcapi.consump=Zeige maximale Energie
|
||||
option.bcapi.trigger=Zeige Startenergie
|
||||
option.pr.showio=Zeige Gatter IO
|
||||
option.pr.showdata=Zeige Gatterdaten
|
||||
option.extrautilities.fluidamount=Zeige Flüssigk.-Menge
|
||||
option.openblocks.fluidamount=Zeige Flüssigk.-Menge
|
||||
option.railcraft.fluidamount=Zeige Flüssigk.-Menge
|
||||
@@ -0,0 +1,148 @@
|
||||
screen.button.waila=Waila
|
||||
screen.button.modules=Modules
|
||||
screen.label.scale=Scale
|
||||
screen.label.dragtuto=Drag the HUD to setup its position.
|
||||
|
||||
screen.button.default=Default
|
||||
screen.button.cancel=Cancel
|
||||
screen.button.ok=Ok
|
||||
screen.button.yes=Yes
|
||||
screen.button.no=No
|
||||
screen.button.back=Back
|
||||
screen.button.hidden=Hidden
|
||||
screen.button.visible=Visible
|
||||
screen.button.maintained=Maintained
|
||||
screen.button.toggled=Toggled
|
||||
|
||||
choice.showhidewaila=Show/Hide Waila
|
||||
choice.showhideidmeta=Show ID:Metadata
|
||||
choice.toggledmaintained=Toggled/Maintained
|
||||
choice.showliquids=Liquids
|
||||
choice.shifttoggledblock=Sneak toggle blocks
|
||||
choice.shifttoggledents=Sneak toggle entities
|
||||
screen.button.configureaspect=Configure aspect...
|
||||
|
||||
enchant.title.name=Name
|
||||
enchant.title.minlvl=Min lvl
|
||||
enchant.title.maxlvl=Max lvl
|
||||
enchant.title.weight=Weight
|
||||
enchant.label.enchantability=Enchantability
|
||||
|
||||
waila.keybind.wailaconfig=[Waila] Config screen
|
||||
waila.keybind.wailadisplay=[Waila] Show/Hide
|
||||
waila.keybind.liquid=[Waila] Show liquids
|
||||
waila.keybind.recipe=[Waila] Show recipe
|
||||
waila.keybind.usage=[Waila] Show usage
|
||||
waila.keybind.testing=[Waila] Testing
|
||||
|
||||
client.msg.norecipe=No recipe found.
|
||||
client.msg.nousage=No usage found.
|
||||
|
||||
hud.msg.none=<None>
|
||||
hud.msg.empty=<Empty>
|
||||
hud.msg.output=Output
|
||||
hud.msg.input=Input
|
||||
hud.msg.out=Out
|
||||
hud.msg.in=In
|
||||
hud.msg.power=Power
|
||||
hud.msg.storage=Storage
|
||||
hud.msg.stored=Stored
|
||||
hud.msg.any=Any
|
||||
hud.msg.mode=Mode
|
||||
hud.msg.maxpower=Max Power
|
||||
hud.msg.trigger=Trigger
|
||||
hud.msg.maxio=Max IO
|
||||
|
||||
hud.msg.send=Send
|
||||
hud.msg.recv=Recv
|
||||
hud.msg.item=Item
|
||||
hud.msg.fluid=Fluid
|
||||
hud.msg.energ=Energy
|
||||
hud.msg.frequency=Frequency
|
||||
|
||||
hud.msg.owner=Owner
|
||||
hud.msg.public=Public
|
||||
hud.msg.restricted=Restricted
|
||||
hud.msg.private=Private
|
||||
|
||||
hud.msg.white=White
|
||||
hud.msg.orange=Orange
|
||||
hud.msg.magenta=Magenta
|
||||
hud.msg.lblue=LBlue
|
||||
hud.msg.yellow=Yellow
|
||||
hud.msg.lime=Lime
|
||||
hud.msg.pink=Pink
|
||||
hud.msg.gray=Gray
|
||||
hud.msg.lgray=LGray
|
||||
hud.msg.cyan=Cyan
|
||||
hud.msg.purple=Purple
|
||||
hud.msg.blue=Blue
|
||||
hud.msg.brown=Brown
|
||||
hud.msg.green=Green
|
||||
hud.msg.red=Red
|
||||
hud.msg.black=Black
|
||||
|
||||
hud.msg.growth=Growth
|
||||
hud.msg.mature=Mature
|
||||
hud.msg.off=Off
|
||||
hud.msg.on=On
|
||||
hud.msg.state=State
|
||||
hud.msg.delay=Delay
|
||||
hud.msg.comparator=Comparator
|
||||
hud.msg.substractor=Substractor
|
||||
hud.msg.record=Record
|
||||
|
||||
hud.msg.offers=Offers
|
||||
hud.msg.demands=Demands
|
||||
|
||||
option.appeng.monitorcontent=Monitor's content
|
||||
option.bb.content=Barrel's content
|
||||
option.bc.tankamount=Liquid amount
|
||||
option.bc.tanktype=Liquid type
|
||||
option.enderstorage.colors=Colors
|
||||
option.ic2.inputeumach=Max EU input [Machines]
|
||||
option.ic2.inputeuother=Max EU input [Other]
|
||||
option.ic2.inputeu=Max EU input
|
||||
option.ic2.outputeu=Max EU output
|
||||
option.ic2.storage=Energy stored
|
||||
option.ic2.consump=Show consumption
|
||||
option.ic2.tradeomat=Show Trade-O-Mat request
|
||||
option.thaumcraft.storedvis=Capacitor storage
|
||||
option.thermalexpansion.energyhandler=Show RF storage
|
||||
option.thermalexpansion.energycell=Show ECell IN/OUT
|
||||
option.thermalexpansion.fluidtype=Show fluid type
|
||||
option.thermalexpansion.fluidamount=Show fluid amount
|
||||
option.thermalexpansion.tankmode=Show tank mode
|
||||
option.thermalexpansion.tesssendrecv=Tesseract mode
|
||||
option.thermalexpansion.tessfreq=Tesseract frequency
|
||||
option.thermalexpansion.owner=Show owner
|
||||
option.thermalexpansion.conditemmode=Show Itemduct mode
|
||||
option.vanilla.spawntype=Spawner type
|
||||
option.vanilla.growthvalue=Growth value
|
||||
option.vanilla.leverstate=Lever state
|
||||
option.vanilla.repeater=Repeater delay
|
||||
option.vanilla.comparator=Comparator mode
|
||||
option.vanilla.redstone=Redstone power
|
||||
option.vanilla.jukebox=Jukebox disk
|
||||
option.vanilla.silverfish=Hide silverfish
|
||||
option.etb.displaydata=Show socket data
|
||||
option.enderio.inout=Show input/output
|
||||
option.enderio.storage=Show stored MJ
|
||||
option.enderio.owner=Show block owner
|
||||
option.enderio.channel=Show hypercube channel
|
||||
option.bcapi.storage=Show stored MJ
|
||||
option.bcapi.consump=Show maximum power
|
||||
option.bcapi.trigger=Show triggering energy
|
||||
option.pr.showio=Show gates IO
|
||||
option.pr.showdata=Show gates data
|
||||
option.extrautilities.fluidamount=Show fluid amount
|
||||
option.openblocks.fluidamount=Show fluid amount
|
||||
option.railcraft.fluidamount=Show fluid amount
|
||||
option.secretrooms.hide=Hide camo blocks
|
||||
option.carpenters.hide=Hide camo blocks
|
||||
option.stevescarts.showall=Show data
|
||||
option.stevescarts.colorblind=Colorblind mode
|
||||
option.stevescarts.shifttoggle=Shift toggle
|
||||
option.general.showhp=Show entities health
|
||||
option.general.showcrop=Show crop growth
|
||||
option.thaumcraft.aspects=Show aspects
|
||||
@@ -0,0 +1,136 @@
|
||||
screen.button.waila=Waila
|
||||
screen.button.modules=Modules
|
||||
screen.label.scale=Echelle
|
||||
screen.label.dragtuto=Faites glisser le HUD pour paramétrer la position.
|
||||
|
||||
screen.button.default=Défaut
|
||||
screen.button.cancel=Annuler
|
||||
screen.button.ok=Ok
|
||||
screen.button.yes=Oui
|
||||
screen.button.no=Non
|
||||
screen.button.back=Retour
|
||||
screen.button.hidden=Masquer
|
||||
screen.button.visible=Afficher
|
||||
screen.button.maintained=Maintenu
|
||||
screen.button.toggled=Switché
|
||||
|
||||
choice.showhidewaila=Afficher/Masquer Waila
|
||||
choice.showhideidmeta=Afficher ID:Metadata
|
||||
choice.toggledmaintained= Switché/Maintenu
|
||||
choice.showliquids=Liquides
|
||||
screen.button.configureaspect=Configurer l'aspect…
|
||||
|
||||
enchant.title.name=Nom
|
||||
enchant.title.minlvl=Min lvl
|
||||
enchant.title.maxlvl=Max lvl
|
||||
enchant.title.weight=Poids
|
||||
enchant.label.enchantability=Enchantabilitée
|
||||
|
||||
waila.keybind.wailaconfig=[Waila] Ecran de config
|
||||
waila.keybind.wailadisplay=[Waila] Afficher/Masquer
|
||||
waila.keybind.liquid=[Waila] Afficher les liquides
|
||||
waila.keybind.recipe=[Waila] Afficher les recettes
|
||||
waila.keybind.usage=[Waila] Afficher l'utilisation
|
||||
waila.keybind.testing=[Waila] Test
|
||||
|
||||
client.msg.norecipe=Pas de recette trouvée.
|
||||
client.msg.nousage=Pas d'utilisation trouvée.
|
||||
|
||||
hud.msg.none=<Aucun>
|
||||
hud.msg.empty=<Vide>
|
||||
hud.msg.output=Sortie
|
||||
hud.msg.input=Entrée
|
||||
hud.msg.out=Sortie
|
||||
hud.msg.in=Entrée
|
||||
hud.msg.power=Energie
|
||||
hud.msg.storage=Stockage
|
||||
hud.msg.stored=Stocké
|
||||
hud.msg.any=Tout
|
||||
hud.msg.mode=Mode
|
||||
hud.msg.maxpower=Max Puissance
|
||||
hud.msg.trigger=Déclencheur
|
||||
hud.msg.maxio=Max Entrée/Sortie
|
||||
|
||||
hud.msg.send=Envoyer
|
||||
hud.msg.recv=Recevoir
|
||||
hud.msg.item=Objet
|
||||
hud.msg.fluid=Fluide
|
||||
hud.msg.energ=Energie
|
||||
hud.msg.frequency=Fréquence
|
||||
|
||||
hud.msg.owner=Propriétaire
|
||||
hud.msg.public=Publique
|
||||
hud.msg.restricted=Limité
|
||||
hud.msg.private=Privée
|
||||
|
||||
hud.msg.white=Blanc
|
||||
hud.msg.orange=Orange
|
||||
hud.msg.magenta=Magenta
|
||||
hud.msg.lblue=Bleu clair
|
||||
hud.msg.yellow=Jaune
|
||||
hud.msg.lime=Vert clair
|
||||
hud.msg.pink=Rose
|
||||
hud.msg.gray=Gris
|
||||
hud.msg.lgray=Gris clair
|
||||
hud.msg.cyan=Cyan
|
||||
hud.msg.purple=Violet
|
||||
hud.msg.blue=Bleu
|
||||
hud.msg.brown=Marron
|
||||
hud.msg.green=Vert
|
||||
hud.msg.red=Rouge
|
||||
hud.msg.black=Noir
|
||||
|
||||
hud.msg.growth=Croissance
|
||||
hud.msg.mature=Mature
|
||||
hud.msg.off=Off
|
||||
hud.msg.on=On
|
||||
hud.msg.state=Etat
|
||||
hud.msg.delay=Retard
|
||||
hud.msg.comparator=Comparateur
|
||||
hud.msg.substractor=Soustracteur
|
||||
hud.msg.record=Disque
|
||||
|
||||
hud.msg.offers=Offre
|
||||
hud.msg.demands=Demande
|
||||
|
||||
option.appeng.monitorcontent=Contenu des écrans
|
||||
option.bb.content=Contenu des barils
|
||||
option.bc.tankamount=Niveau de liquide
|
||||
option.bc.tanktype=Sorte de liquide
|
||||
option.enderstorage.colors=Couleurs
|
||||
option.ic2.inputeumach=Max EU en entrée [Machines]
|
||||
option.ic2.inputeuother=Max EU en entrée [Autres]
|
||||
option.ic2.inputeu=Max EU en entrée
|
||||
option.ic2.outputeu=Max EU en sortie
|
||||
option.ic2.storage=Energie stockée
|
||||
option.ic2.consump=Afficher consommation
|
||||
option.thaumcraft.storedvis=Condensateur de stockage
|
||||
option.thermalexpansion.energyhandler=Afficher stockage RF
|
||||
option.thermalexpansion.energycell=Afficher ECell Entrée/Sortie
|
||||
option.thermalexpansion.fluidtype=Afficher sorte fluides
|
||||
option.thermalexpansion.fluidamount=Afficher niveau fluides
|
||||
option.thermalexpansion.tankmode=Afficher mode Réservoir
|
||||
option.thermalexpansion.tesssendrecv=Tesseract mode
|
||||
option.thermalexpansion.tessfreq=Tesseract fréquence
|
||||
option.thermalexpansion.owner=Afficher propriétaire
|
||||
option.thermalexpansion.conditemmode=Afficher Itemduct mode
|
||||
option.vanilla.spawntype=Spawner type
|
||||
option.vanilla.growthvalue=Niveau de croissance
|
||||
option.vanilla.leverstate=Etat Levier
|
||||
option.vanilla.repeater=Répeteur retard
|
||||
option.vanilla.comparator=Comparateur mode
|
||||
option.vanilla.redstone=Redstone puissance
|
||||
option.vanilla.jukebox=Jukebox disque
|
||||
option.etb.displaydata=Afficher données socket
|
||||
option.enderio.inout=Afficher Entrée/Sortie
|
||||
option.enderio.storage=Afficher MJ stocké
|
||||
option.enderio.owner=Afficher propriétaire du bloc
|
||||
option.enderio.channel=Afficher hypercube canal
|
||||
option.bcapi.storage=Afficher MJ stocké
|
||||
option.bcapi.consump=Afficher puissance maximale
|
||||
option.bcapi.trigger=Energie déclanchement
|
||||
option.pr.showio=Afficher plaques IO
|
||||
option.pr.showdata=Afficher plaques data
|
||||
option.extrautilities.fluidamount=Afficher niveau fluides
|
||||
option.openblocks.fluidamount=Afficher niveau fluides
|
||||
option.railcraft.fluidamount=Afficher niveau fluides
|
||||
@@ -0,0 +1,117 @@
|
||||
screen.button.waila=Waila
|
||||
screen.button.modules=Modules
|
||||
screen.label.scale=Schaal
|
||||
screen.label.dragtuto=Sleep de HUD om zijn positie in te stellen.
|
||||
|
||||
screen.button.default=Standaard
|
||||
screen.button.cancel=Annuleren
|
||||
screen.button.ok=Ok
|
||||
screen.button.yes=Ja
|
||||
screen.button.no=Nee
|
||||
screen.button.back=Terug
|
||||
screen.button.hidden=Verborgen
|
||||
screen.button.visible=Zichtbaar
|
||||
screen.button.maintained=Gehandhaafd
|
||||
screen.button.toggled=Omgeschakeld
|
||||
|
||||
choice.showhidewaila=Toon/Verberg Waila
|
||||
choice.showhideidmeta=Toon ID:Metadata
|
||||
choice.toggledmaintained=Omgeschakeld/Gehandhaafd
|
||||
choice.showliquids=Vloeistoffen
|
||||
screen.button.configureaspect=Configureer aspect...
|
||||
|
||||
enchant.title.name=Naam
|
||||
enchant.title.minlvl=Min lvl
|
||||
enchant.title.maxlvl=Max lvl
|
||||
enchant.title.weight=Gewicht
|
||||
enchant.label.enchantability=Enchantbaarheid
|
||||
|
||||
keybind.configscreen=[Waila] Configuratiescherm
|
||||
keybind.showhide=[Waila] Toon/Verberg
|
||||
keybind.showliquid=[Waila] Toon vloeistoffen
|
||||
keybind.showrecipe=[Waila] Toon recepten
|
||||
keybind.showusage=[Waila] Toon gebruik
|
||||
keybind.testing=[Waila] Testen
|
||||
|
||||
client.msg.norecipe=Geen recept gevonden.
|
||||
client.msg.nousage=Geen gebruik gevonden.
|
||||
|
||||
hud.msg.none=<Geen>
|
||||
hud.msg.empty=<Leeg>
|
||||
hud.msg.output=Uitvoer
|
||||
hud.msg.input=Invoer
|
||||
hud.msg.out=Uit
|
||||
hud.msg.in=In
|
||||
hud.msg.power=Vermogen
|
||||
hud.msg.storage=Opslag
|
||||
hud.msg.any=Om het even welke
|
||||
hud.msg.mode=Modus
|
||||
|
||||
hud.msg.send=Zend
|
||||
hud.msg.recv=Ontv
|
||||
hud.msg.item=Item
|
||||
hud.msg.fluid=Vloeistof
|
||||
hud.msg.energ=Energie
|
||||
hud.msg.frequency=Frequentie
|
||||
|
||||
hud.msg.owner=Eigenaar
|
||||
hud.msg.public=Publiek
|
||||
hud.msg.restricted=Begrensd
|
||||
hud.msg.private=Privé
|
||||
|
||||
hud.msg.white=Wit
|
||||
hud.msg.orange=Oranje
|
||||
hud.msg.magenta=Magenta
|
||||
hud.msg.lblue=LBlauw
|
||||
hud.msg.yellow=Geel
|
||||
hud.msg.lime=Limoen
|
||||
hud.msg.pink=Roze
|
||||
hud.msg.gray=Grijs
|
||||
hud.msg.lgray=LGrijs
|
||||
hud.msg.cyan=Cyaan
|
||||
hud.msg.purple=Paars
|
||||
hud.msg.blue=Blauw
|
||||
hud.msg.brown=Bruin
|
||||
hud.msg.green=Groen
|
||||
hud.msg.red=Rood
|
||||
hud.msg.black=Zwart
|
||||
|
||||
hud.msg.growth=Groei
|
||||
hud.msg.mature=Volwassen
|
||||
hud.msg.off=Af
|
||||
hud.msg.on=Aan
|
||||
hud.msg.state=Status
|
||||
hud.msg.delay=Vertraging
|
||||
hud.msg.comparator=Vergelijker
|
||||
hud.msg.substractor=Aftrekker
|
||||
hud.msg.record=Neem op
|
||||
|
||||
option.appeng.monitorcontent=Scherm inhoud
|
||||
option.bb.content=Ton inhoud
|
||||
option.bc.tankamount=Vloeistofhoeveelheid
|
||||
option.bc.tanktype=Vloeistoftype
|
||||
option.enderstorage.colors=Kleuren
|
||||
option.ic2.inputeumach=Max EU invoer [Machines]
|
||||
option.ic2.inputeuother=Max EU invoer [Andere]
|
||||
option.ic2.inputeu=Max EU invoer
|
||||
option.ic2.outputeu=Max EU uitvoer
|
||||
option.ic2.storage=Opgeslagen energie
|
||||
option.thaumcraft.storedvis=Condensator opslag
|
||||
option.thermalexpansion.energyhandler=Toon RF opslag
|
||||
option.thermalexpansion.energycell=Toon ECell IN/UIT
|
||||
option.thermalexpansion.fluidtype=Toon vloeistoftype
|
||||
option.thermalexpansion.fluidamount=Toon vloeistofhoeveelheid
|
||||
option.thermalexpansion.tankmode=Toon tank modus
|
||||
option.thermalexpansion.tesssendrecv=Tesseract modus
|
||||
option.thermalexpansion.tessfreq=Tesseract frequentie
|
||||
option.thermalexpansion.owner=Toon eigenaar
|
||||
option.vanilla.spawntype=Spawner type
|
||||
option.vanilla.growthvalue=Groei hoeveelheid
|
||||
option.vanilla.leverstate=Hendel status
|
||||
option.vanilla.repeater=Herhaler vertraging
|
||||
option.vanilla.comparator=Vergelijker modus
|
||||
option.vanilla.redstone=Redstone vermogen
|
||||
option.vanilla.jukebox=Jukebox schijf
|
||||
option.extrautilities.fluidamount=Toon vloeistofhoeveelheid
|
||||
option.openblocks.fluidamount=Toon vloeistofhoeveelheid
|
||||
option.railcraft.fluidamount=Toon vloeistofhoeveelheid
|
||||
@@ -0,0 +1,131 @@
|
||||
screen.button.waila=Waila
|
||||
screen.button.modules=Модули
|
||||
screen.label.scale=Размер
|
||||
screen.label.dragtuto=Перетащите интерфейс, чтобы изменить позицию.
|
||||
|
||||
screen.button.default=По умолчанию
|
||||
screen.button.cancel=Отмена
|
||||
screen.button.ok=Ок
|
||||
screen.button.yes=Да
|
||||
screen.button.no=Нет
|
||||
screen.button.back=Назад
|
||||
screen.button.hidden=Скрывать
|
||||
screen.button.visible=Показывать
|
||||
screen.button.maintained=При нажатой клавише
|
||||
screen.button.toggled=Вкл./Выкл. гор. клавишей
|
||||
|
||||
choice.showhidewaila=Показать/Скрыть Waila
|
||||
choice.showhideidmeta=Показать ID:Метаданные
|
||||
choice.toggledmaintained=Переключ./Нажатая клав.
|
||||
choice.showliquids=Жидкости
|
||||
screen.button.configureaspect=Настроить индикатор...
|
||||
|
||||
enchant.title.name=Название
|
||||
enchant.title.minlvl=Мин. уровень
|
||||
enchant.title.maxlvl=Макс. уровень
|
||||
enchant.title.weight=Вес
|
||||
enchant.label.enchantability=Зачарование
|
||||
|
||||
waila.keybind.wailaconfig=[Waila] Меню настроек
|
||||
waila.keybind.wailadisplay=[Waila] Показать/Скрыть
|
||||
waila.keybind.liquid=[Waila] Показать жидкости
|
||||
waila.keybind.recipe=[Waila] Показать рецепт
|
||||
waila.keybind.usage=[Waila] Показать применение
|
||||
waila.keybind.testing=[Waila] Тестировать
|
||||
|
||||
client.msg.norecipe=Рецептов не найдено.
|
||||
client.msg.nousage=Применений не найдено.
|
||||
|
||||
hud.msg.none=<Ничего>
|
||||
hud.msg.empty=<Пусто>
|
||||
hud.msg.output=Вывод
|
||||
hud.msg.input=Ввод
|
||||
hud.msg.out=Из
|
||||
hud.msg.in=В
|
||||
hud.msg.power=Энергия
|
||||
hud.msg.storage=Хранилище
|
||||
hud.msg.any=Всё
|
||||
hud.msg.mode=Режим
|
||||
hud.msg.maxpower=Макс. энергия
|
||||
hud.msg.trigger=Триггер
|
||||
hud.msg.maxio=Макс. ввод/вывод
|
||||
|
||||
hud.msg.send=Передача
|
||||
hud.msg.recv=Приём
|
||||
hud.msg.item=Предмет
|
||||
hud.msg.fluid=Жидкость
|
||||
hud.msg.energ=Энергия
|
||||
hud.msg.frequency=Частота
|
||||
|
||||
hud.msg.owner=Владелец
|
||||
hud.msg.public=Публичный
|
||||
hud.msg.restricted=Ограниченный
|
||||
hud.msg.private=Приватный
|
||||
|
||||
hud.msg.white=Белый
|
||||
hud.msg.orange=Оранжевый
|
||||
hud.msg.magenta=Сиреневый
|
||||
hud.msg.lblue=Светло-синий
|
||||
hud.msg.yellow=Жёлтый
|
||||
hud.msg.lime=Светло-зелёный
|
||||
hud.msg.pink=Розовый
|
||||
hud.msg.gray=Серый
|
||||
hud.msg.lgray=Светло-серый
|
||||
hud.msg.cyan=Бирюзовый
|
||||
hud.msg.purple=Фиолетовый
|
||||
hud.msg.blue=Синий
|
||||
hud.msg.brown=Коричневый
|
||||
hud.msg.green=Зелёный
|
||||
hud.msg.red=Красный
|
||||
hud.msg.black=Чёрный
|
||||
|
||||
hud.msg.growth=Рост
|
||||
hud.msg.mature=Вырос
|
||||
hud.msg.off=Выкл.
|
||||
hud.msg.on=Вкл.
|
||||
hud.msg.state=Статус
|
||||
hud.msg.delay=Задержка
|
||||
hud.msg.comparator=Компаратор
|
||||
hud.msg.substractor=Вычитатель
|
||||
hud.msg.record=Пластинка
|
||||
|
||||
option.appeng.monitorcontent=Содержимое монитора
|
||||
option.bb.content=Содержимое бочки
|
||||
option.bc.tankamount=Кол-во жидкости
|
||||
option.bc.tanktype=Тип жидкости
|
||||
option.enderstorage.colors=Цвета
|
||||
option.ic2.inputeumach=Макс. ввод еЭ [Машины]
|
||||
option.ic2.inputeuother=Макс. ввод еЭ [Другое]
|
||||
option.ic2.inputeu=Макс. ввод еЭ
|
||||
option.ic2.outputeu=Макс. вывод еЭ
|
||||
option.ic2.storage=Заряд энергии
|
||||
option.thaumcraft.storedvis=Заряд конденсатора
|
||||
option.thermalexpansion.energyhandler=Показывать заряд заряжателя
|
||||
option.thermalexpansion.energycell=Показывать Ввод/Вывод Р.батареи
|
||||
option.thermalexpansion.fluidtype=Показывать тип жидкости
|
||||
option.thermalexpansion.fluidamount=Показывать кол-во жидкости
|
||||
option.thermalexpansion.tankmode=Режим цистерны
|
||||
option.thermalexpansion.tesssendrecv=Режим тессеракта
|
||||
option.thermalexpansion.tessfreq=Частота тессеракта
|
||||
option.thermalexpansion.owner=Показывать владельца
|
||||
option.thermalexpansion.conditemmode=Показывать режим труб
|
||||
option.vanilla.spawntype=Тип спаунера
|
||||
option.vanilla.growthvalue=Стадия роста
|
||||
option.vanilla.leverstate=Положение рычага
|
||||
option.vanilla.repeater=Задержка повторителя
|
||||
option.vanilla.comparator=Режим компаратора
|
||||
option.vanilla.redstone=Сила красного камня
|
||||
option.vanilla.jukebox=Пластинка в проигрывателе
|
||||
option.etb.displaydata=Показывать инф. о сокетах
|
||||
option.enderio.inout=Показывать ввод/вывод
|
||||
option.enderio.storage=Показывать заряд MJ
|
||||
option.enderio.owner=Показывать владельца блока
|
||||
option.enderio.channel=Показывать канал гиперкуба
|
||||
option.bcapi.storage=Показывать заряд MJ
|
||||
option.bcapi.consump=Показывать макс. энергию
|
||||
option.bcapi.trigger=Показывать энергию активации
|
||||
option.pr.showio=Показывать ввод/вывод схем
|
||||
option.pr.showdata=Показывать инф. о схемах
|
||||
option.extrautilities.fluidamount=Показывать кол-во жидкости
|
||||
option.openblocks.fluidamount=Показывать кол-во жидкости
|
||||
option.railcraft.fluidamount=Показывать кол-во жидкости
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 5.0 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 82 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 82 KiB |
@@ -0,0 +1,323 @@
|
||||
package au.com.bytecode.opencsv;
|
||||
|
||||
/**
|
||||
Copyright 2005 Bytecode Pty Ltd.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* A very simple CSV parser released under a commercial-friendly license.
|
||||
* This just implements splitting a single line into fields.
|
||||
*
|
||||
* @author Glen Smith
|
||||
* @author Rainer Pruy
|
||||
*/
|
||||
public class CSVParser {
|
||||
|
||||
private final char separator;
|
||||
|
||||
private final char quotechar;
|
||||
|
||||
private final char escape;
|
||||
|
||||
private final boolean strictQuotes;
|
||||
|
||||
private String pending;
|
||||
private boolean inField = false;
|
||||
|
||||
private final boolean ignoreLeadingWhiteSpace;
|
||||
|
||||
/**
|
||||
* The default separator to use if none is supplied to the constructor.
|
||||
*/
|
||||
public static final char DEFAULT_SEPARATOR = ',';
|
||||
|
||||
public static final int INITIAL_READ_SIZE = 128;
|
||||
|
||||
/**
|
||||
* The default quote character to use if none is supplied to the
|
||||
* constructor.
|
||||
*/
|
||||
public static final char DEFAULT_QUOTE_CHARACTER = '"';
|
||||
|
||||
|
||||
/**
|
||||
* The default escape character to use if none is supplied to the
|
||||
* constructor.
|
||||
*/
|
||||
public static final char DEFAULT_ESCAPE_CHARACTER = '\\';
|
||||
|
||||
/**
|
||||
* The default strict quote behavior to use if none is supplied to the
|
||||
* constructor
|
||||
*/
|
||||
public static final boolean DEFAULT_STRICT_QUOTES = false;
|
||||
|
||||
/**
|
||||
* The default leading whitespace behavior to use if none is supplied to the
|
||||
* constructor
|
||||
*/
|
||||
public static final boolean DEFAULT_IGNORE_LEADING_WHITESPACE = true;
|
||||
|
||||
/**
|
||||
* This is the "null" character - if a value is set to this then it is ignored.
|
||||
* I.E. if the quote character is set to null then there is no quote character.
|
||||
*/
|
||||
public static final char NULL_CHARACTER = '\0';
|
||||
|
||||
/**
|
||||
* Constructs CSVParser using a comma for the separator.
|
||||
*/
|
||||
public CSVParser() {
|
||||
this(DEFAULT_SEPARATOR, DEFAULT_QUOTE_CHARACTER, DEFAULT_ESCAPE_CHARACTER);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs CSVParser with supplied separator.
|
||||
*
|
||||
* @param separator the delimiter to use for separating entries.
|
||||
*/
|
||||
public CSVParser(char separator) {
|
||||
this(separator, DEFAULT_QUOTE_CHARACTER, DEFAULT_ESCAPE_CHARACTER);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Constructs CSVParser with supplied separator and quote char.
|
||||
*
|
||||
* @param separator the delimiter to use for separating entries
|
||||
* @param quotechar the character to use for quoted elements
|
||||
*/
|
||||
public CSVParser(char separator, char quotechar) {
|
||||
this(separator, quotechar, DEFAULT_ESCAPE_CHARACTER);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs CSVReader with supplied separator and quote char.
|
||||
*
|
||||
* @param separator the delimiter to use for separating entries
|
||||
* @param quotechar the character to use for quoted elements
|
||||
* @param escape the character to use for escaping a separator or quote
|
||||
*/
|
||||
public CSVParser(char separator, char quotechar, char escape) {
|
||||
this(separator, quotechar, escape, DEFAULT_STRICT_QUOTES);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs CSVReader with supplied separator and quote char.
|
||||
* Allows setting the "strict quotes" flag
|
||||
*
|
||||
* @param separator the delimiter to use for separating entries
|
||||
* @param quotechar the character to use for quoted elements
|
||||
* @param escape the character to use for escaping a separator or quote
|
||||
* @param strictQuotes if true, characters outside the quotes are ignored
|
||||
*/
|
||||
public CSVParser(char separator, char quotechar, char escape, boolean strictQuotes) {
|
||||
this(separator, quotechar, escape, strictQuotes, DEFAULT_IGNORE_LEADING_WHITESPACE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs CSVReader with supplied separator and quote char.
|
||||
* Allows setting the "strict quotes" and "ignore leading whitespace" flags
|
||||
*
|
||||
* @param separator the delimiter to use for separating entries
|
||||
* @param quotechar the character to use for quoted elements
|
||||
* @param escape the character to use for escaping a separator or quote
|
||||
* @param strictQuotes if true, characters outside the quotes are ignored
|
||||
* @param ignoreLeadingWhiteSpace if true, white space in front of a quote in a field is ignored
|
||||
*/
|
||||
public CSVParser(char separator, char quotechar, char escape, boolean strictQuotes, boolean ignoreLeadingWhiteSpace) {
|
||||
if (anyCharactersAreTheSame(separator, quotechar, escape)) {
|
||||
throw new UnsupportedOperationException("The separator, quote, and escape characters must be different!");
|
||||
}
|
||||
if (separator == NULL_CHARACTER) {
|
||||
throw new UnsupportedOperationException("The separator character must be defined!");
|
||||
}
|
||||
this.separator = separator;
|
||||
this.quotechar = quotechar;
|
||||
this.escape = escape;
|
||||
this.strictQuotes = strictQuotes;
|
||||
this.ignoreLeadingWhiteSpace = ignoreLeadingWhiteSpace;
|
||||
}
|
||||
|
||||
private boolean anyCharactersAreTheSame(char separator, char quotechar, char escape) {
|
||||
return isSameCharacter(separator, quotechar) || isSameCharacter(separator, escape) || isSameCharacter(quotechar, escape);
|
||||
}
|
||||
|
||||
private boolean isSameCharacter(char c1, char c2) {
|
||||
return c1 != NULL_CHARACTER && c1 == c2;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if something was left over from last call(s)
|
||||
*/
|
||||
public boolean isPending() {
|
||||
return pending != null;
|
||||
}
|
||||
|
||||
public String[] parseLineMulti(String nextLine) throws IOException {
|
||||
return parseLine(nextLine, true);
|
||||
}
|
||||
|
||||
public String[] parseLine(String nextLine) throws IOException {
|
||||
return parseLine(nextLine, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses an incoming String and returns an array of elements.
|
||||
*
|
||||
* @param nextLine the string to parse
|
||||
* @param multi
|
||||
* @return the comma-tokenized list of elements, or null if nextLine is null
|
||||
* @throws IOException if bad things happen during the read
|
||||
*/
|
||||
private String[] parseLine(String nextLine, boolean multi) throws IOException {
|
||||
|
||||
if (!multi && pending != null) {
|
||||
pending = null;
|
||||
}
|
||||
|
||||
if (nextLine == null) {
|
||||
if (pending != null) {
|
||||
String s = pending;
|
||||
pending = null;
|
||||
return new String[]{s};
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
List<String> tokensOnThisLine = new ArrayList<String>();
|
||||
StringBuilder sb = new StringBuilder(INITIAL_READ_SIZE);
|
||||
boolean inQuotes = false;
|
||||
if (pending != null) {
|
||||
sb.append(pending);
|
||||
pending = null;
|
||||
inQuotes = true;
|
||||
}
|
||||
for (int i = 0; i < nextLine.length(); i++) {
|
||||
|
||||
char c = nextLine.charAt(i);
|
||||
if (c == this.escape) {
|
||||
if (isNextCharacterEscapable(nextLine, inQuotes || inField, i)) {
|
||||
sb.append(nextLine.charAt(i + 1));
|
||||
i++;
|
||||
}
|
||||
} else if (c == quotechar) {
|
||||
if (isNextCharacterEscapedQuote(nextLine, inQuotes || inField, i)) {
|
||||
sb.append(nextLine.charAt(i + 1));
|
||||
i++;
|
||||
} else {
|
||||
//inQuotes = !inQuotes;
|
||||
|
||||
// the tricky case of an embedded quote in the middle: a,bc"d"ef,g
|
||||
if (!strictQuotes) {
|
||||
if (i > 2 //not on the beginning of the line
|
||||
&& nextLine.charAt(i - 1) != this.separator //not at the beginning of an escape sequence
|
||||
&& nextLine.length() > (i + 1) &&
|
||||
nextLine.charAt(i + 1) != this.separator //not at the end of an escape sequence
|
||||
) {
|
||||
|
||||
if (ignoreLeadingWhiteSpace && sb.length() > 0 && isAllWhiteSpace(sb)) {
|
||||
sb.setLength(0); //discard white space leading up to quote
|
||||
} else {
|
||||
sb.append(c);
|
||||
//continue;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
inQuotes = !inQuotes;
|
||||
}
|
||||
inField = !inField;
|
||||
} else if (c == separator && !inQuotes) {
|
||||
tokensOnThisLine.add(sb.toString());
|
||||
sb.setLength(0); // start work on next token
|
||||
inField = false;
|
||||
} else {
|
||||
if (!strictQuotes || inQuotes) {
|
||||
sb.append(c);
|
||||
inField = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
// line is done - check status
|
||||
if (inQuotes) {
|
||||
if (multi) {
|
||||
// continuing a quoted section, re-append newline
|
||||
sb.append("\n");
|
||||
pending = sb.toString();
|
||||
sb = null; // this partial content is not to be added to field list yet
|
||||
} else {
|
||||
throw new IOException("Un-terminated quoted field at end of CSV line");
|
||||
}
|
||||
}
|
||||
if (sb != null) {
|
||||
tokensOnThisLine.add(sb.toString());
|
||||
}
|
||||
return tokensOnThisLine.toArray(new String[tokensOnThisLine.size()]);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* precondition: the current character is a quote or an escape
|
||||
*
|
||||
* @param nextLine the current line
|
||||
* @param inQuotes true if the current context is quoted
|
||||
* @param i current index in line
|
||||
* @return true if the following character is a quote
|
||||
*/
|
||||
private boolean isNextCharacterEscapedQuote(String nextLine, boolean inQuotes, int i) {
|
||||
return inQuotes // we are in quotes, therefore there can be escaped quotes in here.
|
||||
&& nextLine.length() > (i + 1) // there is indeed another character to check.
|
||||
&& nextLine.charAt(i + 1) == quotechar;
|
||||
}
|
||||
|
||||
/**
|
||||
* precondition: the current character is an escape
|
||||
*
|
||||
* @param nextLine the current line
|
||||
* @param inQuotes true if the current context is quoted
|
||||
* @param i current index in line
|
||||
* @return true if the following character is a quote
|
||||
*/
|
||||
protected boolean isNextCharacterEscapable(String nextLine, boolean inQuotes, int i) {
|
||||
return inQuotes // we are in quotes, therefore there can be escaped quotes in here.
|
||||
&& nextLine.length() > (i + 1) // there is indeed another character to check.
|
||||
&& (nextLine.charAt(i + 1) == quotechar || nextLine.charAt(i + 1) == this.escape);
|
||||
}
|
||||
|
||||
/**
|
||||
* precondition: sb.length() > 0
|
||||
*
|
||||
* @param sb A sequence of characters to examine
|
||||
* @return true if every character in the sequence is whitespace
|
||||
*/
|
||||
protected boolean isAllWhiteSpace(CharSequence sb) {
|
||||
boolean result = true;
|
||||
for (int i = 0; i < sb.length(); i++) {
|
||||
char c = sb.charAt(i);
|
||||
|
||||
if (!Character.isWhitespace(c)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,282 @@
|
||||
package au.com.bytecode.opencsv;
|
||||
|
||||
/**
|
||||
Copyright 2005 Bytecode Pty Ltd.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.Closeable;
|
||||
import java.io.IOException;
|
||||
import java.io.Reader;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* A very simple CSV reader released under a commercial-friendly license.
|
||||
*
|
||||
* @author Glen Smith
|
||||
*
|
||||
*/
|
||||
public class CSVReader implements Closeable {
|
||||
|
||||
private BufferedReader br;
|
||||
|
||||
private boolean hasNext = true;
|
||||
|
||||
private CSVParser parser;
|
||||
|
||||
private int skipLines;
|
||||
|
||||
private boolean linesSkiped;
|
||||
|
||||
/**
|
||||
* The default line to start reading.
|
||||
*/
|
||||
public static final int DEFAULT_SKIP_LINES = 0;
|
||||
|
||||
/**
|
||||
* Constructs CSVReader using a comma for the separator.
|
||||
*
|
||||
* @param reader
|
||||
* the reader to an underlying CSV source.
|
||||
*/
|
||||
public CSVReader(Reader reader) {
|
||||
this(reader, CSVParser.DEFAULT_SEPARATOR, CSVParser.DEFAULT_QUOTE_CHARACTER, CSVParser.DEFAULT_ESCAPE_CHARACTER);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs CSVReader with supplied separator.
|
||||
*
|
||||
* @param reader
|
||||
* the reader to an underlying CSV source.
|
||||
* @param separator
|
||||
* the delimiter to use for separating entries.
|
||||
*/
|
||||
public CSVReader(Reader reader, char separator) {
|
||||
this(reader, separator, CSVParser.DEFAULT_QUOTE_CHARACTER, CSVParser.DEFAULT_ESCAPE_CHARACTER);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs CSVReader with supplied separator and quote char.
|
||||
*
|
||||
* @param reader
|
||||
* the reader to an underlying CSV source.
|
||||
* @param separator
|
||||
* the delimiter to use for separating entries
|
||||
* @param quotechar
|
||||
* the character to use for quoted elements
|
||||
*/
|
||||
public CSVReader(Reader reader, char separator, char quotechar) {
|
||||
this(reader, separator, quotechar, CSVParser.DEFAULT_ESCAPE_CHARACTER, DEFAULT_SKIP_LINES, CSVParser.DEFAULT_STRICT_QUOTES);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs CSVReader with supplied separator, quote char and quote handling
|
||||
* behavior.
|
||||
*
|
||||
* @param reader
|
||||
* the reader to an underlying CSV source.
|
||||
* @param separator
|
||||
* the delimiter to use for separating entries
|
||||
* @param quotechar
|
||||
* the character to use for quoted elements
|
||||
* @param strictQuotes
|
||||
* sets if characters outside the quotes are ignored
|
||||
*/
|
||||
public CSVReader(Reader reader, char separator, char quotechar, boolean strictQuotes) {
|
||||
this(reader, separator, quotechar, CSVParser.DEFAULT_ESCAPE_CHARACTER, DEFAULT_SKIP_LINES, strictQuotes);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs CSVReader with supplied separator and quote char.
|
||||
*
|
||||
* @param reader
|
||||
* the reader to an underlying CSV source.
|
||||
* @param separator
|
||||
* the delimiter to use for separating entries
|
||||
* @param quotechar
|
||||
* the character to use for quoted elements
|
||||
* @param escape
|
||||
* the character to use for escaping a separator or quote
|
||||
*/
|
||||
|
||||
public CSVReader(Reader reader, char separator,
|
||||
char quotechar, char escape) {
|
||||
this(reader, separator, quotechar, escape, DEFAULT_SKIP_LINES, CSVParser.DEFAULT_STRICT_QUOTES);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs CSVReader with supplied separator and quote char.
|
||||
*
|
||||
* @param reader
|
||||
* the reader to an underlying CSV source.
|
||||
* @param separator
|
||||
* the delimiter to use for separating entries
|
||||
* @param quotechar
|
||||
* the character to use for quoted elements
|
||||
* @param line
|
||||
* the line number to skip for start reading
|
||||
*/
|
||||
public CSVReader(Reader reader, char separator, char quotechar, int line) {
|
||||
this(reader, separator, quotechar, CSVParser.DEFAULT_ESCAPE_CHARACTER, line, CSVParser.DEFAULT_STRICT_QUOTES);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs CSVReader with supplied separator and quote char.
|
||||
*
|
||||
* @param reader
|
||||
* the reader to an underlying CSV source.
|
||||
* @param separator
|
||||
* the delimiter to use for separating entries
|
||||
* @param quotechar
|
||||
* the character to use for quoted elements
|
||||
* @param escape
|
||||
* the character to use for escaping a separator or quote
|
||||
* @param line
|
||||
* the line number to skip for start reading
|
||||
*/
|
||||
public CSVReader(Reader reader, char separator, char quotechar, char escape, int line) {
|
||||
this(reader, separator, quotechar, escape, line, CSVParser.DEFAULT_STRICT_QUOTES);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs CSVReader with supplied separator and quote char.
|
||||
*
|
||||
* @param reader
|
||||
* the reader to an underlying CSV source.
|
||||
* @param separator
|
||||
* the delimiter to use for separating entries
|
||||
* @param quotechar
|
||||
* the character to use for quoted elements
|
||||
* @param escape
|
||||
* the character to use for escaping a separator or quote
|
||||
* @param line
|
||||
* the line number to skip for start reading
|
||||
* @param strictQuotes
|
||||
* sets if characters outside the quotes are ignored
|
||||
*/
|
||||
public CSVReader(Reader reader, char separator, char quotechar, char escape, int line, boolean strictQuotes) {
|
||||
this(reader, separator, quotechar, escape, line, strictQuotes, CSVParser.DEFAULT_IGNORE_LEADING_WHITESPACE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs CSVReader with supplied separator and quote char.
|
||||
*
|
||||
* @param reader
|
||||
* the reader to an underlying CSV source.
|
||||
* @param separator
|
||||
* the delimiter to use for separating entries
|
||||
* @param quotechar
|
||||
* the character to use for quoted elements
|
||||
* @param escape
|
||||
* the character to use for escaping a separator or quote
|
||||
* @param line
|
||||
* the line number to skip for start reading
|
||||
* @param strictQuotes
|
||||
* sets if characters outside the quotes are ignored
|
||||
* @param ignoreLeadingWhiteSpace
|
||||
* it true, parser should ignore white space before a quote in a field
|
||||
*/
|
||||
public CSVReader(Reader reader, char separator, char quotechar, char escape, int line, boolean strictQuotes, boolean ignoreLeadingWhiteSpace) {
|
||||
this.br = new BufferedReader(reader);
|
||||
this.parser = new CSVParser(separator, quotechar, escape, strictQuotes, ignoreLeadingWhiteSpace);
|
||||
this.skipLines = line;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads the entire file into a List with each element being a String[] of
|
||||
* tokens.
|
||||
*
|
||||
* @return a List of String[], with each String[] representing a line of the
|
||||
* file.
|
||||
*
|
||||
* @throws IOException
|
||||
* if bad things happen during the read
|
||||
*/
|
||||
public List<String[]> readAll() throws IOException {
|
||||
|
||||
List<String[]> allElements = new ArrayList<String[]>();
|
||||
while (hasNext) {
|
||||
String[] nextLineAsTokens = readNext();
|
||||
if (nextLineAsTokens != null)
|
||||
allElements.add(nextLineAsTokens);
|
||||
}
|
||||
return allElements;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads the next line from the buffer and converts to a string array.
|
||||
*
|
||||
* @return a string array with each comma-separated element as a separate
|
||||
* entry.
|
||||
*
|
||||
* @throws IOException
|
||||
* if bad things happen during the read
|
||||
*/
|
||||
public String[] readNext() throws IOException {
|
||||
|
||||
String[] result = null;
|
||||
do {
|
||||
String nextLine = getNextLine();
|
||||
if (!hasNext) {
|
||||
return result; // should throw if still pending?
|
||||
}
|
||||
String[] r = parser.parseLineMulti(nextLine);
|
||||
if (r.length > 0) {
|
||||
if (result == null) {
|
||||
result = r;
|
||||
} else {
|
||||
String[] t = new String[result.length+r.length];
|
||||
System.arraycopy(result, 0, t, 0, result.length);
|
||||
System.arraycopy(r, 0, t, result.length, r.length);
|
||||
result = t;
|
||||
}
|
||||
}
|
||||
} while (parser.isPending());
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads the next line from the file.
|
||||
*
|
||||
* @return the next line from the file without trailing newline
|
||||
* @throws IOException
|
||||
* if bad things happen during the read
|
||||
*/
|
||||
private String getNextLine() throws IOException {
|
||||
if (!this.linesSkiped) {
|
||||
for (int i = 0; i < skipLines; i++) {
|
||||
br.readLine();
|
||||
}
|
||||
this.linesSkiped = true;
|
||||
}
|
||||
String nextLine = br.readLine();
|
||||
if (nextLine == null) {
|
||||
hasNext = false;
|
||||
}
|
||||
return hasNext ? nextLine : null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Closes the underlying reader.
|
||||
*
|
||||
* @throws IOException if the close fails
|
||||
*/
|
||||
public void close() throws IOException{
|
||||
br.close();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,302 @@
|
||||
package au.com.bytecode.opencsv;
|
||||
|
||||
/**
|
||||
Copyright 2005 Bytecode Pty Ltd.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import java.io.Closeable;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import java.io.Writer;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* A very simple CSV writer released under a commercial-friendly license.
|
||||
*
|
||||
* @author Glen Smith
|
||||
*
|
||||
*/
|
||||
public class CSVWriter implements Closeable {
|
||||
|
||||
public static final int INITIAL_STRING_SIZE = 128;
|
||||
|
||||
private Writer rawWriter;
|
||||
|
||||
private PrintWriter pw;
|
||||
|
||||
private char separator;
|
||||
|
||||
private char quotechar;
|
||||
|
||||
private char escapechar;
|
||||
|
||||
private String lineEnd;
|
||||
|
||||
/** The character used for escaping quotes. */
|
||||
public static final char DEFAULT_ESCAPE_CHARACTER = '"';
|
||||
|
||||
/** The default separator to use if none is supplied to the constructor. */
|
||||
public static final char DEFAULT_SEPARATOR = ',';
|
||||
|
||||
/**
|
||||
* The default quote character to use if none is supplied to the
|
||||
* constructor.
|
||||
*/
|
||||
public static final char DEFAULT_QUOTE_CHARACTER = '"';
|
||||
|
||||
/** The quote constant to use when you wish to suppress all quoting. */
|
||||
public static final char NO_QUOTE_CHARACTER = '\u0000';
|
||||
|
||||
/** The escape constant to use when you wish to suppress all escaping. */
|
||||
public static final char NO_ESCAPE_CHARACTER = '\u0000';
|
||||
|
||||
/** Default line terminator uses platform encoding. */
|
||||
public static final String DEFAULT_LINE_END = "\n";
|
||||
|
||||
private ResultSetHelper resultService = new ResultSetHelperService();
|
||||
|
||||
/**
|
||||
* Constructs CSVWriter using a comma for the separator.
|
||||
*
|
||||
* @param writer
|
||||
* the writer to an underlying CSV source.
|
||||
*/
|
||||
public CSVWriter(Writer writer) {
|
||||
this(writer, DEFAULT_SEPARATOR);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs CSVWriter with supplied separator.
|
||||
*
|
||||
* @param writer
|
||||
* the writer to an underlying CSV source.
|
||||
* @param separator
|
||||
* the delimiter to use for separating entries.
|
||||
*/
|
||||
public CSVWriter(Writer writer, char separator) {
|
||||
this(writer, separator, DEFAULT_QUOTE_CHARACTER);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs CSVWriter with supplied separator and quote char.
|
||||
*
|
||||
* @param writer
|
||||
* the writer to an underlying CSV source.
|
||||
* @param separator
|
||||
* the delimiter to use for separating entries
|
||||
* @param quotechar
|
||||
* the character to use for quoted elements
|
||||
*/
|
||||
public CSVWriter(Writer writer, char separator, char quotechar) {
|
||||
this(writer, separator, quotechar, DEFAULT_ESCAPE_CHARACTER);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs CSVWriter with supplied separator and quote char.
|
||||
*
|
||||
* @param writer
|
||||
* the writer to an underlying CSV source.
|
||||
* @param separator
|
||||
* the delimiter to use for separating entries
|
||||
* @param quotechar
|
||||
* the character to use for quoted elements
|
||||
* @param escapechar
|
||||
* the character to use for escaping quotechars or escapechars
|
||||
*/
|
||||
public CSVWriter(Writer writer, char separator, char quotechar, char escapechar) {
|
||||
this(writer, separator, quotechar, escapechar, DEFAULT_LINE_END);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Constructs CSVWriter with supplied separator and quote char.
|
||||
*
|
||||
* @param writer
|
||||
* the writer to an underlying CSV source.
|
||||
* @param separator
|
||||
* the delimiter to use for separating entries
|
||||
* @param quotechar
|
||||
* the character to use for quoted elements
|
||||
* @param lineEnd
|
||||
* the line feed terminator to use
|
||||
*/
|
||||
public CSVWriter(Writer writer, char separator, char quotechar, String lineEnd) {
|
||||
this(writer, separator, quotechar, DEFAULT_ESCAPE_CHARACTER, lineEnd);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Constructs CSVWriter with supplied separator, quote char, escape char and line ending.
|
||||
*
|
||||
* @param writer
|
||||
* the writer to an underlying CSV source.
|
||||
* @param separator
|
||||
* the delimiter to use for separating entries
|
||||
* @param quotechar
|
||||
* the character to use for quoted elements
|
||||
* @param escapechar
|
||||
* the character to use for escaping quotechars or escapechars
|
||||
* @param lineEnd
|
||||
* the line feed terminator to use
|
||||
*/
|
||||
public CSVWriter(Writer writer, char separator, char quotechar, char escapechar, String lineEnd) {
|
||||
this.rawWriter = writer;
|
||||
this.pw = new PrintWriter(writer);
|
||||
this.separator = separator;
|
||||
this.quotechar = quotechar;
|
||||
this.escapechar = escapechar;
|
||||
this.lineEnd = lineEnd;
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes the entire list to a CSV file. The list is assumed to be a
|
||||
* String[]
|
||||
*
|
||||
* @param allLines
|
||||
* a List of String[], with each String[] representing a line of
|
||||
* the file.
|
||||
*/
|
||||
public void writeAll(List<String[]> allLines) {
|
||||
for (String[] line : allLines) {
|
||||
writeNext(line);
|
||||
}
|
||||
}
|
||||
|
||||
protected void writeColumnNames(ResultSet rs)
|
||||
throws SQLException {
|
||||
|
||||
writeNext(resultService.getColumnNames(rs));
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes the entire ResultSet to a CSV file.
|
||||
*
|
||||
* The caller is responsible for closing the ResultSet.
|
||||
*
|
||||
* @param rs the recordset to write
|
||||
* @param includeColumnNames true if you want column names in the output, false otherwise
|
||||
*
|
||||
* @throws java.io.IOException thrown by getColumnValue
|
||||
* @throws java.sql.SQLException thrown by getColumnValue
|
||||
*/
|
||||
public void writeAll(java.sql.ResultSet rs, boolean includeColumnNames) throws SQLException, IOException {
|
||||
|
||||
|
||||
if (includeColumnNames) {
|
||||
writeColumnNames(rs);
|
||||
}
|
||||
|
||||
while (rs.next())
|
||||
{
|
||||
writeNext(resultService.getColumnValues(rs));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Writes the next line to the file.
|
||||
*
|
||||
* @param nextLine
|
||||
* a string array with each comma-separated element as a separate
|
||||
* entry.
|
||||
*/
|
||||
public void writeNext(String[] nextLine) {
|
||||
|
||||
if (nextLine == null)
|
||||
return;
|
||||
|
||||
StringBuilder sb = new StringBuilder(INITIAL_STRING_SIZE);
|
||||
for (int i = 0; i < nextLine.length; i++) {
|
||||
|
||||
if (i != 0) {
|
||||
sb.append(separator);
|
||||
}
|
||||
|
||||
String nextElement = nextLine[i];
|
||||
if (nextElement == null)
|
||||
continue;
|
||||
if (quotechar != NO_QUOTE_CHARACTER)
|
||||
sb.append(quotechar);
|
||||
|
||||
sb.append(stringContainsSpecialCharacters(nextElement) ? processLine(nextElement) : nextElement);
|
||||
|
||||
if (quotechar != NO_QUOTE_CHARACTER)
|
||||
sb.append(quotechar);
|
||||
}
|
||||
|
||||
sb.append(lineEnd);
|
||||
pw.write(sb.toString());
|
||||
|
||||
}
|
||||
|
||||
private boolean stringContainsSpecialCharacters(String line) {
|
||||
return line.indexOf(quotechar) != -1 || line.indexOf(escapechar) != -1;
|
||||
}
|
||||
|
||||
protected StringBuilder processLine(String nextElement)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder(INITIAL_STRING_SIZE);
|
||||
for (int j = 0; j < nextElement.length(); j++) {
|
||||
char nextChar = nextElement.charAt(j);
|
||||
if (escapechar != NO_ESCAPE_CHARACTER && nextChar == quotechar) {
|
||||
sb.append(escapechar).append(nextChar);
|
||||
} else if (escapechar != NO_ESCAPE_CHARACTER && nextChar == escapechar) {
|
||||
sb.append(escapechar).append(nextChar);
|
||||
} else {
|
||||
sb.append(nextChar);
|
||||
}
|
||||
}
|
||||
|
||||
return sb;
|
||||
}
|
||||
|
||||
/**
|
||||
* Flush underlying stream to writer.
|
||||
*
|
||||
* @throws IOException if bad things happen
|
||||
*/
|
||||
public void flush() throws IOException {
|
||||
|
||||
pw.flush();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Close the underlying stream writer flushing any buffered content.
|
||||
*
|
||||
* @throws IOException if bad things happen
|
||||
*
|
||||
*/
|
||||
public void close() throws IOException {
|
||||
flush();
|
||||
pw.close();
|
||||
rawWriter.close();
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks to see if the there has been an error in the printstream.
|
||||
*/
|
||||
public boolean checkError() {
|
||||
return pw.checkError();
|
||||
}
|
||||
|
||||
public void setResultService(ResultSetHelper resultService) {
|
||||
this.resultService = resultService;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package au.com.bytecode.opencsv;
|
||||
/**
|
||||
Copyright 2005 Bytecode Pty Ltd.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import java.io.IOException;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
public interface ResultSetHelper {
|
||||
public String[] getColumnNames(ResultSet rs) throws SQLException;
|
||||
|
||||
public String[] getColumnValues(ResultSet rs) throws SQLException, IOException;
|
||||
}
|
||||
@@ -0,0 +1,183 @@
|
||||
package au.com.bytecode.opencsv;
|
||||
/**
|
||||
Copyright 2005 Bytecode Pty Ltd.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
import java.io.IOException;
|
||||
import java.io.Reader;
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.*;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* helper class for processing JDBC ResultSet objects
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class ResultSetHelperService implements ResultSetHelper {
|
||||
public static final int CLOBBUFFERSIZE = 2048;
|
||||
|
||||
// note: we want to maintain compatibility with Java 5 VM's
|
||||
// These types don't exist in Java 5
|
||||
private static final int NVARCHAR = -9;
|
||||
private static final int NCHAR = -15;
|
||||
private static final int LONGNVARCHAR = -16;
|
||||
private static final int NCLOB = 2011;
|
||||
|
||||
public String[] getColumnNames(ResultSet rs) throws SQLException {
|
||||
List<String> names = new ArrayList<String>();
|
||||
ResultSetMetaData metadata = rs.getMetaData();
|
||||
|
||||
for (int i = 0; i < metadata.getColumnCount(); i++) {
|
||||
names.add(metadata.getColumnName(i+1));
|
||||
}
|
||||
|
||||
String[] nameArray = new String[names.size()];
|
||||
return names.toArray(nameArray);
|
||||
}
|
||||
|
||||
public String[] getColumnValues(ResultSet rs) throws SQLException, IOException {
|
||||
|
||||
List<String> values = new ArrayList<String>();
|
||||
ResultSetMetaData metadata = rs.getMetaData();
|
||||
|
||||
for (int i = 0; i < metadata.getColumnCount(); i++) {
|
||||
values.add(getColumnValue(rs, metadata.getColumnType(i + 1), i + 1));
|
||||
}
|
||||
|
||||
String[] valueArray = new String[values.size()];
|
||||
return values.toArray(valueArray);
|
||||
}
|
||||
|
||||
private String handleObject(Object obj){
|
||||
return obj == null ? "" : String.valueOf(obj);
|
||||
}
|
||||
|
||||
private String handleBigDecimal(BigDecimal decimal) {
|
||||
return decimal == null ? "" : decimal.toString();
|
||||
}
|
||||
|
||||
private String handleLong(ResultSet rs, int columnIndex) throws SQLException {
|
||||
long lv = rs.getLong(columnIndex);
|
||||
return rs.wasNull() ? "" : Long.toString(lv);
|
||||
}
|
||||
|
||||
private String handleInteger(ResultSet rs, int columnIndex) throws SQLException {
|
||||
int i = rs.getInt(columnIndex);
|
||||
return rs.wasNull() ? "" : Integer.toString(i);
|
||||
}
|
||||
|
||||
private String handleDate(ResultSet rs, int columnIndex) throws SQLException {
|
||||
java.sql.Date date = rs.getDate(columnIndex);
|
||||
String value = null;
|
||||
if (date != null) {
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat("dd-MMM-yyyy");
|
||||
value = dateFormat.format(date);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
private String handleTime(Time time) {
|
||||
return time == null ? null : time.toString();
|
||||
}
|
||||
|
||||
private String handleTimestamp(Timestamp timestamp) {
|
||||
SimpleDateFormat timeFormat = new SimpleDateFormat("dd-MMM-yyyy HH:mm:ss");
|
||||
return timestamp == null ? null : timeFormat.format(timestamp);
|
||||
}
|
||||
|
||||
private String getColumnValue(ResultSet rs, int colType, int colIndex)
|
||||
throws SQLException, IOException {
|
||||
|
||||
String value = "";
|
||||
|
||||
switch (colType)
|
||||
{
|
||||
case Types.BIT:
|
||||
case Types.JAVA_OBJECT:
|
||||
value = handleObject(rs.getObject(colIndex));
|
||||
break;
|
||||
case Types.BOOLEAN:
|
||||
boolean b = rs.getBoolean(colIndex);
|
||||
value = Boolean.valueOf(b).toString();
|
||||
break;
|
||||
case NCLOB: // todo : use rs.getNClob
|
||||
case Types.CLOB:
|
||||
Clob c = rs.getClob(colIndex);
|
||||
if (c != null) {
|
||||
value = read(c);
|
||||
}
|
||||
break;
|
||||
case Types.BIGINT:
|
||||
value = handleLong(rs, colIndex);
|
||||
break;
|
||||
case Types.DECIMAL:
|
||||
case Types.DOUBLE:
|
||||
case Types.FLOAT:
|
||||
case Types.REAL:
|
||||
case Types.NUMERIC:
|
||||
value = handleBigDecimal(rs.getBigDecimal(colIndex));
|
||||
break;
|
||||
case Types.INTEGER:
|
||||
case Types.TINYINT:
|
||||
case Types.SMALLINT:
|
||||
value = handleInteger(rs, colIndex);
|
||||
break;
|
||||
case Types.DATE:
|
||||
value = handleDate(rs, colIndex);
|
||||
break;
|
||||
case Types.TIME:
|
||||
value = handleTime(rs.getTime(colIndex));
|
||||
break;
|
||||
case Types.TIMESTAMP:
|
||||
value = handleTimestamp(rs.getTimestamp(colIndex));
|
||||
break;
|
||||
case NVARCHAR: // todo : use rs.getNString
|
||||
case NCHAR: // todo : use rs.getNString
|
||||
case LONGNVARCHAR: // todo : use rs.getNString
|
||||
case Types.LONGVARCHAR:
|
||||
case Types.VARCHAR:
|
||||
case Types.CHAR:
|
||||
value = rs.getString(colIndex);
|
||||
break;
|
||||
default:
|
||||
value = "";
|
||||
}
|
||||
|
||||
|
||||
if (value == null)
|
||||
{
|
||||
value = "";
|
||||
}
|
||||
|
||||
return value;
|
||||
|
||||
}
|
||||
|
||||
private static String read(Clob c) throws SQLException, IOException
|
||||
{
|
||||
StringBuilder sb = new StringBuilder( (int) c.length());
|
||||
Reader r = c.getCharacterStream();
|
||||
char[] cbuf = new char[CLOBBUFFERSIZE];
|
||||
int n;
|
||||
while ((n = r.read(cbuf, 0, cbuf.length)) != -1) {
|
||||
sb.append(cbuf, 0, n);
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package au.com.bytecode.opencsv.bean;
|
||||
|
||||
import au.com.bytecode.opencsv.CSVReader;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
Copyright 2007 Kyle Miller.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
public class ColumnPositionMappingStrategy<T> extends HeaderColumnNameMappingStrategy<T> {
|
||||
private String[] columnMapping = new String[] {};
|
||||
public void captureHeader(CSVReader reader) throws IOException {
|
||||
//do nothing, first line is not header
|
||||
}
|
||||
protected String getColumnName(int col) {
|
||||
return (null != columnMapping && col < columnMapping.length) ? columnMapping[col] : null ;
|
||||
}
|
||||
public String[] getColumnMapping() {
|
||||
return columnMapping != null ? columnMapping.clone() : null;
|
||||
}
|
||||
public void setColumnMapping(String[] columnMapping) {
|
||||
this.columnMapping = columnMapping != null ? columnMapping.clone() : null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,119 @@
|
||||
package au.com.bytecode.opencsv.bean;
|
||||
|
||||
/**
|
||||
Copyright 2007 Kyle Miller.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import au.com.bytecode.opencsv.CSVReader;
|
||||
|
||||
import java.beans.IntrospectionException;
|
||||
import java.beans.PropertyDescriptor;
|
||||
import java.beans.PropertyEditor;
|
||||
import java.beans.PropertyEditorManager;
|
||||
import java.io.Reader;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class CsvToBean<T> {
|
||||
private Map<Class<?>, PropertyEditor> editorMap = null;
|
||||
|
||||
public CsvToBean() {
|
||||
}
|
||||
|
||||
public List<T> parse(MappingStrategy<T> mapper, Reader reader) {
|
||||
return parse(mapper, new CSVReader(reader));
|
||||
}
|
||||
|
||||
public List<T> parse(MappingStrategy<T> mapper, CSVReader csv) {
|
||||
try {
|
||||
mapper.captureHeader(csv);
|
||||
String[] line;
|
||||
List<T> list = new ArrayList<T>();
|
||||
while (null != (line = csv.readNext())) {
|
||||
T obj = processLine(mapper, line);
|
||||
list.add(obj); // TODO: (Kyle) null check object
|
||||
}
|
||||
return list;
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("Error parsing CSV!", e);
|
||||
}
|
||||
}
|
||||
|
||||
protected T processLine(MappingStrategy<T> mapper, String[] line) throws IllegalAccessException, InvocationTargetException, InstantiationException, IntrospectionException {
|
||||
T bean = mapper.createBean();
|
||||
for (int col = 0; col < line.length; col++) {
|
||||
PropertyDescriptor prop = mapper.findDescriptor(col);
|
||||
if (null != prop) {
|
||||
String value = checkForTrim(line[col], prop);
|
||||
Object obj = convertValue(value, prop);
|
||||
prop.getWriteMethod().invoke(bean, obj);
|
||||
}
|
||||
}
|
||||
return bean;
|
||||
}
|
||||
|
||||
private String checkForTrim(String s, PropertyDescriptor prop) {
|
||||
return trimmableProperty(prop) ? s.trim() : s;
|
||||
}
|
||||
|
||||
private boolean trimmableProperty(PropertyDescriptor prop) {
|
||||
return !prop.getPropertyType().getName().contains("String");
|
||||
}
|
||||
|
||||
protected Object convertValue(String value, PropertyDescriptor prop) throws InstantiationException, IllegalAccessException {
|
||||
PropertyEditor editor = getPropertyEditor(prop);
|
||||
Object obj = value;
|
||||
if (null != editor) {
|
||||
editor.setAsText(value);
|
||||
obj = editor.getValue();
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
private PropertyEditor getPropertyEditorValue(Class<?> cls) {
|
||||
if (editorMap == null) {
|
||||
editorMap = new HashMap<Class<?>, PropertyEditor>();
|
||||
}
|
||||
|
||||
PropertyEditor editor = editorMap.get(cls);
|
||||
|
||||
if (editor == null) {
|
||||
editor = PropertyEditorManager.findEditor(cls);
|
||||
addEditorToMap(cls, editor);
|
||||
}
|
||||
|
||||
return editor;
|
||||
}
|
||||
|
||||
private void addEditorToMap(Class<?> cls, PropertyEditor editor) {
|
||||
if (editor != null) {
|
||||
editorMap.put(cls, editor);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Attempt to find custom property editor on descriptor first, else try the propery editor manager.
|
||||
*/
|
||||
protected PropertyEditor getPropertyEditor(PropertyDescriptor desc) throws InstantiationException, IllegalAccessException {
|
||||
Class<?> cls = desc.getPropertyEditorClass();
|
||||
if (null != cls) return (PropertyEditor) cls.newInstance();
|
||||
return getPropertyEditorValue(desc.getPropertyType());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
package au.com.bytecode.opencsv.bean;
|
||||
|
||||
import au.com.bytecode.opencsv.CSVReader;
|
||||
|
||||
import java.beans.BeanInfo;
|
||||
import java.beans.IntrospectionException;
|
||||
import java.beans.Introspector;
|
||||
import java.beans.PropertyDescriptor;
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Copyright 2007 Kyle Miller.
|
||||
* <p/>
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
* <p/>
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* <p/>
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
public class HeaderColumnNameMappingStrategy<T> implements MappingStrategy<T> {
|
||||
protected String[] header;
|
||||
protected Map<String, PropertyDescriptor> descriptorMap = null;
|
||||
protected Class<T> type;
|
||||
|
||||
public void captureHeader(CSVReader reader) throws IOException {
|
||||
header = reader.readNext();
|
||||
}
|
||||
|
||||
public PropertyDescriptor findDescriptor(int col) throws IntrospectionException {
|
||||
String columnName = getColumnName(col);
|
||||
return (null != columnName && columnName.trim().length() > 0) ? findDescriptor(columnName) : null;
|
||||
}
|
||||
|
||||
protected String getColumnName(int col) {
|
||||
return (null != header && col < header.length) ? header[col] : null;
|
||||
}
|
||||
|
||||
protected PropertyDescriptor findDescriptor(String name) throws IntrospectionException {
|
||||
if (null == descriptorMap) descriptorMap = loadDescriptorMap(getType()); //lazy load descriptors
|
||||
return descriptorMap.get(name.toUpperCase().trim());
|
||||
}
|
||||
|
||||
protected boolean matches(String name, PropertyDescriptor desc) {
|
||||
return desc.getName().equals(name.trim());
|
||||
}
|
||||
|
||||
protected Map<String, PropertyDescriptor> loadDescriptorMap(Class<T> cls) throws IntrospectionException {
|
||||
Map<String, PropertyDescriptor> map = new HashMap<String, PropertyDescriptor>();
|
||||
|
||||
PropertyDescriptor[] descriptors;
|
||||
descriptors = loadDescriptors(getType());
|
||||
for (PropertyDescriptor descriptor : descriptors) {
|
||||
map.put(descriptor.getName().toUpperCase().trim(), descriptor);
|
||||
}
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
private PropertyDescriptor[] loadDescriptors(Class<T> cls) throws IntrospectionException {
|
||||
BeanInfo beanInfo = Introspector.getBeanInfo(cls);
|
||||
return beanInfo.getPropertyDescriptors();
|
||||
}
|
||||
|
||||
public T createBean() throws InstantiationException, IllegalAccessException {
|
||||
return type.newInstance();
|
||||
}
|
||||
|
||||
public Class<T> getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(Class<T> type) {
|
||||
this.type = type;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package au.com.bytecode.opencsv.bean;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
Copyright 2007,2010 Kyle Miller.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
public class HeaderColumnNameTranslateMappingStrategy<T> extends HeaderColumnNameMappingStrategy<T> {
|
||||
private Map<String, String> columnMapping = new HashMap<String, String>();
|
||||
protected String getColumnName(int col) {
|
||||
return col < header.length ? columnMapping.get(header[col].toUpperCase()) : null;
|
||||
}
|
||||
public Map<String, String> getColumnMapping() {
|
||||
return columnMapping;
|
||||
}
|
||||
public void setColumnMapping(Map<String, String> columnMapping) {
|
||||
for (String key : columnMapping.keySet()) {
|
||||
this.columnMapping.put(key.toUpperCase(), columnMapping.get(key));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
package au.com.bytecode.opencsv.bean;
|
||||
|
||||
|
||||
/**
|
||||
Copyright 2007 Kyle Miller.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import au.com.bytecode.opencsv.CSVReader;
|
||||
|
||||
import java.beans.IntrospectionException;
|
||||
import java.beans.PropertyDescriptor;
|
||||
import java.io.IOException;
|
||||
|
||||
public interface MappingStrategy<T> {
|
||||
|
||||
/**
|
||||
* Implementation will have to return a property descriptor from a bean based on the current column.
|
||||
* @param col the column to find the description for
|
||||
* @throws java.beans.IntrospectionException
|
||||
* @return the related PropertyDescriptor
|
||||
*/
|
||||
public abstract PropertyDescriptor findDescriptor(int col) throws IntrospectionException;
|
||||
|
||||
public abstract T createBean() throws InstantiationException, IllegalAccessException;
|
||||
|
||||
/**
|
||||
* Implementation of this method can grab the header line before parsing begins to use to map columns
|
||||
* to bean properties.
|
||||
* @param reader the CSVReader to use for header parsing
|
||||
* @throws java.io.IOException if parsing fails
|
||||
*/
|
||||
public void captureHeader(CSVReader reader) throws IOException;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||
<html>
|
||||
<head>
|
||||
</head>
|
||||
<body bgcolor="white">
|
||||
<p>
|
||||
A simple bean binding interface for use with opencsv.
|
||||
</p>
|
||||
<br>
|
||||
<a href="http://opencsv.sourceforge.net/">opencsv.sourceforge.net</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,12 @@
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
||||
<html>
|
||||
<head>
|
||||
</head>
|
||||
<body bgcolor="white">
|
||||
<p>
|
||||
A very simple CSV parser for Java released under a commercial-friendly license.
|
||||
</p>
|
||||
<br>
|
||||
<a href="http://opencsv.sourceforge.net/">opencsv.sourceforge.net</a>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,68 +0,0 @@
|
||||
package mcp.mobius.waila;
|
||||
|
||||
import java.util.logging.Level;
|
||||
|
||||
import codechicken.nei.api.API;
|
||||
import codechicken.nei.api.ItemInfo;
|
||||
import codechicken.nei.forge.GuiContainerManager;
|
||||
import cpw.mods.fml.client.registry.KeyBindingRegistry;
|
||||
|
||||
import mcp.mobius.waila.addons.ConfigHandler;
|
||||
import mcp.mobius.waila.addons.buildcraft.BCModule;
|
||||
import mcp.mobius.waila.addons.buildcraft.HUDHandlerBCTanks;
|
||||
import mcp.mobius.waila.addons.ic2.HUDHandlerIC2IEnergySource;
|
||||
import mcp.mobius.waila.addons.ic2.HUDHandlerIC2IEnergySink;
|
||||
import mcp.mobius.waila.addons.ic2.HUDHandlerIC2IEnergyStorage;
|
||||
import mcp.mobius.waila.addons.ic2.IC2Module;
|
||||
import mcp.mobius.waila.addons.vanillamc.HUDHandlerVanilla;
|
||||
import mcp.mobius.waila.gui.ConfigKeyHandler;
|
||||
import mcp.mobius.waila.handlers.HUDHandlerExternal;
|
||||
import mcp.mobius.waila.handlers.HUDHandlerWaila;
|
||||
import mcp.mobius.waila.handlers.TooltipHandlerWaila;
|
||||
import mcp.mobius.waila.server.ProxyServer;
|
||||
|
||||
public class ProxyClient extends ProxyServer {
|
||||
|
||||
public ProxyClient() {}
|
||||
|
||||
|
||||
@Override
|
||||
public void registerHandlers(){
|
||||
GuiContainerManager.addTooltipHandler(new TooltipHandlerWaila());
|
||||
//GuiContainerManager.addInputHandler(new EnchantementHandler());
|
||||
API.registerHighlightHandler(new HUDHandlerExternal(), ItemInfo.Layout.HEADER);
|
||||
API.registerHighlightHandler(new HUDHandlerExternal(), ItemInfo.Layout.BODY);
|
||||
API.registerHighlightHandler(new HUDHandlerWaila(), ItemInfo.Layout.FOOTER);
|
||||
API.registerHighlightHandler(new HUDHandlerWaila(), ItemInfo.Layout.HEADER);
|
||||
|
||||
//API.registerHighlightIdentifier(2000, new HUDHandlerExternal());
|
||||
KeyBindingRegistry.registerKeyBinding(new ConfigKeyHandler());
|
||||
//API.addKeyBind("showenchant", "Display enchantements", Keyboard.KEY_RSHIFT);
|
||||
this.registerMods();
|
||||
}
|
||||
|
||||
public void registerMods(){
|
||||
|
||||
HUDHandlerVanilla.register();
|
||||
|
||||
/* BETTER BARRELS */
|
||||
/*
|
||||
try {
|
||||
Class ModBetterBarrels = Class.forName("mcp.mobius.betterbarrels.mod_BetterBarrels");
|
||||
mod_Waila.log.log(Level.INFO, "BetterBarrel mod found.");
|
||||
HUDHandlerBetterBarrels.register();
|
||||
ConfigHandler.instance().addConfig("BetterBarrels", "betterbarrels.content", "Barrel content");
|
||||
} catch (ClassNotFoundException e){
|
||||
mod_Waila.log.log(Level.INFO, "BetterBarrel mod not found. Skipping.");
|
||||
}
|
||||
*/
|
||||
|
||||
/* BUILDCRAFT */
|
||||
BCModule.register();
|
||||
|
||||
/* INDUSTRIALCRAFT2 */
|
||||
IC2Module.register();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,172 @@
|
||||
package mcp.mobius.waila;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.google.common.eventbus.EventBus;
|
||||
import com.google.common.eventbus.Subscribe;
|
||||
|
||||
import mcp.mobius.waila.api.IWailaRegistrar;
|
||||
import mcp.mobius.waila.api.impl.ConfigHandler;
|
||||
import mcp.mobius.waila.api.impl.ModuleRegistrar;
|
||||
import mcp.mobius.waila.network.WailaConnectionHandler;
|
||||
import mcp.mobius.waila.network.WailaPacketHandler;
|
||||
import mcp.mobius.waila.overlay.OverlayConfig;
|
||||
import mcp.mobius.waila.overlay.DecoratorRenderer;
|
||||
import mcp.mobius.waila.server.ProxyServer;
|
||||
import mcp.mobius.waila.utils.Constants;
|
||||
import mcp.mobius.waila.utils.ModIdentification;
|
||||
import net.minecraft.client.resources.I18n;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.src.ModLoader;
|
||||
import net.minecraftforge.common.Configuration;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import codechicken.lib.lang.LangUtil;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.FMLModContainer;
|
||||
import cpw.mods.fml.common.Mod;
|
||||
import cpw.mods.fml.common.Mod.EventHandler;
|
||||
import cpw.mods.fml.common.Mod.Instance;
|
||||
import cpw.mods.fml.common.SidedProxy;
|
||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms.IMCMessage;
|
||||
import cpw.mods.fml.common.event.FMLLoadCompleteEvent;
|
||||
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
import cpw.mods.fml.common.network.NetworkMod;
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
|
||||
@Mod(modid="Waila", name="Waila", version="1.5.2", dependencies="required-after:NotEnoughItems")
|
||||
@NetworkMod(channels = {"Waila"},clientSideRequired=false, serverSideRequired=false, connectionHandler = WailaConnectionHandler.class,
|
||||
packetHandler = WailaPacketHandler.class, versionBounds="[1.5.0,)")
|
||||
//packetHandler = WailaPacketHandler.class)
|
||||
|
||||
public class Waila {
|
||||
// The instance of your mod that Forge uses.
|
||||
@Instance("Waila")
|
||||
public static Waila instance;
|
||||
|
||||
@SidedProxy(clientSide="mcp.mobius.waila.client.ProxyClient", serverSide="mcp.mobius.waila.server.ProxyServer")
|
||||
public static ProxyServer proxy;
|
||||
public static Logger log = Logger.getLogger("Waila");
|
||||
public boolean serverPresent = false;
|
||||
|
||||
/* INIT SEQUENCE */
|
||||
@EventHandler
|
||||
public void preInit(FMLPreInitializationEvent event) {
|
||||
ConfigHandler.instance().loadDefaultConfig(event);
|
||||
OverlayConfig.updateColors();
|
||||
MinecraftForge.EVENT_BUS.register(new DecoratorRenderer());
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void initialize(FMLInitializationEvent event) {
|
||||
try {
|
||||
Field eBus = FMLModContainer.class.getDeclaredField("eventBus");
|
||||
eBus.setAccessible(true);
|
||||
EventBus FMLbus = (EventBus) eBus.get(FMLCommonHandler.instance().findContainerFor(this));
|
||||
FMLbus.register(this);
|
||||
} catch (Throwable t) {}
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void postInit(FMLPostInitializationEvent event) {
|
||||
proxy.registerHandlers();
|
||||
ModIdentification.init();
|
||||
|
||||
if (!ModLoader.isModLoaded("nek") && ConfigHandler.instance().getConfig(Configuration.CATEGORY_GENERAL, Constants.CFG_WAILA_KEYBIND, true)){
|
||||
|
||||
for (String key: ModIdentification.keyhandlerStrings.keySet()){
|
||||
String orig = I18n.getString(key);
|
||||
if (orig.equals(key))
|
||||
orig = LanguageRegistry.instance().getStringLocalization(key);
|
||||
if (orig.equals(key))
|
||||
orig = LangUtil.translateG(key);
|
||||
if (orig.isEmpty())
|
||||
orig = key;
|
||||
|
||||
String modif;
|
||||
if (orig.startsWith("[") || orig.contains(":"))
|
||||
modif = orig;
|
||||
else{
|
||||
String id = ModIdentification.keyhandlerStrings.get(key);
|
||||
|
||||
if (id.contains("."))
|
||||
id = id.split("\\.")[0];
|
||||
|
||||
if (id.length() > 10)
|
||||
id = id.substring(0, 11);
|
||||
|
||||
if (id.isEmpty())
|
||||
id = "????";
|
||||
|
||||
modif = String.format("[%s] %s", id, orig);
|
||||
}
|
||||
|
||||
LanguageRegistry.instance().addStringLocalization(key, modif);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
public void loadComplete(FMLLoadCompleteEvent event) {
|
||||
proxy.registerMods();
|
||||
|
||||
String[] ores = OreDictionary.getOreNames();
|
||||
for (String s : ores)
|
||||
for (ItemStack stack : OreDictionary.getOres(s))
|
||||
System.out.printf("%s : %s\n", s, stack);
|
||||
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void processIMC(FMLInterModComms.IMCEvent event)
|
||||
{
|
||||
for (IMCMessage imcMessage : event.getMessages()){
|
||||
if (!imcMessage.isStringMessage()) continue;
|
||||
|
||||
if (imcMessage.key.equalsIgnoreCase("addconfig")){
|
||||
String[] params = imcMessage.getStringValue().split("\\$\\$");
|
||||
if (params.length != 3){
|
||||
Waila.log.warning(String.format("Error while parsing config option from [ %s ] for %s", imcMessage.getSender(), imcMessage.getStringValue()));
|
||||
continue;
|
||||
}
|
||||
Waila.log.info(String.format("Receiving config request from [ %s ] for %s", imcMessage.getSender(), imcMessage.getStringValue()));
|
||||
ConfigHandler.instance().addConfig(params[0], params[1], params[2]);
|
||||
}
|
||||
|
||||
if (imcMessage.key.equalsIgnoreCase("register")){
|
||||
Waila.log.info(String.format("Receiving registration request from [ %s ] for method %s", imcMessage.getSender(), imcMessage.getStringValue()));
|
||||
this.callbackRegistration(imcMessage.getStringValue(), imcMessage.getSender());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void callbackRegistration(String method, String modname){
|
||||
String[] splitName = method.split("\\.");
|
||||
String methodName = splitName[splitName.length-1];
|
||||
String className = method.substring(0, method.length()-methodName.length()-1);
|
||||
|
||||
Waila.log.info(String.format("Trying to reflect %s %s", className, methodName));
|
||||
|
||||
try{
|
||||
Class reflectClass = Class.forName(className);
|
||||
Method reflectMethod = reflectClass.getDeclaredMethod(methodName, IWailaRegistrar.class);
|
||||
reflectMethod.invoke(null, (IWailaRegistrar)ModuleRegistrar.instance());
|
||||
|
||||
Waila.log.info(String.format("Success in registering %s", modname));
|
||||
|
||||
} catch (ClassNotFoundException e){
|
||||
Waila.log.warning(String.format("Could not find class %s", className));
|
||||
} catch (NoSuchMethodException e){
|
||||
Waila.log.warning(String.format("Could not find method %s", methodName));
|
||||
} catch (Exception e){
|
||||
Waila.log.warning(String.format("Exception while trying to access the method : %s", e.toString()));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,84 +0,0 @@
|
||||
package mcp.mobius.waila.addons;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Set;
|
||||
|
||||
import mcp.mobius.waila.mod_Waila;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import net.minecraftforge.common.Configuration;
|
||||
import net.minecraftforge.common.Property;
|
||||
|
||||
public class ConfigHandler implements IWailaConfigHandler {
|
||||
|
||||
private static ConfigHandler instance = null;
|
||||
private LinkedHashMap<String, ConfigModule> modules = new LinkedHashMap<String, ConfigModule>();
|
||||
private ArrayList<String> serverconfigs = new ArrayList<String>();
|
||||
|
||||
private ConfigHandler() {
|
||||
instance = this;
|
||||
}
|
||||
|
||||
public static ConfigHandler instance(){
|
||||
if (ConfigHandler.instance == null)
|
||||
ConfigHandler.instance = new ConfigHandler();
|
||||
return ConfigHandler.instance;
|
||||
}
|
||||
|
||||
public void addModule(String modName, HashMap<String, String> options){
|
||||
this.addModule(modName, new ConfigModule(modName, options));
|
||||
}
|
||||
|
||||
public void addModule(String modName, ConfigModule options){
|
||||
this.modules.put(modName, options);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<String> getModuleNames(){
|
||||
return this.modules.keySet();
|
||||
}
|
||||
|
||||
@Override
|
||||
public HashMap<String, String> getConfigKeys(String modName){
|
||||
if (this.modules.containsKey(modName))
|
||||
return this.modules.get(modName).options;
|
||||
else
|
||||
return null;
|
||||
}
|
||||
|
||||
public void addConfig(String modName, String key, String name){
|
||||
if (!this.modules.containsKey(modName))
|
||||
this.modules.put(modName, new ConfigModule(modName));
|
||||
|
||||
this.modules.get(modName).addOption(key, name);
|
||||
}
|
||||
|
||||
public void addConfigServer(String modName, String key, String name){
|
||||
if (!this.modules.containsKey(modName))
|
||||
this.modules.put(modName, new ConfigModule(modName));
|
||||
|
||||
this.modules.get(modName).addOption(key, name);
|
||||
this.serverconfigs.add(key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getConfig(String key, boolean defvalue){
|
||||
mod_Waila.instance.config.load();
|
||||
|
||||
if (this.serverconfigs.contains(key) && !mod_Waila.instance.serverPresent)
|
||||
return false;
|
||||
|
||||
Property prop = mod_Waila.instance.config.get(Configuration.CATEGORY_GENERAL, key, defvalue);
|
||||
return prop.getBoolean(defvalue);
|
||||
}
|
||||
|
||||
public boolean isServerRequired(String key){
|
||||
return this.serverconfigs.contains(key);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getConfig(String key){
|
||||
return this.getConfig(key, true);
|
||||
}
|
||||
}
|
||||
@@ -1,177 +0,0 @@
|
||||
package mcp.mobius.waila.addons;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
|
||||
import codechicken.nei.api.API;
|
||||
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
import mcp.mobius.waila.api.IWailaRegistrar;
|
||||
import mcp.mobius.waila.handlers.HUDHandlerExternal;
|
||||
|
||||
public class ExternalModulesHandler implements IWailaRegistrar {
|
||||
|
||||
private static ExternalModulesHandler instance = null;
|
||||
public LinkedHashMap<Integer, ArrayList<IWailaDataProvider>> headProviders = new LinkedHashMap<Integer, ArrayList<IWailaDataProvider>>();
|
||||
public LinkedHashMap<Integer, ArrayList<IWailaDataProvider>> bodyProviders = new LinkedHashMap<Integer, ArrayList<IWailaDataProvider>>();
|
||||
public LinkedHashMap<Integer, ArrayList<IWailaDataProvider>> tailProviders = new LinkedHashMap<Integer, ArrayList<IWailaDataProvider>>();
|
||||
public LinkedHashMap<Integer, ArrayList<IWailaDataProvider>> stackProviders = new LinkedHashMap<Integer, ArrayList<IWailaDataProvider>>();
|
||||
|
||||
public LinkedHashMap<Class, ArrayList<IWailaDataProvider>> headBlockProviders = new LinkedHashMap<Class, ArrayList<IWailaDataProvider>>();
|
||||
public LinkedHashMap<Class, ArrayList<IWailaDataProvider>> bodyBlockProviders = new LinkedHashMap<Class, ArrayList<IWailaDataProvider>>();
|
||||
public LinkedHashMap<Class, ArrayList<IWailaDataProvider>> tailBlockProviders = new LinkedHashMap<Class, ArrayList<IWailaDataProvider>>();
|
||||
public LinkedHashMap<Class, ArrayList<IWailaDataProvider>> stackBlockProviders = new LinkedHashMap<Class, ArrayList<IWailaDataProvider>>();
|
||||
|
||||
private ExternalModulesHandler() {
|
||||
instance = this;
|
||||
}
|
||||
|
||||
public static ExternalModulesHandler instance(){
|
||||
if (ExternalModulesHandler.instance == null)
|
||||
ExternalModulesHandler.instance = new ExternalModulesHandler();
|
||||
return ExternalModulesHandler.instance;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addConfig(String modname, String key, String configname) {
|
||||
ConfigHandler.instance().addConfig(modname, key, configname);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addConfigRemote(String modname, String key, String configname) {
|
||||
ConfigHandler.instance().addConfigServer(modname, key, configname);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerHeadProvider(IWailaDataProvider dataProvider, int blockID) {
|
||||
if (!this.headProviders.containsKey(blockID))
|
||||
this.headProviders.put(blockID, new ArrayList<IWailaDataProvider>());
|
||||
this.headProviders.get(blockID).add(dataProvider);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerHeadProvider(IWailaDataProvider dataProvider, Class block) {
|
||||
if (!this.headBlockProviders.containsKey(block))
|
||||
this.headBlockProviders.put(block, new ArrayList<IWailaDataProvider>());
|
||||
this.headBlockProviders.get(block).add(dataProvider);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerBodyProvider(IWailaDataProvider dataProvider, int blockID) {
|
||||
if (!this.bodyProviders.containsKey(blockID))
|
||||
this.bodyProviders.put(blockID, new ArrayList<IWailaDataProvider>());
|
||||
this.bodyProviders.get(blockID).add(dataProvider);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerBodyProvider(IWailaDataProvider dataProvider, Class block) {
|
||||
if (!this.bodyBlockProviders.containsKey(block))
|
||||
this.bodyBlockProviders.put(block, new ArrayList<IWailaDataProvider>());
|
||||
this.bodyBlockProviders.get(block).add(dataProvider);
|
||||
}
|
||||
|
||||
public void registerTailProvider(IWailaDataProvider dataProvider, int blockID) {
|
||||
if (!this.tailProviders.containsKey(blockID))
|
||||
this.tailProviders.put(blockID, new ArrayList<IWailaDataProvider>());
|
||||
this.tailProviders.get(blockID).add(dataProvider);
|
||||
}
|
||||
|
||||
public void registerTailProvider(IWailaDataProvider dataProvider, Class block) {
|
||||
if (!this.tailBlockProviders.containsKey(block))
|
||||
this.tailBlockProviders.put(block, new ArrayList<IWailaDataProvider>());
|
||||
this.tailBlockProviders.get(block).add(dataProvider);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerStackProvider(IWailaDataProvider dataProvider, int blockID) {
|
||||
if (!this.stackProviders.containsKey(blockID))
|
||||
this.stackProviders.put(blockID, new ArrayList<IWailaDataProvider>());
|
||||
this.stackProviders.get(blockID).add(dataProvider);
|
||||
API.registerHighlightIdentifier(blockID, new HUDHandlerExternal());
|
||||
}
|
||||
|
||||
/* Arrays getters */
|
||||
|
||||
public ArrayList<IWailaDataProvider> getHeadProviders(int blockID) {
|
||||
return this.headProviders.get(blockID);
|
||||
}
|
||||
|
||||
public ArrayList<IWailaDataProvider> getBodyProviders(int blockID) {
|
||||
return this.bodyProviders.get(blockID);
|
||||
}
|
||||
|
||||
public ArrayList<IWailaDataProvider> getTailProviders(int blockID) {
|
||||
return this.tailProviders.get(blockID);
|
||||
}
|
||||
|
||||
public ArrayList<IWailaDataProvider> getHeadProviders(Object block) {
|
||||
ArrayList<IWailaDataProvider> returnList = new ArrayList<IWailaDataProvider>();
|
||||
for (Class clazz : this.headBlockProviders.keySet())
|
||||
if (clazz.isInstance(block))
|
||||
returnList.addAll(this.headBlockProviders.get(clazz));
|
||||
|
||||
return returnList;
|
||||
}
|
||||
|
||||
public ArrayList<IWailaDataProvider> getBodyProviders(Object block) {
|
||||
ArrayList<IWailaDataProvider> returnList = new ArrayList<IWailaDataProvider>();
|
||||
for (Class clazz : this.bodyBlockProviders.keySet())
|
||||
if (clazz.isInstance(block))
|
||||
returnList.addAll(this.bodyBlockProviders.get(clazz));
|
||||
|
||||
return returnList;
|
||||
}
|
||||
|
||||
public ArrayList<IWailaDataProvider> getTailProviders(Object block) {
|
||||
ArrayList<IWailaDataProvider> returnList = new ArrayList<IWailaDataProvider>();
|
||||
for (Class clazz : this.bodyBlockProviders.keySet())
|
||||
if (clazz.isInstance(block))
|
||||
returnList.addAll(this.bodyBlockProviders.get(clazz));
|
||||
|
||||
return returnList;
|
||||
}
|
||||
|
||||
public ArrayList<IWailaDataProvider> getStackProviders(int blockID) {
|
||||
return this.stackProviders.get(blockID);
|
||||
}
|
||||
|
||||
/* Providers querry methods */
|
||||
|
||||
public boolean hasHeadProviders(int blockID){
|
||||
return this.headProviders.containsKey(blockID);
|
||||
}
|
||||
|
||||
public boolean hasBodyProviders(int blockID){
|
||||
return this.bodyProviders.containsKey(blockID);
|
||||
}
|
||||
|
||||
public boolean hasTailProviders(int blockID){
|
||||
return this.tailProviders.containsKey(blockID);
|
||||
}
|
||||
|
||||
public boolean hasStackProviders(int blockID){
|
||||
return this.stackProviders.containsKey(blockID);
|
||||
}
|
||||
|
||||
public boolean hasHeadProviders(Object block){
|
||||
for (Class clazz : this.headBlockProviders.keySet())
|
||||
if (clazz.isInstance(block))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean hasBodyProviders(Object block){
|
||||
for (Class clazz : this.bodyBlockProviders.keySet())
|
||||
if (clazz.isInstance(block))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean hasTailProviders(Object block){
|
||||
for (Class clazz : this.tailBlockProviders.keySet())
|
||||
if (clazz.isInstance(block))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package mcp.mobius.waila.addons.agriculture;
|
||||
|
||||
import java.util.logging.Level;
|
||||
|
||||
import mcp.mobius.waila.Waila;
|
||||
import mcp.mobius.waila.api.impl.ModuleRegistrar;
|
||||
|
||||
public class AgricultureModule {
|
||||
public static Class BlockCrop = null;
|
||||
|
||||
|
||||
public static void register(){
|
||||
try{
|
||||
Class Agriculture = Class.forName("com.teammetallurgy.agriculture.Agriculture");
|
||||
Waila.log.log(Level.INFO, "Agriculture mod found.");
|
||||
} catch (ClassNotFoundException e){
|
||||
Waila.log.log(Level.INFO, "[Agriculture] Agriculture mod not found.");
|
||||
return;
|
||||
}
|
||||
|
||||
try{
|
||||
BlockCrop = Class.forName("com.teammetallurgy.agriculture.crops.BlockCrop");
|
||||
} catch (ClassNotFoundException e){
|
||||
Waila.log.log(Level.WARNING, "[Agriculture] Class not found. " + e);
|
||||
return;
|
||||
}
|
||||
|
||||
ModuleRegistrar.instance().registerBodyProvider(new HUDHandlerCrop(), BlockCrop);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package mcp.mobius.waila.addons.agriculture;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import codechicken.lib.lang.LangUtil;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
|
||||
public class HUDHandlerCrop implements IWailaDataProvider {
|
||||
|
||||
@Override
|
||||
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
if (!config.getConfig("general.showcrop")) return currenttip;
|
||||
|
||||
int growthStage = accessor.getMetadata();
|
||||
|
||||
float growthValue = (growthStage / 6.0F) * 100.0F;
|
||||
if (growthValue < 100.0)
|
||||
currenttip.add(String.format("%s : %.0f %%", LangUtil.translateG("hud.msg.growth"), growthValue));
|
||||
else
|
||||
currenttip.add(String.format("%s : %s", LangUtil.translateG("hud.msg.growth"), LangUtil.translateG("hud.msg.mature")));
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package mcp.mobius.waila.addons.appeng;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import codechicken.lib.lang.LangUtil;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import mcp.mobius.waila.Waila;
|
||||
import mcp.mobius.waila.api.impl.ModuleRegistrar;
|
||||
|
||||
public class AppEngModule {
|
||||
|
||||
public static Class TileStorageMonitor = null;
|
||||
public static Class IAEItemStack = null;
|
||||
public static Method TileStorageMonitor_getItem = null;
|
||||
public static Method IAEItemStack_getItemStack = null;
|
||||
|
||||
public static void register(){
|
||||
try{
|
||||
TileStorageMonitor = Class.forName("appeng.me.tile.TileStorageMonitor");
|
||||
IAEItemStack = Class.forName("appeng.api.IAEItemStack");
|
||||
|
||||
|
||||
TileStorageMonitor_getItem = TileStorageMonitor.getMethod("getItem");
|
||||
IAEItemStack_getItemStack = IAEItemStack.getMethod("getItemStack");
|
||||
|
||||
} catch (ClassNotFoundException e){
|
||||
Waila.log.log(Level.WARNING, "[AppEng] Class not found. " + e);
|
||||
return;
|
||||
} catch (SecurityException e) {
|
||||
Waila.log.log(Level.WARNING, "[AppEng] Security Exception. " + e);
|
||||
return;
|
||||
} catch (NoSuchMethodException e) {
|
||||
Waila.log.log(Level.WARNING, "[AppEng] Method not found. " + e);
|
||||
return;
|
||||
}
|
||||
|
||||
Waila.log.log(Level.INFO, "AppEng mod found.");
|
||||
ModuleRegistrar.instance().addConfig("Applied Energetic", "appeng.monitorcontent");
|
||||
ModuleRegistrar.instance().registerBodyProvider(new HUDAppEngMonitor(), TileStorageMonitor);
|
||||
ModuleRegistrar.instance().registerSyncedNBTKey("*", TileStorageMonitor);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package mcp.mobius.waila.addons.appeng;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.List;
|
||||
|
||||
import codechicken.lib.lang.LangUtil;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
|
||||
public class HUDAppEngMonitor implements IWailaDataProvider {
|
||||
|
||||
@Override
|
||||
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
TileEntity entity = accessor.getTileEntity();
|
||||
if (entity != null){
|
||||
if (config.getConfig("appeng.monitorcontent")){
|
||||
try {
|
||||
ItemStack stack = (ItemStack)AppEngModule.IAEItemStack_getItemStack.invoke(AppEngModule.IAEItemStack.cast(AppEngModule.TileStorageMonitor_getItem.invoke(entity)));
|
||||
if (stack != null)
|
||||
currenttip.add(stack.getDisplayName());
|
||||
else
|
||||
currenttip.add(LangUtil.translateG("hud.msg.none"));
|
||||
} catch (Exception e) {
|
||||
System.out.printf("%s\n", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package mcp.mobius.waila.addons.betterbarrels;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import mcp.mobius.waila.Waila;
|
||||
import mcp.mobius.waila.api.impl.ModuleRegistrar;
|
||||
import codechicken.lib.lang.LangUtil;
|
||||
import codechicken.nei.api.API;
|
||||
import codechicken.nei.api.ItemInfo;
|
||||
|
||||
public class BetterBarrelsModule {
|
||||
public static Class TileEntityBarrel = null;
|
||||
public static Class IBarrelStorage = null;
|
||||
public static Field TileEntityBarrel_Storage = null;
|
||||
public static Method IBarrelStorage_getItem = null;
|
||||
|
||||
public static void register(){
|
||||
try{
|
||||
TileEntityBarrel = Class.forName("mcp.mobius.betterbarrels.common.TileEntityBarrel");
|
||||
IBarrelStorage = Class.forName("mcp.mobius.betterbarrels.common.IBarrelStorage");
|
||||
TileEntityBarrel_Storage = TileEntityBarrel.getField("storage");
|
||||
IBarrelStorage_getItem = IBarrelStorage.getMethod("getItem");
|
||||
|
||||
} catch (ClassNotFoundException e){
|
||||
Waila.log.log(Level.WARNING, "[BB] BetterBarrel classes not found.");
|
||||
} catch (NoSuchFieldException e){
|
||||
Waila.log.log(Level.WARNING, "[BB] Storage field not found.");
|
||||
} catch (NoSuchMethodException e){
|
||||
Waila.log.log(Level.WARNING, "[BB] getItem() not found.");
|
||||
}
|
||||
|
||||
if (IBarrelStorage_getItem != null){
|
||||
Waila.log.log(Level.INFO, "Waila module BetterBarrel succefully hooked.");
|
||||
ModuleRegistrar.instance().addConfig("BetterBarrels", "bb.content");
|
||||
ModuleRegistrar.instance().registerBodyProvider(new HUDHandlerBBContent(), TileEntityBarrel);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package mcp.mobius.waila.addons.betterbarrels;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import mcp.mobius.waila.Waila;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
//import mcp.mobius.betterbarrels.common.TileEntityBarrel;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import codechicken.lib.lang.LangUtil;
|
||||
import codechicken.nei.api.API;
|
||||
import codechicken.nei.api.ItemInfo;
|
||||
import codechicken.nei.api.ItemInfo.Layout;
|
||||
import codechicken.nei.api.IHighlightHandler;
|
||||
|
||||
public class HUDHandlerBBContent implements IWailaDataProvider {
|
||||
@Override
|
||||
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
TileEntity entity = accessor.getTileEntity();
|
||||
|
||||
if (!config.getConfig("bb.content")) return currenttip;
|
||||
|
||||
if ((entity != null) && (BetterBarrelsModule.TileEntityBarrel.isInstance(entity))){
|
||||
ItemStack stack = null;
|
||||
try {
|
||||
stack = (ItemStack) BetterBarrelsModule.IBarrelStorage_getItem.invoke(BetterBarrelsModule.TileEntityBarrel_Storage.get(entity));
|
||||
} catch (Exception e){
|
||||
Waila.log.log(Level.SEVERE, "[BB] Unhandled exception trying to access a barrel storage for display !.\n" + String.valueOf(e));
|
||||
currenttip.add("<ERROR!>");
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
if (stack != null){
|
||||
currenttip.add(stack.getDisplayName());
|
||||
} else {
|
||||
currenttip.add(LangUtil.translateG("hud.msg.empty"));
|
||||
}
|
||||
}
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
}
|
||||
@@ -1,78 +0,0 @@
|
||||
package mcp.mobius.waila.addons.betterbarrels;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import mcp.mobius.waila.mod_Waila;
|
||||
//import mcp.mobius.betterbarrels.common.TileEntityBarrel;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import codechicken.nei.api.API;
|
||||
import codechicken.nei.api.ItemInfo;
|
||||
import codechicken.nei.api.ItemInfo.Layout;
|
||||
import codechicken.nei.api.IHighlightHandler;
|
||||
|
||||
public class HUDHandlerBetterBarrels implements IHighlightHandler {
|
||||
|
||||
static private Class TileEntityBarrel = null;
|
||||
static private Class IBarrelStorage = null;
|
||||
static private Field TileEntityBarrel_Storage = null;
|
||||
static private Method IBarrelStorage_getItem = null;
|
||||
|
||||
@Override
|
||||
public ItemStack identifyHighlight(World world, EntityPlayer player, MovingObjectPosition mop) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> handleTextData(ItemStack itemStack, World world, EntityPlayer player, MovingObjectPosition mop, List<String> currenttip, Layout layout) {
|
||||
|
||||
TileEntity entity = world.getBlockTileEntity(mop.blockX, mop.blockY, mop.blockZ);
|
||||
|
||||
if ((entity != null) && (TileEntityBarrel.isInstance(entity))){
|
||||
ItemStack stack = null;
|
||||
try {
|
||||
stack = (ItemStack) IBarrelStorage_getItem.invoke(TileEntityBarrel_Storage.get(entity));
|
||||
} catch (Exception e){
|
||||
mod_Waila.log.log(Level.SEVERE, "[BB] Unhandled exception trying to access a barrel storage for display !.\n" + String.valueOf(e));
|
||||
currenttip.add("<ERROR!>");
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
if (stack != null){
|
||||
currenttip.add(stack.getDisplayName());
|
||||
} else {
|
||||
currenttip.add("<Empty>");
|
||||
}
|
||||
}
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
public static void register(){
|
||||
try{
|
||||
TileEntityBarrel = Class.forName("mcp.mobius.betterbarrels.common.TileEntityBarrel");
|
||||
IBarrelStorage = Class.forName("mcp.mobius.betterbarrels.common.IBarrelStorage");
|
||||
TileEntityBarrel_Storage = TileEntityBarrel.getField("storage");
|
||||
IBarrelStorage_getItem = IBarrelStorage.getMethod("getItem");
|
||||
|
||||
} catch (ClassNotFoundException e){
|
||||
mod_Waila.log.log(Level.WARNING, "[BB] BetterBarrel classes not found.");
|
||||
} catch (NoSuchFieldException e){
|
||||
mod_Waila.log.log(Level.WARNING, "[BB] Storage field not found.");
|
||||
} catch (NoSuchMethodException e){
|
||||
mod_Waila.log.log(Level.WARNING, "[BB] getItem() not found.");
|
||||
}
|
||||
|
||||
if (IBarrelStorage_getItem != null){
|
||||
mod_Waila.log.log(Level.INFO, "Waila module BetterBarrel succefully hooked.");
|
||||
API.registerHighlightHandler(new HUDHandlerBetterBarrels(), ItemInfo.Layout.BODY);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,13 +1,10 @@
|
||||
package mcp.mobius.waila.addons.buildcraft;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import mcp.mobius.waila.mod_Waila;
|
||||
import mcp.mobius.waila.addons.ConfigHandler;
|
||||
import mcp.mobius.waila.addons.ExternalModulesHandler;
|
||||
import mcp.mobius.waila.addons.ic2.HUDHandlerIC2IEnergySink;
|
||||
import mcp.mobius.waila.Waila;
|
||||
import mcp.mobius.waila.api.impl.ModuleRegistrar;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
|
||||
public class BCModule {
|
||||
@@ -16,43 +13,36 @@ public class BCModule {
|
||||
public static Class IPowerReceptor = null;
|
||||
public static Class PipeTransportPower = null;
|
||||
public static Class TileGenericPipe = null;
|
||||
public static Class TileEngine = null;
|
||||
|
||||
public static Method TileTank_GetTanks = null;
|
||||
public static Method IPowerReceptor_PowerRequest = null;
|
||||
public static Method TileTank_getTankInfo = null;
|
||||
|
||||
public static void register(){
|
||||
try {
|
||||
Class ModBuildcraftFactory = Class.forName("buildcraft.BuildCraftFactory");
|
||||
mod_Waila.log.log(Level.INFO, "Buildcraft|Factory mod found.");
|
||||
Waila.log.log(Level.INFO, "Buildcraft|Factory mod found.");
|
||||
} catch (ClassNotFoundException e){
|
||||
mod_Waila.log.log(Level.INFO, "Buildcraft|Factory mod not found. Skipping.");
|
||||
Waila.log.log(Level.INFO, "Buildcraft|Factory mod not found. Skipping.");
|
||||
return;
|
||||
}
|
||||
|
||||
try{
|
||||
TileTank = Class.forName("buildcraft.factory.TileTank");
|
||||
IPowerReceptor = Class.forName("buildcraft.api.power.IPowerReceptor");
|
||||
PipeTransportPower = Class.forName("buildcraft.transport.PipeTransportPower");
|
||||
TileGenericPipe = Class.forName("buildcraft.transport.TileGenericPipe");
|
||||
|
||||
TileTank_GetTanks = TileTank.getMethod("getTanks", ForgeDirection.class);
|
||||
IPowerReceptor_PowerRequest = IPowerReceptor.getMethod("powerRequest", ForgeDirection.class);
|
||||
TileTank_getTankInfo = TileTank.getMethod("getTankInfo", ForgeDirection.class);
|
||||
|
||||
} catch (ClassNotFoundException e){
|
||||
mod_Waila.log.log(Level.WARNING, "[BC] Class not found. " + e);
|
||||
Waila.log.log(Level.WARNING, "[BC] Class not found. " + e);
|
||||
return;
|
||||
} catch (NoSuchMethodException e){
|
||||
mod_Waila.log.log(Level.WARNING, "[BC] Method not found." + e);
|
||||
Waila.log.log(Level.WARNING, "[BC] Method not found." + e);
|
||||
return;
|
||||
}
|
||||
|
||||
ExternalModulesHandler.instance().addConfig("Buildcraft", "bc.tankamount", "Liquid amount");
|
||||
ExternalModulesHandler.instance().addConfig("Buildcraft", "bc.tanktype", "Liquid type");
|
||||
ExternalModulesHandler.instance().addConfigRemote("Buildcraft", "bc.powerpipe", "Power pipes");
|
||||
ExternalModulesHandler.instance().registerHeadProvider(new HUDHandlerBCTanks(), TileTank);
|
||||
ExternalModulesHandler.instance().registerBodyProvider(new HUDHandlerBCTanks(), TileTank);
|
||||
ExternalModulesHandler.instance().registerBodyProvider(new HUDHandlerBCPipes(), TileGenericPipe);
|
||||
//ExternalModulesHandler.instance().registerBodyProvider(new HUDHandlerBCIPowerReceptor(), PipeTransportPower);
|
||||
ModuleRegistrar.instance().addConfig("Buildcraft", "bc.tankamount");
|
||||
ModuleRegistrar.instance().addConfig("Buildcraft", "bc.tanktype");
|
||||
ModuleRegistrar.instance().registerHeadProvider(new HUDHandlerBCTanks(), TileTank);
|
||||
ModuleRegistrar.instance().registerBodyProvider(new HUDHandlerBCTanks(), TileTank);
|
||||
ModuleRegistrar.instance().registerSyncedNBTKey("*", TileTank);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
package mcp.mobius.waila.addons.buildcraft;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import mcp.mobius.waila.Waila;
|
||||
import mcp.mobius.waila.api.impl.ModuleRegistrar;
|
||||
|
||||
public class BCPowerAPIModule {
|
||||
|
||||
public static Class PowerHandler = null;
|
||||
public static Method PH_getMinEnergyReceived = null;
|
||||
public static Method PH_getMaxEnergyReceived = null;
|
||||
public static Method PH_getMaxEnergyStored = null;
|
||||
public static Method PH_getEnergyStored = null;
|
||||
public static Method PH_getActivationEnergy = null;
|
||||
|
||||
public static Class IPowerReceptor = null;
|
||||
public static Method IPowerReceptor_getPowerReceiver = null;
|
||||
|
||||
public static Class PowerReceiver = null;
|
||||
public static Method PR_getMinEnergyReceived = null;
|
||||
public static Method PR_getMaxEnergyReceived = null;
|
||||
public static Method PR_getMaxEnergyStored = null;
|
||||
public static Method PR_getEnergyStored = null;
|
||||
public static Method PR_getActivationEnergy = null;
|
||||
|
||||
public static void register(){
|
||||
try{
|
||||
Class ModClass = Class.forName("buildcraft.api.power.IPowerReceptor");
|
||||
Waila.log.log(Level.INFO, "Buildcraft Power API found.");
|
||||
} catch (ClassNotFoundException e){
|
||||
Waila.log.log(Level.INFO, "[Buildcraft Power API] Buildcraft Power API mod not found.");
|
||||
return;
|
||||
}
|
||||
|
||||
try{
|
||||
PowerHandler = Class.forName("buildcraft.api.power.PowerHandler");
|
||||
PH_getMinEnergyReceived = PowerHandler.getMethod("getMinEnergyReceived");
|
||||
PH_getMaxEnergyReceived = PowerHandler.getMethod("getMaxEnergyReceived");
|
||||
PH_getMaxEnergyStored = PowerHandler.getMethod("getMaxEnergyStored");
|
||||
PH_getEnergyStored = PowerHandler.getMethod("getEnergyStored");
|
||||
PH_getActivationEnergy = PowerHandler.getMethod("getActivationEnergy");
|
||||
|
||||
IPowerReceptor = Class.forName("buildcraft.api.power.IPowerReceptor");
|
||||
IPowerReceptor_getPowerReceiver = IPowerReceptor.getMethod("getPowerReceiver", ForgeDirection.class);
|
||||
|
||||
PowerReceiver = Class.forName("buildcraft.api.power.PowerHandler$PowerReceiver");
|
||||
PR_getMinEnergyReceived = PowerReceiver.getMethod("getMinEnergyReceived");
|
||||
PR_getMaxEnergyReceived = PowerReceiver.getMethod("getMaxEnergyReceived");
|
||||
PR_getMaxEnergyStored = PowerReceiver.getMethod("getMaxEnergyStored");
|
||||
PR_getEnergyStored = PowerReceiver.getMethod("getEnergyStored");
|
||||
PR_getActivationEnergy = PowerReceiver.getMethod("getActivationEnergy");
|
||||
|
||||
|
||||
} catch (ClassNotFoundException e){
|
||||
Waila.log.log(Level.WARNING, "[EnderStorage] Class not found. " + e);
|
||||
return;
|
||||
} catch (NoSuchMethodException e){
|
||||
Waila.log.log(Level.WARNING, "[EnderStorage] Method not found." + e);
|
||||
return;
|
||||
// } catch (NoSuchFieldException e){
|
||||
// mod_Waila.log.log(Level.WARNING, "[EnderStorage] Field not found." + e);
|
||||
// return;
|
||||
} catch (Exception e){
|
||||
Waila.log.log(Level.WARNING, "[EnderStorage] Unhandled exception." + e);
|
||||
return;
|
||||
}
|
||||
|
||||
ModuleRegistrar.instance().addConfigRemote("BuildcraftAPI", "bcapi.storage");
|
||||
ModuleRegistrar.instance().addConfig("BuildcraftAPI", "bcapi.consump");
|
||||
ModuleRegistrar.instance().addConfig("BuildcraftAPI", "bcapi.trigger");
|
||||
ModuleRegistrar.instance().registerBodyProvider(new HUDHandlerIPowerReceptor(), IPowerReceptor);
|
||||
ModuleRegistrar.instance().registerSyncedNBTKey("*", IPowerReceptor);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
package mcp.mobius.waila.addons.buildcraft;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import net.minecraftforge.liquids.ILiquidTank;
|
||||
import mcp.mobius.waila.mod_Waila;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
|
||||
public class HUDHandlerBCIPowerReceptor implements IWailaDataProvider {
|
||||
|
||||
public HUDHandlerBCIPowerReceptor() {
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
// int powerRequest = 0;
|
||||
// try{
|
||||
// powerRequest = (Integer)BCModule.IPowerReceptor_PowerRequest.invoke(BCModule.IPowerReceptor.cast(accessor.getTileEntity()), ForgeDirection.UNKNOWN);
|
||||
// }
|
||||
// catch (Exception e){
|
||||
// mod_Waila.log.log(Level.SEVERE, "[BC] Unhandled exception trying to access a tank for display !.\n" + String.valueOf(e));
|
||||
// return currenttip;
|
||||
// }
|
||||
// currenttip.add(String.valueOf(powerRequest));
|
||||
|
||||
NBTTagCompound tag = accessor.getNBTData();
|
||||
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
package mcp.mobius.waila.addons.buildcraft;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
|
||||
public class HUDHandlerBCPipes implements IWailaDataProvider {
|
||||
@Override
|
||||
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
NBTTagCompound tag = accessor.getNBTData();
|
||||
if (this.hasPartialKey(tag, "internalNextPower") && config.getConfig("bc.powerpipe")){
|
||||
double power = Math.max(0, this.getPartialKeySum(tag, "internalNextPower"));
|
||||
currenttip.add(String.format("Power : %.1f MJ", power));
|
||||
}
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
public boolean hasPartialKey(NBTTagCompound tag, String key){
|
||||
for (Object k : tag.tagMap.keySet())
|
||||
if (((String)k).contains(key))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public double getPartialKeySum(NBTTagCompound tag, String key){
|
||||
double retVal = 0;
|
||||
for (Object k : tag.tagMap.keySet())
|
||||
if (((String)k).contains(key))
|
||||
retVal += tag.getDouble((String)k);
|
||||
return retVal;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,27 +1,29 @@
|
||||
package mcp.mobius.waila.addons.buildcraft;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
|
||||
//import buildcraft.factory.TileTank;
|
||||
|
||||
import mcp.mobius.waila.mod_Waila;
|
||||
import mcp.mobius.waila.addons.ConfigHandler;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
import codechicken.lib.lang.LangUtil;
|
||||
import mcp.mobius.waila.Waila;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import mcp.mobius.waila.api.impl.ConfigHandler;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.FluidTankInfo;
|
||||
import net.minecraftforge.fluids.IFluidHandler;
|
||||
import net.minecraftforge.liquids.ILiquidTank;
|
||||
import net.minecraftforge.liquids.LiquidStack;
|
||||
import codechicken.nei.api.ItemInfo.Layout;
|
||||
import codechicken.nei.api.API;
|
||||
import codechicken.nei.api.IHighlightHandler;
|
||||
|
||||
public class HUDHandlerBCTanks implements IWailaDataProvider {
|
||||
|
||||
@@ -32,37 +34,43 @@ public class HUDHandlerBCTanks implements IWailaDataProvider {
|
||||
|
||||
@Override
|
||||
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
ILiquidTank tank = this.getTank(accessor);
|
||||
LiquidStack stack = tank != null ? tank.getLiquid() : null;
|
||||
FluidTankInfo tank = this.getTank(accessor);
|
||||
FluidStack stack = tank != null ? tank.fluid : null;
|
||||
|
||||
|
||||
String name = currenttip.get(0);
|
||||
if (stack != null && ConfigHandler.instance().getConfig("bc.tanktype"))
|
||||
name = name + " (" + stack.asItemStack().getDisplayName() + ")";
|
||||
name = name + " (" + stack.getFluid().getName() + ")";
|
||||
else if (stack == null && ConfigHandler.instance().getConfig("bc.tanktype"))
|
||||
name = name + " <Empty>";
|
||||
name = name + " " + LangUtil.translateG("hud.msg.empty");
|
||||
currenttip.set(0, name);
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
ILiquidTank tank = this.getTank(accessor);
|
||||
LiquidStack stack = tank != null ? tank.getLiquid() : null;
|
||||
int liquidAmount = stack != null ? stack.amount:0;
|
||||
int capacity = tank != null ? tank.getCapacity() : 0;
|
||||
FluidTankInfo tank = this.getTank(accessor);
|
||||
FluidStack stack = tank != null ? tank.fluid : null;
|
||||
int liquidAmount = stack != null ? stack.amount:0;
|
||||
int capacity = tank != null ? tank.capacity : 0;
|
||||
|
||||
if (ConfigHandler.instance().getConfig("bc.tankamount"))
|
||||
currenttip.add(String.valueOf(liquidAmount) + "/" + String.valueOf(capacity) + " mB");
|
||||
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
public ILiquidTank getTank(IWailaDataAccessor accessor){
|
||||
ILiquidTank tank = null;
|
||||
public FluidTankInfo getTank(IWailaDataAccessor accessor){
|
||||
FluidTankInfo tank = null;
|
||||
try{
|
||||
tank = ((ILiquidTank[])BCModule.TileTank_GetTanks.invoke(BCModule.TileTank.cast(accessor.getTileEntity()), ForgeDirection.UNKNOWN))[0];
|
||||
tank = ((FluidTankInfo[])BCModule.TileTank_getTankInfo.invoke(BCModule.TileTank.cast(accessor.getTileEntity()), ForgeDirection.UNKNOWN))[0];
|
||||
} catch (Exception e){
|
||||
mod_Waila.log.log(Level.SEVERE, "[BC] Unhandled exception trying to access a tank for display !.\n" + String.valueOf(e));
|
||||
Waila.log.log(Level.SEVERE, "[BC] Unhandled exception trying to access a tank for display !.\n" + String.valueOf(e));
|
||||
return null;
|
||||
}
|
||||
return tank;
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
package mcp.mobius.waila.addons.buildcraft;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import codechicken.lib.lang.LangUtil;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
import mcp.mobius.waila.utils.WailaExceptionHandler;
|
||||
|
||||
public class HUDHandlerIPowerReceptor implements IWailaDataProvider {
|
||||
|
||||
@Override
|
||||
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
|
||||
try{
|
||||
|
||||
String maxPowerStr = LangUtil.translateG("hud.msg.maxpower");
|
||||
String triggerStr = LangUtil.translateG("hud.msg.trigger");
|
||||
|
||||
Object powerReceiver = BCPowerAPIModule.IPowerReceptor_getPowerReceiver.invoke(accessor.getTileEntity(), ForgeDirection.UNKNOWN);
|
||||
if (powerReceiver != null){
|
||||
|
||||
Float minEnergyRecv = (Float)BCPowerAPIModule.PR_getMinEnergyReceived.invoke(powerReceiver);
|
||||
Float maxEnergyRecv = (Float)BCPowerAPIModule.PR_getMaxEnergyReceived.invoke(powerReceiver);
|
||||
Float activation = (Float)BCPowerAPIModule.PR_getActivationEnergy.invoke(powerReceiver);
|
||||
|
||||
|
||||
if(accessor.getNBTData().hasKey("powerProvider") && accessor.getNBTData().getCompoundTag("powerProvider").hasKey("storedEnergy") && config.getConfig("bcapi.storage")){
|
||||
Float energyStored = (Float)accessor.getNBTData().getCompoundTag("powerProvider").getFloat("storedEnergy");
|
||||
Float maxEnergyStor = (Float)BCPowerAPIModule.PR_getMaxEnergyStored.invoke(powerReceiver);
|
||||
if (maxEnergyStor != 0.0f)
|
||||
currenttip.add(String.format("%.1f / %.1f MJ", energyStored, maxEnergyStor));
|
||||
}
|
||||
|
||||
if(accessor.getNBTData().hasKey("storedEnergy") && config.getConfig("bcapi.storage")){
|
||||
Float energyStored = (Float)accessor.getNBTData().getFloat("storedEnergy");
|
||||
Float maxEnergyStor = (Float)BCPowerAPIModule.PR_getMaxEnergyStored.invoke(powerReceiver);
|
||||
if (maxEnergyStor != 0.0f)
|
||||
currenttip.add(String.format("%.1f / %.1f MJ", energyStored, maxEnergyStor));
|
||||
}
|
||||
|
||||
/*
|
||||
if (maxEnergyRecv != 0.0f && config.getConfig("bcapi.consump"))
|
||||
//currenttip.add(String.format("Min/Max Input : %.1f / %.1f MJ/t", minEnergyRecv, maxEnergyRecv));
|
||||
currenttip.add(String.format("%s : %.1f MJ/t", maxPowerStr, maxEnergyRecv));
|
||||
|
||||
if (activation != 0.0f && config.getConfig("bcapi.trigger"))
|
||||
currenttip.add(String.format("%s : %.1f MJ", triggerStr, activation));
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
currenttip = WailaExceptionHandler.handleErr(e, accessor.getTileEntity().getClass().getName(), currenttip);
|
||||
}
|
||||
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
>>>>buildcraft.transport.ItemPlug:*
|
||||
This is a plug for pipes.
|
||||
@@ -0,0 +1,43 @@
|
||||
package mcp.mobius.waila.addons.carpenters;
|
||||
|
||||
import java.util.logging.Level;
|
||||
|
||||
import mcp.mobius.waila.Waila;
|
||||
import mcp.mobius.waila.api.impl.ModuleRegistrar;
|
||||
|
||||
public class CarpentersModule {
|
||||
|
||||
public static Class TEBase = null;
|
||||
public static Class BlockCarpentersDoor = null;
|
||||
public static Class BlockCarpentersHatch = null;
|
||||
|
||||
public static void register(){
|
||||
try{
|
||||
Class CarpentersBlocks = Class.forName("carpentersblocks.CarpentersBlocks");
|
||||
Waila.log.log(Level.INFO, "CarpentersBlocks mod found.");
|
||||
} catch (ClassNotFoundException e){
|
||||
Waila.log.log(Level.INFO, "[CarpentersBlocks] CarpentersBlocks mod not found.");
|
||||
return;
|
||||
}
|
||||
|
||||
try{
|
||||
TEBase = Class.forName("carpentersblocks.tileentity.TEBase");
|
||||
BlockCarpentersDoor = Class.forName("carpentersblocks.block.BlockCarpentersDoor");
|
||||
BlockCarpentersHatch = Class.forName("carpentersblocks.block.BlockCarpentersHatch");
|
||||
|
||||
} catch (ClassNotFoundException e){
|
||||
Waila.log.log(Level.WARNING, "[CarpentersBlocks] Class not found. " + e);
|
||||
return;
|
||||
} catch (Exception e) {
|
||||
Waila.log.log(Level.WARNING, "[CarpentersBlocks] Error while loading module. " + e);
|
||||
return;
|
||||
}
|
||||
|
||||
ModuleRegistrar.instance().addConfig("Carpenter's Blocks", "carpenters.hide");
|
||||
ModuleRegistrar.instance().registerStackProvider(new HUDCarpentersBlocksTE(), BlockCarpentersDoor);
|
||||
ModuleRegistrar.instance().registerStackProvider(new HUDCarpentersBlocksTE(), BlockCarpentersHatch);
|
||||
ModuleRegistrar.instance().registerSyncedNBTKey("data", TEBase);
|
||||
ModuleRegistrar.instance().registerSyncedNBTKey("cover_6", TEBase);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
package mcp.mobius.waila.addons.carpenters;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
|
||||
public class HUDCarpentersBlocksTE implements IWailaDataProvider {
|
||||
|
||||
@Override
|
||||
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
if (!config.getConfig("carpenters.hide")) return null;
|
||||
|
||||
NBTTagCompound tag = accessor.getNBTData();
|
||||
short data = tag.getShort("data");
|
||||
short cover = tag.getShort("cover_6");
|
||||
|
||||
if(CarpentersModule.BlockCarpentersDoor.isInstance(accessor.getBlock())){
|
||||
int type = data & 0x7;
|
||||
if (type != 5) return null;
|
||||
if (cover == 0) return null;
|
||||
|
||||
return new ItemStack(cover & 0xfff, 0, (cover & 0xf000) >>> 12);
|
||||
}
|
||||
|
||||
else if (CarpentersModule.BlockCarpentersHatch.isInstance(accessor.getBlock())){
|
||||
int type = data & 0x7;
|
||||
if (type != 0) return null;
|
||||
if (cover == 0) return null;
|
||||
|
||||
return new ItemStack(cover & 0xfff, 0, (cover & 0xf000) >>> 12);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package mcp.mobius.waila.addons.enderio;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import mcp.mobius.waila.Waila;
|
||||
import mcp.mobius.waila.api.impl.ModuleRegistrar;
|
||||
|
||||
public class EnderIOModule {
|
||||
|
||||
public static Class TileCapacitorBank = null;
|
||||
public static Method TCB_getMaxInput = null;
|
||||
public static Method TCB_getMaxOutput = null;
|
||||
public static Method TCB_getEnergyStored = null;
|
||||
public static Method TCB_getMaxEnergyStored = null;
|
||||
public static Method TCB_getMaxIO = null;
|
||||
|
||||
public static Class TileTesseract = null;
|
||||
|
||||
public static void register(){
|
||||
try{
|
||||
Class ModClass = Class.forName("crazypants.enderio.EnderIO");
|
||||
Waila.log.log(Level.INFO, "EnderIO mod found.");
|
||||
} catch (ClassNotFoundException e){
|
||||
Waila.log.log(Level.INFO, "[EnderIO] EnderIO mod not found.");
|
||||
return;
|
||||
}
|
||||
|
||||
try{
|
||||
|
||||
TileCapacitorBank = Class.forName("crazypants.enderio.machine.power.TileCapacitorBank");
|
||||
TCB_getEnergyStored = TileCapacitorBank.getMethod("getEnergyStored");
|
||||
TCB_getMaxInput = TileCapacitorBank.getMethod("getMaxInput");
|
||||
TCB_getMaxOutput = TileCapacitorBank.getMethod("getMaxOutput");
|
||||
TCB_getMaxEnergyStored = TileCapacitorBank.getMethod("getMaxEnergyStored");
|
||||
TCB_getMaxIO = TileCapacitorBank.getMethod("getMaxIO");
|
||||
|
||||
TileTesseract = Class.forName("crazypants.enderio.machine.hypercube.TileHyperCube");
|
||||
|
||||
} catch (ClassNotFoundException e){
|
||||
Waila.log.log(Level.WARNING, "[EnderStorage] Class not found. " + e);
|
||||
return;
|
||||
} catch (NoSuchMethodException e){
|
||||
Waila.log.log(Level.WARNING, "[EnderStorage] Method not found." + e);
|
||||
return;
|
||||
// } catch (NoSuchFieldException e){
|
||||
// mod_Waila.log.log(Level.WARNING, "[EnderStorage] Field not found." + e);
|
||||
// return;
|
||||
} catch (Exception e){
|
||||
Waila.log.log(Level.WARNING, "[EnderStorage] Unhandled exception." + e);
|
||||
return;
|
||||
}
|
||||
|
||||
ModuleRegistrar.instance().addConfig("EnderIO", "enderio.inout");
|
||||
ModuleRegistrar.instance().addConfig("EnderIO", "enderio.storage");
|
||||
ModuleRegistrar.instance().addConfig("EnderIO", "enderio.owner");
|
||||
ModuleRegistrar.instance().addConfig("EnderIO", "enderio.channel");
|
||||
ModuleRegistrar.instance().registerBodyProvider(new HUDHandlerCapacitor(), TileCapacitorBank);
|
||||
ModuleRegistrar.instance().registerBodyProvider(new HUDHandlerTesseract(), TileTesseract);
|
||||
ModuleRegistrar.instance().registerSyncedNBTKey("*", TileCapacitorBank);
|
||||
ModuleRegistrar.instance().registerSyncedNBTKey("*", TileTesseract);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package mcp.mobius.waila.addons.enderio;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import codechicken.lib.lang.LangUtil;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
import mcp.mobius.waila.utils.WailaExceptionHandler;
|
||||
|
||||
public class HUDHandlerCapacitor implements IWailaDataProvider{
|
||||
|
||||
@Override
|
||||
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
|
||||
try{
|
||||
|
||||
String maxIOStr = LangUtil.translateG("hud.msg.maxio");
|
||||
String inputStr = LangUtil.translateG("hud.msg.input");
|
||||
String outputStr = LangUtil.translateG("hud.msg.output");
|
||||
|
||||
Integer maxEnergyStored = (Integer)EnderIOModule.TCB_getMaxEnergyStored.invoke(accessor.getTileEntity());
|
||||
Float energyStored = (Float)EnderIOModule.TCB_getEnergyStored.invoke(accessor.getTileEntity());
|
||||
Integer maxIO = (Integer)EnderIOModule.TCB_getMaxIO.invoke(accessor.getTileEntity());
|
||||
Integer maxInput = (Integer)EnderIOModule.TCB_getMaxInput.invoke(accessor.getTileEntity());
|
||||
Integer maxOutput = (Integer)EnderIOModule.TCB_getMaxOutput.invoke(accessor.getTileEntity());
|
||||
|
||||
if (config.getConfig("enderio.storage"))
|
||||
currenttip.add(String.format("%.1f / %d MJ", energyStored, maxEnergyStored));
|
||||
|
||||
if (config.getConfig("enderio.inout")){
|
||||
currenttip.add(String.format("%s : %d MJ/t ", maxIOStr, maxIO));
|
||||
currenttip.add(String.format("%s : %d MJ/t ", inputStr, maxInput));
|
||||
currenttip.add(String.format("%s : %d MJ/t ", outputStr, maxOutput));
|
||||
}
|
||||
|
||||
|
||||
} catch (Exception e) {
|
||||
currenttip = WailaExceptionHandler.handleErr(e, accessor.getTileEntity().getClass().getName(), currenttip);
|
||||
}
|
||||
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package mcp.mobius.waila.addons.enderio;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import codechicken.lib.lang.LangUtil;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
|
||||
public class HUDHandlerTesseract implements IWailaDataProvider {
|
||||
|
||||
@Override
|
||||
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
|
||||
String channel = "%s : \u00a7f%s\u00a7r %s";
|
||||
String freq;
|
||||
String frequser;
|
||||
String owner;
|
||||
|
||||
if (config.getConfig("enderio.channel")){
|
||||
|
||||
if (accessor.getNBTData().hasKey("channelName")){
|
||||
freq = accessor.getNBTData().getString("channelName");
|
||||
|
||||
if (accessor.getNBTData().hasKey("channelUser"))
|
||||
frequser = "[ \u00a7f" + accessor.getNBTData().getString("channelUser") + " \u00a7r]";
|
||||
else
|
||||
frequser = "[ \u00a7f" + LangUtil.translateG("hud.msg.public") + " \u00a7r]";
|
||||
|
||||
}
|
||||
else{
|
||||
freq = LangUtil.translateG("hud.msg.none");
|
||||
frequser = "";
|
||||
}
|
||||
|
||||
currenttip.add(String.format(channel, LangUtil.translateG("hud.msg.frequency"), freq, frequser));
|
||||
}
|
||||
|
||||
if (config.getConfig("enderio.owner")){
|
||||
if (accessor.getNBTData().hasKey("owner"))
|
||||
currenttip.add(String.format("%s : \u00a7f%s", LangUtil.translateG("hud.msg.owner"), accessor.getNBTData().getString("owner")));
|
||||
}
|
||||
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package mcp.mobius.waila.addons.enderstorage;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import mcp.mobius.waila.Waila;
|
||||
import mcp.mobius.waila.api.impl.ModuleRegistrar;
|
||||
|
||||
public class EnderStorageModule {
|
||||
|
||||
public static Class TileFrequencyOwner = null;
|
||||
public static Field TileFrequencyOwner_Freq = null;
|
||||
|
||||
public static Class EnderStorageManager = null;
|
||||
public static Method GetColourFromFreq = null;
|
||||
|
||||
public static Class TileEnderTank = null;
|
||||
|
||||
public static void register(){
|
||||
try{
|
||||
Class EnderStorage = Class.forName("codechicken.enderstorage.EnderStorage");
|
||||
Waila.log.log(Level.INFO, "EnderStorage mod found.");
|
||||
} catch (ClassNotFoundException e){
|
||||
Waila.log.log(Level.INFO, "[EnderStorage] EnderStorage mod not found.");
|
||||
return;
|
||||
}
|
||||
|
||||
try{
|
||||
|
||||
TileFrequencyOwner = Class.forName("codechicken.enderstorage.common.TileFrequencyOwner");
|
||||
TileFrequencyOwner_Freq = TileFrequencyOwner.getField("freq");
|
||||
|
||||
EnderStorageManager = Class.forName("codechicken.enderstorage.api.EnderStorageManager");
|
||||
GetColourFromFreq = EnderStorageManager.getDeclaredMethod("getColourFromFreq", Integer.TYPE, Integer.TYPE);
|
||||
|
||||
TileEnderTank = Class.forName("codechicken.enderstorage.storage.liquid.TileEnderTank");
|
||||
|
||||
} catch (ClassNotFoundException e){
|
||||
Waila.log.log(Level.WARNING, "[EnderStorage] Class not found. " + e);
|
||||
return;
|
||||
} catch (NoSuchMethodException e){
|
||||
Waila.log.log(Level.WARNING, "[EnderStorage] Method not found." + e);
|
||||
return;
|
||||
} catch (NoSuchFieldException e){
|
||||
Waila.log.log(Level.WARNING, "[EnderStorage] Field not found." + e);
|
||||
return;
|
||||
} catch (Exception e){
|
||||
Waila.log.log(Level.WARNING, "[EnderStorage] Unhandled exception." + e);
|
||||
return;
|
||||
}
|
||||
|
||||
ModuleRegistrar.instance().addConfig("EnderStorage", "enderstorage.colors");
|
||||
ModuleRegistrar.instance().registerBodyProvider(new HUDHandlerStorage(), TileFrequencyOwner);
|
||||
ModuleRegistrar.instance().registerSyncedNBTKey("*", TileFrequencyOwner);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package mcp.mobius.waila.addons.enderstorage;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import codechicken.lib.lang.LangUtil;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
import mcp.mobius.waila.utils.WailaExceptionHandler;
|
||||
|
||||
public class HUDHandlerStorage implements IWailaDataProvider {
|
||||
|
||||
private static String[] colors = {
|
||||
LangUtil.translateG("hud.msg.white"),
|
||||
LangUtil.translateG("hud.msg.orange"),
|
||||
LangUtil.translateG("hud.msg.magenta"),
|
||||
LangUtil.translateG("hud.msg.lblue"),
|
||||
LangUtil.translateG("hud.msg.yellow"),
|
||||
LangUtil.translateG("hud.msg.lime"),
|
||||
LangUtil.translateG("hud.msg.pink"),
|
||||
LangUtil.translateG("hud.msg.gray"),
|
||||
LangUtil.translateG("hud.msg.lgray"),
|
||||
LangUtil.translateG("hud.msg.cyan"),
|
||||
LangUtil.translateG("hud.msg.purple"),
|
||||
LangUtil.translateG("hud.msg.blue"),
|
||||
LangUtil.translateG("hud.msg.brown"),
|
||||
LangUtil.translateG("hud.msg.green"),
|
||||
LangUtil.translateG("hud.msg.red"),
|
||||
LangUtil.translateG("hud.msg.black")
|
||||
};
|
||||
|
||||
@Override
|
||||
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
if(config.getConfig("enderstorage.colors")){
|
||||
try{
|
||||
|
||||
int freq = EnderStorageModule.TileFrequencyOwner_Freq.getInt(accessor.getTileEntity());
|
||||
int freqLeft = (Integer)EnderStorageModule.GetColourFromFreq.invoke(null, freq, 0);
|
||||
int freqCenter = (Integer)EnderStorageModule.GetColourFromFreq.invoke(null, freq, 1);
|
||||
int freqRight = (Integer)EnderStorageModule.GetColourFromFreq.invoke(null, freq, 2);
|
||||
|
||||
if (!EnderStorageModule.TileEnderTank.isInstance(accessor.getTileEntity()))
|
||||
currenttip.add(String.format("%s/%s/%s", colors[freqLeft], colors[freqCenter], colors[freqRight]));
|
||||
else
|
||||
currenttip.add(String.format("%s/%s/%s", colors[freqRight], colors[freqCenter], colors[freqLeft]));
|
||||
|
||||
|
||||
} catch (Exception e){
|
||||
currenttip = WailaExceptionHandler.handleErr(e, accessor.getTileEntity().getClass().getName(), currenttip);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
package mcp.mobius.waila.addons.etb;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import mcp.mobius.waila.Waila;
|
||||
import mcp.mobius.waila.api.impl.ModuleRegistrar;
|
||||
|
||||
public class ETBModule {
|
||||
|
||||
public static Class TileSocket = null;
|
||||
public static Field Socket_sides = null;
|
||||
public static Field Socket_configs = null;
|
||||
//public static Field Socket_sideID = null;
|
||||
//public static Field Socket_sideMeta = null;
|
||||
//public static Field Socket_facID = null;
|
||||
//public static Field Socket_facMeta = null;
|
||||
|
||||
public static Class SocketsMod = null;
|
||||
public static Field module = null;
|
||||
|
||||
public static Class SideConfig = null;
|
||||
public static Field SC_tank = null;
|
||||
public static Field SC_inventory = null;
|
||||
public static Field SC_rsControl = null;
|
||||
public static Field SC_rsLatch = null;
|
||||
|
||||
public static void register(){
|
||||
try{
|
||||
Class ModClass = Class.forName("emasher.sockets.TileSocket");
|
||||
Waila.log.log(Level.INFO, "Engineer Toolbox mod found.");
|
||||
} catch (ClassNotFoundException e){
|
||||
Waila.log.log(Level.INFO, "[Engineer Toolbox] Engineer Toolbox mod not found.");
|
||||
return;
|
||||
}
|
||||
|
||||
try{
|
||||
|
||||
TileSocket = Class.forName("emasher.sockets.TileSocket");
|
||||
Socket_sides = TileSocket.getField("sides");
|
||||
Socket_configs = TileSocket.getField("configs");
|
||||
//Socket_sideID = TileSocket.getField("sideID");
|
||||
//Socket_sideMeta = TileSocket.getField("sideMeta");
|
||||
//Socket_facID = TileSocket.getField("facID");
|
||||
//Socket_facMeta = TileSocket.getField("facMeta");
|
||||
|
||||
SocketsMod = Class.forName("emasher.sockets.SocketsMod");
|
||||
module = SocketsMod.getField("module");
|
||||
//module = (Item)SocketsMod.getField("module").get(null);
|
||||
/*
|
||||
if (module == null){
|
||||
mod_Waila.log.log(Level.WARNING, "[Engineer Toolbox] module field is null !");
|
||||
return;
|
||||
}
|
||||
*/
|
||||
|
||||
SideConfig = Class.forName("emasher.api.SideConfig");
|
||||
SC_tank = SideConfig.getField("tank");
|
||||
SC_inventory = SideConfig.getField("inventory");
|
||||
SC_rsControl = SideConfig.getField("rsControl");
|
||||
SC_rsLatch = SideConfig.getField("rsLatch");
|
||||
|
||||
|
||||
} catch (ClassNotFoundException e){
|
||||
Waila.log.log(Level.WARNING, "[Engineer Toolbox] Class not found. " + e);
|
||||
return;
|
||||
// } catch (NoSuchMethodException e){
|
||||
// mod_Waila.log.log(Level.WARNING, "[Engineer Toolbox] Method not found." + e);
|
||||
// return;
|
||||
} catch (NoSuchFieldException e){
|
||||
Waila.log.log(Level.WARNING, "[Engineer Toolbox] Field not found." + e);
|
||||
return;
|
||||
} catch (Exception e){
|
||||
Waila.log.log(Level.WARNING, "[Engineer Toolbox] Unhandled exception." + e);
|
||||
return;
|
||||
}
|
||||
|
||||
ModuleRegistrar.instance().addConfig("Engineer Toolbox", "etb.displaydata");
|
||||
ModuleRegistrar.instance().registerBodyProvider(new HUDHandlerSocket(), TileSocket);
|
||||
ModuleRegistrar.instance().registerSyncedNBTKey("*", TileSocket);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
package mcp.mobius.waila.addons.etb;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
import mcp.mobius.waila.utils.WailaExceptionHandler;
|
||||
|
||||
public class HUDHandlerSocket implements IWailaDataProvider {
|
||||
|
||||
@Override
|
||||
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
if (!config.getConfig("etb.displaydata")) return currenttip;
|
||||
|
||||
try {
|
||||
int[] sides = (int[])ETBModule.Socket_sides.get(accessor.getTileEntity());
|
||||
Object[] configs = (Object[])ETBModule.Socket_configs.get(accessor.getTileEntity());
|
||||
Item module = (Item)ETBModule.module.get(null);
|
||||
|
||||
|
||||
for( int s = 0; s < 6; s++){
|
||||
if (sides[s] != 0){
|
||||
|
||||
int tank = (Integer)ETBModule.SC_tank.get(configs[s]);
|
||||
int inventory = (Integer)ETBModule.SC_inventory.get(configs[s]);
|
||||
boolean[] rsControl = (boolean[])ETBModule.SC_rsControl.get(configs[s]);
|
||||
boolean[] rsLatch = (boolean[])ETBModule.SC_rsLatch.get(configs[s]);
|
||||
|
||||
|
||||
ItemStack stack = new ItemStack(module, 1, sides[s]);
|
||||
String tipstr = String.format("%-5s : %s ", ForgeDirection.getOrientation(s), stack.getDisplayName());
|
||||
|
||||
String configstr = "[ ";
|
||||
|
||||
if (tank != -1)
|
||||
configstr += "\u00a79" + String.valueOf(tank) + " ";
|
||||
|
||||
if (inventory != -1)
|
||||
configstr += "\u00a7a" + String.valueOf(inventory) + " ";
|
||||
|
||||
if (rsControl[0] || rsControl[1] || rsControl[2]){
|
||||
configstr += "\u00a7c";
|
||||
configstr += rsControl[0] ? "1" : "0";
|
||||
configstr += rsControl[1] ? "1" : "0";
|
||||
configstr += rsControl[2] ? "1" : "0";
|
||||
configstr += " ";
|
||||
}
|
||||
|
||||
if (rsLatch[0] || rsLatch[1] || rsLatch[2]){
|
||||
configstr += "\u00a75";
|
||||
configstr += rsLatch[0] ? "1" : "0";
|
||||
configstr += rsLatch[1] ? "1" : "0";
|
||||
configstr += rsLatch[2] ? "1" : "0";
|
||||
configstr += " ";
|
||||
}
|
||||
|
||||
configstr += "\u00a7r]";
|
||||
|
||||
if (!configstr.equals("[ \u00a7r]"))
|
||||
tipstr += " " + configstr;
|
||||
|
||||
/*
|
||||
if ((tank != -1) && (inventory != -1))
|
||||
tipstr += String.format("[ \u00a79%d \u00a7a%d \u00a7r]", tank, inventory);
|
||||
else if (tank != -1)
|
||||
tipstr += String.format("[ \u00a79%d \u00a7r]", tank);
|
||||
else if (inventory != -1)
|
||||
tipstr += String.format("[ \u00a7a%d \u00a7r]", inventory);
|
||||
*/
|
||||
|
||||
currenttip.add(tipstr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
} catch (Exception e) {
|
||||
currenttip = WailaExceptionHandler.handleErr(e, accessor.getTileEntity().getClass().getName(), currenttip);
|
||||
}
|
||||
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package mcp.mobius.waila.addons.exu;
|
||||
|
||||
import java.util.logging.Level;
|
||||
|
||||
import mcp.mobius.waila.Waila;
|
||||
import mcp.mobius.waila.api.impl.ModuleRegistrar;
|
||||
|
||||
public class ExtraUtilitiesModule {
|
||||
|
||||
public static Class ModExtraUtilities = null;
|
||||
public static Class TileEntityDrum = null;
|
||||
|
||||
public static void register(){
|
||||
|
||||
|
||||
try{
|
||||
Class ModExtraUtilities = Class.forName("extrautils.ExtraUtils");
|
||||
Waila.log.log(Level.INFO, "ExtraUtilities mod found.");
|
||||
} catch (ClassNotFoundException e){
|
||||
Waila.log.log(Level.INFO, "[ExtraUtilities] ExtraUtilities mod not found.");
|
||||
return;
|
||||
}
|
||||
|
||||
try{
|
||||
TileEntityDrum = Class.forName("extrautils.tileentity.TileEntityDrum");
|
||||
} catch (ClassNotFoundException e){
|
||||
Waila.log.log(Level.WARNING, "[ExtraUtilities] Class not found. " + e);
|
||||
return;
|
||||
}
|
||||
|
||||
ModuleRegistrar.instance().addConfigRemote("ExtraUtilities", "extrautilities.fluidamount");
|
||||
ModuleRegistrar.instance().registerBodyProvider(new HUDHandlerDrum(), TileEntityDrum);
|
||||
ModuleRegistrar.instance().registerSyncedNBTKey("*", TileEntityDrum);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package mcp.mobius.waila.addons.exu;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import net.minecraftforge.fluids.FluidTankInfo;
|
||||
import net.minecraftforge.fluids.IFluidHandler;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
|
||||
public class HUDHandlerDrum implements IWailaDataProvider {
|
||||
|
||||
@Override
|
||||
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
|
||||
if (!config.getConfig("extrautilities.fluidamount")) return currenttip;
|
||||
|
||||
int amount = 0;
|
||||
|
||||
NBTTagCompound subtag = accessor.getNBTData().getCompoundTag("tank");
|
||||
if (subtag.hasKey("Amount"))
|
||||
amount = accessor.getNBTInteger(subtag, "Amount");
|
||||
|
||||
IFluidHandler handler = (IFluidHandler)accessor.getTileEntity();
|
||||
if (handler == null) return currenttip;
|
||||
|
||||
FluidTankInfo[] tanks = handler.getTankInfo(ForgeDirection.UNKNOWN);
|
||||
if (tanks.length != 1) return currenttip;
|
||||
|
||||
currenttip.add(String.format("%d / %d mB", amount, tanks[0].capacity));
|
||||
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package mcp.mobius.waila.addons.gravestone;
|
||||
|
||||
import java.util.logging.Level;
|
||||
|
||||
import mcp.mobius.waila.Waila;
|
||||
import mcp.mobius.waila.api.impl.ModuleRegistrar;
|
||||
|
||||
public class GravestoneModule {
|
||||
|
||||
public static Class BlockGraveStone = null;
|
||||
|
||||
public static void register(){
|
||||
|
||||
try{
|
||||
Class ModGravestone = Class.forName("GraveStone.ModGraveStone");
|
||||
Waila.log.log(Level.INFO, "GraveStone mod found.");
|
||||
} catch (ClassNotFoundException e){
|
||||
Waila.log.log(Level.INFO, "[GraveStone] GraveStone mod not found.");
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
BlockGraveStone = Class.forName("GraveStone.block.BlockGSGraveStone");
|
||||
} catch (ClassNotFoundException e) {
|
||||
Waila.log.log(Level.WARNING, "[GraveStone] Class not found. " + e);
|
||||
}
|
||||
|
||||
|
||||
ModuleRegistrar.instance().registerStackProvider(new HUDHandlerGravestone(), BlockGraveStone);
|
||||
ModuleRegistrar.instance().registerSyncedNBTKey("*", BlockGraveStone);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package mcp.mobius.waila.addons.gravestone;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
|
||||
public class HUDHandlerGravestone implements IWailaDataProvider {
|
||||
|
||||
@Override
|
||||
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return new ItemStack(accessor.getBlock(), 0, accessor.getMetadata());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package mcp.mobius.waila.addons.harvestcraft;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import codechicken.lib.lang.LangUtil;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
import mcp.mobius.waila.utils.NBTUtil;
|
||||
|
||||
public class HUDHandlerPamCrop implements IWailaDataProvider {
|
||||
|
||||
@Override
|
||||
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
if (!config.getConfig("general.showcrop")) return currenttip;
|
||||
|
||||
int growthStage = NBTUtil.getNBTInteger(accessor.getNBTData(), "growthStage");
|
||||
|
||||
float growthValue = (growthStage / 2.0F) * 100.0F;
|
||||
if (growthValue < 100.0)
|
||||
currenttip.add(String.format("%s : %.0f %%", LangUtil.translateG("hud.msg.growth"), growthValue));
|
||||
else
|
||||
currenttip.add(String.format("%s : %s", LangUtil.translateG("hud.msg.growth"), LangUtil.translateG("hud.msg.mature")));
|
||||
return currenttip;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package mcp.mobius.waila.addons.harvestcraft;
|
||||
|
||||
import java.util.logging.Level;
|
||||
|
||||
import mcp.mobius.waila.Waila;
|
||||
import mcp.mobius.waila.api.impl.ModuleRegistrar;
|
||||
|
||||
public class HarvestcraftModule {
|
||||
public static Class TileEntityPamCrop = null;
|
||||
|
||||
|
||||
public static void register(){
|
||||
try{
|
||||
Class PamHarvestCraft = Class.forName("assets.pamharvestcraft.PamHarvestCraft");
|
||||
Waila.log.log(Level.INFO, "PamHarvestCraft mod found.");
|
||||
} catch (ClassNotFoundException e){
|
||||
Waila.log.log(Level.INFO, "[PamHarvestCraft] PamHarvestCraft mod not found.");
|
||||
return;
|
||||
}
|
||||
|
||||
try{
|
||||
TileEntityPamCrop = Class.forName("assets.pamharvestcraft.TileEntityPamCrop");
|
||||
} catch (ClassNotFoundException e){
|
||||
Waila.log.log(Level.WARNING, "[PamHarvestCraft] Class not found. " + e);
|
||||
return;
|
||||
}
|
||||
|
||||
ModuleRegistrar.instance().registerBodyProvider(new HUDHandlerPamCrop(), TileEntityPamCrop);
|
||||
}
|
||||
}
|
||||
@@ -1,90 +0,0 @@
|
||||
package mcp.mobius.waila.addons.ic2;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import mcp.mobius.waila.mod_Waila;
|
||||
import mcp.mobius.waila.addons.ConfigHandler;
|
||||
import mcp.mobius.waila.addons.ExternalModulesHandler;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import codechicken.nei.api.API;
|
||||
import codechicken.nei.api.IHighlightHandler;
|
||||
import codechicken.nei.api.ItemInfo.Layout;
|
||||
|
||||
public class HUDHandlerIC2IEnergySink implements IWailaDataProvider {
|
||||
|
||||
@Override
|
||||
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
//if (accessor.getTileEntity() != null && TEElectricBlock.isInstance(accessor.getTileEntity())){
|
||||
int maxinput = -1;
|
||||
try{
|
||||
if (IC2Module.IEnergySink.isInstance(accessor.getTileEntity()))
|
||||
maxinput = (Integer)(IC2Module.IEnergySink_GetInput.invoke(IC2Module.IEnergySink.cast(accessor.getTileEntity())));
|
||||
} catch (Exception e){
|
||||
mod_Waila.log.log(Level.SEVERE, "[IC2] Unhandled exception trying to access an IEnergySink for display !.\n" + String.valueOf(e));
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
int ntransformers = this.getTransformerUpgrades(accessor);
|
||||
if (ntransformers > 0){
|
||||
maxinput = maxinput * (int)Math.pow(4.0D, (double)Math.min(3, ntransformers));
|
||||
}
|
||||
|
||||
|
||||
if (ConfigHandler.instance().getConfig("ic2.inputeuother") && (maxinput != -1) && !this.canUpgrade(accessor.getNBTData()))
|
||||
currenttip.add(String.format("IN : %s EU/t", maxinput));
|
||||
|
||||
if (ConfigHandler.instance().getConfig("ic2.inputeumach") && (maxinput != -1) && this.canUpgrade(accessor.getNBTData()))
|
||||
currenttip.add(String.format("IN : %s EU/t", maxinput));
|
||||
|
||||
if (config.getConfig("ic2.storage"))
|
||||
if (accessor.getNBTData().hasKey("energy") && !IC2Module.IEnergyStorage.isInstance(accessor.getTileEntity()))
|
||||
currenttip.add(String.format("Storage : %s EU", accessor.getNBTInteger(accessor.getNBTData(), "energy")));
|
||||
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
public boolean canUpgrade(NBTTagCompound tag){
|
||||
if (tag.hasKey("InvSlots"))
|
||||
if (tag.getCompoundTag("InvSlots").hasKey("upgrade"))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public int getTransformerUpgrades(IWailaDataAccessor accessor){
|
||||
NBTTagCompound tag = accessor.getNBTData();
|
||||
if (!canUpgrade(tag)) return -1;
|
||||
|
||||
int ntransformers = 0;
|
||||
NBTTagList contents = tag.getCompoundTag("InvSlots").getCompoundTag("upgrade").getTagList("Contents");
|
||||
for (NBTTagCompound subtag : (List<NBTTagCompound>)contents.tagList){
|
||||
ItemStack currentSlot = new ItemStack(accessor.getNBTInteger(subtag, "id"),accessor.getNBTInteger(subtag, "Count"),accessor.getNBTInteger(subtag, "Damage"));
|
||||
if (IC2Module.TransformerUpgradeStack.isItemEqual(currentSlot)){
|
||||
ntransformers += currentSlot.stackSize;
|
||||
}
|
||||
}
|
||||
|
||||
return ntransformers;
|
||||
}
|
||||
}
|
||||
@@ -1,59 +0,0 @@
|
||||
package mcp.mobius.waila.addons.ic2;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import mcp.mobius.waila.mod_Waila;
|
||||
import mcp.mobius.waila.addons.ConfigHandler;
|
||||
import mcp.mobius.waila.addons.ExternalModulesHandler;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTBase;
|
||||
import net.minecraft.nbt.NBTTagInt;
|
||||
import net.minecraft.nbt.NBTTagShort;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import codechicken.nei.api.API;
|
||||
import codechicken.nei.api.IHighlightHandler;
|
||||
import codechicken.nei.api.ItemInfo.Layout;
|
||||
|
||||
public class HUDHandlerIC2IEnergySource implements IWailaDataProvider {
|
||||
|
||||
@Override
|
||||
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
//if (accessor.getTileEntity() != null && TEElectricBlock.isInstance(accessor.getTileEntity())){
|
||||
int output = -1;
|
||||
|
||||
try{
|
||||
if (IC2Module.IEnergySource.isInstance(accessor.getTileEntity()))
|
||||
output = (Integer)(IC2Module.IEnergySource_GetOutput.invoke(IC2Module.IEnergySource.cast(accessor.getTileEntity())));
|
||||
} catch (Exception e){
|
||||
mod_Waila.log.log(Level.SEVERE, "[IC2] Unhandled exception trying to access an IEnergySource for display !.\n" + String.valueOf(e));
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
if (ConfigHandler.instance().getConfig("ic2.outputeu") && (output != -1))
|
||||
currenttip.add(String.format("OUT : %s EU/t", output));
|
||||
|
||||
if (config.getConfig("ic2.storage"))
|
||||
if (accessor.getNBTData().hasKey("storage") && !IC2Module.IEnergyStorage.isInstance(accessor.getTileEntity()))
|
||||
currenttip.add(String.format("Storage : %s EU", accessor.getNBTInteger(accessor.getNBTData(), "storage")));
|
||||
|
||||
return currenttip;
|
||||
}
|
||||
}
|
||||
@@ -1,61 +0,0 @@
|
||||
package mcp.mobius.waila.addons.ic2;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import mcp.mobius.waila.mod_Waila;
|
||||
import mcp.mobius.waila.addons.ConfigHandler;
|
||||
import mcp.mobius.waila.addons.ExternalModulesHandler;
|
||||
import mcp.mobius.waila.addons.vanillamc.HUDHandlerVanilla;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import codechicken.nei.api.API;
|
||||
import codechicken.nei.api.IHighlightHandler;
|
||||
import codechicken.nei.api.ItemInfo.Layout;
|
||||
|
||||
public class HUDHandlerIC2IEnergyStorage implements IWailaDataProvider {
|
||||
|
||||
@Override
|
||||
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
if (!config.getConfig("ic2.storage"))
|
||||
return currenttip;
|
||||
|
||||
int stored = -1;
|
||||
int capacity = -1;
|
||||
try{
|
||||
if (IC2Module.IEnergyStorage.isInstance(accessor.getTileEntity()))
|
||||
capacity = (Integer)(IC2Module.IEnergyStorage_GetCapacity.invoke(IC2Module.IEnergyStorage.cast(accessor.getTileEntity())));
|
||||
} catch (Exception e){
|
||||
mod_Waila.log.log(Level.SEVERE, "[IC2] Unhandled exception trying to access an IEnergyStorage for display !.\n" + String.valueOf(e));
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
if (accessor.getNBTData().hasKey("energy"))
|
||||
stored = accessor.getNBTInteger(accessor.getNBTData(), "energy");
|
||||
|
||||
if ((capacity != -1) && (stored != -1))
|
||||
currenttip.add(String.format("%s/%s EU", stored, capacity));
|
||||
|
||||
return currenttip;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
package mcp.mobius.waila.addons.ic2;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import codechicken.lib.lang.LangUtil;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
import mcp.mobius.waila.api.impl.ConfigHandler;
|
||||
import mcp.mobius.waila.utils.WailaExceptionHandler;
|
||||
import static mcp.mobius.waila.api.SpecialChars.*;
|
||||
|
||||
public class HUDHandlerTEBaseGenerator implements IWailaDataProvider {
|
||||
|
||||
@Override
|
||||
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
|
||||
try{
|
||||
int storage = -1;
|
||||
int production = -1;
|
||||
|
||||
if (IC2Module.TileEntityBaseGenerator.isInstance(accessor.getTileEntity())){
|
||||
storage = IC2Module.TEBG_MaxStorage.getShort(accessor.getTileEntity());
|
||||
production = IC2Module.TEBG_Production.getInt(accessor.getTileEntity());
|
||||
}
|
||||
else if (IC2Module.TileEntityGeoGenerator.isInstance(accessor.getTileEntity())){
|
||||
storage = IC2Module.TEGG_MaxStorage.getShort(accessor.getTileEntity());
|
||||
production = IC2Module.TEGG_Production.getInt(accessor.getTileEntity());
|
||||
}
|
||||
else if (IC2Module.TileEntitySemifluidGenerator.isInstance(accessor.getTileEntity())){
|
||||
storage = IC2Module.TESG_MaxStorage.getShort(accessor.getTileEntity());
|
||||
production = (int)IC2Module.TESG_Production.getDouble(accessor.getTileEntity());
|
||||
}
|
||||
|
||||
String storedStr = LangUtil.translateG("hud.msg.stored");
|
||||
String outputStr = LangUtil.translateG("hud.msg.output");
|
||||
|
||||
/* EU Storage */
|
||||
if (ConfigHandler.instance().getConfig("ic2.storage")){
|
||||
double stored = IC2Module.getStoredEnergy(accessor);
|
||||
|
||||
if ( stored >= 0.0 && storage > 0)
|
||||
currenttip.add(String.format("%s%s\u00a7f%d\u00a7r / \u00a7f%d\u00a7r EU", storedStr, TAB + ALIGNRIGHT, Math.round(Math.min(stored,storage)), storage));
|
||||
|
||||
//else if (stored >= 0.0)
|
||||
// currenttip.add(String.format("Stored : %d EU", stored));
|
||||
}
|
||||
|
||||
if (ConfigHandler.instance().getConfig("ic2.outputeu")){
|
||||
if ( production > 0)
|
||||
currenttip.add(String.format("%s%s\u00a7f%d\u00a7r EU/t", outputStr, TAB + ALIGNRIGHT, production));
|
||||
}
|
||||
|
||||
} catch (Exception e){
|
||||
currenttip = WailaExceptionHandler.handleErr(e, accessor.getTileEntity().getClass().getName(), currenttip);
|
||||
}
|
||||
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package mcp.mobius.waila.addons.ic2;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import codechicken.lib.lang.LangUtil;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
import mcp.mobius.waila.api.impl.ConfigHandler;
|
||||
import mcp.mobius.waila.utils.WailaExceptionHandler;
|
||||
import static mcp.mobius.waila.api.SpecialChars.*;
|
||||
|
||||
public class HUDHandlerTEElectricBlock implements IWailaDataProvider {
|
||||
|
||||
@Override
|
||||
public ItemStack getWailaStack(IWailaDataAccessor accessor,
|
||||
IWailaConfigHandler config) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
|
||||
try{
|
||||
String storedStr = LangUtil.translateG("hud.msg.stored");
|
||||
String outputStr = LangUtil.translateG("hud.msg.output");
|
||||
|
||||
/* EU Storage */
|
||||
if (ConfigHandler.instance().getConfig("ic2.storage")){
|
||||
double stored = IC2Module.getStoredEnergy(accessor);
|
||||
int storage = IC2Module.TEEB_MaxStorage.getInt(accessor.getTileEntity());
|
||||
|
||||
if ( stored >= 0.0 )
|
||||
currenttip.add(String.format("%s%s\u00a7f%d\u00a7r / \u00a7f%d\u00a7r EU", storedStr, TAB + ALIGNRIGHT, Math.round(Math.min(stored,storage)), storage));
|
||||
}
|
||||
|
||||
if (ConfigHandler.instance().getConfig("ic2.outputeu")){
|
||||
int production = IC2Module.TEEB_Output.getInt(accessor.getTileEntity());
|
||||
if ( production > 0)
|
||||
currenttip.add(String.format("%s%s\u00a7f%d\u00a7r EU/t", outputStr, TAB + ALIGNRIGHT, production));
|
||||
}
|
||||
|
||||
} catch (Exception e){
|
||||
currenttip = WailaExceptionHandler.handleErr(e, accessor.getTileEntity().getClass().getName(), currenttip);
|
||||
}
|
||||
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
package mcp.mobius.waila.addons.ic2;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import codechicken.lib.lang.LangUtil;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
import mcp.mobius.waila.api.impl.ConfigHandler;
|
||||
import mcp.mobius.waila.utils.WailaExceptionHandler;
|
||||
import static mcp.mobius.waila.api.SpecialChars.*;
|
||||
|
||||
public class HUDHandlerTEStandardMachine implements IWailaDataProvider {
|
||||
|
||||
@Override
|
||||
public ItemStack getWailaStack(IWailaDataAccessor accessor,
|
||||
IWailaConfigHandler config) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
|
||||
try{
|
||||
|
||||
IC2Upgrades upgrades = IC2Module.getUpgrades(accessor);
|
||||
int baseConsumption = IC2Module.TESM_DefaultEnergyConsume.getInt(accessor.getTileEntity());
|
||||
int baseOpTime = IC2Module.TESM_DefaultOperationLength.getInt(accessor.getTileEntity());
|
||||
int baseStorage = IC2Module.TESM_DefaultEnergyStorage.getInt(accessor.getTileEntity());
|
||||
|
||||
long consumption = Math.round(Math.min(baseConsumption * Math.pow(1.6D, upgrades.overclocker), 2147483647));
|
||||
|
||||
double stackOpLen = baseOpTime * 64.0D * Math.pow(0.7D, upgrades.overclocker);
|
||||
int opPerTick = ((int)Math.min(Math.ceil(64.0D / stackOpLen), 2147483647.0D));
|
||||
int opTime = ((int)Math.round(stackOpLen * opPerTick / 64.0D));
|
||||
|
||||
int storage = Math.round(Math.min(baseStorage + 10000 * upgrades.storage + opTime * consumption, 2147483647));;
|
||||
|
||||
|
||||
int maxinput = (Integer)IC2Module.IES_GetMaxSafeInput.invoke(accessor.getTileEntity()) * (int)Math.pow(4.0D, Math.min(4, upgrades.transform));
|
||||
double stored = IC2Module.getStoredEnergy(accessor);
|
||||
|
||||
String storedStr = LangUtil.translateG("hud.msg.stored");
|
||||
String powerStr = LangUtil.translateG("hud.msg.power");
|
||||
String maxPowerStr = LangUtil.translateG("hud.msg.maxpower");
|
||||
|
||||
/* EU Storage */
|
||||
if (ConfigHandler.instance().getConfig("ic2.storage")){
|
||||
if ( stored >= 0.0 )
|
||||
currenttip.add(String.format("%s%s\u00a7f%d\u00a7r / \u00a7f%d\u00a7r EU", storedStr, TAB + ALIGNRIGHT, Math.round(Math.min(stored,storage)), storage));
|
||||
}
|
||||
|
||||
if (ConfigHandler.instance().getConfig("ic2.consump")){
|
||||
if ( consumption > 0)
|
||||
currenttip.add(String.format("%s%s\u00a7f%d\u00a7r EU/t", powerStr, TAB + ALIGNRIGHT, consumption ));
|
||||
}
|
||||
|
||||
if (ConfigHandler.instance().getConfig("ic2.inputeu")){
|
||||
if ( maxinput > 0)
|
||||
currenttip.add(String.format("%s%s\u00a7f%d\u00a7r EU/t", maxPowerStr, TAB + ALIGNRIGHT, maxinput ));
|
||||
}
|
||||
|
||||
} catch (Exception e){
|
||||
currenttip = WailaExceptionHandler.handleErr(e, accessor.getTileEntity().getClass().getName(), currenttip);
|
||||
}
|
||||
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package mcp.mobius.waila.addons.ic2;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import codechicken.lib.lang.LangUtil;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
import mcp.mobius.waila.api.impl.ConfigHandler;
|
||||
import static mcp.mobius.waila.api.SpecialChars.*;
|
||||
|
||||
public class HUDHandlerTETradeOMat implements IWailaDataProvider {
|
||||
|
||||
@Override
|
||||
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaHead(ItemStack itemStack,List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
|
||||
if (!ConfigHandler.instance().getConfig("ic2.tradeomat")) return currenttip;
|
||||
|
||||
NBTTagCompound slots = accessor.getNBTData().getCompoundTag("InvSlots");
|
||||
NBTTagList offer = slots.getCompoundTag("offer").getTagList("Contents");
|
||||
NBTTagList demand = slots.getCompoundTag("demand").getTagList("Contents");
|
||||
String offersStr = LangUtil.translateG("hud.msg.offers");
|
||||
String demandsStr = LangUtil.translateG("hud.msg.demands");
|
||||
|
||||
|
||||
if (offer.tagCount() == 1){
|
||||
NBTTagCompound subtag = (NBTTagCompound)offer.tagAt(0);
|
||||
ItemStack is = new ItemStack(subtag.getShort("id"), subtag.getByte("Count"), subtag.getShort("Damage"));
|
||||
currenttip.add(String.format("%s%s\u00a7f%d\u00a7r x \u00a7f%s\u00a7r", offersStr, TAB + ALIGNRIGHT, is.stackSize, is.getDisplayName()));
|
||||
}
|
||||
|
||||
if (demand.tagCount() == 1){
|
||||
NBTTagCompound subtag = (NBTTagCompound)demand.tagAt(0);
|
||||
ItemStack is = new ItemStack(subtag.getShort("id"), subtag.getByte("Count"), subtag.getShort("Damage"));
|
||||
currenttip.add(String.format("%s%s\u00a7f%d\u00a7r x \u00a7f%s\u00a7r", demandsStr, TAB + ALIGNRIGHT, is.stackSize, is.getDisplayName()));
|
||||
}
|
||||
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,88 +2,181 @@ package mcp.mobius.waila.addons.ic2;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import mcp.mobius.waila.mod_Waila;
|
||||
import mcp.mobius.waila.addons.ExternalModulesHandler;
|
||||
import cpw.mods.fml.common.ObfuscationReflectionHelper;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import mcp.mobius.waila.Waila;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.impl.ConfigHandler;
|
||||
import mcp.mobius.waila.api.impl.ModuleRegistrar;
|
||||
import mcp.mobius.waila.utils.AccessHelper;
|
||||
|
||||
public class IC2Module {
|
||||
|
||||
/* Our interfaces */
|
||||
public static Class IEnergyStorage = null;
|
||||
public static Class IEnergySink = null;
|
||||
public static Class IEnergySource = null;
|
||||
public static Class TileEntityStandardMachine = null;
|
||||
public static Field TESM_DefaultEnergyStorage = null;
|
||||
public static Field TESM_DefaultEnergyConsume = null;
|
||||
public static Field TESM_DefaultOperationLength = null;
|
||||
public static Field TESM_MaxEnergy = null;
|
||||
|
||||
/* Methods interfaces */
|
||||
public static Method IEnergyStorage_GetCapacity = null;
|
||||
public static Method IEnergySink_GetInput = null;
|
||||
public static Method IEnergySource_GetOutput = null;
|
||||
public static Class TileEntityBaseGenerator = null;
|
||||
public static Field TEBG_MaxStorage = null;
|
||||
public static Field TEBG_Production = null;
|
||||
|
||||
public static Class TileEntitySemifluidGenerator = null;
|
||||
public static Field TESG_MaxStorage = null;
|
||||
public static Field TESG_Production = null;
|
||||
|
||||
public static Class TileEntityGeoGenerator = null;
|
||||
public static Field TEGG_MaxStorage = null;
|
||||
public static Field TEGG_Production = null;
|
||||
|
||||
public static Class TileEntityElectricBlock = null;
|
||||
public static Field TEEB_MaxStorage = null;
|
||||
public static Field TEEB_Output = null;
|
||||
|
||||
public static Class IEnergySink = null;
|
||||
public static Method IES_GetMaxSafeInput = null;
|
||||
|
||||
public static Class TileEntityTradeOMat = null;
|
||||
|
||||
/* Some required items */
|
||||
public static Class IC2Items = null;
|
||||
public static Field TransformerUpgrade = null;
|
||||
public static ItemStack TransformerUpgradeStack = null;
|
||||
public static Field EnergyStorageUpgrade = null;
|
||||
public static ItemStack EnergyStorageUpgradeStack = null;
|
||||
|
||||
|
||||
public static ItemStack TransformerUpgradeStack = null;
|
||||
public static Field EnergyStorageUpgrade = null;
|
||||
public static ItemStack EnergyStorageUpgradeStack = null;
|
||||
public static Field OverclockerUpgrade = null;
|
||||
public static ItemStack OverclockerUpgradeStack = null;
|
||||
|
||||
public static void register(){
|
||||
|
||||
try{
|
||||
Class ModIndustrialCraft = Class.forName("ic2.core.IC2");
|
||||
mod_Waila.log.log(Level.INFO, "Industrialcraft2 mod found.");
|
||||
} catch (ClassNotFoundException e){
|
||||
mod_Waila.log.log(Level.INFO, "[IC2] Industrialcraft2 mod not found.");
|
||||
return;
|
||||
}
|
||||
|
||||
try{
|
||||
TileEntityStandardMachine = Class.forName("ic2.core.block.machine.tileentity.TileEntityStandardMachine");
|
||||
TESM_DefaultEnergyStorage = TileEntityStandardMachine.getField("defaultEnergyStorage");
|
||||
TESM_DefaultEnergyConsume = TileEntityStandardMachine.getField("defaultEnergyConsume");
|
||||
TESM_DefaultOperationLength = TileEntityStandardMachine.getField("defaultOperationLength");
|
||||
TESM_MaxEnergy = TileEntityStandardMachine.getField("maxEnergy");
|
||||
|
||||
IEnergyStorage = Class.forName("ic2.api.tile.IEnergyStorage");
|
||||
IEnergySink = Class.forName("ic2.api.energy.tile.IEnergySink");
|
||||
IEnergySource = Class.forName("ic2.api.energy.tile.IEnergySource");
|
||||
|
||||
IEnergySink_GetInput = IEnergySink.getMethod("getMaxSafeInput");
|
||||
IEnergySource_GetOutput = IEnergySource.getMethod("getMaxEnergyOutput");
|
||||
IEnergyStorage_GetCapacity = IEnergyStorage.getMethod("getCapacity");
|
||||
TileEntityBaseGenerator = Class.forName("ic2.core.block.generator.tileentity.TileEntityBaseGenerator");
|
||||
TEBG_MaxStorage = TileEntityBaseGenerator.getField("maxStorage");
|
||||
TEBG_Production = TileEntityBaseGenerator.getField("production");
|
||||
|
||||
TileEntitySemifluidGenerator = Class.forName("ic2.core.block.generator.tileentity.TileEntitySemifluidGenerator");
|
||||
TESG_MaxStorage = TileEntitySemifluidGenerator.getDeclaredField("maxStorage");
|
||||
TESG_Production = TileEntitySemifluidGenerator.getDeclaredField("production");
|
||||
TESG_MaxStorage.setAccessible(true);
|
||||
TESG_Production.setAccessible(true);
|
||||
|
||||
IC2Items = Class.forName("ic2.core.Ic2Items");
|
||||
TransformerUpgrade = IC2Items.getDeclaredField("transformerUpgrade");
|
||||
EnergyStorageUpgrade = IC2Items.getDeclaredField("energyStorageUpgrade");
|
||||
TileEntityGeoGenerator = Class.forName("ic2.core.block.generator.tileentity.TileEntityGeoGenerator");
|
||||
TEGG_MaxStorage = TileEntityGeoGenerator.getField("maxStorage");
|
||||
TEGG_Production = TileEntityGeoGenerator.getField("production");
|
||||
|
||||
TileEntityElectricBlock = Class.forName("ic2.core.block.wiring.TileEntityElectricBlock");
|
||||
TEEB_MaxStorage = TileEntityElectricBlock.getField("maxStorage");
|
||||
TEEB_Output = TileEntityElectricBlock.getField("output");
|
||||
|
||||
IEnergySink = Class.forName("ic2.api.energy.tile.IEnergySink");
|
||||
IES_GetMaxSafeInput = IEnergySink.getMethod("getMaxSafeInput");
|
||||
|
||||
IC2Items = Class.forName("ic2.core.Ic2Items");
|
||||
TransformerUpgrade = IC2Items.getField("transformerUpgrade");
|
||||
EnergyStorageUpgrade = IC2Items.getField("energyStorageUpgrade");
|
||||
OverclockerUpgrade = IC2Items.getField("overclockerUpgrade");
|
||||
|
||||
TransformerUpgradeStack = (ItemStack)TransformerUpgrade.get(null);
|
||||
EnergyStorageUpgradeStack = (ItemStack)EnergyStorageUpgrade.get(null);
|
||||
EnergyStorageUpgradeStack = (ItemStack)EnergyStorageUpgrade.get(null);
|
||||
OverclockerUpgradeStack = (ItemStack)OverclockerUpgrade.get(null);
|
||||
|
||||
TileEntityTradeOMat = Class.forName("ic2.core.block.personal.TileEntityTradeOMat");
|
||||
|
||||
} catch (ClassNotFoundException e){
|
||||
mod_Waila.log.log(Level.WARNING, "[IC2] Class not found. " + e);
|
||||
//e.printStackTrace();
|
||||
Waila.log.log(Level.WARNING, "[IC2] Class not found. " + e);
|
||||
return;
|
||||
} catch (NoSuchMethodException e){
|
||||
mod_Waila.log.log(Level.WARNING, "[IC2] Method not found." + e);
|
||||
//e.printStackTrace();
|
||||
Waila.log.log(Level.WARNING, "[IC2] Method not found." + e);
|
||||
return;
|
||||
} catch (NoSuchFieldException e){
|
||||
mod_Waila.log.log(Level.WARNING, "[IC2] Field not found." + e);
|
||||
//e.printStackTrace();
|
||||
Waila.log.log(Level.WARNING, "[IC2] Field not found." + e);
|
||||
return;
|
||||
} catch (Exception e){
|
||||
mod_Waila.log.log(Level.WARNING, "[IC2] Unhandled exception." + e);
|
||||
//e.printStackTrace();
|
||||
Waila.log.log(Level.WARNING, "[IC2] Unhandled exception." + e);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
ExternalModulesHandler.instance().addConfigRemote("IndustrialCraft2", "ic2.inputeumach", "Max EU input [Machines]");
|
||||
ExternalModulesHandler.instance().addConfig("IndustrialCraft2", "ic2.inputeuother", "Max EU input [Other]");
|
||||
ExternalModulesHandler.instance().addConfig("IndustrialCraft2", "ic2.outputeu", "Max EU output");
|
||||
ExternalModulesHandler.instance().addConfigRemote("IndustrialCraft2", "ic2.storage", "Energy stored");
|
||||
ExternalModulesHandler.instance().registerBodyProvider(new HUDHandlerIC2IEnergySink(), IEnergySink);
|
||||
ExternalModulesHandler.instance().registerBodyProvider(new HUDHandlerIC2IEnergySource(), IEnergySource);
|
||||
ExternalModulesHandler.instance().registerBodyProvider(new HUDHandlerIC2IEnergyStorage(), IEnergyStorage);
|
||||
|
||||
ModuleRegistrar.instance().addConfigRemote("IndustrialCraft2", "ic2.storage");
|
||||
ModuleRegistrar.instance().addConfig("IndustrialCraft2", "ic2.outputeu");
|
||||
ModuleRegistrar.instance().addConfigRemote("IndustrialCraft2", "ic2.inputeu");
|
||||
ModuleRegistrar.instance().addConfigRemote("IndustrialCraft2", "ic2.consump");
|
||||
ModuleRegistrar.instance().addConfigRemote("IndustrialCraft2", "ic2.tradeomat");
|
||||
|
||||
ModuleRegistrar.instance().registerBodyProvider(new HUDHandlerTEStandardMachine(), TileEntityStandardMachine);
|
||||
ModuleRegistrar.instance().registerBodyProvider(new HUDHandlerTEBaseGenerator(), TileEntityBaseGenerator);
|
||||
ModuleRegistrar.instance().registerBodyProvider(new HUDHandlerTEBaseGenerator(), TileEntitySemifluidGenerator);
|
||||
ModuleRegistrar.instance().registerBodyProvider(new HUDHandlerTEBaseGenerator(), TileEntityGeoGenerator);
|
||||
ModuleRegistrar.instance().registerBodyProvider(new HUDHandlerTEElectricBlock(), TileEntityElectricBlock);
|
||||
ModuleRegistrar.instance().registerBodyProvider(new HUDHandlerTETradeOMat(), TileEntityTradeOMat);
|
||||
|
||||
ModuleRegistrar.instance().registerSyncedNBTKey("*", TileEntityStandardMachine);
|
||||
ModuleRegistrar.instance().registerSyncedNBTKey("*", TileEntityBaseGenerator);
|
||||
ModuleRegistrar.instance().registerSyncedNBTKey("*", TileEntitySemifluidGenerator);
|
||||
ModuleRegistrar.instance().registerSyncedNBTKey("*", TileEntityGeoGenerator);
|
||||
ModuleRegistrar.instance().registerSyncedNBTKey("*", TileEntityElectricBlock);
|
||||
ModuleRegistrar.instance().registerSyncedNBTKey("*", TileEntityTradeOMat);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* Retuns the current stored energy if available in the nbt and config is true */
|
||||
public static double getStoredEnergy(IWailaDataAccessor accessor){
|
||||
if (ConfigHandler.instance().getConfig("ic2.storage")){
|
||||
if (accessor.getNBTData().hasKey("energy"))
|
||||
return accessor.getNBTData().getDouble("energy");
|
||||
else if (accessor.getNBTData().hasKey("storage"))
|
||||
return accessor.getNBTData().getDouble("storage");
|
||||
}
|
||||
return -1.0;
|
||||
}
|
||||
|
||||
public static IC2Upgrades getUpgrades(IWailaDataAccessor accessor){
|
||||
|
||||
NBTTagCompound nbt = accessor.getNBTData();
|
||||
IC2Upgrades upgrades = new IC2Upgrades();
|
||||
|
||||
if (!nbt.hasKey("InvSlots")) return null;
|
||||
|
||||
NBTTagCompound inventory = nbt.getCompoundTag("InvSlots");
|
||||
if (!inventory.hasKey("upgrade")) return null;
|
||||
|
||||
NBTTagList nbtupgrades = inventory.getCompoundTag("upgrade").getTagList("Contents");
|
||||
|
||||
//List tagList = (List)AccessHelper.getField("net.minecraft.nbt.NBTTagList", "tagList", nbtupgrades);
|
||||
List tagList = ObfuscationReflectionHelper.getPrivateValue(NBTTagList.class, nbtupgrades, "field_74747_a");
|
||||
|
||||
for (Object subobj : tagList){
|
||||
NBTTagCompound subtag = (NBTTagCompound)subobj;
|
||||
int id = subtag.getShort("id");
|
||||
int meta = subtag.getShort("Damage");
|
||||
int count = subtag.getByte("Count");
|
||||
|
||||
//ItemStack is = new ItemStack(id, 1, count);
|
||||
if (TransformerUpgradeStack.getItemDamage() == meta && TransformerUpgradeStack.itemID == id)
|
||||
upgrades.transform += count;
|
||||
if (EnergyStorageUpgradeStack.getItemDamage() == meta && EnergyStorageUpgradeStack.itemID == id)
|
||||
upgrades.storage += count;
|
||||
if (OverclockerUpgradeStack.getItemDamage() == meta && OverclockerUpgradeStack.itemID == id)
|
||||
upgrades.overclocker += count;
|
||||
}
|
||||
|
||||
return upgrades;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package mcp.mobius.waila.addons.ic2;
|
||||
|
||||
public class IC2Upgrades {
|
||||
public int transform = 0;
|
||||
public int storage = 0;
|
||||
public int overclocker = 0;
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package mcp.mobius.waila.addons.magicalcrops;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import codechicken.lib.lang.LangUtil;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
|
||||
public class HUDHandlerMagicalCrops implements IWailaDataProvider {
|
||||
|
||||
@Override
|
||||
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
if (!config.getConfig("general.showcrop")) return currenttip;
|
||||
|
||||
int growthStage = accessor.getMetadata();
|
||||
|
||||
float growthValue = (growthStage / 7.0F) * 100.0F;
|
||||
if (growthValue < 100.0)
|
||||
currenttip.add(String.format("%s : %.0f %%", LangUtil.translateG("hud.msg.growth"), growthValue));
|
||||
else
|
||||
currenttip.add(String.format("%s : %s", LangUtil.translateG("hud.msg.growth"), LangUtil.translateG("hud.msg.mature")));
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package mcp.mobius.waila.addons.magicalcrops;
|
||||
|
||||
import java.util.logging.Level;
|
||||
|
||||
import mcp.mobius.waila.Waila;
|
||||
import mcp.mobius.waila.api.impl.ModuleRegistrar;
|
||||
|
||||
public class MagicalCropsModule {
|
||||
public static Class BlockMagicalCrops = null;
|
||||
|
||||
|
||||
public static void register(){
|
||||
try{
|
||||
Class MagicalCrops = Class.forName("magicalcrops.mod_sCrops");
|
||||
Waila.log.log(Level.INFO, "MagicalCrops mod found.");
|
||||
} catch (ClassNotFoundException e){
|
||||
Waila.log.log(Level.INFO, "[MagicalCrops] MagicalCrops mod not found.");
|
||||
return;
|
||||
}
|
||||
|
||||
try{
|
||||
BlockMagicalCrops = Class.forName("magicalcrops.BlockMagicalCrops");
|
||||
} catch (ClassNotFoundException e){
|
||||
Waila.log.log(Level.WARNING, "[MagicalCrops] Class not found. " + e);
|
||||
return;
|
||||
}
|
||||
|
||||
ModuleRegistrar.instance().registerBodyProvider(new HUDHandlerMagicalCrops(), BlockMagicalCrops);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
package mcp.mobius.waila.addons.openblocks;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import codechicken.lib.lang.LangUtil;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.FluidTankInfo;
|
||||
import net.minecraftforge.fluids.IFluidHandler;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
|
||||
public class HUDHandlerTank implements IWailaDataProvider {
|
||||
|
||||
@Override
|
||||
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
if (!config.getConfig("openblocks.fluidamount")) return currenttip;
|
||||
|
||||
IFluidHandler handler = (IFluidHandler)accessor.getTileEntity();
|
||||
if (handler == null) return currenttip;
|
||||
|
||||
FluidTankInfo[] tanks = handler.getTankInfo(ForgeDirection.UNKNOWN);
|
||||
if (tanks.length != 1) return currenttip;
|
||||
|
||||
FluidStack fluid = tanks[0].fluid;
|
||||
String name = currenttip.get(0);
|
||||
|
||||
try{
|
||||
name += String.format(" < %s >", fluid.getFluid().getLocalizedName());
|
||||
} catch (NullPointerException f){
|
||||
name += " " + LangUtil.translateG("hud.msg.empty");
|
||||
}
|
||||
|
||||
currenttip.set(0, name);
|
||||
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
if (!config.getConfig("openblocks.fluidamount")) return currenttip;
|
||||
|
||||
IFluidHandler handler = (IFluidHandler)accessor.getTileEntity();
|
||||
if (handler == null) return currenttip;
|
||||
|
||||
FluidTankInfo[] tanks = handler.getTankInfo(ForgeDirection.UNKNOWN);
|
||||
if (tanks.length != 1) return currenttip;
|
||||
|
||||
if(tanks[0].fluid != null)
|
||||
currenttip.add(String.format("%d / %d mB", tanks[0].fluid.amount, tanks[0].capacity));
|
||||
else
|
||||
currenttip.add(String.format("0 / %d mB", tanks[0].capacity));
|
||||
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package mcp.mobius.waila.addons.openblocks;
|
||||
|
||||
import java.util.logging.Level;
|
||||
|
||||
import mcp.mobius.waila.Waila;
|
||||
import mcp.mobius.waila.api.impl.ModuleRegistrar;
|
||||
|
||||
public class OpenBlocksModule {
|
||||
|
||||
public static Class ModOpenBlocks = null;
|
||||
public static Class TileEntityTank = null;
|
||||
|
||||
public static void register(){
|
||||
try{
|
||||
Class ModOpenBlocks = Class.forName("openblocks.OpenBlocks");
|
||||
Waila.log.log(Level.INFO, "OpenBlocks mod found.");
|
||||
} catch (ClassNotFoundException e){
|
||||
Waila.log.log(Level.INFO, "[OpenBlocks] OpenBlocks mod not found.");
|
||||
return;
|
||||
}
|
||||
|
||||
try{
|
||||
TileEntityTank = Class.forName("openblocks.common.tileentity.TileEntityTank");
|
||||
} catch (ClassNotFoundException e){
|
||||
Waila.log.log(Level.WARNING, "[OpenBlocks] Class not found. " + e);
|
||||
return;
|
||||
}
|
||||
|
||||
ModuleRegistrar.instance().addConfigRemote("OpenBlocks", "openblocks.fluidamount");
|
||||
ModuleRegistrar.instance().registerBodyProvider(new HUDHandlerTank(), TileEntityTank);
|
||||
ModuleRegistrar.instance().registerHeadProvider(new HUDHandlerTank(), TileEntityTank);
|
||||
ModuleRegistrar.instance().registerSyncedNBTKey("*", TileEntityTank);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,215 @@
|
||||
package mcp.mobius.waila.addons.projectred;
|
||||
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import mcp.mobius.waila.api.IWailaBlockDecorator;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaFMPAccessor;
|
||||
import mcp.mobius.waila.api.IWailaFMPDecorator;
|
||||
import mcp.mobius.waila.gui.helpers.UIHelper;
|
||||
import mcp.mobius.waila.utils.NBTUtil;
|
||||
|
||||
public class HUDDecoratorRsGateLogic implements IWailaFMPDecorator {
|
||||
|
||||
static byte[][] IOARRAY={
|
||||
{1,1,2,1} /* OR */, {1,1,2,1} /* NOR */, {1,2,2,2} /* NOT */, {1,1,2,1} /* AND */,
|
||||
{1,1,2,1} /* NAND */, {0,1,2,1} /* XOR */, {0,1,2,1} /* XNOR */, {1,2,2,2} /* Buf */,
|
||||
{3,4,2,5} /* Multi */, {1,0,2,0} /* Pulse */, {1,0,2,0} /* Repeat */, {1,2,2,2} /* Rand */,
|
||||
{2,1,2,1} /* Latch */, {2,1,2,1} /* Toggle*/, {6,1,2,2} /* Transp */, {2,0,0,0} /* Light */,
|
||||
{2,0,0,0} /* Rain */, {1,7,2,7} /* Timer */, {2,2,2,2} /* Sequen */, {2,9,2,8} /* Count */,
|
||||
{1,2,2,6} /* State */, {6,1,2,1} /* Sync */, {10,1,10,1} /* Bus */, {11,12,11,12} /* Null */,
|
||||
{11,12,11,12} /* Inver */, {11,12,11,12} /* Buff */, {1,9,2,8} /* Cmp */, {1,12,2,12} /* And */,
|
||||
};
|
||||
|
||||
|
||||
static byte[][] IOARRAYALTER={
|
||||
{1,8,2,9} /* Cmp 1*/, {1,6,2,2} /* State 1*/, {2,8,2,9} /* Count 1*/, {6,2,2,1} /* Transp 1*/,
|
||||
{2,1,2,1} /* Latch 1*/, {2,1,2,1} /* Latch 2*/, {2,1,2,1} /* Latch 3*/
|
||||
};
|
||||
|
||||
static String[] IONAMES={ "", "IN", "OUT", "SWAP", "IN_A", "IN_B", "LOCK", "IO", "POS", "NEG", "BUS", "A", "B"};
|
||||
|
||||
@Override
|
||||
public void decorateBlock(ItemStack itemStack, IWailaFMPAccessor accessor, IWailaConfigHandler config) {
|
||||
|
||||
if (!config.getConfig("pr.showio")) return;
|
||||
|
||||
|
||||
int orient = 0;
|
||||
int subID = 0;
|
||||
int shape = 0;
|
||||
|
||||
orient = NBTUtil.getNBTInteger(accessor.getNBTData(), "orient");
|
||||
subID = NBTUtil.getNBTInteger(accessor.getNBTData(), "subID");
|
||||
shape = NBTUtil.getNBTInteger(accessor.getNBTData(), "shape");
|
||||
|
||||
//orient = orient - ((orient & 0x10) + (orient & 0x8) + (orient & 0x4));
|
||||
int hOrient = orient & 0x3;
|
||||
ForgeDirection vOrient = ForgeDirection.getOrientation((orient - (orient & 0x3)) >> 2);
|
||||
|
||||
//System.out.printf("%s\n", ForgeDirection.getOrientation(vOrient));
|
||||
|
||||
if (vOrient == ForgeDirection.EAST)
|
||||
hOrient -= 1;
|
||||
|
||||
if (vOrient == ForgeDirection.WEST)
|
||||
hOrient += 1;
|
||||
|
||||
if (hOrient == -1)
|
||||
hOrient = 3;
|
||||
|
||||
String[] IOStr = new String[4];
|
||||
if (shape != 0){
|
||||
int altIndex = -1;
|
||||
if (subID == 26 && shape == 1) altIndex = 0;
|
||||
if (subID == 20 && shape == 1) altIndex = 1;
|
||||
if (subID == 19 && shape == 1) altIndex = 2;
|
||||
if (subID == 14 && shape == 1) altIndex = 3;
|
||||
if (subID == 12 && shape == 1) altIndex = 4;
|
||||
if (subID == 12 && shape == 2) altIndex = 5;
|
||||
if (subID == 12 && shape == 3) altIndex = 6;
|
||||
|
||||
if (altIndex == -1)
|
||||
for (int i = 0; i < 4; i++)
|
||||
IOStr[i] = IONAMES[IOARRAY[subID][i]];
|
||||
else
|
||||
for (int i = 0; i < 4; i++)
|
||||
IOStr[i] = IONAMES[IOARRAYALTER[altIndex][i]];
|
||||
} else {
|
||||
for (int i = 0; i < 4; i++)
|
||||
IOStr[i] = IONAMES[IOARRAY[subID][i]];
|
||||
|
||||
}
|
||||
|
||||
String[] IOStrRot = new String[4];
|
||||
|
||||
for (int i = 0; i < 4 ; i++){
|
||||
int j = i + hOrient;
|
||||
if (j >= 4) j -= 4;
|
||||
IOStrRot[j] = IOStr[i];
|
||||
}
|
||||
|
||||
switch(vOrient){
|
||||
case DOWN:
|
||||
UIHelper.drawFloatingText(IOStrRot[0], accessor.getRenderingPosition(), 0.5F, 0.2F, 1.4F, 90F, 0F, 0F); // Orient 0
|
||||
UIHelper.drawFloatingText(IOStrRot[1], accessor.getRenderingPosition(), -0.4F, 0.2F, 0.5F, 90F, 270F, 0F); // Orient 1
|
||||
UIHelper.drawFloatingText(IOStrRot[2], accessor.getRenderingPosition(), 0.5F, 0.2F, -0.4F, 90F, 180F, 0F); // Orient 2
|
||||
UIHelper.drawFloatingText(IOStrRot[3], accessor.getRenderingPosition(), 1.4F, 0.2F, 0.5F, 90F, 90F, 0F); // Orient 3
|
||||
break;
|
||||
case EAST:
|
||||
UIHelper.drawFloatingText(IOStrRot[0], accessor.getRenderingPosition(), 0.8F, 0.5F, 1.4F, 0F, 90F, 90F);
|
||||
UIHelper.drawFloatingText(IOStrRot[1], accessor.getRenderingPosition(), 0.8F, -0.4F, 0.5F, 0F, 90F, 180F);
|
||||
UIHelper.drawFloatingText(IOStrRot[2], accessor.getRenderingPosition(), 0.8F, 0.5F, -0.4F, 0F, 90F, 270F);
|
||||
UIHelper.drawFloatingText(IOStrRot[3], accessor.getRenderingPosition(), 0.8F, 1.4F, 0.5F, 0F, 90F, 0F);
|
||||
break;
|
||||
case NORTH:
|
||||
UIHelper.drawFloatingText(IOStrRot[0], accessor.getRenderingPosition(), 0.5F, 1.4F, 0.2F, 0F, 180F, 0F);
|
||||
UIHelper.drawFloatingText(IOStrRot[1], accessor.getRenderingPosition(), 1.4F, 0.5F, 0.2F, 0F, 180F, 90F);
|
||||
UIHelper.drawFloatingText(IOStrRot[2], accessor.getRenderingPosition(), 0.5F, -0.4F, 0.2F, 0F, 180F, 180F);
|
||||
UIHelper.drawFloatingText(IOStrRot[3], accessor.getRenderingPosition(), -0.4F, 0.5F, 0.2F, 0F, 180F, 270F);
|
||||
break;
|
||||
case SOUTH:
|
||||
UIHelper.drawFloatingText(IOStrRot[0], accessor.getRenderingPosition(), 0.5F, 1.4F, 0.8F, 0F, 0F, 0F);
|
||||
UIHelper.drawFloatingText(IOStrRot[1], accessor.getRenderingPosition(), -0.4F, 0.5F, 0.8F, 0F, 0F, 90F);
|
||||
UIHelper.drawFloatingText(IOStrRot[2], accessor.getRenderingPosition(), 0.5F, -0.4F, 0.8F, 0F, 0F, 180F);
|
||||
UIHelper.drawFloatingText(IOStrRot[3], accessor.getRenderingPosition(), 1.4F, 0.5F, 0.8F, 0F, 0F, 270F);
|
||||
break;
|
||||
case UP:
|
||||
UIHelper.drawFloatingText(IOStrRot[0], accessor.getRenderingPosition(), 0.5F, 0.8F, 1.4F, 270F, 180F, 0F);
|
||||
UIHelper.drawFloatingText(IOStrRot[1], accessor.getRenderingPosition(), 1.4F, 0.8F, 0.5F, 270F, 270F, 0F);
|
||||
UIHelper.drawFloatingText(IOStrRot[2], accessor.getRenderingPosition(), 0.5F, 0.8F, -0.4F, 270F, 0F, 0F);
|
||||
UIHelper.drawFloatingText(IOStrRot[3], accessor.getRenderingPosition(), -0.4F, 0.8F, 0.5F, 270F, 90F, 0F);
|
||||
break;
|
||||
case WEST:
|
||||
UIHelper.drawFloatingText(IOStrRot[0], accessor.getRenderingPosition(), 0.2F, 0.5F, 1.4F, 180F, 90F, 90F);
|
||||
UIHelper.drawFloatingText(IOStrRot[1], accessor.getRenderingPosition(), 0.2F, 1.4F, 0.5F, 180F, 90F, 180F);
|
||||
UIHelper.drawFloatingText(IOStrRot[2], accessor.getRenderingPosition(), 0.2F, 0.5F, -0.4F, 180F, 90F, 270F);
|
||||
UIHelper.drawFloatingText(IOStrRot[3], accessor.getRenderingPosition(), 0.2F, -0.4F, 0.5F, 180F, 90F, 0F);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
double x = accessor.getRenderingPosition().xCoord;
|
||||
double y = accessor.getRenderingPosition().yCoord;
|
||||
double z = accessor.getRenderingPosition().zCoord;
|
||||
|
||||
switch(vOrient){
|
||||
case DOWN:
|
||||
UIHelper.drawRectangle(x - 0.1, y + 0.1, z, x, y + 0.1, z + 0.35, 255, 255, 255, 150 );
|
||||
UIHelper.drawRectangle(x - 0.1, y + 0.1, z + 0.65, x, y + 0.1, z + 1.0, 255, 255, 255, 150 );
|
||||
UIHelper.drawRectangle(x + 1.0, y + 0.1, z, x + 1.1, y + 0.1, z + 0.35, 255, 255, 255, 150 );
|
||||
UIHelper.drawRectangle(x + 1.0, y + 0.1, z + 0.65, x + 1.1, y + 0.1, z + 1.0, 255, 255, 255, 150 );
|
||||
|
||||
UIHelper.drawRectangle(x - 0.1, y + 0.1, z - 0.1, x + 0.35, y + 0.1, z + 0.1, 255, 255, 255, 150 );
|
||||
UIHelper.drawRectangle(x + 0.65, y + 0.1, z - 0.1, x + 1.1, y + 0.1, z + 0.1, 255, 255, 255, 150 );
|
||||
UIHelper.drawRectangle(x - 0.1, y + 0.1, z + 1.0, x + 0.35, y + 0.1, z + 1.1, 255, 255, 255, 150 );
|
||||
UIHelper.drawRectangle(x + 0.65, y + 0.1, z + 1.0, x + 1.1, y + 0.1, z + 1.1, 255, 255, 255, 150 );
|
||||
break;
|
||||
case EAST:
|
||||
UIHelper.drawRectangleEW(x + 0.9, y, z - 0.1, x + 0.9, y + 0.35, z, 255, 255, 255, 150 );
|
||||
UIHelper.drawRectangleEW(x + 0.9, y + 0.65, z - 0.1, x + 0.9, y + 1.0, z, 255, 255, 255, 150 );
|
||||
UIHelper.drawRectangleEW(x + 0.9, y, z + 1.0, x + 0.9, y + 0.35, z + 1.1, 255, 255, 255, 150 );
|
||||
UIHelper.drawRectangleEW(x + 0.9, y + 0.65, z + 1.0, x + 0.9, y + 1.0, z + 1.1, 255, 255, 255, 150 );
|
||||
|
||||
UIHelper.drawRectangleEW(x + 0.9, y - 0.1, z - 0.1, x + 0.9, y, z + 0.35, 255, 255, 255, 150 );
|
||||
UIHelper.drawRectangleEW(x + 0.9, y - 0.1, z + 0.65, x + 0.9, y, z + 1.1, 255, 255, 255, 150 );
|
||||
UIHelper.drawRectangleEW(x + 0.9, y + 1.0, z - 0.1, x + 0.9, y + 1.1, z + 0.35, 255, 255, 255, 150 );
|
||||
UIHelper.drawRectangleEW(x + 0.9, y + 1.0, z + 0.65, x + 0.9, y + 1.1, z + 1.1, 255, 255, 255, 150 );
|
||||
break;
|
||||
case NORTH:
|
||||
UIHelper.drawRectangle(x - 0.1, y, z + 0.1, x, y + 0.35, z + 0.1, 255, 255, 255, 150 );
|
||||
UIHelper.drawRectangle(x - 0.1, y + 0.65, z + 0.1, x, y + 1.0, z + 0.1, 255, 255, 255, 150 );
|
||||
UIHelper.drawRectangle(x + 1.0, y, z + 0.1, x + 1.1, y + 0.35, z + 0.1, 255, 255, 255, 150 );
|
||||
UIHelper.drawRectangle(x + 1.0, y + 0.65, z + 0.1, x + 1.1, y + 1.0, z + 0.1, 255, 255, 255, 150 );
|
||||
|
||||
UIHelper.drawRectangle(x - 0.1, y - 0.1, z + 0.1, x + 0.35, y, z + 0.1, 255, 255, 255, 150 );
|
||||
UIHelper.drawRectangle(x + 0.65, y - 0.1, z + 0.1, x + 1.1, y, z + 0.1, 255, 255, 255, 150 );
|
||||
UIHelper.drawRectangle(x - 0.1, y + 1.0, z + 0.1, x + 0.35, y + 1.1, z + 0.1, 255, 255, 255, 150 );
|
||||
UIHelper.drawRectangle(x + 0.65, y + 1.0, z + 0.1, x + 1.1, y + 1.1, z + 0.1, 255, 255, 255, 150 );
|
||||
break;
|
||||
case SOUTH:
|
||||
UIHelper.drawRectangle(x, y, z + 0.9, x - 0.1, y + 0.35, z + 0.9, 255, 255, 255, 150 );
|
||||
UIHelper.drawRectangle(x, y + 0.65, z + 0.9, x - 0.1, y + 1.0, z + 0.9, 255, 255, 255, 150 );
|
||||
UIHelper.drawRectangle(x + 1.1, y, z + 0.9, x + 1.0, y + 0.35, z + 0.9, 255, 255, 255, 150 );
|
||||
UIHelper.drawRectangle(x + 1.1, y + 0.65, z + 0.9, x + 1.0, y + 1.0, z + 0.9, 255, 255, 255, 150 );
|
||||
|
||||
UIHelper.drawRectangle(x + 0.35, y - 0.1, z + 0.9, x - 0.1, y, z + 0.9, 255, 255, 255, 150 );
|
||||
UIHelper.drawRectangle(x + 1.10, y - 0.1, z + 0.9, x + 0.65, y, z + 0.9, 255, 255, 255, 150 );
|
||||
UIHelper.drawRectangle(x + 0.35, y + 1.0, z + 0.9, x - 0.1, y + 1.1, z + 0.9, 255, 255, 255, 150 );
|
||||
UIHelper.drawRectangle(x + 1.1, y + 1.0, z + 0.9, x + 0.65, y + 1.1, z + 0.9, 255, 255, 255, 150 );
|
||||
break;
|
||||
case UP:
|
||||
UIHelper.drawRectangle(x, y + 0.9, z, x - 0.1, y + 0.9, z + 0.35, 255, 255, 255, 150 );
|
||||
UIHelper.drawRectangle(x, y + 0.9, z + 0.65, x - 0.1, y + 0.9, z + 1.0, 255, 255, 255, 150 );
|
||||
UIHelper.drawRectangle(x + 1.1, y + 0.9, z, x + 1.0, y + 0.9, z + 0.35, 255, 255, 255, 150 );
|
||||
UIHelper.drawRectangle(x + 1.1, y + 0.9, z + 0.65, x + 1.0, y + 0.9, z + 1.0, 255, 255, 255, 150 );
|
||||
|
||||
UIHelper.drawRectangle(x + 0.35, y + 0.9, z - 0.1, x - 0.1, y + 0.9, z + 0.1, 255, 255, 255, 150 );
|
||||
UIHelper.drawRectangle(x + 1.1, y + 0.9, z - 0.1, x + 0.65, y + 0.9, z + 0.1, 255, 255, 255, 150 );
|
||||
UIHelper.drawRectangle(x +0.35, y + 0.9, z + 1.0, x - 0.1, y + 0.9, z + 1.1, 255, 255, 255, 150 );
|
||||
UIHelper.drawRectangle(x + 1.1, y + 0.9, z + 1.0, x + 0.65, y + 0.9, z + 1.1, 255, 255, 255, 150 );
|
||||
|
||||
break;
|
||||
case WEST:
|
||||
UIHelper.drawRectangleEW(x + 0.1, y+ 0.35, z - 0.1, x + 0.1, y , z, 255, 255, 255, 150 );
|
||||
UIHelper.drawRectangleEW(x + 0.1, y + 1.0, z - 0.1, x + 0.1, y + 0.65, z, 255, 255, 255, 150 );
|
||||
UIHelper.drawRectangleEW(x + 0.1, y + 0.35, z + 1.0, x + 0.1, y, z + 1.1, 255, 255, 255, 150 );
|
||||
UIHelper.drawRectangleEW(x + 0.1, y + 1.0, z + 1.0, x + 0.1, y + 0.65, z + 1.1, 255, 255, 255, 150 );
|
||||
|
||||
UIHelper.drawRectangleEW(x + 0.1, y, z - 0.1, x + 0.1, y - 0.1, z + 0.35, 255, 255, 255, 150 );
|
||||
UIHelper.drawRectangleEW(x + 0.1, y, z + 0.65, x + 0.1, y - 0.1, z + 1.1, 255, 255, 255, 150 );
|
||||
UIHelper.drawRectangleEW(x + 0.1, y + 1.1, z - 0.1, x + 0.1, y + 1.0, z + 0.35, 255, 255, 255, 150 );
|
||||
UIHelper.drawRectangleEW(x + 0.1, y + 1.1, z + 0.65, x + 0.1, y + 1.0, z + 1.1, 255, 255, 255, 150 );
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
package mcp.mobius.waila.addons.projectred;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaFMPAccessor;
|
||||
import mcp.mobius.waila.api.IWailaFMPProvider;
|
||||
import mcp.mobius.waila.utils.NBTUtil;
|
||||
import static mcp.mobius.waila.api.SpecialChars.*;
|
||||
|
||||
public class HUDFMPGateLogic implements IWailaFMPProvider {
|
||||
|
||||
@Override
|
||||
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaFMPAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaFMPAccessor accessor, IWailaConfigHandler config) {
|
||||
if (!config.getConfig("pr.showdata")) return currenttip;
|
||||
|
||||
int orient = 0;
|
||||
int subID = 0;
|
||||
int shape = 0;
|
||||
int pmax = 0;
|
||||
int val = 0;
|
||||
int max = 0;
|
||||
int dec = 0;
|
||||
int inc = 0;
|
||||
|
||||
orient = NBTUtil.getNBTInteger(accessor.getNBTData(), "orient");
|
||||
subID = NBTUtil.getNBTInteger(accessor.getNBTData(), "subID");
|
||||
shape = NBTUtil.getNBTInteger(accessor.getNBTData(), "shape");
|
||||
|
||||
if (subID == 17)
|
||||
pmax = NBTUtil.getNBTInteger(accessor.getNBTData(), "pmax");
|
||||
|
||||
if (subID == 19){
|
||||
val = NBTUtil.getNBTInteger(accessor.getNBTData(), "val");
|
||||
max = NBTUtil.getNBTInteger(accessor.getNBTData(), "max");
|
||||
dec = NBTUtil.getNBTInteger(accessor.getNBTData(), "dec");
|
||||
inc = NBTUtil.getNBTInteger(accessor.getNBTData(), "inc");
|
||||
}
|
||||
|
||||
switch(subID){
|
||||
case 10:
|
||||
currenttip.add(String.format("[Repeater]" + TAB + ALIGNRIGHT + WHITE + "%d" + GRAY + " ticks", (int)Math.pow(2, shape)));
|
||||
break;
|
||||
|
||||
case 15:
|
||||
if (shape == 0)
|
||||
currenttip.add("[Sensor]" + TAB + ALIGNRIGHT + WHITE + "Open");
|
||||
if (shape == 1)
|
||||
currenttip.add("[Sensor]" + TAB + ALIGNRIGHT + WHITE + "Half closed");
|
||||
if (shape == 2)
|
||||
currenttip.add("[Sensor]" + TAB + ALIGNRIGHT + WHITE + "Closed");
|
||||
break;
|
||||
|
||||
case 17:
|
||||
currenttip.add(String.format("[Timer delay]" + TAB + ALIGNRIGHT + WHITE + "%d " + GRAY + "ms", (pmax + 2) * 50));
|
||||
break;
|
||||
|
||||
case 19:
|
||||
|
||||
|
||||
currenttip.add(String.format("[Counter value]"+ TAB + ALIGNRIGHT + WHITE + "%d " + GRAY + "/ " + WHITE + "%d", val, max));
|
||||
currenttip.add(String.format("[Counter step]" + TAB + ALIGNRIGHT + WHITE + "-%d " + GRAY + "/ " + WHITE + "+%d", dec, inc));
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaFMPAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package mcp.mobius.waila.addons.projectred;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraftforge.common.Configuration;
|
||||
import mcp.mobius.waila.Waila;
|
||||
import mcp.mobius.waila.api.impl.ModuleRegistrar;
|
||||
|
||||
public class ProjectRedModule {
|
||||
|
||||
public static void register(){
|
||||
try{
|
||||
Class ModClass = Class.forName("mrtjp.projectred.ProjectRedIntegration");
|
||||
Waila.log.log(Level.INFO, "ProjectRed|Integration mod found.");
|
||||
} catch (ClassNotFoundException e){
|
||||
Waila.log.log(Level.INFO, "[ProjectRed] ProjectRed|Integration mod not found.");
|
||||
return;
|
||||
}
|
||||
|
||||
ModuleRegistrar.instance().addConfigRemote("Project:Red", "pr.showio");
|
||||
ModuleRegistrar.instance().addConfigRemote("Project:Red", "pr.showdata");
|
||||
|
||||
ModuleRegistrar.instance().registerBodyProvider(new HUDFMPGateLogic(), "pr_sgate");
|
||||
ModuleRegistrar.instance().registerBodyProvider(new HUDFMPGateLogic(), "pr_igate");
|
||||
ModuleRegistrar.instance().registerBodyProvider(new HUDFMPGateLogic(), "pr_tgate");
|
||||
ModuleRegistrar.instance().registerBodyProvider(new HUDFMPGateLogic(), "pr_bgate");
|
||||
ModuleRegistrar.instance().registerBodyProvider(new HUDFMPGateLogic(), "pr_agate");
|
||||
ModuleRegistrar.instance().registerBodyProvider(new HUDFMPGateLogic(), "pr_rgate");
|
||||
|
||||
ModuleRegistrar.instance().registerDecorator(new HUDDecoratorRsGateLogic(), "pr_sgate");
|
||||
ModuleRegistrar.instance().registerDecorator(new HUDDecoratorRsGateLogic(), "pr_igate");
|
||||
ModuleRegistrar.instance().registerDecorator(new HUDDecoratorRsGateLogic(), "pr_tgate");
|
||||
ModuleRegistrar.instance().registerDecorator(new HUDDecoratorRsGateLogic(), "pr_bgate");
|
||||
ModuleRegistrar.instance().registerDecorator(new HUDDecoratorRsGateLogic(), "pr_agate");
|
||||
ModuleRegistrar.instance().registerDecorator(new HUDDecoratorRsGateLogic(), "pr_rgate");
|
||||
|
||||
//ModuleRegistrar.instance().registerBlockDecorator(new HUDDecoratorRsGateLogic(), BlockMultipart);
|
||||
//ModuleRegistrar.instance().registerBodyProvider(new HUDHandlerRsGateLogic(), BlockMultipart);
|
||||
//ModuleRegistrar.instance().registerSyncedNBTKey("*", BlockMultipart);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
package mcp.mobius.waila.addons.railcraft;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.List;
|
||||
|
||||
import codechicken.lib.lang.LangUtil;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.IFluidTank;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
import mcp.mobius.waila.utils.WailaExceptionHandler;
|
||||
|
||||
public class HUDHandlerTank implements IWailaDataProvider {
|
||||
|
||||
@Override
|
||||
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
if (!config.getConfig("railcraft.fluidamount")) return currenttip;
|
||||
try {
|
||||
IFluidTank tank = (IFluidTank)RailcraftModule.ITankTile_getTank.invoke(RailcraftModule.ITankTile.cast(accessor.getTileEntity()));
|
||||
if (tank == null) return currenttip;
|
||||
|
||||
FluidStack fluid = tank.getFluid();
|
||||
|
||||
String name = currenttip.get(0);
|
||||
|
||||
try{
|
||||
name += String.format(" < %s >", fluid.getFluid().getLocalizedName());
|
||||
} catch (NullPointerException f){
|
||||
name += " " + LangUtil.translateG("hud.msg.empty");
|
||||
}
|
||||
|
||||
currenttip.set(0, name);
|
||||
|
||||
} catch (Exception e){
|
||||
currenttip = WailaExceptionHandler.handleErr(e, accessor.getTileEntity().getClass().getName(), currenttip);
|
||||
}
|
||||
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
if (!config.getConfig("railcraft.fluidamount")) return currenttip;
|
||||
|
||||
try {
|
||||
IFluidTank tank = (IFluidTank)RailcraftModule.ITankTile_getTank.invoke(RailcraftModule.ITankTile.cast(accessor.getTileEntity()));
|
||||
if (tank == null) return currenttip;
|
||||
|
||||
FluidStack fluid = tank.getFluid();
|
||||
if (fluid != null)
|
||||
currenttip.add(String.format("%d / %d mB", fluid.amount, tank.getInfo().capacity));
|
||||
else
|
||||
currenttip.add(String.format("0 / %d mB", tank.getInfo().capacity));
|
||||
|
||||
} catch (Exception e){
|
||||
currenttip = WailaExceptionHandler.handleErr(e, accessor.getTileEntity().getClass().getName(), currenttip);
|
||||
}
|
||||
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
package mcp.mobius.waila.addons.railcraft;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import mcp.mobius.waila.Waila;
|
||||
import mcp.mobius.waila.api.impl.ModuleRegistrar;
|
||||
|
||||
public class RailcraftModule {
|
||||
public static Class TileTankBase = null;
|
||||
public static Class ITankTile = null;
|
||||
public static Method ITankTile_getTank = null;
|
||||
//public static Class StandardTank = null;
|
||||
|
||||
public static void register(){
|
||||
try{
|
||||
Class ModRailcraft = Class.forName("mods.railcraft.common.core.Railcraft");
|
||||
Waila.log.log(Level.INFO, "Railcraft mod found.");
|
||||
} catch (ClassNotFoundException e){
|
||||
Waila.log.log(Level.INFO, "[Railcraft] Railcraft mod not found.");
|
||||
return;
|
||||
}
|
||||
|
||||
try{
|
||||
TileTankBase = Class.forName("mods.railcraft.common.blocks.machine.beta.TileTankBase");
|
||||
ITankTile = Class.forName("mods.railcraft.common.blocks.machine.ITankTile");
|
||||
ITankTile_getTank = ITankTile.getMethod("getTank");
|
||||
//StandardTank = Class.forName("mods.railcraft.common.fluids.tanks.StandardTank");
|
||||
|
||||
} catch (ClassNotFoundException e){
|
||||
Waila.log.log(Level.WARNING, "[Railcraft] Class not found. " + e);
|
||||
return;
|
||||
} catch (NoSuchMethodException e){
|
||||
Waila.log.log(Level.WARNING, "[Railcraft] Method not found." + e);
|
||||
return;
|
||||
}
|
||||
|
||||
ModuleRegistrar.instance().addConfigRemote("Railcraft", "railcraft.fluidamount");
|
||||
ModuleRegistrar.instance().registerBodyProvider(new HUDHandlerTank(), TileTankBase);
|
||||
ModuleRegistrar.instance().registerHeadProvider(new HUDHandlerTank(), TileTankBase);
|
||||
ModuleRegistrar.instance().registerSyncedNBTKey("*", TileTankBase);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
package mcp.mobius.waila.addons.secretrooms;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
|
||||
public class HUDTileEntityCamo implements IWailaDataProvider {
|
||||
|
||||
@Override
|
||||
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
|
||||
if (!config.getConfig("secretrooms.hide")) return null;
|
||||
|
||||
if ( SecretRoomsModule.BlockCamoTrapDoor.isInstance(accessor.getBlock()) ){
|
||||
return this.getTrapDoorBlock(accessor);
|
||||
|
||||
}
|
||||
|
||||
else if ( SecretRoomsModule.BlockTorchLever.isInstance(accessor.getBlock()) ){
|
||||
return new ItemStack(Block.torchWood);
|
||||
}
|
||||
|
||||
else if (accessor.getNBTData() != null){
|
||||
NBTTagCompound tag = accessor.getNBTData();
|
||||
|
||||
if (tag.hasKey("copyID") && tag.hasKey("copyMeta")){
|
||||
int copyID = accessor.getNBTInteger(tag, "copyID");
|
||||
int copyMeta = accessor.getNBTInteger(tag, "copyMeta");
|
||||
return new ItemStack(copyID, 1, copyMeta);
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
private ItemStack getTrapDoorBlock(IWailaDataAccessor accessor){
|
||||
// modify coordinates to get hinge Block.
|
||||
int i = accessor.getMetadata();
|
||||
int j = accessor.getPosition().blockX;
|
||||
int k = accessor.getPosition().blockZ;
|
||||
|
||||
if ((i & 3) == 0)
|
||||
{
|
||||
k++;
|
||||
}
|
||||
|
||||
if ((i & 3) == 1)
|
||||
{
|
||||
k--;
|
||||
}
|
||||
|
||||
if ((i & 3) == 2)
|
||||
{
|
||||
j++;
|
||||
}
|
||||
|
||||
if ((i & 3) == 3)
|
||||
{
|
||||
j--;
|
||||
}
|
||||
|
||||
int blockID = accessor.getWorld().getBlockId(j, accessor.getPosition().blockY, k);
|
||||
int blockMeta = accessor.getWorld().getBlockMetadata(j, accessor.getPosition().blockY, k);
|
||||
|
||||
return new ItemStack(blockID, 1, blockMeta);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package mcp.mobius.waila.addons.secretrooms;
|
||||
|
||||
import java.util.logging.Level;
|
||||
|
||||
import mcp.mobius.waila.Waila;
|
||||
import mcp.mobius.waila.api.impl.ModuleRegistrar;
|
||||
|
||||
public class SecretRoomsModule {
|
||||
|
||||
public static Class TileEntityCamo = null;
|
||||
public static Class BlockTorchLever = null;
|
||||
public static Class BlockCamoTrapDoor = null;
|
||||
|
||||
public static void register(){
|
||||
try{
|
||||
Class SecretRooms = Class.forName("com.github.AbrarSyed.secretroomsmod.common.SecretRooms");
|
||||
Waila.log.log(Level.INFO, "SecretRooms mod found.");
|
||||
} catch (ClassNotFoundException e){
|
||||
Waila.log.log(Level.INFO, "[SecretRooms] SecretRooms mod not found.");
|
||||
return;
|
||||
}
|
||||
|
||||
try{
|
||||
TileEntityCamo = Class.forName("com.github.AbrarSyed.secretroomsmod.blocks.TileEntityCamo");
|
||||
BlockTorchLever = Class.forName("com.github.AbrarSyed.secretroomsmod.blocks.BlockTorchLever");
|
||||
BlockCamoTrapDoor = Class.forName("com.github.AbrarSyed.secretroomsmod.blocks.BlockCamoTrapDoor");
|
||||
|
||||
} catch (ClassNotFoundException e){
|
||||
Waila.log.log(Level.WARNING, "[SecretRooms] Class not found. " + e);
|
||||
return;
|
||||
} catch (Exception e) {
|
||||
Waila.log.log(Level.WARNING, "[SecretRooms] Error while loading module. " + e);
|
||||
return;
|
||||
}
|
||||
|
||||
ModuleRegistrar.instance().addConfig("SecretRooms", "secretrooms.hide");
|
||||
ModuleRegistrar.instance().registerStackProvider(new HUDTileEntityCamo(), TileEntityCamo);
|
||||
ModuleRegistrar.instance().registerStackProvider(new HUDTileEntityCamo(), BlockTorchLever);
|
||||
ModuleRegistrar.instance().registerStackProvider(new HUDTileEntityCamo(), BlockCamoTrapDoor);
|
||||
ModuleRegistrar.instance().registerSyncedNBTKey("copyID", TileEntityCamo);
|
||||
ModuleRegistrar.instance().registerSyncedNBTKey("copyMeta", TileEntityCamo);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
package mcp.mobius.waila.addons.statues;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
import mcp.mobius.waila.utils.WailaExceptionHandler;
|
||||
import static mcp.mobius.waila.api.SpecialChars.*;
|
||||
|
||||
public class HUDHandlerStatues implements IWailaDataProvider {
|
||||
|
||||
@Override
|
||||
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
|
||||
try {
|
||||
String skinName = (String)StatuesModule.skinName.get(accessor.getTileEntity());
|
||||
if (skinName.equals("")){
|
||||
TileEntity belowEnt = accessor.getWorld().getBlockTileEntity(accessor.getPosition().blockX, accessor.getPosition().blockY - 1, accessor.getPosition().blockZ);
|
||||
if (StatuesModule.TileEntityStatue.isInstance(belowEnt))
|
||||
skinName = (String)StatuesModule.skinName.get(belowEnt);
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (skinName.equals("")){
|
||||
currenttip.clear();
|
||||
currenttip.add(WHITE + "Statue : Unknown");
|
||||
} else {
|
||||
currenttip.clear();
|
||||
currenttip.add(WHITE + "Statue : " + skinName);
|
||||
}
|
||||
|
||||
|
||||
} catch (Exception e) {
|
||||
currenttip = WailaExceptionHandler.handleErr(e, accessor.getTileEntity().getClass().getName(), currenttip);
|
||||
}
|
||||
|
||||
/*
|
||||
String skinName = accessor.getNBTData().getString("skin");
|
||||
if (skinName.equals("")){
|
||||
if (accessor.getWorld().getBlockTileEntity(accessor.getPosition().blockX, accessor.getPosition().blockY - 1, accessor.getPosition().blockZ) != null){
|
||||
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
currenttip.add(BLUE + ITALIC + "Statues" );
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package mcp.mobius.waila.addons.statues;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import mcp.mobius.waila.Waila;
|
||||
import mcp.mobius.waila.api.impl.ModuleRegistrar;
|
||||
|
||||
public class StatuesModule {
|
||||
|
||||
public static Class TileEntityStatue = null;
|
||||
public static Field skinName = null;
|
||||
|
||||
public static void register(){
|
||||
try{
|
||||
Class Statues = Class.forName("info.jbcs.minecraft.statues.Statues");
|
||||
Waila.log.log(Level.INFO, "Statues mod found.");
|
||||
} catch (ClassNotFoundException e){
|
||||
Waila.log.log(Level.INFO, "[Statues] Statues mod not found.");
|
||||
return;
|
||||
}
|
||||
|
||||
try{
|
||||
TileEntityStatue = Class.forName("info.jbcs.minecraft.statues.TileEntityStatue");
|
||||
skinName = TileEntityStatue.getDeclaredField("skinName");
|
||||
} catch (ClassNotFoundException e){
|
||||
Waila.log.log(Level.WARNING, "[Statues] Class not found. " + e);
|
||||
return;
|
||||
} catch (NoSuchFieldException e){
|
||||
Waila.log.log(Level.WARNING, "[Statues] Class not found. " + e);
|
||||
return;
|
||||
}
|
||||
|
||||
ModuleRegistrar.instance().registerHeadProvider(new HUDHandlerStatues(), TileEntityStatue);
|
||||
ModuleRegistrar.instance().registerTailProvider(new HUDHandlerStatues(), TileEntityStatue);
|
||||
ModuleRegistrar.instance().registerSyncedNBTKey("*", TileEntityStatue);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,150 @@
|
||||
package mcp.mobius.waila.addons.stevescarts;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import codechicken.lib.math.MathHelper;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
import mcp.mobius.waila.utils.WailaExceptionHandler;
|
||||
import static mcp.mobius.waila.api.SpecialChars.*;
|
||||
|
||||
public class HUDCargoManager implements IWailaDataProvider {
|
||||
|
||||
private static String colors[] = {"NA", "Red", "Blue", "Yellow", "Green", "Dis."};
|
||||
private static String sides[] = {"Yellow", "Blue", "Green", "Red"};
|
||||
|
||||
@Override
|
||||
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
if (!config.getConfig("stevescarts.showall")) return currenttip;
|
||||
if (config.getConfig("stevescarts.shifttoggle") && !accessor.getPlayer().isSneaking()){
|
||||
currenttip.add(ITALIC + "Press shift for more data");
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
NBTTagCompound tag = accessor.getNBTData();
|
||||
|
||||
if (config.getConfig("stevescarts.colorblind")){
|
||||
int side = accessor.getSide().ordinal() - 2;
|
||||
if (side >= 0)
|
||||
currenttip.add("Looking at side " + WHITE + sides[side]);
|
||||
}
|
||||
|
||||
int layout = accessor.getNBTInteger(tag, "layout");
|
||||
switch(layout){
|
||||
case 0:
|
||||
currenttip.add("Slots : "+ WHITE + "Shared");
|
||||
break;
|
||||
case 1:
|
||||
currenttip.add("Slots : "+ WHITE + "By side");
|
||||
break;
|
||||
case 2:
|
||||
currenttip.add("Slots : "+ WHITE + "By color");
|
||||
break;
|
||||
}
|
||||
|
||||
try{
|
||||
ArrayList<Object> itemSelection = (ArrayList<Object>) StevesCartsModule.ItemSelections.get(accessor.getTileEntity());
|
||||
|
||||
int toCart = accessor.getNBTInteger(tag, "tocart");
|
||||
int doReturn = accessor.getNBTInteger(tag, "doReturn");
|
||||
|
||||
for (int i = 0; i < 4; i++){
|
||||
int target = accessor.getNBTInteger(tag, "target" + String.valueOf(i));
|
||||
int color = accessor.getNBTInteger(tag, "color" + String.valueOf(i));
|
||||
int amount = accessor.getNBTInteger(tag, "amount" + String.valueOf(i));
|
||||
if (color == 5) continue;
|
||||
|
||||
|
||||
String direction = (toCart & (1 << i)) != 0 ? "Load" : "Unload";
|
||||
String shouldReturn = (doReturn & (1 << i)) != 0 ? "Ret." : "Cont.";
|
||||
String sAmount = amount == 0 ? "All" : String.valueOf(this.getAmount(amount) + " " + this.getAmountType(amount));
|
||||
|
||||
String selection = (String) StevesCartsModule.GetSelectionName.invoke(StevesCartsModule.CargoItemSelection.cast(itemSelection.get(target)));
|
||||
currenttip.add(String.format("Side %s %s[ %s ]%s[ %s , %s]%s[ %s ]", WHITE + colors[color] + GRAY,
|
||||
TAB + ALIGNRIGHT, WHITE + selection + GRAY,
|
||||
TAB + ALIGNRIGHT, WHITE + direction + GRAY,
|
||||
TAB + ALIGNRIGHT + WHITE + shouldReturn + GRAY,
|
||||
TAB + ALIGNRIGHT, WHITE + sAmount + GRAY));
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
currenttip = WailaExceptionHandler.handleErr(e, accessor.getTileEntity().getClass().getName(), currenttip);
|
||||
}
|
||||
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
public int getAmount(int id)
|
||||
{
|
||||
switch (id)
|
||||
{
|
||||
case 1:
|
||||
return 1;
|
||||
|
||||
case 2:
|
||||
return 3;
|
||||
|
||||
case 3:
|
||||
return 8;
|
||||
|
||||
case 4:
|
||||
return 16;
|
||||
|
||||
case 5:
|
||||
return 32;
|
||||
|
||||
case 6:
|
||||
return 64;
|
||||
|
||||
case 7:
|
||||
return 1;
|
||||
|
||||
case 8:
|
||||
return 2;
|
||||
|
||||
case 9:
|
||||
return 3;
|
||||
|
||||
case 10:
|
||||
return 5;
|
||||
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
//0 - MAX
|
||||
//1 - Items
|
||||
//2 - Stacks
|
||||
public String getAmountType(int id)
|
||||
{
|
||||
if (id <= 6)
|
||||
{
|
||||
return "I";
|
||||
}
|
||||
else
|
||||
{
|
||||
return "S";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
package mcp.mobius.waila.addons.stevescarts;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
import mcp.mobius.waila.utils.WailaExceptionHandler;
|
||||
import static mcp.mobius.waila.api.SpecialChars.*;
|
||||
|
||||
public class HUDCartAssembler implements IWailaDataProvider {
|
||||
|
||||
@Override
|
||||
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
if (!config.getConfig("stevescarts.showall")) return currenttip;
|
||||
if (config.getConfig("stevescarts.shifttoggle") && !accessor.getPlayer().isSneaking()){
|
||||
currenttip.add(ITALIC + "Press shift for more data");
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
int currTime = accessor.getNBTInteger(accessor.getNBTData(), "currentTime");
|
||||
int maxTime = accessor.getNBTInteger(accessor.getNBTData(), "maxTime");
|
||||
int isAssembling = accessor.getNBTInteger(accessor.getNBTData(), "isAssembling");
|
||||
NBTTagList slots = accessor.getNBTData().getTagList("Items");
|
||||
boolean hasOutput = false;
|
||||
Item ItemCartModule = null;
|
||||
try {
|
||||
ItemCartModule = (Item)StevesCartsModule.ItemCartModule.get(null);
|
||||
} catch (Exception e) {
|
||||
currenttip = WailaExceptionHandler.handleErr(e, accessor.getTileEntity().getClass().getName(), currenttip);
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
for (int i = 0; i < slots.tagCount(); i++){
|
||||
NBTTagCompound subtag = (NBTTagCompound)(slots.tagAt(i));
|
||||
byte slot = subtag.getByte("Slot");
|
||||
if (slot == 30)
|
||||
hasOutput = true;
|
||||
}
|
||||
|
||||
if (isAssembling == 1){
|
||||
currenttip.add(String.format("Time remaining : %.1f sec", (maxTime - currTime) / 20.0f));
|
||||
|
||||
NBTTagCompound output = accessor.getNBTData().getCompoundTag("Output");
|
||||
short outID = output.getShort("id");
|
||||
byte[] metas = output.getCompoundTag("tag").getByteArray("Modules");
|
||||
|
||||
for (byte b : metas){
|
||||
currenttip.add(new ItemStack(ItemCartModule, 1, b).getDisplayName());
|
||||
}
|
||||
}
|
||||
else
|
||||
if (hasOutput)
|
||||
currenttip.add(String.format("Time remaining : <Done>"));
|
||||
else
|
||||
currenttip.add(String.format("Time remaining : <Idle>"));
|
||||
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
package mcp.mobius.waila.addons.stevescarts;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
import static mcp.mobius.waila.api.SpecialChars.*;
|
||||
|
||||
|
||||
public class HUDLiquidManager implements IWailaDataProvider {
|
||||
|
||||
private static String colors[] = {"NA", "Red", "Blue", "Yellow", "Green", "Dis."};
|
||||
private static String sides[] = {"Yellow", "Blue", "Green", "Red"};
|
||||
|
||||
@Override
|
||||
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
if (!config.getConfig("stevescarts.showall")) return currenttip;
|
||||
if (config.getConfig("stevescarts.shifttoggle") && !accessor.getPlayer().isSneaking()){
|
||||
currenttip.add(ITALIC + "Press shift for more data");
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
NBTTagCompound tag = accessor.getNBTData();
|
||||
|
||||
if (config.getConfig("stevescarts.colorblind")){
|
||||
int side = accessor.getSide().ordinal() - 2;
|
||||
if (side >= 0)
|
||||
currenttip.add("Looking at side " + WHITE + sides[side]);
|
||||
}
|
||||
|
||||
int layout = accessor.getNBTInteger(tag, "layout");
|
||||
switch(layout){
|
||||
case 0:
|
||||
currenttip.add("Tanks : "+ WHITE + "Shared");
|
||||
break;
|
||||
case 1:
|
||||
currenttip.add("Tanks : "+ WHITE + "By side");
|
||||
break;
|
||||
case 2:
|
||||
currenttip.add("Tanks : "+ WHITE + "By color");
|
||||
break;
|
||||
}
|
||||
|
||||
int toCart = accessor.getNBTInteger(tag, "tocart");
|
||||
int doReturn = accessor.getNBTInteger(tag, "doReturn");
|
||||
|
||||
for (int i = 0; i < 4; i++){
|
||||
int target = accessor.getNBTInteger(tag, "target" + String.valueOf(i));
|
||||
int color = accessor.getNBTInteger(tag, "color" + String.valueOf(i));
|
||||
int amount = accessor.getNBTInteger(tag, "amount" + String.valueOf(i));
|
||||
|
||||
String fluidName = "<Empty>";
|
||||
int fluidAmount = 0;
|
||||
if (tag.hasKey("Fluid" + i)){
|
||||
fluidName = tag.getCompoundTag("Fluid" + i).getString("FluidName");
|
||||
fluidAmount = tag.getCompoundTag("Fluid" + i).getInteger("Amount");
|
||||
}
|
||||
|
||||
String fluidString = fluidAmount == 0 ? "<Empty>" : String.format("%s mB of %s", fluidAmount, fluidName);
|
||||
|
||||
if (color == 5) continue;
|
||||
|
||||
|
||||
String direction = (toCart & (1 << i)) != 0 ? "Load" : "Unload";
|
||||
String shouldReturn = (doReturn & (1 << i)) != 0 ? "Ret." : "Cont.";
|
||||
String sAmount = amount == 0 ? "All" : String.valueOf(this.getMaxAmountBuckets(amount)) + " mB";
|
||||
|
||||
//String selection = (String) StevesCartsModule.GetSelectionName.invoke(StevesCartsModule.CargoItemSelection.cast(itemSelection.get(target)));
|
||||
currenttip.add(String.format("Side %s %s[ %s ]%s[ %s , %s]%s[ %s ]", WHITE + colors[color] + GRAY,
|
||||
TAB + ALIGNRIGHT, WHITE + fluidString + GRAY,
|
||||
TAB + ALIGNRIGHT, WHITE + direction + GRAY,
|
||||
TAB + ALIGNRIGHT + WHITE + shouldReturn + GRAY,
|
||||
TAB + ALIGNRIGHT, WHITE + sAmount + GRAY));
|
||||
|
||||
|
||||
}
|
||||
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
public int getMaxAmountBuckets(int id) {
|
||||
switch(id) {
|
||||
case 1:
|
||||
return 250;
|
||||
case 2:
|
||||
return 500;
|
||||
case 3:
|
||||
return 750;
|
||||
case 4:
|
||||
return 1000;
|
||||
case 5:
|
||||
return 2000;
|
||||
case 6:
|
||||
return 3000;
|
||||
case 7:
|
||||
return 5000;
|
||||
case 8:
|
||||
return 7500;
|
||||
case 9:
|
||||
return 10000;
|
||||
case 10:
|
||||
return 15000;
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
package mcp.mobius.waila.addons.stevescarts;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaEntityAccessor;
|
||||
import mcp.mobius.waila.api.IWailaEntityProvider;
|
||||
import mcp.mobius.waila.utils.WailaExceptionHandler;
|
||||
import static mcp.mobius.waila.api.SpecialChars.*;
|
||||
|
||||
public class HUDMinecartModular implements IWailaEntityProvider {
|
||||
|
||||
@Override
|
||||
public Entity getWailaOverride(IWailaEntityAccessor accessor, IWailaConfigHandler config) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaHead(Entity entity, List<String> currenttip, IWailaEntityAccessor accessor, IWailaConfigHandler config) {
|
||||
if (currenttip.get(0).contains("entity.StevesCarts.Minecart")){
|
||||
currenttip.remove(0);
|
||||
currenttip.add(WHITE + "Modular Minecart");
|
||||
}
|
||||
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaBody(Entity entity, List<String> currenttip, IWailaEntityAccessor accessor, IWailaConfigHandler config) {
|
||||
if (!config.getConfig("stevescarts.showall")) return currenttip;
|
||||
if (config.getConfig("stevescarts.shifttoggle") && !accessor.getPlayer().isSneaking()){
|
||||
currenttip.add(ITALIC + "Press shift for more data");
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
Item ItemCartModule = null;
|
||||
try {
|
||||
ItemCartModule = (Item)StevesCartsModule.ItemCartModule.get(null);
|
||||
} catch (Exception e) {
|
||||
currenttip = WailaExceptionHandler.handleErr(e, accessor.getEntity().getClass().getName(), currenttip);
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
NBTTagCompound tag = accessor.getNBTData();
|
||||
if (tag.hasKey("Modules")){
|
||||
byte[] metas = tag.getByteArray("Modules");
|
||||
|
||||
for (int i = 0; i < metas.length; i++){
|
||||
if (tag.hasKey("module" + String.valueOf(i) + "Fuel")){
|
||||
|
||||
int fuel = accessor.getNBTInteger(tag, "module" + String.valueOf(i) + "Fuel");
|
||||
currenttip.add(new ItemStack(ItemCartModule, 1, metas[i]).getDisplayName() + TAB + ALIGNRIGHT + " [ " + WHITE + fuel + GRAY + " POW ]");
|
||||
|
||||
} else if (tag.hasKey("module" + String.valueOf(i) + "Fluid")){
|
||||
|
||||
NBTTagCompound subtag = tag.getCompoundTag("module" + String.valueOf(i) + "Fluid");
|
||||
if (subtag.hasKey("Amount")){
|
||||
int amount = accessor.getNBTInteger(subtag, "Amount");
|
||||
String fluid = subtag.getString("FluidName");
|
||||
currenttip.add(new ItemStack(ItemCartModule, 1, metas[i]).getDisplayName() + TAB + ALIGNRIGHT + " [ " + WHITE + String.valueOf(amount) + GRAY + " mB of " + WHITE + fluid + GRAY + " ]");
|
||||
} else {
|
||||
currenttip.add(new ItemStack(ItemCartModule, 1, metas[i]).getDisplayName() + TAB + ALIGNRIGHT + " < " + WHITE + "Empty" + GRAY + " > ");
|
||||
}
|
||||
|
||||
}else{
|
||||
|
||||
currenttip.add(new ItemStack(ItemCartModule, 1, metas[i]).getDisplayName());
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaTail(Entity entity, List<String> currenttip, IWailaEntityAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
package mcp.mobius.waila.addons.stevescarts;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import mcp.mobius.waila.Waila;
|
||||
import mcp.mobius.waila.api.impl.ModuleRegistrar;
|
||||
|
||||
public class StevesCartsModule {
|
||||
|
||||
public static Class TileEntityCartAssembler = null;
|
||||
public static Class TileEntityCargo = null;
|
||||
public static Class TileEntityLiquid = null;
|
||||
public static Class MinecartModular = null;
|
||||
public static Class StevesItems = null;
|
||||
public static Class CargoItemSelection = null;
|
||||
|
||||
public static Field ItemCartComponent = null; //Items.component
|
||||
public static Field ItemCartModule = null; //Items.modules
|
||||
public static Field ItemSelections = null; //TileEntityCargo.itemSelections
|
||||
|
||||
public static Method GetSelectionName = null; // CargoItemSelection.getName
|
||||
|
||||
public static void register(){
|
||||
try{
|
||||
Class ModStevesCarts = Class.forName("vswe.stevescarts.StevesCarts");
|
||||
Waila.log.log(Level.INFO, "StevesCarts mod found.");
|
||||
} catch (ClassNotFoundException e){
|
||||
Waila.log.log(Level.INFO, "[StevesCarts] StevesCarts mod not found.");
|
||||
return;
|
||||
}
|
||||
|
||||
try{
|
||||
TileEntityCartAssembler = Class.forName("vswe.stevescarts.TileEntities.TileEntityCartAssembler");
|
||||
TileEntityCargo = Class.forName("vswe.stevescarts.TileEntities.TileEntityCargo");
|
||||
TileEntityLiquid = Class.forName("vswe.stevescarts.TileEntities.TileEntityLiquid");
|
||||
MinecartModular = Class.forName("vswe.stevescarts.Carts.MinecartModular");
|
||||
StevesItems = Class.forName("vswe.stevescarts.Items.Items");
|
||||
CargoItemSelection = Class.forName("vswe.stevescarts.Helpers.CargoItemSelection");
|
||||
|
||||
ItemCartComponent = StevesItems.getDeclaredField("component");
|
||||
ItemCartModule = StevesItems.getDeclaredField("modules");
|
||||
ItemSelections = TileEntityCargo.getDeclaredField("itemSelections");
|
||||
|
||||
GetSelectionName = CargoItemSelection.getDeclaredMethod("getName");
|
||||
|
||||
} catch (ClassNotFoundException e){
|
||||
Waila.log.log(Level.WARNING, "[StevesCarts] Class not found. " + e);
|
||||
return;
|
||||
} catch (NoSuchFieldException e) {
|
||||
Waila.log.log(Level.WARNING, "[StevesCarts] Field not found. " + e);
|
||||
return;
|
||||
} catch (NoSuchMethodException e) {
|
||||
Waila.log.log(Level.WARNING, "[StevesCarts] Method not found. " + e);
|
||||
return;
|
||||
} catch (Exception e) {
|
||||
Waila.log.log(Level.WARNING, "[StevesCarts] Error while loading module. " + e);
|
||||
return;
|
||||
}
|
||||
|
||||
ModuleRegistrar.instance().addConfigRemote("Steve's carts", "stevescarts.showall");
|
||||
ModuleRegistrar.instance().addConfigRemote("Steve's carts", "stevescarts.colorblind");
|
||||
ModuleRegistrar.instance().addConfigRemote("Steve's carts", "stevescarts.shifttoggle");
|
||||
|
||||
ModuleRegistrar.instance().registerBodyProvider(new HUDCartAssembler(), TileEntityCartAssembler);
|
||||
ModuleRegistrar.instance().registerBodyProvider(new HUDCargoManager(), TileEntityCargo);
|
||||
ModuleRegistrar.instance().registerBodyProvider(new HUDLiquidManager(), TileEntityLiquid);
|
||||
ModuleRegistrar.instance().registerHeadProvider(new HUDMinecartModular(), MinecartModular);
|
||||
ModuleRegistrar.instance().registerBodyProvider(new HUDMinecartModular(), MinecartModular);
|
||||
|
||||
ModuleRegistrar.instance().registerSyncedNBTKey("*", TileEntityCartAssembler);
|
||||
ModuleRegistrar.instance().registerSyncedNBTKey("*", MinecartModular);
|
||||
ModuleRegistrar.instance().registerSyncedNBTKey("*", TileEntityCargo);
|
||||
ModuleRegistrar.instance().registerSyncedNBTKey("*", TileEntityLiquid);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
package mcp.mobius.waila.addons.thaumcraft;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraft.util.StringUtils;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
import mcp.mobius.waila.utils.NBTUtil;
|
||||
import mcp.mobius.waila.utils.WailaExceptionHandler;
|
||||
import static mcp.mobius.waila.api.SpecialChars.*;
|
||||
|
||||
public class HUDHandlerIAspectContainer implements IWailaDataProvider {
|
||||
@Override
|
||||
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
if (!config.getConfig("thaumcraft.aspects")) return currenttip;
|
||||
|
||||
ItemStack headSlot = accessor.getPlayer().inventory.armorInventory[3];
|
||||
if (headSlot == null) return currenttip;
|
||||
|
||||
boolean hasReveal = ThaumcraftModule.ItemGoggles.isInstance(headSlot.getItem()) ||
|
||||
(ThaumcraftModule.ItemRevealingHelm != null && ThaumcraftModule.ItemRevealingHelm.isInstance(headSlot.getItem())) ||
|
||||
(ThaumcraftModule.ItemGemHelm != null && ThaumcraftModule.ItemGemHelm.isInstance(headSlot.getItem()));
|
||||
|
||||
if (!hasReveal) return currenttip;
|
||||
|
||||
NBTTagCompound tag = accessor.getNBTData();
|
||||
|
||||
if (tag.hasKey("Aspect") && tag.hasKey("Amount") && !tag.getString("Aspect").equals("")){
|
||||
String aspect = Character.toUpperCase(tag.getString("Aspect").charAt(0)) + tag.getString("Aspect").substring(1);
|
||||
currenttip.add(this.getAspectString(tag, "Aspect", "Amount", accessor));
|
||||
}
|
||||
|
||||
if (tag.hasKey("aspect") && tag.hasKey("amount") && !tag.getString("aspect").equals("")){
|
||||
String aspect = Character.toUpperCase(tag.getString("aspect").charAt(0)) + tag.getString("aspect").substring(1);
|
||||
currenttip.add(this.getAspectString(tag, "aspect", "amount", accessor));
|
||||
}
|
||||
|
||||
if (tag.hasKey("Aspects")){
|
||||
NBTTagList taglist = tag.getTagList("Aspects");
|
||||
for (int i = 0; i < taglist.tagCount(); i++){
|
||||
NBTTagCompound subtag = (NBTTagCompound)taglist.tagAt(i);
|
||||
if (subtag.hasKey("amount") && subtag.hasKey("key") && !subtag.getString("key").equals("")){
|
||||
currenttip.add(this.getAspectString(subtag, "key", "amount", accessor));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
private String getAspectString(NBTTagCompound tag, String keyAspect, String keyAmount, IWailaDataAccessor accessor){
|
||||
String aspect = tag.getString(keyAspect);
|
||||
aspect = knowAspect(aspect, accessor) ? aspect : "????";
|
||||
aspect = Character.toUpperCase(aspect.charAt(0)) + aspect.substring(1);
|
||||
|
||||
String amount = String.valueOf(NBTUtil.getNBTInteger(tag, keyAmount));
|
||||
|
||||
|
||||
|
||||
return String.format("%s" + TAB + ALIGNRIGHT + WHITE + "%s", aspect, amount);
|
||||
}
|
||||
|
||||
private boolean knowAspect(String name, IWailaDataAccessor accessor){
|
||||
try{
|
||||
Object proxy = ThaumcraftModule.TC_proxy.get(null);
|
||||
Object known = ThaumcraftModule.getKnownAspects.invoke(proxy, (Object[])null);
|
||||
Object listAspc = ((Map<String, Object>)known).get(accessor.getPlayer().username);
|
||||
//Object research = ThaumcraftModule.playerResearch.get(proxy);
|
||||
//Object aspect = ThaumcraftModule.getAspect.invoke(null, name);
|
||||
//Object knownaspects = ThaumcraftModule.aspectsDiscovered.get(research);
|
||||
//Boolean known = (Boolean)ThaumcraftModule.hasDiscoveredAspect.invoke(research, accessor.getPlayer().username, aspect);
|
||||
|
||||
Object[] aspects = (Object[])ThaumcraftModule.list_getAspects.invoke(listAspc);
|
||||
for (Object o : aspects){
|
||||
if (ThaumcraftModule.aspect_tag.get(o).equals(name)){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
} catch (Exception e){
|
||||
WailaExceptionHandler.handleErr(e, this.getClass().getName(), null);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
package mcp.mobius.waila.addons.thaumcraft;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import mcp.mobius.waila.Waila;
|
||||
import mcp.mobius.waila.api.impl.ModuleRegistrar;
|
||||
import mcp.mobius.waila.utils.WailaExceptionHandler;
|
||||
|
||||
public class ThaumcraftModule {
|
||||
|
||||
public static Class IAspectContainer = null;
|
||||
public static Class TileAlchemyFurnace = null;
|
||||
public static Class ItemGoggles = null;
|
||||
public static Class ItemRevealingHelm = null;
|
||||
public static Class ItemGemHelm = null;
|
||||
|
||||
public static Class Thaumcraft = null;
|
||||
public static Class TCClientProxy = null;
|
||||
public static Class TCCommonProxy = null;
|
||||
//public static Class PlayerKnowledge = null;
|
||||
public static Class Aspect = null;
|
||||
public static Class AspectList = null;
|
||||
|
||||
public static Field TC_proxy = null; //Thaumcraft.proxy
|
||||
//public static Field playerResearch = null; //ClientProxy.playerResearch
|
||||
//public static Field aspectsDiscovered = null; //PlayerKnowledge.aspectsDiscovered
|
||||
public static Field aspect_tag = null; //Aspect.tag
|
||||
|
||||
//public static Method hasDiscoveredAspect = null; //PlayerKnowledge.hasDiscoveredAspect
|
||||
//public static Method getAspect = null; //Aspect.getAspect
|
||||
public static Method getKnownAspects = null; //CommonProxy.getKnownAspects
|
||||
public static Method list_getAspects = null; //AspectList.getAspects
|
||||
|
||||
public static void register(){
|
||||
|
||||
try{
|
||||
Thaumcraft = Class.forName("thaumcraft.common.Thaumcraft");
|
||||
Waila.log.log(Level.INFO, "Thaumcraft mod found.");
|
||||
} catch (ClassNotFoundException e){
|
||||
Waila.log.log(Level.INFO, "[Thaumcraft] Thaumcraft mod not found.");
|
||||
return;
|
||||
}
|
||||
|
||||
try{
|
||||
ItemRevealingHelm = Class.forName("vazkii.tinkerer.common.item.ItemRevealingHelm");
|
||||
} catch (ClassNotFoundException e){ }
|
||||
|
||||
try{
|
||||
ItemGemHelm = Class.forName("vazkii.tinkerer.common.item.kami.armor.ItemGemHelm");
|
||||
} catch (ClassNotFoundException e){ }
|
||||
|
||||
try{
|
||||
IAspectContainer = Class.forName("thaumcraft.api.aspects.IAspectContainer");
|
||||
TileAlchemyFurnace = Class.forName("thaumcraft.common.tiles.TileAlchemyFurnace");
|
||||
ItemGoggles = Class.forName("thaumcraft.common.items.armor.ItemGoggles");
|
||||
TCClientProxy = Class.forName("thaumcraft.client.ClientProxy");
|
||||
TCCommonProxy = Class.forName("thaumcraft.common.CommonProxy");
|
||||
//PlayerKnowledge = Class.forName("thaumcraft.common.lib.research.PlayerKnowledge");
|
||||
Aspect = Class.forName("thaumcraft.api.aspects.Aspect");
|
||||
AspectList = Class.forName("thaumcraft.api.aspects.AspectList");
|
||||
|
||||
TC_proxy = Thaumcraft.getDeclaredField("proxy");
|
||||
//playerResearch = TCClientProxy.getDeclaredField("playerResearch");
|
||||
//aspectsDiscovered = PlayerKnowledge.getDeclaredField("aspectsDiscovered");
|
||||
//playerResearch.setAccessible(true);
|
||||
aspect_tag = Aspect.getDeclaredField("tag");
|
||||
aspect_tag.setAccessible(true);
|
||||
|
||||
//hasDiscoveredAspect = PlayerKnowledge.getDeclaredMethod("hasDiscoveredAspect", String.class, Aspect);
|
||||
//getAspect = Aspect.getDeclaredMethod("getAspect", String.class);
|
||||
getKnownAspects = TCCommonProxy.getDeclaredMethod("getKnownAspects");
|
||||
list_getAspects = AspectList.getDeclaredMethod("getAspects");
|
||||
|
||||
} catch (ClassNotFoundException e){
|
||||
Waila.log.log(Level.WARNING, "[Thaumcraft] Class not found. " + e);
|
||||
return;
|
||||
} catch (Exception e){
|
||||
Waila.log.log(Level.WARNING, "[Thaumcraft] Unhandled exception." + e);
|
||||
//WailaExceptionHandler.handleErr(e, null, null);
|
||||
return;
|
||||
}
|
||||
|
||||
ModuleRegistrar.instance().addConfigRemote("Thaumcraft", "thaumcraft.aspects");
|
||||
ModuleRegistrar.instance().registerBodyProvider(new HUDHandlerIAspectContainer(), IAspectContainer);
|
||||
ModuleRegistrar.instance().registerBodyProvider(new HUDHandlerIAspectContainer(), TileAlchemyFurnace);
|
||||
ModuleRegistrar.instance().registerSyncedNBTKey("*", IAspectContainer);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package mcp.mobius.waila.addons.thermalexpansion;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import codechicken.lib.lang.LangUtil;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
import mcp.mobius.waila.utils.WailaExceptionHandler;
|
||||
|
||||
public class HUDHandlerConduitFluid implements IWailaDataProvider {
|
||||
|
||||
@Override
|
||||
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
|
||||
if (!config.getConfig("thermalexpansion.fluidtype")) return currenttip;
|
||||
|
||||
boolean found = false;
|
||||
FluidStack fluid = null;
|
||||
|
||||
if (!accessor.getNBTData().hasKey("parts")) return currenttip;
|
||||
NBTTagList parts = accessor.getNBTData().getTagList("parts");
|
||||
for (int i = 0; i < parts.tagCount(); i++){
|
||||
NBTTagCompound subtag = (NBTTagCompound)parts.tagAt(i);
|
||||
String id = subtag.getString("id");
|
||||
|
||||
if (id.contains("ConduitFluid")){
|
||||
found = true;
|
||||
NBTTagCompound fluidTag = subtag.getCompoundTag("ConnFluid");
|
||||
fluid = FluidStack.loadFluidStackFromNBT(fluidTag);
|
||||
}
|
||||
}
|
||||
|
||||
if (!found) return currenttip;
|
||||
|
||||
if (fluid != null)
|
||||
currenttip.add(fluid.getFluid().getLocalizedName());
|
||||
else
|
||||
currenttip.add(LangUtil.translateG("hud.msg.empty"));
|
||||
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package mcp.mobius.waila.addons.thermalexpansion;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagList;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
|
||||
public class HUDHandlerConduitItem implements IWailaDataProvider {
|
||||
|
||||
@Override
|
||||
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
|
||||
if (!config.getConfig("thermalexpansion.conditemmode")) return currenttip;
|
||||
|
||||
boolean found = false;
|
||||
int mode = -1;
|
||||
|
||||
if (!accessor.getNBTData().hasKey("parts")) return currenttip;
|
||||
NBTTagList parts = accessor.getNBTData().getTagList("parts");
|
||||
for (int i = 0; i < parts.tagCount(); i++){
|
||||
NBTTagCompound subtag = (NBTTagCompound)parts.tagAt(i);
|
||||
String id = subtag.getString("id");
|
||||
|
||||
if (id.contains("ConduitItem")){
|
||||
mode = accessor.getNBTInteger(subtag, "Mode");
|
||||
found = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!found) return currenttip;
|
||||
|
||||
if (mode == 0){}
|
||||
else if (mode == 1)
|
||||
currenttip.add("Mode : \u00a7fDense");
|
||||
else if (mode == 2)
|
||||
currenttip.add("Mode : \u00a7fVacuum");
|
||||
else if (mode == 3)
|
||||
currenttip.add("Mode : \u00a7fRound-Robin");
|
||||
else
|
||||
currenttip.add("Mode : <UNKNOWN>");
|
||||
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package mcp.mobius.waila.addons.thermalexpansion;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import codechicken.lib.lang.LangUtil;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
import mcp.mobius.waila.utils.WailaExceptionHandler;
|
||||
|
||||
public class HUDHandlerEnergyCell implements IWailaDataProvider {
|
||||
|
||||
@Override
|
||||
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
if (!config.getConfig("thermalexpansion.energycell")) return currenttip;
|
||||
|
||||
int energyReceive = accessor.getNBTInteger(accessor.getNBTData(), "Recv");
|
||||
int energySend = accessor.getNBTInteger(accessor.getNBTData(), "Send");
|
||||
|
||||
currenttip.add(String.format("%s/%s : %d / %d RF/t", LangUtil.translateG("hud.msg.in"), LangUtil.translateG("hud.msg.out"), energyReceive, energySend));
|
||||
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package mcp.mobius.waila.addons.thermalexpansion;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
import mcp.mobius.waila.utils.WailaExceptionHandler;
|
||||
|
||||
public class HUDHandlerIEnergyHandler implements IWailaDataProvider {
|
||||
|
||||
@Override
|
||||
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
|
||||
if (!config.getConfig("thermalexpansion.energyhandler")) return currenttip;
|
||||
if (!accessor.getNBTData().hasKey("Energy")) return currenttip;
|
||||
|
||||
int energy = accessor.getNBTInteger(accessor.getNBTData(), "Energy");
|
||||
try {
|
||||
Integer maxEnergy = (Integer)ThermalExpansionModule.IEnergyHandler_getMaxStorage.invoke(accessor.getTileEntity(), ForgeDirection.UNKNOWN);
|
||||
if (maxEnergy != 0)
|
||||
currenttip.add(String.format("%d / %d RF", energy, maxEnergy));
|
||||
} catch (Exception e){
|
||||
currenttip = WailaExceptionHandler.handleErr(e, accessor.getTileEntity().getClass().getName(), currenttip);
|
||||
}
|
||||
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package mcp.mobius.waila.addons.thermalexpansion;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import codechicken.lib.lang.LangUtil;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
|
||||
|
||||
public class HUDHandlerISecureTile implements IWailaDataProvider {
|
||||
|
||||
@Override
|
||||
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
|
||||
if (config.getConfig("thermalexpansion.owner")){
|
||||
|
||||
String owner = accessor.getNBTData().getString("Owner");
|
||||
int iaccess = accessor.getNBTInteger(accessor.getNBTData(), "Access");
|
||||
|
||||
String access = "INVALID";
|
||||
switch(iaccess){
|
||||
case 0:
|
||||
access = LangUtil.translateG("hud.msg.public");
|
||||
break;
|
||||
case 1:
|
||||
access = LangUtil.translateG("hud.msg.restricted");
|
||||
break;
|
||||
case 2:
|
||||
access = LangUtil.translateG("hud.msg.private");
|
||||
break;
|
||||
}
|
||||
|
||||
currenttip.add(String.format("%s : \u00a7f%s\u00a7r [ %s ]", LangUtil.translateG("hud.msg.owner"), owner, access));
|
||||
|
||||
}
|
||||
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
package mcp.mobius.waila.addons.thermalexpansion;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.util.List;
|
||||
|
||||
import codechicken.lib.lang.LangUtil;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
import mcp.mobius.waila.utils.WailaExceptionHandler;
|
||||
|
||||
public class HUDHandlerTank implements IWailaDataProvider {
|
||||
|
||||
@Override
|
||||
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
if (!config.getConfig("thermalexpansion.fluidtype")) return currenttip;
|
||||
|
||||
try {
|
||||
FluidStack fluid = (FluidStack)ThermalExpansionModule.TileTank_getTankFluid.invoke(accessor.getTileEntity());
|
||||
String name = currenttip.get(0);
|
||||
|
||||
try{
|
||||
name += String.format(" < %s >", fluid.getFluid().getLocalizedName());
|
||||
} catch (NullPointerException f){
|
||||
name += " " + LangUtil.translateG("hud.msg.empty");
|
||||
}
|
||||
|
||||
currenttip.set(0, name);
|
||||
|
||||
} catch (Exception e){
|
||||
currenttip = WailaExceptionHandler.handleErr(e, accessor.getTileEntity().getClass().getName(), currenttip);
|
||||
}
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
try {
|
||||
if (config.getConfig("thermalexpansion.fluidamount")){
|
||||
int amount = 0;
|
||||
if (accessor.getNBTData().hasKey("Amount"))
|
||||
amount = accessor.getNBTInteger(accessor.getNBTData(), "Amount");
|
||||
|
||||
Integer capacity = (Integer)ThermalExpansionModule.TileTank_getTankCapacity.invoke(accessor.getTileEntity());
|
||||
|
||||
currenttip.add(String.format("%d / %d mB", amount, capacity));
|
||||
}
|
||||
|
||||
if (config.getConfig("thermalexpansion.tankmode")){
|
||||
Byte mode = (Byte)ThermalExpansionModule.TileTank_mode.get(accessor.getTileEntity());
|
||||
if (mode == 0)
|
||||
currenttip.add(String.format("%s : \u00a7a%s", LangUtil.translateG("hud.msg.mode"), LangUtil.translateG("hud.msg.input")));
|
||||
else if (mode == 1)
|
||||
currenttip.add(String.format("%s : \u00a7c%s", LangUtil.translateG("hud.msg.mode"), LangUtil.translateG("hud.msg.output")));
|
||||
else
|
||||
currenttip.add(String.format("Mode : Unknown (%d)", mode));
|
||||
}
|
||||
|
||||
|
||||
|
||||
} catch (Exception e){
|
||||
currenttip = WailaExceptionHandler.handleErr(e, accessor.getTileEntity().getClass().getName(), currenttip);
|
||||
}
|
||||
|
||||
|
||||
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
package mcp.mobius.waila.addons.thermalexpansion;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import codechicken.lib.lang.LangUtil;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
|
||||
public class HUDHandlerTesseract implements IWailaDataProvider {
|
||||
|
||||
@Override
|
||||
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
|
||||
if (config.getConfig("thermalexpansion.tesssendrecv")){
|
||||
String send = String.format("%s : ", LangUtil.translateG("hud.msg.send"));
|
||||
String recv = String.format("%s : ", LangUtil.translateG("hud.msg.recv"));
|
||||
String item = String.format("\u00a7a%s ", LangUtil.translateG("hud.msg.item"));
|
||||
String fluid= String.format("\u00a79%s ", LangUtil.translateG("hud.msg.fluid"));
|
||||
String energ= String.format("\u00a7c%s ", LangUtil.translateG("hud.msg.energ"));
|
||||
|
||||
|
||||
switch (accessor.getNBTInteger(accessor.getNBTData(), "Item.Mode")){
|
||||
case 0:
|
||||
send += item;
|
||||
break;
|
||||
case 1:
|
||||
recv += item;
|
||||
break;
|
||||
case 2:
|
||||
send += item;
|
||||
recv += item;
|
||||
break;
|
||||
}
|
||||
|
||||
switch (accessor.getNBTInteger(accessor.getNBTData(), "Fluid.Mode")){
|
||||
case 0:
|
||||
send += fluid;
|
||||
break;
|
||||
case 1:
|
||||
recv += fluid;
|
||||
break;
|
||||
case 2:
|
||||
send += fluid;
|
||||
recv += fluid;
|
||||
break;
|
||||
}
|
||||
|
||||
switch (accessor.getNBTInteger(accessor.getNBTData(), "Energy.Mode")){
|
||||
case 0:
|
||||
send += energ;
|
||||
break;
|
||||
case 1:
|
||||
recv += energ;
|
||||
break;
|
||||
case 2:
|
||||
send += energ;
|
||||
recv += energ;
|
||||
break;
|
||||
}
|
||||
|
||||
if (!send.equals(String.format("%s : ", LangUtil.translateG("hud.msg.send"))))
|
||||
currenttip.add(send);
|
||||
|
||||
if (!send.equals(String.format("%s : ", LangUtil.translateG("hud.msg.recv"))))
|
||||
currenttip.add(recv);
|
||||
}
|
||||
|
||||
if (config.getConfig("thermalexpansion.tessfreq"))
|
||||
currenttip.add(String.format("%s : %d",LangUtil.translateG("hud.msg.frequency"), accessor.getNBTInteger(accessor.getNBTData(), "Frequency")));
|
||||
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,132 @@
|
||||
package mcp.mobius.waila.addons.thermalexpansion;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
import mcp.mobius.waila.Waila;
|
||||
import mcp.mobius.waila.api.impl.ModuleRegistrar;
|
||||
|
||||
public class ThermalExpansionModule {
|
||||
|
||||
public static Class IEnergyHandler = null;
|
||||
public static Method IEnergyHandler_getMaxStorage = null;
|
||||
|
||||
public static Class TileEnergyCell = null;
|
||||
|
||||
public static Class TileTank = null;
|
||||
public static Method TileTank_getTankFluid = null;
|
||||
public static Method TileTank_getTankCapacity = null;
|
||||
public static Field TileTank_mode = null;
|
||||
|
||||
//public static Class TileConduitFluid = null;
|
||||
//public static Method TileConduitFluid_getRenderFluid = null;
|
||||
//public static Method TileConduitFluid_getRenderFluidLevel = null;
|
||||
|
||||
//public static Class TileConduitItems = null;
|
||||
|
||||
public static Class TileTesseract = null;
|
||||
|
||||
public static Class ISecureTile = null;
|
||||
|
||||
public static Class BlockMultipart = null;
|
||||
|
||||
//public static Field TileTesseract_modItem = null;
|
||||
//public static Field TileTesseract_modFluid = null;
|
||||
//public static Field TileTesseract_modEnergy = null;
|
||||
|
||||
|
||||
//public static Class TileConduitBase = null;
|
||||
//public static Field TileConduitBase_isInput = null;
|
||||
//public static Field TileConduitBase_isOutput = null;
|
||||
|
||||
public static void register(){
|
||||
|
||||
try{
|
||||
Class ModThermalExpansion = Class.forName("thermalexpansion.ThermalExpansion");
|
||||
Waila.log.log(Level.INFO, "Thermal Expansion mod found.");
|
||||
} catch (ClassNotFoundException e){
|
||||
Waila.log.log(Level.INFO, "[Thermal Expansion] ThermalExpansion mod not found.");
|
||||
return;
|
||||
}
|
||||
|
||||
try{
|
||||
IEnergyHandler = Class.forName("cofh.api.energy.IEnergyHandler");
|
||||
IEnergyHandler_getMaxStorage = IEnergyHandler.getMethod("getMaxEnergyStored", ForgeDirection.class);
|
||||
TileEnergyCell = Class.forName("thermalexpansion.block.energycell.TileEnergyCell");
|
||||
|
||||
TileTank = Class.forName("thermalexpansion.block.tank.TileTank");
|
||||
TileTank_getTankFluid = TileTank.getMethod("getTankFluid");
|
||||
TileTank_getTankCapacity = TileTank.getMethod("getTankCapacity");
|
||||
TileTank_mode = TileTank.getField("mode");
|
||||
|
||||
//TileConduitFluid = Class.forName("thermalexpansion.block.conduit.fluid.TileConduitFluid");
|
||||
//TileConduitFluid_getRenderFluid = TileConduitFluid.getMethod("getRenderFluid");
|
||||
//TileConduitFluid_getRenderFluidLevel = TileConduitFluid.getMethod("getRenderFluidLevel");
|
||||
//TileConduitItems = Class.forName("thermalexpansion.block.conduit.item.TileConduitItem");
|
||||
|
||||
TileTesseract = Class.forName("thermalexpansion.block.tesseract.TileTesseract");
|
||||
|
||||
ISecureTile = Class.forName("cofh.api.tileentity.ISecureTile");
|
||||
|
||||
BlockMultipart = Class.forName("codechicken.multipart.BlockMultipart");
|
||||
|
||||
//TileTesseract_modItem = TileTesseract.getField("modItem");
|
||||
//TileTesseract_modFluid = TileTesseract.getField("modFluid");
|
||||
//TileTesseract_modEnergy = TileTesseract.getField("modEnergy");
|
||||
|
||||
//TileConduitBase = Class.forName("thermalexpansion.block.conduit.TileConduitBase");
|
||||
//TileConduitBase_isInput = TileConduitBase.getField("isInput");
|
||||
//TileConduitBase_isOutput = TileConduitBase.getField("isOutput");
|
||||
|
||||
//TileEnergyCell_energyReceive = TileEnergyCell.getField("energyReceive");
|
||||
//TileEnergyCell_energySend = TileEnergyCell.getField("energySend");
|
||||
|
||||
} catch (ClassNotFoundException e){
|
||||
Waila.log.log(Level.WARNING, "[Thermal Expansion] Class not found. " + e);
|
||||
return;
|
||||
} catch (NoSuchMethodException e){
|
||||
Waila.log.log(Level.WARNING, "[Thermal Expansion] Method not found." + e);
|
||||
return;
|
||||
} catch (NoSuchFieldException e){
|
||||
Waila.log.log(Level.WARNING, "[Thermal Expansion] Field not found." + e);
|
||||
return;
|
||||
// } catch (Exception e){
|
||||
// mod_Waila.log.log(Level.WARNING, "[Thermal Expansion] Unhandled exception." + e);
|
||||
// return;
|
||||
}
|
||||
|
||||
ModuleRegistrar.instance().addConfigRemote("Thermal Expansion", "thermalexpansion.energyhandler");
|
||||
ModuleRegistrar.instance().addConfigRemote("Thermal Expansion", "thermalexpansion.energycell");
|
||||
ModuleRegistrar.instance().addConfigRemote("Thermal Expansion", "thermalexpansion.fluidtype");
|
||||
ModuleRegistrar.instance().addConfigRemote("Thermal Expansion", "thermalexpansion.fluidamount");
|
||||
ModuleRegistrar.instance().addConfigRemote("Thermal Expansion", "thermalexpansion.conditemmode");
|
||||
ModuleRegistrar.instance().addConfig("Thermal Expansion", "thermalexpansion.tankmode");
|
||||
ModuleRegistrar.instance().addConfigRemote("Thermal Expansion", "thermalexpansion.tesssendrecv");
|
||||
ModuleRegistrar.instance().addConfigRemote("Thermal Expansion", "thermalexpansion.tessfreq");
|
||||
ModuleRegistrar.instance().addConfigRemote("Thermal Expansion", "thermalexpansion.owner");
|
||||
|
||||
ModuleRegistrar.instance().registerBodyProvider(new HUDHandlerIEnergyHandler(), IEnergyHandler);
|
||||
ModuleRegistrar.instance().registerBodyProvider(new HUDHandlerEnergyCell(), TileEnergyCell);
|
||||
ModuleRegistrar.instance().registerHeadProvider(new HUDHandlerTank(), TileTank);
|
||||
ModuleRegistrar.instance().registerBodyProvider(new HUDHandlerTank(), TileTank);
|
||||
|
||||
ModuleRegistrar.instance().registerBodyProvider(new HUDHandlerTesseract(), TileTesseract);
|
||||
|
||||
ModuleRegistrar.instance().registerBodyProvider(new HUDHandlerISecureTile(), ISecureTile);
|
||||
|
||||
ModuleRegistrar.instance().registerBodyProvider(new HUDHandlerConduitFluid(), BlockMultipart);
|
||||
ModuleRegistrar.instance().registerBodyProvider(new HUDHandlerConduitItem(), BlockMultipart);
|
||||
|
||||
ModuleRegistrar.instance().registerSyncedNBTKey("*", IEnergyHandler);
|
||||
ModuleRegistrar.instance().registerSyncedNBTKey("*", TileEnergyCell);
|
||||
ModuleRegistrar.instance().registerSyncedNBTKey("*", TileTank);
|
||||
ModuleRegistrar.instance().registerSyncedNBTKey("*", TileTesseract);
|
||||
ModuleRegistrar.instance().registerSyncedNBTKey("*", ISecureTile);
|
||||
ModuleRegistrar.instance().registerSyncedNBTKey("*", BlockMultipart);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package mcp.mobius.waila.addons.twilightforest;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
|
||||
public class TwilightForestGenericOverride implements IWailaDataProvider {
|
||||
|
||||
@Override
|
||||
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return new ItemStack(accessor.getBlock(), 0, accessor.getMetadata());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package mcp.mobius.waila.addons.twilightforest;
|
||||
|
||||
import java.util.logging.Level;
|
||||
|
||||
import mcp.mobius.waila.Waila;
|
||||
import mcp.mobius.waila.api.impl.ModuleRegistrar;
|
||||
|
||||
public class TwilightForestModule {
|
||||
|
||||
public static Class BlockTFRoots = null;
|
||||
public static Class BlockTFPlant = null;
|
||||
public static Class BlockTFSapling = null;
|
||||
|
||||
public static void register(){
|
||||
|
||||
try{
|
||||
Class TwilightForestMod = Class.forName("twilightforest.TwilightForestMod");
|
||||
Waila.log.log(Level.INFO, "TwilightForestMod mod found.");
|
||||
} catch (ClassNotFoundException e){
|
||||
Waila.log.log(Level.INFO, "[TwilightForestMod] TwilightForestMod mod not found.");
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
BlockTFRoots = Class.forName("twilightforest.block.BlockTFRoots");
|
||||
BlockTFPlant = Class.forName("twilightforest.block.BlockTFPlant");
|
||||
BlockTFSapling = Class.forName("twilightforest.block.BlockTFSapling");
|
||||
} catch (ClassNotFoundException e) {
|
||||
Waila.log.log(Level.WARNING, "[TwilightForestMod] Class not found. " + e);
|
||||
}
|
||||
|
||||
|
||||
ModuleRegistrar.instance().registerStackProvider(new TwilightForestGenericOverride(), BlockTFRoots);
|
||||
ModuleRegistrar.instance().registerStackProvider(new TwilightForestGenericOverride(), BlockTFPlant);
|
||||
//ExternalModulesHandler.instance().registerStackProvider(new TwilightForestGenericOverride(), BlockTFSapling);
|
||||
|
||||
ModuleRegistrar.instance().registerSyncedNBTKey("*", BlockTFRoots);
|
||||
ModuleRegistrar.instance().registerSyncedNBTKey("*", BlockTFPlant);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
package mcp.mobius.waila.addons.vanillamc;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import mcp.mobius.waila.api.IWailaBlockDecorator;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.gui.helpers.UIHelper;
|
||||
|
||||
public class HUDDecoratorVanilla implements IWailaBlockDecorator {
|
||||
|
||||
@Override
|
||||
public void decorateBlock(ItemStack itemStack, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
|
||||
//UIHelper.drawBillboardText(itemStack.getDisplayName(), accessor.getRenderingPosition(), 0.5F, 1.5F, 0.5F, accessor.getPartialFrame());
|
||||
UIHelper.drawFloatingText("IN", accessor.getRenderingPosition(), 0.5F, 0.2F, -0.2F, 90F, 0F, 0F);
|
||||
UIHelper.drawFloatingText("OUT", accessor.getRenderingPosition(), -0.2F, 0.2F, 0.5F, 90F, 90F, 0F);
|
||||
UIHelper.drawFloatingText("OUT", accessor.getRenderingPosition(), 1.2F, 0.2F, 0.5F, 90F, -90F, 0F);
|
||||
UIHelper.drawFloatingText("OUT", accessor.getRenderingPosition(), 0.5F, 0.2F, 1.2F, 90F, -180F, 0F);
|
||||
|
||||
double offset = 0.1;
|
||||
double delta = 1 + 2 * offset;
|
||||
|
||||
double x = accessor.getRenderingPosition().xCoord - offset;
|
||||
double y = accessor.getRenderingPosition().yCoord - offset;
|
||||
double z = accessor.getRenderingPosition().zCoord - offset;
|
||||
|
||||
tessellator.startDrawingQuads();
|
||||
|
||||
tessellator.setColorRGBA(255, 255, 255, 150);
|
||||
|
||||
tessellator.addVertex(x, y + 0.2 , z);
|
||||
tessellator.addVertex(x, y + 0.2 , z + delta/2 - 0.1);
|
||||
tessellator.addVertex(x + offset, y + 0.2, z + delta/2 - 0.1);
|
||||
tessellator.addVertex(x + offset, y + 0.2, z);
|
||||
|
||||
tessellator.addVertex(x, y + 0.2 , z + delta/2 + 0.1);
|
||||
tessellator.addVertex(x, y + 0.2 , z + delta);
|
||||
tessellator.addVertex(x + offset, y + 0.2, z + delta);
|
||||
tessellator.addVertex(x + offset, y + 0.2, z + delta/2 + 0.1);
|
||||
|
||||
tessellator.addVertex(x + delta - 0.1, y + 0.2 , z + 0.1);
|
||||
tessellator.addVertex(x + delta - 0.1, y + 0.2 , z + delta/2 - 0.1);
|
||||
tessellator.addVertex(x + delta + offset - 0.1, y + 0.2, z + delta/2 - 0.1);
|
||||
tessellator.addVertex(x + delta + offset - 0.1, y + 0.2, z + 0.1);
|
||||
|
||||
tessellator.addVertex(x + delta - 0.1, y + 0.2 , z + delta/2 + 0.1);
|
||||
tessellator.addVertex(x + delta - 0.1, y + 0.2 , z + delta);
|
||||
tessellator.addVertex(x + delta + offset - 0.1, y + 0.2, z + delta);
|
||||
tessellator.addVertex(x + delta + offset - 0.1, y + 0.2, z + delta/2 + 0.1);
|
||||
|
||||
|
||||
tessellator.addVertex(x+ 0.1, y + 0.2, z);
|
||||
tessellator.addVertex(x+ 0.1, y + 0.2, z+ offset);
|
||||
tessellator.addVertex(x+ delta/2 - 0.1, y + 0.2, z+ offset);
|
||||
tessellator.addVertex(x+ delta/2 - 0.1, y + 0.2, z);
|
||||
|
||||
tessellator.addVertex(x+ delta/2 + 0.1, y + 0.2, z);
|
||||
tessellator.addVertex(x+ delta/2 + 0.1, y + 0.2, z+ offset);
|
||||
tessellator.addVertex(x+ delta, y + 0.2, z+ offset);
|
||||
tessellator.addVertex(x+ delta, y + 0.2, z);
|
||||
|
||||
tessellator.addVertex(x + 0.1, y + 0.2, z+ delta - 0.1);
|
||||
tessellator.addVertex(x + 0.1, y + 0.2, z+ offset+ delta - 0.1);
|
||||
tessellator.addVertex(x+ delta/2 - 0.1, y + 0.2, z+ offset+ delta - 0.1);
|
||||
tessellator.addVertex(x+ delta/2 - 0.1, y + 0.2, z+ delta - 0.1);
|
||||
|
||||
tessellator.addVertex(x+ delta/2 + 0.1, y + 0.2, z+ delta - 0.1);
|
||||
tessellator.addVertex(x+ delta/2 + 0.1, y + 0.2, z+ offset+ delta - 0.1);
|
||||
tessellator.addVertex(x+ delta - 0.1, y + 0.2, z+ offset+ delta - 0.1);
|
||||
tessellator.addVertex(x+ delta - 0.1, y + 0.2, z+ delta - 0.1);
|
||||
|
||||
tessellator.draw();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,53 +2,76 @@ package mcp.mobius.waila.addons.vanillamc;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import codechicken.lib.lang.LangUtil;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockLever;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.block.BlockSilverfish;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemRecord;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.tileentity.TileEntityComparator;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntityMobSpawner;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
import mcp.mobius.waila.addons.ExternalModulesHandler;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
import mcp.mobius.waila.api.IWailaDataAccessor;
|
||||
import mcp.mobius.waila.api.IWailaDataProvider;
|
||||
import mcp.mobius.waila.api.impl.ModuleRegistrar;
|
||||
|
||||
public class HUDHandlerVanilla implements IWailaDataProvider {
|
||||
|
||||
static int mobSpawnerID = Block.mobSpawner.blockID;
|
||||
static int cropsID = Block.crops.blockID;
|
||||
static int melonStemID = Block.melonStem.blockID;
|
||||
static int pumpkinStemID = Block.pumpkinStem.blockID;
|
||||
static int carrotID = Block.carrot.blockID;
|
||||
static int potatoID = Block.potato.blockID;
|
||||
static int leverID = Block.lever.blockID;
|
||||
static int repeaterIdle = Block.redstoneRepeaterIdle.blockID;
|
||||
static int repeaterActv = Block.redstoneRepeaterActive.blockID;
|
||||
static int comparatorIdl = Block.redstoneComparatorIdle.blockID;
|
||||
static int comparatorAct = Block.redstoneComparatorActive.blockID;
|
||||
static int redstone = Block.redstoneWire.blockID;
|
||||
static Block mobSpawner = Block.mobSpawner;
|
||||
static Block crops = Block.crops;
|
||||
static Block melonStem = Block.melonStem;
|
||||
static Block pumpkinStem = Block.pumpkinStem;
|
||||
static Block carrot = Block.carrot;
|
||||
static Block potato = Block.potato;
|
||||
static Block lever = Block.lever;
|
||||
static Block repeaterIdle = Block.redstoneRepeaterIdle;
|
||||
static Block repeaterActv = Block.redstoneRepeaterActive;
|
||||
static Block comparatorIdl = Block.redstoneComparatorIdle;
|
||||
static Block comparatorAct = Block.redstoneComparatorActive;
|
||||
static Block redstone = Block.redstoneWire;
|
||||
static Block jukebox = Block.jukebox;
|
||||
static Block cocoa = Block.cocoaPlant;
|
||||
static Block netherwart = Block.netherStalk;
|
||||
static Block silverfish = Block.silverfish;
|
||||
|
||||
|
||||
@Override
|
||||
public ItemStack getWailaStack(IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
Block block = accessor.getBlock();
|
||||
|
||||
if (block == silverfish && config.getConfig("vanilla.silverfish")){
|
||||
int metadata = accessor.getMetadata();
|
||||
switch(metadata){
|
||||
case 0:
|
||||
return new ItemStack(Block.stone);
|
||||
case 1:
|
||||
return new ItemStack(Block.cobblestone);
|
||||
case 2:
|
||||
return new ItemStack(Block.stoneBrick);
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
if (block == redstone){
|
||||
return new ItemStack(Item.redstone);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
int blockID = accessor.getBlockID();
|
||||
Block block = accessor.getBlock();
|
||||
|
||||
/* Mob spawner handler */
|
||||
if (blockID == mobSpawnerID && accessor.getTileEntity() instanceof TileEntityMobSpawner && config.getConfig("vanilla.spawntype")){
|
||||
if (block == mobSpawner && accessor.getTileEntity() instanceof TileEntityMobSpawner && config.getConfig("vanilla.spawntype")){
|
||||
String name = currenttip.get(0);
|
||||
String mobname = ((TileEntityMobSpawner)accessor.getTileEntity()).func_98049_a().getEntityNameToSpawn();
|
||||
String mobname = ((TileEntityMobSpawner)accessor.getTileEntity()).getSpawnerLogic().getEntityNameToSpawn();
|
||||
currenttip.set(0, String.format("%s (%s)", name, mobname));
|
||||
}
|
||||
|
||||
if (blockID == redstone){
|
||||
if (block == redstone){
|
||||
String name = currenttip.get(0).replaceFirst(String.format(" %s", accessor.getMetadata()), "");
|
||||
currenttip.set(0, name);
|
||||
}
|
||||
@@ -58,38 +81,58 @@ public class HUDHandlerVanilla implements IWailaDataProvider {
|
||||
|
||||
@Override
|
||||
public List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
int blockID = accessor.getBlockID();
|
||||
Block block = accessor.getBlock();
|
||||
/* Crops */
|
||||
if (config.getConfig("vanilla.growthvalue"))
|
||||
if (blockID == cropsID || blockID == melonStemID || blockID == pumpkinStemID || blockID == carrotID || blockID == potatoID){
|
||||
float growthValue = ((float)accessor.getMetadata() / 7.0F) * 100.0F;
|
||||
if (growthValue != 100.0)
|
||||
currenttip.add(String.format("Growth : %.0f %%", growthValue));
|
||||
boolean iscrop = crops.getClass().isInstance(block); //Done to cover all inheriting mods
|
||||
if (config.getConfig("general.showcrop"))
|
||||
if (iscrop || block == melonStem || block == pumpkinStem || block == carrot || block == potato){
|
||||
float growthValue = (accessor.getMetadata() / 7.0F) * 100.0F;
|
||||
if (growthValue < 100.0)
|
||||
currenttip.add(String.format("%s : %.0f %%", LangUtil.translateG("hud.msg.growth"), growthValue));
|
||||
else
|
||||
currenttip.add("Growth : Mature");
|
||||
currenttip.add(String.format("%s : %s", LangUtil.translateG("hud.msg.growth"), LangUtil.translateG("hud.msg.mature")));
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
if (block == cocoa && config.getConfig("general.showcrop")){
|
||||
|
||||
float growthValue = ((accessor.getMetadata() >> 2) / 2.0F) * 100.0F;
|
||||
if (growthValue < 100.0)
|
||||
currenttip.add(String.format("%s : %.0f %%", LangUtil.translateG("hud.msg.growth"), growthValue));
|
||||
else
|
||||
currenttip.add(String.format("%s : %s", LangUtil.translateG("hud.msg.growth"), LangUtil.translateG("hud.msg.mature")));
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
if (block == netherwart && config.getConfig("general.showcrop")){
|
||||
float growthValue = (accessor.getMetadata() / 3.0F) * 100.0F;
|
||||
if (growthValue < 100.0)
|
||||
currenttip.add(String.format("%s : %.0f %%", LangUtil.translateG("hud.msg.growth"), growthValue));
|
||||
else
|
||||
currenttip.add(String.format("%s : %s", LangUtil.translateG("hud.msg.growth"), LangUtil.translateG("hud.msg.mature")));
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
if (config.getConfig("vanilla.leverstate"))
|
||||
if (blockID == leverID){
|
||||
String redstoneOn = (accessor.getMetadata() & 8) == 0 ? "Off" : "On";
|
||||
currenttip.add("State : " + redstoneOn);
|
||||
if (block == lever){
|
||||
String redstoneOn = (accessor.getMetadata() & 8) == 0 ? LangUtil.translateG("hud.msg.off") : LangUtil.translateG("hud.msg.on");
|
||||
currenttip.add(String.format("%s : %s", LangUtil.translateG("hud.msg.state"), redstoneOn));
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
if (config.getConfig("vanilla.repeater"))
|
||||
if ((blockID == repeaterIdle) ||(blockID == repeaterActv)){
|
||||
if ((block == repeaterIdle) ||(block == repeaterActv)){
|
||||
int tick = (accessor.getMetadata() >> 2) + 1 ;
|
||||
if (tick == 1)
|
||||
currenttip.add(String.format("Delay : %s tick", tick));
|
||||
currenttip.add(String.format("%s : %s tick", LangUtil.translateG("hud.msg.delay"), tick));
|
||||
else
|
||||
currenttip.add(String.format("Delay : %s ticks", tick));
|
||||
currenttip.add(String.format("%s : %s ticks", LangUtil.translateG("hud.msg.delay"), tick));
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
if (config.getConfig("vanilla.comparator"))
|
||||
if ((blockID == comparatorIdl) ||(blockID == comparatorAct)){
|
||||
String mode = ((accessor.getMetadata() >> 2) & 1) == 0 ? "Comparator" : "Substractor";
|
||||
if ((block == comparatorIdl) ||(block == comparatorAct)){
|
||||
String mode = ((accessor.getMetadata() >> 2) & 1) == 0 ? LangUtil.translateG("hud.msg.comparator") : LangUtil.translateG("hud.msg.substractor");
|
||||
//int outputSignal = ((TileEntityComparator)entity).func_96100_a();
|
||||
currenttip.add("Mode : " + mode);
|
||||
//currenttip.add(String.format("Out : %s", outputSignal));
|
||||
@@ -97,34 +140,81 @@ public class HUDHandlerVanilla implements IWailaDataProvider {
|
||||
}
|
||||
|
||||
if (config.getConfig("vanilla.redstone"))
|
||||
if (blockID == redstone){
|
||||
currenttip.add(String.format("Power : %s" , accessor.getMetadata()));
|
||||
if (block == redstone){
|
||||
currenttip.add(String.format("%s : %s" , LangUtil.translateG("hud.msg.power"), accessor.getMetadata()));
|
||||
return currenttip;
|
||||
}
|
||||
}
|
||||
|
||||
if (config.getConfig("vanilla.jukebox"))
|
||||
if (block == jukebox){
|
||||
NBTTagCompound tag = accessor.getNBTData();
|
||||
Item record = null;
|
||||
if (tag.hasKey("Record")){
|
||||
record = Item.itemsList[accessor.getNBTInteger(tag, "Record")];
|
||||
currenttip.add(((ItemRecord)record).getRecordTitle());
|
||||
} else {
|
||||
currenttip.add(LangUtil.translateG("hud.msg.empty"));
|
||||
}
|
||||
}
|
||||
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
|
||||
return currenttip;
|
||||
}
|
||||
|
||||
public static void register(){
|
||||
ExternalModulesHandler.instance().addConfig("VanillaMC", "vanilla.spawntype", "Spawner type");
|
||||
ExternalModulesHandler.instance().addConfig("VanillaMC", "vanilla.growthvalue", "Growth value");
|
||||
ExternalModulesHandler.instance().addConfig("VanillaMC", "vanilla.leverstate", "Lever state");
|
||||
ExternalModulesHandler.instance().addConfig("VanillaMC", "vanilla.repeater", "Repeater delay");
|
||||
ExternalModulesHandler.instance().addConfig("VanillaMC", "vanilla.comparator", "Comparator mode");
|
||||
ExternalModulesHandler.instance().addConfig("VanillaMC", "vanilla.redstone", "Redstone power");
|
||||
ExternalModulesHandler.instance().registerHeadProvider(new HUDHandlerVanilla(), mobSpawnerID);
|
||||
ExternalModulesHandler.instance().registerBodyProvider(new HUDHandlerVanilla(), cropsID);
|
||||
ExternalModulesHandler.instance().registerBodyProvider(new HUDHandlerVanilla(), melonStemID);
|
||||
ExternalModulesHandler.instance().registerBodyProvider(new HUDHandlerVanilla(), pumpkinStemID);
|
||||
ExternalModulesHandler.instance().registerBodyProvider(new HUDHandlerVanilla(), carrotID);
|
||||
ExternalModulesHandler.instance().registerBodyProvider(new HUDHandlerVanilla(), potatoID);
|
||||
ExternalModulesHandler.instance().registerBodyProvider(new HUDHandlerVanilla(), leverID);
|
||||
ExternalModulesHandler.instance().registerBodyProvider(new HUDHandlerVanilla(), repeaterIdle);
|
||||
ExternalModulesHandler.instance().registerBodyProvider(new HUDHandlerVanilla(), repeaterActv);
|
||||
ExternalModulesHandler.instance().registerBodyProvider(new HUDHandlerVanilla(), comparatorIdl);
|
||||
ExternalModulesHandler.instance().registerBodyProvider(new HUDHandlerVanilla(), comparatorAct);
|
||||
ExternalModulesHandler.instance().registerHeadProvider(new HUDHandlerVanilla(), redstone);
|
||||
ExternalModulesHandler.instance().registerBodyProvider(new HUDHandlerVanilla(), redstone);
|
||||
ModuleRegistrar.instance().addConfig("VanillaMC", "vanilla.spawntype");
|
||||
ModuleRegistrar.instance().addConfig("VanillaMC", "vanilla.leverstate");
|
||||
ModuleRegistrar.instance().addConfig("VanillaMC", "vanilla.repeater");
|
||||
ModuleRegistrar.instance().addConfig("VanillaMC", "vanilla.comparator");
|
||||
ModuleRegistrar.instance().addConfig("VanillaMC", "vanilla.redstone");
|
||||
ModuleRegistrar.instance().addConfig("VanillaMC", "vanilla.silverfish");
|
||||
ModuleRegistrar.instance().addConfigRemote("VanillaMC", "vanilla.jukebox");
|
||||
|
||||
IWailaDataProvider provider = new HUDHandlerVanilla();
|
||||
|
||||
ModuleRegistrar.instance().registerStackProvider(provider, silverfish.getClass());
|
||||
ModuleRegistrar.instance().registerStackProvider(provider, redstone.getClass());
|
||||
ModuleRegistrar.instance().registerHeadProvider(provider, mobSpawner.getClass());
|
||||
ModuleRegistrar.instance().registerBodyProvider(provider, crops.getClass());
|
||||
ModuleRegistrar.instance().registerBodyProvider(provider, melonStem.getClass());
|
||||
ModuleRegistrar.instance().registerBodyProvider(provider, pumpkinStem.getClass());
|
||||
//ModuleRegistrar.instance().registerBodyProvider(provider, carrot.getClass());
|
||||
//ModuleRegistrar.instance().registerBodyProvider(provider, potato.getClass());
|
||||
ModuleRegistrar.instance().registerBodyProvider(provider, lever.getClass());
|
||||
ModuleRegistrar.instance().registerBodyProvider(provider, repeaterIdle.getClass());
|
||||
ModuleRegistrar.instance().registerBodyProvider(provider, repeaterActv.getClass());
|
||||
ModuleRegistrar.instance().registerBodyProvider(provider, comparatorIdl.getClass());
|
||||
ModuleRegistrar.instance().registerBodyProvider(provider, comparatorAct.getClass());
|
||||
ModuleRegistrar.instance().registerHeadProvider(provider, redstone.getClass());
|
||||
ModuleRegistrar.instance().registerBodyProvider(provider, redstone.getClass());
|
||||
ModuleRegistrar.instance().registerBodyProvider(provider, jukebox.getClass());
|
||||
ModuleRegistrar.instance().registerBodyProvider(provider, cocoa.getClass());
|
||||
ModuleRegistrar.instance().registerBodyProvider(provider, netherwart.getClass());
|
||||
|
||||
ModuleRegistrar.instance().registerSyncedNBTKey("*", Block.mobSpawner.getClass());
|
||||
ModuleRegistrar.instance().registerSyncedNBTKey("*", Block.crops.getClass());
|
||||
ModuleRegistrar.instance().registerSyncedNBTKey("*", Block.melonStem.getClass());
|
||||
ModuleRegistrar.instance().registerSyncedNBTKey("*", Block.pumpkinStem.getClass());
|
||||
ModuleRegistrar.instance().registerSyncedNBTKey("*", Block.carrot.getClass());
|
||||
ModuleRegistrar.instance().registerSyncedNBTKey("*", Block.potato.getClass());
|
||||
ModuleRegistrar.instance().registerSyncedNBTKey("*", Block.lever.getClass());
|
||||
ModuleRegistrar.instance().registerSyncedNBTKey("*", Block.redstoneRepeaterIdle.getClass());
|
||||
ModuleRegistrar.instance().registerSyncedNBTKey("*", Block.redstoneRepeaterActive.getClass());
|
||||
ModuleRegistrar.instance().registerSyncedNBTKey("*", Block.redstoneComparatorIdle.getClass());
|
||||
ModuleRegistrar.instance().registerSyncedNBTKey("*", Block.redstoneComparatorActive.getClass());
|
||||
ModuleRegistrar.instance().registerSyncedNBTKey("*", Block.redstoneWire.getClass());
|
||||
ModuleRegistrar.instance().registerSyncedNBTKey("*", Block.jukebox.getClass());
|
||||
ModuleRegistrar.instance().registerSyncedNBTKey("*", Block.cocoaPlant.getClass());
|
||||
ModuleRegistrar.instance().registerSyncedNBTKey("*", Block.netherStalk.getClass());
|
||||
ModuleRegistrar.instance().registerSyncedNBTKey("*", Block.silverfish.getClass());
|
||||
|
||||
ModuleRegistrar.instance().registerDocTextFile("/mcp/mobius/waila/addons/vanillamc/WikiData.csv");
|
||||
|
||||
//ExternalModulesHandler.instance().registerBlockDecorator(new HUDDecoratorVanilla(), repeaterIdle);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,667 @@
|
||||
Minecraft,tile.*,0,Stone,net.minecraft.item.ItemBlock,This is a crazy test !
|
||||
Minecraft,tile.grass,0,Grass Block,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.dirt,0,Dirt,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.stonebrick,0,Cobblestone,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.wood.oak,0,Oak Wood Planks,net.minecraft.item.ItemMultiTextureTile,
|
||||
Minecraft,tile.wood.spruce,1,Spruce Wood Planks,net.minecraft.item.ItemMultiTextureTile,
|
||||
Minecraft,tile.wood.birch,2,Birch Wood Planks,net.minecraft.item.ItemMultiTextureTile,
|
||||
Minecraft,tile.wood.jungle,3,Jungle Wood Planks,net.minecraft.item.ItemMultiTextureTile,
|
||||
Minecraft,tile.sapling.oak,0,Oak Sapling,net.minecraft.item.ItemMultiTextureTile,
|
||||
Minecraft,tile.sapling.spruce,1,Spruce Sapling,net.minecraft.item.ItemMultiTextureTile,
|
||||
Minecraft,tile.sapling.birch,2,Birch Sapling,net.minecraft.item.ItemMultiTextureTile,
|
||||
Minecraft,tile.sapling.jungle,3,Jungle Sapling,net.minecraft.item.ItemMultiTextureTile,
|
||||
Minecraft,tile.bedrock,0,Bedrock,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.water,0,Water,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.water,0,Water,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.lava,0,Lava,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.lava,0,Lava,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.sand,0,Sand,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.gravel,0,Gravel,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.oreGold,0,Gold Ore,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.oreIron,0,Iron Ore,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.oreCoal,0,Coal Ore,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.log.oak,0,Oak Wood,net.minecraft.item.ItemMultiTextureTile,
|
||||
Minecraft,tile.log.spruce,1,Spruce Wood,net.minecraft.item.ItemMultiTextureTile,
|
||||
Minecraft,tile.log.birch,2,Birch Wood,net.minecraft.item.ItemMultiTextureTile,
|
||||
Minecraft,tile.log.jungle,3,Jungle Wood,net.minecraft.item.ItemMultiTextureTile,
|
||||
Minecraft,tile.leaves.oak,0,Oak Leaves,net.minecraft.item.ItemLeaves,
|
||||
Minecraft,tile.leaves.spruce,1,Spruce Leaves,net.minecraft.item.ItemLeaves,
|
||||
Minecraft,tile.leaves.birch,2,Birch Leaves,net.minecraft.item.ItemLeaves,
|
||||
Minecraft,tile.leaves.jungle,3,Jungle Leaves,net.minecraft.item.ItemLeaves,
|
||||
Minecraft,tile.sponge,0,Sponge,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.glass,0,Glass,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.oreLapis,0,Lapis Lazuli Ore,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.blockLapis,0,Lapis Lazuli Block,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.dispenser,0,Dispenser,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.sandStone.default,0,Sandstone,net.minecraft.item.ItemMultiTextureTile,
|
||||
Minecraft,tile.sandStone.chiseled,1,Chiseled Sandstone,net.minecraft.item.ItemMultiTextureTile,
|
||||
Minecraft,tile.sandStone.smooth,2,Smooth Sandstone,net.minecraft.item.ItemMultiTextureTile,
|
||||
Minecraft,tile.musicBlock,0,Note Block,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.goldenRail,0,Powered Rail,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.detectorRail,0,Detector Rail,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.pistonStickyBase,0,Sticky Piston,net.minecraft.item.ItemPiston,
|
||||
Minecraft,tile.web,0,Cobweb,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.tallgrass.grass,1,Grass,net.minecraft.item.ItemColored,
|
||||
Minecraft,tile.tallgrass.fern,2,Fern,net.minecraft.item.ItemColored,
|
||||
Minecraft,tile.deadbush,0,Dead Bush,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.pistonBase,0,Piston,net.minecraft.item.ItemPiston,
|
||||
Minecraft,tile.cloth.white,0,Wool,net.minecraft.item.ItemCloth,
|
||||
Minecraft,tile.cloth.orange,1,Orange Wool,net.minecraft.item.ItemCloth,
|
||||
Minecraft,tile.cloth.magenta,2,Magenta Wool,net.minecraft.item.ItemCloth,
|
||||
Minecraft,tile.cloth.lightBlue,3,Light Blue Wool,net.minecraft.item.ItemCloth,
|
||||
Minecraft,tile.cloth.yellow,4,Yellow Wool,net.minecraft.item.ItemCloth,
|
||||
Minecraft,tile.cloth.lime,5,Lime Wool,net.minecraft.item.ItemCloth,
|
||||
Minecraft,tile.cloth.pink,6,Pink Wool,net.minecraft.item.ItemCloth,
|
||||
Minecraft,tile.cloth.gray,7,Gray Wool,net.minecraft.item.ItemCloth,
|
||||
Minecraft,tile.cloth.silver,8,Light Gray Wool,net.minecraft.item.ItemCloth,
|
||||
Minecraft,tile.cloth.cyan,9,Cyan Wool,net.minecraft.item.ItemCloth,
|
||||
Minecraft,tile.cloth.purple,10,Purple Wool,net.minecraft.item.ItemCloth,
|
||||
Minecraft,tile.cloth.blue,11,Blue Wool,net.minecraft.item.ItemCloth,
|
||||
Minecraft,tile.cloth.brown,12,Brown Wool,net.minecraft.item.ItemCloth,
|
||||
Minecraft,tile.cloth.green,13,Green Wool,net.minecraft.item.ItemCloth,
|
||||
Minecraft,tile.cloth.red,14,Red Wool,net.minecraft.item.ItemCloth,
|
||||
Minecraft,tile.cloth.black,15,Black Wool,net.minecraft.item.ItemCloth,
|
||||
Minecraft,tile.flower,0,Flower,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.rose,0,Rose,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.mushroom,0,Mushroom,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.mushroom,0,Mushroom,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.blockGold,0,Block of Gold,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.blockIron,0,Block of Iron,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.stoneSlab.stone,0,Stone Slab,net.minecraft.item.ItemSlab,
|
||||
Minecraft,tile.stoneSlab.sand,1,Sandstone Slab,net.minecraft.item.ItemSlab,
|
||||
Minecraft,tile.stoneSlab.wood,2,Wooden Slab,net.minecraft.item.ItemSlab,
|
||||
Minecraft,tile.stoneSlab.cobble,3,Cobblestone Slab,net.minecraft.item.ItemSlab,
|
||||
Minecraft,tile.stoneSlab.brick,4,Bricks Slab,net.minecraft.item.ItemSlab,
|
||||
Minecraft,tile.stoneSlab.smoothStoneBrick,5,Stone Bricks Slab,net.minecraft.item.ItemSlab,
|
||||
Minecraft,tile.stoneSlab.netherBrick,6,Nether Brick Slab,net.minecraft.item.ItemSlab,
|
||||
Minecraft,tile.stoneSlab.quartz,7,Quartz Slab,net.minecraft.item.ItemSlab,
|
||||
Minecraft,tile.stoneSlab.stone,8,Stone Slab,net.minecraft.item.ItemSlab,
|
||||
Minecraft,tile.stoneSlab.stone,9,Stone Slab,net.minecraft.item.ItemSlab,
|
||||
Minecraft,tile.stoneSlab.stone,10,Stone Slab,net.minecraft.item.ItemSlab,
|
||||
Minecraft,tile.stoneSlab.stone,11,Stone Slab,net.minecraft.item.ItemSlab,
|
||||
Minecraft,tile.stoneSlab.stone,12,Stone Slab,net.minecraft.item.ItemSlab,
|
||||
Minecraft,tile.stoneSlab.stone,13,Stone Slab,net.minecraft.item.ItemSlab,
|
||||
Minecraft,tile.stoneSlab.stone,14,Stone Slab,net.minecraft.item.ItemSlab,
|
||||
Minecraft,tile.stoneSlab.stone,15,Stone Slab,net.minecraft.item.ItemSlab,
|
||||
Minecraft,tile.stoneSlab.stone,0,Stone Slab,net.minecraft.item.ItemSlab,
|
||||
Minecraft,tile.stoneSlab.sand,1,Sandstone Slab,net.minecraft.item.ItemSlab,
|
||||
Minecraft,tile.stoneSlab.cobble,3,Cobblestone Slab,net.minecraft.item.ItemSlab,
|
||||
Minecraft,tile.stoneSlab.brick,4,Bricks Slab,net.minecraft.item.ItemSlab,
|
||||
Minecraft,tile.stoneSlab.smoothStoneBrick,5,Stone Bricks Slab,net.minecraft.item.ItemSlab,
|
||||
Minecraft,tile.stoneSlab.netherBrick,6,Nether Brick Slab,net.minecraft.item.ItemSlab,
|
||||
Minecraft,tile.stoneSlab.quartz,7,Quartz Slab,net.minecraft.item.ItemSlab,
|
||||
Minecraft,tile.brick,0,Bricks,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.tnt,0,TNT,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.bookshelf,0,Bookshelf,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.stoneMoss,0,Moss Stone,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.obsidian,0,Obsidian,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.torch,0,Torch,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.fire,0,Fire,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.mobSpawner,90,Monster Spawner,codechicken.nei.ItemMobSpawner,
|
||||
Minecraft,tile.mobSpawner,50,Monster Spawner,codechicken.nei.ItemMobSpawner,
|
||||
Minecraft,tile.mobSpawner,51,Monster Spawner,codechicken.nei.ItemMobSpawner,
|
||||
Minecraft,tile.mobSpawner,52,Monster Spawner,codechicken.nei.ItemMobSpawner,
|
||||
Minecraft,tile.mobSpawner,53,Monster Spawner,codechicken.nei.ItemMobSpawner,
|
||||
Minecraft,tile.mobSpawner,54,Monster Spawner,codechicken.nei.ItemMobSpawner,
|
||||
Minecraft,tile.mobSpawner,55,Monster Spawner,codechicken.nei.ItemMobSpawner,
|
||||
Minecraft,tile.mobSpawner,56,Monster Spawner,codechicken.nei.ItemMobSpawner,
|
||||
Minecraft,tile.mobSpawner,57,Monster Spawner,codechicken.nei.ItemMobSpawner,
|
||||
Minecraft,tile.mobSpawner,58,Monster Spawner,codechicken.nei.ItemMobSpawner,
|
||||
Minecraft,tile.mobSpawner,59,Monster Spawner,codechicken.nei.ItemMobSpawner,
|
||||
Minecraft,tile.mobSpawner,60,Monster Spawner,codechicken.nei.ItemMobSpawner,
|
||||
Minecraft,tile.mobSpawner,61,Monster Spawner,codechicken.nei.ItemMobSpawner,
|
||||
Minecraft,tile.mobSpawner,62,Monster Spawner,codechicken.nei.ItemMobSpawner,
|
||||
Minecraft,tile.mobSpawner,64,Monster Spawner,codechicken.nei.ItemMobSpawner,
|
||||
Minecraft,tile.mobSpawner,65,Monster Spawner,codechicken.nei.ItemMobSpawner,
|
||||
Minecraft,tile.mobSpawner,66,Monster Spawner,codechicken.nei.ItemMobSpawner,
|
||||
Minecraft,tile.mobSpawner,91,Monster Spawner,codechicken.nei.ItemMobSpawner,
|
||||
Minecraft,tile.mobSpawner,92,Monster Spawner,codechicken.nei.ItemMobSpawner,
|
||||
Minecraft,tile.mobSpawner,93,Monster Spawner,codechicken.nei.ItemMobSpawner,
|
||||
Minecraft,tile.mobSpawner,94,Monster Spawner,codechicken.nei.ItemMobSpawner,
|
||||
Minecraft,tile.mobSpawner,95,Monster Spawner,codechicken.nei.ItemMobSpawner,
|
||||
Minecraft,tile.mobSpawner,96,Monster Spawner,codechicken.nei.ItemMobSpawner,
|
||||
Minecraft,tile.mobSpawner,97,Monster Spawner,codechicken.nei.ItemMobSpawner,
|
||||
Minecraft,tile.mobSpawner,98,Monster Spawner,codechicken.nei.ItemMobSpawner,
|
||||
Minecraft,tile.mobSpawner,99,Monster Spawner,codechicken.nei.ItemMobSpawner,
|
||||
Minecraft,tile.mobSpawner,120,Monster Spawner,codechicken.nei.ItemMobSpawner,
|
||||
Minecraft,tile.stairsWood,0,Oak Wood Stairs,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.chest,0,Chest,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.oreDiamond,0,Diamond Ore,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.blockDiamond,0,Block of Diamond,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.workbench,0,Crafting Table,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.farmland,0,Farmland,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.furnace,0,Furnace,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.ladder,0,Ladder,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.rail,0,Rail,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.stairsStone,0,Stone Stairs,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.lever,0,Lever,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.pressurePlate,0,Pressure Plate,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.pressurePlate,0,Pressure Plate,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.oreRedstone,0,Redstone Ore,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.notGate,0,Redstone Torch,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.button,0,Button,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.snow,0,Snow,net.minecraft.item.ItemSnow,
|
||||
Minecraft,tile.ice,0,Ice,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.snow,0,Snow,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.cactus,0,Cactus,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.clay,0,Clay,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.jukebox,0,Jukebox,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.fence,0,Fence,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.pumpkin,0,Pumpkin,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.hellrock,0,Netherrack,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.hellsand,0,Soul Sand,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.lightgem,0,Glowstone,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.portal,0,Portal,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.litpumpkin,0,Jack 'o' Lantern,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.cake,0,Cake,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.lockedchest,0,Locked chest,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.trapdoor,0,Trapdoor,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.monsterStoneEgg.stone,0,Stone Monster Egg,net.minecraft.item.ItemMultiTextureTile,
|
||||
Minecraft,tile.monsterStoneEgg.cobble,1,Cobblestone Monster Egg,net.minecraft.item.ItemMultiTextureTile,
|
||||
Minecraft,tile.monsterStoneEgg.brick,2,Stone Brick Monster Egg,net.minecraft.item.ItemMultiTextureTile,
|
||||
Minecraft,tile.stonebricksmooth.default,0,Stone Bricks,net.minecraft.item.ItemMultiTextureTile,
|
||||
Minecraft,tile.stonebricksmooth.mossy,1,Mossy Stone Bricks,net.minecraft.item.ItemMultiTextureTile,
|
||||
Minecraft,tile.stonebricksmooth.cracked,2,Cracked Stone Bricks,net.minecraft.item.ItemMultiTextureTile,
|
||||
Minecraft,tile.stonebricksmooth.chiseled,3,Chiseled Stone Bricks,net.minecraft.item.ItemMultiTextureTile,
|
||||
Minecraft,tile.mushroom,0,Mushroom,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.mushroom,0,Mushroom,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.fenceIron,0,Iron Bars,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.thinGlass,0,Glass Pane,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.melon,0,Melon,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.vine,0,Vines,net.minecraft.item.ItemColored,
|
||||
Minecraft,tile.fenceGate,0,Fence Gate,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.stairsBrick,0,Brick Stairs,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.stairsStoneBrickSmooth,0,Stone Brick Stairs,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.mycel,0,Mycelium,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.waterlily,0,Lily Pad,net.minecraft.item.ItemLilyPad,
|
||||
Minecraft,tile.netherBrick,0,Nether Brick,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.netherFence,0,Nether Brick Fence,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.stairsNetherBrick,0,Nether Brick Stairs,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.enchantmentTable,0,Enchantment Table,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.null,0,,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.endPortalFrame,0,End Portal,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.whiteStone,0,End Stone,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.dragonEgg,0,Dragon Egg,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.redstoneLight,0,Redstone Lamp,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.woodSlab.oak,0,Oak Wood Slab,net.minecraft.item.ItemSlab,
|
||||
Minecraft,tile.woodSlab.spruce,1,Spruce Wood Slab,net.minecraft.item.ItemSlab,
|
||||
Minecraft,tile.woodSlab.birch,2,Birch Wood Slab,net.minecraft.item.ItemSlab,
|
||||
Minecraft,tile.woodSlab.jungle,3,Jungle Wood Slab,net.minecraft.item.ItemSlab,
|
||||
Minecraft,tile.woodSlab.oak,9,Oak Wood Slab,net.minecraft.item.ItemSlab,
|
||||
Minecraft,tile.woodSlab.oak,10,Oak Wood Slab,net.minecraft.item.ItemSlab,
|
||||
Minecraft,tile.woodSlab.oak,11,Oak Wood Slab,net.minecraft.item.ItemSlab,
|
||||
Minecraft,tile.woodSlab.oak,0,Oak Wood Slab,net.minecraft.item.ItemSlab,
|
||||
Minecraft,tile.woodSlab.spruce,1,Spruce Wood Slab,net.minecraft.item.ItemSlab,
|
||||
Minecraft,tile.woodSlab.birch,2,Birch Wood Slab,net.minecraft.item.ItemSlab,
|
||||
Minecraft,tile.woodSlab.jungle,3,Jungle Wood Slab,net.minecraft.item.ItemSlab,
|
||||
Minecraft,tile.cocoa,0,Cocoa,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.stairsSandStone,0,Sandstone Stairs,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.oreEmerald,0,Emerald Ore,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.tripWireSource,0,Tripwire Hook,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.blockEmerald,0,Block of Emerald,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.stairsWoodSpruce,0,Spruce Wood Stairs,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.stairsWoodBirch,0,Birch Wood Stairs,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.stairsWoodJungle,0,Jungle Wood Stairs,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.commandBlock,0,Command Block,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.beacon,0,Beacon,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.cobbleWall.normal,0,Cobblestone Wall,net.minecraft.item.ItemMultiTextureTile,
|
||||
Minecraft,tile.cobbleWall.mossy,1,Mossy Cobblestone Wall,net.minecraft.item.ItemMultiTextureTile,
|
||||
Minecraft,tile.button,0,Button,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.anvil.intact,0,Anvil,net.minecraft.item.ItemAnvilBlock,
|
||||
Minecraft,tile.anvil.slightlyDamaged,1,Slightly Damaged Anvil,net.minecraft.item.ItemAnvilBlock,
|
||||
Minecraft,tile.anvil.veryDamaged,2,Very Damaged Anvil,net.minecraft.item.ItemAnvilBlock,
|
||||
Minecraft,tile.chestTrap,0,Trapped Chest,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.weightedPlate_light,0,Weighted Pressure Plate (Light),net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.weightedPlate_heavy,0,Weighted Pressure Plate (Heavy),net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.comparator,0,,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.comparator,0,,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.daylightDetector,0,Daylight Sensor,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.blockRedstone,0,Block of Redstone,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.netherquartz,0,Nether Quartz Ore,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.hopper,0,Hopper,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.quartzBlock.default,0,Block of Quartz,net.minecraft.item.ItemMultiTextureTile,
|
||||
Minecraft,tile.quartzBlock.chiseled,1,Chiseled Quartz Block,net.minecraft.item.ItemMultiTextureTile,
|
||||
Minecraft,tile.quartzBlock.lines,2,Pillar Quartz Block,net.minecraft.item.ItemMultiTextureTile,
|
||||
Minecraft,tile.stairsQuartz,0,Quartz Stairs,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.activatorRail,0,Activator Rail,net.minecraft.item.ItemBlock,
|
||||
Minecraft,tile.dropper,0,Dropper,net.minecraft.item.ItemBlock,
|
||||
EnderStorage,tile.enderchest|0,0,Ender Chest,codechicken.enderstorage.common.ItemEnderStorage,
|
||||
EnderStorage,tile.enderchest|1,4096,Ender Tank,codechicken.enderstorage.common.ItemEnderStorage,
|
||||
Minecraft,item.shovelIron,0,Iron Shovel,net.minecraft.item.ItemSpade,
|
||||
Minecraft,item.pickaxeIron,0,Iron Pickaxe,net.minecraft.item.ItemPickaxe,
|
||||
Minecraft,item.hatchetIron,0,Iron Axe,net.minecraft.item.ItemAxe,
|
||||
Minecraft,item.flintAndSteel,0,Flint and Steel,net.minecraft.item.ItemFlintAndSteel,
|
||||
Minecraft,item.apple,0,Apple,net.minecraft.item.ItemFood,
|
||||
Minecraft,item.bow,0,Bow,net.minecraft.item.ItemBow,
|
||||
Minecraft,item.arrow,0,Arrow,net.minecraft.item.Item,
|
||||
Minecraft,item.coal,0,Coal,net.minecraft.item.ItemCoal,
|
||||
Minecraft,item.charcoal,1,Charcoal,net.minecraft.item.ItemCoal,
|
||||
Minecraft,item.diamond,0,Diamond,net.minecraft.item.Item,
|
||||
Minecraft,item.ingotIron,0,Iron Ingot,net.minecraft.item.Item,
|
||||
Minecraft,item.ingotGold,0,Gold Ingot,net.minecraft.item.Item,
|
||||
Minecraft,item.swordIron,0,Iron Sword,net.minecraft.item.ItemSword,
|
||||
Minecraft,item.swordWood,0,Wooden Sword,net.minecraft.item.ItemSword,
|
||||
Minecraft,item.shovelWood,0,Wooden Shovel,net.minecraft.item.ItemSpade,
|
||||
Minecraft,item.pickaxeWood,0,Wooden Pickaxe,net.minecraft.item.ItemPickaxe,
|
||||
Minecraft,item.hatchetWood,0,Wooden Axe,net.minecraft.item.ItemAxe,
|
||||
Minecraft,item.swordStone,0,Stone Sword,net.minecraft.item.ItemSword,
|
||||
Minecraft,item.shovelStone,0,Stone Shovel,net.minecraft.item.ItemSpade,
|
||||
Minecraft,item.pickaxeStone,0,Stone Pickaxe,net.minecraft.item.ItemPickaxe,
|
||||
Minecraft,item.hatchetStone,0,Stone Axe,net.minecraft.item.ItemAxe,
|
||||
Minecraft,item.swordDiamond,0,Diamond Sword,net.minecraft.item.ItemSword,
|
||||
Minecraft,item.shovelDiamond,0,Diamond Shovel,net.minecraft.item.ItemSpade,
|
||||
Minecraft,item.pickaxeDiamond,0,Diamond Pickaxe,net.minecraft.item.ItemPickaxe,
|
||||
Minecraft,item.hatchetDiamond,0,Diamond Axe,net.minecraft.item.ItemAxe,
|
||||
Minecraft,item.stick,0,Stick,net.minecraft.item.Item,
|
||||
Minecraft,item.bowl,0,Bowl,net.minecraft.item.Item,
|
||||
Minecraft,item.mushroomStew,0,Mushroom Stew,net.minecraft.item.ItemSoup,
|
||||
Minecraft,item.swordGold,0,Golden Sword,net.minecraft.item.ItemSword,
|
||||
Minecraft,item.shovelGold,0,Golden Shovel,net.minecraft.item.ItemSpade,
|
||||
Minecraft,item.pickaxeGold,0,Golden Pickaxe,net.minecraft.item.ItemPickaxe,
|
||||
Minecraft,item.hatchetGold,0,Golden Axe,net.minecraft.item.ItemAxe,
|
||||
Minecraft,item.string,0,String,net.minecraft.item.ItemReed,
|
||||
Minecraft,item.feather,0,Feather,net.minecraft.item.Item,
|
||||
Minecraft,item.sulphur,0,Gunpowder,net.minecraft.item.Item,
|
||||
Minecraft,item.hoeWood,0,Wooden Hoe,net.minecraft.item.ItemHoe,
|
||||
Minecraft,item.hoeStone,0,Stone Hoe,net.minecraft.item.ItemHoe,
|
||||
Minecraft,item.hoeIron,0,Iron Hoe,net.minecraft.item.ItemHoe,
|
||||
Minecraft,item.hoeDiamond,0,Diamond Hoe,net.minecraft.item.ItemHoe,
|
||||
Minecraft,item.hoeGold,0,Golden Hoe,net.minecraft.item.ItemHoe,
|
||||
Minecraft,item.seeds,0,Seeds,net.minecraft.item.ItemSeeds,
|
||||
Minecraft,item.wheat,0,Wheat,net.minecraft.item.Item,
|
||||
Minecraft,item.bread,0,Bread,net.minecraft.item.ItemFood,
|
||||
Minecraft,item.helmetCloth,0,Leather Cap,net.minecraft.item.ItemArmor,
|
||||
Minecraft,item.chestplateCloth,0,Leather Tunic,net.minecraft.item.ItemArmor,
|
||||
Minecraft,item.leggingsCloth,0,Leather Pants,net.minecraft.item.ItemArmor,
|
||||
Minecraft,item.bootsCloth,0,Leather Boots,net.minecraft.item.ItemArmor,
|
||||
Minecraft,item.helmetChain,0,Chain Helmet,net.minecraft.item.ItemArmor,
|
||||
Minecraft,item.chestplateChain,0,Chain Chestplate,net.minecraft.item.ItemArmor,
|
||||
Minecraft,item.leggingsChain,0,Chain Leggings,net.minecraft.item.ItemArmor,
|
||||
Minecraft,item.bootsChain,0,Chain Boots,net.minecraft.item.ItemArmor,
|
||||
Minecraft,item.helmetIron,0,Iron Helmet,net.minecraft.item.ItemArmor,
|
||||
Minecraft,item.chestplateIron,0,Iron Chestplate,net.minecraft.item.ItemArmor,
|
||||
Minecraft,item.leggingsIron,0,Iron Leggings,net.minecraft.item.ItemArmor,
|
||||
Minecraft,item.bootsIron,0,Iron Boots,net.minecraft.item.ItemArmor,
|
||||
Minecraft,item.helmetDiamond,0,Diamond Helmet,net.minecraft.item.ItemArmor,
|
||||
Minecraft,item.chestplateDiamond,0,Diamond Chestplate,net.minecraft.item.ItemArmor,
|
||||
Minecraft,item.leggingsDiamond,0,Diamond Leggings,net.minecraft.item.ItemArmor,
|
||||
Minecraft,item.bootsDiamond,0,Diamond Boots,net.minecraft.item.ItemArmor,
|
||||
Minecraft,item.helmetGold,0,Golden Helmet,net.minecraft.item.ItemArmor,
|
||||
Minecraft,item.chestplateGold,0,Golden Chestplate,net.minecraft.item.ItemArmor,
|
||||
Minecraft,item.leggingsGold,0,Golden Leggings,net.minecraft.item.ItemArmor,
|
||||
Minecraft,item.bootsGold,0,Golden Boots,net.minecraft.item.ItemArmor,
|
||||
Minecraft,item.flint,0,Flint,net.minecraft.item.Item,
|
||||
Minecraft,item.porkchopRaw,0,Raw Porkchop,net.minecraft.item.ItemFood,
|
||||
Minecraft,item.porkchopCooked,0,Cooked Porkchop,net.minecraft.item.ItemFood,
|
||||
Minecraft,item.painting,0,Painting,net.minecraft.item.ItemHangingEntity,
|
||||
Minecraft,item.appleGold,0,Golden Apple,net.minecraft.item.ItemAppleGold,
|
||||
Minecraft,item.sign,0,Sign,net.minecraft.item.ItemSign,
|
||||
Minecraft,item.doorWood,0,Wooden Door,net.minecraft.item.ItemDoor,
|
||||
Minecraft,item.bucket,0,Bucket,net.minecraft.item.ItemBucket,
|
||||
Minecraft,item.bucketWater,0,Water Bucket,net.minecraft.item.ItemBucket,
|
||||
Minecraft,item.bucketLava,0,Lava Bucket,net.minecraft.item.ItemBucket,
|
||||
Minecraft,item.minecart,0,Minecart,net.minecraft.item.ItemMinecart,
|
||||
Minecraft,item.saddle,0,Saddle,net.minecraft.item.ItemSaddle,
|
||||
Minecraft,item.doorIron,0,Iron Door,net.minecraft.item.ItemDoor,
|
||||
Minecraft,item.redstone,0,Redstone,net.minecraft.item.ItemRedstone,
|
||||
Minecraft,item.snowball,0,Snowball,net.minecraft.item.ItemSnowball,
|
||||
Minecraft,item.boat,0,Boat,net.minecraft.item.ItemBoat,
|
||||
Minecraft,item.leather,0,Leather,net.minecraft.item.Item,
|
||||
Minecraft,item.milk,0,Milk,net.minecraft.item.ItemBucketMilk,
|
||||
Minecraft,item.brick,0,Brick,net.minecraft.item.Item,
|
||||
Minecraft,item.clay,0,Clay,net.minecraft.item.Item,
|
||||
Minecraft,item.reeds,0,Sugar Canes,net.minecraft.item.ItemReed,
|
||||
Minecraft,item.paper,0,Paper,net.minecraft.item.Item,
|
||||
Minecraft,item.book,0,Book,net.minecraft.item.ItemBook,
|
||||
Minecraft,item.slimeball,0,Slimeball,net.minecraft.item.Item,
|
||||
Minecraft,item.minecartChest,0,Minecart with Chest,net.minecraft.item.ItemMinecart,
|
||||
Minecraft,item.minecartFurnace,0,Minecart with Furnace,net.minecraft.item.ItemMinecart,
|
||||
Minecraft,item.egg,0,Egg,net.minecraft.item.ItemEgg,
|
||||
Minecraft,item.compass,0,Compass,net.minecraft.item.Item,
|
||||
Minecraft,item.fishingRod,0,Fishing Rod,net.minecraft.item.ItemFishingRod,
|
||||
Minecraft,item.clock,0,Clock,net.minecraft.item.Item,
|
||||
Minecraft,item.yellowDust,0,Glowstone Dust,net.minecraft.item.Item,
|
||||
Minecraft,item.fishRaw,0,Raw Fish,net.minecraft.item.ItemFood,
|
||||
Minecraft,item.fishCooked,0,Cooked Fish,net.minecraft.item.ItemFood,
|
||||
Minecraft,item.dyePowder.black,0,Ink Sac,net.minecraft.item.ItemDye,
|
||||
Minecraft,item.dyePowder.red,1,Rose Red,net.minecraft.item.ItemDye,
|
||||
Minecraft,item.dyePowder.green,2,Cactus Green,net.minecraft.item.ItemDye,
|
||||
Minecraft,item.dyePowder.brown,3,Cocoa Beans,net.minecraft.item.ItemDye,
|
||||
Minecraft,item.dyePowder.blue,4,Lapis Lazuli,net.minecraft.item.ItemDye,
|
||||
Minecraft,item.dyePowder.purple,5,Purple Dye,net.minecraft.item.ItemDye,
|
||||
Minecraft,item.dyePowder.cyan,6,Cyan Dye,net.minecraft.item.ItemDye,
|
||||
Minecraft,item.dyePowder.silver,7,Light Gray Dye,net.minecraft.item.ItemDye,
|
||||
Minecraft,item.dyePowder.gray,8,Gray Dye,net.minecraft.item.ItemDye,
|
||||
Minecraft,item.dyePowder.pink,9,Pink Dye,net.minecraft.item.ItemDye,
|
||||
Minecraft,item.dyePowder.lime,10,Lime Dye,net.minecraft.item.ItemDye,
|
||||
Minecraft,item.dyePowder.yellow,11,Dandelion Yellow,net.minecraft.item.ItemDye,
|
||||
Minecraft,item.dyePowder.lightBlue,12,Light Blue Dye,net.minecraft.item.ItemDye,
|
||||
Minecraft,item.dyePowder.magenta,13,Magenta Dye,net.minecraft.item.ItemDye,
|
||||
Minecraft,item.dyePowder.orange,14,Orange Dye,net.minecraft.item.ItemDye,
|
||||
Minecraft,item.dyePowder.white,15,Bone Meal,net.minecraft.item.ItemDye,
|
||||
Minecraft,item.bone,0,Bone,net.minecraft.item.Item,
|
||||
Minecraft,item.sugar,0,Sugar,net.minecraft.item.Item,
|
||||
Minecraft,item.cake,0,Cake,net.minecraft.item.ItemReed,
|
||||
Minecraft,item.bed,0,Bed,net.minecraft.item.ItemBed,
|
||||
Minecraft,item.diode,0,Redstone Repeater,net.minecraft.item.ItemReed,
|
||||
Minecraft,item.cookie,0,Cookie,net.minecraft.item.ItemFood,
|
||||
Minecraft,item.map,0,Map,net.minecraft.item.ItemMap,
|
||||
Minecraft,item.shears,0,Shears,net.minecraft.item.ItemShears,
|
||||
Minecraft,item.melon,0,Melon,net.minecraft.item.ItemFood,
|
||||
Minecraft,item.seeds_pumpkin,0,Pumpkin Seeds,net.minecraft.item.ItemSeeds,
|
||||
Minecraft,item.seeds_melon,0,Melon Seeds,net.minecraft.item.ItemSeeds,
|
||||
Minecraft,item.beefRaw,0,Raw Beef,net.minecraft.item.ItemFood,
|
||||
Minecraft,item.beefCooked,0,Steak,net.minecraft.item.ItemFood,
|
||||
Minecraft,item.chickenRaw,0,Raw Chicken,net.minecraft.item.ItemFood,
|
||||
Minecraft,item.chickenCooked,0,Cooked Chicken,net.minecraft.item.ItemFood,
|
||||
Minecraft,item.rottenFlesh,0,Rotten Flesh,net.minecraft.item.ItemFood,
|
||||
Minecraft,item.enderPearl,0,Ender Pearl,net.minecraft.item.ItemEnderPearl,
|
||||
Minecraft,item.blazeRod,0,Blaze Rod,net.minecraft.item.Item,
|
||||
Minecraft,item.ghastTear,0,Ghast Tear,net.minecraft.item.Item,
|
||||
Minecraft,item.goldNugget,0,Gold Nugget,net.minecraft.item.Item,
|
||||
Minecraft,item.netherStalkSeeds,0,Nether Wart,net.minecraft.item.ItemSeeds,
|
||||
Minecraft,item.potion,0,Water Bottle,net.minecraft.item.ItemPotion,
|
||||
Minecraft,item.potion,16,Awkward Potion,net.minecraft.item.ItemPotion,
|
||||
Minecraft,item.potion,32,Thick Potion,net.minecraft.item.ItemPotion,
|
||||
Minecraft,item.potion,64,Mundane Potion,net.minecraft.item.ItemPotion,
|
||||
Minecraft,item.potion,8193,Potion of Regeneration,net.minecraft.item.ItemPotion,Potion of Regeneration
|
||||
Minecraft,item.potion,8194,Potion of Swiftness,net.minecraft.item.ItemPotion,Potion of Swiftness
|
||||
Minecraft,item.potion,8195,Potion of Fire Resistance,net.minecraft.item.ItemPotion,Potion of Fire Resistance
|
||||
Minecraft,item.potion,8196,Potion of Poison,net.minecraft.item.ItemPotion,Potion of Poison
|
||||
Minecraft,item.potion,8197,Potion of Healing,net.minecraft.item.ItemPotion,Potion of Healing
|
||||
Minecraft,item.potion,8198,Potion of Night Vision,net.minecraft.item.ItemPotion,Potion of Night Vision
|
||||
Minecraft,item.potion,8200,Potion of Weakness,net.minecraft.item.ItemPotion,Potion of Weakness
|
||||
Minecraft,item.potion,8201,Potion of Strength,net.minecraft.item.ItemPotion,Potion of Strength
|
||||
Minecraft,item.potion,8202,Potion of Slowness,net.minecraft.item.ItemPotion,
|
||||
Minecraft,item.potion,8204,Potion of Harming,net.minecraft.item.ItemPotion,
|
||||
Minecraft,item.potion,8206,Potion of Invisibility,net.minecraft.item.ItemPotion,
|
||||
Minecraft,item.potion,8225,Potion of Regeneration,net.minecraft.item.ItemPotion,
|
||||
Minecraft,item.potion,8226,Potion of Swiftness,net.minecraft.item.ItemPotion,
|
||||
Minecraft,item.potion,8228,Potion of Poison,net.minecraft.item.ItemPotion,
|
||||
Minecraft,item.potion,8229,Potion of Healing,net.minecraft.item.ItemPotion,
|
||||
Minecraft,item.potion,8233,Potion of Strength,net.minecraft.item.ItemPotion,
|
||||
Minecraft,item.potion,*,Potion of Harming,net.minecraft.item.ItemPotion,This is a generic potion entry
|
||||
Minecraft,item.potion,8257,Potion of Regeneration,net.minecraft.item.ItemPotion,
|
||||
Minecraft,item.potion,8258,Potion of Swiftness,net.minecraft.item.ItemPotion,
|
||||
Minecraft,item.potion,8259,Potion of Fire Resistance,net.minecraft.item.ItemPotion,
|
||||
Minecraft,item.potion,8260,Potion of Poison,net.minecraft.item.ItemPotion,
|
||||
Minecraft,item.potion,8262,Potion of Night Vision,net.minecraft.item.ItemPotion,
|
||||
Minecraft,item.potion,8264,Potion of Weakness,net.minecraft.item.ItemPotion,
|
||||
Minecraft,item.potion,8265,Potion of Strength,net.minecraft.item.ItemPotion,
|
||||
Minecraft,item.potion,8266,Potion of Slowness,net.minecraft.item.ItemPotion,
|
||||
Minecraft,item.potion,8270,Potion of Invisibility,net.minecraft.item.ItemPotion,
|
||||
Minecraft,item.potion,16384,Mundane Potion,net.minecraft.item.ItemPotion,
|
||||
Minecraft,item.potion,16385,Splash Potion of Regeneration,net.minecraft.item.ItemPotion,
|
||||
Minecraft,item.potion,16386,Splash Potion of Swiftness,net.minecraft.item.ItemPotion,
|
||||
Minecraft,item.potion,16387,Splash Potion of Fire Resistance,net.minecraft.item.ItemPotion,
|
||||
Minecraft,item.potion,16388,Splash Potion of Poison,net.minecraft.item.ItemPotion,
|
||||
Minecraft,item.potion,16389,Splash Potion of Healing,net.minecraft.item.ItemPotion,
|
||||
Minecraft,item.potion,16390,Splash Potion of Night Vision,net.minecraft.item.ItemPotion,
|
||||
Minecraft,item.potion,16392,Splash Potion of Weakness,net.minecraft.item.ItemPotion,
|
||||
Minecraft,item.potion,16393,Splash Potion of Strength,net.minecraft.item.ItemPotion,
|
||||
Minecraft,item.potion,16394,Splash Potion of Slowness,net.minecraft.item.ItemPotion,
|
||||
Minecraft,item.potion,16396,Splash Potion of Harming,net.minecraft.item.ItemPotion,
|
||||
Minecraft,item.potion,16398,Splash Potion of Invisibility,net.minecraft.item.ItemPotion,
|
||||
Minecraft,item.potion,16417,Splash Potion of Regeneration,net.minecraft.item.ItemPotion,
|
||||
Minecraft,item.potion,16418,Splash Potion of Swiftness,net.minecraft.item.ItemPotion,
|
||||
Minecraft,item.potion,16420,Splash Potion of Poison,net.minecraft.item.ItemPotion,
|
||||
Minecraft,item.potion,16421,Splash Potion of Healing,net.minecraft.item.ItemPotion,
|
||||
Minecraft,item.potion,16425,Splash Potion of Strength,net.minecraft.item.ItemPotion,
|
||||
Minecraft,item.potion,16428,Splash Potion of Harming,net.minecraft.item.ItemPotion,
|
||||
Minecraft,item.potion,16449,Splash Potion of Regeneration,net.minecraft.item.ItemPotion,
|
||||
Minecraft,item.potion,16450,Splash Potion of Swiftness,net.minecraft.item.ItemPotion,
|
||||
Minecraft,item.potion,16451,Splash Potion of Fire Resistance,net.minecraft.item.ItemPotion,
|
||||
Minecraft,item.potion,16452,Splash Potion of Poison,net.minecraft.item.ItemPotion,
|
||||
Minecraft,item.potion,16454,Splash Potion of Night Vision,net.minecraft.item.ItemPotion,
|
||||
Minecraft,item.potion,16456,Splash Potion of Weakness,net.minecraft.item.ItemPotion,
|
||||
Minecraft,item.potion,16457,Splash Potion of Strength,net.minecraft.item.ItemPotion,
|
||||
Minecraft,item.potion,16458,Splash Potion of Slowness,net.minecraft.item.ItemPotion,
|
||||
Minecraft,item.potion,16462,Splash Potion of Invisibility,net.minecraft.item.ItemPotion,
|
||||
Minecraft,item.glassBottle,0,Glass Bottle,net.minecraft.item.ItemGlassBottle,
|
||||
Minecraft,item.spiderEye,0,Spider Eye,net.minecraft.item.ItemFood,
|
||||
Minecraft,item.fermentedSpiderEye,0,Fermented Spider Eye,net.minecraft.item.Item,
|
||||
Minecraft,item.blazePowder,0,Blaze Powder,net.minecraft.item.Item,
|
||||
Minecraft,item.magmaCream,0,Magma Cream,net.minecraft.item.Item,
|
||||
Minecraft,item.brewingStand,0,Brewing Stand,net.minecraft.item.ItemReed,
|
||||
Minecraft,item.cauldron,0,Cauldron,net.minecraft.item.ItemReed,
|
||||
Minecraft,item.eyeOfEnder,0,Eye of Ender,net.minecraft.item.ItemEnderEye,
|
||||
Minecraft,item.speckledMelon,0,Glistering Melon,net.minecraft.item.Item,
|
||||
Minecraft,item.monsterPlacer,50,Spawn Creeper,net.minecraft.item.ItemMonsterPlacer,
|
||||
Minecraft,item.monsterPlacer,51,Spawn Skeleton,net.minecraft.item.ItemMonsterPlacer,
|
||||
Minecraft,item.monsterPlacer,52,Spawn Spider,net.minecraft.item.ItemMonsterPlacer,
|
||||
Minecraft,item.monsterPlacer,54,Spawn Zombie,net.minecraft.item.ItemMonsterPlacer,
|
||||
Minecraft,item.monsterPlacer,55,Spawn Slime,net.minecraft.item.ItemMonsterPlacer,
|
||||
Minecraft,item.monsterPlacer,56,Spawn Ghast,net.minecraft.item.ItemMonsterPlacer,
|
||||
Minecraft,item.monsterPlacer,57,Spawn Zombie Pigman,net.minecraft.item.ItemMonsterPlacer,
|
||||
Minecraft,item.monsterPlacer,58,Spawn Enderman,net.minecraft.item.ItemMonsterPlacer,
|
||||
Minecraft,item.monsterPlacer,59,Spawn Cave Spider,net.minecraft.item.ItemMonsterPlacer,
|
||||
Minecraft,item.monsterPlacer,60,Spawn Silverfish,net.minecraft.item.ItemMonsterPlacer,
|
||||
Minecraft,item.monsterPlacer,61,Spawn Blaze,net.minecraft.item.ItemMonsterPlacer,
|
||||
Minecraft,item.monsterPlacer,62,Spawn Magma Cube,net.minecraft.item.ItemMonsterPlacer,
|
||||
Minecraft,item.monsterPlacer,65,Spawn Bat,net.minecraft.item.ItemMonsterPlacer,
|
||||
Minecraft,item.monsterPlacer,66,Spawn Witch,net.minecraft.item.ItemMonsterPlacer,
|
||||
Minecraft,item.monsterPlacer,90,Spawn Pig,net.minecraft.item.ItemMonsterPlacer,
|
||||
Minecraft,item.monsterPlacer,91,Spawn Sheep,net.minecraft.item.ItemMonsterPlacer,
|
||||
Minecraft,item.monsterPlacer,92,Spawn Cow,net.minecraft.item.ItemMonsterPlacer,
|
||||
Minecraft,item.monsterPlacer,93,Spawn Chicken,net.minecraft.item.ItemMonsterPlacer,
|
||||
Minecraft,item.monsterPlacer,94,Spawn Squid,net.minecraft.item.ItemMonsterPlacer,
|
||||
Minecraft,item.monsterPlacer,95,Spawn Wolf,net.minecraft.item.ItemMonsterPlacer,
|
||||
Minecraft,item.monsterPlacer,96,Spawn Mooshroom,net.minecraft.item.ItemMonsterPlacer,
|
||||
Minecraft,item.monsterPlacer,97,Spawn Snow Golem,net.minecraft.item.ItemMonsterPlacer,
|
||||
Minecraft,item.monsterPlacer,98,Spawn Ocelot,net.minecraft.item.ItemMonsterPlacer,
|
||||
Minecraft,item.monsterPlacer,99,Spawn Iron Golem,net.minecraft.item.ItemMonsterPlacer,
|
||||
Minecraft,item.monsterPlacer,120,Spawn Villager,net.minecraft.item.ItemMonsterPlacer,
|
||||
Minecraft,item.expBottle,0,Bottle o' Enchanting,net.minecraft.item.ItemExpBottle,
|
||||
Minecraft,item.fireball,0,Fire Charge,net.minecraft.item.ItemFireball,
|
||||
Minecraft,item.writingBook,0,Book and Quill,net.minecraft.item.ItemWritableBook,
|
||||
Minecraft,item.writtenBook,0,Written Book,net.minecraft.item.ItemEditableBook,
|
||||
Minecraft,item.emerald,0,Emerald,net.minecraft.item.Item,
|
||||
Minecraft,item.frame,0,Item Frame,net.minecraft.item.ItemHangingEntity,
|
||||
Minecraft,item.flowerPot,0,Flower Pot,net.minecraft.item.ItemReed,
|
||||
Minecraft,item.carrots,0,Carrot,net.minecraft.item.ItemSeedFood,
|
||||
Minecraft,item.potato,0,Potato,net.minecraft.item.ItemSeedFood,
|
||||
Minecraft,item.potatoBaked,0,Baked Potato,net.minecraft.item.ItemFood,
|
||||
Minecraft,item.potatoPoisonous,0,Poisonous Potato,net.minecraft.item.ItemFood,
|
||||
Minecraft,item.emptyMap,0,Empty Map,net.minecraft.item.ItemEmptyMap,
|
||||
Minecraft,item.carrotGolden,0,Golden Carrot,net.minecraft.item.ItemFood,
|
||||
Minecraft,item.skull.skeleton,0,Skeleton Skull,net.minecraft.item.ItemSkull,
|
||||
Minecraft,item.skull.wither,1,Wither Skeleton Skull,net.minecraft.item.ItemSkull,
|
||||
Minecraft,item.skull.zombie,2,Zombie Head,net.minecraft.item.ItemSkull,
|
||||
Minecraft,item.skull.char,3,Head,net.minecraft.item.ItemSkull,
|
||||
Minecraft,item.skull.creeper,4,Creeper Head,net.minecraft.item.ItemSkull,
|
||||
Minecraft,item.carrotOnAStick,0,Carrot on a Stick,net.minecraft.item.ItemCarrotOnAStick,
|
||||
Minecraft,item.netherStar,0,Nether Star,net.minecraft.item.ItemSimpleFoiled,
|
||||
Minecraft,item.pumpkinPie,0,Pumpkin Pie,net.minecraft.item.ItemFood,
|
||||
Minecraft,item.fireworks,0,Firework Rocket,net.minecraft.item.ItemFirework,
|
||||
Minecraft,item.fireworksCharge,0,Firework Star,net.minecraft.item.ItemFireworkCharge,
|
||||
Minecraft,item.enchantedBook,0,Enchanted Book,net.minecraft.item.ItemEnchantedBook,
|
||||
Minecraft,item.comparator,0,Redstone Comparator,net.minecraft.item.ItemReed,
|
||||
Minecraft,item.netherbrick,0,Nether Brick,net.minecraft.item.Item,
|
||||
Minecraft,item.netherquartz,0,Nether Quartz,net.minecraft.item.Item,
|
||||
Minecraft,item.minecartTnt,0,Minecart with TNT,net.minecraft.item.ItemMinecart,
|
||||
Minecraft,item.minecartHopper,0,Minecart with Hopper,net.minecraft.item.ItemMinecart,
|
||||
BuildCraft|Factory,tile.miningWellBlock,0,Mining Well,buildcraft.core.ItemBlockBuildCraft,
|
||||
BuildCraft|Factory,tile.plainPipeBlock,0,Mining Pipe,buildcraft.core.ItemBlockBuildCraft,
|
||||
BuildCraft|Factory,tile.autoWorkbenchBlock,0,Autocrafting Table,buildcraft.core.ItemBlockBuildCraft,
|
||||
BuildCraft|Factory,tile.machineBlock,0,Quarry,buildcraft.core.ItemBlockBuildCraft,
|
||||
BuildCraft|Builders,tile.markerBlock,0,Land Mark,buildcraft.core.ItemBlockBuildCraft,
|
||||
BuildCraft|Builders,tile.fillerBlock,0,Filler,buildcraft.core.ItemBlockBuildCraft,
|
||||
BuildCraft|Builders,tile.builderBlock,0,Builder,buildcraft.core.ItemBlockBuildCraft,
|
||||
BuildCraft|Builders,tile.architectBlock,0,Architect Table,buildcraft.core.ItemBlockBuildCraft,
|
||||
BuildCraft|Factory,tile.frameBlock,0,Frame,buildcraft.core.ItemBlockBuildCraft,
|
||||
BuildCraft|Energy,tile.engineWood,0,Redstone Engine,buildcraft.energy.ItemEngine,
|
||||
BuildCraft|Energy,tile.engineStone,1,Stirling Engine,buildcraft.energy.ItemEngine,
|
||||
BuildCraft|Energy,tile.engineIron,2,Combustion Engine,buildcraft.energy.ItemEngine,
|
||||
BuildCraft|Factory,tile.pumpBlock,0,Pump,buildcraft.core.ItemBlockBuildCraft,
|
||||
BuildCraft|Factory,tile.tankBlock,0,Tank,buildcraft.core.ItemBlockBuildCraft,
|
||||
BuildCraft|Transport,tile.null,0,,net.minecraft.item.ItemBlock,
|
||||
BuildCraft|Factory,tile.refineryBlock,0,Refinery,buildcraft.core.ItemBlockBuildCraft,
|
||||
BuildCraft|Builders,tile.libraryBlock,0,Blueprint Library,buildcraft.core.ItemBlockBuildCraft,
|
||||
BuildCraft|Silicon,tile.laserBlock,0,Laser,buildcraft.core.ItemBlockBuildCraft,
|
||||
BuildCraft|Silicon,block.assemblyTableBlock,0,Assembly Table,buildcraft.silicon.ItemLaserTable,
|
||||
BuildCraft|Silicon,block.assemblyWorkbenchBlock,1,Advanced Crafting Table,buildcraft.silicon.ItemLaserTable,
|
||||
BuildCraft|Builders,tile.pathMarkerBlock,0,Path Marker,buildcraft.core.ItemBlockBuildCraft,
|
||||
BuildCraft|Factory,tile.blockHopper,0,Chute,buildcraft.core.ItemBlockBuildCraft,
|
||||
BuildCraft|Energy,tile.oilMoving,0,Oil,buildcraft.core.ItemBlockBuildCraft,
|
||||
BuildCraft|Energy,tile.oilStill,0,Oil,buildcraft.core.ItemBlockBuildCraft,
|
||||
BuildCraft|Core,tile.spring.water,0,Water Spring,buildcraft.core.ItemSpring,
|
||||
BuildCraft|Core,tile.spring.oil,1,Oil Spring,buildcraft.core.ItemSpring,
|
||||
Minecraft,item.record,0,Music Disc,net.minecraft.item.ItemRecord,
|
||||
Minecraft,item.record,0,Music Disc,net.minecraft.item.ItemRecord,
|
||||
Minecraft,item.record,0,Music Disc,net.minecraft.item.ItemRecord,
|
||||
Minecraft,item.record,0,Music Disc,net.minecraft.item.ItemRecord,
|
||||
Minecraft,item.record,0,Music Disc,net.minecraft.item.ItemRecord,
|
||||
Minecraft,item.record,0,Music Disc,net.minecraft.item.ItemRecord,
|
||||
Minecraft,item.record,0,Music Disc,net.minecraft.item.ItemRecord,
|
||||
Minecraft,item.record,0,Music Disc,net.minecraft.item.ItemRecord,
|
||||
Minecraft,item.record,0,Music Disc,net.minecraft.item.ItemRecord,
|
||||
Minecraft,item.record,0,Music Disc,net.minecraft.item.ItemRecord,
|
||||
Minecraft,item.record,0,Music Disc,net.minecraft.item.ItemRecord,
|
||||
Minecraft,item.record,0,Music Disc,net.minecraft.item.ItemRecord,
|
||||
EnderStorage,item.enderpouch,0,Ender Pouch,codechicken.enderstorage.storage.item.ItemEnderPouch,
|
||||
BuildCraft|Core,item.woodenGearItem,0,Wood Gear,buildcraft.core.ItemBuildCraft,
|
||||
BuildCraft|Core,item.stoneGearItem,0,Stone Gear,buildcraft.core.ItemBuildCraft,
|
||||
BuildCraft|Core,item.ironGearItem,0,Iron Gear,buildcraft.core.ItemBuildCraft,
|
||||
BuildCraft|Core,item.goldGearItem,0,Gold Gear,buildcraft.core.ItemBuildCraft,
|
||||
BuildCraft|Core,item.diamondGearItem,0,Diamond Gear,buildcraft.core.ItemBuildCraft,
|
||||
BuildCraft|Builders,item.templateItem,0,Template,buildcraft.builders.ItemBptTemplate,
|
||||
BuildCraft|Core,item.wrenchItem,0,Wrench,buildcraft.core.ItemWrench,
|
||||
BuildCraft|Energy,item.bucketOil,0,Oil Bucket,buildcraft.energy.ItemBucketOil,
|
||||
BuildCraft|Energy,item.fuel,0,Fuel,buildcraft.core.ItemBuildCraft,
|
||||
BuildCraft|Transport,item.pipeWaterproof,0,Pipe Waterproof,buildcraft.core.ItemBuildCraft,
|
||||
BuildCraft|Energy,item.bucketFuel,0,Fuel Bucket,buildcraft.core.ItemBuildCraft,
|
||||
BuildCraft|Transport,item.pipeGate.0,0,Gate,buildcraft.transport.ItemGate,
|
||||
BuildCraft|Transport,item.pipeGate.1,1,Iron AND Gate,buildcraft.transport.ItemGate,
|
||||
BuildCraft|Transport,item.pipeGate.2,2,Iron OR Gate,buildcraft.transport.ItemGate,
|
||||
BuildCraft|Transport,item.pipeGate.3,3,Gold AND Gate,buildcraft.transport.ItemGate,
|
||||
BuildCraft|Transport,item.pipeGate.4,4,Gold OR Gate,buildcraft.transport.ItemGate,
|
||||
BuildCraft|Transport,item.pipeGate.5,5,Diamond AND Gate,buildcraft.transport.ItemGate,
|
||||
BuildCraft|Transport,item.pipeGate.6,6,Diamond OR Gate,buildcraft.transport.ItemGate,
|
||||
BuildCraft|Transport,item.redPipeWire,0,Red Pipe Wire,buildcraft.core.ItemBuildCraft,
|
||||
BuildCraft|Transport,item.bluePipeWire,0,Blue Pipe Wire,buildcraft.core.ItemBuildCraft,
|
||||
BuildCraft|Transport,item.greenPipeWire,0,Green Pipe Wire,buildcraft.core.ItemBuildCraft,
|
||||
BuildCraft|Transport,item.yellowPipeWire,0,Yellow Pipe Wire,buildcraft.core.ItemBuildCraft,
|
||||
BuildCraft|Silicon,item.redstoneChipset.0,0,Redstone Chipset,buildcraft.core.ItemRedstoneChipset,
|
||||
BuildCraft|Silicon,item.redstoneChipset.1,1,Redstone Iron Chipset,buildcraft.core.ItemRedstoneChipset,
|
||||
BuildCraft|Silicon,item.redstoneChipset.2,2,Redstone Golden Chipset,buildcraft.core.ItemRedstoneChipset,
|
||||
BuildCraft|Silicon,item.redstoneChipset.3,3,Redstone Diamond Chipset,buildcraft.core.ItemRedstoneChipset,
|
||||
BuildCraft|Silicon,item.redstoneChipset.4,4,Pulsating Chipset,buildcraft.core.ItemRedstoneChipset,
|
||||
BuildCraft|Builders,item.blueprintItem,0,Blueprint,buildcraft.builders.ItemBptBluePrint,
|
||||
BuildCraft|Transport,item.pipeGateAutarchic.0,0,Autarchic Gate,buildcraft.transport.ItemGate,
|
||||
BuildCraft|Transport,item.pipeGateAutarchic.1,1,Autarchic Iron AND Gate,buildcraft.transport.ItemGate,
|
||||
BuildCraft|Transport,item.pipeGateAutarchic.2,2,Autarchic Iron OR Gate,buildcraft.transport.ItemGate,
|
||||
BuildCraft|Transport,item.pipeGateAutarchic.3,3,Autarchic Gold AND Gate,buildcraft.transport.ItemGate,
|
||||
BuildCraft|Transport,item.pipeGateAutarchic.4,4,Autarchic Gold OR Gate,buildcraft.transport.ItemGate,
|
||||
BuildCraft|Transport,item.pipeGateAutarchic.5,5,Autarchic Diamond AND Gate,buildcraft.transport.ItemGate,
|
||||
BuildCraft|Transport,item.pipeGateAutarchic.6,6,Autarchic Diamond OR Gate,buildcraft.transport.ItemGate,
|
||||
BuildCraft|Transport,item.Facade,16,Facade: Stone,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,48,Facade: Dirt,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,64,Facade: Cobblestone,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,80,Facade: Oak Wood Planks,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,81,Facade: Spruce Wood Planks,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,82,Facade: Birch Wood Planks,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,83,Facade: Jungle Wood Planks,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,192,Facade: Sand,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,208,Facade: Gravel,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,224,Facade: Gold Ore,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,240,Facade: Iron Ore,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,256,Facade: Coal Ore,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,272,Facade: Oak Wood,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,273,Facade: Spruce Wood,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,274,Facade: Birch Wood,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,275,Facade: Jungle Wood,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,320,Facade: Glass,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,336,Facade: Lapis Lazuli Ore,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,352,Facade: Lapis Lazuli Block,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,384,Facade: Sandstone,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,385,Facade: Chiseled Sandstone,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,386,Facade: Smooth Sandstone,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,560,Facade: Wool,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,561,Facade: Orange Wool,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,562,Facade: Magenta Wool,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,563,Facade: Light Blue Wool,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,564,Facade: Yellow Wool,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,565,Facade: Lime Wool,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,566,Facade: Pink Wool,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,567,Facade: Gray Wool,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,568,Facade: Light Gray Wool,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,569,Facade: Cyan Wool,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,570,Facade: Purple Wool,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,571,Facade: Blue Wool,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,572,Facade: Brown Wool,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,573,Facade: Green Wool,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,574,Facade: Red Wool,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,575,Facade: Black Wool,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,656,Facade: Block of Gold,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,672,Facade: Block of Iron,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,688,Facade: Stone Slab,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,689,Facade: Sandstone Slab,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,690,Facade: Wooden Slab,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,691,Facade: Cobblestone Slab,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,692,Facade: Bricks Slab,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,693,Facade: Stone Bricks Slab,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,694,Facade: Nether Brick Slab,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,695,Facade: Quartz Slab,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,720,Facade: Bricks,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,736,Facade: TNT,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,752,Facade: Bookshelf,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,768,Facade: Moss Stone,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,784,Facade: Obsidian,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,896,Facade: Diamond Ore,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,912,Facade: Block of Diamond,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,928,Facade: Crafting Table,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,1168,Facade: Redstone Ore,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,1280,Facade: Snow,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,1312,Facade: Clay,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,1376,Facade: Pumpkin,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,1392,Facade: Netherrack,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,1408,Facade: Soul Sand,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,1424,Facade: Glowstone,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,1456,Facade: Jack 'o' Lantern,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,1552,Facade: Stone Monster Egg,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,1553,Facade: Cobblestone Monster Egg,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,1554,Facade: Stone Brick Monster Egg,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,1568,Facade: Stone Bricks,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,1569,Facade: Mossy Stone Bricks,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,1570,Facade: Cracked Stone Bricks,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,1571,Facade: Chiseled Stone Bricks,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,1584,Facade: Mushroom,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,1648,Facade: Melon,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,1760,Facade: Mycelium,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,1792,Facade: Nether Brick,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,1936,Facade: End Stone,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,1968,Facade: Redstone Lamp,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,2000,Facade: Oak Wood Slab,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,2001,Facade: Spruce Wood Slab,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,2002,Facade: Birch Wood Slab,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,2003,Facade: Jungle Wood Slab,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,2064,Facade: Emerald Ore,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,2128,Facade: Block of Emerald,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,2432,Facade: Block of Redstone,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,2448,Facade: Nether Quartz Ore,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,2480,Facade: Block of Quartz,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,2481,Facade: Chiseled Quartz Block,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.Facade,2482,Facade: Pillar Quartz Block,buildcraft.transport.ItemFacade,
|
||||
BuildCraft|Transport,item.PipePlug,0,Pipe Plug,buildcraft.transport.ItemPlug,
|
||||
BuildCraft|Transport,item.PipeItemsWood,0,Wooden Transport Pipe,buildcraft.transport.ItemPipe,
|
||||
BuildCraft|Transport,item.PipeItemsCobblestone,0,Cobblestone Transport Pipe,buildcraft.transport.ItemPipe,
|
||||
BuildCraft|Transport,item.PipeItemsStone,0,Stone Transport Pipe,buildcraft.transport.ItemPipe,
|
||||
BuildCraft|Transport,item.PipeItemsIron,0,Iron Transport Pipe,buildcraft.transport.ItemPipe,
|
||||
BuildCraft|Transport,item.PipeItemsGold,0,Golden Transport Pipe,buildcraft.transport.ItemPipe,
|
||||
BuildCraft|Transport,item.PipeItemsDiamond,0,Diamond Transport Pipe,buildcraft.transport.ItemPipe,
|
||||
BuildCraft|Transport,item.PipeItemsObsidian,0,Obsidian Transport Pipe,buildcraft.transport.ItemPipe,
|
||||
BuildCraft|Transport,item.PipeItemsEmerald,0,Emerald Transport Pipe,buildcraft.transport.ItemPipe,
|
||||
BuildCraft|Transport,item.PipeLiquidsWood,0,Wooden Waterproof Pipe,buildcraft.transport.ItemPipe,
|
||||
BuildCraft|Transport,item.PipeLiquidsCobblestone,0,Cobblestone Waterproof Pipe,buildcraft.transport.ItemPipe,
|
||||
BuildCraft|Transport,item.PipeLiquidsStone,0,Stone Waterproof Pipe,buildcraft.transport.ItemPipe,
|
||||
BuildCraft|Transport,item.PipeLiquidsIron,0,Iron Waterproof Pipe,buildcraft.transport.ItemPipe,
|
||||
BuildCraft|Transport,item.PipeLiquidsGold,0,Golden Waterproof Pipe,buildcraft.transport.ItemPipe,
|
||||
BuildCraft|Transport,item.PipeLiquidsEmerald,0,Emerald Waterproof Pipe,buildcraft.transport.ItemPipe,
|
||||
BuildCraft|Transport,item.PipePowerWood,0,Wooden Conductive Pipe,buildcraft.transport.ItemPipe,
|
||||
BuildCraft|Transport,item.PipePowerStone,0,Stone Conductive Pipe,buildcraft.transport.ItemPipe,
|
||||
BuildCraft|Transport,item.PipePowerGold,0,Golden Conductive Pipe,buildcraft.transport.ItemPipe,
|
||||
BuildCraft|Transport,item.PipeItemsVoid,0,Void Transport Pipe,buildcraft.transport.ItemPipe,
|
||||
BuildCraft|Transport,item.PipeLiquidsVoid,0,Void Waterproof Pipe,buildcraft.transport.ItemPipe,
|
||||
BuildCraft|Transport,item.PipeItemsSandstone,0,Sandstone Transport Pipe,buildcraft.transport.ItemPipe,
|
||||
BuildCraft|Transport,item.PipeLiquidsSandstone,0,Sandstone Waterproof Pipe,buildcraft.transport.ItemPipe,
|
||||
BuildCraft|Transport,item.PipeStructureCobblestone,0,Cobblestone Structure Pipe,buildcraft.transport.ItemPipe,
|
||||
|
@@ -0,0 +1,13 @@
|
||||
>>>>tile.stone
|
||||
This is basic stone.
|
||||
>>>>item.swordDiamond
|
||||
This is a diamond sword.
|
||||
Good at killing zombies and creepers.
|
||||
>>>>item.pickaxeWood
|
||||
Your very first pickaxe.
|
||||
Not good at anything, beside getting splinters.
|
||||
>>>>item.pickaxeDiamond
|
||||
The ultimate pickaxe, made out of refined diamonds.
|
||||
Shinnnnyyyy.
|
||||
>>>>item.pickaxeIron
|
||||
Sturdy, solid, efficient. Your best friend.
|
||||
@@ -0,0 +1,5 @@
|
||||
Minecraft,tile.stone,,,This is basic stone.
|
||||
Minecraft,item.swordDiamond,,,This is a diamond sword.$Good at killing zombies and creepers.
|
||||
Minecraft,item.pickaxeWood,,,"Your very first pickaxe.$Not good at anything, beside getting splinters."
|
||||
Minecraft,item.pickaxeDiamond,,,"The ultimate pickaxe, made out of refined diamonds."
|
||||
Minecraft,item.pickaxeIron,,,"Sturdy, solid, efficient. Your best friend."
|
||||
|
@@ -2,13 +2,9 @@ package mcp.mobius.waila.api;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@Deprecated
|
||||
public interface IWailaBlock {
|
||||
/*
|
||||
* Use this method to return an item stack in case the default lookup system fails.
|
||||
@@ -34,4 +30,5 @@ public interface IWailaBlock {
|
||||
|
||||
List<String> getWailaHead(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config);
|
||||
List<String> getWailaBody(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config);
|
||||
List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config);
|
||||
}
|
||||
Loaded 100 of 226 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user