diff --git a/.bettercodehub.yml b/.bettercodehub.yml
new file mode 100644
index 0000000..32583be
--- /dev/null
+++ b/.bettercodehub.yml
@@ -0,0 +1 @@
+component_depth: 8
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
new file mode 100644
index 0000000..ff807fa
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -0,0 +1,35 @@
+---
+name: Bug report
+about: Report bugs or whatever that doesn't work in the mod.
+title: ''
+labels: bug
+assignees: rdvdev2
+
+---
+
+**Describe the bug**
+A clear and concise description of what the bug is.
+
+**To Reproduce**
+Steps to reproduce the behavior:
+1. Go to '...'
+2. Click on '....'
+3. Scroll down to '....'
+4. See error
+
+**Expected behavior**
+A clear and concise description of what you expected to happen.
+
+**Screenshots**
+If applicable, add screenshots to help explain your problem.
+
+**System (please complete the following information):**
+ - OS: [e.g. Windows 10]
+ - Minecraft Forge Version: [e.g. 1.12.2-14.23.4.2705]
+ - Mod Version: [e.g. 1.12-0.0.0.83]
+
+**Mod configuration**
+Copy and paste your .minecraft/config/TTM.json file here
+
+**Additional context**
+Add any other context about the problem here. (e.g. crash log)
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md
new file mode 100644
index 0000000..143cb3c
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/feature_request.md
@@ -0,0 +1,28 @@
+---
+name: Feature request
+about: Suggest an idea for the mod. We are expecting your awesome ideas.
+title: ''
+labels: enhancement
+assignees: rdvdev2
+
+---
+
+**Which type of feature are you thinking about? (Put an x on all aplicable options)**
+ - [ ] Blocks
+ - [ ] Items
+ - [ ] Dimensions (Temporal lines)
+ - [ ] Structures
+ - [ ] Game mechanics
+ - [ ] Mobs
+ - [ ] Time Machine changes
+ - [ ] Aesthetics
+ - [x] None of the above
+
+**Describe your idea**
+What it is? How it looks? How it works? Give as much details as you can.
+
+**Did you work on this?**
+If you worked on this feature you can attach your advancements here. Images, screenshots, code, references to pull requests...
+
+**Additional context**
+Add any other context about the feature request here.
diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml
new file mode 100644
index 0000000..4e4d967
--- /dev/null
+++ b/.github/workflows/gradle.yml
@@ -0,0 +1,20 @@
+name: Gradle Build (GH Actions)
+
+on:
+ push:
+ branches:
+ - 1.15.2
+
+jobs:
+ build:
+
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v1
+ - name: Set up JDK 1.8
+ uses: actions/setup-java@v1
+ with:
+ java-version: 1.8
+ - name: Build with Gradle
+ run: ./gradlew build
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..fe4006f
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,19 @@
+.gradle
+/build/
+
+# Ignore Gradle GUI config
+gradle-app.setting
+
+# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
+!gradle-wrapper.jar
+
+# Cache of project
+.gradletasknamecache
+
+# Idea
+.idea
+*.iml
+
+# Fabric
+out
+run
\ No newline at end of file
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
new file mode 100644
index 0000000..37e3ebb
--- /dev/null
+++ b/CODE_OF_CONDUCT.md
@@ -0,0 +1,46 @@
+# Contributor Covenant Code of Conduct
+
+## Our Pledge
+
+In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
+
+## Our Standards
+
+Examples of behavior that contributes to creating a positive environment include:
+
+* Using welcoming and inclusive language
+* Being respectful of differing viewpoints and experiences
+* Gracefully accepting constructive criticism
+* Focusing on what is best for the community
+* Showing empathy towards other community members
+
+Examples of unacceptable behavior by participants include:
+
+* The use of sexualized language or imagery and unwelcome sexual attention or advances
+* Trolling, insulting/derogatory comments, and personal or political attacks
+* Public or private harassment
+* Publishing others' private information, such as a physical or electronic address, without explicit permission
+* Other conduct which could reasonably be considered inappropriate in a professional setting
+
+## Our Responsibilities
+
+Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
+
+Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
+
+## Scope
+
+This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
+
+## Enforcement
+
+Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at rdvdev2@gmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
+
+Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
+
+## Attribution
+
+This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
+
+[homepage]: http://contributor-covenant.org
+[version]: http://contributor-covenant.org/version/1/4/
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..f288702
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ Copyright (C)
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+.
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..0d6e166
--- /dev/null
+++ b/README.md
@@ -0,0 +1,10 @@
+# TimeTravelMod
+[![Downloads badge](http://cf.way2muchnoise.eu/full_time-travel-mod_downloads.svg)](https://www.curseforge.com/minecraft/mc-mods/time-travel-mod)
+[![Crowdin](https://d322cqt584bo4o.cloudfront.net/time-travel-mod/localized.svg)](https://crowdin.com/project/time-travel-mod) [![Gradle Build (GH Actions)](https://github.com/rdvdev2/TimeTravelMod/workflows/Gradle%20Build%20(GH%20Actions)/badge.svg?branch=1.15.2)](https://github.com/rdvdev2/TimeTravelMod/actions)
+
+Ever wanted to travel through time in Minecraft? Build your own time travel machine and discover a bunch of new worlds, objects and mobs!
+## State of development
+The mod is still a beta, but it's very stable. Missing features.
+
+## Usage of the API
+WIP
diff --git a/build.gradle b/build.gradle
new file mode 100644
index 0000000..1da90f7
--- /dev/null
+++ b/build.gradle
@@ -0,0 +1,79 @@
+plugins {
+ id 'fabric-loom' version '0.2.6-SNAPSHOT'
+ id 'maven-publish'
+}
+
+def apiVersion
+
+sourceCompatibility = JavaVersion.VERSION_1_8
+targetCompatibility = JavaVersion.VERSION_1_8
+
+archivesBaseName = 'TimeTravelMod-Fabric'
+group = 'com.rdvdev2.TimeTravelMod'
+
+minecraft {
+}
+
+dependencies {
+ minecraft "com.mojang:minecraft:1.15.2"
+ mappings "net.fabricmc:yarn:1.15.2+build.15:v2"
+ modCompile "net.fabricmc:fabric-loader:0.7.10+build.191"
+
+ modCompile "net.fabricmc.fabric-api:fabric-api:0.5.1+build.294-1.15"
+ modImplementation "me.shedaniel.cloth:config-2:2.13.2"
+ include "me.shedaniel.cloth:config-2:2.13.2"
+ modImplementation "me.sargunvohra.mcmods:autoconfig1u:2.0"
+ include "me.sargunvohra.mcmods:autoconfig1u:2.0"
+ modImplementation "io.github.prospector:modmenu:1.10.2+build.32"
+
+ implementation 'org.jetbrains:annotations:15.0'
+}
+
+processResources {
+ def versionPropsFile = file('version.properties')
+ inputs.file versionPropsFile
+
+ Properties versionProps = new Properties()
+
+ versionProps.load(new FileInputStream(versionPropsFile))
+
+ def mc = versionProps['MC']
+ def majormod = versionProps['MAJORMOD']
+ def majorapi = versionProps['MAJORAPI']
+ def minor = versionProps['MINOR']
+ def patch = versionProps['PATCH']
+
+ apiVersion = mc + "-" + majormod + "." + majorapi
+ project.version = apiVersion + "." + minor + "." + patch
+
+ from(sourceSets.main.resources.srcDirs) {
+ include "fabric.mod.json"
+ expand "version": project.version
+ }
+
+ from(sourceSets.main.resources.srcDirs) {
+ exclude "fabric.mod.json"
+ }
+}
+
+tasks.withType(JavaCompile) {
+ options.encoding = "UTF-8"
+}
+
+task sourcesJar(type: Jar, dependsOn: classes) {
+ classifier = "sources"
+ from sourceSets.main.allSource
+}
+
+jar {
+ manifest {
+ attributes(["Specification-Title": "Fabric Loader",
+ "Specification-Vendor": "The Fabric Loader Team",
+ "Specification-Version": "0.4.0",
+ "Implementation-Title": "Time Travel Mod",
+ "Implementation-Version": project.version,
+ "Implementation-Vendor" :"rdvdev2",
+ "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")],)
+ }
+ from "LICENSE"
+}
diff --git a/gradle.properties b/gradle.properties
new file mode 100644
index 0000000..5cacfe8
--- /dev/null
+++ b/gradle.properties
@@ -0,0 +1,2 @@
+# Done to increase the memory available to gradle.
+org.gradle.jvmargs=-Xmx1G
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 0000000..5c2d1cf
Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..4bc993f
--- /dev/null
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Fri Apr 03 14:43:53 CEST 2020
+distributionUrl=https\://services.gradle.org/distributions/gradle-5.5.1-all.zip
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStorePath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
diff --git a/gradlew b/gradlew
new file mode 100755
index 0000000..8e25e6c
--- /dev/null
+++ b/gradlew
@@ -0,0 +1,188 @@
+#!/usr/bin/env sh
+
+#
+# Copyright 2015 the original author or authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
+
+# 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
+nonstop=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+ NONSTOP* )
+ nonstop=true
+ ;;
+esac
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ 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" -a "$nonstop" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+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"`
+ JAVACMD=`cygpath --unix "$JAVACMD"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ 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
+
+# Escape application args
+save () {
+ for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
+ echo " "
+}
+APP_ARGS=$(save "$@")
+
+# Collect all arguments for the java command, following the shell quoting and substitution rules
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
+
+# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
+if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
+ cd "$(dirname "$0")"
+fi
+
+exec "$JAVACMD" "$@"
diff --git a/gradlew.bat b/gradlew.bat
new file mode 100644
index 0000000..24467a1
--- /dev/null
+++ b/gradlew.bat
@@ -0,0 +1,100 @@
+@rem
+@rem Copyright 2015 the original author or authors.
+@rem
+@rem Licensed under the Apache License, Version 2.0 (the "License");
+@rem you may not use this file except in compliance with the License.
+@rem You may obtain a copy of the License at
+@rem
+@rem https://www.apache.org/licenses/LICENSE-2.0
+@rem
+@rem Unless required by applicable law or agreed to in writing, software
+@rem distributed under the License is distributed on an "AS IS" BASIS,
+@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@rem See the License for the specific language governing permissions and
+@rem limitations under the License.
+@rem
+
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+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 Windows variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+: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/settings.gradle b/settings.gradle
new file mode 100644
index 0000000..e824a8f
--- /dev/null
+++ b/settings.gradle
@@ -0,0 +1,14 @@
+pluginManagement {
+ repositories {
+ jcenter()
+ maven {
+ name = 'Fabric'
+ url = 'https://maven.fabricmc.net/'
+ }
+ maven {
+ name = "CurseForge"
+ url = "https://minecraft.curseforge.com/api/maven/"
+ }
+ gradlePluginPortal()
+ }
+}
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/Mod.java b/src/main/java/com/rdvdev2/TimeTravelMod/Mod.java
new file mode 100644
index 0000000..9e02767
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/Mod.java
@@ -0,0 +1,37 @@
+package com.rdvdev2.TimeTravelMod;
+
+import com.rdvdev2.TimeTravelMod.common.world.VanillaBiomesFeatures;
+import com.rdvdev2.TimeTravelMod.common.world.dimension.oldwest.village.OldWestVillagePools;
+import net.fabricmc.api.ModInitializer;
+import net.fabricmc.fabric.api.client.itemgroup.FabricItemGroupBuilder;
+import net.minecraft.item.ItemGroup;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.Identifier;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+public class Mod implements ModInitializer {
+
+ public static final String MODID = "timetravelmod";
+
+ public static final Logger LOGGER = LogManager.getLogger("TIMETRAVELMOD");
+
+ public static final ItemGroup TAB_TTM = FabricItemGroupBuilder.build(new Identifier(MODID, "tab"), () -> new ItemStack(ModItems.TIME_CRYSTAL));
+
+ public void onInitialize() {
+ Mod.LOGGER.info("Time Travel Mod is in commonInitialize stage");
+ ModConfig.register();
+ ModRegistries.register();
+ ModBlocks.register();
+ ModItems.register();
+ ModFeatures.register();
+ ModBiomes.register();
+ ModSounds.register();
+ ModPacketHandler.registerServer();
+ ModTimeLines.register();
+ ModTimeMachines.register();
+ VanillaBiomesFeatures.register();
+ OldWestVillagePools.init();
+ ModTriggers.register();
+ }
+}
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/ModBiomes.java b/src/main/java/com/rdvdev2/TimeTravelMod/ModBiomes.java
new file mode 100644
index 0000000..c63263b
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/ModBiomes.java
@@ -0,0 +1,30 @@
+package com.rdvdev2.TimeTravelMod;
+
+import com.rdvdev2.TimeTravelMod.common.world.dimension.oldwest.biome.OldWestBiome;
+import com.rdvdev2.TimeTravelMod.common.world.dimension.oldwest.biome.OldWestBiomeSource;
+import com.rdvdev2.TimeTravelMod.mixin.IBiomeSourceType;
+import net.minecraft.util.Identifier;
+import net.minecraft.util.registry.Registry;
+import net.minecraft.world.biome.Biome;
+import net.minecraft.world.biome.source.BiomeSourceType;
+import net.minecraft.world.biome.source.VanillaLayeredBiomeSourceConfig;
+
+public class ModBiomes {
+
+ public static final Biome OLDWEST = new OldWestBiome();
+
+ public static void register() {
+ Registry.register(Registry.BIOME, new Identifier(Mod.MODID, "oldwest"), OLDWEST);
+
+ ProviderTypes.register();
+ }
+
+ public static class ProviderTypes {
+
+ public static final BiomeSourceType OLDWEST_LAYERED = IBiomeSourceType.create(OldWestBiomeSource::new, VanillaLayeredBiomeSourceConfig::new);
+
+ public static void register() {
+ Registry.register(Registry.BIOME_SOURCE_TYPE, new Identifier(Mod.MODID, "oldwest_layered"), OLDWEST_LAYERED);
+ }
+ }
+}
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 0000000..3391adc
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/ModBlocks.java
@@ -0,0 +1,82 @@
+package com.rdvdev2.TimeTravelMod;
+
+import com.rdvdev2.TimeTravelMod.api.timemachine.block.TimeMachineControlPanelBlock;
+import com.rdvdev2.TimeTravelMod.api.timemachine.block.TimeMachineCoreBlock;
+import com.rdvdev2.TimeTravelMod.api.timemachine.block.TimeMachineUpgradeBlock;
+import com.rdvdev2.TimeTravelMod.common.block.GunpowderWireBlock;
+import com.rdvdev2.TimeTravelMod.common.block.TemporalCauldronBlock;
+import com.rdvdev2.TimeTravelMod.common.block.TemporalExplosionBlock;
+import com.rdvdev2.TimeTravelMod.common.block.TimeMachineRecallerBlock;
+import com.rdvdev2.TimeTravelMod.common.block.blockentity.TMCooldownBlockEntity;
+import com.rdvdev2.TimeTravelMod.common.block.blockentity.TemporalCauldronTileEntity;
+import com.rdvdev2.TimeTravelMod.common.block.blockentity.TimeMachineRecallerBlockEntity;
+import net.fabricmc.api.EnvType;
+import net.fabricmc.api.Environment;
+import net.fabricmc.fabric.api.block.FabricBlockSettings;
+import net.fabricmc.fabric.api.client.rendering.v1.ColorProviderRegistry;
+import net.fabricmc.fabric.api.tools.FabricToolTags;
+import net.minecraft.block.Block;
+import net.minecraft.block.Material;
+import net.minecraft.block.entity.BlockEntityType;
+import net.minecraft.sound.BlockSoundGroup;
+import net.minecraft.util.Identifier;
+import net.minecraft.util.registry.Registry;
+
+import java.util.HashSet;
+
+public class ModBlocks {
+
+ public static final Block TIME_CRYSTAL_ORE = new Block(FabricBlockSettings.of(Material.STONE).sounds(BlockSoundGroup.STONE).strength(5f, 5f).lightLevel(5/16).breakByTool(FabricToolTags.PICKAXES, 3).build());
+ public static final Block TIME_MACHINE_BASIC_BLOCK = new Block(FabricBlockSettings.of(Material.METAL).sounds(BlockSoundGroup.METAL).strength(3f, 3f).lightLevel(0 / 16).breakByTool(FabricToolTags.PICKAXES, 2).build());
+ public static final Block TIME_MACHINE_CORE = new TimeMachineCoreBlock(FabricBlockSettings.of(Material.METAL).sounds(BlockSoundGroup.METAL).strength(4f, 4f).lightLevel(5 / 16).breakByTool(FabricToolTags.PICKAXES, 3).build());
+ public static final Block TIME_MACHINE_CONTROL_PANEL = new TimeMachineControlPanelBlock(FabricBlockSettings.of(Material.METAL).sounds(BlockSoundGroup.METAL).strength(3f, 3f).lightLevel(0 / 16).breakByTool(FabricToolTags.PICKAXES, 2).build());
+ public static final Block HEAVY_BLOCK = new Block(FabricBlockSettings.of(Material.METAL).sounds(BlockSoundGroup.METAL).strength(7f, 7f).lightLevel(0/16).breakByTool(FabricToolTags.PICKAXES, 3).build());
+ public static final Block REINFORCED_HEAVY_BLOCK = new Block(FabricBlockSettings.of(Material.METAL).sounds(BlockSoundGroup.METAL).strength(10f, 10f).lightLevel(10).breakByTool(FabricToolTags.PICKAXES, 3).build());
+ public static final Block TEMPORAL_EXPLOSION = new TemporalExplosionBlock();
+ public static final Block TEMPORAL_CAULDRON = new TemporalCauldronBlock();
+ public static final Block GUNPOWDER_WIRE = new GunpowderWireBlock();
+ public static final Block TIME_MACHINE_TRACKER = new TimeMachineUpgradeBlock(FabricBlockSettings.of(Material.METAL).sounds(BlockSoundGroup.METAL).strength(3f, 3f).lightLevel(0 / 16).breakByTool(FabricToolTags.PICKAXES, 2).build(), ModTimeMachines.Upgrades.TRACKER);
+ public static final Block TIME_MACHINE_RECALLER = new TimeMachineRecallerBlock();
+
+ @Environment(EnvType.CLIENT)
+ public static void registerBlockColor() {
+ ColorProviderRegistry.BLOCK.register((state, world, pos, num) -> GunpowderWireBlock.colorMultiplier(state.get(GunpowderWireBlock.BURNED)), ModBlocks.GUNPOWDER_WIRE);
+ }
+
+ public static void register() {
+ Registry.register(Registry.BLOCK, new Identifier(Mod.MODID, "timecrystalore"), TIME_CRYSTAL_ORE);
+ Registry.register(Registry.BLOCK, new Identifier(Mod.MODID, "timemachinebasicblock"), TIME_MACHINE_BASIC_BLOCK);
+ Registry.register(Registry.BLOCK, new Identifier(Mod.MODID, "timemachinecore"), TIME_MACHINE_CORE);
+ Registry.register(Registry.BLOCK, new Identifier(Mod.MODID, "timemachinecontrolpanel"), TIME_MACHINE_CONTROL_PANEL);
+ Registry.register(Registry.BLOCK, new Identifier(Mod.MODID, "heavyblock"), HEAVY_BLOCK);
+ Registry.register(Registry.BLOCK, new Identifier(Mod.MODID, "reinforcedheavyblock"), REINFORCED_HEAVY_BLOCK);
+ Registry.register(Registry.BLOCK, new Identifier(Mod.MODID, "temporalexplosion"), TEMPORAL_EXPLOSION);
+ Registry.register(Registry.BLOCK, new Identifier(Mod.MODID, "temporalcauldron"), TEMPORAL_CAULDRON);
+ Registry.register(Registry.BLOCK, new Identifier(Mod.MODID, "gunpowderwire"), GUNPOWDER_WIRE);
+ Registry.register(Registry.BLOCK, new Identifier(Mod.MODID, "timemachinetracker"), TIME_MACHINE_TRACKER);
+ Registry.register(Registry.BLOCK, new Identifier(Mod.MODID, "timemachinerecaller"), TIME_MACHINE_RECALLER);
+
+ TileEntities.register();
+ }
+
+ public static class TileEntities {
+
+ public static BlockEntityType TEMPORAL_CAULDRON;
+ public static BlockEntityType TM_COOLDOWN;
+ public static BlockEntityType TM_RECALLER;
+
+ private static Block[] getAllCoreBlocks() {
+ HashSet blocks = new HashSet();
+ for (Block block: Registry.BLOCK) {
+ if (block instanceof TimeMachineCoreBlock) blocks.add(block);
+ }
+ return blocks.toArray(new Block[]{});
+ }
+
+ public static void register() {
+ TEMPORAL_CAULDRON = Registry.register(Registry.BLOCK_ENTITY_TYPE, new Identifier(Mod.MODID, "temporalcauldron"), BlockEntityType.Builder.create(TemporalCauldronTileEntity::new, ModBlocks.TEMPORAL_CAULDRON).build(null));
+ TM_COOLDOWN = Registry.register(Registry.BLOCK_ENTITY_TYPE, new Identifier(Mod.MODID, "tmcooldown"), BlockEntityType.Builder.create(TMCooldownBlockEntity::new, getAllCoreBlocks()).build(null));
+ TM_RECALLER = Registry.register(Registry.BLOCK_ENTITY_TYPE, new Identifier(Mod.MODID, "tmrecaller"), BlockEntityType.Builder.create(TimeMachineRecallerBlockEntity::new, ModBlocks.TIME_MACHINE_RECALLER).build(null));
+ }
+ }
+}
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/ModClient.java b/src/main/java/com/rdvdev2/TimeTravelMod/ModClient.java
new file mode 100644
index 0000000..6a9402f
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/ModClient.java
@@ -0,0 +1,18 @@
+package com.rdvdev2.TimeTravelMod;
+
+import net.fabricmc.api.ClientModInitializer;
+import net.fabricmc.api.EnvType;
+import net.fabricmc.api.Environment;
+import net.fabricmc.fabric.api.blockrenderlayer.v1.BlockRenderLayerMap;
+import net.minecraft.client.render.RenderLayer;
+
+@Environment(EnvType.CLIENT)
+public class ModClient implements ClientModInitializer {
+
+ @Override
+ public void onInitializeClient() {
+ ModBlocks.registerBlockColor();
+ BlockRenderLayerMap.INSTANCE.putBlock(ModBlocks.GUNPOWDER_WIRE, RenderLayer.getCutout());
+ ModPacketHandler.registerClient();
+ }
+}
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/ModConfig.java b/src/main/java/com/rdvdev2/TimeTravelMod/ModConfig.java
new file mode 100644
index 0000000..bdf519f
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/ModConfig.java
@@ -0,0 +1,79 @@
+package com.rdvdev2.TimeTravelMod;
+
+import me.sargunvohra.mcmods.autoconfig1u.AutoConfig;
+import me.sargunvohra.mcmods.autoconfig1u.ConfigData;
+import me.sargunvohra.mcmods.autoconfig1u.annotation.Config;
+import me.sargunvohra.mcmods.autoconfig1u.annotation.ConfigEntry;
+import me.sargunvohra.mcmods.autoconfig1u.serializer.PartitioningSerializer;
+import me.sargunvohra.mcmods.autoconfig1u.serializer.Toml4jConfigSerializer;
+import net.fabricmc.api.EnvType;
+import net.fabricmc.api.Environment;
+
+public class ModConfig implements ConfigData {
+
+ @Config(name = Mod.MODID)
+ public static class DisplayConfig extends PartitioningSerializer.GlobalData {
+
+ @Environment(EnvType.CLIENT)
+ @ConfigEntry.Category(Mod.MODID + "_client")
+ @ConfigEntry.Gui.TransitiveObject
+ private ClientConfig clientConfig = new ClientConfig();
+
+ @ConfigEntry.Category(Mod.MODID + "_common")
+ @ConfigEntry.Gui.TransitiveObject
+ private CommonConfig commonConfig = new CommonConfig();
+
+ @Environment(EnvType.CLIENT)
+ public ClientConfig getClient() {
+ return clientConfig;
+ }
+
+ public CommonConfig getCommon() {
+ return commonConfig;
+ }
+ }
+
+ @Config(name = "client")
+ public static class ClientConfig implements ConfigData {
+
+ @ConfigEntry.Gui.Tooltip
+ private boolean enableTimeLineMusic = true;
+
+ public boolean getEnableTimeLineMusic() {
+ return enableTimeLineMusic;
+ }
+ }
+
+ @Config(name = "common")
+ public static class CommonConfig implements ConfigData {
+
+ @ConfigEntry.Gui.Tooltip
+ private boolean enableExperimentalFeatures = false;
+
+ @ConfigEntry.Gui.Tooltip
+ private boolean enableUpdatePromos = true;
+
+ @ConfigEntry.Gui.Tooltip
+ private boolean enableCheaterReports = true;
+
+ public boolean getEnableExperimentalFeatures() {
+ return enableExperimentalFeatures;
+ }
+
+ public boolean getEnableUpdatePromos() {
+ return enableUpdatePromos;
+ }
+
+ public boolean getEnableCheaterReports() {
+ return enableCheaterReports;
+ }
+ }
+
+ public static void register() {
+ AutoConfig.register(DisplayConfig.class, PartitioningSerializer.wrap(Toml4jConfigSerializer::new));
+ }
+
+ public static DisplayConfig getInstance() {
+ return AutoConfig.getConfigHolder(DisplayConfig.class).getConfig();
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/ModFeatures.java b/src/main/java/com/rdvdev2/TimeTravelMod/ModFeatures.java
new file mode 100644
index 0000000..0da769c
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/ModFeatures.java
@@ -0,0 +1,15 @@
+package com.rdvdev2.TimeTravelMod;
+
+import com.rdvdev2.TimeTravelMod.common.world.generator.GunpowderFeature;
+import net.minecraft.util.Identifier;
+import net.minecraft.util.registry.Registry;
+import net.minecraft.world.gen.feature.DefaultFeatureConfig;
+import net.minecraft.world.gen.feature.Feature;
+
+public class ModFeatures {
+ public static final Feature GUNPOWDER = new GunpowderFeature();
+
+ public static void register() {
+ Registry.register(Registry.FEATURE, new Identifier(Mod.MODID, "gunpowder"), GUNPOWDER);
+ }
+}
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 0000000..968f70a
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/ModItems.java
@@ -0,0 +1,56 @@
+package com.rdvdev2.TimeTravelMod;
+
+import com.rdvdev2.TimeTravelMod.common.item.CreativeTimeMachineItem;
+import com.rdvdev2.TimeTravelMod.common.item.ItemEngineerBook;
+import net.minecraft.block.Block;
+import net.minecraft.item.BlockItem;
+import net.minecraft.item.Item;
+import net.minecraft.util.Identifier;
+import net.minecraft.util.registry.Registry;
+
+public class ModItems {
+
+ public static final Item TIME_CRYSTAL = new Item(new Item.Settings().group(Mod.TAB_TTM));
+ public static final Item CONTROLLER_CIRCUIT = new Item(new Item.Settings().group(Mod.TAB_TTM));
+ public static final Item HEAVY_INGOT = new Item(new Item.Settings().group(Mod.TAB_TTM));
+ public static final Item CREATIVE_TIME_MACHINE = new CreativeTimeMachineItem();
+ public static final Item ENGINEER_BOOK = new ItemEngineerBook();
+ public static final Item COMMUNICATIONS_CIRCUIT = new Item(new Item.Settings().group(Mod.TAB_TTM));
+
+ public static final Item TIME_CRYSTAL_ORE = createBlockItem(ModBlocks.TIME_CRYSTAL_ORE);
+ public static final Item TIME_MACHINE_BASIC_BLOCK = createBlockItem(ModBlocks.TIME_MACHINE_BASIC_BLOCK);
+ public static final Item TIME_MACHINE_CORE = createBlockItem(ModBlocks.TIME_MACHINE_CORE);
+ public static final Item TIME_MACHINE_CONTROL_PANEL = createBlockItem(ModBlocks.TIME_MACHINE_CONTROL_PANEL);
+ public static final Item HEAVY_BLOCK = createBlockItem(ModBlocks.HEAVY_BLOCK);
+ public static final Item REINFORCED_HEAVY_BLOCK = createBlockItem(ModBlocks.REINFORCED_HEAVY_BLOCK);
+ public static final Item TEMPORAL_EXPLOSION = createBlockItem(ModBlocks.TEMPORAL_EXPLOSION);
+ public static final Item TEMPORAL_CAULDRON = createBlockItem(ModBlocks.TEMPORAL_CAULDRON);
+ public static final Item GUNPOWDER_WIRE = createBlockItem(ModBlocks.GUNPOWDER_WIRE);
+ public static final Item TIME_MACHINE_TRACKER = createBlockItem(ModBlocks.TIME_MACHINE_TRACKER);
+ public static final Item TIME_MACHINE_RECALLER = createBlockItem(ModBlocks.TIME_MACHINE_RECALLER);
+
+ private static Item createBlockItem(Block block) {
+ return new BlockItem(block, new Item.Settings().group(Mod.TAB_TTM));
+ }
+
+ public static void register() {
+ Registry.register(Registry.ITEM, new Identifier(Mod.MODID, "timecrystal"), TIME_CRYSTAL);
+ Registry.register(Registry.ITEM, new Identifier(Mod.MODID, "controllercircuit"), CONTROLLER_CIRCUIT);
+ Registry.register(Registry.ITEM, new Identifier(Mod.MODID, "heavyingot"), HEAVY_INGOT);
+ Registry.register(Registry.ITEM, new Identifier(Mod.MODID, "creativetimemachine"), CREATIVE_TIME_MACHINE);
+ Registry.register(Registry.ITEM, new Identifier(Mod.MODID, "engineerbook"), ENGINEER_BOOK);
+ Registry.register(Registry.ITEM, new Identifier(Mod.MODID, "communicationscircuit"), COMMUNICATIONS_CIRCUIT);
+
+ Registry.register(Registry.ITEM, new Identifier(Mod.MODID, "timecrystalore"), TIME_CRYSTAL_ORE);
+ Registry.register(Registry.ITEM, new Identifier(Mod.MODID, "timemachinebasicblock"), TIME_MACHINE_BASIC_BLOCK);
+ Registry.register(Registry.ITEM, new Identifier(Mod.MODID, "timemachinecore"), TIME_MACHINE_CORE);
+ Registry.register(Registry.ITEM, new Identifier(Mod.MODID, "timemachinecontrolpanel"), TIME_MACHINE_CONTROL_PANEL);
+ Registry.register(Registry.ITEM, new Identifier(Mod.MODID, "heavyblock"), HEAVY_BLOCK);
+ Registry.register(Registry.ITEM, new Identifier(Mod.MODID, "reinforcedheavyblock"), REINFORCED_HEAVY_BLOCK);
+ Registry.register(Registry.ITEM, new Identifier(Mod.MODID, "temporalexplosion"), TEMPORAL_EXPLOSION);
+ Registry.register(Registry.ITEM, new Identifier(Mod.MODID, "temporalcauldron"), TEMPORAL_CAULDRON);
+ Registry.register(Registry.ITEM, new Identifier(Mod.MODID, "gunpowderwire"), GUNPOWDER_WIRE);
+ Registry.register(Registry.ITEM, new Identifier(Mod.MODID, "timemachinetracker"), TIME_MACHINE_TRACKER);
+ Registry.register(Registry.ITEM, new Identifier(Mod.MODID, "timemachinerecaller"), TIME_MACHINE_RECALLER);
+ }
+}
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/ModPacketHandler.java b/src/main/java/com/rdvdev2/TimeTravelMod/ModPacketHandler.java
new file mode 100644
index 0000000..6283dee
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/ModPacketHandler.java
@@ -0,0 +1,20 @@
+package com.rdvdev2.TimeTravelMod;
+
+import com.rdvdev2.TimeTravelMod.common.networking.DimensionTpPKT;
+import com.rdvdev2.TimeTravelMod.common.networking.OpenTmGuiPKT;
+import net.fabricmc.api.EnvType;
+import net.fabricmc.api.Environment;
+import net.fabricmc.fabric.api.network.ClientSidePacketRegistry;
+import net.fabricmc.fabric.api.network.ServerSidePacketRegistry;
+
+public class ModPacketHandler {
+
+ @Environment(EnvType.CLIENT)
+ public static void registerClient() {
+ ClientSidePacketRegistry.INSTANCE.register(OpenTmGuiPKT.ID, com.rdvdev2.TimeTravelMod.client.networking.OpenTmGuiPKT::decode);
+ }
+
+ public static void registerServer() {
+ ServerSidePacketRegistry.INSTANCE.register(DimensionTpPKT.ID, DimensionTpPKT::decode);
+ }
+}
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/ModRegistries.java b/src/main/java/com/rdvdev2/TimeTravelMod/ModRegistries.java
new file mode 100644
index 0000000..504a943
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/ModRegistries.java
@@ -0,0 +1,25 @@
+package com.rdvdev2.TimeTravelMod;
+
+import com.rdvdev2.TimeTravelMod.api.dimension.TimeLine;
+import com.rdvdev2.TimeTravelMod.api.timemachine.TimeMachine;
+import com.rdvdev2.TimeTravelMod.api.timemachine.upgrade.TimeMachineUpgrade;
+import com.rdvdev2.TimeTravelMod.common.timemachine.TimeMachineManager;
+import net.minecraft.util.Identifier;
+import net.minecraft.util.registry.MutableRegistry;
+import net.minecraft.util.registry.Registry;
+import net.minecraft.util.registry.SimpleRegistry;
+
+public class ModRegistries {
+
+ public static final MutableRegistry TIME_MACHINES = new SimpleRegistry<>();
+ public static final MutableRegistry TIME_LINES = new SimpleRegistry<>();
+ public static final MutableRegistry UPGRADES = new SimpleRegistry<>();
+
+ public static void register() {
+ Registry.register(Registry.REGISTRIES, new Identifier(Mod.MODID, "timelines"), TIME_LINES);
+ Registry.register(Registry.REGISTRIES, new Identifier(Mod.MODID, "timemachines"), TIME_MACHINES);
+ Registry.register(Registry.REGISTRIES, new Identifier(Mod.MODID, "tmupgrades"), UPGRADES);
+
+ TimeMachineManager.registerEvents();
+ }
+}
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/ModSounds.java b/src/main/java/com/rdvdev2/TimeTravelMod/ModSounds.java
new file mode 100644
index 0000000..ce34945
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/ModSounds.java
@@ -0,0 +1,14 @@
+package com.rdvdev2.TimeTravelMod;
+
+import net.minecraft.sound.SoundEvent;
+import net.minecraft.util.Identifier;
+import net.minecraft.util.registry.Registry;
+
+public class ModSounds {
+
+ public static final SoundEvent OLDWEST_MUSIC = new SoundEvent(new Identifier(Mod.MODID, "oldwest_music"));
+
+ public static void register() {
+ Registry.register(Registry.SOUND_EVENT, new Identifier(Mod.MODID, "oldwest_music"), OLDWEST_MUSIC);
+ }
+}
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/ModTimeLines.java b/src/main/java/com/rdvdev2/TimeTravelMod/ModTimeLines.java
new file mode 100644
index 0000000..aa27adc
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/ModTimeLines.java
@@ -0,0 +1,20 @@
+package com.rdvdev2.TimeTravelMod;
+
+import com.rdvdev2.TimeTravelMod.api.dimension.TimeLine;
+import com.rdvdev2.TimeTravelMod.common.world.dimension.PresentTimeLine;
+import com.rdvdev2.TimeTravelMod.common.world.dimension.oldwest.OldWestDimension;
+import net.minecraft.util.Identifier;
+import net.minecraft.util.registry.Registry;
+
+import static com.rdvdev2.TimeTravelMod.Mod.MODID;
+
+public class ModTimeLines {
+
+ public static final TimeLine PRESENT = new PresentTimeLine();
+ public static final TimeLine OLDWEST = TimeLine.getNew(1, OldWestDimension::new, true, new Identifier(MODID, "oldwest"));
+
+ public static void register() {
+ Registry.register(ModRegistries.TIME_LINES, new Identifier(MODID, "present"), PRESENT);
+ Registry.register(ModRegistries.TIME_LINES, new Identifier(MODID, "oldwest"), OLDWEST);
+ }
+}
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/ModTimeMachines.java b/src/main/java/com/rdvdev2/TimeTravelMod/ModTimeMachines.java
new file mode 100644
index 0000000..f99482e
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/ModTimeMachines.java
@@ -0,0 +1,34 @@
+package com.rdvdev2.TimeTravelMod;
+
+import com.rdvdev2.TimeTravelMod.api.timemachine.TimeMachine;
+import com.rdvdev2.TimeTravelMod.api.timemachine.upgrade.TimeMachineUpgrade;
+import com.rdvdev2.TimeTravelMod.common.timemachine.CreativeTimeMachine;
+import com.rdvdev2.TimeTravelMod.common.timemachine.Tier1TimeMachine;
+import com.rdvdev2.TimeTravelMod.common.timemachine.hook.TrackerHooks;
+import net.minecraft.util.Identifier;
+import net.minecraft.util.registry.Registry;
+
+import static com.rdvdev2.TimeTravelMod.Mod.MODID;
+
+
+public class ModTimeMachines {
+
+ public static final TimeMachine TIER_1 = TimeMachine.fromTemplate(new Tier1TimeMachine());
+ public static final TimeMachine CREATIVE = new CreativeTimeMachine();
+
+ public static void register() {
+ Registry.register(ModRegistries.TIME_MACHINES, new Identifier(MODID, "tier1"), TIER_1);
+ Registry.register(ModRegistries.TIME_MACHINES, new Identifier(MODID, "creative"), CREATIVE);
+
+ Upgrades.register();
+ }
+
+ public static class Upgrades {
+
+ public static final TimeMachineUpgrade TRACKER = TimeMachineUpgrade.getNew().addHook(TrackerHooks.HOOKS[0], true).setCompatibleTMs(TIER_1);
+
+ public static void register() {
+ Registry.register(ModRegistries.UPGRADES, new Identifier(MODID, "tracker"), TRACKER);
+ }
+ }
+}
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/ModTriggers.java b/src/main/java/com/rdvdev2/TimeTravelMod/ModTriggers.java
new file mode 100644
index 0000000..ca76edd
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/ModTriggers.java
@@ -0,0 +1,23 @@
+package com.rdvdev2.TimeTravelMod;
+
+import com.rdvdev2.TimeTravelMod.common.triggers.CustomTrigger;
+import com.rdvdev2.TimeTravelMod.mixin.ICriterions;
+import net.minecraft.util.Identifier;
+
+import static com.rdvdev2.TimeTravelMod.Mod.MODID;
+
+public class ModTriggers {
+ public static final CustomTrigger ACCESS_TIME_MACHINE = new CustomTrigger(new Identifier(MODID, "access_time_machine"));
+ public static final CustomTrigger BETTER_THAN_MENDING = new CustomTrigger(new Identifier(MODID, "better_than_mending"));
+ public static final CustomTrigger TEMPORAL_EXPLOSION = new CustomTrigger(new Identifier(MODID, "temporal_explosion"));
+
+ public static final CustomTrigger[] TRIGGERS = new CustomTrigger[]{
+ ACCESS_TIME_MACHINE,
+ BETTER_THAN_MENDING,
+ TEMPORAL_EXPLOSION
+ };
+
+ public static void register() {
+ for (CustomTrigger trigger : TRIGGERS) ICriterions.doRegister(trigger);
+ }
+}
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/api/dimension/AbstractTimeLineDimension.java b/src/main/java/com/rdvdev2/TimeTravelMod/api/dimension/AbstractTimeLineDimension.java
new file mode 100644
index 0000000..c53d39c
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/api/dimension/AbstractTimeLineDimension.java
@@ -0,0 +1,44 @@
+package com.rdvdev2.TimeTravelMod.api.dimension;
+
+import net.minecraft.nbt.CompoundTag;
+import net.minecraft.world.World;
+import net.minecraft.world.dimension.Dimension;
+import net.minecraft.world.dimension.DimensionType;
+
+/**
+ * An extended version of {@link Dimension}. It provides extra functionality to handle {@link Corruption}.
+ */
+public abstract class AbstractTimeLineDimension extends Dimension {
+
+ private TimeLine timeLine;
+
+ /**
+ * @see Dimension#Dimension(World, DimensionType, float)
+ */
+ public AbstractTimeLineDimension(World world, DimensionType type, float f) {
+ super(world, type, f);
+ CompoundTag tag = this.world.getLevelProperties().getWorldData(this.getType());
+ if (tag.contains("corruption")) ((com.rdvdev2.TimeTravelMod.common.world.dimension.Corruption) timeLine.getCorruption()).setCorruptionLevel(tag.getInt("corruption"));
+ }
+
+ /**
+ * Gets the {@link TimeLine} associated to this Dimension
+ * @return The associated {@link TimeLine}
+ */
+ public TimeLine getTimeLine() {
+ return timeLine;
+ }
+
+ @Deprecated
+ public void setTimeLine(TimeLine timeLine) {
+ if (this.timeLine == null) this.timeLine = timeLine;
+ else throw new RuntimeException("The TimeLine of an AbstractTimeLineDimension is set automatically by the TimeLine constructor");
+ }
+
+ @Override
+ public void saveWorldData() {
+ CompoundTag tag = this.world.getLevelProperties().getWorldData(this.getType());
+ if (tag.contains("corruption")) tag.remove("corruption");
+ tag.putInt("corruption", timeLine.getCorruption().getCorruptionLevel());
+ }
+}
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/api/dimension/Corruption.java b/src/main/java/com/rdvdev2/TimeTravelMod/api/dimension/Corruption.java
new file mode 100644
index 0000000..192a11b
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/api/dimension/Corruption.java
@@ -0,0 +1,27 @@
+package com.rdvdev2.TimeTravelMod.api.dimension;
+
+/**
+ * This interface defines a way to get and modify the corruption level of any {@link TimeLine}. You should never implement it by yourself, but obtain it using {@link TimeLine#getCorruption()}.
+ */
+public interface Corruption {
+
+ /**
+ * Increases the corruption level by the specified amount.
+ * @param amount Amount of corruption to add.
+ * @return The new corruption level.
+ */
+ int increaseCorruptionLevel(int amount);
+
+ /**
+ * Decreases the corruption level by the specified amount.
+ * @param amount Amount of corruption to subtract.
+ * @return The new corruption level.
+ */
+ int decreaseCorruptionLevel(int amount);
+
+ /**
+ * Gets the actual corruption level.
+ * @return The corruption level.
+ */
+ int getCorruptionLevel();
+}
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/api/dimension/TimeLine.java b/src/main/java/com/rdvdev2/TimeTravelMod/api/dimension/TimeLine.java
new file mode 100644
index 0000000..b954dd7
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/api/dimension/TimeLine.java
@@ -0,0 +1,45 @@
+package com.rdvdev2.TimeTravelMod.api.dimension;
+
+import net.minecraft.util.Identifier;
+import net.minecraft.world.World;
+import net.minecraft.world.dimension.DimensionType;
+
+import java.util.function.BiFunction;
+
+/**
+ * This interface defines a Time Line. It creates abd warps around the DimensionType object of the Dimension.
+ * To get an instance use the provided method, never implement the interface by yourself.
+ * It must be registered in the time line registry instead of the dimension manager.
+ */
+public interface TimeLine {
+
+ /**
+ * Gets the minimum Time Machine tier required to travel to this Time Line
+ * @return The minimum tier
+ */
+ int getMinTier();
+
+ /**
+ * Gets the DimensionType associated to this Time Line
+ * @return The DimensionType object
+ */
+ DimensionType getDimensionType();
+
+ /**
+ * Gets the corruption of the Time Line
+ * @return The corruption object
+ */
+ Corruption getCorruption();
+
+ /**
+ * Creates a new Time Line
+ * @param minTier The minimum Time Machine tier required to travel to this Time Line
+ * @param dimensionFactory See {@link net.fabricmc.fabric.api.dimension.v1.FabricDimensionType.Builder#factory(BiFunction)}
+ * @param skyLight See {@link net.fabricmc.fabric.api.dimension.v1.FabricDimensionType.Builder#skyLight(boolean)}
+ * @param identifier See {@link net.fabricmc.fabric.api.dimension.v1.FabricDimensionType.Builder#buildAndRegister(Identifier)}
+ * @return The new Time Line
+ */
+ static TimeLine getNew(int minTier, BiFunction dimensionFactory, boolean skyLight, Identifier identifier) {
+ return new com.rdvdev2.TimeTravelMod.common.world.dimension.TimeLine(minTier, dimensionFactory, skyLight, identifier);
+ }
+}
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/api/dimension/package-info.java b/src/main/java/com/rdvdev2/TimeTravelMod/api/dimension/package-info.java
new file mode 100644
index 0000000..e1aae9b
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/api/dimension/package-info.java
@@ -0,0 +1,4 @@
+/**
+ * This package contains all dimension-related classes in the API.
+ */
+package com.rdvdev2.TimeTravelMod.api.dimension;
\ No newline at end of file
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/api/package-info.java b/src/main/java/com/rdvdev2/TimeTravelMod/api/package-info.java
new file mode 100644
index 0000000..7d69375
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/api/package-info.java
@@ -0,0 +1,5 @@
+/**
+ * This is the Time Travel Mod API. Checkout all the subpackages to find out what you can do to extend this mod!
+ * @author rdvdev2 (rdvdev2@gmail.com)
+ */
+package com.rdvdev2.TimeTravelMod.api;
\ No newline at end of file
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/api/timemachine/TimeMachine.java b/src/main/java/com/rdvdev2/TimeTravelMod/api/timemachine/TimeMachine.java
new file mode 100644
index 0000000..95f5851
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/api/timemachine/TimeMachine.java
@@ -0,0 +1,210 @@
+package com.rdvdev2.TimeTravelMod.api.timemachine;
+
+import com.rdvdev2.TimeTravelMod.api.dimension.TimeLine;
+import com.rdvdev2.TimeTravelMod.api.timemachine.block.TimeMachineControlPanelBlock;
+import com.rdvdev2.TimeTravelMod.api.timemachine.block.TimeMachineCoreBlock;
+import com.rdvdev2.TimeTravelMod.api.timemachine.block.TimeMachineUpgradeBlock;
+import com.rdvdev2.TimeTravelMod.api.timemachine.exception.IncompatibleTimeMachineHooksException;
+import com.rdvdev2.TimeTravelMod.api.timemachine.upgrade.TimeMachineUpgrade;
+import net.fabricmc.fabric.api.dimension.v1.EntityPlacer;
+import net.minecraft.block.BlockState;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.PlayerEntity;
+import net.minecraft.text.TranslatableText;
+import net.minecraft.util.math.BlockPos;
+import net.minecraft.util.math.Box;
+import net.minecraft.util.math.Direction;
+import net.minecraft.world.World;
+
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * The Time Machine object with all it's functionality
+ */
+public interface TimeMachine extends TimeMachineTemplate {
+
+ /**
+ * Returns the name of the Time Machine for use in GUIs
+ * @return The name of the Time Machine as a {@link TranslatableText}
+ */
+ TranslatableText getName();
+
+ /**
+ * Returns the description of the Time Machine for use in GUIs
+ * @return The description of the Time Machine as a {@link TranslatableText}
+ */
+ TranslatableText getDescription();
+
+ /**
+ * Returns the valid {@link BlockState}(s) for {@link TimeMachineUpgradeBlock}s
+ * @return Array of valid {@link BlockState}s for {@link TimeMachineUpgradeBlock}s
+ */
+ BlockState[] getUpgradeBlocks();
+
+ /**
+ * Returns all the compatible {@link TimeMachineUpgradeBlock}s
+ * @return An array including all compatible {@link TimeMachineUpgradeBlock}s
+ */
+ TimeMachineUpgrade[] getCompatibleUpgrades();
+
+ /**
+ * Returns the {@link BlockPos} where there must be a {@link TimeMachineCoreBlock} relatively to a compatible {@link TimeMachineControlPanelBlock}
+ * @param side The orientation from wich the Time Machine is being operated
+ * @return List of {@link BlockPos} where there must be a {@link TimeMachineCoreBlock}
+ */
+ List getCoreBlocksPos(Direction side);
+
+ /**
+ * Returns the {@link BlockPos} where there must be a Time Machine Basic Block or a {@link TimeMachineUpgradeBlock} relatively to a compatible {@link TimeMachineControlPanelBlock}
+ * @param side The orientation from wich the Time Machine is being operated
+ * @return List of {@link BlockPos} where there must be a Time Machine Basic Block or a {@link TimeMachineUpgradeBlock}
+ */
+ List getBasicBlocksPos(Direction side);
+
+ /**
+ * Returns the {@link BlockPos} where there must be air relatively to a compatible {@link TimeMachineControlPanelBlock}
+ * @param side The orientation from wich the Time Machine is being operated
+ * @return List of {@link BlockPos} where there must be a Time Machine Core
+ */
+ List getAirBlocksPos(Direction side);
+
+ /**
+ * Returns the absolute {@link BlockPos} where the {@link TimeMachineUpgrade}s are found
+ * @param upgrade The specific {@link TimeMachineUpgrade} to search for
+ * @return The {@link BlockPos} of the blocks containing the {@link TimeMachineUpgrade}. Empty if the {@link TimeMachineUpgrade}s aren't applied.
+ */
+ HashSet getUpgradePos(TimeMachineUpgrade upgrade);
+
+ /**
+ * Returns the valid {@link BlockState}(s) used to build this Time Machine
+ * @return An array including all the valid {@link BlockState}s
+ */
+ BlockState[] getBlocks();
+
+ /**
+ * Applies all the {@link TimeMachineUpgrade}s installed in a built Time Machine
+ * @param world The {@link World} where the Time Machine is built
+ * @param controllerPos The {@link BlockPos} of the {@link TimeMachineControlPanelBlock}
+ * @param side The orientation of the Time Machine
+ * @return A new Time Machine object with the necesary {@link TimeMachineUpgrade}s applied
+ * @throws IncompatibleTimeMachineHooksException Throwed if an incompatible {@link TimeMachineUpgrade} is detected
+ */
+ TimeMachine hook(World world, BlockPos controllerPos, Direction side) throws IncompatibleTimeMachineHooksException;
+
+ /**
+ * Removes all the applied {@link TimeMachineUpgrade}s in the Time Machine
+ * @return The original Time Machine object
+ */
+ TimeMachine removeHooks();
+
+ /**
+ * Detects all the {@link TimeMachineUpgrade}s installed in a built Time Machine
+ * @param world The {@link World} where the Time Machine is built
+ * @param controllerPos The {@link BlockPos} of the {@link TimeMachineControlPanelBlock}
+ * @param side The orientation of the Time Machine
+ * @return A {@link Map} including all the installed {@link TimeMachineUpgrade}s and the {@link BlockPos} of the blocks that added them, relative to the {@link TimeMachineControlPanelBlock}
+ */
+ Map> getUpgrades(World world, BlockPos controllerPos, Direction side);
+
+ /**
+ * Starts the Time Machine and shows the {@link TimeLine} selection GUI to the {@link PlayerEntity}
+ * @param world The {@link World} where the Time Machine is built
+ * @param playerIn The {@link PlayerEntity} using the Time Machine
+ * @param controllerPos The {@link BlockPos} of the {@link TimeMachineControlPanelBlock}
+ * @param side The orientation of the Time Machine
+ */
+ void run(World world, PlayerEntity playerIn, BlockPos controllerPos, Direction side);
+
+ /**
+ * Tries to trigger a temporal explosion on every {@link TimeMachineCoreBlock} using the defined chance on the template
+ * @param world The {@link World} where the Time Machine is built
+ * @param controllerPos The {@link BlockPos} of the {@link TimeMachineControlPanelBlock}
+ * @param side The orientation of the Time Machine
+ * @return Whether any of the {@link TimeMachineCoreBlock}s exploded
+ */
+ boolean triggerTemporalExplosion(World world, BlockPos controllerPos, Direction side);
+
+ /**
+ * Checks if the Time Machine is correctly built
+ * @param world The {@link World} where the Time Machine is built
+ * @param controllerPos The {@link BlockPos} of the {@link TimeMachineControlPanelBlock}
+ * @param side The orientation of the Time Machine
+ * @return Whether the Time Machine is correctly built or not
+ */
+ boolean isBuilt(World world, BlockPos controllerPos, Direction side);
+
+ /**
+ * Checks if the {@link TimeMachineCoreBlock}s are cooled down
+ * @param world The {@link World} where the Time Machine is built
+ * @param controllerPos The {@link BlockPos} of the {@link TimeMachineControlPanelBlock}
+ * @param side The orientation of the Time Machine
+ * @return Whether the {@link TimeMachineCoreBlock}s are cooled down
+ */
+ boolean isCooledDown(World world, BlockPos controllerPos, Direction side);
+
+ /**
+ * Checks if the Time Machine is overloaded
+ * @param world The {@link World} where the Time Machine is built
+ * @param controllerPos The {@link BlockPos} of the {@link TimeMachineControlPanelBlock}
+ * @param side The orientation of the Time Machine
+ * @return Whether the Time Machine is overloaded
+ */
+ boolean isOverloaded(World world, BlockPos controllerPos, Direction side);
+
+ /**
+ * Checks if the given {@link PlayerEntity} is inside the Time Machine
+ * @param world The {@link World} where the Time Machine is built
+ * @param controllerPos The {@link BlockPos} of the {@link TimeMachineControlPanelBlock}
+ * @param side The orientation of the Time Machine
+ * @param player The {@link PlayerEntity} to check
+ * @return Whether the {@link PlayerEntity} is inside the Time Machine
+ */
+ boolean isPlayerInside(World world, BlockPos controllerPos, Direction side, PlayerEntity player);
+
+ /**
+ * Returns all the {@link Entity}s inside the Time Machine
+ * @param world The {@link World} where the Time Machine is built
+ * @param controllerPos The {@link BlockPos} of the {@link TimeMachineControlPanelBlock}
+ * @param side The orientation of the Time Machine
+ * @return A list including all the {@link Entity}s inside the Time Machine
+ */
+ List getEntitiesInside(World world, BlockPos controllerPos, Direction side);
+
+ /**
+ * Returns the air space inside the Time Machine
+ * @param controllerPos The {@link BlockPos} of the {@link TimeMachineControlPanelBlock}
+ * @param side The orientation of the Time Machine
+ * @return A {@link Box} defining the boundaries of the air space
+ */
+ Box getAirSpace(BlockPos controllerPos, Direction side);
+
+ /**
+ * Does the tasks of a {@link EntityPlacer} when a time travel starts
+ * @param entity The traveling {@link Entity}
+ * @param worldIn The source {@link World}
+ * @param worldOut The target {@link World}
+ * @param controllerPos The {@link BlockPos} of the {@link TimeMachineControlPanelBlock}
+ * @param side The orientation of the Time Machine
+ * @param shouldBuild If true, the Time Machine transportation should be triggered
+ */
+ void teleporterTasks(Entity entity, World worldIn, World worldOut, BlockPos controllerPos, Direction side, boolean shouldBuild);
+
+ /**
+ * Triggers the cooldown on all the used {@link TimeMachineCoreBlock}s
+ * @param worldIn The {@link World} of the new Time Machine
+ * @param controllerPos The {@link BlockPos} of the new {@link TimeMachineControlPanelBlock}
+ * @param side The orientation of the Time Machine
+ */
+ void doCooldown(World worldIn, BlockPos controllerPos, Direction side);
+
+ /**
+ * Constructs a new Time Machine using a given {@link TimeMachineTemplate}
+ * @param template The {@link TimeMachineTemplate} to use
+ * @return The new Time Machine
+ */
+ static TimeMachine fromTemplate(TimeMachineTemplate template) {
+ return new com.rdvdev2.TimeTravelMod.common.timemachine.TimeMachine(template);
+ }
+}
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/api/timemachine/TimeMachineTemplate.java b/src/main/java/com/rdvdev2/TimeTravelMod/api/timemachine/TimeMachineTemplate.java
new file mode 100644
index 0000000..2dd82d6
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/api/timemachine/TimeMachineTemplate.java
@@ -0,0 +1,84 @@
+package com.rdvdev2.TimeTravelMod.api.timemachine;
+
+import com.rdvdev2.TimeTravelMod.api.dimension.Corruption;
+import com.rdvdev2.TimeTravelMod.api.timemachine.block.TimeMachineControlPanelBlock;
+import com.rdvdev2.TimeTravelMod.api.timemachine.block.TimeMachineCoreBlock;
+import com.rdvdev2.TimeTravelMod.api.timemachine.block.TimeMachineUpgradeBlock;
+import net.minecraft.block.BlockState;
+import net.minecraft.util.math.BlockPos;
+
+import java.util.List;
+
+/**
+ * Template that defines the behaviour and the aspect of a {@link TimeMachine}
+ */
+public interface TimeMachineTemplate {
+
+ /**
+ * Returns the cooldown time of the core
+ * @return Cooldown time in game ticks (1s = 20t)
+ */
+ default int getCooldownTime() {
+ return 400;
+ }
+
+ /**
+ * Returns the {@link TimeMachine} tier
+ * @return The {@link TimeMachine} tier
+ */
+ default int getTier() {
+ return 1;
+ }
+
+ /**
+ * Returns the position(s) where there must be a {@link TimeMachineCoreBlock} relatively to a compatible {@link TimeMachineControlPanelBlock} facing north
+ * @return Array of {@link BlockPos} where must be a {@link TimeMachineCoreBlock}
+ */
+ List coreBlocksPos();
+
+ /**
+ * Returns the position(s) where must be a Time Machine Basic Block or a {@link TimeMachineUpgradeBlock} relatively to a compatible {@link TimeMachineControlPanelBlock} facing north
+ * @return Array of {@link BlockPos} where must be a Time Machine Basic Block or a {@link TimeMachineUpgradeBlock}
+ */
+ List basicBlocksPos();
+
+ /**
+ * Returns the position(s) where must be air relatively to a compatible {@link TimeMachineControlPanelBlock} facing north
+ * @return Array of {@link BlockPos} where must be air
+ */
+ List airBlocksPos();
+
+ /**
+ * Returns the valid {@link BlockState}(s) for {@link TimeMachineControlPanelBlock} blocks
+ * @return Array of valid {@link BlockState}s for {@link TimeMachineControlPanelBlock} blocks
+ */
+ BlockState[] getControllerBlocks();
+
+ /**
+ * Returns the valid {@link BlockState}(s) for Time Machine Blocks
+ * @return Array of valid {@link BlockState}s for Time Machine Blocks
+ */
+ BlockState[] getCoreBlocks();
+
+ /**
+ * Returns the valid {@link BlockState}(s) for Time Machine Basic Blocks
+ * @return Array of valid {@link BlockState}s for Time Machine Basic Blocks
+ */
+ BlockState[] getBasicBlocks();
+
+ /**
+ * Returns the maximum quantity of {@link net.minecraft.entity.Entity}s that the {@link TimeMachine} can transport
+ * @return The {@link TimeMachine} maximum {@link net.minecraft.entity.Entity} load
+ */
+ default int getEntityMaxLoad() {
+ return 1;
+ }
+
+ /**
+ * When higher, more {@link Corruption} will be caused by the {@link net.minecraft.entity.Entity}
+ * @return The {@link Corruption} multiplier
+ */
+ default int getCorruptionMultiplier() {
+ return 1;
+ }
+}
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/api/timemachine/block/TimeMachineControlPanelBlock.java b/src/main/java/com/rdvdev2/TimeTravelMod/api/timemachine/block/TimeMachineControlPanelBlock.java
new file mode 100644
index 0000000..fc83ec8
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/api/timemachine/block/TimeMachineControlPanelBlock.java
@@ -0,0 +1,57 @@
+package com.rdvdev2.TimeTravelMod.api.timemachine.block;
+
+import com.google.common.collect.Lists;
+import com.rdvdev2.TimeTravelMod.ModRegistries;
+import com.rdvdev2.TimeTravelMod.api.timemachine.TimeMachine;
+import com.rdvdev2.TimeTravelMod.api.timemachine.exception.IncompatibleTimeMachineHooksException;
+import com.rdvdev2.TimeTravelMod.common.timemachine.TimeMachineManager;
+import com.rdvdev2.TimeTravelMod.common.util.TimeMachineUtils;
+import net.minecraft.block.Block;
+import net.minecraft.block.BlockState;
+import net.minecraft.entity.player.PlayerEntity;
+import net.minecraft.text.TranslatableText;
+import net.minecraft.util.ActionResult;
+import net.minecraft.util.Hand;
+import net.minecraft.util.hit.BlockHitResult;
+import net.minecraft.util.math.BlockPos;
+import net.minecraft.util.math.Direction;
+import net.minecraft.world.World;
+
+/**
+ * This subclass of block is meant to be used on blocks that will act as a Time Machine Control Panel.
+ * This block will provide a GUI to control the Time Machine on right click without needing to overwrite nothing on the class.
+ */
+public class TimeMachineControlPanelBlock extends Block {
+
+ /**
+ * @see Block#Block(Settings)
+ */
+ public TimeMachineControlPanelBlock(Settings properties) {
+ super(properties);
+ }
+
+ /**
+ * Returns the {@link TimeMachine} that belongs to this block
+ * @return The compatible {@link TimeMachine}
+ */
+ public final TimeMachine getTimeMachine(BlockState state) {
+ return ModRegistries.TIME_MACHINES.get(TimeMachineManager.getStateToTm().get(state));
+ }
+
+ @Override
+ public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) {
+ Direction side = hit.getSide();
+ if (!world.isClient && !(side == Direction.UP || side == Direction.DOWN)) {
+ TimeMachine hookRunner;
+ try {
+ hookRunner = getTimeMachine(state).hook(world, pos, side);
+ hookRunner.run(world, player, pos, side);
+ return ActionResult.SUCCESS;
+ } catch (IncompatibleTimeMachineHooksException e) {
+ TranslatableText message = new TranslatableText("timetravelmod.error.uncompatible_upgrades", TimeMachineUtils.concatUncompatibilities(Lists.newArrayList(e.getIncompatibilities())));
+ player.addChatMessage(message, false);
+ return ActionResult.FAIL;
+ }
+ } else return ActionResult.FAIL;
+ }
+}
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/api/timemachine/block/TimeMachineCoreBlock.java b/src/main/java/com/rdvdev2/TimeTravelMod/api/timemachine/block/TimeMachineCoreBlock.java
new file mode 100644
index 0000000..a94020e
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/api/timemachine/block/TimeMachineCoreBlock.java
@@ -0,0 +1,109 @@
+package com.rdvdev2.TimeTravelMod.api.timemachine.block;
+
+import com.rdvdev2.TimeTravelMod.common.block.blockentity.TMCooldownBlockEntity;
+import com.rdvdev2.TimeTravelMod.common.world.TemporalExplosion;
+import net.minecraft.block.Block;
+import net.minecraft.block.BlockEntityProvider;
+import net.minecraft.block.BlockState;
+import net.minecraft.block.Blocks;
+import net.minecraft.block.entity.BlockEntity;
+import net.minecraft.entity.player.PlayerEntity;
+import net.minecraft.state.StateManager;
+import net.minecraft.state.property.BooleanProperty;
+import net.minecraft.util.math.BlockPos;
+import net.minecraft.world.BlockView;
+import net.minecraft.world.World;
+
+import java.util.Random;
+
+/**
+ * Blocks that pretend to act as a Time Machine Core must extend from this class.
+ * Subclasses of this will have a cooldown and a random explosion chance integrated without needing to overwrite nothing on the class.
+ */
+public class TimeMachineCoreBlock extends Block implements BlockEntityProvider {
+
+ /**
+ * This property represents whether the core is ready (isn't cooling down)
+ */
+ public static final BooleanProperty TM_READY = BooleanProperty.of("ready");
+
+ /**
+ * @see Block#Block(Settings)
+ */
+ public TimeMachineCoreBlock(Settings properties) {
+ super(properties);
+ setDefaultState(getStateManager().getDefaultState().with(TM_READY, true));
+ }
+
+ /**
+ * Gets the chance of the Time Machine Core to explode
+ * @return The chance (x/1)
+ */
+ public float getRandomExplosionChance() {
+ return 0.001F;
+ }
+
+ /**
+ * @see Block#appendProperties(StateManager.Builder)
+ */
+ @Override
+ protected void appendProperties(StateManager.Builder builder) {
+ builder.add(TM_READY);
+ }
+
+ /**
+ * @see BlockEntityProvider#createBlockEntity(BlockView)
+ */
+ @Override
+ public BlockEntity createBlockEntity(BlockView view) {
+ return new TMCooldownBlockEntity();
+ }
+
+ /**
+ * Triggers a Time Machine Core random explosion
+ * @param world The {@link World} where the Time Machine Core is
+ * @param pos The {@link BlockPos} of the Time Machine Core
+ * @param aportation The extra chance of the Time Machine Core to explode (It is summed to the base one)
+ * @return True if the Time Machine Core exploded
+ */
+ public final boolean randomExplosion(World world, BlockPos pos, float aportation) {
+ Random r = new Random();
+ if (r.nextFloat() < getRandomExplosionChance()+aportation) {
+ world.setBlockState(pos, Blocks.AIR.getDefaultState());
+ new TemporalExplosion(world, null, pos, 4.0F).explode();
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Triggers a Time Machine Core random explosion with it's default explosion chance
+ * @param world The {@link World} where the Time Machine Core is
+ * @param pos The {@link BlockPos} of the Time Machine Core
+ * @return True if the Time Machine Core exploded
+ */
+ public final boolean randomExplosion(World world, BlockPos pos) {
+ return randomExplosion(world, pos, 0);
+ }
+
+ /**
+ * Trigger a Time Machine Core explosion
+ * @param world The {@link World} where the Time Machine Core is
+ * @param pos The {@link BlockPos} of the Time Machine Core
+ * @return True if the Time Machine Core exploded (This should be always true)
+ */
+ public final boolean forceExplosion(World world, BlockPos pos) {
+ return randomExplosion(world, pos, 1);
+ }
+
+ /**
+ * @see Block#onBreak(World, BlockPos, BlockState, PlayerEntity)
+ */
+ @Override
+ public void onBreak(World world, BlockPos pos, BlockState state, PlayerEntity player) {
+ super.onBreak(world, pos, state, player);
+ if (!state.get(TM_READY)) {
+ forceExplosion(world.getWorld(), pos);
+ }
+ }
+}
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/api/timemachine/block/TimeMachineUpgradeBlock.java b/src/main/java/com/rdvdev2/TimeTravelMod/api/timemachine/block/TimeMachineUpgradeBlock.java
new file mode 100644
index 0000000..3d080d7
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/api/timemachine/block/TimeMachineUpgradeBlock.java
@@ -0,0 +1,35 @@
+package com.rdvdev2.TimeTravelMod.api.timemachine.block;
+
+import com.rdvdev2.TimeTravelMod.api.timemachine.upgrade.TimeMachineUpgrade;
+import com.rdvdev2.TimeTravelMod.common.timemachine.TimeMachineManager;
+import net.minecraft.block.Block;
+import net.minecraft.util.registry.Registry;
+
+/**
+ * Blocks that pretend to act as a Time Machine Upgrade must extend from this class.
+ * Subclasses will provide the specified Time Machine Upgrade without needing to overwrite nothing on the class.
+ */
+public class TimeMachineUpgradeBlock extends Block {
+
+ private TimeMachineUpgrade upgrade;
+
+ /**
+ * This works exactly as {@link Block#Block(Settings)}, but you also have to provide the {@link TimeMachineUpgrade} associated to this block.
+ * @param properties {@link Block#Block(Settings)}
+ * @param upgrade The {@link TimeMachineUpgrade} associated to this block
+ */
+ public TimeMachineUpgradeBlock(Settings properties, TimeMachineUpgrade upgrade) {
+ super(properties);
+ this.upgrade = upgrade;
+ TimeMachineManager.addUpgradeToBlockEntry(getUpgrade(), this);
+ }
+
+ /**
+ * Returns the attached {@link TimeMachineUpgrade}
+ * @return The attached {@link TimeMachineUpgrade}
+ */
+ public TimeMachineUpgrade getUpgrade() {
+ if (this.upgrade == null) throw new NullPointerException("Tried to access to the TimeMachineUpgrade of an unconfigured block (" + Registry.BLOCK.getId(this) + ")");
+ return this.upgrade;
+ }
+}
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/api/timemachine/block/package-info.java b/src/main/java/com/rdvdev2/TimeTravelMod/api/timemachine/block/package-info.java
new file mode 100644
index 0000000..84fab31
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/api/timemachine/block/package-info.java
@@ -0,0 +1,4 @@
+/**
+ * This package contains all the block superclasses that implement some functionality of the Time Machines
+ */
+package com.rdvdev2.TimeTravelMod.api.timemachine.block;
\ No newline at end of file
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/api/timemachine/exception/IncompatibleTimeMachineHooksException.java b/src/main/java/com/rdvdev2/TimeTravelMod/api/timemachine/exception/IncompatibleTimeMachineHooksException.java
new file mode 100644
index 0000000..3cfd957
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/api/timemachine/exception/IncompatibleTimeMachineHooksException.java
@@ -0,0 +1,30 @@
+package com.rdvdev2.TimeTravelMod.api.timemachine.exception;
+
+import com.rdvdev2.TimeTravelMod.api.timemachine.TimeMachine;
+import com.rdvdev2.TimeTravelMod.api.timemachine.upgrade.TimeMachineUpgrade;
+
+import java.util.Set;
+
+/**
+ * This {@link Exception} is throwed whenever an incompatible {@link TimeMachineUpgrade} is used on a {@link TimeMachine}
+ */
+public class IncompatibleTimeMachineHooksException extends Throwable {
+
+ private Set incompatibilities;
+
+ /**
+ * Constructor of the {@link Exception}. Takes a {@link Set} with all the incompatibilities.
+ * @param incompatibilities A {@link Set} containing all the incompatible {@link TimeMachineUpgrade}s
+ */
+ public IncompatibleTimeMachineHooksException(Set incompatibilities) {
+ this.incompatibilities = incompatibilities;
+ }
+
+ /**
+ * Returns a {@link Set} with all the incompatibilities.
+ * @return A {@link Set} containing all the incompatible {@link TimeMachineUpgrade}s
+ */
+ public Set getIncompatibilities() {
+ return incompatibilities;
+ }
+}
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/api/timemachine/exception/package-info.java b/src/main/java/com/rdvdev2/TimeTravelMod/api/timemachine/exception/package-info.java
new file mode 100644
index 0000000..c5180ab
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/api/timemachine/exception/package-info.java
@@ -0,0 +1,4 @@
+/**
+ * This package contains all the exceptions related to Time Machines
+ */
+package com.rdvdev2.TimeTravelMod.api.timemachine.exception;
\ No newline at end of file
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/api/timemachine/package-info.java b/src/main/java/com/rdvdev2/TimeTravelMod/api/timemachine/package-info.java
new file mode 100644
index 0000000..3a5cd10
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/api/timemachine/package-info.java
@@ -0,0 +1,4 @@
+/**
+ * This package contains all the API classes related to Time Machines and it's components.
+ */
+package com.rdvdev2.TimeTravelMod.api.timemachine;
\ No newline at end of file
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/api/timemachine/upgrade/TimeMachineHook.java b/src/main/java/com/rdvdev2/TimeTravelMod/api/timemachine/upgrade/TimeMachineHook.java
new file mode 100644
index 0000000..0e1a917
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/api/timemachine/upgrade/TimeMachineHook.java
@@ -0,0 +1,162 @@
+package com.rdvdev2.TimeTravelMod.api.timemachine.upgrade;
+
+import com.rdvdev2.TimeTravelMod.api.dimension.TimeLine;
+import com.rdvdev2.TimeTravelMod.api.timemachine.TimeMachine;
+import com.rdvdev2.TimeTravelMod.api.timemachine.TimeMachineTemplate;
+import com.rdvdev2.TimeTravelMod.api.timemachine.block.TimeMachineControlPanelBlock;
+import com.rdvdev2.TimeTravelMod.api.timemachine.block.TimeMachineCoreBlock;
+import com.rdvdev2.TimeTravelMod.api.timemachine.block.TimeMachineUpgradeBlock;
+import net.fabricmc.fabric.api.dimension.v1.EntityPlacer;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.PlayerEntity;
+import net.minecraft.util.math.BlockPos;
+import net.minecraft.util.math.Direction;
+import net.minecraft.world.World;
+
+import java.util.Optional;
+
+/**
+ * This interface represents Time Machine Hooks. Hooks are activated using {@link TimeMachineUpgradeBlock} and they allow to change the behaviour of the {@link TimeMachine}.
+ * {@link Void} hooks will totally replace the behaviour of the original function.
+ * Non void hooks will replace the original behaviour if they run in exclusive mode. Otherwise they will modify the returned value of the original function or another hook.
+ * @param The return type of the hook
+ */
+public interface TimeMachineHook {
+
+ @Deprecated
+ R run(Optional original, TimeMachine tm, Object... args);
+
+ /**
+ * @see TimeMachine#run(World, PlayerEntity, BlockPos, Direction)
+ */
+ interface RunHook extends TimeMachineHook {
+
+ @Override
+ default Void run(Optional original, TimeMachine tm, Object... args) {
+ run(tm, (World) args[0], (PlayerEntity) args[1], (BlockPos) args[2], (Direction) args[3]);
+ return null;
+ }
+
+ /**
+ * Starts the {@link TimeMachine} and shows the {@link TimeLine} selection GUI to the {@link PlayerEntity}
+ * @param tm The hooked {@link TimeMachine}
+ * @param world The {@link World} where the {@link TimeMachine} is built
+ * @param playerIn The {@link PlayerEntity} using the {@link TimeMachine}
+ * @param controllerPos The {@link BlockPos} of the {@link TimeMachineControlPanelBlock}
+ * @param side The orientation of the {@link TimeMachine}
+ */
+ void run(TimeMachine tm, World world, PlayerEntity playerIn, BlockPos controllerPos, Direction side);
+ }
+
+ /**
+ * @see TimeMachineTemplate#getTier()
+ */
+ interface TierHook extends TimeMachineHook {
+
+ @Override
+ default Integer run(Optional original, TimeMachine tm, Object... args) {
+ return run(original, tm);
+ }
+
+ /**
+ * Returns the {@link TimeMachine} tier
+ * @param original The original return value
+ * @param tm The hooked {@link TimeMachine}
+ * @return The {@link TimeMachine} tier
+ */
+ int run(Optional original, TimeMachine tm);
+ }
+
+ /**
+ * @see TimeMachineTemplate#getEntityMaxLoad()
+ */
+ interface EntityMaxLoadHook extends TimeMachineHook {
+
+ @Override
+ default Integer run(Optional original, TimeMachine tm, Object... args) {
+ return run(original, tm);
+ }
+
+ /**
+ * Returns the maximum quantity of {@link net.minecraft.entity.Entity}s that the {@link TimeMachine} can transport
+ * @param original The original return value
+ * @param tm The hooked {@link TimeMachine}
+ * @return The {@link TimeMachine} maximum {@link net.minecraft.entity.Entity} load
+ */
+ int run(Optional original, TimeMachine tm);
+ }
+
+ /**
+ * @see TimeMachineTemplate#getCooldownTime()
+ */
+ public interface CooldownHook extends TimeMachineHook {
+ @Override
+ default Integer run(Optional original, TimeMachine tm, Object... args) {
+ return run(original, tm);
+ }
+
+ /**
+ * Returns the cooldown time of the core
+ * @param original The original return value
+ * @param tm The hooked {@link TimeMachine}
+ * @return Cooldown time in game ticks (1s = 20t)
+ */
+ int run(Optional original, TimeMachine tm);
+ }
+
+ /**
+ * @see TimeMachine#triggerTemporalExplosion(World, BlockPos, Direction)
+ */
+ public interface TriggerTemporalExplosionHook extends TimeMachineHook {
+ @Override
+ default Boolean run(Optional original, TimeMachine tm, Object... args) {
+ return run(original, tm, (World) args[0], (BlockPos) args[1], (Direction) args[2]);
+ }
+
+ /**
+ * Tries to trigger a temporal explosion on every {@link TimeMachineCoreBlock} using the defined chance on the template
+ * @param original The original return value
+ * @param tm The hooked {@link TimeMachine}
+ * @param world The {@link World} where the {@link TimeMachine} is built
+ * @param controllerPos The {@link BlockPos} of the {@link TimeMachineControlPanelBlock}
+ * @param side The orientation of the {@link TimeMachine}
+ * @return Whether any of the {@link TimeMachineCoreBlock}s exploded
+ */
+ boolean run(Optional original, TimeMachine tm, World world, BlockPos controllerPos, Direction side);
+ }
+
+ /**
+ * @see TimeMachine#teleporterTasks(Entity, World, World, BlockPos, Direction, boolean)
+ */
+ public interface TeleporterTasks extends TimeMachineHook {
+ @Override
+ default Void run(Optional original, TimeMachine tm, Object... args) {
+ run(tm, (Entity) args[0], (World) args[1], (World) args[2], (BlockPos) args[3], (Direction) args[4], (boolean) args[5]);
+ return null;
+ }
+
+ /**
+ * Does the tasks of a {@link EntityPlacer} when a time travel starts
+ * @param tm The hooked {@link TimeMachine}
+ * @param entity The traveling {@link Entity}
+ * @param worldIn The source {@link World}
+ * @param worldOut The target {@link World}
+ * @param controllerPos The {@link BlockPos} of the {@link TimeMachineControlPanelBlock}
+ * @param side The orientation of the {@link TimeMachine}
+ * @param shouldBuild If true, the {@link TimeMachine} transportation should be triggered
+ */
+ void run(TimeMachine tm, Entity entity, World worldIn, World worldOut, BlockPos controllerPos, Direction side, boolean shouldBuild);
+ }
+
+ /**
+ * An array with all the allowed hook types. This is mainly used in the {@link TimeMachineUpgrade} logic.
+ */
+ Class extends TimeMachineHook>>[] HOOK_TYPES = new Class[]{
+ RunHook.class,
+ TierHook.class,
+ EntityMaxLoadHook.class,
+ CooldownHook.class,
+ TriggerTemporalExplosionHook.class,
+ TeleporterTasks.class
+ };
+}
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/api/timemachine/upgrade/TimeMachineUpgrade.java b/src/main/java/com/rdvdev2/TimeTravelMod/api/timemachine/upgrade/TimeMachineUpgrade.java
new file mode 100644
index 0000000..1108683
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/api/timemachine/upgrade/TimeMachineUpgrade.java
@@ -0,0 +1,65 @@
+package com.rdvdev2.TimeTravelMod.api.timemachine.upgrade;
+
+import com.rdvdev2.TimeTravelMod.api.timemachine.TimeMachine;
+import net.minecraft.text.TranslatableText;
+
+/**
+ * Contains all the {@link TimeMachineHook} needed to apply an upgrade to a {@link TimeMachine}. You can compose an upgrade using a builder-like scheme. Objects must be registered to work.
+ */
+public interface TimeMachineUpgrade {
+
+ /**
+ * Adds a {@link TimeMachineHook} to the upgrade. It will run in non exclusive mode.
+ * @param hook The {@link TimeMachineHook} to add
+ * @return The upgrade itself
+ */
+ TimeMachineUpgrade addHook(TimeMachineHook> hook);
+
+ /**
+ * Adds a {@link TimeMachineHook} to the upgrade
+ * @param hook The {@link TimeMachineHook} to add
+ * @param exclusiveMode If true, the {@link TimeMachineHook} will run in exclusive mode
+ * @return The upgrade itself
+ */
+ TimeMachineUpgrade addHook(TimeMachineHook> hook, boolean exclusiveMode);
+
+ /**
+ * Adds one or more {@link TimeMachineHook} to the upgrade. They will run in non exclusive mode
+ * @param hooks The {@link TimeMachineHook} to add
+ * @return The upgrade itself
+ */
+ TimeMachineUpgrade addAllHooks(TimeMachineHook>... hooks);
+
+ /**
+ * Specifies which {@link TimeMachine} are compatible with this upgrade
+ * @param compatibleTMs The list of compatible {@link TimeMachine}
+ * @return The upgrade itself
+ */
+ TimeMachineUpgrade setCompatibleTMs(TimeMachine... compatibleTMs);
+
+ /**
+ * Returns which {@link TimeMachine} are compatible with this upgrade
+ * @return The list of compatible {@link TimeMachine}
+ */
+ TimeMachine[] getCompatibleTMs();
+
+ /**
+ * Returns the name of the upgrade for use in GUIs
+ * @return The name of the upgrade as a {@link TranslatableText}
+ */
+ TranslatableText getName();
+
+ /**
+ * Returns the description of the upgrade for use in GUIs
+ * @return The description of the upgrade as a {@link TranslatableText}
+ */
+ TranslatableText getDescription();
+
+ /**
+ * Constructs a new empty upgrade
+ * @return An empty upgrade
+ */
+ static TimeMachineUpgrade getNew() {
+ return new com.rdvdev2.TimeTravelMod.common.timemachine.upgrade.TimeMachineUpgrade();
+ }
+}
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/api/timemachine/upgrade/package-info.java b/src/main/java/com/rdvdev2/TimeTravelMod/api/timemachine/upgrade/package-info.java
new file mode 100644
index 0000000..e85b407
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/api/timemachine/upgrade/package-info.java
@@ -0,0 +1,4 @@
+/**
+ * This package includes all the API related to the Time Machine Upgrades and Hooks.
+ */
+package com.rdvdev2.TimeTravelMod.api.timemachine.upgrade;
\ No newline at end of file
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/client/MusicManager.java b/src/main/java/com/rdvdev2/TimeTravelMod/client/MusicManager.java
new file mode 100644
index 0000000..a1e807f
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/client/MusicManager.java
@@ -0,0 +1,35 @@
+package com.rdvdev2.TimeTravelMod.client;
+
+import com.rdvdev2.TimeTravelMod.ModConfig;
+import com.rdvdev2.TimeTravelMod.ModSounds;
+import com.rdvdev2.TimeTravelMod.common.world.dimension.oldwest.OldWestDimension;
+import net.fabricmc.api.EnvType;
+import net.fabricmc.api.Environment;
+import net.minecraft.client.MinecraftClient;
+import net.minecraft.client.sound.PositionedSoundInstance;
+import net.minecraft.client.sound.SoundInstance;
+import net.minecraft.sound.SoundCategory;
+
+import java.util.Optional;
+
+@Environment(EnvType.CLIENT)
+public class MusicManager {
+
+ private static final SoundInstance OLDWEST_MUSIC = PositionedSoundInstance.music(ModSounds.OLDWEST_MUSIC);
+
+ public static Optional onPlaySound(SoundInstance originalSound) {
+ if (ModConfig.getInstance().getClient().getEnableTimeLineMusic()) {
+ if (originalSound != null &&
+ MinecraftClient.getInstance().player != null &&
+ MinecraftClient.getInstance().player.world.getDimension() instanceof OldWestDimension &&
+ originalSound.getCategory() == SoundCategory.MUSIC) {
+ if (MinecraftClient.getInstance().getSoundManager().isPlaying(OLDWEST_MUSIC)) {
+ return Optional.empty();
+ } else {
+ return Optional.of(OLDWEST_MUSIC);
+ }
+ }
+ }
+ return Optional.ofNullable(originalSound);
+ }
+}
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/client/gui/EngineerBookScreen.java b/src/main/java/com/rdvdev2/TimeTravelMod/client/gui/EngineerBookScreen.java
new file mode 100644
index 0000000..b1f02f5
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/client/gui/EngineerBookScreen.java
@@ -0,0 +1,371 @@
+package com.rdvdev2.TimeTravelMod.client.gui;
+
+import com.rdvdev2.TimeTravelMod.ModItems;
+import com.rdvdev2.TimeTravelMod.ModRegistries;
+import com.rdvdev2.TimeTravelMod.ModTimeMachines;
+import com.rdvdev2.TimeTravelMod.api.timemachine.upgrade.TimeMachineUpgrade;
+import com.rdvdev2.TimeTravelMod.common.timemachine.CreativeTimeMachine;
+import com.rdvdev2.TimeTravelMod.common.timemachine.TimeMachine;
+import net.minecraft.block.BlockState;
+import net.minecraft.client.MinecraftClient;
+import net.minecraft.client.gui.screen.Screen;
+import net.minecraft.client.gui.widget.AbstractPressableButtonWidget;
+import net.minecraft.client.render.Tessellator;
+import net.minecraft.client.render.item.ItemRenderer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.text.LiteralText;
+import net.minecraft.text.Style;
+import net.minecraft.text.TranslatableText;
+import net.minecraft.util.math.BlockPos;
+import net.minecraft.util.math.Box;
+import net.minecraft.util.math.Direction;
+
+import java.util.*;
+import java.util.stream.Collectors;
+
+public class EngineerBookScreen extends Screen {
+
+ private int tickCount;
+
+ @Override
+ public void tick() {
+ tickCount++;
+ if (tickCount >= 40) tickCount = 0;
+ }
+
+ private ArrayList timeMachineData;
+ private DocsPanel panel;
+ private ItemRenderer itemRenderer;
+ private static HashMap yLevels = new HashMap<>();
+
+ public EngineerBookScreen(Iterator timeMachines) {
+ super(new LiteralText(""));
+
+ timeMachineData = new ArrayList<>();
+
+ int i = 0;
+ while (timeMachines.hasNext()) {
+ com.rdvdev2.TimeTravelMod.api.timemachine.TimeMachine tm = timeMachines.next();
+ TimeMachineData d = new TimeMachineData();
+ d.id = i++;
+ d.name = tm.getName();
+ d.description = tm.getDescription();
+ d.tier = tm.getTier();
+ d.cooldown = tm.getCooldownTime() / 20;
+ if (tm instanceof CreativeTimeMachine) {
+ d.tier++; // Ensure it's the last one in the list
+ timeMachineData.add(d);
+ continue;
+ }
+ d.basicBlocksPos = tm.getBasicBlocksPos(Direction.SOUTH);
+ d.basicBlocks = tm.getBasicBlocks();
+ d.coreBlocksPos = tm.getCoreBlocksPos(Direction.SOUTH);
+ d.coreBlocks = tm.getCoreBlocks();
+ d.controllerBlockPos = new BlockPos(0, 0, 0);
+ d.controllerBlocks = tm.getControllerBlocks();
+ d.upgrades = tm.getCompatibleUpgrades();
+ d.generateBoundingBox(); // For the relocation method
+ d.relocateBlocks(); // Relocate blocks
+ d.generateBoundingBox(); // Regenerate for the blockTypeMap generator
+ d.generateBlockTypeMap(); // Generate the blockTypeMap
+ timeMachineData.add(d);
+ }
+ Collections.sort(timeMachineData);
+ }
+
+ @Override
+ public boolean isPauseScreen() {
+ return false;
+ }
+
+ @Override
+ public void init(MinecraftClient minecraft, int width, int height) {
+ super.init(minecraft, width, height);
+ this.itemRenderer = this.minecraft.getItemRenderer();
+ this.panel = new DocsPanel(this.minecraft, this.width, this.height, 0, 0);
+ this.children.add(0, this.panel);
+ }
+
+ @Override
+ public void render(int p_render_1_, int p_render_2_, float p_render_3_) {
+ if (this.panel != null) {
+ this.panel.render(p_render_1_, p_render_2_, p_render_3_);
+ }
+ }
+
+ @Override
+ public void onClose() {
+ super.onClose();
+ yLevels.clear();
+ }
+
+ private static class TimeMachineData implements Comparable {
+
+ public int id;
+ public TranslatableText name;
+ public TranslatableText description;
+ public int tier;
+ public int cooldown; // in seconds
+ public List basicBlocksPos;
+ public BlockState[] basicBlocks;
+ public List coreBlocksPos;
+ public BlockState[] coreBlocks;
+ public BlockPos controllerBlockPos;
+ public BlockState[] controllerBlocks;
+ public TimeMachineUpgrade[] upgrades;
+
+ public TimeMachine.TimeMachineComponentType[][][] blockTypeMap;
+ public Box boundingBox;
+
+ public void relocateBlocks() {
+ BlockPos translocation = new BlockPos(0 - boundingBox.x1, 0 - boundingBox.y1, 0 - boundingBox.z1);
+ for (int i = 0; i < basicBlocksPos.size(); i++) basicBlocksPos.set(i, basicBlocksPos.get(i).add(translocation));
+ for (int i = 0; i < coreBlocksPos.size(); i++) coreBlocksPos.set(i, coreBlocksPos.get(i).add(translocation));
+ controllerBlockPos = controllerBlockPos.add(translocation);
+ }
+
+ public void generateBlockTypeMap() {
+ blockTypeMap = new TimeMachine.TimeMachineComponentType[(int)boundingBox.y2+1][(int)boundingBox.x2+1][(int)boundingBox.z2+1];
+ for(int y = 0; y <= boundingBox.y2; y++)
+ for(int x = 0; x <= boundingBox.x2; x++)
+ nextPos: for(int z = 0; z <= boundingBox.z2; z++) {
+ for(BlockPos pos: basicBlocksPos) if (pos.equals(new BlockPos(x, y, z))) {
+ blockTypeMap[y][x][z] = TimeMachine.TimeMachineComponentType.BASIC; continue nextPos;
+ }
+ for(BlockPos pos: coreBlocksPos) if (pos.equals(new BlockPos(x, y, z))) {
+ blockTypeMap[y][x][z] = TimeMachine.TimeMachineComponentType.CORE; continue nextPos;
+ }
+ if (controllerBlockPos.equals(new BlockPos(x, y, z))) {
+ blockTypeMap[y][x][z] = TimeMachine.TimeMachineComponentType.CONTROLPANEL;
+ } else blockTypeMap[y][x][z] = TimeMachine.TimeMachineComponentType.AIR;
+ }
+ }
+
+ public void generateBoundingBox() {
+ int minX = 100, minY = 100, minZ = 100;
+ int maxX = -100, maxY = -100, maxZ = -100;
+
+ List allPos = new ArrayList<>(basicBlocksPos.size()+coreBlocksPos.size()+1);
+ allPos.addAll(basicBlocksPos);
+ allPos.addAll(coreBlocksPos);
+ allPos.add(controllerBlockPos);
+
+ for(BlockPos pos: allPos) {
+ if (pos.getX() < minX) minX = pos.getX(); else if (pos.getX() > maxX) maxX = pos.getX();
+ if (pos.getY() < minY) minY = pos.getY(); else if (pos.getY() > maxY) maxY = pos.getY();
+ if (pos.getZ() < minZ) minZ = pos.getZ(); else if (pos.getZ() > maxZ) maxZ = pos.getZ();
+ }
+
+ boundingBox = new Box(minX, minY, minZ, maxX, maxY, maxZ);
+ }
+
+ @Override
+ public int compareTo(TimeMachineData o) {
+ return Integer.compare(this.tier, o.tier);
+ }
+ }
+
+ class DocsPanel extends ScrollPanel {
+
+ private int previousTick = tickCount;
+ private int contentHeight = 0;
+
+ public DocsPanel(MinecraftClient client, int width, int height, int top, int left) {
+ super(client, width, height, top, left);
+ }
+
+ @Override
+ protected int getScrollAmount() {
+ return font.fontHeight * 3;
+ }
+
+ @Override
+ protected int getContentHeight() {
+ return Math.max(contentHeight, height);
+ }
+
+ @Override
+ protected void drawPanel(int entryRight, int relativeY, Tessellator tess, int mouseX, int mouseY) {
+ buttons.clear();
+ int padding = 4;
+ int right = this.left + this.width - 6;
+ right -= 2;
+ int relativeYdiff = 0 - relativeY;
+ relativeY += padding;
+ relativeY += drawCenteredString(ModItems.ENGINEER_BOOK.getName().asString(), width / 2, relativeY, 0xFFD900);
+ relativeY += 2;
+ relativeY += drawSplitString(new TranslatableText("gui.tmengineerbook.introduction").asString(),left + padding, relativeY, (right - padding) - left, 0xFFFFFF);
+ relativeY += 8;
+ relativeY += drawCenteredString(new TranslatableText("gui.tmengineerbook.tms").asString(), width / 2, relativeY, 0xFFD900);
+ relativeY += 2;
+ relativeY += drawSplitString(new TranslatableText("gui.tmengineerbook.tmsintroduction").asString(),left + padding, relativeY, (right - padding) - left, 0xFFFFFF);
+ relativeY += 2;
+ for(TimeMachineData data: timeMachineData) {
+ int tier;
+ boolean hasBuilding;
+ if (data.name.getKey().equals(ModTimeMachines.CREATIVE.getName().getKey())) {
+ tier = data.tier - 1;
+ hasBuilding = false;
+ } else {
+ tier = data.tier;
+ hasBuilding = true;
+ }
+ relativeY += drawString(data.name.setStyle(new Style().setBold(true)).asFormattedString(), left + padding, relativeY, 0xFFFFFF);
+ relativeY += drawString(new TranslatableText("gui.tmengineerbook.tmstats", tier, data.cooldown).asString(), left + padding, relativeY, 0xC98300);
+ relativeY += 2;
+ relativeY += drawSplitString(data.description.asFormattedString(), left + padding, relativeY, (right - padding) - left, 0xFFFFFF);
+ if (hasBuilding) {
+ relativeY += 4;
+ relativeY += drawString(new TranslatableText("gui.tmengineerbook.howto").setStyle(new Style().setUnderline(true)).asFormattedString(), left + padding, relativeY, 0xFFFFFF);
+ relativeY += 2;
+ drawString(new TranslatableText("gui.tmengineerbook.layer", yLevels.getOrDefault(data.id, 0)).asString(), left + padding, relativeY + 6, 0xFFFFFF);
+ int _width = font.getStringWidth(new TranslatableText("gui.tmengineerbook.layer", yLevels.getOrDefault(data.id, 0)).asString());
+ addButton(new yNavButton(left + padding + _width + padding, relativeY, data.id, 0, ((int) data.boundingBox.y2)));
+ addButton(new yNavButton(left + padding + _width + padding + 20 + padding, relativeY, data.id, 1, ((int) data.boundingBox.y2)));
+ buttons.forEach(b -> {
+ if (b instanceof yNavButton && ((yNavButton) b).id == data.id) {
+ b.render(mouseX, mouseY, 0);
+ }
+ });
+ relativeY += 20;
+ relativeY += 2;
+ TimeMachine.TimeMachineComponentType[][] layer = data.blockTypeMap[yLevels.get(data.id)];
+ for (int z = 0; z <= data.boundingBox.z2; z++) {
+ int drawY = z * 22;
+ for (int x = 0; x <= data.boundingBox.x2; x++) {
+ int drawX = x * 22;
+ ItemStack drawItem = getDrawItem(data, layer, z, x);
+ itemRenderer.renderGuiItem(drawItem, left + padding + drawX, relativeY + drawY);
+ }
+ }
+ for (int z = 0; z <= data.boundingBox.z2; z++) {
+ int drawY = z * 22;
+ for (int x = 0; x <= data.boundingBox.x2; x++) {
+ int drawX = x * 22;
+ if (mouseX >= left + padding + drawX && mouseX <= left + padding + drawX + 20 && mouseY >= relativeY + drawY && mouseY <= relativeY + drawY + 20) {
+ ItemStack drawItem = getDrawItem(data, layer, z, x);
+ renderComponentHoverEffect(drawItem.toHoverableText(), mouseX, mouseY);
+ }
+ }
+ }
+ relativeY += data.boundingBox.z2 * 22 + 20;
+ }
+ if (data.upgrades != null && data.upgrades.length != 0) {
+ relativeY += 2;
+ relativeY += drawString(new TranslatableText("gui.tmengineerbook.compatibleupgrades").setStyle(new Style().setUnderline(true)).asFormattedString(), left + padding, relativeY, 0xFFFFFF);
+ for (TimeMachineUpgrade upgrade : data.upgrades) {
+ relativeY += 2;
+ relativeY += drawString(upgrade.getName().asFormattedString(), left + padding, relativeY,0xFFFFFF);
+ }
+ }
+ relativeY += 8;
+ }
+ relativeY += drawCenteredString(new TranslatableText("gui.tmengineerbook.upgrades").asString(), width / 2, relativeY, 0xFFD900);
+ relativeY += 2;
+ Collection upgrades = ModRegistries.UPGRADES.stream().collect(Collectors.toCollection(ArrayList::new));
+ if (upgrades.isEmpty()) {
+ relativeY += drawString(new TranslatableText("gui.tmengineerbook.noupgrades").asString(), left + padding, relativeY, 0xFFFFFF);
+ relativeY += 2;
+ } else for (TimeMachineUpgrade upgrade : upgrades) {
+ relativeY += drawString(upgrade.getName().setStyle(new Style().setBold(true)).asFormattedString(), left + padding, relativeY, 0xFFFFFF);
+ relativeY += 2;
+ relativeY += drawSplitString(upgrade.getDescription().asFormattedString(), left + padding, relativeY, (right - padding) - left, 0xFFFFFF);
+ relativeY += 2;
+ if (upgrade.getCompatibleTMs() != null && upgrade.getCompatibleTMs().length != 0) {
+ relativeY += drawString(new TranslatableText("gui.tmengineerbook.compatibletms").setStyle(new Style().setUnderline(true)).asFormattedString(), left + padding, relativeY, 0xFFFFFF);
+ for (com.rdvdev2.TimeTravelMod.api.timemachine.TimeMachine tm : upgrade.getCompatibleTMs()) {
+ relativeY += 2;
+ relativeY += drawString(tm.getName().asFormattedString(), left + padding, relativeY,0xFFFFFF);
+ }
+ relativeY += 2;
+ }
+ }
+ relativeY += 6;
+
+ contentHeight = relativeY + relativeYdiff;
+ }
+
+ private HashMap currentBasicBlock = new HashMap<>(timeMachineData.size()-1);
+ private HashMap curentCoreBlock = new HashMap<>(timeMachineData.size()-1);
+ private HashMap currentControlPanelBlock = new HashMap<>(timeMachineData.size()-1);
+
+ private ItemStack getDrawItem(TimeMachineData data, TimeMachine.TimeMachineComponentType[][] layer, int z, int x) {
+ int index;
+ switch (layer[x][z]) {
+ case BASIC:
+ if (tickCount < previousTick || !currentBasicBlock.containsKey(data.id)) {
+ index = currentBasicBlock.getOrDefault(data.id, -1) + 1;
+ if (index >= data.basicBlocks.length) index = 0;
+ currentBasicBlock.put(data.id, index);
+ } else {
+ index = currentBasicBlock.get(data.id);
+ }
+ return new ItemStack(data.basicBlocks[index].getBlock());
+ case CORE:
+ if (tickCount < previousTick || !curentCoreBlock.containsKey(data.id)) {
+ index = curentCoreBlock.getOrDefault(data.id, -1) + 1;
+ if (index >= data.coreBlocks.length) index = 0;
+ curentCoreBlock.put(data.id, index);
+ } else {
+ index = curentCoreBlock.get(data.id);
+ }
+ return new ItemStack(data.coreBlocks[index].getBlock());
+ case CONTROLPANEL:
+ if (tickCount < previousTick || !currentControlPanelBlock.containsKey(data.id)) {
+ index = currentControlPanelBlock.getOrDefault(data.id, -1) + 1;
+ if (index >= data.controllerBlocks.length) index = 0;
+ currentControlPanelBlock.put(data.id, index);
+ } else {
+ index = currentControlPanelBlock.get(data.id);
+ }
+ return new ItemStack(data.controllerBlocks[index].getBlock());
+ default:
+ case AIR:
+ return ItemStack.EMPTY;
+ }
+ }
+
+ private int drawCenteredString(String text, int x, int y, int color) {
+ super.drawCenteredString(font, text, x, y, color);
+ return font.fontHeight;
+ }
+
+ private int drawSplitString(String text, int x, int y, int width, int color) {
+ font.drawTrimmed(text, x, y, width, color);
+ return font.wrapStringToWidthAsList(text, width).size() * 9;
+ }
+
+ public int drawString(String text, int x, int y, int color) {
+ drawString(font, text, x, y, color);
+ return font.fontHeight;
+ }
+
+ class yNavButton extends AbstractPressableButtonWidget {
+
+ private final int mode;
+ private final int id;
+ private final int maxY;
+
+ public yNavButton(int x, int y, int id, int mode, int maxY) { // mode 0 -> decrease, 1 -> increase
+ super(x, y, 20, 20, mode == 0 ? "-" : "+");
+ this.id = id;
+ this.mode = mode;
+ this.maxY = maxY;
+ yLevels.putIfAbsent(id, 0);
+ this.active = (mode != 0 || yLevels.get(id) != 0) && (mode != 1 || yLevels.get(id) != maxY);
+ }
+
+ @Override
+ public void onPress() {
+ if((mode == 0 && yLevels.get(id) == 0) || (mode == 1 && yLevels.get(id) == maxY)) return;
+ int yValue = yLevels.get(id);
+ if (mode == 0) {
+ yValue--;
+ } else if (mode == 1) {
+ yValue++;
+ }
+ yLevels.put(id, yValue);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/client/gui/ScrollPanel.java b/src/main/java/com/rdvdev2/TimeTravelMod/client/gui/ScrollPanel.java
new file mode 100644
index 0000000..35718bb
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/client/gui/ScrollPanel.java
@@ -0,0 +1,267 @@
+/*
+ * Minecraft Forge
+ * Copyright (c) 2016-2019.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation version 2.1
+ * of the License.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package com.rdvdev2.TimeTravelMod.client.gui;
+
+import com.mojang.blaze3d.systems.RenderSystem;
+import net.minecraft.client.MinecraftClient;
+import net.minecraft.client.gui.AbstractParentElement;
+import net.minecraft.client.gui.Drawable;
+import net.minecraft.client.gui.DrawableHelper;
+import net.minecraft.client.gui.Element;
+import net.minecraft.client.render.BufferBuilder;
+import net.minecraft.client.render.Tessellator;
+import net.minecraft.client.render.VertexFormats;
+import org.lwjgl.opengl.GL11;
+
+import java.util.Collections;
+import java.util.List;
+
+public abstract class ScrollPanel extends AbstractParentElement implements Drawable
+{
+ private final MinecraftClient client;
+ protected final int width;
+ protected final int height;
+ protected final int top;
+ protected final int bottom;
+ protected final int right;
+ protected final int left;
+ private boolean scrolling;
+ protected float scrollDistance;
+ protected boolean captureMouse = true;
+ protected final int border = 4;
+
+ private final int barWidth = 6;
+ private final int barLeft;
+
+ public ScrollPanel(MinecraftClient client, int width, int height, int top, int left)
+ {
+ this.client = client;
+ this.width = width;
+ this.height = height;
+ this.top = top;
+ this.left = left;
+ this.bottom = height + this.top;
+ this.right = width + this.left;
+ this.barLeft = this.left + this.width - barWidth;
+ }
+
+ protected abstract int getContentHeight();
+
+ protected void drawBackground() {}
+
+ /**
+ * Draw anything special on the screen. GL_SCISSOR is enabled for anything that
+ * is rendered outside of the view box. Do not mess with SCISSOR unless you support this.
+ * @param mouseY
+ * @param mouseX
+ */
+ protected abstract void drawPanel(int entryRight, int relativeY, Tessellator tess, int mouseX, int mouseY);
+
+ protected boolean clickPanel(double mouseX, double mouseY, int button) { return false; }
+
+ private int getMaxScroll()
+ {
+ return this.getContentHeight() - (this.height - this.border);
+ }
+
+ private void applyScrollLimits()
+ {
+ int max = getMaxScroll();
+
+ if (max < 0)
+ {
+ max /= 2;
+ }
+
+ if (this.scrollDistance < 0.0F)
+ {
+ this.scrollDistance = 0.0F;
+ }
+
+ if (this.scrollDistance > max)
+ {
+ this.scrollDistance = max;
+ }
+ }
+
+ @Override
+ public boolean mouseScrolled(double mouseX, double mouseY, double scroll)
+ {
+ if (scroll != 0)
+ {
+ this.scrollDistance += -scroll * getScrollAmount();
+ applyScrollLimits();
+ return true;
+ }
+ return false;
+ }
+
+ protected int getScrollAmount()
+ {
+ return 20;
+ }
+
+ @Override
+ public boolean isMouseOver(double mouseX, double mouseY)
+ {
+ return mouseX >= this.left && mouseX <= this.left + this.width &&
+ mouseY >= this.top && mouseY <= this.bottom;
+ }
+
+ @Override
+ public boolean mouseClicked(double mouseX, double mouseY, int button) {
+ if (super.mouseClicked(mouseX, mouseY, button))
+ return true;
+
+ this.scrolling = button == 0 && mouseX >= barLeft && mouseX < barLeft + barWidth;
+ if (this.scrolling)
+ {
+ return true;
+ }
+ int mouseListY = ((int)mouseY) - this.top - this.getContentHeight() + (int)this.scrollDistance - border;
+ if (mouseX >= left && mouseX <= right && mouseListY < 0)
+ {
+ return this.clickPanel(mouseX - left, mouseY - this.top + (int)this.scrollDistance - border, button);
+ }
+ return false;
+ }
+
+ @Override
+ public boolean mouseReleased(double p_mouseReleased_1_, double p_mouseReleased_3_, int p_mouseReleased_5_) {
+ if (super.mouseReleased(p_mouseReleased_1_, p_mouseReleased_3_, p_mouseReleased_5_))
+ return true;
+ boolean ret = this.scrolling;
+ this.scrolling = false;
+ return ret;
+ }
+
+ private int getBarHeight()
+ {
+ int barHeight = (height * height) / this.getContentHeight();
+
+ if (barHeight < 32) barHeight = 32;
+
+ if (barHeight > height - border*2)
+ barHeight = height - border*2;
+
+ return barHeight;
+ }
+
+ @Override
+ public boolean mouseDragged(double mouseX, double mouseY, int button, double deltaX, double deltaY)
+ {
+ if (this.scrolling)
+ {
+ int maxScroll = height - getBarHeight();
+ double moved = deltaY / maxScroll;
+ this.scrollDistance += getMaxScroll() * moved;
+ applyScrollLimits();
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public void render(int mouseX, int mouseY, float partialTicks)
+ {
+ this.drawBackground();
+
+ Tessellator tess = Tessellator.getInstance();
+ BufferBuilder worldr = tess.getBuffer();
+
+ double scale = client.getWindow().getScaleFactor();
+ GL11.glEnable(GL11.GL_SCISSOR_TEST);
+ GL11.glScissor((int)(left * scale), (int)(client.getWindow().getFramebufferHeight() - (bottom * scale)),
+ (int)(width * scale), (int)(height * scale));
+
+ if (this.client.world != null)
+ {
+ this.drawGradientRect(this.left, this.top, this.right, this.bottom, 0xC0101010, 0xD0101010);
+ }
+ else // Draw dark dirt background
+ {
+ RenderSystem.disableLighting();
+ RenderSystem.disableFog();
+ this.client.getTextureManager().bindTexture(DrawableHelper.BACKGROUND_LOCATION);
+ RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F);
+ final float texScale = 32.0F;
+ worldr.begin(GL11.GL_QUADS, VertexFormats.POSITION_TEXTURE_COLOR);
+ worldr.vertex(this.left, this.bottom, 0.0D).texture(this.left / texScale, (this.bottom + (int)this.scrollDistance) / texScale).color(0x20, 0x20, 0x20, 0xFF).next();
+ worldr.vertex(this.right, this.bottom, 0.0D).texture(this.right / texScale, (this.bottom + (int)this.scrollDistance) / texScale).color(0x20, 0x20, 0x20, 0xFF).next();
+ worldr.vertex(this.right, this.top, 0.0D).texture(this.right / texScale, (this.top + (int)this.scrollDistance) / texScale).color(0x20, 0x20, 0x20, 0xFF).next();
+ worldr.vertex(this.left, this.top, 0.0D).texture(this.left / texScale, (this.top + (int)this.scrollDistance) / texScale).color(0x20, 0x20, 0x20, 0xFF).next();
+ tess.draw();
+ }
+
+ int baseY = this.top + border - (int)this.scrollDistance;
+ this.drawPanel(right, baseY, tess, mouseX, mouseY);
+
+ RenderSystem.disableDepthTest();
+
+ int extraHeight = (this.getContentHeight() + border) - height;
+ if (extraHeight > 0)
+ {
+ int barHeight = getBarHeight();
+
+ int barTop = (int)this.scrollDistance * (height - barHeight) / extraHeight + this.top;
+ if (barTop < this.top)
+ {
+ barTop = this.top;
+ }
+
+ RenderSystem.disableTexture();
+ worldr.begin(GL11.GL_QUADS, VertexFormats.POSITION_TEXTURE_COLOR);
+ worldr.vertex(barLeft, this.bottom, 0.0D).texture(0.0F, 1.0F).color(0x00, 0x00, 0x00, 0xFF).next();
+ worldr.vertex(barLeft + barWidth, this.bottom, 0.0D).texture(1.0F, 1.0F).color(0x00, 0x00, 0x00, 0xFF).next();
+ worldr.vertex(barLeft + barWidth, this.top, 0.0D).texture(1.0F, 0.0F).color(0x00, 0x00, 0x00, 0xFF).next();
+ worldr.vertex(barLeft, this.top, 0.0D).texture(0.0F, 0.0F).color(0x00, 0x00, 0x00, 0xFF).next();
+ tess.draw();
+ worldr.begin(GL11.GL_QUADS, VertexFormats.POSITION_TEXTURE_COLOR);
+ worldr.vertex(barLeft, barTop + barHeight, 0.0D).texture(0.0F, 1.0F).color(0x80, 0x80, 0x80, 0xFF).next();
+ worldr.vertex(barLeft + barWidth, barTop + barHeight, 0.0D).texture(1.0F, 1.0F).color(0x80, 0x80, 0x80, 0xFF).next();
+ worldr.vertex(barLeft + barWidth, barTop, 0.0D).texture(1.0F, 0.0F).color(0x80, 0x80, 0x80, 0xFF).next();
+ worldr.vertex(barLeft, barTop, 0.0D).texture(0.0F, 0.0F).color(0x80, 0x80, 0x80, 0xFF).next();
+ tess.draw();
+ worldr.begin(GL11.GL_QUADS, VertexFormats.POSITION_TEXTURE_COLOR);
+ worldr.vertex(barLeft, barTop + barHeight - 1, 0.0D).texture(0.0F, 1.0F).color(0xC0, 0xC0, 0xC0, 0xFF).next();
+ worldr.vertex(barLeft + barWidth - 1, barTop + barHeight - 1, 0.0D).texture(1.0F, 1.0F).color(0xC0, 0xC0, 0xC0, 0xFF).next();
+ worldr.vertex(barLeft + barWidth - 1, barTop, 0.0D).texture(1.0F, 0.0F).color(0xC0, 0xC0, 0xC0, 0xFF).next();
+ worldr.vertex(barLeft, barTop, 0.0D).texture(0.0F, 0.0F).color(0xC0, 0xC0, 0xC0, 0xFF).next();
+ tess.draw();
+ }
+
+ RenderSystem.enableTexture();
+ RenderSystem.shadeModel(GL11.GL_FLAT);
+ RenderSystem.enableAlphaTest();
+ RenderSystem.disableBlend();
+ GL11.glDisable(GL11.GL_SCISSOR_TEST);
+ }
+
+ protected void drawGradientRect(int left, int top, int right, int bottom, int color1, int color2)
+ {
+ this.fillGradient(top, left, right, bottom, color1, color2);
+ }
+
+ @Override
+ public List extends Element> children()
+ {
+ return Collections.emptyList();
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/client/gui/TimeMachineScreen.java b/src/main/java/com/rdvdev2/TimeTravelMod/client/gui/TimeMachineScreen.java
new file mode 100644
index 0000000..9ec346b
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/client/gui/TimeMachineScreen.java
@@ -0,0 +1,94 @@
+package com.rdvdev2.TimeTravelMod.client.gui;
+
+import com.rdvdev2.TimeTravelMod.ModRegistries;
+import com.rdvdev2.TimeTravelMod.api.dimension.TimeLine;
+import com.rdvdev2.TimeTravelMod.api.timemachine.TimeMachine;
+import com.rdvdev2.TimeTravelMod.api.timemachine.exception.IncompatibleTimeMachineHooksException;
+import com.rdvdev2.TimeTravelMod.common.networking.DimensionTpPKT;
+import net.fabricmc.api.EnvType;
+import net.fabricmc.api.Environment;
+import net.fabricmc.fabric.api.network.ClientSidePacketRegistry;
+import net.minecraft.client.MinecraftClient;
+import net.minecraft.client.gui.screen.Screen;
+import net.minecraft.client.gui.widget.ButtonWidget;
+import net.minecraft.client.resource.language.I18n;
+import net.minecraft.entity.player.PlayerEntity;
+import net.minecraft.text.LiteralText;
+import net.minecraft.text.TranslatableText;
+import net.minecraft.util.math.BlockPos;
+import net.minecraft.util.math.Direction;
+
+import java.util.ArrayList;
+import java.util.Comparator;
+import java.util.List;
+import java.util.UUID;
+import java.util.stream.Collectors;
+
+@Environment(EnvType.CLIENT)
+public class TimeMachineScreen extends Screen {
+
+ private final UUID[] additionalEntities;
+ private PlayerEntity player;
+ private TimeMachine tm;
+ private BlockPos pos;
+ private Direction side;
+
+ public TimeMachineScreen(PlayerEntity player, TimeMachine tm, BlockPos pos, Direction side, UUID... additionalEntities) {
+ super(new LiteralText("TITLE PLACEHOLDER"));
+ this.player = player;
+ try {
+ this.tm = tm.hook(player.world, pos, side);
+ } catch (IncompatibleTimeMachineHooksException e) {
+ throw new RuntimeException("Time Machine GUI opened with invalid upgrade configuration");
+ }
+ this.pos = pos;
+ this.side = side;
+ this.additionalEntities = additionalEntities;
+ }
+
+ @Override
+ public void init() {
+ List tls = ModRegistries.TIME_LINES.stream().collect(Collectors.toCollection(ArrayList::new));
+ tls.sort(Comparator.comparingInt(com.rdvdev2.TimeTravelMod.api.dimension.TimeLine::getMinTier));
+ int buttoncount = tls.size();
+ for(int id = 0; id < tls.size(); id++) {
+ addButton(new TimeLineButton(this.width / 2 -100, (this.height / (buttoncount+1))*(id+1), tls.get(id), this));
+ }
+ }
+
+ @Override
+ public void render(int mouseX, int mouseY, float partialTicks) {
+ this.renderBackground();
+ super.render(mouseX, mouseY, partialTicks);
+ }
+
+ @Override
+ public boolean isPauseScreen() {
+ return false;
+ }
+
+
+ protected class TimeLineButton extends ButtonWidget {
+
+ TimeLine tl;
+ TimeMachineScreen screen;
+
+ TimeLineButton(int x, int y, TimeLine tl, TimeMachineScreen screen) {
+ super(x, y, 200, 20, I18n.translate(String.format("gui.tm.%s.%s", ModRegistries.TIME_LINES.getId(tl).getNamespace(), ModRegistries.TIME_LINES.getId(tl).getPath())), TimeMachineScreen::clickHandler);
+ this.screen = screen;
+ this.tl = tl;
+ this.active = tl.getMinTier() <= tm.getTier();
+ }
+ }
+
+ private static void clickHandler(ButtonWidget button) {
+ TimeLineButton b = (TimeLineButton) button;
+ MinecraftClient.getInstance().openScreen(null);
+ if (b.tl.getDimensionType() != b.screen.player.dimension && com.rdvdev2.TimeTravelMod.common.world.dimension.TimeLine.isValidTimeLine(b.screen.player.world)) {
+ DimensionTpPKT pkt = new DimensionTpPKT(b.tl, b.screen.tm, b.screen.pos, b.screen.side, b.screen.additionalEntities);
+ ClientSidePacketRegistry.INSTANCE.sendToServer(DimensionTpPKT.ID, pkt.encode());
+ } else {
+ b.screen.player.sendMessage(new TranslatableText("gui.tm.error"));
+ }
+ }
+}
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/client/networking/OpenTmGuiPKT.java b/src/main/java/com/rdvdev2/TimeTravelMod/client/networking/OpenTmGuiPKT.java
new file mode 100644
index 0000000..9ef0341
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/client/networking/OpenTmGuiPKT.java
@@ -0,0 +1,36 @@
+package com.rdvdev2.TimeTravelMod.client.networking;
+
+import com.rdvdev2.TimeTravelMod.ModRegistries;
+import net.fabricmc.api.EnvType;
+import net.fabricmc.api.Environment;
+import net.fabricmc.fabric.api.network.PacketContext;
+import net.minecraft.entity.player.PlayerEntity;
+import net.minecraft.util.PacketByteBuf;
+import net.minecraft.util.math.Direction;
+
+import java.util.UUID;
+
+@Environment(EnvType.CLIENT)
+public class OpenTmGuiPKT {
+
+ public static void decode(PacketContext ctx, PacketByteBuf buf) {
+ com.rdvdev2.TimeTravelMod.common.networking.OpenTmGuiPKT pkt = new com.rdvdev2.TimeTravelMod.common.networking.OpenTmGuiPKT();
+ pkt.tm = ModRegistries.TIME_MACHINES.get(buf.readIdentifier());
+ pkt.pos = buf.readBlockPos();
+ pkt.side = buf.readEnumConstant(Direction.class);
+ int size = buf.readInt();
+ for (int i = 0; i < size; i++) {
+ UUID uuid = buf.readUuid();
+ pkt.additionalEntities.add(uuid);
+ }
+
+ handle(pkt, ctx);
+ }
+
+ public static void handle(com.rdvdev2.TimeTravelMod.common.networking.OpenTmGuiPKT pkt, PacketContext ctx) {
+ ctx.getTaskQueue().execute(() -> {
+ PlayerEntity player = net.minecraft.client.MinecraftClient.getInstance().player;
+ net.minecraft.client.MinecraftClient.getInstance().openScreen(new com.rdvdev2.TimeTravelMod.client.gui.TimeMachineScreen(player, pkt.tm, pkt.pos, pkt.side, pkt.additionalEntities.toArray(new UUID[]{})));
+ });
+ }
+}
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/common/block/GunpowderWireBlock.java b/src/main/java/com/rdvdev2/TimeTravelMod/common/block/GunpowderWireBlock.java
new file mode 100644
index 0000000..b72ed17
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/common/block/GunpowderWireBlock.java
@@ -0,0 +1,328 @@
+package com.rdvdev2.TimeTravelMod.common.block;
+
+import com.google.common.collect.ImmutableMap;
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import com.google.common.collect.Sets;
+import net.fabricmc.api.EnvType;
+import net.fabricmc.api.Environment;
+import net.fabricmc.fabric.api.block.FabricBlockSettings;
+import net.minecraft.block.*;
+import net.minecraft.block.enums.WireConnection;
+import net.minecraft.entity.EntityContext;
+import net.minecraft.entity.player.PlayerEntity;
+import net.minecraft.item.ItemPlacementContext;
+import net.minecraft.item.Items;
+import net.minecraft.particle.ParticleTypes;
+import net.minecraft.server.network.ServerPlayerEntity;
+import net.minecraft.sound.SoundEvents;
+import net.minecraft.state.StateManager;
+import net.minecraft.state.property.BooleanProperty;
+import net.minecraft.state.property.EnumProperty;
+import net.minecraft.util.ActionResult;
+import net.minecraft.util.BlockMirror;
+import net.minecraft.util.BlockRotation;
+import net.minecraft.util.Hand;
+import net.minecraft.util.hit.BlockHitResult;
+import net.minecraft.util.math.BlockPos;
+import net.minecraft.util.math.Direction;
+import net.minecraft.util.shape.VoxelShape;
+import net.minecraft.world.BlockView;
+import net.minecraft.world.IWorld;
+import net.minecraft.world.World;
+import net.minecraft.world.WorldView;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+public class GunpowderWireBlock extends Block {
+
+ protected static final VoxelShape[] SHAPES = new VoxelShape[]{Block.createCuboidShape(3.0D, 0.0D, 3.0D, 13.0D, 1.0D, 13.0D), Block.createCuboidShape(3.0D, 0.0D, 3.0D, 13.0D, 1.0D, 16.0D), Block.createCuboidShape(0.0D, 0.0D, 3.0D, 13.0D, 1.0D, 13.0D), Block.createCuboidShape(0.0D, 0.0D, 3.0D, 13.0D, 1.0D, 16.0D), Block.createCuboidShape(3.0D, 0.0D, 0.0D, 13.0D, 1.0D, 13.0D), Block.createCuboidShape(3.0D, 0.0D, 0.0D, 13.0D, 1.0D, 16.0D), Block.createCuboidShape(0.0D, 0.0D, 0.0D, 13.0D, 1.0D, 13.0D), Block.createCuboidShape(0.0D, 0.0D, 0.0D, 13.0D, 1.0D, 16.0D), Block.createCuboidShape(3.0D, 0.0D, 3.0D, 16.0D, 1.0D, 13.0D), Block.createCuboidShape(3.0D, 0.0D, 3.0D, 16.0D, 1.0D, 16.0D), Block.createCuboidShape(0.0D, 0.0D, 3.0D, 16.0D, 1.0D, 13.0D), Block.createCuboidShape(0.0D, 0.0D, 3.0D, 16.0D, 1.0D, 16.0D), Block.createCuboidShape(3.0D, 0.0D, 0.0D, 16.0D, 1.0D, 13.0D), Block.createCuboidShape(3.0D, 0.0D, 0.0D, 16.0D, 1.0D, 16.0D), Block.createCuboidShape(0.0D, 0.0D, 0.0D, 16.0D, 1.0D, 13.0D), Block.createCuboidShape(0.0D, 0.0D, 0.0D, 16.0D, 1.0D, 16.0D)};
+ public static final EnumProperty NORTH = RedstoneWireBlock.WIRE_CONNECTION_NORTH;
+ public static final EnumProperty EAST = RedstoneWireBlock.WIRE_CONNECTION_EAST;
+ public static final EnumProperty SOUTH = RedstoneWireBlock.WIRE_CONNECTION_SOUTH;
+ public static final EnumProperty WEST = RedstoneWireBlock.WIRE_CONNECTION_WEST;
+ public static final BooleanProperty BURNED = BooleanProperty.of("burned");
+ public static final Map> FACING_PROPERTY_MAP = Maps.newEnumMap(ImmutableMap.of(Direction.NORTH, NORTH, Direction.EAST, EAST, Direction.SOUTH, SOUTH, Direction.WEST, WEST));
+ private final Set blocksNeedingUpdate = Sets.newHashSet();
+
+ public GunpowderWireBlock() {
+ super(FabricBlockSettings.of(Material.PART).nonOpaque().hardness(0).collidable(false).build());
+ this.setDefaultState(this.getStateManager().getDefaultState().with(NORTH, WireConnection.NONE).with(EAST, WireConnection.NONE).with(SOUTH, WireConnection.NONE).with(WEST, WireConnection.NONE).with(BURNED, false));
+ }
+
+ @Override
+ public VoxelShape getOutlineShape(BlockState state, BlockView worldIn, BlockPos pos, EntityContext context) {
+ return SHAPES[getAABBIndex(state)];
+ }
+
+ private static int getAABBIndex(BlockState state) {
+ int ret = 0;
+ boolean north = state.get(NORTH) != WireConnection.NONE;
+ boolean east = state.get(EAST) != WireConnection.NONE;
+ boolean south = state.get(SOUTH) != WireConnection.NONE;
+ boolean west = state.get(WEST) != WireConnection.NONE;
+ if (north || south && !north && !east && !west) {
+ ret |= 1 << Direction.NORTH.getHorizontal();
+ }
+
+ if (east || west && !north && !east && !south) {
+ ret |= 1 << Direction.EAST.getHorizontal();
+ }
+
+ if (south || north && !east && !south && !west) {
+ ret |= 1 << Direction.SOUTH.getHorizontal();
+ }
+
+ if (west || east && !north && !south && !west) {
+ ret |= 1 << Direction.WEST.getHorizontal();
+ }
+
+ return ret;
+ }
+
+ @Override
+ public BlockState getPlacementState(ItemPlacementContext ctx) {
+ WorldView iblockreader = ctx.getWorld();
+ BlockPos blockpos = ctx.getBlockPos();
+ return this.getDefaultState().with(WEST, this.getSide(iblockreader, blockpos, Direction.WEST)).with(EAST, this.getSide(iblockreader, blockpos, Direction.EAST)).with(NORTH, this.getSide(iblockreader, blockpos, Direction.NORTH)).with(SOUTH, this.getSide(iblockreader, blockpos, Direction.SOUTH));
+ }
+
+ @Override
+ public BlockState getStateForNeighborUpdate(BlockState state, Direction facing, BlockState neighborState, IWorld world, BlockPos pos, BlockPos neighborPos) {
+ if (facing == Direction.DOWN || state.get(BURNED)) {
+ return state;
+ } else {
+ return facing == Direction.UP ? state.with(WEST, this.getSide(world, pos, Direction.WEST)).with(EAST, this.getSide(world, pos, Direction.EAST)).with(NORTH, this.getSide(world, pos, Direction.NORTH)).with(SOUTH, this.getSide(world, pos, Direction.SOUTH)) : state.with(FACING_PROPERTY_MAP.get(facing), this.getSide(world, pos, facing));
+ }
+ }
+
+ @Override
+ public void method_9517(BlockState state, IWorld world, BlockPos pos, int flags) {
+ try (BlockPos.PooledMutable blockpos$pooledmutableblockpos = BlockPos.PooledMutable.get()) {
+ for(Direction enumfacing : Direction.Type.HORIZONTAL) {
+ WireConnection redstoneside = state.get(FACING_PROPERTY_MAP.get(enumfacing));
+ if (redstoneside != WireConnection.NONE && world.getBlockState(blockpos$pooledmutableblockpos.set(pos).setOffset(enumfacing)).getBlock() != this) {
+ blockpos$pooledmutableblockpos.setOffset(Direction.DOWN);
+ BlockState iblockstate = world.getBlockState(blockpos$pooledmutableblockpos);
+ if (iblockstate.getBlock() != Blocks.OBSERVER) {
+ BlockPos blockpos = blockpos$pooledmutableblockpos.offset(enumfacing.getOpposite());
+ BlockState iblockstate1 = iblockstate.getStateForNeighborUpdate(enumfacing.getOpposite(), world.getBlockState(blockpos), world, blockpos$pooledmutableblockpos, blockpos);
+ replaceBlock(iblockstate, iblockstate1, world, blockpos$pooledmutableblockpos, flags);
+ }
+
+ blockpos$pooledmutableblockpos.set(pos).setOffset(enumfacing).setOffset(Direction.UP);
+ BlockState iblockstate3 = world.getBlockState(blockpos$pooledmutableblockpos);
+ if (iblockstate3.getBlock() != Blocks.OBSERVER) {
+ BlockPos blockpos1 = blockpos$pooledmutableblockpos.offset(enumfacing.getOpposite());
+ BlockState iblockstate2 = iblockstate3.getStateForNeighborUpdate(enumfacing.getOpposite(), world.getBlockState(blockpos1), world, blockpos$pooledmutableblockpos, blockpos1);
+ replaceBlock(iblockstate3, iblockstate2, world, blockpos$pooledmutableblockpos, flags);
+ }
+ }
+ }
+ }
+ }
+
+ private WireConnection getSide(WorldView worldIn, BlockPos pos, Direction face) {
+ BlockPos blockpos = pos.offset(face);
+ BlockState blockstate = worldIn.getBlockState(blockpos);
+ BlockState stateUp = worldIn.getBlockState(pos.up());
+ if (!stateUp.isSimpleFullBlock(worldIn, pos.up())) {
+ boolean flag = Block.isSideSolidFullSquare(blockstate, worldIn, blockpos, Direction.UP) || blockstate.getBlock() == Blocks.HOPPER;
+ if (flag && canConnectTo(worldIn.getBlockState(blockpos.up()))) {
+ if (blockstate.isFullCube(worldIn, blockpos)) {
+ return WireConnection.UP;
+ }
+
+ return WireConnection.SIDE;
+ }
+ }
+
+ return !canConnectTo(blockstate) && (blockstate.isSimpleFullBlock(worldIn, blockpos) || !canConnectTo(worldIn.getBlockState(blockpos.down()))) ? WireConnection.NONE : WireConnection.SIDE;
+ }
+
+
+ @Override
+ public boolean canPlaceAt(BlockState state, WorldView world, BlockPos pos) {
+ BlockState blockstate = world.getBlockState(pos.down());
+ return Block.isSideSolidFullSquare(blockstate, world, pos, Direction.UP) || blockstate.getBlock() == Blocks.HOPPER;
+ }
+
+ private BlockState updateSurroundingWires(World worldIn, BlockPos pos, BlockState state) {
+ List list = Lists.newArrayList(this.blocksNeedingUpdate);
+ this.blocksNeedingUpdate.clear();
+
+ for(BlockPos blockpos : list) {
+ worldIn.updateNeighborsAlways(blockpos, this);
+ }
+
+ return state;
+ }
+
+ private void notifyWireNeighborsOfStateChange(World worldIn, BlockPos pos) {
+ if (worldIn.getBlockState(pos).getBlock() == this) {
+ worldIn.updateNeighborsAlways(pos, this);
+
+ for(Direction enumfacing : Direction.values()) {
+ worldIn.updateNeighborsAlways(pos.offset(enumfacing), this);
+ }
+
+ }
+ }
+
+ @Override
+ public void onBlockAdded(BlockState state, World worldIn, BlockPos pos, BlockState oldState, boolean mistery) {
+ if (oldState.getBlock() != state.getBlock() && !worldIn.isClient) {
+ this.updateSurroundingWires(worldIn, pos, state);
+
+ for(Direction facing : Direction.Type.VERTICAL) {
+ worldIn.updateNeighborsAlways(pos.offset(facing), this);
+ }
+
+ for(Direction facing : Direction.Type.HORIZONTAL) {
+ this.notifyWireNeighborsOfStateChange(worldIn, pos.offset(facing));
+ }
+
+ for(Direction facing : Direction.Type.HORIZONTAL) {
+ BlockPos blockpos = pos.offset(facing);
+ if (worldIn.getBlockState(blockpos).isSimpleFullBlock(worldIn, blockpos)) {
+ this.notifyWireNeighborsOfStateChange(worldIn, blockpos.up());
+ } else {
+ this.notifyWireNeighborsOfStateChange(worldIn, blockpos.down());
+ }
+ }
+
+ }
+ }
+
+ @Override
+ public void onBlockRemoved(BlockState state, World world, BlockPos pos, BlockState newState, boolean moved) {
+ if (!moved && state.getBlock() != newState.getBlock()) {
+ super.onBlockRemoved(state, world, pos, newState, moved);
+ if (!world.isClient) {
+ for(Direction facing : Direction.values()) {
+ world.updateNeighborsAlways(pos.offset(facing), this);
+ }
+
+ this.updateSurroundingWires(world, pos, state);
+
+ for(Direction facing : Direction.Type.HORIZONTAL) {
+ this.notifyWireNeighborsOfStateChange(world, pos.offset(facing));
+ }
+
+ for(Direction facing : Direction.Type.HORIZONTAL) {
+ BlockPos blockpos = pos.offset(facing);
+ if (world.getBlockState(blockpos).isSimpleFullBlock(world, blockpos)) {
+ this.notifyWireNeighborsOfStateChange(world, blockpos.up());
+ } else {
+ this.notifyWireNeighborsOfStateChange(world, blockpos.down());
+ }
+ }
+
+ }
+ }
+ }
+
+ @Override
+ public void neighborUpdate(BlockState state, World world, BlockPos pos, Block block, BlockPos neighborPos, boolean moved) {
+ if (!world.isClient) {
+ if (state.canPlaceAt(world, pos)) {
+ this.updateSurroundingWires(world, pos, state);
+ } else {
+ dropStacks(state, world, pos);
+ world.removeBlock(pos, false);
+ }
+ }
+ }
+
+ protected boolean canConnectTo(BlockState state) {
+ return state.getBlock() == this || state.getBlock() == Blocks.TNT;
+ }
+
+ @Override
+ public BlockState rotate(BlockState state, BlockRotation rotation) {
+ switch(rotation) {
+ case CLOCKWISE_180:
+ return state.with(NORTH, state.get(SOUTH)).with(EAST, state.get(WEST)).with(SOUTH, state.get(NORTH)).with(WEST, state.get(EAST));
+ case COUNTERCLOCKWISE_90:
+ return state.with(NORTH, state.get(EAST)).with(EAST, state.get(SOUTH)).with(SOUTH, state.get(WEST)).with(WEST, state.get(NORTH));
+ case CLOCKWISE_90:
+ return state.with(NORTH, state.get(WEST)).with(EAST, state.get(NORTH)).with(SOUTH, state.get(EAST)).with(WEST, state.get(SOUTH));
+ default:
+ return state;
+ }
+ }
+
+ @Override
+ public BlockState mirror(BlockState state, BlockMirror mirror) {
+ switch(mirror) {
+ case LEFT_RIGHT:
+ return state.with(NORTH, state.get(SOUTH)).with(SOUTH, state.get(NORTH));
+ case FRONT_BACK:
+ return state.with(EAST, state.get(WEST)).with(WEST, state.get(EAST));
+ default:
+ return super.mirror(state, mirror);
+ }
+ }
+
+ @Override
+ protected void appendProperties(StateManager.Builder builder) {
+ builder.add(NORTH, EAST, SOUTH, WEST, BURNED);
+ }
+
+ @Environment(EnvType.CLIENT)
+ public static int colorMultiplier(boolean burned) {
+ float red, blue, green;
+
+ if (!burned) {
+ return 0x989898;
+ } else {
+ return 0x262626;
+ }
+ }
+
+ public void setBurned(BlockPos pos, World world) {
+ BlockState state = world.getBlockState(pos);
+ world.setBlockState(pos, state.with(BURNED, true));
+ world.addParticle(ParticleTypes.LARGE_SMOKE, pos.getX(), pos.getY(), pos.getZ(), 0, 0, 0);
+ if (world.getBlockState(pos.down()) == Blocks.TNT.getDefaultState()) {
+ world.setBlockState(pos.down(), Blocks.AIR.getDefaultState());
+ world.setBlockState(pos, Blocks.AIR.getDefaultState());
+ TntBlock.primeTnt(world, pos.down());
+ return;
+ }
+ for (Direction facing: Direction.Type.HORIZONTAL) {
+ BlockPos neighboorPos = pos;
+ switch (state.get(FACING_PROPERTY_MAP.get(facing))) {
+ case UP:
+ neighboorPos = neighboorPos.up();
+ case SIDE:
+ neighboorPos = neighboorPos.offset(facing);
+ if (!canConnectTo(world.getBlockState(neighboorPos)))
+ neighboorPos = neighboorPos.down();
+ if (!canConnectTo(world.getBlockState(neighboorPos)))
+ break;
+ if (world.getBlockState(neighboorPos).getBlock() == this && !world.getBlockState(neighboorPos).get(BURNED))
+ setBurned(neighboorPos, world);
+ else if (world.getBlockState(neighboorPos).getBlock() == Blocks.TNT) {
+ world.setBlockState(neighboorPos, Blocks.AIR.getDefaultState());
+ TntBlock.primeTnt(world, neighboorPos);
+ }
+ }
+ }
+ }
+
+ @Override
+ public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) {
+ if (player.getStackInHand(hand).getItem() == Items.FLINT_AND_STEEL && !state.get(BURNED)) {
+ if (player instanceof ServerPlayerEntity)
+ player.getStackInHand(hand).damage(1, world.random, (ServerPlayerEntity) player);
+ setBurned(pos, world);
+ player.playSound(SoundEvents.BLOCK_FIRE_EXTINGUISH, 5, 0);
+ return ActionResult.SUCCESS;
+ } else return ActionResult.PASS;
+ }
+
+
+}
\ No newline at end of file
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/common/block/TemporalCauldronBlock.java b/src/main/java/com/rdvdev2/TimeTravelMod/common/block/TemporalCauldronBlock.java
new file mode 100644
index 0000000..41971c0
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/common/block/TemporalCauldronBlock.java
@@ -0,0 +1,123 @@
+package com.rdvdev2.TimeTravelMod.common.block;
+
+import com.rdvdev2.TimeTravelMod.ModBlocks;
+import com.rdvdev2.TimeTravelMod.ModItems;
+import com.rdvdev2.TimeTravelMod.ModTriggers;
+import com.rdvdev2.TimeTravelMod.common.block.blockentity.TemporalCauldronTileEntity;
+import net.fabricmc.fabric.api.block.FabricBlockSettings;
+import net.fabricmc.fabric.api.tools.FabricToolTags;
+import net.minecraft.block.*;
+import net.minecraft.block.entity.BlockEntity;
+import net.minecraft.entity.EntityContext;
+import net.minecraft.entity.ItemEntity;
+import net.minecraft.entity.player.PlayerEntity;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.server.network.ServerPlayerEntity;
+import net.minecraft.state.StateManager;
+import net.minecraft.state.property.IntProperty;
+import net.minecraft.util.ActionResult;
+import net.minecraft.util.BooleanBiFunction;
+import net.minecraft.util.Hand;
+import net.minecraft.util.hit.BlockHitResult;
+import net.minecraft.util.math.BlockPos;
+import net.minecraft.util.math.MathHelper;
+import net.minecraft.util.shape.VoxelShape;
+import net.minecraft.util.shape.VoxelShapes;
+import net.minecraft.world.BlockView;
+import net.minecraft.world.World;
+
+public class TemporalCauldronBlock extends Block implements BlockEntityProvider {
+
+ public static final IntProperty LEVEL = IntProperty.of("level", 0, 3);
+ protected static final VoxelShape INSIDE;
+ protected static final VoxelShape WALLS;
+
+ public TemporalCauldronBlock() {
+ super(FabricBlockSettings.of(Material.METAL, MaterialColor.STONE).breakByTool(FabricToolTags.PICKAXES, 1).hardness(2.0F).nonOpaque().build());
+ this.setDefaultState(this.getStateManager().getDefaultState().with(LEVEL, Integer.valueOf(0)));
+ }
+
+ @Override
+ public ActionResult onUse(BlockState state, World worldIn, BlockPos pos, PlayerEntity playerIn, Hand hand, BlockHitResult blockRayTraceResult) {
+ super.onUse(state, worldIn, pos, playerIn, hand, blockRayTraceResult);
+ TemporalCauldronTileEntity te = (TemporalCauldronTileEntity) worldIn.getBlockEntity(pos);
+ ItemStack playerItemStack = playerIn.getStackInHand(hand);
+ if (te == null) {
+ return ActionResult.FAIL;
+ }
+ if (!playerItemStack.isEmpty() && !playerItemStack.isItemEqual(new ItemStack(ModItems.TIME_CRYSTAL)) && playerItemStack.isDamaged() && !te.containsItem()) {
+ if (!worldIn.isClient) {
+ ItemStack copy = playerItemStack.copy();
+ playerItemStack.increment(-1);
+ playerIn.setStackInHand(hand, playerItemStack);
+ te.putItem(copy);
+ }
+ } else if (playerItemStack.isItemEqual(new ItemStack(ModItems.TIME_CRYSTAL)) && !te.containsCrystal()) {
+ if(!worldIn.isClient) {
+ if (!playerIn.isCreative())
+ playerIn.setStackInHand(hand, new ItemStack(playerItemStack.getItem(), playerItemStack.getCount() - 1));
+ te.putCrystal(new ItemStack(ModItems.TIME_CRYSTAL, 1));
+ }
+ } else if (te.containsItem()) {
+ if(!worldIn.isClient) {
+ ItemStack item = te.removeItem();
+ if (!item.isDamaged() && playerIn instanceof ServerPlayerEntity) ModTriggers.BETTER_THAN_MENDING.trigger((ServerPlayerEntity) playerIn);
+ worldIn.spawnEntity(new ItemEntity(worldIn, pos.getX(), pos.getY(), pos.getZ(), item));
+ }
+ } else return ActionResult.PASS; return ActionResult.SUCCESS;
+ }
+
+ @Override
+ public void onBreak(World world, BlockPos pos, BlockState state, PlayerEntity player) {
+ super.onBreak(world, pos, state, player);
+ if (!world.isClient) {
+ ItemStack item = ((TemporalCauldronTileEntity)(world.getBlockEntity(pos))).removeItem();
+ if (!item.isEmpty() && !item.isDamaged() && player instanceof ServerPlayerEntity) ModTriggers.BETTER_THAN_MENDING.trigger((ServerPlayerEntity) player);
+ world.spawnEntity(new ItemEntity(world, pos.getX(), pos.getY(), pos.getZ(), item));
+ }
+ }
+
+ @Override
+ public VoxelShape getOutlineShape(BlockState state, BlockView view, BlockPos pos, EntityContext context) {
+ return WALLS;
+ }
+
+ @Override
+ public VoxelShape getRayTraceShape(BlockState p_199600_1_, BlockView p_199600_2_, BlockPos p_199600_3_) {
+ return INSIDE;
+ }
+
+ public void setTimeFluidLevel(World worldIn, BlockPos pos, BlockState state, int level)
+ {
+ worldIn.setBlockState(pos, state.with(LEVEL, Integer.valueOf(MathHelper.clamp(level, 0, 3))), 2);
+ }
+
+ @Override
+ protected void appendProperties(StateManager.Builder stateBuilder) {
+ stateBuilder.add(LEVEL);
+ }
+
+ @Override
+ public ItemStack getPickStack(BlockView world, BlockPos pos, BlockState state) {
+ return new ItemStack(Item.fromBlock(ModBlocks.TEMPORAL_CAULDRON));
+ }
+
+ @Override
+ public BlockEntity createBlockEntity(BlockView view) {
+ return new TemporalCauldronTileEntity();
+ }
+
+ @Override
+ public void onBlockRemoved(BlockState state, World world, BlockPos pos, BlockState newState, boolean moved) {
+ if (state.getBlock() != newState.getBlock()) {
+ super.onBlockRemoved(state, world, pos, newState, moved);
+ world.removeBlockEntity(pos);
+ }
+ }
+
+ static {
+ INSIDE = Block.createCuboidShape(2.0D, 4.0D, 2.0D, 14.0D, 16.0D, 14.0D);
+ WALLS = VoxelShapes.combineAndSimplify(VoxelShapes.fullCube(), VoxelShapes.union(createCuboidShape(0.0D, 0.0D, 4.0D, 16.0D, 3.0D, 12.0D), createCuboidShape(4.0D, 0.0D, 0.0D, 12.0D, 3.0D, 16.0D), createCuboidShape(2.0D, 0.0D, 2.0D, 14.0D, 3.0D, 14.0D), INSIDE), BooleanBiFunction.ONLY_FIRST);
+ }
+}
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/common/block/TemporalExplosionBlock.java b/src/main/java/com/rdvdev2/TimeTravelMod/common/block/TemporalExplosionBlock.java
new file mode 100644
index 0000000..3580b85
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/common/block/TemporalExplosionBlock.java
@@ -0,0 +1,60 @@
+package com.rdvdev2.TimeTravelMod.common.block;
+
+import com.rdvdev2.TimeTravelMod.ModBlocks;
+import com.rdvdev2.TimeTravelMod.ModTriggers;
+import com.rdvdev2.TimeTravelMod.mixin.IDamageSource;
+import net.fabricmc.fabric.api.block.FabricBlockSettings;
+import net.minecraft.block.Block;
+import net.minecraft.block.BlockState;
+import net.minecraft.block.Material;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityContext;
+import net.minecraft.entity.damage.DamageSource;
+import net.minecraft.entity.player.PlayerEntity;
+import net.minecraft.item.ItemStack;
+import net.minecraft.server.network.ServerPlayerEntity;
+import net.minecraft.sound.BlockSoundGroup;
+import net.minecraft.sound.SoundCategory;
+import net.minecraft.sound.SoundEvents;
+import net.minecraft.util.ActionResult;
+import net.minecraft.util.Hand;
+import net.minecraft.util.hit.BlockHitResult;
+import net.minecraft.util.math.BlockPos;
+import net.minecraft.util.shape.VoxelShape;
+import net.minecraft.util.shape.VoxelShapes;
+import net.minecraft.world.BlockView;
+import net.minecraft.world.World;
+
+public class TemporalExplosionBlock extends Block {
+
+ public static DamageSource damage = ((IDamageSource) IDamageSource.create("temporalerror")).callSetUnblockable();
+
+ public TemporalExplosionBlock() {
+ super(FabricBlockSettings.of(Material.PORTAL).sounds(BlockSoundGroup.METAL).strength(-1, -1).lightLevel(0).nonOpaque().build());
+ }
+
+ @Override
+ public void onEntityCollision(BlockState p_196262_1_, World p_196262_2_, BlockPos p_196262_3_, Entity entity) {
+ entity.damage(damage, 1000000);
+ if (entity instanceof ServerPlayerEntity) ModTriggers.TEMPORAL_EXPLOSION.trigger((ServerPlayerEntity) entity);
+ }
+
+
+
+ @Override
+ public VoxelShape getOutlineShape(BlockState state, BlockView view, BlockPos pos, EntityContext context) {
+ return VoxelShapes.cuboid(VoxelShapes.fullCube().getBoundingBox().shrink(0.1, 0.1, 0.1));
+ }
+
+
+ @Override
+ public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) {
+ if (ItemStack.areItemsEqual(player.inventory.getMainHandStack(), new ItemStack(ModBlocks.REINFORCED_HEAVY_BLOCK, player.inventory.getMainHandStack().getCount()))) {
+ if(!player.isCreative()) player.inventory.getMainHandStack().increment(-1);
+ world.setBlockState(pos, ModBlocks.REINFORCED_HEAVY_BLOCK.getDefaultState());
+ world.playSound(null, pos, SoundEvents.BLOCK_METAL_PLACE, SoundCategory.BLOCKS, 3.0F, 1);
+ return ActionResult.SUCCESS;
+ }
+ return ActionResult.PASS;
+ }
+}
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/common/block/TimeMachineRecallerBlock.java b/src/main/java/com/rdvdev2/TimeTravelMod/common/block/TimeMachineRecallerBlock.java
new file mode 100644
index 0000000..de025f4
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/common/block/TimeMachineRecallerBlock.java
@@ -0,0 +1,148 @@
+package com.rdvdev2.TimeTravelMod.common.block;
+
+import com.rdvdev2.TimeTravelMod.ModRegistries;
+import com.rdvdev2.TimeTravelMod.api.dimension.TimeLine;
+import com.rdvdev2.TimeTravelMod.api.timemachine.TimeMachine;
+import com.rdvdev2.TimeTravelMod.api.timemachine.block.TimeMachineControlPanelBlock;
+import com.rdvdev2.TimeTravelMod.api.timemachine.exception.IncompatibleTimeMachineHooksException;
+import com.rdvdev2.TimeTravelMod.common.block.blockentity.TimeMachineRecallerBlockEntity;
+import com.rdvdev2.TimeTravelMod.common.timemachine.TimeMachineEntityPlacer;
+import net.fabricmc.fabric.api.block.FabricBlockSettings;
+import net.fabricmc.fabric.api.dimension.v1.FabricDimensions;
+import net.fabricmc.fabric.api.tools.FabricToolTags;
+import net.minecraft.block.Block;
+import net.minecraft.block.BlockEntityProvider;
+import net.minecraft.block.BlockState;
+import net.minecraft.block.Material;
+import net.minecraft.block.entity.BlockEntity;
+import net.minecraft.entity.Entity;
+import net.minecraft.server.world.ServerWorld;
+import net.minecraft.sound.BlockSoundGroup;
+import net.minecraft.state.StateManager;
+import net.minecraft.state.property.BooleanProperty;
+import net.minecraft.util.math.BlockPos;
+import net.minecraft.util.math.Direction;
+import net.minecraft.world.BlockView;
+import net.minecraft.world.World;
+import net.minecraft.world.dimension.DimensionType;
+
+import java.util.List;
+
+import static com.rdvdev2.TimeTravelMod.common.networking.DimensionTpPKT.applyCorruption;
+
+public class TimeMachineRecallerBlock extends Block implements BlockEntityProvider {
+
+ public static final BooleanProperty CONFIGURED = BooleanProperty.of("configured");
+ public static final BooleanProperty TRIGGERED = BooleanProperty.of("triggered");
+
+ public TimeMachineRecallerBlock() {
+ super(FabricBlockSettings.of(Material.METAL).sounds(BlockSoundGroup.METAL).hardness(3f).lightLevel(0 / 16).nonOpaque().breakByTool(FabricToolTags.PICKAXES, 2).build());
+ setDefaultState(getStateManager().getDefaultState().with(CONFIGURED, false).with(TRIGGERED, false));
+ }
+
+ @Override
+ protected void appendProperties(StateManager.Builder builder) {
+ builder.add(CONFIGURED).add(TRIGGERED);
+ }
+
+
+ @Override
+ public BlockEntity createBlockEntity(BlockView view) {
+ return new TimeMachineRecallerBlockEntity();
+ }
+
+ @Override
+ public void onBlockRemoved(BlockState state, World world, BlockPos pos, BlockState newState, boolean moved) {
+ if (newState.getBlock() != this) {
+ world.removeBlockEntity(pos);
+ }
+ }
+
+ @Override
+ public boolean emitsRedstonePower(BlockState state) {
+ return true;
+ }
+
+ @Override
+ public void neighborUpdate(BlockState state, World world, BlockPos pos, Block neighbourBlock, BlockPos neighbourPos, boolean bool) {
+ super.neighborUpdate(state, world, pos, neighbourBlock, neighbourPos, bool);
+ if (!world.isClient) {
+ if (world.isReceivingRedstonePower(pos)) {
+ if (!(Boolean) state.get(TRIGGERED)) {
+ world.setBlockState(pos, state.with(TRIGGERED, true));
+ if (state.get(CONFIGURED)) {
+ BlockEntity tile = world.getBlockEntity(pos);
+ if (world instanceof ServerWorld && tile instanceof TimeMachineRecallerBlockEntity) {
+ BlockPos controllerPos = ((TimeMachineRecallerBlockEntity) tile).getControllerPos();
+ Direction side = ((TimeMachineRecallerBlockEntity) tile).getSide();
+ DimensionType searchDim = ((TimeMachineRecallerBlockEntity) tile).getDest();
+ boolean ret = searchRecall((ServerWorld) world, world.getServer().getWorld(searchDim), controllerPos, side, pos);
+ world.setBlockState(pos, state.with(CONFIGURED, ret).with(TRIGGERED, true));
+ }
+ }
+ }
+ } else {
+ world.setBlockState(pos, state.with(TRIGGERED, false));
+ }
+ }
+ }
+
+ private boolean searchRecall(ServerWorld origin, ServerWorld searchWorld, BlockPos controllerPos, Direction side, BlockPos recallerPos) {
+ Block controllerBlock = searchWorld.getBlockState(controllerPos).getBlock();
+ if (controllerBlock instanceof TimeMachineControlPanelBlock) {
+ TimeMachine tm = ((TimeMachineControlPanelBlock) controllerBlock).getTimeMachine(searchWorld.getBlockState(controllerPos));
+ searchWorld.setChunkForced(controllerPos.getX() >> 4, controllerPos.getZ() >> 4, true);
+ boolean ret = tryRecall(tm, searchWorld, origin, controllerPos, side);
+ searchWorld.setChunkForced(controllerPos.getX() >> 4, controllerPos.getZ() >> 4, false);
+ return !ret;
+ } else {
+ BlockEntity tile = searchWorld.getBlockEntity(recallerPos);
+ if (tile instanceof TimeMachineRecallerBlockEntity) {
+ BlockPos _controllerPos = ((TimeMachineRecallerBlockEntity) tile).getControllerPos();
+ Direction _side = ((TimeMachineRecallerBlockEntity) tile).getSide();
+ DimensionType _searchDim = ((TimeMachineRecallerBlockEntity) tile).getDest();
+ if (controllerPos.equals(_controllerPos) && side.equals(_side)) {
+ return searchRecall(origin, origin.getServer().getWorld(_searchDim), controllerPos, side, recallerPos);
+ } else {
+ return false;
+ }
+ } else {
+ return false;
+ }
+ }
+ }
+
+ private boolean tryRecall(TimeMachine tm, ServerWorld foundWorld, ServerWorld recallWorld, BlockPos controllerPos, Direction side) {
+ DimensionType foundDim = foundWorld.getDimension().getType();
+ TimeLine tl = null;
+ for (TimeLine _tl : ModRegistries.TIME_LINES) {
+ if (_tl.getDimensionType() == foundDim) {
+ tl = _tl;
+ break;
+ }
+ }
+ if (tl == null) return false;
+ try {
+ tm = tm.hook(foundWorld, controllerPos, side);
+ } catch (IncompatibleTimeMachineHooksException e) {
+ return false;
+ }
+ List entities = tm.getEntitiesInside(foundWorld, controllerPos, side);
+ if (foundWorld.isChunkLoaded(controllerPos) &&
+ tm.isBuilt(foundWorld, controllerPos, side) &&
+ tm.isCooledDown(foundWorld, controllerPos, side) &&
+ !tm.isOverloaded(foundWorld, controllerPos, side)) {
+ if (tm.getTier() >= tl.getMinTier()) {
+ applyCorruption(tm, foundDim, recallWorld.getDimension().getType(), foundWorld.getServer());
+ tm.teleporterTasks(null, recallWorld, foundWorld, controllerPos, side, true);
+ final TimeMachine finalTm = tm;
+ entities.forEach(entity -> FabricDimensions.teleport(entity, recallWorld.getDimension().getType(), new TimeMachineEntityPlacer(finalTm, foundWorld, controllerPos, side, false)));
+ return true;
+ } else {
+ return false;
+ }
+ } else {
+ return false;
+ }
+ }
+}
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/common/block/blockentity/TMCooldownBlockEntity.java b/src/main/java/com/rdvdev2/TimeTravelMod/common/block/blockentity/TMCooldownBlockEntity.java
new file mode 100644
index 0000000..410b8fb
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/common/block/blockentity/TMCooldownBlockEntity.java
@@ -0,0 +1,58 @@
+package com.rdvdev2.TimeTravelMod.common.block.blockentity;
+
+import com.rdvdev2.TimeTravelMod.ModBlocks;
+import com.rdvdev2.TimeTravelMod.api.timemachine.block.TimeMachineCoreBlock;
+import net.minecraft.block.entity.BlockEntity;
+import net.minecraft.nbt.CompoundTag;
+import net.minecraft.util.Tickable;
+
+/**
+ * This TileEntity is attached to non cooled down Time Machine cores and is used to calculate when they are ready
+ */
+public class TMCooldownBlockEntity extends BlockEntity implements Tickable {
+
+ Integer remainingTicks;
+
+ /**
+ * Constructor of the TileEntity
+ * @param ticks How many ticks needs this Time Machine core to cool down
+ */
+ public TMCooldownBlockEntity(Integer ticks) {
+ super(ModBlocks.TileEntities.TM_COOLDOWN);
+ this.remainingTicks = ticks;
+ }
+
+ /**
+ * Default constructor of the TileEntity (Time Machine static HashMap stores time)
+ */
+ public TMCooldownBlockEntity() {
+ this(null);
+ }
+
+ public void setTime(int ticks) {
+ this.remainingTicks = ticks;
+ }
+
+ @Override
+ public CompoundTag toTag(CompoundTag tag) {
+ super.toTag(tag);
+ if (this.remainingTicks != null) tag.putInt("ticks", remainingTicks);
+ return tag;
+ }
+
+ @Override
+ public void fromTag(CompoundTag tag) {
+ super.fromTag(tag);
+ if (tag.contains("ticks")) this.remainingTicks = tag.getInt("ticks");
+ }
+
+ @Override
+ public void tick() {
+ if (remainingTicks == null || remainingTicks < 0) return;
+ this.remainingTicks -= 1;
+ if (this.remainingTicks == 0) {
+ this.world.setBlockState(this.pos, this.world.getBlockState(this.pos).getBlock().getDefaultState().with(TimeMachineCoreBlock.TM_READY, true));
+ }
+ this.markDirty();
+ }
+}
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/common/block/blockentity/TemporalCauldronTileEntity.java b/src/main/java/com/rdvdev2/TimeTravelMod/common/block/blockentity/TemporalCauldronTileEntity.java
new file mode 100644
index 0000000..d24e078
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/common/block/blockentity/TemporalCauldronTileEntity.java
@@ -0,0 +1,121 @@
+package com.rdvdev2.TimeTravelMod.common.block.blockentity;
+
+import com.rdvdev2.TimeTravelMod.ModBlocks;
+import com.rdvdev2.TimeTravelMod.ModItems;
+import com.rdvdev2.TimeTravelMod.common.block.TemporalCauldronBlock;
+import net.minecraft.block.entity.BlockEntity;
+import net.minecraft.inventory.BasicInventory;
+import net.minecraft.inventory.Inventory;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.CompoundTag;
+import net.minecraft.nbt.ListTag;
+import net.minecraft.util.Tickable;
+
+import java.util.Random;
+
+public class TemporalCauldronTileEntity extends BlockEntity implements Tickable {
+
+ private Inventory inventory = new BasicInventory(2) {
+ @Override
+ public void markDirty() {
+ super.markDirty();
+ TemporalCauldronTileEntity.this.markDirty();
+ }
+ };
+
+ private final static int CRYSTAL_SLOT = 0;
+ private final static int ITEM_SLOT = 1;
+
+ private int crystal_usages = 0;
+ private int tick_count = 0;
+
+ public TemporalCauldronTileEntity() {
+ super(ModBlocks.TileEntities.TEMPORAL_CAULDRON);
+ }
+
+ public boolean containsItem() {
+ return !inventory.getInvStack(ITEM_SLOT).isEmpty();
+ }
+
+ public void putItem(ItemStack item) {
+ if (item.isDamageable()); inventory.setInvStack(ITEM_SLOT, item);
+ }
+
+ public ItemStack removeItem() {
+ return inventory.takeInvStack(ITEM_SLOT, 1);
+ }
+
+ public boolean containsCrystal() {
+ return !inventory.getInvStack(CRYSTAL_SLOT).isEmpty();
+ }
+
+ public void putCrystal(ItemStack item) {
+ if (item.getItem() == ModItems.TIME_CRYSTAL) {
+ inventory.setInvStack(CRYSTAL_SLOT, item);
+ crystal_usages = 2000;
+ this.world.setBlockState(this.pos, this.world.getBlockState(pos).with(TemporalCauldronBlock.LEVEL, 3));
+ }
+ }
+
+ @Override
+ public CompoundTag toTag(CompoundTag tag) {
+ super.toTag(tag);
+
+ ListTag inventoryTag = new ListTag();
+ for (int slot = 0; slot < inventory.getInvSize(); slot++) {
+ inventoryTag.add(slot, inventory.getInvStack(slot).toTag(new CompoundTag()));
+ }
+ tag.put("inventory", inventoryTag);
+
+ tag.putInt("crystal_usages", crystal_usages);
+ tag.putInt("tick_count", tick_count);
+
+ return tag;
+ }
+
+ @Override
+ public void fromTag(CompoundTag tag) {
+ super.fromTag(tag);
+
+ ListTag inventoryTag = (ListTag) tag.get("inventory");
+ if (inventoryTag != null) {
+ for (int slot = 0; slot < inventory.getInvSize(); slot++) {
+ inventory.setInvStack(slot, ItemStack.fromTag(inventoryTag.getCompound(slot)));
+ }
+ crystal_usages = tag.getInt("crystal_usages");
+ tick_count = tag.getInt("tick_count");
+ }
+ }
+
+ @Override
+ public void tick() {
+ if (world.isClient) return;
+ if (!inventory.getInvStack(ITEM_SLOT).isEmpty() && !inventory.getInvStack(CRYSTAL_SLOT).isEmpty()) {
+ if (crystal_usages == 1300) this.world.setBlockState(this.pos, this.world.getBlockState(pos).with(TemporalCauldronBlock.LEVEL, 2));
+ if (crystal_usages == 600) this.world.setBlockState(this.pos, this.world.getBlockState(pos).with(TemporalCauldronBlock.LEVEL, 1));
+ if (crystal_usages == 0) {
+ this.world.setBlockState(this.pos, this.world.getBlockState(pos).with(TemporalCauldronBlock.LEVEL, 0));
+ inventory.takeInvStack(CRYSTAL_SLOT, 1);
+ }
+
+ tick_count++;
+ if (tick_count == 10) {
+ tick_count = 0;
+ crystal_usages--;
+
+ ItemStack tool = inventory.takeInvStack(ITEM_SLOT, 1);
+ int damage = tool.getDamage();
+ Random r = new Random();
+
+ int n = r.nextInt(100);
+ if (n >= 98) damage++;
+ else if (n < 95) damage--;
+
+ tool.setDamage(damage);
+ inventory.setInvStack(ITEM_SLOT, tool);
+ }
+
+ markDirty();
+ }
+ }
+}
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/common/block/blockentity/TimeMachineRecallerBlockEntity.java b/src/main/java/com/rdvdev2/TimeTravelMod/common/block/blockentity/TimeMachineRecallerBlockEntity.java
new file mode 100644
index 0000000..9000dad
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/common/block/blockentity/TimeMachineRecallerBlockEntity.java
@@ -0,0 +1,69 @@
+package com.rdvdev2.TimeTravelMod.common.block.blockentity;
+
+import com.rdvdev2.TimeTravelMod.ModBlocks;
+import net.minecraft.block.entity.BlockEntity;
+import net.minecraft.nbt.CompoundTag;
+import net.minecraft.util.Identifier;
+import net.minecraft.util.math.BlockPos;
+import net.minecraft.util.math.Direction;
+import net.minecraft.util.registry.Registry;
+import net.minecraft.world.dimension.DimensionType;
+
+public class TimeMachineRecallerBlockEntity extends BlockEntity {
+
+ private BlockPos controllerPos;
+ private Direction side;
+ private DimensionType dest;
+
+ public TimeMachineRecallerBlockEntity() {
+ super(ModBlocks.TileEntities.TM_RECALLER);
+ }
+
+ public BlockPos getControllerPos() {
+ return controllerPos;
+ }
+
+ public void setControllerPos(BlockPos controllerPos) {
+ this.controllerPos = controllerPos;
+ markDirty();
+ }
+
+ public Direction getSide() {
+ return side;
+ }
+
+ public void setSide(Direction side) {
+ this.side = side;
+ markDirty();
+ }
+
+ public DimensionType getDest() {
+ return dest;
+ }
+
+ public void setDest(DimensionType dest) {
+ this.dest = dest;
+ markDirty();
+ }
+
+ @Override
+ public CompoundTag toTag(CompoundTag tag) {
+ tag = super.toTag(tag);
+ if (this.controllerPos != null) {
+ tag.putLong("controllerpos", this.controllerPos.asLong());
+ tag.putInt("side", this.side.getId());
+ tag.putString("dest", Registry.DIMENSION_TYPE.getId(this.dest).toString());
+ }
+ return tag;
+ }
+
+ @Override
+ public void fromTag(CompoundTag tag) {
+ super.fromTag(tag);
+ if (tag.contains("controllerpos")) {
+ this.controllerPos = BlockPos.fromLong(tag.getLong("controllerpos"));
+ this.side = Direction.byId(tag.getInt("side"));
+ this.dest = DimensionType.byId(Identifier.tryParse(tag.getString("dest")));
+ }
+ }
+}
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/common/event/MiscCallbackHandler.java b/src/main/java/com/rdvdev2/TimeTravelMod/common/event/MiscCallbackHandler.java
new file mode 100644
index 0000000..8bb6ea1
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/common/event/MiscCallbackHandler.java
@@ -0,0 +1,43 @@
+package com.rdvdev2.TimeTravelMod.common.event;
+
+import com.rdvdev2.TimeTravelMod.Mod;
+import com.rdvdev2.TimeTravelMod.ModConfig;
+import net.fabricmc.loader.FabricLoader;
+import net.fabricmc.loader.api.metadata.ModMetadata;
+import net.minecraft.SharedConstants;
+import net.minecraft.network.MessageType;
+import net.minecraft.server.network.ServerPlayerEntity;
+import net.minecraft.text.TranslatableText;
+
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+import java.net.URL;
+import java.net.URLConnection;
+
+public class MiscCallbackHandler {
+
+ public static void playerJoin(ServerPlayerEntity player) {
+ if (ModConfig.getInstance().getCommon().getEnableUpdatePromos()) {
+ try {
+ ModMetadata metadata = FabricLoader.INSTANCE.getModContainer(Mod.MODID).get().getMetadata();
+ String currentVersion = metadata.getVersion().getFriendlyString();
+ String targetVersion = currentVersion;
+ String url = metadata.getCustomValue("timetravelmod_updateurl").getAsString();
+ URLConnection updateCheckConnection = new URL(url).openConnection();
+ try (BufferedReader in = new BufferedReader(new InputStreamReader(updateCheckConnection.getInputStream()))) {
+ String inputLine;
+ while ((inputLine = in.readLine()) != null) {
+ String[] data = inputLine.split(",");
+ if (data[0].equals("R") && data[1].equals(SharedConstants.getGameVersion().getId())) targetVersion = data[2];
+ }
+ }
+ if (!currentVersion.equals(targetVersion)) {
+ player.sendChatMessage(new TranslatableText("chat.ttm.outdated"), MessageType.SYSTEM);
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+}
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/common/event/WorldCorruptionChangedCallback.java b/src/main/java/com/rdvdev2/TimeTravelMod/common/event/WorldCorruptionChangedCallback.java
new file mode 100644
index 0000000..0e40253
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/common/event/WorldCorruptionChangedCallback.java
@@ -0,0 +1,17 @@
+package com.rdvdev2.TimeTravelMod.common.event;
+
+import com.rdvdev2.TimeTravelMod.api.dimension.TimeLine;
+import net.fabricmc.fabric.api.event.Event;
+import net.fabricmc.fabric.api.event.EventFactory;
+
+public interface WorldCorruptionChangedCallback {
+
+ Event EVENT = EventFactory.createArrayBacked(WorldCorruptionChangedCallback.class,
+ listeners -> (timeLine, corruptionLevel) -> {
+ for (WorldCorruptionChangedCallback listener: listeners) {
+ listener.onWorldCorruptionChanged(timeLine, corruptionLevel);
+ }
+ });
+
+ void onWorldCorruptionChanged(TimeLine timeLine, int corruptionLevel);
+}
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/common/item/CreativeTimeMachineItem.java b/src/main/java/com/rdvdev2/TimeTravelMod/common/item/CreativeTimeMachineItem.java
new file mode 100644
index 0000000..bc38e70
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/common/item/CreativeTimeMachineItem.java
@@ -0,0 +1,30 @@
+package com.rdvdev2.TimeTravelMod.common.item;
+
+import com.rdvdev2.TimeTravelMod.Mod;
+import com.rdvdev2.TimeTravelMod.ModTimeMachines;
+import com.rdvdev2.TimeTravelMod.api.timemachine.TimeMachine;
+import net.minecraft.entity.player.PlayerEntity;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.Hand;
+import net.minecraft.util.TypedActionResult;
+import net.minecraft.util.math.Direction;
+import net.minecraft.world.World;
+
+public class CreativeTimeMachineItem extends Item {
+
+ private TimeMachine timeMachine = ModTimeMachines.CREATIVE;
+
+ public CreativeTimeMachineItem() {
+ super(new Item.Settings()
+ .maxCount(1)
+ .group(Mod.TAB_TTM)
+ );
+ }
+
+ @Override
+ public TypedActionResult use(World world, PlayerEntity user, Hand hand) {
+ if (!world.isClient) this.timeMachine.run(world, user, user.getBlockPos(), Direction.NORTH);
+ return TypedActionResult.success(user.getStackInHand(hand));
+ }
+}
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/common/item/ItemEngineerBook.java b/src/main/java/com/rdvdev2/TimeTravelMod/common/item/ItemEngineerBook.java
new file mode 100644
index 0000000..3b69ebc
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/common/item/ItemEngineerBook.java
@@ -0,0 +1,39 @@
+package com.rdvdev2.TimeTravelMod.common.item;
+
+import com.rdvdev2.TimeTravelMod.Mod;
+import com.rdvdev2.TimeTravelMod.ModRegistries;
+import com.rdvdev2.TimeTravelMod.client.gui.EngineerBookScreen;
+import net.fabricmc.api.EnvType;
+import net.fabricmc.api.Environment;
+import net.minecraft.entity.player.PlayerEntity;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.util.Hand;
+import net.minecraft.util.TypedActionResult;
+import net.minecraft.world.World;
+
+public class ItemEngineerBook extends Item {
+
+ private EngineerBookScreen generatedEngineerBook;
+
+ public ItemEngineerBook() {
+ super(new Item.Settings()
+ .group(Mod.TAB_TTM)
+ .maxCount(1));
+ }
+
+ @Environment(EnvType.CLIENT)
+ @Override
+ public TypedActionResult use(World world, PlayerEntity user, Hand hand) {
+ if (world.isClient) {
+ if (generatedEngineerBook == null) generatedEngineerBook = new EngineerBookScreen(ModRegistries.TIME_MACHINES.iterator());
+ net.minecraft.client.MinecraftClient.getInstance().openScreen(generatedEngineerBook);
+ }
+ return TypedActionResult.pass(user.getStackInHand(hand));
+ }
+
+ @Override
+ public boolean hasEnchantmentGlint(ItemStack stack) {
+ return true;
+ }
+}
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/common/networking/DimensionTpPKT.java b/src/main/java/com/rdvdev2/TimeTravelMod/common/networking/DimensionTpPKT.java
new file mode 100644
index 0000000..cdf3086
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/common/networking/DimensionTpPKT.java
@@ -0,0 +1,136 @@
+package com.rdvdev2.TimeTravelMod.common.networking;
+
+import com.rdvdev2.TimeTravelMod.Mod;
+import com.rdvdev2.TimeTravelMod.ModRegistries;
+import com.rdvdev2.TimeTravelMod.ModTimeLines;
+import com.rdvdev2.TimeTravelMod.api.dimension.AbstractTimeLineDimension;
+import com.rdvdev2.TimeTravelMod.api.dimension.TimeLine;
+import com.rdvdev2.TimeTravelMod.api.timemachine.TimeMachine;
+import com.rdvdev2.TimeTravelMod.api.timemachine.exception.IncompatibleTimeMachineHooksException;
+import com.rdvdev2.TimeTravelMod.common.timemachine.TimeMachineEntityPlacer;
+import com.rdvdev2.TimeTravelMod.common.util.TimeMachineUtils;
+import io.netty.buffer.Unpooled;
+import net.fabricmc.fabric.api.dimension.v1.FabricDimensions;
+import net.fabricmc.fabric.api.network.PacketContext;
+import net.minecraft.entity.Entity;
+import net.minecraft.network.MessageType;
+import net.minecraft.server.MinecraftServer;
+import net.minecraft.server.network.ServerPlayerEntity;
+import net.minecraft.server.world.ServerWorld;
+import net.minecraft.util.Identifier;
+import net.minecraft.util.PacketByteBuf;
+import net.minecraft.util.math.BlockPos;
+import net.minecraft.util.math.Direction;
+import net.minecraft.world.dimension.DimensionType;
+
+import java.util.*;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.stream.Collectors;
+
+public class DimensionTpPKT {
+
+ public static final Identifier ID = new Identifier(Mod.MODID, "dimensiontp");
+
+ public DimensionTpPKT() {
+ additionalEntities = new HashSet<>();
+ }
+
+ private TimeLine tl;
+ private TimeMachine tm;
+ private BlockPos pos;
+ private Direction side;
+ private Set additionalEntities;
+
+ public DimensionTpPKT(TimeLine tl, TimeMachine tm, BlockPos pos, Direction side, UUID... additionalEntities) {
+ this();
+ this.tl = tl;
+ this.tm = tm.removeHooks();
+ this.pos = pos;
+ this.side = side;
+ if (additionalEntities != null && additionalEntities.length != 0) this.additionalEntities = Arrays.stream(additionalEntities).collect(Collectors.toSet());
+ }
+
+ public PacketByteBuf encode() {
+ PacketByteBuf buf = new PacketByteBuf(Unpooled.buffer());
+ buf.writeIdentifier(ModRegistries.TIME_LINES.getId(tl));
+ buf.writeIdentifier(ModRegistries.TIME_MACHINES.getId(tm));
+ buf.writeBlockPos(pos);
+ buf.writeEnumConstant(side);
+ buf.writeInt(additionalEntities.size());
+ additionalEntities.forEach(buf::writeUuid);
+ return buf;
+ }
+
+ public static void decode(PacketContext ctx, PacketByteBuf buf) {
+ DimensionTpPKT pkt = new DimensionTpPKT();
+ pkt.tl = ModRegistries.TIME_LINES.get(buf.readIdentifier());
+ pkt.tm = ModRegistries.TIME_MACHINES.get(buf.readIdentifier());
+ pkt.pos = buf.readBlockPos();
+ pkt.side = buf.readEnumConstant(Direction.class);
+ int size = buf.readInt();
+ for (int i = 0; i < size; i++) {
+ UUID uuid = buf.readUuid();
+ pkt.additionalEntities.add(uuid);
+ }
+
+ handle(pkt, ctx);
+ }
+
+ public static void handle(DimensionTpPKT pkt, PacketContext ctx) {
+ ctx.getTaskQueue().execute(() -> {
+ ServerPlayerEntity serverPlayer = (ServerPlayerEntity) ctx.getPlayer();
+ DimensionType dim = pkt.tl.getDimensionType();
+ BlockPos pos = pkt.pos;
+ Direction side = pkt.side;
+ ServerWorld origin = serverPlayer.getServerWorld();
+ TimeMachine tm;
+ try {
+ tm = pkt.tm.hook(serverPlayer.world, pos, side);
+ } catch (IncompatibleTimeMachineHooksException e) {
+ throw new RuntimeException("Time travel was triggered with invalid upgrade configuration");
+ }
+ List entities = tm.getEntitiesInside(origin, pos, side);
+ AtomicBoolean entitiesFlag = new AtomicBoolean(true);
+ pkt.additionalEntities.forEach( entity -> {
+ if (!entities.contains(entity)) {
+ entitiesFlag.set(false);
+ }
+ });
+ if (entitiesFlag.get() &&
+ serverPlayer.world.isChunkLoaded(pos) &&
+ TimeMachineUtils.serverCheck(serverPlayer.server, tm, serverPlayer.world, serverPlayer, pos, side)) {
+ if (tm.getTier() >= pkt.tl.getMinTier()) {
+ applyCorruption(tm, serverPlayer.dimension, dim, serverPlayer.server);
+ FabricDimensions.teleport(serverPlayer, dim, new TimeMachineEntityPlacer(tm, origin , pos, side, true));
+ pkt.additionalEntities.stream()
+ .map(origin::getEntity)
+ .filter(Objects::nonNull)
+ .forEach(entity -> FabricDimensions.teleport(entity, dim, new TimeMachineEntityPlacer(tm, origin, pos, side, false)));
+ } else {
+ Arrays.stream(serverPlayer.server.getPlayerManager().getOpList().getNames())
+ .map(op -> serverPlayer.server.getPlayerManager().getPlayer(op))
+ .forEach(op -> {
+ if (op != null)
+ op.sendChatMessage(TimeMachineUtils.Check.UNREACHABLE_DIM.getCheaterReport(serverPlayer), MessageType.CHAT);
+ });
+ }
+ } else {
+ if (!entitiesFlag.get()) {
+ serverPlayer.sendChatMessage(TimeMachineUtils.Check.ENTITIES_ESCAPED.getClientError(), MessageType.GAME_INFO);
+ }
+ Mod.LOGGER.error("Time Travel canceled due to incorrect conditions");
+ }
+ });
+ }
+
+ public static void applyCorruption(TimeMachine tm, DimensionType origDim, DimensionType destDim, MinecraftServer server) {
+ TimeLine origTimeLine = origDim == DimensionType.OVERWORLD ? ModTimeLines.PRESENT : ((AbstractTimeLineDimension) server.getWorld(origDim).dimension).getTimeLine();
+ TimeLine destTimeLine = destDim == DimensionType.OVERWORLD ? ModTimeLines.PRESENT : ((AbstractTimeLineDimension) server.getWorld(destDim).dimension).getTimeLine();
+ int origTier = origTimeLine.getMinTier();
+ int destTier = destTimeLine.getMinTier();
+
+ int amount = Math.abs(destTier - origTier) * tm.getCorruptionMultiplier();
+ origTimeLine.getCorruption().increaseCorruptionLevel(amount);
+ destTimeLine.getCorruption().increaseCorruptionLevel(amount);
+ }
+}
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/common/networking/OpenTmGuiPKT.java b/src/main/java/com/rdvdev2/TimeTravelMod/common/networking/OpenTmGuiPKT.java
new file mode 100644
index 0000000..22828e7
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/common/networking/OpenTmGuiPKT.java
@@ -0,0 +1,48 @@
+package com.rdvdev2.TimeTravelMod.common.networking;
+
+import com.rdvdev2.TimeTravelMod.Mod;
+import com.rdvdev2.TimeTravelMod.ModRegistries;
+import com.rdvdev2.TimeTravelMod.api.timemachine.TimeMachine;
+import io.netty.buffer.Unpooled;
+import net.minecraft.util.Identifier;
+import net.minecraft.util.PacketByteBuf;
+import net.minecraft.util.math.BlockPos;
+import net.minecraft.util.math.Direction;
+
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+import java.util.UUID;
+import java.util.stream.Collectors;
+
+public class OpenTmGuiPKT {
+
+ public static final Identifier ID = new Identifier(Mod.MODID, "opentmgui");
+
+ public OpenTmGuiPKT(){
+ this.additionalEntities = new HashSet<>();
+ }
+
+ public TimeMachine tm;
+ public BlockPos pos;
+ public Direction side;
+ public Set additionalEntities;
+
+ public OpenTmGuiPKT(TimeMachine tm, BlockPos pos, Direction side, UUID... aditionalEntities) {
+ this();
+ this.tm = tm.removeHooks();
+ this.pos = pos;
+ this.side = side;
+ if (aditionalEntities != null && aditionalEntities.length != 0) this.additionalEntities = Arrays.stream(aditionalEntities).collect(Collectors.toSet());
+ }
+
+ public PacketByteBuf encode() {
+ PacketByteBuf buf = new PacketByteBuf(Unpooled.buffer());
+ buf.writeIdentifier(ModRegistries.TIME_MACHINES.getId(tm));
+ buf.writeBlockPos(pos);
+ buf.writeEnumConstant(side);
+ buf.writeInt(additionalEntities.size());
+ additionalEntities.forEach(buf::writeUuid);
+ return buf;
+ }
+}
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/common/timemachine/CreativeTimeMachine.java b/src/main/java/com/rdvdev2/TimeTravelMod/common/timemachine/CreativeTimeMachine.java
new file mode 100644
index 0000000..4f3f7c4
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/common/timemachine/CreativeTimeMachine.java
@@ -0,0 +1,130 @@
+package com.rdvdev2.TimeTravelMod.common.timemachine;
+
+import com.rdvdev2.TimeTravelMod.ModItems;
+import com.rdvdev2.TimeTravelMod.ModRegistries;
+import com.rdvdev2.TimeTravelMod.ModTriggers;
+import com.rdvdev2.TimeTravelMod.api.timemachine.TimeMachineTemplate;
+import com.rdvdev2.TimeTravelMod.common.networking.OpenTmGuiPKT;
+import net.fabricmc.fabric.api.network.ServerSidePacketRegistry;
+import net.minecraft.block.BlockState;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.PlayerEntity;
+import net.minecraft.item.ItemStack;
+import net.minecraft.server.network.ServerPlayerEntity;
+import net.minecraft.util.math.BlockPos;
+import net.minecraft.util.math.Box;
+import net.minecraft.util.math.Direction;
+import net.minecraft.world.Heightmap;
+import net.minecraft.world.World;
+import net.minecraft.world.chunk.Chunk;
+import net.minecraft.world.chunk.ChunkStatus;
+import org.jetbrains.annotations.Nullable;
+
+import java.util.Collections;
+import java.util.List;
+
+public class CreativeTimeMachine extends TimeMachine {
+
+ public CreativeTimeMachine() {
+ super(new TimeMachineTemplate() {
+ @Override
+ public int getCooldownTime() {
+ return 0;
+ }
+
+ private int tier = 0;
+
+ @Override
+ public int getTier() {
+ if (tier == 0) {
+ ModRegistries.TIME_LINES.forEach(timeLine -> tier = Math.max(timeLine.getMinTier(), tier));
+ }
+ return tier;
+ }
+
+ @Override
+ public List coreBlocksPos() {
+ return Collections.EMPTY_LIST;
+ }
+
+ @Override
+ public List basicBlocksPos() {
+ return Collections.EMPTY_LIST;
+ }
+
+ @Override
+ public List airBlocksPos() {
+ return Collections.EMPTY_LIST;
+ }
+
+ @Override
+ public BlockState[] getControllerBlocks() {
+ return new BlockState[0];
+ }
+
+ @Override
+ public BlockState[] getCoreBlocks() {
+ return new BlockState[0];
+ }
+
+ @Override
+ public BlockState[] getBasicBlocks() {
+ return new BlockState[0];
+ }
+
+ @Override
+ public int getCorruptionMultiplier() {
+ return 0;
+ }
+ });
+ }
+
+ @Override
+ public void run(World world, PlayerEntity playerIn, BlockPos controllerPos, Direction side) {
+ if (isPlayerInside(world, controllerPos, side, playerIn) &&
+ !isOverloaded(world, controllerPos, side)) {
+ if (playerIn instanceof ServerPlayerEntity) {
+ ModTriggers.ACCESS_TIME_MACHINE.trigger((ServerPlayerEntity) playerIn);
+ }
+ OpenTmGuiPKT pkt = new OpenTmGuiPKT(this, controllerPos, side);
+ ServerSidePacketRegistry.INSTANCE.sendToPlayer(playerIn, OpenTmGuiPKT.ID, pkt.encode());
+ }
+ }
+
+ @Override
+ public boolean isBuilt(World world, BlockPos controllerPos, Direction side) {
+ return true;
+ }
+
+ @Override
+ public Box getAirSpace(BlockPos controllerPos, Direction side) {
+ return new Box(
+ controllerPos.getX() -1,
+ controllerPos.getY() -1,
+ controllerPos.getZ() -1,
+ controllerPos.getX() +1,
+ controllerPos.getY() +1,
+ controllerPos.getZ() +1
+ );
+ }
+
+ @Override
+ public boolean isPlayerInside(World world, BlockPos controllerPos, Direction side, PlayerEntity player) {
+ return ItemStack.areItemsEqual(player.inventory.getMainHandStack(), new ItemStack(ModItems.CREATIVE_TIME_MACHINE, 1));
+ }
+
+ @Override
+ public void teleporterTasks(@Nullable Entity entity, World worldIn, World worldOut, BlockPos controllerPos, Direction side, boolean shouldBuild) {
+ Chunk chunk = worldIn.getChunk(controllerPos);
+ chunk = worldIn.getChunkManager().getChunk(chunk.getPos().x, chunk.getPos().z, ChunkStatus.FULL, true);
+ if (entity != null) {
+ int height = worldIn.getTopY(Heightmap.Type.MOTION_BLOCKING_NO_LEAVES, (int) entity.getX(), (int) entity.getZ());
+ entity.setPos(entity.getX(), height + 1, entity.getZ());
+ }
+ }
+
+ @Override
+ public boolean isOverloaded(World world, BlockPos controllerPos, Direction side) {
+ return false;
+ }
+}
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/common/timemachine/Tier1TimeMachine.java b/src/main/java/com/rdvdev2/TimeTravelMod/common/timemachine/Tier1TimeMachine.java
new file mode 100644
index 0000000..9268329
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/common/timemachine/Tier1TimeMachine.java
@@ -0,0 +1,55 @@
+package com.rdvdev2.TimeTravelMod.common.timemachine;
+
+import com.rdvdev2.TimeTravelMod.ModBlocks;
+import com.rdvdev2.TimeTravelMod.api.timemachine.TimeMachineTemplate;
+import net.minecraft.block.BlockState;
+import net.minecraft.util.math.BlockPos;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import java.util.stream.Collectors;
+
+public class Tier1TimeMachine implements TimeMachineTemplate {
+
+ public Tier1TimeMachine() {}
+
+ @Override
+ public List coreBlocksPos() {
+ return Collections.singletonList(new BlockPos(0, -2, -1));
+ }
+
+ @Override
+ public List basicBlocksPos() {
+ return Arrays.stream(new Integer[][]{
+ {-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}
+ }).map((it) -> new BlockPos(it[0], it[1], it[2])).collect(Collectors.toList());
+ }
+
+ @Override
+ public List airBlocksPos() {
+ return Arrays.stream(new Integer[][]{
+ {0, -1, -1}, {0, -1, -2}, {0, 0, -1}, {0, 0, -2}
+ }).map((it) -> new BlockPos(it[0], it[1], it[2])).collect(Collectors.toList());
+ }
+
+ @Override
+ public BlockState[] getControllerBlocks() {
+ return new BlockState[]{ModBlocks.TIME_MACHINE_CONTROL_PANEL.getDefaultState()};
+ }
+
+ @Override
+ public BlockState[] getCoreBlocks() {
+ return new BlockState[]{ModBlocks.TIME_MACHINE_CORE.getDefaultState()};
+ }
+
+ @Override
+ public BlockState[] getBasicBlocks() {
+ return new BlockState[]{ModBlocks.TIME_MACHINE_BASIC_BLOCK.getDefaultState()};
+ }
+}
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/common/timemachine/TimeMachine.java b/src/main/java/com/rdvdev2/TimeTravelMod/common/timemachine/TimeMachine.java
new file mode 100644
index 0000000..395a853
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/common/timemachine/TimeMachine.java
@@ -0,0 +1,444 @@
+package com.rdvdev2.TimeTravelMod.common.timemachine;
+
+import com.rdvdev2.TimeTravelMod.ModRegistries;
+import com.rdvdev2.TimeTravelMod.ModTriggers;
+import com.rdvdev2.TimeTravelMod.api.timemachine.TimeMachineTemplate;
+import com.rdvdev2.TimeTravelMod.api.timemachine.block.TimeMachineCoreBlock;
+import com.rdvdev2.TimeTravelMod.api.timemachine.block.TimeMachineUpgradeBlock;
+import com.rdvdev2.TimeTravelMod.api.timemachine.exception.IncompatibleTimeMachineHooksException;
+import com.rdvdev2.TimeTravelMod.api.timemachine.upgrade.TimeMachineUpgrade;
+import com.rdvdev2.TimeTravelMod.common.block.blockentity.TMCooldownBlockEntity;
+import com.rdvdev2.TimeTravelMod.common.networking.OpenTmGuiPKT;
+import com.rdvdev2.TimeTravelMod.common.util.TimeMachineUtils;
+import net.fabricmc.fabric.api.network.ServerSidePacketRegistry;
+import net.minecraft.block.BlockState;
+import net.minecraft.block.Blocks;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.PlayerEntity;
+import net.minecraft.network.MessageType;
+import net.minecraft.server.network.ServerPlayerEntity;
+import net.minecraft.text.TranslatableText;
+import net.minecraft.util.BlockRotation;
+import net.minecraft.util.Identifier;
+import net.minecraft.util.math.BlockPos;
+import net.minecraft.util.math.Box;
+import net.minecraft.util.math.Direction;
+import net.minecraft.world.World;
+import net.minecraft.world.chunk.Chunk;
+import net.minecraft.world.chunk.ChunkStatus;
+import org.apache.commons.lang3.ArrayUtils;
+
+import java.util.*;
+import java.util.stream.Collectors;
+
+public class TimeMachine implements com.rdvdev2.TimeTravelMod.api.timemachine.TimeMachine {
+
+ private final TimeMachineTemplate template;
+ private ArrayList upgrades;
+
+ public TimeMachine(TimeMachineTemplate template) {
+ this.template = template;
+ }
+
+ @Override
+ public TranslatableText getName() {
+ Identifier id = ModRegistries.TIME_MACHINES.getId(this);
+ return new TranslatableText(String.format("tm.%s.%s.name", id.getNamespace(), id.getPath()));
+ }
+
+ @Override
+ public TranslatableText getDescription() {
+ Identifier id = ModRegistries.TIME_MACHINES.getId(this);
+ return new TranslatableText(String.format("tm.%s.%s.description", id.getNamespace(), id.getPath()));
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public final BlockState[] getUpgradeBlocks() {
+ TimeMachineUpgradeBlock[] blocks = new TimeMachineUpgradeBlock[0];
+ try {
+ for (TimeMachineUpgrade upgrade : getCompatibleUpgrades()) {
+ Map hm = TimeMachineManager.getUpgradeToBlocks();
+ blocks = blocks == null ? hm.get(upgrade) : ArrayUtils.addAll(blocks, hm.get(upgrade));
+ }
+ BlockState[] states = new BlockState[0];
+ for (TimeMachineUpgradeBlock block : blocks) {
+ states = states == null ? new BlockState[]{block.getDefaultState()} : ArrayUtils.addAll(states, new BlockState[]{block.getDefaultState()});
+ }
+ return states;
+ } catch (NullPointerException e) {
+ return new BlockState[]{};
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public final TimeMachineUpgrade[] getCompatibleUpgrades() {
+ if (upgrades == null) {
+ upgrades = new ArrayList<>();
+ ModRegistries.UPGRADES.forEach(upgrade -> {
+ for(com.rdvdev2.TimeTravelMod.api.timemachine.TimeMachine tm: upgrade.getCompatibleTMs()) {
+ if (tm == this) {
+ upgrades.add(upgrade);
+ break;
+ }
+ }
+ });
+ }
+ return upgrades.toArray(new TimeMachineUpgrade[0]);
+ }
+
+ @Override
+ public List getCoreBlocksPos(Direction side) {
+ return applySide(coreBlocksPos(), side);
+ }
+
+ @Override
+ public List getBasicBlocksPos(Direction side) {
+ return applySide(basicBlocksPos(), side);
+ }
+
+ @Override
+ public List getAirBlocksPos(Direction side) {
+ return applySide(airBlocksPos(), side);
+ }
+
+ @Override
+ public BlockState[] getBlocks() {
+ if (getUpgradeBlocks().length != 0) {
+ return ArrayUtils.addAll(ArrayUtils.addAll(getControllerBlocks(), getCoreBlocks()), ArrayUtils.addAll(getBasicBlocks(), getUpgradeBlocks()));
+ } else {
+ return ArrayUtils.addAll(ArrayUtils.addAll(getControllerBlocks(), getCoreBlocks()), getBasicBlocks());
+ }
+ }
+
+ @Override
+ public final com.rdvdev2.TimeTravelMod.api.timemachine.TimeMachine hook(World world, BlockPos controllerPos, Direction side) throws IncompatibleTimeMachineHooksException {
+ TimeMachineHookRunner generated;
+ generated = new TimeMachineHookRunner(this, getUpgrades(world, controllerPos, side));
+ HashSet incompatibilities = generated.checkIncompatibilities();
+ if (incompatibilities.isEmpty()) {
+ return generated;
+ } else {
+ throw new IncompatibleTimeMachineHooksException(incompatibilities);
+ }
+ }
+
+ @Override
+ public final Map> getUpgrades(World world, BlockPos controllerPos, Direction side) {
+ HashMap> upgrades = new HashMap<>(0);
+ for (BlockPos pos:getBasicBlocksPos(side))
+ for (BlockState state:getUpgradeBlocks())
+ if (world.getBlockState(controllerPos.add(pos)) == state) {
+ TimeMachineUpgrade upgrade = ((TimeMachineUpgradeBlock) state.getBlock()).getUpgrade();
+ upgrades.putIfAbsent(upgrade, new HashSet<>());
+ upgrades.get(upgrade).add(controllerPos.add(pos));
+ break;
+ }
+ return upgrades;
+ }
+
+ @Override
+ public void run(World world, PlayerEntity playerIn, BlockPos controllerPos, Direction side) {
+ if (!world.isClient) {
+ TimeMachineUtils.Check error = TimeMachineUtils.check(this, world, playerIn, controllerPos, side);
+ if (error == null) {
+ if (!triggerTemporalExplosion(world, controllerPos, side)) {
+ if (playerIn instanceof ServerPlayerEntity) {
+ ModTriggers.ACCESS_TIME_MACHINE.trigger((ServerPlayerEntity) playerIn);
+ }
+ OpenTmGuiPKT pkt = new OpenTmGuiPKT(this, controllerPos, side, getEntitiesInside(world, controllerPos, side).stream()
+ .filter(entity -> !entity.equals(playerIn))
+ .map(Entity::getUuid)
+ .collect(Collectors.toList()).toArray(new UUID[]{}));
+ ServerSidePacketRegistry.INSTANCE.sendToPlayer(playerIn, OpenTmGuiPKT.ID, pkt.encode());
+ }
+ } else {
+ if (playerIn instanceof ServerPlayerEntity) {
+ ((ServerPlayerEntity) playerIn).sendChatMessage(error.getClientError(), MessageType.GAME_INFO);
+ }
+ }
+ }
+ }
+
+ @Override
+ public boolean triggerTemporalExplosion(World world, BlockPos controllerPos, Direction side) {
+ for (BlockPos pos:getCoreBlocksPos(side)) {
+ TimeMachineCoreBlock core = (TimeMachineCoreBlock) world.getBlockState(controllerPos.add(pos)).getBlock();
+ if (core.randomExplosion(world, controllerPos.add(pos)))
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public boolean isBuilt(World world, BlockPos controllerPos, Direction side) {
+ if (isComponentTypeBuilt(TimeMachineComponentType.CORE, world, controllerPos, side) &&
+ isComponentTypeBuilt(TimeMachineComponentType.BASIC, world, controllerPos, side)) {
+ List airPos = getAirBlocksPos(side);
+ for (BlockPos pos: airPos) {
+ if (world.getBlockState(controllerPos.add(pos)) != Blocks.AIR.getDefaultState()) {
+ return false;
+ }
+ }
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public boolean isCooledDown(World world, BlockPos controllerPos, Direction side) {
+ for(BlockPos pos:getCoreBlocksPos(side)) {
+ boolean coincidence = false;
+ for(BlockState state:getCoreBlocks()) {
+ if (world.getBlockState(controllerPos.add(pos)).getBlock() instanceof TimeMachineCoreBlock) {
+ if (world.getBlockState(controllerPos.add(pos)) == state.with(TimeMachineCoreBlock.TM_READY, true)) {
+ coincidence = true;
+ break;
+ }
+ }
+ }
+ if(!coincidence)
+ return false;
+ }
+ return true;
+ }
+
+ @Override
+ public boolean isOverloaded(World world, BlockPos controllerPos, Direction side) {
+ return getEntitiesInside(world, controllerPos, side).size() > getEntityMaxLoad();
+ }
+
+ @Override
+ public boolean isPlayerInside(World world, BlockPos controllerPos, Direction side, PlayerEntity player) {
+ for (Entity entity:getEntitiesInside(world, controllerPos, side)){
+ if (entity.getEntityId() == (player.getEntityId())) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ @Override
+ public List getEntitiesInside(World world, BlockPos controllerPos, Direction side) {
+ Box airSpace = getAirSpace(controllerPos, side);
+ return world.getEntities(null, airSpace);
+ }
+
+ @Override
+ public Box getAirSpace(BlockPos controllerPos, Direction side) {
+ // Get the air blocks
+ List relativeAirBlocks = applySide(airBlocksPos(), side);
+ // First block is the min and max block by default
+ BlockPos minPos = relativeAirBlocks.get(0);
+ BlockPos maxPos = relativeAirBlocks.get(0);
+ // Check for the correct min and max block
+ for (BlockPos pos: relativeAirBlocks) {
+ if (pos.getX() < minPos.getX() ||
+ pos.getY() < minPos.getY() ||
+ pos.getZ() < minPos.getZ()) {
+ minPos = pos;
+ } else
+ if (pos.getX() > maxPos.getX() ||
+ pos.getY() > maxPos.getY() ||
+ pos.getZ() > maxPos.getZ()) {
+ maxPos = pos;
+ }
+ }
+ // Convert the relative positions to real ones
+ minPos = minPos.add(controllerPos);
+ maxPos = maxPos.add(controllerPos);
+ // Return the Air Space
+ float offset = 0.3f;
+ return new Box(
+ minPos.getX() + offset,
+ minPos.getY() + offset,
+ minPos.getZ() + offset,
+ maxPos.getX() + 1-offset,
+ maxPos.getY() + 1-offset,
+ maxPos.getZ() + 1-offset
+ );
+ }
+
+ @Override
+ public void teleporterTasks(Entity entity, World worldIn, World worldOut, BlockPos controllerPos, Direction side, boolean shouldBuild) {
+ Chunk chunk = worldIn.getChunk(controllerPos);
+ worldIn.getChunkManager().getChunk(chunk.getPos().x, chunk.getPos().z, ChunkStatus.FULL, true);
+ if (shouldBuild) {
+ List posData = getPosData(controllerPos, side);
+ Map blockData = getBlockData(worldOut, posData);
+ destroyTM(worldOut, posData);
+ buildTM(worldIn, blockData);
+ doCooldown(worldIn, controllerPos, side);
+ }
+ }
+
+ @Override
+ public final void doCooldown(World worldIn, BlockPos controllerPos, Direction side) {
+ for (BlockPos relativePos:getCoreBlocksPos(side)) {
+ worldIn.setBlockState(controllerPos.add(relativePos), worldIn.getBlockState(controllerPos.add(relativePos)).with(TimeMachineCoreBlock.TM_READY, false));
+ ((TMCooldownBlockEntity)worldIn.getBlockEntity(controllerPos.add(relativePos))).setTime(getCooldownTime());
+ }
+ }
+
+ @Override
+ public String toString() {
+ return ModRegistries.TIME_MACHINES.getId(this).toString();
+ }
+
+ @Override
+ public com.rdvdev2.TimeTravelMod.api.timemachine.TimeMachine removeHooks() {
+ return this;
+ }
+
+ @Override
+ public HashSet getUpgradePos(TimeMachineUpgrade upgrade) {
+ return new HashSet<>();
+ }
+
+ // Private utils methods
+
+ private static List applySide(List posList, Direction side) {
+ posList = new ArrayList<>(posList);
+ if (side == Direction.NORTH) return posList;
+ for (int i = 0; i < posList.size(); i++) {
+ switch (side) {
+ case SOUTH:
+ posList.set(i, posList.get(i).rotate(BlockRotation.CLOCKWISE_180));
+ break;
+ case WEST:
+ posList.set(i, posList.get(i).rotate(BlockRotation.COUNTERCLOCKWISE_90));
+ break;
+ case EAST:
+ posList.set(i, posList.get(i).rotate(BlockRotation.CLOCKWISE_90));
+ break;
+ }
+ }
+ return posList;
+ }
+
+ private boolean isComponentTypeBuilt(TimeMachineComponentType type, World world, BlockPos controllerPos, Direction side) {
+ List positions;
+ BlockState[] states;
+
+ switch (type) {
+ case CORE:
+ positions = getCoreBlocksPos(side);
+ states = getCoreBlocks();
+ break;
+ case BASIC:
+ case UPGRADE:
+ positions = getBasicBlocksPos(side);
+ states = ArrayUtils.addAll(getBasicBlocks(), getUpgradeBlocks());
+ break;
+ case CONTROLPANEL:
+ positions = Collections.singletonList(BlockPos.ORIGIN);
+ states = getControllerBlocks();
+ break;
+ default:
+ throw new IllegalArgumentException("EnumMachineComponentType can't be null");
+ }
+
+ for (BlockPos pos:positions) {
+ boolean coincidence = false;
+ for (BlockState state:states) {
+ if (type == TimeMachineComponentType.CORE ?
+ world.getBlockState(controllerPos.add(pos)).getBlock().getDefaultState() == state.getBlock().getDefaultState() :
+ world.getBlockState(controllerPos.add(pos)) == state) {
+ coincidence = true;
+ break;
+ }
+ }
+ if (!coincidence) return false;
+ }
+ return true;
+ }
+
+ private List getPosData(BlockPos controllerPos, Direction side) {
+ ArrayList posData = new ArrayList<>();
+ posData.add(BlockPos.ORIGIN);
+ posData.addAll(getCoreBlocksPos(side));
+ posData.addAll(getBasicBlocksPos(side));
+ posData.addAll(getAirBlocksPos(side));
+ for (int i = 0; i < posData.size(); i++) {
+ posData.set(i, controllerPos.add(posData.get(i)));
+ }
+ return posData;
+ }
+
+ private Map getBlockData(World world, List posData) {
+ Map blockData = new HashMap<>(posData.size());
+ for (BlockPos pos: posData) {
+ blockData.put(pos, world.getBlockState(pos));
+ }
+ return blockData;
+ }
+
+ private void destroyTM(World world, List posData) {
+ for (BlockPos pos: posData) {
+ world.setBlockState(pos, Blocks.AIR.getDefaultState());
+ }
+ }
+
+ private void buildTM(World world, Map blockData) {
+ for (BlockPos pos: blockData.keySet()) {
+ world.setBlockState(pos, blockData.get(pos));
+ }
+ }
+
+ // Template delegates
+
+ @Override
+ public int getCooldownTime() {
+ return template.getCooldownTime();
+ }
+
+ @Override
+ public int getTier() {
+ return template.getTier();
+ }
+
+ @Override
+ public List coreBlocksPos() {
+ return template.coreBlocksPos();
+ }
+
+ @Override
+ public List basicBlocksPos() {
+ return template.basicBlocksPos();
+ }
+
+ @Override
+ public List airBlocksPos() {
+ return template.airBlocksPos();
+ }
+
+ @Override
+ public BlockState[] getControllerBlocks() {
+ return template.getControllerBlocks();
+ }
+
+ @Override
+ public BlockState[] getCoreBlocks() {
+ return template.getCoreBlocks();
+ }
+
+ @Override
+ public BlockState[] getBasicBlocks() {
+ return template.getBasicBlocks();
+ }
+
+ @Override
+ public int getEntityMaxLoad() {
+ return template.getEntityMaxLoad();
+ }
+
+ @Override
+ public int getCorruptionMultiplier() {
+ return template.getCorruptionMultiplier();
+ }
+
+ public enum TimeMachineComponentType {
+ BASIC, CORE, CONTROLPANEL, UPGRADE, AIR
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/common/timemachine/TimeMachineEntityPlacer.java b/src/main/java/com/rdvdev2/TimeTravelMod/common/timemachine/TimeMachineEntityPlacer.java
new file mode 100644
index 0000000..c939923
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/common/timemachine/TimeMachineEntityPlacer.java
@@ -0,0 +1,33 @@
+package com.rdvdev2.TimeTravelMod.common.timemachine;
+
+import com.rdvdev2.TimeTravelMod.api.timemachine.TimeMachine;
+import net.fabricmc.fabric.api.dimension.v1.EntityPlacer;
+import net.minecraft.block.pattern.BlockPattern;
+import net.minecraft.entity.Entity;
+import net.minecraft.server.world.ServerWorld;
+import net.minecraft.util.math.BlockPos;
+import net.minecraft.util.math.Direction;
+import net.minecraft.world.World;
+
+public class TimeMachineEntityPlacer implements EntityPlacer {
+
+ private final com.rdvdev2.TimeTravelMod.api.timemachine.TimeMachine tm;
+ private final World currentWorld;
+ private final BlockPos pos;
+ private final Direction side;
+ private final boolean shouldBuild;
+
+ public TimeMachineEntityPlacer(TimeMachine tm, World currentWorld, BlockPos pos, Direction side, boolean shouldBuild) {
+ this.tm = tm;
+ this.currentWorld = currentWorld;
+ this.pos = pos;
+ this.side = side;
+ this.shouldBuild = shouldBuild;
+ }
+
+ @Override
+ public BlockPattern.TeleportTarget placeEntity(Entity teleported, ServerWorld destination, Direction portalDir, double horizontalOffset, double verticalOffset) {
+ tm.teleporterTasks(teleported, destination, currentWorld, pos, side, shouldBuild);
+ return new BlockPattern.TeleportTarget(teleported.getPos(), teleported.getVelocity(), (int) teleported.getHeadYaw());
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/common/timemachine/TimeMachineHookRunner.java b/src/main/java/com/rdvdev2/TimeTravelMod/common/timemachine/TimeMachineHookRunner.java
new file mode 100644
index 0000000..615e974
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/common/timemachine/TimeMachineHookRunner.java
@@ -0,0 +1,233 @@
+package com.rdvdev2.TimeTravelMod.common.timemachine;
+
+import com.rdvdev2.TimeTravelMod.api.timemachine.exception.IncompatibleTimeMachineHooksException;
+import com.rdvdev2.TimeTravelMod.api.timemachine.upgrade.TimeMachineHook;
+import com.rdvdev2.TimeTravelMod.api.timemachine.upgrade.TimeMachineUpgrade;
+import net.minecraft.block.BlockState;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.player.PlayerEntity;
+import net.minecraft.text.TranslatableText;
+import net.minecraft.util.math.BlockPos;
+import net.minecraft.util.math.Box;
+import net.minecraft.util.math.Direction;
+import net.minecraft.world.World;
+import org.jetbrains.annotations.Nullable;
+
+import java.util.*;
+import java.util.function.Supplier;
+import java.util.stream.Collectors;
+
+public class TimeMachineHookRunner implements com.rdvdev2.TimeTravelMod.api.timemachine.TimeMachine {
+
+ com.rdvdev2.TimeTravelMod.api.timemachine.TimeMachine tm;
+ private final Map> upgrades;
+
+ public TimeMachineHookRunner(com.rdvdev2.TimeTravelMod.api.timemachine.TimeMachine tm, Map> upgrades) {
+ this.tm = tm;
+ this.upgrades = upgrades;
+ }
+
+ public com.rdvdev2.TimeTravelMod.api.timemachine.TimeMachine removeHooks() {
+ return this.tm;
+ }
+
+ public HashSet checkIncompatibilities() {
+
+ HashSet incompatibilities = new HashSet<>(0);
+ for (Class extends TimeMachineHook>> hook : TimeMachineHook.HOOK_TYPES) {
+ Set found = this.upgrades.keySet().stream()
+ .map(u -> (com.rdvdev2.TimeTravelMod.common.timemachine.upgrade.TimeMachineUpgrade) u)
+ .filter(u -> u.isExclusiveHook(hook))
+ .collect(Collectors.toSet());
+ if (found.size() > 1) incompatibilities.addAll(found);
+ }
+ return incompatibilities;
+ }
+
+ @Override
+ public int getCooldownTime() {
+ return runHooks(tm::getCooldownTime, TimeMachineHook.CooldownHook.class);
+ }
+
+ @Override
+ public int getTier() {
+ return runHooks(tm::getTier, TimeMachineHook.TierHook.class);
+ }
+
+ @Override
+ public List coreBlocksPos() {
+ return tm.coreBlocksPos(); // Directly delegate, this isn't in the Upgrades scope
+ }
+
+ @Override
+ public List basicBlocksPos() {
+ return tm.basicBlocksPos(); // Directly delegate, this isn't in the Upgrades scope
+ }
+
+ @Override
+ public List airBlocksPos() {
+ return tm.airBlocksPos(); // Directly delegate, this isn't in the Upgrades scope
+ }
+
+ @Override
+ public BlockState[] getControllerBlocks() {
+ return tm.getControllerBlocks(); // Directly delegate, this isn't in the Upgrades scope
+ }
+
+ @Override
+ public BlockState[] getCoreBlocks() {
+ return tm.getCoreBlocks(); // Directly delegate, this isn't in the Upgrades scope
+ }
+
+ @Override
+ public BlockState[] getBasicBlocks() {
+ return tm.getBasicBlocks(); // Directly delegate, this isn't in the Upgrades scope
+ }
+
+ @Override
+ public int getEntityMaxLoad() {
+ return runHooks(tm::getEntityMaxLoad, TimeMachineHook.EntityMaxLoadHook.class);
+ }
+
+ @Override
+ public void run(World world, PlayerEntity playerIn, BlockPos controllerPos, Direction side) {
+ runVoidHooks(() -> tm.run(world, playerIn, controllerPos, side), TimeMachineHook.RunHook.class, world, playerIn, controllerPos, side);
+ }
+
+ @Override
+ public boolean triggerTemporalExplosion(World world, BlockPos controllerPos, Direction side) {
+ return runHooks(() -> tm.triggerTemporalExplosion(world, controllerPos, side), TimeMachineHook.TriggerTemporalExplosionHook.class, world, controllerPos, side);
+ }
+
+ @Override
+ public void teleporterTasks(@Nullable Entity entity, World worldIn, World worldOut, BlockPos controllerPos, Direction side, boolean shouldBuild) {
+ runVoidHooks(() -> tm.teleporterTasks(entity, worldIn, worldOut, controllerPos, side, shouldBuild), TimeMachineHook.TeleporterTasks.class, entity, worldIn, worldOut, controllerPos, side, shouldBuild);
+ }
+
+ @Override
+ public List getCoreBlocksPos(Direction side) {
+ return tm.getCoreBlocksPos(side);
+ }
+
+ @Override
+ public List getBasicBlocksPos(Direction side) {
+ return tm.getBasicBlocksPos(side);
+ }
+
+ @Override
+ public List getAirBlocksPos(Direction side) {
+ return tm.getAirBlocksPos(side);
+ }
+
+ @Override
+ public BlockState[] getBlocks() {
+ return tm.getBlocks();
+ }
+
+ @Override
+ public boolean isBuilt(World world, BlockPos controllerPos, Direction side) {
+ return tm.isBuilt(world, controllerPos, side);
+ }
+
+ @Override
+ public boolean isCooledDown(World world, BlockPos controllerPos, Direction side) {
+ return tm.isCooledDown(world, controllerPos, side);
+ }
+
+ @Override
+ public boolean isOverloaded(World world, BlockPos controllerPos, Direction side) {
+ return tm.isOverloaded(world, controllerPos, side);
+ }
+
+ @Override
+ public boolean isPlayerInside(World world, BlockPos controllerPos, Direction side, PlayerEntity player) {
+ return tm.isPlayerInside(world, controllerPos, side, player);
+ }
+
+ @Override
+ public Box getAirSpace(BlockPos controllerPos, Direction side) {
+ return tm.getAirSpace(controllerPos, side);
+ }
+
+ @Override
+ public int getCorruptionMultiplier() {
+ return tm.getCorruptionMultiplier();
+ }
+
+ @Override
+ public String toString() {
+ return tm.toString();
+ }
+
+ private T runHooks(Supplier original, Class extends TimeMachineHook> clazz, Object... args) {
+ for(TimeMachineUpgrade upgrade:upgrades.keySet()) {
+ if (((com.rdvdev2.TimeTravelMod.common.timemachine.upgrade.TimeMachineUpgrade) upgrade).isExclusiveHook(clazz)) {
+ return ((com.rdvdev2.TimeTravelMod.common.timemachine.upgrade.TimeMachineUpgrade) upgrade).runHook(Optional.empty(), clazz, this, args);
+ }
+ }
+ T result = original.get();
+ for (TimeMachineUpgrade upgrade:upgrades.keySet()) {
+ result = ((com.rdvdev2.TimeTravelMod.common.timemachine.upgrade.TimeMachineUpgrade) upgrade).runHook(Optional.of(result), clazz, this, args);
+ }
+ return result;
+ }
+
+ private void runVoidHooks(Runnable original, Class extends TimeMachineHook> clazz, Object... args) {
+ for(TimeMachineUpgrade upgrade:upgrades.keySet()) {
+ if (((com.rdvdev2.TimeTravelMod.common.timemachine.upgrade.TimeMachineUpgrade) upgrade).isExclusiveHook(clazz)) {
+ ((com.rdvdev2.TimeTravelMod.common.timemachine.upgrade.TimeMachineUpgrade) upgrade).runVoidHook(clazz, this, args);
+ return;
+ }
+ }
+ boolean done = false;
+ for(TimeMachineUpgrade upgrade:upgrades.keySet()) {
+ if (((com.rdvdev2.TimeTravelMod.common.timemachine.upgrade.TimeMachineUpgrade) upgrade).runVoidHook(clazz, this, args))
+ done = true;
+ }
+ if (!done) original.run();
+ }
+
+ public HashSet getUpgradePos(TimeMachineUpgrade upgrade) {
+ return upgrades.get(upgrade);
+ }
+
+ @Override
+ public TranslatableText getName() {
+ return tm.getName();
+ }
+
+ @Override
+ public TranslatableText getDescription() {
+ return tm.getDescription();
+ }
+
+ @Override
+ public BlockState[] getUpgradeBlocks() {
+ return tm.getUpgradeBlocks();
+ }
+
+ @Override
+ public TimeMachineUpgrade[] getCompatibleUpgrades() {
+ return tm.getCompatibleUpgrades();
+ }
+
+ @Override
+ public com.rdvdev2.TimeTravelMod.api.timemachine.TimeMachine hook(World world, BlockPos controllerPos, Direction side) throws IncompatibleTimeMachineHooksException {
+ return this;
+ }
+
+ @Override
+ public Map> getUpgrades(World world, BlockPos controllerPos, Direction side) {
+ return this.upgrades;
+ }
+
+ @Override
+ public List getEntitiesInside(World world, BlockPos controllerPos, Direction side) {
+ return tm.getEntitiesInside(world, controllerPos, side);
+ }
+
+ @Override
+ public void doCooldown(World worldIn, BlockPos controllerPos, Direction side) {
+ tm.doCooldown(worldIn, controllerPos, side);
+ }
+}
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/common/timemachine/TimeMachineManager.java b/src/main/java/com/rdvdev2/TimeTravelMod/common/timemachine/TimeMachineManager.java
new file mode 100644
index 0000000..c0c0464
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/common/timemachine/TimeMachineManager.java
@@ -0,0 +1,57 @@
+package com.rdvdev2.TimeTravelMod.common.timemachine;
+
+import com.google.common.collect.ImmutableMap;
+import com.rdvdev2.TimeTravelMod.ModRegistries;
+import com.rdvdev2.TimeTravelMod.api.timemachine.TimeMachine;
+import com.rdvdev2.TimeTravelMod.api.timemachine.block.TimeMachineUpgradeBlock;
+import com.rdvdev2.TimeTravelMod.api.timemachine.upgrade.TimeMachineUpgrade;
+import net.fabricmc.fabric.api.event.registry.RegistryEntryAddedCallback;
+import net.minecraft.block.BlockState;
+import net.minecraft.util.Identifier;
+
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+
+public class TimeMachineManager {
+
+ private static final Map STATE_TO_TM = new HashMap<>();
+ private static final Map UPGRADE_TO_BLOCKS = new HashMap<>();
+
+ public static ImmutableMap getStateToTm() {
+ return ImmutableMap.copyOf(STATE_TO_TM);
+ }
+
+ public static void addUpgradeToBlockEntry(TimeMachineUpgrade upgrade, TimeMachineUpgradeBlock block) {
+ if (UPGRADE_TO_BLOCKS.containsKey(upgrade)) {
+ TimeMachineUpgradeBlock[] blocks = UPGRADE_TO_BLOCKS.get(upgrade);
+ int index = blocks.length;
+ blocks = Arrays.copyOf(blocks, index+1);
+ blocks[index] = block;
+ UPGRADE_TO_BLOCKS.put(upgrade, blocks);
+ } else {
+ UPGRADE_TO_BLOCKS.put(upgrade, new TimeMachineUpgradeBlock[]{block});
+ }
+ }
+
+ public static ImmutableMap getUpgradeToBlocks() {
+ return ImmutableMap.copyOf(UPGRADE_TO_BLOCKS);
+ }
+
+ public static void registerEvents() {
+ RegistryEntryAddedCallback.event(ModRegistries.TIME_MACHINES).register(TimeMachineManager::onTimeMachineAdded);
+ }
+
+ private static void onTimeMachineAdded(int rawId, Identifier id, TimeMachine tm) {
+ if (tm instanceof CreativeTimeMachine) return; // Special rule for the creative Time Machine
+ if (!STATE_TO_TM.containsValue(ModRegistries.TIME_MACHINES.getId(tm))) {
+ for(BlockState block:tm.getControllerBlocks()) {
+ if (!STATE_TO_TM.containsKey(block)) {
+ STATE_TO_TM.put(block, ModRegistries.TIME_MACHINES.getId(tm));
+ } else {
+ throw new RuntimeException(ModRegistries.TIME_MACHINES.getId(tm)+" tryed to register with controller block "+block.toString()+", but it is already registered to "+ STATE_TO_TM.get(block).toString());
+ }
+ }
+ }
+ }
+}
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/common/timemachine/hook/TrackerHooks.java b/src/main/java/com/rdvdev2/TimeTravelMod/common/timemachine/hook/TrackerHooks.java
new file mode 100644
index 0000000..975304a
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/common/timemachine/hook/TrackerHooks.java
@@ -0,0 +1,45 @@
+package com.rdvdev2.TimeTravelMod.common.timemachine.hook;
+
+import com.rdvdev2.TimeTravelMod.ModBlocks;
+import com.rdvdev2.TimeTravelMod.ModTimeMachines;
+import com.rdvdev2.TimeTravelMod.api.timemachine.TimeMachine;
+import com.rdvdev2.TimeTravelMod.api.timemachine.upgrade.TimeMachineHook;
+import com.rdvdev2.TimeTravelMod.common.block.TimeMachineRecallerBlock;
+import com.rdvdev2.TimeTravelMod.common.block.blockentity.TimeMachineRecallerBlockEntity;
+import net.minecraft.block.entity.BlockEntity;
+import net.minecraft.entity.Entity;
+import net.minecraft.util.math.BlockPos;
+import net.minecraft.util.math.Direction;
+import net.minecraft.world.World;
+
+import java.util.Set;
+
+public class TrackerHooks {
+
+ public static final TimeMachineHook>[] HOOKS = {new TeleporterHook()};
+
+ public static class TeleporterHook implements TimeMachineHook.TeleporterTasks {
+
+ @Override
+ public void run(TimeMachine tm, Entity entity, World worldIn, World worldOut, BlockPos controllerPos, Direction side, boolean shouldBuild) {
+ tm.removeHooks().teleporterTasks(entity, worldIn, worldOut, controllerPos, side, shouldBuild);
+ if (shouldBuild) {
+ Set upgrades = tm.getUpgradePos(ModTimeMachines.Upgrades.TRACKER);
+ for (BlockPos pos: upgrades) {
+ for (Direction direction: Direction.values()) {
+ BlockPos recaller = pos.offset(direction);
+ if (worldOut.getBlockState(recaller).getBlock() == ModBlocks.TIME_MACHINE_RECALLER) {
+ worldOut.setBlockState(recaller, worldOut.getBlockState(recaller).with(TimeMachineRecallerBlock.CONFIGURED, true));
+ BlockEntity tile = worldOut.getBlockEntity(recaller);
+ if (tile instanceof TimeMachineRecallerBlockEntity) {
+ ((TimeMachineRecallerBlockEntity) tile).setControllerPos(controllerPos);
+ ((TimeMachineRecallerBlockEntity) tile).setSide(side);
+ ((TimeMachineRecallerBlockEntity) tile).setDest(worldIn.getDimension().getType());
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/common/timemachine/upgrade/TimeMachineUpgrade.java b/src/main/java/com/rdvdev2/TimeTravelMod/common/timemachine/upgrade/TimeMachineUpgrade.java
new file mode 100644
index 0000000..03dd05f
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/common/timemachine/upgrade/TimeMachineUpgrade.java
@@ -0,0 +1,77 @@
+package com.rdvdev2.TimeTravelMod.common.timemachine.upgrade;
+
+import com.rdvdev2.TimeTravelMod.ModRegistries;
+import com.rdvdev2.TimeTravelMod.api.timemachine.TimeMachine;
+import com.rdvdev2.TimeTravelMod.api.timemachine.upgrade.TimeMachineHook;
+import net.minecraft.text.TranslatableText;
+import net.minecraft.util.Identifier;
+
+import java.util.HashMap;
+import java.util.Optional;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+public class TimeMachineUpgrade implements com.rdvdev2.TimeTravelMod.api.timemachine.upgrade.TimeMachineUpgrade {
+
+ private HashMap, Boolean> hooks;
+ private TimeMachine[] compatibleTMs;
+
+ public TimeMachineUpgrade() {
+ this.hooks = new HashMap<>(0);
+ }
+
+ public com.rdvdev2.TimeTravelMod.api.timemachine.upgrade.TimeMachineUpgrade addHook(TimeMachineHook> hook) {
+ addHook(hook, false);
+ return this;
+ }
+
+ public com.rdvdev2.TimeTravelMod.api.timemachine.upgrade.TimeMachineUpgrade addHook(TimeMachineHook> hook, boolean exclusiveMode) {
+ this.hooks.put(hook, exclusiveMode);
+ return this;
+ }
+
+ public com.rdvdev2.TimeTravelMod.api.timemachine.upgrade.TimeMachineUpgrade addAllHooks(TimeMachineHook>... hooks) {
+ for (TimeMachineHook> hook:hooks) this.addHook(hook);
+ return this;
+ }
+
+ public T runHook(Optional result, Class extends TimeMachineHook>> clazz, TimeMachine tm, Object... args) {
+ Set> hooks = this.hooks.keySet().stream()
+ .filter(clazz::isInstance)
+ .map(h -> (TimeMachineHook) h)
+ .collect(Collectors.toSet());
+ for (TimeMachineHook timeMachineHook: hooks) result = Optional.of(timeMachineHook.run(result, tm, args));
+ return result.orElseThrow(RuntimeException::new);
+ }
+
+ public boolean runVoidHook(Class extends TimeMachineHook> clazz, TimeMachine tm, Object... args) {
+ Optional> hook = this.hooks.keySet().stream().filter(clazz::isInstance).findFirst();
+ if (hook.isPresent()) {
+ hook.get().run(Optional.empty(), tm, args);
+ return true;
+ } else return false;
+ }
+
+ public TimeMachine[] getCompatibleTMs() {
+ return compatibleTMs;
+ }
+
+ public com.rdvdev2.TimeTravelMod.api.timemachine.upgrade.TimeMachineUpgrade setCompatibleTMs(TimeMachine... compatibleTMs) {
+ this.compatibleTMs = compatibleTMs;
+ return this;
+ }
+
+ public boolean isExclusiveHook(Class extends TimeMachineHook>> hook) {
+ return hooks.entrySet().stream().anyMatch(e -> hook.isAssignableFrom(e.getKey().getClass()));
+ }
+
+ public final TranslatableText getName() {
+ Identifier id = ModRegistries.UPGRADES.getId(this);
+ return new TranslatableText(String.format("tmupgrade.%s.%s.name", id.getNamespace(), id.getPath()));
+ }
+
+ public final TranslatableText getDescription() {
+ Identifier id = ModRegistries.UPGRADES.getId(this);
+ return new TranslatableText(String.format("tmupgrade.%s.%s.description", id.getNamespace(), id.getPath()));
+ }
+}
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/common/triggers/CustomTrigger.java b/src/main/java/com/rdvdev2/TimeTravelMod/common/triggers/CustomTrigger.java
new file mode 100644
index 0000000..59bf1de
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/common/triggers/CustomTrigger.java
@@ -0,0 +1,125 @@
+package com.rdvdev2.TimeTravelMod.common.triggers;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import com.google.common.collect.Sets;
+import com.google.gson.JsonDeserializationContext;
+import com.google.gson.JsonObject;
+import net.minecraft.advancement.PlayerAdvancementTracker;
+import net.minecraft.advancement.criterion.AbstractCriterionConditions;
+import net.minecraft.advancement.criterion.Criterion;
+import net.minecraft.server.network.ServerPlayerEntity;
+import net.minecraft.util.Identifier;
+
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.Set;
+
+public class CustomTrigger implements Criterion {
+
+ private final Identifier resourceloacation;
+ public final Map listeners = Maps.newHashMap();
+
+ public CustomTrigger(Identifier resourceLocation) {
+ this.resourceloacation = resourceLocation;
+ }
+
+ @Override
+ public Identifier getId() {
+ return this.resourceloacation;
+ }
+
+ @Override
+ public void beginTrackingCondition(PlayerAdvancementTracker playerAdvancements, ConditionsContainer listener) {
+ Listeners triggerListeners = listeners.get(playerAdvancements);
+
+ if (triggerListeners == null) {
+ triggerListeners = new Listeners(playerAdvancements);
+ listeners.put(playerAdvancements, triggerListeners);
+ }
+
+ triggerListeners.add(listener);
+ }
+
+ @Override
+ public void endTrackingCondition(PlayerAdvancementTracker playerAdvancements, ConditionsContainer listener) {
+ Listeners triggerListeners = listeners.get(playerAdvancements);
+
+ if (triggerListeners != null) {
+ triggerListeners.remove(listener);
+
+ if (triggerListeners.isEmpty()) {
+ listeners.remove(playerAdvancements);
+ }
+ }
+ }
+
+ @Override
+ public void endTracking(PlayerAdvancementTracker playerAdvancements) {
+ listeners.remove(playerAdvancements);
+ }
+
+ @Override
+ public Instance conditionsFromJson(JsonObject jsonObject, JsonDeserializationContext jsonDeserializationContext) {
+ return new Instance(getId());
+ }
+
+ public void trigger(ServerPlayerEntity player) {
+ Listeners triggerListeners = listeners.get(player.getAdvancementTracker());
+
+ if (triggerListeners != null) {
+ triggerListeners.trigger(player);
+ }
+ }
+
+ public static class Instance extends AbstractCriterionConditions {
+
+ public Instance(Identifier rl) {
+ super(rl);
+ }
+
+ public boolean test() {
+ return true;
+ }
+ }
+
+ static class Listeners {
+ private final PlayerAdvancementTracker playerAdvancements;
+ private final Set> listeners = Sets.newHashSet();
+
+ public Listeners(PlayerAdvancementTracker playerAdvancements) {
+ this.playerAdvancements = playerAdvancements;
+ }
+
+ public boolean isEmpty() {
+ return listeners.isEmpty();
+ }
+
+ public void add(Criterion.ConditionsContainer> listener) {
+ listeners.add(listener);
+ }
+
+ public void remove(Criterion.ConditionsContainer> listener) {
+ listeners.remove(listener);
+ }
+
+ public void trigger(ServerPlayerEntity player) {
+ ArrayList> list = null;
+
+ for (Criterion.ConditionsContainer> listener : listeners) {
+ if (((Instance)listener.getConditions()).test()) {
+ if (list == null) {
+ list = Lists.newArrayList();
+ }
+ list.add(listener);
+ }
+ }
+
+ if (list != null) {
+ for (Criterion.ConditionsContainer> listener : list) {
+ listener.grant(playerAdvancements);
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/common/util/TimeMachineUtils.java b/src/main/java/com/rdvdev2/TimeTravelMod/common/util/TimeMachineUtils.java
new file mode 100644
index 0000000..d15fdf7
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/common/util/TimeMachineUtils.java
@@ -0,0 +1,99 @@
+package com.rdvdev2.TimeTravelMod.common.util;
+
+import com.rdvdev2.TimeTravelMod.ModConfig;
+import com.rdvdev2.TimeTravelMod.api.timemachine.TimeMachine;
+import com.rdvdev2.TimeTravelMod.api.timemachine.upgrade.TimeMachineUpgrade;
+import net.minecraft.entity.player.PlayerEntity;
+import net.minecraft.network.MessageType;
+import net.minecraft.server.MinecraftServer;
+import net.minecraft.server.network.ServerPlayerEntity;
+import net.minecraft.text.ClickEvent;
+import net.minecraft.text.Style;
+import net.minecraft.text.TranslatableText;
+import net.minecraft.util.Formatting;
+import net.minecraft.util.math.BlockPos;
+import net.minecraft.util.math.Direction;
+import net.minecraft.world.World;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+
+public class TimeMachineUtils {
+
+ // Time Machine checking stuff
+
+ public static Check check(TimeMachine tm, World world, PlayerEntity player, BlockPos pos, Direction side) {
+ for(Check check: Check.values()) {
+ switch (check) {
+ case BUILT:
+ if (!tm.isBuilt(world, pos, side)) return check;
+ break;
+ case COOLED_DOWN:
+ if (!tm.isCooledDown(world, pos, side)) return check;
+ break;
+ case PALYER_INSIDE:
+ if (!tm.isPlayerInside(world, pos, side, player)) return check;
+ break;
+ case OVERLOADED:
+ if (tm.isOverloaded(world, pos, side)) return check;
+ break;
+ }
+ }
+ return null;
+ }
+
+ public static boolean serverCheck(MinecraftServer server, TimeMachine tm, World world, ServerPlayerEntity player, BlockPos pos, Direction side) {
+ Check error = check(tm, world, player, pos, side);
+ if (error == null) {
+ return true;
+ } else if (ModConfig.getInstance().getCommon().getEnableCheaterReports()){
+ Arrays.stream(server.getPlayerManager().getOpList().getNames())
+ .map(op -> server.getPlayerManager().getPlayer(op))
+ .forEach(op -> {
+ if (op != null)
+ op.sendChatMessage(error.getCheaterReport(player), MessageType.GAME_INFO);
+ });
+ return false;
+ } else return false;
+ }
+
+ public enum Check {
+ BUILT("timetravelmod.error.built.client", "timetravelmod.error.built.server"),
+ COOLED_DOWN("timetravelmod.error.cooled_down.client", "timetravelmod.error.cooled_down.server"),
+ PALYER_INSIDE("timetravelmod.error.player_inside.client", "timetravelmod.error.player_inside.server"),
+ OVERLOADED("timetravelmod.error.overloaded.client", "timetravelmod.error.overloaded.server"),
+ UNREACHABLE_DIM("", "timetravelmod.error.unreachable_dim"),
+ ENTITIES_ESCAPED("timetravelmod.error.entitiesescaped", "");
+
+ private final String clientError;
+ private final String cheatError;
+
+ Check(String clientError, String cheatError) {
+ this.clientError = clientError;
+ this.cheatError = cheatError;
+ }
+
+ public TranslatableText getClientError() {
+ return new TranslatableText(this.clientError);
+ }
+
+ public TranslatableText getCheaterReport(ServerPlayerEntity cheater) {
+ return new TranslatableText("timetravelmod.cheater_report", cheater.getDisplayName(), new TranslatableText(this.cheatError), getBanButton(cheater));
+ }
+
+ private static TranslatableText getBanButton(ServerPlayerEntity player) {
+ TranslatableText textComponent = new TranslatableText("timetravelmod.ban");
+ textComponent.setStyle(new Style().setClickEvent(new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, "/ban "+player.getName().asString())).setColor(Formatting.RED));
+ return textComponent;
+ }
+ }
+
+ // Time Machine uncompatibility listing stuff
+
+ public static TranslatableText concatUncompatibilities(ArrayList upgrades) {
+ if (upgrades.size() != 1) {
+ String separator = upgrades.size() > 2 ? "timetravelmod.generic.comma" : "timetravelmod.generic.and";
+ return new TranslatableText(separator, upgrades.remove(0).getName(), concatUncompatibilities(upgrades));
+ } else return upgrades.remove(0).getName();
+ }
+}
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/common/world/TemporalExplosion.java b/src/main/java/com/rdvdev2/TimeTravelMod/common/world/TemporalExplosion.java
new file mode 100644
index 0000000..a7e8e68
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/common/world/TemporalExplosion.java
@@ -0,0 +1,41 @@
+package com.rdvdev2.TimeTravelMod.common.world;
+
+import com.rdvdev2.TimeTravelMod.ModBlocks;
+import com.rdvdev2.TimeTravelMod.ModTriggers;
+import com.rdvdev2.TimeTravelMod.common.block.TemporalExplosionBlock;
+import net.minecraft.entity.Entity;
+import net.minecraft.server.network.ServerPlayerEntity;
+import net.minecraft.sound.SoundCategory;
+import net.minecraft.sound.SoundEvents;
+import net.minecraft.util.math.BlockPos;
+import net.minecraft.util.math.Box;
+import net.minecraft.world.World;
+import net.minecraft.world.explosion.Explosion;
+
+public class TemporalExplosion {
+
+ private World world;
+ private Entity entity;
+ private BlockPos pos;
+ private float strength;
+
+ public TemporalExplosion(World world, Entity entity, BlockPos pos, float strength) {
+ this.world = world;
+ this.entity = entity;
+ this.pos = pos;
+ this.strength = strength;
+ }
+
+ public void explode() {
+ Explosion explosion = new Explosion(world, entity, pos.getX(), pos.getY(), pos.getZ(), strength, false, Explosion.DestructionType.NONE);
+ explosion.collectBlocksAndDamageEntities();
+ world.playSound(null, pos, SoundEvents.ENTITY_GENERIC_EXPLODE, SoundCategory.BLOCKS, 6.0F, (1.0F + (this.world.random.nextFloat() - this.world.random.nextFloat()) * 0.2F) * 0.7F);
+ for(BlockPos block:explosion.getAffectedBlocks()) {
+ for (Entity entity:world.getEntities(null, new Box(block))) {
+ entity.damage(TemporalExplosionBlock.damage, 1000000);
+ if (entity instanceof ServerPlayerEntity) ModTriggers.TEMPORAL_EXPLOSION.trigger((ServerPlayerEntity) entity);
+ }
+ world.setBlockState(block, ModBlocks.TEMPORAL_EXPLOSION.getDefaultState());
+ }
+ }
+}
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/common/world/VanillaBiomesFeatures.java b/src/main/java/com/rdvdev2/TimeTravelMod/common/world/VanillaBiomesFeatures.java
new file mode 100644
index 0000000..4e386d2
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/common/world/VanillaBiomesFeatures.java
@@ -0,0 +1,31 @@
+package com.rdvdev2.TimeTravelMod.common.world;
+
+import com.rdvdev2.TimeTravelMod.ModBlocks;
+import net.minecraft.util.registry.Registry;
+import net.minecraft.world.biome.Biome;
+import net.minecraft.world.gen.GenerationStep;
+import net.minecraft.world.gen.decorator.Decorator;
+import net.minecraft.world.gen.decorator.RangeDecoratorConfig;
+import net.minecraft.world.gen.feature.ConfiguredFeature;
+import net.minecraft.world.gen.feature.Feature;
+import net.minecraft.world.gen.feature.OreFeatureConfig;
+
+public class VanillaBiomesFeatures {
+
+ public static void register() {
+ // Time Crystal Ores
+ registerGenerator(GenerationStep.Feature.UNDERGROUND_ORES, Feature.ORE.configure(
+ new OreFeatureConfig(OreFeatureConfig.Target.NATURAL_STONE, ModBlocks.TIME_CRYSTAL_ORE.getDefaultState(), 4)).createDecoratedFeature(
+ Decorator.COUNT_RANGE.configure(
+ new RangeDecoratorConfig(1, 0, 0, 16)))
+ );
+ }
+
+ private static void registerGenerator(GenerationStep.Feature stage, ConfiguredFeature, ?> feature) {
+ for (Biome biome : Registry.BIOME) {
+ if (biome.getCategory() != Biome.Category.NETHER && biome.getCategory() != Biome.Category.THEEND) {
+ biome.addFeature(stage, feature);
+ }
+ }
+ }
+}
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/common/world/dimension/Corruption.java b/src/main/java/com/rdvdev2/TimeTravelMod/common/world/dimension/Corruption.java
new file mode 100644
index 0000000..3c6a759
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/common/world/dimension/Corruption.java
@@ -0,0 +1,37 @@
+package com.rdvdev2.TimeTravelMod.common.world.dimension;
+
+import com.rdvdev2.TimeTravelMod.api.dimension.TimeLine;
+import com.rdvdev2.TimeTravelMod.common.event.WorldCorruptionChangedCallback;
+
+public class Corruption implements com.rdvdev2.TimeTravelMod.api.dimension.Corruption {
+
+ private int corruptionLevel;
+ private final TimeLine timeLine;
+
+ public Corruption(TimeLine timeLine) {
+ this.timeLine = timeLine;
+ }
+
+ @Override
+ public final int increaseCorruptionLevel(int amount) {
+ corruptionLevel += amount;
+ WorldCorruptionChangedCallback.EVENT.invoker().onWorldCorruptionChanged(timeLine, corruptionLevel);
+ return corruptionLevel;
+ }
+
+ @Override
+ public final int decreaseCorruptionLevel(int amount) {
+ corruptionLevel -= amount;
+ WorldCorruptionChangedCallback.EVENT.invoker().onWorldCorruptionChanged(timeLine, corruptionLevel);
+ return corruptionLevel;
+ }
+
+ @Override
+ public final int getCorruptionLevel() {
+ return corruptionLevel;
+ }
+
+ public void setCorruptionLevel(int level) {
+ corruptionLevel = level;
+ }
+}
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/common/world/dimension/PresentTimeLine.java b/src/main/java/com/rdvdev2/TimeTravelMod/common/world/dimension/PresentTimeLine.java
new file mode 100644
index 0000000..37a2a41
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/common/world/dimension/PresentTimeLine.java
@@ -0,0 +1,24 @@
+package com.rdvdev2.TimeTravelMod.common.world.dimension;
+
+import com.rdvdev2.TimeTravelMod.api.dimension.TimeLine;
+import net.minecraft.world.dimension.DimensionType;
+
+public class PresentTimeLine implements TimeLine {
+
+ private com.rdvdev2.TimeTravelMod.api.dimension.Corruption corruption = new Corruption(this);
+
+ @Override
+ public int getMinTier() {
+ return 0;
+ }
+
+ @Override
+ public DimensionType getDimensionType() {
+ return DimensionType.OVERWORLD;
+ }
+
+ @Override
+ public com.rdvdev2.TimeTravelMod.api.dimension.Corruption getCorruption() {
+ return corruption;
+ }
+}
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/common/world/dimension/TimeLine.java b/src/main/java/com/rdvdev2/TimeTravelMod/common/world/dimension/TimeLine.java
new file mode 100644
index 0000000..5c1d730
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/common/world/dimension/TimeLine.java
@@ -0,0 +1,48 @@
+package com.rdvdev2.TimeTravelMod.common.world.dimension;
+
+import com.rdvdev2.TimeTravelMod.ModRegistries;
+import com.rdvdev2.TimeTravelMod.api.dimension.AbstractTimeLineDimension;
+import net.fabricmc.fabric.api.dimension.v1.FabricDimensionType;
+import net.minecraft.block.pattern.BlockPattern;
+import net.minecraft.util.Identifier;
+import net.minecraft.world.World;
+import net.minecraft.world.dimension.DimensionType;
+
+import java.util.function.BiFunction;
+
+public class TimeLine implements com.rdvdev2.TimeTravelMod.api.dimension.TimeLine {
+
+ private final int minTier;
+ private DimensionType dimensionType;
+ private com.rdvdev2.TimeTravelMod.api.dimension.Corruption corruption = new Corruption(this);
+
+ @Override
+ public int getMinTier() {
+ return minTier;
+ }
+
+ public DimensionType getDimensionType() {
+ return this.dimensionType;
+ }
+
+ @Override
+ public com.rdvdev2.TimeTravelMod.api.dimension.Corruption getCorruption() {
+ return corruption;
+ }
+
+ public TimeLine(int minTier, BiFunction dimensionFactory, boolean skyLight, Identifier identifier) {
+ this.minTier = minTier;
+ this.dimensionType = FabricDimensionType.builder()
+ .factory(dimensionFactory.andThen(d -> {d.setTimeLine(this); return d;}))
+ .defaultPlacer((entity, serverWorld, direction, v, v1) -> new BlockPattern.TeleportTarget(entity.getPos(), entity.getVelocity(), (int) entity.getHeadYaw())) // Placeholder, never used
+ .skyLight(skyLight)
+ .buildAndRegister(identifier);
+ }
+
+ public static boolean isValidTimeLine(World world) {
+ for (com.rdvdev2.TimeTravelMod.api.dimension.TimeLine tl: ModRegistries.TIME_LINES) {
+ if (tl.getDimensionType() == world.getDimension().getType()) return true;
+ }
+ return false;
+ }
+}
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/common/world/dimension/oldwest/OldWestDimension.java b/src/main/java/com/rdvdev2/TimeTravelMod/common/world/dimension/oldwest/OldWestDimension.java
new file mode 100644
index 0000000..cd1635f
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/common/world/dimension/oldwest/OldWestDimension.java
@@ -0,0 +1,165 @@
+package com.rdvdev2.TimeTravelMod.common.world.dimension.oldwest;
+
+import com.rdvdev2.TimeTravelMod.ModBiomes;
+import com.rdvdev2.TimeTravelMod.api.dimension.AbstractTimeLineDimension;
+import com.rdvdev2.TimeTravelMod.common.world.dimension.oldwest.biome.OldWestBiomeSource;
+import net.minecraft.block.BlockState;
+import net.minecraft.tag.BlockTags;
+import net.minecraft.util.math.BlockPos;
+import net.minecraft.util.math.ChunkPos;
+import net.minecraft.util.math.MathHelper;
+import net.minecraft.util.math.Vec3d;
+import net.minecraft.world.Heightmap;
+import net.minecraft.world.World;
+import net.minecraft.world.biome.Biome;
+import net.minecraft.world.biome.source.BiomeSourceType;
+import net.minecraft.world.biome.source.VanillaLayeredBiomeSourceConfig;
+import net.minecraft.world.chunk.Chunk;
+import net.minecraft.world.dimension.DimensionType;
+import net.minecraft.world.gen.chunk.ChunkGenerator;
+import net.minecraft.world.gen.chunk.ChunkGeneratorType;
+import net.minecraft.world.gen.chunk.OverworldChunkGeneratorConfig;
+
+public class OldWestDimension extends AbstractTimeLineDimension { // TODO: Fix beds
+ private DimensionType type;
+ private World world;
+
+ public OldWestDimension(World world, DimensionType type) {
+ super(world, type, 0.0F);
+ this.world = world;
+ this.type = type;
+ }
+
+ @Override
+ public boolean hasSkyLight() {
+ return true;
+ }
+
+
+
+ @Override
+ public ChunkGenerator> createChunkGenerator() {
+ BiomeSourceType oldwestLayered = ModBiomes.ProviderTypes.OLDWEST_LAYERED;
+ VanillaLayeredBiomeSourceConfig oldWestBiomeSourceSettings = oldwestLayered.getConfig(this.world.getLevelProperties()).setGeneratorSettings(new OverworldChunkGeneratorConfig());
+ return ChunkGeneratorType.SURFACE.create(this.world, oldwestLayered.applyConfig(oldWestBiomeSourceSettings), new OverworldChunkGeneratorConfig());
+ }
+
+ @Override
+ public BlockPos getSpawningBlockInChunk(ChunkPos chunkPos, boolean checkValid) {
+ for(int i = chunkPos.getStartX(); i <= chunkPos.getEndX(); ++i) {
+ for(int j = chunkPos.getStartZ(); j <= chunkPos.getEndZ(); ++j) {
+ BlockPos blockpos = this.getTopSpawningBlockPosition(i, j, checkValid);
+ if (blockpos != null) {
+ return blockpos;
+ }
+ }
+ }
+
+ return null;
+ }
+
+ @Override
+ public BlockPos getTopSpawningBlockPosition(int p_206921_1_, int p_206921_2_, boolean checkValid) {
+ BlockPos.Mutable blockpos$mutableblockpos = new BlockPos.Mutable(p_206921_1_, 0, p_206921_2_);
+ Biome biome = this.world.getBiome(blockpos$mutableblockpos);
+ BlockState iblockstate = biome.getSurfaceConfig().getTopMaterial();
+ if (checkValid && !BlockTags.VALID_SPAWN.contains(iblockstate.getBlock())) {
+ return null;
+ } else {
+ Chunk chunk = this.world.getChunk(p_206921_1_ >> 4, p_206921_2_ >> 4);
+ int i = chunk.sampleHeightmap(Heightmap.Type.MOTION_BLOCKING, p_206921_1_ & 15, p_206921_2_ & 15);
+ if (i < 0) {
+ return null;
+ } else if (chunk.sampleHeightmap(Heightmap.Type.WORLD_SURFACE, p_206921_1_ & 15, p_206921_2_ & 15) > chunk.sampleHeightmap(Heightmap.Type.OCEAN_FLOOR, p_206921_1_ & 15, p_206921_2_ & 15)) {
+ return null;
+ } else {
+ for(int j = i + 1; j >= 0; --j) {
+ blockpos$mutableblockpos.set(p_206921_1_, j, p_206921_2_);
+ BlockState iblockstate1 = this.world.getBlockState(blockpos$mutableblockpos);
+ if (!iblockstate1.getFluidState().isEmpty()) {
+ break;
+ }
+
+ if (iblockstate1.equals(iblockstate)) {
+ return blockpos$mutableblockpos.up().toImmutable();
+ }
+ }
+
+ return null;
+ }
+ }
+ }
+
+ /**
+ * Calculates the angle of sun and moon in the sky relative to a specified time (usually worldTime)
+ *
+ * @param worldTime
+ * @param partialTicks
+ */
+ @Override
+ public float getSkyAngle(long worldTime, float partialTicks) {
+ int i = (int)(worldTime % 24000L);
+ float f = ((float)i + partialTicks) / 24000.0F - 0.25F;
+ if (f < 0.0F) {
+ ++f;
+ }
+
+ if (f > 1.0F) {
+ --f;
+ }
+
+ float f1 = 1.0F - (float)((Math.cos((double)f * Math.PI) + 1.0D) / 2.0D);
+ f = f + (f1 - f) / 3.0F;
+ return f;
+ }
+
+ @Override
+ public boolean hasVisibleSky() {
+ return true;
+ }
+
+ @Override
+ public boolean hasGround() {
+ return true;
+ }
+
+ /**
+ * Return Vec3D with biome specific fog color
+ *
+ * @param p_76562_1_
+ * @param p_76562_2_
+ */
+ @Override
+ public Vec3d getFogColor(float p_76562_1_, float p_76562_2_) {
+ float f = MathHelper.cos(p_76562_1_ * ((float)Math.PI * 2F)) * 2.0F + 0.5F;
+ f = MathHelper.clamp(f, 0.0F, 1.0F);
+ float f1 = 0.7529412F;
+ float f2 = 0.84705883F;
+ float f3 = 1.0F;
+ f1 = f1 * (f * 0.94F + 0.06F);
+ f2 = f2 * (f * 0.94F + 0.06F);
+ f3 = f3 * (f * 0.91F + 0.09F);
+ return new Vec3d((double)f1, (double)f2, (double)f3);
+ }
+
+ @Override
+ public boolean canPlayersSleep() {
+ return true;
+ }
+
+ /**
+ * Returns true if the given X,Z coordinate should show environmental fog.
+ *
+ * @param x
+ * @param z
+ */
+ @Override
+ public boolean isFogThick(int x, int z) {
+ return false;
+ }
+
+ @Override
+ public DimensionType getType() {
+ return this.type;
+ }
+}
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/common/world/dimension/oldwest/biome/OldWestBiome.java b/src/main/java/com/rdvdev2/TimeTravelMod/common/world/dimension/oldwest/biome/OldWestBiome.java
new file mode 100644
index 0000000..ef3cc46
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/common/world/dimension/oldwest/biome/OldWestBiome.java
@@ -0,0 +1,61 @@
+package com.rdvdev2.TimeTravelMod.common.world.dimension.oldwest.biome;
+
+import com.rdvdev2.TimeTravelMod.ModBlocks;
+import com.rdvdev2.TimeTravelMod.ModFeatures;
+import net.minecraft.entity.EntityCategory;
+import net.minecraft.entity.EntityType;
+import net.minecraft.world.biome.Biome;
+import net.minecraft.world.biome.DefaultBiomeFeatures;
+import net.minecraft.world.gen.GenerationStep;
+import net.minecraft.world.gen.decorator.ChanceDecoratorConfig;
+import net.minecraft.world.gen.decorator.Decorator;
+import net.minecraft.world.gen.decorator.RangeDecoratorConfig;
+import net.minecraft.world.gen.feature.*;
+import net.minecraft.world.gen.surfacebuilder.ConfiguredSurfaceBuilder;
+import net.minecraft.world.gen.surfacebuilder.SurfaceBuilder;
+
+import static net.minecraft.world.biome.Biome.Precipitation.NONE;
+
+public final class OldWestBiome extends Biome {
+ public OldWestBiome() {
+ // Vanilla desert start
+ super(new Biome.Settings().surfaceBuilder(new ConfiguredSurfaceBuilder<>(SurfaceBuilder.DEFAULT, SurfaceBuilder.SAND_CONFIG)).precipitation(NONE).category(Category.DESERT).depth(0.125F).scale(0.05F).temperature(2.0F).downfall(0.0F).waterColor(4159204).waterFogColor(329011).parent(null));
+ this.addStructureFeature(Feature.VILLAGE.configure(new VillageFeatureConfig("minecraft:village/oldwest/town_centers", 6))); // Custom village
+ this.addStructureFeature(Feature.PILLAGER_OUTPOST.configure(DefaultFeatureConfig.DEFAULT));
+ //this.addStructureFeature();(Feature.DESERT_PYRAMID, IFeatureConfig.NO_FEATURE_CONFIG);
+ this.addStructureFeature(Feature.MINESHAFT.configure(new MineshaftFeatureConfig(0.004D, MineshaftFeature.Type.NORMAL))); // Custom mineshaft (planned)
+ //this.addStructureFeature();(Feature.STRONGHOLD, IFeatureConfig.NO_FEATURE_CONFIG);
+ DefaultBiomeFeatures.addLandCarvers(this);
+ DefaultBiomeFeatures.addDefaultStructures(this);
+ DefaultBiomeFeatures.addDesertLakes(this);
+ DefaultBiomeFeatures.addDungeons(this);
+ DefaultBiomeFeatures.addMineables(this);
+ DefaultBiomeFeatures.addDefaultOres(this);
+ DefaultBiomeFeatures.addDefaultDisks(this);
+ DefaultBiomeFeatures.addDefaultFlowers(this);
+ DefaultBiomeFeatures.addDefaultGrass(this);
+ DefaultBiomeFeatures.addDesertDeadBushes(this);
+ DefaultBiomeFeatures.addDefaultMushrooms(this);
+ DefaultBiomeFeatures.addDesertVegetation(this);
+ DefaultBiomeFeatures.addSprings(this);
+ DefaultBiomeFeatures.addDesertFeatures(this);
+ DefaultBiomeFeatures.addFrozenTopLayer(this);
+ this.addSpawn(EntityCategory.CREATURE, new Biome.SpawnEntry(EntityType.RABBIT, 4, 2, 3));
+ this.addSpawn(EntityCategory.AMBIENT, new Biome.SpawnEntry(EntityType.BAT, 10, 8, 8));
+ this.addSpawn(EntityCategory.MONSTER, new Biome.SpawnEntry(EntityType.SPIDER, 100, 4, 4));
+ this.addSpawn(EntityCategory.MONSTER, new Biome.SpawnEntry(EntityType.SKELETON, 100, 4, 4));
+ this.addSpawn(EntityCategory.MONSTER, new Biome.SpawnEntry(EntityType.CREEPER, 100, 4, 4));
+ this.addSpawn(EntityCategory.MONSTER, new Biome.SpawnEntry(EntityType.SLIME, 100, 4, 4));
+ this.addSpawn(EntityCategory.MONSTER, new Biome.SpawnEntry(EntityType.ENDERMAN, 10, 1, 4));
+ this.addSpawn(EntityCategory.MONSTER, new Biome.SpawnEntry(EntityType.WITCH, 5, 1, 1));
+ this.addSpawn(EntityCategory.MONSTER, new Biome.SpawnEntry(EntityType.ZOMBIE, 19, 4, 4));
+ this.addSpawn(EntityCategory.MONSTER, new Biome.SpawnEntry(EntityType.ZOMBIE_VILLAGER, 1, 1, 1));
+ this.addSpawn(EntityCategory.MONSTER, new Biome.SpawnEntry(EntityType.HUSK, 80, 4, 4));
+
+ // Time Travel Mod start
+ this.addFeature(GenerationStep.Feature.UNDERGROUND_ORES, Feature.ORE.configure(new OreFeatureConfig(OreFeatureConfig.Target.NATURAL_STONE, ModBlocks.TIME_CRYSTAL_ORE.getDefaultState(), 4)).createDecoratedFeature(Decorator.COUNT_RANGE.configure(new RangeDecoratorConfig(1, 0, 0, 16))));
+ this.addFeature(GenerationStep.Feature.SURFACE_STRUCTURES, ModFeatures.GUNPOWDER.configure(DefaultFeatureConfig.DEFAULT).createDecoratedFeature(Decorator.CHANCE_TOP_SOLID_HEIGHTMAP.configure(new ChanceDecoratorConfig(100))));
+ DefaultBiomeFeatures.addExtraGoldOre(this);
+ this.addStructureFeature(Feature.MINESHAFT.configure(new MineshaftFeatureConfig(0.002D, MineshaftFeature.Type.MESA)));
+ }
+}
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/common/world/dimension/oldwest/biome/OldWestBiomeSource.java b/src/main/java/com/rdvdev2/TimeTravelMod/common/world/dimension/oldwest/biome/OldWestBiomeSource.java
new file mode 100644
index 0000000..667f970
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/common/world/dimension/oldwest/biome/OldWestBiomeSource.java
@@ -0,0 +1,27 @@
+package com.rdvdev2.TimeTravelMod.common.world.dimension.oldwest.biome;
+
+import com.google.common.collect.ImmutableSet;
+import com.rdvdev2.TimeTravelMod.ModBiomes;
+import com.rdvdev2.TimeTravelMod.common.world.layer.OldWestLayers;
+import net.minecraft.world.biome.Biome;
+import net.minecraft.world.biome.Biomes;
+import net.minecraft.world.biome.source.BiomeLayerSampler;
+import net.minecraft.world.biome.source.BiomeSource;
+import net.minecraft.world.biome.source.VanillaLayeredBiomeSourceConfig;
+
+import java.util.Set;
+
+public class OldWestBiomeSource extends BiomeSource {
+ private final BiomeLayerSampler biomeSampler;
+ private static final Set BIOMES = ImmutableSet.of(ModBiomes.OLDWEST, Biomes.BADLANDS, Biomes.BADLANDS_PLATEAU, Biomes.WOODED_BADLANDS_PLATEAU, Biomes.ERODED_BADLANDS, Biomes.MODIFIED_BADLANDS_PLATEAU, Biomes.MODIFIED_WOODED_BADLANDS_PLATEAU, Biomes.OCEAN, Biomes.LUKEWARM_OCEAN, Biomes.WARM_OCEAN, Biomes.DEEP_OCEAN, Biomes.DEEP_LUKEWARM_OCEAN, Biomes.DEEP_WARM_OCEAN, Biomes.RIVER, Biomes.BEACH);
+
+ public OldWestBiomeSource(VanillaLayeredBiomeSourceConfig config) {
+ super(BIOMES);
+ this.biomeSampler = OldWestLayers.build(config.getSeed(), config.getGeneratorType(), config.getGeneratorSettings());
+ }
+
+ @Override
+ public Biome getBiomeForNoiseGen(int biomeX, int biomeY, int biomeZ) {
+ return this.biomeSampler.sample(biomeX, biomeZ);
+ }
+}
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/common/world/dimension/oldwest/village/OldWestVillagePools.java b/src/main/java/com/rdvdev2/TimeTravelMod/common/world/dimension/oldwest/village/OldWestVillagePools.java
new file mode 100644
index 0000000..c74487c
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/common/world/dimension/oldwest/village/OldWestVillagePools.java
@@ -0,0 +1,38 @@
+package com.rdvdev2.TimeTravelMod.common.world.dimension.oldwest.village;
+
+import com.google.common.collect.ImmutableList;
+import com.mojang.datafixers.util.Pair;
+import net.minecraft.block.Blocks;
+import net.minecraft.structure.pool.*;
+import net.minecraft.structure.processor.RuleStructureProcessor;
+import net.minecraft.structure.processor.StructureProcessor;
+import net.minecraft.structure.processor.StructureProcessorRule;
+import net.minecraft.structure.rule.AlwaysTrueRuleTest;
+import net.minecraft.structure.rule.BlockMatchRuleTest;
+import net.minecraft.structure.rule.RandomBlockMatchRuleTest;
+import net.minecraft.structure.rule.TagMatchRuleTest;
+import net.minecraft.tag.BlockTags;
+import net.minecraft.util.Identifier;
+import net.minecraft.world.biome.DefaultBiomeFeatures;
+import net.minecraft.world.gen.feature.Feature;
+
+public class OldWestVillagePools {
+ public static void init() {
+ }
+
+ static {
+ ImmutableList immutablelist = ImmutableList.of(new RuleStructureProcessor(ImmutableList.of(new StructureProcessorRule(new TagMatchRuleTest(BlockTags.DOORS), AlwaysTrueRuleTest.INSTANCE, Blocks.AIR.getDefaultState()), new StructureProcessorRule(new BlockMatchRuleTest(Blocks.TORCH), AlwaysTrueRuleTest.INSTANCE, Blocks.AIR.getDefaultState()), new StructureProcessorRule(new BlockMatchRuleTest(Blocks.WALL_TORCH), AlwaysTrueRuleTest.INSTANCE, Blocks.AIR.getDefaultState()), new StructureProcessorRule(new RandomBlockMatchRuleTest(Blocks.SMOOTH_SANDSTONE, 0.08F), AlwaysTrueRuleTest.INSTANCE, Blocks.COBWEB.getDefaultState()), new StructureProcessorRule(new RandomBlockMatchRuleTest(Blocks.CUT_SANDSTONE, 0.1F), AlwaysTrueRuleTest.INSTANCE, Blocks.COBWEB.getDefaultState()), new StructureProcessorRule(new RandomBlockMatchRuleTest(Blocks.TERRACOTTA, 0.08F), AlwaysTrueRuleTest.INSTANCE, Blocks.COBWEB.getDefaultState()), new StructureProcessorRule(new RandomBlockMatchRuleTest(Blocks.SMOOTH_SANDSTONE_STAIRS, 0.08F), AlwaysTrueRuleTest.INSTANCE, Blocks.COBWEB.getDefaultState()), new StructureProcessorRule(new RandomBlockMatchRuleTest(Blocks.SMOOTH_SANDSTONE_SLAB, 0.08F), AlwaysTrueRuleTest.INSTANCE, Blocks.COBWEB.getDefaultState()), new StructureProcessorRule(new RandomBlockMatchRuleTest(Blocks.WHEAT, 0.2F), AlwaysTrueRuleTest.INSTANCE, Blocks.BEETROOTS.getDefaultState()), new StructureProcessorRule(new RandomBlockMatchRuleTest(Blocks.WHEAT, 0.1F), AlwaysTrueRuleTest.INSTANCE, Blocks.MELON_STEM.getDefaultState()))));
+ StructurePoolBasedGenerator.REGISTRY.add(new StructurePool(new Identifier("minecraft","village/oldwest/town_centers"), new Identifier("minecraft:empty"), ImmutableList.of(new Pair<>(new SinglePoolElement("village/oldwest/town_centers/desert_meeting_point_1"), 98), new Pair<>(new SinglePoolElement("village/oldwest/town_centers/desert_meeting_point_2"), 98), new Pair<>(new SinglePoolElement("village/oldwest/town_centers/desert_meeting_point_3"), 49), new Pair<>(new SinglePoolElement("village/oldwest/zombie/town_centers/desert_meeting_point_1", immutablelist), 2), new Pair<>(new SinglePoolElement("village/oldwest/zombie/town_centers/desert_meeting_point_2", immutablelist), 2), new Pair<>(new SinglePoolElement("village/oldwest/zombie/town_centers/desert_meeting_point_3", immutablelist), 1)), StructurePool.Projection.RIGID));
+ StructurePoolBasedGenerator.REGISTRY.add(new StructurePool(new Identifier("minecraft","village/oldwest/streets"), new Identifier("minecraft","village/oldwest/terminators"), ImmutableList.of(new Pair<>(new SinglePoolElement("village/oldwest/streets/corner_01"), 3), new Pair<>(new SinglePoolElement("village/oldwest/streets/corner_02"), 3), new Pair<>(new SinglePoolElement("village/oldwest/streets/straight_01"), 4), new Pair<>(new SinglePoolElement("village/oldwest/streets/straight_02"), 4), new Pair<>(new SinglePoolElement("village/oldwest/streets/straight_03"), 3), new Pair<>(new SinglePoolElement("village/oldwest/streets/crossroad_01"), 3), new Pair<>(new SinglePoolElement("village/oldwest/streets/crossroad_02"), 3), new Pair<>(new SinglePoolElement("village/oldwest/streets/crossroad_03"), 3), new Pair<>(new SinglePoolElement("village/oldwest/streets/square_01"), 3), new Pair<>(new SinglePoolElement("village/oldwest/streets/square_02"), 3), new Pair<>(new SinglePoolElement("village/oldwest/streets/turn_01"), 3)), StructurePool.Projection.TERRAIN_MATCHING));
+ StructurePoolBasedGenerator.REGISTRY.add(new StructurePool(new Identifier("minecraft","village/oldwest/zombie/streets"), new Identifier("minecraft","village/oldwest/zombie/terminators"), ImmutableList.of(new Pair<>(new SinglePoolElement("village/oldwest/zombie/streets/corner_01"), 3), new Pair<>(new SinglePoolElement("village/oldwest/zombie/streets/corner_02"), 3), new Pair<>(new SinglePoolElement("village/oldwest/zombie/streets/straight_01"), 4), new Pair<>(new SinglePoolElement("village/oldwest/zombie/streets/straight_02"), 4), new Pair<>(new SinglePoolElement("village/oldwest/zombie/streets/straight_03"), 3), new Pair<>(new SinglePoolElement("village/oldwest/zombie/streets/crossroad_01"), 3), new Pair<>(new SinglePoolElement("village/oldwest/zombie/streets/crossroad_02"), 3), new Pair<>(new SinglePoolElement("village/oldwest/zombie/streets/crossroad_03"), 3), new Pair<>(new SinglePoolElement("village/oldwest/zombie/streets/square_01"), 3), new Pair<>(new SinglePoolElement("village/oldwest/zombie/streets/square_02"), 3), new Pair<>(new SinglePoolElement("village/oldwest/zombie/streets/turn_01"), 3)), StructurePool.Projection.TERRAIN_MATCHING));
+ ImmutableList immutablelist1 = ImmutableList.of(new RuleStructureProcessor(ImmutableList.of(new StructureProcessorRule(new RandomBlockMatchRuleTest(Blocks.WHEAT, 0.2F), AlwaysTrueRuleTest.INSTANCE, Blocks.BEETROOTS.getDefaultState()), new StructureProcessorRule(new RandomBlockMatchRuleTest(Blocks.WHEAT, 0.1F), AlwaysTrueRuleTest.INSTANCE, Blocks.MELON_STEM.getDefaultState()))));
+ StructurePoolBasedGenerator.REGISTRY.add(new StructurePool(new Identifier("minecraft","village/oldwest/houses"), new Identifier("minecraft","village/oldwest/terminators"), ImmutableList.of(new Pair<>(new SinglePoolElement("village/oldwest/houses/desert_small_house_1"), 2), new Pair<>(new SinglePoolElement("village/oldwest/houses/desert_small_house_2"), 2), new Pair<>(new SinglePoolElement("village/oldwest/houses/desert_small_house_3"), 2), new Pair<>(new SinglePoolElement("village/oldwest/houses/desert_small_house_4"), 2), new Pair<>(new SinglePoolElement("village/oldwest/houses/desert_small_house_5"), 2), new Pair<>(new SinglePoolElement("village/oldwest/houses/desert_small_house_6"), 1), new Pair<>(new SinglePoolElement("village/oldwest/houses/desert_small_house_7"), 2), new Pair<>(new SinglePoolElement("village/oldwest/houses/desert_small_house_8"), 2), new Pair<>(new SinglePoolElement("village/oldwest/houses/desert_medium_house_1"), 2), new Pair<>(new SinglePoolElement("village/oldwest/houses/desert_medium_house_2"), 2), new Pair<>(new SinglePoolElement("village/oldwest/houses/desert_butcher_shop_1"), 2), new Pair<>(new SinglePoolElement("village/oldwest/houses/desert_tool_smith_1"), 2), new Pair<>(new SinglePoolElement("village/oldwest/houses/desert_fletcher_house_1"), 2), new Pair<>(new SinglePoolElement("village/oldwest/houses/desert_shepherd_house_1"), 2), new Pair<>(new SinglePoolElement("village/oldwest/houses/desert_armorer_1"), 1), new Pair<>(new SinglePoolElement("village/oldwest/houses/desert_fisher_1"), 2), new Pair<>(new SinglePoolElement("village/oldwest/houses/desert_tannery_1"), 2), new Pair<>(new SinglePoolElement("village/oldwest/houses/desert_cartographer_house_1"), 2), new Pair<>(new SinglePoolElement("village/oldwest/houses/desert_library_1"), 2), new Pair<>(new SinglePoolElement("village/oldwest/houses/desert_mason_1"), 2), new Pair<>(new SinglePoolElement("village/oldwest/houses/desert_weaponsmith_1"), 2), new Pair<>(new SinglePoolElement("village/oldwest/houses/desert_temple_1"), 2), new Pair<>(new SinglePoolElement("village/oldwest/houses/desert_temple_2"), 2), new Pair<>(new SinglePoolElement("village/oldwest/houses/desert_large_farm_1", immutablelist1), 11), new Pair<>(new SinglePoolElement("village/oldwest/houses/desert_farm_1", immutablelist1), 4), new Pair<>(new SinglePoolElement("village/oldwest/houses/desert_farm_2", immutablelist1), 4), new Pair<>(new SinglePoolElement("village/oldwest/houses/desert_animal_pen_1"), 2), new Pair<>(new SinglePoolElement("village/oldwest/houses/desert_animal_pen_2"), 2), Pair.of(EmptyPoolElement.INSTANCE, 5)), StructurePool.Projection.RIGID));
+ StructurePoolBasedGenerator.REGISTRY.add(new StructurePool(new Identifier("minecraft","village/oldwest/zombie/houses"), new Identifier("minecraft","village/oldwest/zombie/terminators"), ImmutableList.of(new Pair<>(new SinglePoolElement("village/oldwest/zombie/houses/desert_small_house_1", immutablelist), 2), new Pair<>(new SinglePoolElement("village/oldwest/zombie/houses/desert_small_house_2", immutablelist), 2), new Pair<>(new SinglePoolElement("village/oldwest/zombie/houses/desert_small_house_3", immutablelist), 2), new Pair<>(new SinglePoolElement("village/oldwest/zombie/houses/desert_small_house_4", immutablelist), 2), new Pair<>(new SinglePoolElement("village/oldwest/zombie/houses/desert_small_house_5", immutablelist), 2), new Pair<>(new SinglePoolElement("village/oldwest/zombie/houses/desert_small_house_6", immutablelist), 1), new Pair<>(new SinglePoolElement("village/oldwest/zombie/houses/desert_small_house_7", immutablelist), 2), new Pair<>(new SinglePoolElement("village/oldwest/zombie/houses/desert_small_house_8", immutablelist), 2), new Pair<>(new SinglePoolElement("village/oldwest/zombie/houses/desert_medium_house_1", immutablelist), 2), new Pair<>(new SinglePoolElement("village/oldwest/zombie/houses/desert_medium_house_2", immutablelist), 2), new Pair<>(new SinglePoolElement("village/oldwest/houses/desert_butcher_shop_1", immutablelist), 2), new Pair<>(new SinglePoolElement("village/oldwest/houses/desert_tool_smith_1", immutablelist), 2), new Pair<>(new SinglePoolElement("village/oldwest/houses/desert_fletcher_house_1", immutablelist), 2), new Pair<>(new SinglePoolElement("village/oldwest/houses/desert_shepherd_house_1", immutablelist), 2), new Pair<>(new SinglePoolElement("village/oldwest/houses/desert_armorer_1", immutablelist), 1), new Pair<>(new SinglePoolElement("village/oldwest/houses/desert_fisher_1", immutablelist), 2), new Pair<>(new SinglePoolElement("village/oldwest/houses/desert_tannery_1", immutablelist), 2), new Pair<>(new SinglePoolElement("village/oldwest/houses/desert_cartographer_house_1", immutablelist), 2), new Pair<>(new SinglePoolElement("village/oldwest/houses/desert_library_1", immutablelist), 2), new Pair<>(new SinglePoolElement("village/oldwest/houses/desert_mason_1", immutablelist), 2), new Pair<>(new SinglePoolElement("village/oldwest/houses/desert_weaponsmith_1", immutablelist), 2), new Pair<>(new SinglePoolElement("village/oldwest/houses/desert_temple_1", immutablelist), 2), new Pair<>(new SinglePoolElement("village/oldwest/houses/desert_temple_2", immutablelist), 2), new Pair<>(new SinglePoolElement("village/oldwest/houses/desert_large_farm_1", immutablelist), 7), new Pair<>(new SinglePoolElement("village/oldwest/houses/desert_farm_1", immutablelist), 4), new Pair<>(new SinglePoolElement("village/oldwest/houses/desert_farm_2", immutablelist), 4), new Pair<>(new SinglePoolElement("village/oldwest/houses/desert_animal_pen_1", immutablelist), 2), new Pair<>(new SinglePoolElement("village/oldwest/houses/desert_animal_pen_2", immutablelist), 2), Pair.of(EmptyPoolElement.INSTANCE, 5)), StructurePool.Projection.RIGID));
+ StructurePoolBasedGenerator.REGISTRY.add(new StructurePool(new Identifier("minecraft","village/oldwest/terminators"), new Identifier("minecraft:empty"), ImmutableList.of(new Pair<>(new SinglePoolElement("village/oldwest/terminators/terminator_01"), 1), new Pair<>(new SinglePoolElement("village/oldwest/terminators/terminator_02"), 1)), StructurePool.Projection.TERRAIN_MATCHING));
+ StructurePoolBasedGenerator.REGISTRY.add(new StructurePool(new Identifier("minecraft","village/oldwest/zombie/terminators"), new Identifier("minecraft:empty"), ImmutableList.of(new Pair<>(new SinglePoolElement("village/oldwest/terminators/terminator_01"), 1), new Pair<>(new SinglePoolElement("village/oldwest/zombie/terminators/terminator_02"), 1)), StructurePool.Projection.TERRAIN_MATCHING));
+ StructurePoolBasedGenerator.REGISTRY.add(new StructurePool(new Identifier("minecraft","village/oldwest/decor"), new Identifier("minecraft:empty"), ImmutableList.of(new Pair<>(new SinglePoolElement("village/oldwest/desert_lamp_1"), 10), new Pair<>(new FeaturePoolElement(Feature.RANDOM_PATCH.configure(DefaultBiomeFeatures.CACTUS_CONFIG)), 4), new Pair<>(new FeaturePoolElement(Feature.BLOCK_PILE.configure(DefaultBiomeFeatures.HAY_PILE_CONFIG)), 4), Pair.of(EmptyPoolElement.INSTANCE, 10)), StructurePool.Projection.RIGID));
+ StructurePoolBasedGenerator.REGISTRY.add(new StructurePool(new Identifier("minecraft","village/oldwest/zombie/decor"), new Identifier("minecraft:empty"), ImmutableList.of(new Pair<>(new SinglePoolElement("village/oldwest/desert_lamp_1", immutablelist), 10), new Pair<>(new FeaturePoolElement(Feature.RANDOM_PATCH.configure(DefaultBiomeFeatures.CACTUS_CONFIG)), 4), new Pair<>(new FeaturePoolElement(Feature.BLOCK_PILE.configure(DefaultBiomeFeatures.HAY_PILE_CONFIG)), 4), Pair.of(EmptyPoolElement.INSTANCE, 10)), StructurePool.Projection.RIGID));
+ StructurePoolBasedGenerator.REGISTRY.add(new StructurePool(new Identifier("minecraft","village/oldwest/villagers"), new Identifier("minecraft:empty"), ImmutableList.of(new Pair<>(new SinglePoolElement("village/oldwest/villagers/nitwit"), 1), new Pair<>(new SinglePoolElement("village/oldwest/villagers/baby"), 1), new Pair<>(new SinglePoolElement("village/oldwest/villagers/unemployed"), 10)), StructurePool.Projection.RIGID));
+ StructurePoolBasedGenerator.REGISTRY.add(new StructurePool(new Identifier("minecraft","village/oldwest/zombie/villagers"), new Identifier("minecraft:empty"), ImmutableList.of(new Pair<>(new SinglePoolElement("village/oldwest/zombie/villagers/nitwit"), 1), new Pair<>(new SinglePoolElement("village/oldwest/zombie/villagers/unemployed"), 10)), StructurePool.Projection.RIGID));
+ }
+}
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/common/world/generator/GunpowderFeature.java b/src/main/java/com/rdvdev2/TimeTravelMod/common/world/generator/GunpowderFeature.java
new file mode 100644
index 0000000..3133c68
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/common/world/generator/GunpowderFeature.java
@@ -0,0 +1,35 @@
+package com.rdvdev2.TimeTravelMod.common.world.generator;
+
+import com.rdvdev2.TimeTravelMod.ModBlocks;
+import net.minecraft.block.Blocks;
+import net.minecraft.util.math.BlockPos;
+import net.minecraft.world.Heightmap;
+import net.minecraft.world.IWorld;
+import net.minecraft.world.gen.chunk.ChunkGenerator;
+import net.minecraft.world.gen.chunk.ChunkGeneratorConfig;
+import net.minecraft.world.gen.feature.DefaultFeatureConfig;
+import net.minecraft.world.gen.feature.Feature;
+
+import java.util.Random;
+
+public class GunpowderFeature extends Feature {
+
+ public GunpowderFeature() {
+ super(DefaultFeatureConfig::deserialize);
+ }
+
+ @Override
+ public boolean generate(IWorld world, ChunkGenerator extends ChunkGeneratorConfig> chunkGenerator, Random random, BlockPos pos, DefaultFeatureConfig noFeatureConfig) {
+ if (world.isWater(pos)) return false;
+ for (int i = random.nextInt(8) + 2; i > 0; i--) {
+ BlockPos thisPos = pos.add(random.nextInt(5)-2, 0, random.nextInt(5)-2);
+ thisPos = world.getTopPosition(Heightmap.Type.WORLD_SURFACE_WG, thisPos);
+ if (random.nextFloat() > 0.2) {
+ setBlockState(world, thisPos, ModBlocks.GUNPOWDER_WIRE.getDefaultState());
+ } else {
+ setBlockState(world, thisPos, Blocks.TNT.getDefaultState());
+ }
+ }
+ return true;
+ }
+}
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/common/world/layer/OldWestBiomeLayer.java b/src/main/java/com/rdvdev2/TimeTravelMod/common/world/layer/OldWestBiomeLayer.java
new file mode 100644
index 0000000..bd5c441
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/common/world/layer/OldWestBiomeLayer.java
@@ -0,0 +1,45 @@
+package com.rdvdev2.TimeTravelMod.common.world.layer;
+
+import com.rdvdev2.TimeTravelMod.ModBiomes;
+import net.minecraft.util.registry.Registry;
+import net.minecraft.world.biome.Biome;
+import net.minecraft.world.biome.Biomes;
+import net.minecraft.world.biome.layer.type.IdentitySamplingLayer;
+import net.minecraft.world.biome.layer.util.LayerRandomnessSource;
+
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+public class OldWestBiomeLayer implements IdentitySamplingLayer {
+
+ @SuppressWarnings("unchecked")
+ private Map biomes = new LinkedHashMap<>();
+
+ public OldWestBiomeLayer() {
+ biomes.put(ModBiomes.OLDWEST, 80);
+ biomes.put(Biomes.BADLANDS_PLATEAU, 5);
+ biomes.put(Biomes.WOODED_BADLANDS_PLATEAU, 15);
+ }
+
+ @Override
+ public int sample(LayerRandomnessSource context, int value) {
+ int i = (value & 3840) >> 8;
+ value = value & -3841;
+ if (!OldWestLayers.isOcean(value)) {
+ return Registry.BIOME.getRawId(getWeightedBiomeEntry(context)); }
+ else {
+ return value;
+ }
+ }
+
+ protected Biome getWeightedBiomeEntry(LayerRandomnessSource context) {
+ int totalWeight = 0;
+ for (int weight: biomes.values()) totalWeight += weight;
+ int result = context.nextInt(totalWeight);
+ for (Map.Entry entry: biomes.entrySet()) {
+ if (result < entry.getValue()) return entry.getKey();
+ else result -= entry.getValue();
+ }
+ return ModBiomes.OLDWEST;
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/common/world/layer/OldWestLayers.java b/src/main/java/com/rdvdev2/TimeTravelMod/common/world/layer/OldWestLayers.java
new file mode 100644
index 0000000..4474c59
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/common/world/layer/OldWestLayers.java
@@ -0,0 +1,103 @@
+package com.rdvdev2.TimeTravelMod.common.world.layer;
+
+import net.minecraft.util.registry.Registry;
+import net.minecraft.world.biome.Biomes;
+import net.minecraft.world.biome.layer.*;
+import net.minecraft.world.biome.layer.type.ParentedLayer;
+import net.minecraft.world.biome.layer.util.*;
+import net.minecraft.world.biome.source.BiomeLayerSampler;
+import net.minecraft.world.gen.chunk.OverworldChunkGeneratorConfig;
+import net.minecraft.world.level.LevelGeneratorType;
+
+import java.util.function.LongFunction;
+
+public class OldWestLayers {
+
+ protected static final int WARM_OCEAN = Registry.BIOME.getRawId(Biomes.WARM_OCEAN);
+ protected static final int LUKEWARM_OCEAN = Registry.BIOME.getRawId(Biomes.LUKEWARM_OCEAN);
+ protected static final int OCEAN = Registry.BIOME.getRawId(Biomes.OCEAN);
+ protected static final int COLD_OCEAN = Registry.BIOME.getRawId(Biomes.COLD_OCEAN);
+ protected static final int FROZEN_OCEAN = Registry.BIOME.getRawId(Biomes.FROZEN_OCEAN);
+ protected static final int DEEP_WARM_OCEAN = Registry.BIOME.getRawId(Biomes.DEEP_WARM_OCEAN);
+ protected static final int DEEP_LUKEWARM_OCEAN = Registry.BIOME.getRawId(Biomes.DEEP_LUKEWARM_OCEAN);
+ protected static final int DEEP_OCEAN = Registry.BIOME.getRawId(Biomes.DEEP_OCEAN);
+ protected static final int DEEP_COLD_OCEAN = Registry.BIOME.getRawId(Biomes.DEEP_COLD_OCEAN);
+ protected static final int DEEP_FROZEN_OCEAN = Registry.BIOME.getRawId(Biomes.DEEP_FROZEN_OCEAN);
+
+ private static > LayerFactory stack(long seed, ParentedLayer layer, LayerFactory parent, int count, LongFunction contextProvider) {
+ LayerFactory layerFactory = parent;
+
+ for(int i = 0; i < count; ++i) {
+ layerFactory = layer.create((LayerSampleContext)contextProvider.apply(seed + (long)i), layerFactory);
+ }
+
+ return layerFactory;
+ }
+
+ public static BiomeLayerSampler build(long seed, LevelGeneratorType generatorType, OverworldChunkGeneratorConfig settings) {
+ LayerFactory layerFactory = build(generatorType, settings, (salt) -> {
+ return new CachingLayerContext(25, seed, salt);
+ });
+ return new BiomeLayerSampler(layerFactory);
+ }
+
+ public static > LayerFactory build(LevelGeneratorType generatorType, OverworldChunkGeneratorConfig settings, LongFunction contextFactory) {
+ LayerFactory factory = ContinentLayer.INSTANCE.create(contextFactory.apply(1L));
+ factory = ScaleLayer.FUZZY.create(contextFactory.apply(2000L), factory);
+ factory = IncreaseEdgeCurvatureLayer.INSTANCE.create(contextFactory.apply(1L), factory);
+ factory = ScaleLayer.NORMAL.create(contextFactory.apply(2001L), factory);
+ factory = IncreaseEdgeCurvatureLayer.INSTANCE.create(contextFactory.apply(2L), factory);
+ factory = IncreaseEdgeCurvatureLayer.INSTANCE.create(contextFactory.apply(50L), factory);
+ factory = IncreaseEdgeCurvatureLayer.INSTANCE.create(contextFactory.apply(70L), factory);
+ factory = AddIslandLayer.INSTANCE.create(contextFactory.apply(2L), factory);
+ LayerFactory factory1 = OceanTemperatureLayer.INSTANCE.create(contextFactory.apply(2L));
+ factory1 = stack(2001L, ScaleLayer.NORMAL, factory1, 6, contextFactory);
+ factory = IncreaseEdgeCurvatureLayer.INSTANCE.create(contextFactory.apply(3L), factory);
+ factory = AddClimateLayers.AddCoolBiomesLayer.INSTANCE.create(contextFactory.apply(2L), factory);
+ factory = AddClimateLayers.AddSpecialBiomesLayer.INSTANCE.create(contextFactory.apply(3L), factory);
+ factory = ScaleLayer.NORMAL.create(contextFactory.apply(2002L), factory);
+ factory = ScaleLayer.NORMAL.create(contextFactory.apply(2003L), factory);
+ factory = IncreaseEdgeCurvatureLayer.INSTANCE.create(contextFactory.apply(4L), factory);
+ factory = AddDeepOceanLayer.INSTANCE.create(contextFactory.apply(4L), factory);
+ factory = stack(1000L, ScaleLayer.NORMAL, factory, 0, contextFactory);
+ int i = generatorType == LevelGeneratorType.LARGE_BIOMES ? 6 : settings.getBiomeSize();
+ int j = settings.getRiverSize();
+
+ LayerFactory factory2 = stack(1000L, ScaleLayer.NORMAL, factory, 0, contextFactory);
+ factory2 = SimpleLandNoiseLayer.INSTANCE.create((LayerSampleContext)contextFactory.apply(100L), factory2);
+ LayerFactory factory3 = getOldWestBiomeLayer(factory, contextFactory); // Custom biomes
+ LayerFactory factory4 = stack(1000L, ScaleLayer.NORMAL, factory2, 2, contextFactory);
+ factory3 = AddHillsLayer.INSTANCE.create((LayerSampleContext) contextFactory.apply(1000L), factory3, factory4);
+ factory2 = stack(1000L, ScaleLayer.NORMAL, factory2, 2, contextFactory);
+ factory2 = stack(1000L, ScaleLayer.NORMAL, factory2, j, contextFactory);
+ factory2 = NoiseToRiverLayer.INSTANCE.create((LayerSampleContext) contextFactory.apply(1L), factory2); // Custom rivers
+ factory2 = SmoothenShorelineLayer.INSTANCE.create((LayerSampleContext) contextFactory.apply(1000L), factory2);
+
+ for(int k = 0; k < i; ++k) {
+ factory3 = ScaleLayer.NORMAL.create((LayerSampleContext) contextFactory.apply((long)(1000 + k)), factory3);
+ if (k == 0) {
+ factory3 = IncreaseEdgeCurvatureLayer.INSTANCE.create((LayerSampleContext) contextFactory.apply(3L), factory3);
+ }
+
+ if (k == 1 || i == 1) {
+ factory3 = AddEdgeBiomesLayer.INSTANCE.create((LayerSampleContext)contextFactory.apply(1000L), factory3);
+ }
+ }
+
+ factory3 = SmoothenShorelineLayer.INSTANCE.create((LayerSampleContext) contextFactory.apply(1000L), factory3);
+ factory3 = AddRiversLayer.INSTANCE.create((LayerSampleContext) contextFactory.apply(100L), factory3, factory2);
+ factory3 = ApplyOceanTemperatureLayer.INSTANCE.create(contextFactory.apply(100L), factory3, factory1);
+ return factory3;
+ }
+
+ static > LayerFactory getOldWestBiomeLayer(LayerFactory parentLayer, LongFunction contextFactory) {
+ parentLayer = (new OldWestBiomeLayer()).create(contextFactory.apply(200L), parentLayer);
+ parentLayer = stack(1000L, ScaleLayer.NORMAL, parentLayer, 2, contextFactory);
+ parentLayer = AddEdgeBiomesLayer.INSTANCE.create(contextFactory.apply(1000L), parentLayer);
+ return parentLayer;
+ }
+
+ public static boolean isOcean(int biomeIn) {
+ return biomeIn == WARM_OCEAN || biomeIn == LUKEWARM_OCEAN || biomeIn == OCEAN || biomeIn == COLD_OCEAN || biomeIn == FROZEN_OCEAN || biomeIn == DEEP_WARM_OCEAN || biomeIn == DEEP_LUKEWARM_OCEAN || biomeIn == DEEP_OCEAN || biomeIn == DEEP_COLD_OCEAN || biomeIn == DEEP_FROZEN_OCEAN;
+ }
+}
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/integration/ModMenuIntegration.java b/src/main/java/com/rdvdev2/TimeTravelMod/integration/ModMenuIntegration.java
new file mode 100644
index 0000000..f1fd1cd
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/integration/ModMenuIntegration.java
@@ -0,0 +1,23 @@
+package com.rdvdev2.TimeTravelMod.integration;
+
+import com.rdvdev2.TimeTravelMod.Mod;
+import com.rdvdev2.TimeTravelMod.ModConfig;
+import io.github.prospector.modmenu.api.ConfigScreenFactory;
+import io.github.prospector.modmenu.api.ModMenuApi;
+import me.sargunvohra.mcmods.autoconfig1u.AutoConfig;
+import net.fabricmc.api.EnvType;
+import net.fabricmc.api.Environment;
+
+@Environment(EnvType.CLIENT)
+public class ModMenuIntegration implements ModMenuApi {
+
+ @Override
+ public String getModId() {
+ return Mod.MODID;
+ }
+
+ @Override
+ public ConfigScreenFactory> getModConfigScreenFactory() {
+ return parent -> AutoConfig.getConfigScreen(ModConfig.DisplayConfig.class, parent).get();
+ }
+}
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/mixin/IBiomeSourceType.java b/src/main/java/com/rdvdev2/TimeTravelMod/mixin/IBiomeSourceType.java
new file mode 100644
index 0000000..f64296c
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/mixin/IBiomeSourceType.java
@@ -0,0 +1,20 @@
+package com.rdvdev2.TimeTravelMod.mixin;
+
+import net.minecraft.world.biome.source.BiomeSource;
+import net.minecraft.world.biome.source.BiomeSourceConfig;
+import net.minecraft.world.biome.source.BiomeSourceType;
+import net.minecraft.world.level.LevelProperties;
+import org.apache.commons.lang3.NotImplementedException;
+import org.spongepowered.asm.mixin.Mixin;
+import org.spongepowered.asm.mixin.gen.Invoker;
+
+import java.util.function.Function;
+
+@Mixin(BiomeSourceType.class)
+public interface IBiomeSourceType {
+
+ @Invoker("")
+ static BiomeSourceType create(Function biomeSource, Function function) {
+ throw new NotImplementedException("IBiomeSourceType mixin failed to apply");
+ }
+}
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/mixin/ICriterions.java b/src/main/java/com/rdvdev2/TimeTravelMod/mixin/ICriterions.java
new file mode 100644
index 0000000..9501732
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/mixin/ICriterions.java
@@ -0,0 +1,16 @@
+package com.rdvdev2.TimeTravelMod.mixin;
+
+import net.minecraft.advancement.criterion.Criterion;
+import net.minecraft.advancement.criterion.Criterions;
+import org.apache.commons.lang3.NotImplementedException;
+import org.spongepowered.asm.mixin.Mixin;
+import org.spongepowered.asm.mixin.gen.Invoker;
+
+@Mixin(Criterions.class)
+public interface ICriterions {
+
+ @Invoker("register")
+ static > T doRegister(T object) {
+ throw new NotImplementedException("ICriterions mixin failed to apply");
+ }
+}
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/mixin/IDamageSource.java b/src/main/java/com/rdvdev2/TimeTravelMod/mixin/IDamageSource.java
new file mode 100644
index 0000000..ba258d3
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/mixin/IDamageSource.java
@@ -0,0 +1,18 @@
+package com.rdvdev2.TimeTravelMod.mixin;
+
+import net.minecraft.entity.damage.DamageSource;
+import org.apache.commons.lang3.NotImplementedException;
+import org.spongepowered.asm.mixin.Mixin;
+import org.spongepowered.asm.mixin.gen.Invoker;
+
+@Mixin(DamageSource.class)
+public interface IDamageSource {
+
+ @Invoker("")
+ static DamageSource create(String name) {
+ throw new NotImplementedException("IDamageSource mixin failed to apply");
+ }
+
+ @Invoker()
+ DamageSource callSetUnblockable();
+}
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/mixin/MixinOverworldDimension.java b/src/main/java/com/rdvdev2/TimeTravelMod/mixin/MixinOverworldDimension.java
new file mode 100644
index 0000000..3c4509c
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/mixin/MixinOverworldDimension.java
@@ -0,0 +1,37 @@
+package com.rdvdev2.TimeTravelMod.mixin;
+
+import com.rdvdev2.TimeTravelMod.ModTimeLines;
+import com.rdvdev2.TimeTravelMod.api.dimension.TimeLine;
+import com.rdvdev2.TimeTravelMod.common.world.dimension.Corruption;
+import net.minecraft.nbt.CompoundTag;
+import net.minecraft.world.World;
+import net.minecraft.world.dimension.Dimension;
+import net.minecraft.world.dimension.DimensionType;
+import net.minecraft.world.dimension.OverworldDimension;
+import org.spongepowered.asm.mixin.Mixin;
+import org.spongepowered.asm.mixin.injection.At;
+import org.spongepowered.asm.mixin.injection.Inject;
+import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
+
+@Mixin(OverworldDimension.class)
+public abstract class MixinOverworldDimension extends Dimension {
+
+ private TimeLine timeLine = ModTimeLines.PRESENT;
+
+ private MixinOverworldDimension(World world, DimensionType type, float f) {
+ super(world, type, f);
+ }
+
+ @Inject(method = "", at = @At("RETURN"))
+ private void timetravelmod_onConstructor(World world, DimensionType type, CallbackInfo ci) {
+ CompoundTag tag = this.world.getLevelProperties().getWorldData(this.getType());
+ if (tag.contains("corruption")) ((Corruption) timeLine.getCorruption()).setCorruptionLevel(tag.getInt("corruption"));
+ }
+
+ @Override
+ public void saveWorldData() {
+ CompoundTag tag = this.world.getLevelProperties().getWorldData(this.getType());
+ if (tag.contains("corruption")) tag.remove("corruption");
+ tag.putInt("corruption", timeLine.getCorruption().getCorruptionLevel());
+ }
+}
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/mixin/MixinPlayerManager.java b/src/main/java/com/rdvdev2/TimeTravelMod/mixin/MixinPlayerManager.java
new file mode 100644
index 0000000..3a73d92
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/mixin/MixinPlayerManager.java
@@ -0,0 +1,19 @@
+package com.rdvdev2.TimeTravelMod.mixin;
+
+import com.rdvdev2.TimeTravelMod.common.event.MiscCallbackHandler;
+import net.minecraft.network.ClientConnection;
+import net.minecraft.server.PlayerManager;
+import net.minecraft.server.network.ServerPlayerEntity;
+import org.spongepowered.asm.mixin.Mixin;
+import org.spongepowered.asm.mixin.injection.At;
+import org.spongepowered.asm.mixin.injection.Inject;
+import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
+
+@Mixin(PlayerManager.class)
+public abstract class MixinPlayerManager {
+
+ @Inject(method = "onPlayerConnect", at = @At("RETURN"))
+ private void timetravelmod_doOnPlayerConnect(ClientConnection connection, ServerPlayerEntity player, CallbackInfo ci) {
+ MiscCallbackHandler.playerJoin(player);
+ }
+}
diff --git a/src/main/java/com/rdvdev2/TimeTravelMod/mixin/client/MixinSoundManager.java b/src/main/java/com/rdvdev2/TimeTravelMod/mixin/client/MixinSoundManager.java
new file mode 100644
index 0000000..4ff243f
--- /dev/null
+++ b/src/main/java/com/rdvdev2/TimeTravelMod/mixin/client/MixinSoundManager.java
@@ -0,0 +1,30 @@
+package com.rdvdev2.TimeTravelMod.mixin.client;
+
+import com.rdvdev2.TimeTravelMod.client.MusicManager;
+import net.fabricmc.api.EnvType;
+import net.fabricmc.api.Environment;
+import net.minecraft.client.sound.SoundInstance;
+import net.minecraft.client.sound.SoundManager;
+import net.minecraft.client.sound.SoundSystem;
+import org.spongepowered.asm.mixin.Final;
+import org.spongepowered.asm.mixin.Mixin;
+import org.spongepowered.asm.mixin.Overwrite;
+import org.spongepowered.asm.mixin.Shadow;
+
+@Environment(EnvType.CLIENT)
+@Mixin(SoundManager.class)
+public abstract class MixinSoundManager {
+
+ @Final
+ @Shadow
+ private SoundSystem soundSystem;
+
+ /**
+ * @author rdvdev2 (rdvdev2@gmail.com)
+ * @reason Until Fabric API provides this
+ */
+ @Overwrite
+ public void play(SoundInstance sound) {
+ MusicManager.onPlaySound(sound).ifPresent(this.soundSystem::play);
+ }
+}
diff --git a/src/main/resources/assets/timetravelmod/blockstates/gunpowderwire.json b/src/main/resources/assets/timetravelmod/blockstates/gunpowderwire.json
new file mode 100644
index 0000000..fea4420
--- /dev/null
+++ b/src/main/resources/assets/timetravelmod/blockstates/gunpowderwire.json
@@ -0,0 +1,49 @@
+{
+ "multipart": [
+ { "when": { "OR": [
+ {"north": "none", "east": "none", "south": "none", "west": "none"},
+ {"north": "side|up", "east": "side|up" },
+ {"east": "side|up", "south": "side|up" },
+ {"south": "side|up", "west": "side|up"},
+ {"west": "side|up", "north": "side|up"}
+ ]},
+ "apply": { "model": "block/redstone_dust_dot" }
+ },
+ { "when": { "OR": [
+ { "north": "side|up" },
+ { "north": "none", "east": "none", "south": "side|up", "west": "none" }
+ ]},
+ "apply": { "model": "block/redstone_dust_side0" }
+ },
+ { "when": { "OR": [
+ { "south": "side|up" },
+ { "north": "side|up", "east": "none", "south": "none", "west": "none" }
+ ]},
+ "apply": { "model": "block/redstone_dust_side_alt0" }
+ },
+ { "when": { "OR": [
+ { "east": "side|up" },
+ { "north": "none", "east": "none", "south": "none", "west": "side|up" }
+ ]},
+ "apply": { "model": "block/redstone_dust_side_alt1", "y": 270 }
+ },
+ { "when": { "OR": [
+ { "west": "side|up" },
+ { "north": "none", "east": "side|up", "south": "none", "west": "none" }
+ ]},
+ "apply": { "model": "block/redstone_dust_side1", "y": 270 }
+ },
+ { "when": { "north": "up" },
+ "apply": { "model": "block/redstone_dust_up" }
+ },
+ { "when": { "east": "up" },
+ "apply": { "model": "block/redstone_dust_up", "y": 90 }
+ },
+ { "when": { "south": "up" },
+ "apply": { "model": "block/redstone_dust_up", "y": 180 }
+ },
+ { "when": { "west": "up" },
+ "apply": { "model": "block/redstone_dust_up", "y": 270 }
+ }
+ ]
+}
diff --git a/src/main/resources/assets/timetravelmod/blockstates/heavyblock.json b/src/main/resources/assets/timetravelmod/blockstates/heavyblock.json
new file mode 100644
index 0000000..ffe1184
--- /dev/null
+++ b/src/main/resources/assets/timetravelmod/blockstates/heavyblock.json
@@ -0,0 +1,7 @@
+{
+ "variants": {
+ "": [
+ { "model": "timetravelmod:block/heavyblock"}
+ ]
+ }
+}
\ No newline at end of file
diff --git a/src/main/resources/assets/timetravelmod/blockstates/reinforcedheavyblock.json b/src/main/resources/assets/timetravelmod/blockstates/reinforcedheavyblock.json
new file mode 100644
index 0000000..a053b36
--- /dev/null
+++ b/src/main/resources/assets/timetravelmod/blockstates/reinforcedheavyblock.json
@@ -0,0 +1,7 @@
+{
+ "variants": {
+ "": [
+ { "model": "timetravelmod:block/reinforcedheavyblock"}
+ ]
+ }
+}
\ No newline at end of file
diff --git a/src/main/resources/assets/timetravelmod/blockstates/temporalcauldron.json b/src/main/resources/assets/timetravelmod/blockstates/temporalcauldron.json
new file mode 100644
index 0000000..ded6a34
--- /dev/null
+++ b/src/main/resources/assets/timetravelmod/blockstates/temporalcauldron.json
@@ -0,0 +1,8 @@
+{
+ "variants": {
+ "level=0": { "model": "timetravelmod:block/temporalcauldron_empty" },
+ "level=1": { "model": "timetravelmod:block/temporalcauldron_level1" },
+ "level=2": { "model": "timetravelmod:block/temporalcauldron_level2" },
+ "level=3": { "model": "timetravelmod:block/temporalcauldron_level3" }
+ }
+}
diff --git a/src/main/resources/assets/timetravelmod/blockstates/temporalexplosion.json b/src/main/resources/assets/timetravelmod/blockstates/temporalexplosion.json
new file mode 100644
index 0000000..ff513e8
--- /dev/null
+++ b/src/main/resources/assets/timetravelmod/blockstates/temporalexplosion.json
@@ -0,0 +1,7 @@
+{
+ "variants": {
+ "": [
+ { "model": "timetravelmod:block/temporalexplosion"}
+ ]
+ }
+}
\ No newline at end of file
diff --git a/src/main/resources/assets/timetravelmod/blockstates/timecrystalore.json b/src/main/resources/assets/timetravelmod/blockstates/timecrystalore.json
new file mode 100644
index 0000000..c139ac9
--- /dev/null
+++ b/src/main/resources/assets/timetravelmod/blockstates/timecrystalore.json
@@ -0,0 +1,7 @@
+{
+ "variants": {
+ "": [
+ { "model": "timetravelmod:block/timecrystalore"}
+ ]
+ }
+}
\ No newline at end of file
diff --git a/src/main/resources/assets/timetravelmod/blockstates/timemachinebasicblock.json b/src/main/resources/assets/timetravelmod/blockstates/timemachinebasicblock.json
new file mode 100644
index 0000000..56cdf23
--- /dev/null
+++ b/src/main/resources/assets/timetravelmod/blockstates/timemachinebasicblock.json
@@ -0,0 +1,7 @@
+{
+ "variants": {
+ "": [
+ { "model": "timetravelmod:block/timemachinebasicblock"}
+ ]
+ }
+}
\ No newline at end of file
diff --git a/src/main/resources/assets/timetravelmod/blockstates/timemachinecontrolpanel.json b/src/main/resources/assets/timetravelmod/blockstates/timemachinecontrolpanel.json
new file mode 100644
index 0000000..2f65d6b
--- /dev/null
+++ b/src/main/resources/assets/timetravelmod/blockstates/timemachinecontrolpanel.json
@@ -0,0 +1,7 @@
+{
+ "variants": {
+ "": [
+ { "model": "timetravelmod:block/timemachinecontrolpanel"}
+ ]
+ }
+}
\ No newline at end of file
diff --git a/src/main/resources/assets/timetravelmod/blockstates/timemachinecore.json b/src/main/resources/assets/timetravelmod/blockstates/timemachinecore.json
new file mode 100644
index 0000000..6931ac9
--- /dev/null
+++ b/src/main/resources/assets/timetravelmod/blockstates/timemachinecore.json
@@ -0,0 +1,10 @@
+{
+ "variants": {
+ "ready=true": [
+ { "model": "timetravelmod:block/timemachinecore"}
+ ],
+ "ready=false": [
+ { "model": "timetravelmod:block/timemachinecore"}
+ ]
+ }
+}
\ No newline at end of file
diff --git a/src/main/resources/assets/timetravelmod/blockstates/timemachinerecaller.json b/src/main/resources/assets/timetravelmod/blockstates/timemachinerecaller.json
new file mode 100644
index 0000000..b5823e6
--- /dev/null
+++ b/src/main/resources/assets/timetravelmod/blockstates/timemachinerecaller.json
@@ -0,0 +1,16 @@
+{
+ "variants": {
+ "configured=false,triggered=false": [
+ { "model": "timetravelmod:block/timemachinerecaller_ff"}
+ ],
+ "configured=true,triggered=false": [
+ { "model": "timetravelmod:block/timemachinerecaller_tf"}
+ ],
+ "configured=false,triggered=true": [
+ { "model": "timetravelmod:block/timemachinerecaller_ft"}
+ ],
+ "configured=true,triggered=true": [
+ { "model": "timetravelmod:block/timemachinerecaller_tt"}
+ ]
+ }
+}
\ No newline at end of file
diff --git a/src/main/resources/assets/timetravelmod/blockstates/timemachinetracker.json b/src/main/resources/assets/timetravelmod/blockstates/timemachinetracker.json
new file mode 100644
index 0000000..c44008d
--- /dev/null
+++ b/src/main/resources/assets/timetravelmod/blockstates/timemachinetracker.json
@@ -0,0 +1,7 @@
+{
+ "variants": {
+ "": [
+ { "model": "timetravelmod:block/timemachinetracker"}
+ ]
+ }
+}
\ No newline at end of file
diff --git a/src/main/resources/assets/timetravelmod/icon.png b/src/main/resources/assets/timetravelmod/icon.png
new file mode 100644
index 0000000..f9d96cf
Binary files /dev/null and b/src/main/resources/assets/timetravelmod/icon.png differ
diff --git a/src/main/resources/assets/timetravelmod/lang/ca_es.json b/src/main/resources/assets/timetravelmod/lang/ca_es.json
new file mode 100644
index 0000000..aec3aa4
--- /dev/null
+++ b/src/main/resources/assets/timetravelmod/lang/ca_es.json
@@ -0,0 +1,81 @@
+{
+ "advancements.timetraveling.root.title": "Time Travel Mod",
+ "advancements.timetraveling.root.description": "El nucli del mod",
+ "advancements.timetraveling.not_diamonds.title": "Això no són diamants!",
+ "advancements.timetraveling.not_diamonds.description": "Troba una mena de Cristall del temps",
+ "advancements.timetraveling.timemachine.title": "Transistor de Flux... fluxejant...",
+ "advancements.timetraveling.timemachine.description": "Entra a una Màquina del Temps",
+ "advancements.timetraveling.doesnt_look_good.title": "Això no té bona pinta",
+ "advancements.timetraveling.doesnt_look_good.description": "Mor per una Explosió Temporal",
+ "advancements.timetraveling.better_than_mending.title": "Millor que Reparació",
+ "advancements.timetraveling.better_than_mending.description": "Repara completament qualsevol item a un Calderó Del Temps",
+ "chat.ttm.outdated": "Una nova versió del Time Travel Mod està disponible! Pots trobar-la a la seva pàgina de CurseForge!",
+ "death.attack.temporalerror": "%s ha estat anul·lat per una anomalia temporal",
+ "gui.tm.error": "No pots viatjar cap a la línia temporal on ja hi ets, o des del Nether o l'End!",
+ "gui.tm.timetravelmod.oldwest": "Vell Oest",
+ "gui.tm.timetravelmod.present": "Present",
+ "gui.tmengineerbook.introduction": "Benvingut al Llibre del Enginyer de Màquines del Temps! Aquest llibre és la vostra guia sobre la construcció i millora de les diferents Màquines del Temps del Time Travel Mod i de les de qualsevol plugin que hàgiu instal·lat.",
+ "gui.tmengineerbook.tms": "Màquines del Temps",
+ "gui.tmengineerbook.tmsintroduction": "Per viatjar a altres Línies Temporals necessitaràs una Màquina del Temps. Una Màquina del Temps es una estructura formada per múltiples blocs de quatre tipus diferents: els blocs bàsics (la estructura), els blocs nucli (el motor), els blocs de millora (aquests modifiquen el comportament), i un panell de control. Els blocs de millora son opcionals, i els pots col·locar a qualsevol lloc on un bloc bàsic és vàlid. Després de construir la teva Màquina del Temps, entra-hi i fes clic dret al panell de control. Un menú et permetrà escollir la teva destinació. Les Línies Temporals disponibles dependran del nivell de la Màquina del Temps. Selecciona'n una i faràs el teu primer viatge. El nucli necessitarà un moment per refredar-se abans de que puguis utilitzar-lo de nou. Si l'intentes minar mentre es refreda, explotarà, deixant un forat temporal. També hi ha una molt petita possibilitat de que la Màquina del Temps pateixi una Explosió Temporal al utilitzar-la.",
+ "gui.tmengineerbook.tmstats": "Nivell Màxim: %s | Temps De Refredament Del Motor: %s segons",
+ "gui.tmengineerbook.howto": "Guia De Construcció:",
+ "gui.tmengineerbook.layer": "Capa: %s",
+ "gui.tmengineerbook.compatibleupgrades": "Millores per a Màquines del Temps compatibles",
+ "gui.tmengineerbook.upgrades": "Millores per a Màquines del Temps",
+ "gui.tmengineerbook.noupgrades": "No hi ha cap Millora per a Màquines del Temps disponible :(",
+ "gui.tmengineerbook.compatibletms": "Màquines del Temps compatibles",
+ "item.timetravelmod.controllercircuit": "Circuit Controlador",
+ "item.timetravelmod.creativetimemachine": "Màquina Del Temps (Creatiu)",
+ "item.timetravelmod.engineerbook": "Llibre del Enginyer de Màquines del Temps",
+ "item.timetravelmod.heavyblock": "Bloc Pesat",
+ "item.timetravelmod.heavyingot": "Lingot Pesat",
+ "item.timetravelmod.reinforcedheavyblock": "Bloc Pesat Reforçat",
+ "item.timetravelmod.temporalcauldron": "Calderó Del Temps",
+ "item.timetravelmod.temporalexplosion": "Explosió Temporal",
+ "item.timetravelmod.timecrystal": "Cristall Del Temps",
+ "item.timetravelmod.timecrystalore": "Mena De Cristall Del Temps",
+ "item.timetravelmod.timemachinebasicblock": "Bloc Bàsic De Màquina Del Temps",
+ "item.timetravelmod.timemachinecontrolpanel": "Tauler De Control De Màquina Del Temps",
+ "item.timetravelmod.timemachinecore": "Nucli De Màquina Del Temps",
+ "item.timetravelmod.timemachinerecaller": "Retornador De Màquines Del Temps",
+ "item.timetravelmod.timemachinetracker": "Rastrejador De Màquines Del Temps",
+ "item.timetravelmod.communicationscircuit": "Circuit De Comunicacions",
+ "item.timetravelmod.gunpowderwire": "Metxa",
+ "itemGroup.timetravelmod.tab": "Time Travel Mod",
+ "block.timetravelmod.heavyblock": "Bloc Pesat",
+ "block.timetravelmod.reinforcedheavyblock": "Bloc Pesat Reforçat",
+ "block.timetravelmod.temporalcauldron": "Calderó Del Temps",
+ "block.timetravelmod.temporalexplosion": "Buit Atemporal Anormal",
+ "block.timetravelmod.timecrystalore": "Mena De Cristall Del Temps",
+ "block.timetravelmod.timemachinebasicblock": "Bloc Bàsic De Màquina Del Temps",
+ "block.timetravelmod.timemachinecontrolpanel": "Tauler De Control De Màquina Del Temps",
+ "block.timetravelmod.timemachinecore": "Nucli De Màquina Del Temps",
+ "block.timetravelmod.timemachinerecaller": "Retornador De Màquines Del Temps",
+ "block.timetravelmod.timemachinetracker": "Rastrejador De Màquines Del Temps",
+ "block.timetravelmod.gunpowderwire": "Metxa",
+ "text.autoconfig.timetravelmod.option.clientConfig.enableTimeLineMusic.@Tooltip": "Quan s'habilita, les Linies Temporals tenen la seva propia música",
+ "text.autoconfig.timetravelmod.option.commonConfig.enableExperimentalFeatures.@Tooltip": "Quan s'habilita, les funcions experimentals del mod s'activen",
+ "timetravelmod.error.built.client": "La Màquina del Temps no està construïda correctament!",
+ "timetravelmod.error.built.server": "La Màquina del Temps utilitzada pel jugador no està construïda",
+ "timetravelmod.error.cooled_down.client": "El nucli de la Màquina del Temps s’ha de refredar!",
+ "timetravelmod.error.cooled_down.server": "El nucli de la Màquina del Temps utilitzada pel jugador no ha estat refredat",
+ "timetravelmod.error.player_inside.client": "Has d’estar dins de la Màquina del Temps!",
+ "timetravelmod.error.player_inside.server": "El jugador no es troba dins de la Màquina del Temps",
+ "timetravelmod.error.overloaded.client": "La màquina del temps està sobrecarregada!",
+ "timetravelmod.error.overloaded.server": "La màquina del temps utilitzada pel jugador està sobrecarregada",
+ "timetravelmod.error.entitiesescaped": "Algú ha sortit de la màquina del temps, cancel·lat.",
+ "timetravelmod.error.unreachable_dim": "La línia temporal de destinació no es accessible amb la màquina del temps que utilitza el jugador.",
+ "timetravelmod.error.uncompatible_upgrades": "Les següents millores per a màquines del temps no són compatibles: %s",
+ "timetravelmod.cheater_report": "Al servidor s'ha rebut una sol·licitud de viatge en el temps, però és possible que el jugador que l'ha enviat (%s) estigui utilitzant exploits. Motiu: %s. Li recomanem que li facis %s.",
+ "timetravelmod.ban": "[EXPULSAR]",
+ "timetravelmod.generic.comma": "%s, %s",
+ "timetravelmod.generic.and": "%s i %s",
+ "tm.timetravelmod.creative.description": "Aquest item només està disponible al mode Creatiu i et permet viatjar a qualsevol període temporal sense restriccions o refredaments.",
+ "tm.timetravelmod.creative.name": "Màquina Del Temps (Creatiu)",
+ "tm.timetravelmod.tier1.description": "Una Màquina del Temps molt simple que només arriba al Vell Oest.",
+ "tm.timetravelmod.tier1.name": "Màquina del Temps de nivell 1",
+ "tmupgrade.timetravelmod.tracker.name": "Rastrejador De Màquines Del Temps",
+ "tmupgrade.timetravelmod.tracker.description": "Aquesta actualització configurarà els Retornadors De Màquines Del Temps adjacents quan facis servir la Màquina del Temps. Quan es configura un Retornador De Màquines Del Temps, el seu centre es torna verd i, quan s'activa amb redstone, retorna la màquina del temps que el va configurar a la teva línia temporal. Si viatges a través de diverses línies temporals, hauràs instal·lar un retornador de màquines del temps en cada línia temporal que visitis.",
+ "text.autoconfig.timetravelmod.option.commonConfig.enableUpdatePromos.@Tooltip": "Quan es desactiva deixes de rebre notificacions sobre noves actualitzacions al unir-te a un món",
+ "text.autoconfig.timetravelmod.option.commonConfig.enableCheaterReports.@Tooltip": "Si aquesta opció està desactivada, els operadors (ops) no seran avisats quan es detecti un possible trampós"
+}
\ No newline at end of file
diff --git a/src/main/resources/assets/timetravelmod/lang/de_de.json b/src/main/resources/assets/timetravelmod/lang/de_de.json
new file mode 100644
index 0000000..b9574ce
--- /dev/null
+++ b/src/main/resources/assets/timetravelmod/lang/de_de.json
@@ -0,0 +1,29 @@
+{
+ "advancements.timetraveling.root.title": "Time Travel Mod",
+ "advancements.timetraveling.root.description": "Der Kern der Modifikation",
+ "advancements.timetraveling.doesnt_look_good.title": "Das sieht nicht gut aus",
+ "gui.tm.timetravelmod.oldwest": "Alter Westen",
+ "gui.tm.timetravelmod.present": "Gegenwart",
+ "gui.tmengineerbook.tms": "Zeitmaschinen",
+ "gui.tmengineerbook.layer": "Ebene: %s",
+ "gui.tmengineerbook.upgrades": "Zeitmaschinen-Upgrades",
+ "gui.tmengineerbook.noupgrades": "Es gibt keine verfügbaren Zeitmaschinen-Upgrades :(",
+ "gui.tmengineerbook.compatibletms": "Kompatible Zeitmaschinen",
+ "itemGroup.timetravelmod.tab": "Time Travel Mod",
+ "timetravelmod.error.built.client": "Die Zeitmaschine wurde nicht richtig gebaut!",
+ "timetravelmod.error.built.server": "Die vom Spieler benutzte Zeitmaschine ist nicht gebaut",
+ "timetravelmod.error.cooled_down.client": "Der Zeitmaschinenkern muss sich abkühlen!",
+ "timetravelmod.error.cooled_down.server": "Der Zeitmaschinenkern der vom Spieler verwendeten Zeitmaschine ist nicht abgekühlt",
+ "timetravelmod.error.player_inside.client": "Du musst innerhalb der Zeitmaschine sein!",
+ "timetravelmod.error.player_inside.server": "Der Spieler befindet sich nicht in der Zeitmaschine",
+ "timetravelmod.error.overloaded.client": "Die Zeitmaschine ist überlastet!",
+ "timetravelmod.error.overloaded.server": "Die vom Spieler verwendete Zeitmaschine ist überlastet",
+ "timetravelmod.error.unreachable_dim": "Die Ziel-Zeitlinie ist mit der vom Spieler verwendeten Zeitmaschine nicht erreichbar.",
+ "timetravelmod.cheater_report": "Eine Zeitreiseanfrage wurde auf dem Server empfangen, aber der Spieler, der sie gesendet hat (%s) ist möglicherweise ein Cheater. Grund: %s. Wir empfehlen Ihnen ihn zu %s.",
+ "timetravelmod.ban": "[BAN]",
+ "timetravelmod.generic.comma": "%s, %s",
+ "timetravelmod.generic.and": "%s und %s",
+ "tm.timetravelmod.tier1.name": "Stufe 1 Zeitmaschine",
+ "text.autoconfig.timetravelmod.option.commonConfig.enableUpdatePromos.@Tooltip": "Wenn dies deaktiviert ist, wirst du nicht mehr über Mod-Updates beim Weltbeitritt informiert",
+ "text.autoconfig.timetravelmod.option.commonConfig.enableCheaterReports.@Tooltip": "Wenn dies deaktiviert ist, werden Spieler (ops) werden nicht benachrichtigt, wenn ein möglicher Cheater erkannt wird"
+}
\ No newline at end of file
diff --git a/src/main/resources/assets/timetravelmod/lang/en_us.json b/src/main/resources/assets/timetravelmod/lang/en_us.json
new file mode 100644
index 0000000..8881e6f
--- /dev/null
+++ b/src/main/resources/assets/timetravelmod/lang/en_us.json
@@ -0,0 +1,87 @@
+{
+ "advancements.timetraveling.root.title": "Time Travel Mod",
+ "advancements.timetraveling.root.description": "The core of the mod",
+ "advancements.timetraveling.not_diamonds.title": "That's not diamonds!",
+ "advancements.timetraveling.not_diamonds.description": "Find a Time Crystal ore",
+ "advancements.timetraveling.timemachine.title": "Flux Capacitor... fluxing...",
+ "advancements.timetraveling.timemachine.description": "Enter a Time Machine",
+ "advancements.timetraveling.doesnt_look_good.title": "That doesn't look good",
+ "advancements.timetraveling.doesnt_look_good.description": "Get killed by a Temporal Explosion",
+ "advancements.timetraveling.better_than_mending.title": "Better than mending",
+ "advancements.timetraveling.better_than_mending.description": "Fully repair any item in a Temporal Cauldron",
+ "chat.ttm.outdated": "A new Time Travel Mod version is available! Check it out on its CurseForge page!",
+ "death.attack.temporalerror": "%s was nullified by a temporal anomaly",
+ "gui.tm.error": "You can't travel to the time line you're already in, or travel from the Nether or the End!",
+ "gui.tm.timetravelmod.oldwest": "Old West",
+ "gui.tm.timetravelmod.present": "Present",
+ "gui.tmengineerbook.introduction": "Welcome to the Time Machine Engineer's Book! This book is your guide to building and upgrading a Time Machine, as well as to any plugins you've installed.",
+ "gui.tmengineerbook.tms": "Time Machines",
+ "gui.tmengineerbook.tmsintroduction": "To travel to other Time Lines you will need a Time Machine. A Time Machine is a multi-block structure made with four different blocks: basic blocks (the structure), core blocks (the engine), upgrade blocks (these change behaviour), and a control panel. You may choose to place an upgrade block in any place where a basic block is valid. After you've built your Time Machine, go inside it and right-click the control panel. A menu will allow you to select your destination Time Line. The available Time Lines will depend on the Time Machine tier. Select one and you will Time Travel for the first time. The Time Machine's engine needs a moment to cool down before you can use it again. If you try to mine the engine while it's cooling down, it will explode, leaving a time hole. There is also a very low chance of a Temporal Explosion occurring any time you use a Time Machine.",
+ "gui.tmengineerbook.tmstats": "Max Tier: %s | Engine Cooldown Time: %s seconds",
+ "gui.tmengineerbook.howto": "Build Guide:",
+ "gui.tmengineerbook.layer": "Layer: %s",
+ "gui.tmengineerbook.compatibleupgrades": "Compatible Time Machine Upgrades",
+ "gui.tmengineerbook.upgrades": "Time Machine Upgrades",
+ "gui.tmengineerbook.noupgrades": "There isn't any available Time Machine Upgrade :(",
+ "gui.tmengineerbook.compatibletms": "Compatible Time Machines",
+ "item.timetravelmod.controllercircuit": "Controller Circuit",
+ "item.timetravelmod.creativetimemachine": "Creative Time Machine",
+ "item.timetravelmod.engineerbook": "Time Machine Engineer's Book",
+ "item.timetravelmod.heavyblock": "Heavy Block",
+ "item.timetravelmod.heavyingot": "Heavy Ingot",
+ "item.timetravelmod.reinforcedheavyblock": "Reinforced Heavy Block",
+ "item.timetravelmod.temporalcauldron": "Temporal Cauldron",
+ "item.timetravelmod.temporalexplosion": "Temporal Explosion",
+ "item.timetravelmod.timecrystal": "Time Crystal",
+ "item.timetravelmod.timecrystalore": "Time Crystal Ore",
+ "item.timetravelmod.timemachinebasicblock": "Time Machine Basic Block",
+ "item.timetravelmod.timemachinecontrolpanel": "Time Machine Control Panel",
+ "item.timetravelmod.timemachinecore": "Time Machine Core",
+ "item.timetravelmod.timemachinerecaller": "Time Machine Recaller",
+ "item.timetravelmod.timemachinetracker": "Time Machine Tracker",
+ "item.timetravelmod.communicationscircuit": "Communications Circuit",
+ "item.timetravelmod.gunpowderwire": "Gunpowder Wire",
+ "itemGroup.timetravelmod.tab": "Time Travel Mod",
+ "block.timetravelmod.heavyblock": "Heavy Block",
+ "block.timetravelmod.reinforcedheavyblock": "Reinforced Heavy Block",
+ "block.timetravelmod.temporalcauldron": "Temporal Cauldron",
+ "block.timetravelmod.temporalexplosion": "Anomalous Atemporal Void",
+ "block.timetravelmod.timecrystalore": "Time Crystal Ore",
+ "block.timetravelmod.timemachinebasicblock": "Time Machine Basic Block",
+ "block.timetravelmod.timemachinecontrolpanel": "Time Machine Control Panel",
+ "block.timetravelmod.timemachinecore": "Time Machine Core",
+ "block.timetravelmod.timemachinerecaller": "Time Machine Recaller",
+ "block.timetravelmod.timemachinetracker": "Time Machine Tracker",
+ "block.timetravelmod.gunpowderwire": "Gunpowder Wire",
+ "text.autoconfig.timetravelmod.option.clientConfig.enableTimeLineMusic": "Enable Time Line music",
+ "text.autoconfig.timetravelmod.option.clientConfig.enableTimeLineMusic.@Tooltip": "When enabled the Time Lines have their own music",
+ "text.autoconfig.timetravelmod.option.commonConfig.enableExperimentalFeatures": "Enable experimental features",
+ "text.autoconfig.timetravelmod.option.commonConfig.enableExperimentalFeatures.@Tooltip": "When enabled experimental features of the mod are activated",
+ "timetravelmod.error.built.client": "The Time Machine isn't correctly built!",
+ "timetravelmod.error.built.server": "The Time Machine used by the player isn't built",
+ "timetravelmod.error.cooled_down.client": "The Time Machine core has to cool down!",
+ "timetravelmod.error.cooled_down.server": "The Time Machine core of the Time Machine used by the player isn't cooled down",
+ "timetravelmod.error.player_inside.client": "You must be inside of the Time Machine!",
+ "timetravelmod.error.player_inside.server": "The player isn't inside of the Time Machine",
+ "timetravelmod.error.overloaded.client": "The Time Machine is overloaded!",
+ "timetravelmod.error.overloaded.server": "The Time Machine used by the player is overloaded",
+ "timetravelmod.error.entitiesescaped": "Someone exited the Time Machine, cancelled.",
+ "timetravelmod.error.unreachable_dim": "The destination Time Line is unreachable with the Time Machine used by the player.",
+ "timetravelmod.error.uncompatible_upgrades": "The following Time Machine Upgrades are incompatible: %s",
+ "timetravelmod.cheater_report": "A Time Travel request was received in the server, but the player who sent it (%s) is possibly cheating. Reason: %s. We suggest you to %s him.",
+ "timetravelmod.ban": "[BAN]",
+ "timetravelmod.generic.comma" : "%s, %s",
+ "timetravelmod.generic.and" : "%s and %s",
+ "tm.timetravelmod.creative.description": "This item is only available in Creative mode. Using it allows you to travel to any time period without restrictions or cool downs.",
+ "tm.timetravelmod.creative.name": "Creative Time Machine",
+ "tm.timetravelmod.tier1.description": "A very simple Time Machine that only reaches to the Old West.",
+ "tm.timetravelmod.tier1.name": "Tier 1 Time Machine",
+ "tmupgrade.timetravelmod.tracker.name": "Time Machine Tracker",
+ "tmupgrade.timetravelmod.tracker.description": "This upgrade will configure its adjacent Time Machine Recaller Blocks when you use the Time Machine. When a Time Machine Recaller Block is configured its center turns green and, when powered with redstone, it will return the configured Time Machine to your Time Line. If you travel across various Time Lines, you will need to install a Time Machine recaller on every Time Line you visit.",
+ "text.autoconfig.timetravelmod.option.commonConfig.enableUpdatePromos": "Enable update promos",
+ "text.autoconfig.timetravelmod.option.commonConfig.enableUpdatePromos.@Tooltip": "If this is disabled you won't be notified of mod updates at world joining",
+ "text.autoconfig.timetravelmod.option.commonConfig.enableCheaterReports": "Enable cheater reports",
+ "text.autoconfig.timetravelmod.option.commonConfig.enableCheaterReports.@Tooltip": "If this is disabled game masters (ops) won't be notified when a possible cheater is detected",
+ "text.autoconfig.timetravelmod.category.timetravelmod_client": "Client Config",
+ "text.autoconfig.timetravelmod.category.timetravelmod_common": "Common Config"
+}
\ No newline at end of file
diff --git a/src/main/resources/assets/timetravelmod/lang/es_es.json b/src/main/resources/assets/timetravelmod/lang/es_es.json
new file mode 100644
index 0000000..6c64762
--- /dev/null
+++ b/src/main/resources/assets/timetravelmod/lang/es_es.json
@@ -0,0 +1,81 @@
+{
+ "advancements.timetraveling.root.title": "Time Travel Mod",
+ "advancements.timetraveling.root.description": "El núcleo del mod",
+ "advancements.timetraveling.not_diamonds.title": "¡Eso no es diamante!",
+ "advancements.timetraveling.not_diamonds.description": "Encuentra un mineral de Cristal de Tiempo",
+ "advancements.timetraveling.timemachine.title": "Transistor de Flujo... flujeando...",
+ "advancements.timetraveling.timemachine.description": "Entra en una Máquina del Tiempo",
+ "advancements.timetraveling.doesnt_look_good.title": "Eso no tiene buena pinta",
+ "advancements.timetraveling.doesnt_look_good.description": "Muere por una Explosión Temporal",
+ "advancements.timetraveling.better_than_mending.title": "Mejor que Reparación",
+ "advancements.timetraveling.better_than_mending.description": "Repara completamente cualquier item en un Caldero Temporal",
+ "chat.ttm.outdated": "¡Una nueva versión del Time Travel Mod está disponible! ¡Puedes encontrarla en su página de CurseForge!",
+ "death.attack.temporalerror": "%s fue anulado por una anomalía temporal",
+ "gui.tm.error": "¡No puedes viajar a la línea temporal en la que ya estás, o viajar desde el Nether o el End!",
+ "gui.tm.timetravelmod.oldwest": "Viejo Oeste",
+ "gui.tm.timetravelmod.present": "Presente",
+ "gui.tmengineerbook.introduction": "¡Bienvenido al Libro del Ingeniero de Máquinas del Tiempo! Este libro es tu guía de construcción y mejora de las Máquinas del Tiempo del Time Travel Mod, además de las de cualquier otro plugin que hayas instalado.",
+ "gui.tmengineerbook.tms": "Máquinas del Tiempo",
+ "gui.tmengineerbook.tmsintroduction": "Para viajar a otras Líneas Temporales necesitarás una Máquina del Tiempo. Una Máquina del Tiempo es una estructura de múltiples bloques de cuatro tipos diferentes: bloques básicos (la estructura), bloques de núcleo (el motor), bloques de mejora (estos cambian el comportamiento) y un panel de control. Puedes colocar un bloque de mejora en cualquier lugar donde un bloque básico sea válido, aunque estas mejoras son opcionales. Después de haber construido tu Máquina del Tiempo, entra dentro de ella y haz clic derecho en el panel de control. Un menú te permitirá seleccionar tu destino. Las Líneas Temporales disponibles dependerán del nivel de la Máquina del Tiempo. Selecciona una y viajarás por el tiempo por primera vez. El motor de la Máquina del Tiempo necesitará un momento para enfriarse antes de poder usarlo de nuevo. Si intentas minar el motor mientras se enfría explotará, dejando un agujero temporal. También hay una probabilidad muy baja de que una Explosión Temporal ocurra cuando uses una Máquina del Tiempo.",
+ "gui.tmengineerbook.tmstats": "Nivel Máximo: %s | Tiempo de Enfriamiento del Motor: %s segundos",
+ "gui.tmengineerbook.howto": "Guía de construcción:",
+ "gui.tmengineerbook.layer": "Capa: %s",
+ "gui.tmengineerbook.compatibleupgrades": "Mejoras para Máquinas del Tiempo compatibles",
+ "gui.tmengineerbook.upgrades": "Mejoras para Máquinas del Tiempo",
+ "gui.tmengineerbook.noupgrades": "No hay ninguna Mejora para Máquinas del Tiempo disponible :(",
+ "gui.tmengineerbook.compatibletms": "Máquinas del Tiempo Compatibles",
+ "item.timetravelmod.controllercircuit": "Circuito Controlador",
+ "item.timetravelmod.creativetimemachine": "Máquina del Tiempo (Creativo)",
+ "item.timetravelmod.engineerbook": "Libro del Ingeniero de Máquinas del Tiempo",
+ "item.timetravelmod.heavyblock": "Bloque Pesado",
+ "item.timetravelmod.heavyingot": "Lingote Pesado",
+ "item.timetravelmod.reinforcedheavyblock": "Bloque Pesado Reforzado",
+ "item.timetravelmod.temporalcauldron": "Caldero del Tiempo",
+ "item.timetravelmod.temporalexplosion": "Explosión Temporal",
+ "item.timetravelmod.timecrystal": "Cristal del Tiempo",
+ "item.timetravelmod.timecrystalore": "Mena de Cristal del Tiempo",
+ "item.timetravelmod.timemachinebasicblock": "Bloque Básico de Máquina del Tiempo",
+ "item.timetravelmod.timemachinecontrolpanel": "Panel de Control de Máquina del Tiempo",
+ "item.timetravelmod.timemachinecore": "Núcleo de Máquina del Tiempo",
+ "item.timetravelmod.timemachinerecaller": "Regresador para Máquinas del Tiempo",
+ "item.timetravelmod.timemachinetracker": "Rastreador para Máquinas del Tiempo",
+ "item.timetravelmod.communicationscircuit": "Circuito de Comunicaciones",
+ "item.timetravelmod.gunpowderwire": "Mecha",
+ "itemGroup.timetravelmod.tab": "Time Travel Mod",
+ "block.timetravelmod.heavyblock": "Bloque Pesado",
+ "block.timetravelmod.reinforcedheavyblock": "Bloque Pesado Reforzado",
+ "block.timetravelmod.temporalcauldron": "Caldero del Tiempo",
+ "block.timetravelmod.temporalexplosion": "Vacío Atemporal Anómalo",
+ "block.timetravelmod.timecrystalore": "Mena de Cristal del Tiempo",
+ "block.timetravelmod.timemachinebasicblock": "Bloque Básico de Máquina del Tiempo",
+ "block.timetravelmod.timemachinecontrolpanel": "Panel de Control de Máquina del Tiempo",
+ "block.timetravelmod.timemachinecore": "Núcleo de Máquina del Tiempo",
+ "block.timetravelmod.timemachinerecaller": "Regresador para Máquinas del Tiempo",
+ "block.timetravelmod.timemachinetracker": "Rastreador para Máquinas del Tiempo",
+ "block.timetravelmod.gunpowderwire": "Mecha",
+ "text.autoconfig.timetravelmod.option.clientConfig.enableTimeLineMusic.@Tooltip": "Cuando se habilita, las Lineas Temporales tienen su propia música",
+ "text.autoconfig.timetravelmod.option.commonConfig.enableExperimentalFeatures.@Tooltip": "Cuando se habilita, las funciones experimentales del mod se activan",
+ "timetravelmod.error.built.client": "¡La Máquina del Tiempo no se ha construido correctamente!",
+ "timetravelmod.error.built.server": "La Máquina del Tiempo usada por el jugador no está construida",
+ "timetravelmod.error.cooled_down.client": "¡El núcleo de la Máquina del Tiempo tiene que enfriarse!",
+ "timetravelmod.error.cooled_down.server": "El núcleo de la Máquina del Tiempo usada por el jugador no está enfriado",
+ "timetravelmod.error.player_inside.client": "¡Debes estar dentro de la Máquina del Tiempo!",
+ "timetravelmod.error.player_inside.server": "El jugador no está dentro de la Máquina del Tiempo",
+ "timetravelmod.error.overloaded.client": "¡La máquina del tiempo está sobrecargada!",
+ "timetravelmod.error.overloaded.server": "La máquina del tiempo usada por el jugador está sobrecargada",
+ "timetravelmod.error.entitiesescaped": "Alguien salió de la máquina del tiempo, cancelado.",
+ "timetravelmod.error.unreachable_dim": "La línea temporal de destino es inalcanzable con la máquina del tiempo usada por el jugador.",
+ "timetravelmod.error.uncompatible_upgrades": "Las siguientes mejoras para máquinas del tiempo son incompatibles: %s",
+ "timetravelmod.cheater_report": "Se recibió una solicitud de Viaje en el tiempo en el servidor, pero el jugador que la envió (%s) posiblemente está usando exploits. Motivo: %s. Te sugerimos que le hagas %s.",
+ "timetravelmod.ban": "[EXPULSAR]",
+ "timetravelmod.generic.comma": "%s, %s",
+ "timetravelmod.generic.and": "%s y %s",
+ "tm.timetravelmod.creative.description": "Este objeto solo está disponible en modo Creativo. Usarlo te permite viajar a cualquier periodo temporal sin restricciones o enfriamientos.",
+ "tm.timetravelmod.creative.name": "Máquina del Tiempo (Creativo)",
+ "tm.timetravelmod.tier1.description": "Una Máquina del Tiempo muy simple que sólo llega al Viejo Oeste.",
+ "tm.timetravelmod.tier1.name": "Máquina del Tiempo de nivel 1",
+ "tmupgrade.timetravelmod.tracker.name": "Rastreador para Máquinas del Tiempo",
+ "tmupgrade.timetravelmod.tracker.description": "Esta actualización configurará los Regresadores para Máquinas del Tiempo adyacentes cuando uses la Máquina del Tiempo. Cuando se configura un Regresador para Máquinas del Tiempo, su centro se vuelve verde y, cuando se activa con redstone, devuelve la Máquina del Tiempo que lo configuró a tu Línea Temporal. Si viajas a través de varias Líneas Temporales, deberás instalar un Regresador para Máquinas del Tiempo en cada Línea Temporal que visites.",
+ "text.autoconfig.timetravelmod.option.commonConfig.enableUpdatePromos.@Tooltip": "Si se desactiva, dejaras de ser notificado de las nuevas versiones del mod al unirte a un mundo",
+ "text.autoconfig.timetravelmod.option.commonConfig.enableCheaterReports.@Tooltip": "Si esta opción está deshabilitada, los operadores (ops) no serán notificados cuando se detecte un posible tramposo"
+}
\ No newline at end of file
diff --git a/src/main/resources/assets/timetravelmod/lang/fr_fr.json b/src/main/resources/assets/timetravelmod/lang/fr_fr.json
new file mode 100644
index 0000000..81499d9
--- /dev/null
+++ b/src/main/resources/assets/timetravelmod/lang/fr_fr.json
@@ -0,0 +1,81 @@
+{
+ "advancements.timetraveling.root.title": "Time Travel Mod",
+ "advancements.timetraveling.root.description": "Le cœur du mod",
+ "advancements.timetraveling.not_diamonds.title": "Drôles de diamants",
+ "advancements.timetraveling.not_diamonds.description": "Trouvez un minerai de cristal temporel.",
+ "advancements.timetraveling.timemachine.title": "Convecteur temporel... temporisé",
+ "advancements.timetraveling.timemachine.description": "Entrez dans une machine temporelle.",
+ "advancements.timetraveling.doesnt_look_good.title": "Ça ne sent pas bon",
+ "advancements.timetraveling.doesnt_look_good.description": "Mourez dans une explosion temporelle.",
+ "advancements.timetraveling.better_than_mending.title": "Comme neuf",
+ "advancements.timetraveling.better_than_mending.description": "Réparez complètement n'importe quel objet dans un chaudron temporel.",
+ "chat.ttm.outdated": "Une nouvelle version de Time Travel Mod est disponible, consultez la page CurseForge !",
+ "death.attack.temporalerror": "%s s'est fait réduire à néant par une anomalie temporelle",
+ "gui.tm.error": "Vous ne pouvez pas voyager depuis le Nether ou l'End ou vers une ligne temporelle dans laquelle vous êtes déjà présent !",
+ "gui.tm.timetravelmod.oldwest": "Far West",
+ "gui.tm.timetravelmod.present": "Présent",
+ "gui.tmengineerbook.introduction": "Bienvenue dans le livre de l'ingénieur du temps ! Ce livre vous servira de guide de construction et d'amélioration des machines temporelles, ainsi que pour tous les plugins que vous avez installés.",
+ "gui.tmengineerbook.tms": "Machines temporelles",
+ "gui.tmengineerbook.tmsintroduction": "Pour voyager vers d'autres lignes temporelles, une machine vous sera nécessaire. La machine temporelle est une structure constituée de quatre blocs différents : les blocs de base (la structure), les blocs centraux (le moteur), les blocs d'amélioration (qui modifient le fonctionnement de la machine) et le panneau de contrôle. Vous pouvez choisir de placer un bloc d'amélioration à n'importe quel endroit où un bloc de base est valide. Dès que vous aurez construit votre machine temporelle, entrez à l'intérieur et faites un clic droit sur le panneau de contrôle. Un menu s'affichera et vous permettra de sélectionner votre ligne temporelle de destination. Le nombre de lignes temporelles disponibles dépendra du niveau de la machine temporelle. Sélectionnez-en une pour effectuer votre premier voyage dans le temps. Pendant un court instant, vous ne serez plus en mesure d'utiliser la machine temporelle car le moteur devra refroidir. Si vous tentez de casser le moteur alors qu'il refroidissait, celui-ci explosera, provoquant au passage une faille temporelle. Il existe également une faible probabilité qu'une explosion temporelle survienne à n'importe quel moment lors de l'utilisation de la machine.",
+ "gui.tmengineerbook.tmstats": "Niveau maximum : %s | Temps de refroidissement du moteur : %s secondes",
+ "gui.tmengineerbook.howto": "Guide de construction :",
+ "gui.tmengineerbook.layer": "Couche : %s",
+ "gui.tmengineerbook.compatibleupgrades": "Améliorations de machine temporelle compatibles",
+ "gui.tmengineerbook.upgrades": "Améliorations de machine temporelle",
+ "gui.tmengineerbook.noupgrades": "Il n'y a aucune amélioration de machine temporelle de disponible :(",
+ "gui.tmengineerbook.compatibletms": "Machines temporelles compatibles",
+ "item.timetravelmod.controllercircuit": "Circuit de contrôle",
+ "item.timetravelmod.creativetimemachine": "Machine temporelle illimitée",
+ "item.timetravelmod.engineerbook": "Livre de l'ingénieur du temps",
+ "item.timetravelmod.heavyblock": "Bloc lourd",
+ "item.timetravelmod.heavyingot": "Lingot lourd",
+ "item.timetravelmod.reinforcedheavyblock": "Bloc lourd renforcé",
+ "item.timetravelmod.temporalcauldron": "Chaudron temporel",
+ "item.timetravelmod.temporalexplosion": "Explosion temporelle",
+ "item.timetravelmod.timecrystal": "Cristal temporel",
+ "item.timetravelmod.timecrystalore": "Minerai de cristal temporel",
+ "item.timetravelmod.timemachinebasicblock": "Bloc de base de machine temporelle",
+ "item.timetravelmod.timemachinecontrolpanel": "Panneau de contrôle de machine temporelle",
+ "item.timetravelmod.timemachinecore": "Coeur de machine temporelle",
+ "item.timetravelmod.timemachinerecaller": "Rappeleur de machine temporelle",
+ "item.timetravelmod.timemachinetracker": "Émetteur de machine temporelle",
+ "item.timetravelmod.communicationscircuit": "Circuit de communication",
+ "item.timetravelmod.gunpowderwire": "Traînée de poudre à canon",
+ "itemGroup.timetravelmod.tab": "Time Travel Mod",
+ "block.timetravelmod.heavyblock": "Bloc lourd",
+ "block.timetravelmod.reinforcedheavyblock": "Bloc lourd renforcé",
+ "block.timetravelmod.temporalcauldron": "Chaudron temporel",
+ "block.timetravelmod.temporalexplosion": "Vide atemporel anormal",
+ "block.timetravelmod.timecrystalore": "Minerai de cristal temporel",
+ "block.timetravelmod.timemachinebasicblock": "Bloc de base de machine temporelle",
+ "block.timetravelmod.timemachinecontrolpanel": "Panneau de contrôle de machine temporelle",
+ "block.timetravelmod.timemachinecore": "Coeur de machine temporelle",
+ "block.timetravelmod.timemachinerecaller": "Rappeleur de machine temporelle",
+ "block.timetravelmod.timemachinetracker": "Émetteur de machine temporelle",
+ "block.timetravelmod.gunpowderwire": "Traînée de poudre à canon",
+ "text.autoconfig.timetravelmod.option.clientConfig.enableTimeLineMusic.@Tooltip": "Quand cette option est activée, les lignes temporelles possèdent leur propre musique",
+ "text.autoconfig.timetravelmod.option.commonConfig.enableExperimentalFeatures.@Tooltip": "Quand cette option est activée, les fonctionnalités expérimentales du mod sont activées",
+ "timetravelmod.error.built.client": "La machine temporelle n'est pas correctement construite !",
+ "timetravelmod.error.built.server": "La machine temporelle utilisée par le joueur n'est pas construite",
+ "timetravelmod.error.cooled_down.client": "Le cœur de la machine temporelle doit être refroidi !",
+ "timetravelmod.error.cooled_down.server": "Le cœur de la machine temporelle utilisée par le joueur n'a pas été refroidi",
+ "timetravelmod.error.player_inside.client": "Vous devez être à l'intérieur de la machine temporelle !",
+ "timetravelmod.error.player_inside.server": "Le joueur n'est pas à l'intérieur de la machine temporelle",
+ "timetravelmod.error.overloaded.client": "La machine temporelle est surchargée !",
+ "timetravelmod.error.overloaded.server": "La machine temporelle utilisée par le joueur est surchargée",
+ "timetravelmod.error.entitiesescaped": "Quelqu'un est sorti de la machine temporelle, opération interrompue.",
+ "timetravelmod.error.unreachable_dim": "La ligne temporelle de destination est inaccessible avec la machine temporelle utilisée par le joueur.",
+ "timetravelmod.error.uncompatible_upgrades": "Les améliorations suivantes de la machine temporelle sont incompatibles : %s",
+ "timetravelmod.cheater_report": "Une requête de voyage dans le temps a été reçue sur le serveur, mais le joueur qui l'a émise (%s) est potentiellement en train de tricher. Raison : %s. Nous vous suggérons de le %s.",
+ "timetravelmod.ban": "[BANNIR]",
+ "timetravelmod.generic.comma": "%s, %s",
+ "timetravelmod.generic.and": "%s et %s",
+ "tm.timetravelmod.creative.description": "Cet objet est uniquement disponible en mode Créatif et permet à son utilisateur de voyager vers n'importe quelle époque sans aucune restriction ou temps de refroidissement.",
+ "tm.timetravelmod.creative.name": "Machine temporelle illimitée",
+ "tm.timetravelmod.tier1.description": "Une machine temporelle toute simple qui ne peut atteindre que le Far West.",
+ "tm.timetravelmod.tier1.name": "Machine temporelle de niveau 1",
+ "tmupgrade.timetravelmod.tracker.name": "Émetteur de machine temporelle",
+ "tmupgrade.timetravelmod.tracker.description": "Cette amélioration configurera les blocs adjacents de rappeleurs de machines temporelles lors de l'utilisation de la machine. Lorsqu'un bloc de rappeleur de machine temporelle est configuré, son centre devient vert et, une fois alimenté avec de la redstone, renverra la machine temporelle configurée vers votre ligne temporelle. Si vous voyagez à travers plusieurs lignes temporelles, vous aurez besoin d'installer un rappeleur de machine sur chaque ligne temporelle que vous visiterez.",
+ "text.autoconfig.timetravelmod.option.commonConfig.enableUpdatePromos.@Tooltip": "Si cette option est désactivée, vous ne serez pas informé des mises à jour du mod à l'entrée dans le monde",
+ "text.autoconfig.timetravelmod.option.commonConfig.enableCheaterReports.@Tooltip": "Si cette option est désactivée, les opérateurs (ops) ne seront pas avertis quand un tricheur potentiel est détecté"
+}
\ No newline at end of file
diff --git a/src/main/resources/assets/timetravelmod/lang/it_it.json b/src/main/resources/assets/timetravelmod/lang/it_it.json
new file mode 100644
index 0000000..87b6d0b
--- /dev/null
+++ b/src/main/resources/assets/timetravelmod/lang/it_it.json
@@ -0,0 +1,37 @@
+{
+ "advancements.timetraveling.root.title": "Time Travel Mod",
+ "advancements.timetraveling.root.description": "Il cuore della mod",
+ "advancements.timetraveling.not_diamonds.title": "Non sono diamanti!",
+ "advancements.timetraveling.not_diamonds.description": "Trova un Cristallo del Tempo grezzo",
+ "advancements.timetraveling.timemachine.title": "Condensatore di Flusso... flussante",
+ "advancements.timetraveling.timemachine.description": "Entra in una Macchina del Tempo",
+ "advancements.timetraveling.doesnt_look_good.title": "Non ha un bell'aspetto",
+ "advancements.timetraveling.doesnt_look_good.description": "Fatti uccidere da un'Esplosione Temporale",
+ "advancements.timetraveling.better_than_mending.title": "Meglio di mending",
+ "gui.tm.timetravelmod.oldwest": "Vecchio West",
+ "gui.tm.timetravelmod.present": "Presente",
+ "gui.tmengineerbook.tms": "Macchina del Tempo",
+ "gui.tmengineerbook.layer": "Strato: %s",
+ "gui.tmengineerbook.compatibleupgrades": "Upgrade della Macchina del Tempo Compatibili",
+ "gui.tmengineerbook.upgrades": "Upgrade della Macchina del Tempo",
+ "gui.tmengineerbook.noupgrades": "Non c'è nessun Upgrade della Macchina del Tempo disponibile :(",
+ "gui.tmengineerbook.compatibletms": "Macchine del Tempo Compatibili",
+ "item.timetravelmod.engineerbook": "Manuale dell'Ingegnere della Macchina del Tempo",
+ "itemGroup.timetravelmod.tab": "Time Travel Mod",
+ "timetravelmod.error.built.client": "La Macchina del Tempo non costruita correttamente!",
+ "timetravelmod.error.built.server": "La Macchina del Tempo utilizzata dal giocatore non è costruita",
+ "timetravelmod.error.cooled_down.client": "Il nucleo della Macchina del Tempo deve raffreddarsi!",
+ "timetravelmod.error.cooled_down.server": "Il nucleo della Macchina del Tempo utilizzato dal giocatore non è stato raffreddato",
+ "timetravelmod.error.player_inside.client": "Devi essere all'interno della Macchina del Tempo!",
+ "timetravelmod.error.player_inside.server": "Il giocatore non è all'interno della Macchina del Tempo",
+ "timetravelmod.error.overloaded.client": "La Macchina del Tempo è sovraccaricata!",
+ "timetravelmod.error.overloaded.server": "La Macchina del Tempo utilizzata dal giocatore è sovraccaricata",
+ "timetravelmod.error.unreachable_dim": "La Linea temporale di Destinazione non è raggiungibile con la Macchina del Tempo utilizzata dal giocatore.",
+ "timetravelmod.cheater_report": "Una richiesta di Viaggio nel Tempo è stata ricevuta nel server, ma il giocatore che l'ha inviata (%s) sta probabilmente imbrogliando.\nMotivo: %s. Ti suggeriamo di %s.",
+ "timetravelmod.ban": "[BAN]",
+ "timetravelmod.generic.comma": "%s, %s",
+ "timetravelmod.generic.and": "%s e %s",
+ "tm.timetravelmod.tier1.name": "Macchina del Tempo di Livello 1",
+ "text.autoconfig.timetravelmod.option.commonConfig.enableUpdatePromos.@Tooltip": "Se questa opzione è disabilitata, non riceverai notifiche di aggiornamenti della mod una volta entrato nel mondo",
+ "text.autoconfig.timetravelmod.option.commonConfig.enableCheaterReports.@Tooltip": "Se questa opzione è disabilitata, i game master (ops) non saranno avvisati una volta che un possibile cheater viene rilevato"
+}
\ No newline at end of file
diff --git a/src/main/resources/assets/timetravelmod/lang/ru_ru.json b/src/main/resources/assets/timetravelmod/lang/ru_ru.json
new file mode 100644
index 0000000..fd66fa6
--- /dev/null
+++ b/src/main/resources/assets/timetravelmod/lang/ru_ru.json
@@ -0,0 +1,73 @@
+{
+ "advancements.timetraveling.root.title": "Путешествие Во Времени Мод",
+ "advancements.timetraveling.root.description": "Ядро мода",
+ "advancements.timetraveling.not_diamonds.title": "Это же не алмазы!",
+ "advancements.timetraveling.not_diamonds.description": "Найди руду временной кристал",
+ "advancements.timetraveling.timemachine.title": "Конденсатор Потока... флюсование...",
+ "advancements.timetraveling.timemachine.description": "Введите машину времени",
+ "advancements.timetraveling.doesnt_look_good.title": "Это выглядит не очень хорошо",
+ "advancements.timetraveling.doesnt_look_good.description": "Погибнуть от Временного взрыва",
+ "advancements.timetraveling.better_than_mending.title": "Лучше, чем починка",
+ "advancements.timetraveling.better_than_mending.description": "Полностью починит предмет во временном котле",
+ "chat.ttm.outdated": "Доступна новая версия Time Travel Mod! Вы можете скачать её на CurseForge!",
+ "death.attack.temporalerror": "%s был уничтожен во время временной аномалии",
+ "gui.tm.error": "Вы не можете отправиться в путешествие во временную линию, в которой вы уже находитесь, или отправиться в путешествие из ада или энда!",
+ "gui.tm.timetravelmod.oldwest": "Старый Запад",
+ "gui.tm.timetravelmod.present": "Настоящие",
+ "gui.tmengineerbook.tms": "Машина времени",
+ "gui.tmengineerbook.tmstats": "Максимальный уровень: %s | Время перезарядки двигателя: %s секунд",
+ "gui.tmengineerbook.howto": "Инструкция по постройке:",
+ "gui.tmengineerbook.layer": "Слой: %s",
+ "gui.tmengineerbook.compatibleupgrades": "Совместимые Обновления Машины Времени",
+ "gui.tmengineerbook.upgrades": "Обновление Машины Времени",
+ "gui.tmengineerbook.noupgrades": "Нет никакого доступного обновления машины времени :(",
+ "gui.tmengineerbook.compatibletms": "Совместимые Машины Времени",
+ "item.timetravelmod.controllercircuit": "Схема контроллера",
+ "item.timetravelmod.creativetimemachine": "Творческая машина времени",
+ "item.timetravelmod.engineerbook": "Книга инженера машины времени",
+ "item.timetravelmod.heavyblock": "Тяжёлый блок",
+ "item.timetravelmod.heavyingot": "Тяжёлый слиток",
+ "item.timetravelmod.reinforcedheavyblock": "Усиленный тяжёлый блок",
+ "item.timetravelmod.temporalcauldron": "Временной котёл",
+ "item.timetravelmod.temporalexplosion": "Временной взрыв",
+ "item.timetravelmod.timecrystal": "Кристалл времени",
+ "item.timetravelmod.timecrystalore": "Временная руда",
+ "item.timetravelmod.timemachinebasicblock": "Основной блок машины времени",
+ "item.timetravelmod.timemachinecontrolpanel": "Панель управления машины времени",
+ "item.timetravelmod.timemachinecore": "Ядро машины времени",
+ "item.timetravelmod.timemachinetracker": "Трекер машины времени",
+ "item.timetravelmod.communicationscircuit": "Комуникационная схема",
+ "item.timetravelmod.gunpowderwire": "Пороховой провод",
+ "itemGroup.timetravelmod.tab": "Путешествие Во Времени Мод",
+ "block.timetravelmod.heavyblock": "Тяжёлый блок",
+ "block.timetravelmod.reinforcedheavyblock": "Усиленный тяжёлый блок",
+ "block.timetravelmod.temporalcauldron": "Временной котёл",
+ "block.timetravelmod.timecrystalore": "Временная руда",
+ "block.timetravelmod.timemachinebasicblock": "Основной блок машины времени",
+ "block.timetravelmod.timemachinecontrolpanel": "Панель управления машины времени",
+ "block.timetravelmod.timemachinecore": "Ядро машины времени",
+ "block.timetravelmod.timemachinetracker": "Трекер машины времени",
+ "block.timetravelmod.gunpowderwire": "Пороховой провод",
+ "text.autoconfig.timetravelmod.option.commonConfig.enableExperimentalFeatures.@Tooltip": "При включении данного параметра, вам будут доступны экспериментальные функции мода",
+ "timetravelmod.error.built.client": "Машина времени построена неправильно!",
+ "timetravelmod.error.built.server": "Машина времени, используемая игроком, не построена",
+ "timetravelmod.error.cooled_down.client": "Ядро Машины времени должно остыть!",
+ "timetravelmod.error.cooled_down.server": "Ядро машины времени, которую использует игрок еще не остыло",
+ "timetravelmod.error.player_inside.client": "Вы должны быть внутри машины времени!",
+ "timetravelmod.error.player_inside.server": "Игрок не находится внутри машины времени",
+ "timetravelmod.error.overloaded.client": "Машина времени перегружена!",
+ "timetravelmod.error.overloaded.server": "Машина времени используемая игроком перегружена",
+ "timetravelmod.error.unreachable_dim": "Временная линия назначения недоступна с помощью машины времени, используемой игроком.",
+ "timetravelmod.error.uncompatible_upgrades": "Данные улучшения не совместимы: %s",
+ "timetravelmod.cheater_report": "Запрос на перемещение во времени был получен на сервере, но игрок, который его отправил (%s), возможно, обманывает. Причина: %s. Мы предлагаем вам обратиться к %s him.",
+ "timetravelmod.ban": "[БАН!]",
+ "timetravelmod.generic.comma": "%s, %s",
+ "timetravelmod.generic.and": "%s и %s",
+ "tm.timetravelmod.creative.description": "Данный предмет доступен только в творческом режиме. Он позволят путешествовать во времени без каких-либо ограничений.",
+ "tm.timetravelmod.creative.name": "Творческая машина времени",
+ "tm.timetravelmod.tier1.description": "Самая простая машина времени, с помощью неё вы сможете путешествовать только на старый запад.",
+ "tm.timetravelmod.tier1.name": "Машина времени первого уровня",
+ "tmupgrade.timetravelmod.tracker.name": "Трекер машины времени",
+ "text.autoconfig.timetravelmod.option.commonConfig.enableUpdatePromos.@Tooltip": "Если данный параметр отключен, то вы не будете получать уведомление об обновлениях мода",
+ "text.autoconfig.timetravelmod.option.commonConfig.enableCheaterReports.@Tooltip": "Если этот параметр отключен, game masters (ops) не будет уведомляться о возможном обнаружении мошенника"
+}
\ No newline at end of file
diff --git a/src/main/resources/assets/timetravelmod/lang/zh_cn.json b/src/main/resources/assets/timetravelmod/lang/zh_cn.json
new file mode 100644
index 0000000..bfd0806
--- /dev/null
+++ b/src/main/resources/assets/timetravelmod/lang/zh_cn.json
@@ -0,0 +1,18 @@
+{
+ "advancements.timetraveling.root.title": "时间旅行",
+ "gui.tm.timetravelmod.oldwest": "旧西部",
+ "gui.tm.timetravelmod.present": "现代",
+ "itemGroup.timetravelmod.tab": "时间旅行",
+ "timetravelmod.error.built.client": "时间机器没有被正确的搭建",
+ "timetravelmod.error.built.server": "玩家使用的时间机器没有被搭建",
+ "timetravelmod.error.cooled_down.client": "时间机器核心冷却好了!",
+ "timetravelmod.error.cooled_down.server": "时间机器核心还在冷却",
+ "timetravelmod.error.player_inside.client": "你必须进入时间机器",
+ "timetravelmod.error.player_inside.server": "玩家没有进入时间机器",
+ "timetravelmod.error.overloaded.client": "时间机器已超载!",
+ "timetravelmod.error.overloaded.server": "玩家使用的时间机器超载了!",
+ "timetravelmod.error.unreachable_dim": "玩家使用的时间机器无法正常穿越到目标时间线.",
+ "timetravelmod.cheater_report": "服务器收到了时间旅行mod的提醒,它提醒 (%s) 玩家可能在作弊. 原因: %s. 我们建议你 %s 他.",
+ "text.autoconfig.timetravelmod.option.commonConfig.enableUpdatePromos.@Tooltip": "如果禁用此功能,你将不会在进入世界时收到模组更新提醒",
+ "text.autoconfig.timetravelmod.option.commonConfig.enableCheaterReports.@Tooltip": "如果禁用这个功能,在检测到作弊者时将不会通知op"
+}
\ No newline at end of file
diff --git a/src/main/resources/assets/timetravelmod/models/block/heavyblock.json b/src/main/resources/assets/timetravelmod/models/block/heavyblock.json
new file mode 100644
index 0000000..3443c50
--- /dev/null
+++ b/src/main/resources/assets/timetravelmod/models/block/heavyblock.json
@@ -0,0 +1,6 @@
+{
+ "parent": "block/cube_all",
+ "textures": {
+ "all": "timetravelmod:blocks/heavyblock"
+ }
+}
\ No newline at end of file
diff --git a/src/main/resources/assets/timetravelmod/models/block/reinforcedheavyblock.json b/src/main/resources/assets/timetravelmod/models/block/reinforcedheavyblock.json
new file mode 100644
index 0000000..d449d9e
--- /dev/null
+++ b/src/main/resources/assets/timetravelmod/models/block/reinforcedheavyblock.json
@@ -0,0 +1,6 @@
+{
+ "parent": "block/cube_all",
+ "textures": {
+ "all": "timetravelmod:blocks/reinforcedheavyblock"
+ }
+}
\ No newline at end of file
diff --git a/src/main/resources/assets/timetravelmod/models/block/temporalcauldron_empty.json b/src/main/resources/assets/timetravelmod/models/block/temporalcauldron_empty.json
new file mode 100644
index 0000000..88484dc
--- /dev/null
+++ b/src/main/resources/assets/timetravelmod/models/block/temporalcauldron_empty.json
@@ -0,0 +1,155 @@
+{
+ "ambientocclusion": false,
+ "textures": {
+ "particle": "block/cauldron_side",
+ "top": "block/cauldron_top",
+ "bottom": "block/cauldron_bottom",
+ "side": "block/cauldron_side",
+ "inside": "block/cauldron_inner"
+ },
+ "elements": [
+ { "from": [ 0, 3, 0 ],
+ "to": [ 2, 16, 16 ],
+ "faces": {
+ "down": { "texture": "#inside" },
+ "up": { "texture": "#top", "cullface": "up" },
+ "north": { "texture": "#side", "cullface": "north" },
+ "south": { "texture": "#side", "cullface": "south" },
+ "west": { "texture": "#side", "cullface": "west" },
+ "east": { "texture": "#side" }
+ }
+ },
+ { "from": [ 2, 3, 2 ],
+ "to": [ 14, 4, 14 ],
+ "faces": {
+ "down": { "texture": "#inside" },
+ "up": { "texture": "#inside", "cullface": "up" },
+ "north": { "texture": "#side", "cullface": "north" },
+ "south": { "texture": "#side", "cullface": "south" },
+ "west": { "texture": "#side", "cullface": "west" },
+ "east": { "texture": "#side", "cullface": "east" }
+ }
+ },
+ { "from": [ 14, 3, 0 ],
+ "to": [ 16, 16, 16 ],
+ "faces": {
+ "down": { "texture": "#inside" },
+ "up": { "texture": "#top", "cullface": "up" },
+ "north": { "texture": "#side", "cullface": "north" },
+ "south": { "texture": "#side", "cullface": "south" },
+ "west": { "texture": "#side" },
+ "east": { "texture": "#side", "cullface": "east" }
+ }
+ },
+ { "from": [ 2, 3, 0 ],
+ "to": [ 14, 16, 2 ],
+ "faces": {
+ "down": { "texture": "#inside" },
+ "up": { "texture": "#top", "cullface": "up" },
+ "north": { "texture": "#side", "cullface": "north" },
+ "south": { "texture": "#side" },
+ "west": { "texture": "#side", "cullface": "west" },
+ "east": { "texture": "#side", "cullface": "east" }
+ }
+ },
+ { "from": [ 2, 3, 14 ],
+ "to": [ 14, 16, 16 ],
+ "faces": {
+ "down": { "texture": "#inside" },
+ "up": { "texture": "#top", "cullface": "up" },
+ "north": { "texture": "#side" },
+ "south": { "texture": "#side", "cullface": "south" },
+ "west": { "texture": "#side", "cullface": "west" },
+ "east": { "texture": "#side", "cullface": "east" }
+ }
+ },
+ { "from": [ 0, 0, 0 ],
+ "to": [ 4, 3, 2 ],
+ "faces": {
+ "down": { "texture": "#bottom" },
+ "up": { "texture": "#top" },
+ "north": { "texture": "#side" },
+ "south": { "texture": "#side" },
+ "west": { "texture": "#side" },
+ "east": { "texture": "#side" }
+ }
+ },
+ { "from": [ 0, 0, 2 ],
+ "to": [ 2, 3, 4 ],
+ "faces": {
+ "down": { "texture": "#bottom" },
+ "up": { "texture": "#top" },
+ "north": { "texture": "#side" },
+ "south": { "texture": "#side" },
+ "west": { "texture": "#side" },
+ "east": { "texture": "#side" }
+ }
+ },
+ { "from": [ 12, 0, 0 ],
+ "to": [ 16, 3, 2 ],
+ "faces": {
+ "down": { "texture": "#bottom" },
+ "up": { "texture": "#top" },
+ "north": { "texture": "#side" },
+ "south": { "texture": "#side" },
+ "west": { "texture": "#side" },
+ "east": { "texture": "#side" }
+ }
+ },
+ { "from": [ 14, 0, 2 ],
+ "to": [ 16, 3, 4 ],
+ "faces": {
+ "down": { "texture": "#bottom" },
+ "up": { "texture": "#top" },
+ "north": { "texture": "#side" },
+ "south": { "texture": "#side" },
+ "west": { "texture": "#side" },
+ "east": { "texture": "#side" }
+ }
+ },
+ { "from": [ 0, 0, 14 ],
+ "to": [ 4, 3, 16 ],
+ "faces": {
+ "down": { "texture": "#bottom" },
+ "up": { "texture": "#top" },
+ "north": { "texture": "#side" },
+ "south": { "texture": "#side" },
+ "west": { "texture": "#side" },
+ "east": { "texture": "#side" }
+ }
+ },
+ { "from": [ 0, 0, 12 ],
+ "to": [ 2, 3, 14 ],
+ "faces": {
+ "down": { "texture": "#bottom" },
+ "up": { "texture": "#top" },
+ "north": { "texture": "#side" },
+ "south": { "texture": "#side" },
+ "west": { "texture": "#side" },
+ "east": { "texture": "#side" }
+ }
+ },
+ { "from": [ 12, 0, 14 ],
+ "to": [ 16, 3, 16 ],
+ "faces": {
+ "down": { "texture": "#bottom" },
+ "up": { "texture": "#top" },
+ "north": { "texture": "#side" },
+ "south": { "texture": "#side" },
+ "west": { "texture": "#side" },
+ "east": { "texture": "#side" }
+ }
+ },
+ { "from": [ 14, 0, 12 ],
+ "to": [ 16, 3, 14 ],
+ "faces": {
+ "down": { "texture": "#bottom" },
+ "up": { "texture": "#top" },
+ "north": { "texture": "#side" },
+ "south": { "texture": "#side" },
+ "west": { "texture": "#side" },
+ "east": { "texture": "#side" }
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/src/main/resources/assets/timetravelmod/models/block/temporalcauldron_level1.json b/src/main/resources/assets/timetravelmod/models/block/temporalcauldron_level1.json
new file mode 100644
index 0000000..b29c36b
--- /dev/null
+++ b/src/main/resources/assets/timetravelmod/models/block/temporalcauldron_level1.json
@@ -0,0 +1,162 @@
+{
+ "ambientocclusion": false,
+ "textures": {
+ "particle": "block/cauldron_side",
+ "top": "block/cauldron_top",
+ "bottom": "block/cauldron_bottom",
+ "side": "block/cauldron_side",
+ "inside": "block/cauldron_inner",
+ "water": "timetravelmod:blocks/timefluid_still"
+ },
+ "elements": [
+ { "from": [ 0, 3, 0 ],
+ "to": [ 2, 16, 16 ],
+ "faces": {
+ "down": { "texture": "#inside" },
+ "up": { "texture": "#top", "cullface": "up" },
+ "north": { "texture": "#side", "cullface": "north" },
+ "south": { "texture": "#side", "cullface": "south" },
+ "west": { "texture": "#side", "cullface": "west" },
+ "east": { "texture": "#side" }
+ }
+ },
+ { "from": [ 2, 3, 2 ],
+ "to": [ 14, 4, 14 ],
+ "faces": {
+ "down": { "texture": "#inside" },
+ "up": { "texture": "#inside", "cullface": "up" },
+ "north": { "texture": "#side", "cullface": "north" },
+ "south": { "texture": "#side", "cullface": "south" },
+ "west": { "texture": "#side", "cullface": "west" },
+ "east": { "texture": "#side", "cullface": "east" }
+ }
+ },
+ { "from": [ 14, 3, 0 ],
+ "to": [ 16, 16, 16 ],
+ "faces": {
+ "down": { "texture": "#inside" },
+ "up": { "texture": "#top", "cullface": "up" },
+ "north": { "texture": "#side", "cullface": "north" },
+ "south": { "texture": "#side", "cullface": "south" },
+ "west": { "texture": "#side" },
+ "east": { "texture": "#side", "cullface": "east" }
+ }
+ },
+ { "from": [ 2, 3, 0 ],
+ "to": [ 14, 16, 2 ],
+ "faces": {
+ "down": { "texture": "#inside" },
+ "up": { "texture": "#top", "cullface": "up" },
+ "north": { "texture": "#side", "cullface": "north" },
+ "south": { "texture": "#side" },
+ "west": { "texture": "#side", "cullface": "west" },
+ "east": { "texture": "#side", "cullface": "east" }
+ }
+ },
+ { "from": [ 2, 3, 14 ],
+ "to": [ 14, 16, 16 ],
+ "faces": {
+ "down": { "texture": "#inside" },
+ "up": { "texture": "#top", "cullface": "up" },
+ "north": { "texture": "#side" },
+ "south": { "texture": "#side", "cullface": "south" },
+ "west": { "texture": "#side", "cullface": "west" },
+ "east": { "texture": "#side", "cullface": "east" }
+ }
+ },
+ { "from": [ 0, 0, 0 ],
+ "to": [ 4, 3, 2 ],
+ "faces": {
+ "down": { "texture": "#bottom" },
+ "up": { "texture": "#top" },
+ "north": { "texture": "#side" },
+ "south": { "texture": "#side" },
+ "west": { "texture": "#side" },
+ "east": { "texture": "#side" }
+ }
+ },
+ { "from": [ 0, 0, 2 ],
+ "to": [ 2, 3, 4 ],
+ "faces": {
+ "down": { "texture": "#bottom" },
+ "up": { "texture": "#top" },
+ "north": { "texture": "#side" },
+ "south": { "texture": "#side" },
+ "west": { "texture": "#side" },
+ "east": { "texture": "#side" }
+ }
+ },
+ { "from": [ 12, 0, 0 ],
+ "to": [ 16, 3, 2 ],
+ "faces": {
+ "down": { "texture": "#bottom" },
+ "up": { "texture": "#top" },
+ "north": { "texture": "#side" },
+ "south": { "texture": "#side" },
+ "west": { "texture": "#side" },
+ "east": { "texture": "#side" }
+ }
+ },
+ { "from": [ 14, 0, 2 ],
+ "to": [ 16, 3, 4 ],
+ "faces": {
+ "down": { "texture": "#bottom" },
+ "up": { "texture": "#top" },
+ "north": { "texture": "#side" },
+ "south": { "texture": "#side" },
+ "west": { "texture": "#side" },
+ "east": { "texture": "#side" }
+ }
+ },
+ { "from": [ 0, 0, 14 ],
+ "to": [ 4, 3, 16 ],
+ "faces": {
+ "down": { "texture": "#bottom" },
+ "up": { "texture": "#top" },
+ "north": { "texture": "#side" },
+ "south": { "texture": "#side" },
+ "west": { "texture": "#side" },
+ "east": { "texture": "#side" }
+ }
+ },
+ { "from": [ 0, 0, 12 ],
+ "to": [ 2, 3, 14 ],
+ "faces": {
+ "down": { "texture": "#bottom" },
+ "up": { "texture": "#top" },
+ "north": { "texture": "#side" },
+ "south": { "texture": "#side" },
+ "west": { "texture": "#side" },
+ "east": { "texture": "#side" }
+ }
+ },
+ { "from": [ 12, 0, 14 ],
+ "to": [ 16, 3, 16 ],
+ "faces": {
+ "down": { "texture": "#bottom" },
+ "up": { "texture": "#top" },
+ "north": { "texture": "#side" },
+ "south": { "texture": "#side" },
+ "west": { "texture": "#side" },
+ "east": { "texture": "#side" }
+ }
+ },
+ { "from": [ 14, 0, 12 ],
+ "to": [ 16, 3, 14 ],
+ "faces": {
+ "down": { "texture": "#bottom" },
+ "up": { "texture": "#top" },
+ "north": { "texture": "#side" },
+ "south": { "texture": "#side" },
+ "west": { "texture": "#side" },
+ "east": { "texture": "#side" }
+ }
+ },
+ { "from": [ 2, 9, 2 ],
+ "to": [ 14, 9, 14 ],
+ "faces": {
+ "up": { "texture": "#water" }
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/src/main/resources/assets/timetravelmod/models/block/temporalcauldron_level2.json b/src/main/resources/assets/timetravelmod/models/block/temporalcauldron_level2.json
new file mode 100644
index 0000000..4f320cc
--- /dev/null
+++ b/src/main/resources/assets/timetravelmod/models/block/temporalcauldron_level2.json
@@ -0,0 +1,162 @@
+{
+ "ambientocclusion": false,
+ "textures": {
+ "particle": "block/cauldron_side",
+ "top": "block/cauldron_top",
+ "bottom": "block/cauldron_bottom",
+ "side": "block/cauldron_side",
+ "inside": "block/cauldron_inner",
+ "water": "timetravelmod:blocks/timefluid_still"
+ },
+ "elements": [
+ { "from": [ 0, 3, 0 ],
+ "to": [ 2, 16, 16 ],
+ "faces": {
+ "down": { "texture": "#inside" },
+ "up": { "texture": "#top", "cullface": "up" },
+ "north": { "texture": "#side", "cullface": "north" },
+ "south": { "texture": "#side", "cullface": "south" },
+ "west": { "texture": "#side", "cullface": "west" },
+ "east": { "texture": "#side" }
+ }
+ },
+ { "from": [ 2, 3, 2 ],
+ "to": [ 14, 4, 14 ],
+ "faces": {
+ "down": { "texture": "#inside" },
+ "up": { "texture": "#inside", "cullface": "up" },
+ "north": { "texture": "#side", "cullface": "north" },
+ "south": { "texture": "#side", "cullface": "south" },
+ "west": { "texture": "#side", "cullface": "west" },
+ "east": { "texture": "#side", "cullface": "east" }
+ }
+ },
+ { "from": [ 14, 3, 0 ],
+ "to": [ 16, 16, 16 ],
+ "faces": {
+ "down": { "texture": "#inside" },
+ "up": { "texture": "#top", "cullface": "up" },
+ "north": { "texture": "#side", "cullface": "north" },
+ "south": { "texture": "#side", "cullface": "south" },
+ "west": { "texture": "#side" },
+ "east": { "texture": "#side", "cullface": "east" }
+ }
+ },
+ { "from": [ 2, 3, 0 ],
+ "to": [ 14, 16, 2 ],
+ "faces": {
+ "down": { "texture": "#inside" },
+ "up": { "texture": "#top", "cullface": "up" },
+ "north": { "texture": "#side", "cullface": "north" },
+ "south": { "texture": "#side" },
+ "west": { "texture": "#side", "cullface": "west" },
+ "east": { "texture": "#side", "cullface": "east" }
+ }
+ },
+ { "from": [ 2, 3, 14 ],
+ "to": [ 14, 16, 16 ],
+ "faces": {
+ "down": { "texture": "#inside" },
+ "up": { "texture": "#top", "cullface": "up" },
+ "north": { "texture": "#side" },
+ "south": { "texture": "#side", "cullface": "south" },
+ "west": { "texture": "#side", "cullface": "west" },
+ "east": { "texture": "#side", "cullface": "east" }
+ }
+ },
+ { "from": [ 0, 0, 0 ],
+ "to": [ 4, 3, 2 ],
+ "faces": {
+ "down": { "texture": "#bottom" },
+ "up": { "texture": "#top" },
+ "north": { "texture": "#side" },
+ "south": { "texture": "#side" },
+ "west": { "texture": "#side" },
+ "east": { "texture": "#side" }
+ }
+ },
+ { "from": [ 0, 0, 2 ],
+ "to": [ 2, 3, 4 ],
+ "faces": {
+ "down": { "texture": "#bottom" },
+ "up": { "texture": "#top" },
+ "north": { "texture": "#side" },
+ "south": { "texture": "#side" },
+ "west": { "texture": "#side" },
+ "east": { "texture": "#side" }
+ }
+ },
+ { "from": [ 12, 0, 0 ],
+ "to": [ 16, 3, 2 ],
+ "faces": {
+ "down": { "texture": "#bottom" },
+ "up": { "texture": "#top" },
+ "north": { "texture": "#side" },
+ "south": { "texture": "#side" },
+ "west": { "texture": "#side" },
+ "east": { "texture": "#side" }
+ }
+ },
+ { "from": [ 14, 0, 2 ],
+ "to": [ 16, 3, 4 ],
+ "faces": {
+ "down": { "texture": "#bottom" },
+ "up": { "texture": "#top" },
+ "north": { "texture": "#side" },
+ "south": { "texture": "#side" },
+ "west": { "texture": "#side" },
+ "east": { "texture": "#side" }
+ }
+ },
+ { "from": [ 0, 0, 14 ],
+ "to": [ 4, 3, 16 ],
+ "faces": {
+ "down": { "texture": "#bottom" },
+ "up": { "texture": "#top" },
+ "north": { "texture": "#side" },
+ "south": { "texture": "#side" },
+ "west": { "texture": "#side" },
+ "east": { "texture": "#side" }
+ }
+ },
+ { "from": [ 0, 0, 12 ],
+ "to": [ 2, 3, 14 ],
+ "faces": {
+ "down": { "texture": "#bottom" },
+ "up": { "texture": "#top" },
+ "north": { "texture": "#side" },
+ "south": { "texture": "#side" },
+ "west": { "texture": "#side" },
+ "east": { "texture": "#side" }
+ }
+ },
+ { "from": [ 12, 0, 14 ],
+ "to": [ 16, 3, 16 ],
+ "faces": {
+ "down": { "texture": "#bottom" },
+ "up": { "texture": "#top" },
+ "north": { "texture": "#side" },
+ "south": { "texture": "#side" },
+ "west": { "texture": "#side" },
+ "east": { "texture": "#side" }
+ }
+ },
+ { "from": [ 14, 0, 12 ],
+ "to": [ 16, 3, 14 ],
+ "faces": {
+ "down": { "texture": "#bottom" },
+ "up": { "texture": "#top" },
+ "north": { "texture": "#side" },
+ "south": { "texture": "#side" },
+ "west": { "texture": "#side" },
+ "east": { "texture": "#side" }
+ }
+ },
+ { "from": [ 2, 12, 2 ],
+ "to": [ 14, 12, 14 ],
+ "faces": {
+ "up": { "texture": "#water" }
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/src/main/resources/assets/timetravelmod/models/block/temporalcauldron_level3.json b/src/main/resources/assets/timetravelmod/models/block/temporalcauldron_level3.json
new file mode 100644
index 0000000..98e988d
--- /dev/null
+++ b/src/main/resources/assets/timetravelmod/models/block/temporalcauldron_level3.json
@@ -0,0 +1,162 @@
+{
+ "ambientocclusion": false,
+ "textures": {
+ "particle": "block/cauldron_side",
+ "top": "block/cauldron_top",
+ "bottom": "block/cauldron_bottom",
+ "side": "block/cauldron_side",
+ "inside": "block/cauldron_inner",
+ "water": "timetravelmod:blocks/timefluid_still"
+ },
+ "elements": [
+ { "from": [ 0, 3, 0 ],
+ "to": [ 2, 16, 16 ],
+ "faces": {
+ "down": { "texture": "#inside" },
+ "up": { "texture": "#top", "cullface": "up" },
+ "north": { "texture": "#side", "cullface": "north" },
+ "south": { "texture": "#side", "cullface": "south" },
+ "west": { "texture": "#side", "cullface": "west" },
+ "east": { "texture": "#side" }
+ }
+ },
+ { "from": [ 2, 3, 2 ],
+ "to": [ 14, 4, 14 ],
+ "faces": {
+ "down": { "texture": "#inside" },
+ "up": { "texture": "#inside", "cullface": "up" },
+ "north": { "texture": "#side", "cullface": "north" },
+ "south": { "texture": "#side", "cullface": "south" },
+ "west": { "texture": "#side", "cullface": "west" },
+ "east": { "texture": "#side", "cullface": "east" }
+ }
+ },
+ { "from": [ 14, 3, 0 ],
+ "to": [ 16, 16, 16 ],
+ "faces": {
+ "down": { "texture": "#inside" },
+ "up": { "texture": "#top", "cullface": "up" },
+ "north": { "texture": "#side", "cullface": "north" },
+ "south": { "texture": "#side", "cullface": "south" },
+ "west": { "texture": "#side" },
+ "east": { "texture": "#side", "cullface": "east" }
+ }
+ },
+ { "from": [ 2, 3, 0 ],
+ "to": [ 14, 16, 2 ],
+ "faces": {
+ "down": { "texture": "#inside" },
+ "up": { "texture": "#top", "cullface": "up" },
+ "north": { "texture": "#side", "cullface": "north" },
+ "south": { "texture": "#side" },
+ "west": { "texture": "#side", "cullface": "west" },
+ "east": { "texture": "#side", "cullface": "east" }
+ }
+ },
+ { "from": [ 2, 3, 14 ],
+ "to": [ 14, 16, 16 ],
+ "faces": {
+ "down": { "texture": "#inside" },
+ "up": { "texture": "#top", "cullface": "up" },
+ "north": { "texture": "#side" },
+ "south": { "texture": "#side", "cullface": "south" },
+ "west": { "texture": "#side", "cullface": "west" },
+ "east": { "texture": "#side", "cullface": "east" }
+ }
+ },
+ { "from": [ 0, 0, 0 ],
+ "to": [ 4, 3, 2 ],
+ "faces": {
+ "down": { "texture": "#bottom" },
+ "up": { "texture": "#top" },
+ "north": { "texture": "#side" },
+ "south": { "texture": "#side" },
+ "west": { "texture": "#side" },
+ "east": { "texture": "#side" }
+ }
+ },
+ { "from": [ 0, 0, 2 ],
+ "to": [ 2, 3, 4 ],
+ "faces": {
+ "down": { "texture": "#bottom" },
+ "up": { "texture": "#top" },
+ "north": { "texture": "#side" },
+ "south": { "texture": "#side" },
+ "west": { "texture": "#side" },
+ "east": { "texture": "#side" }
+ }
+ },
+ { "from": [ 12, 0, 0 ],
+ "to": [ 16, 3, 2 ],
+ "faces": {
+ "down": { "texture": "#bottom" },
+ "up": { "texture": "#top" },
+ "north": { "texture": "#side" },
+ "south": { "texture": "#side" },
+ "west": { "texture": "#side" },
+ "east": { "texture": "#side" }
+ }
+ },
+ { "from": [ 14, 0, 2 ],
+ "to": [ 16, 3, 4 ],
+ "faces": {
+ "down": { "texture": "#bottom" },
+ "up": { "texture": "#top" },
+ "north": { "texture": "#side" },
+ "south": { "texture": "#side" },
+ "west": { "texture": "#side" },
+ "east": { "texture": "#side" }
+ }
+ },
+ { "from": [ 0, 0, 14 ],
+ "to": [ 4, 3, 16 ],
+ "faces": {
+ "down": { "texture": "#bottom" },
+ "up": { "texture": "#top" },
+ "north": { "texture": "#side" },
+ "south": { "texture": "#side" },
+ "west": { "texture": "#side" },
+ "east": { "texture": "#side" }
+ }
+ },
+ { "from": [ 0, 0, 12 ],
+ "to": [ 2, 3, 14 ],
+ "faces": {
+ "down": { "texture": "#bottom" },
+ "up": { "texture": "#top" },
+ "north": { "texture": "#side" },
+ "south": { "texture": "#side" },
+ "west": { "texture": "#side" },
+ "east": { "texture": "#side" }
+ }
+ },
+ { "from": [ 12, 0, 14 ],
+ "to": [ 16, 3, 16 ],
+ "faces": {
+ "down": { "texture": "#bottom" },
+ "up": { "texture": "#top" },
+ "north": { "texture": "#side" },
+ "south": { "texture": "#side" },
+ "west": { "texture": "#side" },
+ "east": { "texture": "#side" }
+ }
+ },
+ { "from": [ 14, 0, 12 ],
+ "to": [ 16, 3, 14 ],
+ "faces": {
+ "down": { "texture": "#bottom" },
+ "up": { "texture": "#top" },
+ "north": { "texture": "#side" },
+ "south": { "texture": "#side" },
+ "west": { "texture": "#side" },
+ "east": { "texture": "#side" }
+ }
+ },
+ { "from": [ 2, 15, 2 ],
+ "to": [ 14, 15, 14 ],
+ "faces": {
+ "up": { "texture": "#water" }
+ }
+ }
+ ]
+}
\ No newline at end of file
diff --git a/src/main/resources/assets/timetravelmod/models/block/temporalexplosion.json b/src/main/resources/assets/timetravelmod/models/block/temporalexplosion.json
new file mode 100644
index 0000000..98372bd
--- /dev/null
+++ b/src/main/resources/assets/timetravelmod/models/block/temporalexplosion.json
@@ -0,0 +1,6 @@
+{
+ "parent": "block/cube_all",
+ "textures": {
+ "all": "minecraft:entity/end_portal"
+ }
+}
\ No newline at end of file
diff --git a/src/main/resources/assets/timetravelmod/models/block/timecrystalore.json b/src/main/resources/assets/timetravelmod/models/block/timecrystalore.json
new file mode 100644
index 0000000..d548111
--- /dev/null
+++ b/src/main/resources/assets/timetravelmod/models/block/timecrystalore.json
@@ -0,0 +1,6 @@
+{
+ "parent": "block/cube_all",
+ "textures": {
+ "all": "timetravelmod:blocks/timecrystalore"
+ }
+}
\ No newline at end of file
diff --git a/src/main/resources/assets/timetravelmod/models/block/timemachinebasicblock.json b/src/main/resources/assets/timetravelmod/models/block/timemachinebasicblock.json
new file mode 100644
index 0000000..080a0a8
--- /dev/null
+++ b/src/main/resources/assets/timetravelmod/models/block/timemachinebasicblock.json
@@ -0,0 +1,6 @@
+{
+ "parent": "block/cube_all",
+ "textures": {
+ "all": "timetravelmod:blocks/timemachine"
+ }
+}
\ No newline at end of file
diff --git a/src/main/resources/assets/timetravelmod/models/block/timemachinecontrolpanel.json b/src/main/resources/assets/timetravelmod/models/block/timemachinecontrolpanel.json
new file mode 100644
index 0000000..f8ba249
--- /dev/null
+++ b/src/main/resources/assets/timetravelmod/models/block/timemachinecontrolpanel.json
@@ -0,0 +1,8 @@
+{
+ "parent": "block/cube_column",
+ "textures": {
+ "side": "timetravelmod:blocks/timemachinecontrolpanel",
+ "end": "timetravelmod:blocks/timemachine",
+ "particle": "timetravelmod:blocks/timemachinecontrolpanel"
+ }
+}
\ No newline at end of file
diff --git a/src/main/resources/assets/timetravelmod/models/block/timemachinecore.json b/src/main/resources/assets/timetravelmod/models/block/timemachinecore.json
new file mode 100644
index 0000000..f4d0b67
--- /dev/null
+++ b/src/main/resources/assets/timetravelmod/models/block/timemachinecore.json
@@ -0,0 +1,12 @@
+{
+ "parent": "block/cube",
+ "textures": {
+ "up": "timetravelmod:blocks/timemachinecore",
+ "north": "timetravelmod:blocks/timemachine",
+ "south": "timetravelmod:blocks/timemachine",
+ "east": "timetravelmod:blocks/timemachine",
+ "west": "timetravelmod:blocks/timemachine",
+ "down": "timetravelmod:blocks/timemachine",
+ "particle": "timetravelmod:blocks/timemachinecore"
+ }
+}
\ No newline at end of file
diff --git a/src/main/resources/assets/timetravelmod/models/block/timemachinerecaller_ff.json b/src/main/resources/assets/timetravelmod/models/block/timemachinerecaller_ff.json
new file mode 100644
index 0000000..839262f
--- /dev/null
+++ b/src/main/resources/assets/timetravelmod/models/block/timemachinerecaller_ff.json
@@ -0,0 +1,6 @@
+{
+ "parent": "block/cube_all",
+ "textures": {
+ "all": "timetravelmod:blocks/timemachinerecaller_ff"
+ }
+}
\ No newline at end of file
diff --git a/src/main/resources/assets/timetravelmod/models/block/timemachinerecaller_ft.json b/src/main/resources/assets/timetravelmod/models/block/timemachinerecaller_ft.json
new file mode 100644
index 0000000..2a459c2
--- /dev/null
+++ b/src/main/resources/assets/timetravelmod/models/block/timemachinerecaller_ft.json
@@ -0,0 +1,6 @@
+{
+ "parent": "block/cube_all",
+ "textures": {
+ "all": "timetravelmod:blocks/timemachinerecaller_ft"
+ }
+}
\ No newline at end of file
diff --git a/src/main/resources/assets/timetravelmod/models/block/timemachinerecaller_tf.json b/src/main/resources/assets/timetravelmod/models/block/timemachinerecaller_tf.json
new file mode 100644
index 0000000..da90854
--- /dev/null
+++ b/src/main/resources/assets/timetravelmod/models/block/timemachinerecaller_tf.json
@@ -0,0 +1,6 @@
+{
+ "parent": "block/cube_all",
+ "textures": {
+ "all": "timetravelmod:blocks/timemachinerecaller_tf"
+ }
+}
\ No newline at end of file
diff --git a/src/main/resources/assets/timetravelmod/models/block/timemachinerecaller_tt.json b/src/main/resources/assets/timetravelmod/models/block/timemachinerecaller_tt.json
new file mode 100644
index 0000000..93c3527
--- /dev/null
+++ b/src/main/resources/assets/timetravelmod/models/block/timemachinerecaller_tt.json
@@ -0,0 +1,6 @@
+{
+ "parent": "block/cube_all",
+ "textures": {
+ "all": "timetravelmod:blocks/timemachinerecaller_tt"
+ }
+}
\ No newline at end of file
diff --git a/src/main/resources/assets/timetravelmod/models/block/timemachinetracker.json b/src/main/resources/assets/timetravelmod/models/block/timemachinetracker.json
new file mode 100644
index 0000000..19f642a
--- /dev/null
+++ b/src/main/resources/assets/timetravelmod/models/block/timemachinetracker.json
@@ -0,0 +1,6 @@
+{
+ "parent": "block/cube_all",
+ "textures": {
+ "all": "timetravelmod:blocks/timemachinetracker"
+ }
+}
\ No newline at end of file
diff --git a/src/main/resources/assets/timetravelmod/models/item/cauldron.json b/src/main/resources/assets/timetravelmod/models/item/cauldron.json
new file mode 100644
index 0000000..7a79329
--- /dev/null
+++ b/src/main/resources/assets/timetravelmod/models/item/cauldron.json
@@ -0,0 +1,19 @@
+{
+ "parent": "item/generated",
+ "textures": {
+ "layer0": "timetravelmod:items/cauldron"
+ },
+
+ "display": {
+ "thirdperson": {
+ "rotation": [-90, 0, 0],
+ "translation": [0, 1, -3],
+ "scale": [0.55, 0.55, 0.55]
+ },
+ "firstperson": {
+ "rotation": [0, -135, 25],
+ "translation": [0, 4, 2],
+ "scale": [1.7, 1.7, 1.7]
+ }
+ }
+}
diff --git a/src/main/resources/assets/timetravelmod/models/item/communicationscircuit.json b/src/main/resources/assets/timetravelmod/models/item/communicationscircuit.json
new file mode 100644
index 0000000..64b836b
--- /dev/null
+++ b/src/main/resources/assets/timetravelmod/models/item/communicationscircuit.json
@@ -0,0 +1,19 @@
+{
+ "parent": "item/generated",
+ "textures": {
+ "layer0": "timetravelmod:items/communicationscircuit"
+ },
+
+ "display": {
+ "thirdperson": {
+ "rotation": [-90, 0, 0],
+ "translation": [0, 1, -3],
+ "scale": [0.55, 0.55, 0.55]
+ },
+ "firstperson": {
+ "rotation": [0, -135, 25],
+ "translation": [0, 4, 2],
+ "scale": [1.7, 1.7, 1.7]
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/main/resources/assets/timetravelmod/models/item/controllercircuit.json b/src/main/resources/assets/timetravelmod/models/item/controllercircuit.json
new file mode 100644
index 0000000..33c7a67
--- /dev/null
+++ b/src/main/resources/assets/timetravelmod/models/item/controllercircuit.json
@@ -0,0 +1,19 @@
+{
+ "parent": "item/generated",
+ "textures": {
+ "layer0": "timetravelmod:items/controllercircuit"
+ },
+
+ "display": {
+ "thirdperson": {
+ "rotation": [-90, 0, 0],
+ "translation": [0, 1, -3],
+ "scale": [0.55, 0.55, 0.55]
+ },
+ "firstperson": {
+ "rotation": [0, -135, 25],
+ "translation": [0, 4, 2],
+ "scale": [1.7, 1.7, 1.7]
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/main/resources/assets/timetravelmod/models/item/creativetimemachine.json b/src/main/resources/assets/timetravelmod/models/item/creativetimemachine.json
new file mode 100644
index 0000000..e72c9aa
--- /dev/null
+++ b/src/main/resources/assets/timetravelmod/models/item/creativetimemachine.json
@@ -0,0 +1,19 @@
+{
+ "parent": "item/generated",
+ "textures": {
+ "layer0": "timetravelmod:items/creativetimemachine"
+ },
+
+ "display": {
+ "thirdperson": {
+ "rotation": [-90, 0, 0],
+ "translation": [0, 1, -3],
+ "scale": [0.55, 0.55, 0.55]
+ },
+ "firstperson": {
+ "rotation": [0, -135, 25],
+ "translation": [0, 4, 2],
+ "scale": [1.7, 1.7, 1.7]
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/main/resources/assets/timetravelmod/models/item/engineerbook.json b/src/main/resources/assets/timetravelmod/models/item/engineerbook.json
new file mode 100644
index 0000000..587ec09
--- /dev/null
+++ b/src/main/resources/assets/timetravelmod/models/item/engineerbook.json
@@ -0,0 +1,19 @@
+{
+ "parent": "item/generated",
+ "textures": {
+ "layer0": "minecraft:item/written_book"
+ },
+
+ "display": {
+ "thirdperson": {
+ "rotation": [-90, 0, 0],
+ "translation": [0, 1, -3],
+ "scale": [0.55, 0.55, 0.55]
+ },
+ "firstperson": {
+ "rotation": [0, -135, 25],
+ "translation": [0, 4, 2],
+ "scale": [1.7, 1.7, 1.7]
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/main/resources/assets/timetravelmod/models/item/gunpowderwire.json b/src/main/resources/assets/timetravelmod/models/item/gunpowderwire.json
new file mode 100644
index 0000000..694a632
--- /dev/null
+++ b/src/main/resources/assets/timetravelmod/models/item/gunpowderwire.json
@@ -0,0 +1,19 @@
+{
+ "parent": "item/generated",
+ "textures": {
+ "layer0": "timetravelmod:items/gunpowderwire"
+ },
+
+ "display": {
+ "thirdperson": {
+ "rotation": [-90, 0, 0],
+ "translation": [0, 1, -3],
+ "scale": [0.55, 0.55, 0.55]
+ },
+ "firstperson": {
+ "rotation": [0, -135, 25],
+ "translation": [0, 4, 2],
+ "scale": [1.7, 1.7, 1.7]
+ }
+ }
+}
diff --git a/src/main/resources/assets/timetravelmod/models/item/heavyblock.json b/src/main/resources/assets/timetravelmod/models/item/heavyblock.json
new file mode 100644
index 0000000..215e019
--- /dev/null
+++ b/src/main/resources/assets/timetravelmod/models/item/heavyblock.json
@@ -0,0 +1,3 @@
+{
+ "parent": "timetravelmod:block/heavyblock"
+}
\ No newline at end of file
diff --git a/src/main/resources/assets/timetravelmod/models/item/heavyingot.json b/src/main/resources/assets/timetravelmod/models/item/heavyingot.json
new file mode 100644
index 0000000..dd9f281
--- /dev/null
+++ b/src/main/resources/assets/timetravelmod/models/item/heavyingot.json
@@ -0,0 +1,19 @@
+{
+ "parent": "item/generated",
+ "textures": {
+ "layer0": "timetravelmod:items/heavyingot"
+ },
+
+ "display": {
+ "thirdperson": {
+ "rotation": [-90, 0, 0],
+ "translation": [0, 1, -3],
+ "scale": [0.55, 0.55, 0.55]
+ },
+ "firstperson": {
+ "rotation": [0, -135, 25],
+ "translation": [0, 4, 2],
+ "scale": [1.7, 1.7, 1.7]
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/main/resources/assets/timetravelmod/models/item/reinforcedheavyblock.json b/src/main/resources/assets/timetravelmod/models/item/reinforcedheavyblock.json
new file mode 100644
index 0000000..5ab81fc
--- /dev/null
+++ b/src/main/resources/assets/timetravelmod/models/item/reinforcedheavyblock.json
@@ -0,0 +1,3 @@
+{
+ "parent": "timetravelmod:block/reinforcedheavyblock"
+}
\ No newline at end of file
diff --git a/src/main/resources/assets/timetravelmod/models/item/temporalcauldron.json b/src/main/resources/assets/timetravelmod/models/item/temporalcauldron.json
new file mode 100644
index 0000000..5ffb906
--- /dev/null
+++ b/src/main/resources/assets/timetravelmod/models/item/temporalcauldron.json
@@ -0,0 +1,19 @@
+{
+ "parent": "item/generated",
+ "textures": {
+ "layer0": "timetravelmod:items/temporalcauldron"
+ },
+
+ "display": {
+ "thirdperson": {
+ "rotation": [-90, 0, 0],
+ "translation": [0, 1, -3],
+ "scale": [0.55, 0.55, 0.55]
+ },
+ "firstperson": {
+ "rotation": [0, -135, 25],
+ "translation": [0, 4, 2],
+ "scale": [1.7, 1.7, 1.7]
+ }
+ }
+}
diff --git a/src/main/resources/assets/timetravelmod/models/item/temporalexplosion.json b/src/main/resources/assets/timetravelmod/models/item/temporalexplosion.json
new file mode 100644
index 0000000..3aba0e3
--- /dev/null
+++ b/src/main/resources/assets/timetravelmod/models/item/temporalexplosion.json
@@ -0,0 +1,3 @@
+{
+ "parent": "timetravelmod:block/temporalexplosion"
+}
\ No newline at end of file
diff --git a/src/main/resources/assets/timetravelmod/models/item/timecrystal.json b/src/main/resources/assets/timetravelmod/models/item/timecrystal.json
new file mode 100644
index 0000000..9ffdbb8
--- /dev/null
+++ b/src/main/resources/assets/timetravelmod/models/item/timecrystal.json
@@ -0,0 +1,19 @@
+{
+ "parent": "item/generated",
+ "textures": {
+ "layer0": "timetravelmod:items/timecrystal"
+ },
+
+ "display": {
+ "thirdperson": {
+ "rotation": [-90, 0, 0],
+ "translation": [0, 1, -3],
+ "scale": [0.55, 0.55, 0.55]
+ },
+ "firstperson": {
+ "rotation": [0, -135, 25],
+ "translation": [0, 4, 2],
+ "scale": [1.7, 1.7, 1.7]
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/main/resources/assets/timetravelmod/models/item/timecrystalore.json b/src/main/resources/assets/timetravelmod/models/item/timecrystalore.json
new file mode 100644
index 0000000..edae34b
--- /dev/null
+++ b/src/main/resources/assets/timetravelmod/models/item/timecrystalore.json
@@ -0,0 +1,3 @@
+{
+ "parent": "timetravelmod:block/timecrystalore"
+}
\ No newline at end of file
diff --git a/src/main/resources/assets/timetravelmod/models/item/timemachinebasicblock.json b/src/main/resources/assets/timetravelmod/models/item/timemachinebasicblock.json
new file mode 100644
index 0000000..7bb7b17
--- /dev/null
+++ b/src/main/resources/assets/timetravelmod/models/item/timemachinebasicblock.json
@@ -0,0 +1,3 @@
+{
+ "parent": "timetravelmod:block/timemachinebasicblock"
+}
\ No newline at end of file
diff --git a/src/main/resources/assets/timetravelmod/models/item/timemachinecontrolpanel.json b/src/main/resources/assets/timetravelmod/models/item/timemachinecontrolpanel.json
new file mode 100644
index 0000000..c74c0c1
--- /dev/null
+++ b/src/main/resources/assets/timetravelmod/models/item/timemachinecontrolpanel.json
@@ -0,0 +1,3 @@
+{
+ "parent": "timetravelmod:block/timemachinecontrolpanel"
+}
\ No newline at end of file
diff --git a/src/main/resources/assets/timetravelmod/models/item/timemachinecore.json b/src/main/resources/assets/timetravelmod/models/item/timemachinecore.json
new file mode 100644
index 0000000..de266d8
--- /dev/null
+++ b/src/main/resources/assets/timetravelmod/models/item/timemachinecore.json
@@ -0,0 +1,3 @@
+{
+ "parent": "timetravelmod:block/timemachinecore"
+}
\ No newline at end of file
diff --git a/src/main/resources/assets/timetravelmod/models/item/timemachinerecaller.json b/src/main/resources/assets/timetravelmod/models/item/timemachinerecaller.json
new file mode 100644
index 0000000..19387dd
--- /dev/null
+++ b/src/main/resources/assets/timetravelmod/models/item/timemachinerecaller.json
@@ -0,0 +1,3 @@
+{
+ "parent": "timetravelmod:block/timemachinerecaller_ff"
+}
\ No newline at end of file
diff --git a/src/main/resources/assets/timetravelmod/models/item/timemachinetracker.json b/src/main/resources/assets/timetravelmod/models/item/timemachinetracker.json
new file mode 100644
index 0000000..58db296
--- /dev/null
+++ b/src/main/resources/assets/timetravelmod/models/item/timemachinetracker.json
@@ -0,0 +1,3 @@
+{
+ "parent": "timetravelmod:block/timemachinetracker"
+}
\ No newline at end of file
diff --git a/src/main/resources/assets/timetravelmod/sounds.json b/src/main/resources/assets/timetravelmod/sounds.json
new file mode 100644
index 0000000..7cfaa42
--- /dev/null
+++ b/src/main/resources/assets/timetravelmod/sounds.json
@@ -0,0 +1,22 @@
+{
+ "oldwest_music": {
+ "category": "music",
+ "sounds": [
+ {
+ "name": "timetravelmod:oldwest/music0",
+ "stream": true,
+ "volume":0.5
+ },
+ {
+ "name": "timetravelmod:oldwest/music1",
+ "stream": true,
+ "volume": 0.5
+ },
+ {
+ "name": "timetravelmod:oldwest/music2",
+ "stream": true,
+ "volume": 0.5
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/src/main/resources/assets/timetravelmod/sounds/oldwest/music0.ogg b/src/main/resources/assets/timetravelmod/sounds/oldwest/music0.ogg
new file mode 100644
index 0000000..f063ab0
Binary files /dev/null and b/src/main/resources/assets/timetravelmod/sounds/oldwest/music0.ogg differ
diff --git a/src/main/resources/assets/timetravelmod/sounds/oldwest/music1.ogg b/src/main/resources/assets/timetravelmod/sounds/oldwest/music1.ogg
new file mode 100644
index 0000000..8c7dd39
Binary files /dev/null and b/src/main/resources/assets/timetravelmod/sounds/oldwest/music1.ogg differ
diff --git a/src/main/resources/assets/timetravelmod/sounds/oldwest/music2.ogg b/src/main/resources/assets/timetravelmod/sounds/oldwest/music2.ogg
new file mode 100644
index 0000000..b966636
Binary files /dev/null and b/src/main/resources/assets/timetravelmod/sounds/oldwest/music2.ogg differ
diff --git a/src/main/resources/assets/timetravelmod/textures/blocks/heavyblock.png b/src/main/resources/assets/timetravelmod/textures/blocks/heavyblock.png
new file mode 100644
index 0000000..aaa3b7a
Binary files /dev/null and b/src/main/resources/assets/timetravelmod/textures/blocks/heavyblock.png differ
diff --git a/src/main/resources/assets/timetravelmod/textures/blocks/reinforcedheavyblock.png b/src/main/resources/assets/timetravelmod/textures/blocks/reinforcedheavyblock.png
new file mode 100644
index 0000000..9c03442
Binary files /dev/null and b/src/main/resources/assets/timetravelmod/textures/blocks/reinforcedheavyblock.png differ
diff --git a/src/main/resources/assets/timetravelmod/textures/blocks/timecrystalore.png b/src/main/resources/assets/timetravelmod/textures/blocks/timecrystalore.png
new file mode 100644
index 0000000..07e937d
Binary files /dev/null and b/src/main/resources/assets/timetravelmod/textures/blocks/timecrystalore.png differ
diff --git a/src/main/resources/assets/timetravelmod/textures/blocks/timefluid_still.png b/src/main/resources/assets/timetravelmod/textures/blocks/timefluid_still.png
new file mode 100644
index 0000000..6229b0d
Binary files /dev/null and b/src/main/resources/assets/timetravelmod/textures/blocks/timefluid_still.png differ
diff --git a/src/main/resources/assets/timetravelmod/textures/blocks/timefluid_still.png.mcmeta b/src/main/resources/assets/timetravelmod/textures/blocks/timefluid_still.png.mcmeta
new file mode 100644
index 0000000..0645f48
--- /dev/null
+++ b/src/main/resources/assets/timetravelmod/textures/blocks/timefluid_still.png.mcmeta
@@ -0,0 +1,5 @@
+{
+ "animation": {
+ "frametime": 2
+ }
+}
diff --git a/src/main/resources/assets/timetravelmod/textures/blocks/timemachine.png b/src/main/resources/assets/timetravelmod/textures/blocks/timemachine.png
new file mode 100644
index 0000000..bfb925f
Binary files /dev/null and b/src/main/resources/assets/timetravelmod/textures/blocks/timemachine.png differ
diff --git a/src/main/resources/assets/timetravelmod/textures/blocks/timemachinecontrolpanel.png b/src/main/resources/assets/timetravelmod/textures/blocks/timemachinecontrolpanel.png
new file mode 100644
index 0000000..0110323
Binary files /dev/null and b/src/main/resources/assets/timetravelmod/textures/blocks/timemachinecontrolpanel.png differ
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 0000000..1c4b16b
Binary files /dev/null and b/src/main/resources/assets/timetravelmod/textures/blocks/timemachinecore.png differ
diff --git a/src/main/resources/assets/timetravelmod/textures/blocks/timemachinerecaller_ff.png b/src/main/resources/assets/timetravelmod/textures/blocks/timemachinerecaller_ff.png
new file mode 100644
index 0000000..9b59798
Binary files /dev/null and b/src/main/resources/assets/timetravelmod/textures/blocks/timemachinerecaller_ff.png differ
diff --git a/src/main/resources/assets/timetravelmod/textures/blocks/timemachinerecaller_ft.png b/src/main/resources/assets/timetravelmod/textures/blocks/timemachinerecaller_ft.png
new file mode 100644
index 0000000..0aa1e3d
Binary files /dev/null and b/src/main/resources/assets/timetravelmod/textures/blocks/timemachinerecaller_ft.png differ
diff --git a/src/main/resources/assets/timetravelmod/textures/blocks/timemachinerecaller_tf.png b/src/main/resources/assets/timetravelmod/textures/blocks/timemachinerecaller_tf.png
new file mode 100644
index 0000000..b8738aa
Binary files /dev/null and b/src/main/resources/assets/timetravelmod/textures/blocks/timemachinerecaller_tf.png differ
diff --git a/src/main/resources/assets/timetravelmod/textures/blocks/timemachinerecaller_tt.png b/src/main/resources/assets/timetravelmod/textures/blocks/timemachinerecaller_tt.png
new file mode 100644
index 0000000..8cf1b7b
Binary files /dev/null and b/src/main/resources/assets/timetravelmod/textures/blocks/timemachinerecaller_tt.png differ
diff --git a/src/main/resources/assets/timetravelmod/textures/blocks/timemachinetracker.png b/src/main/resources/assets/timetravelmod/textures/blocks/timemachinetracker.png
new file mode 100644
index 0000000..9b768ac
Binary files /dev/null and b/src/main/resources/assets/timetravelmod/textures/blocks/timemachinetracker.png differ
diff --git a/src/main/resources/assets/timetravelmod/textures/items/cauldron.png b/src/main/resources/assets/timetravelmod/textures/items/cauldron.png
new file mode 100644
index 0000000..3d62e57
Binary files /dev/null and b/src/main/resources/assets/timetravelmod/textures/items/cauldron.png differ
diff --git a/src/main/resources/assets/timetravelmod/textures/items/communicationscircuit.png b/src/main/resources/assets/timetravelmod/textures/items/communicationscircuit.png
new file mode 100644
index 0000000..174829b
Binary files /dev/null and b/src/main/resources/assets/timetravelmod/textures/items/communicationscircuit.png differ
diff --git a/src/main/resources/assets/timetravelmod/textures/items/controllercircuit.png b/src/main/resources/assets/timetravelmod/textures/items/controllercircuit.png
new file mode 100644
index 0000000..26a13d8
Binary files /dev/null and b/src/main/resources/assets/timetravelmod/textures/items/controllercircuit.png differ
diff --git a/src/main/resources/assets/timetravelmod/textures/items/creativetimemachine.png b/src/main/resources/assets/timetravelmod/textures/items/creativetimemachine.png
new file mode 100644
index 0000000..68ade61
Binary files /dev/null and b/src/main/resources/assets/timetravelmod/textures/items/creativetimemachine.png differ
diff --git a/src/main/resources/assets/timetravelmod/textures/items/gunpowderwire.png b/src/main/resources/assets/timetravelmod/textures/items/gunpowderwire.png
new file mode 100644
index 0000000..1f64a6f
Binary files /dev/null and b/src/main/resources/assets/timetravelmod/textures/items/gunpowderwire.png differ
diff --git a/src/main/resources/assets/timetravelmod/textures/items/heavyingot.png b/src/main/resources/assets/timetravelmod/textures/items/heavyingot.png
new file mode 100644
index 0000000..e86df9b
Binary files /dev/null and b/src/main/resources/assets/timetravelmod/textures/items/heavyingot.png differ
diff --git a/src/main/resources/assets/timetravelmod/textures/items/temporalcauldron.png b/src/main/resources/assets/timetravelmod/textures/items/temporalcauldron.png
new file mode 100644
index 0000000..6fbe9a3
Binary files /dev/null and b/src/main/resources/assets/timetravelmod/textures/items/temporalcauldron.png differ
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 0000000..3ccfb88
Binary files /dev/null and b/src/main/resources/assets/timetravelmod/textures/items/timecrystal.png differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/desert_lamp_1.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/desert_lamp_1.nbt
new file mode 100644
index 0000000..97dc05e
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/desert_lamp_1.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_animal_pen_1.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_animal_pen_1.nbt
new file mode 100644
index 0000000..32540d9
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_animal_pen_1.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_animal_pen_2.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_animal_pen_2.nbt
new file mode 100644
index 0000000..7d8a221
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_animal_pen_2.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_armorer_1.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_armorer_1.nbt
new file mode 100644
index 0000000..6535fd8
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_armorer_1.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_butcher_shop_1.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_butcher_shop_1.nbt
new file mode 100644
index 0000000..c550f4f
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_butcher_shop_1.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_cartographer_house_1.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_cartographer_house_1.nbt
new file mode 100644
index 0000000..f867913
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_cartographer_house_1.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_farm_1.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_farm_1.nbt
new file mode 100644
index 0000000..a1f07fe
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_farm_1.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_farm_2.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_farm_2.nbt
new file mode 100644
index 0000000..b0f9c17
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_farm_2.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_fisher_1.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_fisher_1.nbt
new file mode 100644
index 0000000..e535878
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_fisher_1.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_fletcher_house_1.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_fletcher_house_1.nbt
new file mode 100644
index 0000000..a6b7709
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_fletcher_house_1.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_large_farm_1.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_large_farm_1.nbt
new file mode 100644
index 0000000..d66ba50
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_large_farm_1.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_library_1.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_library_1.nbt
new file mode 100644
index 0000000..c8cba40
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_library_1.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_mason_1.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_mason_1.nbt
new file mode 100644
index 0000000..206e55f
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_mason_1.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_medium_house_1.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_medium_house_1.nbt
new file mode 100644
index 0000000..640ec14
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_medium_house_1.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_medium_house_2.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_medium_house_2.nbt
new file mode 100644
index 0000000..d9651e2
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_medium_house_2.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_shepherd_house_1.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_shepherd_house_1.nbt
new file mode 100644
index 0000000..aacf864
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_shepherd_house_1.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_small_house_1.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_small_house_1.nbt
new file mode 100644
index 0000000..3a6f040
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_small_house_1.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_small_house_2.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_small_house_2.nbt
new file mode 100644
index 0000000..5632dfe
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_small_house_2.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_small_house_3.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_small_house_3.nbt
new file mode 100644
index 0000000..a996fd5
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_small_house_3.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_small_house_4.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_small_house_4.nbt
new file mode 100644
index 0000000..cc22a0a
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_small_house_4.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_small_house_5.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_small_house_5.nbt
new file mode 100644
index 0000000..7bed380
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_small_house_5.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_small_house_6.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_small_house_6.nbt
new file mode 100644
index 0000000..6683fb2
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_small_house_6.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_small_house_7.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_small_house_7.nbt
new file mode 100644
index 0000000..fd57151
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_small_house_7.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_small_house_8.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_small_house_8.nbt
new file mode 100644
index 0000000..f847c15
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_small_house_8.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_tannery_1.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_tannery_1.nbt
new file mode 100644
index 0000000..5eaa9d8
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_tannery_1.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_temple_1.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_temple_1.nbt
new file mode 100644
index 0000000..a8c5660
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_temple_1.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_temple_2.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_temple_2.nbt
new file mode 100644
index 0000000..f7dffd8
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_temple_2.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_tool_smith_1.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_tool_smith_1.nbt
new file mode 100644
index 0000000..f862de8
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_tool_smith_1.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_weaponsmith_1.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_weaponsmith_1.nbt
new file mode 100644
index 0000000..e55aca4
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/houses/desert_weaponsmith_1.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/streets/corner_01.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/streets/corner_01.nbt
new file mode 100644
index 0000000..316c97c
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/streets/corner_01.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/streets/corner_02.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/streets/corner_02.nbt
new file mode 100644
index 0000000..1c840f5
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/streets/corner_02.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/streets/crossroad_01.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/streets/crossroad_01.nbt
new file mode 100644
index 0000000..24b5c44
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/streets/crossroad_01.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/streets/crossroad_02.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/streets/crossroad_02.nbt
new file mode 100644
index 0000000..8dd74f1
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/streets/crossroad_02.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/streets/crossroad_03.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/streets/crossroad_03.nbt
new file mode 100644
index 0000000..2ead895
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/streets/crossroad_03.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/streets/square_01.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/streets/square_01.nbt
new file mode 100644
index 0000000..4c529bc
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/streets/square_01.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/streets/square_02.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/streets/square_02.nbt
new file mode 100644
index 0000000..9e7f931
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/streets/square_02.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/streets/straight_01.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/streets/straight_01.nbt
new file mode 100644
index 0000000..a0e1c4a
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/streets/straight_01.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/streets/straight_02.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/streets/straight_02.nbt
new file mode 100644
index 0000000..d02fdbd
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/streets/straight_02.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/streets/straight_03.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/streets/straight_03.nbt
new file mode 100644
index 0000000..8e1afb1
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/streets/straight_03.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/streets/turn_01.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/streets/turn_01.nbt
new file mode 100644
index 0000000..33e77e4
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/streets/turn_01.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/terminators/terminator_01.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/terminators/terminator_01.nbt
new file mode 100644
index 0000000..024589b
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/terminators/terminator_01.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/terminators/terminator_02.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/terminators/terminator_02.nbt
new file mode 100644
index 0000000..938b5f3
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/terminators/terminator_02.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/town_centers/desert_meeting_point_1.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/town_centers/desert_meeting_point_1.nbt
new file mode 100644
index 0000000..9225d6d
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/town_centers/desert_meeting_point_1.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/town_centers/desert_meeting_point_2.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/town_centers/desert_meeting_point_2.nbt
new file mode 100644
index 0000000..0bde0c0
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/town_centers/desert_meeting_point_2.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/town_centers/desert_meeting_point_3.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/town_centers/desert_meeting_point_3.nbt
new file mode 100644
index 0000000..b34aaad
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/town_centers/desert_meeting_point_3.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/villagers/baby.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/villagers/baby.nbt
new file mode 100644
index 0000000..560c9ad
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/villagers/baby.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/villagers/nitwit.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/villagers/nitwit.nbt
new file mode 100644
index 0000000..e64a4ff
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/villagers/nitwit.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/villagers/unemployed.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/villagers/unemployed.nbt
new file mode 100644
index 0000000..e993f03
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/villagers/unemployed.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/zombie/houses/desert_medium_house_1.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/zombie/houses/desert_medium_house_1.nbt
new file mode 100644
index 0000000..9e4d511
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/zombie/houses/desert_medium_house_1.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/zombie/houses/desert_medium_house_2.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/zombie/houses/desert_medium_house_2.nbt
new file mode 100644
index 0000000..209b991
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/zombie/houses/desert_medium_house_2.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/zombie/houses/desert_small_house_1.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/zombie/houses/desert_small_house_1.nbt
new file mode 100644
index 0000000..4ab0705
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/zombie/houses/desert_small_house_1.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/zombie/houses/desert_small_house_2.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/zombie/houses/desert_small_house_2.nbt
new file mode 100644
index 0000000..c936101
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/zombie/houses/desert_small_house_2.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/zombie/houses/desert_small_house_3.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/zombie/houses/desert_small_house_3.nbt
new file mode 100644
index 0000000..99adc85
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/zombie/houses/desert_small_house_3.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/zombie/houses/desert_small_house_4.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/zombie/houses/desert_small_house_4.nbt
new file mode 100644
index 0000000..e182669
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/zombie/houses/desert_small_house_4.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/zombie/houses/desert_small_house_5.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/zombie/houses/desert_small_house_5.nbt
new file mode 100644
index 0000000..655b579
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/zombie/houses/desert_small_house_5.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/zombie/houses/desert_small_house_6.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/zombie/houses/desert_small_house_6.nbt
new file mode 100644
index 0000000..e3a17f4
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/zombie/houses/desert_small_house_6.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/zombie/houses/desert_small_house_7.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/zombie/houses/desert_small_house_7.nbt
new file mode 100644
index 0000000..a66447c
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/zombie/houses/desert_small_house_7.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/zombie/houses/desert_small_house_8.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/zombie/houses/desert_small_house_8.nbt
new file mode 100644
index 0000000..94fce51
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/zombie/houses/desert_small_house_8.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/zombie/streets/corner_01.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/zombie/streets/corner_01.nbt
new file mode 100644
index 0000000..3735177
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/zombie/streets/corner_01.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/zombie/streets/corner_02.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/zombie/streets/corner_02.nbt
new file mode 100644
index 0000000..bf0a7bd
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/zombie/streets/corner_02.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/zombie/streets/crossroad_01.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/zombie/streets/crossroad_01.nbt
new file mode 100644
index 0000000..560ebcf
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/zombie/streets/crossroad_01.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/zombie/streets/crossroad_02.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/zombie/streets/crossroad_02.nbt
new file mode 100644
index 0000000..dc7116a
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/zombie/streets/crossroad_02.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/zombie/streets/crossroad_03.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/zombie/streets/crossroad_03.nbt
new file mode 100644
index 0000000..1500a75
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/zombie/streets/crossroad_03.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/zombie/streets/square_01.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/zombie/streets/square_01.nbt
new file mode 100644
index 0000000..1a6ab9c
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/zombie/streets/square_01.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/zombie/streets/square_02.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/zombie/streets/square_02.nbt
new file mode 100644
index 0000000..ba0cd9f
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/zombie/streets/square_02.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/zombie/streets/straight_01.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/zombie/streets/straight_01.nbt
new file mode 100644
index 0000000..c3a52dc
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/zombie/streets/straight_01.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/zombie/streets/straight_02.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/zombie/streets/straight_02.nbt
new file mode 100644
index 0000000..eb4c2ae
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/zombie/streets/straight_02.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/zombie/streets/straight_03.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/zombie/streets/straight_03.nbt
new file mode 100644
index 0000000..5878c8a
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/zombie/streets/straight_03.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/zombie/streets/turn_01.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/zombie/streets/turn_01.nbt
new file mode 100644
index 0000000..0bba42b
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/zombie/streets/turn_01.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/zombie/terminators/terminator_02.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/zombie/terminators/terminator_02.nbt
new file mode 100644
index 0000000..0e84e48
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/zombie/terminators/terminator_02.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/zombie/town_centers/desert_meeting_point_1.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/zombie/town_centers/desert_meeting_point_1.nbt
new file mode 100644
index 0000000..01298ca
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/zombie/town_centers/desert_meeting_point_1.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/zombie/town_centers/desert_meeting_point_2.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/zombie/town_centers/desert_meeting_point_2.nbt
new file mode 100644
index 0000000..9071575
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/zombie/town_centers/desert_meeting_point_2.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/zombie/town_centers/desert_meeting_point_3.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/zombie/town_centers/desert_meeting_point_3.nbt
new file mode 100644
index 0000000..4a38f47
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/zombie/town_centers/desert_meeting_point_3.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/zombie/villagers/nitwit.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/zombie/villagers/nitwit.nbt
new file mode 100644
index 0000000..fb4824c
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/zombie/villagers/nitwit.nbt differ
diff --git a/src/main/resources/data/minecraft/structures/village/oldwest/zombie/villagers/unemployed.nbt b/src/main/resources/data/minecraft/structures/village/oldwest/zombie/villagers/unemployed.nbt
new file mode 100644
index 0000000..82109bc
Binary files /dev/null and b/src/main/resources/data/minecraft/structures/village/oldwest/zombie/villagers/unemployed.nbt differ
diff --git a/src/main/resources/data/timetravelmod/advancements/timetraveling/better_than_mending.json b/src/main/resources/data/timetravelmod/advancements/timetraveling/better_than_mending.json
new file mode 100644
index 0000000..8734eab
--- /dev/null
+++ b/src/main/resources/data/timetravelmod/advancements/timetraveling/better_than_mending.json
@@ -0,0 +1,20 @@
+{
+ "display": {
+ "icon": {
+ "item": "timetravelmod:temporalcauldron"
+ },
+ "title": {
+ "translate": "advancements.timetraveling.better_than_mending.title"
+ },
+ "description": {
+ "translate": "advancements.timetraveling.better_than_mending.description"
+ }
+ },
+ "parent": "timetravelmod:timetraveling/not_diamonds",
+ "criteria": {
+ "use": {
+ "trigger": "timetravelmod:better_than_mending",
+ "conditions": {}
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/main/resources/data/timetravelmod/advancements/timetraveling/doesnt_look_good.json b/src/main/resources/data/timetravelmod/advancements/timetraveling/doesnt_look_good.json
new file mode 100644
index 0000000..8973b66
--- /dev/null
+++ b/src/main/resources/data/timetravelmod/advancements/timetraveling/doesnt_look_good.json
@@ -0,0 +1,21 @@
+{
+ "display": {
+ "icon": {
+ "item": "timetravelmod:temporalexplosion"
+ },
+ "title": {
+ "translate": "advancements.timetraveling.doesnt_look_good.title"
+ },
+ "description": {
+ "translate": "advancements.timetraveling.doesnt_look_good.description"
+ },
+ "hidden": true
+ },
+ "parent": "timetravelmod:timetraveling/timemachine",
+ "criteria": {
+ "explode": {
+ "trigger": "timetravelmod:temporal_explosion",
+ "conditions": {}
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/main/resources/data/timetravelmod/advancements/timetraveling/not_diamonds.json b/src/main/resources/data/timetravelmod/advancements/timetraveling/not_diamonds.json
new file mode 100644
index 0000000..f7e18f8
--- /dev/null
+++ b/src/main/resources/data/timetravelmod/advancements/timetraveling/not_diamonds.json
@@ -0,0 +1,39 @@
+{
+ "display": {
+ "icon": {
+ "item": "timetravelmod:timecrystalore"
+ },
+ "title": {
+ "translate": "advancements.timetraveling.not_diamonds.title"
+ },
+ "description": {
+ "translate": "advancements.timetraveling.not_diamonds.description"
+ }
+ },
+ "parent": "timetravelmod:timetraveling/root",
+ "criteria": {
+ "smeltcrystal": {
+ "trigger": "minecraft:inventory_changed",
+ "conditions": {
+ "items": [
+ {
+ "item": "timetravelmod:timecrystalore"
+ }
+ ]
+ }
+ }
+ },
+ "rewards": {
+ "recipes": [
+ "timetravelmod:timecrystal",
+ "timetravelmod:timemachinebasicblock",
+ "timetravelmod:timemachinecontrolpanel",
+ "timetravelmod:timemachinecore",
+ "timetravelmod:controllercircuit",
+ "timetravelmod:controllercircuit_b",
+ "timetravelmod:temporalcauldron",
+ "timetravelmod:temporalcauldron_b",
+ "timetravelmod:engineerbook"
+ ]
+ }
+}
\ No newline at end of file
diff --git a/src/main/resources/data/timetravelmod/advancements/timetraveling/root.json b/src/main/resources/data/timetravelmod/advancements/timetraveling/root.json
new file mode 100644
index 0000000..e36a290
--- /dev/null
+++ b/src/main/resources/data/timetravelmod/advancements/timetraveling/root.json
@@ -0,0 +1,28 @@
+{
+ "display": {
+ "icon": {
+ "item": "timetravelmod:timecrystal"
+ },
+ "title": {
+ "translate": "advancements.timetraveling.root.title"
+ },
+ "description": {
+ "translate": "advancements.timetraveling.root.description"
+ },
+ "background": "timetravelmod:textures/blocks/timemachine.png",
+ "show_toast": false,
+ "announce_to_chat": false
+ },
+ "criteria": {
+ "smeltcrystal": {
+ "trigger": "minecraft:inventory_changed",
+ "conditions": {
+ "items": [
+ {
+ "item": "timetravelmod:timecrystalore"
+ }
+ ]
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/main/resources/data/timetravelmod/advancements/timetraveling/timemachine.json b/src/main/resources/data/timetravelmod/advancements/timetraveling/timemachine.json
new file mode 100644
index 0000000..33f2b7c
--- /dev/null
+++ b/src/main/resources/data/timetravelmod/advancements/timetraveling/timemachine.json
@@ -0,0 +1,20 @@
+{
+ "display": {
+ "icon": {
+ "item": "timetravelmod:timemachinecore"
+ },
+ "title": {
+ "translate": "advancements.timetraveling.timemachine.title"
+ },
+ "description": {
+ "translate": "advancements.timetraveling.timemachine.description"
+ }
+ },
+ "parent": "timetravelmod:timetraveling/not_diamonds",
+ "criteria": {
+ "use": {
+ "trigger": "timetravelmod:access_time_machine",
+ "conditions": {}
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/main/resources/data/timetravelmod/loot_tables/blocks/gunpowderwire.json b/src/main/resources/data/timetravelmod/loot_tables/blocks/gunpowderwire.json
new file mode 100644
index 0000000..2245541
--- /dev/null
+++ b/src/main/resources/data/timetravelmod/loot_tables/blocks/gunpowderwire.json
@@ -0,0 +1,26 @@
+{
+ "type": "minecraft:block",
+ "pools": [
+ {
+ "rolls": 1,
+ "entries": [
+ {
+ "type": "minecraft:item",
+ "name": "timetravelmod:gunpowderwire"
+ }
+ ],
+ "conditions": [
+ {
+ "condition": "minecraft:survives_explosion"
+ },
+ {
+ "condition": "minecraft:block_state_property",
+ "block": "timetravelmod:gunpowderwire",
+ "properties": {
+ "burned": "false"
+ }
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
diff --git a/src/main/resources/data/timetravelmod/loot_tables/blocks/heavyblock.json b/src/main/resources/data/timetravelmod/loot_tables/blocks/heavyblock.json
new file mode 100644
index 0000000..ed5bb64
--- /dev/null
+++ b/src/main/resources/data/timetravelmod/loot_tables/blocks/heavyblock.json
@@ -0,0 +1,19 @@
+{
+ "type": "minecraft:block",
+ "pools": [
+ {
+ "rolls": 1,
+ "entries": [
+ {
+ "type": "minecraft:item",
+ "name": "timetravelmod:heavyblock"
+ }
+ ],
+ "conditions": [
+ {
+ "condition": "minecraft:survives_explosion"
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
diff --git a/src/main/resources/data/timetravelmod/loot_tables/blocks/reinforcedheavyblock.json b/src/main/resources/data/timetravelmod/loot_tables/blocks/reinforcedheavyblock.json
new file mode 100644
index 0000000..e4794df
--- /dev/null
+++ b/src/main/resources/data/timetravelmod/loot_tables/blocks/reinforcedheavyblock.json
@@ -0,0 +1,19 @@
+{
+ "type": "minecraft:block",
+ "pools": [
+ {
+ "rolls": 1,
+ "entries": [
+ {
+ "type": "minecraft:item",
+ "name": "timetravelmod:reinforcedheavyblock"
+ }
+ ],
+ "conditions": [
+ {
+ "condition": "minecraft:survives_explosion"
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
diff --git a/src/main/resources/data/timetravelmod/loot_tables/blocks/temporalcauldron.json b/src/main/resources/data/timetravelmod/loot_tables/blocks/temporalcauldron.json
new file mode 100644
index 0000000..b494f0a
--- /dev/null
+++ b/src/main/resources/data/timetravelmod/loot_tables/blocks/temporalcauldron.json
@@ -0,0 +1,19 @@
+{
+ "type": "minecraft:block",
+ "pools": [
+ {
+ "rolls": 1,
+ "entries": [
+ {
+ "type": "minecraft:item",
+ "name": "timetravelmod:temporalcauldron"
+ }
+ ],
+ "conditions": [
+ {
+ "condition": "minecraft:survives_explosion"
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
diff --git a/src/main/resources/data/timetravelmod/loot_tables/blocks/timecrystalore.json b/src/main/resources/data/timetravelmod/loot_tables/blocks/timecrystalore.json
new file mode 100644
index 0000000..6993fe6
--- /dev/null
+++ b/src/main/resources/data/timetravelmod/loot_tables/blocks/timecrystalore.json
@@ -0,0 +1,19 @@
+{
+ "type": "minecraft:block",
+ "pools": [
+ {
+ "rolls": 1,
+ "entries": [
+ {
+ "type": "minecraft:item",
+ "name": "timetravelmod:timecrystalore"
+ }
+ ],
+ "conditions": [
+ {
+ "condition": "minecraft:survives_explosion"
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
diff --git a/src/main/resources/data/timetravelmod/loot_tables/blocks/timemachinebasicblock.json b/src/main/resources/data/timetravelmod/loot_tables/blocks/timemachinebasicblock.json
new file mode 100644
index 0000000..d419911
--- /dev/null
+++ b/src/main/resources/data/timetravelmod/loot_tables/blocks/timemachinebasicblock.json
@@ -0,0 +1,19 @@
+{
+ "type": "minecraft:block",
+ "pools": [
+ {
+ "rolls": 1,
+ "entries": [
+ {
+ "type": "minecraft:item",
+ "name": "timetravelmod:timemachinebasicblock"
+ }
+ ],
+ "conditions": [
+ {
+ "condition": "minecraft:survives_explosion"
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
diff --git a/src/main/resources/data/timetravelmod/loot_tables/blocks/timemachinecontrolpanel.json b/src/main/resources/data/timetravelmod/loot_tables/blocks/timemachinecontrolpanel.json
new file mode 100644
index 0000000..f066fcc
--- /dev/null
+++ b/src/main/resources/data/timetravelmod/loot_tables/blocks/timemachinecontrolpanel.json
@@ -0,0 +1,19 @@
+{
+ "type": "minecraft:block",
+ "pools": [
+ {
+ "rolls": 1,
+ "entries": [
+ {
+ "type": "minecraft:item",
+ "name": "timetravelmod:timemachinecontrolpanel"
+ }
+ ],
+ "conditions": [
+ {
+ "condition": "minecraft:survives_explosion"
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
diff --git a/src/main/resources/data/timetravelmod/loot_tables/blocks/timemachinecore.json b/src/main/resources/data/timetravelmod/loot_tables/blocks/timemachinecore.json
new file mode 100644
index 0000000..c02cc71
--- /dev/null
+++ b/src/main/resources/data/timetravelmod/loot_tables/blocks/timemachinecore.json
@@ -0,0 +1,19 @@
+{
+ "type": "minecraft:block",
+ "pools": [
+ {
+ "rolls": 1,
+ "entries": [
+ {
+ "type": "minecraft:item",
+ "name": "timetravelmod:timemachinecore"
+ }
+ ],
+ "conditions": [
+ {
+ "condition": "minecraft:survives_explosion"
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
diff --git a/src/main/resources/data/timetravelmod/loot_tables/blocks/timemachinerecaller.json b/src/main/resources/data/timetravelmod/loot_tables/blocks/timemachinerecaller.json
new file mode 100644
index 0000000..af67102
--- /dev/null
+++ b/src/main/resources/data/timetravelmod/loot_tables/blocks/timemachinerecaller.json
@@ -0,0 +1,19 @@
+{
+ "type": "minecraft:block",
+ "pools": [
+ {
+ "rolls": 1,
+ "entries": [
+ {
+ "type": "minecraft:item",
+ "name": "timetravelmod:timemachinerecaller"
+ }
+ ],
+ "conditions": [
+ {
+ "condition": "minecraft:survives_explosion"
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
diff --git a/src/main/resources/data/timetravelmod/loot_tables/blocks/timemachinetracker.json b/src/main/resources/data/timetravelmod/loot_tables/blocks/timemachinetracker.json
new file mode 100644
index 0000000..bb97039
--- /dev/null
+++ b/src/main/resources/data/timetravelmod/loot_tables/blocks/timemachinetracker.json
@@ -0,0 +1,19 @@
+{
+ "type": "minecraft:block",
+ "pools": [
+ {
+ "rolls": 1,
+ "entries": [
+ {
+ "type": "minecraft:item",
+ "name": "timetravelmod:timemachinetracker"
+ }
+ ],
+ "conditions": [
+ {
+ "condition": "minecraft:survives_explosion"
+ }
+ ]
+ }
+ ]
+}
\ No newline at end of file
diff --git a/src/main/resources/data/timetravelmod/recipes/communicationscircuit.json b/src/main/resources/data/timetravelmod/recipes/communicationscircuit.json
new file mode 100644
index 0000000..9f49701
--- /dev/null
+++ b/src/main/resources/data/timetravelmod/recipes/communicationscircuit.json
@@ -0,0 +1,32 @@
+{
+ "type": "minecraft:crafting_shaped",
+ "pattern": [
+ "TTT",
+ "RGR",
+ "NNN" ],
+ "key": {
+ "T": [
+ {
+ "item": "minecraft:redstone_torch"
+ }
+ ],
+ "R": [
+ {
+ "item": "minecraft:redstone"
+ }
+ ],
+ "G": [
+ {
+ "item": "minecraft:green_terracotta"
+ }
+ ],
+ "N": [
+ {
+ "item": "minecraft:gold_nugget"
+ }
+ ]
+ },
+ "result": {
+ "item": "timetravelmod:communicationscircuit"
+ }
+}
\ No newline at end of file
diff --git a/src/main/resources/data/timetravelmod/recipes/controllercircuit.json b/src/main/resources/data/timetravelmod/recipes/controllercircuit.json
new file mode 100644
index 0000000..c7b9ad3
--- /dev/null
+++ b/src/main/resources/data/timetravelmod/recipes/controllercircuit.json
@@ -0,0 +1,37 @@
+{
+ "type": "minecraft:crafting_shaped",
+ "pattern": [
+ "BBB",
+ "RCR",
+ "RAL" ],
+ "key": {
+ "B": [
+ {
+ "item": "minecraft:stone_button"
+ }
+ ],
+ "R": [
+ {
+ "item": "minecraft:redstone"
+ }
+ ],
+ "C": [
+ {
+ "item": "minecraft:comparator"
+ }
+ ],
+ "A": [
+ {
+ "item": "minecraft:repeater"
+ }
+ ],
+ "L": [
+ {
+ "item": "minecraft:lever"
+ }
+ ]
+ },
+ "result": {
+ "item": "timetravelmod:controllercircuit"
+ }
+}
\ No newline at end of file
diff --git a/src/main/resources/data/timetravelmod/recipes/controllercircuit_b.json b/src/main/resources/data/timetravelmod/recipes/controllercircuit_b.json
new file mode 100644
index 0000000..5e5ba98
--- /dev/null
+++ b/src/main/resources/data/timetravelmod/recipes/controllercircuit_b.json
@@ -0,0 +1,37 @@
+{
+ "type": "minecraft:crafting_shaped",
+ "pattern": [
+ "BBB",
+ "RCR",
+ "LAR" ],
+ "key": {
+ "B": [
+ {
+ "item": "minecraft:stone_button"
+ }
+ ],
+ "R": [
+ {
+ "item": "minecraft:redstone"
+ }
+ ],
+ "C": [
+ {
+ "item": "minecraft:comparator"
+ }
+ ],
+ "A": [
+ {
+ "item": "minecraft:repeater"
+ }
+ ],
+ "L": [
+ {
+ "item": "minecraft:lever"
+ }
+ ]
+ },
+ "result": {
+ "item": "timetravelmod:controllercircuit"
+ }
+}
\ No newline at end of file
diff --git a/src/main/resources/data/timetravelmod/recipes/engineerbook.json b/src/main/resources/data/timetravelmod/recipes/engineerbook.json
new file mode 100644
index 0000000..364b03d
--- /dev/null
+++ b/src/main/resources/data/timetravelmod/recipes/engineerbook.json
@@ -0,0 +1,14 @@
+{
+ "type": "minecraft:crafting_shapeless",
+ "ingredients": [
+ {
+ "item": "minecraft:book"
+ },
+ {
+ "item": "timetravelmod:controllercircuit"
+ }
+ ],
+ "result": {
+ "item": "timetravelmod:engineerbook"
+ }
+}
\ No newline at end of file
diff --git a/src/main/resources/data/timetravelmod/recipes/gunpowder.json b/src/main/resources/data/timetravelmod/recipes/gunpowder.json
new file mode 100644
index 0000000..9358141
--- /dev/null
+++ b/src/main/resources/data/timetravelmod/recipes/gunpowder.json
@@ -0,0 +1,11 @@
+{
+ "type": "minecraft:crafting_shapeless",
+ "ingredients": [
+ {
+ "item": "timetravelmod:gunpowderwire"
+ }
+ ],
+ "result": {
+ "item": "minecraft:gunpowder"
+ }
+}
\ No newline at end of file
diff --git a/src/main/resources/data/timetravelmod/recipes/gunpowderwire.json b/src/main/resources/data/timetravelmod/recipes/gunpowderwire.json
new file mode 100644
index 0000000..93ec7a0
--- /dev/null
+++ b/src/main/resources/data/timetravelmod/recipes/gunpowderwire.json
@@ -0,0 +1,16 @@
+{
+ "type": "minecraft:crafting_shaped",
+ "pattern": [
+ "GG" ],
+ "key": {
+ "G": [
+ {
+ "item": "minecraft:gunpowder"
+ }
+ ]
+ },
+ "result": {
+ "item": "timetravelmod:gunpowderwire",
+ "count": 2
+ }
+}
\ No newline at end of file
diff --git a/src/main/resources/data/timetravelmod/recipes/heavyblock.json b/src/main/resources/data/timetravelmod/recipes/heavyblock.json
new file mode 100644
index 0000000..9ced183
--- /dev/null
+++ b/src/main/resources/data/timetravelmod/recipes/heavyblock.json
@@ -0,0 +1,18 @@
+{
+ "type": "minecraft:crafting_shaped",
+ "pattern": [
+ "HHH",
+ "HHH",
+ "HHH" ],
+ "key": {
+ "H": [
+ {
+ "item": "timetravelmod:heavyingot"
+ }
+ ]
+ },
+ "result": {
+ "item": "timetravelmod:heavyblock",
+ "count": 1
+ }
+}
\ No newline at end of file
diff --git a/src/main/resources/data/timetravelmod/recipes/heavyingot.json b/src/main/resources/data/timetravelmod/recipes/heavyingot.json
new file mode 100644
index 0000000..29c9180
--- /dev/null
+++ b/src/main/resources/data/timetravelmod/recipes/heavyingot.json
@@ -0,0 +1,23 @@
+{
+ "type": "minecraft:crafting_shaped",
+ "pattern": [
+ "NNN",
+ "NIN",
+ "NNN"],
+ "key": {
+ "I": [
+ {
+ "item": "minecraft:iron_ingot"
+ }
+ ],
+ "N": [
+ {
+ "item": "minecraft:iron_nugget"
+ }
+ ]
+ },
+ "result": {
+ "item": "timetravelmod:heavyingot",
+ "count": 1
+ }
+}
\ No newline at end of file
diff --git a/src/main/resources/data/timetravelmod/recipes/reinforcedheavyblock.json b/src/main/resources/data/timetravelmod/recipes/reinforcedheavyblock.json
new file mode 100644
index 0000000..918e1a5
--- /dev/null
+++ b/src/main/resources/data/timetravelmod/recipes/reinforcedheavyblock.json
@@ -0,0 +1,23 @@
+{
+ "type": "minecraft:crafting_shaped",
+ "pattern": [
+ "III",
+ "IBI",
+ "III" ],
+ "key": {
+ "I": [
+ {
+ "item": "timetravelmod:heavyingot"
+ }
+ ],
+ "B": [
+ {
+ "item": "timetravelmod:heavyblock"
+ }
+ ]
+ },
+ "result": {
+ "item": "timetravelmod:reinforcedheavyblock",
+ "count": 1
+ }
+}
\ No newline at end of file
diff --git a/src/main/resources/data/timetravelmod/recipes/temporalcauldron.json b/src/main/resources/data/timetravelmod/recipes/temporalcauldron.json
new file mode 100644
index 0000000..d75bea6
--- /dev/null
+++ b/src/main/resources/data/timetravelmod/recipes/temporalcauldron.json
@@ -0,0 +1,21 @@
+{
+ "type": "minecraft:crafting_shaped",
+ "pattern": [
+ "I I",
+ "ICI",
+ "III" ],
+ "key": {
+ "I": [
+ {
+ "item": "minecraft:iron_ingot"
+ }
+ ],
+ "C": {
+ "item": "timetravelmod:controllercircuit"
+ }
+ },
+ "result": {
+ "item": "timetravelmod:temporalcauldron",
+ "count": 1
+ }
+}
\ No newline at end of file
diff --git a/src/main/resources/data/timetravelmod/recipes/temporalcauldron_b.json b/src/main/resources/data/timetravelmod/recipes/temporalcauldron_b.json
new file mode 100644
index 0000000..1198e13
--- /dev/null
+++ b/src/main/resources/data/timetravelmod/recipes/temporalcauldron_b.json
@@ -0,0 +1,14 @@
+{
+ "type": "minecraft:crafting_shapeless",
+ "ingredients": [
+ {
+ "item": "minecraft:cauldron"
+ },
+ {
+ "item": "timetravelmod:controllercircuit"
+ }
+ ],
+ "result": {
+ "item": "timetravelmod:temporalcauldron"
+ }
+}
\ No newline at end of file
diff --git a/src/main/resources/data/timetravelmod/recipes/timecrystal.json b/src/main/resources/data/timetravelmod/recipes/timecrystal.json
new file mode 100644
index 0000000..85d6261
--- /dev/null
+++ b/src/main/resources/data/timetravelmod/recipes/timecrystal.json
@@ -0,0 +1,9 @@
+{
+ "type": "smelting",
+ "ingredient": {
+ "item": "timetravelmod:timecrystalore"
+ },
+ "result": "timetravelmod:timecrystal",
+ "experience": 3,
+ "cookingtime": 200
+}
\ No newline at end of file
diff --git a/src/main/resources/data/timetravelmod/recipes/timemachinebasicblock.json b/src/main/resources/data/timetravelmod/recipes/timemachinebasicblock.json
new file mode 100644
index 0000000..94ce736
--- /dev/null
+++ b/src/main/resources/data/timetravelmod/recipes/timemachinebasicblock.json
@@ -0,0 +1,23 @@
+{
+ "type": "minecraft:crafting_shaped",
+ "pattern": [
+ "GRG",
+ "RRR",
+ "GRG" ],
+ "key": {
+ "G": [
+ {
+ "item": "minecraft:gold_block"
+ }
+ ],
+ "R": [
+ {
+ "item": "minecraft:redstone"
+ }
+ ]
+ },
+ "result": {
+ "item": "timetravelmod:timemachinebasicblock",
+ "count": 4
+ }
+}
\ No newline at end of file
diff --git a/src/main/resources/data/timetravelmod/recipes/timemachinecontrolpanel.json b/src/main/resources/data/timetravelmod/recipes/timemachinecontrolpanel.json
new file mode 100644
index 0000000..d0f74d4
--- /dev/null
+++ b/src/main/resources/data/timetravelmod/recipes/timemachinecontrolpanel.json
@@ -0,0 +1,14 @@
+{
+ "type": "minecraft:crafting_shapeless",
+ "ingredients": [
+ {
+ "item": "timetravelmod:timemachinebasicblock"
+ },
+ {
+ "item": "timetravelmod:controllercircuit"
+ }
+ ],
+ "result": {
+ "item": "timetravelmod:timemachinecontrolpanel"
+ }
+}
\ No newline at end of file
diff --git a/src/main/resources/data/timetravelmod/recipes/timemachinecore.json b/src/main/resources/data/timetravelmod/recipes/timemachinecore.json
new file mode 100644
index 0000000..30c85ff
--- /dev/null
+++ b/src/main/resources/data/timetravelmod/recipes/timemachinecore.json
@@ -0,0 +1,14 @@
+{
+ "type": "minecraft:crafting_shapeless",
+ "ingredients": [
+ {
+ "item": "timetravelmod:timemachinebasicblock"
+ },
+ {
+ "item": "timetravelmod:timecrystal"
+ }
+ ],
+ "result": {
+ "item": "timetravelmod:timemachinecore"
+ }
+}
\ No newline at end of file
diff --git a/src/main/resources/data/timetravelmod/recipes/timemachinerecaller.json b/src/main/resources/data/timetravelmod/recipes/timemachinerecaller.json
new file mode 100644
index 0000000..842391a
--- /dev/null
+++ b/src/main/resources/data/timetravelmod/recipes/timemachinerecaller.json
@@ -0,0 +1,27 @@
+{
+ "type": "minecraft:crafting_shaped",
+ "pattern": [
+ "CRC",
+ "RMR",
+ "CRC" ],
+ "key": {
+ "C": [
+ {
+ "item": "minecraft:gray_concrete"
+ }
+ ],
+ "R": [
+ {
+ "item": "minecraft:redstone"
+ }
+ ],
+ "M": [
+ {
+ "item": "timetravelmod:communicationscircuit"
+ }
+ ]
+ },
+ "result": {
+ "item": "timetravelmod:timemachinerecaller"
+ }
+}
\ No newline at end of file
diff --git a/src/main/resources/data/timetravelmod/recipes/timemachinetracker.json b/src/main/resources/data/timetravelmod/recipes/timemachinetracker.json
new file mode 100644
index 0000000..7a8d94b
--- /dev/null
+++ b/src/main/resources/data/timetravelmod/recipes/timemachinetracker.json
@@ -0,0 +1,14 @@
+{
+ "type": "minecraft:crafting_shapeless",
+ "ingredients": [
+ {
+ "item": "timetravelmod:timemachinebasicblock"
+ },
+ {
+ "item": "timetravelmod:communicationscircuit"
+ }
+ ],
+ "result": {
+ "item": "timetravelmod:timemachinetracker"
+ }
+}
\ No newline at end of file
diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json
new file mode 100644
index 0000000..6d1da48
--- /dev/null
+++ b/src/main/resources/fabric.mod.json
@@ -0,0 +1,41 @@
+{
+ "schemaVersion": 1,
+ "id": "timetravelmod",
+ "version": "${version}",
+ "name": "Time Travel Mod",
+ "description": "Ever wanted to travel through time in Minecraft? Build your own time travel machine and discover a bunch of new worlds, objects and mobs!",
+ "authors": [
+ "rdvdev2"
+ ],
+ "contact": {
+ "email": "rdvdev2@gmail.com",
+ "homepage": "https://minecraft.curseforge.com/projects/time-travel-mod",
+ "issues": "https://github.com/rdvdev2/TimeTravelMod-Fabric/issues",
+ "sources": "https://github.com/rdvdev2/TimeTravelMod"
+ },
+ "license": "GPL-3.0-only",
+ "icon": "assets/timetravelmod/icon.png",
+ "environment": "*",
+ "entrypoints": {
+ "main": [
+ "com.rdvdev2.TimeTravelMod.Mod"
+ ],
+ "client": [
+ "com.rdvdev2.TimeTravelMod.ModClient"
+ ],
+ "modmenu": [
+ "com.rdvdev2.TimeTravelMod.integration.ModMenuIntegration"
+ ]
+ },
+ "mixins": [
+ "timetravelmod.mixins.json"
+ ],
+ "depends": {
+ "fabricloader": "*",
+ "fabric": "*",
+ "minecraft": "1.15.2"
+ },
+ "custom": {
+ "timetravelmod_updateurl": "https://raw.githubusercontent.com/rdvdev2/TimeTravelMod-Fabric/1.15.2/updates.csv"
+ }
+}
diff --git a/src/main/resources/pack.mcmeta b/src/main/resources/pack.mcmeta
new file mode 100644
index 0000000..340b698
--- /dev/null
+++ b/src/main/resources/pack.mcmeta
@@ -0,0 +1,7 @@
+{
+ "pack": {
+ "description": "Time Travel Mod resources",
+ "pack_format": 5,
+ "_comment": "All the assets related to Time Travel Mod"
+ }
+}
diff --git a/src/main/resources/timetravelmod.mixins.json b/src/main/resources/timetravelmod.mixins.json
new file mode 100644
index 0000000..52f9b88
--- /dev/null
+++ b/src/main/resources/timetravelmod.mixins.json
@@ -0,0 +1,18 @@
+{
+ "required": true,
+ "package": "com.rdvdev2.TimeTravelMod.mixin",
+ "compatibilityLevel": "JAVA_8",
+ "mixins": [
+ "IBiomeSourceType",
+ "ICriterions",
+ "IDamageSource",
+ "MixinOverworldDimension",
+ "MixinPlayerManager"
+ ],
+ "client": [
+ "client.MixinSoundManager"
+ ],
+ "injectors": {
+ "defaultRequire": 1
+ }
+}
diff --git a/updates.csv b/updates.csv
new file mode 100644
index 0000000..7fa135a
--- /dev/null
+++ b/updates.csv
@@ -0,0 +1 @@
+R,1.15.2,1.15.2-0.3.0.0
\ No newline at end of file
diff --git a/version.properties b/version.properties
new file mode 100644
index 0000000..2bc1904
--- /dev/null
+++ b/version.properties
@@ -0,0 +1,5 @@
+MC=1.15.2
+MAJORMOD=0
+MAJORAPI=3
+MINOR=0
+PATCH=0