From f3399c42e2a119ca3bf9351b33bc325a7ab9ce39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roger=20D=C3=ADaz=20Vi=C3=B1olas?= Date: Mon, 13 Aug 2018 19:00:11 +0200 Subject: [PATCH] Initial work upload --- .gitignore | 26 + Minecraft Forge License.txt | 483 ++++++++++++++++++ Paulscode IBXM Library License.txt | 10 + Paulscode SoundSystem CodecIBXM License.txt | 40 ++ build.gradle | 95 ++++ gradle.properties | 3 + gradlew | 164 ++++++ gradlew.bat | 90 ++++ .../com/rdvdev2/TimeTravelMod/Configs.java | 11 + .../com/rdvdev2/TimeTravelMod/ModBlocks.java | 88 ++++ .../rdvdev2/TimeTravelMod/ModDimensions.java | 20 + .../com/rdvdev2/TimeTravelMod/ModItems.java | 55 ++ .../com/rdvdev2/TimeTravelMod/ModRecipes.java | 11 + .../rdvdev2/TimeTravelMod/TimeTravelMod.java | 35 ++ .../client/creativetabs/tabTTM.java | 23 + .../common/block/BlockTimeCrystalOre.java | 26 + .../block/BlockTimeMachineBasicBlock.java | 34 ++ .../block/BlockTimeMachineControlPanel.java | 136 +++++ .../common/block/BlockTimeMachineCore.java | 20 + .../dimension/ChunkGeneratorOldWest.java | 119 +++++ .../dimension/ITeleporterTimeMachine.java | 118 +++++ .../dimension/NormalTerrainGenerator.java | 239 +++++++++ .../dimension/WorldProviderOldWest.java | 66 +++ .../common/item/ItemControllerCircuit.java | 17 + .../common/item/ItemTimeCrystal.java | 17 + .../TimeTravelMod/common/worldgen/OreGen.java | 50 ++ .../blockstates/timecrystalore.json | 7 + .../blockstates/timemachinebasicblock.json | 7 + .../blockstates/timemachinecontrolpanel.json | 7 + .../blockstates/timemachinecore.json | 7 + .../assets/timetravelmod/lang/ca_es.lang | 10 + .../assets/timetravelmod/lang/en_us.lang | 10 + .../assets/timetravelmod/lang/es_es.lang | 10 + .../models/block/timecrystalore.json | 6 + .../models/block/timemachinebasicblock.json | 6 + .../models/block/timemachinecontrolpanel.json | 8 + .../models/block/timemachinecore.json | 12 + .../models/item/controllercircuit.json | 19 + .../models/item/timecrystal.json | 19 + .../models/item/timecrystalore.json | 3 + .../models/item/timemachinebasicblock.json | 3 + .../models/item/timemachinecontrolpanel.json | 3 + .../models/item/timemachinecore.json | 3 + .../recipes/controllercircuit.json | 43 ++ .../recipes/controllercircuit_b.json | 43 ++ .../recipes/timemachinebasicblock.json | 26 + .../recipes/timemachinecontrolpanel.json | 17 + .../recipes/timemachinecore.json | 17 + .../textures/blocks/reinforcedheavyblock.png | Bin 0 -> 422 bytes .../textures/blocks/timecrystalore.png | Bin 0 -> 336 bytes .../textures/blocks/timemachine.png | Bin 0 -> 427 bytes .../blocks/timemachinecontrolpanel.png | Bin 0 -> 411 bytes .../textures/blocks/timemachinecore.png | Bin 0 -> 566 bytes .../textures/blocks/timemachineio.png | Bin 0 -> 568 bytes .../textures/items/controllercircuit.png | Bin 0 -> 285 bytes .../textures/items/timecrystal.png | Bin 0 -> 336 bytes src/main/resources/mcmod.info | 16 + src/main/resources/pack.mcmeta | 6 + version.properties | 5 + 59 files changed, 2309 insertions(+) create mode 100644 .gitignore create mode 100644 Minecraft Forge License.txt create mode 100644 Paulscode IBXM Library License.txt create mode 100644 Paulscode SoundSystem CodecIBXM License.txt create mode 100644 build.gradle create mode 100644 gradle.properties create mode 100644 gradlew create mode 100644 gradlew.bat create mode 100644 src/main/java/com/rdvdev2/TimeTravelMod/Configs.java create mode 100644 src/main/java/com/rdvdev2/TimeTravelMod/ModBlocks.java create mode 100644 src/main/java/com/rdvdev2/TimeTravelMod/ModDimensions.java create mode 100644 src/main/java/com/rdvdev2/TimeTravelMod/ModItems.java create mode 100644 src/main/java/com/rdvdev2/TimeTravelMod/ModRecipes.java create mode 100644 src/main/java/com/rdvdev2/TimeTravelMod/TimeTravelMod.java create mode 100644 src/main/java/com/rdvdev2/TimeTravelMod/client/creativetabs/tabTTM.java create mode 100644 src/main/java/com/rdvdev2/TimeTravelMod/common/block/BlockTimeCrystalOre.java create mode 100644 src/main/java/com/rdvdev2/TimeTravelMod/common/block/BlockTimeMachineBasicBlock.java create mode 100644 src/main/java/com/rdvdev2/TimeTravelMod/common/block/BlockTimeMachineControlPanel.java create mode 100644 src/main/java/com/rdvdev2/TimeTravelMod/common/block/BlockTimeMachineCore.java create mode 100644 src/main/java/com/rdvdev2/TimeTravelMod/common/dimension/ChunkGeneratorOldWest.java create mode 100644 src/main/java/com/rdvdev2/TimeTravelMod/common/dimension/ITeleporterTimeMachine.java create mode 100644 src/main/java/com/rdvdev2/TimeTravelMod/common/dimension/NormalTerrainGenerator.java create mode 100644 src/main/java/com/rdvdev2/TimeTravelMod/common/dimension/WorldProviderOldWest.java create mode 100644 src/main/java/com/rdvdev2/TimeTravelMod/common/item/ItemControllerCircuit.java create mode 100644 src/main/java/com/rdvdev2/TimeTravelMod/common/item/ItemTimeCrystal.java create mode 100644 src/main/java/com/rdvdev2/TimeTravelMod/common/worldgen/OreGen.java create mode 100644 src/main/resources/assets/timetravelmod/blockstates/timecrystalore.json create mode 100644 src/main/resources/assets/timetravelmod/blockstates/timemachinebasicblock.json create mode 100644 src/main/resources/assets/timetravelmod/blockstates/timemachinecontrolpanel.json create mode 100644 src/main/resources/assets/timetravelmod/blockstates/timemachinecore.json create mode 100644 src/main/resources/assets/timetravelmod/lang/ca_es.lang create mode 100644 src/main/resources/assets/timetravelmod/lang/en_us.lang create mode 100644 src/main/resources/assets/timetravelmod/lang/es_es.lang create mode 100644 src/main/resources/assets/timetravelmod/models/block/timecrystalore.json create mode 100644 src/main/resources/assets/timetravelmod/models/block/timemachinebasicblock.json create mode 100644 src/main/resources/assets/timetravelmod/models/block/timemachinecontrolpanel.json create mode 100644 src/main/resources/assets/timetravelmod/models/block/timemachinecore.json create mode 100644 src/main/resources/assets/timetravelmod/models/item/controllercircuit.json create mode 100644 src/main/resources/assets/timetravelmod/models/item/timecrystal.json create mode 100644 src/main/resources/assets/timetravelmod/models/item/timecrystalore.json create mode 100644 src/main/resources/assets/timetravelmod/models/item/timemachinebasicblock.json create mode 100644 src/main/resources/assets/timetravelmod/models/item/timemachinecontrolpanel.json create mode 100644 src/main/resources/assets/timetravelmod/models/item/timemachinecore.json create mode 100644 src/main/resources/assets/timetravelmod/recipes/controllercircuit.json create mode 100644 src/main/resources/assets/timetravelmod/recipes/controllercircuit_b.json create mode 100644 src/main/resources/assets/timetravelmod/recipes/timemachinebasicblock.json create mode 100644 src/main/resources/assets/timetravelmod/recipes/timemachinecontrolpanel.json create mode 100644 src/main/resources/assets/timetravelmod/recipes/timemachinecore.json create mode 100644 src/main/resources/assets/timetravelmod/textures/blocks/reinforcedheavyblock.png create mode 100644 src/main/resources/assets/timetravelmod/textures/blocks/timecrystalore.png create mode 100644 src/main/resources/assets/timetravelmod/textures/blocks/timemachine.png create mode 100644 src/main/resources/assets/timetravelmod/textures/blocks/timemachinecontrolpanel.png create mode 100644 src/main/resources/assets/timetravelmod/textures/blocks/timemachinecore.png create mode 100644 src/main/resources/assets/timetravelmod/textures/blocks/timemachineio.png create mode 100644 src/main/resources/assets/timetravelmod/textures/items/controllercircuit.png create mode 100644 src/main/resources/assets/timetravelmod/textures/items/timecrystal.png create mode 100644 src/main/resources/mcmod.info create mode 100644 src/main/resources/pack.mcmeta create mode 100644 version.properties diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..522d536d --- /dev/null +++ b/.gitignore @@ -0,0 +1,26 @@ +# eclipse +bin +*.launch +.settings +.metadata +.classpath +.project + +# idea +out +*.ipr +*.iws +*.iml +.idea + +# gradle +build +gradle +.gradle + +# avoid PR to overwrite version data +version.properties + +# other +eclipse +run \ No newline at end of file diff --git a/Minecraft Forge License.txt b/Minecraft Forge License.txt new file mode 100644 index 00000000..be2c9e66 --- /dev/null +++ b/Minecraft Forge License.txt @@ -0,0 +1,483 @@ +Minecraft Forge is licensed under the terms of the LGPL 2.1 found +here http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt and copied +below. + +A note on authorship: +All source artifacts are property of their original author, with +the exclusion of the contents of the patches directory and others +copied from it from time to time. Authorship of the contents of +the patches directory is retained by the Minecraft Forge project. +This is because the patches are partially machine generated +artifacts, and are changed heavily due to the way forge works. +Individual attribution within them is impossible. + +Consent: +All contributions to Forge must consent to the release of any +patch content to the Forge project. + +A note on infectivity: +The LGPL is chosen specifically so that projects may depend on Forge +features without being infected with its license. That is the +purpose of the LGPL. Mods and others using this code via ordinary +Java mechanics for referencing libraries are specifically not bound +by Forge's license for the Mod code. + + + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +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 this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +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 +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser 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 Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "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 +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY 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 +LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS diff --git a/Paulscode IBXM Library License.txt b/Paulscode IBXM Library License.txt new file mode 100644 index 00000000..d4884b07 --- /dev/null +++ b/Paulscode IBXM Library License.txt @@ -0,0 +1,10 @@ +IBXM is copyright (c) 2007, Martin Cameron, and is licensed under the BSD License. +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +Neither the name of mumart nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + diff --git a/Paulscode SoundSystem CodecIBXM License.txt b/Paulscode SoundSystem CodecIBXM License.txt new file mode 100644 index 00000000..a68a4947 --- /dev/null +++ b/Paulscode SoundSystem CodecIBXM License.txt @@ -0,0 +1,40 @@ +SoundSystem CodecIBXM Class License: + +You are free to use this class for any purpose, commercial or otherwise. +You may modify this class or source code, and distribute it any way you +like, provided the following conditions are met: + +1) You may not falsely claim to be the author of this class or any + unmodified portion of it. +2) You may not copyright this class or a modified version of it and then + sue me for copyright infringement. +3) If you modify the source code, you must clearly document the changes + made before redistributing the modified source code, so other users know + it is not the original code. +4) You are not required to give me credit for this class in any derived + work, but if you do, you must also mention my website: + http://www.paulscode.com +5) I the author will not be responsible for any damages (physical, + financial, or otherwise) caused by the use if this class or any + portion of it. +6) I the author do not guarantee, warrant, or make any representations, + either expressed or implied, regarding the use of this class or any + portion of it. + +Author: Paul Lamb +http://www.paulscode.com + + +This software is based on or using the IBXM library available from +http://www.geocities.com/sunet2000/ + + +IBXM is copyright (c) 2007, Martin Cameron, and is licensed under the BSD License. +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. +Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. +Neither the name of mumart nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/build.gradle b/build.gradle new file mode 100644 index 00000000..197e5d81 --- /dev/null +++ b/build.gradle @@ -0,0 +1,95 @@ +buildscript { + repositories { + jcenter() + maven { url = "http://files.minecraftforge.net/maven" } + } + dependencies { + classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT' + } +} +apply plugin: 'net.minecraftforge.gradle.forge' +//Only edit below this line, the above code adds and enables the necessary things for Forge to be setup. + + +version = "1.12.2-0.0.1.0" +group = "com.rdvdev2.TimeTravelMod" // http://maven.apache.org/guides/mini/guide-naming-conventions.html +archivesBaseName = "TimeTravelMod" + +sourceCompatibility = targetCompatibility = '1.8' // Need this here so eclipse task generates correctly. +compileJava { + sourceCompatibility = targetCompatibility = '1.8' +} + +minecraft { + + version = "1.12.2-14.23.4.2705" + runDir = "run" + + // the mappings can be changed at any time, and must be in the following format. + // snapshot_YYYYMMDD snapshot are built nightly. + // stable_# stables are built at the discretion of the MCP team. + // Use non-default mappings at your own risk. they may not always work. + // simply re-run your setup task after changing the mappings to update your workspace. + mappings = "snapshot_20171003" + // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable. +} + +dependencies { + // you may put jars on which you depend on in ./libs + // or you may define them like so.. + //compile "some.group:artifact:version:classifier" + //compile "some.group:artifact:version" + + // real examples + //compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env + //compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env + + // the 'provided' configuration is for optional dependencies that exist at compile-time but might not at runtime. + //provided 'com.mod-buildcraft:buildcraft:6.0.8:dev' + + // the deobf configurations: 'deobfCompile' and 'deobfProvided' are the same as the normal compile and provided, + // except that these dependencies get remapped to your current MCP mappings + //deobfCompile 'com.mod-buildcraft:buildcraft:6.0.8:dev' + //deobfProvided 'com.mod-buildcraft:buildcraft:6.0.8:dev' + + // for more info... + // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html + // http://www.gradle.org/docs/current/userguide/dependency_management.html + +} + +processResources { + def versionPropsFile = file('version.properties') + + if (versionPropsFile.canRead()) { + def Properties versionProps = new Properties() + + versionProps.load(new FileInputStream(versionPropsFile)) + + def majormod = versionProps['MAJORMOD'] + def majorapi = versionProps['MAJORAPI'] + def minor = versionProps['MINOR'] + def patch = versionProps['PATCH'].toInteger() + 1 + + versionProps['PATCH'] = patch.toString() + versionProps.store(versionPropsFile.newWriter(), null) + + project.version = project.minecraft.version.toString() + "-" + majormod + "." + majorapi + "." + minor + "." + patch.toString() + } + // this will ensure that this task is redone when the versions change. + inputs.property "version", project.version + inputs.property "mcversion", project.minecraft.version + + // replace stuff in mcmod.info, nothing else + from(sourceSets.main.resources.srcDirs) { + include 'mcmod.info' + + // replace version and mcversion + expand 'version':project.version, 'mcversion':project.minecraft.version + } + + // copy everything else except the mcmod.info + from(sourceSets.main.resources.srcDirs) { + exclude 'mcmod.info' + } +} \ No newline at end of file diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 00000000..e9b9fd5a --- /dev/null +++ b/gradle.properties @@ -0,0 +1,3 @@ +# 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 diff --git a/gradlew b/gradlew new file mode 100644 index 00000000..91a7e269 --- /dev/null +++ b/gradlew @@ -0,0 +1,164 @@ +#!/usr/bin/env bash + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn ( ) { + echo "$*" +} + +die ( ) { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=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. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules +function splitJvmOpts() { + JVM_OPTS=("$@") +} +eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS +JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" + +exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 00000000..8a0b282a --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,90 @@ +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +@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 Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windowz 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. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +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 + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/Configs.java b/src/main/java/com/rdvdev2/TimeTravelMod/Configs.java new file mode 100644 index 00000000..a115511d --- /dev/null +++ b/src/main/java/com/rdvdev2/TimeTravelMod/Configs.java @@ -0,0 +1,11 @@ +package com.rdvdev2.TimeTravelMod; + +import net.minecraftforge.common.config.Config; + +@Config(modid = "timetravelmod", name = "TTM") +public class Configs { + @Config.Name("Enable unimplemented blocks") + @Config.Comment("If changed to true, all blocks in development will be added, even if they have no recipe or function.") + @Config.RequiresMcRestart + public static boolean unimplementedBlocks = false; +} diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/ModBlocks.java b/src/main/java/com/rdvdev2/TimeTravelMod/ModBlocks.java new file mode 100644 index 00000000..9f8bb48e --- /dev/null +++ b/src/main/java/com/rdvdev2/TimeTravelMod/ModBlocks.java @@ -0,0 +1,88 @@ +package com.rdvdev2.TimeTravelMod; + +import com.rdvdev2.TimeTravelMod.common.block.BlockTimeCrystalOre; +import com.rdvdev2.TimeTravelMod.common.block.BlockTimeMachineBasicBlock; +import com.rdvdev2.TimeTravelMod.common.block.BlockTimeMachineControlPanel; +import com.rdvdev2.TimeTravelMod.common.block.BlockTimeMachineCore; +import net.minecraft.block.Block; +import net.minecraft.client.renderer.block.model.ModelResourceLocation; +import net.minecraft.item.Item; +import net.minecraft.item.ItemBlock; +import net.minecraftforge.client.event.ModelRegistryEvent; +import net.minecraftforge.client.model.ModelLoader; +import net.minecraftforge.event.RegistryEvent; +import net.minecraftforge.fml.common.Mod; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; + +@Mod.EventBusSubscriber(modid = "timetravelmod") +public class ModBlocks { + + public static Block timeCrystalOre; + public static Block timeMachineBasicBlock; + public static Block timeMachineCore; + public static Block timeMachineControlPanel; + + public static void init() { + timeCrystalOre = new BlockTimeCrystalOre(); + if (Configs.unimplementedBlocks) { + timeMachineBasicBlock = new BlockTimeMachineBasicBlock().setNames(); + timeMachineCore = new BlockTimeMachineCore().setNames(); + timeMachineControlPanel = new BlockTimeMachineControlPanel().setNames(); + } + } + + @SubscribeEvent + public static void registerBlocks(RegistryEvent.Register event) { + event.getRegistry().registerAll( + timeCrystalOre + ); + if (Configs.unimplementedBlocks) { + event.getRegistry().registerAll( + timeMachineBasicBlock, + timeMachineCore, + timeMachineControlPanel + ); + } + } + + @SubscribeEvent + public static void registerItemBlocks(RegistryEvent.Register event) { + registerItemBlock(event, + timeCrystalOre + ); + if (Configs.unimplementedBlocks) { + registerItemBlock(event, + timeMachineBasicBlock, + timeMachineCore, + timeMachineControlPanel + ); + } + } + + private static void registerItemBlock(RegistryEvent.Register event, Block... blocks) { + for (int i = 0; i < blocks.length; i++) { + event.getRegistry().register(new ItemBlock(blocks[i]).setRegistryName(blocks[i].getRegistryName())); + } + } + + @SubscribeEvent + public static void registerRenders(ModelRegistryEvent event) { + registerRender( + timeCrystalOre + ); + if (Configs.unimplementedBlocks) { + registerRender( + timeMachineBasicBlock, + timeMachineCore, + timeMachineControlPanel + ); + } + } + + private static void registerRender(Block... blocks) { + for (int i = 0; i < blocks.length; i++) { + Item item = Item.getItemFromBlock(blocks[i]); + ModelLoader.setCustomModelResourceLocation(item, 0, new ModelResourceLocation(item.getRegistryName(), "inventory")); + } + } +} diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/ModDimensions.java b/src/main/java/com/rdvdev2/TimeTravelMod/ModDimensions.java new file mode 100644 index 00000000..e1777917 --- /dev/null +++ b/src/main/java/com/rdvdev2/TimeTravelMod/ModDimensions.java @@ -0,0 +1,20 @@ +package com.rdvdev2.TimeTravelMod; + +import com.rdvdev2.TimeTravelMod.common.dimension.WorldProviderOldWest; +import net.minecraft.world.DimensionType; +import net.minecraftforge.common.DimensionManager; + +public class ModDimensions { + + public static final int OldWestId = WorldProviderOldWest.dimId; + public static final DimensionType OLD_WEST = DimensionType.register("OLDWEST", "_oldwest", OldWestId, WorldProviderOldWest.class, false); + + public static void init() { + registerDimensions(); + } + + private static void registerDimensions() { + DimensionManager.registerDimension(OldWestId, OLD_WEST); + + } +} diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/ModItems.java b/src/main/java/com/rdvdev2/TimeTravelMod/ModItems.java new file mode 100644 index 00000000..edc49550 --- /dev/null +++ b/src/main/java/com/rdvdev2/TimeTravelMod/ModItems.java @@ -0,0 +1,55 @@ +package com.rdvdev2.TimeTravelMod; + +import com.rdvdev2.TimeTravelMod.common.item.ItemControllerCircuit; +import com.rdvdev2.TimeTravelMod.common.item.ItemTimeCrystal; +import net.minecraft.client.renderer.block.model.ModelResourceLocation; +import net.minecraft.item.Item; +import net.minecraftforge.client.event.ModelRegistryEvent; +import net.minecraftforge.client.model.ModelLoader; +import net.minecraftforge.event.RegistryEvent; +import net.minecraftforge.fml.common.Mod; +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; + +@Mod.EventBusSubscriber(modid="timetravelmod") +public class ModItems { + + public static Item timeCrystal; + public static Item controllerCircuit; + + public static void init() { + timeCrystal = new ItemTimeCrystal(); + if (Configs.unimplementedBlocks) { + controllerCircuit = new ItemControllerCircuit(); + } + } + + @SubscribeEvent + public static void registerItems(RegistryEvent.Register event) { + event.getRegistry().registerAll( + timeCrystal + ); + if (Configs.unimplementedBlocks) { + event.getRegistry().registerAll( + controllerCircuit + ); + } + } + + @SubscribeEvent + public static void registerRenders(ModelRegistryEvent event) { + registerRender( + timeCrystal + ); + if (Configs.unimplementedBlocks) { + registerRender( + controllerCircuit + ); + } + } + + private static void registerRender(Item... item) { + for (int i = 0; i < item.length; i++) { + ModelLoader.setCustomModelResourceLocation(item[i], 0, new ModelResourceLocation(item[i].getRegistryName(), "inventory")); + } + } +} diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/ModRecipes.java b/src/main/java/com/rdvdev2/TimeTravelMod/ModRecipes.java new file mode 100644 index 00000000..b877617c --- /dev/null +++ b/src/main/java/com/rdvdev2/TimeTravelMod/ModRecipes.java @@ -0,0 +1,11 @@ +package com.rdvdev2.TimeTravelMod; + +import net.minecraft.item.ItemStack; +import net.minecraftforge.fml.common.registry.GameRegistry; + +public class ModRecipes { + + public static void init() { + GameRegistry.addSmelting(ModBlocks.timeCrystalOre, new ItemStack(ModItems.timeCrystal, 1), 3.0f); + } +} diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/TimeTravelMod.java b/src/main/java/com/rdvdev2/TimeTravelMod/TimeTravelMod.java new file mode 100644 index 00000000..9de725a6 --- /dev/null +++ b/src/main/java/com/rdvdev2/TimeTravelMod/TimeTravelMod.java @@ -0,0 +1,35 @@ +package com.rdvdev2.TimeTravelMod; + +import com.rdvdev2.TimeTravelMod.client.creativetabs.tabTTM; +import com.rdvdev2.TimeTravelMod.common.worldgen.OreGen; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraftforge.fml.common.Mod; +import net.minecraftforge.fml.common.Mod.EventHandler; +import net.minecraftforge.fml.common.event.FMLInitializationEvent; +import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; +import net.minecraftforge.fml.common.registry.GameRegistry; +import org.apache.logging.log4j.Logger; + +@Mod(modid = "timetravelmod", useMetadata = true) +public class TimeTravelMod { + + public static Logger logger; + + public static CreativeTabs tabTTM = new tabTTM(CreativeTabs.getNextID()); + + @EventHandler + public void preInit(FMLPreInitializationEvent event){ + logger = event.getModLog(); + logger.info("Time Travel Mod is in preinit state."); + ModBlocks.init(); + ModItems.init(); + } + + @EventHandler + public void init(FMLInitializationEvent event) { + logger.info("Time Travel Mod is in init state."); + GameRegistry.registerWorldGenerator(new OreGen(), 3); + ModDimensions.init(); + ModRecipes.init(); + } +} diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/client/creativetabs/tabTTM.java b/src/main/java/com/rdvdev2/TimeTravelMod/client/creativetabs/tabTTM.java new file mode 100644 index 00000000..d9b9a6ec --- /dev/null +++ b/src/main/java/com/rdvdev2/TimeTravelMod/client/creativetabs/tabTTM.java @@ -0,0 +1,23 @@ +package com.rdvdev2.TimeTravelMod.client.creativetabs; + +import com.rdvdev2.TimeTravelMod.ModItems; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fml.relauncher.Side; +import net.minecraftforge.fml.relauncher.SideOnly; + +public class tabTTM extends CreativeTabs { + public tabTTM(int id){ + super(id, "Time Travel Mod"); + } + + @Override + @SideOnly(Side.CLIENT) + public ItemStack getTabIconItem(){ + return new ItemStack(ModItems.timeCrystal); + } + + public String getTranslatedTabLabel() { + return "Time Travel Mod"; + } +} diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/common/block/BlockTimeCrystalOre.java b/src/main/java/com/rdvdev2/TimeTravelMod/common/block/BlockTimeCrystalOre.java new file mode 100644 index 00000000..38373f91 --- /dev/null +++ b/src/main/java/com/rdvdev2/TimeTravelMod/common/block/BlockTimeCrystalOre.java @@ -0,0 +1,26 @@ +package com.rdvdev2.TimeTravelMod.common.block; + +import com.rdvdev2.TimeTravelMod.TimeTravelMod; +import net.minecraft.block.Block; +import net.minecraft.block.SoundType; +import net.minecraft.block.material.Material; + +public class BlockTimeCrystalOre extends Block { + + String name = "timecrystalore"; + + public BlockTimeCrystalOre() { + super(Material.ROCK); + setSoundType(SoundType.STONE); + setHardness(5f); + setLightLevel (5 / 16f); + setLightOpacity(15); + setUnlocalizedName(name); + setCreativeTab(TimeTravelMod.tabTTM); + setRegistryName(name); + setHarvestLevel("pickaxe", 3); + + } + + +} diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/common/block/BlockTimeMachineBasicBlock.java b/src/main/java/com/rdvdev2/TimeTravelMod/common/block/BlockTimeMachineBasicBlock.java new file mode 100644 index 00000000..2b8c536d --- /dev/null +++ b/src/main/java/com/rdvdev2/TimeTravelMod/common/block/BlockTimeMachineBasicBlock.java @@ -0,0 +1,34 @@ +package com.rdvdev2.TimeTravelMod.common.block; + +import com.rdvdev2.TimeTravelMod.TimeTravelMod; +import jline.internal.Nullable; +import net.minecraft.block.Block; +import net.minecraft.block.SoundType; +import net.minecraft.block.material.Material; +import net.minecraft.block.state.IBlockState; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.EnumHand; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; + +public class BlockTimeMachineBasicBlock extends Block { + + public BlockTimeMachineBasicBlock() { + super(Material.IRON); + setSoundType(SoundType.METAL); + setHardness(3f); + setLightLevel (0 / 16f); + setLightOpacity(15); + setCreativeTab(TimeTravelMod.tabTTM); + setHarvestLevel("pickaxe", 2); + } + + public Block setNames() { + String name = "timemachinebasicblock"; + setUnlocalizedName(name); + setRegistryName(name); + return this; + } +} diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/common/block/BlockTimeMachineControlPanel.java b/src/main/java/com/rdvdev2/TimeTravelMod/common/block/BlockTimeMachineControlPanel.java new file mode 100644 index 00000000..eb9d8144 --- /dev/null +++ b/src/main/java/com/rdvdev2/TimeTravelMod/common/block/BlockTimeMachineControlPanel.java @@ -0,0 +1,136 @@ +package com.rdvdev2.TimeTravelMod.common.block; + +import com.rdvdev2.TimeTravelMod.ModBlocks; +import com.rdvdev2.TimeTravelMod.ModDimensions; +import com.rdvdev2.TimeTravelMod.TimeTravelMod; +import com.rdvdev2.TimeTravelMod.common.dimension.ITeleporterTimeMachine; +import net.minecraft.block.Block; +import net.minecraft.block.state.IBlockState; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.EnumHand; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; + +public class BlockTimeMachineControlPanel extends BlockTimeMachineBasicBlock{ + public BlockTimeMachineControlPanel() { + super(); + } + + public Block setNames() { + String name = "timemachinecontrolpanel"; + setUnlocalizedName(name); + setRegistryName(name); + return this; + } + + @Override + public boolean onBlockActivated(World worldIn, + BlockPos pos, + IBlockState state, + EntityPlayer playerIn, + EnumHand hand, + EnumFacing side, + float hitX, + float hitY, + float hitZ) { + + TimeTravelMod.logger.info(playerIn.getName() + " clicked a Time Machine Control Panel facing " + side.getName()); + + + BlockPos corePos = null; + int basicTMCoord[][] = null; + int airCoord[][] = null; + BlockPos doorPos; + boolean error = false; + + switch (side.getName()) { + case "north": + corePos = new BlockPos(0, -2, -1); + basicTMCoord = new int[][]{ + {-1, -2, 0}, {-1, -2, -1}, {-1, -2, -2}, {0, -2, 0}, {0, -2, -2}, + {1, -2, 0}, {1, -2, -1}, {1, -2, -2}, {-1, -1, 0}, {-1, -1, -1}, + {-1, -1, -2}, {0, -1, 0}, {1, -1, 0}, {1, -1, -1}, {1, -1, -2}, + {-1, 0, 0}, {-1, 0, -1}, {-1, 0, -2}, {1, 0, 0}, {1, 0, -1}, + {1, 0, -2}, {-1, 1, 0}, {-1, 1, -1}, {-1, 1, -2}, {0, 1, 0}, + {0, 1, -1}, {0, 1, -2}, {1, 1, 0}, {1, 1, -1}, {1, 1, -2} + }; + airCoord = new int[][]{{0, -1, -1}, {0, -1, -2}, {0, 0, -1}, {0, 0, -2}}; + break; + case "south": + corePos = new BlockPos(0,-2,1); + basicTMCoord = new int[][]{ + {-1, -2, 0}, {-1, -2, 1}, {-1, -2, 2}, {0, -2, 0}, {0, -2, 2}, + {1, -2, 0}, {1, -2, 1}, {1, -2, 2}, {-1, -1, 0}, {-1, -1, 1}, + {-1, -1, 2}, {0, -1, 0}, {1, -1, 0}, {1, -1, 1}, {1, -1, 2}, + {-1, 0, 0}, {-1, 0, 1}, {-1, 0, 2}, {1, 0, 0}, {1, 0, 1}, + {1, 0, 2}, {-1, 1, 0}, {-1, 1, 1}, {-1, 1, 2}, {0, 1, 0}, + {0, 1, 1}, {0, 1, 2}, {1, 1, 0}, {1, 1, 1}, {1, 1, 2} + }; + airCoord = new int[][]{{0, -1, 1}, {0, -1, 2}, {0, 0, 1}, {0, 0, 2}}; + break; + case "east": + corePos = new BlockPos(1, -2, 0); + basicTMCoord = new int[][]{ + {0, -2, -1}, {1, -2, -1}, {2, -2, -1}, {0, -2, 0}, {2, -2, 0}, + {0, -2, 1}, {1, -2, 1}, {2, -2, 1}, {0, -1, -1}, {1, -1, -1}, + {2, -1, -1}, {0, -1, 0}, {0, -1, 1}, {1, -1, 1}, {2, -1, 1}, + {0, 0, -1}, {1, 0, -1}, {2, 0, -1}, {0, 0, 1}, {1, 0, 1}, + {2, 0, 1}, {0, 1, -1}, {1, 1, -1}, {2, 1, -1}, {0, 1, 0}, + {1, 1, 0}, {2, 1, 0}, {0, 1, 1}, {1, 1, 1}, {2, 1, 1} + }; + airCoord = new int[][]{{1, -1, 0}, {2, -1, 0}, {1, 0, 0}, {2, 0, 0}}; + break; + case "west": + corePos = new BlockPos(-1, -2,0); + basicTMCoord = new int[][]{ + {0, -2, -1}, {-1, -2, -1}, {-2, -2, -1}, {0, -2, 0}, {-2, -2, 0}, + {0, -2, 1}, {-1, -2, 1}, {-2, -2, 1}, {0, -1, -1}, {-1, -1, -1}, + {-2, -1, -1}, {0, -1, 0}, {0, -1, 1}, {-1, -1, 1}, {-2, -1, 1}, + {0, 0, -1}, {-1, 0, -1}, {-2, 0, -1}, {0, 0, 1}, {-1, 0, 1}, + {-2, 0, 1}, {0, 1, -1}, {-1, 1, -1}, {-2, 1, -1}, {0, 1, 0}, + {-1, 1, 0}, {-2, 1, 0}, {0, 1, 1}, {-1, 1, 1}, {-2, 1, 1} + }; + airCoord = new int[][]{{-1, -1, 0}, {-2, -1, 0}, {-1, 0, 0}, {-2, 0, 0}}; + break; + default: + error = true; + } + + if (!error) { + if (worldIn.getBlockState(pos.add(corePos)) == ModBlocks.timeMachineCore.getDefaultState()) { + TimeTravelMod.logger.info("There is a TM Core in the right place."); + for (int i = 0; i < basicTMCoord.length; i++) { + if (worldIn.getBlockState(pos.add(basicTMCoord[i][0], basicTMCoord[i][1], basicTMCoord[i][2])) != ModBlocks.timeMachineBasicBlock.getDefaultState()) { + error = true; + break; + } + } + if (!error) { + TimeTravelMod.logger.info("The TM case is OK"); + int travelTo; + + switch (playerIn.dimension) { + case 0: + travelTo = ModDimensions.OldWestId; + break; + case 20: + travelTo = 0; + break; + default: + travelTo = -1; + } + if (playerIn instanceof EntityPlayerMP && travelTo != -1) { + EntityPlayerMP mp = (EntityPlayerMP)playerIn; + mp.getServer().getPlayerList().transferPlayerToDimension(mp, travelTo, new ITeleporterTimeMachine(mp.getServer().getWorld(travelTo), mp.getServer().getWorld(mp.dimension), pos, side)); + } + // TODO: Implement a dimension selector GUI + } + } + + } + + return true; + } +} diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/common/block/BlockTimeMachineCore.java b/src/main/java/com/rdvdev2/TimeTravelMod/common/block/BlockTimeMachineCore.java new file mode 100644 index 00000000..23dd67ba --- /dev/null +++ b/src/main/java/com/rdvdev2/TimeTravelMod/common/block/BlockTimeMachineCore.java @@ -0,0 +1,20 @@ +package com.rdvdev2.TimeTravelMod.common.block; + +import net.minecraft.block.Block; + +public class BlockTimeMachineCore extends BlockTimeMachineBasicBlock { + + public BlockTimeMachineCore() { + super(); + setHarvestLevel("pickaxe", 3); + setLightLevel(5 / 16f); + setHardness(4f); + } + + public Block setNames() { + String name = "timemachinecore"; + setUnlocalizedName(name); + setRegistryName(name); + return this; + } +} diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/common/dimension/ChunkGeneratorOldWest.java b/src/main/java/com/rdvdev2/TimeTravelMod/common/dimension/ChunkGeneratorOldWest.java new file mode 100644 index 00000000..39f9a34a --- /dev/null +++ b/src/main/java/com/rdvdev2/TimeTravelMod/common/dimension/ChunkGeneratorOldWest.java @@ -0,0 +1,119 @@ +package com.rdvdev2.TimeTravelMod.common.dimension; + +import com.google.common.collect.ImmutableList; +import com.google.common.collect.Lists; +import jline.internal.Nullable; +import net.minecraft.entity.EnumCreatureType; +import net.minecraft.entity.monster.EntityZombie; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import net.minecraft.world.WorldEntitySpawner; +import net.minecraft.world.biome.Biome; +import net.minecraft.world.biome.BiomeDesert; +import net.minecraft.world.chunk.Chunk; +import net.minecraft.world.chunk.ChunkPrimer; +import net.minecraft.world.gen.IChunkGenerator; +import net.minecraft.world.gen.MapGenBase; +import net.minecraft.world.gen.MapGenCaves; +import net.minecraftforge.event.terraingen.TerrainGen; + +import java.util.List; +import java.util.Random; + +import static net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.CAVE; + +public class ChunkGeneratorOldWest implements IChunkGenerator { + + private final World worldObj; + private Random random; + private Biome[] biomesForGeneration; + + private List mobs = Lists.newArrayList(new Biome.SpawnListEntry(EntityZombie.class, 100, 2, 2)); + + private MapGenBase caveGenerator = new MapGenCaves(); + private NormalTerrainGenerator terraingen = new NormalTerrainGenerator(); + + public ChunkGeneratorOldWest(World worldObj) { + this.worldObj = worldObj; + long seed = worldObj.getSeed(); + this.random = new Random((seed + 516) * 314); + terraingen.setup(worldObj, random); + caveGenerator = TerrainGen.getModdedMapGen(caveGenerator, CAVE); + } + + @Override + public Chunk generateChunk(int x, int z) { + ChunkPrimer chunkprimer = new ChunkPrimer(); + + // Setup biomes for terraingen + this.biomesForGeneration = this.worldObj.getBiomeProvider().getBiomesForGeneration(this.biomesForGeneration, x*4-2, z*4-2, 10, 10); + terraingen.setBiomesForGeneration(biomesForGeneration); + terraingen.generate(x, z, chunkprimer); + + // Setup biomes again for actual biome decoration + this.biomesForGeneration = this.worldObj.getBiomeProvider().getBiomes(this.biomesForGeneration, x*16, z*16, 16, 16); + // This will replace stone with the biome specific stones + terraingen.replaceBiomeBlocks(x, z, chunkprimer, this, biomesForGeneration); + + // Generate caves + this.caveGenerator.generate(this.worldObj, x, z, chunkprimer); + + Chunk chunk = new Chunk(this.worldObj, chunkprimer, x, z); + + byte[] biomeArray = chunk.getBiomeArray(); + for (int i = 0; i < biomeArray.length; i++) { + biomeArray[i] = (byte)Biome.getIdForBiome(this.biomesForGeneration[i]); + } + + chunk.generateSkylightMap(); + return chunk; + } + + @Override + public void populate(int x, int z) { + int i = x*16; + int j = z*16; + BlockPos blockpos = new BlockPos(i, 0, j); + Biome biome = this.worldObj.getBiome(blockpos.add(16, 0, 16)); + + // Add biome decorations (like flowers, grass, trees, ...) + biome.decorate(this.worldObj, this.random, blockpos); + + // Make sure animals appropiate to the biome spawn here when the chunk is generated + WorldEntitySpawner.performWorldGenSpawning(this.worldObj, biome, i+8, j+8, 16, 16, this.random); + } + + @Override + public boolean generateStructures(Chunk chunkIn, int x, int z) { + return false; + } + + @Override + public List getPossibleCreatures(EnumCreatureType creatureType, BlockPos pos) { + // If you want normal creatures appropiate for this biome then uncomment the + // following two lines: + // Biome biome = this.worldObj.getBiome(pos); + // return biome.getSpawnableList(creatureType); + + if(creatureType == EnumCreatureType.MONSTER) { + return mobs; + } + return ImmutableList.of(); + } + + @Nullable + @Override + public BlockPos getNearestStructurePos(World worldIn, String structureName, BlockPos position, boolean findUnexplored) { + return null; + } + + @Override + public void recreateStructures(Chunk chunkIn, int x, int z) { + + } + + @Override + public boolean isInsideStructure(World worldIn, String structureName, BlockPos pos) { + return false; + } +} diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/common/dimension/ITeleporterTimeMachine.java b/src/main/java/com/rdvdev2/TimeTravelMod/common/dimension/ITeleporterTimeMachine.java new file mode 100644 index 00000000..c6a73c89 --- /dev/null +++ b/src/main/java/com/rdvdev2/TimeTravelMod/common/dimension/ITeleporterTimeMachine.java @@ -0,0 +1,118 @@ +package com.rdvdev2.TimeTravelMod.common.dimension; + +import com.rdvdev2.TimeTravelMod.ModBlocks; +import com.rdvdev2.TimeTravelMod.TimeTravelMod; +import net.minecraft.entity.Entity; +import net.minecraft.util.EnumFacing; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import net.minecraft.world.WorldServer; +import net.minecraft.world.chunk.Chunk; +import net.minecraftforge.common.util.ITeleporter; +import org.apache.logging.log4j.Logger; + +public class ITeleporterTimeMachine implements ITeleporter { + + protected final WorldServer worldIn; + protected final WorldServer worldOut; + private BlockPos corePos = null; + private BlockPos controlPos; + private int[][] basicTMCoord = null; + private int[][] airCoord = null; + private Logger log = TimeTravelMod.logger; + + public ITeleporterTimeMachine(WorldServer worldIn, WorldServer worldOut, BlockPos controlPos, EnumFacing facing) { + this.worldIn = worldIn; + this.worldOut = worldOut; + this.controlPos = controlPos; + switch (facing.getName()) { + case "north": + this.corePos = new BlockPos(0, -2, -1); + this.basicTMCoord = new int[][]{ + {-1, -2, 0}, {-1, -2, -1}, {-1, -2, -2}, {0, -2, 0}, {0, -2, -2}, + {1, -2, 0}, {1, -2, -1}, {1, -2, -2}, {-1, -1, 0}, {-1, -1, -1}, + {-1, -1, -2}, {0, -1, 0}, {1, -1, 0}, {1, -1, -1}, {1, -1, -2}, + {-1, 0, 0}, {-1, 0, -1}, {-1, 0, -2}, {1, 0, 0}, {1, 0, -1}, + {1, 0, -2}, {-1, 1, 0}, {-1, 1, -1}, {-1, 1, -2}, {0, 1, 0}, + {0, 1, -1}, {0, 1, -2}, {1, 1, 0}, {1, 1, -1}, {1, 1, -2} + }; + this.airCoord = new int[][]{{0, -1, -1}, {0, -1, -2}, {0, 0, -1}, {0, 0, -2}}; + break; + case "south": + this.corePos = new BlockPos(0,-2,1); + this.basicTMCoord = new int[][]{ + {-1, -2, 0}, {-1, -2, 1}, {-1, -2, 2}, {0, -2, 0}, {0, -2, 2}, + {1, -2, 0}, {1, -2, 1}, {1, -2, 2}, {-1, -1, 0}, {-1, -1, 1}, + {-1, -1, 2}, {0, -1, 0}, {1, -1, 0}, {1, -1, 1}, {1, -1, 2}, + {-1, 0, 0}, {-1, 0, 1}, {-1, 0, 2}, {1, 0, 0}, {1, 0, 1}, + {1, 0, 2}, {-1, 1, 0}, {-1, 1, 1}, {-1, 1, 2}, {0, 1, 0}, + {0, 1, 1}, {0, 1, 2}, {1, 1, 0}, {1, 1, 1}, {1, 1, 2} + }; + this.airCoord = new int[][]{{0, -1, 1}, {0, -1, 2}, {0, 0, 1}, {0, 0, 2}}; + break; + case "east": + this.corePos = new BlockPos(1, -2, 0); + this.basicTMCoord = new int[][]{ + {0, -2, -1}, {1, -2, -1}, {2, -2, -1}, {0, -2, 0}, {2, -2, 0}, + {0, -2, 1}, {1, -2, 1}, {2, -2, 1}, {0, -1, -1}, {1, -1, -1}, + {2, -1, -1}, {0, -1, 0}, {0, -1, 1}, {1, -1, 1}, {2, -1, 1}, + {0, 0, -1}, {1, 0, -1}, {2, 0, -1}, {0, 0, 1}, {1, 0, 1}, + {2, 0, 1}, {0, 1, -1}, {1, 1, -1}, {2, 1, -1}, {0, 1, 0}, + {1, 1, 0}, {2, 1, 0}, {0, 1, 1}, {1, 1, 1}, {2, 1, 1} + }; + this.airCoord = new int[][]{{1, -1, 0}, {2, -1, 0}, {1, 0, 0}, {2, 0, 0}}; + break; + case "west": + this.corePos = new BlockPos(-1, -2,0); + this.basicTMCoord = new int[][]{ + {0, -2, -1}, {-1, -2, -1}, {-2, -2, -1}, {0, -2, 0}, {-2, -2, 0}, + {0, -2, 1}, {-1, -2, 1}, {-2, -2, 1}, {0, -1, -1}, {-1, -1, -1}, + {-2, -1, -1}, {0, -1, 0}, {0, -1, 1}, {-1, -1, 1}, {-2, -1, 1}, + {0, 0, -1}, {-1, 0, -1}, {-2, 0, -1}, {0, 0, 1}, {-1, 0, 1}, + {-2, 0, 1}, {0, 1, -1}, {-1, 1, -1}, {-2, 1, -1}, {0, 1, 0}, + {-1, 1, 0}, {-2, 1, 0}, {0, 1, 1}, {-1, 1, 1}, {-2, 1, 1} + }; + this.airCoord = new int[][]{{-1, -1, 0}, {-2, -1, 0}, {-1, 0, 0}, {-2, 0, 0}}; + break; + } + } + + @Override + public void placeEntity(World world, Entity entity, float yaw) + { + log.info("Destroying old TM"); + destroyTM(); + log.info("Building new TM"); + buildTM(); + } + + private void buildTM() { + log.info("Building TM Control Panel"); + worldIn.setBlockState(controlPos, ModBlocks.timeMachineControlPanel.getDefaultState()); + log.info("Building TM Core"); + worldIn.setBlockState(controlPos.add(corePos), ModBlocks.timeMachineCore.getDefaultState()); + log.info("Building TM Basic Blocks"); + for (int i = 0; i < basicTMCoord.length; i++) { + worldIn.setBlockState(controlPos.add(basicTMCoord[i][0], basicTMCoord[i][1], basicTMCoord[i][2]), ModBlocks.timeMachineBasicBlock.getDefaultState()); + } + log.info("Building TM Internal Air"); + for (int i = 0; i < airCoord.length; i++) { + worldIn.setBlockToAir(controlPos.add(airCoord[i][0], airCoord[i][1], airCoord[i][2])); + } + } + + private void destroyTM() { + log.info("Removing TM Control Panel"); + worldOut.setBlockToAir(controlPos); + log.info("Removing TM Core"); + worldOut.setBlockToAir(controlPos.add(corePos)); + log.info("Removing TM Basic Blocks"); + for (int i = 0; i < basicTMCoord.length; i++) { + worldOut.setBlockToAir(controlPos.add(basicTMCoord[i][0], basicTMCoord[i][1], basicTMCoord[i][2])); + } + log.info("Removing TM Internal Air (Yeah, it's a little stupid this)"); + for (int i = 0; i < airCoord.length; i++) { + worldOut.setBlockToAir(controlPos.add(airCoord[i][0], airCoord[i][1], airCoord[i][2])); + } + } +} diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/common/dimension/NormalTerrainGenerator.java b/src/main/java/com/rdvdev2/TimeTravelMod/common/dimension/NormalTerrainGenerator.java new file mode 100644 index 00000000..68a0007d --- /dev/null +++ b/src/main/java/com/rdvdev2/TimeTravelMod/common/dimension/NormalTerrainGenerator.java @@ -0,0 +1,239 @@ +package com.rdvdev2.TimeTravelMod.common.dimension; + +import net.minecraft.init.Blocks; +import net.minecraft.util.math.MathHelper; +import net.minecraft.world.World; +import net.minecraft.world.biome.Biome; +import net.minecraft.world.chunk.ChunkPrimer; +import net.minecraft.world.gen.IChunkGenerator; +import net.minecraft.world.gen.NoiseGeneratorOctaves; +import net.minecraft.world.gen.NoiseGeneratorPerlin; + +import java.util.Random; + +public class NormalTerrainGenerator { + private World world; + private Random random; + + private final double[] heightMap; + private double[] mainNoiseRegion; + private double[] minLimitRegion; + private double[] maxLimitRegion; + private double[] depthRegion; + + private NoiseGeneratorOctaves minLimitPerlinNoise; + private NoiseGeneratorOctaves maxLimitPerlinNoise; + private NoiseGeneratorOctaves mainPerlinNoise; + private NoiseGeneratorPerlin surfaceNoise; + + // A NoiseGeneratorOctaves used in generating terrain + private NoiseGeneratorOctaves depthNoise; + + private final float[] biomeWeights; + private double[] depthBuffer = new double[256]; + + private Biome[] biomesForGeneration; + + public NormalTerrainGenerator() { + this.heightMap = new double[825]; + + this.biomeWeights = new float[25]; + for (int j = -2; j <= 2; ++j) { + for (int k = -2; k <= 2; ++k) { + float f = 10.0F / MathHelper.sqrt((j * j + k * k) + 0.2F); + this.biomeWeights[j + 2 + (k + 2) * 5] = f; + } + } + } + + public void setBiomesForGeneration(Biome[] biomesForGeneration) { + this.biomesForGeneration = biomesForGeneration; + } + + public void setup(World world, Random rand) { + this.world = world; + this.random = rand; + + this.minLimitPerlinNoise = new NoiseGeneratorOctaves(rand, 16); + this.maxLimitPerlinNoise = new NoiseGeneratorOctaves(rand, 16); + this.mainPerlinNoise = new NoiseGeneratorOctaves(rand, 8); + this.surfaceNoise = new NoiseGeneratorPerlin(rand, 4); + NoiseGeneratorOctaves noiseGen5 = new NoiseGeneratorOctaves(rand, 10); + this.depthNoise = new NoiseGeneratorOctaves(rand, 16); + NoiseGeneratorOctaves mobSpawnerNoise = new NoiseGeneratorOctaves(rand, 8); + + net.minecraftforge.event.terraingen.InitNoiseGensEvent.ContextOverworld ctx = + new net.minecraftforge.event.terraingen.InitNoiseGensEvent.ContextOverworld(minLimitPerlinNoise, maxLimitPerlinNoise, mainPerlinNoise, surfaceNoise, noiseGen5, depthNoise, mobSpawnerNoise); + ctx = net.minecraftforge.event.terraingen.TerrainGen.getModdedNoiseGenerators(world, rand, ctx); + this.minLimitPerlinNoise = ctx.getLPerlin1(); + this.maxLimitPerlinNoise = ctx.getLPerlin2(); + this.mainPerlinNoise = ctx.getPerlin(); + this.surfaceNoise = ctx.getHeight(); +// this.field_185983_b = ctx.getScale(); + this.depthNoise = ctx.getDepth(); +// this.field_185985_d = ctx.getForest(); + } + + + private void generateHeightmap(int chunkX4, int chunkY4, int chunkZ4) { + this.depthRegion = this.depthNoise.generateNoiseOctaves(this.depthRegion, chunkX4, chunkZ4, 5, 5, 200.0D, 200.0D, 0.5D); + this.mainNoiseRegion = this.mainPerlinNoise.generateNoiseOctaves(this.mainNoiseRegion, chunkX4, chunkY4, chunkZ4, 5, 33, 5, 8.555150000000001D, 4.277575000000001D, 8.555150000000001D); + this.minLimitRegion = this.minLimitPerlinNoise.generateNoiseOctaves(this.minLimitRegion, chunkX4, chunkY4, chunkZ4, 5, 33, 5, 684.412D, 684.412D, 684.412D); + this.maxLimitRegion = this.maxLimitPerlinNoise.generateNoiseOctaves(this.maxLimitRegion, chunkX4, chunkY4, chunkZ4, 5, 33, 5, 684.412D, 684.412D, 684.412D); + int l = 0; + int i1 = 0; + + for (int j1 = 0; j1 < 5; ++j1) { + for (int k1 = 0; k1 < 5; ++k1) { + float f = 0.0F; + float f1 = 0.0F; + float f2 = 0.0F; + byte b0 = 2; + + for (int l1 = -b0; l1 <= b0; ++l1) { + for (int i2 = -b0; i2 <= b0; ++i2) { + Biome biome = this.biomesForGeneration[j1 + 2 + (k1 + 2) * 10]; + float baseHeight = biome.getBaseHeight(); + float variation = biome.getHeightVariation(); + + float f5 = biomeWeights[l1 + 2 + (i2 + 2) * 5] / (baseHeight + 2.0F); + f += variation * f5; + f1 += baseHeight * f5; + f2 += f5; + } + } + + f /= f2; + f1 /= f2; + f = f * 0.9F + 0.1F; + f1 = (f1 * 4.0F - 1.0F) / 8.0F; + double d12 = this.depthRegion[i1] / 8000.0D; + + if (d12 < 0.0D) { + d12 = -d12 * 0.3D; + } + + d12 = d12 * 3.0D - 2.0D; + + if (d12 < 0.0D) { + d12 /= 2.0D; + + if (d12 < -1.0D) { + d12 = -1.0D; + } + + d12 /= 1.4D; + d12 /= 2.0D; + } else { + if (d12 > 1.0D) { + d12 = 1.0D; + } + + d12 /= 8.0D; + } + + ++i1; + double d13 = f1; + double d14 = f; + d13 += d12 * 0.2D; + d13 = d13 * 8.5D / 8.0D; + double d5 = 8.5D + d13 * 4.0D; + + for (int j2 = 0; j2 < 33; ++j2) { + double d6 = (j2 - d5) * 12.0D * 128.0D / 256.0D / d14; + + if (d6 < 0.0D) { + d6 *= 4.0D; + } + + double d7 = this.minLimitRegion[l] / 512.0D; + double d8 = this.maxLimitRegion[l] / 512.0D; + double d9 = (this.mainNoiseRegion[l] / 10.0D + 1.0D) / 2.0D; + double d10 = MathHelper.clamp(d7, d8, d9) - d6; + + if (j2 > 29) { + double d11 = ((j2 - 29) / 3.0F); + d10 = d10 * (1.0D - d11) + -10.0D * d11; + } + + this.heightMap[l] = d10; + ++l; + } + } + } + } + + + public void generate(int chunkX, int chunkZ, ChunkPrimer primer) { + generateHeightmap(chunkX * 4, 0, chunkZ * 4); + + byte waterLevel = 63; + for (int x4 = 0; x4 < 4; ++x4) { + int l = x4 * 5; + int i1 = (x4 + 1) * 5; + + for (int z4 = 0; z4 < 4; ++z4) { + int k1 = (l + z4) * 33; + int l1 = (l + z4 + 1) * 33; + int i2 = (i1 + z4) * 33; + int j2 = (i1 + z4 + 1) * 33; + + for (int height32 = 0; height32 < 32; ++height32) { + double d0 = 0.125D; + double d1 = heightMap[k1 + height32]; + double d2 = heightMap[l1 + height32]; + double d3 = heightMap[i2 + height32]; + double d4 = heightMap[j2 + height32]; + double d5 = (heightMap[k1 + height32 + 1] - d1) * d0; + double d6 = (heightMap[l1 + height32 + 1] - d2) * d0; + double d7 = (heightMap[i2 + height32 + 1] - d3) * d0; + double d8 = (heightMap[j2 + height32 + 1] - d4) * d0; + + for (int h = 0; h < 8; ++h) { + double d9 = 0.25D; + double d10 = d1; + double d11 = d2; + double d12 = (d3 - d1) * d9; + double d13 = (d4 - d2) * d9; + int height = (height32 * 8) + h; + + for (int x = 0; x < 4; ++x) { + double d14 = 0.25D; + double d16 = (d11 - d10) * d14; + double d15 = d10 - d16; + + for (int z = 0; z < 4; ++z) { + if (height < 2) { + primer.setBlockState(x4 * 4 + x, height32 * 8 + h, z4 * 4 + z, Blocks.BEDROCK.getDefaultState()); + } else if ((d15 += d16) > 0.0D) { + primer.setBlockState(x4 * 4 + x, height32 * 8 + h, z4 * 4 + z, Blocks.STONE.getDefaultState()); + } + } + + d10 += d12; + d11 += d13; + } + + d1 += d5; + d2 += d6; + d3 += d7; + d4 += d8; + } + } + } + } + } + + public void replaceBiomeBlocks(int x, int z, ChunkPrimer primer, IChunkGenerator generator, Biome[] biomes) { + if (!net.minecraftforge.event.ForgeEventFactory.onReplaceBiomeBlocks(generator, x, z, primer, this.world)) return; + this.depthBuffer = this.surfaceNoise.getRegion(this.depthBuffer, (x * 16), (z * 16), 16, 16, 0.0625D, 0.0625D, 1.0D); + + for (int i = 0; i < 16; ++i) { + for (int j = 0; j < 16; ++j) { + Biome biome = biomes[j + i * 16]; + biome.genTerrainBlocks(this.world, this.random, primer, x * 16 + i, z * 16 + j, this.depthBuffer[j + i * 16]); + } + } + } + +} \ No newline at end of file diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/common/dimension/WorldProviderOldWest.java b/src/main/java/com/rdvdev2/TimeTravelMod/common/dimension/WorldProviderOldWest.java new file mode 100644 index 00000000..6dc2eb04 --- /dev/null +++ b/src/main/java/com/rdvdev2/TimeTravelMod/common/dimension/WorldProviderOldWest.java @@ -0,0 +1,66 @@ +package com.rdvdev2.TimeTravelMod.common.dimension; + +import com.rdvdev2.TimeTravelMod.ModDimensions; +import net.minecraft.client.Minecraft; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.init.Biomes; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.DimensionType; +import net.minecraft.world.WorldProvider; +import net.minecraft.world.biome.Biome; +import net.minecraft.world.biome.BiomeProviderSingle; +import net.minecraft.world.gen.ChunkGeneratorDebug; +import net.minecraft.world.gen.ChunkGeneratorHell; +import net.minecraft.world.gen.ChunkGeneratorOverworld; +import net.minecraft.world.gen.IChunkGenerator; + +public class WorldProviderOldWest extends WorldProvider { + + public static int dimId = 20; + + public WorldProviderOldWest() { + super(); + } + + @Override + public DimensionType getDimensionType() { + return ModDimensions.OLD_WEST; + } + + public void registerWorldChunkManager() { + this.biomeProvider = new BiomeProviderSingle(Biomes.DESERT); + this.setDimension(ModDimensions.OldWestId); + this.setAllowedSpawnTypes(true,true); + } + + @Override + public IChunkGenerator createChunkGenerator() { + return new ChunkGeneratorOldWest(this.world); + } + + public Biome getBiomeGenForCoords(BlockPos pos){ + return Biomes.DESERT; + } + + @Override + public boolean canRespawnHere() { + return true; + } + + @Override + public int getRespawnDimension(EntityPlayerMP player) { + return ModDimensions.OldWestId; + } + + @Override + public boolean isSurfaceWorld() { + return true; + } + + /*@Override + public String getWelcomeMessage() { + return "Taking a step back"; + }*/ + + +} diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/common/item/ItemControllerCircuit.java b/src/main/java/com/rdvdev2/TimeTravelMod/common/item/ItemControllerCircuit.java new file mode 100644 index 00000000..d2d60ae5 --- /dev/null +++ b/src/main/java/com/rdvdev2/TimeTravelMod/common/item/ItemControllerCircuit.java @@ -0,0 +1,17 @@ +package com.rdvdev2.TimeTravelMod.common.item; + +import com.rdvdev2.TimeTravelMod.TimeTravelMod; +import net.minecraft.item.Item; + +public class ItemControllerCircuit extends Item { + + private String name = "controllercircuit"; + + public ItemControllerCircuit() { + super(); + setUnlocalizedName(name); + setRegistryName(name); + setCreativeTab(TimeTravelMod.tabTTM); + setMaxStackSize(64); + } +} diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/common/item/ItemTimeCrystal.java b/src/main/java/com/rdvdev2/TimeTravelMod/common/item/ItemTimeCrystal.java new file mode 100644 index 00000000..00d2c253 --- /dev/null +++ b/src/main/java/com/rdvdev2/TimeTravelMod/common/item/ItemTimeCrystal.java @@ -0,0 +1,17 @@ +package com.rdvdev2.TimeTravelMod.common.item; + +import com.rdvdev2.TimeTravelMod.TimeTravelMod; +import net.minecraft.item.Item; + +public class ItemTimeCrystal extends Item { + + String name = "timecrystal"; + + public ItemTimeCrystal() { + super(); + setUnlocalizedName(name); + setRegistryName(name); + setCreativeTab(TimeTravelMod.tabTTM); + setMaxStackSize(64); + } +} diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/common/worldgen/OreGen.java b/src/main/java/com/rdvdev2/TimeTravelMod/common/worldgen/OreGen.java new file mode 100644 index 00000000..bba04ac2 --- /dev/null +++ b/src/main/java/com/rdvdev2/TimeTravelMod/common/worldgen/OreGen.java @@ -0,0 +1,50 @@ +package com.rdvdev2.TimeTravelMod.common.worldgen; + +import com.google.common.base.Predicate; +import com.rdvdev2.TimeTravelMod.ModBlocks; +import net.minecraft.block.state.IBlockState; +import net.minecraft.block.state.pattern.BlockMatcher; +import net.minecraft.init.Blocks; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; +import net.minecraft.world.chunk.IChunkProvider; +import net.minecraft.world.gen.IChunkGenerator; +import net.minecraft.world.gen.feature.WorldGenMinable; +import net.minecraftforge.fml.common.IWorldGenerator; + +import java.util.Random; + +public class OreGen implements IWorldGenerator { + @Override + public void generate(Random random, int chunkX, int chunkZ, World world, IChunkGenerator chunkGenerator, IChunkProvider chunkProvider) { + switch (world.provider.getDimension()) { + // Nether + case -1: + break; + // Overworld + case 0: + runGenerator(ModBlocks.timeCrystalOre.getDefaultState(), 4, 1, 5, 20, BlockMatcher.forBlock(Blocks.STONE), world, random, chunkX, chunkZ); + break; + // End + case 1: + break; + // Other mods dimensions + default: + break; + } + } + private void runGenerator(IBlockState block, int amount, int spawnChance, int minHeight, int maxHeight, Predicate replacedBlock, World world, Random random, int chunk_x, int chunk_z) { + if (minHeight < 0 || maxHeight > 256 || minHeight > maxHeight) + throw new IllegalArgumentException("Illegal Height Arguments for WorldGenerator"); + + WorldGenMinable generator = new WorldGenMinable(block, amount, replacedBlock); + int heightdiff = maxHeight - minHeight +1; + for (int i = 0; i_<2t|3z>sfeadt09$2LHW^W^g}wGhU)F>bGaOp_dE~oH4x1}CX<2Ue!q|B z^9kh-hXeNeJt~z7dc7W0S1cCMYPF!ejooQLLuCsumkX4i&*!iYI3ABs-Ti*Ycsz#k zgTVmqH4vQwyGS&IzVAc%X0wUubc*3{h}~`n)vZ=5Y&ILbdyYE|lu9KiZZsM=oldaB zS+Cd8ZnvSKRNZ2+fR3y3*=!c>HIPgup*Rdfyk0LTuZ8n?JaD_+u-$Hm!bS* zGJ$&y*pEhUyj(7!{PlW;7K#>55Cl-2zM4*_gLf<6od%*!XfLDLYzBLoC@<^v8j9@@ zp3i4|d>j6H1BF5XHnw>kLp`ustsJ8+ ze3=t+&1X&641vgO5h4@Qob?GfX^8#4CrEn6E1`=M*vk3@D2*$qZ6wfq0@uS9R43ph zFEyVVWKoOTAwa2l%(?_@Rqi$v+96OXIY%)O4XWZB(dh&@l6f4vQBCtXsh!#D6L421 zw#KcyLTr&8MAZo#H6hKoKGuY2bRYgNIGq3`auPbiZW~4|Ylpzm!zkC3*}rCgCy;y0 i<_?zV1HJ}PZ2~V8{>Dh@42xJQ;;K4I>31uaOICeb&iz6GM9>LkVOJPx_8Ym->4UVZ4fBP8qHIIKi0SCe{ zyL_?|nLzdw`*@a@6L7mtwb9%X@BV4u3`O?>kq{9GSV2NTatw}uL<g$j)qpe5tR?KXdix8%B?91dL&FCbOo6t~+4xLyZ;;JVs8xNJeV z0KJH`q&(nq=|2ViPp3CvB@i#bTVe*DOzMF4aQFgfFBVNe|KqU-nAm=wgYqg47oaU5 z(`g;t@1NkmEl3eBz`K!wH=7QyS~42d0PW?n3C!m>T!1x*=oR{G3%sp}7vOzFtiPSN zg^Z^oTD$;j`1H0Qway=*^(@B=;MM3IB*<=;1KK>u+tRWH;R39&T1PP5w_djZ?fJX` zya_Pz>Itw&eUMm*=m=&$$Ke93k5nz0SAbsadT?a~`~X*0dUm^OFLwX{002ovPDHLk FV1lM+vnv1q literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/timetravelmod/textures/blocks/timemachinecore.png b/src/main/resources/assets/timetravelmod/textures/blocks/timemachinecore.png new file mode 100644 index 0000000000000000000000000000000000000000..f9d96cfb0b3e9e79b01c697822ac433c6d1d0827 GIT binary patch literal 566 zcmV-60?GY}P)3&OCPuR0G z-WzrB1vS%Mb*8(zszI-;y zXnK8ei2;Wfx-cg?F+18ZGnyG-T;qm$udi*BA4HPZ7mzRB-#aD)pXtmHXkPOsmwrrR zCWYYt>Z)bf`uYM$5(*3x&UJ2%bYzybY>stoc#gfLEiVZS#mRQw)wog))zpa97was68*1~u3|&i^6CQeQd%N~{`Nz{ z2he_*&p6`N7r;Q05i%f-N}M{P)gIA}FF4B` z&?|!*QPbgfc%7Zu$DQ4s9n4?r&fOec~f0qJD^_o!0YQSR4Q&5jRL^qc>-17YSj($cm8qx0c69f zDUco?cYv3?-Sz?7n@umUZZtf=$5(%VXw*EL%jX@?>-m8lIPi2Dg306nSj*qv-}iz2 zyInu1{($}fMlUf3=1r@@AnZRFY{UJ10E$H?ghFeeKR`Tgp3U*`ySiH73x+op2VNC` zQ)2Wc)*ry=fgIRq0N%VeH%`cAH-V4&$;k%j55QOA`S}(+KL=qvUifYRP89>JoC56u zR1KYu4`cwz=oHp!Zs6jiT#Wua06)p(r{Z%?a7U&>dEv2A?a3FN99of`yA5L)e&?&ZDia6fec6{~gyn9>@ zfCa2xfatsH0gM7tty~u%8n;r8vsB>q0MrE#0`4R{Z?Fr!&FUdiCWb2 z0HO`UOF65O*plWgI1M2B&2~`;d^dTP$Tg4#(3)}-9p)&?8pyR|IzW_q4yYEPYQ=m2 z&jKvuRI32pHIN420Wk;zL7ZynY4Q%K@N`TE@Lq7^p{6=Il;pl39iX)pQv(j`2`>j2 jeL?BIn*IN!bT+^T<5{Xf3RUJi00000NkvXXu0mjfDtdIn literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/timetravelmod/textures/items/timecrystal.png b/src/main/resources/assets/timetravelmod/textures/items/timecrystal.png new file mode 100644 index 0000000000000000000000000000000000000000..3ccfb8800b020159f7f0ca5d7292e274aedbf314 GIT binary patch literal 336 zcmV-W0k8gvP)`){NW#eP`e9u#N-HZ8`@>VmWIrUqNm~(ZS zIR_M@7*CEe<-b?_PJnNC=PqZ?vSux9+6gsk^0koE0^-D1uHuP$^dv5Qm8yIkl3IX& zaN{ONjxu5-Cr;weeZ6EU6)N&}NM-_t45dz8X3P?%OvTrJD0l3{A(p>@4jm~`5-)KK zm@}6>d%19t1`T<6gUU>Rm)@^kTyk^3hK(FJh{G*^0iL);OD0SbV!)QI__cidkjhMe zCs?o$hxjmBv6A?`CQTVIkTGM)Pr#!M$v2D-RorO21$XJn$ERUx0WqXcU*ba*x7@Ey ioSA^)UvV*he*6RG`zk)5@yhf70000