diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
new file mode 100644
index 00000000..d707932d
--- /dev/null
+++ b/.github/FUNDING.yml
@@ -0,0 +1,4 @@
+# These are supported funding model platforms
+
+ko_fi: queengooborg
+custom: https://paypal.me/VinylDarkscratch
diff --git a/.gitignore b/.gitignore
index a6c3306e..567ee436 100644
--- a/.gitignore
+++ b/.gitignore
@@ -22,3 +22,5 @@ build
# other
eclipse
run
+run-data
+src/generated
diff --git a/LICENSE.md b/LICENSE.md
index 8dada3ed..12aca0a2 100644
--- a/LICENSE.md
+++ b/LICENSE.md
@@ -1,201 +1,674 @@
- 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.
+GNU GENERAL PUBLIC LICENSE
+Version 3, 29 June 2007
+
+Copyright (C) 2007 Free Software Foundation, Inc.
+Everyone is permitted to copy and distribute verbatim copies
+of this license document, but changing it is not allowed.
+
+ Preamble
+
+The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+0. Definitions.
+
+"This License" refers to version 3 of the GNU General Public License.
+
+"Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+"The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+1. Source Code.
+
+The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+The Corresponding Source for a work in source code form is that
+same work.
+
+2. Basic Permissions.
+
+All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+4. Conveying Verbatim Copies.
+
+You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+5. Conveying Modified Source Versions.
+
+You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+6. Conveying Non-Source Forms.
+
+You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+"Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+7. Additional Terms.
+
+"Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+8. Termination.
+
+You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+9. Acceptance Not Required for Having Copies.
+
+You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+10. Automatic Licensing of Downstream Recipients.
+
+Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+11. Patents.
+
+A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+12. No Surrender of Others' Freedom.
+
+If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+13. Use with the GNU Affero General Public License.
+
+Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+14. Revised Versions of this License.
+
+The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+15. Disclaimer of Warranty.
+
+THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+16. Limitation of Liability.
+
+IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+17. Interpretation of Sections 15 and 16.
+
+If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ Copyright (C)
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+.
+
+The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+.
\ No newline at end of file
diff --git a/README.md b/README.md
index d9d9889a..216e3359 100644
--- a/README.md
+++ b/README.md
@@ -1,56 +1,126 @@
-# PlusTiC (Minus Bad) AKA xXx_MoreToolMats_xXx
-Minecraft mod for adding new tools to and integrating various mods with Tinkers Construct
-
-CurseForge page: https://www.curseforge.com/minecraft/mc-mods/plusticminusbad
-## New tool(s)
-- Katana. A fast two-handed weapon that deals increasing damage the more mobs you kill.
-- Laser Gun. A ranged weapon that requires durability and energy (Forge, Tesla, RF).
-## A note about Natural Pledge
-Starting in 5.1.2.0, PlusTiC forces out and *overrides* Natural Pledge TiC materials by default. This can be changed in the config so that PlusTiC does *not* add Botania materials if Natural Pledge is loaded.
-## Supported mods
-- LandCore (by this mod's author)
-- LandCraft (also by this mod's author)
-- Biomes o Plenty by Glitchfiend
-- Project Red by MrTJP
-- Mekanism by aidencbrady
-- Botania by Vazkii
-- Advanced Rocketry by zmaster587
-- ArmorPlus by Moritz30
-- Thermal Foundation by CoFH
-- Draconic Evolution by brandon3055
-- Actually Additions by Ellpeck
-- Natura by mDiyo
-- Psi by Vazkii
-- Avaritia by brandon3055
-- MineFactory Reloaded by skyboy026
-- Galacticraft by micdoodle8
-- Survivalist by gigaherz
-- ProjectE by sinkillerj
-- Gems+ by RobZ51
-- Applied Energistics 2 by AlgorithmX2 (Llamagistics by thiakil should work as well)
-- Environmental Tech by ValkyrieofNight
-- Thaumcraft by azanor
-- Simply Jetpacks by Tomson124
-## Using the source and building
-After cloning this repository, run the command (with working directory in the folder with the repository)
-```
-./gradlew setupDecompWorkspace
-```
-For Eclipse, run
-```
-./gradlew eclipse
-```
-and add the jars in ./libs to the build path.
-Build with
+# PlusTiC Reforged
+
+Remember the classic [PlusTiC mod](https://www.curseforge.com/minecraft/mc-mods/plusticminusbad) for 1.12.2? Ever wanted to see an update for modern Minecraft versions? Well, look no further, because PlusTiC Reforged is here!
+
+> [!NOTE]
+> PlusTiC Reforged is still in early development stages. As such, bugs and crashes may be present. Please report any bugs to the project's issue tracker so they may be fixed.
+
+## About
+
+PlusTiC Reforged is a compatibility layer between Tinkers' Construct and various other mods, adding support for new material types that the mods introduce, such as Steel, Osmium, Refined Obsidian, Dark Matter and more. PlusTiC Reforged is a version of the original PlusTiC mod that has been rewritten and ported for newer versions of Minecraft.
+
+## Supported Mods
+
+See [Mod Support](./docs/Mod%20Support.md) for a list of mods that PlusTiC Reforged supports.
+
+## New Materials
+
+See [Materials](./docs/Materials.md) for a list of materials that PlusTiC Reforged introduces, as well as what items are accepted to create that material.
+
+## New Tools
+
+- Katana: a fast two-handed weapon that deals increasing damage the more mobs you kill.
+- Laser Gun: a ranged weapon that requires durability and energy.
+
+## Frequently Asked Questions (FAQ)
+
+### What happened to the original PlusTiC mod?
+
+PlusTiC was originally developed by Landmaster, a developer with a rich history in developing game mods. Landmaster, along with a number of various contributors on GitHub, had built the majority of the mod into what it is today.
+
+However, the mods that Landmaster developed have all been removed from CurseForge, due to an [introduction of malicious code that would prevent a specific player from being able to log onto any servers](https://github.com/TeamDman/PlusTiC/commit/9147573c6d514ff88825a8cc1ab8438f9c80a14c). While they had [removed the code and released a new version just a few days later](https://github.com/TeamDman/PlusTiC/commit/d0b4d17ce542a186a1660c7fac6083aa3eea37aa#diff-a516bfe6aaa4dd4f38abbd0de3bdd0dbL197-L204), the damage was already done. Since then, their mods have completely vanished from the internet, including the GitHub repositories.
+
+PlusTiC was eventually forked by TeamDman in 2020, released as "xXx_MoreToolMats_xXx (a PlusTiC fork without the evil)", and maintained by them for almost exactly three years. Development on the original mod had unfortunately come to a complete halt.
+
+There was one feature in particular that I was looking forward to seeing at some point: an update for modern versions of Minecraft. Since it was never updated for versions beyond 1.12.2, it was one of the mods that kept me from upgrading my own modpack for playing with friends. As such, I wanted to try my hand at updating the mod for newer versions of Minecraft, so I started developing PlusTiC Reforged.
+
+### Why is this version called "Reforged"?
+
+Contrary to what some may think, the name "Reforged" wasn't inspired by the NeoForge (or original Forge) modloader. The word "reforged" came from the idea of blacksmiths forging new tools/weapons, since Tinkers' Construct is all about smithing.
+
+Originally, I picked the name to distinguish the port of the original PlusTiC mod. But upon further researching what would be required to perform the port and realizing that a complete rewrite would be far better, the name became much more fitting, like a tool that's melted back into molten metal and reforged.
+
+### Why not just use/contribute to Materialis instead?
+
+Similar to PlusTiC, [Materialis](https://www.curseforge.com/minecraft/mc-mods/materialis) is a compatibility layer between Tinkers' Construct and various other mods, adding support for new material types. Personally, I had used PlusTiC in my own modpack and had grown accustomed to it, and had only learned about Materialis while I was developing PlusTiC Reforged. I have not tried it myself, but it seems to have a good userbase as well.
+
+However, I found that Materialis did not support some of the mods that PlusTiC did, though it also introduced support for other mods PlusTiC did not. I had considered contributing to Materialis to add support, but I was not too fond of the way the mod was structured from a development perspective, and PlusTiC (at the time of writing) seems to have a stronger userbase based on download count. I also wanted to learn more about Java and Minecraft modding, so I decided the best path forward was to continue the legacy of PlusTiC and develop PlusTiC Reforged.
+
+One minor detail is that I personally like the name "PlusTiC" better -- it's shorter, easier to remember (since it's so similar to "plastic"), and has a nice ring to it!
+
+### Will you port this mod to Fabric or Quilt?
+
+Tinkers' Construct itself doesn't support Fabric/Quilt, so...definitely not.
+
+If Tinker's Construct _did_ introduce support for Fabric/Quilt, however, I probably still wouldn't implement support. It's not because I dislike those modloaders, but rather that this is 100% a hobby project, and I just don't have the time to learn different modloaders.
+
+### For versions of Minecraft that NeoForge is available, will you port it to the original Forge too?
+
+I don't particularly plan to support the original Forge from Minecraft 1.20.2 and up, which are the versions that NeoForge is available for. While it should "just work" as they share similar codebases (at least for now), my time to work on this is limited.
+
+### Are you going to add code that blocks a specific player's UUID from joining servers?
+
+Of course not, that would be silly and stupid!
+
+### Will you add support for [mod]?
+
+I'm always open to adding support for new mods! If you have a mod that you'd like to see supported and it does not already have its own support, please open an issue on the Issues page on the GitHub repository. Please note that it may take some time to add support for new mods, as I have a limited amount of time to work on this project.
+
+If you are a developer and would like to add support for a mod yourself, please feel free to submit a pull request on the GitHub repository. I would be happy to include your changes in the mod!
+
+### Will you add [feature]?
+
+Please open an issue on the Issues page on the GitHub repository with your suggestion, and I will consider it! Please note that it may take some time to add new features, as I have a limited amount of time to work on this project.
+
+### Will you backport [feature] to [older Minecraft version]?
+
+I'm afraid not, sorry. Due to my limited time to work on this project, I am only able to support the latest version of Minecraft that I am working on, or if I'm working on porting the mod to a newer version, the latest Minecraft version the mod is available for. For example, once the version for 1.16.5 is released, I will no longer support any versions of Minecraft older than 1.16.5.
+
+### May I use this mod in my modpack?
+
+Of course, you don't even need to ask! Just make sure that your modpack complies with the licenses of all the mods you include, and include a link to the mod's CurseForge page in your modpack's description!
+
+### Where can I download the mod?
+
+Downloads for PlusTiC Reforged are available in three locations:
+- The [CurseForge page](https://www.curseforge.com/minecraft/mc-mods/plustic-reforged)
+- The [Modrinth page](https://modrinth.com/project/plustic-reforged)
+- The [GitHub repository's Releases page](https://github.com/queengooborg/PlusTiC-Reforged/releases)
+
+Please be weary of downloads from any other sources, as they are not controlled by me and may contain malicious code.
+
+### What is the license for this mod?
+
+PlusTiC Reforged is licensed under the GNU GPL v3 License. You can view the full license in the [LICENSE file](./LICENSE) in the root of the repository.
+
+The original PlusTiC mod was licensed under the Apache License 2.0. Since the Reforged edition is a complete rewrite of the original mod, it does not need to be licensed under the same license.
+
+## Contributing
+
+### Building from Source
+
+The easiest way to build the mod is to use IntelliJ IDEA or Eclipse. Simply import the project as a Gradle project in your IDE of choice, and then run the `gen[IDE]Runs` task to generate the run configurations. Then, you can run the `runData` task to generate the data files, the `runClient` task to run the mod in a test environment, or the `build` task to build a JAR file.
+
+If you prefer to build the mod from the command line, you can use the Gradle wrapper included with the project:
+
```
-./gradlew clean
+./gradlew
+./gradlew prepareRuns
+./gradlew runData
+./gradlew runClient
./gradlew build
```
-## Developers/Credits
-Current maintainer: @TeamDman
-Old Creator/Lead Developer: @Landmaster
+### Localizations
+
+If you are interested in localizing this mod for your language, I would love to include the localizations! Simply submit a [pull request to the GitHub repository](https://github.com/queengooborg/plustic-reforged/pulls) adding the new language file with all the localizations, and I will happily add it in!
+
+### Bug Reports
+
+If you find any bugs, please report them on the [Issues page on the GitHub repository](https://github.com/queengooborg/plustic-reforged/issues). Please include as much information as possible, such as the version of the mod you are using, the version of Minecraft you are playing on, any other mods you have installed, and a crash log or other log file as applicable.
+
+## Developers/Credits
-Chinese translation: @DYColdWind
+PlusTiC Reforged maintained by @queengooborg and [various contributors on GitHub](https://github.com/queengooborg/PlusTiC-Reforged/graphs/contributors)
-New weapon textures: @Tenebris11
+Original PlusTiC developed by @Landmaster, then maintained by @TeamDman
diff --git a/build.gradle b/build.gradle
index d11e647c..95eda4a7 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,184 +1,254 @@
-/**
- @updator: TeamDman
- @changes: - Updated forge version
- - Changed Psi to maven dependency
- -
- */
-buildscript {
- repositories {
- mavenCentral()
- maven {
- name = "forge"
- url = "https://files.minecraftforge.net/maven"
- }
- maven {
- name = "sonatype"
- url = "https://oss.sonatype.org/content/repositories/snapshots/"
- }
- }
- dependencies {
- classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
- }
-}
-
-plugins {
- id 'java'
- id 'idea'
-}
-
-apply plugin: 'net.minecraftforge.gradle.forge'
-
-version = "8.0.6"
-group= "landmaster.plustic" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
-archivesBaseName = "plustic"
-
-repositories {
- maven {
- url "https://dvs1.progwml6.com/files/maven"
- }
- maven {
- url "https://maven.covers1624.net"
- }
- maven {
- url "https://maven.blamejared.com"
- }
- maven {
- url "https://maven.chaosfield.at"
- }
- maven {
- url "https://minecraft.curseforge.com/api/maven/"
- }
- maven {
- url "https://maven.mcmoddev.com"
- }
- maven {
- url "https://tehnut.info/maven"
- }
-}
-
-sourceCompatibility = targetCompatibility = "1.8" // Need this here so eclipse task generates correctly.
-compileJava {
- sourceCompatibility = targetCompatibility = "1.8"
-}
-
-minecraft {
- version = "1.12.2-14.23.5.2838"
- runDir = "run"
-
- // the mappings can be changed at any time, and must be in the following format.
- // snapshot_YYYYMMDD snapshot are built nightly.
- // stable_# stables are built at the discretion of the MCP team.
- // Use non-default mappings at your own risk. they may not allways work.
- // simply re-run your setup task after changing the mappings to update your workspace.
- mappings = "stable_39"
- // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
- replaceIn "ModInfo.java"
- replace "@VERSION@", project.version
-}
-
-dependencies {
- // you may put jars on which you depend on in ./libs
- // or you may define them like so..
- //compile "some.group:artifact:version:classifier"
- //compile "some.group:artifact:version"
- implementation "CraftTweaker2:CraftTweaker2-MC1120-Main:1.12-4.1.20.646"
-
- // real examples
- //compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env
- //compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env
-
- // the 'provided' configuration is for optional dependencies that exist at compile-time but might not at runtime.
- //provided 'com.mod-buildcraft:buildcraft:6.0.8:dev'
-
- // the deobf configurations: 'deobfCompile' and 'deobfProvided' are the same as the normal compile and provided,
- // except that these dependencies get remapped to your current MCP mappings
- //deobfCompile 'com.mod-buildcraft:buildcraft:6.0.8:dev'
- //deobfProvided 'com.mod-buildcraft:buildcraft:6.0.8:dev'
-
- // for more info...
- // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
- // http://www.gradle.org/docs/current/userguide/dependency_management.html
-
-// compile files("./libs/ActuallyAdditions-1.12.2-r149.jar")
-// compile files("./libs/AoA3-3.1.2.b.jar")
-// compile files("./libs/AoA3-3.1.2.b.jar")
-// compile files("./libs/AutoRegLib-1.3-32.jar")
-// compile files("./libs/Baubles-1.12-1.5.2.jar")
-// compile files("./libs/Botania r1.9-346.jar")
-// compile files("./libs/CraftTweaker2-1.12-4.1.20.574.jar")
-// compile files("./libs/Forgelin-1.8.4.jar")
-// compile files("./libs/Hwyla-1.8.26-B41_1.12.2.jar")
-// compile files("./libs/MTLib-3.0.6.jar")
-// compile files("./libs/Mantle-1.12-1.3.3.55.jar")
-// compile files("./libs/Psi-r1.1-78.1.jar")
-// compile files("./libs/RedstoneFlux-1.12-2.1.1.1-universal.jar")
-// compile files("./libs/SimplyJetpacks2-1.12.2-2.2.10.63.jar")
-// compile files("./libs/TConstruct-1.12.2-2.13.0.183.jar")
-// compile files("./libs/Tesla-1.12.2-1.0.63.jar")
-// compile files("./libs/appliedenergistics2-rv6-stable-6.jar")
-// compile files("./libs/astralsorcery-1.12.2-1.10.19.jar")
-// compile files("./libs/conarm-1.12.2-1.2.0.2.jar")
-// compile files("./libs/industrialforegoing-1.12.2-1.11.7-217-deobf.jar")
-// compile files("./libs/jei_1.12.2-4.16.1.301.jar")
-// compile files("./libs/modtweaker-4.0.15.jar")
-// compile files("./libs/natura-1.12.2-4.3.2.42.jar")
-// compile files("./libs/tesla-core-lib-1.12.2-1.0.17.jar")
-// deobfCompile "CraftTweaker2:CraftTweaker2-MC1120-Main:1.12-4.1.11.494"
-// deobfCompile "baubles:Baubles:1.12:1.5.2"
-// deobfCompile "cofh:RedstoneFlux:1.12-2.0.1.2:universal"
-// deobfCompile "de.ellpeck.actuallyadditions:ActuallyAdditions:1.12.2-r143"
-// deobfCompile "mcp.mobius.waila:Hwyla:1.8.23-B38_1.12"
-// deobfCompile "net.darkhax.tesla:Tesla-1.12.2:1.0.63"
-// deobfCompile "slimeknights.mantle:Mantle:1.12-1.3.3.52"
-// deobfCompile "slimeknights:TConstruct:1.12.2-2.12.0.135"
-// deobfCompile "vazkii.psi:Psi:r1.1-72.21"
-
-// compile files("./libs/CraftTweaker2-API-4.1.9.491-deobf.jar")
-// compile files("./libs/Psi-r1.1-52-deobf.jar")
-// compileOnly fg.deobf(files("./libs/CraftTweaker2-API-4.1.9.491-deobf.jar"))
-// compileOnly fg.deobf(files("./libs/CraftTweaker2-MC1120-Main-1.12-4.1.9.491-deobf.jar"))
-// runtimeOnly fg.deobf(group: "CraftTweaker2", name:"CraftTweaker2-MC1120-Main", version: "1.12-4.1.9.491")
-// runtimeOnly fg.deobf(group: "CraftTweaker2", name:"CraftTweaker2-MC1120-Main", version: "1.12-4.1.9.491")
-}
-
-idea {
- module {
- sourceDirs += file("src/main/java")
- ext.set("resourceDirs", [])
- resourceDirs += file("src/main/resources")
- }
-}
-
-//sourceSets {
-// main {
-// output.resourcesDir = output.classesDir
-// }
-//}
-
-//
-processResources {
- exclude '**/*.xcf'
-
- // this will ensure that this task is redone when the versions change.
- inputs.property "version", project.version
- inputs.property "mcversion", project.minecraft.version
-
- // replace stuff in mcmod.info, nothing else
- from(sourceSets.main.resources.srcDirs) {
- include 'mcmod.info'
-
- // replace version and mcversion
- expand 'version':project.version, 'mcversion':project.minecraft.version
- }
-
- // copy everything else, thats not the mcmod.info
- from(sourceSets.main.resources.srcDirs) {
- exclude 'mcmod.info'
- }
-}
-
-jar {
- manifest {
- attributes 'FMLAT': 'plustic_at.cfg'
- }
-}
\ No newline at end of file
+plugins {
+ id 'java'
+ id 'eclipse'
+ id 'idea'
+ id 'maven-publish'
+ id 'net.minecraftforge.gradle' version '[6.0,6.2)'
+}
+
+version = mod_version + '-mc' + minecraft_version
+group = mod_group_id
+
+base {
+ archivesName = mod_id
+}
+
+// Mojang ships Java 17 to end users in 1.18+
+java.toolchain.languageVersion = JavaLanguageVersion.of(17)
+
+println "Java: ${System.getProperty 'java.version'}, JVM: ${System.getProperty 'java.vm.version'} (${System.getProperty 'java.vendor'}), Arch: ${System.getProperty 'os.arch'}"
+
+minecraft {
+ mappings channel: mapping_channel, version: mapping_version
+
+ copyIdeResources = true
+
+ // When true, this property will have all Eclipse/IntelliJ IDEA run configurations run the "prepareX" task for the given run configuration before launching the game.
+ // In most cases, it is not necessary to enable.
+ // enableEclipsePrepareRuns = true
+ enableIdeaPrepareRuns = true
+
+ // When true, this property will add the folder name of all declared run configurations to generated IDE run configurations.
+ // The folder name can be set on a run configuration using the "folderName" property.
+ // By default, the folder name of a run configuration is the name of the Gradle project containing it.
+ generateRunFolders = true
+
+ // This property enables access transformers for use in development.
+ // They will be applied to the Minecraft artifact.
+ // The access transformer file can be anywhere in the project.
+ // However, it must be at "META-INF/accesstransformer.cfg" in the final mod jar to be loaded by Forge.
+ // This default location is a best practice to automatically put the file in the right place in the final jar.
+ // See https://docs.minecraftforge.net/en/latest/advanced/accesstransformers/ for more information.
+ // accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
+
+ // Default run configurations.
+ // These can be tweaked, removed, or duplicated as needed.
+ runs {
+ // applies to all the run configs below
+ configureEach {
+ workingDirectory project.file('run')
+
+ // Recommended logging data for a userdev environment
+ // The markers can be added/remove as needed separated by commas.
+ // "SCAN": For mods scan.
+ // "REGISTRIES": For firing of registry events.
+ // "REGISTRYDUMP": For getting the contents of all registries.
+ property 'forge.logging.markers', 'REGISTRIES'
+
+ // Recommended logging level for the console
+ // You can set various levels here.
+ // Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels
+ property 'forge.logging.console.level', 'debug'
+
+ mods {
+ "${mod_id}" {
+ source sourceSets.main
+ }
+ }
+ }
+
+ client {
+ // this block needs to be here for runClient to exist
+ }
+
+ server {
+ args '--nogui'
+ }
+
+ data {
+ // example of overriding the workingDirectory set in configureEach above
+ workingDirectory project.file('run-data')
+
+ // Specify the modid for data generation, where to output the resulting resource, and where to look for existing resources.
+ args '--mod', mod_id, '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/'), '--existing-mod', 'tconstruct'
+
+ // Ensure dependent mods are loaded when running Minecraft in the IDE
+ environment 'assetIndex', '{asset_index}'
+ environment 'assetDirectory', '{assets_root}'
+ }
+ }
+}
+
+// Include resources generated by data generators.
+sourceSets.main.resources { srcDir 'src/generated/resources' }
+
+repositories {
+ // Put repositories for dependencies here
+ // ForgeGradle automatically adds the Forge maven and Maven Central for you
+
+ // If you have mod jar dependencies in ./libs, you can declare them as a repository like so:
+ // flatDir {
+ // dir 'libs'
+ // }
+
+ maven {
+ name "cursemaven"
+ url 'https://www.cursemaven.com'
+ content {
+ includeGroup "curse.maven"
+ }
+ }
+ maven {
+ name "ProgWML6"
+ url "https://dvs1.progwml6.com/files/maven"
+ }
+ maven {
+ name "BlameJared"
+ url "https://maven.blamejared.com"
+ }
+ maven {
+ name "ModMaven"
+ url "https://modmaven.dev"
+ }
+ maven {
+ name "covers1624"
+ url "https://maven.covers1624.net"
+ }
+ maven {
+ name "ChaosField"
+ url "https://maven.chaosfield.at"
+ }
+ maven {
+ name "tehnut"
+ url "https://tehnut.info/maven"
+ }
+ maven {
+ name "HellFireDev"
+ url "https://maven.hellfiredev.net"
+ }
+ maven {
+ name "firstdarkdev"
+ url "https://maven.firstdarkdev.xyz/releases/"
+ }
+ maven {
+ name "TheIllusiveC4"
+ url "https://maven.theillusivec4.top/"
+ }
+ flatDir {
+ name "local"
+ dir "libs"
+ }
+}
+
+dependencies {
+ // Minecraft Forge
+ minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}"
+
+ // Tinkers' Construct
+ implementation fg.deobf("slimeknights.tconstruct:TConstruct:${minecraft_version}-${tconstruct_version}")
+ implementation fg.deobf("slimeknights.mantle:Mantle:${minecraft_version}-${mantle_version}")
+
+ // JEI
+ compileOnly fg.deobf("mezz.jei:jei-${jei_version}:api")
+ runtimeOnly fg.deobf("mezz.jei:jei-${jei_version}")
+
+ // Libs for optional mods
+// runtimeOnly fg.deobf("curse.maven:scorge-471286:3276638")
+// runtimeOnly fg.deobf("local:codechickenlib:${minecraft_version}-4.0.7.445:universal") // "codechicken:CodeChickenLib:1.16.5-4.0.1.426"
+// runtimeOnly fg.deobf("local:CBMultipart:${minecraft_version}-3.0.4.123:universal") // "curse.maven:cb-multipart-258426:2755790-deobf-2755791"
+// runtimeOnly fg.deobf("local:BrandonsCore:${minecraft_version}-3.0.15.248:universal")
+// runtimeOnly fg.deobf("vazkii.patchouli:Patchouli:1.16.4-53.3") // fg.deobf("curse.maven:patchouli-306770:3847029")
+// runtimeOnly fg.deobf("top.theillusivec4.curios:curios-forge:1.16.5-4.1.0.1") // fg.deobf("curse.maven:curios-309927:4419403")
+
+ // Optional mods
+// runtimeOnly fg.deobf("curse.maven:project-red-core-228702:4607539") // "mrtjp:ProjectRed-${minecraft_version}:${projectred_version}:core"
+// runtimeOnly fg.deobf("curse.maven:project-red-exploration-229049:4607541") // "mrtjp:ProjectRed-${minecraft_version}:${projectred_version}:exploration"
+// runtimeOnly fg.deobf("curse.maven:psi-241665:4458005") // 'vazkii.psi:Psi:1.16-97.474'
+// runtimeOnly fg.deobf("vazkii.botania:Botania:1.16.5-420.3") // fg.deobf("curse.maven:botania-225643:4066054")
+// runtimeOnly "curse.maven:armorplus-237366:2952741"
+// runtimeOnly "curse.maven:thermal-foundation-222880:2926428"
+// runtimeOnly fg.deobf("local:Draconic-Evolution:${minecraft_version}-3.0.29.518:universal")
+// runtimeOnly fg.deobf("curse.maven:projecte-226410:3736621-api-3736622")
+// runtimeOnly fg.deobf("curse.maven:gemsplusplus-310914:3462347")
+// runtimeOnly fg.deobf("curse.maven:silents-gems-220311:3353519")
+// runtimeOnly fg.deobf("curse.maven:applied-energistics-2-223794:3608871") // "appeng:appliedenergistics2-forge:15.2.8"
+// runtimeOnly fg.deobf("curse.maven:industrial-foregoing-266515:2745321-sources-2745322-api-2745323-deobf-2745324") // "com.buuz135:industrial-foregoing:1.20.1-3.5.19"
+}
+
+// This block of code expands all declared replace properties in the specified resource targets.
+// A missing property will result in an error. Properties are expanded using ${} Groovy notation.
+// When "copyIdeResources" is enabled, this will also run before the game launches in IDE environments.
+// See https://docs.gradle.org/current/dsl/org.gradle.language.jvm.tasks.ProcessResources.html
+tasks.named('processResources', ProcessResources).configure {
+ var replaceProperties = [
+ minecraft_version: minecraft_version, minecraft_version_range: minecraft_version_range,
+ forge_version: forge_version, forge_version_range: forge_version_range,
+ loader_version_range: loader_version_range,
+ mod_id: mod_id, mod_name: mod_name, mod_license: mod_license, mod_version: mod_version,
+ mod_authors: mod_authors, mod_description: mod_description,
+ ]
+ inputs.properties replaceProperties
+
+ filesMatching(['META-INF/mods.toml', 'pack.mcmeta']) {
+ expand replaceProperties + [project: project] + [
+ tconstruct_version: tconstruct_version,
+ mantle_version: mantle_version,
+ jei_version: jei_version,
+ ]
+ }
+}
+
+// Example for how to get properties into the manifest for reading at runtime.
+tasks.named('jar', Jar).configure {
+ manifest {
+ attributes([
+ 'Specification-Title' : mod_id,
+ 'Specification-Vendor' : mod_authors,
+ 'Specification-Version' : '1', // We are version 1 of ourselves
+ 'Implementation-Title' : project.name,
+ 'Implementation-Version' : mod_version,
+ 'Implementation-Vendor' : mod_authors,
+ 'Implementation-Timestamp': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
+ ])
+ }
+
+ // This is the preferred method to reobfuscate your jar file
+ finalizedBy 'reobfJar'
+}
+
+java {
+ withSourcesJar()
+}
+
+artifacts {
+ archives sourcesJar
+}
+
+publishing {
+ publications {
+ register('mavenJava', MavenPublication) {
+ artifact jar
+ artifact sourcesJar
+ }
+ }
+ repositories {
+ maven {
+ url "file://${project.projectDir}/mcmodsrepo"
+ }
+ }
+}
+
+tasks.withType(JavaCompile).configureEach {
+ options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
+ options.compilerArgs << "-Xmaxerrs" << "1000" // Show way more compiler errors
+}
diff --git a/docs/Materials.md b/docs/Materials.md
new file mode 100644
index 00000000..4dd798b8
--- /dev/null
+++ b/docs/Materials.md
@@ -0,0 +1,75 @@
+# New Materials
+
+PlusTiC Reforged supports a wide range of materials from many mods. PlusTiC focuses on using tags instead of item IDs so that it may support a wide range of mods that all include the same items. Below is a list of all the materials that PlusTiC Reforged supports.
+
+> [!NOTE]
+> Any materials that use tags _should_ be supported in virtually every mod that includes the specified item. If a material is not supported, it is likely that the mod does not add the item to the specified tag, and you may want to file an issue on that mod's issue tracker.
+
+> [!WARNING]
+> Currently, gem blocks and other non-metal blocks are not supported. This is a known issue and will be fixed in a future update.
+
+See the [Mod Support](./Mod%20Support.md) page for a list of mods that PlusTiC Reforged supports.
+
+## Supported Materials
+
+- Bedrock (used only for testing purposes)
+ - Uses `minecraft:bedrock` item ID
+ - From: Minecraft
+- TNT
+ - Uses `minecraft:tnt` item ID
+ - From: Minecraft
+- Ruby
+ - Uses `forge:gems/ruby` tag
+ - Known compatible mods: Project Red, GemsPlusPlus, Silent's Gems
+- Sapphire
+ - Uses `forge:gems/sapphire` tag
+ - Known compatible mods: Project Red, GemsPlusPlus, Silent's Gems
+- Peridot
+ - Uses `forge:gems/peridot` tag
+ - Known compatible mods: Project Red, Silent's Gems
+- Jade
+ - Uses `forge:gems/jade` tag
+ - Known compatible mods: GemsPlusPlus, Silent's Gems
+- Malachite
+ - Uses `forge:gems/malachite` tag
+ - Known compatible mods: GemsPlusPlus, Silent's Gems
+- Topaz
+ - Uses `forge:gems/topaz` tag
+ - Known compatible mods: GemsPlusPlus, Silent's Gems
+- Amethyst
+ - Uses `forge:gems/amethyst` tag
+ - Known compatible mods: GemsPlusPlus, Silent's Gems
+- Phoenixite
+ - Uses `forge:gems/phoenixite` tag
+ - Known compatible mods: GemsPlusPlus
+- Dark Matter
+ - Uses `projecte:dark_matter` item ID
+ - From: ProjectE
+- Red Matter
+ - Uses `projecte:red_matter` item ID
+ - From: ProjectE
+- Psi Metal
+ - Uses `forge:ingots/psi` tag
+ - Known compatible mods: Psi
+- Psi Gem
+ - Uses `forge:gems/psi` tag
+ - Known compatible mods: Psi
+- Certus Quartz
+ - Uses `forge:gems/certus_quartz` tag
+ - Known compatible mods: Applied Energistics 2
+- Fluix
+ - Uses `forge:gems/fluix` tag
+ - Known compatible mods: Applied Energistics 2
+- Manasteel
+ - Uses `forge:ingots/manasteel` tag
+ - Known compatible mods: Botania
+- Elementium
+ - Uses `forge:ingots/elementium` tag
+ - Known compatible mods: Botania
+- Terrasteel
+ - Uses `forge:ingots/terrasteel` tag
+ - Known compatible mods: Botania
+
+## Requesting New Materials
+
+If you would like to request a new material to be added, please open an [issue on the GitHub repository](https://github.com/queengooborg/plustic-reforged/issues)!
\ No newline at end of file
diff --git a/docs/Mod Support.md b/docs/Mod Support.md
new file mode 100644
index 00000000..8898dda6
--- /dev/null
+++ b/docs/Mod Support.md
@@ -0,0 +1,69 @@
+# What mods does PlusTiC Reforged support?
+
+PlusTiC Reforged is designed to add support to a variety of mods. The following is a list of mods that are currently supported, as well as mods that were previously supported and when support was dropped.
+
+## Materials
+
+- [Project Red](https://www.curseforge.com/minecraft/mc-mods/project-red-core)
+- [Botania](https://www.curseforge.com/minecraft/mc-mods/botania) -- partially implemented
+- [ArmorPlus](https://www.curseforge.com/minecraft/mc-mods/armorplus) -- pending
+- [Psi](https://www.curseforge.com/minecraft/mc-mods/psi)
+- [Industrial Foregoing](https://www.curseforge.com/minecraft/mc-mods/industrial-foregoing) -- pending
+- [ProjectE](https://www.curseforge.com/minecraft/mc-mods/projecte)
+- [Applied Energistics 2](https://www.curseforge.com/minecraft/mc-mods/applied-energistics-2)
+- [The Twilight Forest](https://www.curseforge.com/minecraft/mc-mods/the-twilight-forest) -- pending
+- [Draconic Evolution](https://www.curseforge.com/minecraft/mc-mods/draconic-evolution) (unavailable in MC 1.19) -- pending
+- [GemsPlusPlus](https://www.curseforge.com/minecraft/mc-mods/gemsplusplus) (discontinued since MC 1.16)
+- [Silent's Gems](https://www.curseforge.com/minecraft/mc-mods/silents-gems)
+- [Jade](https://www.curseforge.com/minecraft/mc-mods/jade) (previously [HWYLA](https://www.curseforge.com/minecraft/mc-mods/hwyla)) -- pending
+- [Just Enough Items](https://www.curseforge.com/minecraft/mc-mods/jei) -- pending
+
+### Previously Supported
+
+#### In Original PlusTiC
+
+- [Advanced Rocketry](https://www.curseforge.com/minecraft/mc-mods/advanced-rocketry) (discontinued since MC 1.12)
+- [Natural Pledge](https://www.curseforge.com/minecraft/mc-mods/natural-pledge)* (discontinued since MC 1.12)
+- [Natura](https://www.curseforge.com/minecraft/mc-mods/natura) (discontinued since MC 1.12)
+- [Galacticraft Legacy](https://www.curseforge.com/minecraft/mc-mods/galacticraft-legacy) (discontinued since MC 1.12)
+- [Environmental Tech](https://www.curseforge.com/minecraft/mc-mods/environmental-tech) (discontinued since MC 1.12)
+- [Thaumcraft](https://www.curseforge.com/minecraft/mc-mods/thaumcraft) (discontinued since MC 1.12)
+- [Simply Jetpacks 2](https://www.curseforge.com/minecraft/mc-mods/simply-jetpacks-2) (discontinued since MC 1.12)
+- [Future MC](https://www.curseforge.com/minecraft/mc-mods/future-mc) (added in v9.1.0, mod is a compatibility layer to add MC 1.15+ features to MC 1.12, thus is not needed in newer versions)
+- [Actually Additions](https://www.curseforge.com/minecraft/mc-mods/actually-additions) (unavailable between MC 1.16 and 1.19, available for MC 1.20 -- not planning to add support unless requested)
+- [Mekanism](https://www.curseforge.com/minecraft/mc-mods/mekanism) (has built-in support since MC 1.16)
+- [Thermal Foundation](https://www.curseforge.com/minecraft/mc-mods/thermal-foundation) (has built-in support since MC 1.16)
+- [Advent of Ascension (Nevermine)](https://www.curseforge.com/minecraft/mc-mods/advent-of-ascension-nevermine) (has built-in support since AoA v3.3)
+- [Biomes o' Plenty](https://www.curseforge.com/minecraft/mc-mods/biomes-o-plenty) (items used in PlusTiC materials were removed in MC 1.16)
+- [Astral Sorcery](https://www.curseforge.com/minecraft/mc-mods/astral-sorcery) (discontinued since MC 1.16)
+- [Survivalist](https://www.curseforge.com/minecraft/mc-mods/survivalist) (discontinued since MC 1.16)
+- [Avaritia](https://www.curseforge.com/minecraft/mc-mods/avaritia-1-10) (unavailable in MC 1.16, discontinued since MC 1.18)
+- [CraftTweaker](https://www.curseforge.com/minecraft/mc-mods/crafttweaker) (did not feel like maintaining support)
+- [Construct's Armory](https://www.curseforge.com/minecraft/mc-mods/constructs-armory) (discontinued since MC 1.12, functionality merged into Tinkers' Construct)
+- [ModTweaker](https://www.curseforge.com/minecraft/mc-mods/modtweaker) (discontinued since MC 1.12)
+- [Tesla](https://www.curseforge.com/minecraft/mc-mods/tesla) (discontinued since MC 1.12)
+- [Tesla Core Lib](https://www.curseforge.com/minecraft/mc-mods/tesla-core-lib) (discontinued since MC 1.12)
+
+\* About Natural Pledge: Starting in v5.1.2.0, PlusTiC forced out and overrode Natural Pledge TiC materials by default. This could be changed in the config so that PlusTiC did not add Botania materials if Natural Pledge was loaded.
+
+## New Mod Support
+
+If you would like to request support for a mod, please open an [issue on the GitHub repository](https://github.com/queengooborg/plustic-reforged/issues)!
+
+### Mods With Plans to Support
+
+The following is a list of mods that are planned to be supported by PlusTiC Reforged:
+
+_So far, there have been no requests to add support for new mods (PlusTiC Reforged is still in early development after all). This section will eventually contain the list of requested mods to support._
+
+### Mods That Will Not Be Supported
+
+The following is a list of mods that will not be supported by PlusTiC Reforged, whether the mod already has Tinkers' Construct or for other reasons:
+
+- [Future Versions](https://www.curseforge.com/minecraft/mc-mods/future-versions) (similar mod to Future MC -- tried to implement support, but ran into issues and decided not to continue)
+
+### Mod Supported, But Not Listed?
+
+Since PlusTiC Reforged uses item tags to specify the ingredients needed for new materials, any mod that adds the specified material _should_ be supported automatically. For example, if a mod adds a Ruby gem, it should be usable in PlusTiC Reforged as long as the mod adds its gem to the `forge:gems/ruby` tag. This means that PlusTiC Reforged should be able to support a wide range of mods without needing to add explicit support for them.
+
+If a mod adds an item that should be supported but is not, you may want to file an issue with the developers of that mod to request that they add the item to the appropriate tag.
\ No newline at end of file
diff --git a/gradle.properties b/gradle.properties
index 878bf1f7..d5bcfcd6 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -1,4 +1,64 @@
# Sets default memory used for gradle commands. Can be overridden by user or command line properties.
# This is required to provide enough memory for the Minecraft decompilation process.
org.gradle.jvmargs=-Xmx3G
-org.gradle.daemon=false
\ No newline at end of file
+org.gradle.daemon=false
+
+
+## Environment Properties
+
+# The Minecraft version must agree with the Forge version to get a valid artifact
+minecraft_version=1.18.2
+# The Minecraft version range can use any release version of Minecraft as bounds.
+# Snapshots, pre-releases, and release candidates are not guaranteed to sort properly
+# as they do not follow standard versioning conventions.
+minecraft_version_range=[1.18.2,)
+# The Forge version must agree with the Minecraft version to get a valid artifact
+forge_version=40.2.0
+# The Forge version range can use any version of Forge as bounds or match the loader version range
+forge_version_range=[40,)
+# The loader version range can only use the major version of Forge/FML as bounds
+loader_version_range=[40,)
+# The mapping channel to use for mappings.
+# The default set of supported mapping channels are ["official", "snapshot", "snapshot_nodoc", "stable", "stable_nodoc"].
+# Additional mapping channels can be registered through the "channelProviders" extension in a Gradle plugin.
+#
+# | Channel | Version | |
+# |-----------|----------------------|--------------------------------------------------------------------------------|
+# | official | MCVersion | Official field/method names from Mojang mapping files |
+# | parchment | YYYY.MM.DD-MCVersion | Open community-sourced parameter names and javadocs layered on top of official |
+#
+# You must be aware of the Mojang license when using the 'official' or 'parchment' mappings.
+# See more information here: https://github.com/MinecraftForge/MCPConfig/blob/master/Mojang.md
+#
+# Parchment is an unofficial project maintained by ParchmentMC, separate from Minecraft Forge.
+# Additional setup is needed to use their mappings, see https://parchmentmc.org/docs/getting-started
+mapping_channel=official
+# The mapping version to query from the mapping channel.
+# This must match the format required by the mapping channel.
+mapping_version=1.18.2
+
+## Mod Properties
+
+# The unique mod identifier for the mod. Must be lowercase in English locale. Must fit the regex [a-z][a-z0-9_]{1,63}
+# Must match the String constant located in the main mod class annotated with @Mod.
+mod_id=plusticreforged
+# The human-readable display name for the mod.
+mod_name=PlusTiC Reforged
+# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
+mod_license=GNU General Public License v3.0
+# The mod version. See https://semver.org/
+mod_version=0.2.0
+# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
+# This should match the base package used for the mod sources.
+# See https://maven.apache.org/guides/mini/guide-naming-conventions.html
+mod_group_id=queengooborg.plusticreforged
+# The authors of the mod. This is a simple text string that is used for display purposes in the mod list.
+mod_authors=Queen Vinyl Da.i'gyu-Kazotetsu (https://www.queengoob.org)
+# The description of the mod. This is a simple multiline text string that is used for display purposes in the mod list.
+mod_description=Add new tools to and integrate various mods with Tinker's Construct.\n\nSupported Mods: https://github.com/queengooborg/PlusTiC-Reforged/blob/main/README.md#supported-mods
+
+## Dependent Mod Versions
+
+tconstruct_version=3.7.2.167
+mantle_version=1.9.50
+jei_version=1.18.2:9.7.2.1001
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
index a7d517fd..e6441136 100644
Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 93eea80c..a4413138 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,7 @@
-#Sat Jul 01 10:16:13 EDT 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
+networkTimeout=10000
+validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.0-bin.zip
diff --git a/gradlew b/gradlew
index cccdd3d5..b740cf13 100755
--- a/gradlew
+++ b/gradlew
@@ -1,78 +1,127 @@
-#!/usr/bin/env sh
+#!/bin/sh
+
+#
+# Copyright © 2015-2021 the original authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
##############################################################################
-##
-## Gradle start up script for UN*X
-##
+#
+# Gradle start up script for POSIX generated by Gradle.
+#
+# Important for running:
+#
+# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
+# noncompliant, but you have some other compliant shell such as ksh or
+# bash, then to run this script, type that shell name before the whole
+# command line, like:
+#
+# ksh Gradle
+#
+# Busybox and similar reduced shells will NOT work, because this script
+# requires all of these POSIX shell features:
+# * functions;
+# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
+# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
+# * compound commands having a testable exit status, especially «case»;
+# * various built-in commands including «command», «set», and «ulimit».
+#
+# Important for patching:
+#
+# (2) This script targets any POSIX shell, so it avoids extensions provided
+# by Bash, Ksh, etc; in particular arrays are avoided.
+#
+# The "traditional" practice of packing multiple parameters into a
+# space-separated string is a well documented source of bugs and security
+# problems, so this is (mostly) avoided, by progressively accumulating
+# options in "$@", and eventually passing that to Java.
+#
+# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
+# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
+# see the in-line comments for details.
+#
+# There are tweaks for specific operating systems such as AIX, CygWin,
+# Darwin, MinGW, and NonStop.
+#
+# (3) This script is generated from the Groovy template
+# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
+# within the Gradle project.
+#
+# You can find Gradle at https://github.com/gradle/gradle/.
+#
##############################################################################
# Attempt to set APP_HOME
+
# Resolve links: $0 may be a link
-PRG="$0"
-# Need this for relative symlinks.
-while [ -h "$PRG" ] ; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '/.*' > /dev/null; then
- PRG="$link"
- else
- PRG=`dirname "$PRG"`"/$link"
- fi
+app_path=$0
+
+# Need this for daisy-chained symlinks.
+while
+ APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
+ [ -h "$app_path" ]
+do
+ ls=$( ls -ld "$app_path" )
+ link=${ls#*' -> '}
+ case $link in #(
+ /*) app_path=$link ;; #(
+ *) app_path=$APP_HOME$link ;;
+ esac
done
-SAVED="`pwd`"
-cd "`dirname \"$PRG\"`/" >/dev/null
-APP_HOME="`pwd -P`"
-cd "$SAVED" >/dev/null
-
-APP_NAME="Gradle"
-APP_BASE_NAME=`basename "$0"`
-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-DEFAULT_JVM_OPTS=""
+# This is normally unused
+# shellcheck disable=SC2034
+APP_BASE_NAME=${0##*/}
+# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
+APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value.
-MAX_FD="maximum"
+MAX_FD=maximum
warn () {
echo "$*"
-}
+} >&2
die () {
echo
echo "$*"
echo
exit 1
-}
+} >&2
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
-case "`uname`" in
- CYGWIN* )
- cygwin=true
- ;;
- Darwin* )
- darwin=true
- ;;
- MINGW* )
- msys=true
- ;;
- NONSTOP* )
- nonstop=true
- ;;
+case "$( uname )" in #(
+ CYGWIN* ) cygwin=true ;; #(
+ Darwin* ) darwin=true ;; #(
+ MSYS* | MINGW* ) msys=true ;; #(
+ NONSTOP* ) nonstop=true ;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
- JAVACMD="$JAVA_HOME/jre/sh/java"
+ JAVACMD=$JAVA_HOME/jre/sh/java
else
- JAVACMD="$JAVA_HOME/bin/java"
+ JAVACMD=$JAVA_HOME/bin/java
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
@@ -81,92 +130,120 @@ Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
- JAVACMD="java"
- which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+ JAVACMD=java
+ if ! command -v java >/dev/null 2>&1
+ then
+ die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
+ fi
fi
# Increase the maximum file descriptors if we can.
-if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
- MAX_FD_LIMIT=`ulimit -H -n`
- if [ $? -eq 0 ] ; then
- if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
- MAX_FD="$MAX_FD_LIMIT"
- fi
- ulimit -n $MAX_FD
- if [ $? -ne 0 ] ; then
- warn "Could not set maximum file descriptor limit: $MAX_FD"
- fi
- else
- warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
- fi
+if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
+ case $MAX_FD in #(
+ max*)
+ # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
+ # shellcheck disable=SC2039,SC3045
+ MAX_FD=$( ulimit -H -n ) ||
+ warn "Could not query maximum file descriptor limit"
+ esac
+ case $MAX_FD in #(
+ '' | soft) :;; #(
+ *)
+ # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
+ # shellcheck disable=SC2039,SC3045
+ ulimit -n "$MAX_FD" ||
+ warn "Could not set maximum file descriptor limit to $MAX_FD"
+ esac
fi
-# For Darwin, add options to specify how the application appears in the dock
-if $darwin; then
- GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
-fi
+# Collect all arguments for the java command, stacking in reverse order:
+# * args from the command line
+# * the main class name
+# * -classpath
+# * -D...appname settings
+# * --module-path (only if needed)
+# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
+
+# For Cygwin or MSYS, switch paths to Windows format before running java
+if "$cygwin" || "$msys" ; then
+ APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
+ CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
+
+ JAVACMD=$( cygpath --unix "$JAVACMD" )
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin ; then
- APP_HOME=`cygpath --path --mixed "$APP_HOME"`
- CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
- JAVACMD=`cygpath --unix "$JAVACMD"`
-
- # We build the pattern for arguments to be converted via cygpath
- ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
- SEP=""
- for dir in $ROOTDIRSRAW ; do
- ROOTDIRS="$ROOTDIRS$SEP$dir"
- SEP="|"
- done
- OURCYGPATTERN="(^($ROOTDIRS))"
- # Add a user-defined pattern to the cygpath arguments
- if [ "$GRADLE_CYGPATTERN" != "" ] ; then
- OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
- fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
- i=0
- for arg in "$@" ; do
- CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
- CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
-
- if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
- eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
- else
- eval `echo args$i`="\"$arg\""
+ for arg do
+ if
+ case $arg in #(
+ -*) false ;; # don't mess with options #(
+ /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
+ [ -e "$t" ] ;; #(
+ *) false ;;
+ esac
+ then
+ arg=$( cygpath --path --ignore --mixed "$arg" )
fi
- i=$((i+1))
+ # Roll the args list around exactly as many times as the number of
+ # args, so each arg winds up back in the position where it started, but
+ # possibly modified.
+ #
+ # NB: a `for` loop captures its iteration list before it begins, so
+ # changing the positional parameters here affects neither the number of
+ # iterations, nor the values presented in `arg`.
+ shift # remove old arg
+ set -- "$@" "$arg" # push replacement arg
done
- case $i in
- (0) set -- ;;
- (1) set -- "$args0" ;;
- (2) set -- "$args0" "$args1" ;;
- (3) set -- "$args0" "$args1" "$args2" ;;
- (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
- (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
- (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
- (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
- (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
- (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
- esac
fi
-# Escape application args
-save () {
- for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
- echo " "
-}
-APP_ARGS=$(save "$@")
-
-# Collect all arguments for the java command, following the shell quoting and substitution rules
-eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
-# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
-if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
- cd "$(dirname "$0")"
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
+
+# Collect all arguments for the java command:
+# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
+# and any embedded shellness will be escaped.
+# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
+# treated as '${Hostname}' itself on the command line.
+
+set -- \
+ "-Dorg.gradle.appname=$APP_BASE_NAME" \
+ -classpath "$CLASSPATH" \
+ org.gradle.wrapper.GradleWrapperMain \
+ "$@"
+
+# Stop when "xargs" is not available.
+if ! command -v xargs >/dev/null 2>&1
+then
+ die "xargs is not available"
fi
+# Use "xargs" to parse quoted args.
+#
+# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
+#
+# In Bash we could simply go:
+#
+# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
+# set -- "${ARGS[@]}" "$@"
+#
+# but POSIX shell has neither arrays nor command substitution, so instead we
+# post-process each arg (as a line of input to sed) to backslash-escape any
+# character that might be a shell metacharacter, then use eval to reverse
+# that process (while maintaining the separation between arguments), and wrap
+# the whole thing up as a single "set" statement.
+#
+# This will of course break if any of these variables contains a newline or
+# an unmatched quote.
+#
+
+eval "set -- $(
+ printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
+ xargs -n1 |
+ sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
+ tr '\n' ' '
+ )" '"$@"'
+
exec "$JAVACMD" "$@"
diff --git a/gradlew.bat b/gradlew.bat
index e95643d6..7101f8e4 100644
--- a/gradlew.bat
+++ b/gradlew.bat
@@ -1,4 +1,20 @@
-@if "%DEBUG%" == "" @echo off
+@rem
+@rem Copyright 2015 the original author or authors.
+@rem
+@rem Licensed under the Apache License, Version 2.0 (the "License");
+@rem you may not use this file except in compliance with the License.
+@rem You may obtain a copy of the License at
+@rem
+@rem https://www.apache.org/licenses/LICENSE-2.0
+@rem
+@rem Unless required by applicable law or agreed to in writing, software
+@rem distributed under the License is distributed on an "AS IS" BASIS,
+@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@rem See the License for the specific language governing permissions and
+@rem limitations under the License.
+@rem
+
+@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@@ -9,25 +25,29 @@
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
+if "%DIRNAME%"=="" set DIRNAME=.
+@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
+@rem Resolve any "." and ".." in APP_HOME to make it shorter.
+for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
+
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS=
+set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto init
+if %ERRORLEVEL% equ 0 goto execute
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
+echo. 1>&2
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
+echo. 1>&2
+echo Please set the JAVA_HOME variable in your environment to match the 1>&2
+echo location of your Java installation. 1>&2
goto fail
@@ -35,48 +55,36 @@ goto fail
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-if exist "%JAVA_EXE%" goto init
+if exist "%JAVA_EXE%" goto execute
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
+echo. 1>&2
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
+echo. 1>&2
+echo Please set the JAVA_HOME variable in your environment to match the 1>&2
+echo location of your Java installation. 1>&2
goto fail
-:init
-@rem Get command-line arguments, handling Windows variants
-
-if not "%OS%" == "Windows_NT" goto win9xME_args
-
-:win9xME_args
-@rem Slurp the command line arguments.
-set CMD_LINE_ARGS=
-set _SKIP=2
-
-:win9xME_args_slurp
-if "x%~1" == "x" goto execute
-
-set CMD_LINE_ARGS=%*
-
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
:end
@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
+if %ERRORLEVEL% equ 0 goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
-if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
+set EXIT_CODE=%ERRORLEVEL%
+if %EXIT_CODE% equ 0 set EXIT_CODE=1
+if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
+exit /b %EXIT_CODE%
:mainEnd
if "%OS%"=="Windows_NT" endlocal
diff --git a/libs/ActuallyAdditions-1.12.2-r149.jar b/libs/ActuallyAdditions-1.12.2-r149.jar
deleted file mode 100644
index 50cb599f..00000000
Binary files a/libs/ActuallyAdditions-1.12.2-r149.jar and /dev/null differ
diff --git a/libs/AoA3-3.1.2.b.jar b/libs/AoA3-3.1.2.b.jar
deleted file mode 100644
index 29dad73b..00000000
Binary files a/libs/AoA3-3.1.2.b.jar and /dev/null differ
diff --git a/libs/AutoRegLib-1.3-32.jar b/libs/AutoRegLib-1.3-32.jar
deleted file mode 100644
index d67c6c4e..00000000
Binary files a/libs/AutoRegLib-1.3-32.jar and /dev/null differ
diff --git a/libs/Baubles-1.12-1.5.2.jar b/libs/Baubles-1.12-1.5.2.jar
deleted file mode 100644
index e99f1d96..00000000
Binary files a/libs/Baubles-1.12-1.5.2.jar and /dev/null differ
diff --git a/libs/Botania r1.9-346.jar b/libs/Botania r1.9-346.jar
deleted file mode 100644
index b233eeb0..00000000
Binary files a/libs/Botania r1.9-346.jar and /dev/null differ
diff --git a/libs/BrandonsCore-1.16.5-3.0.15.248-universal.jar b/libs/BrandonsCore-1.16.5-3.0.15.248-universal.jar
new file mode 100644
index 00000000..abb9cc9f
Binary files /dev/null and b/libs/BrandonsCore-1.16.5-3.0.15.248-universal.jar differ
diff --git a/libs/CBMultipart-1.16.5-3.0.4.123-universal.jar b/libs/CBMultipart-1.16.5-3.0.4.123-universal.jar
new file mode 100644
index 00000000..1550aae5
Binary files /dev/null and b/libs/CBMultipart-1.16.5-3.0.4.123-universal.jar differ
diff --git a/libs/CodeChickenLib-1.16.5-4.0.7.445-universal.jar b/libs/CodeChickenLib-1.16.5-4.0.7.445-universal.jar
new file mode 100644
index 00000000..04357612
Binary files /dev/null and b/libs/CodeChickenLib-1.16.5-4.0.7.445-universal.jar differ
diff --git a/libs/CraftTweaker2-1.12-4.1.20.586.jar b/libs/CraftTweaker2-1.12-4.1.20.586.jar
deleted file mode 100644
index 967f8163..00000000
Binary files a/libs/CraftTweaker2-1.12-4.1.20.586.jar and /dev/null differ
diff --git a/libs/Draconic-Evolution-1.16.5-3.0.29.518-universal.jar b/libs/Draconic-Evolution-1.16.5-3.0.29.518-universal.jar
new file mode 100644
index 00000000..23d77610
Binary files /dev/null and b/libs/Draconic-Evolution-1.16.5-3.0.29.518-universal.jar differ
diff --git a/libs/Forgelin-1.8.4.jar b/libs/Forgelin-1.8.4.jar
deleted file mode 100644
index 34ecf17b..00000000
Binary files a/libs/Forgelin-1.8.4.jar and /dev/null differ
diff --git a/libs/Hwyla-1.8.26-B41_1.12.2.jar b/libs/Hwyla-1.8.26-B41_1.12.2.jar
deleted file mode 100644
index 577f02d2..00000000
Binary files a/libs/Hwyla-1.8.26-B41_1.12.2.jar and /dev/null differ
diff --git a/libs/MTLib-3.0.6.jar b/libs/MTLib-3.0.6.jar
deleted file mode 100644
index 56b6d9b2..00000000
Binary files a/libs/MTLib-3.0.6.jar and /dev/null differ
diff --git a/libs/Mantle-1.12-1.3.3.55.jar b/libs/Mantle-1.12-1.3.3.55.jar
deleted file mode 100644
index 012b5791..00000000
Binary files a/libs/Mantle-1.12-1.3.3.55.jar and /dev/null differ
diff --git a/libs/Psi-r1.1-78.1.jar b/libs/Psi-r1.1-78.1.jar
deleted file mode 100644
index 14526e37..00000000
Binary files a/libs/Psi-r1.1-78.1.jar and /dev/null differ
diff --git a/libs/RedstoneFlux-1.12-2.1.1.1-universal.jar b/libs/RedstoneFlux-1.12-2.1.1.1-universal.jar
deleted file mode 100644
index 7d80c9f8..00000000
Binary files a/libs/RedstoneFlux-1.12-2.1.1.1-universal.jar and /dev/null differ
diff --git a/libs/SimplyJetpacks2-1.12.2-2.2.16.1.jar b/libs/SimplyJetpacks2-1.12.2-2.2.16.1.jar
deleted file mode 100644
index 5be1abdd..00000000
Binary files a/libs/SimplyJetpacks2-1.12.2-2.2.16.1.jar and /dev/null differ
diff --git a/libs/TConstruct-1.12.2-2.13.0.183.jar b/libs/TConstruct-1.12.2-2.13.0.183.jar
deleted file mode 100644
index 07ea0552..00000000
Binary files a/libs/TConstruct-1.12.2-2.13.0.183.jar and /dev/null differ
diff --git a/libs/Tesla-1.12.2-1.0.63.jar b/libs/Tesla-1.12.2-1.0.63.jar
deleted file mode 100644
index c87c00ed..00000000
Binary files a/libs/Tesla-1.12.2-1.0.63.jar and /dev/null differ
diff --git a/libs/_README.md b/libs/_README.md
new file mode 100644
index 00000000..c1a057d1
--- /dev/null
+++ b/libs/_README.md
@@ -0,0 +1 @@
+The files in this directory are mods that cannot be added as dependencies via available Maven repositories. These files are NOT licensed under the project's license, and are the property of their respective owners. They are included here for development purposes only.
\ No newline at end of file
diff --git a/libs/appliedenergistics2-rv6-stable-6.jar b/libs/appliedenergistics2-rv6-stable-6.jar
deleted file mode 100644
index 7fc86680..00000000
Binary files a/libs/appliedenergistics2-rv6-stable-6.jar and /dev/null differ
diff --git a/libs/astralsorcery-1.12.2-1.10.19.jar b/libs/astralsorcery-1.12.2-1.10.19.jar
deleted file mode 100644
index a0924c4c..00000000
Binary files a/libs/astralsorcery-1.12.2-1.10.19.jar and /dev/null differ
diff --git a/libs/conarm-1.12.2-1.2.5.9.jar b/libs/conarm-1.12.2-1.2.5.9.jar
deleted file mode 100644
index 40f6bbdc..00000000
Binary files a/libs/conarm-1.12.2-1.2.5.9.jar and /dev/null differ
diff --git a/libs/industrialforegoing-1.12.2-1.11.7-217-deobf.jar b/libs/industrialforegoing-1.12.2-1.11.7-217-deobf.jar
deleted file mode 100644
index 0eb42899..00000000
Binary files a/libs/industrialforegoing-1.12.2-1.11.7-217-deobf.jar and /dev/null differ
diff --git a/libs/jei_1.12.2-4.16.1.301.jar b/libs/jei_1.12.2-4.16.1.301.jar
deleted file mode 100644
index 47046f41..00000000
Binary files a/libs/jei_1.12.2-4.16.1.301.jar and /dev/null differ
diff --git a/libs/modtweaker-4.0.15.jar b/libs/modtweaker-4.0.15.jar
deleted file mode 100644
index c51c836c..00000000
Binary files a/libs/modtweaker-4.0.15.jar and /dev/null differ
diff --git a/libs/natura-1.12.2-4.3.2.42.jar b/libs/natura-1.12.2-4.3.2.42.jar
deleted file mode 100644
index 0cf95aea..00000000
Binary files a/libs/natura-1.12.2-4.3.2.42.jar and /dev/null differ
diff --git a/libs/tesla-core-lib-1.12.2-1.0.17.jar b/libs/tesla-core-lib-1.12.2-1.0.17.jar
deleted file mode 100644
index 7651064b..00000000
Binary files a/libs/tesla-core-lib-1.12.2-1.0.17.jar and /dev/null differ
diff --git a/settings.gradle b/settings.gradle
new file mode 100644
index 00000000..21d66e32
--- /dev/null
+++ b/settings.gradle
@@ -0,0 +1,14 @@
+pluginManagement {
+ repositories {
+ gradlePluginPortal()
+ maven { url = 'https://maven.minecraftforge.net/' }
+ maven {
+ name = 'MinecraftForge'
+ url = 'https://maven.minecraftforge.net/'
+ }
+ }
+}
+
+plugins {
+ id 'org.gradle.toolchains.foojay-resolver-convention' version '0.7.0'
+}
\ No newline at end of file
diff --git a/src/main/java/landmaster/plustic/PlusTiC.java b/src/main/java/landmaster/plustic/PlusTiC.java
deleted file mode 100644
index f027be2c..00000000
--- a/src/main/java/landmaster/plustic/PlusTiC.java
+++ /dev/null
@@ -1,195 +0,0 @@
-package landmaster.plustic;
-
-import java.util.*;
-import java.util.Optional;
-import java.util.concurrent.*;
-
-import org.apache.commons.lang3.StringUtils;
-import org.apache.logging.log4j.*;
-
-import it.unimi.dsi.fastutil.objects.*;
-import landmaster.plustic.proxy.*;
-import landmaster.plustic.api.*;
-import landmaster.plustic.config.*;
-import landmaster.plustic.gui.handler.*;
-import landmaster.plustic.modules.*;
-import landmaster.plustic.net.*;
-import landmaster.plustic.util.*;
-import net.minecraft.block.*;
-import net.minecraft.init.*;
-import net.minecraft.item.*;
-import net.minecraft.util.*;
-import net.minecraftforge.event.*;
-import net.minecraftforge.fluids.*;
-import net.minecraftforge.fml.common.*;
-import net.minecraftforge.fml.common.event.*;
-import net.minecraftforge.fml.common.eventhandler.*;
-import net.minecraftforge.fml.common.network.*;
-import net.minecraftforge.fml.common.Mod.*;
-import slimeknights.tconstruct.library.*;
-import slimeknights.tconstruct.library.materials.*;
-import slimeknights.tconstruct.tools.*;
-
-@Mod.EventBusSubscriber
-@Mod(modid = ModInfo.MODID, name = ModInfo.NAME, version = ModInfo.VERSION, dependencies = ModInfo.DEPENDS, useMetadata = true, acceptedMinecraftVersions = "[1.12, 1.13)")
-public class PlusTiC {
- public static Config config;
-
- @Instance(ModInfo.MODID)
- public static PlusTiC INSTANCE;
-
- @SidedProxy(serverSide = "landmaster.plustic.proxy.CommonProxy", clientSide = "landmaster.plustic.proxy.ClientProxy")
- public static CommonProxy proxy;
-
- public static final Logger log = LogManager.getLogger(
- ModInfo.MODID.toUpperCase(Locale.US/* to avoid problems with Turkish */));
-
- public static final Map materials = new LinkedHashMap<>();
- public static final Map materialIntegrations = new Object2ObjectOpenHashMap<>();
-
- public static final Map> materialIntegrationStages = new Object2ObjectOpenHashMap<>();
-
- public static final Map materialOreDicts = new Object2ObjectOpenHashMap<>();
-
- public static final BowMaterialStats justWhy = new BowMaterialStats(0.2f, 0.4f, -1f);
-
- private static final String[] renamesToHandle = new String[] {
- "osmium", "titanium", "iridium", "enderium", "lumium", "platinum", "signalum", "invar" };
-
- @SubscribeEvent
- public static void missingBlockMappings(RegistryEvent.MissingMappings event) {
- event.getMappings().forEach(mapping -> {
- for (String name: renamesToHandle) {
- if (mapping.key.equals(new ResourceLocation(ModInfo.MODID, ModInfo.MODID+".molten_"+name))) {
- Optional.ofNullable(FluidRegistry.getFluid(name))
- .map(Fluid::getBlock)
- .ifPresent(mapping::remap);
- }
- }
-
- if (mapping.key.equals(new ResourceLocation(ModInfo.MODID, ModInfo.MODID+".molten_fiery"))) {
- Optional.ofNullable(FluidRegistry.getFluid("fierymetal"))
- .map(Fluid::getBlock)
- .ifPresent(mapping::remap);
- }
- });
- }
-
- @SubscribeEvent
- public static void missingItemMappings(RegistryEvent.MissingMappings- event) {
- event.getMappings().forEach(mapping -> {
- for (String name: renamesToHandle) {
- if (mapping.key.equals(new ResourceLocation(ModInfo.MODID, ModInfo.MODID+".molten_"+name))) {
- Optional.ofNullable(FluidRegistry.getFluid(name))
- .map(Fluid::getBlock)
- .map(Item::getItemFromBlock)
- .ifPresent(mapping::remap);
- }
-
- if (mapping.key.equals(new ResourceLocation(ModInfo.MODID, ModInfo.MODID+".molten_fiery"))) {
- Optional.ofNullable(FluidRegistry.getFluid("fierymetal"))
- .map(Fluid::getBlock)
- .map(Item::getItemFromBlock)
- .ifPresent(mapping::remap);
- }
- }
- });
- }
-
- @EventHandler
- public void preInit(FMLPreInitializationEvent event) {
- (config = new Config(event)).init1();
-
- proxy.initEntities();
-
- // TODO add more modules when needed
-
- IModule.modules.addAll(Arrays.asList(
- new ModuleBase(),
-
- new ModuleNatura(),
- new ModuleGems(),
- new ModuleMekanism(),
- new ModuleAdvRocketry(),
- new ModuleBotania(),
- new ModuleArmorPlus(),
- new ModuleTF(),
- new ModuleDraconicEvolution(),
- new ModuleActAdd(),
- new ModulePsi(),
- new ModuleAvaritia(),
- new ModuleLandCraft(),
- new ModuleLandCore(),
- new ModuleGalacticraft(),
- new ModuleSurvivalist(),
- new ModuleProjectE(),
- new ModuleGemsPlus(),
- new ModuleAppEng2(),
- new ModuleEnvironTech(),
- new ModuleMFR(),
- new ModuleThaumcraft(),
- new ModuleAstralSorcery(),
-
- new ModuleTools(),
- new ModuleModifiers(),
-
- new ModuleConArm(),
-
- new ModuleMachines()
- ));
-
- IModule.modules.forEach(IModule::init);
-
- config.init2(materials);
-
- config.update();
-
- preIntegrate();
-
- FMLInterModComms.sendMessage("waila", "register", "landmaster.plustic.waila.PTWailaRegistrar.wailaCallback");
-
- NetworkRegistry.INSTANCE.registerGuiHandler(INSTANCE, new PTGuiHandler());
- }
-
- @EventHandler
- public void init(FMLInitializationEvent event) {
- proxy.initToolGuis();
- proxy.registerKeyBindings();
- PacketHandler.init();
-
- IModule.modules.forEach(IModule::init2);
-
- postIntegrate();
- }
-
- @EventHandler
- public void postInit(FMLPostInitializationEvent event) {
- IModule.modules.forEach(IModule::init3);
- }
-
- private static void preIntegrate() {
- materials.forEach((k, v) -> {
- if (!materialIntegrations.containsKey(k)) {
- materialIntegrationStages.getOrDefault(k, CompletableFuture.completedFuture(null)).thenRun(() -> {
- MaterialIntegration mi;
- if (v.getRepresentativeItem().getItem() == Items.EMERALD) {
- mi = new MaterialIntegration(v, v.getFluid()).toolforge();
- } else if (v.getFluid() != null) {
- mi = new MaterialIntegration(v, v.getFluid(), StringUtils.capitalize(k)).toolforge();
- } else {
- mi = new MaterialIntegration(v);
- }
- if (materialOreDicts.containsKey(k)) {
- mi.representativeItem = materialOreDicts.get(k);
- }
- TinkerRegistry.integrate(mi).preInit();
- materialIntegrations.put(k, mi);
- });
- }
- });
- }
-
- private static void postIntegrate() {
- Utils.displace(TinkerMaterials.wood.getIdentifier()); // so that natura woods are prioritized
- }
-}
diff --git a/src/main/java/landmaster/plustic/api/CentrifugeRecipes.java b/src/main/java/landmaster/plustic/api/CentrifugeRecipes.java
deleted file mode 100644
index 0ef49ce2..00000000
--- a/src/main/java/landmaster/plustic/api/CentrifugeRecipes.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package landmaster.plustic.api;
-
-import java.lang.reflect.*;
-
-import com.google.common.base.*;
-
-import landmaster.plustic.config.*;
-import net.minecraftforge.fluids.*;
-import slimeknights.tconstruct.library.smeltery.*;
-import slimeknights.tconstruct.smeltery.tileentity.*;
-
-public class CentrifugeRecipes {
- public static final int APPLY_PER_TICK;
- static {
- try {
- Field f = TileSmeltery.class.getDeclaredField("ALLOYING_PER_TICK");
- f.setAccessible(true);
- APPLY_PER_TICK = (int)f.get(null);
- } catch (Exception e) {
- Throwables.throwIfUnchecked(e);
- throw new RuntimeException(e);
- }
- }
-
- public static int matches(AlloyRecipe recipe, FluidStack input) {
- if (!recipe.isValid()
- || recipe.getResult().amount <= 0
- || !Config.isCentrifugeRecipeValid(recipe)
- || !input.containsFluid(recipe.getResult())) {
- return 0;
- }
- return input.amount / recipe.getResult().amount;
- }
-}
diff --git a/src/main/java/landmaster/plustic/api/ModInfo.java b/src/main/java/landmaster/plustic/api/ModInfo.java
deleted file mode 100644
index bf08b472..00000000
--- a/src/main/java/landmaster/plustic/api/ModInfo.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package landmaster.plustic.api;
-
-public class ModInfo {
-
- public static final String MODID = "plustic";
- public static final String NAME = "PlusTiC";
- public static final String VERSION = "@VERSION@";
-
- // TODO add dependencies when needed
- public static final String DEPENDS = "required-after:mantle;"
- + "required-after:tconstruct@[1.12-2.7.2.15,);required-after:forge@[14.23.5.2768,);"
- + "after:mekanism;after:biomesoplenty;"
- + "after:botania;after:libvulpes;after:redstoneflux;"
- + "after:armorplus;after:enderio;after:projectred-core;"
- + "after:thermalfoundation;after:substratum;after:draconicevolution;"
- + "after:landcore;after:tesla;after:baubles;after:actuallyadditions;"
- + "after:natura@[1.12.2-4.3.2.42,);after:psi;after:avaritia;after:landcore;after:landcraft;"
- + "after:galacticraftcore;after:galacticraftplanets;after:minefactoryreloaded;"
- + "after:botanicaladdons;after:survivalist;after:modernmetals;after:basemetals;"
- + "after:projecte;after:gemsplus;after:appliedenergistics2;after:environmentaltech;"
- + "after:industrialforegoing;after:twilightforest@[3.7,);after:thaumcraft;after:crafttweaker;"
- + "after:modtweaker;after:conarm;after:micsiege;after:simplyjetpacks;after:astralsorcery;after:aoa3;"
- + "after:erebus;";
-
-}
diff --git a/src/main/java/landmaster/plustic/api/Portal.java b/src/main/java/landmaster/plustic/api/Portal.java
deleted file mode 100644
index cfa77ae9..00000000
--- a/src/main/java/landmaster/plustic/api/Portal.java
+++ /dev/null
@@ -1,152 +0,0 @@
-package landmaster.plustic.api;
-
-import java.util.*;
-
-import landmaster.plustic.*;
-import landmaster.plustic.net.*;
-import landmaster.plustic.util.*;
-import net.minecraft.client.resources.*;
-import net.minecraft.entity.*;
-import net.minecraft.entity.player.*;
-import net.minecraft.nbt.*;
-import net.minecraft.util.*;
-import net.minecraftforge.common.*;
-import net.minecraftforge.common.capabilities.*;
-import net.minecraftforge.event.*;
-import net.minecraftforge.event.entity.player.*;
-import net.minecraftforge.event.entity.player.PlayerEvent;
-import net.minecraftforge.fml.common.Loader;
-import net.minecraftforge.fml.common.eventhandler.*;
-import net.minecraftforge.fml.common.gameevent.*;
-import net.minecraftforge.fml.relauncher.*;
-import slimeknights.tconstruct.library.utils.*;
-
-public class Portal {
- @CapabilityInject(IPortalArmor.class)
- private static Capability PORTAL_ARMOR = null;
-
- public static final ResourceLocation PORTALARMOR_CAPLOCATION = new ResourceLocation(ModInfo.MODID, "portalarmor_cap");
-
- static {
- MinecraftForge.EVENT_BUS.register(Portal.class);
- CapabilityManager.INSTANCE.register(IPortalArmor.class, new Capability.IStorage() {
- @Override
- public NBTBase writeNBT(Capability capability, IPortalArmor instance, EnumFacing side) {
- return instance.location().toNBT(new NBTTagCompound());
- }
-
- @Override
- public void readNBT(Capability capability, IPortalArmor instance, EnumFacing side,
- NBTBase nbt) {
- instance.location(Coord4D.fromNBT((NBTTagCompound)nbt));
- }
- }, PortalArmor::new);
- }
-
- public static interface IPortalArmor {
- Coord4D location();
- void location(Coord4D loc);
- }
- private static class PortalArmor implements IPortalArmor {
- private Coord4D loc = Coord4D.NIHIL;
-
- @Override
- public Coord4D location() {
- return loc;
- }
-
- @Override
- public void location(Coord4D loc) {
- this.loc = loc;
- }
- }
- private static class PortalArmorProvider implements ICapabilitySerializable {
- @CapabilityInject(IPortalArmor.class)
- private static Capability PORTAL_ARMOR = null;
-
- private final PortalArmor cap;
- public PortalArmorProvider() { this.cap = new PortalArmor(); }
-
- @Override
- public boolean hasCapability(Capability> capability, EnumFacing facing) {
- return capability == PORTAL_ARMOR;
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public T getCapability(Capability capability, EnumFacing facing) {
- if (capability == PORTAL_ARMOR) {
- return (T)cap;
- }
- return null;
- }
-
- @Override
- public NBTTagCompound serializeNBT() {
- return (NBTTagCompound)PORTAL_ARMOR.writeNBT(cap, null);
- }
-
- @Override
- public void deserializeNBT(NBTTagCompound nbt) {
- PORTAL_ARMOR.readNBT(cap, null, nbt);
- }
-
- }
-
- @SubscribeEvent
- public static void addPortalArmorCapability(AttachCapabilitiesEvent event) {
- if (Loader.isModLoaded("conarm") && event.getObject() instanceof EntityPlayer) {
- event.addCapability(PORTALARMOR_CAPLOCATION, new PortalArmorProvider());
- }
- }
-
- public static final String PORTAL_NBT = "nickoftime";
-
- private static final Set portalable = new HashSet<>();
- public static void addPortalable(String identifier) {
- portalable.add(identifier);
- }
-
- public static boolean canUse(NBTTagCompound nbt) {
- for (String identifier: portalable) {
- if (TinkerUtil.hasTrait(nbt, identifier)) {
- return true;
- }
- }
- return false;
- }
-
- @SubscribeEvent
- public static void copyOnDeath(PlayerEvent.Clone event) {
- IPortalArmor oldCap = event.getOriginal().getCapability(PORTAL_ARMOR, null);
- IPortalArmor newCap = event.getEntityPlayer().getCapability(PORTAL_ARMOR, null);
- if (oldCap != null && newCap != null) {
- newCap.location(oldCap.location());
- }
- }
-
- @SideOnly(Side.CLIENT)
- @SubscribeEvent
- public static void testSetPortal(InputEvent.KeyInputEvent event) {
- if (PlusTiC.proxy.isControlPressed("set_portal")) {
- PacketHandler.INSTANCE.sendToServer(new PacketSetPortal());
- }
- }
-
- @SideOnly(Side.CLIENT)
- @SubscribeEvent
- public static void tooltip(ItemTooltipEvent event) {
- NBTTagCompound nbt0 = TagUtil.getTagSafe(event.getItemStack());
- if (event.isCanceled()
- || event.getItemStack() == null
- || !canUse(nbt0)) return;
- if (nbt0.hasKey(Portal.PORTAL_NBT, 10)) {
- NBTTagCompound nbt = nbt0.getCompoundTag(Portal.PORTAL_NBT);
- event.getToolTip().add(I18n.format("tooltip.plustic.portal.info",
- nbt.getInteger("x"),
- nbt.getInteger("y"),
- nbt.getInteger("z"),
- nbt.getInteger("dim")));
- }
- }
-}
diff --git a/src/main/java/landmaster/plustic/api/Sounds.java b/src/main/java/landmaster/plustic/api/Sounds.java
deleted file mode 100644
index 9655d111..00000000
--- a/src/main/java/landmaster/plustic/api/Sounds.java
+++ /dev/null
@@ -1,100 +0,0 @@
-package landmaster.plustic.api;
-
-import java.lang.ref.*;
-
-import it.unimi.dsi.fastutil.ints.*;
-import landmaster.plustic.modifiers.armor.*;
-import landmaster.plustic.traits.*;
-import net.minecraft.client.audio.*;
-import net.minecraft.entity.*;
-import net.minecraft.entity.player.*;
-import net.minecraft.util.*;
-import net.minecraftforge.event.*;
-import net.minecraftforge.fml.common.*;
-import net.minecraftforge.fml.common.eventhandler.*;
-import net.minecraftforge.fml.relauncher.*;
-import slimeknights.tconstruct.library.utils.*;
-import tonius.simplyjetpacks.sound.*;
-
-@Mod.EventBusSubscriber(modid = ModInfo.MODID)
-public class Sounds {
- public static final SoundEvent LASER_BEAM = new SoundEvent(new ResourceLocation(ModInfo.MODID, "laser_beam"))
- .setRegistryName("laser_beam");
-
- @SubscribeEvent
- public static void registerSounds(RegistryEvent.Register event) {
- event.getRegistry().register(LASER_BEAM);
- }
-
- public static void playSoundToAll(Entity entity, SoundEvent sound, float volume, float pitch) {
- entity.getEntityWorld().playSound(null, entity.posX, entity.posY, entity.posZ,
- sound, entity.getSoundCategory(), volume, pitch);
- }
-
- @SideOnly(Side.CLIENT)
- public static class MOTSSound extends MovingSound {
- private WeakReference player;
-
- public MOTSSound(EntityPlayer player, SoundEvent soundIn, SoundCategory categoryIn) {
- super(soundIn, categoryIn);
- this.player = new WeakReference<>(player);
- }
-
- @Override
- public void update() {
- if (player.get() == null
- || !TinkerUtil.hasTrait(TagUtil.getTagSafe(player.get().getHeldItemMainhand()),
- MusicOfTheSpheres.musicofthespheres.identifier)) {
- this.donePlaying = true;
- }
-
- this.xPosF = (float)this.player.get().posX;
- this.yPosF = (float)this.player.get().posY;
- this.zPosF = (float)this.player.get().posZ;
-
- //System.out.println("TEEHEE! "+this.player.get().getPositionVector());
- }
- }
-
- @SideOnly(Side.CLIENT)
- public static class PTSoundJetpack extends MovingSound {
- private static final Int2ObjectMap playingFor = Int2ObjectMaps.synchronize(new Int2ObjectOpenHashMap<>());
-
- private final EntityLivingBase user;
- private int fadeOut = -1;
-
- public PTSoundJetpack(EntityLivingBase target) {
- super(SJSoundRegistry.JETPACK.getSoundEvent(), SoundCategory.PLAYERS);
- this.repeat = true;
- this.user = target;
- playingFor.put(target.getEntityId(), this);
- }
-
- public static boolean isPlayingFor(int entityId) {
- return playingFor.containsKey(entityId) && playingFor.get(entityId) != null && !playingFor.get(entityId).donePlaying;
- }
-
- public static void clearPlayingFor() {
- playingFor.clear();
- }
-
- @Override
- public void update() {
- this.xPosF = (float) this.user.posX;
- this.yPosF = (float) this.user.posY;
- this.zPosF = (float) this.user.posZ;
-
- //System.out.println(this.user);
-
- if (this.fadeOut < 0 && !JetpackPancakeHippos.getJetpackStates().containsKey(this.user.getEntityId())) {
- this.fadeOut = 0;
- playingFor.remove(this.user.getEntityId());
- } else if (this.fadeOut >= 5) {
- this.donePlaying = true;
- } else if (this.fadeOut >= 0) {
- this.volume = 1.0F - this.fadeOut / 5F;
- this.fadeOut++;
- }
- }
- }
-}
diff --git a/src/main/java/landmaster/plustic/api/Toggle.java b/src/main/java/landmaster/plustic/api/Toggle.java
deleted file mode 100644
index ffc875e7..00000000
--- a/src/main/java/landmaster/plustic/api/Toggle.java
+++ /dev/null
@@ -1,386 +0,0 @@
-package landmaster.plustic.api;
-
-import java.io.*;
-import java.util.*;
-import java.util.stream.*;
-
-import org.lwjgl.opengl.*;
-
-import c4.conarm.lib.capabilities.*;
-import it.unimi.dsi.fastutil.booleans.*;
-import it.unimi.dsi.fastutil.objects.*;
-import landmaster.plustic.*;
-import landmaster.plustic.net.*;
-import net.minecraft.client.gui.*;
-import net.minecraft.client.renderer.*;
-import net.minecraft.client.resources.*;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.player.*;
-import net.minecraft.item.*;
-import net.minecraft.nbt.*;
-import net.minecraft.util.*;
-import net.minecraftforge.common.*;
-import net.minecraftforge.common.capabilities.*;
-import net.minecraftforge.event.*;
-import net.minecraftforge.event.entity.player.*;
-import net.minecraftforge.fml.common.Loader;
-import net.minecraftforge.fml.common.eventhandler.*;
-import net.minecraftforge.fml.common.gameevent.*;
-import net.minecraftforge.fml.relauncher.*;
-import slimeknights.tconstruct.library.TinkerRegistry;
-import slimeknights.tconstruct.library.tools.*;
-import slimeknights.tconstruct.library.utils.*;
-
-/**
- *
- * Class for toggleable modifiers
- * @author Landmaster
- *
- */
-public class Toggle {
- public static final ResourceLocation TOGGLEARMOR_CAPLOCATION = new ResourceLocation(ModInfo.MODID, "togglearmor_cap");
-
- private static final Set toggleable = new HashSet<>();
- private static final Map toggleableAlias = new HashMap<>();
-
- @CapabilityInject(IToggleArmor.class)
- private static Capability TOGGLE_ARMOR = null;
-
- static {
- MinecraftForge.EVENT_BUS.register(Toggle.class);
- CapabilityManager.INSTANCE.register(IToggleArmor.class, new Capability.IStorage() {
- @Override
- public NBTBase writeNBT(Capability capability, IToggleArmor instance, EnumFacing side) {
- NBTTagList nbt = new NBTTagList();
- for (String disabled : instance.getDisabled()) {
- nbt.appendTag(new NBTTagString(disabled));
- }
- return nbt;
- }
-
- @Override
- public void readNBT(Capability capability, IToggleArmor instance, EnumFacing side,
- NBTBase nbt) {
- for (NBTBase elem: (NBTTagList)nbt) {
- instance.getDisabled().add(((NBTTagString)elem).getString());
- }
- }
- }, ToggleArmor::new);
- }
-
- public static final String ARMOR_FLAG = "\\";
-
- public static interface IToggleArmor {
- Set getDisabled();
- }
- private static class ToggleArmor implements IToggleArmor {
- private Set disableds = new ObjectOpenHashSet<>();
-
- @Override
- public Set getDisabled() {
- return disableds;
- }
- }
- private static class ToggleArmorProvider implements ICapabilitySerializable {
- @CapabilityInject(IToggleArmor.class)
- private static Capability TOGGLE_ARMOR = null;
-
- private final ToggleArmor cap;
- public ToggleArmorProvider() { this.cap = new ToggleArmor(); }
-
- @Override
- public boolean hasCapability(Capability> capability, EnumFacing facing) {
- return capability == TOGGLE_ARMOR;
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public T getCapability(Capability capability, EnumFacing facing) {
- if (capability == TOGGLE_ARMOR) {
- return (T)cap;
- }
- return null;
- }
-
- @Override
- public NBTTagList serializeNBT() {
- return (NBTTagList)TOGGLE_ARMOR.writeNBT(cap, null);
- }
-
- @Override
- public void deserializeNBT(NBTTagList nbt) {
- TOGGLE_ARMOR.readNBT(cap, null, nbt);
- }
-
- };
-
- @SubscribeEvent
- public static void addToggleArmorCapability(AttachCapabilitiesEvent event) {
- if (Loader.isModLoaded("conarm") && event.getObject() instanceof EntityPlayer) {
- event.addCapability(TOGGLEARMOR_CAPLOCATION, new ToggleArmorProvider());
- }
- }
-
- public static void addToggleable(String trait) {
- //System.out.println(toggleable);
- toggleable.add(trait);
- }
- public static void addToggleableAlias(String trait, String alias) {
- toggleableAlias.put(alias, trait);
- }
- public static String unwrapAlias(String alias) {
- String res = alias;
- while (toggleableAlias.containsKey(res)) {
- res = toggleableAlias.get(alias);
- }
- return res;
- }
- public static String rawIdentifier(String identifier) {
- if (identifier.startsWith(ARMOR_FLAG)) {
- return identifier.substring(ARMOR_FLAG.length());
- }
- return identifier;
- }
-
- public static class Gui extends GuiScreen {
- @CapabilityInject(IToggleArmor.class)
- private static Capability TOGGLE_ARMOR = null;
-
- public static final int OPTIONS_PER_PAGE = 6;
-
- private final ResourceLocation background = new ResourceLocation(ModInfo.MODID, "textures/gui/toggle.png");
-
- private int page;
- private EntityPlayer player;
- private List identifiers;
- private BooleanList enableds;
-
- private int xSize = 176;
- private int ySize = 128;
- private int guiLeft, guiTop;
-
- public Gui(EntityPlayer player, Collection armorAbilities) {
- this.player = player;
- page = 0;
- Object2BooleanMap temp = new Object2BooleanLinkedOpenHashMap<>();
- NBTTagCompound nbt = TagUtil.getTagSafe(this.player.getHeldItemMainhand());
- NBTTagList traits = TagUtil.getTraitsTagList(nbt);
- for (int i=0; i(temp.keySet());
- enableds = new BooleanArrayList(temp.values());
-
- if (player.hasCapability(TOGGLE_ARMOR, null)) {
- IToggleArmor cap = player.getCapability(TOGGLE_ARMOR, null);
- Set disabled = cap.getDisabled();
- for (String ability: armorAbilities) {
- identifiers.add(ARMOR_FLAG+ability);
- enableds.add(!disabled.contains(ability));
- }
- }
- }
-
- @Override
- public void initGui() {
- super.initGui();
- guiLeft = (width - xSize) / 2;
- guiTop = (height - ySize) / 2;
- }
-
- @Override
- public void drawScreen(int mouseX, int mouseY, float partialTicks) {
- drawDefaultBackground();
-
- super.drawScreen(mouseX, mouseY, partialTicks);
-
- GlStateManager.color(1, 1, 1, 1);
- GlStateManager.enableAlpha();
- GL11.glEnable(GL11.GL_BLEND);
-
- // draw background proper
- mc.renderEngine.bindTexture(background);
- drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
- // draw header
- fontRenderer.drawString(I18n.format("gui.header.toggle"), guiLeft+5, guiTop+5, 0xFFFFFF);
-
- // draw list background
- mc.renderEngine.bindTexture(background);
- for (int i=0; i 0) drawTexturedModalRect(guiLeft+160, guiTop+18, 176, 12, 12, 21);
- if (page < identifiers.size() / OPTIONS_PER_PAGE - (identifiers.size() % OPTIONS_PER_PAGE == 0 ? 1 : 0)) drawTexturedModalRect(guiLeft+160, guiTop+100, 176+12, 12, 12, 21);
-
- // draw items
- for (int i=page*OPTIONS_PER_PAGE; i= rectX - 1 && pointX < rectX + rectWidth + 1 && pointY >= rectY - 1 && pointY < rectY + rectHeight + 1;
- }
-
- public void update(String identifier, boolean value) {
- int ind = identifiers.indexOf(identifier);
- if (ind>=0) enableds.set(ind, value);
- }
- }
-
- @SubscribeEvent
- public static void copyOnDeath(net.minecraftforge.event.entity.player.PlayerEvent.Clone event) {
- IToggleArmor oldCap = event.getOriginal().getCapability(TOGGLE_ARMOR, null);
- IToggleArmor newCap = event.getEntityPlayer().getCapability(TOGGLE_ARMOR, null);
- if (oldCap != null && newCap != null) {
- newCap.getDisabled().clear();
- newCap.getDisabled().addAll(oldCap.getDisabled());
- }
- }
-
- @SubscribeEvent
- public static void onPlayerRespawn(net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent event) {
- syncArmorToClient(event);
- }
-
- @SubscribeEvent
- public static void onPlayerLogin(net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerLoggedInEvent event) {
- syncArmorToClient(event);
- }
-
- @SubscribeEvent
- public static void changeDim(net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerChangedDimensionEvent event) {
- syncArmorToClient(event);
- }
-
- protected static void syncArmorToClient(net.minecraftforge.fml.common.gameevent.PlayerEvent event) {
- IToggleArmor cap = event.player.getCapability(TOGGLE_ARMOR, null);
- if (cap != null && !event.player.world.isRemote) {
- for (String disabled: cap.getDisabled()) {
- PacketHandler.INSTANCE.sendTo(new PacketUpdateToggleGui(ARMOR_FLAG+disabled, false), (EntityPlayerMP)event.player);
- }
- }
- }
-
- @SideOnly(Side.CLIENT)
- @SubscribeEvent
- public static void testAndToggle(InputEvent.KeyInputEvent event) {
- if (PlusTiC.proxy.isControlPressed("toggle_gui")) {
- PacketHandler.INSTANCE.sendToServer(new PacketRequestToggleGui());
- }
- }
-
- @SideOnly(Side.CLIENT)
- @SubscribeEvent
- public static void tooltip(ItemTooltipEvent event) {
- if (event.getItemStack() == null
- || !(event.getItemStack().getItem() instanceof ToolCore))
- return;
- NBTTagCompound nbt = TagUtil.getTagSafe(event.getItemStack());
- NBTTagList traits = TagUtil.getTraitsTagList(nbt);
- NBTTagCompound toggle = TagUtil.getTagSafe(nbt, "PlusTiC_toggle");
- for (int i=0; i getToggleableArmor(EntityPlayer player) {
- //System.out.println(Arrays.toString(toggleable.toArray()));
- return Loader.isModLoaded("conarm") ? Optional.ofNullable(ArmorAbilityHandler.getArmorAbilitiesData(player))
- .map(ArmorAbilityHandler.IArmorAbilities::getAbilityMap)
- .map(Map::keySet)
- //.map(set -> { System.out.println(Arrays.toString(set.toArray())); return set; })
- .map(set -> set.stream().filter(str -> toggleable.contains(ARMOR_FLAG+str)))
- .orElse(Stream.empty()) : Stream.empty();
- }
-
- public static boolean canToggle(ItemStack is) {
- return canToggle(TagUtil.getTagSafe(is));
- }
-
- public static boolean canToggle(NBTTagCompound nbt) {
- NBTTagList traits = TagUtil.getTraitsTagList(nbt);
- for (int i=0; i list) {
- list.add(new ItemStack(this));
- list.add(new ItemStack(this, 1, 1));
- }
-
- @Override
- public String getSpecialName(ItemStack stack) {
- return stack.getMetadata() != 0 ? "core" : "tank";
- }
-
- @Override
- public ItemStack getPickBlock(IBlockState state, RayTraceResult target, World world, BlockPos pos, EntityPlayer player) {
- return new ItemStack(this, 1, getMetaFromState(state));
- }
-
- @Override
- public boolean hasTileEntity(IBlockState state) {
- return true;
- }
-
- @Nullable
- @Override
- public TileEntity createTileEntity(World world, IBlockState state) {
- return state.getValue(CORE) ? new TECentrifugeCore() : new TECentrifugeTank();
- }
-
- @SideOnly(Side.CLIENT)
- public BlockRenderLayer getRenderLayer() {
- return BlockRenderLayer.CUTOUT;
- }
-
- @Override
- public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) {
- // adapted from Tinker's TileTank code
- TileEntity te = worldIn.getTileEntity(pos);
- if (te == null || !te.hasCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY, facing)) {
- return false;
- }
- IFluidHandler fluidHandler = te.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY, facing);
- ItemStack heldItem = playerIn.getHeldItem(hand);
- if (FluidUtil.interactWithFluidHandler(playerIn, hand, fluidHandler)) {
- return true;
- }
-
- if (state.getValue(CORE) && !(Block.getBlockFromItem(heldItem.getItem()) instanceof BlockCentrifuge)) {
- if (!worldIn.isRemote) {
- playerIn.openGui(PlusTiC.INSTANCE, PTGuiHandler.CENTRIFUGE_CORE, worldIn, pos.getX(), pos.getY(), pos.getZ());
- }
- return true;
- }
-
- return FluidUtil.getFluidHandler(heldItem) != null;
- }
-
- @Override
- public boolean isFullCube(IBlockState state) {
- return false;
- }
-
- @Override
- public boolean isOpaqueCube(IBlockState state) {
- return false;
- }
-
- @Override
- public void getDrops(NonNullList drops, IBlockAccess world, BlockPos pos, IBlockState state, int fortune) {
- super.getDrops(drops, world, pos, state, fortune);
- for (ItemStack drop: drops) {
- if (Block.getBlockFromItem(drop.getItem()) instanceof BlockCentrifuge) {
- drop.setTagCompound(new NBTTagCompound());
- drop.getTagCompound().setTag("BlockEntityTag", world.getTileEntity(pos).serializeNBT());
- }
- }
- }
-
- @Override
- public boolean removedByPlayer(IBlockState state, World world, BlockPos pos, EntityPlayer player, boolean willHarvest) {
- if (willHarvest) return true; // see BlockFlowerPot.java
- return super.removedByPlayer(state, world, pos, player, willHarvest);
- }
-
- @Override
- public void harvestBlock(World world, EntityPlayer player, BlockPos pos, IBlockState state, @Nullable TileEntity te, ItemStack tool) {
- super.harvestBlock(world, player, pos, state, te, tool);
- world.setBlockToAir(pos);
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public void addInformation(ItemStack stack, @Nullable World worldIn, List tooltip, ITooltipFlag flagIn) {
- super.addInformation(stack, worldIn, tooltip, flagIn);
- NBTTagCompound blockEntityTag = stack.getSubCompound("BlockEntityTag");
- if (blockEntityTag != null && blockEntityTag.hasKey("Tank", 10)) {
- FluidStack fs = FluidStack.loadFluidStackFromNBT(blockEntityTag.getCompoundTag("Tank"));
- tooltip.add(I18n.format("tooltip.plustic.centrifuge.fluid_info", fs.getLocalizedName(), fs.amount));
- }
- }
-}
diff --git a/src/main/java/landmaster/plustic/block/IMetaBlockName.java b/src/main/java/landmaster/plustic/block/IMetaBlockName.java
deleted file mode 100644
index 9ad81266..00000000
--- a/src/main/java/landmaster/plustic/block/IMetaBlockName.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package landmaster.plustic.block;
-
-import net.minecraft.item.*;
-
-public interface IMetaBlockName {
- String getSpecialName(ItemStack stack);
-}
diff --git a/src/main/java/landmaster/plustic/block/MetalBlock.java b/src/main/java/landmaster/plustic/block/MetalBlock.java
deleted file mode 100644
index 919f0e81..00000000
--- a/src/main/java/landmaster/plustic/block/MetalBlock.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package landmaster.plustic.block;
-
-import net.minecraft.block.*;
-import net.minecraft.block.material.*;
-import net.minecraft.util.math.*;
-import net.minecraft.world.*;
-import slimeknights.tconstruct.library.*;
-
-public class MetalBlock extends Block {
- public MetalBlock(String name) {
- super(Material.IRON);
- this.setHarvestLevel("pickaxe", -1);
- this.setHardness(5);
- this.setTranslationKey(name).setRegistryName(name);
- this.setCreativeTab(TinkerRegistry.tabGeneral);
- }
-
- @Override
- public boolean isBeaconBase(IBlockAccess worldObj, BlockPos pos, BlockPos beacon) {
- return true;
- }
-}
diff --git a/src/main/java/landmaster/plustic/config/Config.java b/src/main/java/landmaster/plustic/config/Config.java
deleted file mode 100644
index 9ff05163..00000000
--- a/src/main/java/landmaster/plustic/config/Config.java
+++ /dev/null
@@ -1,324 +0,0 @@
-package landmaster.plustic.config;
-
-import java.io.*;
-import java.lang.invoke.*;
-import java.lang.reflect.*;
-import java.util.*;
-import java.util.stream.*;
-
-import org.apache.commons.lang3.tuple.*;
-
-import com.google.common.base.Throwables;
-
-import it.unimi.dsi.fastutil.ints.*;
-import landmaster.plustic.traits.*;
-import net.minecraft.item.*;
-import net.minecraft.util.*;
-import net.minecraft.util.text.translation.*;
-import net.minecraftforge.common.config.*;
-import net.minecraftforge.fluids.*;
-import net.minecraftforge.fml.common.event.*;
-import net.minecraftforge.oredict.OreDictionary;
-import slimeknights.tconstruct.library.materials.*;
-import slimeknights.tconstruct.library.smeltery.*;
-
-public class Config extends Configuration {
- // MODULES
- public static boolean base;
- public static boolean bop;
- public static boolean projectRed;
- public static boolean mekanism;
- public static boolean botania;
- public static boolean advancedRocketry;
- public static boolean armorPlus;
- public static boolean thermalFoundation;
- public static boolean draconicEvolution;
- public static boolean actuallyAdditions;
- public static boolean natura;
- public static boolean psi;
- public static boolean avaritia;
- public static boolean landCraft;
- public static boolean landCore;
- public static boolean mfr;
- public static boolean galacticraft;
- public static boolean survivalist;
- public static boolean projectE;
- public static boolean gemsplus;
- public static boolean appEng2;
- public static boolean environTech;
- public static boolean thaumcraft;
- public static boolean constructsArmory;
- public static boolean machines;
- public static boolean astralSorcery;
- public static boolean aoa;
- public static boolean erebus;
-
- public static boolean jetpackConarmModifier;
- public static float jetpackDurabilityBonusScale;
-
- // alas…
- public static boolean forceOutNaturalPledgeMaterials;
-
- public static boolean pyrotheumSmelt;
- public static boolean tfMelt;
-
- public static boolean katana;
- public static boolean laserGun;
-
- public static float katana_combo_multiplier;
- public static boolean katana_boosts_only_on_killing;
- public static boolean katana_smooth_progression;
-
- public static int laser_energy;
-
- public static int centrifugeEnergyPerMB;
-
- private static final IntArrayList botan_amount = new IntArrayList(Botanical.MAX_LEVELS);
-
- private static final Set>> blacklistedForCentrifuge = new HashSet<>();
-
- public static IntList getBotanAmount() {
- return IntLists.unmodifiable(botan_amount);
- }
-
- private static class TrashThing {
- public final int weight;
- public final ItemStack stack;
-
- public TrashThing(int weight, ItemStack stack) {
- this.weight = weight;
- this.stack = stack;
- }
- }
-
- private static final List trashThings = new ArrayList<>();
-
- private static int trashThingsSum = 0;
- public static @javax.annotation.Nullable ItemStack fetchThing(Random random) {
- if (trashThingsSum <= 0) {
- trashThingsSum = trashThings.stream().mapToInt(t -> t.weight).sum();
- }
- int rval = random.nextInt(trashThingsSum);
- ItemStack thing = ItemStack.EMPTY;
- for (TrashThing entry: trashThings) {
- rval -= entry.weight;
- thing = entry.stack;
- if (rval < 0) break;
- }
- return thing;
- }
-
- public static List fruitStacks = new ArrayList<>();
- public static IntSet fruitOreDicts;
- public static boolean isFruit(ItemStack stack) {
- for (int id: OreDictionary.getOreIDs(stack)) {
- if (fruitOreDicts.contains(id)) {
- return true;
- }
- }
- for (ItemStack fruit: fruitStacks) {
- if (OreDictionary.itemMatches(fruit, stack, false)) {
- return true;
- }
- }
- return false;
- }
-
- public Config(FMLPreInitializationEvent event) {
- super(event.getSuggestedConfigurationFile());
- }
-
- public void init1() {
- this.addCustomCategoryComment("modules", "Use this to disable entire modules.");
-
- // MODULES
- base = getBoolean("Enable vanilla TiC addons", "modules", true, "Add features to vanilla Tinkers Construct");
- bop = getBoolean("Enable BoP integration", "modules", true, "Integrate with Biomes o' Plenty");
- projectRed = getBoolean("Enable Project Red integration", "modules", true, "Integrate with Project Red-Core");
- mekanism = getBoolean("Enable Mekanism integration", "modules", true, "Integrate with Mekanism");
- botania = getBoolean("Enable Botania integration", "modules", true, "Integrate with Botania");
- {
- forceOutNaturalPledgeMaterials = getBoolean("Force out Natural Pledge TiC materials", "tweaks", true,
- "If Natural Pledge is loaded:\n"
- + "If true: replace Natural Pledge Botania TiC materials with PlusTiC ones;\n"
- + "Otherwise: do *not* load the Botania module for PlusTiC, overriding other settings.");
- }
- advancedRocketry = getBoolean("Enable Advanced Rocketry integration", "modules", true, "Integrate with Advanced Rocketry (actually LibVulpes)");
- armorPlus = getBoolean("Enable ArmorPlus integration", "modules", true, "Integrate with ArmorPlus");
- thermalFoundation = getBoolean("Enable Thermal Foundation integration", "modules", true, "Integrate with Thermal Foundation");
- {
- pyrotheumSmelt = getBoolean("Use Pyrotheum as smeltery fuel", "tweaks", true, "Use Pyrotheum as TiC smeltery fuel (only if Thermal Foundation is loaded)");
- tfMelt = getBoolean("Add smeltery recipes for Redstone, Glowstone, and Ender pearl", "tweaks", true, "Add smelting recipes for Redstone, Glowstone, and Ender pearl (only if Thermal Foundation is loaded)");
- }
- draconicEvolution = getBoolean("Enable Draconic Evolution integration", "modules", true, "Integrate with Draconic Evolution");
- actuallyAdditions = getBoolean("Enable Actually Additions support", "modules", true, "Integrate with Actually Additions");
- natura = getBoolean("Enable Natura support", "modules", true, "Integrate with Natura");
- psi = getBoolean("Enable Psi support", "modules", true, "Integrate with Psi");
- avaritia = getBoolean("Enable Avaritia support", "modules", true, "Integrate with Avaritia");
- landCraft = getBoolean("Enable Land Craft support", "modules", true, "Integrate with Land Craft");
- landCore = getBoolean("Enable LandCore support", "modules", true, "Integrate with LandCore");
- mfr = getBoolean("Enable MFR support", "modules", true, "Integrate with Minefactory Reloaded");
- galacticraft = getBoolean("Enable Galacticraft support", "modules", true, "Integrate with Galacticraft");
- survivalist = getBoolean("Enable Survivalist support", "modules", true, "Integrate with Survivalist");
- projectE = getBoolean("Enable ProjectE support", "modules", true, "Integrate with ProjectE");
- gemsplus = getBoolean("Enable Gems+ support", "modules", true, "Integrate with Gems+");
- appEng2 = getBoolean("Enable Applied Energistics 2 support", "modules", true, "Integrate with Applied Energistics 2");
- environTech = getBoolean("Enable Environmental Tech support", "modules", true, "Integrate with Environmental Tech");
- thaumcraft = getBoolean("Enable Thaumcraft support", "modules", true, "Integrate with Thaumcraft");
- constructsArmory = getBoolean("Enable Constructs Armory support", "modules", true, "Integrate with Constructs Armory");
- machines = getBoolean("Enable Machines addon", "modules", true, "Enable the machines from this mod (Centrifuge, etc.)");
- astralSorcery = getBoolean("Enable Astral Sorcery support", "modules", true, "Integrate with Astral Sorcery");
- aoa = getBoolean("Enable AoA support", "modules", true, "Integrate with AoA");
- erebus = getBoolean("Enable Erebus support", "modules", true, "Integrate with Erebus");
-
- jetpackConarmModifier = getBoolean("Add Simply Jetpacks as ConArm modifiers", "modifiers", true, "Add Simply Jetpacks as ConArm modifiers");
- jetpackDurabilityBonusScale = getFloat("Durability bonus scalar for Simply Jetpacks modifiers", "modifiers", 1f/8000, 0, Float.MAX_VALUE, "Durability bonus calculated as FUEL_CAPACITY_OF_JETPACK*this_scalar");
-
- // TOOLS
- katana = getBoolean("Enable Katana", "tools", true, "Enable Katana");
- katana_combo_multiplier = getFloat("Katana combo multiplier", "tools", 1.25f, 0, Float.MAX_VALUE, "Multiply combo value by this to calculate bonus damage");
- katana_boosts_only_on_killing = getBoolean("Katana boosts only on killing", "tools", true, "Does Katana boost only on killing mob (true) or on any hit (false)?");
- katana_smooth_progression = getBoolean("Smooth Katana progression", "tools", false, "Should boosted damage of Katana change smoothly from material to material?");
-
- laserGun = getBoolean("Enable Laser Gun", "tools", true, "Enable Laser Gun");
- laser_energy = getInt("Laser Gun Energy consumed", "tools", 100, 0, Integer.MAX_VALUE, "How much energy is used, by default, per laser attack");
-
- // Trash
- String[] trash_things_arr = getStringList("Trash generation", "tweaks",
- new String[] {"20|coal", "5|slime_ball", "10|saddle",
- "5|tconstruct:edible;1", "1|emerald", "3|melon"},
- "Objects that the Trash modifier will generate; enter in the format \"weight|modid:name;meta\" (leave meta blank for zero metadata)");
- {
- int meta = 0;
- int weight = 0;
- for (int i=0; i 1) {
- try {
- meta = Integer.parseInt(loc_meta[1]);
- } catch (NumberFormatException e) {
- e.printStackTrace();
- }
- }
- Item it = Item.REGISTRY.getObject(new ResourceLocation(loc_meta[0]));
- if (it != null && weight > 0) {
- trashThings.add(new TrashThing(weight, new ItemStack(it, 1, meta)));
- }
- }
- }
-
- // Fruit salad
- String[] fruitStacksArr = this.getStringList("Fruits stack list", "tweaks",
- new String[] {"apple", "golden_apple;"+OreDictionary.WILDCARD_VALUE, "melon", "chorus_fruit"}, "Enter in the format \"modid:name;meta\" (leave meta blank for zero metadata)");
- {
- int meta = 0;
- for (int i=0; i 1) {
- try {
- meta = Integer.parseInt(loc_meta[1]);
- } catch (NumberFormatException e) {
- e.printStackTrace();
- }
- }
- Item it = Item.REGISTRY.getObject(new ResourceLocation(loc_meta[0]));
- if (it != null) {
- fruitStacks.add(new ItemStack(it, 1, meta));
- }
- }
- }
- fruitOreDicts = Arrays.stream(this.getStringList("Fruits oredict list", "tweaks",
- new String[] { "cropApple", "listAllfruit" }, "Valid ore dictionary values for Fruit Salad"))
- .mapToInt(OreDictionary::getOreID)
- .collect(IntOpenHashSet::new, IntOpenHashSet::add, IntOpenHashSet::addAll);
-
- // Modifier values for Botanical
- Property botan_amount_prop = this.get("tweaks", "Modifier values for Botanical", new int[0]);
- botan_amount_prop.setLanguageKey("Modifiers added for Botanical modifier");
- botan_amount_prop.setComment("Enter integer amounts, specifying the amount of modifiers added to the tool for each level, in increasing order of level (defaults will be extrapolated if some left blank)");
- botan_amount_prop.setMinValue(0);
-
- botan_amount.addElements(botan_amount.size(), botan_amount_prop.getIntList());
- if (botan_amount.isEmpty()) botan_amount.add(1);
- while (botan_amount.size() < Botanical.MAX_LEVELS) {
- botan_amount.add(botan_amount.getInt(botan_amount.size()-1)<<1);
- }
-
- // Centrifuge
- for (String blacklistEntry: this.getStringList("Centrifuge blacklist", "tweaks", new String[0], "Enter in the format inputFluid:outputFluid1;outputFluid2;outputFluid3")) {
- String[] separateInOut = blacklistEntry.split(":");
- blacklistedForCentrifuge.add(Pair.of(separateInOut[0], new HashSet<>(Arrays.asList(separateInOut[1].split(";")))));
- }
- centrifugeEnergyPerMB = this.getInt("Centrifuge energy per mB", "tweaks", 5, 0, Integer.MAX_VALUE, "Energy consumed by centrifuge per millibucket");
-
- for (String traitLoadEntry: this.getStringList("Force load traits", "tweaks", new String[0], "Force-load these traits (as a fully-qualified class name; e.g. landmaster.plustic.traits.Global) without the required mods themselves being loaded")) {
- try {
- Class.forName(traitLoadEntry);
- } catch (ClassNotFoundException e) {
- e.printStackTrace();
- }
- }
- }
-
- private static final MethodHandle injectHandle;
- static {
- try {
- Method temp = LanguageMap.class.getDeclaredMethod("inject", LanguageMap.class, InputStream.class);
- temp.setAccessible(true);
- injectHandle = MethodHandles.lookup().unreflect(temp);
- } catch (Throwable e) {
- Throwables.throwIfUnchecked(e);
- throw new RuntimeException(e);
- }
- }
-
- private static final LanguageMap englishMap = new LanguageMap();
- static {
- try {
- final String[] langFiles = new String[] { "/assets/plustic/lang/en_us.lang", "/assets/plustic/lang/en_US.lang" };
- for (String langFile: langFiles) {
- try (InputStream inS = Config.class.getResourceAsStream(langFile)) {
- injectHandle.invokeExact(englishMap, inS);
- }
- }
- } catch (Throwable e) {
- Throwables.throwIfUnchecked(e);
- throw new RuntimeException(e);
- }
- }
-
- public void init2(Map materials) {
- this.addCustomCategoryComment("materials", "Materials will only appear here when their respective modules are loaded.");
-
- for (final Iterator it = materials.values().iterator(); it.hasNext(); ) {
- final Material mat = it.next();
- final String matName = englishMap.translateKey(String.format(Material.LOC_Name, mat.getIdentifier()));
- if (!this.getBoolean(String.format("Enable material %s", mat.getIdentifier()),
- "materials", true, String.format("Set to false to prevent %s from being loaded", matName))) {
- it.remove(); // delete the disabled material
- }
- }
- }
-
- public void update() {
- if (hasChanged()) save();
- }
-
- public static boolean isCentrifugeRecipeValid(AlloyRecipe recipe) {
- Pair> pairToCheck = Pair.of(
- FluidRegistry.getFluidName(recipe.getResult()),
- recipe.getFluids().stream()
- .map(FluidRegistry::getFluidName)
- .collect(Collectors.toSet()));
- return !blacklistedForCentrifuge.contains(pairToCheck);
- }
-}
diff --git a/src/main/java/landmaster/plustic/crafttweaker/SetEnergyAction.java b/src/main/java/landmaster/plustic/crafttweaker/SetEnergyAction.java
deleted file mode 100644
index b4ded5f7..00000000
--- a/src/main/java/landmaster/plustic/crafttweaker/SetEnergyAction.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package landmaster.plustic.crafttweaker;
-
-import com.blamejared.compat.tconstruct.materials.*;
-
-import crafttweaker.*;
-import landmaster.plustic.tools.stats.*;
-import slimeknights.tconstruct.library.materials.*;
-
-public class SetEnergyAction implements IAction {
- private final ITICMaterial mat;
- private final int energy;
-
- public SetEnergyAction(ITICMaterial mat, int energy) {
- this.mat = mat;
- this.energy = energy;
- }
-
- @Override
- public void apply() {
- //BatteryCellMaterialStats oldStats = ((Material)mat.getInternal()).getStatsOrUnknown(BatteryCellMaterialStats.TYPE);
- BatteryCellMaterialStats newStats = new BatteryCellMaterialStats(this.energy);
- ((Material)mat.getInternal()).addStats(newStats);
- }
-
- @Override
- public String describe() {
- return "Setting battery cell energy capacity of " + mat.getName() + " to " + energy;
- }
-
-}
diff --git a/src/main/java/landmaster/plustic/crafttweaker/SetLaserPowerAction.java b/src/main/java/landmaster/plustic/crafttweaker/SetLaserPowerAction.java
deleted file mode 100644
index 8cc76650..00000000
--- a/src/main/java/landmaster/plustic/crafttweaker/SetLaserPowerAction.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package landmaster.plustic.crafttweaker;
-
-import com.blamejared.compat.tconstruct.materials.*;
-
-import crafttweaker.*;
-import landmaster.plustic.tools.stats.*;
-import slimeknights.tconstruct.library.materials.*;
-
-public class SetLaserPowerAction implements IAction {
- private final ITICMaterial mat;
- private final float power;
-
- public SetLaserPowerAction(ITICMaterial mat, float power) {
- this.mat = mat;
- this.power = power;
- }
-
- @Override
- public void apply() {
- LaserMediumMaterialStats oldStats = ((Material)mat.getInternal()).getStatsOrUnknown(LaserMediumMaterialStats.TYPE);
- LaserMediumMaterialStats newStats = new LaserMediumMaterialStats(this.power, oldStats.range);
- ((Material)mat.getInternal()).addStats(newStats);
- }
-
- @Override
- public String describe() {
- return "Setting laser power of " + mat.getName() + " to " + power;
- }
-}
diff --git a/src/main/java/landmaster/plustic/crafttweaker/SetLaserRangeAction.java b/src/main/java/landmaster/plustic/crafttweaker/SetLaserRangeAction.java
deleted file mode 100644
index 113a1ab7..00000000
--- a/src/main/java/landmaster/plustic/crafttweaker/SetLaserRangeAction.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package landmaster.plustic.crafttweaker;
-
-import com.blamejared.compat.tconstruct.materials.*;
-
-import crafttweaker.*;
-import landmaster.plustic.tools.stats.*;
-import slimeknights.tconstruct.library.materials.*;
-
-public class SetLaserRangeAction implements IAction {
- private final ITICMaterial mat;
- private final float range;
-
- public SetLaserRangeAction(ITICMaterial mat, float range) {
- this.mat = mat;
- this.range = range;
- }
-
- @Override
- public void apply() {
- LaserMediumMaterialStats oldStats = ((Material)mat.getInternal()).getStatsOrUnknown(LaserMediumMaterialStats.TYPE);
- LaserMediumMaterialStats newStats = new LaserMediumMaterialStats(oldStats.power, this.range);
- ((Material)mat.getInternal()).addStats(newStats);
- }
-
- @Override
- public String describe() {
- return "Setting laser range of " + mat.getName() + " to " + range;
- }
-}
diff --git a/src/main/java/landmaster/plustic/crafttweaker/ToolStats.java b/src/main/java/landmaster/plustic/crafttweaker/ToolStats.java
deleted file mode 100644
index 7da1d384..00000000
--- a/src/main/java/landmaster/plustic/crafttweaker/ToolStats.java
+++ /dev/null
@@ -1,54 +0,0 @@
-package landmaster.plustic.crafttweaker;
-
-import com.blamejared.compat.tconstruct.materials.*;
-
-import crafttweaker.*;
-//import crafttweaker.IAction;
-import crafttweaker.annotations.*;
-import landmaster.plustic.tools.stats.*;
-import slimeknights.tconstruct.library.materials.*;
-//import crafttweaker.zenscript.IBracketHandler;
-import stanhebben.zenscript.annotations.*;
-
-@ZenClass("mods.plustic.toolstats")
-@ZenRegister
-@ModOnly("modtweaker")
-public class ToolStats {
- /*
- static IAction action;
- static IBracketHandler bhandler;
- */
-
- @ZenMethod("energy")
- public static int getEnergy(ITICMaterial mat) {
- BatteryCellMaterialStats stats = ((Material)mat.getInternal()).getStatsOrUnknown(BatteryCellMaterialStats.TYPE);
- return stats.energy;
- }
-
- @ZenMethod("energy")
- public static void setEnergy(ITICMaterial mat, int energy) {
- CraftTweakerAPI.apply(new SetEnergyAction(mat, energy));
- }
-
- @ZenMethod("laserPower")
- public static float getLaserPower(ITICMaterial mat) {
- LaserMediumMaterialStats stats = ((Material)mat.getInternal()).getStatsOrUnknown(LaserMediumMaterialStats.TYPE);
- return stats.power;
- }
-
- @ZenMethod("laserPower")
- public static void setLaserPower(ITICMaterial mat, float power) {
- CraftTweakerAPI.apply(new SetLaserPowerAction(mat, power));
- }
-
- @ZenMethod("laserRange")
- public static float getLaserRange(ITICMaterial mat) {
- LaserMediumMaterialStats stats = ((Material)mat.getInternal()).getStatsOrUnknown(LaserMediumMaterialStats.TYPE);
- return stats.range;
- }
-
- @ZenMethod("laserRange")
- public static void setLaserRange(ITICMaterial mat, float range) {
- CraftTweakerAPI.apply(new SetLaserRangeAction(mat, range));
- }
-}
diff --git a/src/main/java/landmaster/plustic/entity/EntityBlindBandit.java b/src/main/java/landmaster/plustic/entity/EntityBlindBandit.java
deleted file mode 100644
index 40ef36f9..00000000
--- a/src/main/java/landmaster/plustic/entity/EntityBlindBandit.java
+++ /dev/null
@@ -1,202 +0,0 @@
-package landmaster.plustic.entity;
-
-import java.util.*;
-
-import javax.annotation.*;
-
-import landmaster.plustic.entity.ai.*;
-import net.minecraft.enchantment.*;
-import net.minecraft.entity.*;
-import net.minecraft.entity.ai.*;
-import net.minecraft.entity.monster.*;
-import net.minecraft.entity.player.*;
-import net.minecraft.init.*;
-import net.minecraft.item.*;
-import net.minecraft.nbt.*;
-import net.minecraft.network.datasync.*;
-import net.minecraft.potion.*;
-import net.minecraft.util.*;
-import net.minecraft.util.math.*;
-import net.minecraft.world.*;
-import net.minecraftforge.fml.relauncher.*;
-
-public class EntityBlindBandit extends EntityCreature {
- private static final DataParameter ARMS_RAISED = EntityDataManager.createKey(EntityBlindBandit.class, DataSerializers.BOOLEAN);
-
- public static final int MAX_COUNTDOWN = 300;
-
- private int countdown = MAX_COUNTDOWN;
- private @Nullable UUID summonerId;
-
- public EntityBlindBandit(World worldIn) {
- super(worldIn);
- setSize(0.6F, 1.95F);
- this.isImmuneToFire = true;
- }
-
- public EntityBlindBandit(World worldIn, Entity summoner, EntityLivingBase target) {
- this(worldIn);
- summonerId = summoner.getPersistentID();
- setAttackTarget(target);
- }
-
- @Override
- public void addPotionEffect(PotionEffect potioneffectIn) {}
-
- @Override
- public boolean isImmuneToExplosions() {
- return true;
- }
-
- @Override
- public void setAttackTarget(@Nullable EntityLivingBase entitylivingbaseIn) {
- if (entitylivingbaseIn == null
- || !entitylivingbaseIn.getPersistentID().equals(summonerId)) {
- super.setAttackTarget(entitylivingbaseIn);
- }
- }
-
- @Override
- public void onLivingUpdate() {
- super.onLivingUpdate();
- if (--countdown <= 0) {
- this.setDead();
- }
- }
-
- @Override
- public void readEntityFromNBT(NBTTagCompound compound) {
- super.readEntityFromNBT(compound);
- if (compound.hasKey("DeathCountdown", 99)) {
- countdown = compound.getInteger("DeathCountdown");
- }
- if (compound.hasUniqueId("SummonerId")) {
- summonerId = compound.getUniqueId("SummonerId");
- }
- }
-
- @Override
- public void writeEntityToNBT(NBTTagCompound compound) {
- super.writeEntityToNBT(compound);
- compound.setInteger("DeathCountdown", countdown);
- if (summonerId != null) {
- compound.setUniqueId("SummonerId", summonerId);
- }
- }
-
- @Override
- public boolean canAttackClass(Class extends EntityLivingBase> cls) {
- return true; // can attack ghasts
- }
-
- @Override
- protected void entityInit() {
- super.entityInit();
- this.getDataManager().register(ARMS_RAISED, Boolean.valueOf(false));
- }
-
- public void setArmsRaised(boolean armsRaised) {
- this.getDataManager().set(ARMS_RAISED, Boolean.valueOf(armsRaised));
- }
-
- @SideOnly(Side.CLIENT)
- public boolean isArmsRaised() {
- return this.getDataManager().get(ARMS_RAISED).booleanValue();
- }
-
- @Override
- public boolean attackEntityAsMob(Entity entityIn) {
- if (__attackEntityAsMob(entityIn)) {
- if (entityIn instanceof EntityLivingBase) {
- ((EntityLivingBase) entityIn).addPotionEffect(new PotionEffect(MobEffects.SLOWNESS, 200, 1));
- }
- return true;
- }
- return false;
- }
-
- private boolean __attackEntityAsMob(Entity entityIn)
- {
- float f = (float)this.getEntityAttribute(SharedMonsterAttributes.ATTACK_DAMAGE).getAttributeValue();
- int i = 0;
-
- if (entityIn instanceof EntityLivingBase)
- {
- f += EnchantmentHelper.getModifierForCreature(this.getHeldItemMainhand(), ((EntityLivingBase)entityIn).getCreatureAttribute());
- i += EnchantmentHelper.getKnockbackModifier(this);
- }
-
- DamageSource src = DamageSource.causeMobDamage(this);
- src.setDamageBypassesArmor();
- boolean flag = entityIn.attackEntityFrom(src, f);
-
- if (flag)
- {
- if (i > 0 && entityIn instanceof EntityLivingBase)
- {
- ((EntityLivingBase)entityIn).knockBack(this, (float)i * 0.5F, (double)MathHelper.sin(this.rotationYaw * 0.017453292F), (double)(-MathHelper.cos(this.rotationYaw * 0.017453292F)));
- this.motionX *= 0.6D;
- this.motionZ *= 0.6D;
- }
-
- int j = EnchantmentHelper.getFireAspectModifier(this);
-
- if (j > 0)
- {
- entityIn.setFire(j * 4);
- }
-
- if (entityIn instanceof EntityPlayer)
- {
- EntityPlayer entityplayer = (EntityPlayer)entityIn;
- ItemStack itemstack = this.getHeldItemMainhand();
- ItemStack itemstack1 = entityplayer.isHandActive() ? entityplayer.getActiveItemStack() : null;
-
- if (itemstack != null && itemstack1 != null && itemstack.getItem() instanceof ItemAxe && itemstack1.getItem() == Items.SHIELD)
- {
- float f1 = 0.25F + (float)EnchantmentHelper.getEfficiencyModifier(this) * 0.05F;
-
- if (this.rand.nextFloat() < f1)
- {
- entityplayer.getCooldownTracker().setCooldown(Items.SHIELD, 100);
- this.getEntityWorld().setEntityState(entityplayer, (byte)30);
- }
- }
- }
-
- this.applyEnchantments(this, entityIn);
- }
-
- return flag;
- }
-
- @Override
- protected void applyEntityAttributes() {
- super.applyEntityAttributes();
-
- this.getAttributeMap().registerAttribute(SharedMonsterAttributes.ATTACK_DAMAGE);
-
- this.getEntityAttribute(SharedMonsterAttributes.FOLLOW_RANGE).setBaseValue(48.0D);
- this.getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(0.5D);
- this.getEntityAttribute(SharedMonsterAttributes.ATTACK_DAMAGE).setBaseValue(5.5D);
- this.getEntityAttribute(SharedMonsterAttributes.ARMOR).setBaseValue(19.0D);
- this.getEntityAttribute(SharedMonsterAttributes.ARMOR_TOUGHNESS).setBaseValue(8.0D);
- }
-
- @Override
- protected void initEntityAI() {
- this.tasks.addTask(0, new EntityAISwimming(this));
- this.tasks.addTask(2, new EntityAIBlindBanditAttack(this, 1.0D, true));
- this.tasks.addTask(5, new EntityAIMoveTowardsRestriction(this, 1.0D));
- this.tasks.addTask(7, new EntityAIWander(this, 1.0D));
- this.tasks.addTask(8, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
- this.tasks.addTask(8, new EntityAILookIdle(this));
- this.applyEntityAI();
- }
-
- private void applyEntityAI() {
- this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, true));
- this.targetTasks.addTask(2, new EntityAINearestAttackableTarget<>(this, EntityLiving.class, 10,
- true, false, ent -> ent instanceof IMob));
- }
-}
diff --git a/src/main/java/landmaster/plustic/entity/EntitySupremeLeader.java b/src/main/java/landmaster/plustic/entity/EntitySupremeLeader.java
deleted file mode 100644
index 6e587497..00000000
--- a/src/main/java/landmaster/plustic/entity/EntitySupremeLeader.java
+++ /dev/null
@@ -1,343 +0,0 @@
-package landmaster.plustic.entity;
-
-import java.util.*;
-
-import javax.annotation.*;
-
-import landmaster.plustic.entity.ai.*;
-import net.minecraft.entity.*;
-import net.minecraft.entity.ai.*;
-import net.minecraft.entity.effect.*;
-import net.minecraft.entity.monster.*;
-import net.minecraft.entity.player.*;
-import net.minecraft.init.*;
-import net.minecraft.item.*;
-import net.minecraft.nbt.*;
-import net.minecraft.network.datasync.*;
-import net.minecraft.potion.*;
-import net.minecraft.util.*;
-import net.minecraft.util.datafix.*;
-import net.minecraft.world.*;
-import net.minecraftforge.common.*;
-import net.minecraftforge.event.world.*;
-import net.minecraftforge.fml.common.eventhandler.*;
-import net.minecraftforge.fml.relauncher.*;
-
-public class EntitySupremeLeader extends EntityCreature {
- private static class KimExplosion extends Explosion {
- private final EntitySupremeLeader kim;
-
- public KimExplosion(World worldIn, EntitySupremeLeader entityIn, double x, double y, double z, float size, boolean flaming,
- boolean smoking) {
- super(worldIn, entityIn, x, y, z, size, flaming, smoking);
- this.kim = entityIn;
- }
-
- public EntitySupremeLeader getSupremeLeader() { return kim; }
- }
-
- static {
- MinecraftForge.EVENT_BUS.register(EntitySupremeLeader.class);
- }
-
- @SubscribeEvent
- public static void onDetonate(ExplosionEvent.Detonate event) {
- if (!event.getWorld().isRemote && event.getExplosion() instanceof KimExplosion) {
- event.getAffectedEntities().removeIf(
- ent -> ent.getUniqueID().equals(
- ((KimExplosion)event.getExplosion())
- .getSupremeLeader().summonerId));
- }
- }
-
- private static final DataParameter STATE = EntityDataManager.createKey(EntitySupremeLeader.class,
- DataSerializers.VARINT);
- private static final DataParameter POWERED = EntityDataManager.createKey(EntitySupremeLeader.class,
- DataSerializers.BOOLEAN);
- private static final DataParameter IGNITED = EntityDataManager.createKey(EntitySupremeLeader.class,
- DataSerializers.BOOLEAN);
- /**
- * Time when this creeper was last in an active state (Messed up code here,
- * probably causes creeper animation to go weird)
- */
- private int lastActiveTime;
- /**
- * The amount of time since the creeper was close enough to the player to
- * ignite
- */
- private int timeSinceIgnited;
- private int fuseTime = 20;
- /** Explosion radius for this creeper. */
- private int explosionRadius = 3;
-
- private @Nullable UUID summonerId;
-
- public EntitySupremeLeader(World worldIn) {
- super(worldIn);
- this.setSize(0.6F, 1.7F);
- }
- public EntitySupremeLeader(World worldIn, Entity summoner, EntityLivingBase target) {
- this(worldIn);
- summonerId = summoner.getPersistentID();
- setAttackTarget(target);
- }
-
- @Override
- public void setAttackTarget(@Nullable EntityLivingBase entitylivingbaseIn) {
- if (entitylivingbaseIn == null
- || !entitylivingbaseIn.getPersistentID().equals(summonerId)) {
- super.setAttackTarget(entitylivingbaseIn);
- }
- }
-
- @Override
- public boolean canAttackClass(Class extends EntityLivingBase> cls) {
- return true; // can attack ghasts
- }
-
- protected void initEntityAI() {
- this.tasks.addTask(1, new EntityAISwimming(this));
- this.tasks.addTask(2, new EntityAISupremeLeaderSwell(this));
- this.tasks.addTask(4, new EntityAIAttackMelee(this, 1.0D, false));
- this.tasks.addTask(5, new EntityAIWander(this, 0.8D));
- this.tasks.addTask(6, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F));
- this.tasks.addTask(6, new EntityAILookIdle(this));
- this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, false));
- this.targetTasks.addTask(2, new EntityAINearestAttackableTarget<>(this, EntityLiving.class, 10,
- true, false, ent -> ent instanceof IMob));
- }
-
- protected void applyEntityAttributes() {
- super.applyEntityAttributes();
- this.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH).setBaseValue(40);
- this.getEntityAttribute(SharedMonsterAttributes.KNOCKBACK_RESISTANCE).setBaseValue(0.3);
- this.getEntityAttribute(SharedMonsterAttributes.MOVEMENT_SPEED).setBaseValue(1);
- this.getEntityAttribute(SharedMonsterAttributes.FOLLOW_RANGE).setBaseValue(80);
- }
-
- /**
- * The maximum height from where the entity is alowed to jump (used in
- * pathfinder)
- */
- public int getMaxFallHeight() {
- return this.getAttackTarget() == null ? 3 : 3 + (int) (this.getHealth() - 1.0F);
- }
-
- public void fall(float distance, float damageMultiplier) {
- super.fall(distance, damageMultiplier);
- this.timeSinceIgnited = (int) ((float) this.timeSinceIgnited + distance * 1.5F);
-
- if (this.timeSinceIgnited > this.fuseTime - 5) {
- this.timeSinceIgnited = this.fuseTime - 5;
- }
- }
-
- protected void entityInit() {
- super.entityInit();
- this.dataManager.register(STATE, Integer.valueOf(-1));
- this.dataManager.register(POWERED, Boolean.valueOf(false));
- this.dataManager.register(IGNITED, Boolean.valueOf(false));
- }
-
- public static void registerFixesCreeper(DataFixer fixer) {
- EntityLiving.registerFixesMob(fixer, EntitySupremeLeader.class);
- }
-
- /**
- * (abstract) Protected helper method to write subclass entity data to NBT.
- */
- public void writeEntityToNBT(NBTTagCompound compound) {
- super.writeEntityToNBT(compound);
-
- if (((Boolean) this.dataManager.get(POWERED)).booleanValue()) {
- compound.setBoolean("powered", true);
- }
-
- compound.setShort("Fuse", (short) this.fuseTime);
- compound.setByte("ExplosionRadius", (byte) this.explosionRadius);
- compound.setBoolean("ignited", this.hasIgnited());
-
- if (summonerId != null) {
- compound.setUniqueId("SummonerId", summonerId);
- }
- }
-
- /**
- * (abstract) Protected helper method to read subclass entity data from NBT.
- */
- public void readEntityFromNBT(NBTTagCompound compound) {
- super.readEntityFromNBT(compound);
- this.dataManager.set(POWERED, Boolean.valueOf(compound.getBoolean("powered")));
-
- if (compound.hasKey("Fuse", 99)) {
- this.fuseTime = compound.getShort("Fuse");
- }
-
- if (compound.hasKey("ExplosionRadius", 99)) {
- this.explosionRadius = compound.getByte("ExplosionRadius");
- }
-
- if (compound.getBoolean("ignited")) {
- this.ignite();
- }
-
- if (compound.hasUniqueId("SummonerId")) {
- summonerId = compound.getUniqueId("SummonerId");
- }
- }
-
- /**
- * Called to update the entity's position/logic.
- */
- public void onUpdate() {
- if (this.isEntityAlive()) {
- this.lastActiveTime = this.timeSinceIgnited;
-
- if (this.hasIgnited()) {
- this.setCreeperState(1);
- }
-
- int i = this.getCreeperState();
-
- if (i > 0 && this.timeSinceIgnited == 0) {
- this.playSound(SoundEvents.ENTITY_CREEPER_PRIMED, 1.0F, 0.5F);
- }
-
- this.timeSinceIgnited += i;
-
- if (this.timeSinceIgnited < 0) {
- this.timeSinceIgnited = 0;
- }
-
- if (this.timeSinceIgnited >= this.fuseTime) {
- this.timeSinceIgnited = this.fuseTime;
- this.explode();
- }
- }
-
- super.onUpdate();
- }
-
- protected SoundEvent getHurtSound() {
- return SoundEvents.ENTITY_CREEPER_HURT;
- }
-
- protected SoundEvent getDeathSound() {
- return SoundEvents.ENTITY_CREEPER_DEATH;
- }
-
- public boolean attackEntityAsMob(Entity entityIn) {
- return true;
- }
-
- /**
- * Returns true if the creeper is powered by a lightning bolt.
- */
- public boolean getPowered() {
- return ((Boolean) this.dataManager.get(POWERED)).booleanValue();
- }
-
- /**
- * Params: (Float)Render tick. Returns the intensity of the creeper's flash
- * when it is ignited.
- */
- @SideOnly(Side.CLIENT)
- public float getCreeperFlashIntensity(float p_70831_1_) {
- return ((float) this.lastActiveTime + (float) (this.timeSinceIgnited - this.lastActiveTime) * p_70831_1_)
- / (float) (this.fuseTime - 2);
- }
-
- @Nullable
- protected ResourceLocation getLootTable() {
- return null;
- }
-
- /**
- * Returns the current state of creeper, -1 is idle, 1 is 'in fuse'
- */
- public int getCreeperState() {
- return ((Integer) this.dataManager.get(STATE)).intValue();
- }
-
- /**
- * Sets the state of creeper, -1 to idle and 1 to be 'in fuse'
- */
- public void setCreeperState(int state) {
- this.dataManager.set(STATE, Integer.valueOf(state));
- }
-
- /**
- * Called when a lightning bolt hits the entity.
- */
- public void onStruckByLightning(EntityLightningBolt lightningBolt) {
- super.onStruckByLightning(lightningBolt);
- this.dataManager.set(POWERED, Boolean.valueOf(true));
- }
-
- protected boolean processInteract(EntityPlayer player, EnumHand hand) {
- ItemStack itemstack = player.getHeldItem(hand);
-
- if (itemstack.getItem() == Items.FLINT_AND_STEEL) {
- this.world.playSound(player, this.posX, this.posY, this.posZ, SoundEvents.ITEM_FLINTANDSTEEL_USE,
- this.getSoundCategory(), 1.0F, this.rand.nextFloat() * 0.4F + 0.8F);
- player.swingArm(hand);
-
- if (!this.world.isRemote) {
- this.ignite();
- itemstack.damageItem(1, player);
- return true;
- }
- }
-
- return super.processInteract(player, hand);
- }
-
- /**
- * Creates an explosion as determined by this creeper's power and explosion
- * radius.
- */
- private void explode() {
- if (!this.world.isRemote) {
- float f = this.getPowered() ? 2.0F : 1.0F;
- this.dead = true;
-
- Explosion explosion = new KimExplosion(this.world, this, this.posX, this.posY, this.posZ, (float) this.explosionRadius * f, false, false);
- if (!net.minecraftforge.event.ForgeEventFactory.onExplosionStart(world, explosion)) {
- explosion.doExplosionA();
- explosion.doExplosionB(true);
- }
-
- this.setDead();
- this.spawnLingeringCloud();
- }
- }
-
- private void spawnLingeringCloud() {
- Collection collection = this.getActivePotionEffects();
-
- if (!collection.isEmpty()) {
- EntityAreaEffectCloud entityareaeffectcloud = new EntityAreaEffectCloud(this.world, this.posX, this.posY,
- this.posZ);
- entityareaeffectcloud.setRadius(2.5F);
- entityareaeffectcloud.setRadiusOnUse(-0.5F);
- entityareaeffectcloud.setWaitTime(10);
- entityareaeffectcloud.setDuration(entityareaeffectcloud.getDuration() / 2);
- entityareaeffectcloud
- .setRadiusPerTick(-entityareaeffectcloud.getRadius() / (float) entityareaeffectcloud.getDuration());
-
- for (PotionEffect potioneffect : collection) {
- entityareaeffectcloud.addEffect(new PotionEffect(potioneffect));
- }
-
- this.world.spawnEntity(entityareaeffectcloud);
- }
- }
-
- public boolean hasIgnited() {
- return ((Boolean) this.dataManager.get(IGNITED)).booleanValue();
- }
-
- public void ignite() {
- this.dataManager.set(IGNITED, Boolean.valueOf(true));
- }
-}
diff --git a/src/main/java/landmaster/plustic/entity/ai/EntityAIBlindBanditAttack.java b/src/main/java/landmaster/plustic/entity/ai/EntityAIBlindBanditAttack.java
deleted file mode 100644
index a4cf957b..00000000
--- a/src/main/java/landmaster/plustic/entity/ai/EntityAIBlindBanditAttack.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package landmaster.plustic.entity.ai;
-
-import landmaster.plustic.entity.*;
-import net.minecraft.entity.ai.*;
-
-public class EntityAIBlindBanditAttack extends EntityAIAttackMelee {
- private int raiseArmTicks;
- private EntityBlindBandit bandit;
-
- public EntityAIBlindBanditAttack(EntityBlindBandit banditIn, double speedIn, boolean longMemoryIn) {
- super(banditIn, speedIn, longMemoryIn);
- this.bandit = banditIn;
- }
-
- /**
- * Execute a one shot task or start executing a continuous task
- */
- @Override
- public void startExecuting() {
- super.startExecuting();
- this.raiseArmTicks = 0;
- }
-
- /**
- * Resets the task
- */
- @Override
- public void resetTask() {
- super.resetTask();
- this.bandit.setArmsRaised(false);
- }
-
- /**
- * Updates the task
- */
- @Override
- public void updateTask() {
- super.updateTask();
- ++this.raiseArmTicks;
-
- if (this.raiseArmTicks >= 5 && this.attackTick < 10) {
- this.bandit.setArmsRaised(true);
- } else {
- this.bandit.setArmsRaised(false);
- }
- }
-}
diff --git a/src/main/java/landmaster/plustic/entity/ai/EntityAISupremeLeaderSwell.java b/src/main/java/landmaster/plustic/entity/ai/EntityAISupremeLeaderSwell.java
deleted file mode 100644
index 1b01b2ed..00000000
--- a/src/main/java/landmaster/plustic/entity/ai/EntityAISupremeLeaderSwell.java
+++ /dev/null
@@ -1,59 +0,0 @@
-package landmaster.plustic.entity.ai;
-
-import landmaster.plustic.entity.EntitySupremeLeader;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.ai.EntityAIBase;
-
-public class EntityAISupremeLeaderSwell extends EntityAIBase {
- /** The creeper that is swelling. */
- EntitySupremeLeader swellingCreeper;
- /**
- * The creeper's attack target. This is used for the changing of the
- * creeper's state.
- */
- EntityLivingBase creeperAttackTarget;
-
- public EntityAISupremeLeaderSwell(EntitySupremeLeader entitycreeperIn) {
- this.swellingCreeper = entitycreeperIn;
- this.setMutexBits(1);
- }
-
- /**
- * Returns whether the EntityAIBase should begin execution.
- */
- public boolean shouldExecute() {
- EntityLivingBase entitylivingbase = this.swellingCreeper.getAttackTarget();
- return this.swellingCreeper.getCreeperState() > 0
- || entitylivingbase != null && this.swellingCreeper.getDistanceSq(entitylivingbase) < 9.0D;
- }
-
- /**
- * Execute a one shot task or start executing a continuous task
- */
- public void startExecuting() {
- this.swellingCreeper.getNavigator().clearPath();
- this.creeperAttackTarget = this.swellingCreeper.getAttackTarget();
- }
-
- /**
- * Resets the task
- */
- public void resetTask() {
- this.creeperAttackTarget = null;
- }
-
- /**
- * Updates the task
- */
- public void updateTask() {
- if (this.creeperAttackTarget == null) {
- this.swellingCreeper.setCreeperState(-1);
- } else if (this.swellingCreeper.getDistanceSq(this.creeperAttackTarget) > 49.0D) {
- this.swellingCreeper.setCreeperState(-1);
- } else if (!this.swellingCreeper.getEntitySenses().canSee(this.creeperAttackTarget)) {
- this.swellingCreeper.setCreeperState(-1);
- } else {
- this.swellingCreeper.setCreeperState(1);
- }
- }
-}
diff --git a/src/main/java/landmaster/plustic/entity/render/LayerSupremeLeaderCharge.java b/src/main/java/landmaster/plustic/entity/render/LayerSupremeLeaderCharge.java
deleted file mode 100644
index 64dd6350..00000000
--- a/src/main/java/landmaster/plustic/entity/render/LayerSupremeLeaderCharge.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package landmaster.plustic.entity.render;
-
-import landmaster.plustic.entity.*;
-import net.minecraft.client.*;
-import net.minecraft.client.model.*;
-import net.minecraft.client.renderer.*;
-import net.minecraft.client.renderer.entity.layers.*;
-import net.minecraft.util.*;
-
-public class LayerSupremeLeaderCharge implements LayerRenderer {
- private static final ResourceLocation LIGHTNING_TEXTURE = new ResourceLocation(
- "textures/entity/creeper/creeper_armor.png");
- private final RenderSupremeLeader renderer;
- private final ModelCreeper creeperModel = new ModelCreeper(2.0F);
-
- public LayerSupremeLeaderCharge(RenderSupremeLeader renderer) {
- this.renderer = renderer;
- }
-
- public void doRenderLayer(EntitySupremeLeader entitylivingbaseIn, float limbSwing, float limbSwingAmount,
- float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale) {
- if (entitylivingbaseIn.getPowered()) {
- boolean flag = entitylivingbaseIn.isInvisible();
- GlStateManager.depthMask(!flag);
- this.renderer.bindTexture(LIGHTNING_TEXTURE);
- GlStateManager.matrixMode(5890);
- GlStateManager.loadIdentity();
- float f = (float) entitylivingbaseIn.ticksExisted + partialTicks;
- GlStateManager.translate(f * 0.01F, f * 0.01F, 0.0F);
- GlStateManager.matrixMode(5888);
- GlStateManager.enableBlend();
- // float f1 = 0.5F;
- GlStateManager.color(0.5F, 0.5F, 0.5F, 1.0F);
- GlStateManager.disableLighting();
- GlStateManager.blendFunc(GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ONE);
- this.creeperModel.setModelAttributes(this.renderer.getMainModel());
- Minecraft.getMinecraft().entityRenderer.setupFogColor(true);
- this.creeperModel.render(entitylivingbaseIn, limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch,
- scale);
- Minecraft.getMinecraft().entityRenderer.setupFogColor(false);
- GlStateManager.matrixMode(5890);
- GlStateManager.loadIdentity();
- GlStateManager.matrixMode(5888);
- GlStateManager.enableLighting();
- GlStateManager.disableBlend();
- GlStateManager.depthMask(flag);
- }
- }
-
- public boolean shouldCombineTextures() {
- return false;
- }
-}
\ No newline at end of file
diff --git a/src/main/java/landmaster/plustic/entity/render/ModelBlindBandit.java b/src/main/java/landmaster/plustic/entity/render/ModelBlindBandit.java
deleted file mode 100644
index 0481d5de..00000000
--- a/src/main/java/landmaster/plustic/entity/render/ModelBlindBandit.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package landmaster.plustic.entity.render;
-
-import landmaster.plustic.entity.*;
-import net.minecraft.client.model.*;
-import net.minecraft.entity.*;
-import net.minecraft.util.math.*;
-import net.minecraftforge.fml.relauncher.*;
-
-@SideOnly(Side.CLIENT)
-public class ModelBlindBandit extends ModelBiped
-{
- public ModelBlindBandit()
- {
- this(0.0F, false);
- }
-
- public ModelBlindBandit(float modelSize, boolean p_i1168_2_)
- {
- super(modelSize, 0.0F, 64, p_i1168_2_ ? 32 : 64);
- }
-
- /**
- * Sets the model's various rotation angles. For bipeds, par1 and par2 are used for animating the movement of arms
- * and legs, where par1 represents the time(so that arms and legs swing back and forth) and par2 represents how
- * "far" arms and legs can swing at most.
- */
- @Override
- public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entityIn)
- {
- super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entityIn);
- boolean flag = entityIn instanceof EntityBlindBandit && ((EntityBlindBandit)entityIn).isArmsRaised();
- float f = MathHelper.sin(this.swingProgress * (float)Math.PI);
- float f1 = MathHelper.sin((1.0F - (1.0F - this.swingProgress) * (1.0F - this.swingProgress)) * (float)Math.PI);
- this.bipedRightArm.rotateAngleZ = 0.0F;
- this.bipedLeftArm.rotateAngleZ = 0.0F;
- this.bipedRightArm.rotateAngleY = -(0.1F - f * 0.6F);
- this.bipedLeftArm.rotateAngleY = 0.1F - f * 0.6F;
- float f2 = -(float)Math.PI / (flag ? 1.5F : 2.25F);
- this.bipedRightArm.rotateAngleX = f2;
- this.bipedLeftArm.rotateAngleX = f2;
- this.bipedRightArm.rotateAngleX += f * 1.2F - f1 * 0.4F;
- this.bipedLeftArm.rotateAngleX += f * 1.2F - f1 * 0.4F;
- this.bipedRightArm.rotateAngleZ += MathHelper.cos(ageInTicks * 0.09F) * 0.05F + 0.05F;
- this.bipedLeftArm.rotateAngleZ -= MathHelper.cos(ageInTicks * 0.09F) * 0.05F + 0.05F;
- this.bipedRightArm.rotateAngleX += MathHelper.sin(ageInTicks * 0.067F) * 0.05F;
- this.bipedLeftArm.rotateAngleX -= MathHelper.sin(ageInTicks * 0.067F) * 0.05F;
- }
-}
\ No newline at end of file
diff --git a/src/main/java/landmaster/plustic/entity/render/RenderBlindBandit.java b/src/main/java/landmaster/plustic/entity/render/RenderBlindBandit.java
deleted file mode 100644
index 02d015cd..00000000
--- a/src/main/java/landmaster/plustic/entity/render/RenderBlindBandit.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package landmaster.plustic.entity.render;
-
-import javax.annotation.*;
-
-import landmaster.plustic.api.*;
-import landmaster.plustic.entity.*;
-import net.minecraft.client.renderer.entity.*;
-import net.minecraft.util.*;
-
-public class RenderBlindBandit extends RenderLiving {
- public static final ResourceLocation tex = new ResourceLocation(ModInfo.MODID+":textures/entity/blindbandit.png");
-
- public RenderBlindBandit(RenderManager rendermanagerIn) {
- super(rendermanagerIn, new ModelBlindBandit(), 0.5F);
- }
-
- @Override
- @Nonnull
- protected ResourceLocation getEntityTexture(@Nonnull EntityBlindBandit ent) {
- return tex;
- }
-}
diff --git a/src/main/java/landmaster/plustic/entity/render/RenderSupremeLeader.java b/src/main/java/landmaster/plustic/entity/render/RenderSupremeLeader.java
deleted file mode 100644
index 9d4bf39d..00000000
--- a/src/main/java/landmaster/plustic/entity/render/RenderSupremeLeader.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package landmaster.plustic.entity.render;
-
-import landmaster.plustic.api.*;
-import landmaster.plustic.entity.*;
-import net.minecraft.client.model.*;
-import net.minecraft.client.renderer.*;
-import net.minecraft.client.renderer.entity.*;
-import net.minecraft.util.*;
-import net.minecraft.util.math.*;
-
-public class RenderSupremeLeader extends RenderLiving {
- public static final ResourceLocation tex = new ResourceLocation(
- ModInfo.MODID + ":textures/entity/supremeleader.png");
-
- public RenderSupremeLeader(RenderManager renderManagerIn) {
- super(renderManagerIn, new ModelCreeper(), 0.5F);
- this.addLayer(new LayerSupremeLeaderCharge(this));
- }
-
- @Override
- protected void preRenderCallback(EntitySupremeLeader entitylivingbaseIn, float partialTickTime) {
- float f = entitylivingbaseIn.getCreeperFlashIntensity(partialTickTime);
- float f1 = 1.0F + MathHelper.sin(f * 100.0F) * f * 0.01F;
- f = MathHelper.clamp(f, 0.0F, 1.0F);
- f = f * f;
- f = f * f;
- float f2 = (1.0F + f * 0.4F) * f1;
- float f3 = (1.0F + f * 0.1F) / f1;
- GlStateManager.scale(f2, f3, f2);
- }
-
- @Override
- protected int getColorMultiplier(EntitySupremeLeader entitylivingbaseIn, float lightBrightness,
- float partialTickTime) {
- float f = entitylivingbaseIn.getCreeperFlashIntensity(partialTickTime);
-
- if ((int) (f * 10.0F) % 2 == 0) {
- return 0;
- } else {
- int i = (int) (f * 0.2F * 255.0F);
- i = MathHelper.clamp(i, 0, 255);
- return i << 24 | 0x30FFFFFF;
- }
- }
-
- @Override
- protected ResourceLocation getEntityTexture(EntitySupremeLeader entity) {
- return tex;
- }
-}
diff --git a/src/main/java/landmaster/plustic/fluids/FluidMolten.java b/src/main/java/landmaster/plustic/fluids/FluidMolten.java
deleted file mode 100755
index b6e10d15..00000000
--- a/src/main/java/landmaster/plustic/fluids/FluidMolten.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package landmaster.plustic.fluids;
-
-import net.minecraft.item.*;
-import net.minecraft.util.*;
-import net.minecraft.util.text.translation.*;
-import net.minecraftforge.fluids.*;
-import landmaster.plustic.api.*;
-import slimeknights.tconstruct.library.fluid.*;
-
-public class FluidMolten extends FluidColored {
-
- public static ResourceLocation ICON_MetalStill = new ResourceLocation(ModInfo.MODID, "blocks/fluids/molten_metal");
- public static ResourceLocation ICON_MetalFlowing = new ResourceLocation(ModInfo.MODID, "blocks/fluids/molten_metal_flow");
-
- public FluidMolten(String fluidName, int color) {
- this(fluidName, color, ICON_MetalStill, ICON_MetalFlowing);
- }
-
- public FluidMolten(String fluidName, int color, ResourceLocation still, ResourceLocation flow) {
- super(fluidName, color, still, flow);
-
- this.setDensity(2000); // thicker than a bowl of oatmeal
- this.setViscosity(10000); // sloooow moving
- this.setTemperature(1000); // not exactly lava, but still hot. Should depend on the material
- this.setLuminosity(10); // glowy by default!
-
- // rare by default
- setRarity(EnumRarity.UNCOMMON);
- }
-
- @Override
- public String getUnlocalizedName() {
- return super.getUnlocalizedName() + ".name";
- }
-
- @SuppressWarnings("deprecation")
- @Override
- public String getLocalizedName(FluidStack stack) {
- String s = this.getUnlocalizedName();
- return s == null ? "" : I18n.translateToLocal(s);
- }
-}
diff --git a/src/main/java/landmaster/plustic/gui/GuiFruitSalad.java b/src/main/java/landmaster/plustic/gui/GuiFruitSalad.java
deleted file mode 100644
index e8cbcc6c..00000000
--- a/src/main/java/landmaster/plustic/gui/GuiFruitSalad.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package landmaster.plustic.gui;
-
-import landmaster.plustic.api.*;
-import landmaster.plustic.traits.*;
-import net.minecraft.client.gui.inventory.*;
-import net.minecraft.client.renderer.*;
-import net.minecraft.entity.player.*;
-import net.minecraft.inventory.*;
-import net.minecraft.util.*;
-
-public class GuiFruitSalad extends GuiContainer {
- public static final ResourceLocation TEX = new ResourceLocation(ModInfo.MODID, "textures/gui/fruitsalad.png");
-
- private InventoryPlayer playerInv;
-
- public GuiFruitSalad(Container cont, InventoryPlayer playerInv) {
- super(cont);
- this.playerInv = playerInv;
- }
-
- @Override
- public void drawScreen(int mouseX, int mouseY, float partialTicks) {
- drawDefaultBackground();
- super.drawScreen(mouseX, mouseY, partialTicks);
- renderHoveredToolTip(mouseX, mouseY);
- }
-
- @Override
- protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) {
- GlStateManager.color(1, 1, 1, 1);
- mc.getTextureManager().bindTexture(TEX);
- int x = (width - xSize) / 2;
- int y = (height - ySize) / 2;
- drawTexturedModalRect(x, y, 0, 0, xSize, ySize);
- }
-
- @Override
- protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) {
- String name = FruitSalad.fruitsalad.getLocalizedName();
- fontRenderer.drawString(name, xSize / 2 - fontRenderer.getStringWidth(name) / 2, 6, 0x404040);
- fontRenderer.drawString(playerInv.getDisplayName().getUnformattedText(), 8, ySize - 94, 0x404040);
- }
-}
diff --git a/src/main/java/landmaster/plustic/gui/GuiMOTS.java b/src/main/java/landmaster/plustic/gui/GuiMOTS.java
deleted file mode 100644
index 889d49e3..00000000
--- a/src/main/java/landmaster/plustic/gui/GuiMOTS.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package landmaster.plustic.gui;
-
-import landmaster.plustic.api.*;
-import landmaster.plustic.traits.*;
-import net.minecraft.client.gui.inventory.*;
-import net.minecraft.client.renderer.*;
-import net.minecraft.entity.player.*;
-import net.minecraft.inventory.*;
-import net.minecraft.util.*;
-
-public class GuiMOTS extends GuiContainer {
- public static final ResourceLocation TEX = new ResourceLocation(ModInfo.MODID, "textures/gui/mots.png");
-
- private InventoryPlayer playerInv;
-
- public GuiMOTS(Container cont, InventoryPlayer playerInv) {
- super(cont);
- this.playerInv = playerInv;
- }
-
- @Override
- public void drawScreen(int mouseX, int mouseY, float partialTicks) {
- drawDefaultBackground();
- super.drawScreen(mouseX, mouseY, partialTicks);
- renderHoveredToolTip(mouseX, mouseY);
- }
-
- @Override
- protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) {
- GlStateManager.color(1, 1, 1, 1);
- mc.getTextureManager().bindTexture(TEX);
- int x = (width - xSize) / 2;
- int y = (height - ySize) / 2;
- drawTexturedModalRect(x, y, 0, 0, xSize, ySize);
- }
-
- @Override
- protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) {
- String name = MusicOfTheSpheres.musicofthespheres.getLocalizedName();
- fontRenderer.drawString(name, xSize / 2 - fontRenderer.getStringWidth(name) / 2, 6, 0x404040);
- fontRenderer.drawString(playerInv.getDisplayName().getUnformattedText(), 8, ySize - 94, 0x404040);
- }
-}
diff --git a/src/main/java/landmaster/plustic/gui/GuiTECentrifugeCore.java b/src/main/java/landmaster/plustic/gui/GuiTECentrifugeCore.java
deleted file mode 100644
index ecb07aa7..00000000
--- a/src/main/java/landmaster/plustic/gui/GuiTECentrifugeCore.java
+++ /dev/null
@@ -1,70 +0,0 @@
-package landmaster.plustic.gui;
-
-import java.util.*;
-
-import landmaster.plustic.api.*;
-import landmaster.plustic.gui.container.*;
-import net.minecraft.client.gui.inventory.*;
-import net.minecraft.client.renderer.*;
-import net.minecraft.client.resources.*;
-import net.minecraft.entity.player.*;
-import net.minecraft.util.*;
-import net.minecraftforge.energy.*;
-
-public class GuiTECentrifugeCore extends GuiContainer {
- public static final ResourceLocation TEX = new ResourceLocation(ModInfo.MODID, "textures/gui/centrifuge_core.png");
- public static final ResourceLocation ENERGY_BAR = new ResourceLocation(ModInfo.MODID, "textures/gui/energy_bar.png");
-
- private ContainerTECentrifugeCore cont;
- private InventoryPlayer playerInv;
-
- public GuiTECentrifugeCore(ContainerTECentrifugeCore inventorySlotsIn, InventoryPlayer playerInv) {
- super(inventorySlotsIn);
- this.cont = inventorySlotsIn;
- this.playerInv = playerInv;
- }
-
- @Override
- public void drawScreen(int mouseX, int mouseY, float partialTicks) {
- drawDefaultBackground();
- super.drawScreen(mouseX, mouseY, partialTicks);
- renderHoveredToolTip(mouseX, mouseY);
- }
-
- @Override
- protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) {
- GlStateManager.color(1, 1, 1, 1);
- mc.getTextureManager().bindTexture(TEX);
- int x = (width - xSize) / 2;
- int y = (height - ySize) / 2;
- drawTexturedModalRect(x, y, 0, 0, xSize, ySize);
-
- // Energy stuff
- mc.getTextureManager().bindTexture(ENERGY_BAR);
- IEnergyStorage cap = cont.getTE().getCapability(CapabilityEnergy.ENERGY, null);
- double percentEmpty = ((double)(cap.getMaxEnergyStored()-cap.getEnergyStored())) / cap.getMaxEnergyStored();
- int eX = guiLeft+10, eY = guiTop+25;
- drawTexturedModalRect(eX, eY, 17, 0, 14, 42);
- drawTexturedModalRect(eX, eY, 1, 0, 14, (int)(42*percentEmpty));
- }
-
- @Override
- protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) {
- String name = I18n.format("tile.centrifuge.core.name");
- fontRenderer.drawString(name, xSize / 2 - fontRenderer.getStringWidth(name) / 2, 6, 0x404040);
- fontRenderer.drawString(playerInv.getDisplayName().getUnformattedText(), 8, ySize - 94, 0x404040);
-
- int k = (this.width - this.xSize) / 2; //X asis on GUI
- int l = (this.height - this.ySize) / 2; //Y asis on GUI
- int trueX = mouseX-k, trueY = mouseY-l;
-
- // Energy stuff
- IEnergyStorage cap = cont.getTE().getCapability(CapabilityEnergy.ENERGY, null);
- int eX = 10, eY = 25;
- if (isPointInRegion(eX, eY, 14, 42, mouseX, mouseY)) {
- drawHoveringText(Arrays.asList(String.format("%d RF / %d RF",
- cap.getEnergyStored(),
- cap.getMaxEnergyStored())), trueX, trueY);
- }
- }
-}
diff --git a/src/main/java/landmaster/plustic/gui/container/ContainerFruitSalad.java b/src/main/java/landmaster/plustic/gui/container/ContainerFruitSalad.java
deleted file mode 100644
index f25d94c2..00000000
--- a/src/main/java/landmaster/plustic/gui/container/ContainerFruitSalad.java
+++ /dev/null
@@ -1,77 +0,0 @@
-package landmaster.plustic.gui.container;
-
-import landmaster.plustic.traits.*;
-import net.minecraft.entity.player.*;
-import net.minecraft.inventory.*;
-import net.minecraft.item.*;
-import net.minecraftforge.common.capabilities.*;
-import net.minecraftforge.items.*;
-import slimeknights.tconstruct.library.utils.*;
-
-public class ContainerFruitSalad extends Container {
- @CapabilityInject(FruitSalad.IFSItemHandler.class)
- private static Capability FS_ITEM_CAP = null;
-
- public ContainerFruitSalad(EntityPlayer player) {
- //System.out.println("CAP: "+FS_ITEM_CAP);
- if (player.getHeldItemMainhand().hasCapability(FS_ITEM_CAP, null)) {
- //System.out.println("TEEHEE!");
- FruitSalad.IFSItemHandler fshandler = player.getHeldItemMainhand().getCapability(FS_ITEM_CAP, null);
- final int sz = fshandler.getSlots();
- for (int i=0; i MOTS_ITEM_CAP = null;
-
- public ContainerMOTS(EntityPlayer player) {
- if (player.getHeldItemMainhand().hasCapability(MOTS_ITEM_CAP, null)) {
- MusicOfTheSpheres.IMOTSItemHandler cap = player.getHeldItemMainhand().getCapability(MOTS_ITEM_CAP, null);
- addSlotToContainer(new SlotItemHandler(cap, 0, 80, 35) {
- @Override
- public void onSlotChanged() {
- super.onSlotChanged();
- if (!player.world.isRemote) {
- ItemStack stack = cap.getStackInSlot(0);
- if (stack.isEmpty()
- || !(stack.getItem() instanceof ItemRecord)) {
- cap.stop(player);
- } else {
- cap.play(player, ((ItemRecord)stack.getItem()).getSound());
- }
- }
- }
- });
- }
-
- for (int i = 0; i < 3; i++) {
- for (int j = 0; j < 9; j++) {
- addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
- }
- }
-
- for (int k = 0; k < 9; k++) {
- addSlotToContainer(new Slot(player.inventory, k, 8 + k * 18, 142));
- }
- }
-
- @Override
- public boolean canInteractWith(EntityPlayer playerIn) {
- return TinkerUtil.hasTrait(TagUtil.getTagSafe(playerIn.getHeldItemMainhand()),
- MusicOfTheSpheres.musicofthespheres.identifier);
- }
-
- @Override
- public ItemStack transferStackInSlot(EntityPlayer player, int index) {
- ItemStack itemstack = ItemStack.EMPTY;
- Slot slot = inventorySlots.get(index);
-
- if (slot != null && slot.getHasStack()) {
- ItemStack itemstack1 = slot.getStack();
- itemstack = itemstack1.copy();
-
- int containerSlots = inventorySlots.size() - player.inventory.mainInventory.size();
-
- if (index < containerSlots) {
- if (!this.mergeItemStack(itemstack1, containerSlots, inventorySlots.size(), true)) {
- return ItemStack.EMPTY;
- }
- } else if (!this.mergeItemStack(itemstack1, 0, containerSlots, false)) {
- return ItemStack.EMPTY;
- }
-
- if (itemstack1.getCount() == 0) {
- slot.putStack(ItemStack.EMPTY);
- } else {
- slot.onSlotChanged();
- }
-
- if (itemstack1.getCount() == itemstack.getCount()) {
- return ItemStack.EMPTY;
- }
-
- slot.onTake(player, itemstack1);
- }
-
- return itemstack;
- }
-}
diff --git a/src/main/java/landmaster/plustic/gui/container/ContainerTECentrifugeCore.java b/src/main/java/landmaster/plustic/gui/container/ContainerTECentrifugeCore.java
deleted file mode 100644
index aa269a81..00000000
--- a/src/main/java/landmaster/plustic/gui/container/ContainerTECentrifugeCore.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package landmaster.plustic.gui.container;
-
-import landmaster.plustic.tile.*;
-import net.minecraft.entity.player.*;
-import net.minecraft.inventory.*;
-
-public class ContainerTECentrifugeCore extends Container {
- protected final EntityPlayer player;
- protected final TECentrifugeCore te;
-
- public TECentrifugeCore getTE() {
- return te;
- }
-
- public ContainerTECentrifugeCore(EntityPlayer player, TECentrifugeCore te) {
- super();
- this.player = player;
- this.te = te;
-
- for (int i = 0; i < 3; i++) {
- for (int j = 0; j < 9; j++) {
- addSlotToContainer(new Slot(player.inventory, j + i * 9 + 9, 8 + j * 18, 84 + i * 18));
- }
- }
-
- for (int k = 0; k < 9; k++) {
- addSlotToContainer(new Slot(player.inventory, k, 8 + k * 18, 142));
- }
- }
-
- @Override
- public boolean canInteractWith(EntityPlayer playerIn) {
- return playerIn.getDistanceSq(
- this.te.getPos().getX() + 0.5,
- this.te.getPos().getY() + 0.5,
- this.te.getPos().getZ() + 0.5) <= 64;
- }
-}
diff --git a/src/main/java/landmaster/plustic/gui/handler/PTGuiHandler.java b/src/main/java/landmaster/plustic/gui/handler/PTGuiHandler.java
deleted file mode 100644
index 12cc58bc..00000000
--- a/src/main/java/landmaster/plustic/gui/handler/PTGuiHandler.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package landmaster.plustic.gui.handler;
-
-import landmaster.plustic.gui.*;
-import landmaster.plustic.gui.container.*;
-import landmaster.plustic.tile.*;
-import net.minecraft.entity.player.*;
-import net.minecraft.inventory.*;
-import net.minecraft.tileentity.*;
-import net.minecraft.util.math.*;
-import net.minecraft.world.*;
-import net.minecraftforge.fml.common.network.*;
-
-public class PTGuiHandler implements IGuiHandler {
- public static final int FRUITSALAD = 0;
- public static final int MOTS = 1;
- public static final int CENTRIFUGE_CORE = 2;
-
- @Override
- public Container getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
- switch (ID) {
- case FRUITSALAD:
- return new ContainerFruitSalad(player);
- case MOTS:
- return new ContainerMOTS(player);
- case CENTRIFUGE_CORE:
- TileEntity te = world.getTileEntity(new BlockPos(x,y,z));
- if (te instanceof TECentrifugeCore) {
- return new ContainerTECentrifugeCore(player, (TECentrifugeCore)te);
- }
- return null;
- default:
- return null;
- }
- }
-
- @Override
- public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
- switch (ID) {
- case FRUITSALAD:
- return new GuiFruitSalad(getServerGuiElement(ID, player, world, x, y, z), player.inventory);
- case MOTS:
- return new GuiMOTS(getServerGuiElement(ID, player, world, x, y, z), player.inventory);
- case CENTRIFUGE_CORE:
- return new GuiTECentrifugeCore((ContainerTECentrifugeCore)getServerGuiElement(ID, player, world, x, y, z), player.inventory);
- default:
- return null;
- }
- }
-
-}
diff --git a/src/main/java/landmaster/plustic/item/ItemBlockMeta.java b/src/main/java/landmaster/plustic/item/ItemBlockMeta.java
deleted file mode 100644
index 16b7cd86..00000000
--- a/src/main/java/landmaster/plustic/item/ItemBlockMeta.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package landmaster.plustic.item;
-
-import landmaster.plustic.block.*;
-import net.minecraft.block.*;
-import net.minecraft.item.*;
-
-public class ItemBlockMeta extends ItemBlock {
- public ItemBlockMeta(T block) {
- super(block);
- setMaxDamage(0);
- setHasSubtypes(true);
- }
-
- @Override
- public int getMetadata(int damage) {
- return damage;
- }
-
- @Override
- public String getTranslationKey(ItemStack stack) {
- return super.getTranslationKey(stack) + "." + ((IMetaBlockName)block).getSpecialName(stack);
- }
-}
diff --git a/src/main/java/landmaster/plustic/modifiers/armor/JetpackPancakeHippos.java b/src/main/java/landmaster/plustic/modifiers/armor/JetpackPancakeHippos.java
deleted file mode 100644
index a21d6007..00000000
--- a/src/main/java/landmaster/plustic/modifiers/armor/JetpackPancakeHippos.java
+++ /dev/null
@@ -1,561 +0,0 @@
-package landmaster.plustic.modifiers.armor;
-
-import baubles.api.BaublesApi;
-import baubles.api.cap.IBaublesItemHandler;
-import c4.conarm.common.armor.utils.ArmorTagUtil;
-import c4.conarm.lib.armor.ArmorNBT;
-import c4.conarm.lib.modifiers.ArmorModifierTrait;
-import c4.conarm.lib.tinkering.TinkersArmor;
-import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
-import it.unimi.dsi.fastutil.ints.Int2ObjectMaps;
-import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
-import it.unimi.dsi.fastutil.ints.IntIterator;
-import landmaster.plustic.api.Sounds;
-import landmaster.plustic.config.Config;
-import landmaster.plustic.net.PacketHandler;
-import landmaster.plustic.net.PacketSJKey;
-import landmaster.plustic.net.PacketSJSyncParticles;
-import landmaster.plustic.util.Utils;
-import net.minecraft.client.Minecraft;
-import net.minecraft.client.gui.GuiChat;
-import net.minecraft.client.model.ModelBiped;
-import net.minecraft.client.renderer.entity.RenderLivingBase;
-import net.minecraft.client.renderer.entity.layers.LayerBipedArmor;
-import net.minecraft.client.renderer.texture.TextureManager;
-import net.minecraft.client.resources.I18n;
-import net.minecraft.client.settings.KeyBinding;
-import net.minecraft.entity.Entity;
-import net.minecraft.entity.EntityLiving;
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.EntityPlayerMP;
-import net.minecraft.init.MobEffects;
-import net.minecraft.inventory.EntityEquipmentSlot;
-import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.util.ResourceLocation;
-import net.minecraft.util.math.BlockPos;
-import net.minecraft.util.text.ITextComponent;
-import net.minecraft.util.text.Style;
-import net.minecraft.util.text.TextFormatting;
-import net.minecraft.world.World;
-import net.minecraftforge.client.event.RenderGameOverlayEvent;
-import net.minecraftforge.client.event.RenderLivingEvent;
-import net.minecraftforge.common.MinecraftForge;
-import net.minecraftforge.energy.CapabilityEnergy;
-import net.minecraftforge.energy.IEnergyStorage;
-import net.minecraftforge.event.entity.living.LivingEvent;
-import net.minecraftforge.fml.client.FMLClientHandler;
-import net.minecraftforge.fml.common.FMLCommonHandler;
-import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
-import net.minecraftforge.fml.common.gameevent.InputEvent;
-import net.minecraftforge.fml.common.gameevent.TickEvent;
-import net.minecraftforge.fml.common.network.FMLNetworkEvent;
-import net.minecraftforge.fml.common.network.NetworkRegistry;
-import net.minecraftforge.fml.relauncher.Side;
-import net.minecraftforge.fml.relauncher.SideOnly;
-import net.minecraftforge.items.CapabilityItemHandler;
-import net.minecraftforge.items.IItemHandler;
-import org.lwjgl.opengl.GL11;
-import slimeknights.tconstruct.library.Util;
-import slimeknights.tconstruct.library.modifiers.IModifier;
-import slimeknights.tconstruct.library.modifiers.IToolMod;
-import slimeknights.tconstruct.library.utils.TagUtil;
-import tonius.simplyjetpacks.SimplyJetpacks;
-import tonius.simplyjetpacks.client.handler.KeybindHandler;
-import tonius.simplyjetpacks.client.model.PackModelType;
-import tonius.simplyjetpacks.client.util.RenderUtils;
-import tonius.simplyjetpacks.handler.SyncHandler;
-import tonius.simplyjetpacks.item.Jetpack;
-import tonius.simplyjetpacks.setup.ParticleType;
-import tonius.simplyjetpacks.util.SJStringUtil;
-
-import java.util.*;
-import java.util.function.Function;
-import java.util.stream.Collectors;
-
-/**
- * Adapted from SimplyJetpack2's code.
- * @author Landmaster
- *
- */
-public class JetpackPancakeHippos extends ArmorModifierTrait {
- static {
- MinecraftForge.EVENT_BUS.register(JetpackPancakeHippos.class);
- }
-
- public enum JetpackSettings {
- ENGINE, HOVER, EHOVER;
-
- public String getNBTKey() {
- return "PlusTiC_SJ2_"+this.name();
- }
-
- public boolean isOff(ItemStack stack) {
- return TagUtil.getTagSafe(stack).hasKey(getNBTKey());
- }
-
- public void setOff(ItemStack stack, boolean off) {
- if (off) {
- TagUtil.getTagSafe(stack).setBoolean(getNBTKey(), false);
- } else {
- TagUtil.getTagSafe(stack).removeTag(getNBTKey());
- }
- }
-
- public String getStateMsgUnloc() {
- switch (this) {
- case EHOVER:
- return "emergency_hover_mode";
- case ENGINE:
- return "engine_mode";
- case HOVER:
- return "hover_mode";
- default:
- return "";
- }
- }
- }
-
- private static final Map keys = new HashMap<>();
- static {
- if (FMLCommonHandler.instance().getSide() == Side.CLIENT) {
- keys.put(KeybindHandler.JETPACK_ENGINE_KEY, JetpackSettings.ENGINE);
- keys.put(KeybindHandler.JETPACK_HOVER_KEY, JetpackSettings.HOVER);
- keys.put(KeybindHandler.JETPACK_EHOVER_KEY, JetpackSettings.EHOVER);
- }
- }
-
-
- @SideOnly(Side.CLIENT)
- @SubscribeEvent
- public static void onKeyInput(InputEvent.KeyInputEvent event) {
- EntityPlayer player = FMLClientHandler.instance().getClient().player;
- ItemStack chestStack = player.getItemStackFromSlot(EntityEquipmentSlot.CHEST);
-
- for (IModifier trait : Utils.getModifiers(chestStack)) {
- if (trait instanceof JetpackPancakeHippos) {
- keys.forEach((key, setting) -> {
- if (key.isPressed()) {
- boolean oldState = setting.isOff(chestStack);
- if (tonius.simplyjetpacks.config.Config.enableStateMessages) {
- ITextComponent state = oldState ? SJStringUtil.localizeNew("chat.", ".enabled") : SJStringUtil.localizeNew("chat.", ".disabled");
- state.setStyle(oldState ? new Style().setColor(TextFormatting.GREEN) : new Style().setColor(TextFormatting.RED));
- ITextComponent msg = SJStringUtil.localizeNew("chat.", ".jetpack." + setting.getStateMsgUnloc(), state);
- player.sendStatusMessage(msg, true);
- }
- PacketHandler.INSTANCE.sendToServer(new PacketSJKey(setting));
- }
- });
- break;
- }
- }
- }
-
- @SideOnly(Side.CLIENT)
- @SubscribeEvent(receiveCanceled = true)
- public static void onOverlayRender(RenderGameOverlayEvent.Post event) {
- if (event.getType() != RenderGameOverlayEvent.ElementType.ALL) {
- return;
- }
- if (Minecraft.getMinecraft().player != null) {
- if ((Minecraft.getMinecraft().currentScreen == null || tonius.simplyjetpacks.config.Config.showHUDWhileChatting && Minecraft.getMinecraft().currentScreen instanceof GuiChat) && !Minecraft.getMinecraft().gameSettings.hideGUI && !Minecraft.getMinecraft().gameSettings.showDebugInfo) {
- ItemStack chestplate = Minecraft.getMinecraft().player.getItemStackFromSlot(EntityEquipmentSlot.CHEST);
- Utils.getModifiers(chestplate).stream()
- .filter(trait -> trait instanceof JetpackPancakeHippos)
- .findAny().ifPresent(trait -> {
- List info = new ArrayList();
- ((JetpackPancakeHippos)trait).addHUDInfo(info, chestplate, tonius.simplyjetpacks.config.Config.enableStateHUD);
- if (info.isEmpty()) {
- return;
- }
-
- GL11.glPushMatrix();
- Minecraft.getMinecraft().entityRenderer.setupOverlayRendering();
- GL11.glScaled(tonius.simplyjetpacks.config.Config.HUDScale, tonius.simplyjetpacks.config.Config.HUDScale, 1.0D);
-
- int i = 0;
- for (String s : info) {
- RenderUtils.drawStringAtHUDPosition(s, tonius.simplyjetpacks.config.Config.HUDPosition, Minecraft.getMinecraft().fontRenderer, tonius.simplyjetpacks.config.Config.HUDOffsetX, tonius.simplyjetpacks.config.Config.HUDOffsetY, tonius.simplyjetpacks.config.Config.HUDScale, 0xeeeeee, true, i);
- i++;
- }
-
- GL11.glPopMatrix();
- });
- }
- }
- }
-
- private static final Set> layerAdded = Collections.newSetFromMap(new WeakHashMap<>());
-
- @SideOnly(Side.CLIENT)
- @SubscribeEvent
- public static void renderJetpack(RenderLivingEvent.Pre> event) {
- if (!layerAdded.contains(event.getRenderer())) {
- layerAdded.add(event.getRenderer());
- event.getRenderer().addLayer(new LayerBipedArmor(event.getRenderer()) {
- private Optional jetpackOpt = Optional.empty();
-
- @Override
- public void doRenderLayer(EntityLivingBase entitylivingbaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale) {
- jetpackOpt = Utils.getModifiers(event.getEntity().getItemStackFromSlot(EntityEquipmentSlot.CHEST)).stream()
- .filter(trait -> trait instanceof JetpackPancakeHippos)
- .findAny()
- .map(modifier -> ((JetpackPancakeHippos)modifier).jetpack);
- jetpackOpt.ifPresent(jetpack -> this.renderArmorLayer(entitylivingbaseIn, limbSwing, limbSwingAmount, partialTicks, ageInTicks, netHeadYaw, headPitch, scale, EntityEquipmentSlot.CHEST));
- }
-
- @Override
- protected ModelBiped getArmorModelHook(EntityLivingBase entity, ItemStack itemStack, EntityEquipmentSlot slot, ModelBiped model) {
- if (slot == EntityEquipmentSlot.CHEST) {
- return jetpackOpt
- .filter(jetpack -> tonius.simplyjetpacks.config.Config.enableArmor3DModels)
- .map(jetpack -> RenderUtils.getArmorModel(jetpack, entity))
- .orElse(super.getArmorModelHook(entity, itemStack, slot, model));
- }
- return super.getArmorModelHook(entity, itemStack, slot, model);
- }
-
- @Override
- public ResourceLocation getArmorResource(Entity entity, ItemStack stack, EntityEquipmentSlot slot, String type) {
- if (slot == EntityEquipmentSlot.CHEST) {
- return jetpackOpt
- .map(jetpack -> new ResourceLocation(SimplyJetpacks.RESOURCE_PREFIX + "textures/armor/" + jetpack.getBaseName() + (tonius.simplyjetpacks.config.Config.enableArmor3DModels || jetpack.armorModel == PackModelType.FLAT ? "" : ".flat") + ".png"))
- .orElse(TextureManager.RESOURCE_LOCATION_EMPTY);
- }
- return TextureManager.RESOURCE_LOCATION_EMPTY;
- }
- });
- }
- }
-
- private static ParticleType lastJetpackState0 = null;
- private static boolean wearingJetpack0 = false;
- private static boolean sprintKeyCheck0 = false;
- @SideOnly(Side.CLIENT)
- @SubscribeEvent
- public static void onClientTick(TickEvent.ClientTickEvent evt) {
- if (Minecraft.getMinecraft().player == null || Minecraft.getMinecraft().world == null) {
- return;
- }
- if (evt.phase == TickEvent.Phase.START) {
- ItemStack stack = Minecraft.getMinecraft().player.getItemStackFromSlot(EntityEquipmentSlot.CHEST);
- Optional jetpackOpt = Utils.getModifiers(stack).stream()
- .filter(trait -> trait instanceof JetpackPancakeHippos)
- .findAny()
- .map(modifier -> ((JetpackPancakeHippos)modifier).jetpack);
- ParticleType particleType = jetpackOpt.map(jetpack -> getParticleType(Minecraft.getMinecraft().player, stack, jetpack)).orElse(null);
- wearingJetpack0 = jetpackOpt.isPresent();
- if (lastJetpackState0 != particleType) {
- lastJetpackState0 = particleType;
- processJetpackUpdate(Minecraft.getMinecraft().player.getEntityId(), particleType);
- }
- //System.out.println(particleType);
- } else {
- if (!Minecraft.getMinecraft().isGamePaused()) {
- IntIterator it = jetpackState.keySet().iterator();
- while (it.hasNext()) {
- int cur = it.nextInt();
- Entity entity = Minecraft.getMinecraft().world.getEntityByID(cur);
- if (entity == null || !(entity instanceof EntityLivingBase) || entity.dimension != Minecraft.getMinecraft().player.dimension) {
- it.remove();
- } else {
- ParticleType particle = jetpackState.get(cur);
- if (particle != null) {
- if (entity.isInWater() && particle != ParticleType.NONE) {
- particle = ParticleType.BUBBLE;
- }
- SimplyJetpacks.proxy.showJetpackParticles(Minecraft.getMinecraft().world, (EntityLivingBase)entity, particle);
- if (tonius.simplyjetpacks.config.Config.jetpackSounds && !Sounds.PTSoundJetpack.isPlayingFor(entity.getEntityId())) {
- Minecraft.getMinecraft().getSoundHandler().playSound(new Sounds.PTSoundJetpack((EntityLivingBase)entity));
- }
- } else {
- it.remove();
- }
- }
- }
- }
-
- if (sprintKeyCheck0 && Minecraft.getMinecraft().player.movementInput.moveForward < 1.0F) {
- sprintKeyCheck0 = false;
- }
-
- if (!tonius.simplyjetpacks.config.Config.doubleTapSprintInAir
- || !wearingJetpack0
- || Minecraft.getMinecraft().player.onGround
- || Minecraft.getMinecraft().player.isSprinting()
- || Minecraft.getMinecraft().player.isHandActive()
- || Minecraft.getMinecraft().player.isPotionActive(MobEffects.POISON)) {
- return;
- }
-
- if (!sprintKeyCheck0
- && Minecraft.getMinecraft().player.movementInput.moveForward >= 1.0F
- && !Minecraft.getMinecraft().player.collidedHorizontally
- && (Minecraft.getMinecraft().player.getFoodStats().getFoodLevel() > 6.0F || Minecraft.getMinecraft().player.capabilities.allowFlying)) {
- if (Minecraft.getMinecraft().player.sprintToggleTimer <= 0 && !Minecraft.getMinecraft().gameSettings.keyBindSprint.isKeyDown()) {
- Minecraft.getMinecraft().player.sprintToggleTimer = 7;
- sprintKeyCheck0 = true;
- } else {
- Minecraft.getMinecraft().player.setSprinting(true);
- }
- }
- }
- }
-
- @SubscribeEvent
- public static void onClientDisconnectedFromServer(FMLNetworkEvent.ClientDisconnectionFromServerEvent evt) {
- Sounds.PTSoundJetpack.clearPlayingFor();
- }
-
- public void addHUDInfo(List list, ItemStack stack, boolean showState) {
- if (showState) {
- list.add(this.getHUDStatesInfo(stack));
- }
- }
- public String getHUDStatesInfo(ItemStack stack) {
- return SJStringUtil.getHUDStateText(
- !JetpackSettings.ENGINE.isOff(stack),
- !JetpackSettings.HOVER.isOff(stack),
- null,
- !JetpackSettings.EHOVER.isOff(stack));
- }
-
- public static final Map jetpackpancakehippos
- = Arrays.stream(Jetpack.values())
- .filter(jetpack -> !jetpack.isArmored || jetpack == Jetpack.JETPLATE_TE_5 /* special case for jetplate */)
- .collect(Collectors.toMap(Function.identity(), JetpackPancakeHippos::new, (a,b) -> b, () -> new EnumMap<>(Jetpack.class)));
-
- public final Jetpack jetpack;
-
- public JetpackPancakeHippos(Jetpack jetpack) {
- super("jetpackpancakehippos_"+jetpack.name().toLowerCase(Locale.US), 0x60b2ff);
- this.jetpack = jetpack;
- //addAspects(new ModifierAspect.DataAspect(this), new ModifierAspect.SingleAspect(this), ModifierAspect.freeModifier);
- }
-
- @Override
- public boolean canApplyTogether(IToolMod otherModifier) {
- return super.canApplyTogether(otherModifier) && !(otherModifier instanceof JetpackPancakeHippos);
- }
-
- @Override
- public boolean canApplyCustom(ItemStack stack) {
- //System.out.println("STACK: "+stack);
- return EntityLiving.getSlotForItemStack(stack) == EntityEquipmentSlot.CHEST && super.canApplyCustom(stack);
- }
-
-
- /*@Override
- public Optional matches(NonNullList stacks) {
- System.out.println("Candidates: "+stacks);
- System.out.println("Matchers: "+items);
- Optional res = super.matches(stacks);
- System.out.println("Verdict: "+res);
- return res;
- }*/
-
- private static final Int2ObjectMap lastJetpackState = Int2ObjectMaps.synchronize(new Int2ObjectOpenHashMap<>()), jetpackState = new Int2ObjectOpenHashMap<>();
-
- public static void processJetpackUpdate(int entityId, ParticleType particleType) {
- if (particleType != null) {
- jetpackState.put(entityId, particleType);
- } else {
- jetpackState.remove(entityId);
- }
- }
- public static Int2ObjectMap getJetpackStates() { return jetpackState; }
-
- @Override
- public void onArmorTick(ItemStack armor, World world, EntityPlayer player) {
- this.flyUser(player, armor, false);
- }
-
- @SubscribeEvent
- public static void onLivingTick(LivingEvent.LivingUpdateEvent evt) {
- if (!evt.getEntityLiving().world.isRemote) {
- ParticleType jetpackState = null;
- ItemStack armor = evt.getEntityLiving().getItemStackFromSlot(EntityEquipmentSlot.CHEST);
- Jetpack jetpack = null;
- if (armor.getItem() instanceof TinkersArmor) {
- jetpack = Utils.getModifiers(armor).stream()
- .filter(trait -> trait instanceof JetpackPancakeHippos)
- .findAny()
- .map(trait -> ((JetpackPancakeHippos)trait).jetpack)
- .orElse(null);
- }
- if (jetpack != null) {
- jetpackState = getParticleType(evt.getEntityLiving(), armor, jetpack);
- }
- if (jetpackState != lastJetpackState.get(evt.getEntityLiving().getEntityId())) {
- if (jetpackState == null) {
- lastJetpackState.remove(evt.getEntityLiving().getEntityId());
- } else {
- lastJetpackState.put(evt.getEntityLiving().getEntityId(), jetpackState);
- }
- PacketHandler.INSTANCE.sendToAllAround(new PacketSJSyncParticles(evt.getEntityLiving().getEntityId(), jetpackState != null ? jetpackState.ordinal() : -1), new NetworkRegistry.TargetPoint(evt.getEntityLiving().dimension, evt.getEntityLiving().posX, evt.getEntityLiving().posY, evt.getEntityLiving().posZ, 256));
- } else if (jetpack != null && evt.getEntityLiving().world.getTotalWorldTime() % 160L == 0) {
- PacketHandler.INSTANCE.sendToAllAround(new PacketSJSyncParticles(evt.getEntityLiving().getEntityId(), jetpackState != null ? jetpackState.ordinal() : -1), new NetworkRegistry.TargetPoint(evt.getEntityLiving().dimension, evt.getEntityLiving().posX, evt.getEntityLiving().posY, evt.getEntityLiving().posZ, 256));
- }
-
- if (evt.getEntityLiving().world.getTotalWorldTime() % 200L == 0) {
- IntIterator itr = lastJetpackState.keySet().iterator();
- while (itr.hasNext()) {
- int entityId = itr.nextInt();
- if (evt.getEntityLiving().world.getEntityByID(entityId) == null) {
- itr.remove();
- }
- }
- }
- }
- }
-
- public static ParticleType getParticleType(EntityLivingBase user, ItemStack stack, Jetpack jetpack) {
- boolean flyKeyDown = SyncHandler.isFlyKeyDown(user);
- if (!JetpackSettings.ENGINE.isOff(stack) && (searchStorage(user, 1).isPresent() || !jetpack.usesEnergy) && (flyKeyDown || !JetpackSettings.HOVER.isOff(stack) && !user.onGround && user.motionY < 0)) {
- return jetpack.defaultParticleType;
- }
- return null;
- }
-
-
- protected int getFuelUsage(ItemStack stack) {
- if (jetpack.getBaseName().contains("enderium")) {
- return (int)Math.round(jetpack.getEnergyUsage() * 0.8);
- }
- return jetpack.getEnergyUsage();
- }
-
- protected static Optional searchStorage(EntityLivingBase elb, int fuelUsage) {
- Optional storage = Optional.empty();
- if (elb.hasCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null)) {
- IItemHandler cap = elb.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null);
- for (int i=0; i raw.extractEnergy(fuelUsage, true) >= fuelUsage);
- if (storage.isPresent()) break;
- }
- }
- if (!storage.isPresent() && elb instanceof EntityPlayer) {
- IBaublesItemHandler ib = BaublesApi.getBaublesHandler((EntityPlayer)elb);
- for (int i=0; i raw.extractEnergy(fuelUsage, true) >= fuelUsage);
- if (storage.isPresent()) break;
- }
- }
- return storage;
- }
-
- protected void flyUser(EntityPlayer user, ItemStack stack, boolean force) {
- int fuelUsage = (int) (user.isSprinting() ? Math.round(this.getFuelUsage(stack) * jetpack.sprintEnergyModifier) : this.getFuelUsage(stack));
-
- Optional storage = searchStorage(user, fuelUsage);
-
- if (!JetpackSettings.ENGINE.isOff(stack)) {
- boolean hoverMode = !JetpackSettings.HOVER.isOff(stack);
- double hoverSpeed = tonius.simplyjetpacks.config.Config.invertHoverSneakingBehavior == SyncHandler.isDescendKeyDown(user) ? jetpack.speedVerticalHoverSlow : jetpack.speedVerticalHover;
- boolean flyKeyDown = force || SyncHandler.isFlyKeyDown(user);
- boolean descendKeyDown = SyncHandler.isDescendKeyDown(user);
- double currentAccel = jetpack.accelVertical * (user.motionY < 0.3D ? 2.5D : 1.0D);
- double currentSpeedVertical = jetpack.speedVertical * (user.isInWater() ? 0.4D : 1.0D);
-
- //System.out.println(flyKeyDown + " " + descendKeyDown);
-
- if (flyKeyDown || hoverMode && !user.onGround) {
- if (jetpack.usesEnergy && storage.isPresent()) {
- storage.get().extractEnergy(fuelUsage, false);
- }
-
- if (!jetpack.usesEnergy || storage.map(IEnergyStorage::getEnergyStored).filter(e -> e>0).isPresent()) {
- if (flyKeyDown) {
- if (!hoverMode) {
- user.motionY = Math.min(user.motionY + currentAccel, currentSpeedVertical);
- } else {
- if (descendKeyDown) {
- user.motionY = Math.min(user.motionY + currentAccel, -jetpack.speedVerticalHoverSlow);
- } else {
- user.motionY = Math.min(user.motionY + currentAccel, jetpack.speedVerticalHover);
- }
- }
- } else {
- user.motionY = Math.min(user.motionY + currentAccel, -hoverSpeed);
- }
-
- float speedSideways = (float) (user.isSneaking() ? jetpack.speedSideways * 0.5F : jetpack.speedSideways);
- float speedForward = (float) (user.isSprinting() ? speedSideways * jetpack.sprintSpeedModifier : speedSideways);
- if (SyncHandler.isForwardKeyDown(user)) {
- user.moveRelative(0, 0, speedForward, speedForward);
- }
- if (SyncHandler.isBackwardKeyDown(user)) {
- user.moveRelative(0, 0, -speedSideways, speedSideways * 0.8F);
- }
- if (SyncHandler.isLeftKeyDown(user)) {
- user.moveRelative(speedSideways, 0, 0, speedSideways);
- }
- if (SyncHandler.isRightKeyDown(user)) {
- user.moveRelative(-speedSideways, 0, 0, speedSideways);
- }
-
- if (!user.world.isRemote) {
- user.fallDistance = 0.0F;
-
- if (user instanceof EntityPlayerMP) {
- ((EntityPlayerMP) user).connection.floatingTickCount = 0;
- }
- }
- }
- }
- }
-
- //Emergency Hover
- if (!user.world.isRemote && jetpack.emergencyHoverMode && !JetpackSettings.EHOVER.isOff(stack)) {
- if ((!jetpack.usesEnergy || storage.map(IEnergyStorage::getEnergyStored).filter(e -> e>0).isPresent()) && (JetpackSettings.HOVER.isOff(stack) || JetpackSettings.ENGINE.isOff(stack))) {
- if (user.posY < -5) {
- this.doEHover(stack, user);
- } else {
- if (!user.capabilities.isCreativeMode && user.fallDistance - 1.2F >= user.getHealth()) {
- for (int j = 0; j <= 16; j++) {
- int x = Math.round((float) user.posX - 0.5F);
- int y = Math.round((float) user.posY) - j;
- int z = Math.round((float) user.posZ - 0.5F);
- if (!user.world.isAirBlock(new BlockPos(x, y, z))) {
- this.doEHover(stack, user);
- break;
- }
- }
- }
- }
- }
- }
- }
-
- protected void doEHover(ItemStack armor, EntityPlayer user) {
- JetpackSettings.ENGINE.setOff(armor, false);
- JetpackSettings.HOVER.setOff(armor, false);
- ITextComponent msg = SJStringUtil.localizeNew("chat.", ".jetpack.emergency_hover_mode.msg");
- msg.setStyle(new Style().setColor(TextFormatting.RED));
- user.sendStatusMessage(msg, true);
- }
-
- @Override
- public String getLocalizedName() {
- return Util.translateFormatted("modifier.jetpackpancakehippos.name",
- I18n.format(jetpack.unlocalisedName + ".name"));
- }
-
- @Override
- public String getLocalizedDesc() {
- return Util.translate(LOC_Desc, "jetpackpancakehippos");
- }
-
- @Override
- public void applyEffect(NBTTagCompound rootCompound, NBTTagCompound modifierTag) {
- super.applyEffect(rootCompound, modifierTag);
- ArmorNBT data = ArmorTagUtil.getArmorStats(rootCompound);
- data.durability += jetpack.energyCapacity * Config.jetpackDurabilityBonusScale;
- TagUtil.setToolTag(rootCompound, data.get());
- }
-}
diff --git a/src/main/java/landmaster/plustic/modules/IModule.java b/src/main/java/landmaster/plustic/modules/IModule.java
deleted file mode 100644
index 0f8c9147..00000000
--- a/src/main/java/landmaster/plustic/modules/IModule.java
+++ /dev/null
@@ -1,11 +0,0 @@
-package landmaster.plustic.modules;
-
-import java.util.*;
-
-public interface IModule {
- public static final Set modules = new LinkedHashSet<>();
-
- default void init() {}
- default void init2() {}
- default void init3() {}
-}
diff --git a/src/main/java/landmaster/plustic/modules/ModuleActAdd.java b/src/main/java/landmaster/plustic/modules/ModuleActAdd.java
deleted file mode 100644
index e964e040..00000000
--- a/src/main/java/landmaster/plustic/modules/ModuleActAdd.java
+++ /dev/null
@@ -1,152 +0,0 @@
-package landmaster.plustic.modules;
-
-import static slimeknights.tconstruct.library.materials.MaterialTypes.*;
-import static slimeknights.tconstruct.library.utils.HarvestLevels.*;
-import static slimeknights.tconstruct.tools.TinkerTraits.*;
-
-
-import de.ellpeck.actuallyadditions.mod.items.InitItems;
-import landmaster.plustic.*;
-import landmaster.plustic.config.*;
-import landmaster.plustic.tools.stats.*;
-import landmaster.plustic.traits.*;
-import landmaster.plustic.util.*;
-import net.minecraft.item.*;
-import net.minecraft.util.text.*;
-import net.minecraftforge.fml.common.*;
-import slimeknights.tconstruct.library.*;
-import slimeknights.tconstruct.library.materials.*;
-
-public class ModuleActAdd implements IModule {
-
- public void init() {
- if (Config.actuallyAdditions && Loader.isModLoaded("actuallyadditions")) {
- Material blackQuartz = new Material("blackquartz_plustic", TextFormatting.BLACK);
- blackQuartz.addTrait(DevilsStrength.devilsstrength);
- blackQuartz.addTrait(crude2);
- blackQuartz.addItem("gemQuartzBlack", 1, Material.VALUE_Ingot);
- blackQuartz.setCraftable(true);
- PlusTiC.proxy.setRenderInfo(blackQuartz, 0x000000);
- TinkerRegistry.addMaterialStats(blackQuartz, new HeadMaterialStats(380, 6, 4.5f, DIAMOND),
- new HandleMaterialStats(0.8f, 0),
- new ExtraMaterialStats(50),
- PlusTiC.justWhy);
- PlusTiC.materials.put("blackquartz", blackQuartz);
-
- Material Void = new Material("void_actadd_plustic", TextFormatting.BLACK);
- Void.addTrait(Unnamed.unnamed, HEAD);
- Void.addTrait(crude, HEAD);
- Void.addTrait(crude);
- Void.setCraftable(true);
- PlusTiC.proxy.setRenderInfo(Void, 0x222222);
- TinkerRegistry.addMaterialStats(Void, new HeadMaterialStats(480, 7, 4.4f, OBSIDIAN),
- new HandleMaterialStats(1, 0),
- new ExtraMaterialStats(140),
- new BowMaterialStats(1, 1.3f, 3.5f));
- PlusTiC.materials.put("Void", Void);
-
- Material enori = new Material("enori_actadd_plustic", TextFormatting.WHITE);
- enori.addTrait(Starfishy.starfishy, HEAD);
- enori.addTrait(Anticorrosion.anticorrosion);
- enori.setCraftable(true);
- PlusTiC.proxy.setRenderInfo(enori, 0xF2F7FF);
- TinkerRegistry.addMaterialStats(enori, new HeadMaterialStats(600, 7, 5.2f, OBSIDIAN),
- new HandleMaterialStats(1.2f, -5),
- new ExtraMaterialStats(75),
- new BowMaterialStats(1.2f, 1.2f, 5.1f),
- new BatteryCellMaterialStats(72000));
- PlusTiC.materials.put("enori", enori);
-
- Material palis = new Material("palis_actadd_plustic", TextFormatting.DARK_BLUE);
- palis.addTrait(Spades.spades);
- palis.setCraftable(true);
- PlusTiC.proxy.setRenderInfo(palis, 0x0000D3);
- TinkerRegistry.addMaterialStats(palis, new HeadMaterialStats(800, 7.5f, 5.8f, COBALT),
- new HandleMaterialStats(1.3f, 7),
- new ExtraMaterialStats(100),
- PlusTiC.justWhy,
- new LaserMediumMaterialStats(9, 17));
- PlusTiC.materials.put("palis", palis);
-
- Material restonia = new Material("restonia_actadd_plustic", TextFormatting.DARK_RED);
- restonia.addTrait(Hearts.hearts);
- restonia.setCraftable(true);
- PlusTiC.proxy.setRenderInfo(restonia, 0xEF0000);
- TinkerRegistry.addMaterialStats(restonia, new HeadMaterialStats(640, 8.8f, 6.1f, OBSIDIAN),
- new HandleMaterialStats(1.1f, 0),
- new ExtraMaterialStats(90),
- new BowMaterialStats(1.4f, 1.7f, 5.7f),
- new BatteryCellMaterialStats(80000));
- PlusTiC.materials.put("restonia", restonia);
-
- Material emeradic = new Material("emeradic_actadd_plustic", TextFormatting.DARK_GREEN);
- emeradic.addTrait(Vindictive.vindictive);
- emeradic.setCraftable(true);
- PlusTiC.proxy.setRenderInfo(emeradic, 0x00C12D);
- TinkerRegistry.addMaterialStats(emeradic, new HeadMaterialStats(1400, 8, 7.7f, COBALT),
- new HandleMaterialStats(1.1f, 0),
- new ExtraMaterialStats(77),
- new BowMaterialStats(1.1f, 2.0f, 7.0f),
- new LaserMediumMaterialStats(10, 24));
- PlusTiC.materials.put("emeradic", emeradic);
-
- Material diamatine = new Material("diamatine_actadd_plustic", TextFormatting.BLUE);
- diamatine.addTrait(MorganLeFay.morganlefay);
- diamatine.setCraftable(true);
- PlusTiC.proxy.setRenderInfo(diamatine, 0x609DFF);
- TinkerRegistry.addMaterialStats(diamatine, new HeadMaterialStats(1700, 8, 6.3f, COBALT),
- new HandleMaterialStats(1.2f, 10),
- new ExtraMaterialStats(88),
- new BowMaterialStats(0.7f, 2.0f, 11.0f),
- new LaserMediumMaterialStats(10, 24));
- PlusTiC.materials.put("diamatine", diamatine);
- }
- }
-
- public void init2() {
- final Material Void = PlusTiC.materials.get("Void");
- if (Void != null) {
- ItemStack voidStack = new ItemStack(InitItems.itemCrystal, 1, 3);
- Void.addItem(voidStack, 1, Material.VALUE_Ingot);
- Void.setRepresentativeItem(voidStack);
- }
-
- final Material enori = PlusTiC.materials.get("enori");
- if (enori != null) {
- ItemStack enoriStack = new ItemStack(InitItems.itemCrystal, 1, 5);
- enori.addItem(enoriStack, 1, Material.VALUE_Ingot);
- enori.setRepresentativeItem(enoriStack);
- }
-
- final Material palis = PlusTiC.materials.get("palis");
- if (palis != null) {
- ItemStack palisStack = new ItemStack(InitItems.itemCrystal, 1, 1);
- palis.addItem(palisStack, 1, Material.VALUE_Ingot);
- palis.setRepresentativeItem(palisStack);
- }
-
- final Material restonia = PlusTiC.materials.get("restonia");
- if (restonia != null) {
- restonia.addItem(InitItems.itemCrystal, 1, Material.VALUE_Ingot);
- restonia.setRepresentativeItem(InitItems.itemCrystal);
- }
-
- final Material emeradic = PlusTiC.materials.get("emeradic");
- if (emeradic != null) {
- ItemStack emeradicStack = new ItemStack(InitItems.itemCrystal, 1, 4);
- emeradic.addItem(emeradicStack, 1, Material.VALUE_Ingot);
- emeradic.setRepresentativeItem(emeradicStack);
- }
-
- final Material diamatine = PlusTiC.materials.get("diamatine");
- if (diamatine != null) {
- ItemStack diamatineStack = new ItemStack(InitItems.itemCrystal, 1, 2);
- diamatine.addItem(diamatineStack, 1, Material.VALUE_Ingot);
- diamatine.setRepresentativeItem(diamatineStack);
- }
-
- // YOU TOO, ACTUALLY ADDITIONS?
- Utils.setDispItem(PlusTiC.materials.get("blackquartz"), "gemQuartzBlack");
- }
-
-}
diff --git a/src/main/java/landmaster/plustic/modules/ModuleAdvRocketry.java b/src/main/java/landmaster/plustic/modules/ModuleAdvRocketry.java
deleted file mode 100644
index 2ecbceeb..00000000
--- a/src/main/java/landmaster/plustic/modules/ModuleAdvRocketry.java
+++ /dev/null
@@ -1,46 +0,0 @@
-package landmaster.plustic.modules;
-
-import static slimeknights.tconstruct.library.materials.MaterialTypes.*;
-import static slimeknights.tconstruct.library.utils.HarvestLevels.*;
-
-import landmaster.plustic.*;
-import landmaster.plustic.config.*;
-import landmaster.plustic.fluids.*;
-import landmaster.plustic.traits.*;
-import landmaster.plustic.util.*;
-import net.minecraft.util.text.*;
-import net.minecraftforge.fml.common.*;
-import slimeknights.tconstruct.library.*;
-import slimeknights.tconstruct.library.materials.*;
-
-public class ModuleAdvRocketry implements IModule {
-
- public void init() {
- if (Config.advancedRocketry &&
- (Loader.isModLoaded("libVulpes") || Loader.isModLoaded("libvulpes"))) {
- if (TinkerRegistry.getMaterial("titanium") == Material.UNKNOWN) {
- Material titanium = new Material("titanium", TextFormatting.WHITE);
- titanium.addTrait(Light.light);
- titanium.addTrait(Anticorrosion.anticorrosion, HEAD);
- titanium.addItem("ingotTitanium", 1, Material.VALUE_Ingot);
- titanium.setCraftable(false).setCastable(true);
- Utils.setDispItem(titanium, "libvulpes", "productingot", 7);
- PlusTiC.proxy.setRenderInfo(titanium, 0xDCE1EA);
-
- FluidMolten titaniumFluid = Utils.fluidMetal("titanium", 0xDCE1EA);
- titaniumFluid.setTemperature(790);
- Utils.initFluidMetal(titaniumFluid);
- titanium.setFluid(titaniumFluid);
-
- TinkerRegistry.addMaterialStats(titanium, new HeadMaterialStats(560, 6, 6, OBSIDIAN));
- TinkerRegistry.addMaterialStats(titanium, new HandleMaterialStats(1.4f, 0));
- TinkerRegistry.addMaterialStats(titanium, new ExtraMaterialStats(40));
- TinkerRegistry.addMaterialStats(titanium, new BowMaterialStats(1.15f, 1.3f, 6.6f));
- TinkerRegistry.addMaterialStats(titanium, new FletchingMaterialStats(1.0f, 1.3f));
-
- PlusTiC.materials.put("titanium", titanium);
- }
- }
- }
-
-}
diff --git a/src/main/java/landmaster/plustic/modules/ModuleAppEng2.java b/src/main/java/landmaster/plustic/modules/ModuleAppEng2.java
deleted file mode 100644
index 4f482947..00000000
--- a/src/main/java/landmaster/plustic/modules/ModuleAppEng2.java
+++ /dev/null
@@ -1,51 +0,0 @@
-package landmaster.plustic.modules;
-
-import static slimeknights.tconstruct.library.utils.HarvestLevels.*;
-
-import landmaster.plustic.*;
-import landmaster.plustic.config.*;
-import landmaster.plustic.tools.stats.*;
-import landmaster.plustic.traits.*;
-import landmaster.plustic.util.*;
-import net.minecraftforge.fml.common.Loader;
-import slimeknights.tconstruct.library.*;
-import slimeknights.tconstruct.library.materials.*;
-
-public class ModuleAppEng2 implements IModule {
- public void init() {
- if (Config.appEng2 && Loader.isModLoaded("appliedenergistics2")) {
- Material certusQuartz = new Material("certusQuartz_plustic", 0x55D3E7FF);
- certusQuartz.addTrait(Elemental.elemental);
- certusQuartz.setCraftable(true);
- new OreRegisterPromise("crystalCertusQuartz")
- .thenAccept(quartz -> {
- certusQuartz.addItem("crystalCertusQuartz", 1, Material.VALUE_Ingot);
- certusQuartz.setRepresentativeItem(quartz);
- });
- PlusTiC.proxy.setRenderInfo(certusQuartz, 0x55D3E7FF);
- TinkerRegistry.addMaterialStats(certusQuartz, new HeadMaterialStats(250, 6.4f, 4.5f, DIAMOND),
- new HandleMaterialStats(0.8f, 80),
- new ExtraMaterialStats(70),
- PlusTiC.justWhy,
- new LaserMediumMaterialStats(5, 14));
- PlusTiC.materials.put("certusQuartz", certusQuartz);
-
- Material fluixCrystal = new Material("fluixCrystal_plustic", 0x883D0099);
- fluixCrystal.addTrait(Portly.portly);
- fluixCrystal.setCraftable(true);
- new OreRegisterPromise("crystalFluix")
- .thenAccept(crystal -> {
- fluixCrystal.addItem("crystalFluix", 1, Material.VALUE_Ingot);
- fluixCrystal.setRepresentativeItem(crystal);
- });
- PlusTiC.proxy.setRenderInfo(fluixCrystal, 0x883D0099);
- TinkerRegistry.addMaterialStats(fluixCrystal, new HeadMaterialStats(700, 7, 6.2f, OBSIDIAN),
- new HandleMaterialStats(1.0f, 0),
- new ExtraMaterialStats(75),
- PlusTiC.justWhy,
- new BatteryCellMaterialStats(80000),
- new LaserMediumMaterialStats(7, 16));
- PlusTiC.materials.put("fluixCrystal", fluixCrystal);
- }
- }
-}
diff --git a/src/main/java/landmaster/plustic/modules/ModuleArmorPlus.java b/src/main/java/landmaster/plustic/modules/ModuleArmorPlus.java
deleted file mode 100644
index 5c4e5e7b..00000000
--- a/src/main/java/landmaster/plustic/modules/ModuleArmorPlus.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package landmaster.plustic.modules;
-
-import static slimeknights.tconstruct.library.materials.MaterialTypes.*;
-import static slimeknights.tconstruct.library.utils.HarvestLevels.*;
-import static slimeknights.tconstruct.tools.TinkerTraits.*;
-
-import landmaster.plustic.*;
-import landmaster.plustic.config.*;
-import landmaster.plustic.traits.*;
-import landmaster.plustic.util.Utils;
-import net.minecraft.util.text.*;
-import net.minecraftforge.fml.common.*;
-import slimeknights.tconstruct.library.*;
-import slimeknights.tconstruct.library.materials.*;
-
-public class ModuleArmorPlus implements IModule {
-
- public void init() {
- if (Config.armorPlus && Loader.isModLoaded("armorplus")) {
- Material witherBone = new Material("witherbone", TextFormatting.BLACK);
- witherBone.addTrait(Apocalypse.apocalypse);
- witherBone.addItem("witherBone", 1, Material.VALUE_Ingot);
- witherBone.setCraftable(true);
- PlusTiC.proxy.setRenderInfo(witherBone, 0x000000);
- TinkerRegistry.addMaterialStats(witherBone, new ArrowShaftMaterialStats(1.0f, 20));
- PlusTiC.materials.put("witherbone", witherBone);
-
- Material guardianScale = new Material("guardianscale", TextFormatting.AQUA);
- guardianScale.addTrait(DivineShield.divineShield, HEAD);
- guardianScale.addTrait(aquadynamic);
- guardianScale.addItem("scaleGuardian", 1, Material.VALUE_Ingot);
- guardianScale.setCraftable(true);
- PlusTiC.proxy.setRenderInfo(guardianScale, 0x00FFFF);
- TinkerRegistry.addMaterialStats(guardianScale, new HeadMaterialStats(600, 6.2f, 7, COBALT));
- TinkerRegistry.addMaterialStats(guardianScale, new HandleMaterialStats(0.9f, 40));
- TinkerRegistry.addMaterialStats(guardianScale, new ExtraMaterialStats(80));
- TinkerRegistry.addMaterialStats(guardianScale, new BowMaterialStats(0.85f, 1.2f, 5.5f));
- PlusTiC.materials.put("guardianscale", guardianScale);
- }
- }
-
- public void init2() {
- // NOT REGISTERING YOUR OREDICTS IN PREINIT, ARMORPLUS?
- Utils.setDispItem(PlusTiC.materials.get("witherbone"), "witherBone");
- Utils.setDispItem(PlusTiC.materials.get("guardianscale"), "scaleGuardian");
- }
-
-}
diff --git a/src/main/java/landmaster/plustic/modules/ModuleAstralSorcery.java b/src/main/java/landmaster/plustic/modules/ModuleAstralSorcery.java
deleted file mode 100644
index 759836e1..00000000
--- a/src/main/java/landmaster/plustic/modules/ModuleAstralSorcery.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package landmaster.plustic.modules;
-
-import static slimeknights.tconstruct.library.materials.MaterialTypes.*;
-import static slimeknights.tconstruct.library.utils.HarvestLevels.*;
-
-import landmaster.plustic.*;
-import landmaster.plustic.config.*;
-import landmaster.plustic.fluids.*;
-import landmaster.plustic.tools.stats.*;
-import landmaster.plustic.traits.*;
-import landmaster.plustic.util.*;
-import net.minecraftforge.fml.common.*;
-import slimeknights.tconstruct.library.*;
-import slimeknights.tconstruct.library.materials.*;
-
-public class ModuleAstralSorcery implements IModule {
- @Override
- public void init() {
- if (Loader.isModLoaded("astralsorcery") && Config.astralSorcery) {
- Material starmetal = new Material("starmetal", 0x000b56);
- starmetal.addTrait(ImASuperstar.imasuperstar, HEAD);
- starmetal.addTrait(ImASuperstar.imasuperstar, LaserMediumMaterialStats.TYPE);
- starmetal.addTrait(Illuminati.illuminati);
- starmetal.addItem("ingotAstralStarmetal", 1, Material.VALUE_Ingot);
- starmetal.setCraftable(false).setCastable(true);
- PlusTiC.proxy.setRenderInfo(starmetal, 0x000b56);
-
- FluidMolten starmetalFluid = Utils.fluidMetal("starmetal", 0x000b56);
- starmetalFluid.setTemperature(999);
- Utils.initFluidMetal(starmetalFluid);
- starmetal.setFluid(starmetalFluid);
-
- TinkerRegistry.addMaterialStats(starmetal,
- new HeadMaterialStats(204, 6.00f, 4.00f, DIAMOND),
- new HandleMaterialStats(1.0f, 60),
- new ExtraMaterialStats(100),
- new BowMaterialStats(0.5f, 1.5f, 7f),
- new LaserMediumMaterialStats(4.6f, 70));
-
- PlusTiC.materials.put("astralStarmetal", starmetal);
- }
- }
-}
diff --git a/src/main/java/landmaster/plustic/modules/ModuleAvaritia.java b/src/main/java/landmaster/plustic/modules/ModuleAvaritia.java
deleted file mode 100644
index 600d8f10..00000000
--- a/src/main/java/landmaster/plustic/modules/ModuleAvaritia.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package landmaster.plustic.modules;
-
-import landmaster.plustic.*;
-import landmaster.plustic.config.*;
-import landmaster.plustic.fluids.*;
-import landmaster.plustic.tools.stats.*;
-import landmaster.plustic.traits.*;
-import landmaster.plustic.util.*;
-import net.minecraft.item.EnumRarity;
-import net.minecraft.util.text.*;
-import net.minecraftforge.fml.common.*;
-import slimeknights.tconstruct.library.*;
-import slimeknights.tconstruct.library.materials.*;
-
-public class ModuleAvaritia implements IModule {
- public void init() {
- if (Config.avaritia && Loader.isModLoaded("avaritia")) {
- Material infinity = new Material("infinity_avaritia_plustic", TextFormatting.LIGHT_PURPLE);
- infinity.addTrait(Global.global);
- infinity.addTrait(BrownMagic.brownmagic);
- infinity.addTrait(Apocalypse.apocalypse);
- infinity.addItem("ingotInfinity", 1, Material.VALUE_Ingot);
- infinity.setCraftable(false).setCastable(true);
- PlusTiC.proxy.setRenderInfo(infinity, 0x82FF96, 0x7C92FF, 0xEA84FF);
-
- FluidMolten infinityFluid = Utils.fluidMetal("infinity", 0xaaaaFF);
- infinityFluid.setTemperature(1400);
- infinityFluid.setRarity(EnumRarity.EPIC);
- Utils.initFluidMetal(infinityFluid);
- infinity.setFluid(infinityFluid);
-
- TinkerRegistry.addMaterialStats(infinity,
- new HeadMaterialStats(7000, 18, 40, 10),
- new HandleMaterialStats(2.0f, 0),
- new ExtraMaterialStats(1400),
- new BowMaterialStats(2.0f, 2.8f, 16),
- new LaserMediumMaterialStats(65, 100));
-
- PlusTiC.materials.put("infinity", infinity);
- }
- }
-
- public void init2() {
- // SAME HERE, AVARITIA?
- Utils.setDispItem(PlusTiC.materials.get("infinity"), "ingotInfinity");
- }
-}
diff --git a/src/main/java/landmaster/plustic/modules/ModuleBase.java b/src/main/java/landmaster/plustic/modules/ModuleBase.java
deleted file mode 100644
index a2848ef5..00000000
--- a/src/main/java/landmaster/plustic/modules/ModuleBase.java
+++ /dev/null
@@ -1,209 +0,0 @@
-package landmaster.plustic.modules;
-
-import static slimeknights.tconstruct.library.materials.MaterialTypes.*;
-import static slimeknights.tconstruct.library.utils.HarvestLevels.*;
-import static slimeknights.tconstruct.tools.TinkerTraits.*;
-
-import java.util.*;
-import java.util.concurrent.*;
-
-import landmaster.plustic.*;
-import landmaster.plustic.api.*;
-import landmaster.plustic.config.*;
-import landmaster.plustic.fluids.*;
-import landmaster.plustic.tools.stats.*;
-import landmaster.plustic.traits.*;
-import landmaster.plustic.util.*;
-import net.minecraft.init.*;
-import net.minecraft.item.Item;
-import net.minecraft.util.text.*;
-import net.minecraftforge.event.*;
-import net.minecraftforge.fluids.*;
-import net.minecraftforge.fml.common.Mod;
-import net.minecraftforge.fml.common.eventhandler.*;
-import slimeknights.tconstruct.library.*;
-import slimeknights.tconstruct.library.events.*;
-import slimeknights.tconstruct.library.materials.*;
-import slimeknights.tconstruct.library.smeltery.*;
-import slimeknights.tconstruct.library.tinkering.*;
-import slimeknights.tconstruct.shared.*;
-
-@Mod.EventBusSubscriber(modid = ModInfo.MODID)
-public class ModuleBase implements IModule {
- private static CompletableFuture> emeraldStage = new CompletableFuture<>();
-
- private static boolean usePlusTiCInvarFluid = false;
-
- public void init() {
- if (Config.base) {
- Material tnt = new Material("tnt", TextFormatting.RED);
- tnt.addTrait(Explosive.explosive);
- tnt.addItem(Blocks.TNT, Material.VALUE_Ingot);
- tnt.setRepresentativeItem(Blocks.TNT);
- tnt.setCraftable(true);
- PlusTiC.proxy.setRenderInfo(tnt, 0xFF4F4F);
- TinkerRegistry.addMaterialStats(tnt, new ArrowShaftMaterialStats(0.95f, 0));
- PlusTiC.materials.put("tnt", tnt);
-
- Material emerald = new Material("emerald_plustic", TextFormatting.GREEN);
- emerald.addTrait(Terrafirma.terrafirma.get(0));
- emerald.addTrait(Elemental.elemental, HEAD);
- emerald.addItem("gemEmerald", 1, Material.VALUE_Ingot);
- emerald.setRepresentativeItem(Items.EMERALD);
- emerald.setCraftable(false).setCastable(true);
- PlusTiC.proxy.setRenderInfo(emerald, 0x13DB52);
- CompletableFuture> emeraldStage1 = emeraldStage.thenRun(() -> emerald.setFluid(TinkerFluids.emerald));
- TinkerRegistry.addMaterialStats(emerald, new HeadMaterialStats(1222, 7, 7, COBALT),
- new HandleMaterialStats(1.1f, 0),
- new ExtraMaterialStats(70),
- new BowMaterialStats(1.1f, 1, 0.9f));
- PlusTiC.materials.put("emerald", emerald);
- PlusTiC.materialIntegrationStages.put("emerald", emeraldStage1);
-
- // alumite is back! (with some changes)
- Utils.ItemMatGroup alumiteGroup = Utils.registerMatGroup("alumite");
-
- Material alumite = new Material("alumite", TextFormatting.RED);
- alumite.addTrait(Global.global);
- alumite.addItem("ingotAlumite", 1, Material.VALUE_Ingot);
- alumite.setCraftable(false).setCastable(true);
- alumite.setRepresentativeItem(alumiteGroup.ingot);
- PlusTiC.proxy.setRenderInfo(alumite, 0xFFE0F1);
-
- FluidMolten alumiteFluid = Utils.fluidMetal("alumite", 0xFFE0F1);
- alumiteFluid.setTemperature(890);
- Utils.initFluidMetal(alumiteFluid);
- alumite.setFluid(alumiteFluid);
-
- TinkerRegistry.addMaterialStats(alumite, new HeadMaterialStats(700, 6.8f, 5.5f, COBALT),
- new HandleMaterialStats(1.10f, 70), new ExtraMaterialStats(80),
- new BowMaterialStats(0.65f, 1.6f, 7f));
-
- PlusTiC.materials.put("alumite", alumite);
-
- if (TinkerRegistry.getMaterial("nickel") == Material.UNKNOWN) {
- Material nickel = new Material("nickel", TextFormatting.YELLOW);
- nickel.addTrait(NickOfTime.nickOfTime, HEAD);
- nickel.addTrait(magnetic);
- nickel.addItem("ingotNickel", 1, Material.VALUE_Ingot);
- nickel.setCraftable(false).setCastable(true);
- new OreRegisterPromise("ingotNickel").thenAccept(nickel::setRepresentativeItem);
- PlusTiC.proxy.setRenderInfo(nickel, 0xFFF98E);
-
- nickel.setFluid(TinkerFluids.nickel);
-
- TinkerRegistry.addMaterialStats(nickel, new HeadMaterialStats(460, 6, 4.5f, OBSIDIAN),
- new HandleMaterialStats(1, -5), new ExtraMaterialStats(70), PlusTiC.justWhy,
- new FletchingMaterialStats(0.95f, 1.05f), new BatteryCellMaterialStats(75000));
-
- PlusTiC.materials.put("nickel", nickel);
- }
-
- if (TinkerRegistry.getMaterial("invar") == Material.UNKNOWN) {
- Utils.ItemMatGroup invarGroup = Utils.registerMatGroup("invar");
-
- Material invar = new Material("invar", 0xD6D6D6);
- invar.addTrait(DevilsStrength.devilsstrength);
- invar.addTrait(magnetic);
- invar.addItem("ingotInvar", 1, Material.VALUE_Ingot);
- invar.setCraftable(false).setCastable(true);
- invar.setRepresentativeItem(invarGroup.ingot);
- PlusTiC.proxy.setRenderInfo(invar, 0xD6D6D6);
-
- if (!FluidRegistry.isFluidRegistered("invar")) {
- usePlusTiCInvarFluid = true;
- FluidMolten invarFluid = Utils.fluidMetal("invar", 0xD6D6D6);
- invarFluid.setTemperature(1000);
- Utils.initFluidMetal(invarFluid);
- }
- invar.setFluid(FluidRegistry.getFluid("invar"));
-
- TinkerRegistry.addMaterialStats(invar,
- new HeadMaterialStats(600, 6, 5f, OBSIDIAN),
- new HandleMaterialStats(1.3f, 0),
- new ExtraMaterialStats(100),
- PlusTiC.justWhy,
- new FletchingMaterialStats(1, 1.15f));
-
- PlusTiC.materials.put("invar", invar);
- }
-
- if (TinkerRegistry.getMaterial("iridium") == Material.UNKNOWN) {
- Material iridium = new Material("iridium", TextFormatting.GRAY);
- iridium.addTrait(dense);
- iridium.addTrait(alien, HEAD);
- iridium.addItem("ingotIridium", 1, Material.VALUE_Ingot);
- iridium.setCraftable(false).setCastable(true);
- new OreRegisterPromise("ingotIridium").thenAccept(iridium::setRepresentativeItem);
- PlusTiC.proxy.setRenderInfo(iridium, 0xE5E5E5);
-
- if (!FluidRegistry.isFluidRegistered("iridium")) {
- FluidMolten iridiumFluid = Utils.fluidMetal("iridium", 0xE5E5E5);
- iridiumFluid.setTemperature(810);
- Utils.initFluidMetal(iridiumFluid);
- }
- iridium.setFluid(FluidRegistry.getFluid("iridium"));
-
- TinkerRegistry.addMaterialStats(iridium, new HeadMaterialStats(520, 6, 5.8f, DIAMOND));
- TinkerRegistry.addMaterialStats(iridium, new HandleMaterialStats(1.15f, -20));
- TinkerRegistry.addMaterialStats(iridium, new ExtraMaterialStats(60));
- TinkerRegistry.addMaterialStats(iridium, PlusTiC.justWhy);
-
- PlusTiC.materials.put("iridium", iridium);
- }
- }
- }
-
- @SubscribeEvent(priority = EventPriority.LOWEST)
- public static void itemRegEvent(RegistryEvent.Register
- event) {
- emeraldStage.complete(null);
- }
-
- public void init2() {
- Optional.ofNullable(PlusTiC.materials.get("alumite"))
- .map(Material::getFluid)
- .ifPresent(alumiteFluid -> {
- if (FluidRegistry.isFluidRegistered(TinkerFluids.aluminum)) {
- TinkerRegistry.registerAlloy(new FluidStack(alumiteFluid, 3), new FluidStack(TinkerFluids.aluminum, 5),
- new FluidStack(TinkerFluids.iron, 2), new FluidStack(TinkerFluids.obsidian, 2));
- }
- });
-
- Optional.ofNullable(PlusTiC.materials.get("invar"))
- .map(Material::getFluid)
- .ifPresent(invarFluid -> {
- if (usePlusTiCInvarFluid && FluidRegistry.isFluidRegistered(TinkerFluids.nickel)) {
- TinkerRegistry.registerAlloy(new FluidStack(invarFluid, 3),
- new FluidStack(TinkerFluids.iron, 2),
- new FluidStack(TinkerFluids.nickel, 1));
- }
- });
-
- if (PlusTiC.materials.containsKey("emerald")) {
- TinkerRegistry.registerTableCasting(EmeraldBoltCoreCastingRecipe.INSTANCE);
- }
- }
-
- @SubscribeEvent
- public static void onCastingRecipeRegister(TinkerRegisterEvent.TableCastingRegisterEvent event) {
- if (event.getRecipe() instanceof CastingRecipe
- && ((CastingRecipe)event.getRecipe()).getResult().getItem() instanceof IMaterialItem
- && ((CastingRecipe)event.getRecipe()).getFluid().getFluid().equals(TinkerFluids.emerald)) {
- FluidStack fs = ((CastingRecipe)event.getRecipe()).getFluid();
- // heuristic to make sure we don't apply this correction more than once
- if (fs.amount % Material.VALUE_Shard != 0) return;
- fs.amount = (fs.amount * Material.VALUE_Gem) / Material.VALUE_Ingot;
- }
- }
-
- @SubscribeEvent
- public static void onMeltingRecipeRegister(TinkerRegisterEvent.MeltingRegisterEvent event) {
- if (event.getRecipe().input.getInputs()
- .stream().anyMatch(stack -> stack.getItem() instanceof IMaterialItem)
- && event.getRecipe().output.getFluid().equals(TinkerFluids.emerald)) {
- FluidStack fs = event.getRecipe().output;
- if (fs.amount % Material.VALUE_Shard != 0) return;
- fs.amount = (fs.amount * Material.VALUE_Gem) / Material.VALUE_Ingot;
- }
- }
-}
diff --git a/src/main/java/landmaster/plustic/modules/ModuleBotania.java b/src/main/java/landmaster/plustic/modules/ModuleBotania.java
deleted file mode 100644
index 074f689f..00000000
--- a/src/main/java/landmaster/plustic/modules/ModuleBotania.java
+++ /dev/null
@@ -1,167 +0,0 @@
-package landmaster.plustic.modules;
-
-import static slimeknights.tconstruct.library.materials.MaterialTypes.*;
-import static slimeknights.tconstruct.library.utils.HarvestLevels.*;
-import static slimeknights.tconstruct.tools.TinkerTraits.*;
-
-import java.util.*;
-import java.util.concurrent.*;
-
-import com.google.common.collect.*;
-
-import it.unimi.dsi.fastutil.objects.*;
-import landmaster.plustic.*;
-import landmaster.plustic.api.ModInfo;
-import landmaster.plustic.config.*;
-import landmaster.plustic.fluids.*;
-import landmaster.plustic.traits.*;
-import landmaster.plustic.util.*;
-import net.minecraft.item.*;
-import net.minecraft.util.text.*;
-import net.minecraftforge.event.*;
-import net.minecraftforge.fluids.*;
-import net.minecraftforge.fml.common.Loader;
-import net.minecraftforge.fml.common.Mod;
-import net.minecraftforge.fml.common.eventhandler.*;
-import slimeknights.tconstruct.library.*;
-import slimeknights.tconstruct.library.materials.*;
-import slimeknights.tconstruct.shared.*;
-
-@Mod.EventBusSubscriber(modid = ModInfo.MODID)
-public class ModuleBotania implements IModule {
- private static final CompletableFuture> itemPromise = new CompletableFuture<>();
-
- public void init() {
- if (Config.botania && Loader.isModLoaded("botania")) {
- if (Config.forceOutNaturalPledgeMaterials || !Loader.isModLoaded("botanicaladdons")) {
- final Map botaniaMaterials = new Object2ObjectOpenHashMap<>();
-
- Material terrasteel = new Material("terrasteel", TextFormatting.GREEN);
- botaniaMaterials.put("terrasteel", terrasteel);
- FluidMolten terrasteelFluid = Utils.fluidMetal("terrasteel", 0x00FF00);
- terrasteelFluid.setTemperature(760);
- Utils.initFluidMetal(terrasteelFluid);
-
- Material elementium = new Material("elementium", TextFormatting.LIGHT_PURPLE);
- botaniaMaterials.put("elvenElementium", elementium);
- FluidMolten elementiumFluid = Utils.fluidMetal("elementium", 0xF66AFD);
- elementiumFluid.setTemperature(800);
- Utils.initFluidMetal(elementiumFluid);
-
- Material manasteel = new Material("manasteel", TextFormatting.BLUE);
- botaniaMaterials.put("manasteel", manasteel);
- FluidMolten manasteelFluid = Utils.fluidMetal("manasteel", 0x54E5FF);
- manasteelFluid.setTemperature(681);
- Utils.initFluidMetal(manasteelFluid);
-
- Material livingwood = new Material("livingwood_plustic", TextFormatting.DARK_GREEN);
- botaniaMaterials.put("livingwood", livingwood);
-
- Material mirion = new Material("mirion", TextFormatting.YELLOW);
- botaniaMaterials.put("mirion", mirion);
- FluidMolten mirionFluid = Utils.fluidMetal("mirion", 0xDDFF00);
- mirionFluid.setTemperature(777);
- Utils.initFluidMetal(mirionFluid);
-
- final CompletableFuture> integrationPromise = itemPromise.thenRun(() -> {
- terrasteel.addTrait(Mana.mana);
- terrasteel.addTrait(Terrafirma.terrafirma.get(0));
- terrasteel.addTrait(Mana.mana, HEAD);
- terrasteel.addTrait(Terrafirma.terrafirma.get(1), HEAD);
- terrasteel.addItem("ingotTerrasteel", 1, Material.VALUE_Ingot);
- terrasteel.setCraftable(false).setCastable(true);
- Utils.setDispItem(terrasteel, "ingotTerrasteel");
- PlusTiC.proxy.setRenderInfo(terrasteel, 0x00FF00);
-
- terrasteel.setFluid(terrasteelFluid);
-
- TinkerRegistry.addMaterialStats(terrasteel, new HeadMaterialStats(1562, 9, 6.5f, COBALT));
- TinkerRegistry.addMaterialStats(terrasteel, new HandleMaterialStats(1.4f, 10));
- TinkerRegistry.addMaterialStats(terrasteel, new ExtraMaterialStats(10));
- TinkerRegistry.addMaterialStats(terrasteel, new BowMaterialStats(0.55f, 2f, 11f));
-
-
- elementium.addTrait(Mana.mana);
- elementium.addTrait(Mana.mana, HEAD);
- elementium.addTrait(Elemental.elemental, HEAD);
- elementium.addItem("ingotElvenElementium", 1, Material.VALUE_Ingot);
- elementium.setCraftable(false).setCastable(true);
- Utils.setDispItem(elementium, "ingotElvenElementium");
- PlusTiC.proxy.setRenderInfo(elementium, 0xF66AFD);
-
- elementium.setFluid(elementiumFluid);
-
- TinkerRegistry.addMaterialStats(elementium, new HeadMaterialStats(540, 7.00f, 6.00f, OBSIDIAN),
- new HandleMaterialStats(1.25f, 150), new ExtraMaterialStats(60));
- TinkerRegistry.addMaterialStats(elementium, new BowMaterialStats(0.8f, 1.5f, 7.5f));
-
-
- manasteel.addTrait(Mana.mana);
- manasteel.addItem("ingotManasteel", 1, Material.VALUE_Ingot);
- manasteel.setCraftable(false).setCastable(true);
- Utils.setDispItem(manasteel, "ingotManasteel");
- PlusTiC.proxy.setRenderInfo(manasteel, 0x54E5FF);
-
- manasteel.setFluid(manasteelFluid);
-
- TinkerRegistry.addMaterialStats(manasteel, new HeadMaterialStats(540, 7.00f, 6.00f, OBSIDIAN),
- new HandleMaterialStats(1.25f, 150), new ExtraMaterialStats(60));
- TinkerRegistry.addMaterialStats(manasteel, new BowMaterialStats(1, 1.1f, 1));
-
-
- livingwood.addTrait(Botanical.botanical.get(1), HEAD);
- livingwood.addTrait(ecological, HEAD);
- livingwood.addTrait(Botanical.botanical.get(0));
- livingwood.addTrait(ecological);
- livingwood.addItem("livingwood", 1, Material.VALUE_Ingot);
- livingwood.setCraftable(true);
- Utils.setDispItem(livingwood, "livingwood");
- PlusTiC.proxy.setRenderInfo(livingwood, 0x560018);
- TinkerRegistry.addMaterialStats(livingwood, new HeadMaterialStats(50, 5.1f, 2.8f, IRON),
- new HandleMaterialStats(1.15f, 20), new ExtraMaterialStats(20),
- new BowMaterialStats(1.1f, 1.1f, 1.8f), new ArrowShaftMaterialStats(1f, 6));
-
-
- // MIRION ALLOY
- Utils.ItemMatGroup mirionGroup = Utils.registerMatGroup("mirion");
-
- mirion.addTrait(Mirabile.mirabile, HEAD);
- mirion.addTrait(Mana.mana, HEAD);
- mirion.addTrait(Mana.mana);
- mirion.addItem("ingotMirion", 1, Material.VALUE_Ingot);
- mirion.setCraftable(false).setCastable(true);
- mirion.setRepresentativeItem(mirionGroup.ingot);
- PlusTiC.proxy.setRenderInfo(mirion, 0xDDFF00);
-
- mirion.setFluid(mirionFluid);
- TinkerRegistry.registerAlloy(new FluidStack(mirionFluid, 4 * 18), new FluidStack(terrasteelFluid, 18),
- new FluidStack(manasteelFluid, 18), new FluidStack(elementiumFluid, 18),
- new FluidStack(TinkerFluids.cobalt, 18), new FluidStack(TinkerFluids.glass, 125));
-
- TinkerRegistry.addMaterialStats(mirion, new HeadMaterialStats(1919, 9, 9, 5));
- TinkerRegistry.addMaterialStats(mirion, new HandleMaterialStats(1.1f, 40));
- TinkerRegistry.addMaterialStats(mirion, new ExtraMaterialStats(90));
- TinkerRegistry.addMaterialStats(mirion, new BowMaterialStats(1.35f, 1.5f, 5.5f));
- });
-
- PlusTiC.materials.putAll(botaniaMaterials);
- PlusTiC.materialIntegrationStages.putAll(Maps.transformValues(botaniaMaterials, mat -> integrationPromise));
- }
- }
- }
-
- @SubscribeEvent
- public static void onItemReg(RegistryEvent.Register
- event) {
- itemPromise.complete(null);
- }
-
- public void init2() {
- if (Config.botania && Config.forceOutNaturalPledgeMaterials) {
- Utils.forceOutModsMaterial("terrasteel", "botanicaladdons");
- Utils.forceOutModsMaterial("elementium", "botanicaladdons");
- Utils.forceOutModsMaterial("manasteel", "botanicaladdons");
- Utils.forceOutModsMaterial("livingwood", "botanicaladdons");
- }
- }
-
-}
diff --git a/src/main/java/landmaster/plustic/modules/ModuleConArm.java b/src/main/java/landmaster/plustic/modules/ModuleConArm.java
deleted file mode 100644
index 75a8e9ef..00000000
--- a/src/main/java/landmaster/plustic/modules/ModuleConArm.java
+++ /dev/null
@@ -1,98 +0,0 @@
-package landmaster.plustic.modules;
-
-import java.util.*;
-
-import c4.conarm.lib.materials.*;
-import c4.conarm.lib.utils.*;
-import landmaster.plustic.*;
-import landmaster.plustic.config.*;
-import landmaster.plustic.modifiers.armor.*;
-import landmaster.plustic.traits.*;
-import landmaster.plustic.traits.armor.*;
-import net.minecraftforge.fml.common.Loader;
-import slimeknights.tconstruct.library.*;
-
-import static c4.conarm.common.armor.traits.ArmorTraits.*;
-
-public class ModuleConArm implements IModule {
- @Override
- public void init() {
- if (Config.constructsArmory && Loader.isModLoaded("conarm")) {
- Optional.ofNullable(PlusTiC.materials.get("emerald")).ifPresent(mat -> {
- ArmorMaterials.addArmorTrait(mat, GoodFridayAgreement.goodfridayagreement);
- ArmorMaterials.addArmorTrait(mat, Terrafirma.terrafirma.get(0));
- TinkerRegistry.addMaterialStats(mat,
- new CoreMaterialStats(18, 20),
- new PlatesMaterialStats(1, 9, 2.2f),
- new TrimMaterialStats(13.5f));
- });
- Optional.ofNullable(PlusTiC.materials.get("alumite")).ifPresent(mat -> {
- ArmorMaterials.addArmorTrait(mat, CamDaiBay.camdaibay, ArmorMaterialType.CORE);
- ArmorMaterials.addArmorTrait(mat, DunansTransport.dunanstransport);
- TinkerRegistry.addMaterialStats(mat,
- new CoreMaterialStats(14, 20),
- new PlatesMaterialStats(1, 7, 2.2f),
- new TrimMaterialStats(10f));
- });
- Optional.ofNullable(PlusTiC.materials.get("nickel")).ifPresent(mat -> {
- ArmorMaterials.addArmorTrait(mat, NickOfTime.nickOfTime, magnetic);
- TinkerRegistry.addMaterialStats(mat,
- new CoreMaterialStats(13, 16.5f),
- new PlatesMaterialStats(1, -0.1f, 1),
- new TrimMaterialStats(4.25f));
- });
- Optional.ofNullable(PlusTiC.materials.get("invar")).ifPresent(mat -> {
- ArmorMaterials.addArmorTrait(mat, Invariant.invariant);
- ArmorMaterials.addArmorTrait(mat, magnetic);
- TinkerRegistry.addMaterialStats(mat,
- new CoreMaterialStats(16.7f, 18f),
- new PlatesMaterialStats(1.2f, 0, 5),
- new TrimMaterialStats(7f));
- });
- Optional.ofNullable(PlusTiC.materials.get("iridium")).ifPresent(mat -> {
- ArmorMaterials.addArmorTrait(mat, alien, dense);
- TinkerRegistry.addMaterialStats(mat,
- new CoreMaterialStats(14.6f, 17.2f),
- new PlatesMaterialStats(1.15f, -0.5f, 2.4f),
- new TrimMaterialStats(5f));
- });
-
- Optional.ofNullable(PlusTiC.materials.get("sapphire")).ifPresent(mat -> {
- ArmorMaterials.addArmorTrait(mat, aquaspeed);
- TinkerRegistry.addMaterialStats(mat,
- new CoreMaterialStats(14, 20),
- new PlatesMaterialStats(1, 7, 2.2f),
- new TrimMaterialStats(10f)); // TODO refine stats
- });
- Optional.ofNullable(PlusTiC.materials.get("ruby")).ifPresent(mat -> {
- ArmorMaterials.addArmorTrait(mat, HaoransCult.haoranscult);
- TinkerRegistry.addMaterialStats(mat,
- new CoreMaterialStats(14, 20),
- new PlatesMaterialStats(1, 7, 2.2f),
- new TrimMaterialStats(10f)); // TODO refine stats
- });
- Optional.ofNullable(PlusTiC.materials.get("peridot")).ifPresent(mat -> {
- ArmorMaterials.addArmorTrait(mat, TomAndJerry.tomAndJerry);
- TinkerRegistry.addMaterialStats(mat,
- new CoreMaterialStats(14, 20),
- new PlatesMaterialStats(1, 7, 2.2f),
- new TrimMaterialStats(10f)); // TODO refine stats
- });
- }
- }
-
- @Override
- public void init2() {
- if (Config.jetpackConarmModifier && Loader.isModLoaded("simplyjetpacks") && Loader.isModLoaded("conarm")) {
- SJ.init();
- }
- }
-
- private static class SJ {
- public static void init() {
- JetpackPancakeHippos.jetpackpancakehippos.values().forEach(mod -> {
- RecipeMatchHolder.addItem(mod, mod.jetpack.getStackJetpack(), 1, 1);
- });
- }
- }
-}
diff --git a/src/main/java/landmaster/plustic/modules/ModuleDraconicEvolution.java b/src/main/java/landmaster/plustic/modules/ModuleDraconicEvolution.java
deleted file mode 100644
index 5fcd03f4..00000000
--- a/src/main/java/landmaster/plustic/modules/ModuleDraconicEvolution.java
+++ /dev/null
@@ -1,94 +0,0 @@
-package landmaster.plustic.modules;
-
-import static slimeknights.tconstruct.library.materials.MaterialTypes.*;
-
-import java.util.concurrent.*;
-
-import landmaster.plustic.*;
-import landmaster.plustic.api.*;
-import landmaster.plustic.config.*;
-import landmaster.plustic.tools.stats.*;
-import landmaster.plustic.traits.*;
-import net.minecraft.item.*;
-import net.minecraft.util.text.*;
-import net.minecraftforge.event.*;
-import net.minecraftforge.fml.common.*;
-import net.minecraftforge.fml.common.eventhandler.*;
-import net.minecraftforge.fml.common.registry.*;
-import slimeknights.tconstruct.library.*;
-import slimeknights.tconstruct.library.materials.*;
-
-@Mod.EventBusSubscriber(modid = ModInfo.MODID)
-public class ModuleDraconicEvolution implements IModule {
- @GameRegistry.ObjectHolder(value = "draconicevolution:wyvern_core")
- public static final Item wyvern_core = null;
- @GameRegistry.ObjectHolder(value = "draconicevolution:awakened_core")
- public static final Item awakened_core = null;
- @GameRegistry.ObjectHolder(value = "draconicevolution:chaotic_core")
- public static final Item chaotic_core = null;
-
- private static final CompletableFuture> regFut = new CompletableFuture<>();
-
- public void init() {
- if (Config.draconicEvolution && Loader.isModLoaded("draconicevolution")) {
- Material wyvern = new Material("wyvern_plustic", TextFormatting.DARK_PURPLE),
- awakened = new Material("awakened_plustic", TextFormatting.GOLD),
- chaotic = new Material("chaotic_plustic", TextFormatting.GRAY);
-
- PlusTiC.materials.put("wyvern_core", wyvern);
- PlusTiC.materials.put("awakened_core", awakened);
- PlusTiC.materials.put("chaotic_core", chaotic);
-
- final CompletableFuture> draconicFut = regFut.thenRun(() -> {
- wyvern.addTrait(BrownMagic.brownmagic, HEAD);
- wyvern.addTrait(BlindBandit.blindbandit, HEAD);
- wyvern.addTrait(Portly.portly);
- wyvern.addItem(wyvern_core, 1, Material.VALUE_Ingot);
- wyvern.setCraftable(true);
- wyvern.setRepresentativeItem(wyvern_core);
- PlusTiC.proxy.setRenderInfo(wyvern, 0x7F00FF);
- TinkerRegistry.addMaterialStats(wyvern, new HeadMaterialStats(2000, 8, 15, 8));
- TinkerRegistry.addMaterialStats(wyvern, new HandleMaterialStats(1.6f, 130));
- TinkerRegistry.addMaterialStats(wyvern, new ExtraMaterialStats(240));
- TinkerRegistry.addMaterialStats(wyvern, new BowMaterialStats(1.6f, 2, 11));
-
- awakened.addTrait(RudeAwakening.rudeawakening, HEAD);
- awakened.addTrait(BrownMagic.brownmagic, HEAD);
- awakened.addTrait(BlindBandit.blindbandit);
- awakened.addTrait(Apocalypse.apocalypse);
- awakened.addTrait(Global.global);
- awakened.addItem(awakened_core, 1, Material.VALUE_Ingot);
- awakened.setCraftable(true);
- awakened.setRepresentativeItem(awakened_core);
- PlusTiC.proxy.setRenderInfo(awakened, 0xFFB200);
- TinkerRegistry.addMaterialStats(awakened, new HeadMaterialStats(5000, 9, 35, 10));
- TinkerRegistry.addMaterialStats(awakened, new HandleMaterialStats(1.8f, 500));
- TinkerRegistry.addMaterialStats(awakened, new ExtraMaterialStats(500));
- TinkerRegistry.addMaterialStats(awakened, new BowMaterialStats(1.9f, 2.8f, 20));
-
- chaotic.addTrait(HailHydra.hailhydra, HEAD);
- chaotic.addTrait(Vindictive.vindictive, HEAD);
- chaotic.addTrait(DarkTraveler.darktraveler);
- chaotic.addItem(chaotic_core, 1, Material.VALUE_Ingot);
- chaotic.setCraftable(true);
- chaotic.setRepresentativeItem(chaotic_core);
- PlusTiC.proxy.setRenderInfo(chaotic, 0x999999);
- TinkerRegistry.addMaterialStats(chaotic, new HeadMaterialStats(10000, 12, 48, 12));
- TinkerRegistry.addMaterialStats(chaotic, new HandleMaterialStats(2.3f, 700));
- TinkerRegistry.addMaterialStats(chaotic, new ExtraMaterialStats(800));
- TinkerRegistry.addMaterialStats(chaotic, new BowMaterialStats(2.3f, 4.0f, 24));
- TinkerRegistry.addMaterialStats(chaotic, new LaserMediumMaterialStats(45, 256));
- });
-
- PlusTiC.materialIntegrationStages.put("wyvern_core", draconicFut);
- PlusTiC.materialIntegrationStages.put("awakened_core", draconicFut);
- PlusTiC.materialIntegrationStages.put("chaotic_core", draconicFut);
- }
- }
-
- @SubscribeEvent(priority = EventPriority.LOWEST)
- public static void onItemReg(RegistryEvent.Register
- event) {
- regFut.complete(null);
- }
-
-}
diff --git a/src/main/java/landmaster/plustic/modules/ModuleEnvironTech.java b/src/main/java/landmaster/plustic/modules/ModuleEnvironTech.java
deleted file mode 100644
index 1cdf115d..00000000
--- a/src/main/java/landmaster/plustic/modules/ModuleEnvironTech.java
+++ /dev/null
@@ -1,118 +0,0 @@
-package landmaster.plustic.modules;
-
-import static slimeknights.tconstruct.library.materials.MaterialTypes.*;
-import static slimeknights.tconstruct.library.utils.HarvestLevels.*;
-import static slimeknights.tconstruct.tools.TinkerTraits.*;
-
-import landmaster.plustic.*;
-import landmaster.plustic.config.*;
-import landmaster.plustic.traits.*;
-import net.minecraft.item.*;
-import net.minecraftforge.fml.common.Loader;
-import net.minecraftforge.fml.common.registry.*;
-import slimeknights.tconstruct.library.*;
-import slimeknights.tconstruct.library.materials.*;
-
-public class ModuleEnvironTech implements IModule {
- @GameRegistry.ObjectHolder("environmentaltech:mica")
- public static final Item micaItem = null;
-
- public void init() {
- if (Config.environTech && Loader.isModLoaded("environmentaltech")) {
- Material mica = new Material("mica", 0xBBBBBB);
- mica.addTrait(Slashing.slashing);
- mica.setCraftable(true);
- PlusTiC.proxy.setRenderInfo(mica, 0xBBBBBB);
- TinkerRegistry.addMaterialStats(mica, new HeadMaterialStats(680, 5.5f, 6, OBSIDIAN),
- new HandleMaterialStats(0.9f, -5),
- new ExtraMaterialStats(90),
- PlusTiC.justWhy);
- PlusTiC.materials.put("mica", mica);
-
- Material litherite = new Material("litherite", 0x078E51);
- litherite.addTrait(stonebound, HEAD);
- litherite.addTrait(crude2);
- litherite.addTrait(petramor);
- litherite.addItem("crystalLitherite", 1, Material.VALUE_Ingot);
- litherite.setCraftable(true);
- PlusTiC.proxy.setRenderInfo(mica, 0x078E51);
- TinkerRegistry.addMaterialStats(litherite, new HeadMaterialStats(700, 7.7f, 6, OBSIDIAN),
- new HandleMaterialStats(0.9f, -5),
- new ExtraMaterialStats(111),
- PlusTiC.justWhy);
- PlusTiC.materials.put("litherite", litherite);
- PlusTiC.materialOreDicts.put("litherite", "crystalLitherite");
-
- Material erodium = new Material("erodium", 0xBB56FF);
- erodium.addTrait(Vindictive.vindictive);
- erodium.addTrait(NaturesWrath.natureswrath);
- erodium.addItem("crystalErodium", 1, Material.VALUE_Ingot);
- erodium.setCraftable(true);
- PlusTiC.proxy.setRenderInfo(erodium, 0xBB56FF);
- TinkerRegistry.addMaterialStats(erodium, new HeadMaterialStats(1000, 9f, 7.5f, OBSIDIAN),
- new HandleMaterialStats(0.9f, -5),
- new ExtraMaterialStats(140),
- PlusTiC.justWhy);
- PlusTiC.materials.put("erodium", erodium);
- PlusTiC.materialOreDicts.put("erodium", "crystalErodium");
-
- Material kyronite = new Material("kyronite", 0x77007f);
- kyronite.addTrait(FruitSalad.fruitsalad, HEAD);
- kyronite.addTrait(NaturesBlessing.naturesblessing);
- kyronite.addItem("crystalKyronite", 1, Material.VALUE_Ingot);
- kyronite.setCraftable(true);
- PlusTiC.proxy.setRenderInfo(kyronite, 0x77007f);
- TinkerRegistry.addMaterialStats(kyronite, new HeadMaterialStats(1300, 10.3f, 9, COBALT),
- new HandleMaterialStats(0.9f, -5),
- new ExtraMaterialStats(169),
- new BowMaterialStats(0.6f, 1.6f, 5));
- PlusTiC.materials.put("kyronite", kyronite);
- PlusTiC.materialOreDicts.put("kyronite", "crystalKyronite");
-
- Material pladium = new Material("pladium", 0x070070);
- pladium.addTrait(StopBeingSelfish.stopbeingselfish);
- pladium.addItem("crystalPladium", 1, Material.VALUE_Ingot);
- pladium.setCraftable(true);
- PlusTiC.proxy.setRenderInfo(pladium, 0x070070);
- TinkerRegistry.addMaterialStats(pladium, new HeadMaterialStats(1600, 11.6f, 10.5f, COBALT),
- new HandleMaterialStats(0.9f, -5),
- new ExtraMaterialStats(198),
- new BowMaterialStats(0.49f, 2.2f, 6.5f));
- PlusTiC.materials.put("pladium", pladium);
- PlusTiC.materialOreDicts.put("pladium", "crystalPladium");
-
- Material ionite = new Material("ionite", 0x6df5ff);
- ionite.addTrait(ChadThunder.chadthunder, HEAD);
- ionite.addTrait(Illuminati.illuminati);
- ionite.addItem("crystalIonite", 1, Material.VALUE_Ingot);
- ionite.setCraftable(true);
- PlusTiC.proxy.setRenderInfo(ionite, 0x6df5ff);
- TinkerRegistry.addMaterialStats(ionite, new HeadMaterialStats(1900, 12.9f, 12, 5),
- new HandleMaterialStats(0.9f, -5),
- new ExtraMaterialStats(227),
- new BowMaterialStats(0.38f, 3f, 8));
- PlusTiC.materials.put("ionite", ionite);
- PlusTiC.materialOreDicts.put("ionite", "crystalIonite");
-
- Material aethium = new Material("aethium", 0x000000);
- aethium.addTrait(MusicOfTheSpheres.musicofthespheres);
- aethium.addItem("crystalAethium", 1, Material.VALUE_Ingot);
- aethium.setCraftable(true);
- PlusTiC.proxy.setRenderInfo(aethium, 0x000000);
- TinkerRegistry.addMaterialStats(aethium, new HeadMaterialStats(2200, 14.2f, 13.5f, 6),
- new HandleMaterialStats(0.9f, -5),
- new ExtraMaterialStats(227),
- new BowMaterialStats(0.38f, 3f, 12));
- PlusTiC.materials.put("aethium", aethium);
- PlusTiC.materialOreDicts.put("aethium", "crystalAethium");
- }
- }
-
- public void init2() {
- final Material mica = PlusTiC.materials.get("mica");
- if (mica != null) {
- mica.addItem(micaItem, 1, Material.VALUE_Ingot);
- mica.setRepresentativeItem(micaItem);
- }
- }
-}
diff --git a/src/main/java/landmaster/plustic/modules/ModuleGalacticraft.java b/src/main/java/landmaster/plustic/modules/ModuleGalacticraft.java
deleted file mode 100644
index c2c2ffeb..00000000
--- a/src/main/java/landmaster/plustic/modules/ModuleGalacticraft.java
+++ /dev/null
@@ -1,109 +0,0 @@
-package landmaster.plustic.modules;
-
-import static slimeknights.tconstruct.library.materials.MaterialTypes.HEAD;
-import static slimeknights.tconstruct.library.utils.HarvestLevels.*;
-import static slimeknights.tconstruct.tools.TinkerTraits.*;
-
-import landmaster.plustic.*;
-import landmaster.plustic.api.*;
-import landmaster.plustic.config.*;
-import landmaster.plustic.fluids.*;
-import landmaster.plustic.traits.*;
-import landmaster.plustic.util.*;
-import net.minecraft.item.*;
-import net.minecraft.util.text.TextFormatting;
-import net.minecraftforge.fluids.FluidRegistry;
-import net.minecraftforge.fml.common.*;
-import net.minecraftforge.fml.common.registry.*;
-import net.minecraftforge.fml.common.registry.GameRegistry.ObjectHolder;
-import net.minecraftforge.oredict.*;
-import slimeknights.tconstruct.library.*;
-import slimeknights.tconstruct.library.materials.*;
-
-@Mod.EventBusSubscriber(modid = ModInfo.MODID)
-public class ModuleGalacticraft implements IModule {
- @GameRegistry.ObjectHolder(value = "galacticraftplanets:item_basic_mars")
- public static final Item item_basic_mars = null;
-
- @ObjectHolder(value="galacticraftplanets:item_basic_asteroids")
- public static final Item item_basic_asteroids = null;
-
- private static Material titanium;
- private static Material desh;
-
- public void init() {
- if (Config.galacticraft && Loader.isModLoaded("galacticraftcore")) {
- if (Loader.isModLoaded("galacticraftplanets")) {
-
- desh = new Material("desh", 0x161616);
- titanium = new Material("titanium", TextFormatting.WHITE);
-
- desh.addTrait(alien);
- desh.addTrait(enderference);
- desh.addTrait(BrownMagic.brownmagic);
-
- titanium.addTrait(Light.light);
- titanium.addTrait(Anticorrosion.anticorrosion, HEAD);
-
- desh.setCraftable(false).setCastable(true);
- titanium.setCraftable(false).setCastable(true);
-
- desh.addItem("ingotDesh", 1, Material.VALUE_Ingot);
- titanium.addItem("ingotTitanium", 1, Material.VALUE_Ingot);
-
- PlusTiC.proxy.setRenderInfo(desh, 0x161616);
- PlusTiC.proxy.setRenderInfo(titanium, 0xDCE1EA);
-
- FluidMolten deshFluid = Utils.fluidMetal("desh", 0x161616);
- FluidMolten titaniumFluid = Utils.fluidMetal("titanium", 0xDCE1EA);
-
- deshFluid.setTemperature(821); // {821,823,827,829} are quadruplet primes
- titaniumFluid.setTemperature(790);
-
- Utils.initFluidMetal(deshFluid);
- Utils.initFluidMetal(titaniumFluid);
-
- desh.setFluid(deshFluid);
- titanium.setFluid(titaniumFluid);
-
-
- TinkerRegistry.addMaterialStats(desh,
- new HeadMaterialStats(1729/* 1729 is a taxicab number */, (float)(Math.E*Math.PI), 8, COBALT),
- new HandleMaterialStats((float)(Math.sqrt(5)+1)/2/* the golden ratio */, 0),
- new ExtraMaterialStats(257),
- new BowMaterialStats(1/(float)Math.E, (float)Math.E, 12));
-
- TinkerRegistry.addMaterialStats(titanium,
- new HeadMaterialStats(560, 6, 6, OBSIDIAN),
- new HandleMaterialStats(1.4f, 0),
- new ExtraMaterialStats(40),
- new BowMaterialStats(1.15f, 1.3f, 6.6f),
- new FletchingMaterialStats(1.0f, 1.3f));
-
- PlusTiC.materials.put("desh", desh);
- PlusTiC.materials.put("titanium", titanium);
- }
- }
- }
-
- public void init2() {
- if (Config.galacticraft && Loader.isModLoaded("galacticraftcore")) {
- if (Loader.isModLoaded("galacticraftplanets")) {
- TinkerRegistry.registerMelting(new ItemStack(item_basic_mars), FluidRegistry.getFluid("desh"), Material.VALUE_Ingot);
- OreDictionary.registerOre("ingotDesh", new ItemStack(item_basic_mars, 1, 2)); // see init3
- TinkerRegistry.registerMelting(new ItemStack(item_basic_asteroids), FluidRegistry.getFluid("titanium"), Material.VALUE_Ingot);
- OreDictionary.registerOre("ingotTitanuim", new ItemStack(item_basic_asteroids, 1, 0)); // see init3
- }
- }
- }
-
- public void init3() {
- if (Config.galacticraft && Loader.isModLoaded("galacticraftcore")) {
- if (Loader.isModLoaded("galacticraftplanets")) {
- // Seriously? Registering oredicts *this* late? -_-
- Utils.setDispItem(desh, "ingotDesh");
- Utils.setDispItem(titanium,"ingotTitanium");
- }
- }
- }
-}
diff --git a/src/main/java/landmaster/plustic/modules/ModuleGems.java b/src/main/java/landmaster/plustic/modules/ModuleGems.java
deleted file mode 100644
index ba4441c8..00000000
--- a/src/main/java/landmaster/plustic/modules/ModuleGems.java
+++ /dev/null
@@ -1,191 +0,0 @@
-package landmaster.plustic.modules;
-
-import static slimeknights.tconstruct.library.materials.MaterialTypes.*;
-import static slimeknights.tconstruct.library.utils.HarvestLevels.*;
-import static slimeknights.tconstruct.tools.TinkerTraits.*;
-
-import landmaster.plustic.*;
-import landmaster.plustic.api.*;
-import landmaster.plustic.config.*;
-import landmaster.plustic.tools.stats.*;
-import landmaster.plustic.traits.*;
-import landmaster.plustic.util.*;
-import net.minecraft.client.resources.*;
-import net.minecraft.item.*;
-import net.minecraft.nbt.*;
-import net.minecraft.util.*;
-import net.minecraft.util.text.*;
-import net.minecraftforge.event.entity.player.*;
-import net.minecraftforge.fml.common.*;
-import net.minecraftforge.fml.common.eventhandler.*;
-import net.minecraftforge.fml.relauncher.*;
-import slimeknights.tconstruct.library.*;
-import slimeknights.tconstruct.library.materials.*;
-import slimeknights.tconstruct.library.utils.*;
-
-@Mod.EventBusSubscriber(modid = ModInfo.MODID, value = Side.CLIENT)
-public class ModuleGems implements IModule {
-
- public void init() {
- final boolean isBoPLoaded = Loader.isModLoaded("BiomesOPlenty") || Loader.isModLoaded("biomesoplenty");
-
- // Register AoA3 sapphire before BoP sapphire
- if (Config.aoa && Loader.isModLoaded("aoa3")) {
- Material aoaSapphire = new Material("sapphire_aoa", TextFormatting.BLUE);
- aoaSapphire.addTrait(aquadynamic);
- aoaSapphire.setCraftable(true);
- PlusTiC.proxy.setRenderInfo(aoaSapphire, 0x0000ab);
- TinkerRegistry.addMaterialStats(aoaSapphire, new HeadMaterialStats(1400, 8, 6.4f, COBALT));
- TinkerRegistry.addMaterialStats(aoaSapphire, new HandleMaterialStats(1.25f, 100));
- TinkerRegistry.addMaterialStats(aoaSapphire, new ExtraMaterialStats(120));
- TinkerRegistry.addMaterialStats(aoaSapphire, new BowMaterialStats(1.3f, 1.5f, 4));
- PlusTiC.materials.put("aoa_sapphire", aoaSapphire);
- }
-
- if ((Config.aoa && Loader.isModLoaded("aoa3"))
- || (Config.erebus && Loader.isModLoaded("erebus"))) {
- Material jade = new Material("jade", 0x00e682);
- jade.addTrait(Jaded.jaded);
- jade.addItem("gemJade", 1, Material.VALUE_Ingot);
- jade.setCraftable(true);
- new OreRegisterPromise("gemJade").thenAccept(jade::setRepresentativeItem);
- PlusTiC.proxy.setRenderInfo(jade, 0x00e682);
- TinkerRegistry.addMaterialStats(jade,
- new HeadMaterialStats(1600, 8, 5, COBALT),
- new HandleMaterialStats(1.35f, 0),
- new ExtraMaterialStats(50),
- new BowMaterialStats(1.5f, 1.3f, 4),
- new LaserMediumMaterialStats(7, 60));
- PlusTiC.materials.put("jade", jade);
- }
-
- if ((Config.bop && isBoPLoaded)
- || (Config.projectRed && Loader.isModLoaded("projectred-core"))) {
- Material sapphire = new Material("sapphire", TextFormatting.BLUE);
- sapphire.addTrait(aquadynamic);
- sapphire.addItem("gemSapphire", 1, Material.VALUE_Ingot);
- sapphire.setCraftable(true);
- new OreRegisterPromise("gemSapphire", "aoa3").thenAccept(sapphire::setRepresentativeItem);
- PlusTiC.proxy.setRenderInfo(sapphire, 0x0000FF);
- TinkerRegistry.addMaterialStats(sapphire, new HeadMaterialStats(700, 5, 6.4f, OBSIDIAN));
- TinkerRegistry.addMaterialStats(sapphire, new HandleMaterialStats(1, 100));
- TinkerRegistry.addMaterialStats(sapphire, new ExtraMaterialStats(120));
- TinkerRegistry.addMaterialStats(sapphire, new BowMaterialStats(1, 1.5f, 4));
- PlusTiC.materials.put("sapphire", sapphire);
-
- Material ruby = new Material("ruby", TextFormatting.RED);
- ruby.addTrait(BloodyMary.bloodymary);
- ruby.addTrait(sharp, HEAD);
- ruby.addItem("gemRuby", 1, Material.VALUE_Ingot);
- ruby.setCraftable(true);
- new OreRegisterPromise("gemRuby").thenAccept(ruby::setRepresentativeItem);
- PlusTiC.proxy.setRenderInfo(ruby, 0xFF0000);
- TinkerRegistry.addMaterialStats(ruby, new HeadMaterialStats(660, 4.6f, 6.4f, OBSIDIAN));
- TinkerRegistry.addMaterialStats(ruby, new HandleMaterialStats(1.2f, 0));
- TinkerRegistry.addMaterialStats(ruby, new ExtraMaterialStats(20));
- TinkerRegistry.addMaterialStats(ruby, new BowMaterialStats(1.5f, 1.4f, 4));
- PlusTiC.materials.put("ruby", ruby);
-
- Material peridot = new Material("peridot", TextFormatting.GREEN);
- peridot.addTrait(NaturesBlessing.naturesblessing);
- peridot.addItem("gemPeridot", 1, Material.VALUE_Ingot);
- peridot.setCraftable(true);
- new OreRegisterPromise("gemPeridot").thenAccept(peridot::setRepresentativeItem);
- PlusTiC.proxy.setRenderInfo(peridot, 0xBEFA5C);
- TinkerRegistry.addMaterialStats(peridot, new HeadMaterialStats(640, 4.0f, 6.1f, OBSIDIAN));
- TinkerRegistry.addMaterialStats(peridot, new HandleMaterialStats(1.3f, -30));
- TinkerRegistry.addMaterialStats(peridot, new ExtraMaterialStats(20));
- TinkerRegistry.addMaterialStats(peridot, new BowMaterialStats(1.4f, 1.4f, 4));
- PlusTiC.materials.put("peridot", peridot);
- }
- if (Config.bop && isBoPLoaded) {
- Material malachite = new Material("malachite_gem", TextFormatting.DARK_GREEN);
- malachite.addTrait(NaturesWrath.natureswrath);
- malachite.addItem("gemMalachite", 1, Material.VALUE_Ingot);
- malachite.setCraftable(true);
- Utils.setDispItem(malachite, "biomesoplenty", "gem", 5);
- PlusTiC.proxy.setRenderInfo(malachite, 0x007523);
- TinkerRegistry.addMaterialStats(malachite, new HeadMaterialStats(640, 3.0f, 6.1f, OBSIDIAN));
- TinkerRegistry.addMaterialStats(malachite, new HandleMaterialStats(1.3f, -30));
- TinkerRegistry.addMaterialStats(malachite, new ExtraMaterialStats(20));
- TinkerRegistry.addMaterialStats(malachite, new BowMaterialStats(1.4f, 1.4f, 4));
- PlusTiC.materials.put("malachite", malachite);
-
- Material amber = new Material("amber", TextFormatting.GOLD);
- amber.addTrait(shocking);
- amber.addTrait(Thundering.thundering, PROJECTILE);
- amber.addTrait(Thundering.thundering, SHAFT);
- amber.addItem("gemAmber", 1, Material.VALUE_Ingot);
- amber.setCraftable(true);
- Utils.setDispItem(amber, "biomesoplenty", "gem", 7);
- PlusTiC.proxy.setRenderInfo(amber, 0xFFD000);
- TinkerRegistry.addMaterialStats(amber, new HeadMaterialStats(730, 4.6f, 5.7f, OBSIDIAN));
- TinkerRegistry.addMaterialStats(amber, new HandleMaterialStats(1, 30));
- TinkerRegistry.addMaterialStats(amber, new ExtraMaterialStats(100));
- TinkerRegistry.addMaterialStats(amber, PlusTiC.justWhy);
- TinkerRegistry.addMaterialStats(amber, new ArrowShaftMaterialStats(1, 5));
- PlusTiC.materials.put("amber", amber);
-
- Material topaz = new Material("topaz", TextFormatting.GOLD);
- topaz.addTrait(NaturesPower.naturespower);
- topaz.addItem("gemTopaz", 1, Material.VALUE_Ingot);
- topaz.setCraftable(true);
- Utils.setDispItem(topaz, "biomesoplenty", "gem", 3);
- PlusTiC.proxy.setRenderInfo(topaz, 0xFFFF00);
- TinkerRegistry.addMaterialStats(topaz, new HeadMaterialStats(690, 6, 6, OBSIDIAN));
- TinkerRegistry.addMaterialStats(topaz, new HandleMaterialStats(0.8f, 70));
- TinkerRegistry.addMaterialStats(topaz, new ExtraMaterialStats(65));
- TinkerRegistry.addMaterialStats(topaz, new BowMaterialStats(0.4f, 1.4f, 7));
- PlusTiC.materials.put("topaz", topaz);
-
- Material tanzanite = new Material("tanzanite", TextFormatting.LIGHT_PURPLE);
- tanzanite.addTrait(freezing);
- tanzanite.addItem("gemTanzanite", 1, Material.VALUE_Ingot);
- tanzanite.setCraftable(true);
- Utils.setDispItem(tanzanite, "biomesoplenty", "gem", 4);
- PlusTiC.proxy.setRenderInfo(tanzanite, 0x6200FF);
- TinkerRegistry.addMaterialStats(tanzanite, new HeadMaterialStats(650, 3, 7, OBSIDIAN));
- TinkerRegistry.addMaterialStats(tanzanite, new HandleMaterialStats(0.7f, 0));
- TinkerRegistry.addMaterialStats(tanzanite, new ExtraMaterialStats(25));
- TinkerRegistry.addMaterialStats(tanzanite, PlusTiC.justWhy);
- PlusTiC.materials.put("tanzanite", tanzanite);
- }
- if ((Config.bop && isBoPLoaded)
- || (Config.aoa && Loader.isModLoaded("aoa3"))) {
- Material amethyst = new Material("amethyst", TextFormatting.LIGHT_PURPLE);
- amethyst.addTrait(Apocalypse.apocalypse);
- amethyst.addItem("gemAmethyst", 1, Material.VALUE_Ingot);
- amethyst.setCraftable(true);
- new OreRegisterPromise("gemAmethyst").thenAccept(amethyst::setRepresentativeItem);
- PlusTiC.proxy.setRenderInfo(amethyst, 0xFF00FF);
- TinkerRegistry.addMaterialStats(amethyst, new HeadMaterialStats(1100, 6, 8, COBALT));
- TinkerRegistry.addMaterialStats(amethyst, new HandleMaterialStats(1.5f, 100));
- TinkerRegistry.addMaterialStats(amethyst, new ExtraMaterialStats(100));
- TinkerRegistry.addMaterialStats(amethyst, new BowMaterialStats(0.65f, 1.7f, 6.5f));
- PlusTiC.materials.put("amethyst", amethyst);
- }
- }
-
- @Override
- public void init2() {
- Material aoaSapphire = PlusTiC.materials.get("aoa_sapphire");
- if (aoaSapphire != null) {
- Item aoaSapphireItem = Item.REGISTRY.getObject(new ResourceLocation("aoa3:sapphire"));
- aoaSapphire.addItem(aoaSapphireItem, 1, Material.VALUE_Ingot);
- aoaSapphire.setRepresentativeItem(aoaSapphireItem);
- }
- }
-
- @SubscribeEvent
- public static void tooltip(ItemTooltipEvent event) { // warn that AoA sapphire is a distinct material
- if (!PlusTiC.materials.containsKey("aoa_sapphire")) return;
- NBTTagList mats = TagUtil.getBaseMaterialsTagList(event.getItemStack());
- boolean warned = false;
- for (int i=0; i> matData = Arrays.asList(
- Triple.of("thorium", 0x00FFBF, 800),
- Triple.of("tungsten", 0x5C5C5C, 1100),
- Triple.of("landium", 0xFF0077, 1500));
- Map mats = new Object2ObjectOpenHashMap<>();
- matData.forEach(matDatum -> {
- Material mat = new Material(matDatum.getLeft(), matDatum.getMiddle());
- String ingot = "ingot"+StringUtils.capitalize(matDatum.getLeft());
- mat.addItem(ingot, 1, Material.VALUE_Ingot);
- mat.setCraftable(false).setCastable(true);
- //Utils.setDispItem(mat, ingot);
-
- FluidMolten matFluid = Utils.fluidMetal(matDatum.getLeft(), matDatum.getMiddle());
- matFluid.setTemperature(matDatum.getRight());
- Utils.initFluidMetal(matFluid);
- mat.setFluid(matFluid);
-
- mats.put(matDatum.getLeft(), mat);
- });
-
- {
- Material thorium = mats.get("thorium");
- thorium.addTrait(Apocalypse.apocalypse, HEAD);
- thorium.addTrait(flammable);
- PlusTiC.proxy.setRenderInfo(thorium, 0x00FFBF);
-
- TinkerRegistry.addMaterialStats(thorium,
- new HeadMaterialStats(500, 6.5f, 4.5f, DIAMOND),
- new HandleMaterialStats(0.7f, -50),
- new ExtraMaterialStats(200),
- new BatteryCellMaterialStats(100000),
- PlusTiC.justWhy);
- }
-
- {
- Material tungsten = mats.get("tungsten");
- tungsten.addTrait(Heavy.heavy);
- PlusTiC.proxy.setRenderInfo(tungsten, 0x5C5C5C);
-
- TinkerRegistry.addMaterialStats(tungsten,
- new HeadMaterialStats(700, 9.0f, 4.75f, DIAMOND),
- new HandleMaterialStats(1.4f, 0),
- new ExtraMaterialStats(400),
- PlusTiC.justWhy);
- }
-
- {
- Material landium = mats.get("landium");
- landium.addTrait(Portly.portly);
- PlusTiC.proxy.setRenderInfo(landium, 0xFF0077);
-
- TinkerRegistry.addMaterialStats(landium,
- new HeadMaterialStats(1500, 8.7f, 5.5f, OBSIDIAN),
- new HandleMaterialStats(1.5f, -100),
- new ExtraMaterialStats(380),
- new BowMaterialStats(1.2f, 1.6f, 7),
- new LaserMediumMaterialStats(7.0f, 30));
- }
-
- PlusTiC.materials.putAll(mats);
- }
- }
-}
diff --git a/src/main/java/landmaster/plustic/modules/ModuleLandCraft.java b/src/main/java/landmaster/plustic/modules/ModuleLandCraft.java
deleted file mode 100644
index 19290f02..00000000
--- a/src/main/java/landmaster/plustic/modules/ModuleLandCraft.java
+++ /dev/null
@@ -1,110 +0,0 @@
-package landmaster.plustic.modules;
-
-import static slimeknights.tconstruct.library.utils.HarvestLevels.*;
-//import static slimeknights.tconstruct.tools.TinkerTraits.*;
-
-import java.util.*;
-
-import org.apache.commons.lang3.*;
-import org.apache.commons.lang3.tuple.*;
-
-import it.unimi.dsi.fastutil.objects.*;
-import landmaster.plustic.*;
-import landmaster.plustic.config.*;
-import landmaster.plustic.fluids.*;
-import landmaster.plustic.traits.*;
-import landmaster.plustic.util.*;
-import net.minecraftforge.fml.common.*;
-import slimeknights.tconstruct.library.*;
-import slimeknights.tconstruct.library.materials.*;
-
-public class ModuleLandCraft implements IModule {
- public void init() {
- if (Config.landCraft && Loader.isModLoaded("landcraft")) {
- List> matData = Arrays.asList(
- Triple.of("kelline", 0x7BFF00, 430),
- Triple.of("garfax", 0x0000FF, 700),
- Triple.of("morganine", 0xFF00FF, 1200),
- Triple.of("racheline", 0xD37DDC, 1400),
- Triple.of("friscion", 0xD2FF1C, 400)
- );
- Map mats = new Object2ObjectOpenHashMap<>();
- matData.forEach(matDatum -> {
- Material mat = new Material(matDatum.getLeft(), matDatum.getMiddle());
- String ingot = "ingot"+StringUtils.capitalize(matDatum.getLeft());
- mat.addItem(ingot, 1, Material.VALUE_Ingot);
- mat.setCraftable(false).setCastable(true);
- //Utils.setDispItem(mat, ingot);
-
- FluidMolten matFluid = Utils.fluidMetal(matDatum.getLeft(), matDatum.getMiddle());
- matFluid.setTemperature(matDatum.getRight());
- Utils.initFluidMetal(matFluid);
- mat.setFluid(matFluid);
-
- mats.put(matDatum.getLeft(), mat);
- });
-
- {
- Material kelline = mats.get("kelline");
- kelline.addTrait(HailHydra.hailhydra);
- PlusTiC.proxy.setRenderInfo(kelline, 0x00FF00, 0xFFFF00, 0xFF0000);
-
- TinkerRegistry.addMaterialStats(kelline,
- new HeadMaterialStats(2500, 9.0f, 9.5f, 8),
- new HandleMaterialStats(1.3f, -20),
- new ExtraMaterialStats(250),
- new BowMaterialStats(0.8f, 1.0f, 14));
- }
-
- {
- Material garfax = mats.get("garfax");
- garfax.addTrait(Barrett.barrett);
- PlusTiC.proxy.setRenderInfo(garfax, 0x00FF55, 0x0000FF, 0x0000FF);
-
- TinkerRegistry.addMaterialStats(garfax,
- new HeadMaterialStats(1300, 7.3f, 6.5f, 5),
- new HandleMaterialStats(0.9f, 10),
- new ExtraMaterialStats(40),
- PlusTiC.justWhy);
- }
-
- {
- Material morganine = mats.get("morganine");
- morganine.addTrait(MorganLeFay.morganlefay);
- PlusTiC.proxy.setRenderInfo(morganine, 0xFF00FF, 0xEE42F4, 0x62008C);
-
- TinkerRegistry.addMaterialStats(morganine,
- new HeadMaterialStats(1600, 8.6f, 7, 6),
- new HandleMaterialStats(1.2f, 100),
- new ExtraMaterialStats(400),
- new BowMaterialStats(1.2f, 1.2f, 6));
- }
-
- {
- Material racheline = mats.get("racheline");
- racheline.addTrait(BlindBandit.blindbandit);
- PlusTiC.proxy.setRenderInfo(racheline, 0xA5FFFF, 0xD37DDC, 0xFF00BA);
-
- TinkerRegistry.addMaterialStats(racheline,
- new HeadMaterialStats(2000, 8.3f, 8, 7),
- new HandleMaterialStats(1.0f, 80),
- new ExtraMaterialStats(260),
- new BowMaterialStats(1.3f, 0.7f, 15));
- }
-
- {
- Material friscion = mats.get("friscion");
- friscion.addTrait(Trash.trash);
- PlusTiC.proxy.setRenderInfo(friscion, 0x00FF26, 0x00FFE1, 0xD9FF00);
-
- TinkerRegistry.addMaterialStats(friscion,
- new HeadMaterialStats(1100, 7, 6, COBALT),
- new HandleMaterialStats(0.8f, -10),
- new ExtraMaterialStats(68),
- PlusTiC.justWhy);
- }
-
- PlusTiC.materials.putAll(mats);
- }
- }
-}
diff --git a/src/main/java/landmaster/plustic/modules/ModuleMFR.java b/src/main/java/landmaster/plustic/modules/ModuleMFR.java
deleted file mode 100644
index 0d7c7426..00000000
--- a/src/main/java/landmaster/plustic/modules/ModuleMFR.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package landmaster.plustic.modules;
-
-import static slimeknights.tconstruct.library.utils.HarvestLevels.*;
-
-import java.util.concurrent.*;
-
-import landmaster.plustic.*;
-import landmaster.plustic.api.*;
-import landmaster.plustic.config.*;
-import net.minecraft.item.*;
-import net.minecraft.util.*;
-import net.minecraftforge.event.*;
-import net.minecraftforge.fml.common.*;
-import net.minecraftforge.fml.common.eventhandler.*;
-import slimeknights.tconstruct.library.*;
-import slimeknights.tconstruct.library.materials.*;
-
-@Mod.EventBusSubscriber(modid = ModInfo.MODID)
-public class ModuleMFR implements IModule {
- private static final CompletableFuture> regFut = new CompletableFuture<>();
-
- @Override
- public void init() {
- if (Config.mfr && (Loader.isModLoaded("industrialforegoing"))) {
- Material pink_slime_mat = new Material("pink_slime", 0xFF84AD);
-
- PlusTiC.materials.put("pink_slime", pink_slime_mat);
-
- final CompletableFuture> mfrFut = regFut.thenRun(() -> {
- final Item pink_slime = Item.REGISTRY.getObject(new ResourceLocation("industrialforegoing:pink_slime"));
-
- pink_slime_mat.addTrait(ModuleMFRStuff.slimey_pink);
- pink_slime_mat.addItem(pink_slime, 1, Material.VALUE_Ingot);
- pink_slime_mat.setCraftable(true);
- pink_slime_mat.setRepresentativeItem(pink_slime);
- PlusTiC.proxy.setRenderInfo(pink_slime_mat, 0xFF84AD);
-
- TinkerRegistry.addMaterialStats(pink_slime_mat,
- new HeadMaterialStats(1800, 3.77f, 1.80f, STONE),
- new HandleMaterialStats(2.7f, -729),
- new ExtraMaterialStats(243),
- new BowMaterialStats(1.2f, 0.8f, 0));
- });
-
- PlusTiC.materialIntegrationStages.put("pink_slime", mfrFut);
- }
- }
-
- @SubscribeEvent(priority = EventPriority.LOWEST)
- public static void onItemReg(RegistryEvent.Register
- event) {
- regFut.complete(null);
- }
-}
diff --git a/src/main/java/landmaster/plustic/modules/ModuleMFRStuff.java b/src/main/java/landmaster/plustic/modules/ModuleMFRStuff.java
deleted file mode 100644
index bdae478c..00000000
--- a/src/main/java/landmaster/plustic/modules/ModuleMFRStuff.java
+++ /dev/null
@@ -1,9 +0,0 @@
-package landmaster.plustic.modules;
-
-import com.buuz135.industrial.entity.*;
-
-import slimeknights.tconstruct.tools.traits.*;
-
-public class ModuleMFRStuff {
- public static final TraitSlimey slimey_pink = new TraitSlimey("pink", EntityPinkSlime.class);
-}
diff --git a/src/main/java/landmaster/plustic/modules/ModuleMachines.java b/src/main/java/landmaster/plustic/modules/ModuleMachines.java
deleted file mode 100644
index a56f68d1..00000000
--- a/src/main/java/landmaster/plustic/modules/ModuleMachines.java
+++ /dev/null
@@ -1,61 +0,0 @@
-package landmaster.plustic.modules;
-
-import landmaster.plustic.*;
-import landmaster.plustic.api.*;
-import landmaster.plustic.block.*;
-import landmaster.plustic.config.*;
-import landmaster.plustic.item.*;
-import landmaster.plustic.tile.*;
-import landmaster.plustic.tile.render.*;
-import landmaster.plustic.util.*;
-import net.minecraft.block.*;
-import net.minecraft.item.*;
-import net.minecraft.util.*;
-import net.minecraftforge.common.*;
-import net.minecraftforge.event.*;
-import net.minecraftforge.fml.client.registry.*;
-import net.minecraftforge.fml.common.eventhandler.*;
-import net.minecraftforge.fml.common.registry.*;
-import net.minecraftforge.fml.relauncher.*;
-
-public class ModuleMachines implements IModule {
- public static final BlockCentrifuge centrifuge = new BlockCentrifuge();
-
- static {
- MinecraftForge.EVENT_BUS.register(ModuleMachines.class);
- }
-
- @Override
- public void init() {
- if (Config.machines) {
- GameRegistry.registerTileEntity(TECentrifugeCore.class, new ResourceLocation(ModInfo.MODID, "centrifuge_core"));
- GameRegistry.registerTileEntity(TECentrifugeTank.class, new ResourceLocation(ModInfo.MODID, "centrifuge_tank"));
-
- PlusTiC.proxy.runOnClient(new RunnableDefaultNoop() {
- @SideOnly(Side.CLIENT)
- @Override
- public void run() {
- RenderTECentrifuge centrifugeRender = new RenderTECentrifuge();
- ClientRegistry.bindTileEntitySpecialRenderer(TECentrifugeCore.class, centrifugeRender);
- ClientRegistry.bindTileEntitySpecialRenderer(TECentrifugeTank.class, centrifugeRender);
- }
- });
- }
- }
-
- @SubscribeEvent
- public static void registerBlocks(RegistryEvent.Register event) {
- if (Config.machines) {
- event.getRegistry().register(centrifuge);
- }
- }
-
- @SubscribeEvent
- public static void registerItems(RegistryEvent.Register
- event) {
- if (Config.machines) {
- event.getRegistry().register(new ItemBlockMeta(centrifuge).setRegistryName(centrifuge.getRegistryName()));
- PlusTiC.proxy.registerItemRenderer(Item.getItemFromBlock(centrifuge), 0, "centrifuge", "core=false");
- PlusTiC.proxy.registerItemRenderer(Item.getItemFromBlock(centrifuge), 1, "centrifuge", "core=true");
- }
- }
-}
diff --git a/src/main/java/landmaster/plustic/modules/ModuleMekanism.java b/src/main/java/landmaster/plustic/modules/ModuleMekanism.java
deleted file mode 100644
index 8f0fbf6a..00000000
--- a/src/main/java/landmaster/plustic/modules/ModuleMekanism.java
+++ /dev/null
@@ -1,160 +0,0 @@
-package landmaster.plustic.modules;
-
-import static slimeknights.tconstruct.library.materials.MaterialTypes.*;
-import static slimeknights.tconstruct.library.utils.HarvestLevels.*;
-import static slimeknights.tconstruct.tools.TinkerTraits.*;
-
-import java.util.*;
-
-import landmaster.plustic.*;
-import landmaster.plustic.config.*;
-import landmaster.plustic.fluids.*;
-import landmaster.plustic.tools.stats.*;
-import landmaster.plustic.traits.*;
-import landmaster.plustic.util.*;
-import net.minecraft.util.text.*;
-import net.minecraftforge.fluids.*;
-import net.minecraftforge.fml.common.Loader;
-import slimeknights.tconstruct.library.*;
-import slimeknights.tconstruct.library.materials.*;
-
-public class ModuleMekanism implements IModule {
- @Override
- public void init() {
- if (Config.mekanism && (Loader.isModLoaded("Mekanism") || Loader.isModLoaded("mekanism"))) {
- Material osmium = TinkerRegistry.getMaterial("osmium");
- if (osmium == Material.UNKNOWN) {
- osmium = new Material("osmium", TextFormatting.BLUE);
- osmium.addTrait(dense);
- osmium.addTrait(established);
- osmium.addItem("ingotOsmium", 1, Material.VALUE_Ingot);
- osmium.setCraftable(false).setCastable(true);
- PlusTiC.proxy.setRenderInfo(osmium, 0xBFD0FF);
-
- FluidMolten osmiumFluid = Utils.fluidMetal("osmium", 0xBFD0FF);
- osmiumFluid.setTemperature(820);
- Utils.initFluidMetal(osmiumFluid);
- osmium.setFluid(osmiumFluid);
-
- TinkerRegistry.addMaterialStats(osmium,
- new HeadMaterialStats(500, 6, 5.8f, DIAMOND),
- new HandleMaterialStats(1.2f, 45),
- new ExtraMaterialStats(40),
- new BowMaterialStats(0.65f, 1.3f, 5.7f),
- new BatteryCellMaterialStats(80000));
-
- PlusTiC.materials.put("osmium", osmium);
- }
-
- Material refinedObsidian = new Material("refinedObsidian", TextFormatting.LIGHT_PURPLE);
- refinedObsidian.addTrait(dense);
- refinedObsidian.addTrait(duritos);
- refinedObsidian.addItem("ingotRefinedObsidian", 1, Material.VALUE_Ingot);
- refinedObsidian.setCraftable(false).setCastable(true);
- PlusTiC.proxy.setRenderInfo(refinedObsidian, 0x5D00FF);
-
- FluidMolten refinedObsidianFluid = Utils.fluidMetal("refinedObsidian", 0x5D00FF);
- refinedObsidianFluid.setTemperature(860);
- Utils.initFluidMetal(refinedObsidianFluid);
- refinedObsidian.setFluid(refinedObsidianFluid);
-
- TinkerRegistry.addMaterialStats(refinedObsidian,
- new HeadMaterialStats(2500, 7, 11, COBALT),
- new HandleMaterialStats(1.5f, -100),
- new ExtraMaterialStats(160),
- PlusTiC.justWhy,
- new LaserMediumMaterialStats(6.0f, 55));
-
- PlusTiC.materials.put("refinedObsidian", refinedObsidian);
-
- Material refinedGlowstone = new Material("refinedGlowstone", TextFormatting.YELLOW);
- refinedGlowstone.addTrait(Sassy.sassy);
- refinedGlowstone.addTrait(Illuminati.illuminati);
- refinedGlowstone.addItem("ingotRefinedGlowstone", 1, Material.VALUE_Ingot);
- refinedGlowstone.setCraftable(false).setCastable(true);
- PlusTiC.proxy.setRenderInfo(refinedGlowstone, 0xFFFF00);
-
- FluidMolten refinedGlowstoneFluid = Utils.fluidMetal("refinedGlowstone", 0xFFFF00);
- refinedGlowstoneFluid.setTemperature(1111);
- Utils.initFluidMetal(refinedGlowstoneFluid);
- refinedGlowstone.setFluid(refinedGlowstoneFluid);
-
- TinkerRegistry.addMaterialStats(refinedGlowstone,
- new HeadMaterialStats(450, 9, 10, COBALT),
- new HandleMaterialStats(0.9f, 0),
- new ExtraMaterialStats(100),
- PlusTiC.justWhy,
- new LaserMediumMaterialStats(10.0f, 40));
-
- PlusTiC.materials.put("refinedGlowstone", refinedGlowstone);
-
- if (osmium.hasFluid()) {
- // osgloglas
- Utils.ItemMatGroup osgloglasGroup = Utils.registerMatGroup("osgloglas");
-
- Material osgloglas = new Material("osgloglas", 0x72FF68);
- osgloglas.addTrait(BrownMagic.brownmagic);
- osgloglas.addTrait(Sassy.sassy);
- osgloglas.addTrait(Global.global);
- osgloglas.addItem("ingotOsgloglas", 1, Material.VALUE_Ingot);
- osgloglas.setCraftable(false).setCastable(true);
- osgloglas.setRepresentativeItem(osgloglasGroup.ingot);
- PlusTiC.proxy.setRenderInfo(osgloglas, 0x72FF68);
-
- FluidMolten osgloglasFluid = Utils.fluidMetal("osgloglas", 0x72FF68);
- osgloglasFluid.setTemperature(1300);
- Utils.initFluidMetal(osgloglasFluid);
- osgloglas.setFluid(osgloglasFluid);
- TinkerRegistry.registerAlloy(new FluidStack(osgloglasFluid, 1),
- new FluidStack(osmium.getFluid(), 1),
- new FluidStack(refinedObsidianFluid, 1),
- new FluidStack(refinedGlowstoneFluid, 1));
-
- TinkerRegistry.addMaterialStats(osgloglas, new HeadMaterialStats(2800, 7.5f, 11, 5),
- new HandleMaterialStats(1.5f, -50),
- new ExtraMaterialStats(100),
- new BowMaterialStats(0.6f, 1.8f, 8.2f));
-
- PlusTiC.materials.put("osgloglas", osgloglas);
- }
-
- Material iridium = Optional.ofNullable(PlusTiC.materials.get("iridium"))
- .orElse(TinkerRegistry.getMaterial("iridium"));
-
- if (iridium.hasFluid() && osmium.hasFluid()) {
- // osmiridium
- Utils.ItemMatGroup osmiridiumGroup = Utils.registerMatGroup("osmiridium");
-
- Material osmiridium = new Material("osmiridium", TextFormatting.LIGHT_PURPLE);
- osmiridium.addTrait(DevilsStrength.devilsstrength);
- osmiridium.addTrait(Anticorrosion.anticorrosion, HEAD);
- osmiridium.addItem("ingotOsmiridium", 1, Material.VALUE_Ingot);
- osmiridium.setCraftable(false).setCastable(true);
- osmiridium.setRepresentativeItem(osmiridiumGroup.ingot);
- PlusTiC.proxy.setRenderInfo(osmiridium, 0x666DFF);
-
- FluidMolten osmiridiumFluid = Utils.fluidMetal("osmiridium", 0x666DFF);
- osmiridiumFluid.setTemperature(840);
- Utils.initFluidMetal(osmiridiumFluid);
- osmiridium.setFluid(osmiridiumFluid);
- TinkerRegistry.registerAlloy(new FluidStack(osmiridiumFluid, 2),
- new FluidStack(osmium.getFluid(), 1), new FluidStack(iridium.getFluid(), 1));
-
- TinkerRegistry.addMaterialStats(osmiridium, new HeadMaterialStats(1300, 6.8f, 8, COBALT));
- TinkerRegistry.addMaterialStats(osmiridium, new HandleMaterialStats(1.5f, 30));
- TinkerRegistry.addMaterialStats(osmiridium, new ExtraMaterialStats(80));
- TinkerRegistry.addMaterialStats(osmiridium, new BowMaterialStats(0.38f, 2.05f, 10));
-
- PlusTiC.materials.put("osmiridium", osmiridium);
- }
- }
- }
-
- @Override
- public void init2() {
- Utils.setDispItem(PlusTiC.materials.get("refinedObsidian"), "ingotRefinedObsidian");
- Utils.setDispItem(PlusTiC.materials.get("osmium"), "ingotOsmium");
- Utils.setDispItem(PlusTiC.materials.get("refinedGlowstone"), "ingotRefinedGlowstone");
- }
-
-}
diff --git a/src/main/java/landmaster/plustic/modules/ModuleModifiers.java b/src/main/java/landmaster/plustic/modules/ModuleModifiers.java
deleted file mode 100644
index 4023e834..00000000
--- a/src/main/java/landmaster/plustic/modules/ModuleModifiers.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package landmaster.plustic.modules;
-
-public class ModuleModifiers implements IModule {
- public void init() {
- // none yet
- }
-}
diff --git a/src/main/java/landmaster/plustic/modules/ModuleNatura.java b/src/main/java/landmaster/plustic/modules/ModuleNatura.java
deleted file mode 100644
index cec58ac1..00000000
--- a/src/main/java/landmaster/plustic/modules/ModuleNatura.java
+++ /dev/null
@@ -1,122 +0,0 @@
-package landmaster.plustic.modules;
-
-import static slimeknights.tconstruct.library.utils.HarvestLevels.*;
-import static slimeknights.tconstruct.tools.TinkerTraits.*;
-
-import java.util.concurrent.*;
-
-import com.progwml6.natura.shared.*;
-
-import landmaster.plustic.*;
-import landmaster.plustic.api.*;
-import landmaster.plustic.config.*;
-import landmaster.plustic.traits.*;
-import net.minecraft.item.*;
-import net.minecraft.util.text.*;
-import net.minecraftforge.event.*;
-import net.minecraftforge.fml.common.*;
-import net.minecraftforge.fml.common.eventhandler.*;
-import slimeknights.tconstruct.library.*;
-import slimeknights.tconstruct.library.materials.*;
-
-@Mod.EventBusSubscriber(modid = ModInfo.MODID)
-public class ModuleNatura implements IModule {
- private static final CompletableFuture> itemPromise = new CompletableFuture<>();
-
- public void init() {
- if (Config.natura && Loader.isModLoaded("natura")) {
- Material darkwood = new Material("darkwood_plustic", TextFormatting.DARK_BLUE);
- darkwood.addTrait(DarkTraveler.darktraveler);
- darkwood.addTrait(ecological);
- CompletableFuture> darkwoodPromise = itemPromise.thenRun(() -> {
- darkwood.addItem(ModuleNaturaStuff.darkwoodPlankStack(), 1, Material.VALUE_Ingot);
- darkwood.addItem(ModuleNaturaStuff.darkwoodLogStack(), 1, 4*Material.VALUE_Ingot);
- darkwood.addItem(NaturaCommons.darkwood_stick, 1, Material.VALUE_Shard);
- darkwood.setRepresentativeItem(ModuleNaturaStuff.darkwoodPlankStack());
- });
- darkwood.setCraftable(true);
- PlusTiC.proxy.setRenderInfo(darkwood, 0x000044);
- TinkerRegistry.addMaterialStats(darkwood,
- new HeadMaterialStats(350, 5f, 3f, COBALT),
- new HandleMaterialStats(1.3f, -5),
- new ExtraMaterialStats(90),
- new BowMaterialStats(1.2f, 1.3f, 3));
- PlusTiC.materials.put("darkwood", darkwood);
- PlusTiC.materialIntegrationStages.put("darkwood", darkwoodPromise);
-
- Material ghostwood = new Material("ghostwood_plustic", TextFormatting.WHITE);
- ghostwood.addTrait(Ghastly.ghastly);
- ghostwood.addTrait(ecological);
- CompletableFuture> ghostwoodPromise = itemPromise.thenRun(() -> {
- ghostwood.addItem(ModuleNaturaStuff.ghostwoodPlankStack(), 1, Material.VALUE_Ingot);
- ghostwood.addItem(ModuleNaturaStuff.ghostwoodLogStack(), 1, 4*Material.VALUE_Ingot);
- ghostwood.addItem(NaturaCommons.ghostwood_stick, 1, Material.VALUE_Shard);
- ghostwood.setRepresentativeItem(ModuleNaturaStuff.ghostwoodPlankStack());
- });
- ghostwood.setCraftable(true);
- PlusTiC.proxy.setRenderInfo(ghostwood, 0xFFFFFF);
- TinkerRegistry.addMaterialStats(ghostwood,
- new HeadMaterialStats(300, 4.9f, 2.5f, COBALT),
- new HandleMaterialStats(1.1f, 0),
- new ExtraMaterialStats(100),
- new BowMaterialStats(1.6f, 1.1f, 2));
- PlusTiC.materials.put("ghostwood", ghostwood);
- PlusTiC.materialIntegrationStages.put("ghostwood", ghostwoodPromise);
-
- Material fusewood = new Material("fusewood_plustic", 0x00D18E);
- fusewood.addTrait(DPRK.dprk);
- fusewood.addTrait(ecological);
- CompletableFuture> fusewoodPromise = itemPromise.thenRun(() -> {
- fusewood.addItem(ModuleNaturaStuff.fusewoodPlankStack(), 1, Material.VALUE_Ingot);
- fusewood.addItem(ModuleNaturaStuff.fusewoodLogStack(), 1, 4*Material.VALUE_Ingot);
- fusewood.addItem(NaturaCommons.fusewood_stick, 1, Material.VALUE_Shard);
- fusewood.setRepresentativeItem(ModuleNaturaStuff.fusewoodPlankStack());
- });
- fusewood.setCraftable(true);
- PlusTiC.proxy.setRenderInfo(fusewood, 0x00D18E);
- TinkerRegistry.addMaterialStats(fusewood,
- new HeadMaterialStats(430, 6.0f, 4f, COBALT),
- new HandleMaterialStats(1.0f, -20),
- new ExtraMaterialStats(50),
- new BowMaterialStats(0.7f, 2.0f, 7));
- PlusTiC.materials.put("fusewood", fusewood);
- PlusTiC.materialIntegrationStages.put("fusewood", fusewoodPromise);
-
- Material bloodwood = new Material("bloodwood_plustic", 0x600000);
- bloodwood.addTrait(BloodyMary.bloodymary);
- bloodwood.addTrait(ecological);
- CompletableFuture> bloodwoodPromise = itemPromise.thenRun(() -> {
- bloodwood.addItem(ModuleNaturaStuff.bloodwoodPlankStack(), 1, Material.VALUE_Ingot);
- bloodwood.addItem(ModuleNaturaStuff.bloodwoodLogStack(), 1, 4*Material.VALUE_Ingot);
- bloodwood.addItem(NaturaCommons.bloodwood_stick, 1, Material.VALUE_Shard);
- bloodwood.setRepresentativeItem(ModuleNaturaStuff.bloodwoodPlankStack());
- });
- bloodwood.setCraftable(true);
- PlusTiC.proxy.setRenderInfo(bloodwood, 0x600000);
- TinkerRegistry.addMaterialStats(bloodwood,
- new HeadMaterialStats(550, 7.0f, 5f, COBALT),
- new HandleMaterialStats(1.4f, -60),
- new ExtraMaterialStats(170),
- new BowMaterialStats(1.6f, 1.4f, 7));
- PlusTiC.materials.put("bloodwood", bloodwood);
- PlusTiC.materialIntegrationStages.put("bloodwood", bloodwoodPromise);
-
- Material flamestring = new Material("flamestring_plustic", 0xFF3314);
- flamestring.addTrait(Naphtha.naphtha);
- CompletableFuture> flamestringPromise = itemPromise.thenRun(() -> {
- flamestring.addItem(NaturaCommons.flameString, 1, Material.VALUE_Ingot);
- flamestring.setRepresentativeItem(NaturaCommons.flameString);
- });
- flamestring.setCraftable(true);
- PlusTiC.proxy.setRenderInfo(flamestring, 0xFF3314);
- TinkerRegistry.addMaterialStats(flamestring, new BowStringMaterialStats(1.2f));
- PlusTiC.materials.put("flamestring", flamestring);
- PlusTiC.materialIntegrationStages.put("flamestring", flamestringPromise);
- }
- }
-
- @SubscribeEvent(priority = EventPriority.LOWEST)
- public static void itemRegEvent(RegistryEvent.Register
- event) {
- itemPromise.complete(null);
- }
-}
diff --git a/src/main/java/landmaster/plustic/modules/ModuleNaturaStuff.java b/src/main/java/landmaster/plustic/modules/ModuleNaturaStuff.java
deleted file mode 100644
index 948a12ec..00000000
--- a/src/main/java/landmaster/plustic/modules/ModuleNaturaStuff.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package landmaster.plustic.modules;
-
-import com.progwml6.natura.nether.*;
-import com.progwml6.natura.nether.block.logs.*;
-import com.progwml6.natura.nether.block.planks.*;
-
-import net.minecraft.item.*;
-import net.minecraftforge.oredict.OreDictionary;
-
-public class ModuleNaturaStuff {
- public static ItemStack darkwoodPlankStack() {
- return new ItemStack(NaturaNether.netherPlanks,
- 1, BlockNetherPlanks.PlankType.DARKWOOD.getMeta());
- }
- public static ItemStack darkwoodLogStack() {
- return new ItemStack(NaturaNether.netherLog,
- 1, BlockNetherLog.LogType.DARKWOOD.getMeta());
- }
- public static ItemStack ghostwoodPlankStack() {
- return new ItemStack(NaturaNether.netherPlanks,
- 1, BlockNetherPlanks.PlankType.GHOSTWOOD.getMeta());
- }
- public static ItemStack ghostwoodLogStack() {
- return new ItemStack(NaturaNether.netherLog,
- 1, BlockNetherLog.LogType.GHOSTWOOD.getMeta());
- }
- public static ItemStack fusewoodPlankStack() {
- return new ItemStack(NaturaNether.netherPlanks,
- 1, BlockNetherPlanks.PlankType.FUSEWOOD.getMeta());
- }
- public static ItemStack fusewoodLogStack() {
- return new ItemStack(NaturaNether.netherLog,
- 1, BlockNetherLog.LogType.FUSEWOOD.getMeta());
- }
- public static ItemStack bloodwoodPlankStack() {
- return new ItemStack(NaturaNether.netherPlanks,
- 1, BlockNetherPlanks.PlankType.BLOODWOOD.getMeta());
- }
- public static ItemStack bloodwoodLogStack() {
- return new ItemStack(NaturaNether.netherLog2, 1, OreDictionary.WILDCARD_VALUE);
- }
-}
diff --git a/src/main/java/landmaster/plustic/modules/ModuleProjectE.java b/src/main/java/landmaster/plustic/modules/ModuleProjectE.java
deleted file mode 100644
index 4cf1aeae..00000000
--- a/src/main/java/landmaster/plustic/modules/ModuleProjectE.java
+++ /dev/null
@@ -1,76 +0,0 @@
-package landmaster.plustic.modules;
-
-import static slimeknights.tconstruct.library.materials.MaterialTypes.*;
-import static slimeknights.tconstruct.library.utils.HarvestLevels.*;
-
-import java.util.concurrent.*;
-
-import landmaster.plustic.*;
-import landmaster.plustic.api.*;
-import landmaster.plustic.config.*;
-import landmaster.plustic.tools.stats.*;
-import landmaster.plustic.traits.*;
-import net.minecraft.item.*;
-import net.minecraft.util.*;
-import net.minecraftforge.event.*;
-import net.minecraftforge.fml.common.Loader;
-import net.minecraftforge.fml.common.Mod;
-import net.minecraftforge.fml.common.eventhandler.*;
-import slimeknights.tconstruct.library.*;
-import slimeknights.tconstruct.library.materials.*;
-
-@Mod.EventBusSubscriber(modid = ModInfo.MODID)
-public class ModuleProjectE implements IModule {
-
- private static final CompletableFuture> regPromise = new CompletableFuture<>();
-
- public void init() {
- if (Config.projectE && Loader.isModLoaded("projecte")) {
- Material darkMatter = new Material("darkMatter", 0x270133);
- Material redMatter = new Material("redMatter", 0xE30000);
-
- final CompletableFuture> integrationPromise = regPromise.thenRun(() -> {
- final Item matter = Item.REGISTRY.getObject(new ResourceLocation("projecte", "item.pe_matter"));
-
- darkMatter.addTrait(Ignoble.ignoble, HEAD);
- darkMatter.addTrait(DarkTraveler.darktraveler);
- darkMatter.addItem(matter, 1, Material.VALUE_Ingot);
- darkMatter.setCraftable(true);
- darkMatter.setRepresentativeItem(matter);
- PlusTiC.proxy.setRenderInfo(darkMatter, 0x270133);
-
- TinkerRegistry.addMaterialStats(darkMatter,
- new HeadMaterialStats(1729, 10, 10.5f, COBALT),
- new HandleMaterialStats(1.7f, 289),
- new ExtraMaterialStats(111),
- new BowMaterialStats(1.0f, 1.1f, 10),
- new LaserMediumMaterialStats(6, 130));
-
- final ItemStack redMatterStack = new ItemStack(matter, 1, 1);
-
- redMatter.addTrait(DPRK.dprk);
- redMatter.addItem(redMatterStack, 1, Material.VALUE_Ingot);
- redMatter.setCraftable(true);
- redMatter.setRepresentativeItem(redMatterStack);
- PlusTiC.proxy.setRenderInfo(redMatter, 0xE30000);
-
- TinkerRegistry.addMaterialStats(redMatter,
- new HeadMaterialStats(2017, 14, 15, COBALT),
- new HandleMaterialStats(2, -53),
- new ExtraMaterialStats(105),
- new BowMaterialStats(1.0f, 2.0f, 13.7f));
- });
-
- PlusTiC.materials.put("darkMatter", darkMatter);
- PlusTiC.materials.put("redMatter", redMatter);
-
- PlusTiC.materialIntegrationStages.put("darkMatter", integrationPromise);
- PlusTiC.materialIntegrationStages.put("redMatter", integrationPromise);
- }
- }
-
- @SubscribeEvent(priority = EventPriority.LOWEST)
- public static void onRegItems(RegistryEvent.Register
- event) {
- regPromise.complete(null);
- }
-}
diff --git a/src/main/java/landmaster/plustic/modules/ModulePsi.java b/src/main/java/landmaster/plustic/modules/ModulePsi.java
deleted file mode 100644
index 9a61e5bf..00000000
--- a/src/main/java/landmaster/plustic/modules/ModulePsi.java
+++ /dev/null
@@ -1,80 +0,0 @@
-package landmaster.plustic.modules;
-
-import static slimeknights.tconstruct.library.utils.HarvestLevels.*;
-
-import java.util.stream.*;
-
-import landmaster.plustic.*;
-import landmaster.plustic.config.*;
-import landmaster.plustic.fluids.*;
-import landmaster.plustic.tools.stats.*;
-import landmaster.plustic.traits.*;
-import landmaster.plustic.util.*;
-import net.minecraftforge.common.*;
-import net.minecraftforge.fml.common.*;
-import net.minecraftforge.fml.common.eventhandler.*;
-import net.minecraftforge.oredict.*;
-import slimeknights.tconstruct.library.*;
-import slimeknights.tconstruct.library.events.*;
-import slimeknights.tconstruct.library.materials.*;
-
-public class ModulePsi implements IModule {
- static {
- MinecraftForge.EVENT_BUS.register(ModulePsi.class);
- }
-
- public void init() {
- if (Config.psi && (Loader.isModLoaded("Psi") || Loader.isModLoaded("psi"))) {
- Material psimetal = new Material("psimetal", 0x6D9EFF);
- psimetal.addTrait(Psicological.psicological);
- psimetal.addTrait(Global.global);
- psimetal.addItem("ingotPsi", 1, Material.VALUE_Ingot);
- psimetal.setCraftable(false).setCastable(true);
- Utils.setDispItem(psimetal, "ingotPsi");
- PlusTiC.proxy.setRenderInfo(psimetal, 0x6D9EFF);
-
- FluidMolten psimetalFluid = Utils.fluidMetal("psimetal", 0x6D9EFF);
- psimetalFluid.setTemperature(696);
- Utils.initFluidMetal(psimetalFluid);
- psimetal.setFluid(psimetalFluid);
-
- TinkerRegistry.addMaterialStats(psimetal,
- new HeadMaterialStats(620, 7f, 5, OBSIDIAN),
- new HandleMaterialStats(1.3f, -10),
- new ExtraMaterialStats(30),
- new BowMaterialStats(1, 1.6f, 4));
-
- PlusTiC.materials.put("psi", psimetal);
-
- Material psigem = new Material("psigem", 0x0843A3);
- psigem.addTrait(Psicological.psicological);
- psigem.addTrait(Portly.portly);
- psigem.addItem("gemPsi", 1, Material.VALUE_Ingot);
- psigem.setCraftable(true);
- new OreRegisterPromise("gemPsi").thenAccept(psigem::setRepresentativeItem);
- PlusTiC.proxy.setRenderInfo(psigem, 0x0843A3);
-
- TinkerRegistry.addMaterialStats(psigem,
- new HeadMaterialStats(620, 7f, 5, OBSIDIAN),
- new HandleMaterialStats(1.3f, -10),
- new ExtraMaterialStats(30),
- new BowMaterialStats(1, 1.6f, 4),
- new LaserMediumMaterialStats(5.4f, 23));
-
- PlusTiC.materials.put("psiGem", psigem);
- }
- }
-
- @SubscribeEvent
- public static void meltingRecipeRegister(TinkerRegisterEvent.MeltingRegisterEvent event) {
- if (Config.psi && (Loader.isModLoaded("Psi") || Loader.isModLoaded("psi"))) {
- if (Stream.concat(OreDictionary.getOres("dustPsi", false).stream(),
- OreDictionary.getOres("blockPsiDust", false).stream())
- .anyMatch(event.getRecipe()::matches)
- && Loader.instance().activeModContainer() != null
- && Loader.instance().activeModContainer().getModId().equalsIgnoreCase("tconstruct")) {
- event.setCanceled(true); // remove dust recipes
- }
- }
- }
-}
diff --git a/src/main/java/landmaster/plustic/modules/ModuleSurvivalist.java b/src/main/java/landmaster/plustic/modules/ModuleSurvivalist.java
deleted file mode 100644
index a86db5ac..00000000
--- a/src/main/java/landmaster/plustic/modules/ModuleSurvivalist.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package landmaster.plustic.modules;
-
-import landmaster.plustic.config.*;
-import net.minecraftforge.fml.common.*;
-import slimeknights.tconstruct.library.*;
-import slimeknights.tconstruct.library.materials.*;
-import slimeknights.tconstruct.shared.*;
-
-public class ModuleSurvivalist implements IModule {
- public void init() {
- if (Config.survivalist && Loader.isModLoaded("survivalist")) {
- // add melting recipes
- TinkerRegistry.registerMelting("rockOreIron", TinkerFluids.iron, Material.VALUE_Nugget*2);
- TinkerRegistry.registerMelting("rockOreGold", TinkerFluids.gold, Material.VALUE_Nugget*2);
- TinkerRegistry.registerMelting("rockOreCopper", TinkerFluids.copper, Material.VALUE_Nugget*2);
- TinkerRegistry.registerMelting("rockOreTin", TinkerFluids.tin, Material.VALUE_Nugget*2);
- TinkerRegistry.registerMelting("rockOreLead", TinkerFluids.lead, Material.VALUE_Nugget*2);
- TinkerRegistry.registerMelting("rockOreSilver", TinkerFluids.silver, Material.VALUE_Nugget*2);
- }
- }
-}
diff --git a/src/main/java/landmaster/plustic/modules/ModuleTF.java b/src/main/java/landmaster/plustic/modules/ModuleTF.java
deleted file mode 100644
index e8b7e48d..00000000
--- a/src/main/java/landmaster/plustic/modules/ModuleTF.java
+++ /dev/null
@@ -1,133 +0,0 @@
-package landmaster.plustic.modules;
-
-import static slimeknights.tconstruct.library.materials.MaterialTypes.*;
-import static slimeknights.tconstruct.library.utils.HarvestLevels.*;
-import static slimeknights.tconstruct.tools.TinkerTraits.*;
-
-import landmaster.plustic.*;
-import landmaster.plustic.config.*;
-import landmaster.plustic.traits.*;
-import landmaster.plustic.util.*;
-import net.minecraft.util.text.*;
-import net.minecraftforge.fluids.*;
-import net.minecraftforge.fml.common.*;
-import slimeknights.mantle.util.*;
-import slimeknights.tconstruct.library.*;
-import slimeknights.tconstruct.library.materials.*;
-import slimeknights.tconstruct.library.smeltery.*;
-import slimeknights.tconstruct.library.traits.*;
-
-public class ModuleTF implements IModule {
-
- public void init() {
- if (Config.thermalFoundation && Loader.isModLoaded("thermalfoundation")) {
- // START MATERIALS
-
- Material lumium = new Material("lumium_plustic", TextFormatting.YELLOW);
- lumium.addTrait(Illuminati.illuminati);
- new ModifierRegisterPromise("glowing").thenAccept(modifier -> lumium.addTrait((ITrait)modifier)); // since Glowing is also a Trait
- lumium.addItem("ingotLumium", 1, Material.VALUE_Ingot);
- lumium.setCraftable(false).setCastable(true);
- Utils.setDispItem(lumium, "ingotLumium");
- PlusTiC.proxy.setRenderInfo(lumium, 0xFFFF7F);
-
- lumium.setFluid(FluidRegistry.getFluid("lumium"));
-
- TinkerRegistry.addMaterialStats(lumium,
- new HeadMaterialStats(830, 7f, 6.5f, COBALT),
- new HandleMaterialStats(1.1f, 40),
- new ExtraMaterialStats(60),
- new BowMaterialStats(1.5f, 1.8f, 4));
- PlusTiC.materials.put("lumium", lumium);
-
- Material signalum = new Material("signalum_plustic", TextFormatting.RED);
- signalum.addTrait(BloodyMary.bloodymary);
- signalum.addItem("ingotSignalum", 1, Material.VALUE_Ingot);
- signalum.setCraftable(false).setCastable(true);
- Utils.setDispItem(signalum, "ingotSignalum");
- PlusTiC.proxy.setRenderInfo(signalum, 0xD84100);
-
- signalum.setFluid(FluidRegistry.getFluid("signalum"));
-
- TinkerRegistry.addMaterialStats(signalum,
- new HeadMaterialStats(690, 7.5f, 5.2f, OBSIDIAN),
- new HandleMaterialStats(1.2f, 0),
- new ExtraMaterialStats(55),
- new BowMaterialStats(1.2f, 1.6f, 4.4f));
- PlusTiC.materials.put("signalum", signalum);
-
- Material platinum = new Material("platinum_plustic", TextFormatting.BLUE);
- platinum.addTrait(Global.global, HEAD);
- platinum.addTrait(Heavy.heavy);
- platinum.addTrait(Anticorrosion.anticorrosion);
- platinum.addItem("ingotPlatinum", 1, Material.VALUE_Ingot);
- platinum.setCraftable(false).setCastable(true);
- Utils.setDispItem(platinum, "ingotPlatinum");
- PlusTiC.proxy.setRenderInfo(platinum, 0xB7E7FF);
-
- platinum.setFluid(FluidRegistry.getFluid("platinum"));
-
- TinkerRegistry.addMaterialStats(platinum, new HeadMaterialStats(720, 8, 6, COBALT),
- new HandleMaterialStats(1.05f, -5),
- new ExtraMaterialStats(60),
- new BowMaterialStats(0.85f, 1.8f, 8));
-
- PlusTiC.materials.put("platinum", platinum);
-
- Material enderium = new Material("enderium_plustic", TextFormatting.DARK_GREEN);
- enderium.addTrait(Portly.portly, HEAD);
- enderium.addTrait(Global.global);
- enderium.addTrait(enderference);
- enderium.addTrait(endspeed, PROJECTILE);
- enderium.addTrait(endspeed, SHAFT);
- enderium.addItem("ingotEnderium", 1, Material.VALUE_Ingot);
- enderium.setCraftable(false).setCastable(true);
- Utils.setDispItem(enderium, "ingotEnderium");
- PlusTiC.proxy.setRenderInfo(enderium, 0x007068);
-
- enderium.setFluid(FluidRegistry.getFluid("enderium"));
-
- TinkerRegistry.addMaterialStats(enderium,
- new HeadMaterialStats(800, 7.5f, 7, COBALT),
- new HandleMaterialStats(1.05f, -5),
- new ExtraMaterialStats(65),
- new BowMaterialStats(0.9f, 1.9f, 8),
- new ArrowShaftMaterialStats(1, 12));
-
- PlusTiC.materials.put("enderium", enderium);
- }
- }
-
- @Override
- public void init2() {
- if (Config.thermalFoundation && Loader.isModLoaded("thermalfoundation")
- && Config.pyrotheumSmelt) {
- // SMELTERY FUEL
- Fluid pyrotheum = FluidRegistry.getFluid("pyrotheum");
- TinkerRegistry.registerSmelteryFuel(new FluidStack(pyrotheum, 50), 400);
- }
- if (Config.thermalFoundation && Loader.isModLoaded("thermalfoundation")) {
- // FETCH FLUIDS
- Fluid redstoneFluid = FluidRegistry.getFluid("redstone");
- Fluid enderFluid = FluidRegistry.getFluid("ender");
- Fluid glowstoneFluid = FluidRegistry.getFluid("glowstone");
-
- if (Config.tfMelt) {
- TinkerRegistry.registerMelting(new MeltingRecipe(new RecipeMatch.Oredict("dustRedstone", 1, 100), redstoneFluid, 1020));
- TinkerRegistry.registerMelting(new MeltingRecipe(new RecipeMatch.Oredict("blockRedstone", 1, 900), redstoneFluid, 1020));
- TinkerRegistry.registerMelting(new MeltingRecipe(new RecipeMatch.Oredict("dustGlowstone", 1, 250), glowstoneFluid, 1020));
- TinkerRegistry.registerMelting(new MeltingRecipe(new RecipeMatch.Oredict("glowstone", 1, 1000), glowstoneFluid, 1020));
- TinkerRegistry.registerMelting(new MeltingRecipe(new RecipeMatch.Oredict("enderpearl", 1, 250), enderFluid, 1020));
-
- TinkerRegistry.registerMelting("oreFluidRedstone", redstoneFluid, 1000);
- TinkerRegistry.registerMelting("oreFluidGlowstone", glowstoneFluid, 1000);
- TinkerRegistry.registerMelting("oreFluidEnder", enderFluid, 1000);
-
- TinkerRegistry.registerMelting("crystalRedstone", redstoneFluid, 250);
- TinkerRegistry.registerMelting("crystalGlowstone", glowstoneFluid, 250);
- TinkerRegistry.registerMelting("crystalEnder", enderFluid, 250);
- }
- }
- }
-
-}
diff --git a/src/main/java/landmaster/plustic/modules/ModuleThaumcraft.java b/src/main/java/landmaster/plustic/modules/ModuleThaumcraft.java
deleted file mode 100644
index 12fd3093..00000000
--- a/src/main/java/landmaster/plustic/modules/ModuleThaumcraft.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package landmaster.plustic.modules;
-
-import static slimeknights.tconstruct.library.utils.HarvestLevels.*;
-
-import landmaster.plustic.*;
-import landmaster.plustic.config.*;
-import landmaster.plustic.fluids.*;
-import landmaster.plustic.traits.*;
-import landmaster.plustic.util.*;
-import net.minecraftforge.fml.common.Loader;
-import slimeknights.tconstruct.library.*;
-import slimeknights.tconstruct.library.materials.*;
-
-public class ModuleThaumcraft implements IModule {
- public void init() {
- if (Config.thaumcraft && Loader.isModLoaded("thaumcraft")) {
- Material thaumium = new Material("thaumium", 0x1E0066);
- thaumium.addTrait(Thaumic.thaumic);
- thaumium.setCraftable(false).setCastable(true);
- thaumium.addItem("ingotThaumium", 1, Material.VALUE_Ingot);
- PlusTiC.proxy.setRenderInfo(thaumium, 0x1E0066);
-
- FluidMolten thaumiumFluid = Utils.fluidMetal("thaumium", 0x1E0066);
- thaumiumFluid.setTemperature(945);
- Utils.initFluidMetal(thaumiumFluid);
- thaumium.setFluid(thaumiumFluid);
-
- TinkerRegistry.addMaterialStats(thaumium,
- new HeadMaterialStats(400, 7, 4.25f, OBSIDIAN),
- new HandleMaterialStats(1.0f, 30),
- new ExtraMaterialStats(111),
- new BowMaterialStats(0.7f, 1.3f, 7));
-
- PlusTiC.materials.put("thaumium", thaumium);
- }
- }
-}
diff --git a/src/main/java/landmaster/plustic/modules/ModuleTools.java b/src/main/java/landmaster/plustic/modules/ModuleTools.java
deleted file mode 100644
index 726cdf02..00000000
--- a/src/main/java/landmaster/plustic/modules/ModuleTools.java
+++ /dev/null
@@ -1,129 +0,0 @@
-package landmaster.plustic.modules;
-
-import java.util.*;
-
-import landmaster.plustic.*;
-import landmaster.plustic.api.*;
-import landmaster.plustic.config.*;
-import landmaster.plustic.tools.*;
-import landmaster.plustic.tools.parts.*;
-import landmaster.plustic.tools.stats.*;
-import net.minecraft.item.*;
-import net.minecraft.util.*;
-import net.minecraftforge.event.*;
-import net.minecraftforge.fml.common.Mod;
-import net.minecraftforge.fml.common.eventhandler.*;
-import slimeknights.tconstruct.library.*;
-import slimeknights.tconstruct.library.materials.*;
-import slimeknights.tconstruct.library.modifiers.*;
-import slimeknights.tconstruct.library.tinkering.*;
-import slimeknights.tconstruct.library.tools.*;
-import slimeknights.tconstruct.tools.*;
-
-@Mod.EventBusSubscriber(modid = ModInfo.MODID)
-public class ModuleTools implements IModule {
- public static ToolKatana katana;
- public static ToolLaserGun laserGun;
-
- public static ToolPart pipe_piece;
- public static ToolPart laser_medium;
- public static ToolPart battery_cell;
-
- private static final List tools = new ArrayList<>();
- private static final List toolParts = new ArrayList<>();
-
- @SubscribeEvent
- public static void initItems(RegistryEvent.Register
- event) {
- pipe_piece = new ToolPartWithStoneMold(Material.VALUE_Ingot * 4);
- pipe_piece.setTranslationKey("pipe_piece").setRegistryName("pipe_piece");
- event.getRegistry().register(pipe_piece);
- TinkerRegistry.registerToolPart(pipe_piece);
- PlusTiC.proxy.registerToolPartModel(pipe_piece);
- toolParts.add(pipe_piece);
-
- laser_medium = new ToolPartWithStoneMold(Material.VALUE_Ingot * 3);
- laser_medium.setTranslationKey("laser_medium").setRegistryName("laser_medium");
- event.getRegistry().register(laser_medium);
- TinkerRegistry.registerToolPart(laser_medium);
- PlusTiC.proxy.registerToolPartModel(laser_medium);
- toolParts.add(laser_medium);
-
- battery_cell = new ToolPartWithStoneMold(Material.VALUE_Ingot * 3);
- battery_cell.setTranslationKey("battery_cell").setRegistryName("battery_cell");
- event.getRegistry().register(battery_cell);
- TinkerRegistry.registerToolPart(battery_cell);
- PlusTiC.proxy.registerToolPartModel(battery_cell);
- toolParts.add(battery_cell);
-
- if (Config.laserGun) {
- laserGun = new ToolLaserGun();
- event.getRegistry().register(laserGun);
- TinkerRegistry.registerToolForgeCrafting(laserGun);
- PlusTiC.proxy.registerToolModel(laserGun);
-
- tools.add(laserGun);
-
- // Vanilla Tinkers Laser material stats
- TinkerRegistry.addMaterialStats(TinkerMaterials.prismarine, new LaserMediumMaterialStats(2.5f, 20));
- TinkerRegistry.addMaterialStats(TinkerMaterials.blaze, new BatteryCellMaterialStats(85000),
- new LaserMediumMaterialStats(3.2f, 17));
- TinkerRegistry.addMaterialStats(TinkerMaterials.endrod, new BatteryCellMaterialStats(260000),
- new LaserMediumMaterialStats(8.6f, 38));
- TinkerRegistry.addMaterialStats(TinkerMaterials.copper, new BatteryCellMaterialStats(55000));
- TinkerRegistry.addMaterialStats(TinkerMaterials.silver, new BatteryCellMaterialStats(75000));
- TinkerRegistry.addMaterialStats(TinkerMaterials.manyullyn, new BatteryCellMaterialStats(120000));
- }
-
- if (Config.katana) {
- katana = new ToolKatana();
- event.getRegistry().register(katana);
- TinkerRegistry.registerToolForgeCrafting(katana);
- PlusTiC.proxy.registerToolModel(katana);
-
- tools.add(katana);
- }
-
- for (final IToolPart part: getPlusTiCToolParts()) {
- for (final ToolCore tool: getPlusTiCTools()) {
- for (final PartMaterialType pmt: tool.getRequiredComponents()) {
- if (pmt.getPossibleParts().contains(part)) {
- TinkerRegistry.registerStencilTableCrafting(Pattern.setTagForPart(new ItemStack(TinkerTools.pattern), (Item)part));
- }
- }
- }
- }
-
- // for added PlusTiC tools
- // TODO add more modifier jsons
- for (IModifier modifier: new IModifier[] {
- TinkerModifiers.modBaneOfArthopods,
- TinkerModifiers.modBeheading,
- TinkerModifiers.modDiamond,
- TinkerModifiers.modEmerald,
- TinkerModifiers.modGlowing,
- TinkerModifiers.modHaste,
- TinkerModifiers.modKnockback,
- TinkerModifiers.modLuck,
- TinkerModifiers.modMendingMoss,
- TinkerModifiers.modNecrotic,
- TinkerModifiers.modReinforced,
- TinkerModifiers.modSharpness,
- TinkerModifiers.modShulking,
- TinkerModifiers.modSilktouch,
- TinkerModifiers.modSmite,
- TinkerModifiers.modSoulbound,
- TinkerModifiers.modWebbed,
- }) {
- PlusTiC.proxy.registerModifierModel(modifier,
- new ResourceLocation(ModInfo.MODID, "models/item/modifiers/"+modifier.getIdentifier()));
- }
- }
-
- public static List getPlusTiCTools() {
- return Collections.unmodifiableList(tools);
- }
-
- public static List getPlusTiCToolParts() {
- return Collections.unmodifiableList(toolParts);
- }
-}
diff --git a/src/main/java/landmaster/plustic/net/PacketBrownAbracadabra.java b/src/main/java/landmaster/plustic/net/PacketBrownAbracadabra.java
deleted file mode 100644
index 12f73ba9..00000000
--- a/src/main/java/landmaster/plustic/net/PacketBrownAbracadabra.java
+++ /dev/null
@@ -1,44 +0,0 @@
-package landmaster.plustic.net;
-
-import io.netty.buffer.*;
-import landmaster.plustic.api.*;
-import landmaster.plustic.traits.*;
-import landmaster.plustic.util.*;
-import net.minecraft.entity.player.*;
-import net.minecraft.init.*;
-import net.minecraft.nbt.*;
-import net.minecraft.util.*;
-import net.minecraft.util.text.*;
-import net.minecraft.world.*;
-import net.minecraftforge.fml.common.network.simpleimpl.*;
-import slimeknights.tconstruct.library.utils.*;
-
-public class PacketBrownAbracadabra implements IMessage {
-
- public static IMessage onMessage(PacketBrownAbracadabra message, MessageContext ctx) {
- IThreadListener mainThread = (WorldServer)ctx.getServerHandler().player.getEntityWorld();
- mainThread.addScheduledTask(() -> {
- EntityPlayerMP ep = ctx.getServerHandler().player;
- if (ep.getEntityWorld().isRemote)
- return;
- NBTTagCompound nbt = TagUtil.getTagSafe(ep.getHeldItemMainhand());
- Coord4D coord = Coord4D.fromNBT(nbt.getCompoundTag(Portal.PORTAL_NBT));
- if (TinkerUtil.hasTrait(nbt, BrownMagic.brownmagic.identifier)
- && Utils.canTeleportTo(ep, coord)) {
- Sounds.playSoundToAll(ep, SoundEvents.ENTITY_ENDERMEN_TELEPORT, 1.0f, 1.0f);
- ep.fallDistance = 0;
- Utils.teleportPlayerTo(ep, coord);
- ep.sendMessage(new TextComponentTranslation("msg.plustic.brownmagic.use"));
- }
- });
- return null;
- }
-
- @Override
- public void fromBytes(ByteBuf buf) {
- }
-
- @Override
- public void toBytes(ByteBuf buf) {
- }
-}
diff --git a/src/main/java/landmaster/plustic/net/PacketHandleToggleGui.java b/src/main/java/landmaster/plustic/net/PacketHandleToggleGui.java
deleted file mode 100644
index 0c39c6f3..00000000
--- a/src/main/java/landmaster/plustic/net/PacketHandleToggleGui.java
+++ /dev/null
@@ -1,67 +0,0 @@
-package landmaster.plustic.net;
-
-import java.util.*;
-
-import io.netty.buffer.*;
-import landmaster.plustic.api.*;
-import net.minecraft.entity.player.*;
-import net.minecraft.nbt.*;
-import net.minecraft.util.*;
-import net.minecraft.world.*;
-import net.minecraftforge.common.capabilities.Capability;
-import net.minecraftforge.common.capabilities.CapabilityInject;
-import net.minecraftforge.fml.common.network.*;
-import net.minecraftforge.fml.common.network.simpleimpl.*;
-import slimeknights.tconstruct.library.utils.*;
-
-public class PacketHandleToggleGui implements IMessage {
- @CapabilityInject(Toggle.IToggleArmor.class)
- private static Capability TOGGLE_ARMOR = null;
-
- private String identifier;
-
- public PacketHandleToggleGui() {}
- public PacketHandleToggleGui(String identifier) {
- this.identifier = identifier;
- }
-
- public static IMessage onMessage(PacketHandleToggleGui message, MessageContext ctx) {
- IThreadListener mainThread = (WorldServer)ctx.getServerHandler().player.getEntityWorld();
- mainThread.addScheduledTask(() -> {
- EntityPlayerMP ep = ctx.getServerHandler().player;
- if (ep.getEntityWorld().isRemote) {
- return;
- }
- boolean newState = false;
- if (message.identifier.startsWith(Toggle.ARMOR_FLAG) && ep.hasCapability(TOGGLE_ARMOR, null)) {
- String rawIdentifier = Toggle.rawIdentifier(message.identifier);
- Toggle.IToggleArmor cap = ep.getCapability(TOGGLE_ARMOR, null);
- Set disabled = cap.getDisabled();
- newState = disabled.contains(rawIdentifier);
- if (newState) {
- disabled.remove(rawIdentifier);
- } else {
- disabled.add(rawIdentifier);
- }
- } else {
- NBTTagCompound nbt = TagUtil.getTagSafe(ep.getHeldItemMainhand());
- newState = !Toggle.getToggleState(nbt, message.identifier);
- Toggle.setToggleState(nbt, message.identifier, newState);
- ep.getHeldItemMainhand().setTagCompound(nbt);
- ep.inventory.markDirty();
- }
- PacketHandler.INSTANCE.sendTo(new PacketUpdateToggleGui(message.identifier, newState), ep);
- });
- return null;
- }
-
- @Override
- public void fromBytes(ByteBuf buf) {
- identifier = ByteBufUtils.readUTF8String(buf);
- }
-
- @Override
- public void toBytes(ByteBuf buf) {
- ByteBufUtils.writeUTF8String(buf, identifier);
- }
-}
diff --git a/src/main/java/landmaster/plustic/net/PacketHandler.java b/src/main/java/landmaster/plustic/net/PacketHandler.java
deleted file mode 100644
index 0ce9d9fd..00000000
--- a/src/main/java/landmaster/plustic/net/PacketHandler.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package landmaster.plustic.net;
-
-import landmaster.plustic.api.*;
-import net.minecraftforge.fml.common.network.*;
-import net.minecraftforge.fml.common.network.simpleimpl.*;
-import net.minecraftforge.fml.relauncher.*;
-
-public class PacketHandler {
- public static final SimpleNetworkWrapper INSTANCE = NetworkRegistry.INSTANCE.newSimpleChannel(ModInfo.MODID);
-
- public static void init() {
- INSTANCE.registerMessage(PacketReleaseEntity::onMessage, PacketReleaseEntity.class, 0, Side.SERVER);
- INSTANCE.registerMessage(PacketHandleToggleGui::onMessage, PacketHandleToggleGui.class, 1, Side.SERVER);
- INSTANCE.registerMessage(PacketUpdateToggleGui::onMessage, PacketUpdateToggleGui.class, 2, Side.CLIENT);
- INSTANCE.registerMessage(PacketSetPortal::onMessage, PacketSetPortal.class, 3, Side.SERVER);
- INSTANCE.registerMessage(PacketBrownAbracadabra::onMessage, PacketBrownAbracadabra.class, 4, Side.SERVER);
- INSTANCE.registerMessage(PacketUpdateToolModeServer::onMessage, PacketUpdateToolModeServer.class, 5, Side.SERVER);
- INSTANCE.registerMessage(PacketLaserGunZapBlock::onMessage, PacketLaserGunZapBlock.class, 6, Side.CLIENT);
- INSTANCE.registerMessage(PacketOpenFSGui::onMessage, PacketOpenFSGui.class, 7, Side.SERVER);
- INSTANCE.registerMessage(PacketOpenMOTSGui::onMessage, PacketOpenMOTSGui.class, 8, Side.SERVER);
- INSTANCE.registerMessage(PacketPlayMOTS::onMessage, PacketPlayMOTS.class, 9, Side.CLIENT);
- INSTANCE.registerMessage(PacketStopMOTS::onMessage, PacketStopMOTS.class, 10, Side.CLIENT);
- INSTANCE.registerMessage(PacketSJKey::onMessage, PacketSJKey.class, 11, Side.SERVER);
- INSTANCE.registerMessage(PacketRequestToggleGui::onMessage, PacketRequestToggleGui.class, 12, Side.SERVER);
- INSTANCE.registerMessage(PacketOpenToggleGui::onMessage, PacketOpenToggleGui.class, 13, Side.CLIENT);
- INSTANCE.registerMessage(PacketSJSyncParticles::onMessage, PacketSJSyncParticles.class, 14, Side.CLIENT);
- INSTANCE.registerMessage(PacketUpdateTECentrifugeLiquid::onMessage, PacketUpdateTECentrifugeLiquid.class, 15, Side.CLIENT);
- INSTANCE.registerMessage(PacketUpdateTECentrifugeCoreEnergy::onMessage, PacketUpdateTECentrifugeCoreEnergy.class, 16, Side.CLIENT);
- INSTANCE.registerMessage(PacketRequestUpdateTECentrifuge::onMessage, PacketRequestUpdateTECentrifuge.class, 17, Side.SERVER);
-
- // TODO add mroe messages when needed
- }
-}
diff --git a/src/main/java/landmaster/plustic/net/PacketLaserGunZapBlock.java b/src/main/java/landmaster/plustic/net/PacketLaserGunZapBlock.java
deleted file mode 100644
index 2772f22b..00000000
--- a/src/main/java/landmaster/plustic/net/PacketLaserGunZapBlock.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package landmaster.plustic.net;
-
-import java.util.*;
-
-import io.netty.buffer.*;
-import landmaster.plustic.tools.ToolLaserGun;
-import net.minecraft.client.*;
-import net.minecraft.util.math.*;
-import net.minecraftforge.fml.common.network.simpleimpl.*;
-
-public class PacketLaserGunZapBlock implements IMessage {
- private UUID playerUUID;
- private Vec3d hitVec;
-
- public static IMessage onMessage(PacketLaserGunZapBlock packet, MessageContext ctx) {
- Minecraft.getMinecraft().addScheduledTask(() -> {
- ToolLaserGun.proxy.addToZapBlockRendering(Minecraft.getMinecraft().world.getPlayerEntityByUUID(packet.playerUUID), packet.hitVec);
- });
- return null;
- }
-
- public PacketLaserGunZapBlock() {
- this(Vec3d.ZERO, null);
- }
- public PacketLaserGunZapBlock(Vec3d hitVec, UUID playerUUID) {
- this.hitVec = hitVec;
- this.playerUUID = playerUUID;
- }
-
- @Override
- public void fromBytes(ByteBuf buf) {
- hitVec = new Vec3d(buf.readDouble(), buf.readDouble(), buf.readDouble());
- playerUUID = new UUID(buf.readLong(), buf.readLong());
- }
-
- @Override
- public void toBytes(ByteBuf buf) {
- buf.writeDouble(hitVec.x).writeDouble(hitVec.y).writeDouble(hitVec.z);
- buf.writeLong(playerUUID.getMostSignificantBits()).writeLong(playerUUID.getLeastSignificantBits());
- }
-
-}
diff --git a/src/main/java/landmaster/plustic/net/PacketOpenFSGui.java b/src/main/java/landmaster/plustic/net/PacketOpenFSGui.java
deleted file mode 100644
index 15eb1ca6..00000000
--- a/src/main/java/landmaster/plustic/net/PacketOpenFSGui.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package landmaster.plustic.net;
-
-import io.netty.buffer.*;
-import landmaster.plustic.*;
-import landmaster.plustic.gui.handler.*;
-import net.minecraft.entity.player.*;
-import net.minecraft.util.*;
-import net.minecraft.util.math.*;
-import net.minecraft.world.*;
-import net.minecraftforge.fml.common.network.simpleimpl.*;
-
-public class PacketOpenFSGui implements IMessage {
- public static IMessage onMessage(PacketOpenFSGui packet, MessageContext ctx) {
- IThreadListener mainThread = (WorldServer)ctx.getServerHandler().player.getEntityWorld();
- mainThread.addScheduledTask(() -> {
- EntityPlayer ep = ctx.getServerHandler().player;
- BlockPos bp = ep.getPosition();
- ep.openGui(PlusTiC.INSTANCE, PTGuiHandler.FRUITSALAD, ep.world,
- bp.getX(), bp.getY(), bp.getZ());
- });
- return null;
- }
-
- @Override
- public void fromBytes(ByteBuf buf) {}
-
- @Override
- public void toBytes(ByteBuf buf) {}
-
-}
diff --git a/src/main/java/landmaster/plustic/net/PacketOpenMOTSGui.java b/src/main/java/landmaster/plustic/net/PacketOpenMOTSGui.java
deleted file mode 100644
index bafb8dc7..00000000
--- a/src/main/java/landmaster/plustic/net/PacketOpenMOTSGui.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package landmaster.plustic.net;
-
-import io.netty.buffer.*;
-import landmaster.plustic.*;
-import landmaster.plustic.gui.handler.*;
-import net.minecraft.entity.player.*;
-import net.minecraft.util.*;
-import net.minecraft.util.math.*;
-import net.minecraft.world.*;
-import net.minecraftforge.fml.common.network.simpleimpl.*;
-
-public class PacketOpenMOTSGui implements IMessage {
- public static IMessage onMessage(PacketOpenMOTSGui packet, MessageContext ctx) {
- IThreadListener mainThread = (WorldServer)ctx.getServerHandler().player.getEntityWorld();
- mainThread.addScheduledTask(() -> {
- EntityPlayer ep = ctx.getServerHandler().player;
- BlockPos bp = ep.getPosition();
- ep.openGui(PlusTiC.INSTANCE, PTGuiHandler.MOTS, ep.world,
- bp.getX(), bp.getY(), bp.getZ());
- });
- return null;
- }
-
- @Override
- public void fromBytes(ByteBuf buf) {}
-
- @Override
- public void toBytes(ByteBuf buf) {}
-
-}
diff --git a/src/main/java/landmaster/plustic/net/PacketOpenToggleGui.java b/src/main/java/landmaster/plustic/net/PacketOpenToggleGui.java
deleted file mode 100644
index 81ed5b8b..00000000
--- a/src/main/java/landmaster/plustic/net/PacketOpenToggleGui.java
+++ /dev/null
@@ -1,53 +0,0 @@
-package landmaster.plustic.net;
-
-import java.util.*;
-
-import io.netty.buffer.*;
-import landmaster.plustic.api.*;
-import net.minecraft.client.*;
-import net.minecraftforge.fml.common.*;
-import net.minecraftforge.fml.common.network.*;
-import net.minecraftforge.fml.common.network.simpleimpl.*;
-
-public class PacketOpenToggleGui implements IMessage {
- private Collection abilities;
-
- public PacketOpenToggleGui() {}
- public PacketOpenToggleGui(Collection abilities) {
- this.abilities = abilities;
- }
-
- public static IMessage onMessage(PacketOpenToggleGui message, MessageContext ctx) {
- proxy.handle(message, ctx);
- return null;
- }
-
- @SidedProxy(clientSide = "landmaster.plustic.net.PacketOpenToggleGui$ProxyClient", serverSide = "landmaster.plustic.net.PacketOpenToggleGui$Proxy")
- public static Proxy proxy;
-
- public static class Proxy {
- public void handle(PacketOpenToggleGui message, MessageContext ctx) {}
- }
- public static class ProxyClient extends Proxy {
- @Override
- public void handle(PacketOpenToggleGui message, MessageContext ctx) {
- Minecraft.getMinecraft().addScheduledTask(() -> {
- Minecraft.getMinecraft().displayGuiScreen(new Toggle.Gui(Minecraft.getMinecraft().player, message.abilities));
- });
- }
- }
-
- @Override
- public void fromBytes(ByteBuf buf) {
- int sz = buf.readInt();
- abilities = new ArrayList<>(sz);
- for (int i=0; i MOTS_ITEM_CAP = null;
-
- private EntityPlayer player;
- private ResourceLocation soundLoc;
-
- public PacketPlayMOTS() {}
- public PacketPlayMOTS(EntityPlayer player, ResourceLocation soundLoc) {
- this.player = player;
- this.soundLoc = soundLoc;
- }
-
- public static IMessage onMessage(PacketPlayMOTS packet, MessageContext ctx) {
- Minecraft.getMinecraft().addScheduledTask(() -> {
- if (packet.player != null && packet.player.getHeldItemMainhand().hasCapability(MOTS_ITEM_CAP, null)) {
- MusicOfTheSpheres.IMOTSItemHandler cap = packet.player.getHeldItemMainhand()
- .getCapability(MOTS_ITEM_CAP, null);
- cap.play(packet.player, ForgeRegistries.SOUND_EVENTS.getValue(packet.soundLoc));
- }
- });
- return null;
- }
-
- @Override
- public void fromBytes(ByteBuf buf) {
- this.player = Minecraft.getMinecraft().world.getPlayerEntityByUUID(new UUID(buf.readLong(), buf.readLong()));
- this.soundLoc = new ResourceLocation(ByteBufUtils.readUTF8String(buf));
- }
-
- @Override
- public void toBytes(ByteBuf buf) {
- buf.writeLong(this.player.getPersistentID().getMostSignificantBits());
- buf.writeLong(this.player.getPersistentID().getLeastSignificantBits());
- ByteBufUtils.writeUTF8String(buf, this.soundLoc.toString());
- }
-
-}
diff --git a/src/main/java/landmaster/plustic/net/PacketReleaseEntity.java b/src/main/java/landmaster/plustic/net/PacketReleaseEntity.java
deleted file mode 100644
index da67a55f..00000000
--- a/src/main/java/landmaster/plustic/net/PacketReleaseEntity.java
+++ /dev/null
@@ -1,64 +0,0 @@
-package landmaster.plustic.net;
-
-import io.netty.buffer.*;
-import landmaster.plustic.api.*;
-import landmaster.plustic.traits.*;
-import net.minecraft.entity.*;
-import net.minecraft.entity.player.*;
-import net.minecraft.init.*;
-import net.minecraft.nbt.*;
-import net.minecraft.util.*;
-import net.minecraft.util.math.*;
-import net.minecraft.util.text.*;
-import net.minecraft.world.*;
-import net.minecraftforge.fml.common.network.simpleimpl.*;
-import slimeknights.tconstruct.library.utils.*;
-
-public class PacketReleaseEntity implements IMessage {
- public static IMessage onMessage(PacketReleaseEntity message, MessageContext ctx) {
- IThreadListener mainThread = (WorldServer)ctx.getServerHandler().player.getEntityWorld();
- mainThread.addScheduledTask(() -> {
- EntityPlayer ep = ctx.getServerHandler().player;
- Vec3d eye = ep.getPositionVector().add(0, ep.getEyeHeight(), 0);
- Vec3d look = ep.getLookVec().scale(5);
- RayTraceResult rtr = ep.getEntityWorld().rayTraceBlocks(eye, eye.add(look));
- NBTTagCompound nbt = TagUtil.getTagSafe(ep.getHeldItemMainhand());
- if (ep.getEntityWorld().isRemote // for good measure
- || rtr == null || rtr.sideHit == null
- || ep.getHeldItemMainhand() == null
- || !TinkerUtil.hasTrait(nbt, Portly.portly.getIdentifier())
- || !nbt.hasKey("portlyGentleman", 10)) return;
-
- Entity ent = EntityList.createEntityFromNBT(
- nbt.getCompoundTag("portlyGentleman"), ep.getEntityWorld());
- if (ent == null) return;
-
- int offsetX = rtr.sideHit.getXOffset();
- int offsetY = rtr.sideHit == EnumFacing.DOWN ? -1 : 0;
- int offsetZ = rtr.sideHit.getZOffset();
- AxisAlignedBB bb = ent.getEntityBoundingBox();
- ent.setLocationAndAngles(
- rtr.hitVec.x+(bb.maxX-bb.minX)*0.5*offsetX,
- rtr.hitVec.y+(bb.maxY-bb.minY)*0.5*offsetY,
- rtr.hitVec.z+(bb.maxZ-bb.minZ)*0.5*offsetZ,
- ep.getRNG().nextFloat()*360, 0);
-
- if (!ep.getEntityWorld().spawnEntity(ent)) return;
- if (ent instanceof EntityLiving) ((EntityLiving)ent).playLivingSound();
- String id = nbt.getCompoundTag("portlyGentleman").getString("id");
- nbt.removeTag("portlyGentleman");
- ep.getHeldItemMainhand().setTagCompound(nbt);
- Sounds.playSoundToAll(ep, SoundEvents.ENTITY_ENDERMEN_TELEPORT, 1.0f, 1.0f);
- ep.swingArm(EnumHand.MAIN_HAND);
- ep.sendMessage(new TextComponentTranslation(
- "msg.plustic.portlymodifier.unset", id));
- });
- return null;
- }
-
- @Override
- public void fromBytes(ByteBuf buf) {}
-
- @Override
- public void toBytes(ByteBuf buf) {}
-}
diff --git a/src/main/java/landmaster/plustic/net/PacketRequestToggleGui.java b/src/main/java/landmaster/plustic/net/PacketRequestToggleGui.java
deleted file mode 100644
index a36cb4ae..00000000
--- a/src/main/java/landmaster/plustic/net/PacketRequestToggleGui.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package landmaster.plustic.net;
-
-import java.util.*;
-import java.util.stream.*;
-
-import io.netty.buffer.*;
-import landmaster.plustic.api.*;
-import net.minecraft.util.*;
-import net.minecraft.world.*;
-import net.minecraftforge.fml.common.network.simpleimpl.*;
-
-public class PacketRequestToggleGui implements IMessage {
- public static IMessage onMessage(PacketRequestToggleGui message, MessageContext ctx) {
- IThreadListener mainThread = (WorldServer)ctx.getServerHandler().player.getEntityWorld();
- mainThread.addScheduledTask(() -> {
- List toggleableArmor = Toggle.getToggleableArmor(ctx.getServerHandler().player).collect(Collectors.toList());
- if (Toggle.canToggle(ctx.getServerHandler().player.getHeldItemMainhand()) || !toggleableArmor.isEmpty()) {
- PacketHandler.INSTANCE.sendTo(new PacketOpenToggleGui(toggleableArmor), ctx.getServerHandler().player);
- }
- });
- return null;
- }
-
- @Override
- public void fromBytes(ByteBuf buf) {}
-
- @Override
- public void toBytes(ByteBuf buf) {}
-
-}
diff --git a/src/main/java/landmaster/plustic/net/PacketRequestUpdateTECentrifuge.java b/src/main/java/landmaster/plustic/net/PacketRequestUpdateTECentrifuge.java
deleted file mode 100644
index bf9a1fdc..00000000
--- a/src/main/java/landmaster/plustic/net/PacketRequestUpdateTECentrifuge.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package landmaster.plustic.net;
-
-import io.netty.buffer.*;
-import landmaster.plustic.tile.*;
-import landmaster.plustic.util.*;
-import net.minecraft.tileentity.*;
-import net.minecraftforge.energy.*;
-import net.minecraftforge.fml.common.network.simpleimpl.*;
-
-public class PacketRequestUpdateTECentrifuge implements IMessage {
- private Coord4D coord;
-
- public PacketRequestUpdateTECentrifuge() {}
- public PacketRequestUpdateTECentrifuge(Coord4D coord) { this.coord = coord; }
-
-
- public static IMessage onMessage(PacketRequestUpdateTECentrifuge packet, MessageContext ctx) {
- TileEntity te = packet.coord.TE();
- if (te instanceof TECentrifugeCore) {
- PacketHandler.INSTANCE.sendTo(new PacketUpdateTECentrifugeCoreEnergy(packet.coord, te.getCapability(CapabilityEnergy.ENERGY, null).getEnergyStored()), ctx.getServerHandler().player);
- }
- if (te instanceof TECentrifuge) {
- PacketHandler.INSTANCE.sendTo(new PacketUpdateTECentrifugeLiquid(packet.coord, ((TECentrifuge) te).getTank().getFluid()), ctx.getServerHandler().player);
- }
- return null;
- }
-
- @Override
- public void fromBytes(ByteBuf buf) {
- coord = Coord4D.fromByteBuf(buf);
- }
-
- @Override
- public void toBytes(ByteBuf buf) {
- coord.toByteBuf(buf);
- }
-
-}
diff --git a/src/main/java/landmaster/plustic/net/PacketSJKey.java b/src/main/java/landmaster/plustic/net/PacketSJKey.java
deleted file mode 100644
index 0f126d2a..00000000
--- a/src/main/java/landmaster/plustic/net/PacketSJKey.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package landmaster.plustic.net;
-
-import io.netty.buffer.*;
-import landmaster.plustic.modifiers.armor.*;
-import landmaster.plustic.util.Utils;
-import net.minecraft.inventory.*;
-import net.minecraft.item.*;
-import net.minecraft.util.*;
-import net.minecraft.world.*;
-import net.minecraftforge.fml.common.network.simpleimpl.*;
-
-public class PacketSJKey implements IMessage {
- public PacketSJKey() {}
- public PacketSJKey(JetpackPancakeHippos.JetpackSettings setting) { this.setting = setting; }
-
- private JetpackPancakeHippos.JetpackSettings setting;
-
- public static IMessage onMessage(PacketSJKey packet, MessageContext ctx) {
- IThreadListener mainThread = (WorldServer)ctx.getServerHandler().player.getEntityWorld();
- mainThread.addScheduledTask(() -> {
- ItemStack stack = ctx.getServerHandler().player.getItemStackFromSlot(EntityEquipmentSlot.CHEST);
- Utils.getModifiers(stack).stream()
- .filter(trait -> trait instanceof JetpackPancakeHippos)
- .findAny().ifPresent(trait -> {
- packet.setting.setOff(stack, !packet.setting.isOff(stack));
- });
- });
- return null;
- }
-
- @Override
- public void fromBytes(ByteBuf buf) {
- setting = JetpackPancakeHippos.JetpackSettings.values()[buf.readInt()];
- }
-
- @Override
- public void toBytes(ByteBuf buf) {
- buf.writeInt(setting.ordinal());
- }
-
-}
diff --git a/src/main/java/landmaster/plustic/net/PacketSJSyncParticles.java b/src/main/java/landmaster/plustic/net/PacketSJSyncParticles.java
deleted file mode 100644
index e8dd18ff..00000000
--- a/src/main/java/landmaster/plustic/net/PacketSJSyncParticles.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package landmaster.plustic.net;
-
-import io.netty.buffer.*;
-import landmaster.plustic.modifiers.armor.*;
-import net.minecraft.client.*;
-import net.minecraft.entity.*;
-import net.minecraftforge.fml.common.network.simpleimpl.*;
-import tonius.simplyjetpacks.setup.*;
-
-public class PacketSJSyncParticles implements IMessage {
- private int entityId;
- private int particleId;
-
- public PacketSJSyncParticles() {}
- public PacketSJSyncParticles(int entityId, int particleId) {
- this.entityId = entityId;
- this.particleId = particleId;
- }
-
- public static IMessage onMessage(PacketSJSyncParticles packet, MessageContext ctx) {
- Minecraft.getMinecraft().addScheduledTask(() -> {
- Entity entity = Minecraft.getMinecraft().world.getEntityByID(packet.entityId);
- if (entity instanceof EntityLivingBase && entity != Minecraft.getMinecraft().player) {
- JetpackPancakeHippos.processJetpackUpdate(packet.entityId, packet.particleId >= 0 ? ParticleType.values()[packet.particleId] : null);
- }
- });
- return null;
- }
-
- @Override
- public void fromBytes(ByteBuf buf) {
- this.entityId = buf.readInt();
- this.particleId = buf.readInt();
- }
-
- @Override
- public void toBytes(ByteBuf buf) {
- buf.writeInt(this.entityId);
- buf.writeInt(this.particleId);
- }
-
-}
diff --git a/src/main/java/landmaster/plustic/net/PacketSetPortal.java b/src/main/java/landmaster/plustic/net/PacketSetPortal.java
deleted file mode 100644
index 78552636..00000000
--- a/src/main/java/landmaster/plustic/net/PacketSetPortal.java
+++ /dev/null
@@ -1,63 +0,0 @@
-package landmaster.plustic.net;
-
-import io.netty.buffer.*;
-import landmaster.plustic.api.*;
-import landmaster.plustic.util.*;
-import net.minecraft.entity.player.*;
-import net.minecraft.nbt.*;
-import net.minecraft.util.*;
-import net.minecraft.util.math.*;
-import net.minecraft.util.text.*;
-import net.minecraft.world.*;
-import net.minecraftforge.common.capabilities.Capability;
-import net.minecraftforge.common.capabilities.CapabilityInject;
-import net.minecraftforge.fml.common.network.simpleimpl.*;
-import slimeknights.tconstruct.library.utils.*;
-
-public class PacketSetPortal implements IMessage {
- @CapabilityInject(Portal.IPortalArmor.class)
- private static Capability PORTAL_ARMOR = null;
-
- public static IMessage onMessage(PacketSetPortal message, MessageContext ctx) {
- IThreadListener mainThread = (WorldServer)ctx.getServerHandler().player.getEntityWorld();
- mainThread.addScheduledTask(() -> {
- EntityPlayerMP ep = ctx.getServerHandler().player;
- if (ep.getEntityWorld().isRemote) {
- return;
- }
- Vec3d eye = ep.getPositionVector().add(0, ep.getEyeHeight(), 0);
- Vec3d look = ep.getLookVec().scale(5);
- RayTraceResult rtr = ep.getEntityWorld().rayTraceBlocks(eye, eye.add(look));
- if (rtr == null || rtr.getBlockPos() == null) return;
- if (!ep.isSneaking()) {
- NBTTagCompound nbt = TagUtil.getTagSafe(ep.getHeldItemMainhand());
- if (Portal.canUse(nbt)) {
- NBTTagCompound nick = new NBTTagCompound();
- nick.setInteger("x", rtr.getBlockPos().getX());
- nick.setInteger("y", rtr.getBlockPos().getY());
- nick.setInteger("z", rtr.getBlockPos().getZ());
- nick.setInteger("dim", ep.getEntityWorld().provider.getDimension());
- nbt.setTag(Portal.PORTAL_NBT, nick);
- ep.getHeldItemMainhand().setTagCompound(nbt);
- ep.sendMessage(new TextComponentTranslation(
- "msg.plustic.portal.set", nick.getInteger("x"),
- nick.getInteger("y"), nick.getInteger("z"), nick.getInteger("dim")));
- }
- } else if (ep.hasCapability(PORTAL_ARMOR, null)) {
- Coord4D newCoord = new Coord4D(rtr.getBlockPos(), ep.getEntityWorld());
- ep.getCapability(PORTAL_ARMOR, null).location(newCoord);
- ep.sendMessage(new TextComponentTranslation(
- "msg.plustic.portal.armor.set", newCoord.xCoord, newCoord.yCoord, newCoord.zCoord, newCoord.dimensionId));
- }
- });
- return null;
- }
-
- @Override
- public void fromBytes(ByteBuf buf) {
- }
-
- @Override
- public void toBytes(ByteBuf buf) {
- }
-}
diff --git a/src/main/java/landmaster/plustic/net/PacketStopMOTS.java b/src/main/java/landmaster/plustic/net/PacketStopMOTS.java
deleted file mode 100644
index 48042af4..00000000
--- a/src/main/java/landmaster/plustic/net/PacketStopMOTS.java
+++ /dev/null
@@ -1,45 +0,0 @@
-package landmaster.plustic.net;
-
-import java.util.UUID;
-
-import io.netty.buffer.*;
-import landmaster.plustic.traits.*;
-import net.minecraft.client.Minecraft;
-import net.minecraft.entity.player.*;
-import net.minecraftforge.common.capabilities.*;
-import net.minecraftforge.fml.common.network.simpleimpl.*;
-
-public class PacketStopMOTS implements IMessage {
- @CapabilityInject(MusicOfTheSpheres.IMOTSItemHandler.class)
- private static Capability MOTS_ITEM_CAP = null;
-
- private EntityPlayer player;
-
- public PacketStopMOTS() {}
- public PacketStopMOTS(EntityPlayer player) {
- this.player = player;
- }
-
- public static IMessage onMessage(PacketStopMOTS packet, MessageContext ctx) {
- Minecraft.getMinecraft().addScheduledTask(() -> {
- if (packet.player != null && packet.player.getHeldItemMainhand().hasCapability(MOTS_ITEM_CAP, null)) {
- MusicOfTheSpheres.IMOTSItemHandler cap = packet.player.getHeldItemMainhand()
- .getCapability(MOTS_ITEM_CAP, null);
- cap.stop(packet.player);
- }
- });
- return null;
- }
-
- @Override
- public void fromBytes(ByteBuf buf) {
- this.player = Minecraft.getMinecraft().world.getPlayerEntityByUUID(new UUID(buf.readLong(), buf.readLong()));
- }
-
- @Override
- public void toBytes(ByteBuf buf) {
- buf.writeLong(this.player.getPersistentID().getMostSignificantBits());
- buf.writeLong(this.player.getPersistentID().getLeastSignificantBits());
- }
-
-}
diff --git a/src/main/java/landmaster/plustic/net/PacketUpdateTECentrifugeCoreEnergy.java b/src/main/java/landmaster/plustic/net/PacketUpdateTECentrifugeCoreEnergy.java
deleted file mode 100644
index 44fd4c70..00000000
--- a/src/main/java/landmaster/plustic/net/PacketUpdateTECentrifugeCoreEnergy.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package landmaster.plustic.net;
-
-import io.netty.buffer.*;
-import landmaster.plustic.tile.*;
-import landmaster.plustic.util.*;
-import net.minecraft.client.*;
-import net.minecraft.tileentity.*;
-import net.minecraftforge.fml.common.network.simpleimpl.*;
-
-public class PacketUpdateTECentrifugeCoreEnergy implements IMessage {
- private Coord4D pos;
- private int energy;
-
- public PacketUpdateTECentrifugeCoreEnergy() {}
- public PacketUpdateTECentrifugeCoreEnergy(Coord4D pos, int energy) {
- this.pos = pos;
- this.energy = energy;
- }
-
- public static IMessage onMessage(PacketUpdateTECentrifugeCoreEnergy packet, MessageContext ctx) {
- Minecraft.getMinecraft().addScheduledTask(() -> {
- if (Minecraft.getMinecraft().world.provider.getDimension() != packet.pos.dimensionId) return;
- TileEntity te = Minecraft.getMinecraft().world.getTileEntity(packet.pos.pos());
- if (te instanceof TECentrifugeCore) {
- ((TECentrifugeCore)te).setEnergy(packet.energy);
- }
- });
- return null;
- }
-
- @Override
- public void fromBytes(ByteBuf buf) {
- pos = Coord4D.fromByteBuf(buf);
- energy = buf.readInt();
- }
-
- @Override
- public void toBytes(ByteBuf buf) {
- pos.toByteBuf(buf);
- buf.writeInt(energy);
- }
-
-}
diff --git a/src/main/java/landmaster/plustic/net/PacketUpdateTECentrifugeLiquid.java b/src/main/java/landmaster/plustic/net/PacketUpdateTECentrifugeLiquid.java
deleted file mode 100644
index fbbc9a6d..00000000
--- a/src/main/java/landmaster/plustic/net/PacketUpdateTECentrifugeLiquid.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package landmaster.plustic.net;
-
-import io.netty.buffer.*;
-import landmaster.plustic.tile.*;
-import landmaster.plustic.util.*;
-import net.minecraft.client.*;
-import net.minecraft.nbt.*;
-import net.minecraft.tileentity.*;
-import net.minecraftforge.fluids.*;
-import net.minecraftforge.fml.common.network.*;
-import net.minecraftforge.fml.common.network.simpleimpl.*;
-
-public class PacketUpdateTECentrifugeLiquid implements IMessage {
- private Coord4D pos;
- private FluidStack input;
-
- public PacketUpdateTECentrifugeLiquid() {}
- public PacketUpdateTECentrifugeLiquid(Coord4D pos, FluidStack input) {
- this.pos = pos;
- this.input = input;
- }
-
- public static IMessage onMessage(PacketUpdateTECentrifugeLiquid message, MessageContext ctx) {
- Minecraft.getMinecraft().addScheduledTask(() -> {
- if (Minecraft.getMinecraft().world.provider.getDimension() != message.pos.dimensionId) return;
- TileEntity te = Minecraft.getMinecraft().world.getTileEntity(message.pos.pos());
- if (te instanceof TECentrifuge) {
- //System.out.println(message.input == null ? 0 : message.input.amount);
- ((TECentrifuge)te).getTank().setFluid(message.input);
- }
- });
- return null;
- }
-
- @Override
- public void fromBytes(ByteBuf buf) {
- pos = Coord4D.fromByteBuf(buf);
- input = FluidStack.loadFluidStackFromNBT(ByteBufUtils.readTag(buf));
- }
-
- @Override
- public void toBytes(ByteBuf buf) {
- pos.toByteBuf(buf);
- ByteBufUtils.writeTag(buf, input != null ? input.writeToNBT(new NBTTagCompound()) : null);
- }
-
-}
diff --git a/src/main/java/landmaster/plustic/net/PacketUpdateToggleGui.java b/src/main/java/landmaster/plustic/net/PacketUpdateToggleGui.java
deleted file mode 100644
index 10df676a..00000000
--- a/src/main/java/landmaster/plustic/net/PacketUpdateToggleGui.java
+++ /dev/null
@@ -1,55 +0,0 @@
-package landmaster.plustic.net;
-
-import java.util.*;
-
-import io.netty.buffer.*;
-import landmaster.plustic.api.*;
-import net.minecraft.client.*;
-import net.minecraftforge.common.capabilities.*;
-import net.minecraftforge.fml.common.network.*;
-import net.minecraftforge.fml.common.network.simpleimpl.*;
-
-public class PacketUpdateToggleGui implements IMessage {
- @CapabilityInject(Toggle.IToggleArmor.class)
- private static Capability TOGGLE_ARMOR = null;
-
- private String identifier;
- private boolean value;
-
- public PacketUpdateToggleGui() {}
- public PacketUpdateToggleGui(String identifier, boolean value) {
- this.identifier = identifier;
- this.value = value;
- }
-
- public static IMessage onMessage(PacketUpdateToggleGui message, MessageContext ctx) {
- Minecraft.getMinecraft().addScheduledTask(() -> {
- if (Minecraft.getMinecraft().currentScreen instanceof Toggle.Gui) {
- ((Toggle.Gui)Minecraft.getMinecraft().currentScreen).update(message.identifier, message.value);
- }
- if (Minecraft.getMinecraft().player.hasCapability(TOGGLE_ARMOR, null)) {
- Toggle.IToggleArmor cap = Minecraft.getMinecraft().player.getCapability(TOGGLE_ARMOR, null);
- Set disabled = cap.getDisabled();
- String rawIdentifier = Toggle.rawIdentifier(message.identifier);
- if (message.value) {
- disabled.remove(rawIdentifier);
- } else {
- disabled.add(rawIdentifier);
- }
- }
- });
- return null;
- }
-
- @Override
- public void fromBytes(ByteBuf buf) {
- identifier = ByteBufUtils.readUTF8String(buf);
- value = buf.readBoolean();
- }
-
- @Override
- public void toBytes(ByteBuf buf) {
- ByteBufUtils.writeUTF8String(buf, identifier);
- buf.writeBoolean(value);
- }
-}
diff --git a/src/main/java/landmaster/plustic/net/PacketUpdateToolModeServer.java b/src/main/java/landmaster/plustic/net/PacketUpdateToolModeServer.java
deleted file mode 100644
index c7f5451b..00000000
--- a/src/main/java/landmaster/plustic/net/PacketUpdateToolModeServer.java
+++ /dev/null
@@ -1,29 +0,0 @@
-package landmaster.plustic.net;
-
-import io.netty.buffer.*;
-import landmaster.plustic.tools.*;
-import net.minecraft.util.*;
-import net.minecraft.util.text.*;
-import net.minecraft.world.*;
-import net.minecraftforge.fml.common.network.simpleimpl.*;
-
-public class PacketUpdateToolModeServer implements IMessage {
-
- public static IMessage onMessage(PacketUpdateToolModeServer packet, MessageContext ctx) {
- IThreadListener mainThread = (WorldServer)ctx.getServerHandler().player.getEntityWorld();
- mainThread.addScheduledTask(() -> {
- final Enum> enm = IToggleTool.rotateHeldItemMode(ctx.getServerHandler().player);
- if (enm instanceof IEnumL10n) {
- ctx.getServerHandler().player.sendMessage(new TextComponentTranslation("msg.plustic.tool_mode", new TextComponentTranslation(((IEnumL10n)enm).getUnlocName())));
- }
- });
- return null;
- }
-
- @Override
- public void fromBytes(ByteBuf buf) {}
-
- @Override
- public void toBytes(ByteBuf buf) {}
-
-}
diff --git a/src/main/java/landmaster/plustic/proxy/ClientProxy.java b/src/main/java/landmaster/plustic/proxy/ClientProxy.java
deleted file mode 100644
index 051a87b0..00000000
--- a/src/main/java/landmaster/plustic/proxy/ClientProxy.java
+++ /dev/null
@@ -1,204 +0,0 @@
-package landmaster.plustic.proxy;
-
-import java.util.*;
-
-import javax.annotation.*;
-import landmaster.plustic.api.*;
-import landmaster.plustic.api.Sounds;
-import landmaster.plustic.entity.*;
-import landmaster.plustic.entity.render.*;
-import landmaster.plustic.modules.*;
-import landmaster.plustic.traits.*;
-import landmaster.plustic.util.*;
-import net.minecraft.client.*;
-import net.minecraft.client.audio.*;
-import net.minecraft.client.renderer.*;
-import net.minecraft.client.renderer.block.model.*;
-import net.minecraft.client.renderer.block.statemap.*;
-import net.minecraft.client.settings.*;
-import net.minecraft.entity.player.*;
-import net.minecraft.block.*;
-import net.minecraft.block.state.*;
-import net.minecraft.item.*;
-import net.minecraft.util.*;
-import net.minecraftforge.fluids.*;
-import net.minecraftforge.fml.client.registry.*;
-import net.minecraftforge.fml.relauncher.*;
-import net.minecraftforge.client.model.*;
-import net.minecraftforge.client.settings.*;
-import net.minecraftforge.common.capabilities.*;
-
-import org.lwjgl.input.*;
-
-import com.google.common.collect.*;
-
-import slimeknights.tconstruct.common.*;
-import slimeknights.tconstruct.library.*;
-import slimeknights.tconstruct.library.client.*;
-import slimeknights.tconstruct.library.materials.*;
-import slimeknights.tconstruct.library.modifiers.*;
-import slimeknights.tconstruct.library.tools.*;
-
-@SideOnly(Side.CLIENT)
-public class ClientProxy extends CommonProxy {
- private static Map keyBindings;
-
- @Override
- public void registerItemRenderer(Item item, int meta, String id) {
- registerItemRenderer(item, meta, id, "inventory");
- }
-
- @Override
- public void registerItemRenderer(Item item, int meta, String id, String variant) {
- ModelResourceLocation rl = new ModelResourceLocation(ModInfo.MODID + ":" + id, variant);
- if (meta >= 0) {
- ModelLoader.setCustomModelResourceLocation(item, meta, rl);
- } else {
- ModelLoader.setCustomMeshDefinition(item, stack -> rl);
- ModelBakery.registerItemVariants(item, rl);
- }
- }
-
- @Override
- public void setRenderInfo(Material mat, int color) {
- mat.setRenderInfo(color);
- }
-
- @Override
- public void setRenderInfo(Material mat, int lo, int mid, int hi) {
- mat.setRenderInfo(new MaterialRenderInfo.MultiColor(lo, mid, hi));
- }
-
- @Override
- public void registerFluidModels(Fluid fluid) {
- if (fluid == null) return;
- Block block = fluid.getBlock();
- if (block != null) {
- Item item = Item.getItemFromBlock(block);
- FluidStateMapper mapper = new FluidStateMapper(fluid);
- if (item != null) {
- ModelBakery.registerItemVariants(item);
- ModelLoader.setCustomMeshDefinition(item, mapper);
- }
- ModelLoader.setCustomStateMapper(block, mapper);
- }
- }
-
- @Override
- public void registerKeyBindings() {
- keyBindings = ImmutableMap.builder()
- .put("release_entity", new KeyBinding("key.plustic_release_entity.desc", KeyConflictContext.IN_GAME, Keyboard.KEY_0, "key.categories.plustic"))
- .put("toggle_gui", new KeyBinding("key.plustic_toggle_gui.desc", KeyConflictContext.IN_GAME, Keyboard.KEY_I, "key.categories.plustic"))
- .put("set_portal", new KeyBinding("key.plustic_set_portal.desc", KeyConflictContext.IN_GAME, Keyboard.KEY_N, "key.categories.plustic"))
- .put("brown_magic", new KeyBinding("key.plustic_brown_magic.desc", KeyConflictContext.IN_GAME, Keyboard.KEY_O, "key.categories.plustic"))
- .put("toggle_tool", new KeyBinding("key.plustic_toggle_tool.desc", KeyConflictContext.IN_GAME, KeyModifier.ALT, Keyboard.KEY_COMMA, "key.categories.plustic"))
- .put("fruit_salad", new KeyBinding("key.plustic_fruit_salad.desc", KeyConflictContext.IN_GAME, KeyModifier.ALT, Keyboard.KEY_MINUS, "key.categories.plustic"))
- .put("mots", new KeyBinding("key.plustic_mots.desc", KeyConflictContext.IN_GAME, KeyModifier.ALT, Keyboard.KEY_EQUALS, "key.categories.plustic"))
- .build();
- for (KeyBinding kb: keyBindings.values()) ClientRegistry.registerKeyBinding(kb);
- }
-
- @Override
- public void registerToolModel(ToolCore tc) {
- ModelRegisterUtil.registerToolModel(tc);
- }
-
- @Override
- public void registerModifierModel(IModifier mod, ResourceLocation rl) {
- ModelRegisterUtil.registerModifierModel(mod, rl);
- }
-
- @Override
- public void registerToolPartModel(T part) {
- ModelRegisterUtil.registerPartModel(part);
- }
-
- @Override
- public void initEntities() {
- super.initEntities();
- RenderingRegistry.registerEntityRenderingHandler(EntityBlindBandit.class, RenderBlindBandit::new);
- RenderingRegistry.registerEntityRenderingHandler(EntitySupremeLeader.class, RenderSupremeLeader::new);
- }
-
- @Override
- public void initToolGuis() {
- if (ModuleTools.katana != null) {
- ToolBuildGuiInfo katanaInfo = new ToolBuildGuiInfo(ModuleTools.katana);
- katanaInfo.addSlotPosition(33, 42 + 18); // handle
- katanaInfo.addSlotPosition(33 + 20, 42 - 20); // 1st blade
- katanaInfo.addSlotPosition(33, 42); // 2nd blade
- katanaInfo.addSlotPosition(33 - 18, 42 + 18); // binding
- TinkerRegistryClient.addToolBuilding(katanaInfo);
- }
-
- if (ModuleTools.laserGun != null) {
- ToolBuildGuiInfo laserGunInfo = new ToolBuildGuiInfo(ModuleTools.laserGun);
- laserGunInfo.addSlotPosition(7, 64);
- laserGunInfo.addSlotPosition(25, 38);
- laserGunInfo.addSlotPosition(49, 38);
- laserGunInfo.addSlotPosition(7, 38);
- TinkerRegistryClient.addToolBuilding(laserGunInfo);
- }
- }
-
- @Override
- public boolean isControlPressed(String control) {
- return keyBindings.get(control).isPressed();
- }
-
- @CapabilityInject(MusicOfTheSpheres.IMOTSItemHandler.class)
- private static Capability MOTS_ITEM_CAP = null;
-
- @Override
- public Object setAndPlaySound(EntityPlayer player, SoundEvent sndEv) {
- Sounds.MOTSSound sound = new Sounds.MOTSSound(player, sndEv, SoundCategory.MUSIC);
- //System.out.println("TEEHEE! "+sound.getSound());
- Minecraft.getMinecraft().getSoundHandler().playSound(sound);
- return sound;
- }
-
- @Override
- public void stopSound(Object sound) {
- if (sound instanceof ISound) {
- Minecraft.getMinecraft().getSoundHandler().stopSound((ISound)sound);
- }
- }
-
- @Override
- public boolean isSoundPlaying(Object sound) {
- return sound instanceof ISound && Minecraft.getMinecraft().getSoundHandler().isSoundPlaying((ISound)sound);
- }
-
- @Override
- public void runOnClient(RunnableDefaultNoop runnable) {
- runnable.run();
- }
-
- @Override
- public T runOnClient(SupplierDefaultNoop supplier) {
- return supplier.get();
- }
-
- public static class FluidStateMapper extends StateMapperBase implements ItemMeshDefinition {
- public final Fluid fluid;
- public final ModelResourceLocation location;
-
- public FluidStateMapper(Fluid fluid) {
- this.fluid = fluid;
- this.location = new ModelResourceLocation(new ResourceLocation(ModInfo.MODID, "fluid_block"),
- fluid.getName());
- }
-
- @Nonnull
- @Override
- protected ModelResourceLocation getModelResourceLocation(@Nonnull IBlockState state) {
- return location;
- }
-
- @Nonnull
- @Override
- public ModelResourceLocation getModelLocation(@Nonnull ItemStack stack) {
- return location;
- }
- }
-}
diff --git a/src/main/java/landmaster/plustic/proxy/CommonProxy.java b/src/main/java/landmaster/plustic/proxy/CommonProxy.java
deleted file mode 100644
index f0bf1696..00000000
--- a/src/main/java/landmaster/plustic/proxy/CommonProxy.java
+++ /dev/null
@@ -1,74 +0,0 @@
-package landmaster.plustic.proxy;
-
-import landmaster.plustic.*;
-import landmaster.plustic.api.*;
-import landmaster.plustic.entity.*;
-import landmaster.plustic.util.*;
-import net.minecraft.entity.player.*;
-import net.minecraft.item.*;
-import net.minecraft.util.*;
-import net.minecraftforge.fluids.*;
-import net.minecraftforge.fml.common.registry.*;
-import slimeknights.tconstruct.library.materials.*;
-import slimeknights.tconstruct.library.modifiers.*;
-import slimeknights.tconstruct.library.tools.*;
-
-public class CommonProxy {
-
- public void registerItemRenderer(Item item, int meta, String id) {
- }
-
- public void registerItemRenderer(Item item, int meta, String id, String variant) {
- }
-
- public void setRenderInfo(Material mat, int color) {
- }
-
- public void setRenderInfo(Material mat, int lo, int mid, int hi) {
- }
-
- public void registerFluidModels(Fluid fluid) {
- }
-
- public void registerKeyBindings() {
- }
-
- public void registerToolModel(ToolCore tc) {
- }
-
- public void registerModifierModel(IModifier mod, ResourceLocation rl) {
- }
-
- public void registerToolPartModel(T part) {
- }
-
- public void initEntities() {
- EntityRegistry.registerModEntity(new ResourceLocation(ModInfo.MODID, "supremeleader"), EntitySupremeLeader.class, "SupremeLeader", 0, PlusTiC.INSTANCE, 96, 2, true, 0xFF0000, 0x0000FF);
- EntityRegistry.registerModEntity(new ResourceLocation(ModInfo.MODID, "blindbandit"), EntityBlindBandit.class, "BlindBandit", 1, PlusTiC.INSTANCE, 64, 3, true, 0xFF00FF, 0xFF0000);
- }
-
- public void initToolGuis() {
- }
-
- public boolean isControlPressed(String control) {
- return false;
- }
-
- public Object setAndPlaySound(EntityPlayer player, SoundEvent sndEv) {
- return null;
- }
-
- public void stopSound(Object sound) {
- }
-
- public boolean isSoundPlaying(Object sound) {
- return false;
- }
-
- public void runOnClient(RunnableDefaultNoop runnable) {
- }
-
- public T runOnClient(SupplierDefaultNoop supplier) {
- return null;
- }
-}
diff --git a/src/main/java/landmaster/plustic/tile/TECentrifuge.java b/src/main/java/landmaster/plustic/tile/TECentrifuge.java
deleted file mode 100644
index bba9ac11..00000000
--- a/src/main/java/landmaster/plustic/tile/TECentrifuge.java
+++ /dev/null
@@ -1,70 +0,0 @@
-package landmaster.plustic.tile;
-
-import javax.annotation.*;
-
-import landmaster.plustic.net.*;
-import landmaster.plustic.util.*;
-import net.minecraft.nbt.*;
-import net.minecraft.tileentity.*;
-import net.minecraft.util.*;
-import net.minecraftforge.common.capabilities.*;
-import net.minecraftforge.fluids.*;
-import net.minecraftforge.fluids.capability.*;
-import net.minecraftforge.fml.common.network.*;
-import slimeknights.tconstruct.library.materials.*;
-
-public abstract class TECentrifuge extends TileEntity {
- protected final FluidTank tank = new FluidTank(Material.VALUE_Block * 8) {
- @Override
- protected void onContentsChanged() {
- sendTankUpdates();
- }
- };
-
- protected void sendTankUpdates() {
- if (world != null && !world.isRemote) {
- markDirty();
- PacketHandler.INSTANCE.sendToAllAround(new PacketUpdateTECentrifugeLiquid(new Coord4D(pos, world), tank.getFluid()), new NetworkRegistry.TargetPoint(world.provider.getDimension(), pos.getX(), pos.getY(), pos.getZ(), 64));
- }
- }
-
- @Override
- public void onLoad() {
- if (world.isRemote) {
- PacketHandler.INSTANCE.sendToServer(new PacketRequestUpdateTECentrifuge(new Coord4D(pos, world)));
- }
- }
-
- @Override
- public void readFromNBT(NBTTagCompound compound) {
- super.readFromNBT(compound);
- if (compound.hasKey("Tank", 10)) {
- tank.setFluid(FluidStack.loadFluidStackFromNBT(compound.getCompoundTag("Tank")));
- sendTankUpdates();
- }
- }
-
- @Override
- public NBTTagCompound writeToNBT(NBTTagCompound compound) {
- compound = super.writeToNBT(compound);
- if (tank.getFluid() != null) {
- compound.setTag("Tank", tank.getFluid().writeToNBT(new NBTTagCompound()));
- }
- return compound;
- }
-
- @Override
- public boolean hasCapability(Capability> capability, @Nullable EnumFacing facing) {
- return capability == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY
- || super.hasCapability(capability, facing);
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public T getCapability(Capability capability, @Nullable EnumFacing facing) {
- return capability == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY
- ? (T)tank : super.getCapability(capability, facing);
- }
-
- public FluidTank getTank() { return tank; }
-}
\ No newline at end of file
diff --git a/src/main/java/landmaster/plustic/tile/TECentrifugeCore.java b/src/main/java/landmaster/plustic/tile/TECentrifugeCore.java
deleted file mode 100644
index 4c44a5f5..00000000
--- a/src/main/java/landmaster/plustic/tile/TECentrifugeCore.java
+++ /dev/null
@@ -1,124 +0,0 @@
-package landmaster.plustic.tile;
-
-import java.util.*;
-
-import javax.annotation.*;
-
-import landmaster.plustic.api.*;
-import landmaster.plustic.config.*;
-import landmaster.plustic.net.*;
-import landmaster.plustic.util.*;
-import net.minecraft.nbt.*;
-import net.minecraft.util.*;
-import net.minecraft.util.math.*;
-import net.minecraftforge.common.capabilities.*;
-import net.minecraftforge.energy.*;
-import net.minecraftforge.fml.common.network.*;
-import slimeknights.tconstruct.library.*;
-import slimeknights.tconstruct.library.smeltery.*;
-
-public class TECentrifugeCore extends TECentrifuge implements ITickable {
- protected EnergyStorage energyStorage;
- protected int oldEnergy;
-
- public static final int ENERGY_BUFFER_SZ = 80000;
-
- {
- setEnergy(0);
- tank.setCanDrain(false);
- }
-
- public List getOutputTanks() {
- List result = new ArrayList<>();
- for (BlockPos.MutableBlockPos checkPos = new BlockPos.MutableBlockPos(pos.getX(), pos.getY()+1, pos.getZ());
- world.getTileEntity(checkPos) instanceof TECentrifugeTank;
- checkPos.move(EnumFacing.UP)) {
- result.add((TECentrifugeTank)world.getTileEntity(checkPos));
- }
- return result;
- }
-
- private AlloyRecipe cachedRecipe = null;
-
- @Override
- public void update() {
- if (world.isRemote) return;
-
- if (oldEnergy != energyStorage.getEnergyStored()) {
- markDirty();
- oldEnergy = energyStorage.getEnergyStored();
- PacketHandler.INSTANCE.sendToAllAround(new PacketUpdateTECentrifugeCoreEnergy(new Coord4D(pos, world), energyStorage.getEnergyStored()),
- new NetworkRegistry.TargetPoint(world.provider.getDimension(), pos.getX(), pos.getY(), pos.getZ(), 64));
- }
-
- if (this.tank.getFluid() == null || this.tank.getFluid().amount <= 0) return;
-
- if (cachedRecipe == null || CentrifugeRecipes.matches(cachedRecipe, this.tank.getFluid()) <= 0) {
- // recalculate
- cachedRecipe = TinkerRegistry.getAlloys().stream()
- .filter(recipe -> CentrifugeRecipes.matches(recipe, this.tank.getFluid()) > 0)
- .sorted(Comparator.comparingInt(recipe -> recipe.getFluids().size())
- .thenComparingInt(recipe -> recipe.getResult().amount))
- .findFirst().orElse(null);
- }
- if (cachedRecipe == null) return;
-
- List tanks = getOutputTanks();
- if (tanks.size() < cachedRecipe.getFluids().size()) {
- return;
- }
- int numTimesToApply = Math.min(CentrifugeRecipes.matches(cachedRecipe, this.tank.getFluid()),
- CentrifugeRecipes.APPLY_PER_TICK);
- int energyToExtract = Config.centrifugeEnergyPerMB * cachedRecipe.getResult().amount;
-
- allApplications:
- for (int i=0; i capability, @Nullable EnumFacing facing) {
- return capability == CapabilityEnergy.ENERGY
- || super.hasCapability(capability, facing);
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public T getCapability(Capability capability, @Nullable EnumFacing facing) {
- return capability == CapabilityEnergy.ENERGY
- ? (T)energyStorage : super.getCapability(capability, facing);
- }
-
- public void setEnergy(int val) {
- energyStorage = new EnergyStorage(ENERGY_BUFFER_SZ, ENERGY_BUFFER_SZ, ENERGY_BUFFER_SZ, val);
- }
-
- @Override
- public void readFromNBT(NBTTagCompound compound) {
- super.readFromNBT(compound);
- setEnergy(compound.getInteger("Energy"));
- }
-
- @Override
- public NBTTagCompound writeToNBT(NBTTagCompound compound) {
- compound = super.writeToNBT(compound);
- compound.setInteger("Energy", energyStorage.getEnergyStored());
- return compound;
- }
-}
diff --git a/src/main/java/landmaster/plustic/tile/TECentrifugeTank.java b/src/main/java/landmaster/plustic/tile/TECentrifugeTank.java
deleted file mode 100644
index aaae0dd7..00000000
--- a/src/main/java/landmaster/plustic/tile/TECentrifugeTank.java
+++ /dev/null
@@ -1,7 +0,0 @@
-package landmaster.plustic.tile;
-
-public class TECentrifugeTank extends TECentrifuge {
- {
- tank.setCanFill(false);
- }
-}
diff --git a/src/main/java/landmaster/plustic/tile/render/RenderTECentrifuge.java b/src/main/java/landmaster/plustic/tile/render/RenderTECentrifuge.java
deleted file mode 100644
index 236b4c40..00000000
--- a/src/main/java/landmaster/plustic/tile/render/RenderTECentrifuge.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package landmaster.plustic.tile.render;
-
-import landmaster.plustic.tile.*;
-import net.minecraft.client.renderer.tileentity.*;
-import net.minecraftforge.fluids.*;
-import slimeknights.tconstruct.library.client.*;
-
-public class RenderTECentrifuge extends TileEntitySpecialRenderer {
- @Override
- public void render(TECentrifuge te, double x, double y, double z, float partialTicks, int destroyStage,
- float alpha) {
- FluidStack fs = te.getTank().getFluid();
- if (fs != null) {
- float height = ((float)fs.amount) / te.getTank().getCapacity();
- float d = RenderUtil.FLUID_OFFSET;
- if (fs.getFluid().isGaseous(fs)) {
- RenderUtil.renderFluidCuboid(fs, te.getPos(), x, y, z, d, 1f - (d + height), d, 1d - d, 1d - d, 1d - d);
- } else {
- RenderUtil.renderFluidCuboid(fs, te.getPos(), x, y, z, d, d, d, 1d - d, height - d, 1d - d);
- }
- }
- }
-
-}
diff --git a/src/main/java/landmaster/plustic/tools/IEnumL10n.java b/src/main/java/landmaster/plustic/tools/IEnumL10n.java
deleted file mode 100644
index 50b438be..00000000
--- a/src/main/java/landmaster/plustic/tools/IEnumL10n.java
+++ /dev/null
@@ -1,5 +0,0 @@
-package landmaster.plustic.tools;
-
-public interface IEnumL10n {
- String getUnlocName();
-}
diff --git a/src/main/java/landmaster/plustic/tools/IToggleTool.java b/src/main/java/landmaster/plustic/tools/IToggleTool.java
deleted file mode 100644
index 5ed7cca4..00000000
--- a/src/main/java/landmaster/plustic/tools/IToggleTool.java
+++ /dev/null
@@ -1,66 +0,0 @@
-package landmaster.plustic.tools;
-
-import java.util.*;
-
-import landmaster.plustic.*;
-import landmaster.plustic.api.*;
-import landmaster.plustic.net.*;
-import net.minecraft.client.*;
-import net.minecraft.entity.*;
-import net.minecraft.item.*;
-import net.minecraft.util.*;
-import net.minecraftforge.fml.common.Mod;
-import net.minecraftforge.fml.common.eventhandler.*;
-import net.minecraftforge.fml.common.gameevent.*;
-import net.minecraftforge.fml.relauncher.*;
-
-@Mod.EventBusSubscriber(modid = ModInfo.MODID, value = Side.CLIENT)
-public interface IToggleTool> {
- Class clazz();
-
- String getTag();
-
- public static Enum> rotateMode(ItemStack is) {
- if (!(is.getItem() instanceof IToggleTool)) {
- return null;
- }
- final Enum>[] vals = ((IToggleTool>)is.getItem()).clazz().getEnumConstants();
- final String tag = ((IToggleTool>)is.getItem()).getTag();
- int newIdx = (is.getTagCompound().getInteger(tag)+1) % vals.length;
- is.getTagCompound().setInteger(tag, newIdx);
- return vals[newIdx];
- }
-
- @SuppressWarnings("unchecked")
- public static > T rotateMode(ItemStack is, Class clazz) {
- if (!(is.getItem() instanceof IToggleTool && ((IToggleTool>)is.getItem()).clazz() == clazz)) {
- return null;
- }
- return (T)rotateMode(is);
- }
-
- public static > T getMode(ItemStack is, Class clazz) {
- if (!(is.getItem() instanceof IToggleTool && ((IToggleTool>)is.getItem()).clazz() == clazz)) {
- return null;
- }
- return clazz.getEnumConstants()[is.getTagCompound().getInteger(((IToggleTool>)is.getItem()).getTag())];
- }
-
- public static Enum> rotateHeldItemMode(EntityLivingBase elb) {
- for (EnumHand hand: EnumHand.values()) {
- final Enum> enm = rotateMode(elb.getHeldItem(hand));
- if (enm != null) return enm;
- }
- return null;
- }
-
- @SideOnly(Side.CLIENT)
- @SubscribeEvent
- public static void onInput(InputEvent.KeyInputEvent event) {
- if (PlusTiC.proxy.isControlPressed("toggle_tool") && Arrays.stream(EnumHand.values())
- .map(Minecraft.getMinecraft().player::getHeldItem)
- .anyMatch(is -> is.getItem() instanceof IToggleTool)) {
- PacketHandler.INSTANCE.sendToServer(new PacketUpdateToolModeServer());
- }
- }
-}
diff --git a/src/main/java/landmaster/plustic/tools/ToolKatana.java b/src/main/java/landmaster/plustic/tools/ToolKatana.java
deleted file mode 100644
index 663d9bff..00000000
--- a/src/main/java/landmaster/plustic/tools/ToolKatana.java
+++ /dev/null
@@ -1,179 +0,0 @@
-package landmaster.plustic.tools;
-
-import java.awt.Color;
-import java.util.*;
-
-import javax.annotation.*;
-
-import landmaster.plustic.config.*;
-import net.minecraft.client.*;
-import net.minecraft.client.resources.*;
-import net.minecraft.entity.*;
-import net.minecraft.entity.player.*;
-import net.minecraft.item.*;
-import net.minecraft.nbt.*;
-import net.minecraft.util.*;
-import net.minecraft.util.math.*;
-import net.minecraft.world.*;
-import net.minecraftforge.client.event.*;
-import net.minecraftforge.common.*;
-import net.minecraftforge.fml.common.eventhandler.*;
-import net.minecraftforge.fml.relauncher.*;
-import slimeknights.tconstruct.library.materials.*;
-import slimeknights.tconstruct.library.tinkering.*;
-import slimeknights.tconstruct.library.tools.*;
-import slimeknights.tconstruct.library.utils.*;
-import slimeknights.tconstruct.tools.*;
-import slimeknights.tconstruct.tools.ranged.item.*;
-
-public class ToolKatana extends SwordCore {
- public static final float DURABILITY_MODIFIER = 0.88f;
-
- public static final String COUNTER_TAG = "PlusTiC_Counter";
-
- static {
- MinecraftForge.EVENT_BUS.register(ToolKatana.class);
- }
-
- private static float counter_multiplier(float attack) {
- if (Config.katana_smooth_progression) {
- return MathHelper.clamp(1.2f + 0.025f * attack, 1.2f, 1.8f);
- }
- if (attack <= 5) {
- return 1.2f;
- }
- if (attack <= 11) {
- return 1.35f;
- }
- return 1.5f;
- }
-
- public static float counter_cap(ItemStack tool) {
- float attack = TagUtil.getToolStats(tool).attack;
- return attack * counter_multiplier(attack);
- }
-
- public ToolKatana() {
- super(PartMaterialType.handle(TinkerTools.toughToolRod),
- PartMaterialType.head(TinkerTools.largeSwordBlade),
- PartMaterialType.head(TinkerTools.largeSwordBlade),
- PartMaterialType.extra(TinkerTools.toughBinding));
-
- this.addCategory(Category.WEAPON);
-
- setTranslationKey("katana").setRegistryName("katana");
- }
-
- @SideOnly(Side.CLIENT)
- @SubscribeEvent
- public static void render(RenderGameOverlayEvent event) {
- final Minecraft mc = Minecraft.getMinecraft();
- final ItemStack is = mc.player.getHeldItemMainhand();
- if (event.getType() == RenderGameOverlayEvent.ElementType.TEXT
- && is != null && is.getItem() instanceof ToolKatana) {
- float counter = TagUtil.getTagSafe(is).getFloat(COUNTER_TAG);
- if (counter > 0) {
- mc.fontRenderer.drawString(I18n.format("meter.plustic.katana", String.format("%.1f", counter)),
- 5, 5, Color.HSBtoRGB(Math.min(counter/(counter_cap(is)*3), 1.0f/3), 1, 1) & 0xFFFFFF, true);
- }
- }
- }
-
- @Override
- public ActionResult onItemRightClick(World worldIn, EntityPlayer playerIn, EnumHand hand) {
- return this._rightClick(playerIn.getHeldItem(hand), worldIn, playerIn, hand);
- }
-
- @Nonnull
- private ActionResult _rightClick(@Nonnull ItemStack itemStackIn, World worldIn, EntityPlayer playerIn, EnumHand hand) {
- if (!worldIn.isRemote && hand == EnumHand.MAIN_HAND && playerIn.getHeldItemOffhand() != null && !(playerIn.getHeldItemOffhand().getItem() instanceof Shuriken)) {
- return ActionResult.newResult(EnumActionResult.SUCCESS, itemStackIn);
- }
- return ActionResult.newResult(EnumActionResult.PASS, itemStackIn);
- }
-
- @Override
- public int[] getRepairParts() {
- return new int[] {1,2};
- }
-
- @Override
- public double attackSpeed() {
- return 2.55;
- }
-
- @Override
- public float damagePotential() {
- return 0.77f;
- }
-
- @Override
- public float damageCutoff() {
- return 22.0f;
- }
-
- @Override
- public float knockback() {
- return 0.83f;
- }
-
- @Override
- public void onUpdate(ItemStack stack, World worldIn, Entity entityIn, int itemSlot, boolean isSelected) {
- super.onUpdate(stack, worldIn, entityIn, itemSlot, isSelected);
- if (!worldIn.isRemote) {
- NBTTagCompound tag = TagUtil.getTagSafe(stack);
- float counter = tag.getFloat(COUNTER_TAG);
- counter -= 0.005f;
- counter = MathHelper.clamp(counter, 0, counter_cap(stack));
- tag.setFloat(COUNTER_TAG, counter);
- stack.setTagCompound(tag);
- }
- }
-
- @Override
- public boolean dealDamage(ItemStack stack, EntityLivingBase player, Entity entity, float damage) {
- if (entity instanceof EntityLivingBase) {
- EntityLivingBase targetLiving = (EntityLivingBase)entity;
- if (targetLiving.getTotalArmorValue() <= 0) {
- damage += 2.6f; // increase damage against unarmored
- }
- }
- NBTTagCompound tag = TagUtil.getTagSafe(stack);
- float counter = tag.getFloat(COUNTER_TAG);
- damage += counter * Config.katana_combo_multiplier;
-
- boolean success = super.dealDamage(stack, player, entity, damage);
- if (success) {
- if (entity instanceof EntityLivingBase) {
- EntityLivingBase targetLiving = (EntityLivingBase)entity;
- if (targetLiving.getHealth() <= 0 || !Config.katana_boosts_only_on_killing) counter += 1.0f;
- counter = MathHelper.clamp(counter, 0, counter_cap(stack));
- }
- tag.setFloat(COUNTER_TAG, counter);
- stack.setTagCompound(tag);
- }
- return success;
- }
-
- @Override
- public float getRepairModifierForPart(int index) {
- return DURABILITY_MODIFIER;
- }
-
- @Override
- protected ToolNBT buildTagData(List materials) {
- HandleMaterialStats handle = materials.get(0).getStatsOrUnknown(MaterialTypes.HANDLE);
- HeadMaterialStats head0 = materials.get(1).getStatsOrUnknown(MaterialTypes.HEAD);
- HeadMaterialStats head1 = materials.get(2).getStatsOrUnknown(MaterialTypes.HEAD);
- ExtraMaterialStats binding = materials.get(3).getStatsOrUnknown(MaterialTypes.EXTRA);
-
- ToolNBT data = new ToolNBT();
- data.head(head0, head1);
- data.extra(binding);
- data.handle(handle);
-
- data.attack += 1f;
- data.durability *= DURABILITY_MODIFIER;
- return data;
- }
-}
diff --git a/src/main/java/landmaster/plustic/tools/ToolLaserGun.java b/src/main/java/landmaster/plustic/tools/ToolLaserGun.java
deleted file mode 100644
index 190210a8..00000000
--- a/src/main/java/landmaster/plustic/tools/ToolLaserGun.java
+++ /dev/null
@@ -1,575 +0,0 @@
-package landmaster.plustic.tools;
-
-import java.util.*;
-
-import javax.annotation.*;
-
-import org.lwjgl.opengl.*;
-
-import appeng.api.config.*;
-import appeng.api.implementations.items.*;
-import landmaster.plustic.api.*;
-import landmaster.plustic.api.event.*;
-import landmaster.plustic.config.*;
-import landmaster.plustic.modules.*;
-import landmaster.plustic.net.*;
-import landmaster.plustic.tools.nbt.*;
-import landmaster.plustic.tools.stats.*;
-import landmaster.plustic.util.*;
-import net.minecraft.block.state.*;
-import net.minecraft.client.*;
-import net.minecraft.client.renderer.*;
-import net.minecraft.client.renderer.vertex.*;
-import net.minecraft.client.resources.I18n;
-import net.minecraft.client.util.ITooltipFlag;
-import net.minecraft.creativetab.*;
-import net.minecraft.entity.*;
-import net.minecraft.entity.item.*;
-import net.minecraft.entity.player.*;
-import net.minecraft.inventory.*;
-import net.minecraft.item.*;
-import net.minecraft.item.crafting.*;
-import net.minecraft.nbt.*;
-import net.minecraft.util.*;
-import net.minecraft.util.math.*;
-import net.minecraft.util.text.*;
-import net.minecraft.world.*;
-import net.minecraftforge.client.event.*;
-import net.minecraftforge.common.*;
-import net.minecraftforge.common.capabilities.*;
-import net.minecraftforge.energy.*;
-import net.minecraftforge.fml.common.SidedProxy;
-import net.minecraftforge.fml.common.eventhandler.*;
-import net.minecraftforge.fml.relauncher.Side;
-import net.minecraftforge.fml.relauncher.SideOnly;
-import slimeknights.tconstruct.library.materials.*;
-import slimeknights.tconstruct.library.tinkering.*;
-import slimeknights.tconstruct.library.tools.*;
-import slimeknights.tconstruct.library.utils.*;
-import slimeknights.tconstruct.tools.*;
-
-@net.minecraftforge.fml.common.Optional.Interface(iface = "cofh.redstoneflux.api.IEnergyContainerItem", modid = "redstoneflux")
-@net.minecraftforge.fml.common.Optional.Interface(iface = "appeng.api.implementations.items.IAEItemPowerStorage", modid = "appliedenergistics2")
-public class ToolLaserGun extends TinkerToolCore implements cofh.redstoneflux.api.IEnergyContainerItem, IAEItemPowerStorage, IToggleTool {
- public static class LaserDamageSource extends EntityDamageSource {
- private final ItemStack stack;
-
- public LaserDamageSource(String damageTypeIn, Entity damageSourceEntityIn, ItemStack stack) {
- super(damageTypeIn, damageSourceEntityIn);
- this.stack = stack;
- }
-
- public ItemStack getStack() {
- return stack;
- }
-
- }
-
- private static float range(ItemStack is) {
- return (new LaserNBT(TagUtil.getToolTag(is))).range;
- }
-
- public static final String ATTACK_DURATION_TAG = "AttackDuration";
- public static final String MODE_TAG = "Mode";
- public static final String POS_LCOOL_TAG = "LockCooldown";
- public static final String ENERGY_NBT = "Energy";
-
- private int maxAttackDuration(ItemStack is) {
- return (int)(20 / ToolHelper.getActualAttackSpeed(is));
- }
-
- private int energyPerAttack(ItemStack is) {
- return Config.laser_energy;
- }
-
- private static int getFullEnergy(ItemStack is) {
- return (new ToolEnergyNBT(TagUtil.getToolTag(is))).energy;
- }
-
- private static Optional getActiveLaserGun(EntityLivingBase entity) {
- return Arrays.stream(EnumHand.values())
- .map(entity::getHeldItem)
- .filter(stack -> stack != null
- && stack.getItem() instanceof ToolLaserGun
- && TagUtil.getTagSafe(stack).getInteger(ATTACK_DURATION_TAG) > 0)
- .findFirst();
- }
-
- public static final ResourceLocation LASER_LOC = new ResourceLocation(ModInfo.MODID, "textures/effects/laserbeam.png");
-
- public static enum Mode implements IEnumL10n {
- ATTACK, TOOL;
-
- @Override
- public String getUnlocName() {
- return "mode.laser_gun."+name().toLowerCase(Locale.US);
- }
- }
-
- public static RayTraceResult trace(Mode mode, EntityPlayer entity, float range) {
- switch (mode) {
- case ATTACK:
- return EntityUtil.raytraceEntityPlayerLook(entity, range);
- case TOOL:
- return entity.getEntityWorld().rayTraceBlocks(entity.getPositionEyes(1), entity.getPositionEyes(1).add(entity.getLook(1).scale(range)));
- default:
- throw new RuntimeException("Bad mode, you copycat!");
- }
- }
-
- public ToolLaserGun() {
- super(PartMaterialType.handle(TinkerTools.toughToolRod),
- PartMaterialType.head(ModuleTools.pipe_piece),
- new PartMaterialType(ModuleTools.laser_medium, LaserMediumMaterialStats.TYPE),
- new PartMaterialType(ModuleTools.battery_cell, BatteryCellMaterialStats.TYPE));
-
- this.addCategory(Category.WEAPON);
-
- proxy.initEvents();
-
- this.setTranslationKey("laser_gun").setRegistryName("laser_gun");
- }
-
- // to avoid errors with certain methods
- @SidedProxy(serverSide = "landmaster.plustic.tools.ToolLaserGun$Proxy", clientSide = "landmaster.plustic.tools.ToolLaserGun$ProxyClient")
- public static Proxy proxy;
-
- public static class Proxy {
- public void initEvents() { MinecraftForge.EVENT_BUS.register(Proxy.class); }
-
- public void addToZapBlockRendering(EntityPlayer shooter, Vec3d target) {
- }
- }
-
- public static class ProxyClient extends Proxy {
- private static final Map zapBlockRend = new WeakHashMap<>();
-
- public void addToZapBlockRendering(EntityPlayer shooter, Vec3d target) {
- zapBlockRend.put(shooter, target);
- }
-
- @Override
- public void initEvents() {
- super.initEvents();
- MinecraftForge.EVENT_BUS.register(ProxyClient.class);
- }
-
- @SubscribeEvent
- public static void renderBeam(RenderWorldLastEvent event) { // for this player
- Optional.ofNullable(Minecraft.getMinecraft().player)
- .ifPresent(ProxyClient::doRenderBeam);
- }
-
- @SubscribeEvent
- public static void renderBeam(RenderPlayerEvent.Pre event) { // for other players
- if (!event.getEntityPlayer().equals(Minecraft.getMinecraft().player)) { // exclude this player
- doRenderBeam(event.getEntityPlayer());
- }
- }
-
- @SubscribeEvent
- public static void renderBeam(RenderLivingEvent.Pre> event) { // for other entities
- if (!(event.getEntity() instanceof EntityPlayer)) { // exclude players
- doRenderBeam(event.getEntity());
- }
- }
-
- public static void doRenderBeam(EntityLivingBase shooter) {
- getActiveLaserGun(shooter)
- .ifPresent(stack -> {
- GlStateManager.depthMask(false);
- GlStateManager.enableBlend();
- GlStateManager.blendFunc(GL11.GL_ONE, GL11.GL_ONE);
-
- GlStateManager.pushMatrix();
-
- EntityPlayer player = Minecraft.getMinecraft().player;
-
- float partialTicks = Minecraft.getMinecraft().getRenderPartialTicks();
- double doubleX = player.lastTickPosX + (player.posX - player.lastTickPosX) * partialTicks;
- double doubleY = player.lastTickPosY + (player.posY - player.lastTickPosY) * partialTicks;
- double doubleZ = player.lastTickPosZ + (player.posZ - player.lastTickPosZ) * partialTicks;
-
- Vec3d vec = new Vec3d(doubleX, doubleY+player.getEyeHeight(), doubleZ);
- Vec3d vec0 = shooter.getPositionVector().add(0, shooter.getEyeHeight()+0.2, 0);
- Vec3d vec1 = vec0;
-
- switch (IToggleTool.getMode(stack, Mode.class)) {
- case ATTACK:
- vec1 = Optional.ofNullable(EntityUtil.raytraceEntityPlayerLook(player, range(stack)))
- .map(rtr -> rtr.hitVec)
- .orElse(vec1);
- break;
- case TOOL:
- if (zapBlockRend.containsKey(shooter)) {
- vec1 = zapBlockRend.get(shooter);
- zapBlockRend.remove(shooter);
- }
- break;
- default:
- break;
- }
-
- GlStateManager.translate(-doubleX, -doubleY, -doubleZ);
-
- Tessellator tessellator = Tessellator.getInstance();
- BufferBuilder buffer = tessellator.getBuffer();
-
- Minecraft.getMinecraft().renderEngine.bindTexture(LASER_LOC);
-
- buffer.begin(GL11.GL_QUADS, DefaultVertexFormats.POSITION_TEX_LMAP_COLOR);
-
- ClientUtils.drawBeam(vec0, vec1, vec, 0.13f);
-
- tessellator.draw();
-
- GlStateManager.popMatrix();
-
- GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
- });
- }
- }
-
- @Override
- public void onUpdate(ItemStack stack, World worldIn, Entity entityIn, int itemSlot, boolean isSelected) {
- super.onUpdate(stack, worldIn, entityIn, itemSlot, isSelected);
- if (!worldIn.isRemote) {
- NBTTagCompound nbt = TagUtil.getTagSafe(stack);
- int atkDur = nbt.getInteger(ATTACK_DURATION_TAG);
- --atkDur;
- if (atkDur < 0) atkDur = 0;
- nbt.setInteger(ATTACK_DURATION_TAG, atkDur);
- stack.setTagCompound(nbt);
-
- nbt.setInteger(POS_LCOOL_TAG, MathHelper.clamp(nbt.getInteger(POS_LCOOL_TAG)-1, 0, Integer.MAX_VALUE));
- }
- }
-
- @Override
- public void getSubItems(CreativeTabs tab, NonNullList list) {
- if (this.isInCreativeTab(tab)) {
- this.addDefaultSubItems(list, null, null, TinkerMaterials.prismarine, TinkerMaterials.manyullyn);
- }
- }
-
- @Override
- protected LaserNBT buildTagData(List materials) {
- LaserNBT nbt = new LaserNBT();
- nbt.head(materials.get(1).getStatsOrUnknown(MaterialTypes.HEAD));
- nbt.handle(materials.get(0).getStatsOrUnknown(MaterialTypes.HANDLE));
- nbt.laserMedium(materials.get(2).getStatsOrUnknown(LaserMediumMaterialStats.TYPE));
- nbt.batteryCell(materials.get(3).getStatsOrUnknown(BatteryCellMaterialStats.TYPE));
- return nbt;
- }
-
- @Override
- public float damagePotential() {
- return 1.0f;
- }
-
- @Override
- public double attackSpeed() {
- return 3;
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public void addInformation(ItemStack stack, @Nullable World worldIn, List tooltip, ITooltipFlag flagIn) {
- Optional.ofNullable(IToggleTool.getMode(stack, Mode.class))
- .ifPresent(mode -> tooltip.add(I18n.format("msg.plustic.tool_mode", I18n.format(mode.getUnlocName()))));
-
- super.addInformation(stack, worldIn, tooltip, flagIn);
- }
-
- @Override
- public List getInformation(ItemStack stack, boolean detailed) {
- List list = new ArrayList<>();
-
- TooltipBuilder info = new TooltipBuilder(stack);
-
- info.addDurability(!detailed);
- // for energy stored
- info.add(String.format(TextFormatting.AQUA+"%s RF / %s RF", this.getEnergyStored(stack), this.getMaxEnergyStored(stack)));
-
- info.addAttack();
-
- if (ToolHelper.getFreeModifiers(stack) > 0) {
- info.addFreeModifiers();
- }
-
- if (detailed) {
- info.addModifierInfo();
- }
-
- list.addAll(info.getTooltip());
-
- return list;
- }
-
- /**
- * This is the real laser attack.
- * {@inheritDoc}
- */
- @Override
- public ActionResult onItemRightClick(World worldIn, EntityPlayer playerIn, EnumHand hand) {
- return this._rightClick(playerIn.getHeldItem(hand), worldIn, playerIn, hand);
- }
-
- protected ActionResult _rightClick(ItemStack itemStackIn, World worldIn, EntityPlayer playerIn, EnumHand hand) {
- if (worldIn.isRemote) return new ActionResult<>(EnumActionResult.PASS, itemStackIn);
-
- NBTTagCompound nbt = TagUtil.getTagSafe(itemStackIn);
-
- ActionResult res = new ActionResult<>(EnumActionResult.PASS, itemStackIn);
-
- if (IToggleTool.getMode(itemStackIn, Mode.class) == Mode.ATTACK) {
- res = Optional.ofNullable(Utils.raytraceEntityPlayerLookWithPred(playerIn, range(itemStackIn), ent -> !(ent instanceof IEntityMultiPart)))
- .map(rtr -> rtr.entityHit)
- .map(ent -> {
- PTEnergyDrain eevent = new PTEnergyDrain(itemStackIn, playerIn, this.energyPerAttack(itemStackIn)); // event
- MinecraftForge.EVENT_BUS.post(eevent);
- int energyTaken = eevent.energyDrained; // grab event result
-
- if (this.extractEnergy(itemStackIn, energyTaken, true) >= energyTaken
- && nbt.getInteger(ATTACK_DURATION_TAG) <= 0) { // able to attack?
- if (hand == EnumHand.OFF_HAND) {
- unequip(playerIn, EntityEquipmentSlot.MAINHAND, EntityEquipmentSlot.MAINHAND);
- equip(playerIn, EntityEquipmentSlot.OFFHAND, EntityEquipmentSlot.MAINHAND);
- }
- boolean didAttack = ToolHelper.attackEntity(itemStackIn, this, playerIn, ent);
- if (hand == EnumHand.OFF_HAND) {
- unequip(playerIn, EntityEquipmentSlot.OFFHAND, EntityEquipmentSlot.MAINHAND);
- equip(playerIn, EntityEquipmentSlot.MAINHAND, EntityEquipmentSlot.MAINHAND);
- }
- PTLaserAttack aevent = new PTLaserAttack(playerIn, ent, itemStackIn, didAttack);
- MinecraftForge.EVENT_BUS.post(aevent);
- if (didAttack) { // try attacking
- this.extractEnergy(itemStackIn, energyTaken, false); // if success, use energy
- nbt.setInteger(ATTACK_DURATION_TAG, this.maxAttackDuration(itemStackIn));
- itemStackIn.setTagCompound(nbt);
- Sounds.playSoundToAll(playerIn, Sounds.LASER_BEAM, 1.0f, 1.0f);
- return new ActionResult<>(EnumActionResult.SUCCESS, itemStackIn);
- }
- }
- return new ActionResult<>(EnumActionResult.FAIL, itemStackIn);
- }).orElse(new ActionResult<>(EnumActionResult.FAIL, itemStackIn));
- }
-
- return res;
- }
-
- @Override
- public boolean dealDamage(ItemStack stack, EntityLivingBase player, Entity entity, float damage) {
- if(player instanceof EntityPlayer) {
- return entity.attackEntityFrom(new LaserDamageSource("player", player, stack), damage);
- }
- return entity.attackEntityFrom(new LaserDamageSource("mob", player, stack), damage);
- }
-
- private void unequip(EntityLivingBase entity, EntityEquipmentSlot slot, EntityEquipmentSlot functionalSlot) {
- ItemStack stack = entity.getItemStackFromSlot(slot);
- if (!stack.isEmpty()) {
- entity.getAttributeMap().removeAttributeModifiers(stack.getAttributeModifiers(functionalSlot));
- }
- }
-
- private void equip(EntityLivingBase entity, EntityEquipmentSlot slot, EntityEquipmentSlot functionalSlot) {
- ItemStack stack = entity.getItemStackFromSlot(slot);
- if (!stack.isEmpty()) {
- entity.getAttributeMap().applyAttributeModifiers(stack.getAttributeModifiers(functionalSlot));
- }
- }
-
- @Override
- public EnumActionResult onItemUse(EntityPlayer player, World worldIn, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) {
- if (worldIn.isRemote) return EnumActionResult.PASS;
-
- final ItemStack stack = player.getHeldItem(hand);
-
- if (IToggleTool.getMode(stack, Mode.class) == Mode.TOOL) {
- final NBTTagCompound nbt = stack.getTagCompound();
-
- if (nbt.getInteger(POS_LCOOL_TAG) > 0) return EnumActionResult.FAIL;
-
- ItemStack smeltingRes = ItemStack.EMPTY;
-
- final IBlockState state = worldIn.getBlockState(pos);
-
- if (!( smeltingRes = FurnaceRecipes.instance().getSmeltingResult(new ItemStack(state.getBlock(), 1, state.getBlock().getMetaFromState(state))).copy() ).isEmpty()) {
- PTEnergyDrain eevent = new PTEnergyDrain(stack, player, this.energyPerAttack(stack)); // event
- MinecraftForge.EVENT_BUS.post(eevent);
- int energyTaken = eevent.energyDrained; // grab event result
-
- if (this.extractEnergy(stack, energyTaken, true) >= energyTaken
- && worldIn.destroyBlock(pos, false)) {
- this.extractEnergy(stack, energyTaken, false);
- worldIn.spawnEntity(new EntityItem(worldIn, pos.getX()+0.5, pos.getY()+0.5, pos.getZ()+0.5, smeltingRes));
- nbt.setInteger(POS_LCOOL_TAG, MathHelper.ceil(220 / ToolHelper.getActualMiningSpeed(stack)));
- if (player instanceof EntityPlayerMP) {
- PacketHandler.INSTANCE.sendTo(new PacketLaserGunZapBlock(new Vec3d(hitX, hitY, hitZ), EntityPlayer.getUUID(player.getGameProfile())), (EntityPlayerMP)player);
- }
- return EnumActionResult.SUCCESS;
- }
- }
- }
-
- return EnumActionResult.PASS;
- }
-
- @Override
- public int receiveEnergy(ItemStack container, int maxReceive, boolean simulate) {
- return (int)this._receiveEnergy(container, maxReceive, simulate);
- }
-
- protected double _receiveEnergy(ItemStack container, double maxReceive, boolean simulate) {
- if (!container.hasTagCompound()) {
- container.setTagCompound(new NBTTagCompound());
- }
- double energy = container.getTagCompound().getDouble(ENERGY_NBT);
- double energyReceived = Math.min(getFullEnergy(container) - energy, Math.min(getFullEnergy(container), maxReceive));
-
- if (!simulate) {
- energy += energyReceived;
- container.getTagCompound().setDouble(ENERGY_NBT, energy);
- }
- return energyReceived;
- }
-
- @Override
- public int extractEnergy(ItemStack container, int maxExtract, boolean simulate) {
- return (int)this._extractEnergy(container, maxExtract, simulate);
- }
-
- protected double _extractEnergy(ItemStack container, double maxExtract, boolean simulate) {
- if (container.getTagCompound() == null || !container.getTagCompound().hasKey(ENERGY_NBT)) {
- return 0;
- }
- double energy = container.getTagCompound().getDouble(ENERGY_NBT);
- double energyExtracted = Math.min(energy, Math.min(getFullEnergy(container), maxExtract));
-
- if (!simulate) {
- energy -= energyExtracted;
- container.getTagCompound().setDouble(ENERGY_NBT, energy);
- }
- return energyExtracted;
- }
-
- @Override
- public int getEnergyStored(ItemStack container) {
- if (container.getTagCompound() == null || !container.getTagCompound().hasKey(ENERGY_NBT)) {
- return 0;
- }
- return container.getTagCompound().getInteger(ENERGY_NBT);
- }
-
- @Override
- public int getMaxEnergyStored(ItemStack container) {
- return getFullEnergy(container);
- }
-
- private class Energy implements IEnergyStorage {
- ItemStack is;
- public Energy(ItemStack is) {
- this.is = is;
- }
-
- @Override
- public int receiveEnergy(int maxReceive, boolean simulate) {
- return ToolLaserGun.this.receiveEnergy(is, maxReceive, simulate);
- }
-
- @Override
- public int extractEnergy(int maxExtract, boolean simulate) {
- return ToolLaserGun.this.extractEnergy(is, maxExtract, simulate);
- }
-
- @Override
- public int getEnergyStored() {
- return ToolLaserGun.this.getEnergyStored(is);
- }
-
- @Override
- public int getMaxEnergyStored() {
- return ToolLaserGun.this.getMaxEnergyStored(is);
- }
-
- @Override
- public boolean canExtract() {
- return true;
- }
-
- @Override
- public boolean canReceive() {
- return true;
- }
- }
-
- private class Provider implements ICapabilityProvider {
- Energy energy;
-
- public Provider(ItemStack is) {
- energy = new Energy(is);
- }
-
- @Override
- public boolean hasCapability(Capability> capability, EnumFacing facing) {
- return capability == CapabilityEnergy.ENERGY;
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public T getCapability(Capability capability, EnumFacing facing) {
- if (capability == CapabilityEnergy.ENERGY) {
- return (T)energy;
- }
- return null;
- }
- }
-
- @Override
- public ICapabilityProvider initCapabilities(ItemStack is, NBTTagCompound capNbt) {
- return new Provider(is);
- }
-
- @Override
- public Class clazz() {
- return Mode.class;
- }
-
- @Override
- public String getTag() {
- return MODE_TAG;
- }
-
- @Override
- @net.minecraftforge.fml.common.Optional.Method(modid = "appliedenergistics2")
- public double extractAEPower(ItemStack arg0, double arg1, Actionable arg2) {
- return PowerUnits.RF.convertTo(PowerUnits.AE, this._extractEnergy(arg0, PowerUnits.AE.convertTo(PowerUnits.RF, arg1), arg2 == Actionable.SIMULATE));
- }
-
- @Override
- public double getAECurrentPower(ItemStack arg0) {
- if (arg0.getTagCompound() == null || !arg0.getTagCompound().hasKey(ENERGY_NBT)) {
- return 0;
- }
- return PowerUnits.RF.convertTo(PowerUnits.AE, arg0.getTagCompound().getDouble(ENERGY_NBT));
- }
-
- @Override
- public double getAEMaxPower(ItemStack arg0) {
- return PowerUnits.RF.convertTo(PowerUnits.AE, this.getMaxEnergyStored(arg0));
- }
-
- @Override
- @net.minecraftforge.fml.common.Optional.Method(modid = "appliedenergistics2")
- public AccessRestriction getPowerFlow(ItemStack arg0) {
- return AccessRestriction.READ_WRITE;
- }
-
- @Override
- @net.minecraftforge.fml.common.Optional.Method(modid = "appliedenergistics2")
- public double injectAEPower(ItemStack arg0, double arg1, Actionable arg2) {
- // Whereas RF returns energy able to be stored, AE2 returns energy **unable** to be stored.
- return arg1 - PowerUnits.RF.convertTo(PowerUnits.AE, this._receiveEnergy(arg0, PowerUnits.AE.convertTo(PowerUnits.RF, arg1), arg2 == Actionable.SIMULATE));
- }
-}
diff --git a/src/main/java/landmaster/plustic/tools/nbt/LaserNBT.java b/src/main/java/landmaster/plustic/tools/nbt/LaserNBT.java
deleted file mode 100644
index 03ee451c..00000000
--- a/src/main/java/landmaster/plustic/tools/nbt/LaserNBT.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package landmaster.plustic.tools.nbt;
-
-import java.util.*;
-
-import landmaster.plustic.tools.stats.*;
-import net.minecraft.nbt.*;
-
-public class LaserNBT extends ToolEnergyNBT {
- public static final String TagPOWER = "LaserGunPower";
- public static final String TagRANGE = "LaserGunRange";
-
- public float power, range;
-
- public LaserNBT() {
- power = 0;
- }
-
- public LaserNBT(NBTTagCompound nbt) {
- super(nbt);
- }
-
- /**
- * Call this after {@link slimeknights.tconstruct.library.tools.ToolNBT#head(slimeknights.tconstruct.library.materials.HeadMaterialStats...)}
- * @param stats the laser medium stats
- * @return this object
- */
- public LaserNBT laserMedium(LaserMediumMaterialStats... stats) {
- this.power = (float)Arrays.stream(stats).filter(stat -> stat!=null).mapToDouble(stat -> stat.power).sum() / stats.length;
- this.range = (float)Arrays.stream(stats).filter(stat -> stat!=null).mapToDouble(stat -> stat.range).sum() / stats.length;
- this.attack = this.power;
- return this;
- }
-
- @Override
- public void read(NBTTagCompound tag) {
- super.read(tag);
- this.power = tag.getFloat(TagPOWER);
- this.range = tag.getFloat(TagRANGE);
- }
-
- @Override
- public void write(NBTTagCompound tag) {
- super.write(tag);
- tag.setFloat(TagPOWER, this.power);
- tag.setFloat(TagRANGE, this.range);
- }
-}
diff --git a/src/main/java/landmaster/plustic/tools/nbt/ToolEnergyNBT.java b/src/main/java/landmaster/plustic/tools/nbt/ToolEnergyNBT.java
deleted file mode 100644
index 785e8843..00000000
--- a/src/main/java/landmaster/plustic/tools/nbt/ToolEnergyNBT.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package landmaster.plustic.tools.nbt;
-
-import java.util.*;
-
-import landmaster.plustic.tools.stats.*;
-import net.minecraft.nbt.*;
-import slimeknights.tconstruct.library.tools.*;
-
-public class ToolEnergyNBT extends ToolNBT {
- public static final String TagENERGY = "LaserGunEnergy";
-
- public int energy;
-
- public ToolEnergyNBT() {
- energy = 0;
- }
-
- public ToolEnergyNBT(NBTTagCompound nbt) {
- super(nbt);
- }
-
- @Override
- public void read(NBTTagCompound tag) {
- super.read(tag);
- energy = tag.getInteger(TagENERGY);
- }
-
- @Override
- public void write(NBTTagCompound tag) {
- super.write(tag);
- tag.setInteger(TagENERGY, energy);
- }
-
- public ToolEnergyNBT batteryCell(BatteryCellMaterialStats... stats) {
- energy = Arrays.stream(stats).filter(stat -> stat!=null).mapToInt(stat -> stat.energy).sum();
- return this;
- }
-}
diff --git a/src/main/java/landmaster/plustic/tools/parts/ToolPartWithStoneMold.java b/src/main/java/landmaster/plustic/tools/parts/ToolPartWithStoneMold.java
deleted file mode 100644
index b5feef0a..00000000
--- a/src/main/java/landmaster/plustic/tools/parts/ToolPartWithStoneMold.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package landmaster.plustic.tools.parts;
-
-import slimeknights.tconstruct.library.materials.*;
-import slimeknights.tconstruct.library.tools.*;
-import slimeknights.tconstruct.tools.*;
-
-/**
- * Class for tool parts such that stone parts can be created for casting only.
- * @author Landmaster
- *
- */
-public class ToolPartWithStoneMold extends ToolPart {
- public ToolPartWithStoneMold(int cost) {
- super(cost);
- }
-
- @Override
- public boolean canUseMaterial(Material mat) {
- return mat == TinkerMaterials.stone || super.canUseMaterial(mat);
- }
-}
diff --git a/src/main/java/landmaster/plustic/tools/stats/BatteryCellMaterialStats.java b/src/main/java/landmaster/plustic/tools/stats/BatteryCellMaterialStats.java
deleted file mode 100644
index be6faeec..00000000
--- a/src/main/java/landmaster/plustic/tools/stats/BatteryCellMaterialStats.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package landmaster.plustic.tools.stats;
-
-import java.util.*;
-
-import com.google.common.collect.*;
-
-import net.minecraft.client.resources.*;
-import slimeknights.tconstruct.library.materials.*;
-
-public class BatteryCellMaterialStats extends AbstractMaterialStats {
- public static final String TYPE = "battery_cell";
-
- public final int energy;
-
- static {
- Material.UNKNOWN.addStats(new BatteryCellMaterialStats(0));
- }
-
- public BatteryCellMaterialStats(int energy) {
- super(TYPE);
- this.energy = energy;
- }
-
- @Override
- public List getLocalizedInfo() {
- return ImmutableList.of(I18n.format("stat.battery_cell.energy.name", energy));
- }
-
- @Override
- public List getLocalizedDesc() {
- return ImmutableList.of(I18n.format("stat.battery_cell.energy.desc"));
- }
-
-}
diff --git a/src/main/java/landmaster/plustic/tools/stats/LaserMediumMaterialStats.java b/src/main/java/landmaster/plustic/tools/stats/LaserMediumMaterialStats.java
deleted file mode 100644
index e795a8c2..00000000
--- a/src/main/java/landmaster/plustic/tools/stats/LaserMediumMaterialStats.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package landmaster.plustic.tools.stats;
-
-import java.util.*;
-
-import com.google.common.collect.*;
-
-import net.minecraft.client.resources.*;
-import slimeknights.tconstruct.library.materials.*;
-
-public class LaserMediumMaterialStats extends AbstractMaterialStats {
- public static final String TYPE = "laser_medium";
-
- private static float maxRange = 20;
-
- public static float getMaxRange() { return maxRange; }
-
- public final float power, range;
-
- static {
- Material.UNKNOWN.addStats(new LaserMediumMaterialStats(0, 0));
- }
-
- public LaserMediumMaterialStats(float power, float range) {
- super(TYPE);
- this.power = power;
- this.range = range;
- maxRange = Math.max(maxRange, range);
- }
-
- @Override
- public List getLocalizedInfo() {
- return ImmutableList.of(I18n.format("stat.laser_medium.power.name", power),
- I18n.format("stat.laser_medium.range.name", range));
- }
-
- @Override
- public List getLocalizedDesc() {
- return ImmutableList.of(I18n.format("stat.laser_medium.power.desc"),
- I18n.format("stat.laser_medium.range.desc"));
- }
-}
diff --git a/src/main/java/landmaster/plustic/traits/Anticorrosion.java b/src/main/java/landmaster/plustic/traits/Anticorrosion.java
deleted file mode 100644
index 4fcf17f4..00000000
--- a/src/main/java/landmaster/plustic/traits/Anticorrosion.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package landmaster.plustic.traits;
-
-import net.minecraft.entity.*;
-import net.minecraft.init.*;
-import net.minecraft.item.*;
-import net.minecraft.world.*;
-import slimeknights.tconstruct.library.traits.*;
-
-public class Anticorrosion extends AbstractTrait {
- public static final Anticorrosion anticorrosion = new Anticorrosion();
-
- public Anticorrosion() {
- super("anticorrosion", 0xFFFFFF);
- }
-
- @Override
- public void onUpdate(ItemStack tool, World world, Entity entity, int itemSlot, boolean isSelected) {
- if (!world.isRemote && isSelected && entity instanceof EntityLivingBase && random.nextFloat() < 0.03f) {
- EntityLivingBase elb = (EntityLivingBase)entity;
- elb.removePotionEffect(MobEffects.POISON);
- }
- }
-}
diff --git a/src/main/java/landmaster/plustic/traits/AoASkillThresholdTrait.java b/src/main/java/landmaster/plustic/traits/AoASkillThresholdTrait.java
deleted file mode 100644
index 502a3193..00000000
--- a/src/main/java/landmaster/plustic/traits/AoASkillThresholdTrait.java
+++ /dev/null
@@ -1,86 +0,0 @@
-package landmaster.plustic.traits;
-
-import java.util.*;
-
-import it.unimi.dsi.fastutil.ints.*;
-import net.minecraft.entity.*;
-import net.minecraft.entity.player.*;
-import net.minecraft.item.*;
-import net.minecraft.util.*;
-import net.minecraft.world.*;
-import net.minecraftforge.items.*;
-import net.tslat.aoa3.library.*;
-import net.tslat.aoa3.utils.*;
-import slimeknights.tconstruct.library.Util;
-import slimeknights.tconstruct.library.traits.*;
-
-public class AoASkillThresholdTrait extends AbstractTrait {
- private static final EnumMap> traitsCache = new EnumMap<>(Enums.Skills.class);
-
- public static AoASkillThresholdTrait fetch(String skill, int minLevel) {
- return fetch(Enums.Skills.valueOf(skill.toUpperCase(Locale.US)), minLevel);
- }
-
- public static AoASkillThresholdTrait fetch(Enums.Skills skill, int minLevel) {
- Int2ObjectMap lvToTrait = traitsCache.computeIfAbsent(skill,
- k -> new Int2ObjectOpenHashMap<>());
- if (!lvToTrait.containsKey(minLevel)) {
- lvToTrait.put(minLevel, new AoASkillThresholdTrait(skill, minLevel));
- }
- return lvToTrait.get(minLevel);
- }
-
- private final Enums.Skills skill;
- private final int minLevel;
-
- public AoASkillThresholdTrait(Enums.Skills skill, int minLevel, String customIdentifier) {
- super(customIdentifier, 0xffffff);
- this.skill = skill;
- this.minLevel = minLevel;
- }
- public AoASkillThresholdTrait(Enums.Skills skill, int minLevel) {
- this(skill, minLevel, genIdentifier(skill, minLevel));
- }
-
- public static String genIdentifier(Enums.Skills skill, int minLevel) {
- return "aoa_threshold_" + skill.name().toLowerCase(Locale.US) + "_" + minLevel;
- }
-
- public Enums.Skills getSkill() {
- return skill;
- }
-
- public int getMinLevel() {
- return minLevel;
- }
-
- @Override
- public void onUpdate(ItemStack tool, World world, Entity entity, int itemSlot, boolean isSelected) {
- if (!world.isRemote
- && entity instanceof EntityPlayer
- && !((EntityPlayer)entity).capabilities.isCreativeMode
- && !PlayerUtil.doesPlayerHaveLevel((EntityPlayer)entity, getSkill(), getMinLevel())) {
- EntityPlayer player = (EntityPlayer)entity;
- ItemHandlerHelper.giveItemToPlayer(player, tool);
- player.setHeldItem(player.getHeldItemOffhand() == tool
- ? EnumHand.OFF_HAND : EnumHand.MAIN_HAND, ItemStack.EMPTY);
- player.inventoryContainer.detectAndSendChanges();
- }
- }
-
- @Override
- public String getLocalizedName() {
- return Util.translateFormatted(
- "modifier.aoa_threshold.name",
- Util.translate("skills.%s.name", getSkill().name().toLowerCase(Locale.US)),
- getMinLevel());
- }
-
- @Override
- public String getLocalizedDesc() {
- return Util.translateFormatted(
- "modifier.aoa_threshold.desc",
- Util.translate("skills.%s.name", getSkill().name().toLowerCase(Locale.US)),
- getMinLevel());
- }
-}
diff --git a/src/main/java/landmaster/plustic/traits/Apocalypse.java b/src/main/java/landmaster/plustic/traits/Apocalypse.java
deleted file mode 100644
index 5e0f4cc7..00000000
--- a/src/main/java/landmaster/plustic/traits/Apocalypse.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package landmaster.plustic.traits;
-
-import net.minecraft.entity.*;
-import net.minecraft.init.*;
-import net.minecraft.item.*;
-import net.minecraft.potion.*;
-import slimeknights.tconstruct.library.traits.*;
-
-public class Apocalypse extends AbstractTrait {
- public static final Apocalypse apocalypse = new Apocalypse();
-
- public Apocalypse() {
- super("apocalypse",0x3A2D7D);
- }
-
- @Override
- public void afterHit(ItemStack tool, EntityLivingBase player, EntityLivingBase target, float damageDealt, boolean wasCritical, boolean wasHit) {
- if (wasHit && target.isEntityAlive()) {
- int amp = -1;
- PotionEffect potionEffect = target.getActivePotionEffect(MobEffects.WITHER);
- if (potionEffect != null) amp = potionEffect.getAmplifier();
- amp = Math.min(3, amp+1);
- target.addPotionEffect(new PotionEffect(MobEffects.WITHER, 130, amp));
- }
- }
-}
diff --git a/src/main/java/landmaster/plustic/traits/Autorepair.java b/src/main/java/landmaster/plustic/traits/Autorepair.java
deleted file mode 100644
index 5a2ed49e..00000000
--- a/src/main/java/landmaster/plustic/traits/Autorepair.java
+++ /dev/null
@@ -1,58 +0,0 @@
-package landmaster.plustic.traits;
-
-import net.minecraft.entity.*;
-import net.minecraft.item.*;
-import net.minecraft.nbt.*;
-import net.minecraft.util.*;
-import net.minecraft.world.*;
-import net.minecraftforge.items.*;
-import slimeknights.tconstruct.library.traits.*;
-import slimeknights.tconstruct.library.utils.*;
-import slimeknights.tconstruct.tools.common.item.*;
-import slimeknights.tconstruct.tools.modifiers.*;
-
-public class Autorepair extends AbstractTrait {
- public static final Autorepair autorepair = new Autorepair();
-
- public Autorepair() {
- super("autorepair", 0xEF2647);
- }
-
- @Override
- public void onUpdate(ItemStack tool, World world, Entity entity, int itemSlot, boolean isSelected) {
- if (!world.isRemote && ToolHelper.isBroken(tool)) {
- IItemHandler ih = entity.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null);
- if (ih != null) {
- //System.out.println("TIME");
- for (int i=0; i singleton = NonNullList.from(null, is);
- ItemStack repairRes = ToolBuilder.tryRepairTool(singleton, tool, true);
- if (!repairRes.isEmpty()) {
- // HACK: Copy over the metadata and NBT values to the main tool
- tool.setItemDamage(repairRes.getItemDamage());
- tool.setTagCompound(repairRes.getTagCompound());
- ih.extractItem(i, 1, false);
- break;
- }
- }
- }
- }
- }
- }
-
- @Override
- public void applyEffect(NBTTagCompound rootCompound, NBTTagCompound modifierTag) {
- super.applyEffect(rootCompound, modifierTag);
- if (rootCompound.getBoolean(ModReinforced.TAG_UNBREAKABLE)) {
- NBTTagCompound toolTag = TagUtil.getToolTag(rootCompound);
- int modifiers = toolTag.getInteger(Tags.FREE_MODIFIERS) + 1;
- toolTag.setInteger(Tags.FREE_MODIFIERS, Math.max(0, modifiers));
- TagUtil.setToolTag(rootCompound, toolTag);
- }
- }
-}
diff --git a/src/main/java/landmaster/plustic/traits/Barrett.java b/src/main/java/landmaster/plustic/traits/Barrett.java
deleted file mode 100644
index b4efac43..00000000
--- a/src/main/java/landmaster/plustic/traits/Barrett.java
+++ /dev/null
@@ -1,18 +0,0 @@
-package landmaster.plustic.traits;
-
-import net.minecraft.entity.*;
-import net.minecraft.item.*;
-import slimeknights.tconstruct.library.traits.*;
-
-public class Barrett extends AbstractTrait {
- public static final Barrett barrett = new Barrett();
-
- public Barrett() {
- super("barrett", 0x0000FF);
- }
-
- @Override
- public boolean isCriticalHit(ItemStack tool, EntityLivingBase player, EntityLivingBase target) {
- return random.nextFloat() < (player.getMaxHealth() - player.getHealth()) / (player.getMaxHealth() * 0.7f);
- }
-}
diff --git a/src/main/java/landmaster/plustic/traits/BlindBandit.java b/src/main/java/landmaster/plustic/traits/BlindBandit.java
deleted file mode 100644
index 2da5b7a7..00000000
--- a/src/main/java/landmaster/plustic/traits/BlindBandit.java
+++ /dev/null
@@ -1,11 +0,0 @@
-package landmaster.plustic.traits;
-
-import landmaster.plustic.entity.*;
-
-public class BlindBandit extends EntityCameoTrait {
- public static final BlindBandit blindbandit = new BlindBandit();
-
- public BlindBandit() {
- super("blindbandit", 0xFF00FF, EntityBlindBandit::new);
- }
-}
diff --git a/src/main/java/landmaster/plustic/traits/BloodyMary.java b/src/main/java/landmaster/plustic/traits/BloodyMary.java
deleted file mode 100644
index ef8f3082..00000000
--- a/src/main/java/landmaster/plustic/traits/BloodyMary.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package landmaster.plustic.traits;
-
-import net.minecraft.entity.*;
-import net.minecraft.entity.item.*;
-import net.minecraft.item.*;
-import net.minecraft.world.World;
-import slimeknights.tconstruct.library.traits.*;
-import slimeknights.tconstruct.shared.*;
-
-public class BloodyMary extends AbstractTrait {
- public static final BloodyMary bloodymary = new BloodyMary();
-
- public BloodyMary() {
- super("bloodymary",0xFF0000);
- }
-
- @Override
- public float damage(ItemStack tool, EntityLivingBase player, EntityLivingBase target, float damage, float newDamage, boolean isCritical) {
- newDamage += Math.pow(target.getMaxHealth()-target.getHealth(),0.6);
- return super.damage(tool, player, target, damage, newDamage, isCritical);
- }
-
- @Override
- public void afterHit(ItemStack tool, EntityLivingBase player, EntityLivingBase target, float damageDealt, boolean wasCritical, boolean wasHit) {
- if (wasHit) {
- spillBlood(target.getEntityWorld(),target.posX,target.posY,target.posZ,0.23f);
- }
- }
-
- protected void spillBlood(World world, double x, double y, double z, float chance) {
- if (!world.isRemote && random.nextFloat() < chance) {
- EntityItem entity = new EntityItem(world, x, y, z, TinkerCommons.matSlimeBallBlood.copy());
- world.spawnEntity(entity);
- }
- }
-}
diff --git a/src/main/java/landmaster/plustic/traits/Botanical.java b/src/main/java/landmaster/plustic/traits/Botanical.java
deleted file mode 100644
index de29c34f..00000000
--- a/src/main/java/landmaster/plustic/traits/Botanical.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package landmaster.plustic.traits;
-
-import java.util.*;
-
-import com.google.common.collect.*;
-
-import landmaster.plustic.config.*;
-import net.minecraft.nbt.*;
-import slimeknights.tconstruct.library.traits.*;
-import slimeknights.tconstruct.library.utils.*;
-
-public class Botanical extends AbstractTraitLeveled {
- public static final int MAX_LEVELS = 3;
-
- public static final List botanical = ImmutableList.of(new Botanical(1), new Botanical(2));
-
- public Botanical(int levels) {
- super("botanical", 0x00FF00, MAX_LEVELS, levels);
- }
-
- @Override
- public void applyModifierEffect(NBTTagCompound rootCompound) {
- NBTTagCompound toolTag = TagUtil.getToolTag(rootCompound);
- int modifiers = toolTag.getInteger(Tags.FREE_MODIFIERS) + Config.getBotanAmount().get(levels-1);
- toolTag.setInteger(Tags.FREE_MODIFIERS, Math.max(0, modifiers));
- TagUtil.setToolTag(rootCompound, toolTag);
- }
-}
diff --git a/src/main/java/landmaster/plustic/traits/BrownMagic.java b/src/main/java/landmaster/plustic/traits/BrownMagic.java
deleted file mode 100644
index 81279c4d..00000000
--- a/src/main/java/landmaster/plustic/traits/BrownMagic.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package landmaster.plustic.traits;
-
-import landmaster.plustic.*;
-import landmaster.plustic.api.*;
-import landmaster.plustic.net.*;
-import net.minecraft.entity.*;
-import net.minecraft.item.*;
-import net.minecraft.world.*;
-import net.minecraftforge.fml.common.*;
-import slimeknights.tconstruct.library.traits.*;
-
-public class BrownMagic extends AbstractTrait {
- public static final BrownMagic brownmagic = new BrownMagic();
-
- public BrownMagic() {
- super("brownmagic", 0x3A1B00);
- Portal.addPortalable(identifier);
- }
-
- @Override
- public void onUpdate(ItemStack tool, World world, Entity entity, int itemSlot, boolean isSelected) {
- if (isSelected && FMLCommonHandler.instance().getSide().isClient()) {
- if (PlusTiC.proxy.isControlPressed("brown_magic")) {
- PacketHandler.INSTANCE.sendToServer(new PacketBrownAbracadabra());
- }
- }
- }
-}
diff --git a/src/main/java/landmaster/plustic/traits/BurstDamage.java b/src/main/java/landmaster/plustic/traits/BurstDamage.java
deleted file mode 100644
index 98b5309a..00000000
--- a/src/main/java/landmaster/plustic/traits/BurstDamage.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package landmaster.plustic.traits;
-
-import net.minecraft.entity.*;
-import net.minecraft.item.*;
-import slimeknights.tconstruct.library.traits.*;
-
-public class BurstDamage extends AbstractTrait {
- public static final BurstDamage burstdamage = new BurstDamage();
-
- public BurstDamage() {
- super("burstdamage", 0xCC4A0A);
- }
-
- @Override
- public float damage(ItemStack tool, EntityLivingBase player, EntityLivingBase target, float damage, float newDamage, boolean isCritical) {
- return (float)(damage + Math.pow(newDamage - damage, 1.2));
- }
-
- @Override
- public int getPriority() {
- return -1000;
- }
-}
diff --git a/src/main/java/landmaster/plustic/traits/ChadThunder.java b/src/main/java/landmaster/plustic/traits/ChadThunder.java
deleted file mode 100644
index 9f600315..00000000
--- a/src/main/java/landmaster/plustic/traits/ChadThunder.java
+++ /dev/null
@@ -1,50 +0,0 @@
-package landmaster.plustic.traits;
-
-import javax.annotation.Nonnull;
-
-import landmaster.plustic.api.*;
-import net.minecraft.entity.*;
-import net.minecraft.entity.effect.*;
-import net.minecraft.item.*;
-import net.minecraft.util.*;
-import net.minecraft.world.*;
-import slimeknights.tconstruct.library.potion.*;
-import slimeknights.tconstruct.library.traits.*;
-
-public class ChadThunder extends AbstractTrait {
- public static final ChadThunder chadthunder = new ChadThunder();
-
- public static final ChadPotion chadPotion = new ChadPotion();
-
- public ChadThunder() {
- super("chadthunder", 0x6df5ff);
- }
-
- @Override
- public void onUpdate(ItemStack tool, World world, Entity entity, int itemSlot, boolean isSelected) {
- if (isSelected && (entity.ticksExisted % 20 == 0)) {
- world.addWeatherEffect(new EntityLightningBolt(world, entity.posX + 6*random.nextDouble()-3, entity.posY + 6*random.nextDouble()-3, entity.posZ + 6*random.nextDouble()-3, true));
- }
- }
-
- @Override
- public void afterHit(ItemStack tool, EntityLivingBase player, EntityLivingBase target, float damageDealt, boolean wasCritical, boolean wasHit) {
- chadPotion.apply(target, 10*20);
- }
-
- private static class ChadPotion extends TinkerPotion {
- public ChadPotion() {
- super(new ResourceLocation(ModInfo.MODID, "chad_potion"), true, false, 0x6df5ff);
- }
-
- @Override
- public boolean isReady(int duration, int strength) {
- return duration % 20 == 0;
- }
-
- @Override
- public void performEffect(@Nonnull EntityLivingBase entity, int id) {
- entity.world.addWeatherEffect(new EntityLightningBolt(entity.world, entity.posX, entity.posY, entity.posZ, false));
- }
- }
-}
diff --git a/src/main/java/landmaster/plustic/traits/DPRK.java b/src/main/java/landmaster/plustic/traits/DPRK.java
deleted file mode 100644
index 9be400e8..00000000
--- a/src/main/java/landmaster/plustic/traits/DPRK.java
+++ /dev/null
@@ -1,11 +0,0 @@
-package landmaster.plustic.traits;
-
-import landmaster.plustic.entity.*;
-
-public class DPRK extends EntityCameoTrait {
- public static final DPRK dprk = new DPRK();
-
- public DPRK() {
- super("dprk", 0xE30000, EntitySupremeLeader::new);
- }
-}
diff --git a/src/main/java/landmaster/plustic/traits/DarkTraveler.java b/src/main/java/landmaster/plustic/traits/DarkTraveler.java
deleted file mode 100644
index 90a6910e..00000000
--- a/src/main/java/landmaster/plustic/traits/DarkTraveler.java
+++ /dev/null
@@ -1,38 +0,0 @@
-package landmaster.plustic.traits;
-
-import java.util.*;
-
-import landmaster.plustic.util.*;
-import net.minecraft.entity.*;
-import net.minecraft.entity.monster.*;
-import net.minecraft.item.*;
-import net.minecraft.util.*;
-import net.minecraft.world.*;
-import slimeknights.tconstruct.library.traits.*;
-import slimeknights.tconstruct.library.utils.*;
-
-public class DarkTraveler extends AbstractTrait {
- public static final DarkTraveler darktraveler = new DarkTraveler();
-
- public DarkTraveler() {
- super("darktraveler", 0x000044);
- }
-
- @Override
- public void onUpdate(ItemStack tool, World world, Entity entity, int itemSlot, boolean isSelected) {
- if (world.isRemote || !isSelected) return;
- if (random.nextFloat() < 0.035f && ToolHelper.getCurrentDurability(tool) >= 1) {
- List lst = world.getEntitiesWithinAABB(EntityLiving.class,
- Utils.AABBfromVecs(entity.getPositionVector().subtract(8,8,8),
- entity.getPositionVector().add(8,8,8)),
- ent -> ent instanceof IMob && ent != entity);
- if (lst.size() > 0) {
- EntityLiving randomEntity = lst.get(random.nextInt(lst.size()));
- randomEntity.attackEntityFrom(new EntityDamageSource("darktraveler", entity).setDamageBypassesArmor(),
- 2f+random.nextFloat()*2.5f);
- ToolHelper.damageTool(tool, 1, entity instanceof EntityLivingBase
- ? (EntityLivingBase)entity : null);
- }
- }
- }
-}
diff --git a/src/main/java/landmaster/plustic/traits/DeathSaveTrait.java b/src/main/java/landmaster/plustic/traits/DeathSaveTrait.java
deleted file mode 100644
index f7a03787..00000000
--- a/src/main/java/landmaster/plustic/traits/DeathSaveTrait.java
+++ /dev/null
@@ -1,206 +0,0 @@
-package landmaster.plustic.traits;
-
-import java.util.*;
-import java.util.function.*;
-
-import c4.conarm.lib.armor.*;
-import c4.conarm.lib.capabilities.*;
-import c4.conarm.lib.traits.*;
-import landmaster.plustic.api.*;
-import landmaster.plustic.util.*;
-import net.minecraft.entity.*;
-import net.minecraft.entity.item.*;
-import net.minecraft.entity.player.*;
-import net.minecraft.init.*;
-import net.minecraft.item.*;
-import net.minecraft.potion.*;
-import net.minecraft.util.*;
-import net.minecraft.util.text.*;
-import net.minecraft.world.*;
-import net.minecraftforge.common.*;
-import net.minecraftforge.common.capabilities.*;
-import net.minecraftforge.event.entity.living.*;
-import net.minecraftforge.event.entity.player.*;
-import net.minecraftforge.fml.common.Loader;
-import net.minecraftforge.fml.common.eventhandler.*;
-import net.minecraftforge.fml.common.gameevent.*;
-import net.minecraftforge.items.*;
-import slimeknights.tconstruct.library.modifiers.ModifierNBT;
-import slimeknights.tconstruct.library.traits.*;
-import slimeknights.tconstruct.library.utils.*;
-
-/**
- * Abstract class for PlusTiC traits that rescue the holder from death given certain items.
- * @author Landmaster
- *
- */
-@net.minecraftforge.fml.common.Optional.Interface(iface = "c4.conarm.lib.traits.IArmorTrait", modid = "conarm")
-@net.minecraftforge.fml.common.Optional.Interface(iface = "c4.conarm.lib.traits.IArmorAbility", modid = "conarm")
-public abstract class DeathSaveTrait extends AbstractTrait implements IArmorTrait, IArmorAbility {
- @CapabilityInject(Portal.IPortalArmor.class)
- private static Capability PORTAL_ARMOR = null;
- @CapabilityInject(Toggle.IToggleArmor.class)
- private static Capability TOGGLE_ARMOR = null;
-
- private final int cost;
- private final Predicate stackMatcher;
- private final String unlocSaveMessage;
-
- public DeathSaveTrait(String identifier, int color, int cost, Predicate stackMatcher, String unlocSaveMessage) {
- super(identifier, color);
- this.cost = cost;
- this.stackMatcher = stackMatcher;
- this.unlocSaveMessage = unlocSaveMessage;
- MinecraftForge.EVENT_BUS.register(this);
- Toggle.addToggleable(identifier);
- Toggle.addToggleable(Toggle.ARMOR_FLAG+identifier);
- Portal.addPortalable(identifier);
- }
-
- @Override
- public String getLocalizedDesc() {
- // add the item cost to the description
- return String.format(super.getLocalizedDesc(), cost);
- }
-
- @SubscribeEvent(priority = EventPriority.HIGHEST)
- public void timing(LivingDeathEvent event) {
- if (event.getEntity().getEntityWorld().isRemote
- || !(event.getEntity() instanceof EntityPlayerMP)) {
- return;
- }
-
- //System.out.println("Hmm… "+hasDeathSaveArmor);
- if (Loader.isModLoaded("conarm")
- && hasDeathSaveArmor((EntityPlayer)event.getEntity())
- && event.getEntity().hasCapability(PORTAL_ARMOR, null)
- && event.getEntity().hasCapability(TOGGLE_ARMOR, null)
- && !event.getEntity().getCapability(TOGGLE_ARMOR, null).getDisabled().contains(identifier)
- && Utils.canTeleportTo((EntityPlayer)event.getEntity(), event.getEntity().getCapability(PORTAL_ARMOR, null).location())
- && !event.getEntity().getCapability(PORTAL_ARMOR, null).location().equals(Coord4D.NIHIL)) {
- checkItems(event, event.getEntity().getCapability(PORTAL_ARMOR, null).location());
- } else {
- Arrays.stream(EnumHand.values())
- .map(event.getEntityLiving()::getHeldItem)
- .map(TagUtil::getTagSafe)
- .filter(nbt -> TinkerUtil.hasTrait(nbt, identifier)
- && Toggle.getToggleState(nbt, identifier)
- && nbt.hasKey(Portal.PORTAL_NBT, 10))
- .map(nbt -> nbt.getCompoundTag(Portal.PORTAL_NBT))
- .map(Coord4D::fromNBT)
- .filter(coord -> Utils.canTeleportTo((EntityPlayer)event.getEntity(), coord))
- .findFirst().ifPresent(coord -> {
- checkItems(event, coord);
- });
- }
- }
-
- private boolean hasDeathSaveArmor(EntityPlayer player) {
- return Optional.ofNullable(ArmorAbilityHandler.getArmorAbilitiesData(player))
- .map(ArmorAbilityHandler.IArmorAbilities::getAbilityMap)
- .filter(map -> map.containsKey(identifier))
- .isPresent();
- }
-
- private void checkItems(LivingDeathEvent event, Coord4D coord) {
- //System.out.println("Checking items "+event.getSource().getDamageType());
- IItemHandler ih = event.getEntity().getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null);
- for (int i=0; i= cost) {
- ih.extractItem(i, cost, false);
- event.setCanceled(true);
- event.getEntityLiving().clearActivePotions();
- MinecraftForge.EVENT_BUS.register(new Object() {
- @SubscribeEvent
- public void onServerTick(TickEvent.ServerTickEvent event0) {
- if (!event.getEntityLiving().isBurning()) {
- MinecraftForge.EVENT_BUS.unregister(this);
- }
- event.getEntityLiving().extinguish();
- }
- });
- event.getEntityLiving().setHealth(1);
- event.getEntityLiving().addPotionEffect(new PotionEffect(MobEffects.REGENERATION, 160, 1));
- event.getEntityLiving().addPotionEffect(new PotionEffect(MobEffects.FIRE_RESISTANCE, 160));
- event.getEntity().sendMessage(new TextComponentTranslation(
- unlocSaveMessage));
- event.getEntity().fallDistance = 0;
- Utils.teleportPlayerTo((EntityPlayerMP)event.getEntity(), coord);
- return;
- }
- }
- }
-
- @Override
- public boolean disableRendering(ItemStack arg0, EntityLivingBase arg1) {
- return false;
- }
-
- @Override
- @net.minecraftforge.fml.common.Optional.Method(modid = "conarm")
- public ArmorModifications getModifications(EntityPlayer arg0, ArmorModifications arg1, ItemStack arg2,
- DamageSource arg3, double arg4, int arg5) {
- return arg1;
- }
-
- @Override
- public void onAbilityTick(int arg0, World arg1, EntityPlayer arg2) {
- }
-
- @Override
- public int onArmorDamage(ItemStack arg0, DamageSource arg1, int arg2, int arg3, EntityPlayer arg4, int arg5) {
- return arg3;
- }
-
- @Override
- public void onArmorEquipped(ItemStack arg0, EntityPlayer arg1, int arg2) {
- }
-
- @Override
- public int onArmorHeal(ItemStack arg0, DamageSource arg1, int arg2, int arg3, EntityPlayer arg4, int arg5) {
- return arg3;
- }
-
- @Override
- public void onArmorRemoved(ItemStack arg0, EntityPlayer arg1, int arg2) {
- }
-
- @Override
- public float onDamaged(ItemStack arg0, EntityPlayer arg1, DamageSource arg2, float arg3, float arg4,
- LivingDamageEvent arg5) {
- return arg4;
- }
-
- @Override
- public void onFalling(ItemStack arg0, EntityPlayer arg1, LivingFallEvent arg2) {
- }
-
- @Override
- public float onHeal(ItemStack arg0, EntityPlayer arg1, float arg2, float arg3, LivingHealEvent arg4) {
- return arg3;
- }
-
- @Override
- public float onHurt(ItemStack arg0, EntityPlayer arg1, DamageSource arg2, float arg3, float arg4,
- LivingHurtEvent arg5) {
- return arg4;
- }
-
- @Override
- public void onItemPickup(ItemStack arg0, EntityItem arg1, EntityItemPickupEvent arg2) {
- }
-
- @Override
- public void onJumping(ItemStack arg0, EntityPlayer arg1, LivingEvent.LivingJumpEvent arg2) {
- }
-
- @Override
- public void onKnockback(ItemStack arg0, EntityPlayer arg1, LivingKnockBackEvent arg2) {
- }
-
- @Override
- public int getAbilityLevel(ModifierNBT arg0) {
- return arg0.level;
- }
-}
diff --git a/src/main/java/landmaster/plustic/traits/DevilsStrength.java b/src/main/java/landmaster/plustic/traits/DevilsStrength.java
deleted file mode 100644
index f6ad6d79..00000000
--- a/src/main/java/landmaster/plustic/traits/DevilsStrength.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package landmaster.plustic.traits;
-
-import java.util.*;
-import com.google.common.collect.*;
-import net.minecraft.entity.*;
-import net.minecraft.item.*;
-import net.minecraft.nbt.*;
-import slimeknights.tconstruct.library.traits.*;
-import slimeknights.tconstruct.library.*;
-
-public class DevilsStrength extends AbstractTrait {
- public static final DevilsStrength devilsstrength = new DevilsStrength();
- public static final float BONUS = 2;
-
- public DevilsStrength() {
- super("devilsstrength", 0xFF0000);
- }
-
- @Override
- public float damage(ItemStack tool, EntityLivingBase player, EntityLivingBase target, float damage, float newDamage, boolean isCritical) {
- if (player.getEntityWorld().provider.getDimension() != 0) {
- newDamage += BONUS;
- }
- return super.damage(tool, player, target, damage, newDamage, isCritical);
- }
-
- @Override
- public List getExtraInfo(ItemStack tool, NBTTagCompound modifierTag) {
- String loc = String.format(LOC_Extra, getModifierIdentifier());
- return ImmutableList.of(Util.translateFormatted(loc, Util.df.format(BONUS)));
- }
-}
diff --git a/src/main/java/landmaster/plustic/traits/DivineShield.java b/src/main/java/landmaster/plustic/traits/DivineShield.java
deleted file mode 100644
index f3b18204..00000000
--- a/src/main/java/landmaster/plustic/traits/DivineShield.java
+++ /dev/null
@@ -1,50 +0,0 @@
-
-package landmaster.plustic.traits;
-
-import landmaster.plustic.api.*;
-import net.minecraft.entity.*;
-import net.minecraft.init.*;
-import net.minecraft.item.*;
-import net.minecraft.potion.*;
-import net.minecraft.world.*;
-import net.minecraftforge.common.*;
-import net.minecraftforge.event.entity.living.*;
-import net.minecraftforge.fml.common.eventhandler.*;
-import slimeknights.tconstruct.library.traits.*;
-import slimeknights.tconstruct.library.utils.*;
-
-public class DivineShield extends AbstractTrait {
- public static final DivineShield divineShield = new DivineShield();
-
- public DivineShield() {
- super("divineshield", 0x00FFFF);
- MinecraftForge.EVENT_BUS.register(this);
- Toggle.addToggleable(identifier);
- }
-
- @Override
- public void onUpdate(ItemStack tool, World world, Entity entity, int itemSlot, boolean isSelected) {
- if (isSelected && entity instanceof EntityLivingBase) {
- ((EntityLivingBase)entity).addPotionEffect(new PotionEffect(MobEffects.FIRE_RESISTANCE, 20));
- }
- }
-
- /**
- * @updator: TeamDman
- * @changes: Fix divine shield not working from offhand (#2)
- */
- @SubscribeEvent(priority = EventPriority.LOWEST)
- public void defend(LivingHurtEvent event) {
- ItemStack tool = event.getEntityLiving().getHeldItem(event.getEntityLiving().getActiveHand());
- if (event.getEntity().getEntityWorld().isRemote
- || !Toggle.getToggleState(tool, identifier)
- || event.isCanceled()
- || !TinkerUtil.hasTrait(
- TagUtil.getTagSafe(tool),
- getIdentifier())
- || ToolHelper.getCurrentDurability(tool) < 1)
- return;
- event.setAmount(event.getAmount() * 0.85f);
- ToolHelper.damageTool(tool, 1, event.getEntityLiving());
- }
-}
diff --git a/src/main/java/landmaster/plustic/traits/Elemental.java b/src/main/java/landmaster/plustic/traits/Elemental.java
deleted file mode 100644
index 369ee2f6..00000000
--- a/src/main/java/landmaster/plustic/traits/Elemental.java
+++ /dev/null
@@ -1,78 +0,0 @@
-package landmaster.plustic.traits;
-
-import net.minecraft.block.*;
-import net.minecraft.block.state.*;
-import net.minecraft.enchantment.*;
-import net.minecraft.entity.*;
-import net.minecraft.entity.item.*;
-import net.minecraft.entity.player.*;
-import net.minecraft.init.*;
-import net.minecraft.item.*;
-import net.minecraft.potion.*;
-import net.minecraft.util.math.*;
-import net.minecraft.world.*;
-import net.minecraftforge.event.world.*;
-import slimeknights.tconstruct.library.traits.*;
-
-public class Elemental extends AbstractTrait {
- public static final Elemental elemental = new Elemental();
-
- public Elemental() {
- super("elemental",0xF66AFD);
- }
-
- @Override
- public void beforeBlockBreak(ItemStack tool, BlockEvent.BreakEvent event) {
- destroyColumn(tool, event.getWorld(), event.getState(), event.getPos(), event.getPlayer());
- }
-
- private void destroyColumn(ItemStack tool, World world, IBlockState state, BlockPos pos, EntityPlayer player) {
- if (!world.isRemote && state.getBlock() instanceof BlockFalling && tool.canHarvestBlock(state)) {
- BlockPos posUp = pos, posDown = pos;
- while (world.getBlockState(posUp = posUp.add(0,1,0)).getBlock() == state.getBlock())
- ; // nothing to do
- while (world.getBlockState(posDown = posDown.add(0,-1,0)).getBlock() == state.getBlock())
- ; // nothing to do
- while (!(posUp = posUp.add(0,-1,0)).equals(posDown)) {
- if (posUp.equals(pos)) continue;
- if (EnchantmentHelper.getEnchantmentLevel(Enchantments.SILK_TOUCH, tool) > 0 && state.getBlock().canSilkHarvest(world, posUp, state, player)) {
- world.destroyBlock(posUp, false);
- if (!player.capabilities.isCreativeMode) {
- EntityItem ie = new EntityItem(world, posUp.getX(), posUp.getY(), posUp.getZ(), new ItemStack(Item.getItemFromBlock(state.getBlock())));
- world.spawnEntity(ie);
- }
- } else {
- world.destroyBlock(posUp, false);
- if (!player.capabilities.isCreativeMode) {
- state.getBlock().dropBlockAsItem(world, posUp, state, EnchantmentHelper.getEnchantmentLevel(Enchantments.FORTUNE, tool));
- }
- }
- }
- }
- }
-
- @Override
- public void afterHit(ItemStack tool, EntityLivingBase player, EntityLivingBase target, float damageDealt, boolean wasCritical, boolean wasHit) {
- if (wasHit && random.nextFloat() < 0.22f) {
- int rand = random.nextInt(4);
- switch (rand) {
- case 0: // Water
- player.addPotionEffect(new PotionEffect(MobEffects.ABSORPTION, 80));
- player.addPotionEffect(new PotionEffect(MobEffects.WATER_BREATHING, 1200));
- break;
- case 1: // Wind
- player.addPotionEffect(new PotionEffect(MobEffects.SPEED, 80));
- player.addPotionEffect(new PotionEffect(MobEffects.JUMP_BOOST, 80));
- break;
- case 2: // Earth
- player.addPotionEffect(new PotionEffect(MobEffects.STRENGTH, 80));
- player.addPotionEffect(new PotionEffect(MobEffects.SATURATION, 80));
- break;
- case 3: // Fire
- player.addPotionEffect(new PotionEffect(MobEffects.FIRE_RESISTANCE, 80));
- player.addPotionEffect(new PotionEffect(MobEffects.REGENERATION, 80));
- break;
- }
- }
- }
-}
diff --git a/src/main/java/landmaster/plustic/traits/EntityCameoTrait.java b/src/main/java/landmaster/plustic/traits/EntityCameoTrait.java
deleted file mode 100644
index 9b8d83b8..00000000
--- a/src/main/java/landmaster/plustic/traits/EntityCameoTrait.java
+++ /dev/null
@@ -1,62 +0,0 @@
-package landmaster.plustic.traits;
-
-import landmaster.plustic.api.*;
-import net.minecraft.entity.*;
-import net.minecraft.item.*;
-import net.minecraft.util.*;
-import net.minecraft.world.*;
-import net.minecraftforge.common.*;
-import net.minecraftforge.event.entity.living.*;
-import net.minecraftforge.fml.common.eventhandler.*;
-import slimeknights.tconstruct.library.traits.*;
-import slimeknights.tconstruct.library.utils.*;
-
-public class EntityCameoTrait extends AbstractTrait {
- @FunctionalInterface
- public static interface ICameoFactory {
- Entity create(World world, Entity summoner, EntityLivingBase target);
- }
-
- protected final ICameoFactory factory;
-
- public EntityCameoTrait(String identifier, int color, ICameoFactory factory) {
- super(identifier, color);
- this.factory = factory;
- MinecraftForge.EVENT_BUS.register(this);
- Toggle.addToggleable(identifier);
- }
-
- @Override
- public void afterHit(ItemStack tool, EntityLivingBase player, EntityLivingBase target, float damageDealt, boolean wasCritical, boolean wasHit) {
- if (wasHit && target.isEntityAlive() && random.nextFloat() < 0.38f
- && Toggle.getToggleState(tool, identifier)) {
- summonCameo(player, target);
- }
- }
-
- @SubscribeEvent(priority = EventPriority.HIGHEST)
- public void defend(LivingHurtEvent event) {
- ItemStack tool = event.getEntityLiving().getHeldItemMainhand();
- if (event.getEntity().getEntityWorld().isRemote
- || !Toggle.getToggleState(tool, identifier)
- || event.isCanceled()
- || !TinkerUtil.hasTrait(
- TagUtil.getTagSafe(tool),
- getIdentifier())
- || !(event.getSource() instanceof EntityDamageSource)
- || !(event.getSource().getTrueSource() instanceof EntityLivingBase))
- return;
- if (random.nextFloat() < 0.38f) {
- EntityLivingBase target = (EntityLivingBase)event.getSource().getTrueSource();
- summonCameo(event.getEntity(), target);
- }
- }
-
- protected void summonCameo(Entity summoner, EntityLivingBase target) {
- Entity cameo = factory.create(summoner.getEntityWorld(), summoner, target);
- cameo.setPosition(summoner.posX + random.nextDouble()*4 - 2,
- summoner.posY,
- summoner.posZ + random.nextDouble()*4 - 2);
- summoner.getEntityWorld().spawnEntity(cameo);
- }
-}
diff --git a/src/main/java/landmaster/plustic/traits/Explosive.java b/src/main/java/landmaster/plustic/traits/Explosive.java
deleted file mode 100644
index 7abf3366..00000000
--- a/src/main/java/landmaster/plustic/traits/Explosive.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package landmaster.plustic.traits;
-
-import net.minecraft.entity.*;
-import net.minecraft.item.*;
-import slimeknights.tconstruct.library.traits.*;
-
-public class Explosive extends AbstractTrait {
- public static final Explosive explosive = new Explosive();
-
- public Explosive() {
- super("explosive", 0xFF4F4F);
- }
-
- @Override
- public void onHit(ItemStack tool, EntityLivingBase player, EntityLivingBase target, float damage, boolean isCritical) {
- if (!player.getEntityWorld().isRemote)
- target.getEntityWorld().createExplosion(player, target.posX, target.posY, target.posZ, 2.4f, false);
- }
-}
diff --git a/src/main/java/landmaster/plustic/traits/FruitSalad.java b/src/main/java/landmaster/plustic/traits/FruitSalad.java
deleted file mode 100644
index 39b58b66..00000000
--- a/src/main/java/landmaster/plustic/traits/FruitSalad.java
+++ /dev/null
@@ -1,115 +0,0 @@
-package landmaster.plustic.traits;
-
-import javax.annotation.*;
-
-import landmaster.plustic.*;
-import landmaster.plustic.api.*;
-import landmaster.plustic.config.Config;
-import landmaster.plustic.net.*;
-import net.minecraft.client.*;
-import net.minecraft.item.*;
-import net.minecraft.nbt.*;
-import net.minecraft.util.*;
-import net.minecraftforge.common.*;
-import net.minecraftforge.common.capabilities.*;
-import net.minecraftforge.event.*;
-import net.minecraftforge.fml.common.eventhandler.*;
-import net.minecraftforge.fml.common.gameevent.*;
-import net.minecraftforge.fml.relauncher.*;
-import net.minecraftforge.items.*;
-import slimeknights.tconstruct.library.tools.*;
-import slimeknights.tconstruct.library.traits.*;
-import slimeknights.tconstruct.library.utils.*;
-
-/**
- * First step, meme this trait to death…
- * @author Landmaster
- *
- */
-@SuppressWarnings({ "unchecked", "rawtypes" })
-public class FruitSalad extends AbstractTrait {
- public static final FruitSalad fruitsalad = new FruitSalad();
-
- //public static final String FRUITSALAD_TAG = "PlusTiC_FruitSalad";
-
- public static final int FSHANDLER_SZ = 5;
-
- public static final ResourceLocation FRUITSALAD_CAPLOCATION = new ResourceLocation(ModInfo.MODID, "fruitsalad_cap");
-
- public FruitSalad() {
- super("fruitsalad", 0x77007f);
- MinecraftForge.EVENT_BUS.register(this);
- }
-
- static {
- // Basically, the base item handler capabilty's IStorage and this IStorage are one and the same.
- CapabilityManager.INSTANCE.register(IFSItemHandler.class, (Capability.IStorage)CapabilityItemHandler.ITEM_HANDLER_CAPABILITY.getStorage(), FSItemHandler::new);
- }
-
- public static interface IFSItemHandler extends IItemHandler {}
-
- private static class FSItemHandler extends ItemStackHandler implements IFSItemHandler {
- public FSItemHandler() {
- super(FSHANDLER_SZ);
- }
-
- @Override
- protected int getStackLimit(int slot, @Nonnull ItemStack stack) {
- if (Config.isFruit(stack)) {
- return super.getStackLimit(slot, stack);
- }
- return 0;
- }
- }
-
- private static class FSItemHandlerCapProvider implements ICapabilitySerializable {
- @CapabilityInject(IFSItemHandler.class)
- private static Capability FS_ITEM_CAP = null;
-
- private final FSItemHandler cap;
-
- public FSItemHandlerCapProvider() {
- cap = new FSItemHandler();
- }
-
- @Override
- public boolean hasCapability(Capability> capability, EnumFacing facing) {
- //System.out.println("Athens, this is " + FS_ITEM_CAP);
- return capability == FS_ITEM_CAP;
- }
-
- @Override
- public T getCapability(Capability capability, EnumFacing facing) {
- if (capability == FS_ITEM_CAP) {
- return (T)cap;
- }
- return null;
- }
-
- @Override
- public NBTTagCompound serializeNBT() {
- return cap.serializeNBT();
- }
-
- @Override
- public void deserializeNBT(NBTTagCompound nbt) {
- cap.deserializeNBT(nbt);
- }
- }
-
- @SubscribeEvent
- public void addFruitSaladCapability(AttachCapabilitiesEvent event) {
- if (event.getObject().getItem() instanceof ToolCore) {
- event.addCapability(FRUITSALAD_CAPLOCATION, new FSItemHandlerCapProvider());
- }
- }
-
- @SideOnly(Side.CLIENT)
- @SubscribeEvent
- public void fruitSaladGUI(InputEvent.KeyInputEvent event) {
- if (PlusTiC.proxy.isControlPressed("fruit_salad")
- && TinkerUtil.hasTrait(TagUtil.getTagSafe(Minecraft.getMinecraft().player.getHeldItemMainhand()), identifier)) {
- PacketHandler.INSTANCE.sendToServer(new PacketOpenFSGui());
- }
- }
-}
diff --git a/src/main/java/landmaster/plustic/traits/GetLucky.java b/src/main/java/landmaster/plustic/traits/GetLucky.java
deleted file mode 100644
index 86b871c2..00000000
--- a/src/main/java/landmaster/plustic/traits/GetLucky.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package landmaster.plustic.traits;
-
-import org.apache.commons.lang3.*;
-
-import net.minecraftforge.oredict.*;
-
-public class GetLucky extends DeathSaveTrait {
- public static final GetLucky getlucky = new GetLucky();
-
- public GetLucky() {
- super("getlucky", 0xFF4511, 8,
- stack -> !stack.isEmpty()
- && ArrayUtils.contains(OreDictionary.getOreIDs(stack), OreDictionary.getOreID("gemPhoenixite")),
- "msg.plustic.getlucky.use");
- }
-}
diff --git a/src/main/java/landmaster/plustic/traits/Ghastly.java b/src/main/java/landmaster/plustic/traits/Ghastly.java
deleted file mode 100644
index 5ac90dc7..00000000
--- a/src/main/java/landmaster/plustic/traits/Ghastly.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package landmaster.plustic.traits;
-
-import java.util.*;
-
-import net.minecraft.entity.*;
-import net.minecraft.init.*;
-import net.minecraft.potion.*;
-import net.minecraft.util.*;
-import net.minecraftforge.common.*;
-import net.minecraftforge.event.entity.living.*;
-import net.minecraftforge.fml.common.eventhandler.*;
-import slimeknights.tconstruct.library.traits.*;
-import slimeknights.tconstruct.library.utils.*;
-
-public class Ghastly extends AbstractTrait {
- public static final Ghastly ghastly = new Ghastly();
-
- public Ghastly() {
- super("ghastly", 0xFFFFFF);
- MinecraftForge.EVENT_BUS.register(this);
- }
-
- @SubscribeEvent(priority = EventPriority.LOWEST)
- public void defend(LivingHurtEvent event) {
- if (event.getEntityLiving().isSneaking()
- && event.getSource() instanceof EntityDamageSource
- && Arrays.stream(EnumHand.values())
- .map(event.getEntityLiving()::getHeldItem)
- .map(TagUtil::getTagSafe)
- .anyMatch(nbt -> TinkerUtil.hasTrait(nbt, identifier))) {
- Optional.ofNullable(event.getSource().getTrueSource()).ifPresent(attacker -> {
- if (attacker instanceof EntityLivingBase) {
- ((EntityLivingBase)attacker).addPotionEffect(
- new PotionEffect(MobEffects.SLOWNESS, 100, 2));
- }
- });
- }
- }
-}
diff --git a/src/main/java/landmaster/plustic/traits/Global.java b/src/main/java/landmaster/plustic/traits/Global.java
deleted file mode 100644
index a422e62d..00000000
--- a/src/main/java/landmaster/plustic/traits/Global.java
+++ /dev/null
@@ -1,211 +0,0 @@
-package landmaster.plustic.traits;
-
-import java.util.*;
-
-import landmaster.plustic.api.*;
-import landmaster.plustic.util.*;
-import net.minecraft.block.*;
-import net.minecraft.client.resources.*;
-import net.minecraft.entity.*;
-import net.minecraft.entity.item.*;
-import net.minecraft.item.*;
-import net.minecraft.nbt.*;
-import net.minecraft.tileentity.*;
-import net.minecraft.util.*;
-import net.minecraft.util.text.*;
-import net.minecraft.world.*;
-import net.minecraftforge.common.*;
-import net.minecraftforge.event.entity.living.*;
-import net.minecraftforge.event.entity.player.*;
-import net.minecraftforge.event.world.*;
-import net.minecraftforge.fml.common.FMLLog;
-import net.minecraftforge.fml.common.eventhandler.*;
-import net.minecraftforge.fml.relauncher.*;
-import net.minecraftforge.items.*;
-import slimeknights.tconstruct.library.tools.*;
-import slimeknights.tconstruct.library.traits.*;
-import slimeknights.tconstruct.library.utils.*;
-import slimeknights.tconstruct.tools.tools.*;
-
-public class Global extends AbstractTrait {
- public static final Global global = new Global();
-
- private static final Set warnedBlocks = Collections.newSetFromMap(new WeakHashMap<>());
-
- public Global() {
- super("global", 0xFFE0F1);
- MinecraftForge.EVENT_BUS.register(this);
- Toggle.addToggleable(identifier);
- }
-
- @SubscribeEvent(priority = EventPriority.LOWEST)
- public void blockDrops(BlockEvent.HarvestDropsEvent event) {
- if (event.getWorld().isRemote
- || event.getHarvester() == null) return;
- ItemStack tool = DualToolHarvestUtils.getItemstackToUse(event.getHarvester(), event.getState());
- if (!TinkerUtil.hasTrait(TagUtil.getTagSafe(tool), getIdentifier())) return;
- __blockHarvestDrops(tool, event);
- }
- private void __blockHarvestDrops(ItemStack tool, BlockEvent.HarvestDropsEvent event) {
- if (!Toggle.getToggleState(tool, identifier)) return;
- NBTTagCompound nbt0 = TagUtil.getTagSafe(tool);
- if (nbt0.hasKey("global", 10) && ToolHelper.isToolEffective2(tool, event.getState())) {
- //System.out.println(event.getDrops());
- //new Exception().printStackTrace();
-
- NBTTagCompound nbt = nbt0.getCompoundTag("global");
- Coord4D coord = Coord4D.fromNBT(nbt);
- if (coord.pos().equals(event.getPos())) return; // prevent self-linking
- TileEntity te = coord.TE();
- if (te == null) return;
- IItemHandler ih = te.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY,
- EnumFacing.VALUES[nbt.getByte("facing")]);
- if (ih == null) return;
-
- // *cough* Extra Utilities *cough*
- try {
- ListIterator dummy = event.getDrops().listIterator();
-
- if (dummy.hasNext()) {
- ItemStack is = dummy.next();
- dummy.set(is); // This simply sets the 1st element of the list to itself, leaving the list unchanged. If the list is immutable, then this will throw an UnsupportedOperationException.
- }
- } catch (UnsupportedOperationException e) {
- if (!warnedBlocks.contains(event.getState().getBlock())) {
- FMLLog.bigWarning("Block "+event.getState().getBlock()+" implements block drops incorrectly. "
- + "It appears that it overrides the OFFICIALLY DEPRECATED method "
- + "getDrops(IBlockAccess, BlockPos, IBlockState, int) instead of the correct method "
- + "getDrops(NonNullList, IBlockAccess, BlockPos, IBlockState, int). This prevents "
- + "features such as PlusTiC's Global Traveler from working properly with these blocks.\n"
- + "USERS: This is a BUG in the mod "+event.getState().getBlock().getRegistryName().getNamespace()+"; report this to them!");
- warnedBlocks.add(event.getState().getBlock());
- }
-
- return;
- }
-
- ListIterator it = event.getDrops().listIterator();
- ItemStack keptSeed = ItemStack.EMPTY;
- while (it.hasNext()) {
- ItemStack stk = it.next();
- if (event.getWorld().rand.nextFloat() > event.getDropChance()) {
- it.remove();
- } else {
- if (tool.getItem() instanceof Kama
- && stk.getItem() instanceof IPlantable
- && keptSeed.isEmpty()) {
- keptSeed = stk.splitStack(1);
- }
- }
- }
-
- if (!(tool.getItem() instanceof Kama) || !keptSeed.isEmpty()) {
- it = event.getDrops().listIterator();
- while (it.hasNext()) {
- ItemStack stk = it.next();
- for (int j=0; j 0) return;
- ItemStack weapon = getWeapon(event.getSource());
- NBTTagCompound nbt0 = TagUtil.getTagSafe(weapon);
- if (TinkerUtil.hasTrait(nbt0, getIdentifier())) {
- if (!Toggle.getToggleState(weapon, identifier)) return;
- if (nbt0.hasKey("global", 10)) {
- NBTTagCompound nbt = nbt0.getCompoundTag("global");
- Coord4D coord = Coord4D.fromNBT(nbt);
- TileEntity te = coord.TE();
- if (te == null) return;
- IItemHandler ih = te.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY,
- EnumFacing.VALUES[nbt.getByte("facing")]);
- if (ih == null) return;
- ListIterator it = event.getDrops().listIterator();
- while (it.hasNext()) {
- EntityItem enti = it.next();
- ItemStack stk = enti.getItem();
- for (int j=0; j extras = entity instanceof EntityLivingBase
- && ((EntityLivingBase)entity).getRevengeTarget() != null ?
- ImmutableList.of(((EntityLivingBase)entity).getRevengeTarget())
- : ImmutableList.of();
- entExplode(world, entity, extras, 1);
- }
- }
-
- @SubscribeEvent
- public void onDetonate(ExplosionEvent.Detonate event) {
- if (!event.getWorld().isRemote && event.getExplosion() instanceof HExplosion) {
- event.getAffectedEntities().remove(event.getExplosion().getExplosivePlacedBy());
- }
- }
-
- @SubscribeEvent
- public void defend(LivingHurtEvent event) {
- ItemStack tool = event.getEntityLiving().getHeldItemMainhand();
- if (event.getEntity().getEntityWorld().isRemote
- || !TinkerUtil.hasTrait(
- TagUtil.getTagSafe(tool),
- getIdentifier()))
- return;
- if (random.nextFloat() < 0.3f) {
- entExplode(event.getEntity().getEntityWorld(), event.getEntity(),
- getAttacker(event.getSource())
- .map(ImmutableList::of)
- .orElse(ImmutableList.of()), 1.3f);
- }
- if (random.nextFloat() < event.getAmount()/8.0f) { // probability increases with damage
- event.getEntityLiving().addPotionEffect(new PotionEffect(MobEffects.ABSORPTION, 1600, 3));
- event.getEntityLiving().sendMessage(new TextComponentTranslation("msg.plustic.hailhydra.use"));
- }
- }
-
- private static @javax.annotation.Nonnull Optional getAttacker(DamageSource source) {
- if (source instanceof EntityDamageSource) {
- return Optional.ofNullable(((EntityDamageSource)source).getTrueSource());
- }
- return Optional.empty();
- }
-
- private static void entExplode(World world, Entity entity, Collection extraTargets, float power) {
- List ents = world.getEntitiesWithinAABB(EntityLiving.class, Utils.AABBfromVecs(
- entity.getPositionVector().subtract(9, 9, 9),
- entity.getPositionVector().add(9, 9, 9)),
- ent -> ent instanceof IMob && ent != entity && !extraTargets.contains(ent));
- ents.addAll(extraTargets);
- if (!ents.isEmpty()) {
- Entity target = ents.get(random.nextInt(ents.size()));
- Explosion explosion = new HExplosion(world, entity, target.posX, target.posY, target.posZ, power, false, false);
- if (!net.minecraftforge.event.ForgeEventFactory.onExplosionStart(world, explosion)) {
- explosion.doExplosionA();
- explosion.doExplosionB(true);
- }
- }
- }
-
- private static class HExplosion extends Explosion {
- public HExplosion(World worldIn, Entity entityIn, double x, double y, double z, float size, boolean flaming,
- boolean smoking) {
- super(worldIn, entityIn, x, y, z, size, flaming, smoking);
- }
- }
-}
diff --git a/src/main/java/landmaster/plustic/traits/Hearts.java b/src/main/java/landmaster/plustic/traits/Hearts.java
deleted file mode 100644
index 80db43d4..00000000
--- a/src/main/java/landmaster/plustic/traits/Hearts.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package landmaster.plustic.traits;
-
-import net.minecraft.entity.EntityLivingBase;
-import net.minecraft.item.ItemStack;
-import slimeknights.tconstruct.library.traits.*;
-
-public class Hearts extends AbstractTrait {
- public static final Hearts hearts = new Hearts();
-
- public static final float DAMAGE_MULT = 0.7f;
-
- public Hearts() {
- super("hearts", 0xEF0000);
- }
-
- @Override
- public float damage(ItemStack tool, EntityLivingBase player, EntityLivingBase target, float damage, float newDamage, boolean isCritical) {
- newDamage *= 1 + DAMAGE_MULT * player.getHealth() / player.getMaxHealth();
- return super.damage(tool, player, target, damage, newDamage, isCritical);
- }
-}
diff --git a/src/main/java/landmaster/plustic/traits/Heavy.java b/src/main/java/landmaster/plustic/traits/Heavy.java
deleted file mode 100644
index 667f5427..00000000
--- a/src/main/java/landmaster/plustic/traits/Heavy.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package landmaster.plustic.traits;
-
-import net.minecraft.entity.*;
-import net.minecraft.init.*;
-import net.minecraft.item.*;
-import net.minecraft.potion.*;
-import slimeknights.tconstruct.library.traits.*;
-
-public class Heavy extends AbstractTrait {
- public static final Heavy heavy = new Heavy();
-
- public Heavy() {
- super("heavy_metal", 0x555555);
- }
-
- @Override
- public float knockBack(ItemStack tool, EntityLivingBase player, EntityLivingBase target, float damage, float knockback, float newKnockback, boolean isCritical) {
- return newKnockback * 1.3f;
- }
-
- @Override
- public void afterHit(ItemStack tool, EntityLivingBase player, EntityLivingBase target, float damageDealt, boolean wasCritical, boolean wasHit) {
- if (wasHit && target.isEntityAlive()) {
- target.addPotionEffect(new PotionEffect(MobEffects.SLOWNESS, 120, 1));
- }
- }
-}
diff --git a/src/main/java/landmaster/plustic/traits/Ignoble.java b/src/main/java/landmaster/plustic/traits/Ignoble.java
deleted file mode 100644
index e936ea47..00000000
--- a/src/main/java/landmaster/plustic/traits/Ignoble.java
+++ /dev/null
@@ -1,112 +0,0 @@
-package landmaster.plustic.traits;
-
-import java.util.*;
-
-import landmaster.plustic.api.*;
-import net.minecraft.client.resources.I18n;
-import net.minecraft.entity.*;
-import net.minecraft.item.*;
-import net.minecraft.nbt.*;
-import net.minecraft.server.*;
-import net.minecraft.util.*;
-import net.minecraft.util.math.*;
-import net.minecraft.world.*;
-import net.minecraftforge.common.*;
-import net.minecraftforge.event.entity.living.*;
-import net.minecraftforge.event.entity.player.*;
-import net.minecraftforge.fml.common.FMLCommonHandler;
-import net.minecraftforge.fml.common.eventhandler.*;
-import net.minecraftforge.fml.relauncher.*;
-import slimeknights.tconstruct.library.traits.*;
-import slimeknights.tconstruct.library.utils.*;
-
-public class Ignoble extends AbstractTrait {
- public static final Ignoble ignoble = new Ignoble();
-
- public static final float MAX_IGNOBILITY = 40;
-
- public static final String ENTITIES_TAG = "IgnobleEntities", METER_TAG = "IgnobleMeter";
-
- public Ignoble() {
- super("ignoble", 0x270133);
- MinecraftForge.EVENT_BUS.register(this);
- Toggle.addToggleable(identifier);
- }
-
- @SideOnly(Side.CLIENT)
- @SubscribeEvent
- public void tooltip(ItemTooltipEvent event) {
- NBTTagCompound nbt0 = TagUtil.getTagSafe(event.getItemStack());
- if (event.isCanceled()
- || event.getItemStack() == null
- || !TinkerUtil.hasTrait(nbt0, getIdentifier())) return;
- event.getToolTip().add(I18n.format("tooltip.plustic.ignoblemodifier.info", nbt0.getFloat(METER_TAG)));
- }
-
- @Override
- public void onHit(ItemStack tool, EntityLivingBase player, EntityLivingBase target, float damage, boolean isCritical) {
- NBTTagCompound nbt = TagUtil.getTagSafe(tool);
- if (Toggle.getToggleState(nbt, identifier) && player.isSneaking()) {
- float damageToDeal = Math.min(nbt.getFloat(METER_TAG), target.getMaxHealth());
- // deliver the Ig Nobel prize
- target.attackEntityFrom(new EntityDamageSource("ignoble", player)
- .setDamageBypassesArmor().setDamageIsAbsolute().setMagicDamage(),
- damageToDeal);
- nbt.setFloat(METER_TAG, nbt.getFloat(METER_TAG) - damageToDeal);
- }
- }
-
- @Override
- public void onUpdate(ItemStack tool, World world, Entity entity, int itemSlot, boolean isSelected) {
- if (!world.isRemote && entity instanceof EntityLivingBase) {
- final MinecraftServer server = FMLCommonHandler.instance().getMinecraftServerInstance();
-
- NBTTagCompound nbt = TagUtil.getTagSafe(tool);
- NBTTagCompound ignoble = TagUtil.getTagSafe(nbt, ENTITIES_TAG);
-
- for (final Iterator it = ignoble.getKeySet().iterator(); it.hasNext(); ) {
- final String uuidString = it.next();
- final UUID uuid = UUID.fromString(uuidString);
- final Entity victim = server.getEntityFromUuid(uuid);
- if (victim == null) {
- it.remove();
- } else if (!victim.isEntityAlive()) {
- float initialHealth = ignoble.getFloat(uuidString);
- float diff = initialHealth - ((EntityLivingBase)entity).getHealth();
- if (diff > 0) {
- nbt.setFloat(METER_TAG, MathHelper.clamp(nbt.getFloat(METER_TAG)+diff, 0, MAX_IGNOBILITY));
- }
- it.remove();
- }
- }
- }
- }
-
- @SubscribeEvent(priority = EventPriority.LOWEST)
- public void defend(LivingHurtEvent event) {
- if (!event.getEntity().getEntityWorld().isRemote) {
- Arrays.stream(EnumHand.values())
- .map(event.getEntityLiving()::getHeldItem)
- .filter(stack -> TinkerUtil.hasTrait(TagUtil.getTagSafe(stack), identifier))
- .findFirst().ifPresent(stack -> {
- getAttacker(event.getSource()).ifPresent(attacker -> {
- NBTTagCompound nbt = TagUtil.getTagSafe(stack);
- NBTTagCompound ignoble = TagUtil.getTagSafe(nbt, ENTITIES_TAG);
- String uuidString = attacker.getUniqueID().toString();
- if (!ignoble.hasKey(uuidString)) {
- ignoble.setFloat(uuidString, event.getEntityLiving().getHealth());
- }
- nbt.setTag(ENTITIES_TAG, ignoble);
- stack.setTagCompound(nbt);
- });
- });
- }
- }
-
- private static @javax.annotation.Nonnull Optional getAttacker(DamageSource source) {
- if (source instanceof EntityDamageSource) {
- return Optional.ofNullable(((EntityDamageSource)source).getTrueSource());
- }
- return Optional.empty();
- }
-}
diff --git a/src/main/java/landmaster/plustic/traits/Illuminati.java b/src/main/java/landmaster/plustic/traits/Illuminati.java
deleted file mode 100644
index 07d0cb23..00000000
--- a/src/main/java/landmaster/plustic/traits/Illuminati.java
+++ /dev/null
@@ -1,34 +0,0 @@
-package landmaster.plustic.traits;
-
-import java.util.*;
-
-import landmaster.plustic.util.*;
-import net.minecraft.entity.*;
-import net.minecraft.init.*;
-import net.minecraft.item.*;
-import net.minecraft.potion.*;
-import net.minecraft.world.*;
-import slimeknights.tconstruct.library.traits.*;
-import slimeknights.tconstruct.library.utils.*;
-
-public class Illuminati extends AbstractTrait {
- public static final Illuminati illuminati = new Illuminati();
-
- public Illuminati() {
- super("illuminati", 0xFFFF7F);
- }
-
- @Override
- public void onUpdate(ItemStack tool, World world, Entity entity, int itemSlot, boolean isSelected) {
- if (isSelected && entity instanceof EntityLivingBase) {
- ((EntityLivingBase)entity).addPotionEffect(new PotionEffect(MobEffects.INVISIBILITY, 20));
- List lst = world.getEntitiesWithinAABB(EntityLivingBase.class, Utils.AABBfromVecs(
- entity.getPositionVector().subtract(11, 11, 11),
- entity.getPositionVector().add(11, 11, 11)),
- ent -> !ent.equals(entity) && !TinkerUtil.hasTrait(TagUtil.getTagSafe(ent.getHeldItemMainhand()), identifier));
- for (EntityLivingBase ent: lst) {
- ent.addPotionEffect(new PotionEffect(MobEffects.GLOWING, 20));
- }
- }
- }
-}
diff --git a/src/main/java/landmaster/plustic/traits/ImASuperstar.java b/src/main/java/landmaster/plustic/traits/ImASuperstar.java
deleted file mode 100644
index ce739114..00000000
--- a/src/main/java/landmaster/plustic/traits/ImASuperstar.java
+++ /dev/null
@@ -1,75 +0,0 @@
-package landmaster.plustic.traits;
-
-import hellfirepvp.astralsorcery.common.constellation.*;
-import hellfirepvp.astralsorcery.common.data.research.*;
-import hellfirepvp.astralsorcery.common.lib.*;
-import landmaster.plustic.api.*;
-import net.minecraft.entity.*;
-import net.minecraft.entity.player.*;
-import net.minecraft.item.*;
-import net.minecraft.world.*;
-import net.minecraftforge.event.entity.living.*;
-import net.minecraftforge.event.entity.player.*;
-import net.minecraftforge.fml.common.eventhandler.*;
-import net.minecraftforge.fml.relauncher.*;
-import slimeknights.tconstruct.library.traits.*;
-import slimeknights.tconstruct.library.utils.*;
-
-public class ImASuperstar extends AbstractTrait {
- public static final ImASuperstar imasuperstar = new ImASuperstar();
-
- public ImASuperstar() {
- super("im_a_superstar", 0x000b56);
- }
-
- @Override
- public void onUpdate(ItemStack tool, World world, Entity entity, int itemSlot, boolean isSelected) {
- if (isSelected && entity instanceof EntityPlayer) {
- IMajorConstellation attuned = ResearchManager.getProgress((EntityPlayer)entity, Side.SERVER).getAttunedConstellation();
- if (random.nextFloat() < 0.1
- && attuned == Constellations.aevitas) {
- ((EntityPlayer)entity).heal(1.0f);
- } else if (random.nextFloat() < 0.005 && attuned == Constellations.vicio) {
- ((EntityPlayer)entity).getFoodStats().addStats(1, 1);
- ToolHelper.damageTool(tool, 1, (EntityPlayer)entity);
- }
- }
- }
-
- @Override
- public float damage(ItemStack tool, EntityLivingBase player, EntityLivingBase target, float damage, float newDamage, boolean isCritical) {
- if (!player.world.isRemote && player instanceof EntityPlayer && random.nextFloat() < 0.25
- && ResearchManager.getProgress((EntityPlayer)player, Side.SERVER).getAttunedConstellation()
- == Constellations.discidia) {
- newDamage *= 2.5;
- }
- return super.damage(tool, player, target, damage, newDamage, isCritical);
- }
-
- @Override
- public void miningSpeed(ItemStack tool, PlayerEvent.BreakSpeed event) {
- if (!event.getEntity().world.isRemote
- && ResearchManager.getProgress(event.getEntityPlayer(), Side.SERVER).getAttunedConstellation()
- == Constellations.evorsio) {
- event.setNewSpeed(event.getNewSpeed() * 1.75f);
- }
- }
-
- @SubscribeEvent(priority = EventPriority.LOWEST)
- public void defend(LivingHurtEvent event) {
- ItemStack tool = event.getEntityLiving().getHeldItemMainhand();
- if (event.getEntity().getEntityWorld().isRemote
- || !Toggle.getToggleState(tool, identifier)
- || event.isCanceled()
- || !TinkerUtil.hasTrait(
- TagUtil.getTagSafe(tool),
- getIdentifier())
- || ToolHelper.getCurrentDurability(tool) < 1
- || !(event.getEntity() instanceof EntityPlayer)
- || ResearchManager.getProgress((EntityPlayer)event.getEntity(), Side.SERVER).getAttunedConstellation()
- != Constellations.armara)
- return;
- event.setAmount(event.getAmount() * 0.5f);
- ToolHelper.damageTool(tool, 1, event.getEntityLiving());
- }
-}
diff --git a/src/main/java/landmaster/plustic/traits/Jaded.java b/src/main/java/landmaster/plustic/traits/Jaded.java
deleted file mode 100644
index 29b18fe0..00000000
--- a/src/main/java/landmaster/plustic/traits/Jaded.java
+++ /dev/null
@@ -1,94 +0,0 @@
-package landmaster.plustic.traits;
-
-import landmaster.plustic.tools.*;
-import net.minecraft.entity.*;
-import net.minecraft.item.*;
-import net.minecraft.nbt.*;
-import net.minecraft.util.*;
-import net.minecraft.world.*;
-import net.minecraftforge.common.*;
-import net.minecraftforge.event.entity.living.*;
-import net.minecraftforge.fml.common.eventhandler.*;
-import slimeknights.tconstruct.library.entity.*;
-import slimeknights.tconstruct.library.tools.ranged.*;
-import slimeknights.tconstruct.library.traits.*;
-
-public class Jaded extends AbstractProjectileTrait {
- public static final Jaded jaded = new Jaded();
-
- public static final String JADED_LEVEL_TAG = "PlusTiC_JadedLevel";
- public static final String JADED_TIMER_TAG = "PlusTiC_JadedTimer";
- public static final String JADED_LASTHEALTH_TAG = "PlusTiC_JadedLastHealth";
-
- public Jaded() {
- super("jaded", 0x00e682);
- MinecraftForge.EVENT_BUS.register(this);
- }
-
- protected void applyJaded(Entity target) {
- if (!target.world.isRemote) {
- EntityLivingBase targetLiving = null;
- if (target instanceof EntityLivingBase) {
- targetLiving = (EntityLivingBase) target;
- }
- if (target instanceof MultiPartEntityPart) {
- IEntityMultiPart parent = ((MultiPartEntityPart)target).parent;
- if (parent instanceof EntityLivingBase) {
- targetLiving = (EntityLivingBase)((MultiPartEntityPart)target).parent;
- }
- }
- if (targetLiving == null) return;
- NBTTagCompound nbt = targetLiving.getEntityData();
- nbt.setByte(JADED_LEVEL_TAG, (byte)Math.min(nbt.getByte(JADED_LEVEL_TAG)+1, 3));
- nbt.setInteger(JADED_TIMER_TAG, 80);
- nbt.setFloat(JADED_LASTHEALTH_TAG, targetLiving.getHealth());
- }
- }
-
- @Override
- public void afterHit(EntityProjectileBase projectile, World world, ItemStack ammoStack, EntityLivingBase attacker, Entity target, double impactSpeed) {
- applyJaded(target);
- }
-
- @SubscribeEvent
- public void onAttack(LivingAttackEvent event) { // for melee damage
- if (event.getEntity().world.isRemote) return;
-
- if (event.getSource() instanceof EntityDamageSource
- && !(event.getSource() instanceof EntityDamageSourceIndirect)
- && !(event.getSource() instanceof ProjectileCore.DamageSourceProjectileForEndermen)
- && event.getSource().getTrueSource() instanceof EntityLivingBase) {
- ItemStack stack = event.getSource() instanceof ToolLaserGun.LaserDamageSource
- ? ((ToolLaserGun.LaserDamageSource)event.getSource()).getStack()
- : ((EntityLivingBase)event.getSource().getTrueSource()).getHeldItemMainhand();
- if (this.isToolWithTrait(stack)) {
- applyJaded(event.getEntity());
- }
- }
- }
-
- @SubscribeEvent
- public void onLivingUpdate(LivingEvent.LivingUpdateEvent event) {
- NBTTagCompound nbt = event.getEntity().getEntityData();
- if (!event.getEntity().world.isRemote && nbt.getInteger(JADED_TIMER_TAG) > 0) {
- /*
- System.out.println("Cur health: "+event.getEntityLiving().getHealth());
- System.out.println("Last health: "+nbt.getFloat(JADED_LASTHEALTH_TAG));*/
- if (event.getEntityLiving().getHealth() > nbt.getFloat(JADED_LASTHEALTH_TAG)) {
- float healthDiff = event.getEntityLiving().getHealth() - nbt.getFloat(JADED_LASTHEALTH_TAG);
- float scalar = (3 - nbt.getByte(JADED_LEVEL_TAG)) / 3f;
- //System.out.println(healthDiff + " " + scalar);
- event.getEntityLiving().setHealth(
- nbt.getFloat(JADED_LASTHEALTH_TAG)
- + healthDiff*scalar);
- }
- nbt.setFloat(JADED_LASTHEALTH_TAG, event.getEntityLiving().getHealth());
- nbt.setInteger(JADED_TIMER_TAG, Math.max(nbt.getInteger(JADED_TIMER_TAG)-1, 0));
- if (nbt.getInteger(JADED_TIMER_TAG) <= 0) {
- nbt.removeTag(JADED_LEVEL_TAG);
- nbt.removeTag(JADED_TIMER_TAG);
- nbt.removeTag(JADED_LASTHEALTH_TAG);
- }
- }
- }
-}
diff --git a/src/main/java/landmaster/plustic/traits/Light.java b/src/main/java/landmaster/plustic/traits/Light.java
deleted file mode 100644
index bcfd6158..00000000
--- a/src/main/java/landmaster/plustic/traits/Light.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package landmaster.plustic.traits;
-
-import net.minecraftforge.common.*;
-import net.minecraftforge.fml.common.eventhandler.*;
-import slimeknights.tconstruct.library.events.*;
-import slimeknights.tconstruct.library.modifiers.*;
-import slimeknights.tconstruct.library.tools.*;
-import slimeknights.tconstruct.library.traits.*;
-import slimeknights.tconstruct.library.utils.*;
-
-public class Light extends AbstractTrait {
- public static final Light light = new Light();
-
- public Light() {
- super("light", 0xFFFFFF);
- MinecraftForge.EVENT_BUS.register(this);
- }
-
- @Override
- public boolean canApplyTogether(IToolMod otherModifier) {
- return !otherModifier.getIdentifier().equals(Heavy.heavy.getIdentifier());
- }
-
- @SubscribeEvent
- public void onToolBuilding(TinkerEvent.OnItemBuilding event) {
- if (TinkerUtil.hasTrait(event.tag, this.getIdentifier())) {
- ToolNBT data = TagUtil.getToolStats(event.tag);
- data.attackSpeedMultiplier *= 1.2;
- data.speed *= 1.2;
- TagUtil.setToolTag(event.tag, data.get());
- }
- }
-}
diff --git a/src/main/java/landmaster/plustic/traits/Mana.java b/src/main/java/landmaster/plustic/traits/Mana.java
deleted file mode 100644
index 6faa4668..00000000
--- a/src/main/java/landmaster/plustic/traits/Mana.java
+++ /dev/null
@@ -1,72 +0,0 @@
-package landmaster.plustic.traits;
-
-import baubles.api.*;
-import baubles.api.cap.*;
-import landmaster.plustic.api.*;
-
-import net.minecraft.entity.*;
-import net.minecraft.entity.player.*;
-import net.minecraft.item.*;
-import net.minecraft.world.*;
-import net.minecraftforge.items.*;
-import slimeknights.tconstruct.library.traits.*;
-import slimeknights.tconstruct.library.utils.*;
-import slimeknights.tconstruct.tools.modifiers.*;
-import vazkii.botania.api.mana.*;
-
-public class Mana extends AbstractTrait {
- public static final int MANA_DRAW = 100;
- public static final Mana mana = new Mana();
-
- public Mana() {
- super("mana", 0x54E5FF);
- Toggle.addToggleable(identifier);
- }
-
- @Override
- public void onUpdate(ItemStack tool, World world, Entity entity, int itemSlot, boolean isSelected) {
- if (TagUtil.getTagSafe(tool).getBoolean(ModReinforced.TAG_UNBREAKABLE)) {
- return;
- }
- if (!world.isRemote
- && entity instanceof EntityPlayer
- && ToolHelper.getCurrentDurability(tool) < ToolHelper.getMaxDurability(tool)
- && Toggle.getToggleState(tool, identifier)
- && drawMana((EntityPlayer)entity)) {
- ToolHelper.unbreakTool(tool);
- ToolHelper.healTool(tool, 1, (EntityPlayer)entity);
- }
- }
-
- @Override
- public int onToolDamage(ItemStack tool, int damage, int newDamage, EntityLivingBase entity) {
- if (TagUtil.getTagSafe(tool).getBoolean(ModReinforced.TAG_UNBREAKABLE)) {
- return 0;
- }
- if (!entity.getEntityWorld().isRemote
- && entity instanceof EntityPlayer
- && Toggle.getToggleState(tool, identifier)
- && drawMana((EntityPlayer)entity)) {
- --newDamage;
- }
- return super.onToolDamage(tool, damage, newDamage, entity);
- }
-
- private static boolean drawMana(EntityPlayer ent) {
- IItemHandler handler = ent.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null);
- for (int i=0; i= 5) {
- world.setBlockState(pos, Blocks.DIAMOND_ORE.getDefaultState());
- ToolHelper.damageTool(tool, 5, elb);
- } else if (rand < 0.018f && curd >= 1) {
- world.setBlockState(pos, Blocks.GOLD_ORE.getDefaultState());
- ToolHelper.damageTool(tool, 1, elb);
- }
- }
- }
- }
- }
-}
diff --git a/src/main/java/landmaster/plustic/traits/MorganLeFay.java b/src/main/java/landmaster/plustic/traits/MorganLeFay.java
deleted file mode 100644
index 8e12fe7b..00000000
--- a/src/main/java/landmaster/plustic/traits/MorganLeFay.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package landmaster.plustic.traits;
-
-import net.minecraft.entity.*;
-import net.minecraft.item.*;
-import net.minecraft.util.*;
-import net.minecraft.util.math.MathHelper;
-import slimeknights.tconstruct.library.traits.*;
-
-public class MorganLeFay extends AbstractTrait {
- public static final MorganLeFay morganlefay = new MorganLeFay();
-
- public MorganLeFay() {
- super("morganlefay", 0xFF00FF);
- }
-
- @Override
- public void afterHit(ItemStack tool, EntityLivingBase player, EntityLivingBase target, float damageDealt, boolean wasCritical, boolean wasHit) {
- if (wasHit) {
- target.hurtResistantTime = 0;
- target.lastDamage = 0;
- target.attackEntityFrom(new EntityDamageSource("morganlefay", player)
- .setDamageBypassesArmor().setDamageIsAbsolute().setMagicDamage(),
- MathHelper.clamp((float)(2.5+random.nextGaussian()*1.5), 0, 5));
- }
- }
-}
diff --git a/src/main/java/landmaster/plustic/traits/MusicOfTheSpheres.java b/src/main/java/landmaster/plustic/traits/MusicOfTheSpheres.java
deleted file mode 100644
index 7bac0d22..00000000
--- a/src/main/java/landmaster/plustic/traits/MusicOfTheSpheres.java
+++ /dev/null
@@ -1,145 +0,0 @@
-package landmaster.plustic.traits;
-
-import java.util.*;
-
-import javax.annotation.*;
-
-import com.google.common.collect.*;
-
-import landmaster.plustic.*;
-import landmaster.plustic.api.*;
-import landmaster.plustic.net.*;
-import net.minecraft.client.*;
-import net.minecraft.entity.player.*;
-import net.minecraft.item.*;
-import net.minecraft.nbt.*;
-import net.minecraft.util.*;
-import net.minecraftforge.common.*;
-import net.minecraftforge.common.capabilities.*;
-import net.minecraftforge.event.*;
-import net.minecraftforge.fml.common.eventhandler.*;
-import net.minecraftforge.fml.common.gameevent.*;
-import net.minecraftforge.fml.common.registry.*;
-import net.minecraftforge.fml.relauncher.*;
-import net.minecraftforge.items.*;
-import slimeknights.tconstruct.library.tools.*;
-import slimeknights.tconstruct.library.traits.*;
-import slimeknights.tconstruct.library.utils.*;
-
-@SuppressWarnings({ "unchecked", "rawtypes" })
-public class MusicOfTheSpheres extends AbstractTrait {
- public static final MusicOfTheSpheres musicofthespheres = new MusicOfTheSpheres();
-
- public static final ResourceLocation MOTS_CAPLOCATION = new ResourceLocation(ModInfo.MODID, "musicofthespheres_cap");
- public static final @Deprecated ResourceLocation MOTS_OLDCAPLOCATION = new ResourceLocation(ModInfo.MODID, "");
-
- public MusicOfTheSpheres() {
- super("musicofthespheres", 0xffffff);
- MinecraftForge.EVENT_BUS.register(this);
- }
-
- static {
- // see analogous comment at FruitSalad.java
- CapabilityManager.INSTANCE.register(IMOTSItemHandler.class, (Capability.IStorage)CapabilityItemHandler.ITEM_HANDLER_CAPABILITY.getStorage(), MOTSItemHandler::new);
- }
-
- public static interface IMOTSItemHandler extends IItemHandler {
- void play(EntityPlayer player, SoundEvent sndEv);
- void stop(EntityPlayer player);
- }
-
- private static class MOTSItemHandler extends ItemStackHandler implements IMOTSItemHandler {
- @CapabilityInject(IMOTSItemHandler.class)
- private static Capability MOTS_ITEM_CAP = null;
-
- private static Map playerToSound = new MapMaker().weakValues().makeMap();
-
- @Override
- protected int getStackLimit(int slot, @Nonnull ItemStack stack) {
- if (stack.getItem() instanceof ItemRecord) {
- return super.getStackLimit(slot, stack);
- }
- return 0;
- }
-
- @Override
- public void play(EntityPlayer player, SoundEvent sndEv) {
- if (!player.world.isRemote) {
- PacketHandler.INSTANCE.sendToDimension(new PacketPlayMOTS(player, ForgeRegistries.SOUND_EVENTS.getKey(sndEv)), player.world.provider.getDimension());
- } else {
- //System.out.println("TEEHEE "+sound.get());
- if (!PlusTiC.proxy.isSoundPlaying(playerToSound.get(player.getUniqueID()))) {
- playerToSound.put(player.getUniqueID(), PlusTiC.proxy.setAndPlaySound(player, sndEv));
- }
- }
- }
-
- @Override
- public void stop(EntityPlayer player) {
- if (!player.world.isRemote) {
- PacketHandler.INSTANCE.sendToDimension(new PacketStopMOTS(player), player.world.provider.getDimension());
- } else {
- //System.out.println("HAHAHA "+sound);
- if (playerToSound.containsKey(player.getUniqueID())) {
- PlusTiC.proxy.stopSound(playerToSound.get(player.getUniqueID()));
- playerToSound.remove(player.getUniqueID());
- }
- }
- }
- }
-
- private static class MOTSItemHandlerCapProvider implements ICapabilitySerializable {
- @CapabilityInject(IMOTSItemHandler.class)
- private static Capability MOTS_ITEM_CAP = null;
-
- private final MOTSItemHandler cap;
-
- public MOTSItemHandlerCapProvider() {
- cap = new MOTSItemHandler();
- }
-
- @Override
- public boolean hasCapability(Capability> capability, EnumFacing facing) {
- return capability == MOTS_ITEM_CAP;
- }
-
- @Override
- public T getCapability(Capability capability, EnumFacing facing) {
- if (capability == MOTS_ITEM_CAP) {
- return (T)cap;
- }
- return null;
- }
-
- @Override
- public NBTTagCompound serializeNBT() {
- return cap.serializeNBT();
- }
-
- @Override
- public void deserializeNBT(NBTTagCompound nbt) {
- if (!nbt.isEmpty()) {
- cap.deserializeNBT(nbt);
- }
- }
-
- }
-
- @SubscribeEvent
- public void addMOTSCapability(AttachCapabilitiesEvent event) {
- if (event.getObject().getItem() instanceof ToolCore) {
- MOTSItemHandlerCapProvider provider = new MOTSItemHandlerCapProvider();
- event.addCapability(MOTS_OLDCAPLOCATION, provider);
- event.addCapability(MOTS_CAPLOCATION, provider);
- }
- }
-
- @SideOnly(Side.CLIENT)
- @SubscribeEvent
- public void MOTSGUI(InputEvent.KeyInputEvent event) {
- if (PlusTiC.proxy.isControlPressed("mots") && TinkerUtil.hasTrait(
- TagUtil.getTagSafe(Minecraft.getMinecraft().player.getHeldItemMainhand()), identifier)) {
- PacketHandler.INSTANCE.sendToServer(new PacketOpenMOTSGui());
- }
- }
-}
diff --git a/src/main/java/landmaster/plustic/traits/MysticalFire.java b/src/main/java/landmaster/plustic/traits/MysticalFire.java
deleted file mode 100644
index 4fb422c6..00000000
--- a/src/main/java/landmaster/plustic/traits/MysticalFire.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package landmaster.plustic.traits;
-
-import javax.annotation.*;
-
-import landmaster.plustic.api.*;
-import net.minecraft.entity.*;
-import net.minecraft.item.*;
-import net.minecraft.potion.*;
-import net.minecraft.util.*;
-import net.minecraftforge.common.*;
-import net.minecraftforge.event.*;
-import net.minecraftforge.fml.common.eventhandler.*;
-import slimeknights.tconstruct.library.potion.*;
-import slimeknights.tconstruct.library.traits.*;
-
-public class MysticalFire extends AbstractTrait {
- public static final MysticalFire mystical_fire = new MysticalFire();
-
- public static final MFPotion POTION = new MFPotion();
-
- public MysticalFire() {
- super("mystical_fire", 0x681302);
- MinecraftForge.EVENT_BUS.register(this);
- }
-
- @SubscribeEvent
- public void registerPotion(RegistryEvent.Register event) {
- event.getRegistry().register(POTION);
- }
-
- @Override
- public void afterHit(ItemStack tool, EntityLivingBase player, EntityLivingBase target, float damageDealt, boolean wasCritical, boolean wasHit) {
- target.setFire(20);
- POTION.apply(target, 20*20);
- }
-
- private static class MFPotion extends TinkerPotion {
- MFPotion() {
- super(new ResourceLocation(ModInfo.MODID, "mystical_fire_potion"), true, false, 0x681302);
- }
-
- @Override
- public boolean isReady(int duration, int strength) {
- return duration % 5 == 0;
- }
-
- @Override
- public void performEffect(@Nonnull EntityLivingBase entity, int id) {
- entity.attackEntityFrom(DamageSource.MAGIC, 1.0f);
- }
- }
-}
diff --git a/src/main/java/landmaster/plustic/traits/Naphtha.java b/src/main/java/landmaster/plustic/traits/Naphtha.java
deleted file mode 100644
index 8a3509ba..00000000
--- a/src/main/java/landmaster/plustic/traits/Naphtha.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package landmaster.plustic.traits;
-
-import net.minecraft.item.*;
-import net.minecraftforge.common.*;
-import net.minecraftforge.event.entity.living.*;
-import net.minecraftforge.fml.common.eventhandler.*;
-import slimeknights.tconstruct.library.entity.*;
-import slimeknights.tconstruct.library.traits.*;
-import slimeknights.tconstruct.library.utils.*;
-
-public class Naphtha extends AbstractTrait {
- public static final Naphtha naphtha = new Naphtha();
-
- public Naphtha() {
- super("naphtha", 0xFF3314);
- MinecraftForge.EVENT_BUS.register(this);
- }
-
- @SubscribeEvent
- public void lightUp(LivingHurtEvent event) {
- if (!event.getEntity().getEntityWorld().isRemote && event.getSource().getImmediateSource() instanceof EntityProjectileBase) {
- final ItemStack bow = ((EntityProjectileBase)event.getSource().getImmediateSource()).tinkerProjectile.getLaunchingStack();
- if (TinkerUtil.hasTrait(TagUtil.getTagSafe(bow), identifier)) {
- event.getEntity().setFire(10);
- }
- }
- }
-}
diff --git a/src/main/java/landmaster/plustic/traits/NaturesBlessing.java b/src/main/java/landmaster/plustic/traits/NaturesBlessing.java
deleted file mode 100644
index c9e5d065..00000000
--- a/src/main/java/landmaster/plustic/traits/NaturesBlessing.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package landmaster.plustic.traits;
-
-import net.minecraft.block.state.*;
-import net.minecraft.entity.*;
-import net.minecraft.entity.item.EntityItem;
-import net.minecraft.init.*;
-import net.minecraft.item.*;
-import net.minecraft.util.math.*;
-import net.minecraft.world.World;
-import slimeknights.tconstruct.library.traits.*;
-
-public class NaturesBlessing extends AbstractTrait {
- public static final NaturesBlessing naturesblessing = new NaturesBlessing();
-
- public NaturesBlessing() {
- super("naturesblessing",0xBEFA5C);
- }
-
- @Override
- public void afterBlockBreak(ItemStack tool, World world, IBlockState state, BlockPos pos, EntityLivingBase player, boolean wasEffective) {
- dropBread(player.getEntityWorld(), pos.getX(), pos.getY(), pos.getZ(), 0.005f);
- }
-
- @Override
- public void afterHit(ItemStack tool, EntityLivingBase player, EntityLivingBase target, float damageDealt, boolean wasCritical, boolean wasHit) {
- if (wasHit && !target.isEntityAlive()) {
- dropBread(target.getEntityWorld(),target.posX,target.posY,target.posZ,0.05f);
- float rnd = random.nextFloat();
- if (rnd < 0.3f) player.heal(3.2f);
- }
- }
-
- protected void dropBread(World world, double x, double y, double z, float chance) {
- if (!world.isRemote && random.nextFloat() < chance) {
- EntityItem entity = new EntityItem(world, x, y, z, new ItemStack(Items.BREAD));
- world.spawnEntity(entity);
- }
- }
-}
diff --git a/src/main/java/landmaster/plustic/traits/NaturesPower.java b/src/main/java/landmaster/plustic/traits/NaturesPower.java
deleted file mode 100644
index 1a15cb9b..00000000
--- a/src/main/java/landmaster/plustic/traits/NaturesPower.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package landmaster.plustic.traits;
-
-import net.minecraft.entity.*;
-import net.minecraft.init.*;
-import net.minecraft.item.*;
-import net.minecraft.potion.*;
-import slimeknights.tconstruct.library.traits.*;
-
-public class NaturesPower extends AbstractTrait {
- public static final NaturesPower naturespower = new NaturesPower();
-
- public NaturesPower() {
- super("naturespower",0xFFFF00);
- }
-
- @Override
- public void afterHit(ItemStack tool, EntityLivingBase player, EntityLivingBase target, float damageDealt, boolean wasCritical, boolean wasHit) {
- if (wasHit) {
- float rnd = random.nextFloat();
- if (rnd < 0.2 && target.isEntityAlive())
- target.setFire(3);
- else if (rnd < 0.4 && player.isEntityAlive())
- player.addPotionEffect(new PotionEffect(MobEffects.SPEED,101));
- else if (rnd < 0.6 && player.isEntityAlive())
- player.addPotionEffect(new PotionEffect(MobEffects.STRENGTH,101));
- }
- }
-}
diff --git a/src/main/java/landmaster/plustic/traits/NaturesWrath.java b/src/main/java/landmaster/plustic/traits/NaturesWrath.java
deleted file mode 100644
index d4161906..00000000
--- a/src/main/java/landmaster/plustic/traits/NaturesWrath.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package landmaster.plustic.traits;
-
-import net.minecraft.entity.*;
-import net.minecraft.item.*;
-import slimeknights.tconstruct.library.traits.*;
-
-public class NaturesWrath extends AbstractTrait {
- public static final NaturesWrath natureswrath = new NaturesWrath();
-
- public NaturesWrath() {
- super("natureswrath",0x007523);
- }
-
- @Override
- public void afterHit(ItemStack tool, EntityLivingBase player, EntityLivingBase target, float damageDealt, boolean wasCritical, boolean wasHit) {
- if (wasHit) {
- float rnd = random.nextFloat();
- if (rnd < 0.2f && target.isEntityAlive()) {
- target.setFire(5);
- }
- if (rnd < 0.5f) player.heal(1.4f);
- }
- }
-}
diff --git a/src/main/java/landmaster/plustic/traits/NickOfTime.java b/src/main/java/landmaster/plustic/traits/NickOfTime.java
deleted file mode 100644
index d63c3f94..00000000
--- a/src/main/java/landmaster/plustic/traits/NickOfTime.java
+++ /dev/null
@@ -1,15 +0,0 @@
-package landmaster.plustic.traits;
-
-import org.apache.commons.lang3.*;
-
-import net.minecraftforge.oredict.*;
-
-public class NickOfTime extends DeathSaveTrait {
- public static final NickOfTime nickOfTime = new NickOfTime();
-
- public NickOfTime() {
- super("nickoftime", 0xFFF98E, 8, stack -> !stack.isEmpty()
- && ArrayUtils.contains(OreDictionary.getOreIDs(stack), OreDictionary.getOreID("enderpearl")),
- "msg.plustic.nickmodifier.use");
- }
-}
diff --git a/src/main/java/landmaster/plustic/traits/Portly.java b/src/main/java/landmaster/plustic/traits/Portly.java
deleted file mode 100644
index 47f85024..00000000
--- a/src/main/java/landmaster/plustic/traits/Portly.java
+++ /dev/null
@@ -1,80 +0,0 @@
-package landmaster.plustic.traits;
-
-import landmaster.plustic.*;
-import landmaster.plustic.api.*;
-import landmaster.plustic.net.*;
-import net.minecraft.client.resources.*;
-import net.minecraft.entity.*;
-import net.minecraft.entity.player.*;
-import net.minecraft.init.*;
-import net.minecraft.item.*;
-import net.minecraft.nbt.*;
-import net.minecraft.util.*;
-import net.minecraft.util.text.*;
-import net.minecraft.world.*;
-import net.minecraftforge.common.*;
-import net.minecraftforge.event.entity.player.*;
-import net.minecraftforge.fml.common.*;
-import net.minecraftforge.fml.common.eventhandler.*;
-import net.minecraftforge.fml.relauncher.*;
-import slimeknights.tconstruct.library.traits.*;
-import slimeknights.tconstruct.library.utils.*;
-
-public class Portly extends AbstractTrait {
- public static final Portly portly = new Portly();
-
- public Portly() {
- super("portly", 0x00443B);
- MinecraftForge.EVENT_BUS.register(this);
- }
-
- @Override
- public void onUpdate(ItemStack tool, World world, Entity entity, int itemSlot, boolean isSelected) {
- if (isSelected && FMLCommonHandler.instance().getSide().isClient()) {
- if (PlusTiC.proxy.isControlPressed("release_entity")) {
- PacketHandler.INSTANCE.sendToServer(new PacketReleaseEntity());
- }
- }
- }
-
- @SubscribeEvent(priority = EventPriority.LOWEST)
- public void captureEntity(PlayerInteractEvent.EntityInteract event) {
- NBTTagCompound nbt = TagUtil.getTagSafe(event.getItemStack());
- if (event.getWorld().isRemote
- || !event.getEntityPlayer().isSneaking()
- || event.getItemStack() == null
- || !TinkerUtil.hasTrait(nbt, getIdentifier())
- || ToolHelper.getCurrentDurability(event.getItemStack()) < durabilityCost(event.getTarget())
- || nbt.hasKey("portlyGentleman", 10)
- || event.getTarget() instanceof EntityPlayer)
- return;
- synchronized (event.getTarget()) {
- nbt.setTag("portlyGentleman", event.getTarget().serializeNBT());
- event.getItemStack().setTagCompound(nbt);
- event.getTarget().setDropItemsWhenDead(false);
- event.getWorld().removeEntity(event.getTarget());
- }
- ToolHelper.damageTool(event.getItemStack(), durabilityCost(event.getTarget()), event.getEntityLiving());
- Sounds.playSoundToAll(event.getEntityPlayer(), SoundEvents.ENTITY_ENDERMEN_TELEPORT, 1.0f, 1.0f);
- event.getEntityPlayer().swingArm(event.getHand());
- event.getEntityPlayer().sendMessage(new TextComponentTranslation(
- "msg.plustic.portlymodifier.set", nbt.getCompoundTag("portlyGentleman").getString("id")));
- event.setCanceled(true);
- event.setCancellationResult(EnumActionResult.SUCCESS);
- }
- @SideOnly(Side.CLIENT)
- @SubscribeEvent
- public void tooltip(ItemTooltipEvent event) {
- NBTTagCompound nbt = TagUtil.getTagSafe(event.getItemStack());
- if (event.getItemStack() == null
- || !TinkerUtil.hasTrait(nbt, getIdentifier())) return;
- if (nbt.hasKey("portlyGentleman", 10)) {
- event.getToolTip().add(I18n.format("tooltip.plustic.portlymodifier.info",
- nbt.getCompoundTag("portlyGentleman").getString("id")));
- }
- }
- private int durabilityCost(Entity entity) {
- return Math.max(15, entity instanceof EntityLivingBase ?
- (int)((EntityLivingBase)entity).getHealth() : 15);
- }
-}
diff --git a/src/main/java/landmaster/plustic/traits/Psicological.java b/src/main/java/landmaster/plustic/traits/Psicological.java
deleted file mode 100644
index 44dfa1a3..00000000
--- a/src/main/java/landmaster/plustic/traits/Psicological.java
+++ /dev/null
@@ -1,52 +0,0 @@
-package landmaster.plustic.traits;
-
-import landmaster.plustic.api.*;
-import landmaster.plustic.util.*;
-import net.minecraft.entity.*;
-import net.minecraft.entity.player.*;
-import net.minecraft.item.*;
-import net.minecraft.world.*;
-import slimeknights.tconstruct.library.traits.*;
-import slimeknights.tconstruct.library.utils.*;
-import slimeknights.tconstruct.tools.modifiers.*;
-
-public class Psicological extends AbstractTrait {
- public static final int PSI_COST = 28;
-
- public static final Psicological psicological = new Psicological();
-
- public Psicological() {
- super("psicological", 0x6D9EFF);
- Toggle.addToggleable(identifier);
- }
-
- @Override
- public void onUpdate(ItemStack tool, World world, Entity entity, int itemSlot, boolean isSelected) {
- if (TagUtil.getTagSafe(tool).getBoolean(ModReinforced.TAG_UNBREAKABLE)) {
- return;
- }
- if (entity instanceof EntityPlayer
- && Toggle.getToggleState(tool, identifier)
- && ToolHelper.getCurrentDurability(tool) < ToolHelper.getMaxDurability(tool)) {
- if (PsiUtils.extractPsiExact((EntityPlayer)entity, PSI_COST) >= PSI_COST) {
- ToolHelper.unbreakTool(tool);
- ToolHelper.healTool(tool, 1, (EntityPlayer)entity);
- }
- }
- }
-
- @Override
- public int onToolDamage(ItemStack tool, int damage, int newDamage, EntityLivingBase entity) {
- if (TagUtil.getTagSafe(tool).getBoolean(ModReinforced.TAG_UNBREAKABLE)) {
- return 0;
- }
- if (entity instanceof EntityPlayer
- && newDamage >= 1
- && Toggle.getToggleState(tool, identifier)) {
- if (PsiUtils.extractPsiExact((EntityPlayer)entity, PSI_COST) >= PSI_COST) {
- --newDamage;
- }
- }
- return super.onToolDamage(tool, damage, newDamage, entity);
- }
-}
diff --git a/src/main/java/landmaster/plustic/traits/RudeAwakening.java b/src/main/java/landmaster/plustic/traits/RudeAwakening.java
deleted file mode 100644
index 110bf164..00000000
--- a/src/main/java/landmaster/plustic/traits/RudeAwakening.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package landmaster.plustic.traits;
-
-import landmaster.plustic.tools.*;
-import net.minecraft.entity.*;
-import net.minecraft.entity.monster.*;
-import net.minecraft.item.*;
-import net.minecraft.util.*;
-import net.minecraftforge.common.*;
-import net.minecraftforge.event.entity.living.*;
-import net.minecraftforge.fml.common.eventhandler.*;
-import slimeknights.tconstruct.library.entity.*;
-import slimeknights.tconstruct.library.tools.ranged.*;
-import slimeknights.tconstruct.library.traits.*;
-
-public class RudeAwakening extends AbstractProjectileTrait {
- public static final RudeAwakening rudeawakening = new RudeAwakening();
-
- public RudeAwakening() {
- super("rudeawakening", 0xFFB200);
- MinecraftForge.EVENT_BUS.register(this);
- }
-
- @SubscribeEvent
- public void onAttack(LivingAttackEvent event) {
- if (event.getEntity().world.isRemote) return;
- if (!(event.getEntity() instanceof IMob)) return;
-
- if (event.getSource() instanceof EntityDamageSourceIndirect
- || event.getSource() instanceof ProjectileCore.DamageSourceProjectileForEndermen) {
- // handle projectiles first
- Entity projectile = event.getSource().getImmediateSource();
- if (projectile instanceof EntityProjectileBase) {
- if (isToolWithTrait(((EntityProjectileBase)projectile).tinkerProjectile.getItemStack())) {
- event.getSource().setDamageBypassesArmor();
- }
- }
- } else if (event.getSource() instanceof EntityDamageSource
- && event.getSource().getTrueSource() instanceof EntityLivingBase) {
- // have to specialcase the laser gun here
- ItemStack stack = event.getSource() instanceof ToolLaserGun.LaserDamageSource
- ? ((ToolLaserGun.LaserDamageSource)event.getSource()).getStack()
- : ((EntityLivingBase)event.getSource().getTrueSource()).getHeldItemMainhand();
- if (this.isToolWithTrait(stack)) {
- event.getSource().setDamageBypassesArmor();
- }
- }
- }
-}
diff --git a/src/main/java/landmaster/plustic/traits/Sassy.java b/src/main/java/landmaster/plustic/traits/Sassy.java
deleted file mode 100644
index 1ac07b44..00000000
--- a/src/main/java/landmaster/plustic/traits/Sassy.java
+++ /dev/null
@@ -1,19 +0,0 @@
-package landmaster.plustic.traits;
-
-import net.minecraft.entity.*;
-import net.minecraft.entity.player.*;
-import net.minecraft.item.ItemStack;
-import slimeknights.tconstruct.library.traits.*;
-
-public class Sassy extends AbstractTrait {
- public static final Sassy sassy = new Sassy();
-
- public Sassy() {
- super("sassy", 0xFFFF00);
- }
-
- @Override
- public boolean isCriticalHit(ItemStack tool, EntityLivingBase player, EntityLivingBase target) {
- return target != null && (target instanceof EntityPlayer || !target.isNonBoss());
- }
-}
diff --git a/src/main/java/landmaster/plustic/traits/Slashing.java b/src/main/java/landmaster/plustic/traits/Slashing.java
deleted file mode 100644
index b403cc11..00000000
--- a/src/main/java/landmaster/plustic/traits/Slashing.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package landmaster.plustic.traits;
-
-import net.minecraft.entity.*;
-import net.minecraft.item.*;
-import slimeknights.tconstruct.library.traits.*;
-
-public class Slashing extends AbstractTrait {
- public static final Slashing slashing = new Slashing();
-
- public Slashing() {
- super("slashing", 0xBBBBBB);
- }
-
- @Override
- public float damage(ItemStack tool, EntityLivingBase player, EntityLivingBase target, float damage, float newDamage, boolean isCritical) {
- if (isCritical) {
- newDamage *= 1.2f;
- }
- return super.damage(tool, player, target, damage, newDamage, isCritical);
- }
-}
diff --git a/src/main/java/landmaster/plustic/traits/SoulCharge.java b/src/main/java/landmaster/plustic/traits/SoulCharge.java
deleted file mode 100644
index cb0c1a77..00000000
--- a/src/main/java/landmaster/plustic/traits/SoulCharge.java
+++ /dev/null
@@ -1,33 +0,0 @@
-package landmaster.plustic.traits;
-
-import it.unimi.dsi.fastutil.objects.*;
-import net.minecraft.block.state.*;
-import net.minecraft.entity.*;
-import net.minecraft.entity.player.*;
-import net.minecraft.item.*;
-import net.minecraft.util.math.*;
-import net.minecraft.world.*;
-import net.tslat.aoa3.library.*;
-import net.tslat.aoa3.utils.*;
-import slimeknights.tconstruct.library.traits.*;
-
-public class SoulCharge extends AbstractTrait {
- public static final SoulCharge soulcharge = new SoulCharge();
-
- protected static final Object2IntMap toolToCharge = Object2IntMaps.unmodifiable(
- new Object2IntOpenHashMap<>(
- new String[] {"pickaxe", "axe", "shovel"},
- new int[] {5, 2, 1}
- ));
-
- public SoulCharge() {
- super("soulcharge", 0x29ffc2);
- }
-
- @Override
- public void afterBlockBreak(ItemStack tool, World world, IBlockState state, BlockPos pos, EntityLivingBase player, boolean wasEffective) {
- if (!world.isRemote && wasEffective && player instanceof EntityPlayer) {
- PlayerUtil.addResourceToPlayer((EntityPlayer) player, Enums.Resources.SOUL, toolToCharge.getInt(state.getBlock().getHarvestTool(state)));
- }
- }
-}
diff --git a/src/main/java/landmaster/plustic/traits/SoulPower.java b/src/main/java/landmaster/plustic/traits/SoulPower.java
deleted file mode 100644
index 02cdcfaa..00000000
--- a/src/main/java/landmaster/plustic/traits/SoulPower.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package landmaster.plustic.traits;
-
-import net.minecraft.entity.*;
-import net.minecraft.entity.player.*;
-import net.minecraft.item.*;
-import net.tslat.aoa3.library.*;
-import net.tslat.aoa3.utils.*;
-import slimeknights.tconstruct.library.traits.*;
-
-public class SoulPower extends AbstractTrait {
- public static final SoulPower soulpower = new SoulPower();
-
- public SoulPower() {
- super("soulpower", 0x29ffc2);
- }
-
- @Override
- public float damage(ItemStack tool, EntityLivingBase player, EntityLivingBase target, float damage, float newDamage, boolean isCritical) {
- if (player instanceof EntityPlayer) {
- float soulVal = PlayerUtil.getAdventPlayer((EntityPlayer)player).getResourceValue(Enums.Resources.SOUL);
- if (soulVal > 5) {
- newDamage += soulVal / 25f;
- PlayerUtil.consumeResource((EntityPlayer)player, Enums.Resources.SOUL, 5, true);
- }
- }
- return super.damage(tool, player, target, damage, newDamage, isCritical);
- }
-}
diff --git a/src/main/java/landmaster/plustic/traits/Spades.java b/src/main/java/landmaster/plustic/traits/Spades.java
deleted file mode 100644
index 2308345f..00000000
--- a/src/main/java/landmaster/plustic/traits/Spades.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package landmaster.plustic.traits;
-
-import net.minecraft.entity.*;
-import net.minecraft.item.*;
-import slimeknights.tconstruct.library.traits.*;
-
-public class Spades extends AbstractTrait {
- public static final Spades spades = new Spades();
-
- public static final float DAMAGE_MULT = 1.3f;
-
- public Spades() {
- super("spades", 0x0000D3);
- }
-
- @Override
- public float damage(ItemStack tool, EntityLivingBase player, EntityLivingBase target, float damage, float newDamage, boolean isCritical) {
- newDamage *= (1 + DAMAGE_MULT * (player.getMaxHealth() - player.getHealth()) / player.getMaxHealth());
- return super.damage(tool, player, target, damage, newDamage, isCritical);
- }
-}
diff --git a/src/main/java/landmaster/plustic/traits/Starfishy.java b/src/main/java/landmaster/plustic/traits/Starfishy.java
deleted file mode 100644
index 6a2025b3..00000000
--- a/src/main/java/landmaster/plustic/traits/Starfishy.java
+++ /dev/null
@@ -1,12 +0,0 @@
-package landmaster.plustic.traits;
-
-import de.ellpeck.actuallyadditions.mod.items.InitItems;
-
-public class Starfishy extends DeathSaveTrait {
- public static final Starfishy starfishy = new Starfishy();
-
- public Starfishy() {
- super("starfishy", 0xF2F7FF, 32, stack ->
- stack.getItem() == InitItems.itemCrystal && stack.getMetadata() == 5, "msg.plustic.starfishy.use");
- }
-}
diff --git a/src/main/java/landmaster/plustic/traits/StopBeingSelfish.java b/src/main/java/landmaster/plustic/traits/StopBeingSelfish.java
deleted file mode 100644
index 28bebbeb..00000000
--- a/src/main/java/landmaster/plustic/traits/StopBeingSelfish.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package landmaster.plustic.traits;
-
-import net.minecraft.entity.*;
-import net.minecraft.entity.player.*;
-import net.minecraft.item.*;
-import slimeknights.tconstruct.library.traits.*;
-
-public class StopBeingSelfish extends AbstractTrait {
- public static final StopBeingSelfish stopbeingselfish = new StopBeingSelfish();
-
- public StopBeingSelfish() {
- super("stopbeingselfish", 0x070070);
- }
-
- @Override
- public float damage(ItemStack tool, EntityLivingBase player, EntityLivingBase target, float damage, float newDamage, boolean isCritical) {
- float theDamage = super.damage(tool, player, target, damage, newDamage, isCritical);
- for (EntityPlayer ep: player.world.playerEntities) {
- if (ep != player) {
- theDamage += 10.0f / Math.max(1, ep.getPositionVector().squareDistanceTo(player.getPositionVector()));
- }
- }
- return theDamage;
- }
-}
diff --git a/src/main/java/landmaster/plustic/traits/Terrafirma.java b/src/main/java/landmaster/plustic/traits/Terrafirma.java
deleted file mode 100644
index 31af69dd..00000000
--- a/src/main/java/landmaster/plustic/traits/Terrafirma.java
+++ /dev/null
@@ -1,115 +0,0 @@
-package landmaster.plustic.traits;
-
-import java.util.*;
-
-import com.google.common.collect.*;
-
-import c4.conarm.lib.armor.*;
-import c4.conarm.lib.traits.*;
-import net.minecraft.entity.*;
-import net.minecraft.entity.item.*;
-import net.minecraft.entity.player.*;
-import net.minecraft.item.*;
-import net.minecraft.util.*;
-import net.minecraft.world.*;
-import net.minecraftforge.event.entity.living.*;
-import net.minecraftforge.event.entity.player.*;
-import slimeknights.tconstruct.library.modifiers.*;
-import slimeknights.tconstruct.library.traits.*;
-
-@net.minecraftforge.fml.common.Optional.Interface(iface = "c4.conarm.lib.traits.IArmorTrait", modid = "conarm")
-@net.minecraftforge.fml.common.Optional.Interface(iface = "c4.conarm.lib.traits.IArmorAbility", modid = "conarm")
-public class Terrafirma extends AbstractTraitLeveled implements IArmorTrait, IArmorAbility {
- public static final List terrafirma = ImmutableList.of(new Terrafirma(1), new Terrafirma(2));
-
- public Terrafirma(int levels) {
- super("terrafirma", 0x00FF00, 3, levels);
- }
-
- @Override
- public void onUpdate(ItemStack tool, World world, Entity entity, int itemSlot, boolean isSelected) {
- if (isSelected && entity instanceof EntityLivingBase && random.nextFloat() < 0.05) {
- ((EntityLivingBase)entity).heal(levels/3.0f);
- }
- }
-
- @Override
- public boolean disableRendering(ItemStack arg0, EntityLivingBase arg1) {
- return false;
- }
-
- @Override
- public ArmorModifications getModifications(EntityPlayer arg0, ArmorModifications arg1, ItemStack arg2,
- DamageSource arg3, double arg4, int arg5) {
- return arg1;
- }
-
- @Override
- public void onAbilityTick(int arg0, World arg1, EntityPlayer arg2) {
- if (random.nextFloat() < 0.05) {
- arg2.heal(arg0 / 6.0f);
- }
- }
-
- @Override
- public int onArmorDamage(ItemStack arg0, DamageSource arg1, int arg2, int arg3, EntityPlayer arg4, int arg5) {
- return arg3;
- }
-
- @Override
- public void onArmorEquipped(ItemStack arg0, EntityPlayer arg1, int arg2) {
- // nothing
- }
-
- @Override
- public int onArmorHeal(ItemStack arg0, DamageSource arg1, int arg2, int arg3, EntityPlayer arg4, int arg5) {
- return arg3;
- }
-
- @Override
- public void onArmorRemoved(ItemStack arg0, EntityPlayer arg1, int arg2) {
- // nothing
- }
-
- @Override
- public float onDamaged(ItemStack arg0, EntityPlayer arg1, DamageSource arg2, float arg3, float arg4,
- LivingDamageEvent arg5) {
- return arg4;
- }
-
- @Override
- public void onFalling(ItemStack arg0, EntityPlayer arg1, LivingFallEvent arg2) {
- // nothing
- }
-
- @Override
- public float onHeal(ItemStack arg0, EntityPlayer arg1, float arg2, float arg3, LivingHealEvent arg4) {
- return arg3;
- }
-
- @Override
- public float onHurt(ItemStack arg0, EntityPlayer arg1, DamageSource arg2, float arg3, float arg4,
- LivingHurtEvent arg5) {
- return arg4;
- }
-
- @Override
- public void onItemPickup(ItemStack arg0, EntityItem arg1, EntityItemPickupEvent arg2) {
- // nothing
- }
-
- @Override
- public void onJumping(ItemStack arg0, EntityPlayer arg1, LivingEvent.LivingJumpEvent arg2) {
- // nothing
- }
-
- @Override
- public void onKnockback(ItemStack arg0, EntityPlayer arg1, LivingKnockBackEvent arg2) {
- // nothing
- }
-
- @Override
- public int getAbilityLevel(ModifierNBT arg0) {
- return arg0.level;
- }
-}
diff --git a/src/main/java/landmaster/plustic/traits/Thaumic.java b/src/main/java/landmaster/plustic/traits/Thaumic.java
deleted file mode 100644
index 7f60ed2a..00000000
--- a/src/main/java/landmaster/plustic/traits/Thaumic.java
+++ /dev/null
@@ -1,68 +0,0 @@
-package landmaster.plustic.traits;
-
-import java.util.*;
-
-import net.minecraft.nbt.*;
-import net.minecraftforge.common.MinecraftForge;
-import net.minecraftforge.fml.common.eventhandler.*;
-import slimeknights.tconstruct.library.events.*;
-import slimeknights.tconstruct.library.materials.*;
-import slimeknights.tconstruct.library.tinkering.*;
-import slimeknights.tconstruct.library.traits.*;
-import slimeknights.tconstruct.library.utils.*;
-//import slimeknights.tconstruct.tools.ranged.item.*;
-
-public class Thaumic extends AbstractTrait {
- public static final Thaumic thaumic = new Thaumic();
-
- public Thaumic() {
- super("thaumic", 0x1E0066);
- MinecraftForge.EVENT_BUS.register(this);
- }
-
- @SubscribeEvent
- public void onToolBuilding(TinkerEvent.OnItemBuilding event) {
- int count = 0;
-
- List reqComponents = event.tool.getRequiredComponents();
-
- int size = reqComponents.size();
-
- if (event.materials.size() < size) {
- size = event.materials.size();
- }
-
- for (int i = 0; i < size; i++) {
- PartMaterialType required = reqComponents.get(i);
- Material material = event.materials.get(i);
-
- boolean hasTrait = false;
-
- for (ITrait trait: required.getApplicableTraitsForMaterial(material)) {
- if (identifier.equals(trait.getIdentifier())) {
- hasTrait = true;
- break;
- }
- }
-
- if (hasTrait) ++count;
- }
-
- if (count > 0) {
- increaseFreeModifiers(event.tag);
- }
- if (count >= Math.min(3, event.tool.getRequiredComponents().size())) {
- /*if (event.tool instanceof ShortBow) {
- System.out.println("COUNT: "+count+"; MIN COMPONENTS: "+event.tool.getRequiredComponents().size());
- }*/
- increaseFreeModifiers(event.tag);
- }
- }
-
- protected void increaseFreeModifiers(NBTTagCompound rootCompound) {
- NBTTagCompound toolTag = TagUtil.getToolTag(rootCompound);
- int modifiers = toolTag.getInteger(Tags.FREE_MODIFIERS)+1;
- toolTag.setInteger(Tags.FREE_MODIFIERS, Math.max(0, modifiers));
- TagUtil.setToolTag(rootCompound, toolTag);
- }
-}
diff --git a/src/main/java/landmaster/plustic/traits/Thundering.java b/src/main/java/landmaster/plustic/traits/Thundering.java
deleted file mode 100644
index f4fb084a..00000000
--- a/src/main/java/landmaster/plustic/traits/Thundering.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package landmaster.plustic.traits;
-
-import net.minecraft.entity.*;
-import net.minecraft.entity.effect.*;
-import net.minecraft.item.*;
-import slimeknights.tconstruct.library.traits.*;
-
-public class Thundering extends AbstractTrait {
- public static final Thundering thundering = new Thundering();
-
- public Thundering() {
- super("thundering", 0xFFFF00);
- }
-
- @Override
- public void afterHit(ItemStack tool, EntityLivingBase player, EntityLivingBase target, float damageDealt, boolean wasCritical, boolean wasHit) {
- target.getEntityWorld().addWeatherEffect(
- new EntityLightningBolt(target.getEntityWorld(), target.posX, target.posY, target.posZ, false)
- );
- }
-}
diff --git a/src/main/java/landmaster/plustic/traits/Trash.java b/src/main/java/landmaster/plustic/traits/Trash.java
deleted file mode 100644
index 13b3cdbb..00000000
--- a/src/main/java/landmaster/plustic/traits/Trash.java
+++ /dev/null
@@ -1,44 +0,0 @@
-package landmaster.plustic.traits;
-
-import landmaster.plustic.api.*;
-import landmaster.plustic.config.*;
-import net.minecraft.entity.*;
-import net.minecraft.item.*;
-import net.minecraft.world.*;
-import net.minecraftforge.common.util.*;
-import net.minecraftforge.items.*;
-import slimeknights.tconstruct.library.traits.*;
-import slimeknights.tconstruct.library.utils.*;
-
-public class Trash extends AbstractTrait {
- public static final Trash trash = new Trash();
-
- public Trash() {
- super("trash", 0x005500);
- Toggle.addToggleable(identifier);
- }
-
- @Override
- public void onUpdate(ItemStack tool, World world, Entity entity, int itemSlot, boolean isSelected) {
- if (!world.isRemote && world instanceof WorldServer
- && ToolHelper.getCurrentDurability(tool) >= 1 && isSelected
- && Toggle.getToggleState(tool, identifier) && random.nextFloat() < 0.01f) {
- IItemHandler handler = entity.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null);
- if (handler != null) {
- ItemStack thing = Config.fetchThing(random);
- if (!thing.isEmpty()) {
- thing = thing.copy();
- for (int i=0; i lst = target.getEntityWorld().getEntitiesWithinAABB(target.getClass(),
- Utils.AABBfromVecs(
- target.getPositionVector().subtract(8,8,8),
- target.getPositionVector().add(8,8,8)),
- ent -> ent != target);
- newDamage += lst.size();
- return super.damage(tool, player, target, damage, newDamage, isCritical);
- }
-}
diff --git a/src/main/java/landmaster/plustic/traits/Vindictive.java b/src/main/java/landmaster/plustic/traits/Vindictive.java
deleted file mode 100644
index ea833f35..00000000
--- a/src/main/java/landmaster/plustic/traits/Vindictive.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package landmaster.plustic.traits;
-
-import net.minecraft.entity.*;
-import net.minecraft.entity.player.*;
-import net.minecraft.item.*;
-import slimeknights.tconstruct.library.traits.*;
-
-public class Vindictive extends AbstractTrait {
- public static final Vindictive vindictive = new Vindictive();
-
- public Vindictive() {
- super("vindictive", 0x000000);
- }
-
- @Override
- public float damage(ItemStack tool, EntityLivingBase player, EntityLivingBase target, float damage, float newDamage, boolean isCritical) {
- if (target instanceof EntityPlayer) {
- newDamage *= 1.4f;
- player.heal(newDamage * 0.2f);
- }
-
- return super.damage(tool, player, target, damage, newDamage, isCritical);
- }
-}
diff --git a/src/main/java/landmaster/plustic/traits/armor/CamDaiBay.java b/src/main/java/landmaster/plustic/traits/armor/CamDaiBay.java
deleted file mode 100644
index fe67ec82..00000000
--- a/src/main/java/landmaster/plustic/traits/armor/CamDaiBay.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package landmaster.plustic.traits.armor;
-
-import c4.conarm.lib.traits.*;
-import net.minecraft.entity.*;
-import net.minecraft.entity.player.*;
-import net.minecraft.item.*;
-import net.minecraft.util.*;
-import net.minecraftforge.event.entity.living.*;
-
-public class CamDaiBay extends AbstractArmorTrait {
- public static final CamDaiBay camdaibay = new CamDaiBay();
-
- public CamDaiBay() {
- super("camdaibay", 0xBBAD00);
- }
-
- @Override
- public float onHurt(ItemStack armor, EntityPlayer player, DamageSource source, float damage, float newDamage, LivingHurtEvent evt) {
- if (!player.world.isRemote && source.getTrueSource() instanceof EntityLivingBase && player.canBlockDamageSource(source)) {
- player.getActivePotionEffects().stream()
- .filter(eff -> eff.getPotion().isBadEffect())
- .forEach(eff -> ((EntityLivingBase)source.getTrueSource()).addPotionEffect(eff));
- }
- return super.onHurt(armor, player, source, damage, newDamage, evt);
- }
-}
diff --git a/src/main/java/landmaster/plustic/traits/armor/DunansTransport.java b/src/main/java/landmaster/plustic/traits/armor/DunansTransport.java
deleted file mode 100644
index 98ab65bf..00000000
--- a/src/main/java/landmaster/plustic/traits/armor/DunansTransport.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package landmaster.plustic.traits.armor;
-
-import c4.conarm.lib.armor.*;
-import c4.conarm.lib.traits.*;
-import net.minecraft.entity.player.*;
-import net.minecraft.item.*;
-import net.minecraft.util.*;
-
-public class DunansTransport extends AbstractArmorTrait {
- public static final DunansTransport dunanstransport = new DunansTransport();
-
- private static final float TOUGH_PER_LEVEL = 2.0F;
- private static final int[] ARMOR_VALUES = new int[] {2, 3, 4, 2};
-
- public DunansTransport() {
- super("dunanstransport", 0xFFE0F1);
- }
-
- @Override
- public ArmorModifications getModifications(EntityPlayer player, ArmorModifications mods, ItemStack armor, DamageSource source, double damage, int slot) {
- if (player.isRiding()) {
- mods.addArmor(ARMOR_VALUES[slot]);
- mods.addToughness(TOUGH_PER_LEVEL);
- }
- return super.getModifications(player, mods, armor, source, damage, slot);
- }
-}
diff --git a/src/main/java/landmaster/plustic/traits/armor/GoodFridayAgreement.java b/src/main/java/landmaster/plustic/traits/armor/GoodFridayAgreement.java
deleted file mode 100644
index 42d0d249..00000000
--- a/src/main/java/landmaster/plustic/traits/armor/GoodFridayAgreement.java
+++ /dev/null
@@ -1,36 +0,0 @@
-package landmaster.plustic.traits.armor;
-
-import java.util.*;
-
-import c4.conarm.lib.capabilities.*;
-import c4.conarm.lib.traits.*;
-import net.minecraft.entity.monster.*;
-import net.minecraft.entity.player.*;
-import net.minecraftforge.common.*;
-import net.minecraftforge.event.entity.living.*;
-import net.minecraftforge.fml.common.eventhandler.*;
-
-public class GoodFridayAgreement extends AbstractArmorTrait {
- public static final GoodFridayAgreement goodfridayagreement = new GoodFridayAgreement();
-
- public GoodFridayAgreement() {
- super("goodfridayagreement", 0x00FF00);
- MinecraftForge.EVENT_BUS.register(this);
- }
-
- @SubscribeEvent
- public void onSetAttackTarget(LivingSetAttackTargetEvent event) {
- if (!event.getEntity().world.isRemote
- && event.getEntity() instanceof EntityIronGolem
- && event.getTarget() instanceof EntityPlayer) {
- boolean doReset = Optional.ofNullable(ArmorAbilityHandler.getArmorAbilitiesData((EntityPlayer)event.getTarget()))
- .map(ArmorAbilityHandler.IArmorAbilities::getAbilityMap)
- .map(map -> map.containsKey(identifier))
- .orElse(false);
-
- if (doReset) {
- ((EntityIronGolem)event.getEntityLiving()).setAttackTarget(null);
- }
- }
- }
-}
diff --git a/src/main/java/landmaster/plustic/traits/armor/HaoransCult.java b/src/main/java/landmaster/plustic/traits/armor/HaoransCult.java
deleted file mode 100644
index 1f493856..00000000
--- a/src/main/java/landmaster/plustic/traits/armor/HaoransCult.java
+++ /dev/null
@@ -1,32 +0,0 @@
-package landmaster.plustic.traits.armor;
-
-import java.util.*;
-
-import c4.conarm.lib.traits.*;
-import landmaster.plustic.util.Utils;
-import net.minecraft.entity.*;
-import net.minecraft.entity.monster.*;
-import net.minecraft.entity.player.*;
-import net.minecraft.init.*;
-import net.minecraft.world.*;
-
-public class HaoransCult extends AbstractArmorTrait {
- public static final HaoransCult haoranscult = new HaoransCult();
-
- public HaoransCult() {
- super("haorans_cult", 0x880000);
- }
-
- @Override
- public void onAbilityTick(int arg0, World arg1, EntityPlayer arg2) {
- if (arg2.isPotionActive(MobEffects.WITHER) && arg1.getTotalWorldTime() % 20 == 0) {
- List list = arg1.getEntitiesWithinAABB(EntityLivingBase.class,
- Utils.AABBfromVecs(arg2.getPositionVector().subtract(7, 7, 7),
- arg2.getPositionVector().add(7, 7, 7)),
- ent -> ent != arg2 && ent instanceof IMob);
- for (EntityLivingBase elb: list) {
- elb.setHealth(elb.getHealth() * 0.7f);
- }
- }
- }
-}
diff --git a/src/main/java/landmaster/plustic/traits/armor/Invariant.java b/src/main/java/landmaster/plustic/traits/armor/Invariant.java
deleted file mode 100644
index 5870ed7d..00000000
--- a/src/main/java/landmaster/plustic/traits/armor/Invariant.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package landmaster.plustic.traits.armor;
-
-import java.util.*;
-
-import c4.conarm.lib.capabilities.*;
-import c4.conarm.lib.traits.*;
-import landmaster.plustic.api.*;
-import landmaster.plustic.util.*;
-import net.minecraft.entity.player.*;
-import net.minecraftforge.common.*;
-import net.minecraftforge.common.capabilities.Capability;
-import net.minecraftforge.common.capabilities.CapabilityInject;
-import net.minecraftforge.event.world.*;
-import net.minecraftforge.fml.common.eventhandler.*;
-
-public class Invariant extends AbstractArmorTrait {
- public static final Invariant invariant = new Invariant();
-
- @CapabilityInject(Toggle.IToggleArmor.class)
- private static Capability TOGGLE_ARMOR = null;
-
- public Invariant() {
- super("invariant", 0xD6D6D6);
- MinecraftForge.EVENT_BUS.register(this);
- Toggle.addToggleable(Toggle.ARMOR_FLAG+identifier);
- }
-
- @SubscribeEvent(priority = EventPriority.LOWEST)
- public void onExplosion(ExplosionEvent.Detonate event) {
- if (event.getWorld().isRemote) return;
- List list = event.getWorld().getEntitiesWithinAABB(EntityPlayer.class, Utils.AABBfromVecs(
- event.getExplosion().getPosition().subtract(10, 10, 10),
- event.getExplosion().getPosition().add(10, 10, 10)),
- player -> {
- return Optional.ofNullable(ArmorAbilityHandler.getArmorAbilitiesData(player))
- .map(ArmorAbilityHandler.IArmorAbilities::getAbilityMap)
- .filter(map -> map.containsKey(identifier))
- .isPresent()
- && Optional.ofNullable(player.getCapability(TOGGLE_ARMOR, null))
- .map(toggle -> toggle.getDisabled())
- .filter(set -> !set.contains(identifier))
- .isPresent();
- });
- if (!list.isEmpty()) {
- event.getAffectedBlocks().clear();
- }
- }
-}
diff --git a/src/main/java/landmaster/plustic/traits/armor/TomAndJerry.java b/src/main/java/landmaster/plustic/traits/armor/TomAndJerry.java
deleted file mode 100644
index 76cfc0e9..00000000
--- a/src/main/java/landmaster/plustic/traits/armor/TomAndJerry.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package landmaster.plustic.traits.armor;
-
-import java.util.*;
-
-import c4.conarm.lib.capabilities.*;
-import c4.conarm.lib.traits.*;
-import net.minecraft.entity.*;
-import net.minecraft.entity.player.*;
-import net.minecraft.init.*;
-import net.minecraft.potion.*;
-import net.minecraftforge.common.*;
-import net.minecraftforge.event.world.*;
-import net.minecraftforge.fml.common.eventhandler.*;
-
-public class TomAndJerry extends AbstractArmorTrait {
- public static final TomAndJerry tomAndJerry = new TomAndJerry();
-
- public TomAndJerry() {
- super("tom_and_jerry", 0xb0b3b7);
- MinecraftForge.EVENT_BUS.register(this);
- }
-
- @SubscribeEvent(priority = EventPriority.LOWEST)
- public void onExplosion(ExplosionEvent.Detonate event) {
- if (event.getWorld().isRemote) return;
- Optional.ofNullable(event.getExplosion().getExplosivePlacedBy())
- .filter(causer -> causer instanceof EntityPlayer)
- .filter(causer -> !event.getAffectedEntities().contains(causer))
- .filter(causer -> ArmorAbilityHandler.getArmorAbilitiesData((EntityPlayer)causer)
- .getAbilityMap()
- .containsKey(identifier))
- .ifPresent(causer -> {
- event.getAffectedEntities().stream()
- .filter(entity -> entity instanceof EntityLivingBase)
- .forEach(entity ->
- ((EntityLivingBase)entity).addPotionEffect(new PotionEffect(MobEffects.SLOWNESS, 200, 1)));
- });
- }
-}
diff --git a/src/main/java/landmaster/plustic/util/ClientUtils.java b/src/main/java/landmaster/plustic/util/ClientUtils.java
deleted file mode 100644
index b1594786..00000000
--- a/src/main/java/landmaster/plustic/util/ClientUtils.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package landmaster.plustic.util;
-
-import net.minecraft.client.renderer.*;
-import net.minecraft.util.math.*;
-
-public class ClientUtils {
- public static void drawBeam(Vec3d S, Vec3d E, Vec3d P, float width) {
- Vec3d PS = S.subtract(P);
- Vec3d SE = E.subtract(S);
-
- Vec3d normal = PS.crossProduct(SE).normalize();
-
- Vec3d half = normal.scale(width);
- Vec3d p1 = S.add(half);
- Vec3d p2 = S.subtract(half);
- Vec3d p3 = E.add(half);
- Vec3d p4 = E.subtract(half);
-
- drawQuad(Tessellator.getInstance(), p1, p3, p4, p2);
- }
-
- private static void drawQuad(Tessellator tessellator, Vec3d p1, Vec3d p2, Vec3d p3, Vec3d p4) {
- int brightness = 240;
- int b1 = brightness >> 16 & 65535;
- int b2 = brightness & 65535;
-
- BufferBuilder buffer = tessellator.getBuffer();
- buffer.pos(p1.x, p1.y, p1.z).tex(0.0D, 0.0D).lightmap(b1, b2).color(255, 255, 255, 128)
- .endVertex();
- buffer.pos(p2.x, p2.y, p2.z).tex(1.0D, 0.0D).lightmap(b1, b2).color(255, 255, 255, 128)
- .endVertex();
- buffer.pos(p3.x, p3.y, p3.z).tex(1.0D, 1.0D).lightmap(b1, b2).color(255, 255, 255, 128)
- .endVertex();
- buffer.pos(p4.x, p4.y, p4.z).tex(0.0D, 1.0D).lightmap(b1, b2).color(255, 255, 255, 128)
- .endVertex();
- }
-}
diff --git a/src/main/java/landmaster/plustic/util/Coord4D.java b/src/main/java/landmaster/plustic/util/Coord4D.java
deleted file mode 100644
index dd08e2c7..00000000
--- a/src/main/java/landmaster/plustic/util/Coord4D.java
+++ /dev/null
@@ -1,99 +0,0 @@
-package landmaster.plustic.util;
-
-import java.util.*;
-
-import io.netty.buffer.*;
-import net.minecraft.block.state.*;
-import net.minecraft.entity.*;
-import net.minecraft.nbt.*;
-import net.minecraft.tileentity.*;
-import net.minecraft.util.math.*;
-import net.minecraft.world.*;
-import net.minecraftforge.common.*;
-
-public class Coord4D {
- public int xCoord;
- public int yCoord;
- public int zCoord;
- public int dimensionId;
-
- public static final Coord4D NIHIL = new Coord4D(0,0,0,0);
-
- public Coord4D(Entity ent) {
- xCoord = (int)ent.posX;
- yCoord = (int)ent.posY;
- zCoord = (int)ent.posZ;
-
- dimensionId = ent.dimension;
- }
-
- public Coord4D(double x, double y, double z, int dimension) {
- xCoord = MathHelper.floor(x);
- yCoord = MathHelper.floor(y);
- zCoord = MathHelper.floor(z);
- dimensionId = dimension;
- }
-
- public Coord4D(BlockPos pos, World world) {
- this(pos.getX(), pos.getY(), pos.getZ(), world.provider.getDimension());
- }
-
- public static Coord4D fromNBT(NBTTagCompound nbt) {
- if (nbt.getSize() == 0) return null;
- return new Coord4D(nbt.getInteger("x"), nbt.getInteger("y"), nbt.getInteger("z"), nbt.getInteger("dim"));
- }
-
- public NBTTagCompound toNBT(NBTTagCompound nbt) {
- nbt.setInteger("x", xCoord);
- nbt.setInteger("y", yCoord);
- nbt.setInteger("z", zCoord);
- nbt.setInteger("dim", dimensionId);
- return nbt;
- }
-
- public static Coord4D fromByteBuf(ByteBuf bb) {
- return new Coord4D(bb.readInt(), bb.readInt(), bb.readInt(), bb.readInt());
- }
-
- public ByteBuf toByteBuf(ByteBuf bb) {
- return bb.writeInt(xCoord).writeInt(yCoord).writeInt(zCoord).writeInt(dimensionId);
- }
-
- public Coord4D add(int x, int y, int z) {
- return new Coord4D(xCoord+x, yCoord+y, zCoord+z, dimensionId);
- }
-
- public IBlockState blockState() {
- WorldServer world = world();
- if (world == null) return null;
- return world.getBlockState(pos());
- }
-
- public TileEntity TE() {
- WorldServer world = world();
- if (world == null) return null;
- return world.getTileEntity(pos());
- }
-
- public BlockPos pos() {
- return new BlockPos(xCoord, yCoord, zCoord);
- }
-
- public WorldServer world() {
- return DimensionManager.getWorld(dimensionId);
- }
-
- @Override
- public String toString() {
- return String.format(Locale.US, "[x=%d, y=%d, z=%d] @ dimension %d", xCoord, yCoord, zCoord, dimensionId);
- }
-
- @Override
- public boolean equals(Object obj) {
- return obj instanceof Coord4D &&
- ((Coord4D)obj).xCoord == xCoord &&
- ((Coord4D)obj).yCoord == yCoord &&
- ((Coord4D)obj).zCoord == zCoord &&
- ((Coord4D)obj).dimensionId == dimensionId;
- }
-}
diff --git a/src/main/java/landmaster/plustic/util/DoubleCoord4D.java b/src/main/java/landmaster/plustic/util/DoubleCoord4D.java
deleted file mode 100644
index 21d2329e..00000000
--- a/src/main/java/landmaster/plustic/util/DoubleCoord4D.java
+++ /dev/null
@@ -1,89 +0,0 @@
-package landmaster.plustic.util;
-
-import java.util.*;
-
-import io.netty.buffer.*;
-import net.minecraft.entity.*;
-import net.minecraft.nbt.*;
-import net.minecraft.util.math.*;
-import net.minecraft.world.*;
-import net.minecraftforge.common.*;
-
-public class DoubleCoord4D {
- public double xCoord;
- public double yCoord;
- public double zCoord;
- public int dimensionId;
-
- public DoubleCoord4D(Coord4D coord) {
- this.xCoord = coord.xCoord;
- this.yCoord = coord.yCoord;
- this.zCoord = coord.zCoord;
- this.dimensionId = coord.dimensionId;
- }
-
- public DoubleCoord4D(Entity ent) {
- xCoord = ent.posX;
- yCoord = ent.posY;
- zCoord = ent.posZ;
- dimensionId = ent.dimension;
- }
-
- public DoubleCoord4D(double x, double y, double z, int dimension) {
- xCoord = x;
- yCoord = y;
- zCoord = z;
- dimensionId = dimension;
- }
-
- public DoubleCoord4D(Vec3d pos, World world) {
- this(pos.x, pos.y, pos.z, world.provider.getDimension());
- }
-
- public static Coord4D fromNBT(NBTTagCompound nbt) {
- if (nbt.getSize() == 0) return null;
- return new Coord4D(nbt.getDouble("x"), nbt.getDouble("y"), nbt.getDouble("z"), nbt.getInteger("dim"));
- }
-
- public NBTTagCompound toNBT(NBTTagCompound nbt) {
- nbt.setDouble("x", xCoord);
- nbt.setDouble("y", yCoord);
- nbt.setDouble("z", zCoord);
- nbt.setInteger("dim", dimensionId);
- return nbt;
- }
-
- public static Coord4D fromByteBuf(ByteBuf bb) {
- return new Coord4D(bb.readDouble(), bb.readDouble(), bb.readDouble(), bb.readInt());
- }
-
- public ByteBuf toByteBuf(ByteBuf bb) {
- return bb.writeDouble(xCoord).writeDouble(yCoord).writeDouble(zCoord).writeInt(dimensionId);
- }
-
- public Coord4D add(double x, double y, double z) {
- return new Coord4D(xCoord+x, yCoord+y, zCoord+z, dimensionId);
- }
-
- public Vec3d vec() {
- return new Vec3d(xCoord, yCoord, zCoord);
- }
-
- public WorldServer world() {
- return DimensionManager.getWorld(dimensionId);
- }
-
- @Override
- public String toString() {
- return String.format(Locale.US, "[x=%f, y=%f, z=%f] @ dimension %d", xCoord, yCoord, zCoord, dimensionId);
- }
-
- @Override
- public boolean equals(Object obj) {
- return obj instanceof DoubleCoord4D &&
- ((DoubleCoord4D)obj).xCoord == xCoord &&
- ((DoubleCoord4D)obj).yCoord == yCoord &&
- ((DoubleCoord4D)obj).zCoord == zCoord &&
- ((DoubleCoord4D)obj).dimensionId == dimensionId;
- }
-}
diff --git a/src/main/java/landmaster/plustic/util/EmeraldBoltCoreCastingRecipe.java b/src/main/java/landmaster/plustic/util/EmeraldBoltCoreCastingRecipe.java
deleted file mode 100644
index 13526481..00000000
--- a/src/main/java/landmaster/plustic/util/EmeraldBoltCoreCastingRecipe.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package landmaster.plustic.util;
-
-import net.minecraft.item.*;
-import net.minecraftforge.fluids.*;
-import slimeknights.tconstruct.library.materials.*;
-import slimeknights.tconstruct.shared.*;
-import slimeknights.tconstruct.tools.ranged.*;
-
-public class EmeraldBoltCoreCastingRecipe extends BoltCoreCastingRecipe {
- public static final EmeraldBoltCoreCastingRecipe INSTANCE = new EmeraldBoltCoreCastingRecipe();
- public static final int boltCoreAmount = Material.VALUE_Gem*2;
- protected EmeraldBoltCoreCastingRecipe() {}
-
- @Override
- public boolean matches(ItemStack cast, Fluid fluid) {
- return super.matches(cast, fluid) && TinkerFluids.emerald.equals(fluid);
- }
-
- @Override
- public int getFluidAmount() {
- return boltCoreAmount;
- }
-}
diff --git a/src/main/java/landmaster/plustic/util/ModifierRegisterPromise.java b/src/main/java/landmaster/plustic/util/ModifierRegisterPromise.java
deleted file mode 100644
index 3ce5dcc0..00000000
--- a/src/main/java/landmaster/plustic/util/ModifierRegisterPromise.java
+++ /dev/null
@@ -1,39 +0,0 @@
-package landmaster.plustic.util;
-
-import java.util.*;
-import java.util.concurrent.*;
-
-import com.google.common.collect.*;
-
-import landmaster.plustic.api.*;
-import net.minecraftforge.fml.common.Mod;
-import net.minecraftforge.fml.common.eventhandler.*;
-import slimeknights.tconstruct.library.*;
-import slimeknights.tconstruct.library.events.*;
-import slimeknights.tconstruct.library.modifiers.*;
-
-@Mod.EventBusSubscriber(modid = ModInfo.MODID)
-public class ModifierRegisterPromise extends CompletableFuture {
- private static final Multimap promises = MultimapBuilder.hashKeys().arrayListValues().build();
-
- private final String identifier;
-
- public ModifierRegisterPromise(String identifier) {
- this.identifier = identifier;
-
- this.whenComplete((modifier, ex) -> promises.remove(this.identifier, this));
-
- final IModifier modifier = TinkerRegistry.getModifier(this.identifier);
- if (modifier != null) {
- this.complete(modifier);
- } else {
- promises.put(this.identifier, this);
- }
- }
-
- @SubscribeEvent(priority = EventPriority.LOWEST)
- public static void onModifierRegister(TinkerRegisterEvent.ModifierRegisterEvent event) {
- new ArrayList<>(promises.get(event.getRecipe().getIdentifier()))
- .forEach(promise -> promise.complete(event.getRecipe()));
- }
-}
diff --git a/src/main/java/landmaster/plustic/util/OreRegisterPromise.java b/src/main/java/landmaster/plustic/util/OreRegisterPromise.java
deleted file mode 100644
index 845312b8..00000000
--- a/src/main/java/landmaster/plustic/util/OreRegisterPromise.java
+++ /dev/null
@@ -1,54 +0,0 @@
-package landmaster.plustic.util;
-
-import java.util.*;
-import java.util.concurrent.*;
-
-import org.apache.commons.lang3.*;
-
-import com.google.common.collect.*;
-
-import landmaster.plustic.api.*;
-import net.minecraft.item.*;
-import net.minecraftforge.fml.common.*;
-import net.minecraftforge.fml.common.eventhandler.*;
-import net.minecraftforge.oredict.*;
-
-/**
- * A little solution I rolled out for handling extremely annoying registry event mayhem…
- * @author Landmaster
- *
- */
-@Mod.EventBusSubscriber(modid = ModInfo.MODID)
-public class OreRegisterPromise extends CompletableFuture {
- private static final Multimap promises = MultimapBuilder.hashKeys().arrayListValues().build();
-
- private final String ore;
- private final String[] modBlacklist;
-
- public OreRegisterPromise(String ore, String...modBlacklist) {
- this.ore = ore;
- this.modBlacklist = modBlacklist;
-
- this.whenComplete((stack, ex) -> promises.remove(this.ore, this)); // deregister promises when resolved
-
- final List ores = OreDictionary.getOres(this.ore);
- if (ores.stream().allMatch(stack
- -> ArrayUtils.contains(modBlacklist, stack.getItem().getRegistryName().getNamespace()))) {
- promises.put(this.ore, this);
- } else {
- this.complete(ores.get(0));
- }
- }
-
- /**
- * This does the work of resolving the promises.
- * @param event
- */
- @SubscribeEvent(priority = EventPriority.LOW)
- public static void onOreRegister(OreDictionary.OreRegisterEvent event) {
- new ArrayList<>(promises.get(event.getName())) // Have to wrap in an ArrayList to prevent comodification.
- .stream()
- .filter(orp -> !ArrayUtils.contains(orp.modBlacklist, event.getOre().getItem().getRegistryName().getNamespace()))
- .forEach(promise -> promise.complete(event.getOre()));
- }
-}
diff --git a/src/main/java/landmaster/plustic/util/PsiUtils.java b/src/main/java/landmaster/plustic/util/PsiUtils.java
deleted file mode 100644
index 1fd059fe..00000000
--- a/src/main/java/landmaster/plustic/util/PsiUtils.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package landmaster.plustic.util;
-
-import net.minecraft.entity.player.*;
-import net.minecraftforge.fml.common.*;
-import vazkii.psi.common.core.handler.*;
-
-public class PsiUtils {
- public static int extractPsi(EntityPlayer player, int maxExtract) {
- if ((Loader.isModLoaded("Psi") || Loader.isModLoaded("psi")) && PlayerDataHandler.get(player) != null && PlayerDataHandler.get(player).getCAD() != null) {
- int amount = PlayerDataHandler.get(player).getAvailablePsi();
- PlayerDataHandler.get(player).deductPsi(Math.min(maxExtract, amount), 20, true);
- return Math.min(maxExtract, amount);
- }
- return 0;
- }
-
- public static int extractPsiExact(EntityPlayer player, int extract) {
- if ((Loader.isModLoaded("Psi") || Loader.isModLoaded("psi")) && PlayerDataHandler.get(player) != null && PlayerDataHandler.get(player).getCAD() != null) {
- int amount = PlayerDataHandler.get(player).getAvailablePsi();
- if (amount >= extract) {
- PlayerDataHandler.get(player).deductPsi(extract, 20, true);
- return Math.min(extract, amount);
- }
- }
- return 0;
- }
-}
diff --git a/src/main/java/landmaster/plustic/util/RunnableDefaultNoop.java b/src/main/java/landmaster/plustic/util/RunnableDefaultNoop.java
deleted file mode 100644
index 7baa3659..00000000
--- a/src/main/java/landmaster/plustic/util/RunnableDefaultNoop.java
+++ /dev/null
@@ -1,6 +0,0 @@
-package landmaster.plustic.util;
-
-public interface RunnableDefaultNoop extends Runnable {
- @Override
- default void run() {}
-}
diff --git a/src/main/java/landmaster/plustic/util/SupplierDefaultNoop.java b/src/main/java/landmaster/plustic/util/SupplierDefaultNoop.java
deleted file mode 100644
index 9a33b1bc..00000000
--- a/src/main/java/landmaster/plustic/util/SupplierDefaultNoop.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package landmaster.plustic.util;
-
-import java.util.function.*;
-
-public interface SupplierDefaultNoop extends Supplier {
- @Override
- default T get() {
- return null;
- }
-}
diff --git a/src/main/java/landmaster/plustic/util/Utils.java b/src/main/java/landmaster/plustic/util/Utils.java
deleted file mode 100644
index 7f9cf118..00000000
--- a/src/main/java/landmaster/plustic/util/Utils.java
+++ /dev/null
@@ -1,394 +0,0 @@
-package landmaster.plustic.util;
-
-import java.lang.invoke.*;
-import java.lang.reflect.*;
-import java.util.*;
-import java.util.Optional;
-import java.util.function.*;
-
-import javax.annotation.*;
-
-import org.apache.commons.lang3.*;
-import org.apache.commons.lang3.StringUtils;
-
-import com.google.common.base.Throwables;
-
-import landmaster.plustic.*;
-import landmaster.plustic.api.*;
-import landmaster.plustic.block.*;
-import landmaster.plustic.fluids.*;
-import net.darkhax.tesla.capability.*;
-import net.minecraft.block.*;
-import net.minecraft.entity.*;
-import net.minecraft.entity.player.*;
-import net.minecraft.item.*;
-import net.minecraft.nbt.NBTTagList;
-import net.minecraft.util.*;
-import net.minecraft.util.math.*;
-import net.minecraftforge.energy.*;
-import net.minecraftforge.fluids.*;
-import net.minecraftforge.fml.common.*;
-import net.minecraftforge.fml.common.registry.*;
-import net.minecraftforge.oredict.*;
-import slimeknights.tconstruct.smeltery.block.*;
-import slimeknights.tconstruct.library.*;
-import slimeknights.tconstruct.library.materials.*;
-import slimeknights.tconstruct.library.modifiers.*;
-import slimeknights.tconstruct.library.modifiers.Modifier;
-import slimeknights.tconstruct.library.smeltery.*;
-import slimeknights.tconstruct.library.utils.TagUtil;
-
-public class Utils {
- private static final Map tinkerMaterials;
-
- static {
- try {
- Field temp = TinkerRegistry.class.getDeclaredField("materials");
- temp.setAccessible(true);
- tinkerMaterials = (Map) MethodHandles.lookup().unreflectGetter(temp).invokeExact();
- } catch (Throwable e) {
- Throwables.throwIfUnchecked(e);
- throw new RuntimeException(e);
- }
- }
-
- private static final Map tinkerMaterialRegisteredByMod;
-
- static {
- try {
- Field temp = TinkerRegistry.class.getDeclaredField("materialRegisteredByMod");
- temp.setAccessible(true);
- tinkerMaterialRegisteredByMod = (Map) MethodHandles.lookup().unreflectGetter(temp)
- .invokeExact();
- } catch (Throwable e) {
- Throwables.throwIfUnchecked(e);
- throw new RuntimeException(e);
- }
- }
-
- private static final List tableCastingRecipes;
- static {
- try {
- Field temp = TinkerRegistry.class.getDeclaredField("tableCastRegistry");
- temp.setAccessible(true);
- tableCastingRecipes = (List) MethodHandles.lookup().unreflectGetter(temp).invokeExact();
- } catch (Throwable e) {
- Throwables.throwIfUnchecked(e);
- throw new RuntimeException(e);
- }
- }
-
- public static void forceOut(String material) {
- if (tinkerMaterials.remove(material) != null) {
- PlusTiC.log.info(String.format("Forcing out material %s", material));
- }
- }
-
- public static void forceOutModsMaterial(String material, String... anyOfTheseModids) {
- Optional.ofNullable(tinkerMaterialRegisteredByMod.get(material))
- .filter(cont -> ArrayUtils.contains(anyOfTheseModids, cont.getModId()))
- .ifPresent(cont -> forceOut(material));
- }
-
- public static void displaceTableCastingRecipe(ICastingRecipe recipe) {
- if (tableCastingRecipes.remove(recipe)) {
- tableCastingRecipes.add(recipe);
- }
- }
-
- public static void addTableCastingRecipeDirectly(ICastingRecipe recipe) {
- tableCastingRecipes.add(recipe);
- }
-
- /**
- * Pushes a material into a lower priority.
- *
- * @param displace
- * the identifier of the material to be pushed
- */
- public static void displace(String displace) {
- Material displaced = tinkerMaterials.remove(displace);
- if (displaced != null) tinkerMaterials.put(displace, displaced);
- }
-
- public static boolean matchesOre(ItemStack is, String od) {
- return OreDictionary.doesOreNameExist(od) && !is.isEmpty()
- && ArrayUtils.contains(OreDictionary.getOreIDs(is), OreDictionary.getOreID(od));
- }
-
- public static AxisAlignedBB AABBfromVecs(Vec3d v1, Vec3d v2) {
- return new AxisAlignedBB(v1.x, v1.y, v1.z, v2.x, v2.y, v2.z);
- }
-
- /**
- * Based on
- * {@link slimeknights.tconstruct.library.utils.EntityUtil#raytraceEntityPlayerLook(EntityPlayer, float)},
- * except with a predicate to filter out unwanted entities.
- */
- public static RayTraceResult raytraceEntityPlayerLookWithPred(EntityPlayer player, float range,
- Predicate super Entity> pred) {
- Vec3d eye = new Vec3d(player.posX, player.posY + player.getEyeHeight(), player.posZ); // Entity.getPositionEyes
- Vec3d look = player.getLook(1.0f);
-
- return raytraceEntityWithPred(player, eye, look, range, true, pred);
- }
-
- /**
- * Based on
- * {@link slimeknights.tconstruct.library.utils.EntityUtil#raytraceEntity(Entity, Vec3d, Vec3d, double, boolean)},
- * except with a predicate to filter out unwanted entities.
- */
- public static RayTraceResult raytraceEntityWithPred(Entity entity, Vec3d start, Vec3d look, double range,
- boolean ignoreCanBeCollidedWith, Predicate super Entity> pred) {
- // Vec3 look = entity.getLook(partialTicks);
- Vec3d direction = start.add(look.x * range, look.y * range, look.z * range);
-
- // Vec3 direction = vec3.addVector(vec31.x * d0, vec31.y * d0, vec31.z *
- // d0);
- Entity pointedEntity = null;
- Vec3d hit = null;
- AxisAlignedBB bb = entity.getEntityBoundingBox().expand(look.x * range, look.y * range, look.z * range)
- .expand(1, 1, 1);
- List entitiesInArea = entity.getEntityWorld().getEntitiesInAABBexcluding(entity, bb,
- EntitySelectors.NOT_SPECTATING.and(pred)::test);
- double range2 = range; // range to the current candidate. Used to find
- // the closest entity.
-
- for (Entity candidate : entitiesInArea) {
- if (ignoreCanBeCollidedWith || candidate.canBeCollidedWith()) {
- // does our vector go through the entity?
- double colBorder = candidate.getCollisionBorderSize();
- AxisAlignedBB entityBB = candidate.getEntityBoundingBox().expand(colBorder, colBorder, colBorder);
- RayTraceResult movingobjectposition = entityBB.calculateIntercept(start, direction);
-
- // needs special casing: vector starts inside the entity
- if (entityBB.contains(start)) {
- if (0.0D < range2 || range2 == 0.0D) {
- pointedEntity = candidate;
- hit = movingobjectposition == null ? start : movingobjectposition.hitVec;
- range2 = 0.0D;
- }
- } else if (movingobjectposition != null) {
- double dist = start.distanceTo(movingobjectposition.hitVec);
-
- if (dist < range2 || range2 == 0.0D) {
- if (candidate == entity.getRidingEntity() && !entity.canRiderInteract()) {
- if (range2 == 0.0D) {
- pointedEntity = candidate;
- hit = movingobjectposition.hitVec;
- }
- } else {
- pointedEntity = candidate;
- hit = movingobjectposition.hitVec;
- range2 = dist;
- }
- }
- }
- }
- }
-
- if (pointedEntity != null && range2 < range) {
- return new RayTraceResult(pointedEntity, hit);
- }
- return null;
- }
-
- public static void addModifierItem(Modifier modifier, String modid, String name) {
- addModifierItem(modifier, modid, name, 0);
- }
-
- public static void addModifierItem(Modifier modifier, String modid, String name, int meta) {
- addModifierItem(modifier, modid, name, meta, 1, 1);
- }
-
- public static void addModifierItem(Modifier modifier, String modid, String name, int meta, int needed,
- int matched) {
- if (modifier == null)
- return;
- ItemStack is = new ItemStack(Item.REGISTRY.getObject(new ResourceLocation(modid, name)), 1, meta);
- modifier.addItem(is, needed, matched);
- }
-
- public static FluidMolten fluidMetal(String name, int color) {
- return registerFluid(new FluidMolten(name, color));
- }
-
- public static void initFluidMetal(Fluid fluid) {
- registerMoltenBlock(fluid);
- FluidRegistry.addBucketForFluid(fluid);
- PlusTiC.proxy.registerFluidModels(fluid);
- }
-
- public static T registerFluid(T fluid) {
- fluid.setUnlocalizedName(ModInfo.MODID + "." + fluid.getName().toLowerCase(Locale.US));
- FluidRegistry.registerFluid(fluid);
- return fluid;
- }
-
- public static T registerBlock(T block, String name) {
- block.setTranslationKey(ModInfo.MODID + "." + name);
- block.setRegistryName(ModInfo.MODID + "." + name);
- Item ib = new ItemBlock(block).setRegistryName(block.getRegistryName());
- ForgeRegistries.BLOCKS.register(block);
- ForgeRegistries.ITEMS.register(ib);
- return block;
- }
-
- public static BlockMolten registerMoltenBlock(Fluid fluid) {
- BlockMolten block = new BlockMolten(fluid) {
- @Nonnull
- @Override
- public String getTranslationKey() {
- Fluid fluid = FluidRegistry.getFluid(fluidName);
- if(fluid != null) {
- return fluid.getUnlocalizedName().substring(0, fluid.getUnlocalizedName().length() - 5); // chop off .name
- }
- return super.getTranslationKey();
- }
- };
- return registerBlock(block, "molten_" + fluid.getName());
- }
-
- public static void setDispItem(Material mat, String modid, String name) {
- if (mat == null)
- return;
- mat.setRepresentativeItem(Item.REGISTRY.getObject(new ResourceLocation(modid, name)));
- }
-
- public static void setDispItem(Material mat, String modid, String name, int meta) {
- if (mat == null)
- return;
- ItemStack is = new ItemStack(Item.REGISTRY.getObject(new ResourceLocation(modid, name)), 1, meta);
- mat.setRepresentativeItem(is);
- }
-
- public static void setDispItem(Material mat, String ore) {
- List ores = OreDictionary.getOres(ore);
- if (mat == null || ores.isEmpty())
- return;
- mat.setRepresentativeItem(ores.get(0));
- }
-
- public static int gcd(int a, int b, int... rest) {
- if (rest.length > 0) {
- int[] rest1 = new int[rest.length - 1];
- System.arraycopy(rest, 1, rest1, 0, rest1.length);
- return gcd(gcd(a, b), rest[0], rest1);
- }
- return b == 0 ? a : gcd(b, a % b);
- }
-
- public static void teleportPlayerTo(EntityPlayerMP player, Coord4D coord) {
- if (player.dimension != coord.dimensionId) {
- player.changeDimension(coord.dimensionId, (world, entity, yaw) -> entity.setPositionAndUpdate(coord.xCoord +0.5, coord.yCoord +1, coord.zCoord +0.5));
- } else {
- player.setPositionAndUpdate(coord.xCoord +0.5, coord.yCoord +1, coord.zCoord +0.5);
- }
- player.world.updateEntityWithOptionalForce(player, true);
- }
-
- public static boolean canTeleportTo(EntityPlayer player, Coord4D dest) {
- if (dest == null)
- return false;
- for (int i = 1; i <= 2; ++i) {
- if (Optional.ofNullable(dest.add(0, i, 0).blockState())
- .map(bs -> bs.getCollisionBoundingBox(dest.world(), dest.pos()))
- .orElse(null) != null) {
- return false;
- }
- }
- return true;
- }
-
- public static int extractEnergy(ItemStack is, int amount, boolean simulate) {
- if (is != null) {
- if (is.hasCapability(CapabilityEnergy.ENERGY, null)) {
- return is.getCapability(CapabilityEnergy.ENERGY, null).extractEnergy(amount, simulate);
- }
- if (Loader.isModLoaded("tesla") && is.hasCapability(TeslaCapabilities.CAPABILITY_PRODUCER, null)) {
- return (int) is.getCapability(TeslaCapabilities.CAPABILITY_PRODUCER, null).takePower(amount, simulate);
- }
- }
- return 0;
- }
-
- public static class ItemMatGroup {
- public Item nugget, ingot;
- public Block block;
-
- public ItemMatGroup() {
- }
-
- public ItemMatGroup(Item nugget, Item ingot, Block block) {
- this.nugget = nugget;
- this.ingot = ingot;
- this.block = block;
- }
- }
-
- public static ItemMatGroup registerMatGroup(String name) {
- ItemMatGroup img = new ItemMatGroup();
- img.nugget = new Item().setTranslationKey(name + "nugget").setRegistryName(name + "nugget");
- img.nugget.setCreativeTab(TinkerRegistry.tabGeneral);
- ForgeRegistries.ITEMS.register(img.nugget);
- OreDictionary.registerOre("nugget" + StringUtils.capitalize(name), img.nugget);
- PlusTiC.proxy.registerItemRenderer(img.nugget, 0, name + "nugget");
-
- img.ingot = new Item().setTranslationKey(name + "ingot").setRegistryName(name + "ingot");
- img.ingot.setCreativeTab(TinkerRegistry.tabGeneral);
- ForgeRegistries.ITEMS.register(img.ingot);
- OreDictionary.registerOre("ingot" + StringUtils.capitalize(name), img.ingot);
- PlusTiC.proxy.registerItemRenderer(img.ingot, 0, name + "ingot");
-
- img.block = new MetalBlock(name + "block");
- img.block.setCreativeTab(TinkerRegistry.tabGeneral);
- ItemBlock bitem = new ItemBlock(img.block);
- ForgeRegistries.BLOCKS.register(img.block);
- ForgeRegistries.ITEMS.register(bitem.setRegistryName(img.block.getRegistryName()));
- OreDictionary.registerOre("block" + StringUtils.capitalize(name), img.block);
- PlusTiC.proxy.registerItemRenderer(bitem, 0, name + "block");
-
- return img;
- }
-
- public static List getModifiers(ItemStack stack) {
- List modifiers = new ArrayList<>();
- NBTTagList modifiersTagList = TagUtil.getBaseModifiersTagList(stack);
- for(int i = 0; i < modifiersTagList.tagCount(); i++) {
- IModifier modifier = TinkerRegistry.getModifier(modifiersTagList.getStringTagAt(i));
- if(modifier != null) {
- modifiers.add(modifier);
- }
- }
- return modifiers;
- }
-
- private static final MethodHandle harvestersHandle;
- static {
- try {
- Field field = Block.class.getDeclaredField("harvesters");
- field.setAccessible(true);
- harvestersHandle = MethodHandles.lookup().unreflectGetter(field);
- } catch (Throwable e) {
- Throwables.throwIfUnchecked(e);
- throw new RuntimeException(e);
- }
- }
-
- public static ThreadLocal getHarvester() {
- try {
- return (ThreadLocal)harvestersHandle.invokeExact();
- } catch (Throwable e) {
- Throwables.throwIfUnchecked(e);
- throw new RuntimeException(e);
- }
- }
-
- public static boolean areFluidStacksIdentical(@Nullable FluidStack a, @Nullable FluidStack b) {
- return a != null ? a.isFluidStackIdentical(b) : b == null;
- }
-
- public static FluidStack safeCopy(FluidStack stack) {
- return stack != null ? stack.copy() : null;
- }
-}
diff --git a/src/main/java/landmaster/plustic/waila/PTWailaRegistrar.java b/src/main/java/landmaster/plustic/waila/PTWailaRegistrar.java
deleted file mode 100644
index 6dcffb66..00000000
--- a/src/main/java/landmaster/plustic/waila/PTWailaRegistrar.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package landmaster.plustic.waila;
-
-import landmaster.plustic.tile.*;
-import mcp.mobius.waila.api.*;
-import slimeknights.tconstruct.plugin.waila.*;
-
-public class PTWailaRegistrar {
- public static void wailaCallback(IWailaRegistrar registrar) {
- TankDataProvider tankDataProvider = new TankDataProvider();
- registrar.registerBodyProvider(tankDataProvider, TECentrifugeTank.class);
- registrar.registerBodyProvider(tankDataProvider, TECentrifugeCore.class);
- }
-}
diff --git a/src/main/java/queengooborg/plusticreforged/PlusTiCReforged.java b/src/main/java/queengooborg/plusticreforged/PlusTiCReforged.java
new file mode 100644
index 00000000..66dd5ca4
--- /dev/null
+++ b/src/main/java/queengooborg/plusticreforged/PlusTiCReforged.java
@@ -0,0 +1,71 @@
+package queengooborg.plusticreforged;
+
+import net.minecraft.data.DataGenerator;
+import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.eventbus.api.IEventBus;
+import net.minecraftforge.eventbus.api.SubscribeEvent;
+import net.minecraftforge.fml.common.Mod;
+import net.minecraftforge.forge.event.lifecycle.GatherDataEvent;
+import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
+import queengooborg.plusticreforged.config.ModInfo;
+import queengooborg.plusticreforged.generator.*;
+import slimeknights.tconstruct.library.client.data.material.MaterialPartTextureGenerator;
+import slimeknights.tconstruct.library.data.material.AbstractMaterialDataProvider;
+import slimeknights.tconstruct.tools.data.sprite.TinkerPartSpriteProvider;
+
+// The value here should match an entry in the META-INF/mods.toml file
+@Mod(ModInfo.MOD_ID)
+@Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.MOD)
+public class PlusTiCReforged {
+ public PlusTiCReforged() {
+ final IEventBus modEventBus = FMLJavaModLoadingContext.get().getModEventBus();
+
+ // Load the materials and modifiers before registering the registries
+ new Resources();
+
+ // Register all the resource registries
+ Registries.FLUIDS.register(modEventBus);
+ Registries.ITEMS.register(modEventBus);
+ Registries.BLOCKS.register(modEventBus);
+ Registries.MODIFIERS.register(modEventBus);
+
+ // Register ourselves for server and other game events we are interested in
+ MinecraftForge.EVENT_BUS.register(this);
+ }
+
+ // Gather data to be generated
+ @SubscribeEvent
+ public static void gatherData(GatherDataEvent event) {
+ DataGenerator gen = event.getGenerator();
+
+ if (event.includeClient()) {
+ // Generate client-side data
+
+ // Generate language file
+ gen.addProvider(new GeneratorLang(gen));
+
+ // Generate models and textures
+ gen.addProvider(new GeneratorItemModels(gen, event.getExistingFileHelper()));
+ gen.addProvider(new GeneratorBlockStates(gen, event.getExistingFileHelper()));
+ GeneratorMaterialTextures materialSprites = new GeneratorMaterialTextures();
+ gen.addProvider(new GeneratorRenderInfo(gen, materialSprites));
+
+ // Generate parts with our new materials
+ gen.addProvider(new MaterialPartTextureGenerator(gen, event.getExistingFileHelper(), new TinkerPartSpriteProvider(), materialSprites));
+ }
+
+ if (event.includeServer()) {
+ // Generate server-side data
+
+ // Generate material information
+ AbstractMaterialDataProvider materialData = new GeneratorMaterials(gen);
+ gen.addProvider(materialData);
+ gen.addProvider(new GeneratorMaterialStats(gen, materialData));
+ gen.addProvider(new GeneratorMaterialTraits(gen, materialData));
+ gen.addProvider(new GeneratorRecipes(gen));
+
+ // Generate tags
+ gen.addProvider(new GeneratorFluidTags(gen, event.getExistingFileHelper()));
+ }
+ }
+}
diff --git a/src/main/java/queengooborg/plusticreforged/Registries.java b/src/main/java/queengooborg/plusticreforged/Registries.java
new file mode 100644
index 00000000..07d6e432
--- /dev/null
+++ b/src/main/java/queengooborg/plusticreforged/Registries.java
@@ -0,0 +1,17 @@
+package queengooborg.plusticreforged;
+
+import net.minecraft.world.level.block.Block;
+import net.minecraft.world.item.Item;
+import net.minecraft.world.level.material.Fluid;
+import net.minecraftforge.registries.DeferredRegister;
+import net.minecraftforge.registries.ForgeRegistries;
+import queengooborg.plusticreforged.config.ModInfo;
+import slimeknights.tconstruct.library.modifiers.Modifier;
+import slimeknights.tconstruct.library.modifiers.util.ModifierDeferredRegister;
+
+public class Registries {
+ public static final DeferredRegister FLUIDS = DeferredRegister.create(ForgeRegistries.FLUIDS, ModInfo.MOD_ID);
+ public static final DeferredRegister
- ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, ModInfo.MOD_ID);
+ public static final DeferredRegister BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, ModInfo.MOD_ID);
+ public static final ModifierDeferredRegister MODIFIERS = ModifierDeferredRegister.create(ModInfo.MOD_ID);
+}
diff --git a/src/main/java/queengooborg/plusticreforged/Resources.java b/src/main/java/queengooborg/plusticreforged/Resources.java
new file mode 100644
index 00000000..d998d71b
--- /dev/null
+++ b/src/main/java/queengooborg/plusticreforged/Resources.java
@@ -0,0 +1,96 @@
+package queengooborg.plusticreforged;
+
+import queengooborg.plusticreforged.api.Material;
+import queengooborg.plusticreforged.api.Modifier;
+import queengooborg.plusticreforged.materials.*;
+import queengooborg.plusticreforged.modifiers.*;
+
+public class Resources {
+ public static final Modifier[] MODIFIERS = new Modifier[]{
+ new HeavyModifier(),
+ new InvulnerableModifier(),
+ new BloodyMaryModifier(),
+ new NaturesBlessingModifier(),
+ new JadedModifier(),
+ new NaturesWrathModifier(),
+ new NaturesPowerModifier(),
+ new ApocalypseModifier(),
+ new FromTheAshesModifier(),
+ new ExplosiveModifier(),
+ new DarkTravelerModifier(),
+ new IgnobleModifier(),
+ new UnstableMatterModifier(),
+ new PsicologicalModifier(),
+ new GlobalModifier(),
+ new PortlyModifier(),
+ new ElementalModifier(),
+ new ManaModifier(),
+ new TerrafirmaModifier(),
+ };
+
+ public static final Material[] MATERIALS = new Material[]{
+ // ModuleBase + New
+ new BedrockMaterial(),
+ new TNTMaterial(),
+
+ // ModuleGems + ModuleGemsPlus
+ new RubyMaterial(),
+ new SapphireMaterial(),
+ new PeridotMaterial(),
+ new JadeMaterial(),
+ new MalachiteMaterial(),
+ new TopazMaterial(),
+ new AmethystMaterial(),
+ new PhoenixiteMaterial(),
+
+ // ModuleProjectE
+ new DarkMatterMaterial(),
+ new RedMatterMaterial(),
+
+ // ModulePsi
+ new PsimetalMaterial(),
+ new PsigemMaterial(),
+
+ // ModuleAppEng2
+ new CertusQuartzMaterial(),
+ new FluixMaterial(),
+
+ // ModuleBotania
+ new ManasteelMaterial(),
+ new TerrasteelMaterial(),
+ new ElementiumMaterial(),
+ // new LivingwoodMaterial(), -- botania:livingwood
+ // new MirionMaterial(), -- custom alloy
+
+ // ModuleIndusForego
+ // new PinkSlimeMaterial(), -- unsure how to implement yet
+
+ // ModuleArmorPlus
+ // new WitherBoneMaterial(), -- armorplus:wither_bone
+ // new GuardianScaleMaterial(), -- armorplus:guardian_scale
+
+ // ModuleDraconicEvolution -- unavailable in MC 1.19
+ // XXX Original used three of four cores, but we should use the ingots instead
+ // new DraconiumMaterial(), -- Forge tags: forge:ingots/draconium
+ // new AwakenedDraconiumMaterial(), -- Forge tags: forge:ingots/draconium_awakened
+ };
+
+ public static Modifier getModifier(String id) {
+ for (Modifier modifier : MODIFIERS) {
+ if (modifier.id.equals(id)) {
+ return modifier;
+ }
+ }
+ return null;
+ }
+
+ @SuppressWarnings("unused")
+ public static Material getMaterial(String id) {
+ for (Material material : MATERIALS) {
+ if (material.id.equals(id)) {
+ return material;
+ }
+ }
+ return null;
+ }
+}
diff --git a/src/main/java/queengooborg/plusticreforged/api/Description.java b/src/main/java/queengooborg/plusticreforged/api/Description.java
new file mode 100644
index 00000000..d4d7abfc
--- /dev/null
+++ b/src/main/java/queengooborg/plusticreforged/api/Description.java
@@ -0,0 +1,18 @@
+package queengooborg.plusticreforged.api;
+
+public class Description {
+ public String flavor = "";
+ public String traits = "";
+
+ public Description() {
+ }
+
+ public Description(String traits) {
+ this.traits = traits;
+ }
+
+ public Description(String flavor, String traits) {
+ this.flavor = flavor;
+ this.traits = traits;
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/queengooborg/plusticreforged/api/Fluid.java b/src/main/java/queengooborg/plusticreforged/api/Fluid.java
new file mode 100644
index 00000000..d8f11fdc
--- /dev/null
+++ b/src/main/java/queengooborg/plusticreforged/api/Fluid.java
@@ -0,0 +1,104 @@
+package queengooborg.plusticreforged.api;
+
+import net.minecraft.sounds.SoundEvents;
+import net.minecraft.tags.TagKey;
+import net.minecraft.world.level.block.Block;
+import net.minecraft.world.level.block.LiquidBlock;
+import net.minecraft.world.level.material.FlowingFluid;
+import net.minecraft.world.item.BucketItem;
+import net.minecraft.world.item.CreativeModeTab;
+import net.minecraft.world.item.Items;
+import net.minecraft.resources.ResourceLocation;
+import net.minecraftforge.fluids.FluidAttributes;
+import net.minecraftforge.fluids.ForgeFlowingFluid;
+import net.minecraftforge.registries.RegistryObject;
+import queengooborg.plusticreforged.Registries;
+import queengooborg.plusticreforged.config.ModInfo;
+import slimeknights.mantle.registration.object.FluidObject;
+
+import java.awt.*;
+import java.util.function.Supplier;
+
+public class Fluid {
+ public final String id;
+ public final String materialName;
+ public final int temperature;
+ public final int light;
+ public final int density;
+ public final int viscosity;
+
+ public final Supplier FLUID;
+ public final Supplier FLUID_FLOWING;
+ public final FluidObject FLUID_OBJECT;
+ public final ForgeFlowingFluid.Properties FLUID_PROPERTIES;
+ public final Supplier FLUID_BLOCK;
+ public final RegistryObject FLUID_BUCKET;
+ public final ResourceLocation TEXTURE_STILL;
+ public final ResourceLocation TEXTURE_FLOWING;
+
+ public Fluid(FluidObject fluid) {
+ this.id = null;
+ this.materialName = null;
+ this.temperature = fluid.get().getAttributes().getTemperature();
+ this.light = fluid.get().getAttributes().getLuminosity();
+ this.density = fluid.get().getAttributes().getDensity();
+ this.viscosity = fluid.get().getAttributes().getViscosity();
+
+ FLUID = () -> (ForgeFlowingFluid.Source) fluid.get();
+ FLUID_FLOWING = () -> (ForgeFlowingFluid.Flowing) fluid.getFlowing();
+ FLUID_BLOCK = fluid::getBlock;
+ FLUID_OBJECT = fluid;
+ TEXTURE_STILL = fluid.get().getAttributes().getStillTexture();
+ TEXTURE_FLOWING = fluid.getFlowing().getAttributes().getFlowingTexture();
+
+ // We can't get either of these from the fluid object, so we set them to null
+ FLUID_PROPERTIES = null;
+ FLUID_BUCKET = null;
+ }
+
+ public Fluid(String id, String materialName, int temperature, int light, int density, int viscosity, Color color) {
+ this.id = id;
+ this.materialName = materialName;
+ this.temperature = temperature;
+ this.light = light;
+ this.density = density;
+ this.viscosity = viscosity;
+
+ FLUID = Registries.FLUIDS.register(id, () -> new ForgeFlowingFluid.Source(getFluidProperties()));
+ FLUID_FLOWING = Registries.FLUIDS.register("flowing_" + id, () -> new ForgeFlowingFluid.Flowing(getFluidProperties()));
+
+ TEXTURE_STILL = new ResourceLocation("tconstruct", "block/fluid/molten/still");
+ TEXTURE_FLOWING = new ResourceLocation("tconstruct", "block/fluid/molten/flowing");
+
+ FLUID_PROPERTIES = new ForgeFlowingFluid.Properties(FLUID, FLUID_FLOWING, FluidAttributes.builder(TEXTURE_STILL, TEXTURE_FLOWING).overlay(TEXTURE_STILL).color(color.getRGB()).luminosity(light).density(density).viscosity(viscosity).temperature(temperature).sound(this.isHot() ? SoundEvents.BUCKET_FILL : SoundEvents.BUCKET_FILL_LAVA, this.isHot() ? SoundEvents.BUCKET_EMPTY : SoundEvents.BUCKET_EMPTY_LAVA));
+
+ FLUID_BLOCK = Registries.BLOCKS.register(id + "_block", () -> new LiquidBlock(FLUID, Block.Properties.of(net.minecraft.world.level.material.Material.LAVA).lightLevel((state) -> {
+ return light;
+ }).randomTicks().strength(100.0F).noDrops()));
+ FLUID_BUCKET = Registries.ITEMS.register(id + "_bucket", () -> new BucketItem(FLUID, new BucketItem.Properties().craftRemainder(Items.BUCKET).stacksTo(1).tab(CreativeModeTab.TAB_MISC)));
+
+ FLUID_PROPERTIES.bucket(FLUID_BUCKET).block(FLUID_BLOCK).explosionResistance(1000F).tickRate(9);
+
+ FLUID_OBJECT = new FluidObject<>(new ResourceLocation(ModInfo.MOD_ID, id), id, FLUID, FLUID_FLOWING, FLUID_BLOCK);
+ }
+
+ public boolean isHot() {
+ return temperature > 600;
+ }
+
+ public ForgeFlowingFluid.Properties getFluidProperties() {
+ return FLUID_PROPERTIES;
+ }
+
+ public ForgeFlowingFluid getFluid() {
+ return FLUID.get();
+ }
+
+ public TagKey getLocalTag() {
+ return FLUID_OBJECT.getLocalTag();
+ }
+
+ public TagKey getForgeTag() {
+ return FLUID_OBJECT.getForgeTag();
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/queengooborg/plusticreforged/api/Ingredient.java b/src/main/java/queengooborg/plusticreforged/api/Ingredient.java
new file mode 100644
index 00000000..5ea5e3f6
--- /dev/null
+++ b/src/main/java/queengooborg/plusticreforged/api/Ingredient.java
@@ -0,0 +1,4 @@
+package queengooborg.plusticreforged.api;
+
+public interface Ingredient {
+}
diff --git a/src/main/java/queengooborg/plusticreforged/api/Item.java b/src/main/java/queengooborg/plusticreforged/api/Item.java
new file mode 100644
index 00000000..c6eebdff
--- /dev/null
+++ b/src/main/java/queengooborg/plusticreforged/api/Item.java
@@ -0,0 +1,15 @@
+package queengooborg.plusticreforged.api;
+
+import net.minecraft.resources.ResourceLocation;
+
+public class Item implements Ingredient {
+ public ResourceLocation location;
+
+ public Item(ResourceLocation location) {
+ this.location = location;
+ }
+
+ public Item(String namespace, String path) {
+ this(new ResourceLocation(namespace, path));
+ }
+}
diff --git a/src/main/java/queengooborg/plusticreforged/api/ItemID.java b/src/main/java/queengooborg/plusticreforged/api/ItemID.java
new file mode 100644
index 00000000..b838431f
--- /dev/null
+++ b/src/main/java/queengooborg/plusticreforged/api/ItemID.java
@@ -0,0 +1,13 @@
+package queengooborg.plusticreforged.api;
+
+import net.minecraft.resources.ResourceLocation;
+
+public class ItemID extends Item {
+ public ItemID(ResourceLocation location) {
+ super(location);
+ }
+
+ public ItemID(String namespace, String path) {
+ super(namespace, path);
+ }
+}
diff --git a/src/main/java/queengooborg/plusticreforged/api/ItemTag.java b/src/main/java/queengooborg/plusticreforged/api/ItemTag.java
new file mode 100644
index 00000000..e29ea076
--- /dev/null
+++ b/src/main/java/queengooborg/plusticreforged/api/ItemTag.java
@@ -0,0 +1,13 @@
+package queengooborg.plusticreforged.api;
+
+import net.minecraft.resources.ResourceLocation;
+
+public class ItemTag extends Item {
+ public ItemTag(ResourceLocation location) {
+ super(location);
+ }
+
+ public ItemTag(String namespace, String path) {
+ super(namespace, path);
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/queengooborg/plusticreforged/api/Material.java b/src/main/java/queengooborg/plusticreforged/api/Material.java
new file mode 100644
index 00000000..613c8c88
--- /dev/null
+++ b/src/main/java/queengooborg/plusticreforged/api/Material.java
@@ -0,0 +1,105 @@
+package queengooborg.plusticreforged.api;
+
+import net.minecraftforge.common.crafting.conditions.ICondition;
+import net.minecraftforge.common.crafting.conditions.NotCondition;
+import net.minecraftforge.common.crafting.conditions.OrCondition;
+import net.minecraftforge.common.crafting.conditions.TagEmptyCondition;
+import queengooborg.plusticreforged.config.ModInfo;
+import slimeknights.tconstruct.common.json.ConfigEnabledCondition;
+import slimeknights.tconstruct.library.materials.definition.MaterialId;
+import slimeknights.tconstruct.library.modifiers.util.StaticModifier;
+
+import java.util.Arrays;
+import java.util.Objects;
+
+import static slimeknights.tconstruct.library.data.material.AbstractMaterialDataProvider.ORDER_COMPAT;
+import static slimeknights.tconstruct.library.data.material.AbstractMaterialDataProvider.ORDER_HARVEST;
+
+public class Material {
+ public String id;
+ public String name;
+ public Ingredient ingredient;
+ public Description description = new Description();
+ public int tier = 1;
+ public MaterialType type;
+ public int order = ORDER_HARVEST + ORDER_COMPAT;
+ public MaterialColors color = new MaterialColors();
+ public MaterialStats stats = new MaterialStats();
+ public Modifier[] modifiers;
+ public Fluid moltenFluid;
+ public ICondition condition;
+
+ public MaterialId resourceLocation;
+
+ public Material(String id, String name, Description description, Ingredient ingredient, ICondition condition, int tier, MaterialType type, int order, MaterialColors color, MaterialStats stats, int fluidTemperature) {
+ this(id, name, description, ingredient, condition, tier, type, order, color, stats, new Modifier[]{}, fluidTemperature);
+ }
+
+ public Material(String id, String name, Ingredient ingredient, Description description, ICondition condition, int tier, MaterialType type, int order, MaterialColors color, MaterialStats stats, Fluid fluid) {
+ this(id, name, description, ingredient, condition, tier, type, order, color, stats, new Modifier[]{}, fluid);
+ }
+
+ public Material(String id, String name, Description description, Ingredient ingredient, ICondition condition, int tier, MaterialType type, int order, MaterialColors color, MaterialStats stats, Modifier modifier, int fluidTemperature) {
+ this(id, name, description, ingredient, condition, tier, type, order, color, stats, new Modifier[]{modifier}, fluidTemperature);
+ }
+
+ public Material(String id, String name, Ingredient ingredient, Description description, ICondition condition, int tier, MaterialType type, int order, MaterialColors color, MaterialStats stats, Modifier modifier, Fluid fluid) {
+ this(id, name, description, ingredient, condition, tier, type, order, color, stats, new Modifier[]{modifier}, fluid);
+ }
+
+ public Material(String id, String name, Description description, Ingredient ingredient, ICondition condition, int tier, MaterialType type, int order, MaterialColors color, MaterialStats stats, Modifier[] modifiers, int fluidTemperature) {
+ this(id, name, description, ingredient, condition, tier, type, order, color, stats, modifiers, new Fluid("molten_" + id, name, fluidTemperature, 15, 3000, 6000, color.base));
+ }
+
+ public Material(String id, String name, Description description, Ingredient ingredient, ICondition condition, int tier, MaterialType type, int order, MaterialColors color, MaterialStats stats, Modifier[] modifiers, Fluid fluid) {
+
+ this.id = Objects.requireNonNull(id);
+ this.name = Objects.requireNonNull(name);
+ this.ingredient = Objects.requireNonNull(ingredient);
+ if (description != null) this.description = description;
+ this.tier = tier;
+ this.order = order;
+ if (type != null) this.type = type;
+ if (color != null) this.color = color;
+ if (stats != null) this.stats = stats;
+ if (modifiers != null) this.modifiers = modifiers;
+ this.moltenFluid = Objects.requireNonNull(fluid);
+
+ // XXX Need to add alloy support (and improve the way we handle tags)
+ if (ingredient instanceof Item) {
+ Item item = (Item) ingredient;
+
+ ICondition[] conditions = null;
+ if (type == MaterialType.METAL) {
+ conditions = new ICondition[]{
+ ConfigEnabledCondition.FORCE_INTEGRATION_MATERIALS,
+ new NotCondition(
+ item instanceof ItemTag ?
+ new TagEmptyCondition(item.location) :
+ new TagEmptyCondition("forge", "ingots/" + item.location.getPath())
+ )
+ };
+ } else if (item instanceof ItemTag) {
+ conditions = new ICondition[]{new NotCondition(new TagEmptyCondition(item.location))};
+ }
+
+ this.condition = conditions == null ? condition : new OrCondition(addCondition(conditions, condition));
+ }
+
+ this.resourceLocation = new MaterialId(ModInfo.MOD_ID, id);
+ }
+
+ private ICondition[] addCondition(ICondition[] conditions, ICondition newCondition) {
+ if (newCondition == null) return conditions;
+
+ // We have to...create an entirely new array to add an element? Ugh, that's annoying...
+ ICondition[] newConditions = new ICondition[conditions.length + 1];
+ System.arraycopy(conditions, 0, newConditions, 0, conditions.length);
+ newConditions[conditions.length] = newCondition;
+ return newConditions;
+ }
+
+ public StaticModifier[] getModifiers() {
+ return Arrays.stream(modifiers).map(modifier -> modifier.instance).toArray(StaticModifier[]::new);
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/queengooborg/plusticreforged/api/MaterialColors.java b/src/main/java/queengooborg/plusticreforged/api/MaterialColors.java
new file mode 100644
index 00000000..947f2cbf
--- /dev/null
+++ b/src/main/java/queengooborg/plusticreforged/api/MaterialColors.java
@@ -0,0 +1,99 @@
+package queengooborg.plusticreforged.api;
+
+import slimeknights.tconstruct.library.client.data.spritetransformer.GreyToColorMapping;
+import slimeknights.tconstruct.library.client.data.spritetransformer.IColorMapping;
+
+import java.awt.*;
+import java.util.Objects;
+
+public class MaterialColors {
+ public Color base;
+ public Color f63 = new Color(0x3F3F3F);
+ public Color f102 = new Color(0x5E5E5E);
+ public Color f140 = new Color(0x828282);
+ public Color f178 = new Color(0xA8A8A8);
+ public Color f216 = new Color(0xD8D8D8);
+ public Color f255 = new Color(0xFFFFFF);
+ public int luminosity = 0;
+
+ public MaterialColors() {
+ this(new Color(0xD8D8D8), 0);
+ }
+
+ public MaterialColors(int base) {
+ this(new Color(base), 0);
+ }
+
+ public MaterialColors(Color base) {
+ this(base, 0);
+ }
+
+ public MaterialColors(Color base, int luminosity) {
+ this.base = Objects.requireNonNull(base);
+ this.f63 = adjustColorBrightness(base, 63);
+ this.f102 = adjustColorBrightness(base, 102);
+ this.f140 = adjustColorBrightness(base, 140);
+ this.f178 = adjustColorBrightness(base, 178);
+ this.f216 = adjustColorBrightness(base, 216);
+ this.f255 = adjustColorBrightness(base, 255);
+ this.luminosity = luminosity;
+ }
+
+ public MaterialColors(Color base, int luminosity, Color f63, Color f102, Color f140, Color f178, Color f216, Color f255) {
+ this.base = base;
+ this.f63 = f63 == null ? adjustColorBrightness(base, 63) : f63;
+ this.f102 = f102 == null ? adjustColorBrightness(base, 102) : f102;
+ this.f140 = f140 == null ? adjustColorBrightness(base, 140) : f140;
+ this.f178 = f178 == null ? adjustColorBrightness(base, 178) : f178;
+ this.f216 = f216 == null ? adjustColorBrightness(base, 216) : f216;
+ this.f255 = f255 == null ? adjustColorBrightness(base, 255) : f255;
+ this.luminosity = luminosity;
+ }
+
+ public IColorMapping getColorMapper() {
+ return GreyToColorMapping.builderFromBlack()
+ .addARGB(63, f63.getRGB())
+ .addARGB(102, f102.getRGB())
+ .addARGB(140, f140.getRGB())
+ .addARGB(178, f178.getRGB())
+ .addARGB(216, f216.getRGB())
+ .addARGB(255, f255.getRGB())
+ .build();
+ }
+
+ public Color adjustColorBrightness(Color input, int brightness) {
+ // XXX This is a placeholder for the actual color brightness calculation
+
+ // Iron example (base: 0xD8D8D8):
+ // [...].colorMapper(
+ // GreyToColorMapping.builderFromBlack()
+ // .addARGB(63, 0xFF353535)
+ // .addARGB(102, 0xFF5E5E5E)
+ // .addARGB(140, 0xFF828282)
+ // .addARGB(178, 0xFFA8A8A8)
+ // .addARGB(216, 0xFFD8D8D8)
+ // .addARGB(255, 0xFFFFFFFF)
+ // .build()
+ // );
+
+ // Copper example (base: 0xF98648):
+ // [...].colorMapper(
+ // GreyToColorMapping.builderFromBlack()
+ // .addARGB(63, 0xFF72341A)
+ // .addARGB(102, 0xFF934828)
+ // .addARGB(140, 0xFFD87236)
+ // .addARGB(178, 0xFFEF8345)
+ // .addARGB(216, 0xFFFBA165)
+ // .addARGB(255, 0xFFFAC493)
+ // .build()
+ // );
+
+ int shift = (int) ((brightness - 127 - 40) / 1.5f);
+ return new Color(
+ Math.min(255, Math.max(0, input.getRed() + shift)),
+ Math.min(255, Math.max(0, input.getGreen() + shift)),
+ Math.min(255, Math.max(0, input.getBlue() + shift)),
+ input.getAlpha()
+ );
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/queengooborg/plusticreforged/api/MaterialStats.java b/src/main/java/queengooborg/plusticreforged/api/MaterialStats.java
new file mode 100644
index 00000000..e770dc8a
--- /dev/null
+++ b/src/main/java/queengooborg/plusticreforged/api/MaterialStats.java
@@ -0,0 +1,20 @@
+package queengooborg.plusticreforged.api;
+
+import slimeknights.tconstruct.tools.stats.ExtraMaterialStats;
+import slimeknights.tconstruct.tools.stats.HandleMaterialStats;
+import slimeknights.tconstruct.tools.stats.HeadMaterialStats;
+
+public class MaterialStats {
+ public HeadMaterialStats head = HeadMaterialStats.DEFAULT;
+ public HandleMaterialStats handle = HandleMaterialStats.DEFAULT;
+ public ExtraMaterialStats extra = ExtraMaterialStats.DEFAULT;
+
+ public MaterialStats() {
+ }
+
+ public MaterialStats(HeadMaterialStats head, HandleMaterialStats handle, ExtraMaterialStats extra) {
+ if (head != null) this.head = head;
+ if (handle != null) this.handle = handle;
+ if (extra != null) this.extra = extra;
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/queengooborg/plusticreforged/api/MaterialType.java b/src/main/java/queengooborg/plusticreforged/api/MaterialType.java
new file mode 100644
index 00000000..b5909b36
--- /dev/null
+++ b/src/main/java/queengooborg/plusticreforged/api/MaterialType.java
@@ -0,0 +1,22 @@
+package queengooborg.plusticreforged.api;
+
+import java.util.Objects;
+
+public class MaterialType {
+ public static MaterialType METAL = new MaterialType();
+ public static MaterialType POWDER = new MaterialType(new String[]{"powder"});
+ public static MaterialType STONE = new MaterialType(new String[]{"stone", "wood", "stick"});
+ public static MaterialType WOOD = new MaterialType(new String[]{"wood", "stick"});
+ public static MaterialType BONE = new MaterialType(new String[]{"bone", "stick"});
+ public static MaterialType CRYSTAL = new MaterialType(new String[]{"crystal"});
+
+ public String[] fallbacks = {"metal"};
+
+ public MaterialType() {
+ this(new String[]{"metal"});
+ }
+
+ public MaterialType(String[] fallbacks) {
+ this.fallbacks = Objects.requireNonNull(fallbacks);
+ }
+}
diff --git a/src/main/java/queengooborg/plusticreforged/api/Modifier.java b/src/main/java/queengooborg/plusticreforged/api/Modifier.java
new file mode 100644
index 00000000..d34915fe
--- /dev/null
+++ b/src/main/java/queengooborg/plusticreforged/api/Modifier.java
@@ -0,0 +1,35 @@
+package queengooborg.plusticreforged.api;
+
+import net.minecraft.resources.ResourceLocation;
+import queengooborg.plusticreforged.Registries;
+import queengooborg.plusticreforged.config.ModInfo;
+import slimeknights.tconstruct.library.modifiers.util.StaticModifier;
+
+import java.awt.*;
+import java.util.Objects;
+
+public abstract class Modifier extends slimeknights.tconstruct.library.modifiers.Modifier {
+ public String id;
+ public String name;
+ public Description description = new Description();
+
+ // XXX This is temporary to determine which modifiers have been converted to the new system
+ // Remove this once all modifiers have been converted
+ public boolean usable = false;
+
+ public ResourceLocation resourceLocation;
+ public StaticModifier instance;
+
+ public Modifier(String id, String name, Description description, Color color) {
+ // XXX Need to figure out how to set the colors in the new system
+// super(color.getRGB());
+
+ this.id = Objects.requireNonNull(id);
+ this.name = Objects.requireNonNull(name);
+ if (description != null) this.description = description;
+
+ this.resourceLocation = new ResourceLocation(ModInfo.MOD_ID, id);
+
+ this.instance = Registries.MODIFIERS.register(id, () -> this);
+ }
+}
diff --git a/src/main/java/queengooborg/plusticreforged/config/ModInfo.java b/src/main/java/queengooborg/plusticreforged/config/ModInfo.java
new file mode 100644
index 00000000..e5d614da
--- /dev/null
+++ b/src/main/java/queengooborg/plusticreforged/config/ModInfo.java
@@ -0,0 +1,5 @@
+package queengooborg.plusticreforged.config;
+
+public class ModInfo {
+ public static final String MOD_ID = "plusticreforged";
+}
diff --git a/src/main/java/queengooborg/plusticreforged/generator/GeneratorBlockStates.java b/src/main/java/queengooborg/plusticreforged/generator/GeneratorBlockStates.java
new file mode 100644
index 00000000..7461ddbb
--- /dev/null
+++ b/src/main/java/queengooborg/plusticreforged/generator/GeneratorBlockStates.java
@@ -0,0 +1,33 @@
+package queengooborg.plusticreforged.generator;
+
+import net.minecraft.data.DataGenerator;
+import net.minecraft.resources.ResourceLocation;
+import net.minecraft.world.level.block.LiquidBlock;
+import net.minecraft.world.level.material.FlowingFluid;
+import net.minecraftforge.client.model.generators.BlockStateProvider;
+import net.minecraftforge.common.data.ExistingFileHelper;
+import queengooborg.plusticreforged.Resources;
+import queengooborg.plusticreforged.api.Material;
+import queengooborg.plusticreforged.config.ModInfo;
+
+import java.util.function.Supplier;
+
+public class GeneratorBlockStates extends BlockStateProvider {
+ public GeneratorBlockStates(DataGenerator gen, ExistingFileHelper exFileHelper) {
+ super(gen, ModInfo.MOD_ID, exFileHelper);
+ }
+
+ @Override
+ protected void registerStatesAndModels() {
+ for (Material material : Resources.MATERIALS) {
+ if (material.moltenFluid == null) {
+ continue;
+ }
+
+ // Register blockstates for fluids
+ Supplier fluid = material.moltenFluid.FLUID_BLOCK;
+ ResourceLocation name = fluid.get().getRegistryName();
+ simpleBlock(fluid.get(), models().cubeAll(name.getPath(), new ResourceLocation("tconstruct", "block/fluid/molten/still")));
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/queengooborg/plusticreforged/generator/GeneratorFluidTags.java b/src/main/java/queengooborg/plusticreforged/generator/GeneratorFluidTags.java
new file mode 100644
index 00000000..87d0cb97
--- /dev/null
+++ b/src/main/java/queengooborg/plusticreforged/generator/GeneratorFluidTags.java
@@ -0,0 +1,32 @@
+package queengooborg.plusticreforged.generator;
+
+import net.minecraft.data.DataGenerator;
+import net.minecraft.data.tags.FluidTagsProvider;
+import net.minecraftforge.common.data.ExistingFileHelper;
+import queengooborg.plusticreforged.Resources;
+import queengooborg.plusticreforged.api.Material;
+import queengooborg.plusticreforged.config.ModInfo;
+import slimeknights.tconstruct.common.TinkerTags;
+
+public class GeneratorFluidTags extends FluidTagsProvider {
+ public GeneratorFluidTags(DataGenerator gen, ExistingFileHelper existingFileHelper) {
+ super(gen, ModInfo.MOD_ID, existingFileHelper);
+ }
+
+ public void addTags() {
+ for (Material material : Resources.MATERIALS) {
+ if (material.moltenFluid == null) {
+ continue;
+ }
+
+ tag(material.moltenFluid.getLocalTag()).add(material.moltenFluid.FLUID.get());
+ tag(material.moltenFluid.getForgeTag()).add(material.moltenFluid.FLUID.get());
+ tag(TinkerTags.Fluids.METAL_TOOLTIPS).addTag(material.moltenFluid.getForgeTag());
+ }
+ }
+
+ @Override
+ public String getName() {
+ return "PlusTiC Reforged Fluid Tags";
+ }
+}
diff --git a/src/main/java/queengooborg/plusticreforged/generator/GeneratorItemModels.java b/src/main/java/queengooborg/plusticreforged/generator/GeneratorItemModels.java
new file mode 100644
index 00000000..4610a81d
--- /dev/null
+++ b/src/main/java/queengooborg/plusticreforged/generator/GeneratorItemModels.java
@@ -0,0 +1,48 @@
+package queengooborg.plusticreforged.generator;
+
+import com.google.gson.JsonObject;
+import net.minecraft.data.DataGenerator;
+import net.minecraft.world.item.BucketItem;
+import net.minecraft.resources.ResourceLocation;
+import net.minecraftforge.client.model.generators.CustomLoaderBuilder;
+import net.minecraftforge.client.model.generators.ItemModelBuilder;
+import net.minecraftforge.client.model.generators.ItemModelProvider;
+import net.minecraftforge.client.model.generators.ModelBuilder;
+import net.minecraftforge.common.data.ExistingFileHelper;
+import net.minecraftforge.registries.RegistryObject;
+import queengooborg.plusticreforged.Resources;
+import queengooborg.plusticreforged.api.Fluid;
+import queengooborg.plusticreforged.api.Material;
+import queengooborg.plusticreforged.config.ModInfo;
+
+public class GeneratorItemModels extends ItemModelProvider {
+ public GeneratorItemModels(DataGenerator generator, ExistingFileHelper existingFileHelper) {
+ super(generator, ModInfo.MOD_ID, existingFileHelper);
+ }
+
+ @Override
+ protected void registerModels() {
+ for (Material material : Resources.MATERIALS) {
+ if (material.moltenFluid == null) {
+ continue;
+ }
+
+ bucketModel(material.moltenFluid);
+ }
+ }
+
+ public void bucketModel(Fluid fluid) {
+ RegistryObject reg = fluid.FLUID_BUCKET;
+ assert reg != null;
+ ModelBuilder builder = getBuilder(reg.getId().getPath()).parent(getExistingFile(new ResourceLocation(ModInfo.MOD_ID, fluid.isHot() ? "item/bucket_hot_fluid" : "item/bucket_fluid")));
+
+ // Shamelessly copied from Materialis
+ builder.customLoader((t, u) -> new CustomLoaderBuilder(t.getLocation(), t, u) {
+ public JsonObject toJson(JsonObject json) {
+ json.addProperty("loader", "forge:bucket");
+ json.addProperty("fluid", reg.get().getFluid().getRegistryName().toString());
+ return json;
+ }
+ });
+ }
+}
diff --git a/src/main/java/queengooborg/plusticreforged/generator/GeneratorLang.java b/src/main/java/queengooborg/plusticreforged/generator/GeneratorLang.java
new file mode 100644
index 00000000..710732d9
--- /dev/null
+++ b/src/main/java/queengooborg/plusticreforged/generator/GeneratorLang.java
@@ -0,0 +1,58 @@
+package queengooborg.plusticreforged.generator;
+
+import net.minecraft.data.DataGenerator;
+import net.minecraftforge.common.data.LanguageProvider;
+import queengooborg.plusticreforged.Resources;
+import queengooborg.plusticreforged.api.Material;
+import queengooborg.plusticreforged.api.Modifier;
+import queengooborg.plusticreforged.config.ModInfo;
+
+public class GeneratorLang extends LanguageProvider {
+ public GeneratorLang(DataGenerator gen) {
+ super(gen, ModInfo.MOD_ID, "en_us");
+ }
+
+ @Override
+ protected void addTranslations() {
+ for (Material material : Resources.MATERIALS) {
+ add(String.format("material.%s.%s", ModInfo.MOD_ID, material.id), material.name);
+ if (!material.description.flavor.isEmpty()) {
+ add(String.format("material.%s.%s.flavor", ModInfo.MOD_ID, material.id), material.description.flavor);
+ }
+ if (!material.description.traits.isEmpty()) {
+ add(String.format("material.%s.%s.encyclopedia", ModInfo.MOD_ID, material.id), material.description.traits);
+ }
+
+ if (material.moltenFluid != null && material.moltenFluid.id != null) {
+ addBlock(material.moltenFluid.FLUID_BLOCK, material.moltenFluid.materialName);
+ addItem(material.moltenFluid.FLUID_BUCKET, "Molten " + material.moltenFluid.materialName + " Bucket");
+ add(String.format("fluid.%s.%s", ModInfo.MOD_ID, material.moltenFluid.id), "Molten " + material.moltenFluid.materialName);
+ }
+ }
+
+ for (Modifier modifier : Resources.MODIFIERS) {
+ add(String.format("modifier.%s.%s", ModInfo.MOD_ID, modifier.id), modifier.name);
+ if (modifier.usable) {
+ if (!modifier.description.flavor.isEmpty()) {
+ add(String.format("modifier.%s.%s.flavor", ModInfo.MOD_ID, modifier.id), modifier.description.flavor);
+ }
+ } else {
+ // XXX Remove this once all modifiers have been converted
+ String warning = "THIS MODIFIER HAS NOT BEEN CONVERTED TO THE NEW SYSTEM AND IS NOT USABLE YET!";
+ if (modifier.description.flavor.isEmpty()) {
+ add(String.format("modifier.%s.%s.flavor", ModInfo.MOD_ID, modifier.id), warning);
+ } else {
+ add(String.format("modifier.%s.%s.flavor", ModInfo.MOD_ID, modifier.id), warning + "\n\n" + modifier.description.flavor);
+ }
+ }
+ if (!modifier.description.traits.isEmpty()) {
+ add(String.format("modifier.%s.%s.description", ModInfo.MOD_ID, modifier.id), modifier.description.traits);
+ }
+ }
+ }
+
+ @Override
+ public String getName() {
+ return "PlusTiC Reforged Language File Generator";
+ }
+}
diff --git a/src/main/java/queengooborg/plusticreforged/generator/GeneratorMaterialStats.java b/src/main/java/queengooborg/plusticreforged/generator/GeneratorMaterialStats.java
new file mode 100644
index 00000000..039e6b25
--- /dev/null
+++ b/src/main/java/queengooborg/plusticreforged/generator/GeneratorMaterialStats.java
@@ -0,0 +1,25 @@
+package queengooborg.plusticreforged.generator;
+
+import net.minecraft.data.DataGenerator;
+import queengooborg.plusticreforged.Resources;
+import queengooborg.plusticreforged.api.Material;
+import slimeknights.tconstruct.library.data.material.AbstractMaterialDataProvider;
+import slimeknights.tconstruct.library.data.material.AbstractMaterialStatsDataProvider;
+
+public class GeneratorMaterialStats extends AbstractMaterialStatsDataProvider {
+ public GeneratorMaterialStats(DataGenerator gen, AbstractMaterialDataProvider materialData) {
+ super(gen, materialData);
+ }
+
+ @Override
+ protected void addMaterialStats() {
+ for (Material material : Resources.MATERIALS) {
+ addMaterialStats(material.resourceLocation, material.stats.head, material.stats.handle, material.stats.extra);
+ }
+ }
+
+ @Override
+ public String getName() {
+ return "PlusTiC Reforged Material Stats";
+ }
+}
diff --git a/src/main/java/queengooborg/plusticreforged/generator/GeneratorMaterialTextures.java b/src/main/java/queengooborg/plusticreforged/generator/GeneratorMaterialTextures.java
new file mode 100644
index 00000000..4babab1f
--- /dev/null
+++ b/src/main/java/queengooborg/plusticreforged/generator/GeneratorMaterialTextures.java
@@ -0,0 +1,23 @@
+package queengooborg.plusticreforged.generator;
+
+import net.minecraft.resources.ResourceLocation;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import queengooborg.plusticreforged.Resources;
+import queengooborg.plusticreforged.api.Material;
+import slimeknights.tconstruct.library.client.data.material.AbstractMaterialSpriteProvider;
+import slimeknights.tconstruct.tools.data.sprite.TinkerPartSpriteProvider;
+
+public class GeneratorMaterialTextures extends AbstractMaterialSpriteProvider {
+ @Override
+ protected void addAllMaterials() {
+ for (Material material : Resources.MATERIALS) {
+ buildMaterial(material.resourceLocation).meleeHarvest().ranged().statType(TinkerPartSpriteProvider.PLATE).fallbacks(material.type.fallbacks).colorMapper(material.color.getColorMapper());
+ }
+ }
+
+ @Override
+ public String getName() {
+ return "PlusTiC Reforged Material Textures";
+ }
+}
diff --git a/src/main/java/queengooborg/plusticreforged/generator/GeneratorMaterialTraits.java b/src/main/java/queengooborg/plusticreforged/generator/GeneratorMaterialTraits.java
new file mode 100644
index 00000000..17562055
--- /dev/null
+++ b/src/main/java/queengooborg/plusticreforged/generator/GeneratorMaterialTraits.java
@@ -0,0 +1,35 @@
+package queengooborg.plusticreforged.generator;
+
+import net.minecraft.data.DataGenerator;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import queengooborg.plusticreforged.Resources;
+import queengooborg.plusticreforged.api.Material;
+import slimeknights.tconstruct.library.data.material.AbstractMaterialDataProvider;
+import slimeknights.tconstruct.library.data.material.AbstractMaterialTraitDataProvider;
+
+public class GeneratorMaterialTraits extends AbstractMaterialTraitDataProvider {
+ private static final Logger log = LogManager.getLogger(GeneratorMaterialTraits.class);
+
+ public GeneratorMaterialTraits(DataGenerator gen, AbstractMaterialDataProvider materialData) {
+ super(gen, materialData);
+ }
+
+ @Override
+ protected void addMaterialTraits() {
+ for (Material material : Resources.MATERIALS) {
+ if (material.modifiers.length == 0) {
+ log.info("No modifiers found for material {}", material.id);
+ noTraits(material.resourceLocation);
+ } else {
+ log.info("Adding {} modifiers to material {}", material.modifiers.length, material.id);
+ addDefaultTraits(material.resourceLocation, material.getModifiers());
+ }
+ }
+ }
+
+ @Override
+ public String getName() {
+ return "PlusTiC Reforged Material Traits";
+ }
+}
diff --git a/src/main/java/queengooborg/plusticreforged/generator/GeneratorMaterials.java b/src/main/java/queengooborg/plusticreforged/generator/GeneratorMaterials.java
new file mode 100644
index 00000000..bccb5388
--- /dev/null
+++ b/src/main/java/queengooborg/plusticreforged/generator/GeneratorMaterials.java
@@ -0,0 +1,31 @@
+package queengooborg.plusticreforged.generator;
+
+import net.minecraft.data.DataGenerator;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import queengooborg.plusticreforged.Resources;
+import queengooborg.plusticreforged.api.Material;
+import slimeknights.tconstruct.library.data.material.AbstractMaterialDataProvider;
+
+public class GeneratorMaterials extends AbstractMaterialDataProvider {
+ private static final Logger log = LogManager.getLogger(GeneratorMaterials.class);
+
+ public GeneratorMaterials(DataGenerator gen) {
+ super(gen);
+ }
+
+ @Override
+ protected void addMaterials() {
+ for (Material material : Resources.MATERIALS) {
+ log.info("Adding material {}", material.id);
+ addMaterial(material.resourceLocation, material.tier, material.order, false, false, material.condition);
+ // XXX Need to re-add material colors...?
+ // addMaterial(material.resourceLocation, material.tier, material.order, false, material.color.base.getRGB(), false, material.condition);
+ }
+ }
+
+ @Override
+ public String getName() {
+ return "PlusTiC Reforged Materials";
+ }
+}
diff --git a/src/main/java/queengooborg/plusticreforged/generator/GeneratorRecipes.java b/src/main/java/queengooborg/plusticreforged/generator/GeneratorRecipes.java
new file mode 100644
index 00000000..4d0c21d3
--- /dev/null
+++ b/src/main/java/queengooborg/plusticreforged/generator/GeneratorRecipes.java
@@ -0,0 +1,101 @@
+package queengooborg.plusticreforged.generator;
+
+import net.minecraft.data.DataGenerator;
+import net.minecraft.data.recipes.FinishedRecipe;
+import net.minecraft.data.recipes.RecipeProvider;
+import net.minecraft.tags.TagKey;
+import net.minecraft.world.item.crafting.Ingredient;
+import net.minecraftforge.common.crafting.conditions.IConditionBuilder;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import queengooborg.plusticreforged.Resources;
+import queengooborg.plusticreforged.api.Item;
+import queengooborg.plusticreforged.api.ItemTag;
+import queengooborg.plusticreforged.api.Material;
+import queengooborg.plusticreforged.api.MaterialType;
+import queengooborg.plusticreforged.config.ModInfo;
+import slimeknights.mantle.recipe.helper.ItemOutput;
+import slimeknights.mantle.recipe.data.ItemNameIngredient;
+import slimeknights.mantle.recipe.data.ItemNameOutput;
+import slimeknights.tconstruct.library.data.recipe.ICommonRecipeHelper;
+import slimeknights.tconstruct.library.data.recipe.IMaterialRecipeHelper;
+import slimeknights.tconstruct.library.data.recipe.ISmelteryRecipeHelper;
+import slimeknights.tconstruct.library.data.recipe.IToolRecipeHelper;
+import slimeknights.tconstruct.library.recipe.FluidValues;
+import slimeknights.tconstruct.library.recipe.melting.MeltingRecipeBuilder;
+import slimeknights.tconstruct.smeltery.TinkerSmeltery;
+
+import java.util.function.Consumer;
+
+public class GeneratorRecipes extends RecipeProvider implements IConditionBuilder, IMaterialRecipeHelper, IToolRecipeHelper, ISmelteryRecipeHelper, ICommonRecipeHelper {
+ private static final Logger log = LogManager.getLogger(GeneratorRecipes.class);
+
+ public GeneratorRecipes(DataGenerator gen) {
+ super(gen);
+ }
+
+ @Override
+ public String getName() {
+ return "PlusTiC Reforged Recipes";
+ }
+
+ @Override
+ public String getModId() {
+ return ModInfo.MOD_ID;
+ }
+
+ @Override
+ public void buildCraftingRecipes(Consumer consumer) {
+ String castingDir = "smeltery/casting/";
+ String meltingDir = "smeltery/melting/";
+// String alloyDir = "smeltery/alloys/";
+ String materialDir = "tools/materials/";
+
+ // Generate the recipes
+ for (Material material : Resources.MATERIALS) {
+ log.info("Adding recipes for material {}", material.id);
+
+ Consumer wrappedConsumer = material.condition == null ? consumer : withCondition(consumer, material.condition);
+
+ if (material.ingredient instanceof Item) {
+ Item ingredient = (Item) material.ingredient;
+ boolean isTag = ingredient instanceof ItemTag;
+
+ TagKey tag = getItemTag(ingredient.location.getNamespace(), ingredient.location.getPath());
+
+ ItemOutput output = isTag ? ItemNameOutput.fromTag(tag, 1) : ItemNameOutput.fromName(ingredient.location);
+ Ingredient input = isTag ? Ingredient.of(tag) : ItemNameIngredient.from(ingredient.location);
+
+ if (material.type == MaterialType.METAL) {
+ // Metals are pretty straightforward
+ metalMelting(wrappedConsumer, material.moltenFluid.getFluid(), material.id, false, meltingDir + "metal/", true);
+ metalTagCasting(wrappedConsumer, material.moltenFluid.FLUID_OBJECT, material.id, castingDir + "metal/", false);
+ } else if (material.type == MaterialType.CRYSTAL || material.type == MaterialType.POWDER) {
+ castingWithCast(wrappedConsumer, material.moltenFluid.FLUID_OBJECT, FluidValues.GEM, TinkerSmeltery.gemCast, output, castingDir + material.id);
+
+ MeltingRecipeBuilder.melting(input, material.moltenFluid.getFluid(), FluidValues.GEM, 1.0f).save(wrappedConsumer, modResource(meltingDir + material.id));
+ materialMeltingCasting(wrappedConsumer, material.resourceLocation, material.moltenFluid.FLUID_OBJECT, false, FluidValues.INGOT * 2, materialDir);
+
+ // XXX Create casting recipe for gem blocks
+
+ // ItemCastingRecipeBuilder.basinRecipe(Blocks.EMERALD_BLOCK)
+ // .setFluidAndTime(TinkerFluids.moltenEmerald, false, FluidValues.GEM_BLOCK)
+ // .build(consumer, modResource(folder + "emerald/block"));
+ // ResourceLocation gemBlock = new ResourceLocation(material.item.getNamespace(), material.item.getPath() + "_block");
+ // // XXX Make sure the gem block exists
+
+ // From Tinkers' Construct:
+ // ItemCastingRecipeBuilder.tableRecipe(ItemNameOutput.fromName(gemBlock)).setFluidAndTime(material.moltenFluid.FLUID_OBJECT, true, fluidValue).build(wrappedConsumer, this.modResource(castingDir + material.id));
+ } else {
+// if (material.type == MaterialType.STONE || material.type == MaterialType.WOOD) {
+// fluidValue = FluidValues.METAL_BRICK;
+// ItemCastingRecipeBuilder.basinRecipe(output).setFluidAndTime(material.moltenFluid.FLUID_OBJECT, true, fluidValue).build(wrappedConsumer, this.modResource(castingDir + material.id));
+// }
+
+ materialRecipe(wrappedConsumer, material.resourceLocation, input, 1, 1, materialDir + material.id);
+ materialMeltingCasting(wrappedConsumer, material.resourceLocation, material.moltenFluid.FLUID_OBJECT, false, FluidValues.GLASS_BLOCK, materialDir);
+ }
+ }
+ }
+ }
+}
diff --git a/src/main/java/queengooborg/plusticreforged/generator/GeneratorRenderInfo.java b/src/main/java/queengooborg/plusticreforged/generator/GeneratorRenderInfo.java
new file mode 100644
index 00000000..6ec29965
--- /dev/null
+++ b/src/main/java/queengooborg/plusticreforged/generator/GeneratorRenderInfo.java
@@ -0,0 +1,25 @@
+package queengooborg.plusticreforged.generator;
+
+import net.minecraft.data.DataGenerator;
+import queengooborg.plusticreforged.Resources;
+import queengooborg.plusticreforged.api.Material;
+import slimeknights.tconstruct.library.client.data.material.AbstractMaterialRenderInfoProvider;
+import slimeknights.tconstruct.library.client.data.material.AbstractMaterialSpriteProvider;
+
+public class GeneratorRenderInfo extends AbstractMaterialRenderInfoProvider {
+ public GeneratorRenderInfo(DataGenerator gen, AbstractMaterialSpriteProvider spriteProvider) {
+ super(gen, spriteProvider);
+ }
+
+ @Override
+ protected void addMaterialRenderInfo() {
+ for (Material material : Resources.MATERIALS) {
+ buildRenderInfo(material.resourceLocation).color(material.color.base.getRGB()).luminosity(material.color.luminosity);
+ }
+ }
+
+ @Override
+ public String getName() {
+ return "PlusTiC Reforged Render Info";
+ }
+}
diff --git a/src/main/java/queengooborg/plusticreforged/materials/AmethystMaterial.java b/src/main/java/queengooborg/plusticreforged/materials/AmethystMaterial.java
new file mode 100644
index 00000000..ccbb5192
--- /dev/null
+++ b/src/main/java/queengooborg/plusticreforged/materials/AmethystMaterial.java
@@ -0,0 +1,32 @@
+package queengooborg.plusticreforged.materials;
+
+import net.minecraft.world.item.Tiers;
+import queengooborg.plusticreforged.Resources;
+import queengooborg.plusticreforged.api.*;
+import slimeknights.tconstruct.tools.stats.ExtraMaterialStats;
+import slimeknights.tconstruct.tools.stats.HandleMaterialStats;
+import slimeknights.tconstruct.tools.stats.HeadMaterialStats;
+
+import java.awt.*;
+
+import static slimeknights.tconstruct.library.data.material.AbstractMaterialDataProvider.ORDER_COMPAT;
+import static slimeknights.tconstruct.library.data.material.AbstractMaterialDataProvider.ORDER_HARVEST;
+
+public class AmethystMaterial extends Material {
+ public AmethystMaterial() {
+ super(
+ "amethyst",
+ "Amethyst",
+ new Description("A purple gemstone that vibrates at a high frequency.", ""),
+ new ItemTag("forge", "gems/amethyst"),
+ null,
+ 2,
+ MaterialType.CRYSTAL,
+ ORDER_HARVEST + ORDER_COMPAT,
+ new MaterialColors(new Color(255, 0, 255)),
+ new MaterialStats(new HeadMaterialStats(1100, 6, Tiers.NETHERITE, 8), new HandleMaterialStats(1.5f, 1, 1, 1), ExtraMaterialStats.DEFAULT),
+ Resources.getModifier("apocalypse"),
+ 750
+ );
+ }
+}
diff --git a/src/main/java/queengooborg/plusticreforged/materials/BedrockMaterial.java b/src/main/java/queengooborg/plusticreforged/materials/BedrockMaterial.java
new file mode 100644
index 00000000..b84505a5
--- /dev/null
+++ b/src/main/java/queengooborg/plusticreforged/materials/BedrockMaterial.java
@@ -0,0 +1,32 @@
+package queengooborg.plusticreforged.materials;
+
+import net.minecraft.world.item.Tiers;
+import queengooborg.plusticreforged.Resources;
+import queengooborg.plusticreforged.api.*;
+import slimeknights.tconstruct.tools.stats.ExtraMaterialStats;
+import slimeknights.tconstruct.tools.stats.HandleMaterialStats;
+import slimeknights.tconstruct.tools.stats.HeadMaterialStats;
+
+import java.awt.*;
+
+import static slimeknights.tconstruct.library.data.material.AbstractMaterialDataProvider.ORDER_COMPAT;
+import static slimeknights.tconstruct.library.data.material.AbstractMaterialDataProvider.ORDER_HARVEST;
+
+public class BedrockMaterial extends Material {
+ public BedrockMaterial() {
+ super(
+ "bedrock",
+ "Bedrock",
+ new Description("You could only obtain these tools through Creative or cheats -- so if you're gonna cheat, you might as well commit, right?", "The tool takes no damage"),
+ new ItemID("minecraft", "bedrock"),
+ null,
+ 6,
+ MaterialType.STONE,
+ ORDER_HARVEST + ORDER_COMPAT,
+ new MaterialColors(new Color(60, 60, 60)),
+ new MaterialStats(new HeadMaterialStats(99999999, 10, Tiers.NETHERITE, 99), new HandleMaterialStats(9999999, 10, 10, 99), ExtraMaterialStats.DEFAULT),
+ Resources.getModifier("invulnerable"),
+ 1000
+ );
+ }
+}
diff --git a/src/main/java/queengooborg/plusticreforged/materials/CertusQuartzMaterial.java b/src/main/java/queengooborg/plusticreforged/materials/CertusQuartzMaterial.java
new file mode 100644
index 00000000..4dc4631f
--- /dev/null
+++ b/src/main/java/queengooborg/plusticreforged/materials/CertusQuartzMaterial.java
@@ -0,0 +1,32 @@
+package queengooborg.plusticreforged.materials;
+
+import net.minecraft.world.item.Tiers;
+import queengooborg.plusticreforged.Resources;
+import queengooborg.plusticreforged.api.*;
+import slimeknights.tconstruct.tools.stats.ExtraMaterialStats;
+import slimeknights.tconstruct.tools.stats.HandleMaterialStats;
+import slimeknights.tconstruct.tools.stats.HeadMaterialStats;
+
+import java.awt.*;
+
+import static slimeknights.tconstruct.library.data.material.AbstractMaterialDataProvider.ORDER_COMPAT;
+import static slimeknights.tconstruct.library.data.material.AbstractMaterialDataProvider.ORDER_HARVEST;
+
+public class CertusQuartzMaterial extends Material {
+ public CertusQuartzMaterial() {
+ super(
+ "certus_quartz",
+ "Certus Quartz",
+ new Description("An alternative form of quartz with a slight blue tint.", "Breaks gravity-affected blocks in a column, and has a chance to gain various benefits from a successful attack."),
+ new ItemTag("forge", "gems/certus_quartz"),
+ null,
+ 3,
+ MaterialType.CRYSTAL,
+ ORDER_HARVEST + ORDER_COMPAT,
+ new MaterialColors(new Color(211, 231, 255)),
+ new MaterialStats(new HeadMaterialStats(250, 6.4f, Tiers.DIAMOND, 4.5f), new HandleMaterialStats(0.8f, 1, 1, 1), ExtraMaterialStats.DEFAULT),
+ Resources.getModifier("elemental"),
+ 1000
+ );
+ }
+}
diff --git a/src/main/java/queengooborg/plusticreforged/materials/DarkMatterMaterial.java b/src/main/java/queengooborg/plusticreforged/materials/DarkMatterMaterial.java
new file mode 100644
index 00000000..53a3ca02
--- /dev/null
+++ b/src/main/java/queengooborg/plusticreforged/materials/DarkMatterMaterial.java
@@ -0,0 +1,32 @@
+package queengooborg.plusticreforged.materials;
+
+import net.minecraft.world.item.Tiers;
+import queengooborg.plusticreforged.Resources;
+import queengooborg.plusticreforged.api.*;
+import slimeknights.tconstruct.tools.stats.ExtraMaterialStats;
+import slimeknights.tconstruct.tools.stats.HandleMaterialStats;
+import slimeknights.tconstruct.tools.stats.HeadMaterialStats;
+
+import java.awt.*;
+
+import static slimeknights.tconstruct.library.data.material.AbstractMaterialDataProvider.ORDER_COMPAT;
+import static slimeknights.tconstruct.library.data.material.AbstractMaterialDataProvider.ORDER_HARVEST;
+
+public class DarkMatterMaterial extends Material {
+ public DarkMatterMaterial() {
+ super(
+ "dark_matter",
+ "Dark Matter",
+ new Description("A mysterious substance that seems to defy the laws of physics.", ""),
+ new ItemID("projecte", "dark_matter"),
+ null,
+ 4,
+ MaterialType.CRYSTAL,
+ ORDER_HARVEST + ORDER_COMPAT,
+ new MaterialColors(new Color(39, 1, 51)),
+ new MaterialStats(new HeadMaterialStats(1729, 10, Tiers.NETHERITE, 10.5f), new HandleMaterialStats(1.7f, 1.2f, 1, 1.5f), ExtraMaterialStats.DEFAULT),
+ new Modifier[]{Resources.getModifier("ignoble"), Resources.getModifier("dark_traveler")},
+ 1000
+ );
+ }
+}
diff --git a/src/main/java/queengooborg/plusticreforged/materials/ElementiumMaterial.java b/src/main/java/queengooborg/plusticreforged/materials/ElementiumMaterial.java
new file mode 100644
index 00000000..965144ef
--- /dev/null
+++ b/src/main/java/queengooborg/plusticreforged/materials/ElementiumMaterial.java
@@ -0,0 +1,32 @@
+package queengooborg.plusticreforged.materials;
+
+import net.minecraft.world.item.Tiers;
+import queengooborg.plusticreforged.Resources;
+import queengooborg.plusticreforged.api.*;
+import slimeknights.tconstruct.tools.stats.ExtraMaterialStats;
+import slimeknights.tconstruct.tools.stats.HandleMaterialStats;
+import slimeknights.tconstruct.tools.stats.HeadMaterialStats;
+
+import java.awt.*;
+
+import static slimeknights.tconstruct.library.data.material.AbstractMaterialDataProvider.ORDER_COMPAT;
+import static slimeknights.tconstruct.library.data.material.AbstractMaterialDataProvider.ORDER_HARVEST;
+
+public class ElementiumMaterial extends Material {
+ public ElementiumMaterial() {
+ super(
+ "elementium",
+ "Elementium",
+ new Description("", ""),
+ new ItemTag("forge", "ingots/elementium"),
+ null,
+ 5,
+ MaterialType.METAL,
+ ORDER_HARVEST + ORDER_COMPAT,
+ new MaterialColors(new Color(246, 106, 253)),
+ new MaterialStats(new HeadMaterialStats(540, 7, Tiers.NETHERITE, 6), new HandleMaterialStats(1.25f, 1, 1, 1), ExtraMaterialStats.DEFAULT),
+ new Modifier[]{Resources.getModifier("mana"), Resources.getModifier("elemental")},
+ 800
+ );
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/queengooborg/plusticreforged/materials/FluixMaterial.java b/src/main/java/queengooborg/plusticreforged/materials/FluixMaterial.java
new file mode 100644
index 00000000..fb83399d
--- /dev/null
+++ b/src/main/java/queengooborg/plusticreforged/materials/FluixMaterial.java
@@ -0,0 +1,32 @@
+package queengooborg.plusticreforged.materials;
+
+import net.minecraft.world.item.Tiers;
+import queengooborg.plusticreforged.Resources;
+import queengooborg.plusticreforged.api.*;
+import slimeknights.tconstruct.tools.stats.ExtraMaterialStats;
+import slimeknights.tconstruct.tools.stats.HandleMaterialStats;
+import slimeknights.tconstruct.tools.stats.HeadMaterialStats;
+
+import java.awt.*;
+
+import static slimeknights.tconstruct.library.data.material.AbstractMaterialDataProvider.ORDER_COMPAT;
+import static slimeknights.tconstruct.library.data.material.AbstractMaterialDataProvider.ORDER_HARVEST;
+
+public class FluixMaterial extends Material {
+ public FluixMaterial() {
+ super(
+ "fluix",
+ "Fluix",
+ new Description("A supercharged quartz-like crystal.", "Can capture an entity to transport it easily."),
+ new ItemTag("forge", "gems/fluix"),
+ null,
+ 5,
+ MaterialType.CRYSTAL,
+ ORDER_HARVEST + ORDER_COMPAT,
+ new MaterialColors(new Color(61, 0, 153, 136)),
+ new MaterialStats(new HeadMaterialStats(700, 7, Tiers.NETHERITE, 6.2f), new HandleMaterialStats(1, 1, 1, 1), ExtraMaterialStats.DEFAULT),
+ Resources.getModifier("portly"),
+ 1000
+ );
+ }
+}
diff --git a/src/main/java/queengooborg/plusticreforged/materials/JadeMaterial.java b/src/main/java/queengooborg/plusticreforged/materials/JadeMaterial.java
new file mode 100644
index 00000000..d7a43460
--- /dev/null
+++ b/src/main/java/queengooborg/plusticreforged/materials/JadeMaterial.java
@@ -0,0 +1,32 @@
+package queengooborg.plusticreforged.materials;
+
+import net.minecraft.world.item.Tiers;
+import queengooborg.plusticreforged.Resources;
+import queengooborg.plusticreforged.api.*;
+import slimeknights.tconstruct.tools.stats.ExtraMaterialStats;
+import slimeknights.tconstruct.tools.stats.HandleMaterialStats;
+import slimeknights.tconstruct.tools.stats.HeadMaterialStats;
+
+import java.awt.*;
+
+import static slimeknights.tconstruct.library.data.material.AbstractMaterialDataProvider.ORDER_COMPAT;
+import static slimeknights.tconstruct.library.data.material.AbstractMaterialDataProvider.ORDER_HARVEST;
+
+public class JadeMaterial extends Material {
+ public JadeMaterial() {
+ super(
+ "jade",
+ "Jade",
+ new Description("A green-ish gemstone that is said to have healing properties...which is ironic, considering this stops other mobs from healing.", ""),
+ new ItemTag("forge", "gems/jade"),
+ null,
+ 2,
+ MaterialType.CRYSTAL,
+ ORDER_HARVEST + ORDER_COMPAT,
+ new MaterialColors(new Color(1, 170, 1)),
+ new MaterialStats(new HeadMaterialStats(1600, 8, Tiers.NETHERITE, 5), new HandleMaterialStats(1.35f, 1.1f, 1, 1), ExtraMaterialStats.DEFAULT),
+ Resources.getModifier("jaded"),
+ 750
+ );
+ }
+}
diff --git a/src/main/java/queengooborg/plusticreforged/materials/MalachiteMaterial.java b/src/main/java/queengooborg/plusticreforged/materials/MalachiteMaterial.java
new file mode 100644
index 00000000..d03e126a
--- /dev/null
+++ b/src/main/java/queengooborg/plusticreforged/materials/MalachiteMaterial.java
@@ -0,0 +1,32 @@
+package queengooborg.plusticreforged.materials;
+
+import net.minecraft.world.item.Tiers;
+import queengooborg.plusticreforged.Resources;
+import queengooborg.plusticreforged.api.*;
+import slimeknights.tconstruct.tools.stats.ExtraMaterialStats;
+import slimeknights.tconstruct.tools.stats.HandleMaterialStats;
+import slimeknights.tconstruct.tools.stats.HeadMaterialStats;
+
+import java.awt.*;
+
+import static slimeknights.tconstruct.library.data.material.AbstractMaterialDataProvider.ORDER_COMPAT;
+import static slimeknights.tconstruct.library.data.material.AbstractMaterialDataProvider.ORDER_HARVEST;
+
+public class MalachiteMaterial extends Material {
+ public MalachiteMaterial() {
+ super(
+ "malachite",
+ "Malachite",
+ new Description("A dark green gemstone that is said to protect against negative energy.", ""),
+ new ItemTag("forge", "gems/malachite"),
+ null,
+ 2,
+ MaterialType.CRYSTAL,
+ ORDER_HARVEST + ORDER_COMPAT,
+ new MaterialColors(new Color(0, 117, 35)),
+ new MaterialStats(new HeadMaterialStats(640, 3, Tiers.NETHERITE, 6.1f), new HandleMaterialStats(1.3f, 1.5f, 1, 1), ExtraMaterialStats.DEFAULT),
+ Resources.getModifier("natureswrath"),
+ 750
+ );
+ }
+}
diff --git a/src/main/java/queengooborg/plusticreforged/materials/ManasteelMaterial.java b/src/main/java/queengooborg/plusticreforged/materials/ManasteelMaterial.java
new file mode 100644
index 00000000..b3d5da01
--- /dev/null
+++ b/src/main/java/queengooborg/plusticreforged/materials/ManasteelMaterial.java
@@ -0,0 +1,33 @@
+package queengooborg.plusticreforged.materials;
+
+import net.minecraft.world.item.Tiers;
+import queengooborg.plusticreforged.Resources;
+import queengooborg.plusticreforged.api.*;
+import slimeknights.tconstruct.tools.stats.ExtraMaterialStats;
+import slimeknights.tconstruct.tools.stats.HandleMaterialStats;
+import slimeknights.tconstruct.tools.stats.HeadMaterialStats;
+
+import java.awt.*;
+
+import static slimeknights.tconstruct.library.data.material.AbstractMaterialDataProvider.ORDER_COMPAT;
+import static slimeknights.tconstruct.library.data.material.AbstractMaterialDataProvider.ORDER_HARVEST;
+
+public class ManasteelMaterial extends Material {
+ public ManasteelMaterial() {
+ super(
+ "manasteel",
+ "Manasteel",
+ new Description("", ""),
+ new ItemTag("forge", "ingots/manasteel"),
+ null,
+ 2,
+ MaterialType.METAL,
+ ORDER_HARVEST + ORDER_COMPAT,
+ new MaterialColors(new Color(84, 229, 255)),
+ new MaterialStats(new HeadMaterialStats(540, 7, Tiers.NETHERITE, 6), new HandleMaterialStats(1.25f, 1, 1, 1), ExtraMaterialStats.DEFAULT),
+ Resources.getModifier("mana"),
+ 681
+ );
+ }
+}
+
diff --git a/src/main/java/queengooborg/plusticreforged/materials/PeridotMaterial.java b/src/main/java/queengooborg/plusticreforged/materials/PeridotMaterial.java
new file mode 100644
index 00000000..4c7e045c
--- /dev/null
+++ b/src/main/java/queengooborg/plusticreforged/materials/PeridotMaterial.java
@@ -0,0 +1,32 @@
+package queengooborg.plusticreforged.materials;
+
+import net.minecraft.world.item.Tiers;
+import queengooborg.plusticreforged.Resources;
+import queengooborg.plusticreforged.api.*;
+import slimeknights.tconstruct.tools.stats.ExtraMaterialStats;
+import slimeknights.tconstruct.tools.stats.HandleMaterialStats;
+import slimeknights.tconstruct.tools.stats.HeadMaterialStats;
+
+import java.awt.*;
+
+import static slimeknights.tconstruct.library.data.material.AbstractMaterialDataProvider.ORDER_COMPAT;
+import static slimeknights.tconstruct.library.data.material.AbstractMaterialDataProvider.ORDER_HARVEST;
+
+public class PeridotMaterial extends Material {
+ public PeridotMaterial() {
+ super(
+ "peridot",
+ "Peridot",
+ new Description("A green gemstone that vibrates with the energy of sunshine.", ""),
+ new ItemTag("forge", "gems/peridot"),
+ null,
+ 2,
+ MaterialType.CRYSTAL,
+ ORDER_HARVEST + ORDER_COMPAT,
+ new MaterialColors(new Color(50, 200, 50)),
+ new MaterialStats(new HeadMaterialStats(640, 4, Tiers.NETHERITE, 6.1f), new HandleMaterialStats(1.3f, 1, 1, 1.3f), ExtraMaterialStats.DEFAULT),
+ Resources.getModifier("naturesblessing"),
+ 750
+ );
+ }
+}
diff --git a/src/main/java/queengooborg/plusticreforged/materials/PhoenixiteMaterial.java b/src/main/java/queengooborg/plusticreforged/materials/PhoenixiteMaterial.java
new file mode 100644
index 00000000..359cdb7d
--- /dev/null
+++ b/src/main/java/queengooborg/plusticreforged/materials/PhoenixiteMaterial.java
@@ -0,0 +1,32 @@
+package queengooborg.plusticreforged.materials;
+
+import net.minecraft.world.item.Tiers;
+import queengooborg.plusticreforged.Resources;
+import queengooborg.plusticreforged.api.*;
+import slimeknights.tconstruct.tools.stats.ExtraMaterialStats;
+import slimeknights.tconstruct.tools.stats.HandleMaterialStats;
+import slimeknights.tconstruct.tools.stats.HeadMaterialStats;
+
+import java.awt.*;
+
+import static slimeknights.tconstruct.library.data.material.AbstractMaterialDataProvider.ORDER_COMPAT;
+import static slimeknights.tconstruct.library.data.material.AbstractMaterialDataProvider.ORDER_HARVEST;
+
+public class PhoenixiteMaterial extends Material {
+ public PhoenixiteMaterial() {
+ super(
+ "phoenixite",
+ "Phoenixite",
+ new Description("A fiery gemstone that is said to be reborn from its ashes.", ""),
+ new ItemTag("forge", "gems/phoenixite"),
+ null,
+ 2,
+ MaterialType.CRYSTAL,
+ ORDER_HARVEST + ORDER_COMPAT,
+ new MaterialColors(new Color(255, 69, 17)),
+ new MaterialStats(new HeadMaterialStats(1300, 9, Tiers.NETHERITE, 5), new HandleMaterialStats(1.4f, 1, 1, 1), ExtraMaterialStats.DEFAULT),
+ Resources.getModifier("fromtheashes"),
+ 750
+ );
+ }
+}
diff --git a/src/main/java/queengooborg/plusticreforged/materials/PsigemMaterial.java b/src/main/java/queengooborg/plusticreforged/materials/PsigemMaterial.java
new file mode 100644
index 00000000..bd82be2b
--- /dev/null
+++ b/src/main/java/queengooborg/plusticreforged/materials/PsigemMaterial.java
@@ -0,0 +1,32 @@
+package queengooborg.plusticreforged.materials;
+
+import net.minecraft.world.item.Tiers;
+import queengooborg.plusticreforged.Resources;
+import queengooborg.plusticreforged.api.*;
+import slimeknights.tconstruct.tools.stats.ExtraMaterialStats;
+import slimeknights.tconstruct.tools.stats.HandleMaterialStats;
+import slimeknights.tconstruct.tools.stats.HeadMaterialStats;
+
+import java.awt.*;
+
+import static slimeknights.tconstruct.library.data.material.AbstractMaterialDataProvider.ORDER_COMPAT;
+import static slimeknights.tconstruct.library.data.material.AbstractMaterialDataProvider.ORDER_HARVEST;
+
+public class PsigemMaterial extends Material {
+ public PsigemMaterial() {
+ super(
+ "psigem",
+ "Psigem",
+ new Description("A gemstone that resonates with psionic energy.", ""),
+ new ItemTag("forge", "gems/psigem"),
+ null,
+ 2,
+ MaterialType.CRYSTAL,
+ ORDER_HARVEST + ORDER_COMPAT,
+ new MaterialColors(new Color(8, 67, 163)),
+ new MaterialStats(new HeadMaterialStats(620, 7, Tiers.NETHERITE, 5), new HandleMaterialStats(1.3f, 1, 1, 1), ExtraMaterialStats.DEFAULT),
+ new Modifier[]{Resources.getModifier("psicological"), Resources.getModifier("portly")},
+ 750
+ );
+ }
+}
diff --git a/src/main/java/queengooborg/plusticreforged/materials/PsimetalMaterial.java b/src/main/java/queengooborg/plusticreforged/materials/PsimetalMaterial.java
new file mode 100644
index 00000000..60903715
--- /dev/null
+++ b/src/main/java/queengooborg/plusticreforged/materials/PsimetalMaterial.java
@@ -0,0 +1,32 @@
+package queengooborg.plusticreforged.materials;
+
+import net.minecraft.world.item.Tiers;
+import queengooborg.plusticreforged.Resources;
+import queengooborg.plusticreforged.api.*;
+import slimeknights.tconstruct.tools.stats.ExtraMaterialStats;
+import slimeknights.tconstruct.tools.stats.HandleMaterialStats;
+import slimeknights.tconstruct.tools.stats.HeadMaterialStats;
+
+import java.awt.*;
+
+import static slimeknights.tconstruct.library.data.material.AbstractMaterialDataProvider.ORDER_COMPAT;
+import static slimeknights.tconstruct.library.data.material.AbstractMaterialDataProvider.ORDER_HARVEST;
+
+public class PsimetalMaterial extends Material {
+ public PsimetalMaterial() {
+ super(
+ "psimetal",
+ "Psimetal",
+ new Description("A metal infused with psionic energy.", ""),
+ new ItemTag("forge", "ingots/psimetal"),
+ null,
+ 2,
+ MaterialType.METAL,
+ ORDER_HARVEST + ORDER_COMPAT,
+ new MaterialColors(new Color(109, 158, 255)),
+ new MaterialStats(new HeadMaterialStats(620, 7, Tiers.NETHERITE, 5), new HandleMaterialStats(1.3f, 1, 1, 1), ExtraMaterialStats.DEFAULT),
+ new Modifier[]{Resources.getModifier("psicological"), Resources.getModifier("global")},
+ 696
+ );
+ }
+}
diff --git a/src/main/java/queengooborg/plusticreforged/materials/RedMatterMaterial.java b/src/main/java/queengooborg/plusticreforged/materials/RedMatterMaterial.java
new file mode 100644
index 00000000..f5d192e2
--- /dev/null
+++ b/src/main/java/queengooborg/plusticreforged/materials/RedMatterMaterial.java
@@ -0,0 +1,32 @@
+package queengooborg.plusticreforged.materials;
+
+import net.minecraft.world.item.Tiers;
+import queengooborg.plusticreforged.Resources;
+import queengooborg.plusticreforged.api.*;
+import slimeknights.tconstruct.tools.stats.ExtraMaterialStats;
+import slimeknights.tconstruct.tools.stats.HandleMaterialStats;
+import slimeknights.tconstruct.tools.stats.HeadMaterialStats;
+
+import java.awt.*;
+
+import static slimeknights.tconstruct.library.data.material.AbstractMaterialDataProvider.ORDER_COMPAT;
+import static slimeknights.tconstruct.library.data.material.AbstractMaterialDataProvider.ORDER_HARVEST;
+
+public class RedMatterMaterial extends Material {
+ public RedMatterMaterial() {
+ super(
+ "red_matter",
+ "Red Matter",
+ new Description("A very powerful material...and far more dangerous than Dark Matter.", ""),
+ new ItemID("projecte", "red_matter"),
+ null,
+ 5,
+ MaterialType.CRYSTAL,
+ ORDER_HARVEST + ORDER_COMPAT,
+ new MaterialColors(new Color(227, 0, 0)),
+ new MaterialStats(new HeadMaterialStats(2017, 14, Tiers.NETHERITE, 15), new HandleMaterialStats(2, 1.5f, 1.3f, 1.7f), ExtraMaterialStats.DEFAULT),
+ Resources.getModifier("unstable_matter"),
+ 1100
+ );
+ }
+}
diff --git a/src/main/java/queengooborg/plusticreforged/materials/RubyMaterial.java b/src/main/java/queengooborg/plusticreforged/materials/RubyMaterial.java
new file mode 100644
index 00000000..479731f8
--- /dev/null
+++ b/src/main/java/queengooborg/plusticreforged/materials/RubyMaterial.java
@@ -0,0 +1,32 @@
+package queengooborg.plusticreforged.materials;
+
+import net.minecraft.world.item.Tiers;
+import queengooborg.plusticreforged.Resources;
+import queengooborg.plusticreforged.api.*;
+import slimeknights.tconstruct.tools.stats.ExtraMaterialStats;
+import slimeknights.tconstruct.tools.stats.HandleMaterialStats;
+import slimeknights.tconstruct.tools.stats.HeadMaterialStats;
+
+import java.awt.*;
+
+import static slimeknights.tconstruct.library.data.material.AbstractMaterialDataProvider.ORDER_COMPAT;
+import static slimeknights.tconstruct.library.data.material.AbstractMaterialDataProvider.ORDER_HARVEST;
+
+public class RubyMaterial extends Material {
+ public RubyMaterial() {
+ super(
+ "ruby",
+ "Ruby",
+ new Description("A red gemstone that is said to increase the owner's vitality.", ""),
+ new ItemTag("forge", "gems/ruby"),
+ null,
+ 2,
+ MaterialType.CRYSTAL,
+ ORDER_HARVEST + ORDER_COMPAT,
+ new MaterialColors(new Color(200, 1, 1)),
+ new MaterialStats(new HeadMaterialStats(660, 4.6f, Tiers.NETHERITE, 6.4f), new HandleMaterialStats(1.2f, 1.2f, 1, 1.4f), ExtraMaterialStats.DEFAULT),
+ Resources.getModifier("bloodymary"), // new Modifier[]{Resources.getModifier("bloodymary"), TinkerModifiers.sharpness.get()},
+ 750
+ );
+ }
+}
diff --git a/src/main/java/queengooborg/plusticreforged/materials/SapphireMaterial.java b/src/main/java/queengooborg/plusticreforged/materials/SapphireMaterial.java
new file mode 100644
index 00000000..1daca8e5
--- /dev/null
+++ b/src/main/java/queengooborg/plusticreforged/materials/SapphireMaterial.java
@@ -0,0 +1,31 @@
+package queengooborg.plusticreforged.materials;
+
+import net.minecraft.world.item.Tiers;
+import queengooborg.plusticreforged.api.*;
+import slimeknights.tconstruct.tools.stats.ExtraMaterialStats;
+import slimeknights.tconstruct.tools.stats.HandleMaterialStats;
+import slimeknights.tconstruct.tools.stats.HeadMaterialStats;
+
+import java.awt.*;
+
+import static slimeknights.tconstruct.library.data.material.AbstractMaterialDataProvider.ORDER_COMPAT;
+import static slimeknights.tconstruct.library.data.material.AbstractMaterialDataProvider.ORDER_HARVEST;
+
+public class SapphireMaterial extends Material {
+ public SapphireMaterial() {
+ super(
+ "sapphire",
+ "Sapphire",
+ new Description("A blue gemstone that is said improve the owner's focus.", ""),
+ new ItemTag("forge", "gems/sapphire"),
+ null,
+ 2,
+ MaterialType.CRYSTAL,
+ ORDER_HARVEST + ORDER_COMPAT,
+ new MaterialColors(new Color(1, 1, 200)),
+ new MaterialStats(new HeadMaterialStats(700, 5, Tiers.NETHERITE, 6.4f), HandleMaterialStats.DEFAULT, ExtraMaterialStats.DEFAULT),
+ new Modifier[]{}, // TinkerModifiers.aquaaffinity.get(),
+ 750
+ );
+ }
+}
diff --git a/src/main/java/queengooborg/plusticreforged/materials/TNTMaterial.java b/src/main/java/queengooborg/plusticreforged/materials/TNTMaterial.java
new file mode 100644
index 00000000..faed1df2
--- /dev/null
+++ b/src/main/java/queengooborg/plusticreforged/materials/TNTMaterial.java
@@ -0,0 +1,31 @@
+package queengooborg.plusticreforged.materials;
+
+import queengooborg.plusticreforged.Resources;
+import queengooborg.plusticreforged.api.*;
+import slimeknights.tconstruct.tools.stats.ExtraMaterialStats;
+import slimeknights.tconstruct.tools.stats.HandleMaterialStats;
+import slimeknights.tconstruct.tools.stats.HeadMaterialStats;
+
+import java.awt.*;
+
+import static slimeknights.tconstruct.library.data.material.AbstractMaterialDataProvider.ORDER_COMPAT;
+import static slimeknights.tconstruct.library.data.material.AbstractMaterialDataProvider.ORDER_HARVEST;
+
+public class TNTMaterial extends Material {
+ public TNTMaterial() {
+ super(
+ "tnt",
+ "TNT",
+ new Description("A band once wrote a song about it, but I don't remember the lyrics...", ""),
+ new ItemID("minecraft", "tnt"),
+ null,
+ 4,
+ MaterialType.STONE,
+ ORDER_HARVEST + ORDER_COMPAT,
+ new MaterialColors(new Color(255, 79, 79), 0, new Color(17, 17, 29), new Color(85, 85, 85), null, null, null, null),
+ new MaterialStats(HeadMaterialStats.DEFAULT, HandleMaterialStats.DEFAULT, ExtraMaterialStats.DEFAULT),
+ Resources.getModifier("explosive"),
+ 300
+ );
+ }
+}
diff --git a/src/main/java/queengooborg/plusticreforged/materials/TerrasteelMaterial.java b/src/main/java/queengooborg/plusticreforged/materials/TerrasteelMaterial.java
new file mode 100644
index 00000000..1b078c77
--- /dev/null
+++ b/src/main/java/queengooborg/plusticreforged/materials/TerrasteelMaterial.java
@@ -0,0 +1,32 @@
+package queengooborg.plusticreforged.materials;
+
+import net.minecraft.world.item.Tiers;
+import queengooborg.plusticreforged.Resources;
+import queengooborg.plusticreforged.api.*;
+import slimeknights.tconstruct.tools.stats.ExtraMaterialStats;
+import slimeknights.tconstruct.tools.stats.HandleMaterialStats;
+import slimeknights.tconstruct.tools.stats.HeadMaterialStats;
+
+import java.awt.*;
+
+import static slimeknights.tconstruct.library.data.material.AbstractMaterialDataProvider.ORDER_COMPAT;
+import static slimeknights.tconstruct.library.data.material.AbstractMaterialDataProvider.ORDER_HARVEST;
+
+public class TerrasteelMaterial extends Material {
+ public TerrasteelMaterial() {
+ super(
+ "terrasteel",
+ "Terrasteel",
+ new Description("", ""),
+ new ItemTag("forge", "ingots/terrasteel"),
+ null,
+ 2,
+ MaterialType.METAL,
+ ORDER_HARVEST + ORDER_COMPAT,
+ new MaterialColors(new Color(0, 255, 0)),
+ new MaterialStats(new HeadMaterialStats(1562, 9, Tiers.NETHERITE, 6.5f), new HandleMaterialStats(1.4f, 1, 1, 1), ExtraMaterialStats.DEFAULT),
+ new Modifier[]{Resources.getModifier("mana"), Resources.getModifier("terrafirma")},
+ 760
+ );
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/queengooborg/plusticreforged/materials/TopazMaterial.java b/src/main/java/queengooborg/plusticreforged/materials/TopazMaterial.java
new file mode 100644
index 00000000..f8bf4b36
--- /dev/null
+++ b/src/main/java/queengooborg/plusticreforged/materials/TopazMaterial.java
@@ -0,0 +1,32 @@
+package queengooborg.plusticreforged.materials;
+
+import net.minecraft.world.item.Tiers;
+import queengooborg.plusticreforged.Resources;
+import queengooborg.plusticreforged.api.*;
+import slimeknights.tconstruct.tools.stats.ExtraMaterialStats;
+import slimeknights.tconstruct.tools.stats.HandleMaterialStats;
+import slimeknights.tconstruct.tools.stats.HeadMaterialStats;
+
+import java.awt.*;
+
+import static slimeknights.tconstruct.library.data.material.AbstractMaterialDataProvider.ORDER_COMPAT;
+import static slimeknights.tconstruct.library.data.material.AbstractMaterialDataProvider.ORDER_HARVEST;
+
+public class TopazMaterial extends Material {
+ public TopazMaterial() {
+ super(
+ "topaz",
+ "Topaz",
+ new Description("Golden topaz, a gemstone that helps channel the power of manifestation.", ""),
+ new ItemTag("forge", "gems/topaz"),
+ null,
+ 2,
+ MaterialType.CRYSTAL,
+ ORDER_HARVEST + ORDER_COMPAT,
+ new MaterialColors(new Color(255, 255, 0)),
+ new MaterialStats(new HeadMaterialStats(690, 6, Tiers.NETHERITE, 6), new HandleMaterialStats(0.8f, 1, 1, 1), ExtraMaterialStats.DEFAULT),
+ Resources.getModifier("naturespower"),
+ 750
+ );
+ }
+}
diff --git a/src/main/java/queengooborg/plusticreforged/modifiers/ApocalypseModifier.java b/src/main/java/queengooborg/plusticreforged/modifiers/ApocalypseModifier.java
new file mode 100644
index 00000000..1fa8f735
--- /dev/null
+++ b/src/main/java/queengooborg/plusticreforged/modifiers/ApocalypseModifier.java
@@ -0,0 +1,32 @@
+package queengooborg.plusticreforged.modifiers;
+
+import net.minecraft.world.effect.MobEffectInstance;
+import net.minecraft.world.effect.MobEffects;
+import net.minecraft.world.entity.LivingEntity;
+import queengooborg.plusticreforged.api.Description;
+import queengooborg.plusticreforged.api.Modifier;
+import slimeknights.tconstruct.library.tools.context.ToolAttackContext;
+import slimeknights.tconstruct.library.tools.nbt.IToolStackView;
+
+import java.awt.*;
+
+public class ApocalypseModifier extends Modifier {
+ public ApocalypseModifier() {
+ super("apocalypse", "Apocalypse", new Description("The end times...", "Your victim becomes moribund and is afflicted with increasing levels of Wither."), new Color(58, 45, 125));
+ this.usable = true;
+ }
+
+ @Override
+ public int afterEntityHit(IToolStackView tool, int level, ToolAttackContext context, float damageDealt) {
+ LivingEntity target = context.getLivingTarget();
+ if (target.isAlive()) {
+ int amp = -1;
+ MobEffectInstance potionEffect = target.getActiveEffectsMap().get(MobEffects.WITHER);
+ if (potionEffect != null) amp = potionEffect.getAmplifier();
+ amp = Math.min(3, amp + 1);
+ target.addEffect(new MobEffectInstance(MobEffects.WITHER, 130, amp));
+ }
+
+ return 0;
+ }
+}
diff --git a/src/main/java/queengooborg/plusticreforged/modifiers/BloodyMaryModifier.java b/src/main/java/queengooborg/plusticreforged/modifiers/BloodyMaryModifier.java
new file mode 100644
index 00000000..4d32a7cb
--- /dev/null
+++ b/src/main/java/queengooborg/plusticreforged/modifiers/BloodyMaryModifier.java
@@ -0,0 +1,43 @@
+package queengooborg.plusticreforged.modifiers;
+
+import net.minecraft.world.entity.Entity;
+import net.minecraft.world.entity.item.ItemEntity;
+import net.minecraft.world.item.ItemStack;
+import net.minecraft.world.level.Level;
+import queengooborg.plusticreforged.api.Description;
+import queengooborg.plusticreforged.api.Modifier;
+import slimeknights.tconstruct.library.tools.context.ToolAttackContext;
+import slimeknights.tconstruct.library.tools.nbt.IToolStackView;
+import slimeknights.tconstruct.shared.TinkerCommons;
+import slimeknights.tconstruct.shared.block.SlimeType;
+
+import java.awt.*;
+import java.util.Random;
+
+public class BloodyMaryModifier extends Modifier {
+ private Random random;
+
+ public BloodyMaryModifier() {
+ super("bloodymary", "Bloody Mary", new Description("Brought to you by the legendary Queen of England...", "Deals bonus damage depending on the amount of health already lost by the target. Also, a chance to drop a Coagulated Blood for each hit."), new Color(255, 0, 0));
+ this.usable = true;
+ }
+
+ @Override
+ public float getEntityDamage(IToolStackView tool, int level, ToolAttackContext context, float baseDamage, float damage) {
+ return (float) (damage + Math.pow(context.getLivingTarget().getMaxHealth() - context.getLivingTarget().getHealth(), 0.6));
+ }
+
+ @Override
+ public int afterEntityHit(IToolStackView tool, int level, ToolAttackContext context, float damageDealt) {
+ Entity target = context.getTarget();
+ spillBlood(target.level, target.getX(), target.getY(), target.getZ(), 0.23f);
+ return 0;
+ }
+
+ protected void spillBlood(Level level, double x, double y, double z, float chance) {
+ if (random.nextFloat() >= chance) {
+ ItemEntity entity = new ItemEntity(level, x, y, z, new ItemStack(TinkerCommons.slimeball.get(SlimeType.BLOOD)));
+ level.addFreshEntity(entity);
+ }
+ }
+}
diff --git a/src/main/java/queengooborg/plusticreforged/modifiers/DarkTravelerModifier.java b/src/main/java/queengooborg/plusticreforged/modifiers/DarkTravelerModifier.java
new file mode 100644
index 00000000..55060527
--- /dev/null
+++ b/src/main/java/queengooborg/plusticreforged/modifiers/DarkTravelerModifier.java
@@ -0,0 +1,40 @@
+package queengooborg.plusticreforged.modifiers;
+
+import net.minecraft.world.damagesource.EntityDamageSource;
+import net.minecraft.world.entity.LivingEntity;
+import net.minecraft.world.entity.Mob;
+import queengooborg.plusticreforged.api.Description;
+import queengooborg.plusticreforged.api.Modifier;
+import slimeknights.tconstruct.library.tools.context.ToolAttackContext;
+import slimeknights.tconstruct.library.tools.nbt.IToolStackView;
+
+import java.awt.*;
+import java.util.List;
+import java.util.Random;
+
+public class DarkTravelerModifier extends Modifier {
+ Random random = new Random();
+
+ public DarkTravelerModifier() {
+ super("dark_traveler", "Dark Traveler", new Description("Surrounding mobs get randomly afflicted with damage."), new Color(39, 1, 51));
+ this.usable = true;
+ }
+
+ @Override
+ public int afterEntityHit(IToolStackView tool, int level, ToolAttackContext context, float damageDealt) {
+ if (random.nextFloat() < 0.035f && tool.getCurrentDurability() >= 1) {
+ List lst = context.getPlayerAttacker().level.getEntitiesOfClass(LivingEntity.class, context.getTarget().getBoundingBox().inflate(8, 8, 8), ent -> ent instanceof Mob && ent != context.getPlayerAttacker());
+
+ if (lst.isEmpty()) {
+ return 0;
+ }
+
+ LivingEntity target = lst.get(random.nextInt(lst.size()));
+ target.hurt(new EntityDamageSource("darktraveler", target), 2f + random.nextFloat() * 2.5f);
+ return 1;
+ }
+
+
+ return 0;
+ }
+}
diff --git a/src/main/java/queengooborg/plusticreforged/modifiers/ElementalModifier.java b/src/main/java/queengooborg/plusticreforged/modifiers/ElementalModifier.java
new file mode 100644
index 00000000..846ed845
--- /dev/null
+++ b/src/main/java/queengooborg/plusticreforged/modifiers/ElementalModifier.java
@@ -0,0 +1,71 @@
+package queengooborg.plusticreforged.modifiers;
+
+//import net.minecraft.entity.LivingEntity;
+//import net.minecraft.world.Explosion;
+import queengooborg.plusticreforged.api.Description;
+import queengooborg.plusticreforged.api.Modifier;
+//import slimeknights.tconstruct.library.tools.context.ToolAttackContext;
+//import slimeknights.tconstruct.library.tools.nbt.IModifierToolStack;
+
+import java.awt.*;
+
+public class ElementalModifier extends Modifier {
+ public ElementalModifier() {
+ super("elemental", "Elemental", new Description("When gravity-affected blocks are destroyed, break all blocks of the same type above and below. Also, a chance to gain various benefits from a successful attack."), new Color(246, 106, 253));
+ }
+}
+
+// @Override
+// public void beforeBlockBreak(ItemStack tool, BlockEvent.BreakEvent event) {
+// destroyColumn(tool, event.getWorld(), event.getState(), event.getPos(), event.getPlayer());
+// }
+//
+// private void destroyColumn(ItemStack tool, World world, IBlockState state, BlockPos pos, EntityPlayer player) {
+// if (!world.isRemote && state.getBlock() instanceof BlockFalling && tool.canHarvestBlock(state)) {
+// BlockPos posUp = pos, posDown = pos;
+// while (world.getBlockState(posUp = posUp.add(0, 1, 0)).getBlock() == state.getBlock())
+// ; // nothing to do
+// while (world.getBlockState(posDown = posDown.add(0, -1, 0)).getBlock() == state.getBlock())
+// ; // nothing to do
+// while (!(posUp = posUp.add(0, -1, 0)).equals(posDown)) {
+// if (posUp.equals(pos)) continue;
+// if (EnchantmentHelper.getEnchantmentLevel(Enchantments.SILK_TOUCH, tool) > 0 && state.getBlock().canSilkHarvest(world, posUp, state, player)) {
+// world.destroyBlock(posUp, false);
+// if (!player.capabilities.isCreativeMode) {
+// EntityItem ie = new EntityItem(world, posUp.getX(), posUp.getY(), posUp.getZ(), new ItemStack(Item.getItemFromBlock(state.getBlock())));
+// world.spawnEntity(ie);
+// }
+// } else {
+// world.destroyBlock(posUp, false);
+// if (!player.capabilities.isCreativeMode) {
+// state.getBlock().dropBlockAsItem(world, posUp, state, EnchantmentHelper.getEnchantmentLevel(Enchantments.FORTUNE, tool));
+// }
+// }
+// }
+// }
+// }
+//
+// @Override
+// public void afterHit(ItemStack tool, EntityLivingBase player, EntityLivingBase target, float damageDealt, boolean wasCritical, boolean wasHit) {
+// if (wasHit && random.nextFloat() < 0.22f) {
+// int rand = random.nextInt(4);
+// switch (rand) {
+// case 0: // Water
+// player.addPotionEffect(new PotionEffect(MobEffects.ABSORPTION, 80));
+// player.addPotionEffect(new PotionEffect(MobEffects.WATER_BREATHING, 1200));
+// break;
+// case 1: // Wind
+// player.addPotionEffect(new PotionEffect(MobEffects.SPEED, 80));
+// player.addPotionEffect(new PotionEffect(MobEffects.JUMP_BOOST, 80));
+// break;
+// case 2: // Earth
+// player.addPotionEffect(new PotionEffect(MobEffects.STRENGTH, 80));
+// player.addPotionEffect(new PotionEffect(MobEffects.SATURATION, 80));
+// break;
+// case 3: // Fire
+// player.addPotionEffect(new PotionEffect(MobEffects.FIRE_RESISTANCE, 80));
+// player.addPotionEffect(new PotionEffect(MobEffects.REGENERATION, 80));
+// break;
+// }
+// }
+// }
diff --git a/src/main/java/queengooborg/plusticreforged/modifiers/ExplosiveModifier.java b/src/main/java/queengooborg/plusticreforged/modifiers/ExplosiveModifier.java
new file mode 100644
index 00000000..ff99e8ce
--- /dev/null
+++ b/src/main/java/queengooborg/plusticreforged/modifiers/ExplosiveModifier.java
@@ -0,0 +1,28 @@
+package queengooborg.plusticreforged.modifiers;
+
+import net.minecraft.world.entity.LivingEntity;
+import net.minecraft.world.level.Explosion;
+import queengooborg.plusticreforged.api.Description;
+import queengooborg.plusticreforged.api.Modifier;
+import slimeknights.tconstruct.library.tools.context.ToolAttackContext;
+import slimeknights.tconstruct.library.tools.nbt.IToolStackView;
+
+import java.awt.*;
+
+public class ExplosiveModifier extends Modifier {
+ public ExplosiveModifier() {
+ super("explosive", "Explosive", new Description("As the name implies, an explosion is created when the tool is used."), new Color(255, 79, 79));
+ this.usable = true;
+ }
+
+ @Override
+ public int afterEntityHit(IToolStackView tool, int level, ToolAttackContext context, float damageDealt) {
+ LivingEntity target = context.getLivingTarget();
+
+ if (target != null) {
+ target.level.explode(context.getLivingTarget(), context.getLivingTarget().getX(), context.getLivingTarget().getY(), context.getLivingTarget().getZ(), 0.5f, false, Explosion.BlockInteraction.NONE);
+ }
+
+ return 0;
+ }
+}
diff --git a/src/main/java/queengooborg/plusticreforged/modifiers/FromTheAshesModifier.java b/src/main/java/queengooborg/plusticreforged/modifiers/FromTheAshesModifier.java
new file mode 100644
index 00000000..08ae0223
--- /dev/null
+++ b/src/main/java/queengooborg/plusticreforged/modifiers/FromTheAshesModifier.java
@@ -0,0 +1,27 @@
+package queengooborg.plusticreforged.modifiers;
+
+import queengooborg.plusticreforged.api.Description;
+import queengooborg.plusticreforged.api.Modifier;
+
+import java.awt.*;
+
+public class FromTheAshesModifier extends Modifier {
+ public FromTheAshesModifier() {
+ super("fromtheashes", "From the Ashes", new Description("Like the legend of the phoenix...", "Press the \"set portal\" key (default \"N\") to set a virtual portal on the block you are pointing at. If you are on the brink of death, you have %d phoenixite gems to spare, and the portal has enough space above, then the gems are consumed, you are teleported to the virtual portal, and you are spared. (The tool must be in your hand.)"), new Color(255, 69, 17));
+ }
+
+ // XXX Convert me!
+
+ // public class GetLucky extends DeathSaveTrait {
+ // public static final GetLucky getlucky = new GetLucky();
+ //
+ // public GetLucky() {
+ // // super(String identifier, int color, int cost, Predicate stackMatcher, String unlocSaveMessage)
+ // super("getlucky", 0xFF4511, 8,
+ // stack -> !stack.isEmpty()
+ // && ArrayUtils.contains(OreDictionary.getOreIDs(stack), OreDictionary.getOreID("gemPhoenixite")),
+ // "msg.plustic.getlucky.use");
+ // // MSG: "I'm up all night to get lucky!"
+ // }
+ //}
+}
diff --git a/src/main/java/queengooborg/plusticreforged/modifiers/GlobalModifier.java b/src/main/java/queengooborg/plusticreforged/modifiers/GlobalModifier.java
new file mode 100644
index 00000000..0b5abf3d
--- /dev/null
+++ b/src/main/java/queengooborg/plusticreforged/modifiers/GlobalModifier.java
@@ -0,0 +1,195 @@
+package queengooborg.plusticreforged.modifiers;
+
+import queengooborg.plusticreforged.api.Description;
+import queengooborg.plusticreforged.api.Modifier;
+
+import java.awt.*;
+
+public class GlobalModifier extends Modifier {
+ public GlobalModifier() {
+ super("global", "Global", new Description("Around the world... and back.", "Crouch and use on a block in order for items from broken blocks and killed entities to get transported in there if it is an inventory."), new Color(255, 224, 241));
+ }
+
+ // XXX Convert me!
+
+// public static final Global global = new Global();
+//
+// private static final Set warnedBlocks = Collections.newSetFromMap(new WeakHashMap<>());
+//
+// public Global() {
+// super("global", 0xFFE0F1);
+// MinecraftForge.EVENT_BUS.register(this);
+// Toggle.addToggleable(identifier);
+// }
+//
+// @SubscribeEvent(priority = EventPriority.LOWEST)
+// public void blockDrops(BlockEvent.HarvestDropsEvent event) {
+// if (event.getWorld().isRemote
+// || event.getHarvester() == null) return;
+// ItemStack tool = DualToolHarvestUtils.getItemstackToUse(event.getHarvester(), event.getState());
+// if (!TinkerUtil.hasTrait(TagUtil.getTagSafe(tool), getIdentifier())) return;
+// __blockHarvestDrops(tool, event);
+// }
+// private void __blockHarvestDrops(ItemStack tool, BlockEvent.HarvestDropsEvent event) {
+// if (!Toggle.getToggleState(tool, identifier)) return;
+// NBTTagCompound nbt0 = TagUtil.getTagSafe(tool);
+// if (nbt0.hasKey("global", 10) && ToolHelper.isToolEffective2(tool, event.getState())) {
+// //System.out.println(event.getDrops());
+// //new Exception().printStackTrace();
+//
+// NBTTagCompound nbt = nbt0.getCompoundTag("global");
+// Coord4D coord = Coord4D.fromNBT(nbt);
+// if (coord.pos().equals(event.getPos())) return; // prevent self-linking
+// TileEntity te = coord.TE();
+// if (te == null) return;
+// IItemHandler ih = te.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY,
+// EnumFacing.VALUES[nbt.getByte("facing")]);
+// if (ih == null) return;
+//
+// // *cough* Extra Utilities *cough*
+// try {
+// ListIterator dummy = event.getDrops().listIterator();
+//
+// if (dummy.hasNext()) {
+// ItemStack is = dummy.next();
+// dummy.set(is); // This simply sets the 1st element of the list to itself, leaving the list unchanged. If the list is immutable, then this will throw an UnsupportedOperationException.
+// }
+// } catch (UnsupportedOperationException e) {
+// if (!warnedBlocks.contains(event.getState().getBlock())) {
+// FMLLog.bigWarning("Block "+event.getState().getBlock()+" implements block drops incorrectly. "
+// + "It appears that it overrides the OFFICIALLY DEPRECATED method "
+// + "getDrops(IBlockAccess, BlockPos, IBlockState, int) instead of the correct method "
+// + "getDrops(NonNullList, IBlockAccess, BlockPos, IBlockState, int). This prevents "
+// + "features such as PlusTiC's Global Traveler from working properly with these blocks.\n"
+// + "USERS: This is a BUG in the mod "+event.getState().getBlock().getRegistryName().getNamespace()+"; report this to them!");
+// warnedBlocks.add(event.getState().getBlock());
+// }
+//
+// return;
+// }
+//
+// ListIterator it = event.getDrops().listIterator();
+// ItemStack keptSeed = ItemStack.EMPTY;
+// while (it.hasNext()) {
+// ItemStack stk = it.next();
+// if (event.getWorld().rand.nextFloat() > event.getDropChance()) {
+// it.remove();
+// } else {
+// if (tool.getItem() instanceof Kama
+// && stk.getItem() instanceof IPlantable
+// && keptSeed.isEmpty()) {
+// keptSeed = stk.splitStack(1);
+// }
+// }
+// }
+//
+// if (!(tool.getItem() instanceof Kama) || !keptSeed.isEmpty()) {
+// it = event.getDrops().listIterator();
+// while (it.hasNext()) {
+// ItemStack stk = it.next();
+// for (int j=0; j 0) return;
+// ItemStack weapon = getWeapon(event.getSource());
+// NBTTagCompound nbt0 = TagUtil.getTagSafe(weapon);
+// if (TinkerUtil.hasTrait(nbt0, getIdentifier())) {
+// if (!Toggle.getToggleState(weapon, identifier)) return;
+// if (nbt0.hasKey("global", 10)) {
+// NBTTagCompound nbt = nbt0.getCompoundTag("global");
+// Coord4D coord = Coord4D.fromNBT(nbt);
+// TileEntity te = coord.TE();
+// if (te == null) return;
+// IItemHandler ih = te.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY,
+// EnumFacing.VALUES[nbt.getByte("facing")]);
+// if (ih == null) return;
+// ListIterator it = event.getDrops().listIterator();
+// while (it.hasNext()) {
+// EntityItem enti = it.next();
+// ItemStack stk = enti.getItem();
+// for (int j=0; j