diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 00000000..a93aa5f9 --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,21 @@ + + + +## Version Information +`Minecraft: ` +`Forge: ` +`Iron Chests: ` + +## Report Information + + +## Steps to Reproduce + + +## Crash Log + + +## Forge Log + + + \ No newline at end of file diff --git a/.gitignore b/.gitignore index 8eef75cd..4d3e38c8 100755 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,12 @@ build/ .classpath .project +/*.launch .gradle/ eclipse/ bin/ repo/ +out/ /run/ .settings/ #IDEA files from Gradle @@ -12,3 +14,4 @@ repo/ /*.iml /*.ipr /*.iws +/generated \ No newline at end of file diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 00000000..25dace72 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,31 @@ +pipeline { + agent any + + stages { + stage('Checkout') { + steps { + checkout scm + sh "rm -rf build/libs" + } + } + + stage('Build') { + steps { + sh "./gradlew build -PBUILD_NUMBER=${env.BUILD_NUMBER} --no-daemon" + } + } + + stage('Archive') { + steps { + archive includes: 'build/libs/*.jar' + junit allowEmptyResults: true, testResults: 'build/test-results/**/*.xml' + } + } + + stage('Deploy') { + steps { + sh "./gradlew publishMavenJavaPublicationToMavenRepository -PBUILD_NUMBER=${env.BUILD_NUMBER} -PDEPLOY_DIR=${env.MAVEN_DEPLOY_DIR} --no-daemon" + } + } + } +} \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..f288702d --- /dev/null +++ b/LICENSE @@ -0,0 +1,674 @@ + 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 +. diff --git a/README.md b/README.md index 7c2d0e91..88e41a66 100755 --- a/README.md +++ b/README.md @@ -1,10 +1,18 @@ -ironchest -========= +Iron Chests [![Curseforge](http://cf.way2muchnoise.eu/full_iron-chests_downloads.svg)](https://minecraft.curseforge.com/projects/iron-chests) [![Curseforge](http://cf.way2muchnoise.eu/versions/For%20MC_iron-chests_all.svg)](https://minecraft.curseforge.com/projects/iron-chests) +=========== -Iron Chest minecraft mod +Iron Chests! A mod that adds new chests. -a GPL v3 licensed mod by cpw +Please note that the Shulker Boxes in 1.13+ have been moved to their own mod: [Iron Shulker Boxes](https://minecraft.curseforge.com/projects/iron-shulker-boxes) -Currently Maintained by ProgWML6 +For issues with the Shulker Boxes starting in 1.13+, Please report them to [Iron Shulker Boxes](https://github.com/progwml6/ironshulkerboxes) -See http://files.minecraftforge.net/IronChests2/ for downloads +## Setting up a Workspace/Compiling from Source +Note: Git MUST be installed and in the system path to use our scripts. +* Setup: Run [gradle]in the repository root: `gradlew[.bat] [eclipse] OR import build.gradle into idea` +* Build: Run [gradle]in the repository root: `gradlew[.bat] build` +* If obscure Gradle issues are found try running `gradlew clean` and `gradlew cleanCache` + +[![Discord](https://img.shields.io/discord/102860784329052160.svg?style=for-the-badge)](https://discord.gg/njGrvuh) + +If you have queries about any license or the other restrictions, please drop by our IRC channel, #progsmods on irc.esper.net diff --git a/build.gradle b/build.gradle index f9cac83c..cfca1f75 100755 --- a/build.gradle +++ b/build.gradle @@ -1,159 +1,159 @@ -// This sets us up for building a forge project - you need all of these buildscript { repositories { + mavenLocal() + maven { url = 'https://files.minecraftforge.net/maven' } jcenter() - maven { - name = "forge" - url = "http://files.minecraftforge.net/maven" - } + mavenCentral() } dependencies { - classpath 'net.minecraftforge.gradle:ForgeGradle:2.1-SNAPSHOT' + classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true } } -apply plugin: 'net.minecraftforge.gradle.forge' + +apply plugin: 'net.minecraftforge.gradle' apply plugin: 'maven' apply plugin: 'eclipse' -apply plugin: 'idea' +apply plugin: 'maven-publish' -// This is a simple flatdir repository for "uploadArchives" when you don't have a remote repo to target repositories { - flatDir { - name "fileRepo" - dirs "repo" + maven { + name 'DVS1 Maven FS' + url 'http://dvs1.progwml6.com/files/maven' } } -// IronChest uses git tagging to mark major versions. This sets up the project version to that version data -def versionInfo = getGitVersion() -version = "${versionInfo['IronChest.version']}" -// This is our group. I'm cpw.mods -group= "cpw.mods" // http://maven.apache.org/guides/mini/guide-naming-conventions.html -// This is our actual project within the group. Note: FML has "fml" here. But this is ironchest. -archivesBaseName = "ironchest" +group = "com.progwml6.ironchest" + +sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' -// Setup the forge minecraft plugin data. Specify the preferred forge/minecraft version here minecraft { - version = "1.8.9-11.15.0.1689" - mappings = "stable_20" - runDir = "run" -} + mappings channel: 'snapshot', version: mappings_version -// This wrangles the resources for the jar files- stuff like textures and languages -processResources -{ - // we're omitting the .xcf files - they're development only - exclude '**/*.xcf' - // we only want to do search/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' - } + accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') - // generate version.properties file from the git version data earlier - doLast { - def propsFile = new File(destinationDir, 'version.properties') - def properties = new Properties() - properties.putAll(versionInfo) - properties['IronChest.build.mcversion'] = project.minecraft.version - properties.store(propsFile.newWriter(), null) - } -} + runs { + client { + workingDirectory project.file('run') -// Configure an upload task. this is setup for uploading to files.minecraftforge.net. There are other examples around -uploadArchives { - repositories.mavenDeployer { + // Recommended logging data for a userdev environment + property 'forge.logging.markers', 'REGISTRIES,REGISTRYDUMP,CORE' - dependsOn 'build' + // Recommended logging level for the console + property 'forge.logging.console.level', 'debug' - if (project.hasProperty('forgeMavenPassword')) - { - repository(url: "http://files.minecraftforge.net/maven/manage/upload") { - authentication(userName: project.getProperty('forgeMavenUser'), password: project.getProperty('forgeMavenPassword')) // the elvis operator. look it up. + mods { + ironchest { + source sourceSets.main + } } } - else - { - // local repo folder. Might wanna juset use gradle install if you wanans end it to maven-local - repository(url: 'file://localhost/' + project.file('repo').getAbsolutePath()) - } - // This is just the pom data for the maven repo - pom { - groupId = project.group - // Force the maven upload to use the - syntax preferred at files - version = "${project.minecraft.version}-${project.version}" - artifactId = project.archivesBaseName - project { - name project.archivesBaseName - packaging 'jar' - description 'IronChest' - url 'https://github.com/progwml6/IronChest' - - scm { - url 'https://github.com/progwml6/IronChest' - connection 'scm:git:git://github.com/progwml6/IronChest.git' - developerConnection 'scm:git:git@github.com:progwml6/IronChest.git' - } - issueManagement { - system 'github' - url 'https://github.com/progwml6/IronChest/issues' - } + server { + workingDirectory project.file('run') - licenses { - license { - name 'GNU Public License (GPL), Version 3.0' - url 'http://www.gnu.org/licenses/gpl-3.0.txt' - distribution 'repo' - } + // Recommended logging data for a userdev environment + property 'forge.logging.markers', 'REGISTRIES,REGISTRYDUMP,CORE' + + // Recommended logging level for the console + property 'forge.logging.console.level', 'debug' + + mods { + ironchest { + source sourceSets.main } + } + } + + data { + workingDirectory project.file('run') + + // Recommended logging data for a userdev environment + property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP,CORE' - developers { - developer { - id 'cpw' - name 'cpw' - roles { role 'developer' } - } + // Recommended logging level for the console + property 'forge.logging.console.level', 'debug' + + args '--mod', 'ironchest', '--all', '--output', file('generated/resources/') + + mods { + ironchest { + source sourceSets.main } } } } } -// This is a special task for pulling the version information from git and the environment (for BUILD_NUMBER) -def getGitVersion() -{ - def out = [:] - - // call git command. - def outStream = new ByteArrayOutputStream() - def result = exec { - executable = 'git' - args = [ 'describe', '--long', "--match=[^(jenkins)]*"] - standardOutput = outStream - } - - def fullVersion = outStream.toString().trim() - def matcher = fullVersion =~ /(\d+).(\d+)-(\d+)-(.*)/ - - def maj = matcher[0][1] - def min = matcher[0][2] - def rev = matcher[0][3] - def bn = System.getenv("PROMOTED_NUMBER") ?: System.getenv("BUILD_NUMBER") ?: "1" - - out['IronChest.build.major.number'] = maj.toString() - out['IronChest.build.minor.number'] = min.toString() - out['IronChest.build.revision.number'] = rev.toString() - out['IronChest.build.githash'] = matcher[0][4].toString() - out['IronChest.build.number' ] = bn.toString() - out['IronChest.version' ] = "${maj}.${min}.${rev}.${bn}".toString() - - return out +dependencies { + minecraft 'net.minecraftforge:forge:' + minecraft_version + '-' + forge_version } + +task buildInfo { + def cmd = "git rev-parse --short HEAD" + def proc = cmd.execute() + proc.waitFor() + if (proc.exitValue() == 0) { + ext.revision = proc.text.trim() + } else { + ext.revision = "GITBORK" + } + + if (System.getenv().BUILD_NUMBER != null) { + ext.buildNum = System.getenv().BUILD_NUMBER + } else { + ext.buildNum = "DEV.${project.buildInfo.revision}" + } +} + +version = "${minecraft_version}-${mod_version}.${project.buildInfo.buildNum}" + +processResources { + exclude '**/*.xcf' + from(sourceSets.main.resources.srcDirs) { + include 'META-INF/mods.toml' + + expand 'version': project.version, 'mcversion': minecraft_version, 'forge_version': forge_version_toml + } + + from(sourceSets.main.resources.srcDirs) { + exclude 'META-INF/mods.toml' + } +} + +task sourcesJar(type: Jar) { + from sourceSets.main.allJava + classifier = 'sources' +} + +artifacts { + archives sourcesJar +} + +jar { + manifest { + attributes([ + "Specification-Title" : "Iron Chests", + "Specification-Vendor" : "Progwml6", + "Specification-Version" : "1", // We are version 1 of ourselves + "Implementation-Title" : project.name, + "Implementation-Version" : "${version}", + "Implementation-Vendor" : "Progwml6", + "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ") + ]) + } +} + +publishing { + publications { + mavenJava(MavenPublication) { + artifact jar + artifact sourcesJar + } + } + + repositories { + if (project.hasProperty('DEPLOY_DIR')) { + maven { url DEPLOY_DIR } + } + } +} \ No newline at end of file diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 00000000..e305c9b4 --- /dev/null +++ b/gradle.properties @@ -0,0 +1,18 @@ +# 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 + +# Mod Version Information +mod_version=10.0 + +# Minecraft Version Information +minecraft_version=1.15.2 +minecraft_version_toml=15 + +# Forge Version Information +forge_version=31.1.17 +forge_version_toml=31 + +# Mappings Information +mappings_version=20200226-1.15.1 \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index b5166dad..7a3265ee 100755 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 92011764..949819d2 100755 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,5 @@ -#Sun Nov 22 23:58:08 EST 2015 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.7-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-bin.zip diff --git a/gradlew b/gradlew index 91a7e269..cccdd3d5 100755 --- a/gradlew +++ b/gradlew @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env sh ############################################################################## ## @@ -6,20 +6,38 @@ ## ############################################################################## -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null APP_NAME="Gradle" APP_BASE_NAME=`basename "$0"` +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD="maximum" -warn ( ) { +warn () { echo "$*" } -die ( ) { +die () { echo echo "$*" echo @@ -30,6 +48,7 @@ die ( ) { cygwin=false msys=false darwin=false +nonstop=false case "`uname`" in CYGWIN* ) cygwin=true @@ -40,31 +59,11 @@ case "`uname`" in MINGW* ) msys=true ;; + NONSTOP* ) + nonstop=true + ;; esac -# For Cygwin, ensure paths are in UNIX format before anything is touched. -if $cygwin ; then - [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` -fi - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >&- -APP_HOME="`pwd -P`" -cd "$SAVED" >&- - CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar # Determine the Java command to use to start the JVM. @@ -90,7 +89,7 @@ location of your Java installation." fi # Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then +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 @@ -114,6 +113,7 @@ fi 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` @@ -154,11 +154,19 @@ if $cygwin ; then esac fi -# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules -function splitJvmOpts() { - JVM_OPTS=("$@") +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " } -eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS -JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" +APP_ARGS=$(save "$@") + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong +if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then + cd "$(dirname "$0")" +fi -exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat index aec99730..e95643d6 100755 --- a/gradlew.bat +++ b/gradlew.bat @@ -8,14 +8,14 @@ @rem Set local scope for the variables with windows NT shell if "%OS%"=="Windows_NT" setlocal -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - set DIRNAME=%~dp0 if "%DIRNAME%" == "" set DIRNAME=. set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + @rem Find java.exe if defined JAVA_HOME goto findJavaFromJavaHome @@ -46,10 +46,9 @@ echo location of your Java installation. goto fail :init -@rem Get command-line arguments, handling Windowz variants +@rem Get command-line arguments, handling Windows variants if not "%OS%" == "Windows_NT" goto win9xME_args -if "%@eval[2+2]" == "4" goto 4NT_args :win9xME_args @rem Slurp the command line arguments. @@ -60,11 +59,6 @@ set _SKIP=2 if "x%~1" == "x" goto execute set CMD_LINE_ARGS=%* -goto execute - -:4NT_args -@rem Get arguments from the 4NT Shell from JP Software -set CMD_LINE_ARGS=%$ :execute @rem Setup the command line diff --git a/idea/code_style.xml b/idea/code_style.xml new file mode 100644 index 00000000..f41a69b4 --- /dev/null +++ b/idea/code_style.xml @@ -0,0 +1,59 @@ + + diff --git a/idea/inspections.xml b/idea/inspections.xml new file mode 100644 index 00000000..59b8f39d --- /dev/null +++ b/idea/inspections.xml @@ -0,0 +1,31 @@ + + + + \ No newline at end of file diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 00000000..4ab6f512 --- /dev/null +++ b/settings.gradle @@ -0,0 +1,19 @@ +/* + * This settings file was auto generated by the Gradle buildInit task + * by 'sunstrike' at '21/11/13 14:14' with Gradle 1.9 + * + * The settings file is used to specify which projects to include in your build. + * In a single project build this file can be empty or even removed. + * + * Detailed information about configuring a multi-project build in Gradle can be found + * in the user guide at http://gradle.org/docs/1.9/userguide/multi_project_builds.html + */ + +/* +// To declare projects as part of a multi-project build use the 'include' method +include 'shared' +include 'api' +include 'services:webservice' +*/ + +rootProject.name = 'ironchest' diff --git a/src/api/java/invtweaks/api/container/ChestContainer.java b/src/api/java/invtweaks/api/container/ChestContainer.java old mode 100755 new mode 100644 index dc273777..e148569b --- a/src/api/java/invtweaks/api/container/ChestContainer.java +++ b/src/api/java/invtweaks/api/container/ChestContainer.java @@ -6,12 +6,13 @@ import java.lang.annotation.Target; /** - * A marker for containers that have a chest-like persistant storage component. Enables the Inventroy Tweaks sorting + * A marker for containers that have a chest-like persistent storage component. Enables the Inventory Tweaks sorting * buttons for this container. */ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE) -public @interface ChestContainer { +public @interface ChestContainer +{ // Set to true if the Inventory Tweaks sorting buttons should be shown for this container. boolean showButtons() default true; @@ -26,13 +27,15 @@ // Signature int func() @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.METHOD) - public @interface RowSizeCallback { + @interface RowSizeCallback + { } // Annotation for method to get size of a chest row if it is not a fixed size for this container class - // Signature int func() + // Signature boolean func() @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.METHOD) - public @interface IsLargeCallback { + @interface IsLargeCallback + { } -} \ No newline at end of file +} diff --git a/src/main/java/com/progwml6/ironchest/IronChests.java b/src/main/java/com/progwml6/ironchest/IronChests.java new file mode 100644 index 00000000..43dc027d --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/IronChests.java @@ -0,0 +1,93 @@ +package com.progwml6.ironchest; + +import com.progwml6.ironchest.client.data.IronChestsLangProvider; +import com.progwml6.ironchest.client.screen.IronChestScreen; +import com.progwml6.ironchest.client.tileentity.IronChestTileEntityRenderer; +import com.progwml6.ironchest.common.block.IronChestsBlocks; +import com.progwml6.ironchest.common.block.tileentity.IronChestsTileEntityTypes; +import com.progwml6.ironchest.common.inventory.IronChestsContainerTypes; +import com.progwml6.ironchest.common.item.IronChestsItems; +import net.minecraft.client.gui.ScreenManager; +import net.minecraft.data.DataGenerator; +import net.minecraft.item.ItemGroup; +import net.minecraft.item.ItemStack; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; +import net.minecraftforge.eventbus.api.IEventBus; +import net.minecraftforge.fml.DistExecutor; +import net.minecraftforge.fml.client.registry.ClientRegistry; +import net.minecraftforge.fml.common.Mod; +import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent; +import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent; +import net.minecraftforge.fml.event.lifecycle.GatherDataEvent; +import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; + +@Mod(IronChests.MODID) +public class IronChests { + + public static final String MODID = "ironchest"; + + public static final ItemGroup IRONCHESTS_ITEM_GROUP = (new ItemGroup("ironchest") { + @Override + @OnlyIn(Dist.CLIENT) + public ItemStack createIcon() { + return new ItemStack(IronChestsBlocks.IRON_CHEST.get()); + } + }); + + public IronChests() { + IEventBus modBus = FMLJavaModLoadingContext.get().getModEventBus(); + + // General mod setup + modBus.addListener(this::setup); + modBus.addListener(this::gatherData); + + DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> { + // Client setup + modBus.addListener(this::setupClient); + }); + + // Registry objects + IronChestsBlocks.BLOCKS.register(modBus); + IronChestsItems.ITEMS.register(modBus); + IronChestsTileEntityTypes.TILE_ENTITIES.register(modBus); + IronChestsContainerTypes.CONTAINERS.register(modBus); + } + + @OnlyIn(Dist.CLIENT) + private void setupClient(final FMLClientSetupEvent event) { + ScreenManager.registerFactory(IronChestsContainerTypes.IRON_CHEST.get(), IronChestScreen::new); + ScreenManager.registerFactory(IronChestsContainerTypes.GOLD_CHEST.get(), IronChestScreen::new); + ScreenManager.registerFactory(IronChestsContainerTypes.DIAMOND_CHEST.get(), IronChestScreen::new); + ScreenManager.registerFactory(IronChestsContainerTypes.CRYSTAL_CHEST.get(), IronChestScreen::new); + ScreenManager.registerFactory(IronChestsContainerTypes.COPPER_CHEST.get(), IronChestScreen::new); + ScreenManager.registerFactory(IronChestsContainerTypes.SILVER_CHEST.get(), IronChestScreen::new); + ScreenManager.registerFactory(IronChestsContainerTypes.OBSIDIAN_CHEST.get(), IronChestScreen::new); + ScreenManager.registerFactory(IronChestsContainerTypes.DIRT_CHEST.get(), IronChestScreen::new); + + ClientRegistry.bindTileEntityRenderer(IronChestsTileEntityTypes.IRON_CHEST.get(), IronChestTileEntityRenderer::new); + ClientRegistry.bindTileEntityRenderer(IronChestsTileEntityTypes.GOLD_CHEST.get(), IronChestTileEntityRenderer::new); + ClientRegistry.bindTileEntityRenderer(IronChestsTileEntityTypes.DIAMOND_CHEST.get(), IronChestTileEntityRenderer::new); + ClientRegistry.bindTileEntityRenderer(IronChestsTileEntityTypes.COPPER_CHEST.get(), IronChestTileEntityRenderer::new); + ClientRegistry.bindTileEntityRenderer(IronChestsTileEntityTypes.SILVER_CHEST.get(), IronChestTileEntityRenderer::new); + ClientRegistry.bindTileEntityRenderer(IronChestsTileEntityTypes.CRYSTAL_CHEST.get(), IronChestTileEntityRenderer::new); + ClientRegistry.bindTileEntityRenderer(IronChestsTileEntityTypes.OBSIDIAN_CHEST.get(), IronChestTileEntityRenderer::new); + ClientRegistry.bindTileEntityRenderer(IronChestsTileEntityTypes.DIRT_CHEST.get(), IronChestTileEntityRenderer::new); + } + + private void setup(final FMLCommonSetupEvent event) { + + } + + private void gatherData(GatherDataEvent event) { + DataGenerator gen = event.getGenerator(); + + if (event.includeClient()) { + gen.addProvider(new IronChestsLangProvider(gen)); + } + if (event.includeServer()) { + //gen.addProvider(new IronChestsLootTableProvider(gen)); + } + } + +} diff --git a/src/main/java/com/progwml6/ironchest/client/data/IronChestsItemModelProvider.java b/src/main/java/com/progwml6/ironchest/client/data/IronChestsItemModelProvider.java new file mode 100644 index 00000000..b890a918 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/client/data/IronChestsItemModelProvider.java @@ -0,0 +1,23 @@ +package com.progwml6.ironchest.client.data; + +import com.progwml6.ironchest.IronChests; +import net.minecraft.data.DataGenerator; +import net.minecraftforge.client.model.generators.ExistingFileHelper; +import net.minecraftforge.client.model.generators.ItemModelProvider; + +public class IronChestsItemModelProvider extends ItemModelProvider { + + public IronChestsItemModelProvider(DataGenerator generator, ExistingFileHelper existingFileHelper) { + super(generator, IronChests.MODID, existingFileHelper); + } + + @Override + protected void registerModels() { + + } + + @Override + public String getName() { + return "Iron Chests Item Models"; + } +} diff --git a/src/main/java/com/progwml6/ironchest/client/data/IronChestsLangProvider.java b/src/main/java/com/progwml6/ironchest/client/data/IronChestsLangProvider.java new file mode 100644 index 00000000..bc522dcf --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/client/data/IronChestsLangProvider.java @@ -0,0 +1,159 @@ +package com.progwml6.ironchest.client.data; + +import com.progwml6.ironchest.IronChests; +import com.progwml6.ironchest.common.Util; +import com.progwml6.ironchest.common.block.IronChestsBlocks; +import com.progwml6.ironchest.common.block.IronChestsTypes; +import com.progwml6.ironchest.common.item.IronChestsItems; +import net.minecraft.block.Block; +import net.minecraft.data.DataGenerator; +import net.minecraft.data.DirectoryCache; +import net.minecraft.item.Item; +import net.minecraft.item.ItemGroup; +import net.minecraft.util.IItemProvider; +import net.minecraftforge.common.data.LanguageProvider; +import net.minecraftforge.registries.IForgeRegistryEntry; +import org.apache.commons.lang3.StringUtils; + +import java.io.IOException; +import java.util.Arrays; +import java.util.List; +import java.util.Locale; +import java.util.function.Supplier; +import java.util.stream.Collectors; + +public class IronChestsLangProvider extends LanguageProvider { + + private static class AccessibleLanguageProvider extends LanguageProvider { + + public AccessibleLanguageProvider(DataGenerator gen, String modid, String locale) { + super(gen, modid, locale); + } + + @Override + public void add(String key, String value) { + super.add(key, value); + } + + @Override + protected void addTranslations() { + } + } + + private final AccessibleLanguageProvider upsideDown; + + public IronChestsLangProvider(DataGenerator gen) { + super(gen, IronChests.MODID, "en_us"); + this.upsideDown = new AccessibleLanguageProvider(gen, IronChests.MODID, "en_ud"); + } + + @Override + protected void addTranslations() { + // Blocks + + this.addBlock(IronChestsBlocks.IRON_CHEST); + this.addBlock(IronChestsBlocks.GOLD_CHEST); + this.addBlock(IronChestsBlocks.DIAMOND_CHEST); + this.addBlock(IronChestsBlocks.COPPER_CHEST); + this.addBlock(IronChestsBlocks.SILVER_CHEST); + this.addBlock(IronChestsBlocks.CRYSTAL_CHEST); + this.addBlock(IronChestsBlocks.OBSIDIAN_CHEST); + this.addBlock(IronChestsBlocks.DIRT_CHEST); + + // ITEMS + + IronChestsItems.UPGRADES.values().forEach(this::addItem); + + // MISC + + this.add(IronChests.IRONCHESTS_ITEM_GROUP, "Iron Chests"); + } + + private String getAutomaticName(Supplier> sup) { + return Util.toEnglishName(sup.get().getRegistryName().getPath()); + } + + private void addBlock(Supplier block) { + this.addBlock(block, this.getAutomaticName(block)); + } + + private void addItem(Supplier item) { + this.addItem(item, this.getAutomaticName(item)); + } + + private void addItemWithTooltip(Supplier block, String name, List tooltip) { + this.addItem(block, name); + this.addTooltip(block, tooltip); + } + + private void addTooltip(Supplier item, String tooltip) { + this.add(item.get().asItem().getTranslationKey() + ".desc", tooltip); + } + + private void addTooltip(Supplier item, List tooltip) { + for (int i = 0; i < tooltip.size(); i++) { + this.add(item.get().asItem().getTranslationKey() + ".desc." + i, tooltip.get(i)); + } + } + + private void add(ItemGroup group, String name) { + this.add(group.getTranslationKey(), name); + } + + // Automatic en_ud generation + + private static final String NORMAL_CHARS = + /* lowercase */ "abcdefghijklmn\u00F1opqrstuvwxyz" + + /* uppercase */ "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + + /* numbers */ "0123456789" + + /* special */ "_,;.?!/\\'"; + private static final String UPSIDE_DOWN_CHARS = + /* lowercase */ "\u0250q\u0254p\u01DD\u025Fb\u0265\u0131\u0638\u029E\u05DF\u026Fuuodb\u0279s\u0287n\u028C\u028Dx\u028Ez" + + /* uppercase */ "\u2C6F\u15FA\u0186\u15E1\u018E\u2132\u2141HI\u017F\u029E\uA780WNO\u0500\u1F49\u1D1AS\u27D8\u2229\u039BMX\u028EZ" + + /* numbers */ "0\u0196\u1105\u0190\u3123\u03DB9\u312586" + + /* special */ "\u203E'\u061B\u02D9\u00BF\u00A1/\\,"; + + static { + if (NORMAL_CHARS.length() != UPSIDE_DOWN_CHARS.length()) { + throw new AssertionError("Char maps do not match in length!"); + } + } + + private String toUpsideDown(String normal) { + char[] ud = new char[normal.length()]; + for (int i = 0; i < normal.length(); i++) { + char c = normal.charAt(i); + if (c == '%') { + String fmtArg = ""; + while (Character.isDigit(c) || c == '%' || c == '$' || c == 's' || c == 'd') { // TODO this is a bit lazy + fmtArg += c; + i++; + c = i == normal.length() ? 0 : normal.charAt(i); + } + i--; + for (int j = 0; j < fmtArg.length(); j++) { + ud[normal.length() - 1 - i + j] = fmtArg.charAt(j); + } + continue; + } + int lookup = NORMAL_CHARS.indexOf(c); + if (lookup >= 0) { + c = UPSIDE_DOWN_CHARS.charAt(lookup); + } + ud[normal.length() - 1 - i] = c; + } + return new String(ud); + } + + @Override + public void add(String key, String value) { + super.add(key, value); + this.upsideDown.add(key, this.toUpsideDown(value)); + } + + @Override + public void act(DirectoryCache cache) throws IOException { + super.act(cache); + this.upsideDown.act(cache); + } +} diff --git a/src/main/java/com/progwml6/ironchest/client/screen/IronChestScreen.java b/src/main/java/com/progwml6/ironchest/client/screen/IronChestScreen.java new file mode 100644 index 00000000..c6d905df --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/client/screen/IronChestScreen.java @@ -0,0 +1,59 @@ +package com.progwml6.ironchest.client.screen; + +import com.mojang.blaze3d.systems.RenderSystem; +import com.progwml6.ironchest.common.block.IronChestsTypes; +import com.progwml6.ironchest.common.inventory.IronChestContainer; +import net.minecraft.client.gui.IHasContainer; +import net.minecraft.client.gui.screen.inventory.ContainerScreen; +import net.minecraft.entity.player.PlayerInventory; +import net.minecraft.util.text.ITextComponent; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; + +@OnlyIn(Dist.CLIENT) +public class IronChestScreen extends ContainerScreen implements IHasContainer { + + private IronChestsTypes chestType; + + private int textureXSize; + + private int textureYSize; + + public IronChestScreen(IronChestContainer container, PlayerInventory playerInventory, ITextComponent title) { + super(container, playerInventory, title); + + this.chestType = container.getChestType(); + this.xSize = container.getChestType().xSize; + this.ySize = container.getChestType().ySize; + this.textureXSize = container.getChestType().textureXSize; + this.textureYSize = container.getChestType().textureYSize; + + this.passEvents = false; + } + + @Override + public void render(int mouseX, int mouseY, float partialTicks) { + this.renderBackground(); + super.render(mouseX, mouseY, partialTicks); + this.renderHoveredToolTip(mouseX, mouseY); + } + + @Override + protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) { + this.font.drawString(this.title.getFormattedText(), 8.0F, 6.0F, 4210752); + this.font.drawString(this.playerInventory.getDisplayName().getFormattedText(), 8.0F, (float) (this.ySize - 96 + 2), 4210752); + } + + @Override + protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) { + RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F); + + this.minecraft.getTextureManager().bindTexture(this.chestType.guiTexture); + + int x = (this.width - this.xSize) / 2; + int y = (this.height - this.ySize) / 2; + + blit(x, y, 0, 0, this.xSize, this.ySize, this.textureXSize, this.textureYSize); + } +} + diff --git a/src/main/java/com/progwml6/ironchest/client/tileentity/IronChestItemStackRenderer.java b/src/main/java/com/progwml6/ironchest/client/tileentity/IronChestItemStackRenderer.java new file mode 100644 index 00000000..57cf4ad9 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/client/tileentity/IronChestItemStackRenderer.java @@ -0,0 +1,27 @@ +package com.progwml6.ironchest.client.tileentity; + +import com.mojang.blaze3d.matrix.MatrixStack; +import net.minecraft.client.renderer.IRenderTypeBuffer; +import net.minecraft.client.renderer.tileentity.ItemStackTileEntityRenderer; +import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; +import net.minecraft.item.ItemStack; +import net.minecraft.tileentity.TileEntity; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; + +import java.util.function.Supplier; + +@OnlyIn(Dist.CLIENT) +public class IronChestItemStackRenderer extends ItemStackTileEntityRenderer { + + private final Supplier te; + + public IronChestItemStackRenderer(Supplier te) { + this.te = te; + } + + @Override + public void render(ItemStack itemStackIn, MatrixStack matrixStackIn, IRenderTypeBuffer bufferIn, int combinedLightIn, int combinedOverlayIn) { + TileEntityRendererDispatcher.instance.renderItem(this.te.get(), matrixStackIn, bufferIn, combinedLightIn, combinedOverlayIn); + } +} diff --git a/src/main/java/com/progwml6/ironchest/client/tileentity/IronChestTileEntityRenderer.java b/src/main/java/com/progwml6/ironchest/client/tileentity/IronChestTileEntityRenderer.java new file mode 100644 index 00000000..800d65a5 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/client/tileentity/IronChestTileEntityRenderer.java @@ -0,0 +1,101 @@ +package com.progwml6.ironchest.client.tileentity; + +import com.mojang.blaze3d.matrix.MatrixStack; +import com.mojang.blaze3d.matrix.MatrixStack; +import com.mojang.blaze3d.vertex.IVertexBuilder; +import com.progwml6.ironchest.common.block.GenericIronChestBlock; +import com.progwml6.ironchest.common.block.IronChestsTypes; +import com.progwml6.ironchest.common.block.tileentity.GenericIronChestTileEntity; +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.client.renderer.Atlases; +import net.minecraft.client.renderer.IRenderTypeBuffer; +import net.minecraft.client.renderer.RenderType; +import net.minecraft.client.renderer.Vector3f; +import net.minecraft.client.renderer.model.Material; +import net.minecraft.client.renderer.model.ModelRenderer; +import net.minecraft.client.renderer.tileentity.DualBrightnessCallback; +import net.minecraft.client.renderer.tileentity.TileEntityRenderer; +import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; +import net.minecraft.state.properties.ChestType; +import net.minecraft.tileentity.IChestLid; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.tileentity.TileEntityMerger; +import net.minecraft.util.Direction; +import net.minecraft.world.World; + +public class IronChestTileEntityRenderer extends TileEntityRenderer { + + private final ModelRenderer chestLid; + private final ModelRenderer chestBottom; + private final ModelRenderer chestLock; + + public IronChestTileEntityRenderer(TileEntityRendererDispatcher tileEntityRendererDispatcher) { + super(tileEntityRendererDispatcher); + + this.chestBottom = new ModelRenderer(64, 64, 0, 19); + this.chestBottom.addBox(1.0F, 0.0F, 1.0F, 14.0F, 10.0F, 14.0F, 0.0F); + this.chestLid = new ModelRenderer(64, 64, 0, 0); + this.chestLid.addBox(1.0F, 0.0F, 0.0F, 14.0F, 5.0F, 14.0F, 0.0F); + this.chestLid.rotationPointY = 9.0F; + this.chestLid.rotationPointZ = 1.0F; + this.chestLock = new ModelRenderer(64, 64, 0, 0); + this.chestLock.addBox(7.0F, -1.0F, 15.0F, 2.0F, 4.0F, 1.0F, 0.0F); + this.chestLock.rotationPointY = 8.0F; + } + + @Override + public void render(T tileEntityIn, float partialTicks, MatrixStack matrixStackIn, IRenderTypeBuffer bufferIn, int combinedLightIn, int combinedOverlayIn) { + GenericIronChestTileEntity tileEntity = (GenericIronChestTileEntity) tileEntityIn; + + World world = tileEntity.getWorld(); + boolean flag = world != null; + + BlockState blockstate = flag ? tileEntity.getBlockState() : (BlockState) tileEntity.getBlockToUse().getDefaultState().with(GenericIronChestBlock.FACING, Direction.SOUTH); + Block block = blockstate.getBlock(); + IronChestsTypes chestType = IronChestsTypes.IRON; + IronChestsTypes actualType = GenericIronChestBlock.getTypeFromBlock(block); + + if (actualType != null) { + chestType = actualType; + } + + if (block instanceof GenericIronChestBlock) { + GenericIronChestBlock ironChestBlock = (GenericIronChestBlock) block; + + matrixStackIn.push(); + float f = blockstate.get(GenericIronChestBlock.FACING).getHorizontalAngle(); + matrixStackIn.translate(0.5D, 0.5D, 0.5D); + matrixStackIn.rotate(Vector3f.YP.rotationDegrees(-f)); + matrixStackIn.translate(-0.5D, -0.5D, -0.5D); + + TileEntityMerger.ICallbackWrapper iCallbackWrapper; + if (flag) { + iCallbackWrapper = ironChestBlock.getWrapper(blockstate, world, tileEntity.getPos(), true); + } + else { + iCallbackWrapper = TileEntityMerger.ICallback::func_225537_b_; + } + + float f1 = iCallbackWrapper.apply(GenericIronChestBlock.getLid((IChestLid) tileEntity)).get(partialTicks); + f1 = 1.0F - f1; + f1 = 1.0F - f1 * f1 * f1; + int i = iCallbackWrapper.apply(new DualBrightnessCallback<>()).applyAsInt(combinedLightIn); + + Material material = new Material(Atlases.CHEST_ATLAS, IronChestsModels.chooseChestTexture(chestType)); + IVertexBuilder ivertexbuilder = material.getBuffer(bufferIn, RenderType::getEntityCutout); + + this.handleModelRender(matrixStackIn, ivertexbuilder, this.chestLid, this.chestLock, this.chestBottom, f1, i, combinedOverlayIn); + + matrixStackIn.pop(); + } + } + + private void handleModelRender(MatrixStack matrixStackIn, IVertexBuilder iVertexBuilder, ModelRenderer firstModel, ModelRenderer secondModel, ModelRenderer thirdModel, float f1, int p_228871_7_, int p_228871_8_) { + firstModel.rotateAngleX = -(f1 * ((float) Math.PI / 2F)); + secondModel.rotateAngleX = firstModel.rotateAngleX; + firstModel.render(matrixStackIn, iVertexBuilder, p_228871_7_, p_228871_8_); + secondModel.render(matrixStackIn, iVertexBuilder, p_228871_7_, p_228871_8_); + thirdModel.render(matrixStackIn, iVertexBuilder, p_228871_7_, p_228871_8_); + } +} diff --git a/src/main/java/com/progwml6/ironchest/client/tileentity/IronChestsModels.java b/src/main/java/com/progwml6/ironchest/client/tileentity/IronChestsModels.java new file mode 100644 index 00000000..089dfb3d --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/client/tileentity/IronChestsModels.java @@ -0,0 +1,68 @@ +package com.progwml6.ironchest.client.tileentity; + +import com.progwml6.ironchest.IronChests; +import com.progwml6.ironchest.common.block.IronChestsTypes; +import net.minecraft.client.renderer.Atlases; +import net.minecraft.client.renderer.model.Material; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ResourceLocation; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.client.event.TextureStitchEvent; +import net.minecraftforge.eventbus.api.SubscribeEvent; +import net.minecraftforge.fml.common.Mod; + +import java.util.function.Consumer; + +@Mod.EventBusSubscriber(modid = IronChests.MODID, value = Dist.CLIENT, bus = Mod.EventBusSubscriber.Bus.MOD) +public class IronChestsModels { + + public static final ResourceLocation IRON_CHEST_LOCATION = new ResourceLocation(IronChests.MODID, "model/iron_chest"); + public static final ResourceLocation GOLD_CHEST_LOCATION = new ResourceLocation(IronChests.MODID, "model/gold_chest"); + public static final ResourceLocation DIAMOND_CHEST_LOCATION = new ResourceLocation(IronChests.MODID, "model/diamond_chest"); + public static final ResourceLocation COPPER_CHEST_LOCATION = new ResourceLocation(IronChests.MODID, "model/copper_chest"); + public static final ResourceLocation SILVER_CHEST_LOCATION = new ResourceLocation(IronChests.MODID, "model/silver_chest"); + public static final ResourceLocation CRYSTAL_CHEST_LOCATION = new ResourceLocation(IronChests.MODID, "model/crystal_chest"); + public static final ResourceLocation OBSIDIAN_CHEST_LOCATION = new ResourceLocation(IronChests.MODID, "model/obsidian_chest"); + public static final ResourceLocation DIRT_CHEST_LOCATION = new ResourceLocation(IronChests.MODID, "model/dirt_chest"); + public static final ResourceLocation VANLLA_CHEST_LOCATION = new ResourceLocation("entity/chest/normal"); + + public static ResourceLocation chooseChestTexture(IronChestsTypes type) { + switch (type) { + case IRON: + return IRON_CHEST_LOCATION; + case GOLD: + return GOLD_CHEST_LOCATION; + case DIAMOND: + return DIAMOND_CHEST_LOCATION; + case COPPER: + return COPPER_CHEST_LOCATION; + case SILVER: + return SILVER_CHEST_LOCATION; + case CRYSTAL: + return CRYSTAL_CHEST_LOCATION; + case OBSIDIAN: + return OBSIDIAN_CHEST_LOCATION; + case DIRT: + return DIRT_CHEST_LOCATION; + case WOOD: + default: + return VANLLA_CHEST_LOCATION; + } + } + + @SubscribeEvent + public static void onStitch(TextureStitchEvent.Pre event) { + if (!event.getMap().getTextureLocation().equals(Atlases.CHEST_ATLAS)) { + return; + } + + event.addSprite(IRON_CHEST_LOCATION); + event.addSprite(GOLD_CHEST_LOCATION); + event.addSprite(DIAMOND_CHEST_LOCATION); + event.addSprite(COPPER_CHEST_LOCATION); + event.addSprite(SILVER_CHEST_LOCATION); + event.addSprite(CRYSTAL_CHEST_LOCATION); + event.addSprite(OBSIDIAN_CHEST_LOCATION); + event.addSprite(DIRT_CHEST_LOCATION); + } +} diff --git a/src/main/java/com/progwml6/ironchest/common/Util.java b/src/main/java/com/progwml6/ironchest/common/Util.java new file mode 100644 index 00000000..708beca4 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/Util.java @@ -0,0 +1,16 @@ +package com.progwml6.ironchest.common; + +import org.apache.commons.lang3.StringUtils; + +import java.util.Arrays; +import java.util.Locale; +import java.util.stream.Collectors; + +public class Util { + + public static String toEnglishName(String internalName) { + return Arrays.stream(internalName.toLowerCase(Locale.ROOT).split("_")) + .map(StringUtils::capitalize) + .collect(Collectors.joining(" ")); + } +} diff --git a/src/main/java/com/progwml6/ironchest/common/ai/CatsSitOnChestsHandler.java b/src/main/java/com/progwml6/ironchest/common/ai/CatsSitOnChestsHandler.java new file mode 100644 index 00000000..b874c635 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/ai/CatsSitOnChestsHandler.java @@ -0,0 +1,32 @@ +package com.progwml6.ironchest.common.ai; + +import net.minecraft.entity.ai.goal.CatSitOnBlockGoal; +import net.minecraft.entity.ai.goal.PrioritizedGoal; +import net.minecraft.entity.passive.CatEntity; +import net.minecraftforge.event.entity.living.LivingEvent; +import net.minecraftforge.eventbus.api.SubscribeEvent; + +import java.util.HashSet; + +public class CatsSitOnChestsHandler { + + @SubscribeEvent + public void changeSittingTaskForOcelots(final LivingEvent.LivingUpdateEvent evt) { + if (evt.getEntityLiving().ticksExisted < 5 && evt.getEntityLiving() instanceof CatEntity) { + HashSet goals = new HashSet<>(); + + CatEntity catEntity = (CatEntity) evt.getEntityLiving(); + + for (PrioritizedGoal goal : catEntity.goalSelector.goals) { + if (goal.getGoal().getClass() == CatSitOnBlockGoal.class) { + goals.add(goal); + } + } + + for (PrioritizedGoal goal : goals) { + catEntity.goalSelector.removeGoal(goal.getGoal()); + catEntity.goalSelector.addGoal(goal.getPriority(), new IronChestCatSitOnBlockGoal(catEntity, 0.4F)); + } + } + } +} diff --git a/src/main/java/com/progwml6/ironchest/common/ai/IronChestCatSitOnBlockGoal.java b/src/main/java/com/progwml6/ironchest/common/ai/IronChestCatSitOnBlockGoal.java new file mode 100644 index 00000000..d65a6c83 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/ai/IronChestCatSitOnBlockGoal.java @@ -0,0 +1,34 @@ +package com.progwml6.ironchest.common.ai; + +import com.progwml6.ironchest.common.block.GenericIronChestBlock; +import com.progwml6.ironchest.common.block.tileentity.GenericIronChestTileEntity; +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.entity.ai.goal.CatSitOnBlockGoal; +import net.minecraft.entity.passive.CatEntity; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.IWorldReader; + +public class IronChestCatSitOnBlockGoal extends CatSitOnBlockGoal { + + public IronChestCatSitOnBlockGoal(CatEntity catEntity, double p_i50330_2_) { + super(catEntity, p_i50330_2_); + } + + @Override + protected boolean shouldMoveTo(IWorldReader worldIn, BlockPos pos) { + if (!worldIn.isAirBlock(pos.up())) { + return false; + } + else { + BlockState blockstate = worldIn.getBlockState(pos); + Block block = blockstate.getBlock(); + + if (block instanceof GenericIronChestBlock) { + return GenericIronChestTileEntity.getPlayersUsing(worldIn, pos) < 1; + } + + return super.shouldMoveTo(worldIn, pos); + } + } +} diff --git a/src/main/java/com/progwml6/ironchest/common/block/CopperChestBlock.java b/src/main/java/com/progwml6/ironchest/common/block/CopperChestBlock.java new file mode 100644 index 00000000..e7dd3a7f --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/block/CopperChestBlock.java @@ -0,0 +1,19 @@ +package com.progwml6.ironchest.common.block; + +import com.progwml6.ironchest.common.block.tileentity.CopperChestTileEntity; +import com.progwml6.ironchest.common.block.tileentity.IronChestsTileEntityTypes; +import net.minecraft.block.BlockState; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.IBlockReader; + +public class CopperChestBlock extends GenericIronChestBlock { + + public CopperChestBlock(Properties properties) { + super(IronChestsTypes.COPPER, IronChestsTileEntityTypes.COPPER_CHEST::get, properties); + } + + @Override + public TileEntity createTileEntity(BlockState state, IBlockReader world) { + return new CopperChestTileEntity(); + } +} diff --git a/src/main/java/com/progwml6/ironchest/common/block/CrystalChestBlock.java b/src/main/java/com/progwml6/ironchest/common/block/CrystalChestBlock.java new file mode 100644 index 00000000..10c77e6b --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/block/CrystalChestBlock.java @@ -0,0 +1,20 @@ +package com.progwml6.ironchest.common.block; + +import com.progwml6.ironchest.common.block.tileentity.CrystalChestTileEntity; +import com.progwml6.ironchest.common.block.tileentity.IronChestsTileEntityTypes; +import net.minecraft.block.BlockState; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.IBlockReader; + +public class CrystalChestBlock extends GenericIronChestBlock { + + public CrystalChestBlock(Properties properties) { + super(IronChestsTypes.CRYSTAL, IronChestsTileEntityTypes.CRYSTAL_CHEST::get, properties); + } + + + @Override + public TileEntity createTileEntity(BlockState state, IBlockReader world) { + return new CrystalChestTileEntity(); + } +} diff --git a/src/main/java/com/progwml6/ironchest/common/block/DiamondChestBlock.java b/src/main/java/com/progwml6/ironchest/common/block/DiamondChestBlock.java new file mode 100644 index 00000000..2f2dbe94 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/block/DiamondChestBlock.java @@ -0,0 +1,19 @@ +package com.progwml6.ironchest.common.block; + +import com.progwml6.ironchest.common.block.tileentity.DiamondChestTileEntity; +import com.progwml6.ironchest.common.block.tileentity.IronChestsTileEntityTypes; +import net.minecraft.block.BlockState; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.IBlockReader; + +public class DiamondChestBlock extends GenericIronChestBlock { + + public DiamondChestBlock(Properties properties) { + super(IronChestsTypes.DIAMOND, IronChestsTileEntityTypes.DIAMOND_CHEST::get, properties); + } + + @Override + public TileEntity createTileEntity(BlockState state, IBlockReader world) { + return new DiamondChestTileEntity(); + } +} \ No newline at end of file diff --git a/src/main/java/com/progwml6/ironchest/common/block/DirtChestBlock.java b/src/main/java/com/progwml6/ironchest/common/block/DirtChestBlock.java new file mode 100644 index 00000000..16bb62e8 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/block/DirtChestBlock.java @@ -0,0 +1,20 @@ +package com.progwml6.ironchest.common.block; + +import com.progwml6.ironchest.common.block.tileentity.DirtChestTileEntity; +import com.progwml6.ironchest.common.block.tileentity.IronChestsTileEntityTypes; +import com.progwml6.ironchest.common.block.tileentity.ObsidianChestTileEntity; +import net.minecraft.block.BlockState; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.IBlockReader; + +public class DirtChestBlock extends GenericIronChestBlock { + + public DirtChestBlock(Properties properties) { + super(IronChestsTypes.DIRT, IronChestsTileEntityTypes.DIRT_CHEST::get, properties); + } + + @Override + public TileEntity createTileEntity(BlockState state, IBlockReader world) { + return new DirtChestTileEntity(); + } +} diff --git a/src/main/java/com/progwml6/ironchest/common/block/GenericIronChestBlock.java b/src/main/java/com/progwml6/ironchest/common/block/GenericIronChestBlock.java new file mode 100644 index 00000000..2c7342a7 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/block/GenericIronChestBlock.java @@ -0,0 +1,277 @@ +package com.progwml6.ironchest.common.block; + +import com.progwml6.ironchest.common.block.tileentity.GenericIronChestTileEntity; +import it.unimi.dsi.fastutil.floats.Float2FloatFunction; +import net.minecraft.block.Block; +import net.minecraft.block.BlockRenderType; +import net.minecraft.block.BlockState; +import net.minecraft.block.HorizontalBlock; +import net.minecraft.block.IWaterLoggable; +import net.minecraft.entity.LivingEntity; +import net.minecraft.entity.passive.CatEntity; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.fluid.Fluids; +import net.minecraft.fluid.IFluidState; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.InventoryHelper; +import net.minecraft.inventory.container.Container; +import net.minecraft.inventory.container.INamedContainerProvider; +import net.minecraft.item.BlockItemUseContext; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.pathfinding.PathType; +import net.minecraft.state.BooleanProperty; +import net.minecraft.state.DirectionProperty; +import net.minecraft.state.StateContainer; +import net.minecraft.state.properties.BlockStateProperties; +import net.minecraft.stats.Stat; +import net.minecraft.stats.Stats; +import net.minecraft.tileentity.IChestLid; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.tileentity.TileEntityMerger; +import net.minecraft.tileentity.TileEntityType; +import net.minecraft.util.ActionResultType; +import net.minecraft.util.Direction; +import net.minecraft.util.Hand; +import net.minecraft.util.Mirror; +import net.minecraft.util.ResourceLocation; +import net.minecraft.util.Rotation; +import net.minecraft.util.math.AxisAlignedBB; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.BlockRayTraceResult; +import net.minecraft.util.math.shapes.ISelectionContext; +import net.minecraft.util.math.shapes.VoxelShape; +import net.minecraft.world.IBlockReader; +import net.minecraft.world.IWorld; +import net.minecraft.world.World; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; + +import javax.annotation.Nullable; +import java.util.List; +import java.util.function.BiPredicate; +import java.util.function.Supplier; + +public class GenericIronChestBlock extends Block implements IWaterLoggable { + + public static final DirectionProperty FACING = HorizontalBlock.HORIZONTAL_FACING; + + public static final BooleanProperty WATERLOGGED = BlockStateProperties.WATERLOGGED; + + protected static final VoxelShape IRON_CHEST_SHAPE = Block.makeCuboidShape(1.0D, 0.0D, 1.0D, 15.0D, 14.0D, 15.0D); + + private final IronChestsTypes type; + private final Supplier> tileEntityTypeSupplier; + + public GenericIronChestBlock(IronChestsTypes typeIn, Supplier> tileEntityTypeSupplierIn, Properties propertiesIn) { + super(propertiesIn); + + this.type = typeIn; + this.tileEntityTypeSupplier = tileEntityTypeSupplierIn; + + this.setDefaultState(this.stateContainer.getBaseState().with(FACING, Direction.NORTH).with(WATERLOGGED, Boolean.valueOf(false))); + } + + @Override + public BlockRenderType getRenderType(BlockState state) { + return BlockRenderType.ENTITYBLOCK_ANIMATED; + } + + @Override + public BlockState updatePostPlacement(BlockState stateIn, Direction facing, BlockState facingState, IWorld worldIn, BlockPos currentPos, BlockPos facingPos) { + if (stateIn.get(WATERLOGGED)) { + worldIn.getPendingFluidTicks().scheduleTick(currentPos, Fluids.WATER, Fluids.WATER.getTickRate(worldIn)); + } + + return super.updatePostPlacement(stateIn, facing, facingState, worldIn, currentPos, facingPos); + } + + @Override + public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { + return IRON_CHEST_SHAPE; + } + + @Override + public BlockState getStateForPlacement(BlockItemUseContext context) { + Direction direction = context.getPlacementHorizontalFacing().getOpposite(); + IFluidState ifluidstate = context.getWorld().getFluidState(context.getPos()); + + return this.getDefaultState().with(FACING, direction).with(WATERLOGGED, ifluidstate.getFluid() == Fluids.WATER); + } + + @Override + public IFluidState getFluidState(BlockState state) { + return state.get(WATERLOGGED) ? Fluids.WATER.getStillFluidState(false) : super.getFluidState(state); + } + + @Override + public void onBlockPlacedBy(World worldIn, BlockPos pos, BlockState state, LivingEntity placer, ItemStack stack) { + TileEntity tileentity = worldIn.getTileEntity(pos); + + if (tileentity instanceof GenericIronChestTileEntity) { + ((GenericIronChestTileEntity) tileentity).wasPlaced(placer, stack); + + if (stack.hasDisplayName()) { + ((GenericIronChestTileEntity) tileentity).setCustomName(stack.getDisplayName()); + } + } + } + + @Override + public void onReplaced(BlockState state, World worldIn, BlockPos pos, BlockState newState, boolean isMoving) { + if (state.getBlock() != newState.getBlock()) { + TileEntity tileentity = worldIn.getTileEntity(pos); + + if (tileentity instanceof GenericIronChestTileEntity) { + ((GenericIronChestTileEntity) tileentity).removeAdornments(); + InventoryHelper.dropInventoryItems(worldIn, pos, (GenericIronChestTileEntity) tileentity); + worldIn.updateComparatorOutputLevel(pos, this); + } + + super.onReplaced(state, worldIn, pos, newState, isMoving); + } + } + + @Override + public ActionResultType onBlockActivated(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) { + if (!worldIn.isRemote) { + INamedContainerProvider inamedcontainerprovider = this.getContainer(state, worldIn, pos); + if (inamedcontainerprovider != null) { + player.openContainer(inamedcontainerprovider); + player.addStat(this.getOpenStat()); + } + + } + return ActionResultType.SUCCESS; + } + + protected Stat getOpenStat() { + return Stats.CUSTOM.get(Stats.OPEN_CHEST); + } + + @Override + @Nullable + public INamedContainerProvider getContainer(BlockState state, World world, BlockPos pos) { + TileEntity tileentity = world.getTileEntity(pos); + return tileentity instanceof INamedContainerProvider ? (INamedContainerProvider) tileentity : null; + } + + @Override + public boolean hasTileEntity(BlockState state) { + return true; + } + + @Override + public boolean eventReceived(BlockState state, World worldIn, BlockPos pos, int id, int param) { + super.eventReceived(state, worldIn, pos, id, param); + TileEntity tileentity = worldIn.getTileEntity(pos); + return tileentity == null ? false : tileentity.receiveClientEvent(id, param); + } + + private static boolean isBlocked(IWorld iWorld, BlockPos blockPos) { + return isBelowSolidBlock(iWorld, blockPos) || isCatSittingOn(iWorld, blockPos); + } + + private static boolean isBelowSolidBlock(IBlockReader iBlockReader, BlockPos worldIn) { + BlockPos blockpos = worldIn.up(); + return iBlockReader.getBlockState(blockpos).isNormalCube(iBlockReader, blockpos); + } + + private static boolean isCatSittingOn(IWorld iWorld, BlockPos blockPos) { + List list = iWorld.getEntitiesWithinAABB(CatEntity.class, new AxisAlignedBB((double) blockPos.getX(), (double) (blockPos.getY() + 1), (double) blockPos.getZ(), (double) (blockPos.getX() + 1), (double) (blockPos.getY() + 2), (double) (blockPos.getZ() + 1))); + if (!list.isEmpty()) { + for (CatEntity catentity : list) { + if (catentity.isSitting()) { + return true; + } + } + } + + return false; + } + + @Override + public boolean hasComparatorInputOverride(BlockState state) { + return true; + } + + @Override + public int getComparatorInputOverride(BlockState blockState, World worldIn, BlockPos pos) { + return Container.calcRedstoneFromInventory((IInventory) worldIn.getTileEntity(pos)); + } + + @Override + public BlockState rotate(BlockState state, Rotation rot) { + return state.with(FACING, rot.rotate(state.get(FACING))); + } + + @Override + public BlockState mirror(BlockState state, Mirror mirrorIn) { + return state.rotate(mirrorIn.toRotation(state.get(FACING))); + } + + @Override + protected void fillStateContainer(StateContainer.Builder builder) { + builder.add(FACING, WATERLOGGED); + } + + @Override + public boolean allowsMovement(BlockState state, IBlockReader worldIn, BlockPos pos, PathType type) { + return false; + } + + public static IronChestsTypes getTypeFromItem(Item itemIn) { + return getTypeFromBlock(Block.getBlockFromItem(itemIn)); + } + + public static IronChestsTypes getTypeFromBlock(Block blockIn) { + return blockIn instanceof GenericIronChestBlock ? ((GenericIronChestBlock) blockIn).getType() : null; + } + + public IronChestsTypes getType() { + return this.type; + } + + @OnlyIn(Dist.CLIENT) + public static TileEntityMerger.ICallback getLid(final IChestLid p_226917_0_) { + return new TileEntityMerger.ICallback() { + @Override + public Float2FloatFunction func_225539_a_(GenericIronChestTileEntity p_225539_1_, GenericIronChestTileEntity p_225539_2_) { + return (p_226921_2_) -> { + return Math.max(p_225539_1_.getLidAngle(p_226921_2_), p_225539_2_.getLidAngle(p_226921_2_)); + }; + } + + @Override + public Float2FloatFunction func_225538_a_(GenericIronChestTileEntity p_225538_1_) { + return p_225538_1_::getLidAngle; + } + + @Override + public Float2FloatFunction func_225537_b_() { + return p_226917_0_::getLidAngle; + } + }; + } + + public TileEntityMerger.ICallbackWrapper getWrapper(BlockState blockState, World world, BlockPos blockPos, boolean p_225536_4_) { + BiPredicate biPredicate; + if (p_225536_4_) { + biPredicate = (p_226918_0_, p_226918_1_) -> false; + } + else { + biPredicate = GenericIronChestBlock::isBlocked; + } + + return TileEntityMerger.func_226924_a_(this.tileEntityTypeSupplier.get(), GenericIronChestBlock::getMergerType, GenericIronChestBlock::getDirectionToAttached, FACING, blockState, world, blockPos, biPredicate); + } + + public static TileEntityMerger.Type getMergerType(BlockState blockState) { + return TileEntityMerger.Type.SINGLE; + } + + public static Direction getDirectionToAttached(BlockState state) { + Direction direction = state.get(FACING); + return direction.rotateYCCW(); + } +} diff --git a/src/main/java/com/progwml6/ironchest/common/block/GoldChestBlock.java b/src/main/java/com/progwml6/ironchest/common/block/GoldChestBlock.java new file mode 100644 index 00000000..e168d510 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/block/GoldChestBlock.java @@ -0,0 +1,19 @@ +package com.progwml6.ironchest.common.block; + +import com.progwml6.ironchest.common.block.tileentity.GoldChestTileEntity; +import com.progwml6.ironchest.common.block.tileentity.IronChestsTileEntityTypes; +import net.minecraft.block.BlockState; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.IBlockReader; + +public class GoldChestBlock extends GenericIronChestBlock { + + public GoldChestBlock(Properties properties) { + super(IronChestsTypes.GOLD, IronChestsTileEntityTypes.GOLD_CHEST::get, properties); + } + + @Override + public TileEntity createTileEntity(BlockState state, IBlockReader world) { + return new GoldChestTileEntity(); + } +} diff --git a/src/main/java/com/progwml6/ironchest/common/block/IronChestBlock.java b/src/main/java/com/progwml6/ironchest/common/block/IronChestBlock.java new file mode 100644 index 00000000..468e4945 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/block/IronChestBlock.java @@ -0,0 +1,20 @@ +package com.progwml6.ironchest.common.block; + +import com.progwml6.ironchest.common.block.tileentity.IronChestTileEntity; +import com.progwml6.ironchest.common.block.tileentity.IronChestsTileEntityTypes; +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.IBlockReader; + +public class IronChestBlock extends GenericIronChestBlock { + + public IronChestBlock(Block.Properties properties) { + super(IronChestsTypes.IRON, IronChestsTileEntityTypes.IRON_CHEST::get, properties); + } + + @Override + public TileEntity createTileEntity(BlockState state, IBlockReader world) { + return new IronChestTileEntity(); + } +} diff --git a/src/main/java/com/progwml6/ironchest/common/block/IronChestsBlocks.java b/src/main/java/com/progwml6/ironchest/common/block/IronChestsBlocks.java new file mode 100644 index 00000000..6ecf7ccb --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/block/IronChestsBlocks.java @@ -0,0 +1,124 @@ +package com.progwml6.ironchest.common.block; + +import com.progwml6.ironchest.IronChests; +import com.progwml6.ironchest.client.tileentity.IronChestItemStackRenderer; +import com.progwml6.ironchest.common.block.tileentity.CopperChestTileEntity; +import com.progwml6.ironchest.common.block.tileentity.CrystalChestTileEntity; +import com.progwml6.ironchest.common.block.tileentity.DiamondChestTileEntity; +import com.progwml6.ironchest.common.block.tileentity.DirtChestTileEntity; +import com.progwml6.ironchest.common.block.tileentity.GoldChestTileEntity; +import com.progwml6.ironchest.common.block.tileentity.GenericIronChestTileEntity; +import com.progwml6.ironchest.common.block.tileentity.IronChestTileEntity; +import com.progwml6.ironchest.common.block.tileentity.ObsidianChestTileEntity; +import com.progwml6.ironchest.common.block.tileentity.SilverChestTileEntity; +import com.progwml6.ironchest.common.item.IronChestsItems; +import net.minecraft.block.Block; +import net.minecraft.block.material.Material; +import net.minecraft.client.renderer.tileentity.ItemStackTileEntityRenderer; +import net.minecraft.item.BlockItem; +import net.minecraft.item.Item; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; +import net.minecraftforge.fml.RegistryObject; +import net.minecraftforge.registries.DeferredRegister; +import net.minecraftforge.registries.ForgeRegistries; + +import java.util.concurrent.Callable; +import java.util.function.Function; +import java.util.function.Supplier; + +public class IronChestsBlocks { + + public static final DeferredRegister BLOCKS = new DeferredRegister<>(ForgeRegistries.BLOCKS, IronChests.MODID); + public static final DeferredRegister ITEMS = IronChestsItems.ITEMS; + + public static final RegistryObject IRON_CHEST = register( + "iron_chest", () -> new IronChestBlock(Block.Properties.create(Material.IRON).hardnessAndResistance(3.0F)), + () -> ironChestRenderer()); + + public static final RegistryObject GOLD_CHEST = register( + "gold_chest", () -> new GoldChestBlock(Block.Properties.create(Material.IRON).hardnessAndResistance(3.0F)), + () -> goldChestRenderer()); + + public static final RegistryObject DIAMOND_CHEST = register( + "diamond_chest", () -> new DiamondChestBlock(Block.Properties.create(Material.IRON).hardnessAndResistance(3.0F)), + () -> diamondChestRenderer()); + + public static final RegistryObject COPPER_CHEST = register( + "copper_chest", () -> new CopperChestBlock(Block.Properties.create(Material.IRON).hardnessAndResistance(3.0F)), + () -> copperChestRenderer()); + + public static final RegistryObject SILVER_CHEST = register( + "silver_chest", () -> new SilverChestBlock(Block.Properties.create(Material.IRON).hardnessAndResistance(3.0F)), + () -> silverChestRenderer()); + + public static final RegistryObject CRYSTAL_CHEST = register( + "crystal_chest", () -> new CrystalChestBlock(Block.Properties.create(Material.IRON).hardnessAndResistance(3.0F)), + () -> crystalChestRenderer()); + + public static final RegistryObject OBSIDIAN_CHEST = register( + "obsidian_chest", () -> new ObsidianChestBlock(Block.Properties.create(Material.IRON).hardnessAndResistance(3.0F, 10000.0F)), + () -> obsidianChestRenderer()); + + public static final RegistryObject DIRT_CHEST = register( + "dirt_chest", () -> new DirtChestBlock(Block.Properties.create(Material.IRON).hardnessAndResistance(3.0F)), + () -> dirtChestRenderer()); + + private static RegistryObject register(String name, Supplier sup, Supplier> renderMethod) { + return register(name, sup, block -> item(block, renderMethod)); + } + + private static RegistryObject register(String name, Supplier sup, Function, Supplier> itemCreator) { + RegistryObject ret = registerNoItem(name, sup); + ITEMS.register(name, itemCreator.apply(ret)); + return ret; + } + + private static RegistryObject registerNoItem(String name, Supplier sup) { + return BLOCKS.register(name, sup); + } + + private static Supplier item(final RegistryObject block, final Supplier> renderMethod) { + return () -> new BlockItem(block.get(), new Item.Properties().group(IronChests.IRONCHESTS_ITEM_GROUP).setISTER(renderMethod)); + } + + @OnlyIn(Dist.CLIENT) + private static Callable ironChestRenderer() { + return () -> new IronChestItemStackRenderer(IronChestTileEntity::new); + } + + @OnlyIn(Dist.CLIENT) + private static Callable goldChestRenderer() { + return () -> new IronChestItemStackRenderer(GoldChestTileEntity::new); + } + + @OnlyIn(Dist.CLIENT) + private static Callable diamondChestRenderer() { + return () -> new IronChestItemStackRenderer(DiamondChestTileEntity::new); + } + + @OnlyIn(Dist.CLIENT) + private static Callable copperChestRenderer() { + return () -> new IronChestItemStackRenderer(CopperChestTileEntity::new); + } + + @OnlyIn(Dist.CLIENT) + private static Callable silverChestRenderer() { + return () -> new IronChestItemStackRenderer(SilverChestTileEntity::new); + } + + @OnlyIn(Dist.CLIENT) + private static Callable crystalChestRenderer() { + return () -> new IronChestItemStackRenderer(CrystalChestTileEntity::new); + } + + @OnlyIn(Dist.CLIENT) + private static Callable obsidianChestRenderer() { + return () -> new IronChestItemStackRenderer(ObsidianChestTileEntity::new); + } + + @OnlyIn(Dist.CLIENT) + private static Callable dirtChestRenderer() { + return () -> new IronChestItemStackRenderer(DirtChestTileEntity::new); + } +} diff --git a/src/main/java/com/progwml6/ironchest/common/block/IronChestsTypes.java b/src/main/java/com/progwml6/ironchest/common/block/IronChestsTypes.java new file mode 100644 index 00000000..20688049 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/block/IronChestsTypes.java @@ -0,0 +1,123 @@ +package com.progwml6.ironchest.common.block; + +import com.progwml6.ironchest.common.Util; +import com.progwml6.ironchest.common.block.tileentity.CopperChestTileEntity; +import com.progwml6.ironchest.common.block.tileentity.CrystalChestTileEntity; +import com.progwml6.ironchest.common.block.tileentity.DiamondChestTileEntity; +import com.progwml6.ironchest.common.block.tileentity.DirtChestTileEntity; +import com.progwml6.ironchest.common.block.tileentity.GenericIronChestTileEntity; +import com.progwml6.ironchest.common.block.tileentity.GoldChestTileEntity; +import com.progwml6.ironchest.common.block.tileentity.IronChestTileEntity; +import com.progwml6.ironchest.common.block.tileentity.ObsidianChestTileEntity; +import com.progwml6.ironchest.common.block.tileentity.SilverChestTileEntity; +import net.minecraft.block.Block; +import net.minecraft.block.Blocks; +import net.minecraft.util.IStringSerializable; +import net.minecraft.util.ResourceLocation; + +import javax.annotation.Nullable; +import java.util.Locale; + +public enum IronChestsTypes implements IStringSerializable { + + IRON(54, 9, 184, 222, new ResourceLocation("ironchest", "textures/gui/iron_container.png"), 256, 256), + GOLD(81, 9, 184, 276, new ResourceLocation("ironchest", "textures/gui/gold_container.png"), 256, 276), + DIAMOND(108, 12, 238, 276, new ResourceLocation("ironchest", "textures/gui/diamond_container.png"), 256, 276), + COPPER(45, 9, 184, 204, new ResourceLocation("ironchest", "textures/gui/copper_container.png"), 256, 256), + SILVER(72, 9, 184, 258, new ResourceLocation("ironchest", "textures/gui/silver_container.png"), 256, 276), + CRYSTAL(108, 12, 238, 276, new ResourceLocation("ironchest", "textures/gui/diamond_container.png"), 256, 276), + OBSIDIAN(108, 12, 238, 276, new ResourceLocation("ironchest", "textures/gui/diamond_container.png"), 256, 276), + DIRT(1, 1, 184, 184, new ResourceLocation("ironchest", "textures/gui/dirt_container.png"), 256, 256), + WOOD(0, 0, 0, 0, null, 0, 0); + + private final String name; + public final int size; + public final int rowLength; + public final int xSize; + public final int ySize; + public final ResourceLocation guiTexture; + public final int textureXSize; + public final int textureYSize; + + IronChestsTypes(int size, int rowLength, int xSize, int ySize, ResourceLocation guiTexture, int textureXSize, int textureYSize) { + this(null, size, rowLength, xSize, ySize, guiTexture, textureXSize, textureYSize); + } + + IronChestsTypes(@Nullable String name, int size, int rowLength, int xSize, int ySize, ResourceLocation guiTexture, int textureXSize, int textureYSize) { + this.name = name == null ? Util.toEnglishName(this.name()) : name; + this.size = size; + this.rowLength = rowLength; + this.xSize = xSize; + this.ySize = ySize; + this.guiTexture = guiTexture; + this.textureXSize = textureXSize; + this.textureYSize = textureYSize; + } + + public String getId() { + return this.name().toLowerCase(Locale.ROOT); + } + + public String getEnglishName() { + return this.name; + } + + @Override + public String getName() { + return this.getEnglishName(); + } + + public int getRowCount() { + return this.size / this.rowLength; + } + + public boolean isTransparent() { + return this == CRYSTAL; + } + + public static Block get(IronChestsTypes type) { + switch (type) { + case IRON: + return IronChestsBlocks.IRON_CHEST.get(); + case GOLD: + return IronChestsBlocks.GOLD_CHEST.get(); + case DIAMOND: + return IronChestsBlocks.DIAMOND_CHEST.get(); + case COPPER: + return IronChestsBlocks.COPPER_CHEST.get(); + case SILVER: + return IronChestsBlocks.SILVER_CHEST.get(); + case CRYSTAL: + return IronChestsBlocks.CRYSTAL_CHEST.get(); + case OBSIDIAN: + return IronChestsBlocks.OBSIDIAN_CHEST.get(); + case DIRT: + return IronChestsBlocks.DIRT_CHEST.get(); + default: + return Blocks.CHEST; + } + } + + public GenericIronChestTileEntity makeEntity() { + switch (this) { + case IRON: + return new IronChestTileEntity(); + case GOLD: + return new GoldChestTileEntity(); + case DIAMOND: + return new DiamondChestTileEntity(); + case COPPER: + return new CopperChestTileEntity(); + case SILVER: + return new SilverChestTileEntity(); + case CRYSTAL: + return new CrystalChestTileEntity(); + case OBSIDIAN: + return new ObsidianChestTileEntity(); + case DIRT: + return new DirtChestTileEntity(); + default: + return null; + } + } +} diff --git a/src/main/java/com/progwml6/ironchest/common/block/ObsidianChestBlock.java b/src/main/java/com/progwml6/ironchest/common/block/ObsidianChestBlock.java new file mode 100644 index 00000000..01e65019 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/block/ObsidianChestBlock.java @@ -0,0 +1,20 @@ +package com.progwml6.ironchest.common.block; + +import com.progwml6.ironchest.common.block.tileentity.IronChestsTileEntityTypes; +import com.progwml6.ironchest.common.block.tileentity.ObsidianChestTileEntity; +import com.progwml6.ironchest.common.block.tileentity.SilverChestTileEntity; +import net.minecraft.block.BlockState; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.IBlockReader; + +public class ObsidianChestBlock extends GenericIronChestBlock { + + public ObsidianChestBlock(Properties properties) { + super(IronChestsTypes.OBSIDIAN, IronChestsTileEntityTypes.OBSIDIAN_CHEST::get, properties); + } + + @Override + public TileEntity createTileEntity(BlockState state, IBlockReader world) { + return new ObsidianChestTileEntity(); + } +} diff --git a/src/main/java/com/progwml6/ironchest/common/block/SilverChestBlock.java b/src/main/java/com/progwml6/ironchest/common/block/SilverChestBlock.java new file mode 100644 index 00000000..09b58da7 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/block/SilverChestBlock.java @@ -0,0 +1,20 @@ +package com.progwml6.ironchest.common.block; + +import com.progwml6.ironchest.common.block.tileentity.CopperChestTileEntity; +import com.progwml6.ironchest.common.block.tileentity.IronChestsTileEntityTypes; +import com.progwml6.ironchest.common.block.tileentity.SilverChestTileEntity; +import net.minecraft.block.BlockState; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.IBlockReader; + +public class SilverChestBlock extends GenericIronChestBlock { + + public SilverChestBlock(Properties properties) { + super(IronChestsTypes.SILVER, IronChestsTileEntityTypes.SILVER_CHEST::get, properties); + } + + @Override + public TileEntity createTileEntity(BlockState state, IBlockReader world) { + return new SilverChestTileEntity(); + } +} diff --git a/src/main/java/com/progwml6/ironchest/common/block/tileentity/CopperChestTileEntity.java b/src/main/java/com/progwml6/ironchest/common/block/tileentity/CopperChestTileEntity.java new file mode 100644 index 00000000..8de29854 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/block/tileentity/CopperChestTileEntity.java @@ -0,0 +1,19 @@ +package com.progwml6.ironchest.common.block.tileentity; + +import com.progwml6.ironchest.common.block.IronChestsBlocks; +import com.progwml6.ironchest.common.block.IronChestsTypes; +import com.progwml6.ironchest.common.inventory.IronChestContainer; +import net.minecraft.entity.player.PlayerInventory; +import net.minecraft.inventory.container.Container; + +public class CopperChestTileEntity extends GenericIronChestTileEntity { + + public CopperChestTileEntity() { + super(IronChestsTileEntityTypes.COPPER_CHEST.get(), IronChestsTypes.COPPER, IronChestsBlocks.COPPER_CHEST::get); + } + + @Override + protected Container createMenu(int id, PlayerInventory playerInventory) { + return IronChestContainer.createCopperContainer(id, playerInventory, this); + } +} \ No newline at end of file diff --git a/src/main/java/com/progwml6/ironchest/common/block/tileentity/CrystalChestTileEntity.java b/src/main/java/com/progwml6/ironchest/common/block/tileentity/CrystalChestTileEntity.java new file mode 100644 index 00000000..94632edb --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/block/tileentity/CrystalChestTileEntity.java @@ -0,0 +1,186 @@ +package com.progwml6.ironchest.common.block.tileentity; + +import com.progwml6.ironchest.common.block.IronChestsBlocks; +import com.progwml6.ironchest.common.block.IronChestsTypes; +import com.progwml6.ironchest.common.inventory.IronChestContainer; +import net.minecraft.block.BlockState; +import net.minecraft.entity.player.PlayerInventory; +import net.minecraft.inventory.container.Container; +import net.minecraft.item.ItemStack; +import net.minecraft.util.NonNullList; + +import java.util.Collections; + +public class CrystalChestTileEntity extends GenericIronChestTileEntity { + + private NonNullList topStacks; + + private boolean inventoryTouched; + + private boolean hadStuff; + + public CrystalChestTileEntity() { + super(IronChestsTileEntityTypes.CRYSTAL_CHEST.get(), IronChestsTypes.CRYSTAL, IronChestsBlocks.CRYSTAL_CHEST::get); + this.topStacks = NonNullList.withSize(8, ItemStack.EMPTY); + } + + @Override + protected Container createMenu(int id, PlayerInventory playerInventory) { + return IronChestContainer.createCrystalContainer(id, playerInventory, this); + } + + @Override + public void tick() { + super.tick(); + + if (!this.world.isRemote && this.inventoryTouched) { + this.inventoryTouched = false; + + this.sortTopStacks(); + } + } + + @Override + public void setItems(NonNullList contents) { + super.setItems(contents); + + this.inventoryTouched = true; + } + + @Override + public ItemStack getStackInSlot(int index) { + this.inventoryTouched = true; + + return super.getStackInSlot(index); + } + + public NonNullList getTopItems() { + return this.topStacks; + } + + private void sortTopStacks() { + if (!this.getChestType().isTransparent() || (this.world != null && this.world.isRemote)) { + return; + } + + NonNullList tempCopy = NonNullList.withSize(this.getSizeInventory(), ItemStack.EMPTY); + + boolean hasStuff = false; + + int compressedIdx = 0; + + mainLoop: + for (int i = 0; i < this.getSizeInventory(); i++) { + ItemStack itemStack = this.getItems().get(i); + + if (!itemStack.isEmpty()) { + for (int j = 0; j < compressedIdx; j++) { + ItemStack tempCopyStack = tempCopy.get(j); + + if (ItemStack.areItemsEqualIgnoreDurability(tempCopyStack, itemStack)) { + if (itemStack.getCount() != tempCopyStack.getCount()) { + tempCopyStack.grow(itemStack.getCount()); + } + + continue mainLoop; + } + } + + tempCopy.set(compressedIdx, itemStack.copy()); + + compressedIdx++; + + hasStuff = true; + } + } + + if (!hasStuff && this.hadStuff) { + this.hadStuff = false; + + for (int i = 0; i < this.getTopItems().size(); i++) { + this.getTopItems().set(i, ItemStack.EMPTY); + } + + if (this.world != null) { + BlockState iblockstate = this.world.getBlockState(this.pos); + + this.world.notifyBlockUpdate(this.pos, iblockstate, iblockstate, 3); + } + + return; + } + + this.hadStuff = true; + + Collections.sort(tempCopy, (stack1, stack2) -> { + if (stack1.isEmpty()) { + return 1; + } + else if (stack2.isEmpty()) { + return -1; + } + else { + return stack2.getCount() - stack1.getCount(); + } + }); + + int p = 0; + + for (ItemStack element : tempCopy) { + if (!element.isEmpty() && element.getCount() > 0) { + if (p == this.getTopItems().size()) { + break; + } + + this.getTopItems().set(p, element); + + p++; + } + } + + for (int i = p; i < this.getTopItems().size(); i++) { + this.getTopItems().set(i, ItemStack.EMPTY); + } + + if (this.world != null) { + BlockState iblockstate = this.world.getBlockState(this.pos); + + this.world.notifyBlockUpdate(this.pos, iblockstate, iblockstate, 3); + } + + sendTopStacksPacket(); + } + + public NonNullList buildItemStackDataList() { + if (this.getChestType().isTransparent()) { + NonNullList sortList = NonNullList.withSize(this.getTopItems().size(), ItemStack.EMPTY); + + int pos = 0; + + for (ItemStack is : this.topStacks) { + if (!is.isEmpty()) { + sortList.set(pos, is); + } + else { + sortList.set(pos, ItemStack.EMPTY); + } + + pos++; + } + + return sortList; + } + + return NonNullList.withSize(this.getTopItems().size(), ItemStack.EMPTY); + } + + protected void sendTopStacksPacket() { + NonNullList stacks = this.buildItemStackDataList(); + + //PacketHandler.send(PacketDistributor.TRACKING_CHUNK.with(() -> (Chunk) this.getWorld().getChunk(this.getPos())), new PacketTopStackSyncChest(this.getWorld().getDimension().getType().getId(), this.getPos(), stacks)); + } + + public void receiveMessageFromServer(NonNullList topStacks) { + this.topStacks = topStacks; + } +} \ No newline at end of file diff --git a/src/main/java/com/progwml6/ironchest/common/block/tileentity/DiamondChestTileEntity.java b/src/main/java/com/progwml6/ironchest/common/block/tileentity/DiamondChestTileEntity.java new file mode 100644 index 00000000..582ed69f --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/block/tileentity/DiamondChestTileEntity.java @@ -0,0 +1,19 @@ +package com.progwml6.ironchest.common.block.tileentity; + +import com.progwml6.ironchest.common.block.IronChestsBlocks; +import com.progwml6.ironchest.common.block.IronChestsTypes; +import com.progwml6.ironchest.common.inventory.IronChestContainer; +import net.minecraft.entity.player.PlayerInventory; +import net.minecraft.inventory.container.Container; + +public class DiamondChestTileEntity extends GenericIronChestTileEntity { + + public DiamondChestTileEntity() { + super(IronChestsTileEntityTypes.DIAMOND_CHEST.get(), IronChestsTypes.DIAMOND, IronChestsBlocks.DIAMOND_CHEST::get); + } + + @Override + protected Container createMenu(int id, PlayerInventory playerInventory) { + return IronChestContainer.createDiamondContainer(id, playerInventory, this); + } +} diff --git a/src/main/java/com/progwml6/ironchest/common/block/tileentity/DirtChestTileEntity.java b/src/main/java/com/progwml6/ironchest/common/block/tileentity/DirtChestTileEntity.java new file mode 100644 index 00000000..1df6d630 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/block/tileentity/DirtChestTileEntity.java @@ -0,0 +1,71 @@ +package com.progwml6.ironchest.common.block.tileentity; + +import com.progwml6.ironchest.common.block.IronChestsBlocks; +import com.progwml6.ironchest.common.block.IronChestsTypes; +import com.progwml6.ironchest.common.inventory.IronChestContainer; +import net.minecraft.client.resources.I18n; +import net.minecraft.entity.LivingEntity; +import net.minecraft.entity.player.PlayerInventory; +import net.minecraft.inventory.container.Container; +import net.minecraft.item.ItemStack; +import net.minecraft.item.Items; +import net.minecraft.nbt.ListNBT; +import net.minecraft.nbt.StringNBT; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.TranslationTextComponent; + +public class DirtChestTileEntity extends GenericIronChestTileEntity { + + private static ItemStack dirtChest9000GuideBook = new ItemStack(Items.WRITTEN_BOOK); + + private static boolean bookDataCreated = false; + + public DirtChestTileEntity() { + super(IronChestsTileEntityTypes.DIRT_CHEST.get(), IronChestsTypes.DIRT, IronChestsBlocks.DIRT_CHEST::get); + + if (!bookDataCreated) { + //createBookData(); + } + } + + @Override + protected Container createMenu(int id, PlayerInventory playerInventory) { + return IronChestContainer.createDirtContainer(id, playerInventory, this); + } + + @Override + public void wasPlaced(LivingEntity entityLivingBase, ItemStack itemStack) { + if (!(itemStack.hasTag() && itemStack.getTag().getBoolean("been_placed"))) { + //TODO FIX BOOK + //this.setInventorySlotContents(0, dirtChest9000GuideBook.copy()); + } + + if (!bookDataCreated) { + //createBookData(); + } + } + + @Override + public void removeAdornments() { + if (!this.getItems().get(0).isEmpty() && this.getItems().get(0).isItemEqual(dirtChest9000GuideBook)) { + this.getItems().set(0, ItemStack.EMPTY); + } + } + + private static void createBookData() { + dirtChest9000GuideBook.setTagInfo("author", StringNBT.valueOf("cpw")); + + dirtChest9000GuideBook.setTagInfo("title", StringNBT.valueOf(I18n.format("book.ironchest.dirtchest9000.title"))); + + ListNBT pages = new ListNBT(); + pages.add(StringNBT.valueOf(ITextComponent.Serializer.toJson(new TranslationTextComponent("book.ironchest.dirtchest9000.page1")))); + pages.add(StringNBT.valueOf(ITextComponent.Serializer.toJson(new TranslationTextComponent("book.ironchest.dirtchest9000.page2")))); + pages.add(StringNBT.valueOf(ITextComponent.Serializer.toJson(new TranslationTextComponent("book.ironchest.dirtchest9000.page3")))); + pages.add(StringNBT.valueOf(ITextComponent.Serializer.toJson(new TranslationTextComponent("book.ironchest.dirtchest9000.page4")))); + pages.add(StringNBT.valueOf(ITextComponent.Serializer.toJson(new TranslationTextComponent("book.ironchest.dirtchest9000.page5")))); + + dirtChest9000GuideBook.setTagInfo("pages", pages); + + bookDataCreated = true; + } +} diff --git a/src/main/java/com/progwml6/ironchest/common/block/tileentity/GenericIronChestTileEntity.java b/src/main/java/com/progwml6/ironchest/common/block/tileentity/GenericIronChestTileEntity.java new file mode 100644 index 00000000..8291acbc --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/block/tileentity/GenericIronChestTileEntity.java @@ -0,0 +1,267 @@ +package com.progwml6.ironchest.common.block.tileentity; + +import com.progwml6.ironchest.IronChests; +import com.progwml6.ironchest.common.block.GenericIronChestBlock; +import com.progwml6.ironchest.common.block.IronChestsTypes; +import com.progwml6.ironchest.common.inventory.IronChestContainer; +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.entity.LivingEntity; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.entity.player.PlayerInventory; +import net.minecraft.inventory.ItemStackHelper; +import net.minecraft.inventory.container.Container; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.tileentity.IChestLid; +import net.minecraft.tileentity.ITickableTileEntity; +import net.minecraft.tileentity.LockableLootTileEntity; +import net.minecraft.tileentity.LockableTileEntity; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.tileentity.TileEntityType; +import net.minecraft.util.NonNullList; +import net.minecraft.util.SoundCategory; +import net.minecraft.util.SoundEvent; +import net.minecraft.util.SoundEvents; +import net.minecraft.util.math.AxisAlignedBB; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.MathHelper; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.TranslationTextComponent; +import net.minecraft.world.IBlockReader; +import net.minecraft.world.World; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; + +import java.util.function.Supplier; + +@OnlyIn(value = Dist.CLIENT, _interface = IChestLid.class) +public class GenericIronChestTileEntity extends LockableLootTileEntity implements IChestLid, ITickableTileEntity { + + private NonNullList chestContents; + protected float lidAngle; + protected float prevLidAngle; + protected int numPlayersUsing; + private int ticksSinceSync; + private IronChestsTypes chestType; + private Supplier blockToUse; + + protected GenericIronChestTileEntity(TileEntityType typeIn, IronChestsTypes chestTypeIn, Supplier blockToUseIn) { + super(typeIn); + + this.chestContents = NonNullList.withSize(chestTypeIn.size, ItemStack.EMPTY); + this.chestType = chestTypeIn; + this.blockToUse = blockToUseIn; + } + + @Override + public int getSizeInventory() { + return this.getItems().size(); + } + + @Override + public boolean isEmpty() { + for (ItemStack itemstack : this.chestContents) { + if (!itemstack.isEmpty()) { + return false; + } + } + + return true; + } + + @Override + protected ITextComponent getDefaultName() { + return new TranslationTextComponent(IronChests.MODID + ".container."+ this.chestType.getId() + "_chest"); + } + + @Override + public void read(CompoundNBT compound) { + super.read(compound); + + this.chestContents = NonNullList.withSize(this.getSizeInventory(), ItemStack.EMPTY); + + if (!this.checkLootAndRead(compound)) { + ItemStackHelper.loadAllItems(compound, this.chestContents); + } + } + + @Override + public CompoundNBT write(CompoundNBT compound) { + super.write(compound); + + if (!this.checkLootAndWrite(compound)) { + ItemStackHelper.saveAllItems(compound, this.chestContents); + } + + return compound; + } + + @Override + public void tick() { + int i = this.pos.getX(); + int j = this.pos.getY(); + int k = this.pos.getZ(); + ++this.ticksSinceSync; + this.numPlayersUsing = getNumberOfPlayersUsing(this.world, this, this.ticksSinceSync, i, j, k, this.numPlayersUsing); + this.prevLidAngle = this.lidAngle; + float f = 0.1F; + if (this.numPlayersUsing > 0 && this.lidAngle == 0.0F) { + this.playSound(SoundEvents.BLOCK_CHEST_OPEN); + } + + if (this.numPlayersUsing == 0 && this.lidAngle > 0.0F || this.numPlayersUsing > 0 && this.lidAngle < 1.0F) { + float f1 = this.lidAngle; + if (this.numPlayersUsing > 0) { + this.lidAngle += 0.1F; + } + else { + this.lidAngle -= 0.1F; + } + + if (this.lidAngle > 1.0F) { + this.lidAngle = 1.0F; + } + + float f2 = 0.5F; + if (this.lidAngle < 0.5F && f1 >= 0.5F) { + this.playSound(SoundEvents.BLOCK_CHEST_CLOSE); + } + + if (this.lidAngle < 0.0F) { + this.lidAngle = 0.0F; + } + } + } + + public static int getNumberOfPlayersUsing(World worldIn, LockableTileEntity lockableTileEntity, int ticksSinceSync, int x, int y, int z, int numPlayersUsing) { + if (!worldIn.isRemote && numPlayersUsing != 0 && (ticksSinceSync + x + y + z) % 200 == 0) { + numPlayersUsing = getNumberOfPlayersUsing(worldIn, lockableTileEntity, x, y, z); + } + + return numPlayersUsing; + } + + public static int getNumberOfPlayersUsing(World world, LockableTileEntity lockableTileEntity, int x, int y, int z) { + int i = 0; + + for (PlayerEntity playerentity : world.getEntitiesWithinAABB(PlayerEntity.class, new AxisAlignedBB((double) ((float) x - 5.0F), (double) ((float) y - 5.0F), (double) ((float) z - 5.0F), (double) ((float) (x + 1) + 5.0F), (double) ((float) (y + 1) + 5.0F), (double) ((float) (z + 1) + 5.0F)))) { + if (playerentity.openContainer instanceof IronChestContainer) { + ++i; + } + } + + return i; + } + + private void playSound(SoundEvent soundIn) { + double d0 = (double) this.pos.getX() + 0.5D; + double d1 = (double) this.pos.getY() + 0.5D; + double d2 = (double) this.pos.getZ() + 0.5D; + + this.world.playSound((PlayerEntity) null, d0, d1, d2, soundIn, SoundCategory.BLOCKS, 0.5F, this.world.rand.nextFloat() * 0.1F + 0.9F); + } + + @Override + public boolean receiveClientEvent(int id, int type) { + if (id == 1) { + this.numPlayersUsing = type; + return true; + } + else { + return super.receiveClientEvent(id, type); + } + } + + @Override + public void openInventory(PlayerEntity player) { + if (!player.isSpectator()) { + if (this.numPlayersUsing < 0) { + this.numPlayersUsing = 0; + } + + ++this.numPlayersUsing; + this.onOpenOrClose(); + } + } + + @Override + public void closeInventory(PlayerEntity player) { + if (!player.isSpectator()) { + --this.numPlayersUsing; + this.onOpenOrClose(); + } + } + + protected void onOpenOrClose() { + Block block = this.getBlockState().getBlock(); + + if (block instanceof GenericIronChestBlock) { + this.world.addBlockEvent(this.pos, block, 1, this.numPlayersUsing); + this.world.notifyNeighborsOfStateChange(this.pos, block); + } + } + + @Override + public NonNullList getItems() { + return this.chestContents; + } + + @Override + public void setItems(NonNullList itemsIn) { + this.chestContents = NonNullList.withSize(this.getChestType().size, ItemStack.EMPTY); + + for (int i = 0; i < itemsIn.size(); i++) { + if (i < this.chestContents.size()) { + this.getItems().set(i, itemsIn.get(i)); + } + } + } + + @Override + @OnlyIn(Dist.CLIENT) + public float getLidAngle(float partialTicks) { + return MathHelper.lerp(partialTicks, this.prevLidAngle, this.lidAngle); + } + + public static int getPlayersUsing(IBlockReader reader, BlockPos posIn) { + BlockState blockstate = reader.getBlockState(posIn); + if (blockstate.hasTileEntity()) { + TileEntity tileentity = reader.getTileEntity(posIn); + if (tileentity instanceof GenericIronChestTileEntity) { + return ((GenericIronChestTileEntity) tileentity).numPlayersUsing; + } + } + + return 0; + } + + @Override + protected Container createMenu(int windowId, PlayerInventory playerInventory) { + return IronChestContainer.createIronContainer(windowId, playerInventory, this); + } + + public void wasPlaced(LivingEntity livingEntity, ItemStack stack) { + } + + public void removeAdornments() { + } + + public IronChestsTypes getChestType() { + IronChestsTypes type = IronChestsTypes.IRON; + + if (this.hasWorld()) { + IronChestsTypes typeFromBlock = GenericIronChestBlock.getTypeFromBlock(this.getBlockState().getBlock()); + + if (typeFromBlock != null) { + type = typeFromBlock; + } + } + + return type; + } + + public Block getBlockToUse() { + return this.blockToUse.get(); + } +} diff --git a/src/main/java/com/progwml6/ironchest/common/block/tileentity/GoldChestTileEntity.java b/src/main/java/com/progwml6/ironchest/common/block/tileentity/GoldChestTileEntity.java new file mode 100644 index 00000000..0664838d --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/block/tileentity/GoldChestTileEntity.java @@ -0,0 +1,19 @@ +package com.progwml6.ironchest.common.block.tileentity; + +import com.progwml6.ironchest.common.block.IronChestsBlocks; +import com.progwml6.ironchest.common.block.IronChestsTypes; +import com.progwml6.ironchest.common.inventory.IronChestContainer; +import net.minecraft.entity.player.PlayerInventory; +import net.minecraft.inventory.container.Container; + +public class GoldChestTileEntity extends GenericIronChestTileEntity { + + public GoldChestTileEntity() { + super(IronChestsTileEntityTypes.GOLD_CHEST.get(), IronChestsTypes.GOLD, IronChestsBlocks.GOLD_CHEST::get); + } + + @Override + protected Container createMenu(int id, PlayerInventory playerInventory) { + return IronChestContainer.createGoldContainer(id, playerInventory, this); + } +} diff --git a/src/main/java/com/progwml6/ironchest/common/block/tileentity/IronChestTileEntity.java b/src/main/java/com/progwml6/ironchest/common/block/tileentity/IronChestTileEntity.java new file mode 100644 index 00000000..72bddb8d --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/block/tileentity/IronChestTileEntity.java @@ -0,0 +1,11 @@ +package com.progwml6.ironchest.common.block.tileentity; + +import com.progwml6.ironchest.common.block.IronChestsBlocks; +import com.progwml6.ironchest.common.block.IronChestsTypes; + +public class IronChestTileEntity extends GenericIronChestTileEntity { + + public IronChestTileEntity() { + super(IronChestsTileEntityTypes.IRON_CHEST.get(), IronChestsTypes.IRON, IronChestsBlocks.IRON_CHEST::get); + } +} diff --git a/src/main/java/com/progwml6/ironchest/common/block/tileentity/IronChestsTileEntityTypes.java b/src/main/java/com/progwml6/ironchest/common/block/tileentity/IronChestsTileEntityTypes.java new file mode 100644 index 00000000..86b8cb74 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/block/tileentity/IronChestsTileEntityTypes.java @@ -0,0 +1,38 @@ +package com.progwml6.ironchest.common.block.tileentity; + +import com.google.common.collect.Sets; +import com.progwml6.ironchest.IronChests; +import com.progwml6.ironchest.common.block.IronChestsBlocks; +import net.minecraft.tileentity.TileEntityType; +import net.minecraftforge.fml.RegistryObject; +import net.minecraftforge.registries.DeferredRegister; +import net.minecraftforge.registries.ForgeRegistries; + +public class IronChestsTileEntityTypes { + + public static final DeferredRegister> TILE_ENTITIES = new DeferredRegister<>(ForgeRegistries.TILE_ENTITIES, IronChests.MODID); + + public static final RegistryObject> IRON_CHEST = TILE_ENTITIES.register( + "iron_chest", () -> new TileEntityType<>(IronChestTileEntity::new, Sets.newHashSet(IronChestsBlocks.IRON_CHEST.get()), null)); + + public static final RegistryObject> GOLD_CHEST = TILE_ENTITIES.register( + "gold_chest", () -> new TileEntityType<>(GoldChestTileEntity::new, Sets.newHashSet(IronChestsBlocks.GOLD_CHEST.get()), null)); + + public static final RegistryObject> DIAMOND_CHEST = TILE_ENTITIES.register( + "diamond_chest", () -> new TileEntityType<>(DiamondChestTileEntity::new, Sets.newHashSet(IronChestsBlocks.DIAMOND_CHEST.get()), null)); + + public static final RegistryObject> COPPER_CHEST = TILE_ENTITIES.register( + "copper_chest", () -> new TileEntityType<>(CopperChestTileEntity::new, Sets.newHashSet(IronChestsBlocks.COPPER_CHEST.get()), null)); + + public static final RegistryObject> SILVER_CHEST = TILE_ENTITIES.register( + "silver_chest", () -> new TileEntityType<>(SilverChestTileEntity::new, Sets.newHashSet(IronChestsBlocks.SILVER_CHEST.get()), null)); + + public static final RegistryObject> CRYSTAL_CHEST = TILE_ENTITIES.register( + "crystal_chest", () -> new TileEntityType<>(CrystalChestTileEntity::new, Sets.newHashSet(IronChestsBlocks.CRYSTAL_CHEST.get()), null)); + + public static final RegistryObject> OBSIDIAN_CHEST = TILE_ENTITIES.register( + "obsidian_chest", () -> new TileEntityType<>(ObsidianChestTileEntity::new, Sets.newHashSet(IronChestsBlocks.OBSIDIAN_CHEST.get()), null)); + + public static final RegistryObject> DIRT_CHEST = TILE_ENTITIES.register( + "dirt_chest", () -> new TileEntityType<>(DirtChestTileEntity::new, Sets.newHashSet(IronChestsBlocks.DIRT_CHEST.get()), null)); +} diff --git a/src/main/java/com/progwml6/ironchest/common/block/tileentity/ObsidianChestTileEntity.java b/src/main/java/com/progwml6/ironchest/common/block/tileentity/ObsidianChestTileEntity.java new file mode 100644 index 00000000..654bb0c0 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/block/tileentity/ObsidianChestTileEntity.java @@ -0,0 +1,19 @@ +package com.progwml6.ironchest.common.block.tileentity; + +import com.progwml6.ironchest.common.block.IronChestsBlocks; +import com.progwml6.ironchest.common.block.IronChestsTypes; +import com.progwml6.ironchest.common.inventory.IronChestContainer; +import net.minecraft.entity.player.PlayerInventory; +import net.minecraft.inventory.container.Container; + +public class ObsidianChestTileEntity extends GenericIronChestTileEntity { + + public ObsidianChestTileEntity() { + super(IronChestsTileEntityTypes.OBSIDIAN_CHEST.get(), IronChestsTypes.OBSIDIAN, IronChestsBlocks.OBSIDIAN_CHEST::get); + } + + @Override + protected Container createMenu(int id, PlayerInventory playerInventory) { + return IronChestContainer.createObsidianContainer(id, playerInventory, this); + } +} diff --git a/src/main/java/com/progwml6/ironchest/common/block/tileentity/SilverChestTileEntity.java b/src/main/java/com/progwml6/ironchest/common/block/tileentity/SilverChestTileEntity.java new file mode 100644 index 00000000..70194898 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/block/tileentity/SilverChestTileEntity.java @@ -0,0 +1,19 @@ +package com.progwml6.ironchest.common.block.tileentity; + +import com.progwml6.ironchest.common.block.IronChestsBlocks; +import com.progwml6.ironchest.common.block.IronChestsTypes; +import com.progwml6.ironchest.common.inventory.IronChestContainer; +import net.minecraft.entity.player.PlayerInventory; +import net.minecraft.inventory.container.Container; + +public class SilverChestTileEntity extends GenericIronChestTileEntity { + + public SilverChestTileEntity() { + super(IronChestsTileEntityTypes.SILVER_CHEST.get(), IronChestsTypes.SILVER, IronChestsBlocks.SILVER_CHEST::get); + } + + @Override + protected Container createMenu(int id, PlayerInventory playerInventory) { + return IronChestContainer.createSilverContainer(id, playerInventory, this); + } +} \ No newline at end of file diff --git a/src/main/java/com/progwml6/ironchest/common/inventory/DirtChestSlot.java b/src/main/java/com/progwml6/ironchest/common/inventory/DirtChestSlot.java new file mode 100644 index 00000000..44fa6186 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/inventory/DirtChestSlot.java @@ -0,0 +1,19 @@ +package com.progwml6.ironchest.common.inventory; + +import net.minecraft.block.Blocks; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.container.Slot; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; + +public class DirtChestSlot extends Slot { + + public DirtChestSlot(IInventory inventoryIn, int slotIndex, int xPosition, int yPosition) { + super(inventoryIn, slotIndex, xPosition, yPosition); + } + + @Override + public boolean isItemValid(ItemStack stack) { + return stack.isEmpty() || stack.getItem() == Item.getItemFromBlock(Blocks.DIRT); + } +} \ No newline at end of file diff --git a/src/main/java/com/progwml6/ironchest/common/inventory/IronChestContainer.java b/src/main/java/com/progwml6/ironchest/common/inventory/IronChestContainer.java new file mode 100644 index 00000000..b577ed9f --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/inventory/IronChestContainer.java @@ -0,0 +1,167 @@ +package com.progwml6.ironchest.common.inventory; + +import com.progwml6.ironchest.common.block.IronChestsTypes; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.entity.player.PlayerInventory; +import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.Inventory; +import net.minecraft.inventory.container.Container; +import net.minecraft.inventory.container.ContainerType; +import net.minecraft.inventory.container.Slot; +import net.minecraft.item.ItemStack; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; + +public class IronChestContainer extends Container { + + private final IInventory inventory; + + private final IronChestsTypes chestType; + + private IronChestContainer(ContainerType containerType, int windowId, PlayerInventory playerInventory) { + this(containerType, windowId, playerInventory, new Inventory(IronChestsTypes.WOOD.size), IronChestsTypes.WOOD); + } + + public static IronChestContainer createIronContainer(int windowId, PlayerInventory playerInventory) { + return new IronChestContainer(IronChestsContainerTypes.IRON_CHEST.get(), windowId, playerInventory, new Inventory(IronChestsTypes.IRON.size), IronChestsTypes.IRON); + } + + public static IronChestContainer createIronContainer(int windowId, PlayerInventory playerInventory, IInventory inventory) { + return new IronChestContainer(IronChestsContainerTypes.IRON_CHEST.get(), windowId, playerInventory, inventory, IronChestsTypes.IRON); + } + + public static IronChestContainer createGoldContainer(int windowId, PlayerInventory playerInventory) { + return new IronChestContainer(IronChestsContainerTypes.GOLD_CHEST.get(), windowId, playerInventory, new Inventory(IronChestsTypes.GOLD.size), IronChestsTypes.GOLD); + } + + public static IronChestContainer createGoldContainer(int windowId, PlayerInventory playerInventory, IInventory inventory) { + return new IronChestContainer(IronChestsContainerTypes.GOLD_CHEST.get(), windowId, playerInventory, inventory, IronChestsTypes.GOLD); + } + + public static IronChestContainer createDiamondContainer(int windowId, PlayerInventory playerInventory) { + return new IronChestContainer(IronChestsContainerTypes.DIAMOND_CHEST.get(), windowId, playerInventory, new Inventory(IronChestsTypes.DIAMOND.size), IronChestsTypes.DIAMOND); + } + + public static IronChestContainer createDiamondContainer(int windowId, PlayerInventory playerInventory, IInventory inventory) { + return new IronChestContainer(IronChestsContainerTypes.DIAMOND_CHEST.get(), windowId, playerInventory, inventory, IronChestsTypes.DIAMOND); + } + + public static IronChestContainer createCrystalContainer(int windowId, PlayerInventory playerInventory) { + return new IronChestContainer(IronChestsContainerTypes.CRYSTAL_CHEST.get(), windowId, playerInventory, new Inventory(IronChestsTypes.CRYSTAL.size), IronChestsTypes.CRYSTAL); + } + + public static IronChestContainer createCrystalContainer(int windowId, PlayerInventory playerInventory, IInventory inventory) { + return new IronChestContainer(IronChestsContainerTypes.CRYSTAL_CHEST.get(), windowId, playerInventory, inventory, IronChestsTypes.CRYSTAL); + } + + public static IronChestContainer createCopperContainer(int windowId, PlayerInventory playerInventory) { + return new IronChestContainer(IronChestsContainerTypes.COPPER_CHEST.get(), windowId, playerInventory, new Inventory(IronChestsTypes.COPPER.size), IronChestsTypes.COPPER); + } + + public static IronChestContainer createCopperContainer(int windowId, PlayerInventory playerInventory, IInventory inventory) { + return new IronChestContainer(IronChestsContainerTypes.COPPER_CHEST.get(), windowId, playerInventory, inventory, IronChestsTypes.COPPER); + } + + public static IronChestContainer createSilverContainer(int windowId, PlayerInventory playerInventory) { + return new IronChestContainer(IronChestsContainerTypes.SILVER_CHEST.get(), windowId, playerInventory, new Inventory(IronChestsTypes.CRYSTAL.size), IronChestsTypes.SILVER); + } + + public static IronChestContainer createSilverContainer(int windowId, PlayerInventory playerInventory, IInventory inventory) { + return new IronChestContainer(IronChestsContainerTypes.SILVER_CHEST.get(), windowId, playerInventory, inventory, IronChestsTypes.SILVER); + } + + public static IronChestContainer createObsidianContainer(int windowId, PlayerInventory playerInventory) { + return new IronChestContainer(IronChestsContainerTypes.OBSIDIAN_CHEST.get(), windowId, playerInventory, new Inventory(IronChestsTypes.OBSIDIAN.size), IronChestsTypes.OBSIDIAN); + } + + public static IronChestContainer createObsidianContainer(int windowId, PlayerInventory playerInventory, IInventory inventory) { + return new IronChestContainer(IronChestsContainerTypes.OBSIDIAN_CHEST.get(), windowId, playerInventory, inventory, IronChestsTypes.OBSIDIAN); + } + + public static IronChestContainer createDirtContainer(int windowId, PlayerInventory playerInventory) { + return new IronChestContainer(IronChestsContainerTypes.DIRT_CHEST.get(), windowId, playerInventory, new Inventory(IronChestsTypes.DIRT.size), IronChestsTypes.DIRT); + } + + public static IronChestContainer createDirtContainer(int windowId, PlayerInventory playerInventory, IInventory inventory) { + return new IronChestContainer(IronChestsContainerTypes.DIRT_CHEST.get(), windowId, playerInventory, inventory, IronChestsTypes.DIRT); + } + + public IronChestContainer(ContainerType containerType, int windowId, PlayerInventory playerInventory, IInventory inventory, IronChestsTypes chestType) { + super(containerType, windowId); + assertInventorySize(inventory, chestType.size); + + this.inventory = inventory; + this.chestType = chestType; + + inventory.openInventory(playerInventory.player); + + if (chestType == IronChestsTypes.DIRT) { + this.addSlot(new DirtChestSlot(inventory, 0, 12 + 4 * 18, 8 + 2 * 18)); + } + else { + for (int chestRow = 0; chestRow < chestType.getRowCount(); chestRow++) { + for (int chestCol = 0; chestCol < chestType.rowLength; chestCol++) { + this.addSlot(new Slot(inventory, chestCol + chestRow * chestType.rowLength, 12 + chestCol * 18, 18 + chestRow * 18)); + } + } + } + + int leftCol = (chestType.xSize - 162) / 2 + 1; + + for (int playerInvRow = 0; playerInvRow < 3; playerInvRow++) { + for (int playerInvCol = 0; playerInvCol < 9; playerInvCol++) { + this.addSlot(new Slot(playerInventory, playerInvCol + playerInvRow * 9 + 9, leftCol + playerInvCol * 18, chestType.ySize - (4 - playerInvRow) * 18 - 10)); + } + + } + + for (int hotbarSlot = 0; hotbarSlot < 9; hotbarSlot++) { + this.addSlot(new Slot(playerInventory, hotbarSlot, leftCol + hotbarSlot * 18, chestType.ySize - 24)); + } + } + + @Override + public boolean canInteractWith(PlayerEntity playerIn) { + return this.inventory.isUsableByPlayer(playerIn); + } + + @Override + public ItemStack transferStackInSlot(PlayerEntity playerIn, int index) { + ItemStack itemstack = ItemStack.EMPTY; + Slot slot = this.inventorySlots.get(index); + + if (slot != null && slot.getHasStack()) { + ItemStack itemstack1 = slot.getStack(); + itemstack = itemstack1.copy(); + + if (index < this.chestType.size) { + if (!this.mergeItemStack(itemstack1, this.chestType.size, this.inventorySlots.size(), true)) { + return ItemStack.EMPTY; + } + } + else if (!this.mergeItemStack(itemstack1, 0, this.chestType.size, false)) { + return ItemStack.EMPTY; + } + + if (itemstack1.isEmpty()) { + slot.putStack(ItemStack.EMPTY); + } + else { + slot.onSlotChanged(); + } + } + + return itemstack; + } + + @Override + public void onContainerClosed(PlayerEntity playerIn) { + super.onContainerClosed(playerIn); + this.inventory.closeInventory(playerIn); + } + + @OnlyIn(Dist.CLIENT) + public IronChestsTypes getChestType() { + return this.chestType; + } +} \ No newline at end of file diff --git a/src/main/java/com/progwml6/ironchest/common/inventory/IronChestsContainerTypes.java b/src/main/java/com/progwml6/ironchest/common/inventory/IronChestsContainerTypes.java new file mode 100644 index 00000000..1a39fc22 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/inventory/IronChestsContainerTypes.java @@ -0,0 +1,28 @@ +package com.progwml6.ironchest.common.inventory; + +import com.progwml6.ironchest.IronChests; +import net.minecraft.inventory.container.ContainerType; +import net.minecraftforge.fml.RegistryObject; +import net.minecraftforge.registries.DeferredRegister; +import net.minecraftforge.registries.ForgeRegistries; + +public class IronChestsContainerTypes { + + public static final DeferredRegister> CONTAINERS = new DeferredRegister<>(ForgeRegistries.CONTAINERS, IronChests.MODID); + + public static final RegistryObject> IRON_CHEST = CONTAINERS.register("iron_chest", () -> new ContainerType<>(IronChestContainer::createIronContainer)); + + public static final RegistryObject> GOLD_CHEST = CONTAINERS.register("gold_chest", () -> new ContainerType<>(IronChestContainer::createGoldContainer)); + + public static final RegistryObject> DIAMOND_CHEST = CONTAINERS.register("diamond_chest", () -> new ContainerType<>(IronChestContainer::createDiamondContainer)); + + public static final RegistryObject> CRYSTAL_CHEST = CONTAINERS.register("crystal_chest", () -> new ContainerType<>(IronChestContainer::createCrystalContainer)); + + public static final RegistryObject> COPPER_CHEST = CONTAINERS.register("copper_chest", () -> new ContainerType<>(IronChestContainer::createCopperContainer)); + + public static final RegistryObject> SILVER_CHEST = CONTAINERS.register("silver_chest", () -> new ContainerType<>(IronChestContainer::createSilverContainer)); + + public static final RegistryObject> OBSIDIAN_CHEST = CONTAINERS.register("obsidian_chest", () -> new ContainerType<>(IronChestContainer::createObsidianContainer)); + + public static final RegistryObject> DIRT_CHEST = CONTAINERS.register("dirt_chest", () -> new ContainerType<>(IronChestContainer::createDirtContainer)); +} diff --git a/src/main/java/com/progwml6/ironchest/common/item/ChestUpgradeItem.java b/src/main/java/com/progwml6/ironchest/common/item/ChestUpgradeItem.java new file mode 100644 index 00000000..5f5e0035 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/item/ChestUpgradeItem.java @@ -0,0 +1,160 @@ +package com.progwml6.ironchest.common.item; + +import com.progwml6.ironchest.common.block.GenericIronChestBlock; +import com.progwml6.ironchest.common.block.IronChestsTypes; +import com.progwml6.ironchest.common.block.tileentity.GenericIronChestTileEntity; +import net.minecraft.block.BlockState; +import net.minecraft.block.ChestBlock; +import net.minecraft.client.util.ITooltipFlag; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.item.ItemUseContext; +import net.minecraft.tileentity.ChestTileEntity; +import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.ActionResultType; +import net.minecraft.util.Direction; +import net.minecraft.util.NonNullList; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.text.ITextComponent; +import net.minecraft.util.text.TextFormatting; +import net.minecraft.util.text.TranslationTextComponent; +import net.minecraft.world.World; + +import java.util.List; + +public class ChestUpgradeItem extends Item { + + private final IronChestsUpgradeType type; + + public ChestUpgradeItem(IronChestsUpgradeType type, Properties properties) { + super(properties); + this.type = type; + } + + @Override + public void addInformation(ItemStack stack, World worldIn, List tooltip, ITooltipFlag flagIn) { + super.addInformation(stack, worldIn, tooltip, flagIn); + //tooltip.add(new TranslationTextComponent(this.getTranslationKey() + ".desc").applyTextStyle(TextFormatting.GRAY)); + } + + @Override + public ActionResultType onItemUseFirst(ItemStack stack, ItemUseContext context) { + PlayerEntity entityPlayer = context.getPlayer(); + BlockPos blockPos = context.getPos(); + World world = context.getWorld(); + ItemStack itemStack = context.getItem(); + + if (world.isRemote) { + return ActionResultType.PASS; + } + + if (entityPlayer == null) { + return ActionResultType.PASS; + } + + if (this.type.canUpgrade(IronChestsTypes.WOOD)) { + if (!(world.getBlockState(blockPos).getBlock() instanceof ChestBlock)) { + return ActionResultType.PASS; + } + } + else { + if (world.getBlockState(blockPos).getBlock().getDefaultState() != IronChestsTypes.get(this.type.source).getDefaultState()) { + return ActionResultType.PASS; + } + } + + TileEntity tileEntity = world.getTileEntity(blockPos); + + if (this.type.canUpgrade(IronChestsTypes.WOOD)) { + if (!(tileEntity instanceof ChestTileEntity)) { + return ActionResultType.PASS; + } + } + + GenericIronChestTileEntity newChest = null; + ITextComponent customName = null; + NonNullList chestContents = NonNullList.withSize(27, ItemStack.EMPTY); + Direction chestFacing = Direction.NORTH; + + if (tileEntity != null) { + if (tileEntity instanceof GenericIronChestTileEntity) { + GenericIronChestTileEntity chest = (GenericIronChestTileEntity) tileEntity; + BlockState chestState = world.getBlockState(blockPos); + + if (GenericIronChestTileEntity.getPlayersUsing(world, blockPos) > 0) { + return ActionResultType.PASS; + } + + if (!chest.canOpen(entityPlayer)) { + return ActionResultType.PASS; + } + + chestContents = chest.getItems(); + chestFacing = chestState.get(GenericIronChestBlock.FACING); + customName = chest.getCustomName(); + newChest = this.type.target.makeEntity(); + + if (newChest == null) { + return ActionResultType.PASS; + } + } + else if (tileEntity instanceof ChestTileEntity) { + BlockState chestState = world.getBlockState(blockPos); + chestFacing = chestState.get(ChestBlock.FACING); + ChestTileEntity chest = (ChestTileEntity) tileEntity; + + if (ChestTileEntity.getPlayersUsing(world, blockPos) > 0) { + return ActionResultType.PASS; + } + + if (!chest.canOpen(entityPlayer)) { + return ActionResultType.PASS; + } + + if (!this.type.canUpgrade(IronChestsTypes.WOOD)) { + return ActionResultType.PASS; + } + + chestContents = NonNullList.withSize(chest.getSizeInventory(), ItemStack.EMPTY); + + for (int slot = 0; slot < chestContents.size(); slot++) { + chestContents.set(slot, chest.getStackInSlot(slot)); + } + + customName = chest.getCustomName(); + + newChest = this.type.target.makeEntity(); + } + } + + tileEntity.updateContainingBlockInfo(); + + world.removeTileEntity(blockPos); + world.removeBlock(blockPos, false); + + BlockState iBlockState = IronChestsTypes.get(this.type.target).getDefaultState().with(GenericIronChestBlock.FACING, chestFacing); + + world.setBlockState(blockPos, iBlockState, 3); + world.setTileEntity(blockPos, newChest); + + world.notifyBlockUpdate(blockPos, iBlockState, iBlockState, 3); + + TileEntity tileEntity2 = world.getTileEntity(blockPos); + + if (tileEntity2 instanceof GenericIronChestTileEntity) { + if (customName != null) { + ((GenericIronChestTileEntity) tileEntity2).setCustomName(customName); + } + + ((GenericIronChestTileEntity) tileEntity2).setItems(chestContents); + } + + if (!entityPlayer.abilities.isCreativeMode) { + itemStack.shrink(1); + } + + return ActionResultType.SUCCESS; + } + +} diff --git a/src/main/java/com/progwml6/ironchest/common/item/IronChestsItems.java b/src/main/java/com/progwml6/ironchest/common/item/IronChestsItems.java new file mode 100644 index 00000000..612bf798 --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/item/IronChestsItems.java @@ -0,0 +1,27 @@ +package com.progwml6.ironchest.common.item; + +import com.google.common.collect.ImmutableMap; +import com.progwml6.ironchest.IronChests; +import net.minecraft.item.Item; +import net.minecraftforge.fml.RegistryObject; +import net.minecraftforge.registries.DeferredRegister; +import net.minecraftforge.registries.ForgeRegistries; + +import java.util.Arrays; +import java.util.Locale; +import java.util.function.Function; +import java.util.function.Supplier; +import java.util.stream.Collectors; + +public class IronChestsItems { + + public static final DeferredRegister ITEMS = new DeferredRegister<>(ForgeRegistries.ITEMS, IronChests.MODID); + + public static final ImmutableMap> UPGRADES = ImmutableMap.copyOf(Arrays.stream(IronChestsUpgradeType.values()) + .collect(Collectors.toMap(Function.identity(), type -> register(type.name().toLowerCase(Locale.ROOT) + "_chest_upgrade", + () -> new ChestUpgradeItem(type, new Item.Properties().group(IronChests.IRONCHESTS_ITEM_GROUP).maxStackSize(1)))))); + + private static RegistryObject register(final String name, final Supplier sup) { + return ITEMS.register(name, sup); + } +} diff --git a/src/main/java/com/progwml6/ironchest/common/item/IronChestsUpgradeType.java b/src/main/java/com/progwml6/ironchest/common/item/IronChestsUpgradeType.java new file mode 100644 index 00000000..93d1626d --- /dev/null +++ b/src/main/java/com/progwml6/ironchest/common/item/IronChestsUpgradeType.java @@ -0,0 +1,40 @@ +package com.progwml6.ironchest.common.item; + +import com.progwml6.ironchest.common.Util; +import com.progwml6.ironchest.common.block.IronChestsTypes; + +import static com.progwml6.ironchest.common.block.IronChestsTypes.COPPER; +import static com.progwml6.ironchest.common.block.IronChestsTypes.CRYSTAL; +import static com.progwml6.ironchest.common.block.IronChestsTypes.DIAMOND; +import static com.progwml6.ironchest.common.block.IronChestsTypes.GOLD; +import static com.progwml6.ironchest.common.block.IronChestsTypes.IRON; +import static com.progwml6.ironchest.common.block.IronChestsTypes.OBSIDIAN; +import static com.progwml6.ironchest.common.block.IronChestsTypes.SILVER; +import static com.progwml6.ironchest.common.block.IronChestsTypes.WOOD; + +public enum IronChestsUpgradeType { + + IRON_TO_GOLD(IRON, GOLD), + GOLD_TO_DIAMOND(GOLD, DIAMOND), + COPPER_TO_SILVER(COPPER, SILVER), + SILVER_TO_GOLD(SILVER, GOLD), + COPPER_TO_IRON(COPPER, IRON), + DIAMOND_TO_CRYSTAL(DIAMOND, CRYSTAL), + WOOD_TO_IRON(WOOD, IRON), + WOOD_TO_COPPER(WOOD, COPPER), + DIAMOND_TO_OBSIDIAN(DIAMOND, OBSIDIAN); + + public final String name; + public final IronChestsTypes source; + public final IronChestsTypes target; + + IronChestsUpgradeType(IronChestsTypes source, IronChestsTypes target) { + this.name = Util.toEnglishName(this.name()); + this.source = source; + this.target = target; + } + + public boolean canUpgrade(IronChestsTypes from) { + return from == this.source; + } +} diff --git a/src/main/java/cpw/mods/ironchest/BlockIronChest.java b/src/main/java/cpw/mods/ironchest/BlockIronChest.java deleted file mode 100755 index adb8fb5a..00000000 --- a/src/main/java/cpw/mods/ironchest/BlockIronChest.java +++ /dev/null @@ -1,295 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2012 cpw. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the GNU Public License v3.0 - * which accompanies this distribution, and is available at - * http://www.gnu.org/licenses/gpl.html - * - * Contributors: - * cpw - initial API and implementation - ******************************************************************************/ -package cpw.mods.ironchest; - -import java.util.ArrayList; -import java.util.List; -import java.util.Random; - -import net.minecraft.block.BlockContainer; -import net.minecraft.block.material.Material; -import net.minecraft.block.properties.IProperty; -import net.minecraft.block.properties.PropertyEnum; -import net.minecraft.block.state.BlockState; -import net.minecraft.block.state.IBlockState; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.Container; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.MathHelper; -import net.minecraft.world.Explosion; -import net.minecraft.world.IBlockAccess; -import net.minecraft.world.World; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -import com.google.common.collect.Lists; - -public class BlockIronChest extends BlockContainer -{ - public static final PropertyEnum VARIANT_PROP = PropertyEnum.create("variant", IronChestType.class); - - public BlockIronChest() - { - super(Material.iron); - - this.setDefaultState(this.blockState.getBaseState().withProperty(VARIANT_PROP, IronChestType.IRON)); - - this.setBlockBounds(0.0625F, 0F, 0.0625F, 0.9375F, 0.875F, 0.9375F); - this.setHardness(3.0F); - this.setUnlocalizedName("IronChest"); - this.setCreativeTab(CreativeTabs.tabDecorations); - } - - @Override - public boolean isOpaqueCube() - { - return false; - } - - @Override - public boolean isFullCube() - { - return false; - } - - @Override - public boolean onBlockActivated(World world, BlockPos pos, IBlockState blockState, EntityPlayer player, EnumFacing direction, float p_180639_6_, float p_180639_7_, float p_180639_8_) - { - TileEntity te = world.getTileEntity(pos); - - if (te == null || !(te instanceof TileEntityIronChest)) - { - return true; - } - - if (world.isSideSolid(pos.add(0, 1, 0), EnumFacing.DOWN)) - { - return true; - } - - if (world.isRemote) - { - return true; - } - - player.openGui(IronChest.instance, ((TileEntityIronChest) te).getType().ordinal(), world, pos.getX(), pos.getY(), pos.getZ()); - return true; - } - - @Override - public TileEntity createNewTileEntity(World world, int metadata) - { - return IronChestType.makeEntity(metadata); - } - - @Override - @SideOnly(Side.CLIENT) - public void getSubBlocks(Item itemIn, CreativeTabs tab, List list) - { - for (IronChestType type : IronChestType.values()) - { - if (type.isValidForCreativeMode()) - { - list.add(new ItemStack(itemIn, 1, type.ordinal())); - } - } - } - - @Override - public IBlockState getStateFromMeta(int meta) - { - return this.getDefaultState().withProperty(VARIANT_PROP, IronChestType.values()[meta]); - } - - @Override - public int getMetaFromState(IBlockState blockState) - { - return ((IronChestType) blockState.getValue(VARIANT_PROP)).ordinal(); - } - - @Override - protected BlockState createBlockState() - { - return new BlockState(this, new IProperty[] { VARIANT_PROP }); - } - - @Override - public ArrayList getDrops(IBlockAccess world, BlockPos pos, IBlockState state, int fortune) - { - ArrayList items = Lists.newArrayList(); - ItemStack stack = new ItemStack(this, 1, getMetaFromState(state)); - IronChestType.values()[IronChestType.validateMeta(getMetaFromState(state))].adornItemDrop(stack); - items.add(stack); - return items; - } - - @Override - public void onBlockAdded(World world, BlockPos pos, IBlockState blockState) - { - super.onBlockAdded(world, pos, blockState); - world.markBlockForUpdate(pos); - } - - @Override - public void onBlockPlacedBy(World world, BlockPos pos, IBlockState blockState, EntityLivingBase entityliving, ItemStack itemStack) - { - byte chestFacing = 0; - int facing = MathHelper.floor_double((entityliving.rotationYaw * 4F) / 360F + 0.5D) & 3; - if (facing == 0) - { - chestFacing = 2; - } - if (facing == 1) - { - chestFacing = 5; - } - if (facing == 2) - { - chestFacing = 3; - } - if (facing == 3) - { - chestFacing = 4; - } - TileEntity te = world.getTileEntity(pos); - if (te != null && te instanceof TileEntityIronChest) - { - TileEntityIronChest teic = (TileEntityIronChest) te; - teic.wasPlaced(entityliving, itemStack); - teic.setFacing(chestFacing); - world.markBlockForUpdate(pos); - } - } - - @Override - public int damageDropped(IBlockState state) - { - return IronChestType.validateMeta(((IronChestType) state.getValue(VARIANT_PROP)).ordinal()); - } - - @Override - public void breakBlock(World world, BlockPos pos, IBlockState blockState) - { - TileEntityIronChest tileentitychest = (TileEntityIronChest) world.getTileEntity(pos); - if (tileentitychest != null) - { - tileentitychest.removeAdornments(); - dropContent(0, tileentitychest, world, tileentitychest.getPos()); - } - super.breakBlock(world, pos, blockState); - } - - public void dropContent(int newSize, IInventory chest, World world, BlockPos pos) - { - Random random = world.rand; - - for (int l = newSize; l < chest.getSizeInventory(); l++) - { - ItemStack itemstack = chest.getStackInSlot(l); - if (itemstack == null) - { - continue; - } - float f = random.nextFloat() * 0.8F + 0.1F; - float f1 = random.nextFloat() * 0.8F + 0.1F; - float f2 = random.nextFloat() * 0.8F + 0.1F; - while (itemstack.stackSize > 0) - { - int i1 = random.nextInt(21) + 10; - if (i1 > itemstack.stackSize) - { - i1 = itemstack.stackSize; - } - itemstack.stackSize -= i1; - EntityItem entityitem = new EntityItem(world, pos.getX() + f, (float) pos.getY() + (newSize > 0 ? 1 : 0) + f1, pos.getZ() + f2, new ItemStack(itemstack.getItem(), i1, itemstack.getMetadata())); - float f3 = 0.05F; - entityitem.motionX = (float) random.nextGaussian() * f3; - entityitem.motionY = (float) random.nextGaussian() * f3 + 0.2F; - entityitem.motionZ = (float) random.nextGaussian() * f3; - if (itemstack.hasTagCompound()) - { - entityitem.getEntityItem().setTagCompound((NBTTagCompound) itemstack.getTagCompound().copy()); - } - world.spawnEntityInWorld(entityitem); - } - } - } - - @Override - public float getExplosionResistance(World world, BlockPos pos, Entity exploder, Explosion explosion) - { - TileEntity te = world.getTileEntity(pos); - if (te instanceof TileEntityIronChest) - { - TileEntityIronChest teic = (TileEntityIronChest) te; - if (teic.getType().isExplosionResistant()) - { - return 10000F; - } - } - return super.getExplosionResistance(world, pos, exploder, explosion); - } - - @Override - public boolean hasComparatorInputOverride() - { - return true; - } - - @Override - public int getComparatorInputOverride(World world, BlockPos pos) - { - TileEntity te = world.getTileEntity(pos); - if (te instanceof IInventory) - { - return Container.calcRedstoneFromInventory((IInventory) te); - } - return 0; - } - - private static final EnumFacing[] validRotationAxes = new EnumFacing[] { EnumFacing.UP, EnumFacing.DOWN }; - - @Override - public EnumFacing[] getValidRotations(World worldObj, BlockPos pos) - { - return validRotationAxes; - } - - @Override - public boolean rotateBlock(World worldObj, BlockPos pos, EnumFacing axis) - { - if (worldObj.isRemote) - { - return false; - } - if (axis == EnumFacing.UP || axis == EnumFacing.DOWN) - { - TileEntity tileEntity = worldObj.getTileEntity(pos); - if (tileEntity instanceof TileEntityIronChest) - { - TileEntityIronChest icte = (TileEntityIronChest) tileEntity; - icte.rotateAround(); - } - return true; - } - return false; - } -} \ No newline at end of file diff --git a/src/main/java/cpw/mods/ironchest/ChestChangerType.java b/src/main/java/cpw/mods/ironchest/ChestChangerType.java deleted file mode 100755 index c4a1f0c5..00000000 --- a/src/main/java/cpw/mods/ironchest/ChestChangerType.java +++ /dev/null @@ -1,102 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2012 cpw. All rights reserved. This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 - * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * - * Contributors: cpw - initial API and implementation - ******************************************************************************/ -package cpw.mods.ironchest; - -import static cpw.mods.ironchest.IronChestType.COPPER; -import static cpw.mods.ironchest.IronChestType.CRYSTAL; -import static cpw.mods.ironchest.IronChestType.DIAMOND; -import static cpw.mods.ironchest.IronChestType.GOLD; -import static cpw.mods.ironchest.IronChestType.IRON; -import static cpw.mods.ironchest.IronChestType.OBSIDIAN; -import static cpw.mods.ironchest.IronChestType.SILVER; -import static cpw.mods.ironchest.IronChestType.WOOD; -import net.minecraft.init.Blocks; -import net.minecraft.item.ItemStack; -import net.minecraftforge.fml.common.FMLCommonHandler; -import net.minecraftforge.fml.common.registry.GameRegistry; -import cpw.mods.ironchest.client.ModelHelper; -import net.minecraftforge.fml.relauncher.Side; - -public enum ChestChangerType { - IRONGOLD(IRON, GOLD, "ironGoldUpgrade", "Iron to Gold Chest Upgrade", "mmm", "msm", "mmm"), - GOLDDIAMOND(GOLD, DIAMOND, "goldDiamondUpgrade", "Gold to Diamond Chest Upgrade", "GGG", "msm", "GGG"), - COPPERSILVER(COPPER, SILVER, "copperSilverUpgrade", "Copper to Silver Chest Upgrade", "mmm", "msm", "mmm"), - SILVERGOLD(SILVER, GOLD, "silverGoldUpgrade", "Silver to Gold Chest Upgrade", "mGm", "GsG", "mGm"), - COPPERIRON(COPPER, IRON, "copperIronUpgrade", "Copper to Iron Chest Upgrade", "mGm", "GsG", "mGm"), - DIAMONDCRYSTAL(DIAMOND, CRYSTAL, "diamondCrystalUpgrade", "Diamond to Crystal Chest Upgrade", "GGG", "GOG", "GGG"), - WOODIRON(WOOD, IRON, "woodIronUpgrade", "Normal chest to Iron Chest Upgrade", "mmm", "msm", "mmm"), - WOODCOPPER(WOOD, COPPER, "woodCopperUpgrade", "Normal chest to Copper Chest Upgrade", "mmm", "msm", "mmm"), - DIAMONDOBSIDIAN(DIAMOND, OBSIDIAN, "diamondObsidianUpgrade", "Diamond to Obsidian Chest Upgrade", "mmm", "mGm", "mmm"); - - private IronChestType source; - private IronChestType target; - public String itemName; - public String descriptiveName; - public ItemChestChanger item; - private String[] recipe; - - private ChestChangerType(IronChestType source, IronChestType target, String itemName, String descriptiveName, String... recipe) - { - this.source = source; - this.target = target; - this.itemName = itemName; - this.descriptiveName = descriptiveName; - this.recipe = recipe; - } - - public IronChestType getSource(){ - return source; - } - - public boolean canUpgrade(IronChestType from) - { - return from == this.source; - } - - public int getTarget() - { - return this.target.ordinal(); - } - - public ItemChestChanger buildItem() - { - item = new ItemChestChanger(this); - GameRegistry.registerItem(item, itemName); - if(FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT) - ModelHelper.registerItem(item, "ironchest:" + itemName); - return item; - } - - public void addRecipes() - { - for (String sourceMat : source.getMatList()) - { - for (String targetMat : target.getMatList()) - { - Object targetMaterial = IronChestType.translateOreName(targetMat); - Object sourceMaterial = IronChestType.translateOreName(sourceMat); - IronChestType.addRecipe(new ItemStack(item), recipe, 'm', targetMaterial, 's', sourceMaterial, 'G', "blockGlass", 'O', Blocks.obsidian); - } - } - } - - public static void buildItems() - { - for (ChestChangerType type : values()) - { - type.buildItem(); - } - } - - public static void generateRecipes() - { - for (ChestChangerType item : values()) - { - item.addRecipes(); - } - } -} diff --git a/src/main/java/cpw/mods/ironchest/CommonProxy.java b/src/main/java/cpw/mods/ironchest/CommonProxy.java deleted file mode 100755 index bad478b1..00000000 --- a/src/main/java/cpw/mods/ironchest/CommonProxy.java +++ /dev/null @@ -1,56 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2012 cpw. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the GNU Public License v3.0 - * which accompanies this distribution, and is available at - * http://www.gnu.org/licenses/gpl.html - * - * Contributors: - * cpw - initial API and implementation - ******************************************************************************/ -package cpw.mods.ironchest; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; -import net.minecraftforge.fml.common.network.IGuiHandler; - -public class CommonProxy implements IGuiHandler { - public void registerRenderInformation() - { - - } - - public void registerTileEntitySpecialRenderer(Class typ) - { - - } - - @Override - public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) - { - return null; - } - - @Override - public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) - { - TileEntity te = world.getTileEntity(new BlockPos(x, y, z)); - if (te != null && te instanceof TileEntityIronChest) - { - TileEntityIronChest icte = (TileEntityIronChest) te; - return new ContainerIronChest(player.inventory, icte, icte.getType(), 0, 0); - } - else - { - return null; - } - } - - public World getClientWorld() - { - return null; - } - -} diff --git a/src/main/java/cpw/mods/ironchest/ContainerIronChest.java b/src/main/java/cpw/mods/ironchest/ContainerIronChest.java deleted file mode 100755 index c5f4904d..00000000 --- a/src/main/java/cpw/mods/ironchest/ContainerIronChest.java +++ /dev/null @@ -1,122 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2012 cpw. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the GNU Public License v3.0 - * which accompanies this distribution, and is available at - * http://www.gnu.org/licenses/gpl.html - * - * Contributors: - * cpw - initial API and implementation - ******************************************************************************/ -package cpw.mods.ironchest; - -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.Container; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; - -public class ContainerIronChest extends Container { - private IronChestType type; - private EntityPlayer player; - private IInventory chest; - - public ContainerIronChest(IInventory playerInventory, IInventory chestInventory, IronChestType type, int xSize, int ySize) - { - chest = chestInventory; - player = ((InventoryPlayer) playerInventory).player; - this.type = type; - chestInventory.openInventory(player); - layoutContainer(playerInventory, chestInventory, type, xSize, ySize); - } - - @Override - public boolean canInteractWith(EntityPlayer player) - { - return chest.isUseableByPlayer(player); - } - - @Override - public ItemStack transferStackInSlot(EntityPlayer p, int i) - { - ItemStack itemstack = null; - Slot slot = (Slot) inventorySlots.get(i); - if (slot != null && slot.getHasStack()) - { - ItemStack itemstack1 = slot.getStack(); - itemstack = itemstack1.copy(); - if (i < type.size) - { - if (!mergeItemStack(itemstack1, type.size, inventorySlots.size(), true)) - { - return null; - } - } - else if (!type.acceptsStack(itemstack1)) - { - return null; - } - else if (!mergeItemStack(itemstack1, 0, type.size, false)) - { - return null; - } - if (itemstack1.stackSize == 0) - { - slot.putStack(null); - } - else - { - slot.onSlotChanged(); - } - } - return itemstack; - } - - @Override - public void onContainerClosed(EntityPlayer entityplayer) - { - super.onContainerClosed(entityplayer); - chest.closeInventory(entityplayer); - } - - protected void layoutContainer(IInventory playerInventory, IInventory chestInventory, IronChestType type, int xSize, int ySize) - { - if (type == IronChestType.DIRTCHEST9000) { - addSlotToContainer(type.makeSlot(chestInventory, 0, 12 + 4 * 18, 8 + 2 * 18)); - } else { - for (int chestRow = 0; chestRow < type.getRowCount(); chestRow++) - { - for (int chestCol = 0; chestCol < type.getRowLength(); chestCol++) - { - addSlotToContainer(type.makeSlot(chestInventory, chestCol + chestRow * type.getRowLength(), 12 + chestCol * 18, 8 + chestRow * 18)); - } - } - } - - int leftCol = (xSize - 162) / 2 + 1; - for (int playerInvRow = 0; playerInvRow < 3; playerInvRow++) - { - for (int playerInvCol = 0; playerInvCol < 9; playerInvCol++) - { - addSlotToContainer(new Slot(playerInventory, playerInvCol + playerInvRow * 9 + 9, leftCol + playerInvCol * 18, ySize - (4 - playerInvRow) * 18 - - 10)); - } - - } - - for (int hotbarSlot = 0; hotbarSlot < 9; hotbarSlot++) - { - addSlotToContainer(new Slot(playerInventory, hotbarSlot, leftCol + hotbarSlot * 18, ySize - 24)); - } - } - - public EntityPlayer getPlayer() - { - return player; - } - - public int getNumColumns() { - return type.getRowLength(); - } -} diff --git a/src/main/java/cpw/mods/ironchest/IronChest.java b/src/main/java/cpw/mods/ironchest/IronChest.java deleted file mode 100755 index 9898ce72..00000000 --- a/src/main/java/cpw/mods/ironchest/IronChest.java +++ /dev/null @@ -1,71 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2012 cpw. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the GNU Public License v3.0 - * which accompanies this distribution, and is available at - * http://www.gnu.org/licenses/gpl.html - * - * Contributors: - * cpw - initial API and implementation - ******************************************************************************/ -package cpw.mods.ironchest; - -import io.netty.buffer.ByteBuf; -import net.minecraft.client.renderer.entity.Render; -import net.minecraft.client.renderer.entity.RenderFireball; -import net.minecraft.client.renderer.entity.RenderManager; -import net.minecraft.entity.projectile.EntitySmallFireball; -import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.fml.client.registry.IRenderFactory; -import net.minecraftforge.fml.client.registry.RenderingRegistry; -import net.minecraftforge.fml.common.Mod; -import net.minecraftforge.fml.common.Mod.EventHandler; -import net.minecraftforge.fml.common.Mod.Instance; -import net.minecraftforge.fml.common.SidedProxy; -import net.minecraftforge.fml.common.event.FMLInitializationEvent; -import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; -import net.minecraftforge.fml.common.network.NetworkRegistry; -import net.minecraftforge.fml.common.network.simpleimpl.IMessage; -import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler; -import net.minecraftforge.fml.common.network.simpleimpl.MessageContext; -import net.minecraftforge.fml.common.network.simpleimpl.SimpleNetworkWrapper; -import net.minecraftforge.fml.common.registry.GameRegistry; -import net.minecraftforge.fml.relauncher.Side; - -@Mod(modid = "IronChest", name = "Iron Chests", dependencies = "required-after:Forge@[11.15.0,12.0]", acceptedMinecraftVersions="[1.8,1.8.9]") -public class IronChest -{ - public static BlockIronChest ironChestBlock; - @SidedProxy(clientSide = "cpw.mods.ironchest.client.ClientProxy", serverSide = "cpw.mods.ironchest.CommonProxy") - public static CommonProxy proxy; - @Instance("IronChest") - public static IronChest instance; - - @EventHandler - public void preInit(FMLPreInitializationEvent event) - { - Version.init(event.getVersionProperties()); - event.getModMetadata().version = Version.fullVersionString(); - } - - @EventHandler - public void load(FMLInitializationEvent evt) - { - // Registration has been moved to init to account for the registration of inventory models - // Minecraft.getRenderItem() returns null before this stage - ChestChangerType.buildItems(); - ironChestBlock = new BlockIronChest(); - GameRegistry.registerBlock(ironChestBlock, ItemIronChest.class, "BlockIronChest"); - - for (IronChestType typ : IronChestType.values()) - { - GameRegistry.registerTileEntityWithAlternatives(typ.clazz, "IronChest." + typ.name(), typ.name()); - proxy.registerTileEntitySpecialRenderer(typ.clazz); - } - IronChestType.registerBlocksAndRecipes(ironChestBlock); - ChestChangerType.generateRecipes(); - NetworkRegistry.INSTANCE.registerGuiHandler(instance, proxy); - proxy.registerRenderInformation(); - MinecraftForge.EVENT_BUS.register(new OcelotsSitOnChestsHandler()); - } -} diff --git a/src/main/java/cpw/mods/ironchest/IronChestAIOcelotSit.java b/src/main/java/cpw/mods/ironchest/IronChestAIOcelotSit.java deleted file mode 100755 index a34ca279..00000000 --- a/src/main/java/cpw/mods/ironchest/IronChestAIOcelotSit.java +++ /dev/null @@ -1,24 +0,0 @@ -package cpw.mods.ironchest; - -import net.minecraft.entity.ai.EntityAIOcelotSit; -import net.minecraft.entity.passive.EntityOcelot; -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; - -public class IronChestAIOcelotSit extends EntityAIOcelotSit -{ - public IronChestAIOcelotSit(EntityOcelot par1EntityOcelot, float par2) - { - super(par1EntityOcelot, par2); - } - - @Override - protected boolean shouldMoveTo(World world, BlockPos pos) - { - if (world.getBlockState(pos).getBlock() == IronChest.ironChestBlock) - { - return true; - } - return super.shouldMoveTo(world, pos); - } -} diff --git a/src/main/java/cpw/mods/ironchest/IronChestType.java b/src/main/java/cpw/mods/ironchest/IronChestType.java deleted file mode 100755 index 6dd83b3a..00000000 --- a/src/main/java/cpw/mods/ironchest/IronChestType.java +++ /dev/null @@ -1,223 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2012 cpw. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the GNU Public License v3.0 - * which accompanies this distribution, and is available at - * http://www.gnu.org/licenses/gpl.html - * - * Contributors: - * cpw - initial API and implementation - ******************************************************************************/ -package cpw.mods.ironchest; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import net.minecraft.init.Blocks; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.Slot; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagByte; -import net.minecraft.util.IStringSerializable; -import net.minecraftforge.fml.common.registry.GameRegistry; -import net.minecraftforge.oredict.ShapedOreRecipe; - -public enum IronChestType implements IStringSerializable -{ - IRON(54, 9, true, "Iron Chest", "ironchest.png", 0, Arrays.asList("ingotIron", "ingotRefinedIron"), TileEntityIronChest.class, "mmmmPmmmm", "mGmG3GmGm"), - GOLD(81, 9, true, "Gold Chest", "goldchest.png", 1, Arrays.asList("ingotGold"), TileEntityGoldChest.class, "mmmmPmmmm", "mGmG4GmGm"), - DIAMOND(108, 12, true, "Diamond Chest", "diamondchest.png", 2, Arrays.asList("gemDiamond"), TileEntityDiamondChest.class, "GGGmPmGGG", "GGGG4Gmmm"), - COPPER(45, 9, false, "Copper Chest", "copperchest.png", 3, Arrays.asList("ingotCopper"), TileEntityCopperChest.class, "mmmmCmmmm"), - SILVER(72, 9, false, "Silver Chest", "silverchest.png", 4, Arrays.asList("ingotSilver"), TileEntitySilverChest.class, "mmmm3mmmm", "mGmG0GmGm"), - CRYSTAL(108, 12, true, "Crystal Chest", "crystalchest.png", 5, Arrays.asList("blockGlass"), TileEntityCrystalChest.class, "GGGGPGGGG"), - OBSIDIAN(108, 12, false, "Obsidian Chest", "obsidianchest.png", 6, Arrays.asList("obsidian"), TileEntityObsidianChest.class, "mmmm2mmmm"), - DIRTCHEST9000(1, 1, false, "Dirt Chest 9000", "dirtchest.png",7,Arrays.asList("dirt"), TileEntityDirtChest.class,Item.getItemFromBlock(Blocks.dirt),"mmmmCmmmm"), - WOOD(0, 0, false, "", "", -1, Arrays.asList("plankWood"), null); - int size; - private int rowLength; - public String friendlyName; - private boolean tieredChest; - private String modelTexture; - private int textureRow; - public Class clazz; - private String[] recipes; - private ArrayList matList; - private Item itemFilter; - - IronChestType(int size, int rowLength, boolean tieredChest, String friendlyName, String modelTexture, int textureRow, List mats, - Class clazz, String... recipes) - { - this(size, rowLength, tieredChest, friendlyName, modelTexture, textureRow, mats, clazz, (Item)null, recipes); - } - IronChestType(int size, int rowLength, boolean tieredChest, String friendlyName, String modelTexture, int textureRow, List mats, - Class clazz, Item itemFilter, String... recipes) - { - this.size = size; - this.rowLength = rowLength; - this.tieredChest = tieredChest; - this.friendlyName = friendlyName; - this.modelTexture = modelTexture; - this.textureRow = textureRow; - this.clazz = clazz; - this.itemFilter = itemFilter; - this.recipes = recipes; - this.matList = new ArrayList(); - matList.addAll(mats); - } - - @Override - public String getName() - { - return name().toLowerCase(); - } - - public String getModelTexture() - { - return modelTexture; - } - - public int getTextureRow() - { - return textureRow; - } - - public static TileEntityIronChest makeEntity(int metadata) - { - // Compatibility - int chesttype = validateMeta(metadata); - if (chesttype == metadata) - { - try - { - TileEntityIronChest te = values()[chesttype].clazz.newInstance(); - return te; - } - catch (InstantiationException e) - { - // unpossible - e.printStackTrace(); - } - catch (IllegalAccessException e) - { - // unpossible - e.printStackTrace(); - } - } - return null; - } - - public static void registerBlocksAndRecipes(BlockIronChest blockResult) - { - Object previous = "chestWood"; - for (IronChestType typ : values()) - { - generateRecipesForType(blockResult, previous, typ); - ItemStack chest = new ItemStack(blockResult, 1, typ.ordinal()); - //if (typ.isValidForCreativeMode()) GameRegistry.registerCustomItemStack(typ.friendlyName, chest);//TODO fix this!! - if (typ.tieredChest) previous = chest; - } - } - - public static void generateRecipesForType(BlockIronChest blockResult, Object previousTier, IronChestType type) - { - for (String recipe : type.recipes) - { - String[] recipeSplit = new String[] { recipe.substring(0, 3), recipe.substring(3, 6), recipe.substring(6, 9) }; - Object mainMaterial = null; - for (String mat : type.matList) - { - mainMaterial = translateOreName(mat); - addRecipe(new ItemStack(blockResult, 1, type.ordinal()), recipeSplit, - 'm', mainMaterial, 'P', previousTier, /* previous tier of chest */ - 'G', "blockGlass", 'C', "chestWood", - '0', new ItemStack(blockResult, 1, 0), /* Iron Chest */ - '1', new ItemStack(blockResult, 1, 1), /* Gold Chest */ - '2', new ItemStack(blockResult, 1, 2), /* Diamond Chest */ - '3', new ItemStack(blockResult, 1, 3), /* Copper Chest */ - '4', new ItemStack(blockResult, 1, 4) /* Silver Chest */ - ); - } - } - } - - public static Object translateOreName(String mat) - { - if (mat.equals("obsidian")) - { - return Blocks.obsidian; - } - else if (mat.equals("dirt")) - { - return Blocks.dirt; - } - return mat; - } - - public static void addRecipe(ItemStack is, Object... parts) - { - ShapedOreRecipe oreRecipe = new ShapedOreRecipe(is, parts); - GameRegistry.addRecipe(oreRecipe); - } - - public int getRowCount() - { - return size / rowLength; - } - - public int getRowLength() - { - return rowLength; - } - - public boolean isTransparent() - { - return this == CRYSTAL; - } - - public List getMatList() - { - return matList; - } - - public static int validateMeta(int i) - { - if (i < values().length && values()[i].size > 0) - { - return i; - } - else - { - return 0; - } - } - - public boolean isValidForCreativeMode() - { - return validateMeta(ordinal()) == ordinal(); - } - - public boolean isExplosionResistant() - { - return this == OBSIDIAN; - } - - public Slot makeSlot(IInventory chestInventory, int index, int x, int y) - { - return new ValidatingSlot(chestInventory, index, x, y, this); - } - - public boolean acceptsStack(ItemStack itemstack) - { - return itemFilter == null || itemstack == null || itemstack.getItem() == itemFilter; - } - - public void adornItemDrop(ItemStack item) - { - if (this == DIRTCHEST9000) - { - item.setTagInfo("dirtchest", new NBTTagByte((byte) 1)); - } - } -} \ No newline at end of file diff --git a/src/main/java/cpw/mods/ironchest/ItemChestChanger.java b/src/main/java/cpw/mods/ironchest/ItemChestChanger.java deleted file mode 100755 index b080f890..00000000 --- a/src/main/java/cpw/mods/ironchest/ItemChestChanger.java +++ /dev/null @@ -1,107 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2012 cpw. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the GNU Public License v3.0 - * which accompanies this distribution, and is available at - * http://www.gnu.org/licenses/gpl.html - * - * Contributors: - * cpw - initial API and implementation - ******************************************************************************/ -package cpw.mods.ironchest; - -import net.minecraft.block.BlockChest; -import net.minecraft.creativetab.CreativeTabs; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.tileentity.TileEntityChest; -import net.minecraft.util.BlockPos; -import net.minecraft.util.EnumFacing; -import net.minecraft.world.World; - -public class ItemChestChanger extends Item -{ - private ChestChangerType type; - - public ItemChestChanger(ChestChangerType type) - { - this.type = type; - - this.setMaxStackSize(1); - this.setUnlocalizedName("ironchest:" + type.name()); - this.setCreativeTab(CreativeTabs.tabMisc); - } - - @Override - public boolean onItemUseFirst (ItemStack stack, EntityPlayer player, World world, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ) - { - if (world.isRemote) - return false; - if(this.type.canUpgrade(IronChestType.WOOD)){ - if(!(world.getBlockState(pos).getBlock() instanceof BlockChest)){ - return false; - } - }else{ - if(world.getBlockState(pos) != IronChest.ironChestBlock.getStateFromMeta(IronChestType.valueOf(type.getSource().getName().toUpperCase()).ordinal())){ - return false; - } - } - TileEntity te = world.getTileEntity(pos); - TileEntityIronChest newchest = new TileEntityIronChest(); - ItemStack[] chestContents = new ItemStack[27]; - if (te != null) - { - if (te instanceof TileEntityIronChest) - { - chestContents = ((TileEntityIronChest) te).chestContents; - newchest = IronChestType.makeEntity(this.getTargetChestOrdinal(this.type.ordinal())); - if (newchest == null) - return false; - } - else if (te instanceof TileEntityChest) - { - if (((TileEntityChest) te).numPlayersUsing > 0) - return false; - if (!getType().canUpgrade(IronChestType.WOOD)) - return false; - chestContents = new ItemStack[((TileEntityChest) te).getSizeInventory()]; - for (int i = 0; i < chestContents.length; i++) - chestContents[i] = ((TileEntityChest) te).getStackInSlot(i); - newchest = IronChestType.makeEntity(this.getTargetChestOrdinal(this.type.ordinal())); - } - } - - te.updateContainingBlockInfo(); - if (te instanceof TileEntityChest) - ((TileEntityChest) te).checkForAdjacentChests(); - - world.removeTileEntity(pos); - world.setBlockToAir(pos); - - world.setTileEntity(pos, newchest); - world.setBlockState(pos, IronChest.ironChestBlock.getStateFromMeta(newchest.getType().ordinal()), 3); - - world.markBlockForUpdate(pos); - - TileEntity te2 = world.getTileEntity(pos); - if (te2 instanceof TileEntityIronChest) - { - ((TileEntityIronChest) te2).setContents(chestContents); - } - - stack.stackSize = player.capabilities.isCreativeMode ? stack.stackSize : stack.stackSize - 1; - return true; - } - - public int getTargetChestOrdinal(int sourceOrdinal) - { - return type.getTarget(); - } - - public ChestChangerType getType() - { - return type; - } -} diff --git a/src/main/java/cpw/mods/ironchest/ItemIronChest.java b/src/main/java/cpw/mods/ironchest/ItemIronChest.java deleted file mode 100755 index 4b3f8410..00000000 --- a/src/main/java/cpw/mods/ironchest/ItemIronChest.java +++ /dev/null @@ -1,38 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2012 cpw. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the GNU Public License v3.0 - * which accompanies this distribution, and is available at - * http://www.gnu.org/licenses/gpl.html - * - * Contributors: - * cpw - initial API and implementation - ******************************************************************************/ -package cpw.mods.ironchest; - -import net.minecraft.block.Block; -import net.minecraft.item.ItemBlock; -import net.minecraft.item.ItemStack; - -public class ItemIronChest extends ItemBlock -{ - public ItemIronChest(Block block) - { - super(block); - - this.setMaxDamage(0); - this.setHasSubtypes(true); - } - - @Override - public int getMetadata(int meta) - { - return IronChestType.validateMeta(meta); - } - - @Override - public String getUnlocalizedName(ItemStack itemstack) - { - return "tile.ironchest:" + IronChestType.values()[itemstack.getMetadata()].name(); - } -} diff --git a/src/main/java/cpw/mods/ironchest/OcelotsSitOnChestsHandler.java b/src/main/java/cpw/mods/ironchest/OcelotsSitOnChestsHandler.java deleted file mode 100755 index f5c5b783..00000000 --- a/src/main/java/cpw/mods/ironchest/OcelotsSitOnChestsHandler.java +++ /dev/null @@ -1,28 +0,0 @@ -package cpw.mods.ironchest; - -import java.util.List; - -import net.minecraft.entity.ai.EntityAIOcelotSit; -import net.minecraft.entity.ai.EntityAITasks; -import net.minecraft.entity.passive.EntityOcelot; -import net.minecraftforge.event.entity.living.LivingEvent; -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; - -public class OcelotsSitOnChestsHandler { - - @SubscribeEvent - public void changeSittingTaskForOcelots(LivingEvent.LivingUpdateEvent evt) - { - if (evt.entityLiving.ticksExisted < 5 && evt.entityLiving instanceof EntityOcelot) - { - EntityOcelot ocelot = (EntityOcelot) evt.entityLiving; - List tasks = ocelot.tasks.taskEntries; - - for (EntityAITasks.EntityAITaskEntry task : tasks) { - if (task.priority == 6 && (task.action instanceof EntityAIOcelotSit) && !(task.action instanceof IronChestAIOcelotSit)) { - task.action = new IronChestAIOcelotSit(ocelot, 0.4F); - } - } - } - } -} diff --git a/src/main/java/cpw/mods/ironchest/TileEntityCopperChest.java b/src/main/java/cpw/mods/ironchest/TileEntityCopperChest.java deleted file mode 100755 index f8ececfe..00000000 --- a/src/main/java/cpw/mods/ironchest/TileEntityCopperChest.java +++ /dev/null @@ -1,19 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2012 cpw. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the GNU Public License v3.0 - * which accompanies this distribution, and is available at - * http://www.gnu.org/licenses/gpl.html - * - * Contributors: - * cpw - initial API and implementation - ******************************************************************************/ -package cpw.mods.ironchest; - -public class TileEntityCopperChest extends TileEntityIronChest { - public TileEntityCopperChest() - { - super(IronChestType.COPPER); - } - -} diff --git a/src/main/java/cpw/mods/ironchest/TileEntityCrystalChest.java b/src/main/java/cpw/mods/ironchest/TileEntityCrystalChest.java deleted file mode 100755 index 24288ec9..00000000 --- a/src/main/java/cpw/mods/ironchest/TileEntityCrystalChest.java +++ /dev/null @@ -1,18 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2012 cpw. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the GNU Public License v3.0 - * which accompanies this distribution, and is available at - * http://www.gnu.org/licenses/gpl.html - * - * Contributors: - * cpw - initial API and implementation - ******************************************************************************/ -package cpw.mods.ironchest; - -public class TileEntityCrystalChest extends TileEntityIronChest { - public TileEntityCrystalChest() - { - super(IronChestType.CRYSTAL); - } -} diff --git a/src/main/java/cpw/mods/ironchest/TileEntityDiamondChest.java b/src/main/java/cpw/mods/ironchest/TileEntityDiamondChest.java deleted file mode 100755 index 84b90237..00000000 --- a/src/main/java/cpw/mods/ironchest/TileEntityDiamondChest.java +++ /dev/null @@ -1,19 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2012 cpw. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the GNU Public License v3.0 - * which accompanies this distribution, and is available at - * http://www.gnu.org/licenses/gpl.html - * - * Contributors: - * cpw - initial API and implementation - ******************************************************************************/ -package cpw.mods.ironchest; - -public class TileEntityDiamondChest extends TileEntityIronChest -{ - public TileEntityDiamondChest() - { - super(IronChestType.DIAMOND); - } -} diff --git a/src/main/java/cpw/mods/ironchest/TileEntityDirtChest.java b/src/main/java/cpw/mods/ironchest/TileEntityDirtChest.java deleted file mode 100755 index a7608c07..00000000 --- a/src/main/java/cpw/mods/ironchest/TileEntityDirtChest.java +++ /dev/null @@ -1,42 +0,0 @@ -package cpw.mods.ironchest; - -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.init.Items; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagList; -import net.minecraft.nbt.NBTTagString; -import net.minecraft.util.StatCollector; - -public class TileEntityDirtChest extends TileEntityIronChest { - private static ItemStack dirtChest9000GuideBook = new ItemStack(Items.written_book); - static { - dirtChest9000GuideBook.setTagInfo("author", new NBTTagString("cpw")); - dirtChest9000GuideBook.setTagInfo("title", new NBTTagString(StatCollector.translateToLocal("book.ironchest:dirtchest9000.title"))); - NBTTagList pages = new NBTTagList(); - pages.appendTag(new NBTTagString(StatCollector.translateToLocal("book.ironchest:dirtchest9000.page1"))); - pages.appendTag(new NBTTagString(StatCollector.translateToLocal("book.ironchest:dirtchest9000.page2"))); - pages.appendTag(new NBTTagString(StatCollector.translateToLocal("book.ironchest:dirtchest9000.page3"))); - pages.appendTag(new NBTTagString(StatCollector.translateToLocal("book.ironchest:dirtchest9000.page4"))); - pages.appendTag(new NBTTagString(StatCollector.translateToLocal("book.ironchest:dirtchest9000.page5"))); - dirtChest9000GuideBook.setTagInfo("pages", pages); - } - public TileEntityDirtChest() { - super(IronChestType.DIRTCHEST9000); - } - - @Override - public void wasPlaced(EntityLivingBase entityliving, ItemStack itemStack) - { - if (!(itemStack.hasTagCompound() && itemStack.getTagCompound().getBoolean("dirtchest"))) { - setInventorySlotContents(0, dirtChest9000GuideBook.copy()); - } - } - - @Override - public void removeAdornments() - { - if (chestContents[0] != null && chestContents[0].isItemEqual(dirtChest9000GuideBook)) { - chestContents[0] = null; - } - } -} diff --git a/src/main/java/cpw/mods/ironchest/TileEntityGoldChest.java b/src/main/java/cpw/mods/ironchest/TileEntityGoldChest.java deleted file mode 100755 index fc531e29..00000000 --- a/src/main/java/cpw/mods/ironchest/TileEntityGoldChest.java +++ /dev/null @@ -1,19 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2012 cpw. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the GNU Public License v3.0 - * which accompanies this distribution, and is available at - * http://www.gnu.org/licenses/gpl.html - * - * Contributors: - * cpw - initial API and implementation - ******************************************************************************/ -package cpw.mods.ironchest; - -public class TileEntityGoldChest extends TileEntityIronChest { - - public TileEntityGoldChest() - { - super(IronChestType.GOLD); - } -} diff --git a/src/main/java/cpw/mods/ironchest/TileEntityIronChest.java b/src/main/java/cpw/mods/ironchest/TileEntityIronChest.java deleted file mode 100755 index 2504b31b..00000000 --- a/src/main/java/cpw/mods/ironchest/TileEntityIronChest.java +++ /dev/null @@ -1,609 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2012 cpw. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the GNU Public License v3.0 - * which accompanies this distribution, and is available at - * http://www.gnu.org/licenses/gpl.html - * - * Contributors: - * cpw - initial API and implementation - ******************************************************************************/ -package cpw.mods.ironchest; - -import java.util.Arrays; -import java.util.Comparator; -import java.util.List; - -import net.minecraft.entity.EntityLivingBase; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.InventoryPlayer; -import net.minecraft.inventory.Container; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.NBTTagCompound; -import net.minecraft.nbt.NBTTagList; -import net.minecraft.network.NetworkManager; -import net.minecraft.network.Packet; -import net.minecraft.network.play.server.S35PacketUpdateTileEntity; -import net.minecraft.tileentity.TileEntityLockable; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.EnumFacing; -import net.minecraft.util.ITickable; -import net.minecraftforge.common.util.Constants; - -public class TileEntityIronChest extends TileEntityLockable implements ITickable, IInventory -{ - private int ticksSinceSync = -1; - public float prevLidAngle; - public float lidAngle; - private int numUsingPlayers; - private IronChestType type; - public ItemStack[] chestContents; - private ItemStack[] topStacks; - private byte facing; - private boolean inventoryTouched; - private boolean hadStuff; - private String customName; - - public TileEntityIronChest() - { - this(IronChestType.IRON); - } - - protected TileEntityIronChest(IronChestType type) - { - super(); - this.type = type; - this.chestContents = new ItemStack[getSizeInventory()]; - this.topStacks = new ItemStack[8]; - } - - public ItemStack[] getContents() - { - return chestContents; - } - - public void setContents(ItemStack[] contents) - { - chestContents = new ItemStack[getSizeInventory()]; - for (int i = 0; i < contents.length; i++) - { - if (i < chestContents.length) - { - chestContents[i] = contents[i]; - } - } - inventoryTouched = true; - } - - @Override - public int getSizeInventory() - { - return type.size; - } - - public int getFacing() - { - return this.facing; - } - - public IronChestType getType() - { - return type; - } - - @Override - public ItemStack getStackInSlot(int i) - { - inventoryTouched = true; - return chestContents[i]; - } - - @Override - public void markDirty() - { - super.markDirty(); - sortTopStacks(); - } - - protected void sortTopStacks() - { - if (!type.isTransparent() || (worldObj != null && worldObj.isRemote)) - { - return; - } - ItemStack[] tempCopy = new ItemStack[getSizeInventory()]; - boolean hasStuff = false; - int compressedIdx = 0; - mainLoop: for (int i = 0; i < getSizeInventory(); i++) - { - if (chestContents[i] != null) - { - for (int j = 0; j < compressedIdx; j++) - { - if (tempCopy[j].isItemEqual(chestContents[i])) - { - tempCopy[j].stackSize += chestContents[i].stackSize; - continue mainLoop; - } - } - tempCopy[compressedIdx++] = chestContents[i].copy(); - hasStuff = true; - } - } - if (!hasStuff && hadStuff) - { - hadStuff = false; - for (int i = 0; i < topStacks.length; i++) - { - topStacks[i] = null; - } - if (worldObj != null) - { - worldObj.markBlockForUpdate(pos); - } - return; - } - hadStuff = true; - Arrays.sort(tempCopy, new Comparator() - { - @Override - public int compare(ItemStack o1, ItemStack o2) - { - if (o1 == null) - { - return 1; - } else if (o2 == null) - { - return -1; - } else - { - return o2.stackSize - o1.stackSize; - } - } - }); - int p = 0; - for (int i = 0; i < tempCopy.length; i++) - { - if (tempCopy[i] != null && tempCopy[i].stackSize > 0) - { - topStacks[p++] = tempCopy[i]; - if (p == topStacks.length) - { - break; - } - } - } - for (int i = p; i < topStacks.length; i++) - { - topStacks[i] = null; - } - if (worldObj != null) - { - worldObj.markBlockForUpdate(pos); - } - } - - @Override - public ItemStack decrStackSize(int i, int j) - { - if (chestContents[i] != null) - { - if (chestContents[i].stackSize <= j) - { - ItemStack itemstack = chestContents[i]; - chestContents[i] = null; - markDirty(); - return itemstack; - } - ItemStack itemstack1 = chestContents[i].splitStack(j); - if (chestContents[i].stackSize == 0) - { - chestContents[i] = null; - } - markDirty(); - return itemstack1; - } else - { - return null; - } - } - - @Override - public void setInventorySlotContents(int i, ItemStack itemstack) - { - chestContents[i] = itemstack; - if (itemstack != null && itemstack.stackSize > getInventoryStackLimit()) - { - itemstack.stackSize = getInventoryStackLimit(); - } - markDirty(); - } - - @Override - public String getName() - { - return this.hasCustomName() ? this.customName : type.name(); - } - - @Override - public boolean hasCustomName() - { - return this.customName != null && this.customName.length() > 0; - } - - public void setCustomName(String name) - { - this.customName = name; - } - - @Override - public void readFromNBT(NBTTagCompound nbttagcompound) - { - super.readFromNBT(nbttagcompound); - - NBTTagList nbttaglist = nbttagcompound.getTagList("Items", Constants.NBT.TAG_COMPOUND); - this.chestContents = new ItemStack[getSizeInventory()]; - - if (nbttagcompound.hasKey("CustomName", Constants.NBT.TAG_STRING)) - { - this.customName = nbttagcompound.getString("CustomName"); - } - - for (int i = 0; i < nbttaglist.tagCount(); i++) - { - NBTTagCompound nbttagcompound1 = nbttaglist.getCompoundTagAt(i); - int j = nbttagcompound1.getByte("Slot") & 0xff; - if (j >= 0 && j < chestContents.length) - { - chestContents[j] = ItemStack.loadItemStackFromNBT(nbttagcompound1); - } - } - facing = nbttagcompound.getByte("facing"); - sortTopStacks(); - } - - @Override - public void writeToNBT(NBTTagCompound nbttagcompound) - { - super.writeToNBT(nbttagcompound); - NBTTagList nbttaglist = new NBTTagList(); - for (int i = 0; i < chestContents.length; i++) - { - if (chestContents[i] != null) - { - NBTTagCompound nbttagcompound1 = new NBTTagCompound(); - nbttagcompound1.setByte("Slot", (byte) i); - chestContents[i].writeToNBT(nbttagcompound1); - nbttaglist.appendTag(nbttagcompound1); - } - } - - nbttagcompound.setTag("Items", nbttaglist); - nbttagcompound.setByte("facing", facing); - - if (this.hasCustomName()) - { - nbttagcompound.setString("CustomName", this.customName); - } - } - - @Override - public int getInventoryStackLimit() - { - return 64; - } - - @Override - public boolean isUseableByPlayer(EntityPlayer entityplayer) - { - if (worldObj == null) - { - return true; - } - if (worldObj.getTileEntity(pos) != this) - { - return false; - } - return entityplayer.getDistanceSq(pos.getX() + 0.5D, pos.getY() + 0.5D, pos.getZ() + 0.5D) <= 64D; - } - - @Override - public void update() - { - // Resynchronize clients with the server state - if (worldObj != null && !this.worldObj.isRemote && this.numUsingPlayers != 0 && (this.ticksSinceSync + pos.getX() + pos.getY() + pos.getZ()) % 200 == 0) - { - this.numUsingPlayers = 0; - float var1 = 5.0F; - List var2 = this.worldObj.getEntitiesWithinAABB(EntityPlayer.class, new AxisAlignedBB(pos.getX() - var1, pos.getY() - var1, pos.getZ() - var1, pos.getX() + 1 + var1, pos.getY() + 1 + var1, pos.getZ() + 1 + var1)); - - for (EntityPlayer var4 : var2) - { - if (var4.openContainer instanceof ContainerIronChest) - { - ++this.numUsingPlayers; - } - } - } - - if (worldObj != null && !worldObj.isRemote && ticksSinceSync < 0) - { - worldObj.addBlockEvent(pos, IronChest.ironChestBlock, 3, ((numUsingPlayers << 3) & 0xF8) | (facing & 0x7)); - } - if (!worldObj.isRemote && inventoryTouched) - { - inventoryTouched = false; - sortTopStacks(); - } - - this.ticksSinceSync++; - prevLidAngle = lidAngle; - float f = 0.1F; - if (numUsingPlayers > 0 && lidAngle == 0.0F) - { - double d = pos.getX() + 0.5D; - double d1 = pos.getZ() + 0.5D; - worldObj.playSoundEffect(d, pos.getY() + 0.5D, d1, "random.chestopen", 0.5F, worldObj.rand.nextFloat() * 0.1F + 0.9F); - } - if (numUsingPlayers == 0 && lidAngle > 0.0F || numUsingPlayers > 0 && lidAngle < 1.0F) - { - float f1 = lidAngle; - if (numUsingPlayers > 0) - { - lidAngle += f; - } else - { - lidAngle -= f; - } - if (lidAngle > 1.0F) - { - lidAngle = 1.0F; - } - float f2 = 0.5F; - if (lidAngle < f2 && f1 >= f2) - { - double d2 = pos.getX() + 0.5D; - double d3 = pos.getZ() + 0.5D; - worldObj.playSoundEffect(d2, pos.getY() + 0.5D, d3, "random.chestclosed", 0.5F, worldObj.rand.nextFloat() * 0.1F + 0.9F); - } - if (lidAngle < 0.0F) - { - lidAngle = 0.0F; - } - } - } - - @Override - public boolean receiveClientEvent(int i, int j) - { - if (i == 1) - { - numUsingPlayers = j; - } else if (i == 2) - { - facing = (byte) j; - } else if (i == 3) - { - facing = (byte) (j & 0x7); - numUsingPlayers = (j & 0xF8) >> 3; - } - return true; - } - - @Override - public void openInventory(EntityPlayer player) - { - if (worldObj == null) - { - return; - } - numUsingPlayers++; - worldObj.addBlockEvent(pos, IronChest.ironChestBlock, 1, numUsingPlayers); - } - - @Override - public void closeInventory(EntityPlayer player) - { - if (worldObj == null) - { - return; - } - numUsingPlayers--; - worldObj.addBlockEvent(pos, IronChest.ironChestBlock, 1, numUsingPlayers); - } - - public void setFacing(byte facing2) - { - this.facing = facing2; - } - - public ItemStack[] getTopItemStacks() - { - return topStacks; - } - - public TileEntityIronChest updateFromMetadata(int l) - { - if (worldObj != null && worldObj.isRemote) - { - if (l != type.ordinal()) - { - worldObj.setTileEntity(pos, IronChestType.makeEntity(l)); - return (TileEntityIronChest) worldObj.getTileEntity(pos); - } - } - return this; - } - - @Override - public Packet getDescriptionPacket() - { - - NBTTagCompound nbt = new NBTTagCompound(); - nbt.setInteger("type", getType().ordinal()); - nbt.setByte("facing", facing); - ItemStack[] stacks = buildItemStackDataList(); - if (stacks != null) - { - NBTTagList nbttaglist = new NBTTagList(); - for (int i = 0; i < stacks.length; i++) - { - if (stacks[i] != null) - { - NBTTagCompound nbttagcompound1 = new NBTTagCompound(); - nbttagcompound1.setByte("Slot", (byte) i); - stacks[i].writeToNBT(nbttagcompound1); - nbttaglist.appendTag(nbttagcompound1); - } - } - nbt.setTag("stacks", nbttaglist); - } - - return new S35PacketUpdateTileEntity(pos, 0, nbt); - } - - @Override - public void onDataPacket(NetworkManager net, S35PacketUpdateTileEntity pkt) - { - if (pkt.getTileEntityType() == 0) - { - NBTTagCompound nbt = pkt.getNbtCompound(); - type = IronChestType.values()[nbt.getInteger("type")]; - facing = nbt.getByte("facing"); - - NBTTagList tagList = nbt.getTagList("stacks", Constants.NBT.TAG_COMPOUND); - ItemStack[] stacks = new ItemStack[topStacks.length]; - - for (int i = 0; i < stacks.length; i++) - { - NBTTagCompound nbt1 = tagList.getCompoundTagAt(i); - int j = nbt1.getByte("Slot") & 0xff; - if (j >= 0 && j < stacks.length) - { - stacks[j] = ItemStack.loadItemStackFromNBT(nbt1); - } - } - - if (type.isTransparent() && stacks != null) - { - int pos = 0; - for (int i = 0; i < topStacks.length; i++) - { - if (stacks[pos] != null) - { - topStacks[i] = stacks[pos]; - } else - { - topStacks[i] = null; - } - pos++; - } - } - } - } - - public ItemStack[] buildItemStackDataList() - { - if (type.isTransparent()) - { - ItemStack[] sortList = new ItemStack[topStacks.length]; - int pos = 0; - for (ItemStack is : topStacks) - { - if (is != null) - { - sortList[pos++] = is; - } else - { - sortList[pos++] = null; - } - } - return sortList; - } - return null; - } - - @Override - public ItemStack removeStackFromSlot(int par1) - { - if (this.chestContents[par1] != null) - { - ItemStack var2 = this.chestContents[par1]; - this.chestContents[par1] = null; - return var2; - } else - { - return null; - } - } - - @Override - public boolean isItemValidForSlot(int i, ItemStack itemstack) - { - return type.acceptsStack(itemstack); - } - - public void rotateAround() - { - facing++; - if (facing > EnumFacing.EAST.ordinal()) - { - facing = (byte) EnumFacing.NORTH.ordinal(); - } - setFacing(facing); - worldObj.addBlockEvent(pos, IronChest.ironChestBlock, 2, facing); - } - - public void wasPlaced(EntityLivingBase entityliving, ItemStack itemStack) - { - } - - public void removeAdornments() - { - } - - @Override - public int getField(int id) - { - return 0; - } - - @Override - public void setField(int id, int value) - { - } - - @Override - public int getFieldCount() - { - return 0; - } - - @Override - public void clear() - { - for (int i = 0; i < this.chestContents.length; ++i) - { - this.chestContents[i] = null; - } - } - - @Override - public Container createContainer(InventoryPlayer playerInventory, EntityPlayer player) - { - return null; - } - - @Override - public String getGuiID() - { - return "IronChest:" + type.name(); - } - - @Override - public boolean canRenderBreaking() - { - return true; - } -} diff --git a/src/main/java/cpw/mods/ironchest/TileEntityObsidianChest.java b/src/main/java/cpw/mods/ironchest/TileEntityObsidianChest.java deleted file mode 100755 index 5f03eb94..00000000 --- a/src/main/java/cpw/mods/ironchest/TileEntityObsidianChest.java +++ /dev/null @@ -1,9 +0,0 @@ -package cpw.mods.ironchest; - -public class TileEntityObsidianChest extends TileEntityIronChest { - - public TileEntityObsidianChest() - { - super(IronChestType.OBSIDIAN); - } -} diff --git a/src/main/java/cpw/mods/ironchest/TileEntitySilverChest.java b/src/main/java/cpw/mods/ironchest/TileEntitySilverChest.java deleted file mode 100755 index 439d2667..00000000 --- a/src/main/java/cpw/mods/ironchest/TileEntitySilverChest.java +++ /dev/null @@ -1,18 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2012 cpw. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the GNU Public License v3.0 - * which accompanies this distribution, and is available at - * http://www.gnu.org/licenses/gpl.html - * - * Contributors: - * cpw - initial API and implementation - ******************************************************************************/ -package cpw.mods.ironchest; - -public class TileEntitySilverChest extends TileEntityIronChest { - public TileEntitySilverChest() - { - super(IronChestType.SILVER); - } -} diff --git a/src/main/java/cpw/mods/ironchest/ValidatingSlot.java b/src/main/java/cpw/mods/ironchest/ValidatingSlot.java deleted file mode 100755 index f0348c97..00000000 --- a/src/main/java/cpw/mods/ironchest/ValidatingSlot.java +++ /dev/null @@ -1,21 +0,0 @@ -package cpw.mods.ironchest; - -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.Slot; -import net.minecraft.item.ItemStack; - -public class ValidatingSlot extends Slot { - private IronChestType type; - - public ValidatingSlot(IInventory par1iInventory, int par2, int par3, int par4, IronChestType type) - { - super(par1iInventory, par2, par3, par4); - this.type = type; - } - - @Override - public boolean isItemValid(ItemStack par1ItemStack) - { - return type.acceptsStack(par1ItemStack); - } -} diff --git a/src/main/java/cpw/mods/ironchest/Version.java b/src/main/java/cpw/mods/ironchest/Version.java deleted file mode 100755 index f155473d..00000000 --- a/src/main/java/cpw/mods/ironchest/Version.java +++ /dev/null @@ -1,36 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2012 cpw. All rights reserved. This program and the accompanying materials are made available under the terms of the GNU Public License v3.0 - * which accompanies this distribution, and is available at http://www.gnu.org/licenses/gpl.html - * - * Contributors: cpw - initial API and implementation - ******************************************************************************/ -package cpw.mods.ironchest; - -import java.util.Properties; - -public class Version -{ - private static String major; - private static String minor; - private static String rev; - private static String build; - @SuppressWarnings("unused") - private static String mcversion; - - static void init(Properties properties) - { - if (properties != null) - { - major = properties.getProperty("IronChest.build.major.number"); - minor = properties.getProperty("IronChest.build.minor.number"); - rev = properties.getProperty("IronChest.build.revision.number"); - build = properties.getProperty("IronChest.build.number"); - mcversion = properties.getProperty("IronChest.build.mcversion"); - } - } - - public static String fullVersionString() - { - return String.format("%s.%s.%s build %s", major, minor, rev, build); - } -} diff --git a/src/main/java/cpw/mods/ironchest/client/ClientProxy.java b/src/main/java/cpw/mods/ironchest/client/ClientProxy.java deleted file mode 100755 index 8872b760..00000000 --- a/src/main/java/cpw/mods/ironchest/client/ClientProxy.java +++ /dev/null @@ -1,72 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2012 cpw. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the GNU Public License v3.0 - * which accompanies this distribution, and is available at - * http://www.gnu.org/licenses/gpl.html - * - * Contributors: - * cpw - initial API and implementation - ******************************************************************************/ -package cpw.mods.ironchest.client; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.ItemModelMesher; -import net.minecraft.client.resources.model.ModelBakery; -import net.minecraft.client.resources.model.ModelResourceLocation; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.item.Item; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.BlockPos; -import net.minecraft.world.World; -import net.minecraftforge.fml.client.FMLClientHandler; -import net.minecraftforge.fml.client.registry.ClientRegistry; -import cpw.mods.ironchest.CommonProxy; -import cpw.mods.ironchest.IronChest; -import cpw.mods.ironchest.IronChestType; -import cpw.mods.ironchest.TileEntityIronChest; - -public class ClientProxy extends CommonProxy -{ - @Override - public void registerRenderInformation() - { - Minecraft.getMinecraft().getRenderItem().getItemModelMesher().getModelManager().getBlockModelShapes().registerBuiltInBlocks(IronChest.ironChestBlock); - - ItemModelMesher mesher = Minecraft.getMinecraft().getRenderItem().getItemModelMesher(); - for (IronChestType chestType : IronChestType.values()) - { - if (chestType != IronChestType.WOOD) - { - Item chestItem = Item.getItemFromBlock(IronChest.ironChestBlock); - mesher.register(chestItem, chestType.ordinal(), new ModelResourceLocation("ironchest:chest_" + chestType.getName().toLowerCase(), "inventory")); - ModelBakery.addVariantName(chestItem, "ironchest:chest_" + chestType.getName().toLowerCase()); - } - } - } - - @Override - public void registerTileEntitySpecialRenderer(Class type) - { - ClientRegistry.bindTileEntitySpecialRenderer(type, new TileEntityIronChestRenderer(type)); - } - - @Override - public World getClientWorld() - { - return FMLClientHandler.instance().getClient().theWorld; - } - - @Override - public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) - { - TileEntity te = world.getTileEntity(new BlockPos(x, y, z)); - if (te != null && te instanceof TileEntityIronChest) - { - return GUIChest.GUI.buildGUI(IronChestType.values()[ID], player.inventory, (TileEntityIronChest) te); - } else - { - return null; - } - } -} diff --git a/src/main/java/cpw/mods/ironchest/client/GUIChest.java b/src/main/java/cpw/mods/ironchest/client/GUIChest.java deleted file mode 100755 index 345791b8..00000000 --- a/src/main/java/cpw/mods/ironchest/client/GUIChest.java +++ /dev/null @@ -1,98 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2012 cpw. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the GNU Public License v3.0 - * which accompanies this distribution, and is available at - * http://www.gnu.org/licenses/gpl.html - * - * Contributors: - * cpw - initial API and implementation - ******************************************************************************/ -package cpw.mods.ironchest.client; - -import net.minecraft.client.gui.inventory.GuiContainer; -import net.minecraft.inventory.Container; -import net.minecraft.inventory.IInventory; -import net.minecraft.util.ResourceLocation; - -import org.lwjgl.opengl.GL11; - -import cpw.mods.ironchest.ContainerIronChest; -import cpw.mods.ironchest.IronChestType; -import cpw.mods.ironchest.TileEntityIronChest; - -public class GUIChest extends GuiContainer { - public enum ResourceList { - IRON(new ResourceLocation("ironchest", "textures/gui/ironcontainer.png")), - COPPER(new ResourceLocation("ironchest", "textures/gui/coppercontainer.png")), - SILVER(new ResourceLocation("ironchest", "textures/gui/silvercontainer.png")), - GOLD(new ResourceLocation("ironchest", "textures/gui/goldcontainer.png")), - DIAMOND(new ResourceLocation("ironchest", "textures/gui/diamondcontainer.png")), - DIRT(new ResourceLocation("ironchest", "textures/gui/dirtcontainer.png")); - public final ResourceLocation location; - private ResourceList(ResourceLocation loc) { - this.location = loc; - } - } - public enum GUI { - IRON(184, 202, ResourceList.IRON, IronChestType.IRON), - GOLD(184, 256, ResourceList.GOLD, IronChestType.GOLD), - DIAMOND(238, 256, ResourceList.DIAMOND, IronChestType.DIAMOND), - COPPER(184, 184, ResourceList.COPPER, IronChestType.COPPER), - SILVER(184, 238, ResourceList.SILVER, IronChestType.SILVER), - CRYSTAL(238, 256, ResourceList.DIAMOND, IronChestType.CRYSTAL), - OBSIDIAN(238, 256, ResourceList.DIAMOND, IronChestType.OBSIDIAN), - DIRTCHEST9000(184, 184, ResourceList.DIRT, IronChestType.DIRTCHEST9000); - - private int xSize; - private int ySize; - private ResourceList guiResourceList; - private IronChestType mainType; - - private GUI(int xSize, int ySize, ResourceList guiResourceList, IronChestType mainType) - { - this.xSize = xSize; - this.ySize = ySize; - this.guiResourceList = guiResourceList; - this.mainType = mainType; - - } - - protected Container makeContainer(IInventory player, IInventory chest) - { - return new ContainerIronChest(player, chest, mainType, xSize, ySize); - } - - public static GUIChest buildGUI(IronChestType type, IInventory playerInventory, TileEntityIronChest chestInventory) - { - return new GUIChest(values()[chestInventory.getType().ordinal()], playerInventory, chestInventory); - } - } - - public int getRowLength() - { - return type.mainType.getRowLength(); - } - - private GUI type; - - private GUIChest(GUI type, IInventory player, IInventory chest) - { - super(type.makeContainer(player, chest)); - this.type = type; - this.xSize = type.xSize; - this.ySize = type.ySize; - this.allowUserInput = false; - } - - @Override - protected void drawGuiContainerBackgroundLayer(float f, int i, int j) - { - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - // new "bind tex" - this.mc.getTextureManager().bindTexture(type.guiResourceList.location); - int x = (width - xSize) / 2; - int y = (height - ySize) / 2; - drawTexturedModalRect(x, y, 0, 0, xSize, ySize); - } -} diff --git a/src/main/java/cpw/mods/ironchest/client/ModelHelper.java b/src/main/java/cpw/mods/ironchest/client/ModelHelper.java deleted file mode 100644 index 9fb7a35c..00000000 --- a/src/main/java/cpw/mods/ironchest/client/ModelHelper.java +++ /dev/null @@ -1,44 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2012 cpw. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the GNU Public License v3.0 - * which accompanies this distribution, and is available at - * http://www.gnu.org/licenses/gpl.html - * - * Contributors: - * cpw - initial API and implementation - ******************************************************************************/ -package cpw.mods.ironchest.client; - -import net.minecraft.block.Block; -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.ItemModelMesher; -import net.minecraft.client.resources.model.ModelResourceLocation; -import net.minecraft.item.Item; -import net.minecraftforge.fml.relauncher.Side; -import net.minecraftforge.fml.relauncher.SideOnly; - -@SideOnly(Side.CLIENT) -public class ModelHelper -{ - public static void registerItem(Item item, int metadata, String itemName) - { - ItemModelMesher mesher = Minecraft.getMinecraft().getRenderItem().getItemModelMesher(); - mesher.register(item, metadata, new ModelResourceLocation(itemName, "inventory")); - } - - public static void registerBlock(Block block, int metadata, String blockName) - { - registerItem(Item.getItemFromBlock(block), metadata, blockName); - } - - public static void registerBlock(Block block, String blockName) - { - registerBlock(block, 0, blockName); - } - - public static void registerItem(Item item, String itemName) - { - registerItem(item, 0, itemName); - } -} diff --git a/src/main/java/cpw/mods/ironchest/client/TileEntityIronChestRenderer.java b/src/main/java/cpw/mods/ironchest/client/TileEntityIronChestRenderer.java deleted file mode 100755 index b9940fdc..00000000 --- a/src/main/java/cpw/mods/ironchest/client/TileEntityIronChestRenderer.java +++ /dev/null @@ -1,181 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2012 cpw. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the GNU Public License v3.0 - * which accompanies this distribution, and is available at - * http://www.gnu.org/licenses/gpl.html - * - * Contributors: - * cpw - initial API and implementation - ******************************************************************************/ -package cpw.mods.ironchest.client; - -import java.util.Map; -import java.util.Random; - -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ImmutableMap.Builder; -import com.google.common.primitives.SignedBytes; - -import cpw.mods.ironchest.BlockIronChest; -import cpw.mods.ironchest.IronChest; -import cpw.mods.ironchest.IronChestType; -import cpw.mods.ironchest.TileEntityIronChest; -import net.minecraft.block.state.IBlockState; -import net.minecraft.client.Minecraft; -import net.minecraft.client.model.ModelChest; -import net.minecraft.client.renderer.GlStateManager; -import net.minecraft.client.renderer.entity.RenderEntityItem; -import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; -import net.minecraft.entity.item.EntityItem; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; - -public class TileEntityIronChestRenderer extends TileEntitySpecialRenderer -{ - private static Map locations; - - static { - Builder builder = ImmutableMap.builder(); - for (IronChestType typ : IronChestType.values()) { - builder.put(typ, new ResourceLocation("ironchest","textures/model/"+typ.getModelTexture())); - } - locations = builder.build(); - } - - private Random random; - private RenderEntityItem itemRenderer; - private ModelChest model; - - private static float[][] shifts = { { 0.3F, 0.45F, 0.3F }, { 0.7F, 0.45F, 0.3F }, { 0.3F, 0.45F, 0.7F }, { 0.7F, 0.45F, 0.7F }, { 0.3F, 0.1F, 0.3F }, - { 0.7F, 0.1F, 0.3F }, { 0.3F, 0.1F, 0.7F }, { 0.7F, 0.1F, 0.7F }, { 0.5F, 0.32F, 0.5F }, }; - - public TileEntityIronChestRenderer(Class type) - { - model = new ModelChest(); - random = new Random(); - itemRenderer = new RenderEntityItem(Minecraft.getMinecraft().getRenderManager(), Minecraft.getMinecraft().getRenderItem()){ - @Override - public int func_177078_a(ItemStack stack) { - return SignedBytes.saturatedCast(Math.min(stack.stackSize / 32, 15) + 1); - } - @Override - public boolean shouldBob() { - return false; - } - @Override - public boolean shouldSpreadItems() { - return false; - } - }; - } - - public void render(TileEntityIronChest tile, double x, double y, double z, float partialTick, int breakStage) - { - if (tile == null) { - return; - } - int facing = 3; - IronChestType type = tile.getType(); - - if (tile != null && tile.hasWorldObj() && tile.getWorld().getBlockState(tile.getPos()).getBlock() == IronChest.ironChestBlock) { - facing = tile.getFacing(); - type = tile.getType(); - IBlockState state = tile.getWorld().getBlockState(tile.getPos()); - type = (IronChestType)state.getValue(BlockIronChest.VARIANT_PROP); - } - - if (breakStage >= 0) - { - bindTexture(DESTROY_STAGES[breakStage]); - GlStateManager.matrixMode(5890); - GlStateManager.pushMatrix(); - GlStateManager.scale(4.0F, 4.0F, 1.0F); - GlStateManager.translate(0.0625F, 0.0625F, 0.0625F); - GlStateManager.matrixMode(5888); - } else - bindTexture(locations.get(type)); - GlStateManager.pushMatrix(); - if(type == IronChestType.CRYSTAL) - GlStateManager.disableCull(); - GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); - GlStateManager.translate((float) x, (float) y + 1.0F, (float) z + 1.0F); - GlStateManager.scale(1.0F, -1F, -1F); - GlStateManager.translate(0.5F, 0.5F, 0.5F); - int k = 0; - if (facing == 2) { - k = 180; - } - if (facing == 3) { - k = 0; - } - if (facing == 4) { - k = 90; - } - if (facing == 5) { - k = -90; - } - GlStateManager.rotate(k, 0.0F, 1.0F, 0.0F); - GlStateManager.translate(-0.5F, -0.5F, -0.5F); - float lidangle = tile.prevLidAngle + (tile.lidAngle - tile.prevLidAngle) * partialTick; - lidangle = 1.0F - lidangle; - lidangle = 1.0F - lidangle * lidangle * lidangle; - model.chestLid.rotateAngleX = -((lidangle * 3.141593F) / 2.0F); - // Render the chest itself - model.renderAll(); - if (breakStage >= 0) - { - GlStateManager.matrixMode(5890); - GlStateManager.popMatrix(); - GlStateManager.matrixMode(5888); - } - if(type == IronChestType.CRYSTAL) - GlStateManager.enableCull(); - GlStateManager.popMatrix(); - GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); - - if (type.isTransparent() && tile.getDistanceSq(this.rendererDispatcher.entityX, this.rendererDispatcher.entityY, this.rendererDispatcher.entityZ) < 128d) { - random.setSeed(254L); - float shiftX; - float shiftY; - float shiftZ; - int shift = 0; - float blockScale = 0.70F; - float timeD = (float) (360.0 * (double) (System.currentTimeMillis() & 0x3FFFL) / (double) 0x3FFFL); - if (tile.getTopItemStacks()[1] == null) { - shift = 8; - blockScale = 0.85F; - } - GlStateManager.pushMatrix(); - GlStateManager.translate((float) x, (float) y, (float) z); - EntityItem customitem = new EntityItem(this.getWorld()); - customitem.hoverStart = 0f; - for (ItemStack item : tile.getTopItemStacks()) { - if (shift > shifts.length) { - break; - } - if (item == null) { - shift++; - continue; - } - shiftX = shifts[shift][0]; - shiftY = shifts[shift][1]; - shiftZ = shifts[shift][2]; - shift++; - GlStateManager.pushMatrix(); - GlStateManager.translate(shiftX, shiftY, shiftZ); - GlStateManager.rotate(timeD, 0.0F, 1.0F, 0.0F); - GlStateManager.scale(blockScale, blockScale, blockScale); - customitem.setEntityItemStack(item); - itemRenderer.doRender(customitem, 0, 0, 0, 0, 0); - GlStateManager.popMatrix(); - } - GlStateManager.popMatrix(); - } - } - - public void renderTileEntityAt(TileEntityIronChest tileentity, double x, double y, double z, float partialTick, int breakStage) - { - render(tileentity, x, y, z, partialTick, breakStage); - } -} diff --git a/src/main/resources/META-INF/accesstransformer.cfg b/src/main/resources/META-INF/accesstransformer.cfg new file mode 100644 index 00000000..2c2f0d22 --- /dev/null +++ b/src/main/resources/META-INF/accesstransformer.cfg @@ -0,0 +1 @@ +public net.minecraft.entity.ai.goal.GoalSelector field_220892_d # goals \ No newline at end of file diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml new file mode 100644 index 00000000..ddd1591a --- /dev/null +++ b/src/main/resources/META-INF/mods.toml @@ -0,0 +1,21 @@ +modLoader="javafml" +loaderVersion="[24,)" +issueTrackerURL="https://github.com/progwml6/ironchest/issues" + +[[mods]] + modId="ironchest" + namespace="ironchest" + version="${version}" + displayName="Iron Chests" + authors="cpw, alexbegt, progwml6" + description=''' +New chests with larger sizes, with in-place upgrade items. +The feature chest is the crystal chest, which is transparent - some inventory contents are visible without opening the chest + ''' + displayURL="https://minecraft.curseforge.com/projects/iron-chests" + [[dependencies.ironchest]] + modId="forge" + mandatory=true + versionRange="[${forge_version},)" + ordering="NONE" + side="BOTH" \ No newline at end of file diff --git a/src/main/resources/assets/ironchest/blockstates/copper_chest.json b/src/main/resources/assets/ironchest/blockstates/copper_chest.json new file mode 100644 index 00000000..f765c301 --- /dev/null +++ b/src/main/resources/assets/ironchest/blockstates/copper_chest.json @@ -0,0 +1,5 @@ +{ + "variants": { + "": { "model": "ironchest:block/copper_chest" } + } +} diff --git a/src/main/resources/assets/ironchest/blockstates/crystal_chest.json b/src/main/resources/assets/ironchest/blockstates/crystal_chest.json new file mode 100644 index 00000000..93583504 --- /dev/null +++ b/src/main/resources/assets/ironchest/blockstates/crystal_chest.json @@ -0,0 +1,5 @@ +{ + "variants": { + "": { "model": "ironchest:block/crystal_chest" } + } +} diff --git a/src/main/resources/assets/ironchest/blockstates/diamond_chest.json b/src/main/resources/assets/ironchest/blockstates/diamond_chest.json new file mode 100644 index 00000000..eb4f51b0 --- /dev/null +++ b/src/main/resources/assets/ironchest/blockstates/diamond_chest.json @@ -0,0 +1,5 @@ +{ + "variants": { + "": { "model": "ironchest:block/diamond_chest" } + } +} diff --git a/src/main/resources/assets/ironchest/blockstates/dirt_chest.json b/src/main/resources/assets/ironchest/blockstates/dirt_chest.json new file mode 100644 index 00000000..1d032052 --- /dev/null +++ b/src/main/resources/assets/ironchest/blockstates/dirt_chest.json @@ -0,0 +1,5 @@ +{ + "variants": { + "": { "model": "ironchest:block/dirt_chest" } + } +} diff --git a/src/main/resources/assets/ironchest/blockstates/gold_chest.json b/src/main/resources/assets/ironchest/blockstates/gold_chest.json new file mode 100644 index 00000000..1f782cbd --- /dev/null +++ b/src/main/resources/assets/ironchest/blockstates/gold_chest.json @@ -0,0 +1,5 @@ +{ + "variants": { + "": { "model": "ironchest:block/gold_chest" } + } +} diff --git a/src/main/resources/assets/ironchest/blockstates/iron_chest.json b/src/main/resources/assets/ironchest/blockstates/iron_chest.json new file mode 100644 index 00000000..56834a37 --- /dev/null +++ b/src/main/resources/assets/ironchest/blockstates/iron_chest.json @@ -0,0 +1,5 @@ +{ + "variants": { + "": { "model": "ironchest:block/iron_chest" } + } +} diff --git a/src/main/resources/assets/ironchest/blockstates/obsidian_chest.json b/src/main/resources/assets/ironchest/blockstates/obsidian_chest.json new file mode 100644 index 00000000..6a846038 --- /dev/null +++ b/src/main/resources/assets/ironchest/blockstates/obsidian_chest.json @@ -0,0 +1,5 @@ +{ + "variants": { + "": { "model": "ironchest:block/obsidian_chest" } + } +} diff --git a/src/main/resources/assets/ironchest/blockstates/silver_chest.json b/src/main/resources/assets/ironchest/blockstates/silver_chest.json new file mode 100644 index 00000000..531aaf1c --- /dev/null +++ b/src/main/resources/assets/ironchest/blockstates/silver_chest.json @@ -0,0 +1,5 @@ +{ + "variants": { + "": { "model": "ironchest:block/silver_chest" } + } +} diff --git a/src/main/resources/assets/ironchest/lang/cs_CZ.lang b/src/main/resources/assets/ironchest/lang/cs_CZ.lang deleted file mode 100755 index a202085b..00000000 --- a/src/main/resources/assets/ironchest/lang/cs_CZ.lang +++ /dev/null @@ -1,17 +0,0 @@ -tile.ironchest:IRON.name=Železná truhla -tile.ironchest:GOLD.name=Zlatá truhla -tile.ironchest:DIAMOND.name=Diamantová truhla -tile.ironchest:COPPER.name=Měděná truhla -tile.ironchest:SILVER.name=Stříbrná truhla -tile.ironchest:CRYSTAL.name=Krystalová truhla -tile.ironchest:OBSIDIAN.name=Obsidiánová truhla - -item.ironchest:IRONGOLD.name=Vylepšení železné truhly na zlatou -item.ironchest:GOLDDIAMOND.name=Vylepšení zlaté truhly na diamantovou -item.ironchest:COPPERSILVER.name=Vylepšení měděné truhly na stříbrnou -item.ironchest:SILVERGOLD.name=Vylepšení stříbrné truhly na zlatou -item.ironchest:COPPERIRON.name=Vylepšení měděné truhly na železnou -item.ironchest:DIAMONDCRYSTAL.name=Vylepšení diamantové truhly na krystalovou -item.ironchest:WOODIRON.name=Vylepšení dřevěné truhly na železnou -item.ironchest:WOODCOPPER.name=Vylepšení dřevěné truhly na měděnou -item.ironchest:DIAMONDOBSIDIAN.name=Vylepšení diamantové truhly na obsidiánovou diff --git a/src/main/resources/assets/ironchest/lang/da_DK.lang b/src/main/resources/assets/ironchest/lang/da_DK.lang deleted file mode 100755 index 7e40e342..00000000 --- a/src/main/resources/assets/ironchest/lang/da_DK.lang +++ /dev/null @@ -1,17 +0,0 @@ -tile.ironchest:IRON.name=Jern Kiste -tile.ironchest:GOLD.name=Guld Kiste -tile.ironchest:DIAMOND.name=Diamant Kiste -tile.ironchest:COPPER.name=Kobber Kiste -tile.ironchest:SILVER.name=Sølv Kiste -tile.ironchest:CRYSTAL.name=Krystal Kiste -tile.ironchest:OBSIDIAN.name=Obsidian Kiste - -item.ironchest:IRONGOLD.name=Jern til Guld Kiste Opgradering -item.ironchest:GOLDDIAMOND.name=Guld til Diamant Kiste Opgradering -item.ironchest:COPPERSILVER.name=Kobber til Sølv Kiste Opgradering -item.ironchest:SILVERGOLD.name=Sølv til Guld Kiste Opgradering -item.ironchest:COPPERIRON.name=Kobber til Jern Kiste Opgradering -item.ironchest:DIAMONDCRYSTAL.name=Diamant til Krystal Kiste Opgradering -item.ironchest:WOODIRON.name=Træ til Jern Kiste Opgradering -item.ironchest:WOODCOPPER.name=Træ til Kobber Kiste Opgradering -item.ironchest:DIAMONDOBSIDIAN.name=Diamant til Obsidian Kiste Opgradering diff --git a/src/main/resources/assets/ironchest/lang/de_DE.lang b/src/main/resources/assets/ironchest/lang/de_DE.lang deleted file mode 100755 index fd6c4037..00000000 --- a/src/main/resources/assets/ironchest/lang/de_DE.lang +++ /dev/null @@ -1,25 +0,0 @@ -tile.ironchest:IRON.name=Eisentruhe -tile.ironchest:GOLD.name=Goldtruhe -tile.ironchest:DIAMOND.name=Diamanttruhe -tile.ironchest:COPPER.name=Kupfertruhe -tile.ironchest:SILVER.name=Silbertruhe -tile.ironchest:CRYSTAL.name=Kristalltruhe -tile.ironchest:OBSIDIAN.name=Obsidiantruhe -tile.ironchest:DIRTCHEST9000.name=DirtChest 9000! - -item.ironchest:IRONGOLD.name=Eisen-zu-Goldtruhen-Upgrade -item.ironchest:GOLDDIAMOND.name=Gold-zu-Diamanttruhen-Upgrade -item.ironchest:COPPERSILVER.name=Kupfer-zu-Silbertruhen-Upgrade -item.ironchest:SILVERGOLD.name=Silber-zu-Goldtruhen-Upgrade -item.ironchest:COPPERIRON.name=Kupfer-zu-Eisentruhen-Upgrade -item.ironchest:DIAMONDCRYSTAL.name=Diamant-zu-Kristalltruhen-Upgrade -item.ironchest:WOODIRON.name=Holz-zu-Eisentruhen-Upgrade -item.ironchest:WOODCOPPER.name=Holz-zu-Kupfertruhen-Upgrade -item.ironchest:DIAMONDOBSIDIAN.name=Diamant-zu-Obsidiantruhen-Upgrade - -book.ironchest:dirtchest9000.title=Wie du deine neue DirtChest 9000 nutzt! -book.ironchest:dirtchest9000.page1=Willkommen zu Ihrer neuen DirtChest 9000! Wir hoffen, dass Sie viele freudige Jahre genießen werden, wenn Sie Ihre Erd-Stacks in unserem nützlichen Speichergerät lagern. -book.ironchest:dirtchest9000.page2=Nutzung: Werfen Sie einfach den Erd-Stack Ihrer Wahl in den äußerst rezeptiven Slot und genießen Sie die Annehmlichkeit, diese Erde für Sie verfügbar zu haben, jedes mal, wenn Sie diese Truhe passieren! -book.ironchest:dirtchest9000.page3=Wir hoffen, Sie haben das Durchgehen dieser Bedienungsanleitung genossen, und hoffen, dass sie sich weiterhin entscheiden werden, in Zukunft unsere Produkte zu nutzen! Mit freundlichen Grüßen, Die DirtChest 9000 manual writers incorporated. -book.ironchest:dirtchest9000.page4=Garantie: Dieses Produkt hat keine Garantie jeglicher Sorte. Ihre Erde könnte nicht gespeichert werden, er könnte langsam in die Umwelt gesaugt werden, oder stattdessen könnte das Produkt gar nichts machen. -book.ironchest:dirtchest9000.page5=DirtChest 9000 ist freundlich zur Umwelt. Bitte entsorgen Sie diesen Guide verantwortungsbewusst, und tun sie nicht, was Sie immer tun und schmeißen ihn in irgendwelche Lava. Wir würden sehr traurig sein. diff --git a/src/main/resources/assets/ironchest/lang/el_GR.lang b/src/main/resources/assets/ironchest/lang/el_GR.lang deleted file mode 100755 index 67285bbd..00000000 --- a/src/main/resources/assets/ironchest/lang/el_GR.lang +++ /dev/null @@ -1,17 +0,0 @@ -tile.ironchest:IRON.name=Σιδερένιο Σεντούκι -tile.ironchest:GOLD.name=Χρυσό Σεντούκι -tile.ironchest:DIAMOND.name=Διαμαντένιο Σεντούκι -tile.ironchest:COPPER.name=Χάλκινο Σεντούκι -tile.ironchest:SILVER.name=Ασημένιο Σεντούκι -tile.ironchest:CRYSTAL.name=Κρυστάλλινο Σεντούκι -tile.ironchest:OBSIDIAN.name=Σεντούκι Οψιδιανού - -item.ironchest:IRONGOLD.name=Αναβάθμιση από Σιδερένιο σε Χρυσό Σεντούκι -item.ironchest:GOLDDIAMOND.name=Αναβάθμιση από Χρυσό σε Διαμαντένιο Σεντούκι -item.ironchest:COPPERSILVER.name=Αναβάθμιση από Χάλκινο σε Ασημένιο Σεντούκι -item.ironchest:SILVERGOLD.name=Αναβάθμιση από Ασημένιο σε Χρυσό Σεντούκι -item.ironchest:COPPERIRON.name=Αναβάθμιση από Χάλκινο σε Σιδερένιο Σεντούκι -item.ironchest:DIAMONDCRYSTAL.name=Αναβάθμιση από Διαμαντένιο σε Κρυστάλλινο Σεντούκι -item.ironchest:WOODIRON.name=Αναβάθμιση από Ξύλινο σε Σιδερένιο Σεντούκι -item.ironchest:WOODCOPPER.name=Αναβάθμιση από Ξύλινο σε Χάλκινο Σεντούκι -item.ironchest:DIAMONDOBSIDIAN.name=Αναβάθμιση από Διαμαντένιο σε Σεντούκι Οψιδιανού diff --git a/src/main/resources/assets/ironchest/lang/en_PT.lang b/src/main/resources/assets/ironchest/lang/en_PT.lang deleted file mode 100755 index ea69e274..00000000 --- a/src/main/resources/assets/ironchest/lang/en_PT.lang +++ /dev/null @@ -1,25 +0,0 @@ -tile.ironchest:IRON.name=Steel Coffer -tile.ironchest:GOLD.name=Gold Coffer -tile.ironchest:DIAMOND.name=Diamond Coffer -tile.ironchest:COPPER.name=Copper Coffer -tile.ironchest:SILVER.name=Silver Coffer -tile.ironchest:CRYSTAL.name=Shinin' Coffer -tile.ironchest:OBSIDIAN.name=Coffer o' tears -tile.ironchest:DIRTCHEST9000.name=FilthCoffer 9000! - -item.ironchest:IRONGOLD.name=Steel to Gold Coffer Upgradin' -item.ironchest:GOLDDIAMOND.name=Gold to Diamond Coffer Upgradin' -item.ironchest:COPPERSILVER.name=Copper to Silver Coffer Upgradin' -item.ironchest:SILVERGOLD.name=Silver to Gold Coffer Upgradin' -item.ironchest:COPPERIRON.name=Copper to Steel Coffer Upgradin' -item.ironchest:DIAMONDCRYSTAL.name=Diamond to Shinin' Coffer Upgradin' -item.ironchest:WOODIRON.name=Timber to Steel Coffer Upgradin' -item.ironchest:WOODCOPPER.name=Wood to Copper Coffer Upgradin' -item.ironchest:DIAMONDOBSIDIAN.name=Diamond to Coffer o' Tears Upgradin' - -book.ironchest:dirtchest9000.title=How to use yer FilthCoffer 9000! -book.ironchest:dirtchest9000.page1=Welcome to yer new FilthCoffer 9000! We hope ye will enjoy many happy years of storing yer filth wit yer coffer . -book.ironchest:dirtchest9000.page2=Usage: simply put yer filth in yer slot and yer got yerself some filth any time ye need it! -book.ironchest:dirtchest9000.page3=We hope you have enjoyed reviewing this instruction manual, and hope you will consider using our products in future! Kind regards, The DirtChest 9000 manual writers incorporated. -book.ironchest:dirtchest9000.page4=Warranty: We can't keep yer filth from pirates. Yer filth may not be stored, it may slowly return to yer world, or it may stay in yer coffer. -book.ironchest:dirtchest9000.page5=FilthCoffer 9000 is kind to yer voyage. Throw yer paper in a coffer near by wit yer booty, and don't just chuck it into some molten rock. We wouldn't be the happiest o' pirates. diff --git a/src/main/resources/assets/ironchest/lang/en_US.lang b/src/main/resources/assets/ironchest/lang/en_US.lang deleted file mode 100755 index c848ed80..00000000 --- a/src/main/resources/assets/ironchest/lang/en_US.lang +++ /dev/null @@ -1,25 +0,0 @@ -tile.ironchest:IRON.name=Iron Chest -tile.ironchest:GOLD.name=Gold Chest -tile.ironchest:DIAMOND.name=Diamond Chest -tile.ironchest:COPPER.name=Copper Chest -tile.ironchest:SILVER.name=Silver Chest -tile.ironchest:CRYSTAL.name=Crystal Chest -tile.ironchest:OBSIDIAN.name=Obsidian Chest -tile.ironchest:DIRTCHEST9000.name=DirtChest 9000! - -item.ironchest:IRONGOLD.name=Iron to Gold Chest Upgrade -item.ironchest:GOLDDIAMOND.name=Gold to Diamond Chest Upgrade -item.ironchest:COPPERSILVER.name=Copper to Silver Chest Upgrade -item.ironchest:SILVERGOLD.name=Silver to Gold Chest Upgrade -item.ironchest:COPPERIRON.name=Copper to Iron Chest Upgrade -item.ironchest:DIAMONDCRYSTAL.name=Diamond to Crystal Chest Upgrade -item.ironchest:WOODIRON.name=Wood to Iron Chest Upgrade -item.ironchest:WOODCOPPER.name=Wood to Copper Chest Upgrade -item.ironchest:DIAMONDOBSIDIAN.name=Diamond to Obsidian Chest Upgrade - -book.ironchest:dirtchest9000.title=How to use your DirtChest 9000! -book.ironchest:dirtchest9000.page1=Welcome to your new DirtChest 9000! We hope you will enjoy many happy years of storing your stack of dirt in our storage utility. -book.ironchest:dirtchest9000.page2=Usage: simply insert the stack of dirt of your choice into the highly receptive slot and enjoy the great convenience of having that dirt available to you, any time you pass by this chest! -book.ironchest:dirtchest9000.page3=We hope you have enjoyed reviewing this instruction manual, and hope you will consider using our products in future! Kind regards, The DirtChest 9000 manual writers incorporated. -book.ironchest:dirtchest9000.page4=Warranty: This product has no warranty of any kind. Your dirt may not be stored, it may slowly leech into the environment, or alternatively, it may not do anything at all. -book.ironchest:dirtchest9000.page5=DirtChest 9000 is kind to the environment. Please dispose of this guide book responsibly, and do not whatever you do just chuck it into some lava. We would be very sad. diff --git a/src/main/resources/assets/ironchest/lang/en_us.json b/src/main/resources/assets/ironchest/lang/en_us.json new file mode 100644 index 00000000..be72d625 --- /dev/null +++ b/src/main/resources/assets/ironchest/lang/en_us.json @@ -0,0 +1,43 @@ +{ + "_comment": "Blocks", + "block.ironchest.iron_chest": "Iron Chest", + "block.ironchest.gold_chest": "Gold Chest", + "block.ironchest.diamond_chest": "Diamond Chest", + "block.ironchest.copper_chest": "Copper Chest", + "block.ironchest.silver_chest": "Silver Chest", + "block.ironchest.crystal_chest": "Crystal Chest", + "block.ironchest.obsidian_chest": "Obsidian Chest", + "block.ironchest.dirt_chest": "DirtChest 9000!", + + "_comment": "Upgrades", + "item.ironchest.iron_to_gold_chest_upgrade": "Iron to Gold Chest Upgrade", + "item.ironchest.gold_to_diamond_chest_upgrade": "Gold to Diamond Chest Upgrade", + "item.ironchest.copper_to_silver_chest_upgrade": "Copper to Silver Chest Upgrade", + "item.ironchest.silver_to_gold_chest_upgrade": "Silver to Gold Chest Upgrade", + "item.ironchest.copper_to_iron_chest_upgrade": "Copper to Iron Chest Upgrade", + "item.ironchest.diamond_to_crystal_chest_upgrade": "Diamond to Crystal Chest Upgrade", + "item.ironchest.wood_to_iron_chest_upgrade": "Wood to Iron Chest Upgrade", + "item.ironchest.wood_to_copper_chest_upgrade": "Wood to Copper Chest Upgrade", + "item.ironchest.diamond_to_obsidian_chest_upgrade": "Diamond to Obsidian Chest Upgrade", + + "_comment": "Books", + "book.ironchest.dirtchest9000.title": "How to use your DirtChest 9000!", + "book.ironchest.dirtchest9000.page1": "Welcome to your new DirtChest 9000! We hope you will enjoy many happy years of storing your stack of dirt in our storage utility.", + "book.ironchest.dirtchest9000.page2": "Usage: simply insert the stack of dirt of your choice into the highly receptive slot and enjoy the great convenience of having that dirt available to you, any time you pass by this chest!", + "book.ironchest.dirtchest9000.page3": "We hope you have enjoyed reviewing this instruction manual, and hope you will consider using our products in future! Kind regards, The DirtChest 9000 manual writers incorporated.", + "book.ironchest.dirtchest9000.page4": "Warranty: This product has no warranty of any kind. Your dirt may not be stored, it may slowly leech into the environment, or alternatively, it may not do anything at all.", + "book.ironchest.dirtchest9000.page5": "DirtChest 9000 is kind to the environment. Please dispose of this guide book responsibly, and do not whatever you do just chuck it into some lava. We would be very sad.", + + "_comment": "Containers", + "ironchest.container.iron_chest": "Iron Chest", + "ironchest.container.gold_chest": "Gold Chest", + "ironchest.container.diamond_chest": "Diamond Chest", + "ironchest.container.copper_chest": "Copper Chest", + "ironchest.container.silver_chest": "Silver Chest", + "ironchest.container.crystal_chest": "Crystal Chest", + "ironchest.container.obsidian_chest": "Obsidian Chest", + "ironchest.container.dirt_chest": "DirtChest 9000!", + + "_comment": "Item Groups", + "itemGroup.ironchest": "Iron Chests" +} \ No newline at end of file diff --git a/src/main/resources/assets/ironchest/lang/es_ES.lang b/src/main/resources/assets/ironchest/lang/es_ES.lang deleted file mode 100755 index b770efc1..00000000 --- a/src/main/resources/assets/ironchest/lang/es_ES.lang +++ /dev/null @@ -1,17 +0,0 @@ -tile.ironchest:IRON.name=Cofre de Hierro -tile.ironchest:GOLD.name=Cofre de Oro -tile.ironchest:DIAMOND.name=Cofre de Diamante -tile.ironchest:COPPER.name=Cofre de Cobre -tile.ironchest:SILVER.name=Cofre de Plata -tile.ironchest:CRYSTAL.name=Cofre de Cristal -tile.ironchest:OBSIDIAN.name=Cofre de Obsidiana - -item.ironchest:IRONGOLD.name=Mejora de Cofre de Hierro a Oro -item.ironchest:GOLDDIAMOND.name=Mejora de Cofre de Oro a Diamante -item.ironchest:COPPERSILVER.name=Mejora de Cofre de Cobre a Plata -item.ironchest:SILVERGOLD.name=Mejora de Cofre de Plata a Oro -item.ironchest:COPPERIRON.name=Mejora de Cofre de Cobre a Hierro -item.ironchest:DIAMONDCRYSTAL.name=Mejora de Cofre de Diamante a Cristal -item.ironchest:WOODIRON.name=Mejora de Cofre de Madera a Hierro -item.ironchest:WOODCOPPER.name=Mejora de Cofre de Madera a Cobre -item.ironchest:DIAMONDOBSIDIAN.name=Mejora de Cofre de Diamante a Obsidiana diff --git a/src/main/resources/assets/ironchest/lang/et_EE.lang b/src/main/resources/assets/ironchest/lang/et_EE.lang deleted file mode 100755 index c0b3776c..00000000 --- a/src/main/resources/assets/ironchest/lang/et_EE.lang +++ /dev/null @@ -1,18 +0,0 @@ -tile.ironchest:IRON.name=Raudkirst -tile.ironchest:GOLD.name=Kuldkirst -tile.ironchest:DIAMOND.name=Teemantkirst -tile.ironchest:COPPER.name=Vaskkirst -tile.ironchest:SILVER.name=Hõbekirst -tile.ironchest:CRYSTAL.name=Kristallkirst -tile.ironchest:OBSIDIAN.name=Obsidiaankirst -tile.ironchest:DIRTCHEST9000.name=Muldkirst 9000! - -item.ironchest:IRONGOLD.name=Raudkirst kuld kirstuks -item.ironchest:GOLDDIAMOND.name=Kuldkirst teemandist kirstuks -item.ironchest:COPPERSILVER.name=Vaskkirst hõbedast kirstuks -item.ironchest:SILVERGOLD.name=Hõbekirst kullast kirstuks -item.ironchest:COPPERIRON.name=Vaskkirst rauast kirstuks -item.ironchest:DIAMONDCRYSTAL.name=Teemantkirst kristallist kirstuks -item.ironchest:WOODIRON.name=Puukirst rauast kirstuks -item.ironchest:WOODCOPPER.name=Puukirst vasest kirstuks -item.ironchest:DIAMONDOBSIDIAN.name=Teemantkirst obsidiaanist kirstuks diff --git a/src/main/resources/assets/ironchest/lang/fr_FR.lang b/src/main/resources/assets/ironchest/lang/fr_FR.lang deleted file mode 100755 index c1714d6c..00000000 --- a/src/main/resources/assets/ironchest/lang/fr_FR.lang +++ /dev/null @@ -1,19 +0,0 @@ -#fr_FR translated by robin4002 - -tile.ironchest:IRON.name=Coffre en Fer -tile.ironchest:GOLD.name=Coffre en Or -tile.ironchest:DIAMOND.name=Coffre en Diamant -tile.ironchest:COPPER.name=Coffre en Cuivre -tile.ironchest:SILVER.name=Coffre en Argent -tile.ironchest:CRYSTAL.name=Coffre en Cristal -tile.ironchest:OBSIDIAN.name=Coffre en Obsidienne - -item.ironchest:IRONGOLD.name=Amélioration de coffre en fer à or -item.ironchest:GOLDDIAMOND.name=Amélioration de coffre en or à diamant -item.ironchest:COPPERSILVER.name=Amélioration de coffre en cuivre à argent -item.ironchest:SILVERGOLD.name=Amélioration de coffre en argent à or -item.ironchest:COPPERIRON.name=Amélioration de coffre en cuivre à fer -item.ironchest:DIAMONDCRYSTAL.name=Amélioration de coffre en diamant à crital -item.ironchest:WOODIRON.name=Amélioration de coffre en bois à fer -item.ironchest:WOODCOPPER.name=Amélioration de coffre en bois à cuivre -item.ironchest:DIAMONDOBSIDIAN.name=Amélioration de coffre en diamant à obsidienne diff --git a/src/main/resources/assets/ironchest/lang/it_IT.lang b/src/main/resources/assets/ironchest/lang/it_IT.lang deleted file mode 100755 index fc3d82cd..00000000 --- a/src/main/resources/assets/ironchest/lang/it_IT.lang +++ /dev/null @@ -1,25 +0,0 @@ -tile.ironchest:IRON.name=Baule di ferro -tile.ironchest:GOLD.name=Baule d'oro -tile.ironchest:DIAMOND.name=Baule di diamante -tile.ironchest:COPPER.name=Baule di rame -tile.ironchest:SILVER.name=Baule d'argento -tile.ironchest:CRYSTAL.name=Baule di cristallo -tile.ironchest:OBSIDIAN.name=Baule di ossidiana -tile.ironchest:DIRTCHEST9000.name=DirtChest 9000! - -item.ironchest:IRONGOLD.name=Potenziamento da ferro a oro -item.ironchest:GOLDDIAMOND.name=Potenziamento da oro a diamante -item.ironchest:COPPERSILVER.name=Potenziamento da rame a argento -item.ironchest:SILVERGOLD.name=Potenziamento da argento a oro -item.ironchest:COPPERIRON.name=Potenziamento da rame a ferro -item.ironchest:DIAMONDCRYSTAL.name=Potenziamento da diamante a cristallo -item.ironchest:WOODIRON.name=Potenziamento da legno a ferro -item.ironchest:WOODCOPPER.name=Potenziamento da legno a rame -item.ironchest:DIAMONDOBSIDIAN.name=Potenziamento da diamante a ossidiana - -book.ironchest:dirtchest9000.title=Come usare la tua DirtChest 9000! -book.ironchest:dirtchest9000.page1=Benvenuto alla tua nuova DirtChest 9000! Speriamo che possiate godere di molti anni felici in cui imagazzinate grandi quantità di terra nei nostri contenitori. -book.ironchest:dirtchest9000.page2=Uso: inserisci uno stack di terra nello slot e goditi la grande convenienza di avere della terra a tua disposizione ogni volta che passi vicino alla cassa! -book.ironchest:dirtchest9000.page3=Speriamo che questo manuale vi sia stato utile, e speriamo che prenderete in considerazione usare i nostri prodotti in futuro ! I migliori saluti, i scrittori del manuale per la DirtChest 9000. -book.ironchest:dirtchest9000.page4=Garanzia: Questo prodotto non ha nessuna garanzia di alcun tipo. La tua terra potrebbe non essere imagazzinata, potrebbe lentamente fuoriuscire nell'ambiente, oppure, non farà niente. -book.ironchest:dirtchest9000.page5=La DirtChest 9000 è amico dell'ambiente. Per favore conservate questo libro in un modo responsabile, e non buttatelo nella lava come un oggetto qualsiasi. Saremmo veramente tristi. diff --git a/src/main/resources/assets/ironchest/lang/ko_KR.lang b/src/main/resources/assets/ironchest/lang/ko_KR.lang deleted file mode 100755 index 837ae58b..00000000 --- a/src/main/resources/assets/ironchest/lang/ko_KR.lang +++ /dev/null @@ -1,25 +0,0 @@ -tile.ironchest:IRON.name=철 상자 -tile.ironchest:GOLD.name=금 상자 -tile.ironchest:DIAMOND.name=다이아몬드 상자 -tile.ironchest:COPPER.name=구리 상자 -tile.ironchest:SILVER.name=은 상자 -tile.ironchest:CRYSTAL.name=수정 상자 -tile.ironchest:OBSIDIAN.name=흑요석 상자 -tile.ironchest:DIRTCHEST9000.name=흙 상자 9000! - -item.ironchest:IRONGOLD.name=철 상자를 금 상자로 업그레이드 -item.ironchest:GOLDDIAMOND.name=금 상자를 다이아몬드 상자로 업그레이드 -item.ironchest:COPPERSILVER.name=구리 상자를 은 상자로 업그레이드 -item.ironchest:SILVERGOLD.name=은 상자를 금 상자로 업그레이드 -item.ironchest:COPPERIRON.name=구리 상자를 철 상자로 업그레이드 -item.ironchest:DIAMONDCRYSTAL.name=다이아몬드 상자를 수정 상자로 업그레이드 -item.ironchest:WOODIRON.name=나무 상자를 철 상자로 업그레이드 -item.ironchest:WOODCOPPER.name=나무 상자를 구리 상자로 업그레이드 -item.ironchest:DIAMONDOBSIDIAN.name=다이아몬드 상자를 흑요석 상자로 업그레이드 - -book.ironchest:dirtchest9000.title=흙 상자 9000을 사용하는 방법! -book.ironchest:dirtchest9000.page1=새로운 흙 상자 9000을 사용하게 되신 것을 환영합니다! 우리는 당신이 이 저장 도구에서 흙들을 많은 해 동안 행복하게 저장하기를 기원합니다. -사용법: 단순히 흙 뭉치들을 아이템 슬롯에 넣고 이 상자를 지나갈 때마다 언제나 당신에게 제공되어지는 흙들의 편리함을 누리세요! -book.ironchest:dirtchest9000.page3=우리는 당신이 이 사용설명서를 즐겁게 읽었고, 나중에 이 제품을 사용하기를 바랍니다! 흙 상자 9000 매뉴얼 -book.ironchest:dirtchest9000.page4=주의: 이 제품에는 어떤 종류의 보증도 하지 않습니다 당신의 흙들은 저장되지 않을 수도 있습니다. 그러면 이 흙 상자는 천천히 환경 속으로 돌아가거나, 혹은 아무것도 하지 않을 것입니다. -book.ironchest:dirtchest9000.page5=흙 상자 9000은 환경 친화적입니다. 가이드북의 처분에는 책임이 따릅니다, 그러니 어떠한 경우라도 용암에 버리지 마세요. 우리는 매우 슬플 것입니다. diff --git a/src/main/resources/assets/ironchest/lang/ko_kr.json b/src/main/resources/assets/ironchest/lang/ko_kr.json new file mode 100644 index 00000000..12b7a04f --- /dev/null +++ b/src/main/resources/assets/ironchest/lang/ko_kr.json @@ -0,0 +1,33 @@ +{ + "_comment": "Blocks", + "block.ironchest.iron_chest": "철 상자", + "block.ironchest.gold_chest": "금 상자", + "block.ironchest.diamond_chest": "다이아몬드 상자", + "block.ironchest.copper_chest": "구리 상자", + "block.ironchest.silver_chest": "은 상자", + "block.ironchest.crystal_chest": "수정 상자", + "block.ironchest.obsidian_chest": "흑요석 상자", + "block.ironchest.dirt_chest": "흙 상자 9000!", + + "_comment": "Upgrades", + "item.ironchest.iron_to_gold_chest_upgrade": "철 상자를 금 상자로 업그레이드", + "item.ironchest.gold_to_diamond_chest_upgrade": "금 상자를 다이아몬드 상자로 업그레이드", + "item.ironchest.copper_to_silver_chest_upgrade": "구리 상자를 은 상자로 업그레이드", + "item.ironchest.silver_to_gold_chest_upgrade": "은 상자를 금 상자로 업그레이드", + "item.ironchest.copper_to_iron_chest_upgrade": "구리 상자를 철 상자로 업그레이드", + "item.ironchest.diamond_to_crystal_chest_upgrade": "다이아몬드 상자를 수정 상자로 업그레이드", + "item.ironchest.wood_to_iron_chest_upgrade": "나무 상자를 철 상자로 업그레이드", + "item.ironchest.wood_to_copper_chest_upgrade": "나무 상자를 구리 상자로 업그레이드", + "item.ironchest.diamond_to_obsidian_chest_upgrade": "다이아몬드 상자를 흑요석 상자로 업그레이드", + + "_comment": "Books", + "book.ironchest.dirtchest9000.title": "흙 상자 9000을 사용하는 방법!", + "book.ironchest.dirtchest9000.page1": "새로운 흙 상자 9000을 사용하게 되신 것을 환영합니다! 우리는 당신이 이 저장 도구에서 흙들을 많은 해 동안 행복하게 저장하기를 기원합니다.", + "book.ironchest.dirtchest9000.page2": "사용법: 단순히 흙 뭉치들을 아이템 슬롯에 넣고 이 상자를 지나갈 때마다 언제나 당신에게 제공되어지는 흙들의 편리함을 누리세요!", + "book.ironchest.dirtchest9000.page3": "우리는 당신이 이 사용설명서를 즐겁게 읽었고, 나중에 이 제품을 사용하기를 바랍니다! 흙 상자 9000 매뉴얼", + "book.ironchest.dirtchest9000.page4": "주의: 이 제품에는 어떤 종류의 보증도 하지 않습니다 당신의 흙들은 저장되지 않을 수도 있습니다. 그러면 이 흙 상자는 천천히 환경 속으로 돌아가거나, 혹은 아무것도 하지 않을 것입니다.", + "book.ironchest.dirtchest9000.page5": "흙 상자 9000은 환경 친화적입니다. 가이드북의 처분에는 책임이 따릅니다, 그러니 어떠한 경우라도 용암에 버리지 마세요. 우리는 매우 슬플 것입니다.", + + "_comment": "Item Groups", + "itemGroup.ironchest": "Iron Chests" +} diff --git a/src/main/resources/assets/ironchest/lang/nb_NO.lang b/src/main/resources/assets/ironchest/lang/nb_NO.lang deleted file mode 100755 index c5beb18e..00000000 --- a/src/main/resources/assets/ironchest/lang/nb_NO.lang +++ /dev/null @@ -1,25 +0,0 @@ -tile.ironchest:IRON.name=Jernkiste -tile.ironchest:GOLD.name=Gullkiste -tile.ironchest:DIAMOND.name=Diamantkiste -tile.ironchest:COPPER.name=Kobberkiste -tile.ironchest:SILVER.name=Sølvkiste -tile.ironchest:CRYSTAL.name=Krystallkiste -tile.ironchest:OBSIDIAN.name=Obsidiankiste -tile.ironchest:DIRTCHEST9000.name=JordKiste 9000! - -item.ironchest:IRONGOLD.name=Jern til Gull Kisteoppgradering -item.ironchest:GOLDDIAMOND.name=Gull til Diamant Kisteoppgradering -item.ironchest:COPPERSILVER.name=Kobber til Sølv Kisteoppgradering -item.ironchest:SILVERGOLD.name=Sølv til Gull Kisteoppgradering -item.ironchest:COPPERIRON.name=Kobber til Jern Kisteoppgradering -item.ironchest:DIAMONDCRYSTAL.name=Diamant til Krystall Kisteoppgradering -item.ironchest:WOODIRON.name=Tre til Jern Kisteoppgradering -item.ironchest:WOODCOPPER.name=Tre til Kobber Kisteoppgradering -item.ironchest:DIAMONDOBSIDIAN.name=Diamant til Obsidian Kisteoppgradering - -book.ironchest:dirtchest9000.title=Hvordan bruker din JordKiste 9000! -book.ironchest:dirtchest9000.page1=Velkommen til din nye JordKiste9000! Vi håper du vil nyte mange lykkelige år med lagring av din stabel av jord i vå lager verktøy. -book.ironchest:dirtchest9000.page2=Bruk: bare å sette bunken med jord av ditt valg i den svært mottakelige sporet og nyte den store fordelen med åa den jorden tilgjengelig for deg, nådu passerer denne kisten! -book.ironchest:dirtchest9000.page3=Vi håper du har hatt en god fornøyelse gjennom denne bruksanvisningen, og hår du vil vurdere å bruke vå produkter i fremtiden! Vennlig hilsen, JordKiste9000 manual forfattere innarbeidet. -book.ironchest:dirtchest9000.page4=Garanti: Dette produktet har ingen garantier av noe slag. Din jord kan ikke lagres, det kan sakte lekke ut i miljøet, eller alternativt, kan det ikke gjøre noe i det hele tatt. -book.ironchest:dirtchest9000.page5=JordKiste 9000 er snill mot miljøet. Vennligst ta hånd om denne veileder boken ansvarlig, og hva du enn gjør ikke kast den inn i noe lav. Vi ville bli veldig trist. diff --git a/src/main/resources/assets/ironchest/lang/nl_NL.lang b/src/main/resources/assets/ironchest/lang/nl_NL.lang deleted file mode 100755 index fb3a2f59..00000000 --- a/src/main/resources/assets/ironchest/lang/nl_NL.lang +++ /dev/null @@ -1,25 +0,0 @@ -tile.ironchest:IRON.name=Ijzeren Kist -tile.ironchest:GOLD.name=Gouden Kist -tile.ironchest:DIAMOND.name=Diamanten Kist -tile.ironchest:COPPER.name=Koperen Kist -tile.ironchest:SILVER.name=Zilveren Kist -tile.ironchest:CRYSTAL.name=Kristallen Kist -tile.ironchest:OBSIDIAN.name=Obsidiaanen Kist -tile.ironchest:DIRTCHEST9000.name=Aarden Kist 9000! - -item.ironchest:IRONGOLD.name=Ijzeren naar Gouden Kist Transformatie -item.ironchest:GOLDDIAMOND.name=Gouden naar Diamanten Kist Transformatie -item.ironchest:COPPERSILVER.name=Koperen naar Zilveren Kist Transformatie -item.ironchest:SILVERGOLD.name=Zilveren naar Gouden Kist Transformatie -item.ironchest:COPPERIRON.name=Koperen naar Ijzeren Kist Transformatie -item.ironchest:DIAMONDCRYSTAL.name=Diamanten naar Kristallen Kist Transformatie -item.ironchest:WOODIRON.name=Houten naar Ijzeren Kist Transformatie -item.ironchest:WOODCOPPER.name=Houten naar Koperen Kist Transformatie -item.ironchest:DIAMONDOBSIDIAN.name=Diamanten naar Obsidiaanen Kist Transformatie - -book.ironchest:dirtchest9000.title=Hoe gebruik je uw Aarden Kist 9000! -book.ironchest:dirtchest9000.page1=Welkom voor uw nieuwe Aarden Kist 9000! We hopen dat je veel geluk zal beleven om uw hoop aarde te bewaren in onze stokeer faciliteit. -book.ironchest:dirtchest9000.page2=Gebruik: Plaats simpelweg uw hoop aarde naar uw keuze in de zeer ontvankelijke gleuf en geniet van de geriefelijkheid om dat hoop aarde altijd beschikbaar tot u te hebben, wanneer dan ook! -book.ironchest:dirtchest9000.page3=We hopen dat u heeft genoten om deze handleiding te lezen en we hopen dat u overweegt om onze producten in de toekomst te gebruiken! Met vriendelijke groeten, De Aarden Kist 9000 Handleiding Auteurs. -book.ironchest:dirtchest9000.page4=Garantie: Deze product biedt geen enkele garantie. Uw aarde kan mogenlijk niet gestockeerd worden, het kan langzaam verdampen of het kan ook helemaal niks doen. -book.ironchest:dirtchest9000.page5=Aarden Kist 9000 is mileuvriendelijk. Gelieve deze handleiding verantwoordlijk te ontdoen en gooi het niet zomaar in wat lava. We zouden zeer verdrietig zijn. diff --git a/src/main/resources/assets/ironchest/lang/pl_PL.lang b/src/main/resources/assets/ironchest/lang/pl_PL.lang deleted file mode 100755 index c5ffc855..00000000 --- a/src/main/resources/assets/ironchest/lang/pl_PL.lang +++ /dev/null @@ -1,17 +0,0 @@ -tile.ironchest:IRON.name=Żelazna skrzynia -tile.ironchest:GOLD.name=Złota skrzynia -tile.ironchest:DIAMOND.name=Diamentowa skrzynia -tile.ironchest:COPPER.name=Miedziana skrzynia -tile.ironchest:SILVER.name=Srebrna skrzynia -tile.ironchest:CRYSTAL.name=Kryształowa skrzynia -tile.ironchest:OBSIDIAN.name=Obsydianowa skrzynia - -item.ironchest:IRONGOLD.name=Ulepszenie żelaznej skrzyni na złotą -item.ironchest:GOLDDIAMOND.name=Ulepszenie złotej skrzyni na diamentową -item.ironchest:COPPERSILVER.name=Ulepszenie miedzianej skrzyni na srebrną -item.ironchest:SILVERGOLD.name=Ulepszenie srebrnej skrzyni na złotą -item.ironchest:COPPERIRON.name=Ulepszenie miedzianej skrzyni na żelazną -item.ironchest:DIAMONDCRYSTAL.name=Ulepszenie diamentowej skrzyni na kryształową -item.ironchest:WOODIRON.name=Ulepszenie drewnianej skrzyni na żelazną -item.ironchest:WOODCOPPER.name=Ulepszenie drewnianej skrzyni na miedzianą -item.ironchest:DIAMONDOBSIDIAN.name=Ulepszenie diamentowej skrzyni na obsydianową diff --git a/src/main/resources/assets/ironchest/lang/pl_pl.json b/src/main/resources/assets/ironchest/lang/pl_pl.json new file mode 100644 index 00000000..f14ee66b --- /dev/null +++ b/src/main/resources/assets/ironchest/lang/pl_pl.json @@ -0,0 +1,33 @@ +{ + "_comment": "Blocks", + "block.ironchest.iron_chest": "Żelazna skrzynia", + "block.ironchest.gold_chest": "Złota skrzynia", + "block.ironchest.diamond_chest": "Diamentowa skrzynia", + "block.ironchest.copper_chest": "Miedziana skrzynia", + "block.ironchest.silver_chest": "Srebrna skrzynia", + "block.ironchest.crystal_chest": "Kryształowa skrzynia", + "block.ironchest.obsidian_chest": "Obsydianowa skrzynia", + "block.ironchest.dirt_chest": "DirtChest 9000!", + + "_comment": "Upgrades", + "item.ironchest.iron_to_gold_chest_upgrade": "Ulepszenie żelaznej skrzyni na złotą", + "item.ironchest.gold_to_diamond_chest_upgrade": "Ulepszenie złotej skrzyni na diamentową", + "item.ironchest.copper_to_silver_chest_upgrade": "Ulepszenie miedzianej skrzyni na srebrną", + "item.ironchest.silver_to_gold_chest_upgrade": "Ulepszenie srebrnej skrzyni na złotą", + "item.ironchest.copper_to_iron_chest_upgrade": "Ulepszenie miedzianej skrzyni na żelazną", + "item.ironchest.diamond_to_crystal_chest_upgrade": "Ulepszenie diamentowej skrzyni na kryształową", + "item.ironchest.wood_to_iron_chest_upgrade": "Ulepszenie drewnianej skrzyni na żelazną", + "item.ironchest.wood_to_copper_chest_upgrade": "Ulepszenie drewnianej skrzyni na miedzianą", + "item.ironchest.diamond_to_obsidian_chest_upgrade": "Ulepszenie diamentowej skrzyni na obsydianową", + + "_comment": "Books", + "book.ironchest.dirtchest9000.title": "Jak używać skrzyni DirtChest 9000!", + "book.ironchest.dirtchest9000.page1": "Witamy w Twojej nowej skrzyni DirtChest 9000! Mamy nadzieję, że dobrze spędzisz wiele szczęśliwych lat przechowując swoje stosy ziemi w naszym magazynie.", + "book.ironchest.dirtchest9000.page2": "Sposób użycia: wystarczy włożyć wybrany przez siebie stos ziemi do jednego z dostępnych miejsc, a następnie cieszyć się udogodnieniem, jakim jest skład ziemi dostępny na wyciągnięcie ręki!", + "book.ironchest.dirtchest9000.page3": "Mamy nadzieję, że z przyjemnością zapoznali się Państwo z tą instrukcją obsługi oraz mamy nadzieję, że rozważą Państwo dalsze korzystanie z naszych produktów! Z poważaniem, stowarzyszenie pisarzy ds. instrukcji obsługi skrzyni DirtChest 9000.", + "book.ironchest.dirtchest9000.page4": "Gwarancja: Ten produkt nie jest objęty ochroną gwarancyjną. Ziemia może nie być przechowywana, może powoli przedostawać się do otoczenia lub może w ogóle nic nie robić.", + "book.ironchest.dirtchest9000.page5": "DirtChest 9000 jest przyjazny dla środowiska. Proszę o pozbycie się tego podręcznika w sposób odpowiedzialny, a na pewno nie o beztroskie smyrgnięcie go do lawy. Byłoby nam bardzo przykro.", + + "_comment": "Item Groups", + "itemGroup.ironchest": "Iron Chests" +} diff --git a/src/main/resources/assets/ironchest/lang/pt_BR.lang b/src/main/resources/assets/ironchest/lang/pt_BR.lang deleted file mode 100755 index 38c0e346..00000000 --- a/src/main/resources/assets/ironchest/lang/pt_BR.lang +++ /dev/null @@ -1,25 +0,0 @@ -tile.ironchest:IRON.name=Baú de Ferro -tile.ironchest:GOLD.name=Baú de Ouro -tile.ironchest:DIAMOND.name=Baú de Diamante -tile.ironchest:COPPER.name=Baú de Cobre -tile.ironchest:SILVER.name=Baú de Prata -tile.ironchest:CRYSTAL.name=Baú de Cristal -tile.ironchest:OBSIDIAN.name=Baú de Obsidiana -tile.ironchest:DIRTCHEST9000.name=BaúDeSujeira 9000! - -item.ironchest:IRONGOLD.name=Aprimoramento de Baú de Ferro para Ouro -item.ironchest:GOLDDIAMOND.name=Aprimoramento de Baú de Ouro para Diamante -item.ironchest:COPPERSILVER.name=Aprimoramento de Baú de Cobre para Prata -item.ironchest:SILVERGOLD.name=Aprimoramento de Baú de Prata para Ouro -item.ironchest:COPPERIRON.name=Aprimoramento de Baú de Cobre para Ferro -item.ironchest:DIAMONDCRYSTAL.name=Aprimoramento de Baú de Diamante para Cristal -item.ironchest:WOODIRON.name=Aprimoramento de Baú de Madeira para Ferro -item.ironchest:WOODCOPPER.name=Aprimoramento de Baú de Madeira para Cobre -item.ironchest:DIAMONDOBSIDIAN.name=Aprimoramento de Baú de Diamante para Obsidiana - -book.ironchest:dirtchest9000.title=Como utilizar seu BaúDeSujeira 9000! -book.ironchest:dirtchest9000.page1=Bem-vindo ao seu novo BaúDeSujeira 9000! Esperamos que desfrute de muitos anos felizes de armazenagem de sua pilha de sujeira em nosso utilitário de armazenamento. -book.ironchest:dirtchest9000.page2=Uso: basta inserir o monte de sujeira de sua escolha no slot altamente receptivo e apreciar a grande conveniência de ter essa sujeira disponíveis para você, a qualquer momento que você passar pelo baú! -book.ironchest:dirtchest9000.page3=Esperamos que tenham gostado de rever este manual de instruções, e espero que você considere o uso de nossos produtos no futuro! Atenciosamente, manual do BaúDeSujeira 9000 escritores incorporados. -book.ironchest:dirtchest9000.page4=Garantia: Este produto não tem qualquer tipo de garantia. Sua sujeira pode não ser armazenada, pode vazar lentamente para o ambiente, ou alternativamente, pode não fazer absolutamente nada. -book.ironchest:dirtchest9000.page5=BaúDeSujeira 9000 é bom para o meio ambiente. Elimine este guia de forma responsável, e não o que você faz apenas lançando-o em alguma lava. Ficaríamos muito triste. diff --git a/src/main/resources/assets/ironchest/lang/pt_PT.lang b/src/main/resources/assets/ironchest/lang/pt_PT.lang deleted file mode 100755 index cb29cb28..00000000 --- a/src/main/resources/assets/ironchest/lang/pt_PT.lang +++ /dev/null @@ -1,17 +0,0 @@ -tile.ironchest:IRON.name=Baú de Ferro -tile.ironchest:GOLD.name=Baú de Ouro -tile.ironchest:DIAMOND.name=Baú de Diamante -tile.ironchest:COPPER.name=Baú de Cobre -tile.ironchest:SILVER.name=Baú de Prata -tile.ironchest:CRYSTAL.name=Baú de Cristal -tile.ironchest:OBSIDIAN.name=Baú de Obsidiana - -item.ironchest:IRONGOLD.name=Melhoria de Baú de Ferro para Ouro -item.ironchest:GOLDDIAMOND.name=Melhoria de Baú de Ouro para Diamante -item.ironchest:COPPERSILVER.name=Melhoria de Baú de Cobre para Prata -item.ironchest:SILVERGOLD.name=Melhoria de Baú de Prata para Ouro -item.ironchest:COPPERIRON.name=Melhoria de Baú de Cobre para Ferro -item.ironchest:DIAMONDCRYSTAL.name=Melhoria de Baú de Diamante para Cristal -item.ironchest:WOODIRON.name=Melhoria de Baú de Madeira para Ferro -item.ironchest:WOODCOPPER.name=Melhoria de Baú de Madeira para Cobre -item.ironchest:DIAMONDOBSIDIAN.name=Melhoria de Baú de Diamante para Obsidiana diff --git a/src/main/resources/assets/ironchest/lang/ru_RU.lang b/src/main/resources/assets/ironchest/lang/ru_RU.lang deleted file mode 100755 index 114eee76..00000000 --- a/src/main/resources/assets/ironchest/lang/ru_RU.lang +++ /dev/null @@ -1,17 +0,0 @@ -tile.ironchest:IRON.name=Железный сундук -tile.ironchest:GOLD.name=Золотой сундук -tile.ironchest:DIAMOND.name=Алмазный сундук -tile.ironchest:COPPER.name=Медный сундук -tile.ironchest:SILVER.name=Серебряный сундук -tile.ironchest:CRYSTAL.name=Кристальный сундук -tile.ironchest:OBSIDIAN.name=Обсидиановый сундук - -item.ironchest:IRONGOLD.name=Улучшение из железного в золотой сундук -item.ironchest:GOLDDIAMOND.name=Улучшение из золотого в алмазный сундук -item.ironchest:COPPERSILVER.name=Улучшение из медного в серебряный сундук -item.ironchest:SILVERGOLD.name=Улучшение из серебряного в золотой сундук -item.ironchest:COPPERIRON.name=Улучшение из медного в железный сундук -item.ironchest:DIAMONDCRYSTAL.name=Улучшение из алмазного в кристальный сундук -item.ironchest:WOODIRON.name=Улучшение из деревянного в железный сундук -item.ironchest:WOODCOPPER.name=Улучшение из деревянного в медный сундук -item.ironchest:DIAMONDOBSIDIAN.name=Улучшение из алмазного в обсидиановый сундук diff --git a/src/main/resources/assets/ironchest/lang/sv_SE.lang b/src/main/resources/assets/ironchest/lang/sv_SE.lang deleted file mode 100755 index 2bbeacf7..00000000 --- a/src/main/resources/assets/ironchest/lang/sv_SE.lang +++ /dev/null @@ -1,17 +0,0 @@ -tile.ironchest:IRON.name=Järnkista -tile.ironchest:GOLD.name=Guldkista -tile.ironchest:DIAMOND.name=Diamantkista -tile.ironchest:COPPER.name=Kopparkista -tile.ironchest:SILVER.name=Silverkista -tile.ironchest:CRYSTAL.name=Kristallkista -tile.ironchest:OBSIDIAN.name=Obsidiankista - -item.ironchest:IRONGOLD.name=Järn till Guld Kistuppgradering -item.ironchest:GOLDDIAMOND.name=Guld till Diamant Kistuppgradering -item.ironchest:COPPERSILVER.name=Koppar till Silver Kistuppgradering -item.ironchest:SILVERGOLD.name=Silver till Guld Kistuppgradering -item.ironchest:COPPERIRON.name=Koppar till Järn Kistuppgradering -item.ironchest:DIAMONDCRYSTAL.name=Diamant till Kristal Kistuppgradering -item.ironchest:WOODIRON.name=Trä till Järn Kistuppgradering -item.ironchest:WOODCOPPER.name=Trä till Koppar Kistuppgradering -item.ironchest:DIAMONDOBSIDIAN.name=Diamant till Obsidian Kistuppgradering diff --git a/src/main/resources/assets/ironchest/lang/tr_TR.lang b/src/main/resources/assets/ironchest/lang/tr_TR.lang deleted file mode 100755 index 9c86204a..00000000 --- a/src/main/resources/assets/ironchest/lang/tr_TR.lang +++ /dev/null @@ -1,25 +0,0 @@ -tile.ironchest:IRON.name=Demir Sandık -tile.ironchest:GOLD.name=Altın Sandık -tile.ironchest:DIAMOND.name=Elmas Sandık -tile.ironchest:COPPER.name=Bakır Sandık -tile.ironchest:SILVER.name=Gümüş Sandık -tile.ironchest:CRYSTAL.name=Kristal Sandık -tile.ironchest:OBSIDIAN.name=Obsidyen Sandık -tile.ironchest:DIRTCHEST9000.name=Toprak Sandık-9000! - -item.ironchest:IRONGOLD.name=Demir Sandığı Altın Sandığa Yükselt -item.ironchest:GOLDDIAMOND.name=Altın Sandığı Elmas Sandığa Yükselt -item.ironchest:COPPERSILVER.name=Bakır Sandığı Gümüş Sandığa Yükselt -item.ironchest:SILVERGOLD.name=Gümüş Sandığı Altın Sandığa Yükselt -item.ironchest:COPPERIRON.name=Bakır Sandığı Demir Sandığa Yükselt -item.ironchest:DIAMONDCRYSTAL.name=Elmas Sandığı Kristal Sandığa Yükselt -item.ironchest:WOODIRON.name=Tahta Sandığı Demir Sandığa Yükselt -item.ironchest:WOODCOPPER.name=Tahta Sandığı Bakır Sandığa Yükselt -item.ironchest:DIAMONDOBSIDIAN.name=Elmas Sandığı Obsidyen Sandığa Yükselt - -book.ironchest:dirtchest9000.title=Toprak Sandık-9000 Kullanım Kılavuzu -book.ironchest:dirtchest9000.page1=Yeni sandık olan Toprak Sandık-9000 yaptığınız için teşekkürler.Bu sandık ile topraklarınızı depolayabilirsiniz. -book.ironchest:dirtchest9000.page2=Kullanımı: 64 adet toprak alarak içine koyunuz. Böylece sadece toprak depolanır. -book.ironchest:dirtchest9000.page3=Biz bu kılavuzu gözden keyif aldık umuyoruz, ve gelecekte ürünlerimizi kullanmayı düşünün umuyoruz! Saygılarımızla, dahil DirtChest 9000 manuel yazar. -book.ironchest:dirtchest9000.page4=Garanti: Bu ürün herhangi bir garanti vardır. Sizin kir depolanabilir değil, yavaş yavaş çevreye sülük olabilir, ya da alternatif olarak, hiç bir şey yapamazsınız. -book.ironchest:dirtchest9000.page5=Toprak Sandık-9000 çevreye türüdür. Sorumlu bu rehber kitap imha edin ve ne olursa olsun sadece bazı lav içine ayna yok yok. Bizim için çok üzücü olacaktır. diff --git a/src/main/resources/assets/ironchest/lang/zh_CN.lang b/src/main/resources/assets/ironchest/lang/zh_CN.lang deleted file mode 100755 index 974ada4f..00000000 --- a/src/main/resources/assets/ironchest/lang/zh_CN.lang +++ /dev/null @@ -1,25 +0,0 @@ -tile.ironchest:IRON.name=铁箱子 -tile.ironchest:GOLD.name=金箱子 -tile.ironchest:DIAMOND.name=钻石箱子 -tile.ironchest:COPPER.name=铜箱子 -tile.ironchest:SILVER.name=银箱子 -tile.ironchest:CRYSTAL.name=水晶箱子 -tile.ironchest:OBSIDIAN.name=黑曜石箱子 -tile.ironchest:DIRTCHEST9000.name=泥箱子9000! - -item.ironchest:IRONGOLD.name=升级:铁>金 -item.ironchest:GOLDDIAMOND.name=升级:金>钻石 -item.ironchest:COPPERSILVER.name=升级:铜>银 -item.ironchest:SILVERGOLD.name=升级:银>金 -item.ironchest:COPPERIRON.name=升级:铜>铁 -item.ironchest:DIAMONDCRYSTAL.name=升级:钻石>水晶 -item.ironchest:WOODIRON.name=升级:木>铁 -item.ironchest:WOODCOPPER.name=升级:木>铜 -item.ironchest:DIAMONDOBSIDIAN.name=升级:钻石>黑曜石 - -book.ironchest:dirtchest9000.title=傻瓜也一定会用的泥箱子9000! -book.ironchest:dirtchest9000.page1=欢迎使用这台全新的泥箱子9000!希望你能愉快地常年使用我们的设备来储存(大量)泥土(大雾)。 -book.ironchest:dirtchest9000.page2=使用方法: 把一组泥土丢进去就行了。每次您经过的时候都可以打开它(很方便地)取出来用。 -book.ironchest:dirtchest9000.page3=希望您阅读本手册愉快,并选择使用我们的产品。作为泥箱子9000手册作者我谨向您致以诚挚问候。 -book.ironchest:dirtchest9000.page4=质量保障: 恕本产品不提供任何质量保障。您的泥土或者能安全存储其内,或者会逐渐流失到环境中,或者什么也不会发生。(读者:我了个去!) -book.ironchest:dirtchest9000.page5=泥箱子9000十分环保。请小心收藏好本手册,如果您随手丢进岩浆的话,我们可会伤心的。 diff --git a/src/main/resources/assets/ironchest/lang/zh_TW.lang b/src/main/resources/assets/ironchest/lang/zh_TW.lang deleted file mode 100755 index d4755f69..00000000 --- a/src/main/resources/assets/ironchest/lang/zh_TW.lang +++ /dev/null @@ -1,25 +0,0 @@ -tile.ironchest:IRON.name=鐵箱 -tile.ironchest:GOLD.name=黃金箱 -tile.ironchest:DIAMOND.name=鑽石箱 -tile.ironchest:COPPER.name=銅箱 -tile.ironchest:SILVER.name=銀箱 -tile.ironchest:CRYSTAL.name=水晶箱 -tile.ironchest:OBSIDIAN.name=黑曜石箱 -tile.ironchest:DIRTCHEST9000.name=泥土箱9000! - -item.ironchest:IRONGOLD.name=鐵箱升級成金箱 -item.ironchest:GOLDDIAMOND.name=金箱升級成鑽石箱 -item.ironchest:COPPERSILVER.name=銅箱升級成銀箱 -item.ironchest:SILVERGOLD.name=銀箱升級成金箱 -item.ironchest:COPPERIRON.name=銅箱升級成鐵箱 -item.ironchest:DIAMONDCRYSTAL.name=鑽石箱升級成水晶箱 -item.ironchest:WOODIRON.name=木箱升級成鐵箱 -item.ironchest:WOODCOPPER.name=木箱升級成銅箱 -item.ironchest:DIAMONDOBSIDIAN.name=鑽石箱升級成黑曜石箱 - -book.ironchest:dirtchest9000.title=笨蛋也一定會用的泥土箱9000! -book.ironchest:dirtchest9000.page1=歡迎使用這台全新的泥土箱9000!希望你能愉快地常年使用我們的設備來儲存泥土。 -book.ironchest:dirtchest9000.page2=使用方法:把一組泥土丟進去就行了。每次您經過的時候都可以打開它很方便地取出來用。 -book.ironchest:dirtchest9000.page3=希望您閱讀本手冊愉快,並選擇使用我們的產品。作為泥土箱9000手冊作者我謹向您致以誠摯問候。 -book.ironchest:dirtchest9000.page4=質量保障:恕本產品不提供任何質量保障。您的泥土或許能安全存儲其內,或許會逐漸流失到環境中,或者什麼也不會發生。 -book.ironchest:dirtchest9000.page5=泥土箱9000十分環保。請小心收藏好本手冊,如果您隨手丟進岩漿的話,我們可會傷心的。 \ No newline at end of file diff --git a/src/main/resources/assets/ironchest/lang/zh_cn.json b/src/main/resources/assets/ironchest/lang/zh_cn.json new file mode 100644 index 00000000..f8be1c32 --- /dev/null +++ b/src/main/resources/assets/ironchest/lang/zh_cn.json @@ -0,0 +1,33 @@ +{ + "_comment": "Blocks", + "block.ironchest.iron_chest": "铁箱子", + "block.ironchest.gold_chest": "金箱子", + "block.ironchest.diamond_chest": "钻石箱子", + "block.ironchest.copper_chest": "铜箱子", + "block.ironchest.silver_chest": "银箱子", + "block.ironchest.crystal_chest": "水晶箱子", + "block.ironchest.obsidian_chest": "黑曜石箱子", + "block.ironchest.dirt_chest": "泥箱子9000!", + + "_comment": "Upgrades", + "item.ironchest.iron_to_gold_chest_upgrade": "升级:铁>金", + "item.ironchest.gold_to_diamond_chest_upgrade": "升级:金>钻石", + "item.ironchest.copper_to_silver_chest_upgrade": "升级:铜>银", + "item.ironchest.silver_to_gold_chest_upgrade": "升级:银>金", + "item.ironchest.copper_to_iron_chest_upgrade": "升级:铜>铁", + "item.ironchest.diamond_to_crystal_chest_upgrade": "升级:钻石>水晶", + "item.ironchest.wood_to_iron_chest_upgrade": "升级:木>铁", + "item.ironchest.wood_to_copper_chest_upgrade": "升级:木>铜", + "item.ironchest.diamond_to_obsidian_chest_upgrade": "升级:钻石>黑曜石", + + "_comment": "Books", + "book.ironchest.dirtchest9000.title": "傻瓜也一定会用的泥箱子9000!", + "book.ironchest.dirtchest9000.page1": "欢迎使用这台全新的泥箱子9000!希望你能愉快地常年使用我们的设备来储存(大量)泥土(大雾)。", + "book.ironchest.dirtchest9000.page2": "使用方法: 把一组泥土丢进去就行了。每次您经过的时候都可以打开它(很方便地)取出来用。", + "book.ironchest.dirtchest9000.page3": "希望您阅读本手册愉快,并选择使用我们的产品。作为泥箱子9000手册作者我谨向您致以诚挚问候。", + "book.ironchest.dirtchest9000.page4": "质量保障: 恕本产品不提供任何质量保障。您的泥土或者能安全存储其内,或者会逐渐流失到环境中,或者什么也不会发生。(读者:我了个去!)", + "book.ironchest.dirtchest9000.page5": "泥箱子9000十分环保。请小心收藏好本手册,如果您随手丢进岩浆的话,我们可会伤心的。", + + "_comment": "Item Groups", + "itemGroup.ironchest": "Iron Chests" +} diff --git a/src/main/resources/assets/ironchest/lang/zh_tw.json b/src/main/resources/assets/ironchest/lang/zh_tw.json new file mode 100644 index 00000000..6568c0d0 --- /dev/null +++ b/src/main/resources/assets/ironchest/lang/zh_tw.json @@ -0,0 +1,43 @@ +{ + "_comment": "Blocks", + "block.ironchest.iron_chest": "鐵箱", + "block.ironchest.gold_chest": "金箱", + "block.ironchest.diamond_chest": "鑽石箱", + "block.ironchest.copper_chest": "銅箱", + "block.ironchest.silver_chest": "銀箱", + "block.ironchest.crystal_chest": "水晶箱", + "block.ironchest.obsidian_chest": "黑曜石箱", + "block.ironchest.dirt_chest": "泥箱子9000!", + + "_comment": "Upgrades", + "item.ironchest.iron_to_gold_chest_upgrade": "鐵箱升級成金箱", + "item.ironchest.gold_to_diamond_chest_upgrade": "金箱升級成鑽石箱", + "item.ironchest.copper_to_silver_chest_upgrade": "銅箱升級成銀箱", + "item.ironchest.silver_to_gold_chest_upgrade": "銀箱升級成金箱", + "item.ironchest.copper_to_iron_chest_upgrade": "銅箱升級成鐵箱", + "item.ironchest.diamond_to_crystal_chest_upgrade": "鑽石箱升級成水晶箱", + "item.ironchest.wood_to_iron_chest_upgrade": "木箱升級成鐵箱", + "item.ironchest.wood_to_copper_chest_upgrade": "木箱升級成銅箱", + "item.ironchest.diamond_to_obsidian_chest_upgrade": "鑽石箱升級成黑曜石箱", + + "_comment": "Books", + "book.ironchest.dirtchest9000.title": "笨蛋也一定會用的泥土箱9000!", + "book.ironchest.dirtchest9000.page1": "歡迎使用全新的泥土箱9000!希望你能夠愉快地常年使用我們的設備來儲存泥土。", + "book.ironchest.dirtchest9000.page2": "使用方法: 把一組泥土丟進去就行了。每次您經過的時候都可以打開它(很方便地)取出來用", + "book.ironchest.dirtchest9000.page3": "我們希望您喜歡閱讀本說明手冊,並希望將來考慮使用我們的產品!作為泥箱子9000手冊作者我謹向您致以誠摯問候。", + "book.ironchest.dirtchest9000.page4": "品質保障: 本產品不提供任何形式的保證。您的泥土可能不會被存儲,可能會慢慢滲入環境中,或者根本無法做任何事情。", + "book.ironchest.dirtchest9000.page5": "泥箱子9000十分環保。請小心收藏好本手冊,如果你隨手丟進岩漿的話,我們會很傷心。", + + "_comment": "Containers", + "ironchest.container.iron_chest": "鐵箱", + "ironchest.container.gold_chest": "金箱", + "ironchest.container.diamond_chest": "鑽石箱", + "ironchest.container.copper_chest": "銅箱", + "ironchest.container.silver_chest": "銀箱", + "ironchest.container.crystal_chest": "水晶箱", + "ironchest.container.obsidian_chest": "黑曜石箱", + "ironchest.container.dirt_chest": "泥箱子9000!", + + "_comment": "Item Groups", + "itemGroup.ironchest": "Iron Chests" +} diff --git a/src/main/resources/assets/ironchest/models/block/copper_chest.json b/src/main/resources/assets/ironchest/models/block/copper_chest.json new file mode 100644 index 00000000..e74d288f --- /dev/null +++ b/src/main/resources/assets/ironchest/models/block/copper_chest.json @@ -0,0 +1,42 @@ +{ + "parent": "block/block", + "textures": { + "texture": "ironchest:model/copper_chest", + "particle": "ironchest:block/copper_break" + }, + "elements": [ + { "from": [ 1, 0, 1 ], + "to": [ 15, 10, 15 ], + "faces": { + "down": { "uv": [ 7, 4.75, 10.5, 8.25 ], "texture": "#texture" }, + "up": { "uv": [ 3.5, 4.75, 7, 8.25 ], "texture": "#texture" }, + "north": { "uv": [ 3.5, 8.25, 7, 10.75 ], "texture": "#texture" }, + "south": { "uv": [ 10.5, 8.25, 14, 10.75 ], "texture": "#texture" }, + "west": { "uv": [ 7, 8.25, 10.5, 10.75 ], "texture": "#texture" }, + "east": { "uv": [ 0, 8.25, 3.5, 10.75 ], "texture": "#texture" } + } + }, + { "from": [ 1, 9, 1 ], + "to": [ 15, 14, 15 ], + "faces": { + "down": { "uv": [ 7, 0, 10.5, 3.5 ], "texture": "#texture" }, + "up": { "uv": [ 3.5, 0, 7, 3.5 ], "texture": "#texture" }, + "north": { "uv": [ 3.5, 3.5, 7, 4.75 ], "texture": "#texture" }, + "south": { "uv": [ 10.5, 3.5, 14, 4.75 ], "texture": "#texture" }, + "west": { "uv": [ 7, 3.5, 10.5, 4.75 ], "texture": "#texture" }, + "east": { "uv": [ 0, 3.5, 3.5, 4.75 ], "texture": "#texture" } + } + }, + { "from": [ 7, 7, 0 ], + "to": [ 9, 11, 1 ], + "faces": { + "down": { "uv": [ 0, 0.75, 1.25, 0.5 ], "texture": "#texture" }, + "up": { "uv": [ 0, 0.25, 0.75, 0.5 ], "texture": "#texture" }, + "north": { "uv": [ 0.25, 0.25, 0.75, 1.25 ], "texture": "#texture" }, + "south": { "uv": [ 1, 0.25, 1.5, 1.25 ], "texture": "#texture" }, + "west": { "uv": [ 0.75, 0.25, 1, 1.25 ], "texture": "#texture" }, + "east": { "uv": [ 0, 0.25, 0.25, 1.25 ], "texture": "#texture" } + } + } + ] +} diff --git a/src/main/resources/assets/ironchest/models/block/crystal_chest.json b/src/main/resources/assets/ironchest/models/block/crystal_chest.json new file mode 100644 index 00000000..edb2ce12 --- /dev/null +++ b/src/main/resources/assets/ironchest/models/block/crystal_chest.json @@ -0,0 +1,42 @@ +{ + "parent": "block/block", + "textures": { + "texture": "ironchest:model/crystal_chest", + "particle": "ironchest:block/crystal_break" + }, + "elements": [ + { "from": [ 1, 0, 1 ], + "to": [ 15, 10, 15 ], + "faces": { + "down": { "uv": [ 7, 4.75, 10.5, 8.25 ], "texture": "#texture" }, + "up": { "uv": [ 3.5, 4.75, 7, 8.25 ], "texture": "#texture" }, + "north": { "uv": [ 3.5, 8.25, 7, 10.75 ], "texture": "#texture" }, + "south": { "uv": [ 10.5, 8.25, 14, 10.75 ], "texture": "#texture" }, + "west": { "uv": [ 7, 8.25, 10.5, 10.75 ], "texture": "#texture" }, + "east": { "uv": [ 0, 8.25, 3.5, 10.75 ], "texture": "#texture" } + } + }, + { "from": [ 1, 9, 1 ], + "to": [ 15, 14, 15 ], + "faces": { + "down": { "uv": [ 7, 0, 10.5, 3.5 ], "texture": "#texture" }, + "up": { "uv": [ 3.5, 0, 7, 3.5 ], "texture": "#texture" }, + "north": { "uv": [ 3.5, 3.5, 7, 4.75 ], "texture": "#texture" }, + "south": { "uv": [ 10.5, 3.5, 14, 4.75 ], "texture": "#texture" }, + "west": { "uv": [ 7, 3.5, 10.5, 4.75 ], "texture": "#texture" }, + "east": { "uv": [ 0, 3.5, 3.5, 4.75 ], "texture": "#texture" } + } + }, + { "from": [ 7, 7, 0 ], + "to": [ 9, 11, 1 ], + "faces": { + "down": { "uv": [ 0, 0.75, 1.25, 0.5 ], "texture": "#texture" }, + "up": { "uv": [ 0, 0.25, 0.75, 0.5 ], "texture": "#texture" }, + "north": { "uv": [ 0.25, 0.25, 0.75, 1.25 ], "texture": "#texture" }, + "south": { "uv": [ 1, 0.25, 1.5, 1.25 ], "texture": "#texture" }, + "west": { "uv": [ 0.75, 0.25, 1, 1.25 ], "texture": "#texture" }, + "east": { "uv": [ 0, 0.25, 0.25, 1.25 ], "texture": "#texture" } + } + } + ] +} diff --git a/src/main/resources/assets/ironchest/models/block/diamond_chest.json b/src/main/resources/assets/ironchest/models/block/diamond_chest.json new file mode 100644 index 00000000..c257ff56 --- /dev/null +++ b/src/main/resources/assets/ironchest/models/block/diamond_chest.json @@ -0,0 +1,42 @@ +{ + "parent": "block/block", + "textures": { + "texture": "ironchest:model/diamond_chest", + "particle": "ironchest:block/diamond_break" + }, + "elements": [ + { "from": [ 1, 0, 1 ], + "to": [ 15, 10, 15 ], + "faces": { + "down": { "uv": [ 7, 4.75, 10.5, 8.25 ], "texture": "#texture" }, + "up": { "uv": [ 3.5, 4.75, 7, 8.25 ], "texture": "#texture" }, + "north": { "uv": [ 3.5, 8.25, 7, 10.75 ], "texture": "#texture" }, + "south": { "uv": [ 10.5, 8.25, 14, 10.75 ], "texture": "#texture" }, + "west": { "uv": [ 7, 8.25, 10.5, 10.75 ], "texture": "#texture" }, + "east": { "uv": [ 0, 8.25, 3.5, 10.75 ], "texture": "#texture" } + } + }, + { "from": [ 1, 9, 1 ], + "to": [ 15, 14, 15 ], + "faces": { + "down": { "uv": [ 7, 0, 10.5, 3.5 ], "texture": "#texture" }, + "up": { "uv": [ 3.5, 0, 7, 3.5 ], "texture": "#texture" }, + "north": { "uv": [ 3.5, 3.5, 7, 4.75 ], "texture": "#texture" }, + "south": { "uv": [ 10.5, 3.5, 14, 4.75 ], "texture": "#texture" }, + "west": { "uv": [ 7, 3.5, 10.5, 4.75 ], "texture": "#texture" }, + "east": { "uv": [ 0, 3.5, 3.5, 4.75 ], "texture": "#texture" } + } + }, + { "from": [ 7, 7, 0 ], + "to": [ 9, 11, 1 ], + "faces": { + "down": { "uv": [ 0, 0.75, 1.25, 0.5 ], "texture": "#texture" }, + "up": { "uv": [ 0, 0.25, 0.75, 0.5 ], "texture": "#texture" }, + "north": { "uv": [ 0.25, 0.25, 0.75, 1.25 ], "texture": "#texture" }, + "south": { "uv": [ 1, 0.25, 1.5, 1.25 ], "texture": "#texture" }, + "west": { "uv": [ 0.75, 0.25, 1, 1.25 ], "texture": "#texture" }, + "east": { "uv": [ 0, 0.25, 0.25, 1.25 ], "texture": "#texture" } + } + } + ] +} diff --git a/src/main/resources/assets/ironchest/models/item/chest_crystal.json b/src/main/resources/assets/ironchest/models/block/dirt_chest.json old mode 100755 new mode 100644 similarity index 94% rename from src/main/resources/assets/ironchest/models/item/chest_crystal.json rename to src/main/resources/assets/ironchest/models/block/dirt_chest.json index ff0c8239..0f87c3d0 --- a/src/main/resources/assets/ironchest/models/item/chest_crystal.json +++ b/src/main/resources/assets/ironchest/models/block/dirt_chest.json @@ -1,40 +1,42 @@ -{ - "textures": { - "texture": "ironchest:model/crystalchest" - }, - "elements": [ - { "from": [ 1, 0, 1 ], - "to": [ 15, 10, 15 ], - "faces": { - "down": { "uv": [ 7, 4.75, 10.5, 8.25 ], "texture": "#texture" }, - "up": { "uv": [ 3.5, 4.75, 7, 8.25 ], "texture": "#texture" }, - "north": { "uv": [ 3.5, 8.25, 7, 10.75 ], "texture": "#texture" }, - "south": { "uv": [ 10.5, 8.25, 14, 10.75 ], "texture": "#texture" }, - "west": { "uv": [ 7, 8.25, 10.5, 10.75 ], "texture": "#texture" }, - "east": { "uv": [ 0, 8.25, 3.5, 10.75 ], "texture": "#texture" } - } - }, - { "from": [ 1, 9, 1 ], - "to": [ 15, 14, 15 ], - "faces": { - "down": { "uv": [ 7, 0, 10.5, 3.5 ], "texture": "#texture" }, - "up": { "uv": [ 3.5, 0, 7, 3.5 ], "texture": "#texture" }, - "north": { "uv": [ 3.5, 3.5, 7, 4.75 ], "texture": "#texture" }, - "south": { "uv": [ 10.5, 3.5, 14, 4.75 ], "texture": "#texture" }, - "west": { "uv": [ 7, 3.5, 10.5, 4.75 ], "texture": "#texture" }, - "east": { "uv": [ 0, 3.5, 3.5, 4.75 ], "texture": "#texture" } - } - }, - { "from": [ 7, 7, 0 ], - "to": [ 9, 11, 1 ], - "faces": { - "down": { "uv": [ 0, 0.75, 1.25, 0.5 ], "texture": "#texture" }, - "up": { "uv": [ 0, 0.25, 0.75, 0.5 ], "texture": "#texture" }, - "north": { "uv": [ 0.25, 0.25, 0.75, 1.25 ], "texture": "#texture" }, - "south": { "uv": [ 1, 0.25, 1.5, 1.25 ], "texture": "#texture" }, - "west": { "uv": [ 0.75, 0.25, 1, 1.25 ], "texture": "#texture" }, - "east": { "uv": [ 0, 0.25, 0.25, 1.25 ], "texture": "#texture" } - } - } - ] -} +{ + "parent": "block/block", + "textures": { + "texture": "ironchest:model/dirt_chest", + "particle": "minecraft:block/dirt" + }, + "elements": [ + { "from": [ 1, 0, 1 ], + "to": [ 15, 10, 15 ], + "faces": { + "down": { "uv": [ 7, 4.75, 10.5, 8.25 ], "texture": "#texture" }, + "up": { "uv": [ 3.5, 4.75, 7, 8.25 ], "texture": "#texture" }, + "north": { "uv": [ 3.5, 8.25, 7, 10.75 ], "texture": "#texture" }, + "south": { "uv": [ 10.5, 8.25, 14, 10.75 ], "texture": "#texture" }, + "west": { "uv": [ 7, 8.25, 10.5, 10.75 ], "texture": "#texture" }, + "east": { "uv": [ 0, 8.25, 3.5, 10.75 ], "texture": "#texture" } + } + }, + { "from": [ 1, 9, 1 ], + "to": [ 15, 14, 15 ], + "faces": { + "down": { "uv": [ 7, 0, 10.5, 3.5 ], "texture": "#texture" }, + "up": { "uv": [ 3.5, 0, 7, 3.5 ], "texture": "#texture" }, + "north": { "uv": [ 3.5, 3.5, 7, 4.75 ], "texture": "#texture" }, + "south": { "uv": [ 10.5, 3.5, 14, 4.75 ], "texture": "#texture" }, + "west": { "uv": [ 7, 3.5, 10.5, 4.75 ], "texture": "#texture" }, + "east": { "uv": [ 0, 3.5, 3.5, 4.75 ], "texture": "#texture" } + } + }, + { "from": [ 7, 7, 0 ], + "to": [ 9, 11, 1 ], + "faces": { + "down": { "uv": [ 0, 0.75, 1.25, 0.5 ], "texture": "#texture" }, + "up": { "uv": [ 0, 0.25, 0.75, 0.5 ], "texture": "#texture" }, + "north": { "uv": [ 0.25, 0.25, 0.75, 1.25 ], "texture": "#texture" }, + "south": { "uv": [ 1, 0.25, 1.5, 1.25 ], "texture": "#texture" }, + "west": { "uv": [ 0.75, 0.25, 1, 1.25 ], "texture": "#texture" }, + "east": { "uv": [ 0, 0.25, 0.25, 1.25 ], "texture": "#texture" } + } + } + ] +} diff --git a/src/main/resources/assets/ironchest/models/item/chest_dirtchest9000.json b/src/main/resources/assets/ironchest/models/block/gold_chest.json old mode 100755 new mode 100644 similarity index 93% rename from src/main/resources/assets/ironchest/models/item/chest_dirtchest9000.json rename to src/main/resources/assets/ironchest/models/block/gold_chest.json index d2947cdb..0b1e05fd --- a/src/main/resources/assets/ironchest/models/item/chest_dirtchest9000.json +++ b/src/main/resources/assets/ironchest/models/block/gold_chest.json @@ -1,40 +1,42 @@ -{ - "textures": { - "texture": "ironchest:model/dirtchest" - }, - "elements": [ - { "from": [ 1, 0, 1 ], - "to": [ 15, 10, 15 ], - "faces": { - "down": { "uv": [ 7, 4.75, 10.5, 8.25 ], "texture": "#texture" }, - "up": { "uv": [ 3.5, 4.75, 7, 8.25 ], "texture": "#texture" }, - "north": { "uv": [ 3.5, 8.25, 7, 10.75 ], "texture": "#texture" }, - "south": { "uv": [ 10.5, 8.25, 14, 10.75 ], "texture": "#texture" }, - "west": { "uv": [ 7, 8.25, 10.5, 10.75 ], "texture": "#texture" }, - "east": { "uv": [ 0, 8.25, 3.5, 10.75 ], "texture": "#texture" } - } - }, - { "from": [ 1, 9, 1 ], - "to": [ 15, 14, 15 ], - "faces": { - "down": { "uv": [ 7, 0, 10.5, 3.5 ], "texture": "#texture" }, - "up": { "uv": [ 3.5, 0, 7, 3.5 ], "texture": "#texture" }, - "north": { "uv": [ 3.5, 3.5, 7, 4.75 ], "texture": "#texture" }, - "south": { "uv": [ 10.5, 3.5, 14, 4.75 ], "texture": "#texture" }, - "west": { "uv": [ 7, 3.5, 10.5, 4.75 ], "texture": "#texture" }, - "east": { "uv": [ 0, 3.5, 3.5, 4.75 ], "texture": "#texture" } - } - }, - { "from": [ 7, 7, 0 ], - "to": [ 9, 11, 1 ], - "faces": { - "down": { "uv": [ 0, 0.75, 1.25, 0.5 ], "texture": "#texture" }, - "up": { "uv": [ 0, 0.25, 0.75, 0.5 ], "texture": "#texture" }, - "north": { "uv": [ 0.25, 0.25, 0.75, 1.25 ], "texture": "#texture" }, - "south": { "uv": [ 1, 0.25, 1.5, 1.25 ], "texture": "#texture" }, - "west": { "uv": [ 0.75, 0.25, 1, 1.25 ], "texture": "#texture" }, - "east": { "uv": [ 0, 0.25, 0.25, 1.25 ], "texture": "#texture" } - } - } - ] -} +{ + "parent": "block/block", + "textures": { + "texture": "ironchest:model/gold_chest", + "particle": "ironchest:block/gold_break" + }, + "elements": [ + { "from": [ 1, 0, 1 ], + "to": [ 15, 10, 15 ], + "faces": { + "down": { "uv": [ 7, 4.75, 10.5, 8.25 ], "texture": "#texture" }, + "up": { "uv": [ 3.5, 4.75, 7, 8.25 ], "texture": "#texture" }, + "north": { "uv": [ 3.5, 8.25, 7, 10.75 ], "texture": "#texture" }, + "south": { "uv": [ 10.5, 8.25, 14, 10.75 ], "texture": "#texture" }, + "west": { "uv": [ 7, 8.25, 10.5, 10.75 ], "texture": "#texture" }, + "east": { "uv": [ 0, 8.25, 3.5, 10.75 ], "texture": "#texture" } + } + }, + { "from": [ 1, 9, 1 ], + "to": [ 15, 14, 15 ], + "faces": { + "down": { "uv": [ 7, 0, 10.5, 3.5 ], "texture": "#texture" }, + "up": { "uv": [ 3.5, 0, 7, 3.5 ], "texture": "#texture" }, + "north": { "uv": [ 3.5, 3.5, 7, 4.75 ], "texture": "#texture" }, + "south": { "uv": [ 10.5, 3.5, 14, 4.75 ], "texture": "#texture" }, + "west": { "uv": [ 7, 3.5, 10.5, 4.75 ], "texture": "#texture" }, + "east": { "uv": [ 0, 3.5, 3.5, 4.75 ], "texture": "#texture" } + } + }, + { "from": [ 7, 7, 0 ], + "to": [ 9, 11, 1 ], + "faces": { + "down": { "uv": [ 0, 0.75, 1.25, 0.5 ], "texture": "#texture" }, + "up": { "uv": [ 0, 0.25, 0.75, 0.5 ], "texture": "#texture" }, + "north": { "uv": [ 0.25, 0.25, 0.75, 1.25 ], "texture": "#texture" }, + "south": { "uv": [ 1, 0.25, 1.5, 1.25 ], "texture": "#texture" }, + "west": { "uv": [ 0.75, 0.25, 1, 1.25 ], "texture": "#texture" }, + "east": { "uv": [ 0, 0.25, 0.25, 1.25 ], "texture": "#texture" } + } + } + ] +} diff --git a/src/main/resources/assets/ironchest/models/item/chest_copper.json b/src/main/resources/assets/ironchest/models/block/iron_chest.json old mode 100755 new mode 100644 similarity index 93% rename from src/main/resources/assets/ironchest/models/item/chest_copper.json rename to src/main/resources/assets/ironchest/models/block/iron_chest.json index 488cab4f..fc7ee550 --- a/src/main/resources/assets/ironchest/models/item/chest_copper.json +++ b/src/main/resources/assets/ironchest/models/block/iron_chest.json @@ -1,40 +1,42 @@ -{ - "textures": { - "texture": "ironchest:model/copperchest" - }, - "elements": [ - { "from": [ 1, 0, 1 ], - "to": [ 15, 10, 15 ], - "faces": { - "down": { "uv": [ 7, 4.75, 10.5, 8.25 ], "texture": "#texture" }, - "up": { "uv": [ 3.5, 4.75, 7, 8.25 ], "texture": "#texture" }, - "north": { "uv": [ 3.5, 8.25, 7, 10.75 ], "texture": "#texture" }, - "south": { "uv": [ 10.5, 8.25, 14, 10.75 ], "texture": "#texture" }, - "west": { "uv": [ 7, 8.25, 10.5, 10.75 ], "texture": "#texture" }, - "east": { "uv": [ 0, 8.25, 3.5, 10.75 ], "texture": "#texture" } - } - }, - { "from": [ 1, 9, 1 ], - "to": [ 15, 14, 15 ], - "faces": { - "down": { "uv": [ 7, 0, 10.5, 3.5 ], "texture": "#texture" }, - "up": { "uv": [ 3.5, 0, 7, 3.5 ], "texture": "#texture" }, - "north": { "uv": [ 3.5, 3.5, 7, 4.75 ], "texture": "#texture" }, - "south": { "uv": [ 10.5, 3.5, 14, 4.75 ], "texture": "#texture" }, - "west": { "uv": [ 7, 3.5, 10.5, 4.75 ], "texture": "#texture" }, - "east": { "uv": [ 0, 3.5, 3.5, 4.75 ], "texture": "#texture" } - } - }, - { "from": [ 7, 7, 0 ], - "to": [ 9, 11, 1 ], - "faces": { - "down": { "uv": [ 0, 0.75, 1.25, 0.5 ], "texture": "#texture" }, - "up": { "uv": [ 0, 0.25, 0.75, 0.5 ], "texture": "#texture" }, - "north": { "uv": [ 0.25, 0.25, 0.75, 1.25 ], "texture": "#texture" }, - "south": { "uv": [ 1, 0.25, 1.5, 1.25 ], "texture": "#texture" }, - "west": { "uv": [ 0.75, 0.25, 1, 1.25 ], "texture": "#texture" }, - "east": { "uv": [ 0, 0.25, 0.25, 1.25 ], "texture": "#texture" } - } - } - ] -} +{ + "parent": "block/block", + "textures": { + "texture": "ironchest:model/iron_chest", + "particle": "ironchest:block/iron_break" + }, + "elements": [ + { "from": [ 1, 0, 1 ], + "to": [ 15, 10, 15 ], + "faces": { + "down": { "uv": [ 7, 4.75, 10.5, 8.25 ], "texture": "#texture" }, + "up": { "uv": [ 3.5, 4.75, 7, 8.25 ], "texture": "#texture" }, + "north": { "uv": [ 3.5, 8.25, 7, 10.75 ], "texture": "#texture" }, + "south": { "uv": [ 10.5, 8.25, 14, 10.75 ], "texture": "#texture" }, + "west": { "uv": [ 7, 8.25, 10.5, 10.75 ], "texture": "#texture" }, + "east": { "uv": [ 0, 8.25, 3.5, 10.75 ], "texture": "#texture" } + } + }, + { "from": [ 1, 9, 1 ], + "to": [ 15, 14, 15 ], + "faces": { + "down": { "uv": [ 7, 0, 10.5, 3.5 ], "texture": "#texture" }, + "up": { "uv": [ 3.5, 0, 7, 3.5 ], "texture": "#texture" }, + "north": { "uv": [ 3.5, 3.5, 7, 4.75 ], "texture": "#texture" }, + "south": { "uv": [ 10.5, 3.5, 14, 4.75 ], "texture": "#texture" }, + "west": { "uv": [ 7, 3.5, 10.5, 4.75 ], "texture": "#texture" }, + "east": { "uv": [ 0, 3.5, 3.5, 4.75 ], "texture": "#texture" } + } + }, + { "from": [ 7, 7, 0 ], + "to": [ 9, 11, 1 ], + "faces": { + "down": { "uv": [ 0, 0.75, 1.25, 0.5 ], "texture": "#texture" }, + "up": { "uv": [ 0, 0.25, 0.75, 0.5 ], "texture": "#texture" }, + "north": { "uv": [ 0.25, 0.25, 0.75, 1.25 ], "texture": "#texture" }, + "south": { "uv": [ 1, 0.25, 1.5, 1.25 ], "texture": "#texture" }, + "west": { "uv": [ 0.75, 0.25, 1, 1.25 ], "texture": "#texture" }, + "east": { "uv": [ 0, 0.25, 0.25, 1.25 ], "texture": "#texture" } + } + } + ] +} diff --git a/src/main/resources/assets/ironchest/models/item/chest_diamond.json b/src/main/resources/assets/ironchest/models/block/obsidian_chest.json old mode 100755 new mode 100644 similarity index 93% rename from src/main/resources/assets/ironchest/models/item/chest_diamond.json rename to src/main/resources/assets/ironchest/models/block/obsidian_chest.json index 89505152..4f53d0de --- a/src/main/resources/assets/ironchest/models/item/chest_diamond.json +++ b/src/main/resources/assets/ironchest/models/block/obsidian_chest.json @@ -1,40 +1,42 @@ -{ - "textures": { - "texture": "ironchest:model/diamondchest" - }, - "elements": [ - { "from": [ 1, 0, 1 ], - "to": [ 15, 10, 15 ], - "faces": { - "down": { "uv": [ 7, 4.75, 10.5, 8.25 ], "texture": "#texture" }, - "up": { "uv": [ 3.5, 4.75, 7, 8.25 ], "texture": "#texture" }, - "north": { "uv": [ 3.5, 8.25, 7, 10.75 ], "texture": "#texture" }, - "south": { "uv": [ 10.5, 8.25, 14, 10.75 ], "texture": "#texture" }, - "west": { "uv": [ 7, 8.25, 10.5, 10.75 ], "texture": "#texture" }, - "east": { "uv": [ 0, 8.25, 3.5, 10.75 ], "texture": "#texture" } - } - }, - { "from": [ 1, 9, 1 ], - "to": [ 15, 14, 15 ], - "faces": { - "down": { "uv": [ 7, 0, 10.5, 3.5 ], "texture": "#texture" }, - "up": { "uv": [ 3.5, 0, 7, 3.5 ], "texture": "#texture" }, - "north": { "uv": [ 3.5, 3.5, 7, 4.75 ], "texture": "#texture" }, - "south": { "uv": [ 10.5, 3.5, 14, 4.75 ], "texture": "#texture" }, - "west": { "uv": [ 7, 3.5, 10.5, 4.75 ], "texture": "#texture" }, - "east": { "uv": [ 0, 3.5, 3.5, 4.75 ], "texture": "#texture" } - } - }, - { "from": [ 7, 7, 0 ], - "to": [ 9, 11, 1 ], - "faces": { - "down": { "uv": [ 0, 0.75, 1.25, 0.5 ], "texture": "#texture" }, - "up": { "uv": [ 0, 0.25, 0.75, 0.5 ], "texture": "#texture" }, - "north": { "uv": [ 0.25, 0.25, 0.75, 1.25 ], "texture": "#texture" }, - "south": { "uv": [ 1, 0.25, 1.5, 1.25 ], "texture": "#texture" }, - "west": { "uv": [ 0.75, 0.25, 1, 1.25 ], "texture": "#texture" }, - "east": { "uv": [ 0, 0.25, 0.25, 1.25 ], "texture": "#texture" } - } - } - ] -} +{ + "parent": "block/block", + "textures": { + "texture": "ironchest:model/obsidian_chest", + "particle": "minecraft:block/obsidian" + }, + "elements": [ + { "from": [ 1, 0, 1 ], + "to": [ 15, 10, 15 ], + "faces": { + "down": { "uv": [ 7, 4.75, 10.5, 8.25 ], "texture": "#texture" }, + "up": { "uv": [ 3.5, 4.75, 7, 8.25 ], "texture": "#texture" }, + "north": { "uv": [ 3.5, 8.25, 7, 10.75 ], "texture": "#texture" }, + "south": { "uv": [ 10.5, 8.25, 14, 10.75 ], "texture": "#texture" }, + "west": { "uv": [ 7, 8.25, 10.5, 10.75 ], "texture": "#texture" }, + "east": { "uv": [ 0, 8.25, 3.5, 10.75 ], "texture": "#texture" } + } + }, + { "from": [ 1, 9, 1 ], + "to": [ 15, 14, 15 ], + "faces": { + "down": { "uv": [ 7, 0, 10.5, 3.5 ], "texture": "#texture" }, + "up": { "uv": [ 3.5, 0, 7, 3.5 ], "texture": "#texture" }, + "north": { "uv": [ 3.5, 3.5, 7, 4.75 ], "texture": "#texture" }, + "south": { "uv": [ 10.5, 3.5, 14, 4.75 ], "texture": "#texture" }, + "west": { "uv": [ 7, 3.5, 10.5, 4.75 ], "texture": "#texture" }, + "east": { "uv": [ 0, 3.5, 3.5, 4.75 ], "texture": "#texture" } + } + }, + { "from": [ 7, 7, 0 ], + "to": [ 9, 11, 1 ], + "faces": { + "down": { "uv": [ 0, 0.75, 1.25, 0.5 ], "texture": "#texture" }, + "up": { "uv": [ 0, 0.25, 0.75, 0.5 ], "texture": "#texture" }, + "north": { "uv": [ 0.25, 0.25, 0.75, 1.25 ], "texture": "#texture" }, + "south": { "uv": [ 1, 0.25, 1.5, 1.25 ], "texture": "#texture" }, + "west": { "uv": [ 0.75, 0.25, 1, 1.25 ], "texture": "#texture" }, + "east": { "uv": [ 0, 0.25, 0.25, 1.25 ], "texture": "#texture" } + } + } + ] +} diff --git a/src/main/resources/assets/ironchest/models/block/silver_chest.json b/src/main/resources/assets/ironchest/models/block/silver_chest.json new file mode 100644 index 00000000..78f9fd86 --- /dev/null +++ b/src/main/resources/assets/ironchest/models/block/silver_chest.json @@ -0,0 +1,42 @@ +{ + "parent": "block/block", + "textures": { + "texture": "ironchest:model/silver_chest", + "particle": "ironchest:block/silver_break" + }, + "elements": [ + { "from": [ 1, 0, 1 ], + "to": [ 15, 10, 15 ], + "faces": { + "down": { "uv": [ 7, 4.75, 10.5, 8.25 ], "texture": "#texture" }, + "up": { "uv": [ 3.5, 4.75, 7, 8.25 ], "texture": "#texture" }, + "north": { "uv": [ 3.5, 8.25, 7, 10.75 ], "texture": "#texture" }, + "south": { "uv": [ 10.5, 8.25, 14, 10.75 ], "texture": "#texture" }, + "west": { "uv": [ 7, 8.25, 10.5, 10.75 ], "texture": "#texture" }, + "east": { "uv": [ 0, 8.25, 3.5, 10.75 ], "texture": "#texture" } + } + }, + { "from": [ 1, 9, 1 ], + "to": [ 15, 14, 15 ], + "faces": { + "down": { "uv": [ 7, 0, 10.5, 3.5 ], "texture": "#texture" }, + "up": { "uv": [ 3.5, 0, 7, 3.5 ], "texture": "#texture" }, + "north": { "uv": [ 3.5, 3.5, 7, 4.75 ], "texture": "#texture" }, + "south": { "uv": [ 10.5, 3.5, 14, 4.75 ], "texture": "#texture" }, + "west": { "uv": [ 7, 3.5, 10.5, 4.75 ], "texture": "#texture" }, + "east": { "uv": [ 0, 3.5, 3.5, 4.75 ], "texture": "#texture" } + } + }, + { "from": [ 7, 7, 0 ], + "to": [ 9, 11, 1 ], + "faces": { + "down": { "uv": [ 0, 0.75, 1.25, 0.5 ], "texture": "#texture" }, + "up": { "uv": [ 0, 0.25, 0.75, 0.5 ], "texture": "#texture" }, + "north": { "uv": [ 0.25, 0.25, 0.75, 1.25 ], "texture": "#texture" }, + "south": { "uv": [ 1, 0.25, 1.5, 1.25 ], "texture": "#texture" }, + "west": { "uv": [ 0.75, 0.25, 1, 1.25 ], "texture": "#texture" }, + "east": { "uv": [ 0, 0.25, 0.25, 1.25 ], "texture": "#texture" } + } + } + ] +} diff --git a/src/main/resources/assets/ironchest/models/item/chest_gold.json b/src/main/resources/assets/ironchest/models/item/chest_gold.json deleted file mode 100755 index 5260625c..00000000 --- a/src/main/resources/assets/ironchest/models/item/chest_gold.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "textures": { - "texture": "ironchest:model/goldchest" - }, - "elements": [ - { "from": [ 1, 0, 1 ], - "to": [ 15, 10, 15 ], - "faces": { - "down": { "uv": [ 7, 4.75, 10.5, 8.25 ], "texture": "#texture" }, - "up": { "uv": [ 3.5, 4.75, 7, 8.25 ], "texture": "#texture" }, - "north": { "uv": [ 3.5, 8.25, 7, 10.75 ], "texture": "#texture" }, - "south": { "uv": [ 10.5, 8.25, 14, 10.75 ], "texture": "#texture" }, - "west": { "uv": [ 7, 8.25, 10.5, 10.75 ], "texture": "#texture" }, - "east": { "uv": [ 0, 8.25, 3.5, 10.75 ], "texture": "#texture" } - } - }, - { "from": [ 1, 9, 1 ], - "to": [ 15, 14, 15 ], - "faces": { - "down": { "uv": [ 7, 0, 10.5, 3.5 ], "texture": "#texture" }, - "up": { "uv": [ 3.5, 0, 7, 3.5 ], "texture": "#texture" }, - "north": { "uv": [ 3.5, 3.5, 7, 4.75 ], "texture": "#texture" }, - "south": { "uv": [ 10.5, 3.5, 14, 4.75 ], "texture": "#texture" }, - "west": { "uv": [ 7, 3.5, 10.5, 4.75 ], "texture": "#texture" }, - "east": { "uv": [ 0, 3.5, 3.5, 4.75 ], "texture": "#texture" } - } - }, - { "from": [ 7, 7, 0 ], - "to": [ 9, 11, 1 ], - "faces": { - "down": { "uv": [ 0, 0.75, 1.25, 0.5 ], "texture": "#texture" }, - "up": { "uv": [ 0, 0.25, 0.75, 0.5 ], "texture": "#texture" }, - "north": { "uv": [ 0.25, 0.25, 0.75, 1.25 ], "texture": "#texture" }, - "south": { "uv": [ 1, 0.25, 1.5, 1.25 ], "texture": "#texture" }, - "west": { "uv": [ 0.75, 0.25, 1, 1.25 ], "texture": "#texture" }, - "east": { "uv": [ 0, 0.25, 0.25, 1.25 ], "texture": "#texture" } - } - } - ] -} diff --git a/src/main/resources/assets/ironchest/models/item/chest_iron.json b/src/main/resources/assets/ironchest/models/item/chest_iron.json deleted file mode 100755 index 2c63365f..00000000 --- a/src/main/resources/assets/ironchest/models/item/chest_iron.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "textures": { - "texture": "ironchest:model/ironchest" - }, - "elements": [ - { "from": [ 1, 0, 1 ], - "to": [ 15, 10, 15 ], - "faces": { - "down": { "uv": [ 7, 4.75, 10.5, 8.25 ], "texture": "#texture" }, - "up": { "uv": [ 3.5, 4.75, 7, 8.25 ], "texture": "#texture" }, - "north": { "uv": [ 3.5, 8.25, 7, 10.75 ], "texture": "#texture" }, - "south": { "uv": [ 10.5, 8.25, 14, 10.75 ], "texture": "#texture" }, - "west": { "uv": [ 7, 8.25, 10.5, 10.75 ], "texture": "#texture" }, - "east": { "uv": [ 0, 8.25, 3.5, 10.75 ], "texture": "#texture" } - } - }, - { "from": [ 1, 9, 1 ], - "to": [ 15, 14, 15 ], - "faces": { - "down": { "uv": [ 7, 0, 10.5, 3.5 ], "texture": "#texture" }, - "up": { "uv": [ 3.5, 0, 7, 3.5 ], "texture": "#texture" }, - "north": { "uv": [ 3.5, 3.5, 7, 4.75 ], "texture": "#texture" }, - "south": { "uv": [ 10.5, 3.5, 14, 4.75 ], "texture": "#texture" }, - "west": { "uv": [ 7, 3.5, 10.5, 4.75 ], "texture": "#texture" }, - "east": { "uv": [ 0, 3.5, 3.5, 4.75 ], "texture": "#texture" } - } - }, - { "from": [ 7, 7, 0 ], - "to": [ 9, 11, 1 ], - "faces": { - "down": { "uv": [ 0, 0.75, 1.25, 0.5 ], "texture": "#texture" }, - "up": { "uv": [ 0, 0.25, 0.75, 0.5 ], "texture": "#texture" }, - "north": { "uv": [ 0.25, 0.25, 0.75, 1.25 ], "texture": "#texture" }, - "south": { "uv": [ 1, 0.25, 1.5, 1.25 ], "texture": "#texture" }, - "west": { "uv": [ 0.75, 0.25, 1, 1.25 ], "texture": "#texture" }, - "east": { "uv": [ 0, 0.25, 0.25, 1.25 ], "texture": "#texture" } - } - } - ] -} diff --git a/src/main/resources/assets/ironchest/models/item/chest_obsidian.json b/src/main/resources/assets/ironchest/models/item/chest_obsidian.json deleted file mode 100755 index b13d0189..00000000 --- a/src/main/resources/assets/ironchest/models/item/chest_obsidian.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "textures": { - "texture": "ironchest:model/obsidianchest" - }, - "elements": [ - { "from": [ 1, 0, 1 ], - "to": [ 15, 10, 15 ], - "faces": { - "down": { "uv": [ 7, 4.75, 10.5, 8.25 ], "texture": "#texture" }, - "up": { "uv": [ 3.5, 4.75, 7, 8.25 ], "texture": "#texture" }, - "north": { "uv": [ 3.5, 8.25, 7, 10.75 ], "texture": "#texture" }, - "south": { "uv": [ 10.5, 8.25, 14, 10.75 ], "texture": "#texture" }, - "west": { "uv": [ 7, 8.25, 10.5, 10.75 ], "texture": "#texture" }, - "east": { "uv": [ 0, 8.25, 3.5, 10.75 ], "texture": "#texture" } - } - }, - { "from": [ 1, 9, 1 ], - "to": [ 15, 14, 15 ], - "faces": { - "down": { "uv": [ 7, 0, 10.5, 3.5 ], "texture": "#texture" }, - "up": { "uv": [ 3.5, 0, 7, 3.5 ], "texture": "#texture" }, - "north": { "uv": [ 3.5, 3.5, 7, 4.75 ], "texture": "#texture" }, - "south": { "uv": [ 10.5, 3.5, 14, 4.75 ], "texture": "#texture" }, - "west": { "uv": [ 7, 3.5, 10.5, 4.75 ], "texture": "#texture" }, - "east": { "uv": [ 0, 3.5, 3.5, 4.75 ], "texture": "#texture" } - } - }, - { "from": [ 7, 7, 0 ], - "to": [ 9, 11, 1 ], - "faces": { - "down": { "uv": [ 0, 0.75, 1.25, 0.5 ], "texture": "#texture" }, - "up": { "uv": [ 0, 0.25, 0.75, 0.5 ], "texture": "#texture" }, - "north": { "uv": [ 0.25, 0.25, 0.75, 1.25 ], "texture": "#texture" }, - "south": { "uv": [ 1, 0.25, 1.5, 1.25 ], "texture": "#texture" }, - "west": { "uv": [ 0.75, 0.25, 1, 1.25 ], "texture": "#texture" }, - "east": { "uv": [ 0, 0.25, 0.25, 1.25 ], "texture": "#texture" } - } - } - ] -} diff --git a/src/main/resources/assets/ironchest/models/item/chest_silver.json b/src/main/resources/assets/ironchest/models/item/chest_silver.json deleted file mode 100755 index 43fdd95b..00000000 --- a/src/main/resources/assets/ironchest/models/item/chest_silver.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "textures": { - "texture": "ironchest:model/silverchest" - }, - "elements": [ - { "from": [ 1, 0, 1 ], - "to": [ 15, 10, 15 ], - "faces": { - "down": { "uv": [ 7, 4.75, 10.5, 8.25 ], "texture": "#texture" }, - "up": { "uv": [ 3.5, 4.75, 7, 8.25 ], "texture": "#texture" }, - "north": { "uv": [ 3.5, 8.25, 7, 10.75 ], "texture": "#texture" }, - "south": { "uv": [ 10.5, 8.25, 14, 10.75 ], "texture": "#texture" }, - "west": { "uv": [ 7, 8.25, 10.5, 10.75 ], "texture": "#texture" }, - "east": { "uv": [ 0, 8.25, 3.5, 10.75 ], "texture": "#texture" } - } - }, - { "from": [ 1, 9, 1 ], - "to": [ 15, 14, 15 ], - "faces": { - "down": { "uv": [ 7, 0, 10.5, 3.5 ], "texture": "#texture" }, - "up": { "uv": [ 3.5, 0, 7, 3.5 ], "texture": "#texture" }, - "north": { "uv": [ 3.5, 3.5, 7, 4.75 ], "texture": "#texture" }, - "south": { "uv": [ 10.5, 3.5, 14, 4.75 ], "texture": "#texture" }, - "west": { "uv": [ 7, 3.5, 10.5, 4.75 ], "texture": "#texture" }, - "east": { "uv": [ 0, 3.5, 3.5, 4.75 ], "texture": "#texture" } - } - }, - { "from": [ 7, 7, 0 ], - "to": [ 9, 11, 1 ], - "faces": { - "down": { "uv": [ 0, 0.75, 1.25, 0.5 ], "texture": "#texture" }, - "up": { "uv": [ 0, 0.25, 0.75, 0.5 ], "texture": "#texture" }, - "north": { "uv": [ 0.25, 0.25, 0.75, 1.25 ], "texture": "#texture" }, - "south": { "uv": [ 1, 0.25, 1.5, 1.25 ], "texture": "#texture" }, - "west": { "uv": [ 0.75, 0.25, 1, 1.25 ], "texture": "#texture" }, - "east": { "uv": [ 0, 0.25, 0.25, 1.25 ], "texture": "#texture" } - } - } - ] -} diff --git a/src/main/resources/assets/ironchest/models/item/copperIronUpgrade.json b/src/main/resources/assets/ironchest/models/item/copperIronUpgrade.json deleted file mode 100644 index 3ef545ee..00000000 --- a/src/main/resources/assets/ironchest/models/item/copperIronUpgrade.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "parent": "builtin/generated", - "textures": { - "layer0": "ironchest:items/copperIronUpgrade" - }, - "display": { - "thirdperson": { - "rotation": [ -90, 0, 0 ], - "translation": [ 0, 1, -3 ], - "scale": [ 0.55, 0.55, 0.55 ] - }, - "firstperson": { - "rotation": [ 0, -135, 25 ], - "translation": [ 0, 4, 2 ], - "scale": [ 1.7, 1.7, 1.7 ] - } - } -} diff --git a/src/main/resources/assets/ironchest/models/item/copperSilverUpgrade.json b/src/main/resources/assets/ironchest/models/item/copperSilverUpgrade.json deleted file mode 100755 index 01941656..00000000 --- a/src/main/resources/assets/ironchest/models/item/copperSilverUpgrade.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "parent": "builtin/generated", - "textures": { - "layer0": "ironchest:items/copperSilverUpgrade" - }, - "display": { - "thirdperson": { - "rotation": [ -90, 0, 0 ], - "translation": [ 0, 1, -3 ], - "scale": [ 0.55, 0.55, 0.55 ] - }, - "firstperson": { - "rotation": [ 0, -135, 25 ], - "translation": [ 0, 4, 2 ], - "scale": [ 1.7, 1.7, 1.7 ] - } - } -} diff --git a/src/main/resources/assets/ironchest/models/item/copper_chest.json b/src/main/resources/assets/ironchest/models/item/copper_chest.json new file mode 100644 index 00000000..7bfe2e69 --- /dev/null +++ b/src/main/resources/assets/ironchest/models/item/copper_chest.json @@ -0,0 +1,35 @@ +{ + "parent": "builtin/entity", + "display": { + "gui": { + "rotation": [ 30, 45, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 0.625, 0.625, 0.625 ] + }, + "ground": { + "rotation": [ 0, 0, 0 ], + "translation": [ 0, 3, 0], + "scale":[ 0.25, 0.25, 0.25 ] + }, + "head": { + "rotation": [ 0, 180, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 1, 1, 1] + }, + "fixed": { + "rotation": [ 0, 180, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 0.5, 0.5, 0.5 ] + }, + "thirdperson_righthand": { + "rotation": [ 75, 315, 0 ], + "translation": [ 0, 2.5, 0], + "scale": [ 0.375, 0.375, 0.375 ] + }, + "firstperson_righthand": { + "rotation": [ 0, 315, 0 ], + "translation": [ 0, 0, 0], + "scale": [ 0.4, 0.4, 0.4 ] + } + } +} diff --git a/src/main/resources/assets/ironchest/models/item/copper_to_iron_chest_upgrade.json b/src/main/resources/assets/ironchest/models/item/copper_to_iron_chest_upgrade.json new file mode 100644 index 00000000..3926f7a4 --- /dev/null +++ b/src/main/resources/assets/ironchest/models/item/copper_to_iron_chest_upgrade.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "ironchest:item/copper_iron_upgrade" + } +} diff --git a/src/main/resources/assets/ironchest/models/item/copper_to_silver_chest_upgrade.json b/src/main/resources/assets/ironchest/models/item/copper_to_silver_chest_upgrade.json new file mode 100644 index 00000000..f543495e --- /dev/null +++ b/src/main/resources/assets/ironchest/models/item/copper_to_silver_chest_upgrade.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "ironchest:item/copper_silver_upgrade" + } +} diff --git a/src/main/resources/assets/ironchest/models/item/crystal_chest.json b/src/main/resources/assets/ironchest/models/item/crystal_chest.json new file mode 100644 index 00000000..7bfe2e69 --- /dev/null +++ b/src/main/resources/assets/ironchest/models/item/crystal_chest.json @@ -0,0 +1,35 @@ +{ + "parent": "builtin/entity", + "display": { + "gui": { + "rotation": [ 30, 45, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 0.625, 0.625, 0.625 ] + }, + "ground": { + "rotation": [ 0, 0, 0 ], + "translation": [ 0, 3, 0], + "scale":[ 0.25, 0.25, 0.25 ] + }, + "head": { + "rotation": [ 0, 180, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 1, 1, 1] + }, + "fixed": { + "rotation": [ 0, 180, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 0.5, 0.5, 0.5 ] + }, + "thirdperson_righthand": { + "rotation": [ 75, 315, 0 ], + "translation": [ 0, 2.5, 0], + "scale": [ 0.375, 0.375, 0.375 ] + }, + "firstperson_righthand": { + "rotation": [ 0, 315, 0 ], + "translation": [ 0, 0, 0], + "scale": [ 0.4, 0.4, 0.4 ] + } + } +} diff --git a/src/main/resources/assets/ironchest/models/item/diamondCrystalUpgrade.json b/src/main/resources/assets/ironchest/models/item/diamondCrystalUpgrade.json deleted file mode 100644 index 846f6e92..00000000 --- a/src/main/resources/assets/ironchest/models/item/diamondCrystalUpgrade.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "parent": "builtin/generated", - "textures": { - "layer0": "ironchest:items/diamondCrystalUpgrade" - }, - "display": { - "thirdperson": { - "rotation": [ -90, 0, 0 ], - "translation": [ 0, 1, -3 ], - "scale": [ 0.55, 0.55, 0.55 ] - }, - "firstperson": { - "rotation": [ 0, -135, 25 ], - "translation": [ 0, 4, 2 ], - "scale": [ 1.7, 1.7, 1.7 ] - } - } -} diff --git a/src/main/resources/assets/ironchest/models/item/diamondObsidianUpgrade.json b/src/main/resources/assets/ironchest/models/item/diamondObsidianUpgrade.json deleted file mode 100644 index 04e94ba3..00000000 --- a/src/main/resources/assets/ironchest/models/item/diamondObsidianUpgrade.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "parent": "builtin/generated", - "textures": { - "layer0": "ironchest:items/diamondObsidianUpgrade" - }, - "display": { - "thirdperson": { - "rotation": [ -90, 0, 0 ], - "translation": [ 0, 1, -3 ], - "scale": [ 0.55, 0.55, 0.55 ] - }, - "firstperson": { - "rotation": [ 0, -135, 25 ], - "translation": [ 0, 4, 2 ], - "scale": [ 1.7, 1.7, 1.7 ] - } - } -} diff --git a/src/main/resources/assets/ironchest/models/item/diamond_chest.json b/src/main/resources/assets/ironchest/models/item/diamond_chest.json new file mode 100644 index 00000000..7bfe2e69 --- /dev/null +++ b/src/main/resources/assets/ironchest/models/item/diamond_chest.json @@ -0,0 +1,35 @@ +{ + "parent": "builtin/entity", + "display": { + "gui": { + "rotation": [ 30, 45, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 0.625, 0.625, 0.625 ] + }, + "ground": { + "rotation": [ 0, 0, 0 ], + "translation": [ 0, 3, 0], + "scale":[ 0.25, 0.25, 0.25 ] + }, + "head": { + "rotation": [ 0, 180, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 1, 1, 1] + }, + "fixed": { + "rotation": [ 0, 180, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 0.5, 0.5, 0.5 ] + }, + "thirdperson_righthand": { + "rotation": [ 75, 315, 0 ], + "translation": [ 0, 2.5, 0], + "scale": [ 0.375, 0.375, 0.375 ] + }, + "firstperson_righthand": { + "rotation": [ 0, 315, 0 ], + "translation": [ 0, 0, 0], + "scale": [ 0.4, 0.4, 0.4 ] + } + } +} diff --git a/src/main/resources/assets/ironchest/models/item/diamond_to_crystal_chest_upgrade.json b/src/main/resources/assets/ironchest/models/item/diamond_to_crystal_chest_upgrade.json new file mode 100644 index 00000000..db18ca6a --- /dev/null +++ b/src/main/resources/assets/ironchest/models/item/diamond_to_crystal_chest_upgrade.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "ironchest:item/diamond_crystal_upgrade" + } +} diff --git a/src/main/resources/assets/ironchest/models/item/diamond_to_obsidian_chest_upgrade.json b/src/main/resources/assets/ironchest/models/item/diamond_to_obsidian_chest_upgrade.json new file mode 100644 index 00000000..bd507f42 --- /dev/null +++ b/src/main/resources/assets/ironchest/models/item/diamond_to_obsidian_chest_upgrade.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "ironchest:item/diamond_obsidian_upgrade" + } +} diff --git a/src/main/resources/assets/ironchest/models/item/dirt_chest.json b/src/main/resources/assets/ironchest/models/item/dirt_chest.json new file mode 100644 index 00000000..7bfe2e69 --- /dev/null +++ b/src/main/resources/assets/ironchest/models/item/dirt_chest.json @@ -0,0 +1,35 @@ +{ + "parent": "builtin/entity", + "display": { + "gui": { + "rotation": [ 30, 45, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 0.625, 0.625, 0.625 ] + }, + "ground": { + "rotation": [ 0, 0, 0 ], + "translation": [ 0, 3, 0], + "scale":[ 0.25, 0.25, 0.25 ] + }, + "head": { + "rotation": [ 0, 180, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 1, 1, 1] + }, + "fixed": { + "rotation": [ 0, 180, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 0.5, 0.5, 0.5 ] + }, + "thirdperson_righthand": { + "rotation": [ 75, 315, 0 ], + "translation": [ 0, 2.5, 0], + "scale": [ 0.375, 0.375, 0.375 ] + }, + "firstperson_righthand": { + "rotation": [ 0, 315, 0 ], + "translation": [ 0, 0, 0], + "scale": [ 0.4, 0.4, 0.4 ] + } + } +} diff --git a/src/main/resources/assets/ironchest/models/item/goldDiamondUpgrade.json b/src/main/resources/assets/ironchest/models/item/goldDiamondUpgrade.json deleted file mode 100755 index 0a0e6269..00000000 --- a/src/main/resources/assets/ironchest/models/item/goldDiamondUpgrade.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "parent": "builtin/generated", - "textures": { - "layer0": "ironchest:items/goldDiamondUpgrade" - }, - "display": { - "thirdperson": { - "rotation": [ -90, 0, 0 ], - "translation": [ 0, 1, -3 ], - "scale": [ 0.55, 0.55, 0.55 ] - }, - "firstperson": { - "rotation": [ 0, -135, 25 ], - "translation": [ 0, 4, 2 ], - "scale": [ 1.7, 1.7, 1.7 ] - } - } -} diff --git a/src/main/resources/assets/ironchest/models/item/gold_chest.json b/src/main/resources/assets/ironchest/models/item/gold_chest.json new file mode 100644 index 00000000..7bfe2e69 --- /dev/null +++ b/src/main/resources/assets/ironchest/models/item/gold_chest.json @@ -0,0 +1,35 @@ +{ + "parent": "builtin/entity", + "display": { + "gui": { + "rotation": [ 30, 45, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 0.625, 0.625, 0.625 ] + }, + "ground": { + "rotation": [ 0, 0, 0 ], + "translation": [ 0, 3, 0], + "scale":[ 0.25, 0.25, 0.25 ] + }, + "head": { + "rotation": [ 0, 180, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 1, 1, 1] + }, + "fixed": { + "rotation": [ 0, 180, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 0.5, 0.5, 0.5 ] + }, + "thirdperson_righthand": { + "rotation": [ 75, 315, 0 ], + "translation": [ 0, 2.5, 0], + "scale": [ 0.375, 0.375, 0.375 ] + }, + "firstperson_righthand": { + "rotation": [ 0, 315, 0 ], + "translation": [ 0, 0, 0], + "scale": [ 0.4, 0.4, 0.4 ] + } + } +} diff --git a/src/main/resources/assets/ironchest/models/item/gold_to_diamond_chest_upgrade.json b/src/main/resources/assets/ironchest/models/item/gold_to_diamond_chest_upgrade.json new file mode 100644 index 00000000..62eec1fb --- /dev/null +++ b/src/main/resources/assets/ironchest/models/item/gold_to_diamond_chest_upgrade.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "ironchest:item/gold_diamond_upgrade" + } +} diff --git a/src/main/resources/assets/ironchest/models/item/ironGoldUpgrade.json b/src/main/resources/assets/ironchest/models/item/ironGoldUpgrade.json deleted file mode 100755 index 4579f8a4..00000000 --- a/src/main/resources/assets/ironchest/models/item/ironGoldUpgrade.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "parent": "builtin/generated", - "textures": { - "layer0": "ironchest:items/ironGoldUpgrade" - }, - "display": { - "thirdperson": { - "rotation": [ -90, 0, 0 ], - "translation": [ 0, 1, -3 ], - "scale": [ 0.55, 0.55, 0.55 ] - }, - "firstperson": { - "rotation": [ 0, -135, 25 ], - "translation": [ 0, 4, 2 ], - "scale": [ 1.7, 1.7, 1.7 ] - } - } -} diff --git a/src/main/resources/assets/ironchest/models/item/iron_chest.json b/src/main/resources/assets/ironchest/models/item/iron_chest.json new file mode 100644 index 00000000..7bfe2e69 --- /dev/null +++ b/src/main/resources/assets/ironchest/models/item/iron_chest.json @@ -0,0 +1,35 @@ +{ + "parent": "builtin/entity", + "display": { + "gui": { + "rotation": [ 30, 45, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 0.625, 0.625, 0.625 ] + }, + "ground": { + "rotation": [ 0, 0, 0 ], + "translation": [ 0, 3, 0], + "scale":[ 0.25, 0.25, 0.25 ] + }, + "head": { + "rotation": [ 0, 180, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 1, 1, 1] + }, + "fixed": { + "rotation": [ 0, 180, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 0.5, 0.5, 0.5 ] + }, + "thirdperson_righthand": { + "rotation": [ 75, 315, 0 ], + "translation": [ 0, 2.5, 0], + "scale": [ 0.375, 0.375, 0.375 ] + }, + "firstperson_righthand": { + "rotation": [ 0, 315, 0 ], + "translation": [ 0, 0, 0], + "scale": [ 0.4, 0.4, 0.4 ] + } + } +} diff --git a/src/main/resources/assets/ironchest/models/item/iron_to_gold_chest_upgrade.json b/src/main/resources/assets/ironchest/models/item/iron_to_gold_chest_upgrade.json new file mode 100644 index 00000000..7691286c --- /dev/null +++ b/src/main/resources/assets/ironchest/models/item/iron_to_gold_chest_upgrade.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "ironchest:item/iron_gold_upgrade" + } +} diff --git a/src/main/resources/assets/ironchest/models/item/obsidian_chest.json b/src/main/resources/assets/ironchest/models/item/obsidian_chest.json new file mode 100644 index 00000000..7bfe2e69 --- /dev/null +++ b/src/main/resources/assets/ironchest/models/item/obsidian_chest.json @@ -0,0 +1,35 @@ +{ + "parent": "builtin/entity", + "display": { + "gui": { + "rotation": [ 30, 45, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 0.625, 0.625, 0.625 ] + }, + "ground": { + "rotation": [ 0, 0, 0 ], + "translation": [ 0, 3, 0], + "scale":[ 0.25, 0.25, 0.25 ] + }, + "head": { + "rotation": [ 0, 180, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 1, 1, 1] + }, + "fixed": { + "rotation": [ 0, 180, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 0.5, 0.5, 0.5 ] + }, + "thirdperson_righthand": { + "rotation": [ 75, 315, 0 ], + "translation": [ 0, 2.5, 0], + "scale": [ 0.375, 0.375, 0.375 ] + }, + "firstperson_righthand": { + "rotation": [ 0, 315, 0 ], + "translation": [ 0, 0, 0], + "scale": [ 0.4, 0.4, 0.4 ] + } + } +} diff --git a/src/main/resources/assets/ironchest/models/item/silverGoldUpgrade.json b/src/main/resources/assets/ironchest/models/item/silverGoldUpgrade.json deleted file mode 100755 index 62351b24..00000000 --- a/src/main/resources/assets/ironchest/models/item/silverGoldUpgrade.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "parent": "builtin/generated", - "textures": { - "layer0": "ironchest:items/silverGoldUpgrade" - }, - "display": { - "thirdperson": { - "rotation": [ -90, 0, 0 ], - "translation": [ 0, 1, -3 ], - "scale": [ 0.55, 0.55, 0.55 ] - }, - "firstperson": { - "rotation": [ 0, -135, 25 ], - "translation": [ 0, 4, 2 ], - "scale": [ 1.7, 1.7, 1.7 ] - } - } -} diff --git a/src/main/resources/assets/ironchest/models/item/silver_chest.json b/src/main/resources/assets/ironchest/models/item/silver_chest.json new file mode 100644 index 00000000..7bfe2e69 --- /dev/null +++ b/src/main/resources/assets/ironchest/models/item/silver_chest.json @@ -0,0 +1,35 @@ +{ + "parent": "builtin/entity", + "display": { + "gui": { + "rotation": [ 30, 45, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 0.625, 0.625, 0.625 ] + }, + "ground": { + "rotation": [ 0, 0, 0 ], + "translation": [ 0, 3, 0], + "scale":[ 0.25, 0.25, 0.25 ] + }, + "head": { + "rotation": [ 0, 180, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 1, 1, 1] + }, + "fixed": { + "rotation": [ 0, 180, 0 ], + "translation": [ 0, 0, 0], + "scale":[ 0.5, 0.5, 0.5 ] + }, + "thirdperson_righthand": { + "rotation": [ 75, 315, 0 ], + "translation": [ 0, 2.5, 0], + "scale": [ 0.375, 0.375, 0.375 ] + }, + "firstperson_righthand": { + "rotation": [ 0, 315, 0 ], + "translation": [ 0, 0, 0], + "scale": [ 0.4, 0.4, 0.4 ] + } + } +} diff --git a/src/main/resources/assets/ironchest/models/item/silver_to_gold_chest_upgrade.json b/src/main/resources/assets/ironchest/models/item/silver_to_gold_chest_upgrade.json new file mode 100644 index 00000000..0bb47a88 --- /dev/null +++ b/src/main/resources/assets/ironchest/models/item/silver_to_gold_chest_upgrade.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "ironchest:item/silver_gold_upgrade" + } +} diff --git a/src/main/resources/assets/ironchest/models/item/woodCopperUpgrade.json b/src/main/resources/assets/ironchest/models/item/woodCopperUpgrade.json deleted file mode 100644 index 51918f77..00000000 --- a/src/main/resources/assets/ironchest/models/item/woodCopperUpgrade.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "parent": "builtin/generated", - "textures": { - "layer0": "ironchest:items/woodCopperUpgrade" - }, - "display": { - "thirdperson": { - "rotation": [ -90, 0, 0 ], - "translation": [ 0, 1, -3 ], - "scale": [ 0.55, 0.55, 0.55 ] - }, - "firstperson": { - "rotation": [ 0, -135, 25 ], - "translation": [ 0, 4, 2 ], - "scale": [ 1.7, 1.7, 1.7 ] - } - } -} diff --git a/src/main/resources/assets/ironchest/models/item/woodIronUpgrade.json b/src/main/resources/assets/ironchest/models/item/woodIronUpgrade.json deleted file mode 100644 index 84e149dc..00000000 --- a/src/main/resources/assets/ironchest/models/item/woodIronUpgrade.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "parent": "builtin/generated", - "textures": { - "layer0": "ironchest:items/woodIronUpgrade" - }, - "display": { - "thirdperson": { - "rotation": [ -90, 0, 0 ], - "translation": [ 0, 1, -3 ], - "scale": [ 0.55, 0.55, 0.55 ] - }, - "firstperson": { - "rotation": [ 0, -135, 25 ], - "translation": [ 0, 4, 2 ], - "scale": [ 1.7, 1.7, 1.7 ] - } - } -} diff --git a/src/main/resources/assets/ironchest/models/item/wood_to_copper_chest_upgrade.json b/src/main/resources/assets/ironchest/models/item/wood_to_copper_chest_upgrade.json new file mode 100644 index 00000000..9195b8d5 --- /dev/null +++ b/src/main/resources/assets/ironchest/models/item/wood_to_copper_chest_upgrade.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "ironchest:item/wood_copper_upgrade" + } +} diff --git a/src/main/resources/assets/ironchest/models/item/wood_to_iron_chest_upgrade.json b/src/main/resources/assets/ironchest/models/item/wood_to_iron_chest_upgrade.json new file mode 100644 index 00000000..91ed0269 --- /dev/null +++ b/src/main/resources/assets/ironchest/models/item/wood_to_iron_chest_upgrade.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "ironchest:item/wood_iron_upgrade" + } +} diff --git a/src/main/resources/assets/ironchest/textures/gui/coppercontainer.png b/src/main/resources/assets/ironchest/textures/block/copper_break.png old mode 100755 new mode 100644 similarity index 71% rename from src/main/resources/assets/ironchest/textures/gui/coppercontainer.png rename to src/main/resources/assets/ironchest/textures/block/copper_break.png index 2fdb824e..7cfb64f6 Binary files a/src/main/resources/assets/ironchest/textures/gui/coppercontainer.png and b/src/main/resources/assets/ironchest/textures/block/copper_break.png differ diff --git a/src/main/resources/assets/ironchest/textures/gui/ironcontainer.png b/src/main/resources/assets/ironchest/textures/block/crystal_break.png old mode 100755 new mode 100644 similarity index 70% rename from src/main/resources/assets/ironchest/textures/gui/ironcontainer.png rename to src/main/resources/assets/ironchest/textures/block/crystal_break.png index 1c48eed8..44d3939d Binary files a/src/main/resources/assets/ironchest/textures/gui/ironcontainer.png and b/src/main/resources/assets/ironchest/textures/block/crystal_break.png differ diff --git a/src/main/resources/assets/ironchest/textures/gui/diamondcontainer.png b/src/main/resources/assets/ironchest/textures/block/diamond_break.png old mode 100755 new mode 100644 similarity index 70% rename from src/main/resources/assets/ironchest/textures/gui/diamondcontainer.png rename to src/main/resources/assets/ironchest/textures/block/diamond_break.png index b53f4729..850ebd21 Binary files a/src/main/resources/assets/ironchest/textures/gui/diamondcontainer.png and b/src/main/resources/assets/ironchest/textures/block/diamond_break.png differ diff --git a/src/main/resources/assets/ironchest/textures/gui/silvercontainer.png b/src/main/resources/assets/ironchest/textures/block/gold_break.png old mode 100755 new mode 100644 similarity index 68% rename from src/main/resources/assets/ironchest/textures/gui/silvercontainer.png rename to src/main/resources/assets/ironchest/textures/block/gold_break.png index 65179f2a..24074dd6 Binary files a/src/main/resources/assets/ironchest/textures/gui/silvercontainer.png and b/src/main/resources/assets/ironchest/textures/block/gold_break.png differ diff --git a/src/main/resources/assets/ironchest/textures/block/iron_break.png b/src/main/resources/assets/ironchest/textures/block/iron_break.png new file mode 100644 index 00000000..a7675b2d Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/block/iron_break.png differ diff --git a/src/main/resources/assets/ironchest/textures/block/silver_break.png b/src/main/resources/assets/ironchest/textures/block/silver_break.png new file mode 100644 index 00000000..531bc946 Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/block/silver_break.png differ diff --git a/src/main/resources/assets/ironchest/textures/gui/copper_container.png b/src/main/resources/assets/ironchest/textures/gui/copper_container.png new file mode 100644 index 00000000..41197b8d Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/gui/copper_container.png differ diff --git a/src/main/resources/assets/ironchest/textures/gui/diamond_container.png b/src/main/resources/assets/ironchest/textures/gui/diamond_container.png new file mode 100644 index 00000000..cdcafc91 Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/gui/diamond_container.png differ diff --git a/src/main/resources/assets/ironchest/textures/gui/dirtcontainer.png b/src/main/resources/assets/ironchest/textures/gui/dirt_container.png old mode 100755 new mode 100644 similarity index 100% rename from src/main/resources/assets/ironchest/textures/gui/dirtcontainer.png rename to src/main/resources/assets/ironchest/textures/gui/dirt_container.png diff --git a/src/main/resources/assets/ironchest/textures/gui/gold_container.png b/src/main/resources/assets/ironchest/textures/gui/gold_container.png new file mode 100644 index 00000000..37c35b40 Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/gui/gold_container.png differ diff --git a/src/main/resources/assets/ironchest/textures/gui/goldcontainer.png b/src/main/resources/assets/ironchest/textures/gui/goldcontainer.png deleted file mode 100755 index 27f506fa..00000000 Binary files a/src/main/resources/assets/ironchest/textures/gui/goldcontainer.png and /dev/null differ diff --git a/src/main/resources/assets/ironchest/textures/gui/iron_container.png b/src/main/resources/assets/ironchest/textures/gui/iron_container.png new file mode 100644 index 00000000..d95c78a3 Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/gui/iron_container.png differ diff --git a/src/main/resources/assets/ironchest/textures/gui/silver_container.png b/src/main/resources/assets/ironchest/textures/gui/silver_container.png new file mode 100644 index 00000000..b182f90d Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/gui/silver_container.png differ diff --git a/src/main/resources/assets/ironchest/textures/items/copperIronUpgrade.png b/src/main/resources/assets/ironchest/textures/item/copper_iron_upgrade.png old mode 100755 new mode 100644 similarity index 100% rename from src/main/resources/assets/ironchest/textures/items/copperIronUpgrade.png rename to src/main/resources/assets/ironchest/textures/item/copper_iron_upgrade.png diff --git a/src/main/resources/assets/ironchest/textures/items/copperSilverUpgrade.png b/src/main/resources/assets/ironchest/textures/item/copper_silver_upgrade.png old mode 100755 new mode 100644 similarity index 100% rename from src/main/resources/assets/ironchest/textures/items/copperSilverUpgrade.png rename to src/main/resources/assets/ironchest/textures/item/copper_silver_upgrade.png diff --git a/src/main/resources/assets/ironchest/textures/items/diamondCrystalUpgrade.png b/src/main/resources/assets/ironchest/textures/item/diamond_crystal_upgrade.png old mode 100755 new mode 100644 similarity index 100% rename from src/main/resources/assets/ironchest/textures/items/diamondCrystalUpgrade.png rename to src/main/resources/assets/ironchest/textures/item/diamond_crystal_upgrade.png diff --git a/src/main/resources/assets/ironchest/textures/items/diamondObsidianUpgrade.png b/src/main/resources/assets/ironchest/textures/item/diamond_obsidian_upgrade.png old mode 100755 new mode 100644 similarity index 100% rename from src/main/resources/assets/ironchest/textures/items/diamondObsidianUpgrade.png rename to src/main/resources/assets/ironchest/textures/item/diamond_obsidian_upgrade.png diff --git a/src/main/resources/assets/ironchest/textures/items/goldDiamondUpgrade.png b/src/main/resources/assets/ironchest/textures/item/gold_diamond_upgrade.png old mode 100755 new mode 100644 similarity index 100% rename from src/main/resources/assets/ironchest/textures/items/goldDiamondUpgrade.png rename to src/main/resources/assets/ironchest/textures/item/gold_diamond_upgrade.png diff --git a/src/main/resources/assets/ironchest/textures/items/ironGoldUpgrade.png b/src/main/resources/assets/ironchest/textures/item/iron_gold_upgrade.png old mode 100755 new mode 100644 similarity index 100% rename from src/main/resources/assets/ironchest/textures/items/ironGoldUpgrade.png rename to src/main/resources/assets/ironchest/textures/item/iron_gold_upgrade.png diff --git a/src/main/resources/assets/ironchest/textures/items/silverGoldUpgrade.png b/src/main/resources/assets/ironchest/textures/item/silver_gold_upgrade.png old mode 100755 new mode 100644 similarity index 100% rename from src/main/resources/assets/ironchest/textures/items/silverGoldUpgrade.png rename to src/main/resources/assets/ironchest/textures/item/silver_gold_upgrade.png diff --git a/src/main/resources/assets/ironchest/textures/items/woodCopperUpgrade.png b/src/main/resources/assets/ironchest/textures/item/wood_copper_upgrade.png old mode 100755 new mode 100644 similarity index 100% rename from src/main/resources/assets/ironchest/textures/items/woodCopperUpgrade.png rename to src/main/resources/assets/ironchest/textures/item/wood_copper_upgrade.png diff --git a/src/main/resources/assets/ironchest/textures/items/woodIronUpgrade.png b/src/main/resources/assets/ironchest/textures/item/wood_iron_upgrade.png old mode 100755 new mode 100644 similarity index 100% rename from src/main/resources/assets/ironchest/textures/items/woodIronUpgrade.png rename to src/main/resources/assets/ironchest/textures/item/wood_iron_upgrade.png diff --git a/src/main/resources/assets/ironchest/textures/model/copper_chest.png b/src/main/resources/assets/ironchest/textures/model/copper_chest.png new file mode 100644 index 00000000..7cac3aec Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/model/copper_chest.png differ diff --git a/src/main/resources/assets/ironchest/textures/model/copperchest.png b/src/main/resources/assets/ironchest/textures/model/copperchest.png deleted file mode 100755 index a008864f..00000000 Binary files a/src/main/resources/assets/ironchest/textures/model/copperchest.png and /dev/null differ diff --git a/src/main/resources/assets/ironchest/textures/model/crystal_chest.png b/src/main/resources/assets/ironchest/textures/model/crystal_chest.png new file mode 100644 index 00000000..54dc65df Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/model/crystal_chest.png differ diff --git a/src/main/resources/assets/ironchest/textures/model/crystalchest.png b/src/main/resources/assets/ironchest/textures/model/crystalchest.png deleted file mode 100755 index a455ce86..00000000 Binary files a/src/main/resources/assets/ironchest/textures/model/crystalchest.png and /dev/null differ diff --git a/src/main/resources/assets/ironchest/textures/model/diamond_chest.png b/src/main/resources/assets/ironchest/textures/model/diamond_chest.png new file mode 100644 index 00000000..c8679a0d Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/model/diamond_chest.png differ diff --git a/src/main/resources/assets/ironchest/textures/model/diamondchest.png b/src/main/resources/assets/ironchest/textures/model/diamondchest.png deleted file mode 100755 index 64020b57..00000000 Binary files a/src/main/resources/assets/ironchest/textures/model/diamondchest.png and /dev/null differ diff --git a/src/main/resources/assets/ironchest/textures/model/dirt_chest.png b/src/main/resources/assets/ironchest/textures/model/dirt_chest.png new file mode 100644 index 00000000..fefcefc9 Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/model/dirt_chest.png differ diff --git a/src/main/resources/assets/ironchest/textures/model/dirtchest.png b/src/main/resources/assets/ironchest/textures/model/dirtchest.png deleted file mode 100755 index 168e1799..00000000 Binary files a/src/main/resources/assets/ironchest/textures/model/dirtchest.png and /dev/null differ diff --git a/src/main/resources/assets/ironchest/textures/model/gold_chest.png b/src/main/resources/assets/ironchest/textures/model/gold_chest.png new file mode 100644 index 00000000..e074f238 Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/model/gold_chest.png differ diff --git a/src/main/resources/assets/ironchest/textures/model/goldchest.png b/src/main/resources/assets/ironchest/textures/model/goldchest.png deleted file mode 100755 index 7f184689..00000000 Binary files a/src/main/resources/assets/ironchest/textures/model/goldchest.png and /dev/null differ diff --git a/src/main/resources/assets/ironchest/textures/model/iron_chest.png b/src/main/resources/assets/ironchest/textures/model/iron_chest.png new file mode 100644 index 00000000..7fd80dfc Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/model/iron_chest.png differ diff --git a/src/main/resources/assets/ironchest/textures/model/ironchest.png b/src/main/resources/assets/ironchest/textures/model/ironchest.png deleted file mode 100755 index df883fff..00000000 Binary files a/src/main/resources/assets/ironchest/textures/model/ironchest.png and /dev/null differ diff --git a/src/main/resources/assets/ironchest/textures/model/obsidian_chest.png b/src/main/resources/assets/ironchest/textures/model/obsidian_chest.png new file mode 100644 index 00000000..dbfece80 Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/model/obsidian_chest.png differ diff --git a/src/main/resources/assets/ironchest/textures/model/obsidianchest.png b/src/main/resources/assets/ironchest/textures/model/obsidianchest.png deleted file mode 100755 index 4f0657ab..00000000 Binary files a/src/main/resources/assets/ironchest/textures/model/obsidianchest.png and /dev/null differ diff --git a/src/main/resources/assets/ironchest/textures/model/silver_chest.png b/src/main/resources/assets/ironchest/textures/model/silver_chest.png new file mode 100644 index 00000000..ae5ff2a5 Binary files /dev/null and b/src/main/resources/assets/ironchest/textures/model/silver_chest.png differ diff --git a/src/main/resources/assets/ironchest/textures/model/silverchest.png b/src/main/resources/assets/ironchest/textures/model/silverchest.png deleted file mode 100755 index 780becd8..00000000 Binary files a/src/main/resources/assets/ironchest/textures/model/silverchest.png and /dev/null differ diff --git a/src/main/resources/data/ironchest/loot_tables/blocks/copper_chest.json b/src/main/resources/data/ironchest/loot_tables/blocks/copper_chest.json new file mode 100644 index 00000000..27d00f0f --- /dev/null +++ b/src/main/resources/data/ironchest/loot_tables/blocks/copper_chest.json @@ -0,0 +1,26 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "ironchest:copper_chest", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:copy_name", + "source": "block_entity" + } + ], + "name": "ironchest:copper_chest" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/ironchest/loot_tables/blocks/crystal_chest.json b/src/main/resources/data/ironchest/loot_tables/blocks/crystal_chest.json new file mode 100644 index 00000000..96134727 --- /dev/null +++ b/src/main/resources/data/ironchest/loot_tables/blocks/crystal_chest.json @@ -0,0 +1,26 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "ironchest:crystal_chest", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:copy_name", + "source": "block_entity" + } + ], + "name": "ironchest:crystal_chest" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/ironchest/loot_tables/blocks/diamond_chest.json b/src/main/resources/data/ironchest/loot_tables/blocks/diamond_chest.json new file mode 100644 index 00000000..00ee9e45 --- /dev/null +++ b/src/main/resources/data/ironchest/loot_tables/blocks/diamond_chest.json @@ -0,0 +1,26 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "ironchest:diamond_chest", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:copy_name", + "source": "block_entity" + } + ], + "name": "ironchest:diamond_chest" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/ironchest/loot_tables/blocks/dirt_chest.json b/src/main/resources/data/ironchest/loot_tables/blocks/dirt_chest.json new file mode 100644 index 00000000..c8db1bf6 --- /dev/null +++ b/src/main/resources/data/ironchest/loot_tables/blocks/dirt_chest.json @@ -0,0 +1,30 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "ironchest:dirt_chest", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:copy_name", + "source": "block_entity" + }, + { + "function": "minecraft:set_nbt", + "tag": "{been_placed:1}" + } + ], + "name": "ironchest:dirt_chest" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/ironchest/loot_tables/blocks/gold_chest.json b/src/main/resources/data/ironchest/loot_tables/blocks/gold_chest.json new file mode 100644 index 00000000..9691196b --- /dev/null +++ b/src/main/resources/data/ironchest/loot_tables/blocks/gold_chest.json @@ -0,0 +1,26 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "ironchest:gold_chest", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:copy_name", + "source": "block_entity" + } + ], + "name": "ironchest:gold_chest" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/ironchest/loot_tables/blocks/iron_chest.json b/src/main/resources/data/ironchest/loot_tables/blocks/iron_chest.json new file mode 100644 index 00000000..f1448bce --- /dev/null +++ b/src/main/resources/data/ironchest/loot_tables/blocks/iron_chest.json @@ -0,0 +1,26 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "ironchest:iron_chest", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:copy_name", + "source": "block_entity" + } + ], + "name": "ironchest:iron_chest" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/ironchest/loot_tables/blocks/obsidian_chest.json b/src/main/resources/data/ironchest/loot_tables/blocks/obsidian_chest.json new file mode 100644 index 00000000..f348abeb --- /dev/null +++ b/src/main/resources/data/ironchest/loot_tables/blocks/obsidian_chest.json @@ -0,0 +1,26 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "ironchest:obsidian_chest", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:copy_name", + "source": "block_entity" + } + ], + "name": "ironchest:obsidian_chest" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/ironchest/loot_tables/blocks/silver_chest.json b/src/main/resources/data/ironchest/loot_tables/blocks/silver_chest.json new file mode 100644 index 00000000..6d53666a --- /dev/null +++ b/src/main/resources/data/ironchest/loot_tables/blocks/silver_chest.json @@ -0,0 +1,26 @@ +{ + "type": "minecraft:block", + "pools": [ + { + "name": "ironchest:silver_chest", + "rolls": 1, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "function": "minecraft:copy_name", + "source": "block_entity" + } + ], + "name": "ironchest:silver_chest" + } + ], + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/ironchest/recipes/chests/copper_iron_chest.json b/src/main/resources/data/ironchest/recipes/chests/copper_iron_chest.json new file mode 100644 index 00000000..6b899ebc --- /dev/null +++ b/src/main/resources/data/ironchest/recipes/chests/copper_iron_chest.json @@ -0,0 +1,73 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "MGM", + "GSG", + "MGM" + ], + "key": { + "M": { + "tag": "forge:ingots/iron" + }, + "S": { + "item": "ironchest:copper_chest" + }, + "G": [ + { + "item": "minecraft:glass" + }, + { + "item": "minecraft:white_stained_glass" + }, + { + "item": "minecraft:orange_stained_glass" + }, + { + "item": "minecraft:magenta_stained_glass" + }, + { + "item": "minecraft:light_blue_stained_glass" + }, + { + "item": "minecraft:yellow_stained_glass" + }, + { + "item": "minecraft:lime_stained_glass" + }, + { + "item": "minecraft:pink_stained_glass" + }, + { + "item": "minecraft:gray_stained_glass" + }, + { + "item": "minecraft:light_gray_stained_glass" + }, + { + "item": "minecraft:cyan_stained_glass" + }, + { + "item": "minecraft:purple_stained_glass" + }, + { + "item": "minecraft:blue_stained_glass" + }, + { + "item": "minecraft:brown_stained_glass" + }, + { + "item": "minecraft:green_stained_glass" + }, + { + "item": "minecraft:red_stained_glass" + }, + { + "item": "minecraft:black_stained_glass" + } + ] + }, + "result": { + "item": "ironchest:iron_chest" + }, + "_comment": "replaceme with tag forge:glass when out." +} \ No newline at end of file diff --git a/src/main/resources/data/ironchest/recipes/chests/copper_silver_chest.json b/src/main/resources/data/ironchest/recipes/chests/copper_silver_chest.json new file mode 100644 index 00000000..0ca6764e --- /dev/null +++ b/src/main/resources/data/ironchest/recipes/chests/copper_silver_chest.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "MMM", + "MSM", + "MMM" + ], + "key": { + "M": { + "tag": "forge:ingots/silver" + }, + "S": { + "item": "ironchest:copper_chest" + } + }, + "result": { + "item": "ironchest:silver_chest" + } +} \ No newline at end of file diff --git a/src/main/resources/data/ironchest/recipes/chests/diamond_crystal_chest.json b/src/main/resources/data/ironchest/recipes/chests/diamond_crystal_chest.json new file mode 100644 index 00000000..527601ef --- /dev/null +++ b/src/main/resources/data/ironchest/recipes/chests/diamond_crystal_chest.json @@ -0,0 +1,70 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "GGG", + "GSG", + "GGG" + ], + "key": { + "S": { + "item": "ironchest:diamond_chest" + }, + "G": [ + { + "item": "minecraft:glass" + }, + { + "item": "minecraft:white_stained_glass" + }, + { + "item": "minecraft:orange_stained_glass" + }, + { + "item": "minecraft:magenta_stained_glass" + }, + { + "item": "minecraft:light_blue_stained_glass" + }, + { + "item": "minecraft:yellow_stained_glass" + }, + { + "item": "minecraft:lime_stained_glass" + }, + { + "item": "minecraft:pink_stained_glass" + }, + { + "item": "minecraft:gray_stained_glass" + }, + { + "item": "minecraft:light_gray_stained_glass" + }, + { + "item": "minecraft:cyan_stained_glass" + }, + { + "item": "minecraft:purple_stained_glass" + }, + { + "item": "minecraft:blue_stained_glass" + }, + { + "item": "minecraft:brown_stained_glass" + }, + { + "item": "minecraft:green_stained_glass" + }, + { + "item": "minecraft:red_stained_glass" + }, + { + "item": "minecraft:black_stained_glass" + } + ] + }, + "result": { + "item": "ironchest:crystal_chest" + }, + "_comment": "replaceme with tag forge:glass when out." +} \ No newline at end of file diff --git a/src/main/resources/data/ironchest/recipes/chests/diamond_obsidian_chest.json b/src/main/resources/data/ironchest/recipes/chests/diamond_obsidian_chest.json new file mode 100644 index 00000000..ed9417c3 --- /dev/null +++ b/src/main/resources/data/ironchest/recipes/chests/diamond_obsidian_chest.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "MMM", + "MSM", + "MMM" + ], + "key": { + "M": { + "item": "minecraft:obsidian" + }, + "S": { + "item": "ironchest:diamond_chest" + } + }, + "result": { + "item": "ironchest:obsidian_chest" + } +} \ No newline at end of file diff --git a/src/main/resources/data/ironchest/recipes/chests/gold_diamond_chest.json b/src/main/resources/data/ironchest/recipes/chests/gold_diamond_chest.json new file mode 100644 index 00000000..a6b18d4b --- /dev/null +++ b/src/main/resources/data/ironchest/recipes/chests/gold_diamond_chest.json @@ -0,0 +1,73 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "GGG", + "MSM", + "GGG" + ], + "key": { + "M": { + "tag": "forge:gems/diamond" + }, + "S": { + "item": "ironchest:gold_chest" + }, + "G": [ + { + "item": "minecraft:glass" + }, + { + "item": "minecraft:white_stained_glass" + }, + { + "item": "minecraft:orange_stained_glass" + }, + { + "item": "minecraft:magenta_stained_glass" + }, + { + "item": "minecraft:light_blue_stained_glass" + }, + { + "item": "minecraft:yellow_stained_glass" + }, + { + "item": "minecraft:lime_stained_glass" + }, + { + "item": "minecraft:pink_stained_glass" + }, + { + "item": "minecraft:gray_stained_glass" + }, + { + "item": "minecraft:light_gray_stained_glass" + }, + { + "item": "minecraft:cyan_stained_glass" + }, + { + "item": "minecraft:purple_stained_glass" + }, + { + "item": "minecraft:blue_stained_glass" + }, + { + "item": "minecraft:brown_stained_glass" + }, + { + "item": "minecraft:green_stained_glass" + }, + { + "item": "minecraft:red_stained_glass" + }, + { + "item": "minecraft:black_stained_glass" + } + ] + }, + "result": { + "item": "ironchest:diamond_chest" + }, + "_comment": "replaceme with tag forge:glass when out." +} \ No newline at end of file diff --git a/src/main/resources/data/ironchest/recipes/chests/iron_gold_chest.json b/src/main/resources/data/ironchest/recipes/chests/iron_gold_chest.json new file mode 100644 index 00000000..d2d477b0 --- /dev/null +++ b/src/main/resources/data/ironchest/recipes/chests/iron_gold_chest.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "MMM", + "MSM", + "MMM" + ], + "key": { + "M": { + "tag": "forge:ingots/gold" + }, + "S": { + "item": "ironchest:iron_chest" + } + }, + "result": { + "item": "ironchest:gold_chest" + } +} \ No newline at end of file diff --git a/src/main/resources/data/ironchest/recipes/chests/iron_silver_chest.json b/src/main/resources/data/ironchest/recipes/chests/iron_silver_chest.json new file mode 100644 index 00000000..dbc27f69 --- /dev/null +++ b/src/main/resources/data/ironchest/recipes/chests/iron_silver_chest.json @@ -0,0 +1,73 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "GGG", + "MSM", + "GGG" + ], + "key": { + "M": { + "tag": "forge:ingots/silver" + }, + "S": { + "item": "ironchest:iron_chest" + }, + "G": [ + { + "item": "minecraft:glass" + }, + { + "item": "minecraft:white_stained_glass" + }, + { + "item": "minecraft:orange_stained_glass" + }, + { + "item": "minecraft:magenta_stained_glass" + }, + { + "item": "minecraft:light_blue_stained_glass" + }, + { + "item": "minecraft:yellow_stained_glass" + }, + { + "item": "minecraft:lime_stained_glass" + }, + { + "item": "minecraft:pink_stained_glass" + }, + { + "item": "minecraft:gray_stained_glass" + }, + { + "item": "minecraft:light_gray_stained_glass" + }, + { + "item": "minecraft:cyan_stained_glass" + }, + { + "item": "minecraft:purple_stained_glass" + }, + { + "item": "minecraft:blue_stained_glass" + }, + { + "item": "minecraft:brown_stained_glass" + }, + { + "item": "minecraft:green_stained_glass" + }, + { + "item": "minecraft:red_stained_glass" + }, + { + "item": "minecraft:black_stained_glass" + } + ] + }, + "result": { + "item": "ironchest:silver_chest" + }, + "_comment": "replaceme with tag forge:glass when out." +} \ No newline at end of file diff --git a/src/main/resources/data/ironchest/recipes/chests/silver_diamond_chest.json b/src/main/resources/data/ironchest/recipes/chests/silver_diamond_chest.json new file mode 100644 index 00000000..84d70c12 --- /dev/null +++ b/src/main/resources/data/ironchest/recipes/chests/silver_diamond_chest.json @@ -0,0 +1,73 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "GGG", + "GSG", + "MMM" + ], + "key": { + "M": { + "tag": "forge:gems/diamond" + }, + "S": { + "item": "ironchest:silver_chest" + }, + "G": [ + { + "item": "minecraft:glass" + }, + { + "item": "minecraft:white_stained_glass" + }, + { + "item": "minecraft:orange_stained_glass" + }, + { + "item": "minecraft:magenta_stained_glass" + }, + { + "item": "minecraft:light_blue_stained_glass" + }, + { + "item": "minecraft:yellow_stained_glass" + }, + { + "item": "minecraft:lime_stained_glass" + }, + { + "item": "minecraft:pink_stained_glass" + }, + { + "item": "minecraft:gray_stained_glass" + }, + { + "item": "minecraft:light_gray_stained_glass" + }, + { + "item": "minecraft:cyan_stained_glass" + }, + { + "item": "minecraft:purple_stained_glass" + }, + { + "item": "minecraft:blue_stained_glass" + }, + { + "item": "minecraft:brown_stained_glass" + }, + { + "item": "minecraft:green_stained_glass" + }, + { + "item": "minecraft:red_stained_glass" + }, + { + "item": "minecraft:black_stained_glass" + } + ] + }, + "result": { + "item": "ironchest:diamond_chest" + }, + "_comment": "replaceme with tag forge:glass when out." +} \ No newline at end of file diff --git a/src/main/resources/data/ironchest/recipes/chests/silver_gold_chest.json b/src/main/resources/data/ironchest/recipes/chests/silver_gold_chest.json new file mode 100644 index 00000000..302eb94f --- /dev/null +++ b/src/main/resources/data/ironchest/recipes/chests/silver_gold_chest.json @@ -0,0 +1,73 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "MGM", + "GSG", + "MGM" + ], + "key": { + "M": { + "tag": "forge:ingots/gold" + }, + "S": { + "item": "ironchest:silver_chest" + }, + "G": [ + { + "item": "minecraft:glass" + }, + { + "item": "minecraft:white_stained_glass" + }, + { + "item": "minecraft:orange_stained_glass" + }, + { + "item": "minecraft:magenta_stained_glass" + }, + { + "item": "minecraft:light_blue_stained_glass" + }, + { + "item": "minecraft:yellow_stained_glass" + }, + { + "item": "minecraft:lime_stained_glass" + }, + { + "item": "minecraft:pink_stained_glass" + }, + { + "item": "minecraft:gray_stained_glass" + }, + { + "item": "minecraft:light_gray_stained_glass" + }, + { + "item": "minecraft:cyan_stained_glass" + }, + { + "item": "minecraft:purple_stained_glass" + }, + { + "item": "minecraft:blue_stained_glass" + }, + { + "item": "minecraft:brown_stained_glass" + }, + { + "item": "minecraft:green_stained_glass" + }, + { + "item": "minecraft:red_stained_glass" + }, + { + "item": "minecraft:black_stained_glass" + } + ] + }, + "result": { + "item": "ironchest:gold_chest" + }, + "_comment": "replaceme with tag forge:glass when out." +} \ No newline at end of file diff --git a/src/main/resources/data/ironchest/recipes/chests/vanilla_copper_chest.json b/src/main/resources/data/ironchest/recipes/chests/vanilla_copper_chest.json new file mode 100644 index 00000000..1dcc25f0 --- /dev/null +++ b/src/main/resources/data/ironchest/recipes/chests/vanilla_copper_chest.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "MMM", + "MSM", + "MMM" + ], + "key": { + "M": { + "tag": "forge:ingots/copper" + }, + "S": { + "tag": "forge:chests/wooden" + } + }, + "result": { + "item": "ironchest:copper_chest" + } +} \ No newline at end of file diff --git a/src/main/resources/data/ironchest/recipes/chests/vanilla_dirt_chest.json b/src/main/resources/data/ironchest/recipes/chests/vanilla_dirt_chest.json new file mode 100644 index 00000000..ee107dff --- /dev/null +++ b/src/main/resources/data/ironchest/recipes/chests/vanilla_dirt_chest.json @@ -0,0 +1,28 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "MMM", + "MSM", + "MMM" + ], + "key": { + "S": { + "tag": "forge:chests/wooden" + }, + "M": [ + { + "item": "minecraft:dirt" + }, + { + "item": "minecraft:coarse_dirt" + }, + { + "item": "minecraft:podzol" + } + ] + }, + "result": { + "item": "ironchest:dirt_chest" + }, + "_comment": "replaceme with tag forge:dirt when out." +} \ No newline at end of file diff --git a/src/main/resources/data/ironchest/recipes/chests/vanilla_iron_chest.json b/src/main/resources/data/ironchest/recipes/chests/vanilla_iron_chest.json new file mode 100644 index 00000000..45f62756 --- /dev/null +++ b/src/main/resources/data/ironchest/recipes/chests/vanilla_iron_chest.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "MMM", + "MSM", + "MMM" + ], + "key": { + "M": { + "tag": "forge:ingots/iron" + }, + "S": { + "tag": "forge:chests/wooden" + } + }, + "result": { + "item": "ironchest:iron_chest" + } +} \ No newline at end of file diff --git a/src/main/resources/data/ironchest/recipes/upgrades/copper_to_iron_chest_upgrade.json b/src/main/resources/data/ironchest/recipes/upgrades/copper_to_iron_chest_upgrade.json new file mode 100644 index 00000000..976b7b16 --- /dev/null +++ b/src/main/resources/data/ironchest/recipes/upgrades/copper_to_iron_chest_upgrade.json @@ -0,0 +1,73 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "MGM", + "GSG", + "MGM" + ], + "key": { + "M": { + "tag": "forge:ingots/iron" + }, + "S": { + "tag": "forge:ingots/copper" + }, + "G": [ + { + "item": "minecraft:glass" + }, + { + "item": "minecraft:white_stained_glass" + }, + { + "item": "minecraft:orange_stained_glass" + }, + { + "item": "minecraft:magenta_stained_glass" + }, + { + "item": "minecraft:light_blue_stained_glass" + }, + { + "item": "minecraft:yellow_stained_glass" + }, + { + "item": "minecraft:lime_stained_glass" + }, + { + "item": "minecraft:pink_stained_glass" + }, + { + "item": "minecraft:gray_stained_glass" + }, + { + "item": "minecraft:light_gray_stained_glass" + }, + { + "item": "minecraft:cyan_stained_glass" + }, + { + "item": "minecraft:purple_stained_glass" + }, + { + "item": "minecraft:blue_stained_glass" + }, + { + "item": "minecraft:brown_stained_glass" + }, + { + "item": "minecraft:green_stained_glass" + }, + { + "item": "minecraft:red_stained_glass" + }, + { + "item": "minecraft:black_stained_glass" + } + ] + }, + "result": { + "item": "ironchest:copper_to_iron_chest_upgrade" + }, + "_comment": "replaceme with tag forge:glass when out." +} \ No newline at end of file diff --git a/src/main/resources/data/ironchest/recipes/upgrades/copper_to_silver_chest_upgrade.json b/src/main/resources/data/ironchest/recipes/upgrades/copper_to_silver_chest_upgrade.json new file mode 100644 index 00000000..79c1f990 --- /dev/null +++ b/src/main/resources/data/ironchest/recipes/upgrades/copper_to_silver_chest_upgrade.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "MMM", + "MSM", + "MMM" + ], + "key": { + "M": { + "tag": "forge:ingots/silver" + }, + "S": { + "tag": "forge:ingots/copper" + } + }, + "result": { + "item": "ironchest:copper_to_silver_chest_upgrade" + } +} \ No newline at end of file diff --git a/src/main/resources/data/ironchest/recipes/upgrades/diamond_to_crystal_chest_upgrade.json b/src/main/resources/data/ironchest/recipes/upgrades/diamond_to_crystal_chest_upgrade.json new file mode 100644 index 00000000..e2b0aeb0 --- /dev/null +++ b/src/main/resources/data/ironchest/recipes/upgrades/diamond_to_crystal_chest_upgrade.json @@ -0,0 +1,70 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "GGG", + "GSG", + "GGG" + ], + "key": { + "S": { + "item": "minecraft:obsidian" + }, + "G": [ + { + "item": "minecraft:glass" + }, + { + "item": "minecraft:white_stained_glass" + }, + { + "item": "minecraft:orange_stained_glass" + }, + { + "item": "minecraft:magenta_stained_glass" + }, + { + "item": "minecraft:light_blue_stained_glass" + }, + { + "item": "minecraft:yellow_stained_glass" + }, + { + "item": "minecraft:lime_stained_glass" + }, + { + "item": "minecraft:pink_stained_glass" + }, + { + "item": "minecraft:gray_stained_glass" + }, + { + "item": "minecraft:light_gray_stained_glass" + }, + { + "item": "minecraft:cyan_stained_glass" + }, + { + "item": "minecraft:purple_stained_glass" + }, + { + "item": "minecraft:blue_stained_glass" + }, + { + "item": "minecraft:brown_stained_glass" + }, + { + "item": "minecraft:green_stained_glass" + }, + { + "item": "minecraft:red_stained_glass" + }, + { + "item": "minecraft:black_stained_glass" + } + ] + }, + "result": { + "item": "ironchest:diamond_to_crystal_chest_upgrade" + }, + "_comment": "replaceme with tag forge:glass when out." +} \ No newline at end of file diff --git a/src/main/resources/data/ironchest/recipes/upgrades/diamond_to_obsidian_chest_upgrade.json b/src/main/resources/data/ironchest/recipes/upgrades/diamond_to_obsidian_chest_upgrade.json new file mode 100644 index 00000000..f04b457a --- /dev/null +++ b/src/main/resources/data/ironchest/recipes/upgrades/diamond_to_obsidian_chest_upgrade.json @@ -0,0 +1,70 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "MMM", + "MGM", + "MMM" + ], + "key": { + "M": { + "item": "minecraft:obsidian" + }, + "G": [ + { + "item": "minecraft:glass" + }, + { + "item": "minecraft:white_stained_glass" + }, + { + "item": "minecraft:orange_stained_glass" + }, + { + "item": "minecraft:magenta_stained_glass" + }, + { + "item": "minecraft:light_blue_stained_glass" + }, + { + "item": "minecraft:yellow_stained_glass" + }, + { + "item": "minecraft:lime_stained_glass" + }, + { + "item": "minecraft:pink_stained_glass" + }, + { + "item": "minecraft:gray_stained_glass" + }, + { + "item": "minecraft:light_gray_stained_glass" + }, + { + "item": "minecraft:cyan_stained_glass" + }, + { + "item": "minecraft:purple_stained_glass" + }, + { + "item": "minecraft:blue_stained_glass" + }, + { + "item": "minecraft:brown_stained_glass" + }, + { + "item": "minecraft:green_stained_glass" + }, + { + "item": "minecraft:red_stained_glass" + }, + { + "item": "minecraft:black_stained_glass" + } + ] + }, + "result": { + "item": "ironchest:diamond_to_obsidian_chest_upgrade" + }, + "_comment": "replaceme with tag forge:glass when out." +} \ No newline at end of file diff --git a/src/main/resources/data/ironchest/recipes/upgrades/gold_to_diamond_chest_upgrade.json b/src/main/resources/data/ironchest/recipes/upgrades/gold_to_diamond_chest_upgrade.json new file mode 100644 index 00000000..b4772a6d --- /dev/null +++ b/src/main/resources/data/ironchest/recipes/upgrades/gold_to_diamond_chest_upgrade.json @@ -0,0 +1,73 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "GGG", + "MSM", + "GGG" + ], + "key": { + "M": { + "tag": "forge:gems/diamond" + }, + "S": { + "tag": "forge:ingots/gold" + }, + "G": [ + { + "item": "minecraft:glass" + }, + { + "item": "minecraft:white_stained_glass" + }, + { + "item": "minecraft:orange_stained_glass" + }, + { + "item": "minecraft:magenta_stained_glass" + }, + { + "item": "minecraft:light_blue_stained_glass" + }, + { + "item": "minecraft:yellow_stained_glass" + }, + { + "item": "minecraft:lime_stained_glass" + }, + { + "item": "minecraft:pink_stained_glass" + }, + { + "item": "minecraft:gray_stained_glass" + }, + { + "item": "minecraft:light_gray_stained_glass" + }, + { + "item": "minecraft:cyan_stained_glass" + }, + { + "item": "minecraft:purple_stained_glass" + }, + { + "item": "minecraft:blue_stained_glass" + }, + { + "item": "minecraft:brown_stained_glass" + }, + { + "item": "minecraft:green_stained_glass" + }, + { + "item": "minecraft:red_stained_glass" + }, + { + "item": "minecraft:black_stained_glass" + } + ] + }, + "result": { + "item": "ironchest:gold_to_diamond_chest_upgrade" + }, + "_comment": "replaceme with tag forge:glass when out." +} \ No newline at end of file diff --git a/src/main/resources/data/ironchest/recipes/upgrades/iron_to_gold_chest_upgrade.json b/src/main/resources/data/ironchest/recipes/upgrades/iron_to_gold_chest_upgrade.json new file mode 100644 index 00000000..1d9295f5 --- /dev/null +++ b/src/main/resources/data/ironchest/recipes/upgrades/iron_to_gold_chest_upgrade.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "MMM", + "MSM", + "MMM" + ], + "key": { + "M": { + "tag": "forge:ingots/gold" + }, + "S": { + "tag": "forge:ingots/iron" + } + }, + "result": { + "item": "ironchest:iron_to_gold_chest_upgrade" + } +} \ No newline at end of file diff --git a/src/main/resources/data/ironchest/recipes/upgrades/silver_to_gold_chest_upgrade.json b/src/main/resources/data/ironchest/recipes/upgrades/silver_to_gold_chest_upgrade.json new file mode 100644 index 00000000..0ebcb7c7 --- /dev/null +++ b/src/main/resources/data/ironchest/recipes/upgrades/silver_to_gold_chest_upgrade.json @@ -0,0 +1,73 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "MGM", + "GSG", + "MGM" + ], + "key": { + "M": { + "tag": "forge:ingots/gold" + }, + "S": { + "tag": "forge:ingots/silver" + }, + "G": [ + { + "item": "minecraft:glass" + }, + { + "item": "minecraft:white_stained_glass" + }, + { + "item": "minecraft:orange_stained_glass" + }, + { + "item": "minecraft:magenta_stained_glass" + }, + { + "item": "minecraft:light_blue_stained_glass" + }, + { + "item": "minecraft:yellow_stained_glass" + }, + { + "item": "minecraft:lime_stained_glass" + }, + { + "item": "minecraft:pink_stained_glass" + }, + { + "item": "minecraft:gray_stained_glass" + }, + { + "item": "minecraft:light_gray_stained_glass" + }, + { + "item": "minecraft:cyan_stained_glass" + }, + { + "item": "minecraft:purple_stained_glass" + }, + { + "item": "minecraft:blue_stained_glass" + }, + { + "item": "minecraft:brown_stained_glass" + }, + { + "item": "minecraft:green_stained_glass" + }, + { + "item": "minecraft:red_stained_glass" + }, + { + "item": "minecraft:black_stained_glass" + } + ] + }, + "result": { + "item": "ironchest:silver_to_gold_chest_upgrade" + }, + "_comment": "replaceme with tag forge:glass when out." +} \ No newline at end of file diff --git a/src/main/resources/data/ironchest/recipes/upgrades/wood_to_copper_chest_upgrade.json b/src/main/resources/data/ironchest/recipes/upgrades/wood_to_copper_chest_upgrade.json new file mode 100644 index 00000000..0de1da39 --- /dev/null +++ b/src/main/resources/data/ironchest/recipes/upgrades/wood_to_copper_chest_upgrade.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "MMM", + "MSM", + "MMM" + ], + "key": { + "M": { + "tag": "forge:ingots/copper" + }, + "S": { + "tag": "minecraft:planks" + } + }, + "result": { + "item": "ironchest:wood_to_copper_chest_upgrade" + } +} \ No newline at end of file diff --git a/src/main/resources/data/ironchest/recipes/upgrades/wood_to_iron_chest_upgrade.json b/src/main/resources/data/ironchest/recipes/upgrades/wood_to_iron_chest_upgrade.json new file mode 100644 index 00000000..9f6d911c --- /dev/null +++ b/src/main/resources/data/ironchest/recipes/upgrades/wood_to_iron_chest_upgrade.json @@ -0,0 +1,19 @@ +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "MMM", + "MSM", + "MMM" + ], + "key": { + "M": { + "tag": "forge:ingots/iron" + }, + "S": { + "tag": "minecraft:planks" + } + }, + "result": { + "item": "ironchest:wood_to_iron_chest_upgrade" + } +} \ No newline at end of file diff --git a/src/main/resources/itemsheet.xcf b/src/main/resources/itemsheet.xcf deleted file mode 100755 index 47073b83..00000000 Binary files a/src/main/resources/itemsheet.xcf and /dev/null differ diff --git a/src/main/resources/mcmod.info b/src/main/resources/mcmod.info deleted file mode 100755 index c2a7c0a6..00000000 --- a/src/main/resources/mcmod.info +++ /dev/null @@ -1,21 +0,0 @@ -[ -{ - "modid": "IronChest", - "name": "Iron Chest", - "description": "New chests with larger sizes, with in-place upgrade items.\nThe feature chest is the crystal chest, which is transparent - some inventory contents are visible without opening the chest", - "version": "${version}", - "mcversion": "${mcversion}", - "url": "http://www.minecraftforum.net/topic/981855-", - "updateUrl": "", - "authors": [ - "cpw" - ], - "credits": "By cpw, based on an original idea by Lishid", - "logoFile": "", - "screenshots": [ - ], - "parent":"", - "dependencies": [ - ] -} -] diff --git a/src/main/resources/pack.mcmeta b/src/main/resources/pack.mcmeta new file mode 100644 index 00000000..c1275b65 --- /dev/null +++ b/src/main/resources/pack.mcmeta @@ -0,0 +1,7 @@ +{ + "pack": { + "description": "Iron Chests Resources", + "pack_format": 5, + "_comment": "A pack_format of 5 requires json lang files. Note: we require v5 pack meta for all mods." + } +} \ No newline at end of file diff --git a/src/main/resources/texturesheet.xcf b/src/main/resources/texturesheet.xcf deleted file mode 100755 index a0730b0b..00000000 Binary files a/src/main/resources/texturesheet.xcf and /dev/null differ